一分钟搭建影视站,支持Docker等部署方式
chore(docker): 添加 Docker 支持以便容器化部署
bestZwei436f917738ad
diff --git a/.dockerignore b/.dockerignoredeleted file mode 100644index e0069bd..0000000--- a/.dockerignore+++ /dev/null@@ -1,11 +0,0 @@-.github/-node_modules/-netlify*-.gitignore-.dockerignore-.env*-nodemon.json-vercel.json-Dockerfile*-docker-compose*.yml-.docker/\ No newline at end of filediff --git a/.env.example b/.env.exampleindex 08a7854..644f122 100644--- a/.env.example+++ b/.env.example@@ -1,20 +1,12 @@-# 基本配置-PORT=8080-PASSWORD=111111-DEBUG=false--# CORS 配置-CORS_ORIGIN=*+# 必填:访问密码(不设置时站点会提示管理员配置后再可用)+PASSWORD=change-me-# 请求配置-REQUEST_TIMEOUT=5000-MAX_RETRIES=2-USER_AGENT=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36+# 可选:会话/代理签名密钥;不设置时从 PASSWORD 派生+# PROXY_SECRET=-# 缓存配置-CACHE_MAX_AGE=1d+# 可选:代理请求上游的超时与重试+REQUEST_TIMEOUT=8000+MAX_RETRIES=1-# 安全配置-BLOCKED_HOSTS=localhost,127.0.0.1,0.0.0.0,::1-BLOCKED_IP_PREFIXES=192.168.,10.,172.-FILTERED_HEADERS=content-security-policy,cookie,set-cookie,x-frame-options,access-control-allow-origin+# 可选:调试+DEBUG=falsediff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.ymldeleted file mode 100644index 3d4cf21..0000000--- a/.github/ISSUE_TEMPLATE/bug_report.yml+++ /dev/null@@ -1,60 +0,0 @@-name: BUG Report / BUG 报告-description: "Create a report to help us improve"-title: "[BUG]"-labels: ["bug"]-body:- - type: checkboxes- id: self_check- attributes:- label: Self-check / 自查- description: Self-Check before submitting the Issue / 在提交Issue之前的自查- options:- - label: I have already cleard my browser cache / 我已经清除了浏览器缓存- required: false- - type: checkboxes- id: confirm- attributes:- label: Confirm / 确认- description: Please confirm / 请你确认- options:- - label: I have searched the Issue and found no related issues / 我已经搜索过Issue,没有找到相关问题- required: true- - label: I am using the latest source from this repository / 我使用的是来自此仓库的最新版代码- required: true- - label: I provided information which does not include sensitive information / 我提供的信息里不包含敏感信息- required: true- - type: textarea- id: description- attributes:- label: BUG Description / BUG 描述- description: Describe your BUG here / 在此描述你的BUG- validations:- required: true- - type: textarea- id: expected_behavior- attributes:- label: Expected Behavior / 预期行为- description: What you expect to happen / 你认为的预期行为- validations:- required: true- - type: textarea- id: reproduce- attributes:- label: Reproduction Steps / 复现步骤- description: How to reproduce / 如何复现- validations:- required: true- - type: textarea- id: debug- attributes:- label: Console Log / 控制台日志- description: F12 -> Console / 从 F12 -> 控制台 复制你觉得可能有帮助的日志- validations:- required: false- - type: textarea- id: additional_context- attributes:- label: Additional Information / 附加信息- description: Any other information you think might be helpful to solve this BUG / 你觉得对解决此BUG有帮助的其它信息- validations:- required: false\ No newline at end of filediff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.ymldeleted file mode 100644index 6138411..0000000--- a/.github/ISSUE_TEMPLATE/config.yml+++ /dev/null@@ -1,5 +0,0 @@-blank_issues_enabled: false-contact_links:- - name: How To Ask Questions The Smart Way / 提问的智慧- about: Read it before start a new issue- url: http://www.catb.org/~esr/faqs/smart-questions.htmldiff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.ymldeleted file mode 100644index 95f71e1..0000000--- a/.github/ISSUE_TEMPLATE/feature_request.yml+++ /dev/null@@ -1,34 +0,0 @@-name: Feature request / 功能请求-description: "Suggest an idea for this project"-title: "[Feature Request]"-labels: ["enhancement"]-body:- - type: checkboxes- id: confirm- attributes:- label: Confirm / 确认- description: Please confirm / 请你确认- options:- - label: I have searched the Issue and found no related feature requests / 我已经搜索过Issue,没有找到相关的功能请求- required: true- - type: textarea- id: description- attributes:- label: Feature Description / 功能描述- description: Describe the feature you want / 描述你想要的功能- validations:- required: true- - type: textarea- id: how_to- attributes:- label: How to Implement / 如何实现- description: How to implement this feature / 应该如何实现这个功能- validations:- required: false- - type: textarea- id: additional_context- attributes:- label: Additional Information / 附加信息- description: Any other information you think might be helpful to implement this feature / 你觉得对实现此功能有帮助的其它信息- validations:- required: false\ No newline at end of filediff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.ymldeleted file mode 100644index d721c37..0000000--- a/.github/workflows/docker-build.yml+++ /dev/null@@ -1,56 +0,0 @@-name: Build LibreTV image--on:- workflow_run:- workflows: ["Bump version"]- types:- - completed- workflow_dispatch:--jobs:- build:- name: Build LibreTV image- runs-on: ubuntu-latest- if: (github.event.workflow_run.conclusion == 'success' && github.repository == 'LibreSpark/LibreTV') || (github.repository == 'bestZwei/libretv')-- steps:- - name: Check out repository- uses: actions/checkout@v4-- - name: Read version from VERSION.txt- id: version- run: |- VERSION=$(cat VERSION.txt)- echo "VERSION=$VERSION" >> $GITHUB_OUTPUT-- - name: Set Docker image tag based on repository- id: set-tag- run: |- if [ "${{ github.repository }}" = "LibreSpark/LibreTV" ]; then- echo "IMAGE_NAME=libretv" >> $GITHUB_OUTPUT- echo "TAGS=${{ secrets.DOCKER_USERNAME }}/libretv:latest,${{ secrets.DOCKER_USERNAME }}/libretv:${{ steps.version.outputs.VERSION }}" >> $GITHUB_OUTPUT- else- echo "IMAGE_NAME=libretv-beta" >> $GITHUB_OUTPUT- echo "TAGS=${{ secrets.DOCKER_USERNAME }}/libretv-beta:latest" >> $GITHUB_OUTPUT- fi-- - name: Set up Docker QEMU- uses: docker/setup-qemu-action@v3-- - name: Set up Docker Buildx- uses: docker/setup-buildx-action@v3-- - name: Login to DockerHub- uses: docker/login-action@v3- with:- username: ${{ secrets.DOCKER_USERNAME }}- password: ${{ secrets.DOCKER_PASSWORD }}-- - name: Build and push LibreTV image- uses: docker/[email protected]- with:- context: .- file: Dockerfile- push: true- tags: ${{ steps.set-tag.outputs.TAGS }}- platforms: linux/amd64,linux/arm64/v8,linux/arm/v7\ No newline at end of filediff --git a/.github/workflows/nomore-spam.yml b/.github/workflows/nomore-spam.ymldeleted file mode 100644index d6797da..0000000--- a/.github/workflows/nomore-spam.yml+++ /dev/null@@ -1,31 +0,0 @@-name: NoMore Spam--on:- issues:- types: [opened]- pull_request_target:- types: [opened]--permissions:- contents: read- issues: write- pull-requests: write- models: read- actions: write--jobs:- spam-detection:- runs-on: ubuntu-latest-- steps:- - name: Detect and close spam- uses: JohnsonRan/nomore-spam@main- with:- github-token: ${{ secrets.GITHUB_TOKEN }}- ai-base-url: ${{ secrets.AI_BASE_URL }}- ai-api-key: ${{ secrets.AI_API_KEY }}- ai-model: 'qwen3-235b-a22b'- labels: 'bug,enhancement,question'- analyze-file-changes: 'true'- max-analysis-depth: 'normal'- blacklist: ${{ secrets.BLACKLIST }} # 可选:黑名单用户列表diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.ymldeleted file mode 100644index 57ec15c..0000000--- a/.github/workflows/sync.yml+++ /dev/null@@ -1,36 +0,0 @@-name: Upstream Sync--permissions:- contents: write--on:- schedule:- - cron: "0 4 * * *" # At 12PM UTC+8- workflow_dispatch:--jobs:- sync_latest_from_upstream:- name: Sync latest commits from upstream repo- runs-on: ubuntu-latest- if: ${{ github.event.repository.fork }}-- steps:- # Step 1: run a standard checkout action- - name: Checkout target repo- uses: actions/checkout@v4-- # Step 2: run the sync action- - name: Sync upstream changes- id: sync- uses: aormsby/[email protected]- with:- upstream_sync_repo: LibreSpark/LibreTV- upstream_sync_branch: main- target_sync_branch: main- target_repo_token: ${{ secrets.GITHUB_TOKEN }}-- - name: Sync check- if: failure()- run: |- echo "[Error] Due to a change in the workflow file of the upstream repository, GitHub has automatically suspended the scheduled automatic update. You need to manually sync your fork."- exit 1diff --git a/.github/workflows/version.yml b/.github/workflows/version.ymldeleted file mode 100644index 55bb994..0000000--- a/.github/workflows/version.yml+++ /dev/null@@ -1,35 +0,0 @@-name: Bump version--on:- push:- branches:- - main- workflow_dispatch:--jobs:- bump-version:- if: github.repository == 'LibreSpark/LibreTV'- runs-on: ubuntu-latest- env:- TZ: 'Asia/Shanghai'-- steps:- - name: Checkout repository- uses: actions/checkout@v4- - name: Bump version and commit changes- run: |- CURRENT_TIME=$(date +"%Y-%m-%d %H:%M")- git config user.name 'github-actions[bot]'- git config user.email 'github-actions[bot]@users.noreply.github.com'- echo $(date +"%Y%m%d%H%M") > VERSION.txt- git add VERSION.txt- git commit -m "Auto Update $CURRENT_TIME"- git push origin main-- - name: Delete workflow runs- uses: Mattraks/delete-workflow-runs@main- with:- token: ${{ secrets.GITHUB_TOKEN }}- repository: ${{ github.repository }}- retain_days: 0- keep_minimum_runs: 2\ No newline at end of filediff --git a/.gitignore b/.gitignoreindex 1a1ffac..81b1fe3 100644--- a/.gitignore+++ b/.gitignore@@ -1,25 +1,6 @@-# Logs-*.log-npm-debug.log*-yarn-debug.log*-yarn-error.log*-pnpm-debug.log*-lerna-debug.log*--node_modules-.DS_Store-dist-dist-ssr-coverage-*.local--# Editor directories and files-.vscode/*-!.vscode/extensions.json-.idea-*.suo-*.ntvs*-*.njsproj-*.sln-*.sw?-.env+node_modules/+.next/+out/+.env*.local+*.tsbuildinfo+vitest-results.jsondiff --git a/CONTRIBUTING.md b/CONTRIBUTING.mddeleted file mode 100644index 350124e..0000000--- a/CONTRIBUTING.md+++ /dev/null@@ -1,289 +0,0 @@-# 贡献指南--感谢您对 LibreTV 项目的关注!我们欢迎所有形式的贡献,包括但不限于代码提交、问题报告、功能建议、文档改进等。--## 🚀 快速开始--### 开发环境要求--- Node.js 18.0 或更高版本(服务端使用 Express 5)-- Git-- 支持 ES6 的现代浏览器--### 项目设计原则--- **无内置数据源**:本项目默认不包含任何视频源。所有采集站 / CMS API 均由用户在前端「设置」中添加,代码仓库内不维护任何默认源。-- **代理与服务端隔离**:前端只负责搜索/渲染;跨域抓取与 HLS 改写均在服务端函数(`server.mjs` / `api/` / `netlify/functions/` / `functions/`)完成。-- **安全第一**:代理鉴权、SSRF 拦截、源码保护为必保留能力,任何改动不得削弱这些防护。贡献涉及代理逻辑时请一并更新相关测试与文档。--### 本地开发设置--1. **Fork 项目**- ```bash- # 通过 GitHub 网页 Fork 本项目到您的账户- ```--2. **克隆仓库**- ```bash- git clone https://github.com/YOUR_USERNAME/LibreTV.git- cd LibreTV- ```--3. **安装依赖**- ```bash- npm install- ```--4. **配置环境变量**- ```bash- cp .env.example .env- # 根据需要修改 .env 文件中的配置- ```--5. **启动开发服务器**- ```bash- npm run dev- ```--6. **访问应用**- ```- 打开浏览器访问 http://localhost:8080- ```--## 🤝 如何贡献--### 报告问题--如果您发现了 bug 或希望建议新功能:--1. 首先查看 [Issues](https://github.com/LibreSpark/LibreTV/issues) 确保问题尚未被报告-2. 创建新的 Issue,请包含:- - 清晰的标题和描述- - 重现步骤(如果是 bug)- - 预期行为和实际行为- - 环境信息(浏览器、操作系统等)- - 截图或错误日志(如果适用)--### 提交代码--1. **创建分支**- ```bash- git checkout -b feature/your-feature-name- # 或- git checkout -b fix/your-bug-fix- ```--2. **进行开发**- - 保持代码风格一致- - 添加必要的注释- - 确保功能正常工作--3. **测试更改**- ```bash- # 确保应用正常启动- npm run dev-- # 测试各项功能- # - 视频搜索- # - 视频播放- # - 响应式设计- # - 各种部署方式- ```--4. **提交更改**- ```bash- git add .- git commit -m "类型: 简洁的提交信息"- ```--5. **推送分支**- ```bash- git push origin feature/your-feature-name- ```--6. **创建 Pull Request**- - 在 GitHub 上创建 Pull Request- - 填写详细的 PR 描述- - 等待代码审查--### 提交信息格式--请使用以下格式提交代码:--```-类型: 简洁的描述--详细描述(可选)--相关 Issue: #123-```--**提交类型:**-- `feat`: 新功能-- `fix`: 修复 bug-- `docs`: 文档更新-- `style`: 代码格式调整-- `refactor`: 代码重构-- `test`: 测试相关-- `chore`: 构建过程或辅助工具的变动--**示例:**-```-feat: 添加自定义播放器控制栏--- 增加播放速度调节功能-- 优化进度条拖拽体验-- 添加音量记忆功能--相关 Issue: #45-```--## 📋 代码规范--### JavaScript 规范--- 使用 ES6+ 语法-- 优先使用 `const`,需要重新赋值时使用 `let`-- 使用有意义的变量和函数名-- 函数名使用驼峰命名-- 常量使用大写字母和下划线--```javascript-// ✅ 推荐-const API_BASE_URL = 'https://api.example.com';-const searchVideos = async (keyword) => {- // 函数实现-};--// ❌ 不推荐-var url = 'https://api.example.com';-function search(k) {- // 函数实现-}-```--### CSS 规范--- 使用 BEM 命名方式或语义化类名-- 优先使用 CSS 变量-- 移动端优先的响应式设计-- 避免使用 `!important`--```css-/* ✅ 推荐 */-.video-player {- --primary-color: #00ccff;- background-color: var(--primary-color);-}--.video-player__controls {- display: flex;- gap: 1rem;-}--/* ❌ 不推荐 */-.player {- background-color: #00ccff !important;-}-```--### HTML 规范--- 使用语义化标签-- 确保可访问性(添加适当的 aria 属性)-- 保持良好的缩进格式--```html-<!-- ✅ 推荐 -->-<main class="video-search">- <section class="search-form" role="search">- <input type="search" aria-label="搜索视频" placeholder="输入关键词">- <button type="submit" aria-label="搜索">搜索</button>- </section>-</main>--<!-- ❌ 不推荐 -->-<div class="search">- <input type="text" placeholder="搜索">- <div onclick="search()">搜索</div>-</div>-```--## 🎯 贡献重点领域--我们特别欢迎以下方面的贡献:--### 核心功能-- **搜索优化**: 改进搜索算法和用户体验-- **播放器增强**: 新的播放器功能和控制选项-- **API 集成**: 添加新的视频源 API 支持-- **性能优化**: 加载速度和播放性能改进--### 用户体验-- **界面设计**: UI/UX 改进和现代化-- **响应式设计**: 移动端体验优化-- **无障碍功能**: 提高可访问性-- **国际化**: 多语言支持--### 技术架构-- **代码重构**: 提高代码质量和可维护性-- **安全性**: 安全漏洞修复和防护-- **部署优化**: 改进各平台部署流程-- **监控日志**: 添加错误监控和日志系统--### 文档和社区-- **文档完善**: API 文档、部署指南等-- **示例项目**: 集成示例和最佳实践-- **社区建设**: 问题回答和新手指导--## 🔍 代码审查流程--1. **自动检查**: PR 会触发自动化测试-2. **代码审查**: 维护者会审查代码质量和功能-3. **反馈修改**: 根据审查意见修改代码-4. **合并**: 审查通过后合并到主分支--### 审查标准--- **功能完整**: 功能按预期工作-- **代码质量**: 遵循项目编码规范-- **性能影响**: 不显著影响应用性能-- **兼容性**: 与现有功能兼容-- **文档更新**: 必要时更新相关文档--## 🚫 注意事项--### 不接受的贡献--- **侵权内容**: 包含版权争议的代码或资源-- **恶意代码**: 包含病毒、后门或其他恶意功能-- **商业推广**: 纯粹的商业宣传或广告-- **不相关功能**: 与项目核心功能无关的特性--### 法律要求--- 确保您的贡献不侵犯他人版权-- 提交的代码必须是您原创或有合法使用权-- 同意以项目相同的 MIT 许可证分发您的贡献--## 📞 联系方式--如果您有任何问题或需要帮助:--- **GitHub Issues**: [报告问题或建议](https://github.com/LibreSpark/LibreTV/issues)-- **GitHub Discussions**: [参与社区讨论](https://github.com/LibreSpark/LibreTV/discussions)-- **Email**: 通过 GitHub 联系项目维护者--## 🙏 致谢--感谢所有为 LibreTV 项目做出贡献的开发者!您的每一份贡献都让这个项目变得更好。--### 贡献者列表--我们会在项目 README 中展示所有贡献者。您的贡献被合并后,您的 GitHub 头像将出现在贡献者列表中。-------**再次感谢您的贡献!** 🎉--让我们一起构建一个更好的 LibreTV!diff --git a/Dockerfile b/Dockerfileindex 4b1d8a2..37fe68b 100644--- a/Dockerfile+++ b/Dockerfile@@ -1,34 +1,32 @@-FROM node:lts-alpine+# ---- 构建阶段 ----+FROM node:22-alpine AS builder+WORKDIR /app-LABEL maintainer="LibreTV Team"-LABEL description="LibreTV - 免费在线视频搜索与观看平台"+COPY package.json package-lock.json* ./+RUN npm ci --no-audit --no-fund-# 设置环境变量-ENV PORT=8080-ENV CORS_ORIGIN=*-ENV DEBUG=false-ENV REQUEST_TIMEOUT=5000-ENV MAX_RETRIES=2-ENV CACHE_MAX_AGE=1d+COPY . .+ENV DOCKER_BUILD=1+ENV NEXT_TELEMETRY_DISABLED=1+RUN npm run build-# 设置工作目录+# ---- 运行阶段 ----+FROM node:22-alpine AS runnerWORKDIR /app-# 复制 package.json 和 package-lock.json(如果存在)-COPY package*.json ./--# 安装依赖-RUN npm ci --only=production && npm cache clean --force+ENV NODE_ENV=production+ENV NEXT_TELEMETRY_DISABLED=1+ENV PORT=8080+ENV HOSTNAME=0.0.0.0-# 复制应用文件-COPY . .+# 非 root 用户+RUN addgroup -S nodejs && adduser -S nextjs -G nodejs-# 暴露端口-EXPOSE 8080+COPY --from=builder /app/.next/standalone ./+COPY --from=builder /app/.next/static ./.next/static+COPY --from=builder /app/public ./public-# 健康检查-HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \- CMD node -e "require('http').get('http://localhost:8080', (res) => { process.exit(res.statusCode === 200 ? 0 : 1) }).on('error', () => process.exit(1))"+USER nextjs-# 启动应用-CMD ["npm", "start"]+EXPOSE 8080+CMD ["node", "server.js"]diff --git a/LICENSE b/LICENSEdeleted file mode 100644index 17a5c4c..0000000--- a/LICENSE+++ /dev/null@@ -1,201 +0,0 @@- Apache License- Version 2.0, January 2004- http://www.apache.org/licenses/-- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION-- 1. Definitions.-- "License" shall mean the terms and conditions for use, reproduction,- and distribution as defined by Sections 1 through 9 of this document.-- "Licensor" shall mean the copyright owner or entity authorized by- the copyright owner that is granting the License.-- "Legal Entity" shall mean the union of the acting entity and all- other entities that control, are controlled by, or are under common- control with that entity. For the purposes of this definition,- "control" means (i) the power, direct or indirect, to cause the- direction or management of such entity, whether by contract or- otherwise, or (ii) ownership of fifty percent (50%) or more of the- outstanding shares, or (iii) beneficial ownership of such entity.-- "You" (or "Your") shall mean an individual or Legal Entity- exercising permissions granted by this License.-- "Source" form shall mean the preferred form for making modifications,- including but not limited to software source code, documentation- source, and configuration files.-- "Object" form shall mean any form resulting from mechanical- transformation or translation of a Source form, including but- not limited to compiled object code, generated documentation,- and conversions to other media types.-- "Work" shall mean the work of authorship, whether in Source or- Object form, made available under the License, as indicated by a- copyright notice that is included in or attached to the work- (an example is provided in the Appendix below).-- "Derivative Works" shall mean any work, whether in Source or Object- form, that is based on (or derived from) the Work and for which the- editorial revisions, annotations, elaborations, or other modifications- represent, as a whole, an original work of authorship. For the purposes- of this License, Derivative Works shall not include works that remain- separable from, or merely link (or bind by name) to the interfaces of,- the Work and Derivative Works thereof.-- "Contribution" shall mean any work of authorship, including- the original version of the Work and any modifications or additions- to that Work or Derivative Works thereof, that is intentionally- submitted to Licensor for inclusion in the Work by the copyright owner- or by an individual or Legal Entity authorized to submit on behalf of- the copyright owner. For the purposes of this definition, "submitted"- means any form of electronic, verbal, or written communication sent- to the Licensor or its representatives, including but not limited to- communication on electronic mailing lists, source code control systems,- and issue tracking systems that are managed by, or on behalf of, the- Licensor for the purpose of discussing and improving the Work, but- excluding communication that is conspicuously marked or otherwise- designated in writing by the copyright owner as "Not a Contribution."-- "Contributor" shall mean Licensor and any individual or Legal Entity- on behalf of whom a Contribution has been received by Licensor and- subsequently incorporated within the Work.-- 2. Grant of Copyright License. Subject to the terms and conditions of- this License, each Contributor hereby grants to You a perpetual,- worldwide, non-exclusive, no-charge, royalty-free, irrevocable- copyright license to reproduce, prepare Derivative Works of,- publicly display, publicly perform, sublicense, and distribute the- Work and such Derivative Works in Source or Object form.-- 3. Grant of Patent License. Subject to the terms and conditions of- this License, each Contributor hereby grants to You a perpetual,- worldwide, non-exclusive, no-charge, royalty-free, irrevocable- (except as stated in this section) patent license to make, have made,- use, offer to sell, sell, import, and otherwise transfer the Work,- where such license applies only to those patent claims licensable- by such Contributor that are necessarily infringed by their- Contribution(s) alone or by combination of their Contribution(s)- with the Work to which such Contribution(s) was submitted. If You- institute patent litigation against any entity (including a- cross-claim or counterclaim in a lawsuit) alleging that the Work- or a Contribution incorporated within the Work constitutes direct- or contributory patent infringement, then any patent licenses- granted to You under this License for that Work shall terminate- as of the date such litigation is filed.-- 4. Redistribution. You may reproduce and distribute copies of the- Work or Derivative Works thereof in any medium, with or without- modifications, and in Source or Object form, provided that You- meet the following conditions:-- (a) You must give any other recipients of the Work or- Derivative Works a copy of this License; and-- (b) You must cause any modified files to carry prominent notices- stating that You changed the files; and-- (c) You must retain, in the Source form of any Derivative Works- that You distribute, all copyright, patent, trademark, and- attribution notices from the Source form of the Work,- excluding those notices that do not pertain to any part of- the Derivative Works; and-- (d) If the Work includes a "NOTICE" text file as part of its- distribution, then any Derivative Works that You distribute must- include a readable copy of the attribution notices contained- within such NOTICE file, excluding those notices that do not- pertain to any part of the Derivative Works, in at least one- of the following places: within a NOTICE text file distributed- as part of the Derivative Works; within the Source form or- documentation, if provided along with the Derivative Works; or,- within a display generated by the Derivative Works, if and- wherever such third-party notices normally appear. The contents- of the NOTICE file are for informational purposes only and- do not modify the License. You may add Your own attribution- notices within Derivative Works that You distribute, alongside- or as an addendum to the NOTICE text from the Work, provided- that such additional attribution notices cannot be construed- as modifying the License.-- You may add Your own copyright statement to Your modifications and- may provide additional or different license terms and conditions- for use, reproduction, or distribution of Your modifications, or- for any such Derivative Works as a whole, provided Your use,- reproduction, and distribution of the Work otherwise complies with- the conditions stated in this License.-- 5. Submission of Contributions. Unless You explicitly state otherwise,- any Contribution intentionally submitted for inclusion in the Work- by You to the Licensor shall be under the terms and conditions of- this License, without any additional terms or conditions.- Notwithstanding the above, nothing herein shall supersede or modify- the terms of any separate license agreement you may have executed- with Licensor regarding such Contributions.-- 6. Trademarks. This License does not grant permission to use the trade- names, trademarks, service marks, or product names of the Licensor,- except as required for reasonable and customary use in describing the- origin of the Work and reproducing the content of the NOTICE file.-- 7. Disclaimer of Warranty. Unless required by applicable law or- agreed to in writing, Licensor provides the Work (and each- Contributor provides its Contributions) on an "AS IS" BASIS,- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or- implied, including, without limitation, any warranties or conditions- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A- PARTICULAR PURPOSE. You are solely responsible for determining the- appropriateness of using or redistributing the Work and assume any- risks associated with Your exercise of permissions under this License.-- 8. Limitation of Liability. In no event and under no legal theory,- whether in tort (including negligence), contract, or otherwise,- unless required by applicable law (such as deliberate and grossly- negligent acts) or agreed to in writing, shall any Contributor be- liable to You for damages, including any direct, indirect, special,- incidental, or consequential damages of any character arising as a- result of this License or out of the use or inability to use the- Work (including but not limited to damages for loss of goodwill,- work stoppage, computer failure or malfunction, or any and all- other commercial damages or losses), even if such Contributor- has been advised of the possibility of such damages.-- 9. Accepting Warranty or Additional Liability. While redistributing- the Work or Derivative Works thereof, You may choose to offer,- and charge a fee for, acceptance of support, warranty, indemnity,- or other liability obligations and/or rights consistent with this- License. However, in accepting such obligations, You may act only- on Your own behalf and on Your sole responsibility, not on behalf- of any other Contributor, and only if You agree to indemnify,- defend, and hold each Contributor harmless for any liability- incurred by, or claims asserted against, such Contributor by reason- of your accepting any such warranty or additional liability.-- END OF TERMS AND CONDITIONS-- APPENDIX: How to apply the Apache License to your work.-- To apply the Apache License to your work, attach the following- boilerplate notice, with the fields enclosed by brackets "[]"- replaced with your own identifying information. (Don't include- the brackets!) The text should be enclosed in the appropriate- comment syntax for the file format. We also recommend that a- file or class name and description of purpose be included on the- same "printed page" as the copyright notice for easier- identification within third-party archives.-- Copyright 2025 LibreTV Team-- Licensed under the Apache License, Version 2.0 (the "License");- you may not use this file except in compliance with the License.- You may obtain a copy of the License at-- http://www.apache.org/licenses/LICENSE-2.0-- Unless required by applicable law or agreed to in writing, software- distributed under the License is distributed on an "AS IS" BASIS,- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- See the License for the specific language governing permissions and- limitations under the License.diff --git a/README.md b/README.mdindex d4f64b6..5eef3fc 100644--- a/README.md+++ b/README.md@@ -1,157 +1,75 @@-# LibreTV - 在线视频搜索与观看平台+# LibreTV Next-<div align="center">- <img src="image/logo.png" alt="LibreTV Logo" width="120">- <br>- <p><strong>自由观影,畅享精彩</strong></p>-</div>+LibreTV 的 Next.js 重构版:免费在线视频聚合搜索与观看平台。基于 Next.js 15(App Router)+ TypeScript + Tailwind CSS,播放内核为 ArtPlayer + hls.js,支持亮暗双主题。-## 📺 项目简介+> 📖 **完整文档(Wiki)**:[docs/](docs/Home) — [架构](docs/Architecture) · [部署](docs/Deployment) · [配置](docs/Configuration) · [数据源](docs/Data-Sources) · [播放器](docs/Player) · [代理与安全](docs/Proxy-Security) · [FAQ](docs/FAQ)-LibreTV 是一个轻量级、免费、开源的在线视频搜索与观看平台。**本项目本身不内置任何视频数据源**——它只是一个"空壳"前端 + 服务端代理,需要你自行在「设置」中添加自己的采集站 / 苹果 CMS API 后才能搜索与播放。这样做的好处是:+## 与旧版的主要差异-- ✅ **完全可控**:数据来源由你自己决定,不依赖任何第三方维护的默认源;-- ✅ **合规安全**:项目不存储、不上传、不分发任何视频内容,仅作搜索与代理转发;-- ✅ **部署灵活**:同一套代码可运行在 Node、Vercel、Netlify、Cloudflare Pages、Docker 等环境。+| 方面 | 旧版 | 本版 |+| --- | --- | --- |+| 架构 | 静态 HTML + 全局脚本 + Express | Next.js App Router + React 组件 + Route Handlers |+| 聚合搜索 | 浏览器内并行请求采集站(暴露用户 IP) | 服务端并行聚合 + 失败隔离 + 关键词过滤 |+| 鉴权 | 页面下发 sha256(password),哈希即凭证 | httpOnly Cookie 会话(HMAC 签名),登录走 POST + 速率限制 |+| m3u8 代理 | 分片重写后丢失鉴权参数导致 401 | Cookie 同源自动携带,分片天然通过鉴权 |+| 播放入口 | watch.html → player.html 跳转链 | 单一 `/watch` 路由,URL 即状态,可分享/后退 |+| 播放失败 | 只能换源 | 直连失败自动回退内置代理重试 |+| 历史与进度 | localStorage 存全集 URL(易撑爆配额) | IndexedDB 只存定位信息,进入播放页按需拉详情 |+| 播放器加载 | Tailwind 运行时编译 | Tailwind 构建期编译 |+| 主题 | 仅深色 | 亮 / 暗 / 跟随系统三态切换,无首屏闪烁 |-项目结合了前端技术和服务端代理(解决跨域与 HLS 直链播放问题),可部署在支持服务端函数的各类托管服务上。+## 部署-> 本项目基于 [bestK/tv](https://github.com/bestK/tv) 进行重构与增强,并移除了内置数据源,改为完全可配置。+### Docker(推荐)-## 🚨 重要声明--- 本项目仅供**学习和个人使用**。为避免版权纠纷,**首次启动必须设置 `PASSWORD` 环境变量**,否则页面会强制提示设置密码。-- 请勿将部署的实例用于商业用途或公开分享。-- 项目开发者不对用户的使用行为承担任何法律责任;如因公开分享导致法律问题,由使用者自行承担。--## 🚀 快速部署--> 一键部署按钮会克隆**默认仓库**。如果你 fork 了本项目(尤其是做了自定义修改),请先将按钮中的仓库地址替换为你自己的仓库地址。--[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FLibreSpark%2FLibreTV)-[](https://app.netlify.com/start/deploy?repository=https://github.com/LibreSpark/LibreTV)-[](https://render.com/deploy?repo=https://github.com/LibreSpark/LibreTV)--部署完成后,记得设置环境变量 `PASSWORD`(见下方「配置」)。--## 📋 详细部署指南--不同平台使用不同的服务端适配器,但前端逻辑一致:--| 平台 | 服务端入口 | 代理路由 | 鉴权方式 |-|---|---|---|---|-| Node / Render / Docker | `server.mjs` | `/proxy/*` | 推荐 `PROXY_SECRET` 短时效 token;缺省为静态哈希 |-| Vercel | `api/proxy/[...path].mjs` | `/proxy/*`(rewrite) | 静态哈希(无 token 签发) |-| Netlify | `netlify/functions/proxy.mjs` + Edge Function `inject-env` | `/.netlify/functions/proxy/*` | 静态哈希(无 token 签发) |-| Cloudflare Pages | `functions/proxy/[[path]].js` | `/proxy/*` | 静态哈希(无 token 签发) |--完整步骤见 **[Wiki · 部署指南](docs/Deployment.md)**。+```bash+# 在 .env 中设置 PASSWORD+echo "PASSWORD=your-password" > .env+docker compose up -d -b+```-### Node / 本地开发+### 手动运行```bash-# 安装依赖(已就绪可跳过)npm install--# 设置环境变量并启动-PASSWORD=your_password node server.mjs-# 或开发模式(nodemon 热重载)-npm run dev+PASSWORD=your-password npm run build+PASSWORD=your-password npm start # 监听 8080```-访问 `http://localhost:8080`(端口由 `PORT` 控制)。+### 环境变量-> ⚠️ 用纯静态服务器(如 `python -m http.server`)打开时,代理功能不可用,视频无法播放。完整功能请使用 Node 开发服务器或上述任一服务端环境。+| 变量 | 必填 | 说明 |+| --- | --- | --- |+| `PASSWORD` | 是 | 访问密码;未设置时站点会提示管理员配置 |+| `PROXY_SECRET` | 否 | 会话/代理签名密钥;不设置时从 PASSWORD 派生(多实例部署建议显式设置) |+| `REQUEST_TIMEOUT` | 否 | 代理上游请求超时(毫秒),默认 8000 |+| `MAX_RETRIES` | 否 | 代理请求重试次数,默认 1 |+| `DEBUG` | 否 | 调试日志 |-### Docker+## 使用说明-```bash-docker run -d \- --name libretv \- --restart unless-stopped \- -p 8899:8080 \- -e PASSWORD=your_password \- bestzwei/libretv:latest-```+1. **添加数据源**:设置 → 添加 API,填入 Apple CMS 采集站地址(如 `https://example.com/api.php/provide/vod`),可选填详情页地址(部分源需要爬详情页提取播放地址)。+2. **搜索**:勾选数据源后输入片名;搜索通过服务端聚合,个别源失败不影响整体结果。+3. **播放**:详情弹窗选择剧集进入 `/watch`;支持快捷键(空格/←→/↑↓/F/Alt+←→)、移动端长按 3 倍速、自动连播、换源测速。+4. **进度与历史**:自动保存在本设备 IndexedDB,仅定位信息入库,播放时自动同步最新剧集。+5. **配置迁移**:设置 → 导出/导入配置(兼容旧版 LibreTV-Settings JSON 的历史记录迁移)。-### Docker Compose+## 开发```bash-PASSWORD=your_password docker compose up -d+npm install+PASSWORD=dev-password npm run dev # http://localhost:8080+npm test # 核心库单元测试(cms-parser / m3u8 / ssrf)+npm run typecheck```-访问 `http://localhost:8899`。--## 🔧 配置(环境变量)--所有可调参数均为环境变量,无需改动代码。常用项:--| 变量 | 默认值 | 说明 |-|---|---|---|-| `PASSWORD` | 空(必填) | 访问密码;未设置时页面强制提示 |-| `PROXY_SECRET` | 空 | **强烈建议设置**。设置后启用服务端签发的短时效 token 鉴权(更安全);留空则回退为静态哈希 |-| `PORT` | `8080` | Node 监听端口 |-| `CORS_ORIGIN` | `*` | 允许的跨域来源 |-| `REQUEST_TIMEOUT` | `5000` | 代理请求超时(毫秒) |-| `MAX_RETRIES` | `2` | 代理失败重试次数 |-| `CACHE_MAX_AGE` | `1d` | 代理响应缓存时长 |-| `BLOCKED_HOSTS` | `localhost,127.0.0.1,0.0.0.0,::1` | SSRF 拦截的主机名 |-| `BLOCKED_IP_PREFIXES` | `192.168.,10.,172.` | SSRF 拦截的 IP 网段前缀 |-| `DEBUG` | `false` | 开启调试日志(`true`) |-| `USER_AGENT` | 内置 | 代理请求使用的 UA |--> 服务端函数(Vercel / Netlify / CF)另有 `CACHE_TTL`、`MAX_RECURSION`、`FILTERED_HEADERS` 等项,详见 **[Wiki · 配置参考](docs/Configuration.md)**。--## 🗂️ 添加数据源(无内置源)--LibreTV 默认没有任何视频源。首次使用后,请在「设置 → 自定义接口」中添加你信任的采集站 API(苹果 CMS V10 格式):--- 搜索接口:`https://example.com/api.php/provide/vod/?ac=videolist&wd=关键词`-- 详情接口:`https://example.com/api.php/provide/vod/?ac=detail&ids=视频ID`--详细格式与排错见 **[Wiki · 数据源配置](docs/Data-Sources.md)**。--## 🔐 代理鉴权与安全--- **服务端部署(推荐)**:设置 `PROXY_SECRET` 后,前端在密码校验通过后向 `/api/proxy-token` 换取短时效 token(`PROXY_TOKEN_MODE=1`),代理请求携带该 token。静态哈希不再被接受,**可防伪造**。-- **无服务端的静态/函数部署**:沿用页面内的静态哈希(由 `sha256(password)` 派生),安全性较弱,建议尽量设置 `PROXY_SECRET`。-- 代理内置 **SSRF 防护**:拦截 `localhost`、`127.0.0.1`、私有网段及云元数据地址(`169.254.169.254` 等),并过滤响应中的敏感头(`set-cookie`/`csp` 等)。-- 服务端对源码路径(`/server.mjs` 等)做了静态保护,避免源码泄露。--详见 **[Wiki · 代理鉴权与安全](docs/Proxy-Security.md)**。--## ⌨️ 键盘快捷键--播放器支持:空格(播放/暂停)、←/→(快退/快进)、↑/↓(音量)、`M`(静音)、`F`(全屏)、`Esc`(退出全屏)。详见 **[Wiki · 播放器](docs/Player.md)**。--## 🛠️ 技术栈--- 前端:HTML5 + CSS3 + ES6+,Tailwind CSS,HLS.js,DPlayer-- 服务端:Node.js(Express 5)/ Vercel Functions / Netlify Functions / Cloudflare Pages Functions-- 存储:localStorage(配置、收藏、历史)--## 📚 文档 / Wiki--更完整的文档在 [`docs/`](docs/Home.md) 目录(可作为 GitHub Wiki 内容):--- [首页 / 导航](docs/Home.md)-- [部署指南](docs/Deployment.md)-- [配置参考](docs/Configuration.md)-- [代理鉴权与安全](docs/Proxy-Security.md)-- [数据源配置](docs/Data-Sources.md)-- [播放器说明](docs/Player.md)-- [常见问题 FAQ](docs/FAQ.md)-- [架构说明](docs/Architecture.md)--## ⚠️ 免责声明--LibreTV 仅作为视频搜索与代理工具,不存储、上传或分发任何视频内容。所有视频均来自你自行配置的第三方 API 返回的搜索结果。如有侵权内容,请联系相应的内容提供方。使用本项目时,你必须遵守当地法律法规。--## 🤝 衍生项目+## 安全说明-- **[MoonTV](https://github.com/senshinya/MoonTV)**-- **[OrionTV](https://github.com/zimplexing/OrionTV)**+- 密码只保存在服务端环境变量中,前端不持有任何可重放凭证。+- 登录接口有 IP 速率限制(10 次 / 10 分钟)。+- 代理内置 SSRF 防护:拒绝内网/保留地址(含 DNS 解析后校验),仅放行 http(s)。+- 未登录会话仅允许代理图片类目标(豆瓣封面防盗链需要)。-## 🥇 感谢支持+## 免责声明-- **[Sharon](https://sharon.io)** · **[ZMTO](https://zmto.com)** · **[YXVM](https://yxvm.com)**+本项目不存储、不制作任何视频内容,仅提供第三方公开接口的聚合与播放能力,内容的合法性由对应数据源负责。diff --git a/VERSION.txt b/VERSION.txtdeleted file mode 100644index 5410952..0000000--- a/VERSION.txt+++ /dev/null@@ -1 +0,0 @@-202508060117diff --git a/about.html b/about.htmldeleted file mode 100644index a75eb11..0000000--- a/about.html+++ /dev/null@@ -1,171 +0,0 @@-<!DOCTYPE html>-<html lang="zh">-<head>- <meta charset="UTF-8">- <meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>关于我们 - LibreTV</title>- <script src="libs/tailwindcss.min.js"></script>- <link rel="stylesheet" href="css/styles.css">- <link rel="manifest" href="manifest.json">-- <!-- Favicon -->- <link rel="icon" href="image/logo.png">- <link rel="apple-touch-icon" href="image/logo-black.png">-</head>-<body class="page-bg text-white flex flex-col min-h-screen">- <header class="border-b border-[#333] bg-[#0a0a0a] p-4">- <div class="container mx-auto flex items-center">- <div class="flex items-center">- <a href="/" class="flex items-center">- <svg class="w-8 h-8 mr-2 text-[#00ccff]" fill="none" stroke="currentColor" viewBox="0 0 24 24">- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"></path>- </svg>- <h1 class="text-xl font-bold gradient-text">LibreTV</h1>- </a>- </div>- <div class="flex-1 text-center">- <h2 class="text-xl font-semibold">关于LibreTV</h2>- </div>- <div class="flex items-center">- <a href="/" class="px-4 py-2 bg-[#222] hover:bg-[#333] border border-[#333] rounded-lg transition-colors flex items-center">- <svg class="w-5 h-5 mr-1" viewBox="0 0 24 24" fill="#ffffff" xmlns="http://www.w3.org/2000/svg">- <path d="M10 19l-7-7m0 0l7-7m-7 7h18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>- </svg>- 回到首页- </a>- </div>- </div>- </header> <main class="flex-grow container mx-auto px-4 sm:px-6 py-8 sm:py-16">- <div class="max-w-5xl mx-auto">- <!-- 主要内容区域 -->- <div class="bg-gradient-to-br from-[#111] to-[#0a0a0a] border border-[#333] rounded-xl sm:rounded-2xl p-4 sm:p-8 lg:p-12 shadow-2xl">- <!-- 项目介绍 -->- <div class="text-center mb-8 sm:mb-16">- <div class="inline-flex items-center justify-center w-12 h-12 sm:w-16 sm:h-16 rounded-xl sm:rounded-2xl mb-6 sm:mb-8">- <img src="image/logo-black.png" alt="LibreTV Logo" class="w-12 h-12 sm:w-16 sm:h-16 rounded-xl sm:rounded-2xl">- </div>-- <p class="text-gray-300 text-lg sm:text-xl mb-6 sm:mb-8 leading-relaxed max-w-3xl mx-auto px-2">- LibreTV 是一个免费的在线视频搜索平台,提供视频搜索和播放服务,致力于为用户带来最佳体验。- </p>- <div class="bg-[#1a1a1a] border border-[#333] rounded-lg sm:rounded-xl p-4 sm:p-6 max-w-2xl mx-auto">- <p class="text-gray-300 text-base sm:text-lg mb-4 px-1">- 本项目代码托管在 GitHub 上,欢迎访问我们的仓库:- </p>- <a href="https://github.com/LibreSpark/LibreTV" class="inline-flex items-center px-4 sm:px-6 py-2 sm:py-3 bg-gradient-to-r from-blue-500 to-cyan-500 hover:from-blue-600 hover:to-cyan-600 text-white text-sm sm:text-base font-medium rounded-lg transition-all duration-300 transform hover:scale-105" target="_blank" rel="noopener">- <svg class="w-4 h-4 sm:w-5 sm:h-5 mr-2" fill="currentColor" viewBox="0 0 24 24">- <path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>- </svg>- <span class="break-words">访问 GitHub 仓库</span>- </a>- </div>- </div> <!-- 分割线 -->- <div class="w-full h-px bg-gradient-to-r from-transparent via-[#333] to-transparent mb-8 sm:mb-16"></div>-- <!-- 隐私政策 -->- <div class="mb-8 sm:mb-16">- <h2 class="text-2xl sm:text-3xl font-bold mb-6 sm:mb-8 text-center bg-gradient-to-r from-blue-400 to-cyan-400 bg-clip-text text-transparent">隐私政策</h2>- <div class="grid grid-cols-1 md:grid-cols-2 gap-4 sm:gap-8">- <div class="bg-[#1a1a1a] border border-[#333] rounded-xl p-4 sm:p-8">- <div class="flex items-center mb-3 sm:mb-4">- <div class="w-3 h-3 bg-green-400 rounded-full mr-3"></div>- <h3 class="text-lg sm:text-xl font-semibold text-gray-200">数据保护</h3>- </div>- <p class="text-gray-300 text-base sm:text-lg leading-relaxed">- 我们尊重并保护您的隐私。LibreTV 不收集任何个人数据,且不会限制访问或使用本网站。- </p>- </div>- <div class="bg-[#1a1a1a] border border-[#333] rounded-xl p-4 sm:p-8">- <div class="flex items-center mb-3 sm:mb-4">- <div class="w-3 h-3 bg-blue-400 rounded-full mr-3"></div>- <h3 class="text-lg sm:text-xl font-semibold text-gray-200">服务说明</h3>- </div>- <p class="text-gray-300 text-base sm:text-lg leading-relaxed">- 本平台仅用于提供在线视频搜索与播放服务。所有数据均由第三方接口提供,我们不会存储或追踪用户信息。- </p>- </div>- </div>- </div>-- <!-- 分割线 -->- <div class="w-full h-px bg-gradient-to-r from-transparent via-[#333] to-transparent mb-8 sm:mb-16"></div> <!-- 版权声明与投诉机制 -->- <div>- <h2 class="text-2xl sm:text-3xl font-bold mb-6 sm:mb-8 text-center bg-gradient-to-r from-blue-400 to-cyan-400 bg-clip-text text-transparent">版权声明与投诉机制</h2>- <div class="space-y-6 sm:space-y-8">- <div class="bg-[#1a1a1a] border border-[#333] rounded-xl p-4 sm:p-8">- <div class="flex items-start">- <div class="flex-shrink-0 w-8 h-8 bg-yellow-500 rounded-lg flex items-center justify-center mr-3 sm:mr-4 mt-1">- <svg class="w-4 h-4 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"></path>- </svg>- </div>- <div>- <h3 class="text-lg sm:text-xl font-semibold text-gray-200 mb-3 sm:mb-4">免责声明</h3>- <p class="text-gray-300 text-base sm:text-lg leading-relaxed">- LibreTV 仅提供视频搜索服务,不直接提供、存储或上传任何视频内容。所有搜索结果均来自第三方公开接口。用户在使用本站服务时,须遵守相关法律法规,不得利用搜索结果从事侵权行为,如下载、传播未经授权的作品等。- </p>- </div>- </div>- </div>-- <div class="bg-[#1a1a1a] border border-[#333] rounded-xl p-4 sm:p-8">- <div class="flex items-start">- <div class="flex-shrink-0 w-8 h-8 bg-red-500 rounded-lg flex items-center justify-center mr-3 sm:mr-4 mt-1">- <svg class="w-4 h-4 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 8l7.89 7.89a2 2 0 002.83 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"></path>- </svg>- </div>- <div class="flex-1">- <h3 class="text-lg sm:text-xl font-semibold text-gray-200 mb-3 sm:mb-4">投诉反馈</h3>- <p class="text-gray-300 text-base sm:text-lg mb-4 sm:mb-6 leading-relaxed">- 若您是版权方或相关权利人,发现本站搜索结果中存在侵犯您合法权益的内容,请通过以下渠道向我们反馈:- </p>- <div class="bg-gradient-to-r from-[#222] to-[#333] border border-[#444] rounded-lg p-4 sm:p-6 mb-4 sm:mb-6">- <div class="flex items-center flex-wrap">- <svg class="w-5 h-5 sm:w-6 sm:h-6 text-blue-400 mr-2 sm:mr-3 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 8l7.89 7.89a2 2 0 002.83 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"></path>- </svg>- <span class="text-gray-300 text-base sm:text-lg font-medium mr-2 sm:mr-3">投诉邮箱:</span>- <a href="mailto:[email protected]" class="text-blue-400 hover:text-blue-300 transition-colors text-base sm:text-lg font-medium break-all">[email protected]</a>- </div>- </div>- <p class="text-gray-300 text-base sm:text-lg leading-relaxed">- 请在投诉邮件中提供:您的身份证明、权利证明、侵权内容的具体链接及相关说明。我们将在收到投诉后尽快处理,对于确认侵权的内容,将立即断开相关链接,停止展示侵权内容,并将处理结果反馈给您。- </p>- </div>- </div>- </div>- </div>- </div>- </div>- </div>- </main>- <footer class="footer py-6 border-t border-[#333] bg-[#0a0a0a]">- <div class="container mx-auto px-4">- <div class="flex flex-col md:flex-row justify-between items-center">- <div class="mb-4 md:mb-0">- <div class="flex items-center justify-center md:justify-start">- <svg class="w-6 h-6 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"></path>- </svg>- <span class="gradient-text font-bold">LibreTV</span>- </div>- <p class="text-gray-500 text-sm mt-2 text-center md:text-left">© 2025 LibreTV - 自由观影,畅享精彩</p>- </div>-- <div class="text-center md:text-right">- <p class="text-gray-500 text-sm max-w-md">- 免责声明:本站仅为视频搜索工具,不存储、上传或分发任何视频内容。- 所有视频均来自第三方API接口。如有侵权,请联系相关内容提供方。- </p>- <div class="mt-2 flex justify-center md:justify-end space-x-4">- <a href="/" class="text-gray-400 hover:text-white text-sm transition-colors">首页</a>- <a href="about.html" class="text-gray-400 hover:text-white text-sm transition-colors">关于我们</a>- <a href="https://www.msf.hk/zh-hant/donate/general?type=one-off" target="_blank" rel="noopener" class="text-blue-400 hover:text-blue-300 text-sm transition-colors">捐赠</a>- </div>- </div>- </div>- </div>- </footer>-</body>-</html>diff --git a/css/index.css b/css/index.cssdeleted file mode 100644index 1d3ed14..0000000--- a/css/index.css+++ /dev/null@@ -1,209 +0,0 @@-/* 主页特定样式 */--/* 历史记录和设置按钮定位样式 */-.top-corner-button {- position: fixed;- z-index: 10;- background: #222;- border: 1px solid #333;- border-radius: 0.5rem;- padding: 0.375rem 0.75rem;- transition: all 0.2s ease;-}--.top-corner-button:hover {- background: #333;- border-color: white;-}--/* 搜索区域样式 */-.search-box {- height: 3.5rem;- box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);- border-radius: 0.5rem;- overflow: hidden;- display: flex;- align-items: stretch;-}--.search-button {- width: 5rem;- display: flex;- align-items: center;- justify-content: center;- background: white;- color: black;- font-weight: 500;- transition: background-color 0.2s;-}--.search-button:hover {- background: #f0f0f0;-}--.search-input {- flex: 1;- background: #111;- border-top: 1px solid #333;- border-bottom: 1px solid #333;- color: white;- padding: 0 1.5rem;- font-size: 1rem;- outline: none;- transition: background-color 0.2s;-}--.search-input:focus {- background: #191919;-}--/* 最近搜索记录样式 */-.recent-search-tag {- display: inline-block;- padding: 0.25rem 0.75rem;- margin: 0.25rem;- background: rgba(59, 130, 246, 0.1);- border: 1px solid rgba(59, 130, 246, 0.2);- border-radius: 0.5rem;- color: #e5e7eb;- font-size: 0.875rem;- transition: all 0.2s;-}--.recent-search-tag:hover {- background: rgba(59, 130, 246, 0.2);- border-color: rgba(59, 130, 246, 0.4);-}--/* 豆瓣区域样式 */-.douban-container {- margin: 2rem auto;- max-width: 1280px;- padding: 0 0.5rem;-}--.douban-header {- display: flex;- align-items: center;- justify-content: space-between;- margin-bottom: 1rem;-}--.douban-toggle {- display: flex;- align-items: center;- background: #222;- border-radius: 9999px;- padding: 0.25rem;-}--.douban-toggle-button {- padding: 0.25rem 0.75rem;- font-size: 0.875rem;- border-radius: 9999px;-}--.douban-toggle-button.active {- background: #db2777;- color: white;-}--.douban-toggle-button:not(.active) {- color: #9ca3af;-}--.douban-toggle-button:not(.active):hover {- color: white;-}--.douban-refresh-button {- font-size: 0.875rem;- padding: 0.25rem 0.75rem;- background: #db2777;- color: white;- border-radius: 0.5rem;- display: flex;- align-items: center;- gap: 0.25rem;-}--.douban-refresh-button:hover {- background: #be185d;-}--.douban-tags-container {- overflow-x: auto;- padding-bottom: 0.5rem;-}--.douban-tags {- display: flex;- gap: 0.5rem;- min-width: max-content;-}--.douban-tag {- padding: 0.25rem 0.75rem;- background: rgba(219, 39, 119, 0.1);- border: 1px solid rgba(219, 39, 119, 0.2);- border-radius: 0.5rem;- color: #f9a8d4;- font-size: 0.875rem;- transition: all 0.2s;-}--.douban-tag:hover {- background: rgba(219, 39, 119, 0.2);- border-color: rgba(219, 39, 119, 0.4);-}--.douban-tag.active {- background: #db2777;- border-color: #db2777;- color: white;-}--/* 搜索结果样式 */-.search-results-container {- width: 100%;- max-width: 1280px;- margin: 0 auto;- padding: 0 0.5rem;-}--.search-result-stats {- text-align: right;- font-size: 0.875rem;- color: #9ca3af;- margin-bottom: 1rem;-}--/* 响应式网格布局 */-.search-results-grid {- display: grid;- gap: 1rem;-}--@media (max-width: 640px) {- .search-results-grid {- grid-template-columns: 1fr;- }-}--@media (min-width: 641px) and (max-width: 768px) {- .search-results-grid {- grid-template-columns: repeat(2, 1fr);- }-}--@media (min-width: 769px) and (max-width: 1024px) {- .search-results-grid {- grid-template-columns: repeat(3, 1fr);- }-}--@media (min-width: 1025px) {- .search-results-grid {- grid-template-columns: repeat(4, 1fr);- }-}diff --git a/css/modals.css b/css/modals.cssdeleted file mode 100644index b4ba3d3..0000000--- a/css/modals.css+++ /dev/null@@ -1,265 +0,0 @@-/* 模态框通用样式 */-.modal-overlay {- position: fixed;- inset: 0;- background-color: rgba(0, 0, 0, 0.95);- display: none;- align-items: center;- justify-content: center;- z-index: 40;- transition: opacity 0.3s ease;-}--.modal-content {- background-color: #111;- padding: 2rem;- border-radius: 0.5rem;- border: 1px solid #333;- width: 91.666667%;- max-width: 56rem;- max-height: 90vh;- display: flex;- flex-direction: column;-}--.modal-header {- display: flex;- justify-content: space-between;- align-items: center;- margin-bottom: 1.5rem;- flex: none;-}--.modal-title {- font-size: 1.5rem;- font-weight: 700;- background: linear-gradient(to right, #00ccff, #ff3c78);- -webkit-background-clip: text;- -webkit-text-fill-color: transparent;- word-break: break-word;- padding-right: 1rem;- max-width: 80%;-}--.modal-close {- color: #9ca3af;- font-size: 1.5rem;- transition: color 0.2s;- flex-shrink: 0;-}--.modal-close:hover {- color: white;-}--.modal-body {- overflow: auto;- flex: 1;- min-height: 0;-}--/* 密码验证模态框 */-.password-modal {- z-index: 65;-}--.password-form {- margin-bottom: 1.5rem;-}--.password-input {- width: 100%;- background-color: #111;- border: 1px solid #333;- color: white;- padding: 1rem;- border-radius: 0.5rem;- margin-bottom: 1rem;-}--.password-input:focus {- outline: none;- border-color: white;-}--.password-submit {- width: 100%;- background-color: #3b82f6;- color: white;- padding: 0.5rem 1rem;- border-radius: 0.25rem;- font-weight: 500;-}--.password-submit:hover {- background-color: #2563eb;-}--.password-error {- color: #ef4444;- margin-top: 0.5rem;- display: none;-}--/* 声明模态框 */-.disclaimer-modal {- z-index: 60;-}--.disclaimer-content {- color: #d1d5db;- line-height: 1.5;-}--.disclaimer-content p {- margin-bottom: 1rem;-}--.disclaimer-content strong {- color: #60a5fa;-}--.disclaimer-button {- margin-top: 1.5rem;- padding: 0.75rem 1.5rem;- background: linear-gradient(to right, #4f46e5, #8b5cf6, #ec4899);- color: white;- font-weight: 600;- border-radius: 0.5rem;- transition: all 0.3s;-}--.disclaimer-button:hover {- box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);- transform: translateY(-1px);-}--/* Toast 和 Loading 提示 */-.toast {- position: fixed;- top: 1rem;- left: 50%;- transform: translateX(-50%) translateY(-100%);- background-color: #ef4444;- color: white;- padding: 0.75rem 1.5rem;- border-radius: 0.5rem;- box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.3);- transition: all 0.3s;- opacity: 0;- z-index: 50;-}--.toast.show {- transform: translateX(-50%) translateY(0);- opacity: 1;-}--.loading-overlay {- position: fixed;- inset: 0;- background-color: rgba(0, 0, 0, 0.8);- display: none;- align-items: center;- justify-content: center;- z-index: 50;-}--.loading-content {- background-color: #111;- padding: 2rem;- border-radius: 0.5rem;- border: 1px solid #333;- display: flex;- align-items: center;- gap: 1rem;-}--.loading-spinner {- width: 2rem;- height: 2rem;- border: 4px solid white;- border-top-color: transparent;- border-radius: 50%;- animation: spin 1s linear infinite;-}--@keyframes spin {- to { transform: rotate(360deg); }-}--.loading-text {- color: white;- font-size: 1.125rem;-}--/* 动画效果 */-@keyframes fadeIn {- from { opacity: 0; }- to { opacity: 1; }-}--@keyframes fadeOut {- from { opacity: 1; }- to { opacity: 0; }-}--.modal-overlay.show {- animation: fadeIn 0.3s forwards;- display: flex;-}--.modal-overlay.hide {- animation: fadeOut 0.3s forwards;-}--/* 资源速率测试相关样式 */-.speed-indicator {- display: inline-flex;- align-items: center;- gap: 2px;- font-size: 10px;- font-weight: 500;- line-height: 1;-}--.speed-indicator.good {- color: #10b981;-}--.speed-indicator.medium {- color: #f59e0b;-}--.speed-indicator.poor {- color: #ef4444;-}--.speed-indicator.error {- color: #ef4444;-}--/* 资源卡片悬停效果增强 */-.resource-card {- transition: all 0.2s ease;-}--.resource-card:hover {- transform: translateY(-2px);- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);-}--.resource-card.current {- border: 1px solid #3b82f6;- box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.3);-}--/* 速率徽章样式 */-.speed-badge {- backdrop-filter: blur(4px);- font-size: 9px;- font-weight: 600;- text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);- border-radius: 4px;- padding: 2px 4px;-}diff --git a/css/player.css b/css/player.cssdeleted file mode 100644index 3255ab5..0000000--- a/css/player.css+++ /dev/null@@ -1,395 +0,0 @@-body, html {- margin: 0;- padding: 0;- width: 100%;- height: 100%;- background-color: #0f1622;- color: white;- padding-top: 37px;-}--/* Critical header and navigation styles */-.player-header {- position: relative;- z-index: 2147483647 !important;- pointer-events: auto !important;-}--.player-header-fixed {- position: fixed !important;- top: 0;- left: 0;- width: 100vw;- z-index: 9000 !important;- pointer-events: auto !important;- background: #111;-}--#homeButton {- pointer-events: auto !important;-}--.home-button {- background: none !important;- border: none !important;- padding: 0 !important;-}--/* Critical loading styles to prevent FOUC */-.player-placeholder {- width: 100% !important;- height: auto !important;- aspect-ratio: 16/9 !important;- background-color: #1f2937 !important;- position: relative !important;- display: block !important;- border-radius: 8px !important;- overflow: hidden !important;-}--.player-loading-container {- width: 100% !important;- height: 0 !important;- padding-bottom: 56.25% !important;- position: relative !important;- background-color: #1f2937 !important;- border-radius: 8px !important;- overflow: hidden !important;- display: block !important;-}--.player-loading-overlay {- position: absolute !important;- top: 0 !important;- left: 0 !important;- width: 100% !important;- height: 100% !important;- display: flex !important;- flex-direction: column !important;- align-items: center !important;- justify-content: center !important;- background-color: rgba(17, 24, 39, 0.7) !important;-}--.player-loading-spinner {- width: 48px !important;- height: 48px !important;- border: 4px solid rgba(255, 255, 255, 0.1) !important;- border-radius: 50% !important;- border-top-color: #f97316 !important;- position: relative !important;- margin-bottom: 16px !important;- animation: spin 1s linear infinite !important;-}--/* Critical styles for loading text */-.player-loading-text,-.player-loading-overlay div:nth-child(2),-div.player-loading-text {- display: block !important;- visibility: visible !important;- opacity: 1 !important;- color: #f9fafb !important;- font-size: 16px !important;- font-weight: 500 !important;- margin-bottom: 8px !important;- text-align: center !important;- font-family: system-ui, -apple-system, sans-serif !important;- line-height: 1.4 !important;- text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;- pointer-events: none !important;- z-index: 100 !important;- background: transparent !important;- max-width: 90% !important;-}--@keyframes player-spinner-rotate {- to { transform: rotate(360deg); }-}--@keyframes spin {- 0% { transform: rotate(0deg); }- 100% { transform: rotate(360deg); }-}--/* ArtPlayer specific styles */-.art-video-player, .art-video-player video {- width: 100% !important;- height: 100% !important;- min-height: 150px !important;- max-height: 100vh !important;- background: #000 !important;- object-fit: contain !important;- display: block !important;-}--/* Fix for Chrome-specific issues */-@media screen and (-webkit-min-device-pixel-ratio: 0) {- .art-video-player video {- transform: translateZ(0) !important;- will-change: transform !important;- }-- /* Force visibility of video element */- .art-video-player.art-playing video {- visibility: visible !important;- opacity: 1 !important;- }-}--.player-container {- width: 100%;- max-width: 1000px;- margin: 0 auto;-}--#player {- width: 100%;- height: 60vh; /* 视频播放器高度 */-}--.loading-container {- position: absolute;- top: 0;- left: 0;- right: 0;- bottom: 0;- display: flex;- align-items: center;- justify-content: center;- background-color: rgba(0, 0, 0, 0.7);- color: white;- z-index: 100;- flex-direction: column;-}--.loading-spinner {- width: 50px;- height: 50px;- border: 4px solid rgba(255, 255, 255, 0.3);- border-radius: 50%;- border-top-color: white;- animation: spin 1s ease-in-out infinite;- margin-bottom: 10px;-}--.error-container {- position: absolute;- top: 0;- left: 0;- right: 0;- bottom: 0;- display: none;- align-items: center;- justify-content: center;- background-color: rgba(0, 0, 0, 0.7);- color: white;- z-index: 100;- flex-direction: column;- text-align: center;- padding: 1rem;-}--.error-icon {- font-size: 48px;- margin-bottom: 10px;-}--.error-message-sub {- margin-top: 10px;- font-size: 14px;- color: #aaa;-}--.episode-active {- background-color: #3b82f6 !important;- border-color: #60a5fa !important;-}--.episode-grid {- max-height: 30vh;- overflow-y: auto;-}--/* 恢复播放位置提示样式 */-.position-restore-hint {- position: fixed;- bottom: 20px;- left: 50%;- transform: translateX(-50%) translateY(100%);- background-color: rgba(0, 0, 0, 0.8);- color: white;- padding: 10px 20px;- border-radius: 4px;- z-index: 1000;- transition: transform 0.3s ease;- font-size: 14px;-}--.position-restore-hint.show {- transform: translateX(-50%) translateY(0);-}--.hint-content {- display: flex;- align-items: center;- justify-content: center;-}--.switch {- position: relative;- display: inline-block;- width: 46px;- height: 24px;-}--.switch input {- opacity: 0;- width: 0;- height: 0;-}--.slider {- position: absolute;- cursor: pointer;- top: 0;- left: 0;- right: 0;- bottom: 0;- background-color: #333;- transition: .4s;- border-radius: 24px;-}--.slider:before {- position: absolute;- content: "";- height: 18px;- width: 18px;- left: 3px;- bottom: 3px;- background-color: white;- transition: .4s;- border-radius: 50%;-}--input:checked + .slider {- background-color: #00ccff;-}--input:checked + .slider:before {- transform: translateX(22px);-}--/* 添加快捷键提示样式 */-.shortcut-hint {- position: fixed;- top: 50%;- left: 50%;- transform: translate(-50%, -50%);- background-color: rgba(0, 0, 0, 0.8);- color: white;- padding: 1rem 2rem;- border-radius: 0.5rem;- font-size: 1.5rem;- display: flex;- align-items: center;- gap: 0.5rem;- z-index: 1000;- opacity: 0;- transition: opacity 0.3s ease;-}--.shortcut-hint.show {- opacity: 1;-}--/* 原生全屏时,播放器容器铺满 */-.player-container:-webkit-full-screen,-.player-container:fullscreen {- position: fixed;- top: 0; left: 0;- width: 100vw; height: 100vh;- z-index: 10000;- background-color: #000;-}--.player-container:-webkit-full-screen #player,-.player-container:fullscreen #player {- width: 100%; height: 100%;-}--/* 资源信息卡片区 */-#resourceInfoBarContainer {- align-items: center;- border-radius: 0.5rem;- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);-}--.resource-info-bar-left {- align-items: center;- font-size: 1.1rem;- font-weight: bold;- color: #fff;- flex: 1;-}--.resource-info-bar-videos {- font-size: 1rem;- font-weight: normal;- margin-left: 10px;- color: #ccc;-}--.resource-switch-btn {- align-items: center;- background: none;- border: none;- color: #a67c2d;- font-weight: bold;- font-size: 1rem;- cursor: pointer;- gap: 6px;- padding: 6px 12px;- border-radius: 0.5rem;- transition: background 0.2s;-}--.resource-switch-btn:hover {- background: #f5e9d7;-}--.resource-switch-btn:active {- background: #f5e9d7;-}--.resource-switch-icon {- width: 20px;- height: 20px;- margin-right: 0;- color: #a67c2d;- vertical-align: middle;- transition: transform 0.3s;-}--/* 新增:移动端响应式样式 */-@media (max-width: 640px) {- .episode-grid {- max-height: 40vh; /* 移动端增加集数列表高度 */- }-- /* 改进移动端按钮显示 */- button {- white-space: nowrap;- }-- /* 控制栏在小屏幕上可能需要换行 */- .player-container .flex-wrap {- margin-bottom: 4px;- }-}--/* 隐藏用户名输入框 */-#username {- display: none !important;-}diff --git a/css/styles.css b/css/styles.cssdeleted file mode 100644index 8d32f79..0000000--- a/css/styles.css+++ /dev/null@@ -1,1029 +0,0 @@-/*-LibreTV 全局样式-包含多个页面共享的基础样式-对于特定页面的样式,请参考:-- index.css: 首页特定样式-- player.css: 播放器页面特定样式-- watch.css: 重定向页面特定样式-- modals.css: 模态框和提示框样式-*/--.close-btn {- position: absolute;- top: 12px;- right: 12px;- background: #222;- border: 1px solid #333;- border-radius: 8px;- padding: 6px;- color: white;- display: flex;- align-items: center;- justify-content: center;- cursor: pointer;- transition: all 0.2s ease;- z-index: 10;-}--.close-btn:hover {- background: #333;- border-color: #555;-}--.close-btn svg {- width: 16px;- height: 16px;- stroke: currentColor;-}--:root {- /* 赛博影视主题配色方案 - 柔和版 */- --primary-color: #00ccff; /* 霓虹蓝主色调 */- --primary-light: #33d6ff; /* 浅霓虹蓝变体 */- --secondary-color: #0f1622; /* 深蓝黑背景色 */- --accent-color: #ff3c78; /* 霓虹粉强调色 */- --text-color: #e6f2ff; /* 柔和的蓝白色文本 */- --text-muted: #8599b2; /* 淡蓝灰色次级文本 */- --border-color: rgba(0, 204, 255, 0.15);- --page-gradient-start: #0f1622; /* 深蓝黑起始色 */- --page-gradient-end: #192231; /* 深靛蓝结束色 */- --card-gradient-start: #121b29; /* 卡片起始色 */- --card-gradient-end: #1c2939; /* 卡片结束色 */- --card-accent: rgba(0, 204, 255, 0.12); /* 霓虹蓝卡片强调色 */- --card-hover-border: rgba(0, 204, 255, 0.5); /* 悬停边框颜色 */-}--.page-bg {- background: linear-gradient(180deg, var(--page-gradient-start), var(--page-gradient-end));- min-height: 100vh;- /* 柔和赛博点状背景 */- background-image:- linear-gradient(180deg, var(--page-gradient-start), var(--page-gradient-end)),- radial-gradient(circle at 25px 25px, rgba(0, 204, 255, 0.04) 2px, transparent 3px),- radial-gradient(circle at 75px 75px, rgba(255, 60, 120, 0.02) 1px, transparent 2px),- radial-gradient(circle at 50px 50px, rgba(150, 255, 250, 0.015) 1px, transparent 2px);- background-blend-mode: normal;- background-size: cover, 100px 100px, 50px 50px, 75px 75px;-}--button, .card-hover {- transition: all 0.3s ease;-}--/* 改进卡片适应不同内容长度 */-.card-hover {- border: 1px solid var(--border-color);- background: linear-gradient(135deg, var(--card-gradient-start), var(--card-gradient-end));- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);- position: relative;- overflow: hidden;- border-radius: 6px;- display: flex;- flex-direction: column;- height: 100%;-}--/* 确保卡片内容区域高度一致性 */-.card-hover .flex-grow {- min-height: unset; /* 移除最小高度限制,让内容自然流动 */- display: flex;- flex-direction: column;-}--/* 针对不同长度的标题优化显示 */-.card-hover h3 {- min-height: unset;- max-height: unset;- display: -webkit-box;- -webkit-box-orient: vertical;- overflow: hidden;- text-overflow: ellipsis;- -webkit-line-clamp: 2;- line-height: 1.2rem;- word-break: break-word; /* 允许在任何字符间断行 */- hyphens: auto; /* 允许断词 */-}--.card-hover::before {- content: "";- position: absolute;- top: 0;- left: -100%;- width: 100%;- height: 100%;- background: linear-gradient(90deg, transparent, var(--card-accent), transparent);- transition: left 0.6s ease;-}--.card-hover:hover {- border-color: var(--card-hover-border);- transform: translateY(-3px);- box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);-}--.card-hover:hover::before {- left: 100%;-}--.gradient-text {- background: linear-gradient(to right, var(--primary-color), var(--accent-color));- -webkit-background-clip: text;- -webkit-text-fill-color: transparent;-}--/* 改进设置面板样式 */-.settings-panel {- scrollbar-width: thin;- scrollbar-color: #444 #222;- transform: translateX(100%);- transition: transform 0.3s ease;- background: linear-gradient(135deg, var(--page-gradient-end), var(--page-gradient-start));- border-left: 1px solid var(--primary-color);-}--.settings-panel.show {- transform: translateX(0);-}--.settings-panel::-webkit-scrollbar {- width: 6px;-}--.settings-panel::-webkit-scrollbar-track {- background: transparent;-}--.settings-panel::-webkit-scrollbar-thumb {- background-color: #444;- border-radius: 4px;-}--.search-button {- background: var(--primary-color);- color: var(--text-color);-}--.search-button:hover {- background: var(--primary-light);-}--::-webkit-scrollbar {- width: 8px;- height: 8px;-}--::-webkit-scrollbar-track {- background: #111;- border-radius: 4px;-}--::-webkit-scrollbar-thumb {- background: #333;- border-radius: 4px;- transition: all 0.3s ease;-}--::-webkit-scrollbar-thumb:hover {- background: #444;-}--* {- scrollbar-width: thin;- scrollbar-color: #333 #111;-}--.search-tag {- background: linear-gradient(135deg, var(--card-gradient-start), var(--card-gradient-end));- color: var(--text-color);- padding: 0.5rem 1rem;- border-radius: 0.5rem;- font-size: 0.875rem;- border: 1px solid var(--border-color);- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);-}--.search-tag:hover {- background: linear-gradient(135deg, var(--card-gradient-end), var(--card-gradient-start));- border-color: var(--primary-color);-}--.footer {- width: 100%;- transition: all 0.3s ease;- margin-top: auto;- background: linear-gradient(to bottom, transparent, var(--page-gradient-start));- border-top: 1px solid var(--border-color);-}--.footer a:hover {- text-decoration: underline;-}--body {- display: flex;- flex-direction: column;- min-height: 100vh;-}--.container {- flex: 1;-}--@media screen and (min-height: 800px) {- body {- display: flex;- flex-direction: column;- min-height: 100vh;- }-- .container {- flex: 1;- }-- .footer {- margin-top: auto;- }-}--@media screen and (max-width: 640px) {- .footer {- padding-bottom: 2rem;- }-}--/* 移动端布局优化 */-@media screen and (max-width: 768px) {- .card-hover h3 {- min-height: 2.5rem;- }-- .card-hover .flex-grow {- min-height: 80px;- }-}--@keyframes fadeIn {- from { opacity: 0; }- to { opacity: 1; }-}--@keyframes fadeOut {- from { opacity: 1; }- to { opacity: 0; }-}--#modal.show {- animation: fadeIn 0.3s forwards;-}--#modal.hide {- animation: fadeOut 0.3s forwards;-}--#modal > div {- background: linear-gradient(135deg, var(--card-gradient-start), var(--card-gradient-end));- border: 1px solid var(--primary-color);- box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 15px rgba(0, 204, 255, 0.1);- border-radius: 8px;-}--#episodesGrid button {- background: rgba(0, 204, 255, 0.08);- border: 1px solid rgba(0, 204, 255, 0.2);- transition: all 0.2s ease;-}--#episodesGrid button:hover {- background: rgba(0, 204, 255, 0.15);- border-color: var(--primary-color);- box-shadow: 0 0 8px rgba(0, 204, 255, 0.3);-}--#yellowFilterToggle:checked + .toggle-bg {- background-color: var(--primary-color);-}--#yellowFilterToggle:checked ~ .toggle-dot {- transform: translateX(1.5rem);-}--#yellowFilterToggle:focus + .toggle-bg,-#yellowFilterToggle:hover + .toggle-bg {- box-shadow: 0 0 0 2px rgba(0, 204, 255, 0.3);-}--/* 添加广告过滤开关的CSS */-#adFilterToggle:checked + .toggle-bg {- background-color: var(--primary-color);-}--#adFilterToggle:checked ~ .toggle-dot {- transform: translateX(1.5rem);-}--#adFilterToggle:focus + .toggle-bg,-#adFilterToggle:hover + .toggle-bg {- box-shadow: 0 0 0 2px rgba(0, 204, 255, 0.3);-}--.toggle-dot {- transition: transform 0.3s ease-in-out;- box-shadow: 0 2px 4px rgba(0,0,0,0.2);-}--.toggle-bg {- transition: background-color 0.3s ease-in-out;-}--#yellowFilterToggle:checked ~ .toggle-dot {- box-shadow: 0 2px 4px rgba(0, 204, 255, 0.3);-}--#adFilterToggle:checked ~ .toggle-dot {- box-shadow: 0 2px 4px rgba(0, 204, 255, 0.3);-}--/* 添加API复选框样式 */-.form-checkbox {- appearance: none;- -webkit-appearance: none;- -moz-appearance: none;- height: 14px;- width: 14px;- background-color: #222;- border: 1px solid #333;- border-radius: 3px;- cursor: pointer;- position: relative;- outline: none;-}--.form-checkbox:checked {- background-color: var(--primary-color);- border-color: var(--primary-color);-}--.form-checkbox:checked::after {- content: '';- position: absolute;- left: 4px;- top: 1px;- width: 4px;- height: 8px;- border: solid white;- border-width: 0 2px 2px 0;- transform: rotate(45deg);-}--/* API滚动区域美化 */-#apiCheckboxes {- scrollbar-width: thin;- scrollbar-color: #444 #222;-}--#apiCheckboxes::-webkit-scrollbar {- width: 6px;-}--#apiCheckboxes::-webkit-scrollbar-track {- background: #222;- border-radius: 4px;-}--#apiCheckboxes::-webkit-scrollbar-thumb {- background-color: #444;- border-radius: 4px;-}--/* 自定义API列表样式 */-#customApisList {- scrollbar-width: thin;- scrollbar-color: #444 #222;-}--#customApisList::-webkit-scrollbar {- width: 6px;-}--#customApisList::-webkit-scrollbar-track {- background: transparent;-}--#customApisList::-webkit-scrollbar-thumb {- background-color: #444;- border-radius: 4px;-}--/* 设置面板滚动样式 */-.settings-panel {- scrollbar-width: thin;- scrollbar-color: #444 #222;-}--.settings-panel::-webkit-scrollbar {- width: 6px;-}--.settings-panel::-webkit-scrollbar-track {- background: transparent;-}--.settings-panel::-webkit-scrollbar-thumb {- background-color: #444;- border-radius: 4px;-}--/* 添加自定义API表单动画 */-#addCustomApiForm {- transition: all 0.3s ease;- max-height: 0;- opacity: 0;- overflow: hidden;-}--#addCustomApiForm.hidden {- max-height: 0;- padding: 0;- opacity: 0;-}--#addCustomApiForm:not(.hidden) {- max-height: 230px;- opacity: 1;-}--/* 成人内容API标记样式 */-.api-adult + label {- color: #ff6b8b !important;-}--/* 添加警告图标和标签样式 */-.adult-warning {- display: inline-flex;- align-items: center;- margin-left: 0.25rem;- color: #ff6b8b;-}--.adult-warning svg {- width: 12px;- height: 12px;- margin-right: 4px;-}--/* 过滤器禁用样式 */-.filter-disabled {- opacity: 0.5;- pointer-events: none;- cursor: not-allowed;-}--/* API组标题样式 */-.api-group-title {- grid-column: span 2;- padding: 0.25rem 0;- margin-top: 0.5rem;- border-top: 1px solid #333;- color: #8599b2;- font-size: 0.75rem;- text-transform: uppercase;- letter-spacing: 0.05em;-}--.api-group-title.adult {- color: #ff6b8b;-}--/* 过滤器禁用样式 - 改进版本 */-.filter-disabled {- position: relative;-}--.filter-disabled::after {- content: '';- position: absolute;- top: 0;- left: 0;- width: 100%;- height: 100%;- background-color: rgba(0,0,0,0.4);- border-radius: 0.5rem;- z-index: 5;-}--.filter-disabled > * {- opacity: 0.7;-}--.filter-disabled .toggle-bg {- background-color: #333 !important;-}--.filter-disabled .toggle-dot {- transform: translateX(0) !important;- background-color: #666 !important;-}--/* 改进过滤器禁用样式 */-.filter-disabled .filter-description {- color: #ff6b8b !important;- font-style: italic;- font-weight: 500;-}--/* 修改过滤器禁用样式,确保文字清晰可见 */-.filter-disabled {- position: relative;-}--.filter-disabled::after {- content: '';- position: absolute;- top: 0;- left: 0;- width: 100%;- height: 100%;- background-color: rgba(0,0,0,0.3);- border-radius: 0.5rem;- z-index: 5;-}--.filter-disabled > * {- opacity: 1; /* 提高子元素不透明度,保证可见性 */- z-index: 6; /* 确保内容在遮罩上方 */-}--/* 改进过滤器禁用状态下的描述样式 */-.filter-disabled .filter-description {- color: #ff7b9d !important; /* 更亮的粉色 */- font-style: italic;- font-weight: 500;- text-shadow: 0 0 2px rgba(0,0,0,0.8); /* 添加文字阴影提高对比度 */-}--/* 开关的禁用样式 */-.filter-disabled .toggle-bg {- background-color: #444 !important;- opacity: 0.8;-}--.filter-disabled .toggle-dot {- transform: translateX(0) ;- background-color: #777 ;- opacity: 0.9;-}--/* 警告提示样式改进 */-.filter-tooltip {- background-color: rgba(255, 61, 87, 0.1);- border: 1px solid rgba(255, 61, 87, 0.2);- border-radius: 0.25rem;- padding: 0.5rem;- margin-top: 0.5rem;- display: flex;- align-items: center;- font-size: 0.75rem;- line-height: 1.25;- position: relative;- z-index: 10;-}--.filter-tooltip svg {- flex-shrink: 0;- width: 14px;- height: 14px;- margin-right: 0.35rem;-}--/* 编辑按钮样式 */-.custom-api-edit {- color: #3b82f6;- transition: color 0.2s ease;-}--.custom-api-edit:hover {- color: #2563eb;-}--/* 自定义API条目样式改进 */-#customApisList .api-item {- display: flex;- align-items: center;- justify-content: space-between;- padding: 0.25rem 0.5rem;- margin-bottom: 0.25rem;- background-color: #222;- border-radius: 0.25rem;- transition: background-color 0.2s ease;-}--#customApisList .api-item:hover {- background-color: #2a2a2a;-}--/* 成人内容标签样式 */-.adult-tag {- display: inline-flex;- align-items: center;- color: #ff6b8b;- font-size: 0.7rem;- font-weight: 500;- margin-right: 0.35rem;-}--/* 历史记录面板样式 */-.history-panel {- box-shadow: 2px 0 10px rgba(0,0,0,0.5);- transition: transform 0.3s ease-in-out;- overflow-y: scroll; /* 始终显示滚动条,防止宽度变化 */- overflow-x: hidden; /* 防止水平滚动 */- width: 320px; /* 固定宽度 */- box-sizing: border-box; /* 确保padding不影响总宽度 */- scrollbar-gutter: stable; /* 现代浏览器:为滚动条预留空间 */-}--.history-panel.show {- transform: translateX(0);-}--#historyList {- padding-right: 6px; /* 为滚动条预留空间,确保内容不被挤压 */-}--/* 历史记录项样式优化 */-.history-item {- background: #1a1a1a;- border-radius: 6px; /* 减小圆角 */- border: 1px solid #333;- overflow: hidden;- transition: all 0.2s ease;- padding: 10px 14px;- position: relative;- margin-bottom: 8px; /* 减小底部间距 */- width: 100%; /* 确保宽度一致 */-}--.history-item:hover {- transform: translateY(-2px);- border-color: #444;- box-shadow: 0 4px 8px rgba(0,0,0,0.2);-}--/* 添加组悬停效果,使删除按钮在悬停时显示 */-.history-item .delete-btn {- opacity: 0;- transition: opacity 0.2s ease;-}--.history-item:hover .delete-btn {- opacity: 1;-}--.history-info {- padding: 0; /* 移除额外的内边距 */- min-height: 70px;-}--.history-title {- font-weight: 500;- font-size: 0.95rem; /* 减小字体大小 */- margin-bottom: 2px; /* 减小底部边距 */- overflow: hidden;- text-overflow: ellipsis;- white-space: nowrap;-}--.history-meta {- color: #bbb;- font-size: 0.75rem; /* 减小字体大小 */- display: flex;- flex-wrap: wrap;- margin-bottom: 1px; /* 减小边距 */-}--.history-episode {- color: #3b82f6;-}--.history-source {- color: #10b981;-}--.history-time {- color: #888;- font-size: 0.7rem; /* 减小字体大小 */- margin-top: 1px; /* 减小顶部边距 */-}--.history-separator {- color: #666;-}--.history-thumbnail {- width: 100%;- height: 90px;- background-color: #222;- overflow: hidden;-}--.history-thumbnail img {- width: 100%;- height: 100%;- object-fit: cover;-}--.history-info {- padding: 10px;-}--.history-time {- color: #888;- font-size: 0.8rem;- margin-top: 4px;-}--.history-title {- font-weight: 500;- white-space: nowrap;- overflow: hidden;- text-overflow: ellipsis;-}--/* 添加播放进度条样式 */-.history-progress {- margin: 5px 0;-}--.progress-bar {- height: 3px;- background-color: rgba(255, 255, 255, 0.1);- border-radius: 2px;- overflow: hidden;- margin-bottom: 2px;-}--.progress-filled {- height: 100%;- background: linear-gradient(to right, #00ccff, #3b82f6);- border-radius: 2px;-}--.progress-text {- font-size: 10px;- color: #888;- text-align: right;-}--/* 添加恢复播放提示样式 */-.position-restore-hint {- position: absolute;- bottom: 60px;- left: 50%;- transform: translateX(-50%) translateY(20px);- background-color: rgba(0, 0, 0, 0.7);- color: white;- padding: 8px 16px;- border-radius: 4px;- font-size: 14px;- z-index: 100;- opacity: 0;- transition: all 0.3s ease;-}--.position-restore-hint.show {- opacity: 1;- transform: translateX(-50%) translateY(0);-}--/* 锁定控制时屏蔽交互 */-.player-container.controls-locked .dplayer-controller,-.player-container.controls-locked .dplayer-mask,-.player-container.controls-locked .dplayer-bar-wrap,-.player-container.controls-locked .dplayer-statusbar,-.player-container.controls-locked .shortcut-hint {- opacity: 0 !important;- pointer-events: none !important;-}-/* 保留锁按钮可见可点 */-.player-container.controls-locked #lockToggle {- opacity: 1 !important;- pointer-events: auto !important;-}--/* 播放器顶部header移动端优化 */-.player-header {- gap: 0.5rem;-}-.custom-title-scroll {- overflow-x: auto;- white-space: nowrap;- text-overflow: ellipsis;- -webkit-overflow-scrolling: touch;- scrollbar-width: none;-}-.custom-title-scroll::-webkit-scrollbar {- display: none;-}-.logo-text {- display: inline;-}-.home-btn-text {- display: inline;-}-@media (max-width: 640px) {- .logo-text {- display: none;- }- .home-btn-text {- display: none;- }- .logo-icon {- margin-right: 0;- }- .home-btn svg {- margin-right: 0;- }- .player-header {- padding-left: 2px !important;- padding-right: 2px !important;- }- .custom-title-scroll {- font-size: 1rem;- }-}--/* 搜索结果卡片优化:横向布局 */-.search-card-img-container {- width: 100px; /* 增加宽度,从80px到100px */- height: 150px; /* 增加高度,从120px到150px */- overflow: hidden;- background-color: #191919;-}--/* 确保图片不会被拉伸,并且能够正确显示 */-.search-card-img-container img {- width: 100%;- height: 100%;- object-fit: cover;-}--/* 针对搜索结果卡片修改网格布局以适应横向卡片 */-@media (max-width: 640px) {- #results {- grid-template-columns: repeat(1, minmax(0, 1fr)) !important;- }-}--/* 响应式调整:在小屏幕上依然保持较好的视觉效果 */-@media (min-width: 641px) and (max-width: 768px) {- #results {- grid-template-columns: repeat(2, minmax(0, 1fr)) !important;- }-}--/* 调整网格布局,减少每行卡片数量以适应更大尺寸的卡片 */-@media (min-width: 769px) and (max-width: 1024px) {- #results {- grid-template-columns: repeat(3, minmax(0, 1fr)) !important;- }-}--@media (min-width: 1025px) {- #results {- grid-template-columns: repeat(4, minmax(0, 1fr)) !important;- }-}--/* 优化卡片内元素间距 */-.card-hover .p-2 {- padding: 0.75rem; /* 增加内边距 */-}--/* 增加卡片内字体大小 */-.card-hover h3 {- font-size: 0.95rem; /* 增加标题字体大小 */- line-height: 1.3rem;- margin-bottom: 0.5rem;-}--.card-hover p {- font-size: 0.8rem; /* 增加描述字体大小 */-}--/* 优化卡片内元素间距 */-.card-hover .p-2 {- padding: 0.5rem;-}--/* 确保Toast显示在顶层并有适当的转换效果 */-#toast {- z-index: 9999; /* 确保显示在最上层 */- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);- min-width: 200px;- text-align: center;- pointer-events: none; /* 防止toast阻挡点击事件 */- transform: translateX(-50%) translateY(0);- transition: opacity 0.3s ease, transform 0.3s ease;-}--#toast.hidden {- opacity: 0;- transform: translateX(-50%) translateY(-100%);-}--/* 详情模态框样式优化 */-#modal .modal-detail-info {- background: linear-gradient(135deg, #0a0a0a, #111);- border: 1px solid #222;- border-radius: 8px;- padding: 1rem;- margin-bottom: 1.5rem;-}--#modal .detail-grid {- display: grid;- grid-template-columns: 1fr;- gap: 0.75rem;- font-size: 0.875rem;-}--@media (min-width: 768px) {- #modal .detail-grid {- grid-template-columns: 1fr 1fr;- }-}--#modal .detail-item {- display: flex;- flex-wrap: wrap;- gap: 0.5rem;-}--#modal .detail-label {- color: #9ca3af;- font-weight: 500;- min-width: 3rem;- flex-shrink: 0;-}--#modal .detail-value {- color: white;- flex: 1;- word-break: break-word;-}--#modal .detail-desc {- margin-top: 1rem;- padding-top: 1rem;- border-top: 1px solid #333;-}--#modal .detail-desc-content {- color: #d1d5db;- font-size: 0.875rem;- line-height: 1.6;- max-height: 8rem;- overflow-y: auto;- scrollbar-width: thin;- scrollbar-color: #444 #222;-}--#modal .detail-desc-content::-webkit-scrollbar {- width: 6px;-}--#modal .detail-desc-content::-webkit-scrollbar-track {- background: #222;- border-radius: 4px;-}--#modal .detail-desc-content::-webkit-scrollbar-thumb {- background-color: #444;- border-radius: 4px;-}--/* 集数统计信息样式 */-#modal .episode-stats {- color: #9ca3af;- font-size: 0.875rem;- display: flex;- align-items: center;- gap: 0.5rem;-}--/* 移动端优化 */-@media (max-width: 640px) {- #modal .detail-grid {- gap: 0.5rem;- font-size: 0.8rem;- }-- #modal .detail-label {- min-width: 2.5rem;- }-- #modal .detail-desc-content {- max-height: 6rem;- font-size: 0.8rem;- }-}diff --git a/css/watch.css b/css/watch.cssdeleted file mode 100644index 2f6a487..0000000--- a/css/watch.css+++ /dev/null@@ -1,128 +0,0 @@-/* 添加重定向页面的基本样式 */-body {- font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;- background-color: #0f1622;- color: white;- margin: 0;- padding: 0;- height: 100vh;- display: flex;- align-items: center;- justify-content: center;-}--.redirect-container {- text-align: center;- max-width: 90%;- width: 380px;- padding: 2rem;- background-color: rgba(0, 0, 0, 0.3);- border-radius: 16px;- backdrop-filter: blur(10px);- -webkit-backdrop-filter: blur(10px);- box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);- border: 1px solid rgba(255, 255, 255, 0.1);-}--.logo-container {- display: flex;- align-items: center;- justify-content: center;- margin-bottom: 1.5rem;-}--.logo-icon {- width: 40px;- height: 40px;- color: #00ccff;- margin-right: 10px;-}--.logo-text {- font-size: 2rem;- margin: 0;- background: linear-gradient(to right, #00ccff, #ff3c78);- -webkit-background-clip: text;- -webkit-text-fill-color: transparent;- background-clip: text;-}--.loading-animation {- display: inline-block;- width: 50px;- height: 50px;- border: 3px solid rgba(255, 255, 255, 0.2);- border-radius: 50%;- border-top-color: #00ccff;- animation: spin 1s linear infinite;- margin-bottom: 20px;-}--@keyframes spin {- to { transform: rotate(360deg); }-}--.redirect-message {- font-size: 1.2rem;- margin-bottom: 10px;- font-weight: 500;-}--#redirect-status {- font-size: 0.9rem;- color: #8599b2;- margin-bottom: 1.5rem;- height: 20px;-}--.redirect-hint {- font-size: 0.9rem;- color: #8599b2;- margin-top: 20px;-}--.redirect-hint a {- color: #00ccff;- text-decoration: none;- font-weight: 500;- transition: all 0.2s ease;- padding: 5px 10px;- border-radius: 4px;- background-color: rgba(0, 204, 255, 0.1);-}--.redirect-hint a:hover {- background-color: rgba(0, 204, 255, 0.2);- text-decoration: underline;-}--/* 移动端优化 */-@media (max-width: 480px) {- .redirect-container {- padding: 1.5rem;- width: 85%;- }-- .logo-icon {- width: 30px;- height: 30px;- }-- .logo-text {- font-size: 1.7rem;- }-- .loading-animation {- width: 40px;- height: 40px;- margin-bottom: 15px;- }-- .redirect-message {- font-size: 1rem;- }-- #redirect-status {- font-size: 0.8rem;- }-}diff --git a/docker-compose.yml b/docker-compose.ymlindex b8f6a15..206b554 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -1,19 +1,15 @@services:libretv:- image: bestzwei/libretv:latest- container_name: libretv+ build: .+ container_name: libretv-next+ restart: unless-stoppedports:- - "8899:8080" # 将内部 8080 端口映射到主机的 8899 端口+ - "8080:8080"environment:- - PASSWORD=${PASSWORD:-your_password} # 可将 your_password 修改为你想要的密码,默认为 your_password-# volumes:-# - libretv_data:/app # 不要修改- restart: unless-stopped--#volumes:-# libretv_data:-# driver: local-# driver_opts:-# type: none-# o: bind-# device: ${PWD:-.}/data # 可将 ${PWD:-.} 修改为你想要的路径,默认为当前目录下的 data 文件夹+ # 必填:访问密码+ - PASSWORD=${PASSWORD:?请在 .env 中设置 PASSWORD}+ # 可选:会话/代理签名密钥(多实例部署建议显式设置)+ # - PROXY_SECRET=your-secret+ # - REQUEST_TIMEOUT=8000+ # - MAX_RETRIES=1+ # - DEBUG=falsediff --git a/docs/Architecture.md b/docs/Architecture.mdindex ca3774e..35171a6 100644--- a/docs/Architecture.md+++ b/docs/Architecture.md@@ -1,55 +1,114 @@-# 架构说明+# 架构-LibreTV 采用「**配置驱动的空壳前端 + 服务端代理**」架构。仓库本身不含任何视频数据,所有内容来自用户自行添加的数据源。+## 技术栈-## 目录结构(关键部分)+| 层 | 技术 | 说明 |+| --- | --- | --- |+| 框架 | Next.js 15(App Router)+ React 19 | 服务端 API Routes 与客户端页面同仓 |+| 语言 | TypeScript(strict) | 全量类型覆盖 |+| 样式 | Tailwind CSS(构建期编译)+ CSS 变量主题 | 亮暗双主题,`darkMode: 'class'` |+| 数据获取 | TanStack Query | 搜索/详情/豆瓣的缓存、重试、失效 |+| 客户端状态 | Zustand(persist → localStorage) | 数据源列表与播放设置 |+| 持久化 | Dexie(IndexedDB) | 观看历史、播放进度、搜索历史 |+| 播放 | ArtPlayer + hls.js | 广告过滤 loader、代理回退 |++## 目录结构```-.-├── index.html / player.html / watch.html # 前端页面(含 {{PASSWORD}} / {{PROXY_TOKEN_MODE}} 占位符)-├── js/ # 前端逻辑(app / config / player / ui / douban / proxy-auth ...)-├── css/ # 样式-├── server.mjs # Node 服务端:静态托管 + /proxy + /api/proxy-token + 占位符注入-├── api/proxy/[...path].mjs # Vercel Functions 代理-├── netlify/functions/proxy.mjs # Netlify Functions 代理-├── netlify/functions/inject-env.(js|mjs) # Netlify Edge Function:注入占位符-├── functions/proxy/[[path]].js # Cloudflare Pages Functions 代理-├── vercel.json / netlify.toml / render.yaml / Dockerfile / docker-compose.yml-└── docs/ # 本文档(Wiki)+libretv-next/+├── src/+│ ├── app/+│ │ ├── page.tsx # 首页:搜索 + 豆瓣推荐(?s= URL 驱动)+│ │ ├── watch/page.tsx # 播放页(唯一入口,URL 即状态)+│ │ ├── about/page.tsx+│ │ ├── layout.tsx # 主题无闪烁内联脚本 + Providers+│ │ ├── manifest.ts # PWA manifest+│ │ └── api/ # 服务端 Route Handlers+│ │ ├── auth/route.ts # 登录/登出/会话状态+│ │ ├── status/route.ts # 站点状态(客户端据此弹登录框)+│ │ ├── search/route.ts # 聚合搜索(并行 + 失败隔离 + 过滤)+│ │ ├── detail/route.ts # 详情(列表接口 → 详情页 HTML 降级)+│ │ ├── douban/route.ts # 豆瓣推荐(直连 + 缓存 + 代理降级)+│ │ └── proxy/[url]/route.ts# 流式代理(SSRF 防护 + m3u8 重写)+│ ├── components/ # UI 组件(见下)+│ └── lib/ # 纯逻辑库(可单元测试)+│ ├── cms-parser.ts # Apple CMS 解析(列表/详情/详情页爬取)+│ ├── m3u8.ts # m3u8 重写与广告过滤+│ ├── ssrf.ts # 内网地址识别与 DNS 校验+│ ├── auth.ts # 会话签名/校验、登录限流+│ ├── douban.ts # 豆瓣数据获取(降级链 + TTL 缓存)+│ ├── fetch-utils.ts # 超时/重试/内存缓存+│ ├── db.ts # Dexie schema 与历史/进度 CRUD+│ ├── store.ts # Zustand 全局设置+│ ├── client-api.ts # 客户端 API 封装(401 → 全局登录框)+│ └── utils.ts # 时间格式化、图片代理 URL、sha256 等+├── docs/ # 本 Wiki+├── Dockerfile / docker-compose.yml+└── README.md```+## 组件一览++| 组件 | 职责 |+| --- | --- |+| `providers.tsx` | QueryClient + Theme + Toast + Auth 四层 Provider 嵌套 |+| `theme.tsx` | 亮暗主题上下文与三态切换按钮(light/dark/system) |+| `auth.tsx` | 认证上下文;监听全局 401 事件弹出登录框 |+| `header.tsx` | 顶部导航 + 通用抽屉(Drawer)骨架 |+| `search`(page.tsx 内联) | 搜索框、历史 chips、结果网格、空态引导 |+| `douban-section.tsx` | 豆瓣推荐(分类/标签/分页加载) |+| `video-card.tsx` | 搜索结果卡片 / 豆瓣卡片(封面多级降级) |+| `detail-modal.tsx` | 详情弹窗(海报 + 元信息 + 剧集 + 复制链接) |+| `source-manager.tsx` | 设置抽屉:数据源 CRUD、过滤开关、封面加载方式、配置导入导出 |+| `history-panel.tsx` | 观看历史抽屉(Dexie liveQuery 实时刷新) |+| `player-shell.tsx` | ArtPlayer/HLS 封装:广告过滤、快捷键、长按倍速、代理回退 |+| `switch-source.tsx` | 换源面板:跨源搜索 → 同名匹配 → 测速排序 → 切换 |+| `toast.tsx` | 并行堆叠 Toast + 全局 Loading 遮罩 |+## 数据流+### 搜索++```+浏览器 服务端 上游+ │ POST /api/search │ │+ │ {wd, sources[], filter} │── 并行 fetch(8s 超时)────→│ 采集站 ×N+ │ │← JSON ─────────────────────│+ │← {list, failures[]} ──────│ 合并/去重/排序/成人过滤 │+```++- 客户端把自定义数据源配置随请求上传(数据源配置仅存于用户浏览器);+- 单源失败进入 `failures`,不影响其他源结果;+- React Query 以 `['search', wd, selectedKeys, filter]` 为缓存键。++### 播放+```-用户输入关键词- │- ▼-前端 app.js ──(同源 /api 或直连 CMS)──► 采集站 API (用户配置的源)- │ 搜索结果合并 / 去重- ▼-详情页 (douban 匹配封面/简介)- │- ▼-点击播放 → player.js 生成 /proxy/<encodedUrl>- │- ▼-服务端代理 server.mjs / Functions- ├─ 鉴权 (token 或静态哈希)- ├─ SSRF 校验 (拦截内网/元数据)- ├─ 抓取上游 (带 UA、重试、超时)- ├─ 若 m3u8:递归改写分片地址为 /proxy/...- ├─ 过滤敏感响应头- └─ 返回给浏览器 (HLS.js / DPlayer 播放)+/watch?source=key&id=vodId&index=n&title=..&sourceUrl=..+ │+ ├─ resolveSource(): 从 Zustand store 取数据源配置(URL 参数兜底,支持分享链接)+ ├─ GET /api/detail → episodes[] → 当前集 URL+ └─ PlayerShell(ArtPlayer+hls)+ ├─ 直连 m3u8+ └─ 致命网络错误 → /api/proxy/<url> 重试一次(cookie 鉴权)```-## 鉴权边界+进度:`video:timeupdate`(5s 节流)+ 暂停 + 卸载 → IndexedDB `progress`;+历史:进入播放页 2s 后 upsert,仅存定位信息(`sourceKey + vodId + episodeIndex`),不存全集 URL。++### 换源-- **Node 模式**:`server.mjs` 在返回 `index.html` 时注入 `PROXY_TOKEN_MODE`;密码校验后由 `/api/proxy-token` 签发短时效 token。-- **函数模式**:由平台 Edge Function(Netlify)或静态占位符注入;鉴权为静态哈希(无 token 签发)。+`switch-source.tsx` → `POST /api/search`(按标题)→ 每源取完全同名结果(否则第一条)→ `GET /api/detail` 并发测速(接口耗时)→ 按速度排序展示 → 切换时保留集数索引。-## 设计要点+## 与旧版的架构差异-1. **无内置源**:`config.js` 默认不含任何数据源数组,避免维护负担与合规风险。-2. **代理集中**:跨域与 HLS 改写只在服务端,前端保持轻量、可静态托管。-3. **安全边界**:代理是唯一对外请求入口,承载鉴权、SSRF、头过滤、源码保护。-4. **可移植**:同一前端适配 Node / Vercel / Netlify / Cloudflare / Docker,差异仅在服务端适配器。+| 维度 | 旧版 | 本版 |+| --- | --- | --- |+| API 层 | 浏览器内 monkey-patch `window.fetch` 假装 `/api/*` | 真实服务端 Route Handlers |+| 聚合搜索位置 | 用户浏览器(IP 暴露、无法缓存) | 服务端 |+| 鉴权 | 页面下发 sha256(password),`auth=` 哈希即凭证 | httpOnly cookie + HMAC 签名会话 |+| m3u8 分片 | 重写为 `/proxy/...` 但丢失鉴权参数 → 401 | cookie 同源自动携带,天然通过 |+| 页面间状态 | URL + localStorage 双总线(10+ key) | URL 即状态 + IndexedDB |+| 播放入口 | watch.html → player.html 跳转链 | 单一 `/watch` 路由 |+| 转义 | 4 种手工转义函数,存在 XSS 缺口 | React 自动转义,无 innerHTML |+| 主题 | 无 | CSS 变量 + class 策略,三态切换 |diff --git a/docs/Configuration.md b/docs/Configuration.mdindex dc33eb5..ba69623 100644--- a/docs/Configuration.md+++ b/docs/Configuration.md@@ -1,52 +1,60 @@-# 配置参考--LibreTV 全部通过**环境变量**配置,无需改动源码。不同部署形态读取的变量略有差异。--## Node / Docker / Render(`server.mjs`)--| 变量 | 默认值 | 说明 |-|---|---|---|-| `PASSWORD` | 空(**必填**) | 访问密码;未设置时页面强制提示 |-| `PROXY_SECRET` | 空 | 设置后启用服务端签发的短时效 token 鉴权(推荐);留空回退静态哈希 |-| `PORT` | `8080` | 监听端口 |-| `CORS_ORIGIN` | `*` | 允许的跨域来源 |-| `REQUEST_TIMEOUT` | `5000` | 代理请求超时(毫秒) |-| `MAX_RETRIES` | `2` | 代理失败重试次数 |-| `CACHE_MAX_AGE` | `1d` | 代理响应缓存时长(HTTP `Cache-Control`) |-| `USER_AGENT` | 内置 Chrome UA | 代理请求携带的 UA |-| `DEBUG` | `false` | 设为 `true` 开启详细日志 |-| `BLOCKED_HOSTS` | `localhost,127.0.0.1,0.0.0.0,::1` | SSRF:被拦截的主机名(逗号分隔) |-| `BLOCKED_IP_PREFIXES` | `192.168.,10.,172.` | SSRF:被拦截的 IP 网段前缀 |-| `FILTERED_HEADERS` | `content-security-policy,cookie,set-cookie,x-frame-options,access-control-allow-origin,...` | 从上游响应中剥离的敏感头(逗号分隔) |--## 服务端函数(Vercel / Netlify / Cloudflare)--| 变量 | 默认值 | 说明 |-|---|---|---|-| `PASSWORD` | 空(**必填**) | 访问密码 |-| `PROXY_SECRET` | 由 `PASSWORD` 派生 | 函数环境通常无 token 签发,鉴权为静态哈希;可显式设置用于统一密钥 |-| `DEBUG` | `false` | 调试日志 |-| `CACHE_TTL` | `86400` | 代理缓存秒数 |-| `MAX_RECURSION` | `5` | m3u8 递归改写最大层数(防环) |-| `USER_AGENTS_JSON` | 空 | 可选:自定义 UA 池(JSON 数组字符串),用于随机化请求 UA |-| `BLOCKED_HOSTS` | `localhost,127.0.0.1,0.0.0.0,::1` | SSRF 拦截主机名 |-| `BLOCKED_IP_PREFIXES` | `192.168.,10.,172.` | SSRF 拦截网段 |-| `FILTERED_HEADERS` | 内置列表 | 剥离的敏感响应头 |--> 函数型部署(无 Node 进程)**不提供 `/api/proxy-token`**,前端走静态哈希鉴权(`PROXY_TOKEN_MODE` 由注入决定,函数环境通常为空)。--## 前端注入变量(由服务端替换)--`index.html` 含两个占位符,由 Node(`server.mjs`)或 Netlify Edge Function 在响应时替换:--- `{{PASSWORD}}`:页面是否已有密码(空字符串表示未配置,前端会提示设置)。-- `{{PROXY_TOKEN_MODE}}`:`"1"` 表示启用 token 模式(已配置 `PROXY_SECRET`),否则为空。--## 示例--```bash-# Node 安全模式-PASSWORD=strongpass PROXY_SECRET=$(openssl rand -hex 32) \-REQUEST_TIMEOUT=8000 MAX_RETRIES=3 DEBUG=true \-node server.mjs-```+# 配置++## 环境变量++| 变量 | 必填 | 默认 | 说明 |+| --- | --- | --- | --- |+| `PASSWORD` | **是** | — | 访问密码。未设置时站点可用但所有功能接口返回 503,并提示管理员配置 |+| `PROXY_SECRET` | 否 | 从 PASSWORD 派生 | 会话与代理签名密钥。单实例可不设;多实例/负载均衡部署必须显式设置,否则各实例会话互不认账 |+| `REQUEST_TIMEOUT` | 否 | `8000` | 代理上游请求超时(毫秒) |+| `MAX_RETRIES` | 否 | `1` | 代理请求重试次数 |+| `USER_AGENT` | 否 | Chrome UA | 代理请求使用的 UA(豆瓣防盗链等场景) |+| `DEBUG` | 否 | `false` | 调试日志 |++> 旧版的 `CORS_ORIGIN`、`CACHE_MAX_AGE`、`BLOCKED_HOSTS`、`BLOCKED_IP_PREFIXES`、`FILTERED_HEADERS` 在重构版中已内化为安全默认值,不再需要配置。++## 运行时设置(用户级)++以下设置保存在每个用户浏览器的 localStorage(键 `libretv-settings`),通过「设置」抽屉修改:++### 数据源++- **自定义 API 列表**:名称、API 地址、详情页地址(可选)、成人标记;+- **勾选参与搜索的源**:仅勾选的源会参与聚合搜索与换源。++### 播放与过滤++| 开关 | 默认 | 说明 |+| --- | --- | --- |+| 成人内容过滤 | 开 | 服务端按分类关键词过滤(伦理片/福利片等) |+| 广告过滤 | 开 | hls.js loader 剔除 m3u8 中的 `#EXT-X-DISCONTINUITY` 广告片段 |+| 自动连播 | 开 | 单集结束自动播放下一集 |+| 豆瓣推荐 | 开 | 首页展示豆瓣热门影视 |++### 封面图加载方式++| 方式 | 说明 |+| --- | --- |+| 直连(默认) | 浏览器直接加载豆瓣/采集站封面,最快;部分网络下豆瓣图会 418 |+| 内置代理 | 经 `/api/proxy/` 转发(带豆瓣 Referer 伪装),豆瓣图不再被拒 |+| 自定义代理 | 模板字符串,`{url}` 为编码后的原图地址;不含占位符则直接拼接 |++### 主题++- 头部太阳/月亮/显示器图标,点击在 **浅色 → 深色 → 跟随系统** 间循环;+- 存储于 `localStorage['libretv-theme']`;+- 页面 HTML 内有同步脚本,刷新无闪烁;+- 跟随系统模式下监听 `prefers-color-scheme` 变化实时切换。++### 配置导入导出++- **导出**:生成 `LibreTV-Settings_<时间戳>.json`(数据源、播放设置、观看历史、搜索历史);+- **导入**:兼容旧版 LibreTV 导出的配置文件;旧版观看历史(含全集 URL 列表)会自动迁移为定位信息格式。++## 存储结构(IndexedDB `libretv-next`)++| 表 | 主键 | 字段 | 说明 |+| --- | --- | --- | --- |+| `history` | `id = sourceKey_vodId` | title, pic, episodeIndex, totalEpisodes, playbackPosition, duration, timestamp | 上限 100 条,超出淘汰最旧 |+| `progress` | `key = sourceKey_vodId_index` | position, duration, updatedAt | 每集一条,看完清除 |+| `searchHistory` | `text` | timestamp | 上限 10 条 |diff --git a/docs/Data-Sources.md b/docs/Data-Sources.mdindex c5c843e..1da1b5b 100644--- a/docs/Data-Sources.md+++ b/docs/Data-Sources.md@@ -1,41 +1,59 @@-# 数据源配置+# 数据源-LibreTV **默认不包含任何视频源**。你需要自行添加采集站 / 苹果 CMS API 后才能搜索与播放。+LibreTV 采用**空壳设计**:不内置任何采集站,由部署者/用户自行添加,避免内置源失效与合规风险。-## 支持的格式+## 支持的数据源类型-主流「苹果 CMS V10」采集 API:+Apple CMS(苹果CMS)标准采集接口,即提供以下接口的资源站:-- 搜索接口:`https://你的源/api.php/provide/vod/?ac=videolist&wd=关键词`-- 详情接口:`https://你的源/api.php/provide/vod/?ac=detail&ids=视频ID`+```+搜索:{api}?ac=videolist&wd={关键词}+详情:{api}?ac=videolist&ids={vod_id}+```-部分源使用 `api.php/provide/vod/` 或 `index.php/...`,路径以实际为准。LibreTV 会自动拼接 `wd` / `ids` 参数并发起请求。+## 添加数据源-## 添加步骤+设置 → 数据源 → 「+ 添加 API」:-1. 打开站点 → 「设置」→「数据源 / 自定义接口」;-2. 接口地址填写到 `api.php/provide/vod` 这一级(**不要**带 `?ac=...` 后缀,参数由程序自动补);-3. 保存后回到首页搜索,验证是否有结果;-4. 可添加多个源,搜索结果会合并去重。+| 字段 | 必填 | 说明 |+| --- | --- | --- |+| 名称 | 是 | 显示用名称 |+| API 地址 | 是 | 形如 `https://example.com/api.php/provide/vod`,结尾 `/` 会自动去除 |+| 详情页地址 | 否 | 形如 `https://example.com`;部分源列表接口不返回播放地址,需要爬取详情页 HTML 提取 m3u8 |+| 成人标记 | 否 | 标记后受「成人内容过滤」开关控制 |-## 示例+添加后默认自动勾选参与搜索。-```-https://example.com/api.php/provide/vod-```+## 详情页爬取(特殊源)++当标准详情接口拿不到播放地址时,服务端自动降级:++1. 请求 `{detail}/index.php/vod/detail/id/{id}.html`;+2. 通用正则提取 `\$https://...m3u8`;+3. 若无结果,尝试非凡影视特征路径模式(`/日期/哈希/index.m3u8`);+4. 去重后作为剧集列表。++## 服务端聚合行为++- 所有勾选的源**并行**搜索,单源 8 秒超时;+- 任一源失败不影响整体,失败源在结果区顶部以名称列出;+- 结果按「源内去重(sourceKey+vodId)→ 名称排序(zh-CN)」合并;+- 成人过滤在服务端执行,关键词包括:伦理片、福利、里番动漫、无码、SWAG 等。++## 自定义源的数据流++数据源配置**只保存在用户浏览器**(localStorage),服务端不存储。每次搜索/详情请求会把用到的源配置随请求上传,因此:++- 同一部署的不同用户可以有不同的数据源集合;+- 分享播放链接时 URL 会携带 `sourceUrl` 参数,接收者即使未配置同名的源也能播放(见 [Player](Player))。-## 排错+## 常见问题-| 现象 | 可能原因 | 处理 |-|---|---|---|-| 搜索无结果 | 接口地址填错(带了 `?ac=` 或少了 `provide/vod`) | 只填到 `api.php/provide/vod` |-| 报 401 / 未授权 | 代理鉴权失败 | 确认密码 / `PROXY_SECRET` 配置正确,函数环境已重新部署 |-| 详情能搜到但播放报错 | 该源返回的播放地址需代理,但直链被防盗链 | 确保走 `/proxy`;部分源需带 Referer,可在 `USER_AGENT` / 请求头调整 |-| CORS 报错 | 不应出现 | 所有请求经服务端代理转发,已规避浏览器跨域;若出现请检查部署是否正确 |-| 返回非 JSON / 乱码 | 该源非苹果 CMS 标准格式 | 更换为标准兼容源 |+**Q: 添加源后搜索无结果?**+用浏览器直接访问 `{api}?ac=videolist&wd=test` 验证是否返回 JSON。部分源校验 Referer/UA 或已停更。-## 注意事项+**Q: 搜索成功但详情提示"未找到播放资源"?**+该源的播放地址可能需要详情页爬取,请补填「详情页地址」;或该影片在源内本身无 m3u8 地址。-- 请仅添加你**有权使用**的源,遵守源站与使用地法律法规。-- 源的稳定性、内容合规由源站负责;项目仅做转发,不缓存视频内容。-- 多个源可能返回重复影视,前端已做标题去重,最多保留前若干条(避免长列表卡顿)。+**Q: 可以批量导入吗?**+旧版支持逗号分隔的多个 API 地址一次性导入(`?urls=` 参数)。重构版暂未移植该入口,可通过「导出/导入配置」迁移。diff --git a/docs/Deployment.md b/docs/Deployment.mdindex 9a7c6b6..7fe2d23 100644--- a/docs/Deployment.md+++ b/docs/Deployment.md@@ -1,80 +1,86 @@-# 部署指南+# 部署-LibreTV 通过同一套前端 + 不同的服务端适配器运行在各种平台。所有平台都**必须设置 `PASSWORD`**。+## Docker(推荐)-## 平台与服务端适配器对照+```bash+git clone <本仓库>+cd libretv-next-| 平台 | 服务端入口 | 前端 `/proxy` 路由指向 | 代理鉴权 |-|---|---|---|---|-| Node(裸机 / Render) | `server.mjs` | `/proxy/*` | 推荐 `PROXY_SECRET` 短时效 token |-| Docker | `server.mjs`(容器内) | `/proxy/*` | 同上 |-| Vercel | `api/proxy/[...path].mjs` + `vercel.json` rewrite | `/proxy/*` | 静态哈希 |-| Netlify | `netlify/functions/proxy.mjs` + Edge `inject-env` | `/.netlify/functions/proxy/*` | 静态哈希 |-| Cloudflare Pages | `functions/proxy/[[path]].js` | `/proxy/*` | 静态哈希(见下方注意事项) |+# 设置密码+echo "PASSWORD=your-strong-password" > .env-> `vercel.json` 已配置 `/proxy/:path*` → `/api/proxy/:path*` 的 rewrite,因此前端 `PROXY_URL` 统一为 `/proxy/`,无需按平台改动前端。+docker compose up -d --build+# 访问 http://localhost:8080+```----+镜像为多阶段构建(`DOCKER_BUILD=1` 时输出 standalone),运行容器不包含构建工具,体积小。-## 1. Node / 本地开发+### docker-compose.yml-```bash-npm install-PASSWORD=your_password node server.mjs-# 开发热重载:-npm run dev+```yaml+services:+ libretv:+ build: .+ ports: ["8080:8080"]+ environment:+ - PASSWORD=${PASSWORD:?请在 .env 中设置 PASSWORD}+ # - PROXY_SECRET=your-secret```-- 默认端口 `8080`,可用 `PORT` 修改。-- 推荐同时设置 `PROXY_SECRET`(任意随机长字符串)以启用更安全的 token 鉴权。+## 手动部署-## 2. Docker+要求 Node.js ≥ 20(推荐 22):```bash-docker run -d \- --name libretv \- --restart unless-stopped \- -p 8899:8080 \- -e PASSWORD=your_password \- -e PROXY_SECRET=你的随机长字符串 \- bestzwei/libretv:latest+npm ci+PASSWORD=your-password npm run build+PASSWORD=your-password npm start # 默认 8080 端口```-镜像内置 `HEALTHCHECK`,监听 `8080`。`docker-compose.yml` 已提供,运行:--```bash-PASSWORD=your_password docker compose up -d-```+> 注意:`output: 'standalone'` 仅在 `DOCKER_BUILD=1` 时启用,本地 `next start` 无需(也不兼容)standalone。-## 3. Render+### 生产建议-`render.yaml` 已配置 `buildCommand: npm install` 与 `startCommand: node server.mjs`。在 Render 控制台导入仓库后,于 Environment 中添加 `PASSWORD`(以及可选的 `PROXY_SECRET`),直接 Deploy 即可。+- 使用反向代理(Nginx / Caddy)终结 HTTPS,转发到 8080;+- 会话 Cookie 在生产环境(`NODE_ENV=production`)下自动启用 `Secure`,需 HTTPS 访问;+- 设置 `PROXY_SECRET` 而非依赖 PASSWORD 派生,避免更换密码导致全员会话失效以外的副作用。-## 4. Vercel+## 环境变量-1. 导入仓库,使用默认设置(`vercel.json` 已处理 rewrite)。-2. 在 **Settings → Environment Variables** 添加 `PASSWORD`(以及可选的 `PROXY_SECRET`)。-3. Deploy。运行时走 `api/proxy`,鉴权为静态哈希(Vercel 函数不签发 token)。+完整列表见 [Configuration](Configuration)。最小可运行配置只有一个 `PASSWORD`。-## 5. Netlify+## 健康检查与验证-`netlify.toml` 已配置 Functions 目录与 `inject-env` Edge Function(负责把 `{{PASSWORD}}`、`{{PROXY_TOKEN_MODE}}` 占位符替换为真实值)。部署时只需在站点 Environment Variables 设置 `PASSWORD` 即可,代理走 `/.netlify/functions/proxy/*`,鉴权为静态哈希。+```bash+curl http://localhost:8080/api/status+# {"passwordRequired":true,"verified":false,"version":"2.0.0"}-## 6. Cloudflare Pages+# 未登录访问受保护接口应返回 401+curl -X POST http://localhost:8080/api/search -d '{}' -H 'Content-Type: application/json' -i | head -1+# HTTP/1.1 401 Unauthorized-Cloudflare Pages 使用 `functions/proxy/[[path]].js` 提供代理,并由 `functions/_middleware.js`(Pages Middleware)在返回 HTML 时注入占位符,因此直接部署即可正常工作:+# SSRF 防护应拦截内网地址+curl -i "http://localhost:8080/api/proxy/http%3A%2F%2F127.0.0.1%3A8080%2F" | head -1+# HTTP/1.1 400/403+```-- `{{PASSWORD}}` 被替换为 `sha256(PASSWORD)`(与 Node 端逻辑一致);-- `{{PROXY_TOKEN_MODE}}` 固定为空,前端走兼容(静态哈希)鉴权,因为 CF 函数不提供 `/api/proxy-token` 签发端点。+## 升级-鉴权为静态哈希(弱于 Node 的 token 模式)。如需更强安全性,建议用 Node / Docker 部署并配置 `PROXY_SECRET`。+1. `git pull`+2. `npm ci && npm run build`(或 `docker compose up -d --build`)+3. 用户数据(历史/进度/设置)在浏览器端,升级无感迁移。-> 已知差异:CF Pages 未配置 `/s=关键词` 的深链重写(Vercel/Netlify 有),直接访问 `/s=...` 会 404;通过站内搜索不受影响。+## 从旧版迁移----+- 旧版打开「设置 → 配置文件 → 导出」,新版「设置 → 配置 → 导入配置」选择同一文件即可迁移数据源与观看历史;+- 旧版 localStorage 各零散 key 不会被读取,仅识别标准导出 JSON;+- 旧版的 `PASSWORD` 环境变量直接沿用(明文比对改为服务端恒定时间比较,用户无感知)。-## 通用提示+## 开发-- 使用纯静态服务器(如 `python -m http.server`)打开时**没有代理能力**,视频无法播放,仅适合预览静态页面。-- 修改 `PASSWORD` 等环境变量后,函数型平台需重新部署,Node 需重启进程。-- 浏览器端配置(收藏、历史、自定义源)保存在 `localStorage`,清 Cookie / 换浏览器会丢失,重要配置请在「设置」中导出备份。+```bash+npm install+PASSWORD=dev-password npm dev # http://localhost:8080+npm run typecheck # TypeScript 检查+npm test # 单元测试(cms-parser / m3u8 / ssrf)+```diff --git a/docs/FAQ.md b/docs/FAQ.mdindex 71c09a8..5c605f6 100644--- a/docs/FAQ.md+++ b/docs/FAQ.md@@ -1,37 +1,60 @@-# 常见问题 FAQ+# FAQ-### 部署相关+## 部署相关-**Q:启动后页面提示「请设置密码」?**-A:未配置 `PASSWORD` 环境变量。请在部署平台的环境变量中加入 `PASSWORD=你的密码`,并重启 / 重新部署。+**Q: 打开站点一直提示"需要配置密码"?**+服务器未设置 `PASSWORD` 环境变量。Docker 部署检查 `.env`;手动部署确认启动命令中带 `PASSWORD=...`。设置后需重启服务。-**Q:Cloudflare Pages 部署后页面异常 / 代理失败?**-A:CF Pages 由 `functions/_middleware.js` 自动注入 `{{PASSWORD}}`(替换为 `sha256(PASSWORD)`)与 `{{PROXY_TOKEN_MODE}}`(兼容模式),直接部署即可正常使用。若仍异常,请确认已在 CF 的 Functions 环境变量中设置 `PASSWORD`,并重新部署。详见[部署指南](Deployment.md)。+**Q: 登录后刷新又要求输入密码?**+- 生产环境(HTTPS)下 Cookie 为 `Secure`,用 HTTP 访问生产构建会导致 Cookie 无法保存——请配置 HTTPS 或以开发模式运行;+- 多实例部署未设置 `PROXY_SECRET`:各实例派生密钥不同,会话互不认账。-**Q:函数平台(Vercel / Netlify)代理返回 401?**-A:函数环境走静态哈希鉴权,需保证 `PASSWORD` 已设置且前端输入一致;改密码后请重新部署。+**Q: 忘记密码怎么办?**+修改 `PASSWORD` 环境变量并重启。旧会话立即全部失效(密钥随之改变)。-**Q:Docker 端口访问不了?**-A:默认容器内 `8080`,映射到主机的端口在 `docker run -p` / `docker-compose.yml` 中(如 `8899:8080`),访问宿主机映射端口。+## 搜索相关-### 播放相关+**Q: 搜索提示"请先添加数据源" / "尚未勾选数据源"?**+本项目不内置采集站。到「设置 → 数据源」添加 Apple CMS 采集站地址并勾选。-**Q:搜索有结果但点击播放没反应 / 黑屏?**-A:多为该源播放地址需要代理或防盗链。确认部署正确走了 `/proxy`;如源站直链带 Referer 校验,可调整 `USER_AGENT` 或在源侧处理。+**Q: 某个源一直搜索失败?**+结果区顶部会列出失败源名称。直接浏览器访问 `{api}?ac=videolist&wd=test` 判断是源挂了还是网络不通;不用的源可以取消勾选或删除。-**Q:提示跨域(CORS)错误?**-A:不应出现——所有请求都经服务端代理转发,已规避浏览器跨域。若出现,说明前端没走 `/proxy`,检查部署的 rewrite / 函数路由是否生效。+**Q: 搜索结果为什么按名称排序?**+跨源聚合后按影片名(zh-CN locale)排序、同名片按源名排序,便于对比同一影片在不同源的画质/集数。-**Q:HLS 视频加载转圈?**-A:m3u8 经服务端递归改写与缓存,若源站慢会卡顿;可切换清晰度 / 源。+## 播放相关-**Q:收藏 / 历史丢了?**-A:保存在浏览器 `localStorage`,清 Cookie、换浏览器或无痕模式会丢失。重要配置请在「设置」中导出备份。+**Q: 视频一直"正在加载"?**+按顺序尝试:① 点「切换资源」换其他源;② 设置中切换封面/直连相关配置确认网络;③ 该源分片可能仅允许特定地区/Referer,代理回退通常能自动解决,若仍失败请换源。-### 安全相关+**Q: 出现"直连失败,改用代理重试"后播放正常,但快进卡顿?**+代理播放的带宽受限于服务器。属预期行为,建议优先寻找可直连的源。-**Q:为什么推荐设置 `PROXY_SECRET`?**-A:设置后代理改用服务端签发的短时效 token,前端静态哈希不再被接受,可防止他人提取哈希后盗用你的代理。详见[代理鉴权与安全](Proxy-Security.md)。+**Q: 自动跳到下一集后从头播放了?**+确认「自动连播」开关已打开(播放页操作栏或设置中)。-**Q:代理会访问内网吗?**-A:不会。代理内置 SSRF 防护,拦截 `localhost`、私有网段与云元数据地址。+**Q: 换源后集数对不上?**+换源按集数索引对齐,目标源集数少于当前集数时会回到第 1 集。++## 数据相关++**Q: 换浏览器/设备后历史和进度还在吗?**+不在。历史与进度保存在本机 IndexedDB,不上传服务器。可用「设置 → 导出配置」手动迁移。++**Q: 观看历史里某条记录播放时提示"数据源不存在"?**+该记录的来源源已被删除。重新在设置中添加同名 API 地址(key 一致即可恢复),或删除该历史。++**Q: IndexedDB 数据会占多少空间?**+仅存定位信息(不含全集 URL),100 条历史通常 < 100KB。++## 安全相关++**Q: 密码是明文传输吗?**+登录请求把密码放在 POST body 中,生产环境务必启用 HTTPS 防止传输层被窃听。++**Q: 代理会被滥用吗?**+代理需要登录会话;未登录仅放行图片类目标且同样受 SSRF 校验约束。公网部署建议在反代层再加 IP 级限流。++**Q: 为什么不给站点加注册/多用户?**+LibreTV 定位为轻量自托管工具,单密码门禁 + 本机数据即可满足场景;多用户会引入服务端存储与隐私复杂度。diff --git a/docs/Home.md b/docs/Home.mdindex 479ad13..f28b23e 100644--- a/docs/Home.md+++ b/docs/Home.md@@ -1,23 +1,42 @@-# LibreTV Wiki+# LibreTV Next Wiki-欢迎来到 LibreTV 文档中心。本项目是一个**无内置数据源**的在线视频搜索与代理平台,本文档帮助你部署、配置与排错。+欢迎来到 LibreTV Next 的项目文档。LibreTV 是一个免费的在线视频聚合搜索与观看平台,基于 Next.js 15 重构。-## 导航+## 文档目录-| 页面 | 内容 |-|---|---|-| [部署指南](Deployment.md) | Node / Vercel / Netlify / Cloudflare Pages / Docker / Render 详细步骤 |-| [配置参考](Configuration.md) | 全部环境变量与默认值 |-| [代理鉴权与安全](Proxy-Security.md) | token 模式、静态哈希、SSRF 防护、源码保护 |-| [数据源配置](Data-Sources.md) | 如何添加苹果 CMS / 采集站 API |-| [播放器说明](Player.md) | 快捷键、HLS、手势操作 |-| [常见问题 FAQ](FAQ.md) | 部署与播放常见故障排查 |-| [架构说明](Architecture.md) | 前端结构、服务端适配器、数据流 |+| 文档 | 内容 |+| --- | --- |+| [Architecture](Architecture) | 系统架构、目录结构、数据流、技术选型说明 |+| [Deployment](Deployment) | Docker / 手动部署、环境变量、升级指南 |+| [Configuration](Configuration) | 环境变量详解、主题系统、数据源管理、配置导入导出 |+| [Data-Sources](Data-Sources) | 采集站(Apple CMS)接入说明、自定义 API 格式、常见问题源 |+| [Player](Player) | 播放器功能、快捷键、广告过滤、代理回退、进度与历史 |+| [Proxy-Security](Proxy-Security) | 代理鉴权设计、SSRF 防护、安全模型与旧版对比 |+| [FAQ](FAQ) | 常见问题排查 |-## 核心设计+## 快速开始-1. **空壳前端**:仓库不维护任何默认视频源,所有源由用户在「设置」中添加。-2. **服务端代理**:跨域抓取与 m3u8 改写集中在服务端函数,前端只负责渲染。-3. **安全优先**:代理鉴权、SSRF 拦截、源码保护为必保留能力。+```bash+# Docker 部署(推荐)+echo "PASSWORD=your-password" > .env+docker compose up -d-> 想快速上手?先看 [部署指南](Deployment.md),再读 [数据源配置](Data-Sources.md) 添加你的第一个采集站。+# 本地开发+npm install+PASSWORD=dev-password npm run dev # http://localhost:8080+```++## 核心特性++- **聚合搜索**:多采集站服务端并行搜索,单源失败不影响整体,用户 IP 不暴露给第三方+- **HLS 播放**:ArtPlayer + hls.js,广告分片过滤、自动连播、倍速、快捷键、移动端长按 3 倍速+- **智能回退**:视频直连失败(CORS / 防盗链)时自动改走内置代理重试+- **进度同步**:播放进度与观看历史存于本机 IndexedDB,精确到秒的续播+- **换源测速**:跨源搜索同名资源并测速排序,一键切换保留集数位置+- **豆瓣推荐**:电影 / 剧集分类浏览,服务端直连避免公共 CORS 代理+- **亮暗主题**:跟随系统 / 手动切换,无首屏闪烁+- **PWA**:可安装到桌面 / 主屏幕++## 与旧版(静态 HTML + Express)的关系++本项目是 [LibreTV 旧版](https://github.com/bestZwei/LibreTV)的完整重构。功能对齐的同时修复了旧版的多项问题(历史记录 XSS、m3u8 分片鉴权丢失、密码哈希暴露等),架构差异详见 [Architecture](Architecture)。diff --git a/docs/Player.md b/docs/Player.mdindex 887ef97..caf0e2a 100644--- a/docs/Player.md+++ b/docs/Player.md@@ -1,35 +1,52 @@-# 播放器说明+# 播放器-LibreTV 使用 HLS.js + DPlayer 作为播放内核,支持 HLS(`.m3u8`)直链经服务端代理后播放。+播放器基于 ArtPlayer + hls.js,封装在 `src/components/player-shell.tsx`,页面入口为 `/watch` 路由。-## 键盘快捷键+## 播放链接格式-| 按键 | 功能 |-|---|---|-| 空格 / `K` | 播放 / 暂停 |-| `←` / `→` | 快退 / 快进(5 秒) |-| `↑` / `↓` | 音量 + / - |-| `M` | 静音 / 取消静音 |-| `F` | 全屏 / 退出全屏 |-| `Esc` | 退出全屏 |--## 手势与交互--- **双击**:切换全屏 / 退出全屏。-- **长按**:在进度条上长按可显示精确时间提示(已修复旧版重复绑定监听的问题)。-- **选集 / 换源**:详情页多集与多源可在播放面板切换,切换时复用同一播放器实例。+```+/watch?source=custom_0&id=20717&index=0&title=流浪地球&sourceUrl=https://..+ └─数据源 key └─影片 id └─集数 └─标题 └─数据源地址(分享链接兜底)+```-## HLS 与代理+- `source` + `id` 存在时:从 `/api/detail` 拉取剧集列表,`index` 指定当前集;+- 仅 `url` 参数时(直连分享):直接播放该地址,无剧集列表;+- URL 即状态:刷新/分享/前进后退均无损。-- m3u8 主列表与内层分片均经 `/proxy` 改写,确保分片地址也走代理(避免直链跨域 / 防盗链失败)。-- 代理会对 m3u8 做递归重写(默认最多 5 层,受 `MAX_RECURSION` 控制),并缓存(受 `CACHE_TTL` / `CACHE_MAX_AGE` 控制)。+## 功能-## 豆瓣匹配+| 功能 | 说明 |+| --- | --- |+| 自动连播 | 单集结束 0.8s 后自动下一集;片尾自动清除该集进度 |+| 进度恢复 | 优先 URL `position` 参数,否则读 IndexedDB;>10s 且非片尾(95%)时恢复并提示"已从 XX:XX 继续播放" |+| 换源 | 「切换资源」→ 跨源搜索同名影片 → 详情接口测速 → 按速度排序;切换后保留当前集数索引 |+| 集数倒序 | 倒序排列按钮,激活集自动滚动进可视区 |+| 广告过滤 | 自定义 hls.js loader 对 manifest/level 文本剔除 `#EXT-X-DISCONTINUITY` 广告分段(设置中可关) |+| 错误恢复 | HLS 网络错误自动 `startLoad`,媒体错误自动 `recoverMediaError`;多次失败显示错误面板 |+| 代理回退 | 直连致命网络错误(CORS/防盗链/分片被拒)时,自动改走 `/api/proxy/`(cookie 鉴权)重试一次 |+| 画中画 / 截图 / 网页全屏 / 倍速 | ArtPlayer 原生能力 |-- 详情页可触发豆瓣信息匹配:当搜索结果命中多个候选时,已优化为**自动选择首个高置信度匹配**,减少误匹配与空白封面。-- 匹配失败时会回退到源站自带的海报 / 简介,不影响播放。+## 快捷键-## 常见问题--- 部分非 HLS 的直链(如 `.mp4`)同样走 `/proxy` 转发,无需额外配置。-- 若播放卡顿,多为源站限速或网络问题,可尝试切换源 / 清晰度。+| 按键 | 功能 |+| --- | --- |+| `空格` | 播放 / 暂停 |+| `←` / `→` | 快退 / 快进 5 秒 |+| `↑` / `↓` | 音量 ±10% |+| `F` | 全屏切换 |+| `Alt + ←` / `Alt + →` | 上一集 / 下一集 |+| 双击 | 全屏切换 |+| 移动端长按 | 3 倍速播放(松开恢复) |++## 播放进度与历史++- **进度**:`video:timeupdate` 每 5 秒节流保存 + 暂停/页面隐藏/组件卸载时强制保存 → IndexedDB `progress` 表;+- **历史**:进入播放页 2 秒后写入 `history` 表(仅 `sourceKey + vodId + episodeIndex` 定位信息),播放中增量更新进度;+- **剧集同步**:从历史进入播放页时重新拉取详情,天然获得最新剧集列表(旧版需专门的同步逻辑)。++## 播放失败的排查顺序++1. **换源**:点击「切换资源」,选择测速绿色(低延迟)的其他源;+2. **观察回退提示**:若出现"直连失败,改用代理重试"说明该源分片有防盗链,代理通常可解;+3. **关广告过滤**:个别源本身依赖 DISCONTINUITY 做多码率切换,误过滤会黑屏;+4. **直接验证**:浏览器访问详情返回的 m3u8 地址确认源本身可用。diff --git a/docs/Proxy-Security.md b/docs/Proxy-Security.mdindex 4a2e64b..7e4b61a 100644--- a/docs/Proxy-Security.md+++ b/docs/Proxy-Security.md@@ -1,48 +1,61 @@-# 代理鉴权与安全+# 代理与安全-LibreTV 的视频直链通过服务端代理转发,以解决跨域与 HLS 直链播放问题。代理接口是系统的安全边界,以下说明其鉴权机制与防护。+本项目的服务端承担三类安全职责:**访问鉴权**、**代理防护(SSRF)**、**上游伪装(防盗链)**。-## 两种鉴权模式+## 鉴权模型-### 1. 安全模式:`PROXY_SECRET` 短时效 token(推荐)+### 会话-当服务端设置了 `PROXY_SECRET`:+- 登录:`POST /api/auth`,body 携带明文密码(**不走 URL**,避免进访问日志);+- 服务端用 SHA-256 摘要做**恒定时间比较**(`crypto.timingSafeEqual`),不暴露时序信息;+- 通过后签发会话 Cookie:`ltv_session = <过期时间戳>.<HMAC-SHA256(密钥, 时间戳)>`;+ - `httpOnly`(JS 不可读)、`SameSite=Lax`、生产环境 `Secure`、有效期 90 天;+ - 密钥 = `PROXY_SECRET`,未设置时从 `PASSWORD` 派生;+- 所有 `/api/*`(除 status/登录外)通过 `guardRequest` 校验会话,未登录返回 401,客户端全局弹出登录框。-1. 用户在前端输入密码校验通过后,前端调用 `GET /api/proxy-token?password=...`;-2. 服务端校验密码,签发一个**带时间戳**的 HMAC token(`t` 为毫秒时间戳,`token = HMAC(secret, t + path + query)`);-3. 后续代理请求 `GET /proxy/<encodedUrl>?token=...&t=...` 需携带该 token;-4. 服务端校验签名与时间窗口(默认 60 秒),过期或签名不符返回 `401`;-5. **前端持有的静态哈希不再被接受**(修复了旧版可被伪造的鉴权)。+### 速率限制-前端通过 `window.__ENV__.PROXY_TOKEN_MODE === "1"` 自动切换该模式,无需手动配置。+登录接口按 IP 限流:**10 次 / 10 分钟**,超限返回 429。内存实现,适合单实例部署。-### 2. 兼容模式:静态哈希(函数型部署)+### 与旧版的安全差异-未设置 `PROXY_SECRET` 时回退:代理请求携带 `auth=sha256(password)`。该哈希暴露在前端页面中,**可被提取后伪造请求**,安全性较弱。仅建议用于无 Node 进程的函数型环境,并尽量通过 `PROXY_SECRET` 升级。+| 问题 | 旧版 | 本版 |+| --- | --- | --- |+| 密码哈希下发 | 页面源码含 `sha256(PASSWORD)` | 服务端独享,前端零凭证 |+| 哈希即凭证 | `?auth=<哈希>` 可无限重放代理请求 | 已移除该兼容模式 |+| 明文密码上 URL | `GET /api/proxy-token?password=...` | `POST /api/auth` body |+| 登录限流 | 无 | 10 次 / 10 分钟 |+| token 轮换 | 10 分钟短时效 token(需手工附参) | 会话 Cookie,m3u8 分片同源自动携带 |-## SSRF 防护+## 代理(`GET /api/proxy/<encoded-url>`)-代理在发起上游请求前会校验目标 URL,拦截:+### 访问规则-- 协议非 `http`/`https`;-- 主机名命中 `BLOCKED_HOSTS`(默认 `localhost,127.0.0.1,0.0.0.0,::1`);-- IP 命中私有网段前缀 `BLOCKED_IP_PREFIXES`(默认 `192.168.,10.,172.`);-- 字面量 IP 经 `isPrivateIP` 判定为内网 / 环回 / 链路本地(含云元数据 `169.254.169.254`、`100.100.100.100` 等);-- DNS 解析后的地址若落入私有段,同样被拦截(`isBlockedByDNS`)。+- **已登录**:可代理任意符合 SSRF 校验的目标(视频分片、key、JSON、图片);+- **未登录**:仅放行图片类目标(`.jpg/.png/...` 或 `doubanio.com` 域),用于登录页前的封面展示;其余一律 401。-返回码:非法 URL为 `400`,命中拦截为 `400/403`。+### SSRF 防护(双层)-## 响应头过滤+1. **字面量校验**(请求前):协议白名单 http/https;主机名黑名单(localhost 等);IPv4/IPv6 字面量直接比对私有段;+2. **DNS 解析校验**(请求前):域名解析出的所有地址逐一检查,拦截解析到内网的域名(防 DNS rebinding 基础形态)。-代理会从上游响应中剥离敏感头(默认 `content-security-policy`、`cookie`、`set-cookie`、`x-frame-options`、`access-control-allow-origin` 等),避免将上游的 Cookie / CSP 泄漏到浏览器,降低会话劫持与 XSS 风险。可用 `FILTERED_HEADERS` 覆盖。+被拦截的地址段:回环(127.0.0.0/8, ::1)、私有(10/8, 172.16/12, 192.168/16)、链路本地(169.254/16,含云元数据 169.254.169.254)、CGNAT(100.64/10)、协议保留(192.0.0.0/24)、唯一本地(fc00::/7)、链路本地 v6(fe80::/10)。-## 源码保护+### 行为-Node 服务端对 `.js`/`.mjs`/`.json` 等源码路径(如 `/server.mjs`、`/api/*`)做了静态白名单保护,未命中白名单的源码请求返回 `404`,防止源码泄露。+- **流式透传**:视频分片 / 图片 / key 不落盘,直接 pipe;+- **m3u8 重写**:manifest/level 文本中的分片、`#EXT-X-KEY`、`#EXT-X-MAP` 地址全部改写为 `/api/proxy/<encoded>`(递归深度 ≤5),嵌套播放列表同样经代理,规避上游 CORS 限制;+- **响应头净化**:剔除 CSP/Cookie/Set-Cookie/X-Frame-Options/CORS 头与 Content-Encoding/Length(fetch 已解压,防止二次解压乱码);+- **Range 透传**:保留 `Range`/`Content-Range`,支持拖动;+- **重试**:上游失败按 `MAX_RETRIES` 重试。-## 安全建议+### 上游伪装-- ✅ 所有部署**必须**设置强 `PASSWORD`。-- ✅ 能运行 Node 的环境**务必**设置 `PROXY_SECRET`(随机 32 字节以上)。-- ✅ 不要将实例公开分享;私有网段与云元数据已被默认拦截,但仍应避免暴露到公网。-- ⚠️ 函数型部署(Vercel / Netlify / CF)默认走静态哈希,安全性弱于 token 模式。+- 目标为 `doubanio.com` 时自动携带 `Referer: https://movie.douban.com/`,绕过豆瓣图片 418 防盗链;+- 统一携带 Chrome UA。++## 已知边界++- 速率限制为内存实现,多实例部署需换共享存储(Redis);+- SSRF 的 DNS 校验存在理论上的 TOCTOU 窗口(校验后、请求前 DNS 记录变更);对公网部署建议叠加网络层出口限制;+- 会话无法服务端主动吊销(无状态签名);更换 `PROXY_SECRET` 或 `PASSWORD` 可使全部会话失效。diff --git a/image/logo-black.png b/image/logo-black.pngdeleted file mode 100644index feaca51..0000000Binary files a/image/logo-black.png and /dev/null differdiff --git a/image/logo.png b/image/logo.pngdeleted file mode 100644index 1d96ad7..0000000Binary files a/image/logo.png and /dev/null differdiff --git a/image/nomedia.png b/image/nomedia.pngdeleted file mode 100644index 946d083..0000000Binary files a/image/nomedia.png and /dev/null differdiff --git a/image/nomedia.psd b/image/nomedia.psddeleted file mode 100644index 3273a5e..0000000Binary files a/image/nomedia.psd and /dev/null differdiff --git a/index.html b/index.htmldeleted file mode 100644index 76a6e9f..0000000--- a/index.html+++ /dev/null@@ -1,459 +0,0 @@-<!DOCTYPE html>-<html lang="zh">-<head>- <meta charset="UTF-8">- <meta name="viewport" content="width=device-width, initial-scale=1.0">- <title>LibreTV - 免费在线视频搜索与观看平台</title>- <meta name="description" content="LibreTV是一个免费的在线视频搜索平台,无广告、安全,提供来自多个视频源的内容搜索与观看服务,无需注册即可使用。">- <meta name="keywords" content="在线视频,免费视频,视频搜索,电影,电视剧,LibreTV">- <meta name="author" content="LibreTV Team">-- <!-- Favicon -->- <link rel="icon" href="image/logo.png">- <link rel="apple-touch-icon" href="image/logo-black.png">- <link rel="manifest" href="manifest.json">-- <script src="libs/tailwindcss.min.js"></script>- <link rel="stylesheet" href="css/styles.css">- <link rel="stylesheet" href="css/index.css">-</head>-<body class="page-bg text-white">- <!-- 将历史记录按钮移到左上角,并缩小尺寸 -->- <div class="fixed top-4 left-4 z-10">- <button onclick="toggleHistory(event)" class="bg-[#222] hover:bg-[#333] border border-[#333] hover:border-white rounded-lg px-3 py-1.5 transition-colors" aria-label="观看历史">- <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"></path>- </svg>- </button>- </div>-- <!-- 设置按钮保留在右上角,并缩小尺寸 -->- <div class="fixed top-4 right-4 z-10">- <button onclick="toggleSettings(event)" class="bg-[#222] hover:bg-[#333] border border-[#333] hover:border-white rounded-lg px-3 py-1.5 transition-colors" aria-label="打开设置">- <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"></path>- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path>- </svg>- </button>- </div>-- <!-- 历史记录面板 - 标题居中 -->- <div id="historyPanel" class="history-panel fixed left-0 top-0 h-full bg-[#111] border-r border-[#333] p-6 z-40 transform -translate-x-full transition-transform duration-300" aria-label="观看历史" aria-hidden="true">- <div class="flex justify-between items-center mb-6">- <button onclick="toggleHistory()" class="close-btn">- <svg fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>- </svg>- </button>- <h3 class="text-xl font-bold gradient-text mx-auto">观看历史</h3>- <div class="w-4"></div> <!-- 添加一个占位元素以确保标题居中 -->- </div>- <div id="historyList" class="pb-4">- <!-- 历史记录将在这里动态显示 -->- <div class="text-center text-gray-500 py-8">暂无观看记录</div>- </div>- <div class="mt-4 text-center sticky bottom-0 pb-2 pt-2 bg-[#111]">- <button onclick="clearViewingHistory()" class="px-4 py-2 w-full bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 hover:from-indigo-600 hover:via-purple-600 hover:to-pink-600 text-white rounded-lg text-sm transition-all duration-300 shadow-md hover:shadow-lg">- 清空历史记录- </button>- </div>- </div>-- <!-- 设置面板 -->- <div id="settingsPanel" class="settings-panel fixed right-0 top-0 h-full w-80 bg-[#111] border-l border-[#333] p-6 z-40 overflow-y-auto" aria-label="设置面板" aria-hidden="true">- <div class="flex justify-between items-center mb-6">- <h3 class="text-xl font-bold gradient-text">设置</h3>- <button onclick="toggleSettings()" class="close-btn">- <svg fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>- </svg>- </button>- </div>- <div class="space-y-5">- <!-- 数据源设置区域 -->- <div class="p-3 bg-[#151515] rounded-lg shadow-inner">- <label class="block text-sm font-medium text-gray-400 mb-3 border-b border-[#333] pb-1">数据源设置</label>-- <!-- 批量操作按钮 -->- <div class="flex space-x-2 mb-3">- <button onclick="selectAllAPIs(true)" class="px-2 py-1 bg-[#333] hover:bg-[#444] text-white text-xs rounded">全选</button>- <button onclick="selectAllAPIs(false)" class="px-2 py-1 bg-[#333] hover:bg-[#444] text-white text-xs rounded">全不选</button>- <button onclick="selectAllAPIs(true, true)" class="px-2 py-1 bg-[#333] hover:bg-[#444] text-white text-xs rounded">全选普通资源</button>- </div>-- <!-- API选择区域 - 使用滚动区域 -->- <div class="max-h-40 overflow-y-auto bg-[#191919] p-2 rounded-lg mb-3">- <div id="apiCheckboxes">- <!-- 这里将动态插入API复选框 -->- </div>- </div>-- <!-- API信息显示 -->- <div class="text-xs text-gray-500 flex justify-between items-center">- <span>已选API数量:<span id="selectedApiCount" class="text-white">0</span></span>- <span id="siteStatus" class="ml-2"></span>- </div>- </div>-- <!-- 自定义API管理区域 -->- <div class="p-3 bg-[#151515] rounded-lg shadow-inner">- <div class="flex justify-between items-center mb-2">- <label class="block text-sm font-medium text-gray-400 border-b border-[#333] w-full pb-1">自定义API</label>- <button onclick="showAddCustomApiForm()" class="bg-[#333] hover:bg-[#444] text-white w-6 h-6 rounded-full text-center leading-none text-lg ml-1">+</button>- </div>- <div id="customApisList" class="max-h-32 overflow-y-auto mb-2">- <!-- 自定义API将显示在这里 -->- </div>-- <!-- 添加自定义API表单 (默认隐藏) -->- <div id="addCustomApiForm" class="hidden mt-2 p-2 bg-[#191919] rounded-lg">- <input type="text" id="customApiName" placeholder="API名称" class="w-full bg-[#222] border border-[#333] text-white px-2 py-1 rounded mb-2" autocomplete="off">- <input type="text" id="customApiUrl" placeholder="https://abc.com" class="w-full bg-[#222] border border-[#333] text-white px-2 py-1 rounded mb-2" autocomplete="off">- <!-- 新增 detail 地址输入框 -->- <input type="text" id="customApiDetail" placeholder="detail地址(可选)" class="w-full bg-[#222] border border-[#333] text-white px-2 py-1 rounded mb-2" autocomplete="off">- <!-- 添加成人内容切换 -->- <div class="flex items-center mb-2">- <input type="checkbox" id="customApiIsAdult" class="form-checkbox h-4 w-4 text-pink-500 bg-[#222] border border-[#333]">- <label for="customApiIsAdult" class="ml-2 text-xs text-pink-400">黄色资源站</label>- </div>- <div class="flex space-x-2">- <button onclick="addCustomApi()" class="bg-blue-600 hover:bg-blue-700 text-white px-3 py-1 rounded text-xs">添加</button>- <button onclick="cancelAddCustomApi()" class="bg-[#444] hover:bg-[#555] text-white px-3 py-1 rounded text-xs">取消</button>- </div>- </div>- </div>-- <!-- 图片加载方式设置区域 -->- <div class="p-3 bg-[#151515] rounded-lg shadow-inner">- <label class="block text-sm font-medium text-gray-400 mb-2 border-b border-[#333] pb-1">图片加载方式</label>- <select id="imageProxyMode" class="w-full bg-[#222] border border-[#333] text-white px-2 py-1 rounded mb-2">- <option value="direct">直连(默认,速度最快)</option>- <option value="builtin">内置代理 /proxy/(需后端+密码)</option>- <option value="cors">公共 CORS 代理(ciao-cors)</option>- <option value="custom">自定义代理</option>- </select>- <input type="text" id="customImageProxy" placeholder="自定义代理地址,如 https://proxy.com/?url= 或含 {url} 占位符" class="w-full bg-[#222] border border-[#333] text-white px-2 py-1 rounded mb-1 text-xs">- <p class="text-xs text-gray-500 leading-relaxed">自定义代理:直接拼接编码后的图片地址;或写 <span class="text-gray-300">{url}</span> 占位符由系统替换。切换后即时刷新。</p>- </div>-- <!-- 内容过滤设置区域 -->- <div class="p-3 bg-[#151515] rounded-lg shadow-inner">- <label class="block text-sm font-medium text-gray-400 mb-3 border-b border-[#333] pb-1">功能开关</label>-- <!-- 黄色内容过滤开关 -->- <div class="flex flex-col mb-3 pb-3 border-b border-[#222] relative">- <div class="flex items-center justify-between">- <div>- <label class="text-sm font-medium text-gray-400">黄色内容过滤</label>- <p class="text-xs text-gray-500 mt-1 filter-description">过滤"伦理片"等黄色内容</p>- </div>- <div class="relative inline-block w-12 align-middle select-none">- <input type="checkbox" id="yellowFilterToggle" class="opacity-0 absolute w-full h-full cursor-pointer z-10">- <div class="toggle-bg bg-[#333] w-12 h-6 rounded-full transition-colors duration-300 ease-in-out"></div>- <div class="toggle-dot absolute w-5 h-5 bg-white rounded-full top-0.5 left-0.5 transition-transform duration-300 ease-in-out"></div>- </div>- </div>- <!-- 警告提示将在这里动态插入 -->- </div>-- <!-- 广告过滤开关 -->- <div class="flex items-center justify-between mb-3 pb-3 border-b border-[#222]">- <div>- <label class="text-sm font-medium text-gray-400">分片广告过滤</label>- <p class="text-xs text-gray-500 mt-1">关闭可减少旧版浏览器卡顿</p>- </div>- <div class="relative inline-block w-12 align-middle select-none">- <input type="checkbox" id="adFilterToggle" class="opacity-0 absolute w-full h-full cursor-pointer z-10">- <div class="toggle-bg bg-[#333] w-12 h-6 rounded-full transition-colors duration-300 ease-in-out"></div>- <div class="toggle-dot absolute w-5 h-5 bg-white rounded-full top-0.5 left-0.5 transition-transform duration-300 ease-in-out"></div>- </div>- </div>-- <!-- 豆瓣热门开关 -->- <div class="flex items-center justify-between">- <div>- <label class="text-sm font-medium text-gray-400">豆瓣热门推荐</label>- <p class="text-xs text-gray-500 mt-1">首页显示豆瓣热门影视内容</p>- </div>- <div class="relative inline-block w-12 align-middle select-none">- <input type="checkbox" id="doubanToggle" class="opacity-0 absolute w-full h-full cursor-pointer z-10">- <div class="toggle-bg bg-[#333] w-12 h-6 rounded-full transition-colors duration-300 ease-in-out"></div>- <div class="toggle-dot absolute w-5 h-5 bg-white rounded-full top-0.5 left-0.5 transition-transform duration-300 ease-in-out"></div>- </div>- </div>- </div>-- <!-- 一般功能区域 -->- <div class="p-3 bg-[#151515] rounded-lg shadow-inner">- <label class="block text-sm font-medium text-gray-400 mb-3 border-b border-[#333] pb-1">一般功能</label>- <button onclick="importConfig()" class="px-4 py-2 w-full bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 hover:from-indigo-600 hover:via-purple-600 hover:to-pink-600 text-white rounded-lg text-sm transition-all duration-300 shadow-md hover:shadow-lg mb-2">导入配置</button>- <button onclick="exportConfig()" class="px-4 py-2 mb-2 w-full bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 hover:from-indigo-600 hover:via-purple-600 hover:to-pink-600 text-white rounded-lg text-sm transition-all duration-300 shadow-md hover:shadow-lg">导出配置</button>- <button onclick="clearLocalStorage()" class="px-4 py-2 w-full bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 hover:from-indigo-600 hover:via-purple-600 hover:to-pink-600 text-white rounded-lg text-sm transition-all duration-300 shadow-md hover:shadow-lg">清除Cookie</button>- </div>- </div>- </div>-- <div class="container mx-auto px-4 py-8 flex flex-col h-screen">- <div class="flex-1 flex flex-col">- <!-- 网站标志和口号 -->- <header class="text-center mb-2">- <div class="flex justify-center items-center mb-4">- <a href="#" onclick="resetToHome(); return false;" class="flex items-center">- <svg class="w-10 h-10 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"></path>- </svg>- <h1 class="text-5xl font-bold gradient-text">LibreTV</h1>- </a>- </div>- <p class="text-gray-400 mb-8">自由观影,畅享精彩</p>- </header>--- <div id="searchArea" class="flex-1 flex flex-col items-center justify-center">- <div class="w-full max-w-2xl">- <div class="flex items-stretch mb-3 h-14 shadow-lg rounded-lg overflow-hidden">- <!-- 首页按钮 -->- <button onclick="resetToHome()"- class="w-20 sm:w-24 flex items-center justify-center bg-white text-black font-medium hover:bg-gray-200 transition-colors"- aria-label="返回首页" title="返回首页">- 首页- </button>- <!-- 搜索输入 -->- <input type="text"- id="searchInput"- class="flex-1 bg-[#111] border-y border-[#333] text-white px-6 py-0 focus:outline-none transition-colors min-w-0"- placeholder="搜索你喜欢的视频..."- autocomplete="off"- aria-label="视频搜索框"- oninput="toggleClearButton()">- <!-- 清空按钮 -->- <button id="clearSearchInput"- class="flex pr-2 bg-[#111] border-y border-[#333] items-center justify-center text-gray-400 hover:text-white hidden"- onclick="clearSearchInput()"- aria-label="清空搜索框"- title="清空搜索框">- <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>- </svg>- </button>- <!-- 搜索按钮 -->- <button onclick="search()"- class="w-20 sm:w-24 flex items-center justify-center bg-white text-black font-medium hover:bg-gray-200 transition-colors"- aria-label="搜索按钮">- 搜索- </button>- </div>-- <!-- 添加最近搜索记录部分 -->- <div id="recentSearches" class="mt-4 flex flex-wrap gap-2" aria-label="最近搜索记录">- <!-- 这里会动态插入最近的搜索记录 -->- </div>- </div>- </div>-- <!-- 豆瓣热门推荐区域: 默认隐藏,现在位于搜索区域下方,调整宽度 -->- <div id="doubanArea" class="w-full my-8 hidden">- <div class="mx-auto max-w-screen-xl px-2">- <!-- 改进标题和标签区域布局 -->- <div class="mb-4">- <!-- 标题和刷新按钮一行 -->- <div class="flex items-center justify-between mb-4">- <div class="flex items-center">- <h2 class="text-xl font-bold text-white mr-4">豆瓣热门</h2>- <!-- 添加电影/电视剧切换开关 -->- <div class="flex items-center bg-[#222] rounded-full p-1">- <button id="douban-movie-toggle" class="px-3 py-1 text-sm rounded-full bg-pink-600 text-white">电影</button>- <button id="douban-tv-toggle" class="px-3 py-1 text-sm rounded-full text-gray-300 hover:text-white">电视剧</button>- </div>- </div>- <button id="douban-refresh" class="text-sm px-3 py-1 bg-pink-600 hover:bg-pink-700 text-white rounded-lg flex items-center gap-1">- <span>换一批</span>- <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" />- </svg>- </button>- </div>- <!-- 分类标签独立成行,添加滚动支持以适应移动设备 -->- <div class="overflow-x-auto pb-2">- <div id="douban-tags" class="flex space-x-2 min-w-max"></div>- </div>- </div>-- <!-- 推荐内容 -->- <div id="douban-results" class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 xl:grid-cols-8 gap-3"></div>- </div>- </div>-- <!-- 搜索结果:初始隐藏 -->- <div id="resultsArea" class="w-full hidden">- <div class="mx-auto max-w-7xl px-2"> <!-- 添加最大宽度限制并居中 -->- <div class="flex justify-end items-center mb-4">- <div class="text-sm text-gray-400">- <span id="searchResultsCount">0</span> 个结果- </div>- </div>- <!-- 修改网格布局以适应大一些的横向卡片 -->- <div id="results" class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4">- <!-- 结果将在这里动态生成 -->- </div>- </div>- </div>- </div>- </div>-- <!-- 页脚区域 -->- <footer class="footer mt-8 py-6 border-t border-[#333] bg-[#0a0a0a]">- <div class="container mx-auto px-4">- <div class="flex flex-col md:flex-row justify-between items-center">- <div class="mb-4 md:mb-0">- <div class="flex items-center justify-center md:justify-start">- <svg class="w-6 h-6 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"></path>- </svg>- <span class="gradient-text font-bold">LibreTV</span>- </div>- <p class="text-gray-500 text-sm mt-2 text-center md:text-left">© 2025 LibreTV - 自由观影,畅享精彩</p>- </div>-- <div class="text-center md:text-right">- <p class="text-gray-500 text-sm max-w-md">- 免责声明:本站仅为视频搜索工具,不存储、上传或分发任何视频内容。- 所有视频均来自第三方API接口。如有侵权,请联系相关内容提供方。- </p>- <div class="mt-2 flex justify-center md:justify-end space-x-4">- <a href="about.html" class="text-gray-400 hover:text-white text-sm transition-colors">关于我们</a>- <a href="about.html" class="text-gray-400 hover:text-white text-sm transition-colors">隐私政策</a>- <a href="https://www.msf.hk/zh-hant/donate/general?type=one-off" target="_blank" rel="noopener" class="text-blue-400 hover:text-blue-300 text-sm transition-colors">捐赠</a>- </div>- </div>- </div>- </div>- </footer>-- <!-- 详情模态框 -->- <div id="modal" class="fixed inset-0 bg-black/95 hidden flex items-center justify-center transition-opacity duration-300 z-40">- <div class="bg-[#111] p-8 rounded-lg w-11/12 max-w-4xl border border-[#333] max-h-[90vh] flex flex-col">- <div class="flex justify-between items-center mb-6 flex-none">- <h2 id="modalTitle" class="text-2xl font-bold gradient-text break-words pr-4 max-w-[80%]"></h2>- <button onclick="closeModal()" class="text-gray-400 hover:text-white text-2xl transition-colors flex-shrink-0">×</button>- </div>- <div id="modalContent" class="overflow-auto flex-1 min-h-0">- <div class="grid grid-cols-2 sm:grid-cols-4 md:grid-cols-6 lg:grid-cols-8 gap-2">- </div>- </div>- </div>- </div>-- <!-- 密码验证弹窗 -->- <div id="passwordModal" class="fixed inset-0 bg-black/95 hidden items-center justify-center z-[65] transition-opacity duration-300">- <div class="bg-[#111] p-8 rounded-lg w-11/12 max-w-md border border-[#333] max-h-[90vh] flex flex-col">- <div class="flex justify-between items-center mb-6 flex-none">- <h2 class="text-2xl font-bold gradient-text">访问验证</h2>- </div>- <div class="mb-6">- <p class="text-gray-300 mb-4">请输入密码继续访问</p>- <form id="passwordForm" onsubmit="handlePasswordSubmit(); return false;">- <input type="text" name="username" id="username" autocomplete="username" style="display:none" tabindex="-1" aria-hidden="true">- <input type="password" id="passwordInput" class="w-full bg-[#111] border border-[#333] text-white px-4 py-3 rounded-lg focus:outline-none focus:border-white transition-colors" placeholder="密码..." autocomplete="new-password">- <div class="mt-4 w-full flex space-x-4">- <button id="passwordSubmitBtn" type="submit" class="flex-1 bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded">提交</button>- <button id="passwordCancelBtn" type="button" onclick="hidePasswordModal()" class="flex-1 bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded">取消</button>- </div>- </form>- <p id="passwordError" class="text-red-500 mt-2 hidden">密码错误,请重试</p>- </div>- </div>- </div>-- <!-- 版权声明弹窗 -->- <div id="disclaimerModal" class="fixed inset-0 bg-black/90 hidden items-center justify-center z-[60]">- <div class="bg-[#111] p-8 rounded-lg border border-[#333] w-11/12 max-w-2xl max-h-[90vh] overflow-y-auto">- <h2 class="text-2xl font-bold gradient-text mb-6 text-center">使用声明</h2>- <div class="text-gray-300 space-y-4">- <p>- 欢迎使用 LibreTV。在开始使用前,请您了解并同意以下条款:- </p>- <p>- <strong class="text-blue-400">服务性质:</strong> LibreTV 仅提供视频搜索服务,不直接提供、存储或上传任何视频内容。所有搜索结果均来自第三方公开接口。- </p>- <p>- <strong class="text-blue-400">用户责任:</strong> 用户在使用本站服务时,须遵守相关法律法规,不得利用搜索结果从事侵权行为,如下载、传播未经授权的作品等。- </p>- <p>- <strong class="text-blue-400">广告风险提示:</strong> 本站所有视频均来自第三方采集站,视频中出现的广告与本站无关,请勿相信或点击视频中的任何广告内容,谨防上当受骗。- </p>- </div>- <div class="mt-6 flex justify-center">- <button id="acceptDisclaimerBtn" class="px-6 py-3 bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 text-white font-semibold rounded-lg hover:shadow-lg transition-all duration-300">- 我已了解并接受- </button>- </div>- </div>- </div>-- <!-- 错误提示框 -->- <div id="toast" class="fixed top-4 left-1/2 -translate-x-1/2 bg-red-500 text-white px-6 py-3 rounded-lg shadow-lg transform transition-all duration-300 opacity-0 -translate-y-full z-50">- <p id="toastMessage"></p>- </div>-- <!-- 添加 loading 提示框 -->- <div id="loading" class="fixed inset-0 bg-black/80 hidden items-center justify-center z-50">- <div class="bg-[#111] p-8 rounded-lg border border-[#333] flex items-center space-x-4">- <div class="w-8 h-8 border-4 border-white border-t-transparent rounded-full animate-spin"></div>- <p class="text-white text-lg">加载中...</p>- </div>- </div>-- <!-- JSON-LD 结构化数据 -->- <script type="application/ld+json">- {- "@context": "https://schema.org",- "@type": "WebSite",- "name": "LibreTV",- "url": "https://libretv.is-an.org/",- "description": "免费在线视频搜索与观看平台",- "potentialAction": {- "@type": "SearchAction",- "target": "https://libretv.is-an.org/?s={search_term_string}",- "query-input": "required name=search_term_string"- }- }- </script>-- <!-- 引入纯 JS sha256(HTTP 下依然可用) -->- <script src="libs/sha256.min.js"></script>- <script>- // 保存原始 js‑sha256 实现,避免被 password.js 覆盖- window._jsSha256 = window.sha256;- </script>- <script src="js/config.js"></script>- <script src="js/proxy-auth.js"></script>- <script src="js/customer_site.js"></script>- <script src="js/ui.js"></script>- <script src="js/api.js"></script>- <script src="js/douban.js"></script>- <script src="js/password.js"></script>- <script src="js/search.js"></script>- <script src="js/app.js"></script>-- <!-- PWA 注册 -->- <script src="js/pwa-register.js"></script>-- <!-- 环境变量注入脚本 -->- <script>- // 创建全局环境变量对象- window.__ENV__ = window.__ENV__ || {};-- // 注入服务器端环境变量 (将由服务器端替换)- // PASSWORD 变量将在这里被服务器端注入- window.__ENV__.PASSWORD = "{{PASSWORD}}";- window.__ENV__.PROXY_TOKEN_MODE = "{{PROXY_TOKEN_MODE}}";- </script>-- <!-- 版本检测脚本 -->- <script src="js/version-check.js"></script>-- <!-- 添加弹窗和URL搜索参数处理脚本 -->- <script src="js/index-page.js"></script>-</body>-</html>diff --git a/js/api.js b/js/api.jsdeleted file mode 100644index 33ac5c7..0000000--- a/js/api.js+++ /dev/null@@ -1,643 +0,0 @@-// 通过代理请求目标 URL:优先使用内置 /proxy/(带鉴权),失败则回退公共 CORS 代理-async function fetchViaProxy(targetUrl, options = {}) {- const urls = [];-- // 1) 首选内置代理(带鉴权参数)- let builtin = PROXY_URL + encodeURIComponent(targetUrl);- if (window.ProxyAuth && typeof window.ProxyAuth.addAuthToProxyUrl === 'function') {- builtin = await window.ProxyAuth.addAuthToProxyUrl(builtin);- }- urls.push(builtin);-- // 2) 兜底公共 CORS 代理(无需鉴权)- if (window.FALLBACK_CORS_PROXY) {- urls.push(window.FALLBACK_CORS_PROXY + encodeURIComponent(targetUrl));- }-- let lastError;- for (const url of urls) {- try {- const response = await fetch(url, options);- if (response.ok) {- return response;- }- lastError = new Error(`代理请求失败: ${response.status}`);- } catch (e) {- lastError = e;- }- }- throw lastError || new Error('所有代理均不可用');-}--// 改进的API请求处理函数-async function handleApiRequest(url) {- const customApi = url.searchParams.get('customApi') || '';- const customDetail = url.searchParams.get('customDetail') || '';- const source = url.searchParams.get('source') || 'heimuer';-- try {- if (url.pathname === '/api/search') {- const searchQuery = url.searchParams.get('wd');- if (!searchQuery) {- throw new Error('缺少搜索参数');- }-- // 验证API和source的有效性- if (source === 'custom' && !customApi) {- throw new Error('使用自定义API时必须提供API地址');- }-- if (!API_SITES[source] && source !== 'custom') {- throw new Error('无效的API来源');- }-- const apiUrl = customApi- ? `${customApi}${API_CONFIG.search.path}${encodeURIComponent(searchQuery)}`- : `${API_SITES[source].api}${API_CONFIG.search.path}${encodeURIComponent(searchQuery)}`;-- // 添加超时处理- const controller = new AbortController();- const timeoutId = setTimeout(() => controller.abort(), 10000);-- try {- // 添加鉴权参数到代理URL(内置代理失败时回退公共 CORS 代理)- const response = await fetchViaProxy(apiUrl, {- headers: API_CONFIG.search.headers,- signal: controller.signal- });-- clearTimeout(timeoutId);-- if (!response.ok) {- throw new Error(`API请求失败: ${response.status}`);- }-- const data = await response.json();-- // 检查JSON格式的有效性- if (!data || !Array.isArray(data.list)) {- throw new Error('API返回的数据格式无效');- }-- // 添加源信息到每个结果- data.list.forEach(item => {- item.source_name = source === 'custom' ? '自定义源' : API_SITES[source].name;- item.source_code = source;- // 对于自定义源,添加API URL信息- if (source === 'custom') {- item.api_url = customApi;- }- });-- return JSON.stringify({- code: 200,- list: data.list || [],- });- } catch (fetchError) {- clearTimeout(timeoutId);- throw fetchError;- }- }-- // 详情处理- if (url.pathname === '/api/detail') {- const id = url.searchParams.get('id');- const sourceCode = url.searchParams.get('source') || 'heimuer'; // 获取源代码-- if (!id) {- throw new Error('缺少视频ID参数');- }-- // 验证ID格式 - 只允许数字和有限的特殊字符- if (!/^[\w-]+$/.test(id)) {- throw new Error('无效的视频ID格式');- }-- // 验证API和source的有效性- if (sourceCode === 'custom' && !customApi) {- throw new Error('使用自定义API时必须提供API地址');- }-- if (!API_SITES[sourceCode] && sourceCode !== 'custom') {- throw new Error('无效的API来源');- }-- // 对于有detail参数的源,都使用特殊处理方式- if (sourceCode !== 'custom' && API_SITES[sourceCode].detail) {- return await handleSpecialSourceDetail(id, sourceCode);- }-- // 如果是自定义API,并且传递了detail参数,尝试特殊处理- // 优先 customDetail- if (sourceCode === 'custom' && customDetail) {- return await handleCustomApiSpecialDetail(id, customDetail);- }- if (sourceCode === 'custom' && url.searchParams.get('useDetail') === 'true') {- return await handleCustomApiSpecialDetail(id, customApi);- }-- const detailUrl = customApi- ? `${customApi}${API_CONFIG.detail.path}${id}`- : `${API_SITES[sourceCode].api}${API_CONFIG.detail.path}${id}`;-- // 添加超时处理- const controller = new AbortController();- const timeoutId = setTimeout(() => controller.abort(), 10000);-- try {- // 添加鉴权参数到代理URL(内置代理失败时回退公共 CORS 代理)- const response = await fetchViaProxy(detailUrl, {- headers: API_CONFIG.detail.headers,- signal: controller.signal- });-- clearTimeout(timeoutId);-- if (!response.ok) {- throw new Error(`详情请求失败: ${response.status}`);- }-- // 解析JSON- const data = await response.json();-- // 检查返回的数据是否有效- if (!data || !data.list || !Array.isArray(data.list) || data.list.length === 0) {- throw new Error('获取到的详情内容无效');- }-- // 获取第一个匹配的视频详情- const videoDetail = data.list[0];-- // 提取播放地址- let episodes = [];-- if (videoDetail.vod_play_url) {- // 分割不同播放源- const playSources = videoDetail.vod_play_url.split('$$$');-- // 提取第一个播放源的集数(通常为主要源)- if (playSources.length > 0) {- const mainSource = playSources[0];- const episodeList = mainSource.split('#');-- // 从每个集数中提取URL- episodes = episodeList.map(ep => {- const parts = ep.split('$');- // 返回URL部分(通常是第二部分,如果有的话)- return parts.length > 1 ? parts[1] : '';- }).filter(url => url && (url.startsWith('http://') || url.startsWith('https://')));- }- }-- // 如果没有找到播放地址,尝试使用正则表达式查找m3u8链接- if (episodes.length === 0 && videoDetail.vod_content) {- const matches = videoDetail.vod_content.match(M3U8_PATTERN) || [];- episodes = matches.map(link => link.replace(/^\$/, ''));- }-- return JSON.stringify({- code: 200,- episodes: episodes,- detailUrl: detailUrl,- videoInfo: {- title: videoDetail.vod_name,- cover: videoDetail.vod_pic,- desc: videoDetail.vod_content,- type: videoDetail.type_name,- year: videoDetail.vod_year,- area: videoDetail.vod_area,- director: videoDetail.vod_director,- actor: videoDetail.vod_actor,- remarks: videoDetail.vod_remarks,- // 添加源信息- source_name: sourceCode === 'custom' ? '自定义源' : API_SITES[sourceCode].name,- source_code: sourceCode- }- });- } catch (fetchError) {- clearTimeout(timeoutId);- throw fetchError;- }- }-- throw new Error('未知的API路径');- } catch (error) {- console.error('API处理错误:', error);- return JSON.stringify({- code: 400,- msg: error.message || '请求处理失败',- list: [],- episodes: [],- });- }-}--// 处理自定义API的特殊详情页-async function handleCustomApiSpecialDetail(id, customApi) {- try {- // 构建详情页URL- const detailUrl = `${customApi}/index.php/vod/detail/id/${id}.html`;-- // 添加超时处理- const controller = new AbortController();- const timeoutId = setTimeout(() => controller.abort(), 10000);-- // 添加鉴权参数到代理URL(内置代理失败时回退公共 CORS 代理)- // 获取详情页HTML- const response = await fetchViaProxy(detailUrl, {- headers: {- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36',- },- signal: controller.signal- });-- clearTimeout(timeoutId);-- if (!response.ok) {- throw new Error(`自定义API详情页请求失败: ${response.status}`);- }-- // 获取HTML内容- const html = await response.text();-- // 使用通用模式提取m3u8链接- const generalPattern = /\$(https?:\/\/[^"'\s]+?\.m3u8)/g;- let matches = html.match(generalPattern) || [];-- // 处理链接- matches = matches.map(link => {- link = link.substring(1, link.length);- const parenIndex = link.indexOf('(');- return parenIndex > 0 ? link.substring(0, parenIndex) : link;- });-- // 提取基本信息- const titleMatch = html.match(/<h1[^>]*>([^<]+)<\/h1>/);- const titleText = titleMatch ? titleMatch[1].trim() : '';-- const descMatch = html.match(/<div[^>]*class=["']sketch["'][^>]*>([\s\S]*?)<\/div>/);- const descText = descMatch ? descMatch[1].replace(/<[^>]+>/g, ' ').trim() : '';-- return JSON.stringify({- code: 200,- episodes: matches,- detailUrl: detailUrl,- videoInfo: {- title: titleText,- desc: descText,- source_name: '自定义源',- source_code: 'custom'- }- });- } catch (error) {- console.error(`自定义API详情获取失败:`, error);- throw error;- }-}--// 通用特殊源详情处理函数-async function handleSpecialSourceDetail(id, sourceCode) {- try {- // 构建详情页URL(使用配置中的detail URL而不是api URL)- const detailUrl = `${API_SITES[sourceCode].detail}/index.php/vod/detail/id/${id}.html`;-- // 添加超时处理- const controller = new AbortController();- const timeoutId = setTimeout(() => controller.abort(), 10000);-- // 添加鉴权参数到代理URL(内置代理失败时回退公共 CORS 代理)- // 获取详情页HTML- const response = await fetchViaProxy(detailUrl, {- headers: {- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36',- },- signal: controller.signal- });-- clearTimeout(timeoutId);-- if (!response.ok) {- throw new Error(`详情页请求失败: ${response.status}`);- }-- // 获取HTML内容- const html = await response.text();-- // 根据不同源类型使用不同的正则表达式- let matches = [];-- if (sourceCode === 'ffzy') {- // 非凡影视使用特定的正则表达式- const ffzyPattern = /\$(https?:\/\/[^"'\s]+?\/\d{8}\/\d+_[a-f0-9]+\/index\.m3u8)/g;- matches = html.match(ffzyPattern) || [];- }-- // 如果没有找到链接或者是其他源类型,尝试一个更通用的模式- if (matches.length === 0) {- const generalPattern = /\$(https?:\/\/[^"'\s]+?\.m3u8)/g;- matches = html.match(generalPattern) || [];- }- // 去重处理,避免一个播放源多集显示- matches = [...new Set(matches)];- // 处理链接- matches = matches.map(link => {- link = link.substring(1, link.length);- const parenIndex = link.indexOf('(');- return parenIndex > 0 ? link.substring(0, parenIndex) : link;- });-- // 提取可能存在的标题、简介等基本信息- const titleMatch = html.match(/<h1[^>]*>([^<]+)<\/h1>/);- const titleText = titleMatch ? titleMatch[1].trim() : '';-- const descMatch = html.match(/<div[^>]*class=["']sketch["'][^>]*>([\s\S]*?)<\/div>/);- const descText = descMatch ? descMatch[1].replace(/<[^>]+>/g, ' ').trim() : '';-- return JSON.stringify({- code: 200,- episodes: matches,- detailUrl: detailUrl,- videoInfo: {- title: titleText,- desc: descText,- source_name: API_SITES[sourceCode].name,- source_code: sourceCode- }- });- } catch (error) {- console.error(`${API_SITES[sourceCode].name}详情获取失败:`, error);- throw error;- }-}--// 处理聚合搜索-async function handleAggregatedSearch(searchQuery) {- // 获取可用的API源列表(排除aggregated和custom)- const availableSources = Object.keys(API_SITES).filter(key =>- key !== 'aggregated' && key !== 'custom'- );-- if (availableSources.length === 0) {- throw new Error('没有可用的API源');- }-- // 创建所有API源的搜索请求- const searchPromises = availableSources.map(async (source) => {- try {- const apiUrl = `${API_SITES[source].api}${API_CONFIG.search.path}${encodeURIComponent(searchQuery)}`;-- // 使用Promise.race添加超时处理- const timeoutPromise = new Promise((_, reject) =>- setTimeout(() => reject(new Error(`${source}源搜索超时`)), 8000)- );-- // 添加鉴权参数到代理URL(内置代理失败时回退公共 CORS 代理)- const fetchPromise = fetchViaProxy(apiUrl, {- headers: API_CONFIG.search.headers- });-- const response = await Promise.race([fetchPromise, timeoutPromise]);-- if (!response.ok) {- throw new Error(`${source}源请求失败: ${response.status}`);- }-- const data = await response.json();-- if (!data || !Array.isArray(data.list)) {- throw new Error(`${source}源返回的数据格式无效`);- }-- // 为搜索结果添加源信息- const results = data.list.map(item => ({- ...item,- source_name: API_SITES[source].name,- source_code: source- }));-- return results;- } catch (error) {- console.warn(`${source}源搜索失败:`, error);- return []; // 返回空数组表示该源搜索失败- }- });-- try {- // 并行执行所有搜索请求- const resultsArray = await Promise.all(searchPromises);-- // 合并所有结果- let allResults = [];- resultsArray.forEach(results => {- if (Array.isArray(results) && results.length > 0) {- allResults = allResults.concat(results);- }- });-- // 如果没有搜索结果,返回空结果- if (allResults.length === 0) {- return JSON.stringify({- code: 200,- list: [],- msg: '所有源均无搜索结果'- });- }-- // 去重(根据vod_id和source_code组合)- const uniqueResults = [];- const seen = new Set();-- allResults.forEach(item => {- const key = `${item.source_code}_${item.vod_id}`;- if (!seen.has(key)) {- seen.add(key);- uniqueResults.push(item);- }- });-- // 按照视频名称和来源排序- uniqueResults.sort((a, b) => {- // 首先按照视频名称排序- const nameCompare = (a.vod_name || '').localeCompare(b.vod_name || '');- if (nameCompare !== 0) return nameCompare;-- // 如果名称相同,则按照来源排序- return (a.source_name || '').localeCompare(b.source_name || '');- });-- return JSON.stringify({- code: 200,- list: uniqueResults,- });- } catch (error) {- console.error('聚合搜索处理错误:', error);- return JSON.stringify({- code: 400,- msg: '聚合搜索处理失败: ' + error.message,- list: []- });- }-}--// 处理多个自定义API源的聚合搜索-async function handleMultipleCustomSearch(searchQuery, customApiUrls) {- // 解析自定义API列表- const apiUrls = customApiUrls.split(CUSTOM_API_CONFIG.separator)- .map(url => url.trim())- .filter(url => url.length > 0 && /^https?:\/\//.test(url))- .slice(0, CUSTOM_API_CONFIG.maxSources);-- if (apiUrls.length === 0) {- throw new Error('没有提供有效的自定义API地址');- }-- // 为每个API创建搜索请求- const searchPromises = apiUrls.map(async (apiUrl, index) => {- try {- const fullUrl = `${apiUrl}${API_CONFIG.search.path}${encodeURIComponent(searchQuery)}`;-- // 使用Promise.race添加超时处理- const timeoutPromise = new Promise((_, reject) =>- setTimeout(() => reject(new Error(`自定义API ${index+1} 搜索超时`)), 8000)- );-- // 添加鉴权参数到代理URL(内置代理失败时回退公共 CORS 代理)- const fetchPromise = fetchViaProxy(fullUrl, {- headers: API_CONFIG.search.headers- });-- const response = await Promise.race([fetchPromise, timeoutPromise]);-- if (!response.ok) {- throw new Error(`自定义API ${index+1} 请求失败: ${response.status}`);- }-- const data = await response.json();-- if (!data || !Array.isArray(data.list)) {- throw new Error(`自定义API ${index+1} 返回的数据格式无效`);- }-- // 为搜索结果添加源信息- const results = data.list.map(item => ({- ...item,- source_name: `${CUSTOM_API_CONFIG.namePrefix}${index+1}`,- source_code: 'custom',- api_url: apiUrl // 保存API URL以便详情获取- }));-- return results;- } catch (error) {- console.warn(`自定义API ${index+1} 搜索失败:`, error);- return []; // 返回空数组表示该源搜索失败- }- });-- try {- // 并行执行所有搜索请求- const resultsArray = await Promise.all(searchPromises);-- // 合并所有结果- let allResults = [];- resultsArray.forEach(results => {- if (Array.isArray(results) && results.length > 0) {- allResults = allResults.concat(results);- }- });-- // 如果没有搜索结果,返回空结果- if (allResults.length === 0) {- return JSON.stringify({- code: 200,- list: [],- msg: '所有自定义API源均无搜索结果'- });- }-- // 去重(根据vod_id和api_url组合)- const uniqueResults = [];- const seen = new Set();-- allResults.forEach(item => {- const key = `${item.api_url || ''}_${item.vod_id}`;- if (!seen.has(key)) {- seen.add(key);- uniqueResults.push(item);- }- });-- return JSON.stringify({- code: 200,- list: uniqueResults,- });- } catch (error) {- console.error('自定义API聚合搜索处理错误:', error);- return JSON.stringify({- code: 400,- msg: '自定义API聚合搜索处理失败: ' + error.message,- list: []- });- }-}--// 拦截API请求-(function() {- const originalFetch = window.fetch;-- window.fetch = async function(input, init) {- const requestUrl = typeof input === 'string' ? new URL(input, window.location.origin) : input.url;-- if (requestUrl.pathname.startsWith('/api/')) {- if (window.isPasswordProtected && window.isPasswordVerified) {- if (window.isPasswordProtected() && !window.isPasswordVerified()) {- return;- }- }- try {- const data = await handleApiRequest(requestUrl);- return new Response(data, {- headers: {- 'Content-Type': 'application/json',- 'Access-Control-Allow-Origin': '*',- },- });- } catch (error) {- return new Response(JSON.stringify({- code: 500,- msg: '服务器内部错误',- }), {- status: 500,- headers: {- 'Content-Type': 'application/json',- },- });- }- }-- // 非API请求使用原始fetch- return originalFetch.apply(this, arguments);- };-})();--async function testSiteAvailability(apiUrl) {- try {- // 使用更简单的测试查询- const response = await fetch('/api/search?wd=test&customApi=' + encodeURIComponent(apiUrl), {- // 添加超时- signal: AbortSignal.timeout(5000)- });-- // 检查响应状态- if (!response.ok) {- return false;- }-- const data = await response.json();-- // 检查API响应的有效性- return data && data.code !== 400 && Array.isArray(data.list);- } catch (error) {- console.error('站点可用性测试失败:', error);- return false;- }-}diff --git a/js/app.js b/js/app.jsdeleted file mode 100644index fdcbfd8..0000000--- a/js/app.js+++ /dev/null@@ -1,1351 +0,0 @@-// 全局变量-let selectedAPIs = JSON.parse(localStorage.getItem('selectedAPIs') || '[]'); // 默认选中资源(空壳:默认不预选任何源,由用户添加)-let customAPIs = JSON.parse(localStorage.getItem('customAPIs') || '[]'); // 存储自定义API列表--// 添加当前播放的集数索引-let currentEpisodeIndex = 0;-// 添加当前视频的所有集数-let currentEpisodes = [];-// 添加当前视频的标题-let currentVideoTitle = '';-// 全局变量用于倒序状态-let episodesReversed = false;--// 页面初始化-document.addEventListener('DOMContentLoaded', function () {- // 初始化API复选框- initAPICheckboxes();-- // 初始化自定义API列表- renderCustomAPIsList();-- // 初始化显示选中的API数量- updateSelectedApiCount();-- // 渲染搜索历史- renderSearchHistory();-- // 设置默认选项(如果是第一次加载)- if (!localStorage.getItem('hasInitializedDefaults')) {- // 空壳设计:默认不预选任何数据源,首屏提示用户先添加自定义API- selectedAPIs = [];- localStorage.setItem('selectedAPIs', JSON.stringify(selectedAPIs));-- // 默认选中过滤开关- localStorage.setItem('yellowFilterEnabled', 'true');- localStorage.setItem(PLAYER_CONFIG.adFilteringStorage, 'true');-- // 默认启用豆瓣功能- localStorage.setItem('doubanEnabled', 'true');-- // 标记已初始化默认值- localStorage.setItem('hasInitializedDefaults', 'true');- }-- // 设置黄色内容过滤器开关初始状态- const yellowFilterToggle = document.getElementById('yellowFilterToggle');- if (yellowFilterToggle) {- yellowFilterToggle.checked = localStorage.getItem('yellowFilterEnabled') === 'true';- }-- // 设置广告过滤开关初始状态- const adFilterToggle = document.getElementById('adFilterToggle');- if (adFilterToggle) {- adFilterToggle.checked = localStorage.getItem(PLAYER_CONFIG.adFilteringStorage) !== 'false'; // 默认为true- }-- // 设置事件监听器- setupEventListeners();-- // 初始检查成人API选中状态- setTimeout(checkAdultAPIsSelected, 100);-- // 事件委托:详情卡片 / 剧集按钮改用 data-* 绑定,避免内联 onclick 拼接 URL 带来的 XSS 风险- document.addEventListener('click', function (e) {- const epEl = e.target.closest('[data-episode]');- if (epEl) {- e.preventDefault();- playVideo(epEl.dataset.episode, currentVideoTitle, epEl.dataset.source, parseInt(epEl.dataset.index, 10) || 0, epEl.dataset.vodid);- return;- }- const detEl = e.target.closest('[data-details-id]');- if (detEl) {- e.preventDefault();- showDetails(detEl.dataset.detailsId, detEl.dataset.detailsName, detEl.dataset.detailsSource);- return;- }- });-});--// 初始化API复选框-function initAPICheckboxes() {- const container = document.getElementById('apiCheckboxes');- container.innerHTML = '';-- // 添加普通API组标题- const normaldiv = document.createElement('div');- normaldiv.id = 'normaldiv';- normaldiv.className = 'grid grid-cols-2 gap-2';- const normalTitle = document.createElement('div');- normalTitle.className = 'api-group-title';- normalTitle.textContent = '普通资源';- normaldiv.appendChild(normalTitle);-- // 创建普通API源的复选框- Object.keys(API_SITES).forEach(apiKey => {- const api = API_SITES[apiKey];- if (api.adult) return; // 跳过成人内容API,稍后添加-- const checked = selectedAPIs.includes(apiKey);-- const checkbox = document.createElement('div');- checkbox.className = 'flex items-center';- checkbox.innerHTML = `- <input type="checkbox" id="api_${apiKey}"- class="form-checkbox h-3 w-3 text-blue-600 bg-[#222] border border-[#333]"- ${checked ? 'checked' : ''}- data-api="${apiKey}">- <label for="api_${apiKey}" class="ml-1 text-xs text-gray-400 truncate">${api.name}</label>- `;- normaldiv.appendChild(checkbox);-- // 添加事件监听器- checkbox.querySelector('input').addEventListener('change', function () {- updateSelectedAPIs();- checkAdultAPIsSelected();- });- });- container.appendChild(normaldiv);-- // 添加成人API列表- addAdultAPI();-- // 初始检查成人内容状态- checkAdultAPIsSelected();-}--// 添加成人API列表-function addAdultAPI() {- // 仅在隐藏设置为false、且存在成人API源时添加成人API组- const hasAdultSites = Object.values(API_SITES).some(api => api && api.adult);- if (!HIDE_BUILTIN_ADULT_APIS && (localStorage.getItem('yellowFilterEnabled') === 'false') && hasAdultSites) {- const container = document.getElementById('apiCheckboxes');-- // 添加成人API组标题- const adultdiv = document.createElement('div');- adultdiv.id = 'adultdiv';- adultdiv.className = 'grid grid-cols-2 gap-2';- const adultTitle = document.createElement('div');- adultTitle.className = 'api-group-title adult';- adultTitle.innerHTML = `黄色资源采集站 <span class="adult-warning">- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" />- </svg>- </span>`;- adultdiv.appendChild(adultTitle);-- // 创建成人API源的复选框- Object.keys(API_SITES).forEach(apiKey => {- const api = API_SITES[apiKey];- if (!api.adult) return; // 仅添加成人内容API-- const checked = selectedAPIs.includes(apiKey);-- const checkbox = document.createElement('div');- checkbox.className = 'flex items-center';- checkbox.innerHTML = `- <input type="checkbox" id="api_${apiKey}"- class="form-checkbox h-3 w-3 text-blue-600 bg-[#222] border border-[#333] api-adult"- ${checked ? 'checked' : ''}- data-api="${apiKey}">- <label for="api_${apiKey}" class="ml-1 text-xs text-pink-400 truncate">${api.name}</label>- `;- adultdiv.appendChild(checkbox);-- // 添加事件监听器- checkbox.querySelector('input').addEventListener('change', function () {- updateSelectedAPIs();- checkAdultAPIsSelected();- });- });- container.appendChild(adultdiv);- }-}--// 检查是否有成人API被选中-function checkAdultAPIsSelected() {- // 查找所有内置成人API复选框- const adultBuiltinCheckboxes = document.querySelectorAll('#apiCheckboxes .api-adult:checked');-- // 查找所有自定义成人API复选框- const customApiCheckboxes = document.querySelectorAll('#customApisList .api-adult:checked');-- const hasAdultSelected = adultBuiltinCheckboxes.length > 0 || customApiCheckboxes.length > 0;-- const yellowFilterToggle = document.getElementById('yellowFilterToggle');- const yellowFilterContainer = yellowFilterToggle.closest('div').parentNode;- const filterDescription = yellowFilterContainer.querySelector('p.filter-description');-- // 如果选择了成人API,禁用黄色内容过滤器- if (hasAdultSelected) {- yellowFilterToggle.checked = false;- yellowFilterToggle.disabled = true;- localStorage.setItem('yellowFilterEnabled', 'false');-- // 添加禁用样式- yellowFilterContainer.classList.add('filter-disabled');-- // 修改描述文字- if (filterDescription) {- filterDescription.innerHTML = '<strong class="text-pink-300">选中黄色资源站时无法启用此过滤</strong>';- }-- // 移除提示信息(如果存在)- const existingTooltip = yellowFilterContainer.querySelector('.filter-tooltip');- if (existingTooltip) {- existingTooltip.remove();- }- } else {- // 启用黄色内容过滤器- yellowFilterToggle.disabled = false;- yellowFilterContainer.classList.remove('filter-disabled');-- // 恢复原来的描述文字- if (filterDescription) {- filterDescription.innerHTML = '过滤"伦理片"等黄色内容';- }-- // 移除提示信息- const existingTooltip = yellowFilterContainer.querySelector('.filter-tooltip');- if (existingTooltip) {- existingTooltip.remove();- }- }-}--// 渲染自定义API列表-function renderCustomAPIsList() {- const container = document.getElementById('customApisList');- if (!container) return;-- if (customAPIs.length === 0) {- container.innerHTML = '<p class="text-xs text-gray-500 text-center my-2">未添加自定义API</p>';- return;- }-- container.innerHTML = '';- customAPIs.forEach((api, index) => {- const apiItem = document.createElement('div');- apiItem.className = 'flex items-center justify-between p-1 mb-1 bg-[#222] rounded';- const textColorClass = api.isAdult ? 'text-pink-400' : 'text-white';- const adultTag = api.isAdult ? '<span class="text-xs text-pink-400 mr-1">(18+)</span>' : '';- // 新增 detail 地址显示- const detailLine = api.detail ? `<div class="text-xs text-gray-400 truncate">detail: ${api.detail}</div>` : '';- apiItem.innerHTML = `- <div class="flex items-center flex-1 min-w-0">- <input type="checkbox" id="custom_api_${index}"- class="form-checkbox h-3 w-3 text-blue-600 mr-1 ${api.isAdult ? 'api-adult' : ''}"- ${selectedAPIs.includes('custom_' + index) ? 'checked' : ''}- data-custom-index="${index}">- <div class="flex-1 min-w-0">- <div class="text-xs font-medium ${textColorClass} truncate">- ${adultTag}${api.name}- </div>- <div class="text-xs text-gray-500 truncate">${api.url}</div>- ${detailLine}- </div>- </div>- <div class="flex items-center">- <button class="text-blue-500 hover:text-blue-700 text-xs px-1" onclick="editCustomApi(${index})">✎</button>- <button class="text-red-500 hover:text-red-700 text-xs px-1" onclick="removeCustomApi(${index})">✕</button>- </div>- `;- container.appendChild(apiItem);- apiItem.querySelector('input').addEventListener('change', function () {- updateSelectedAPIs();- checkAdultAPIsSelected();- });- });-}--// 编辑自定义API-function editCustomApi(index) {- if (index < 0 || index >= customAPIs.length) return;- const api = customAPIs[index];- document.getElementById('customApiName').value = api.name;- document.getElementById('customApiUrl').value = api.url;- document.getElementById('customApiDetail').value = api.detail || '';- const isAdultInput = document.getElementById('customApiIsAdult');- if (isAdultInput) isAdultInput.checked = api.isAdult || false;- const form = document.getElementById('addCustomApiForm');- if (form) {- form.classList.remove('hidden');- const buttonContainer = form.querySelector('div:last-child');- buttonContainer.innerHTML = `- <button onclick="updateCustomApi(${index})" class="bg-blue-600 hover:bg-blue-700 text-white px-3 py-1 rounded text-xs">更新</button>- <button onclick="cancelEditCustomApi()" class="bg-[#444] hover:bg-[#555] text-white px-3 py-1 rounded text-xs">取消</button>- `;- }-}--// 更新自定义API-function updateCustomApi(index) {- if (index < 0 || index >= customAPIs.length) return;- const nameInput = document.getElementById('customApiName');- const urlInput = document.getElementById('customApiUrl');- const detailInput = document.getElementById('customApiDetail');- const isAdultInput = document.getElementById('customApiIsAdult');- const name = nameInput.value.trim();- let url = urlInput.value.trim();- const detail = detailInput ? detailInput.value.trim() : '';- const isAdult = isAdultInput ? isAdultInput.checked : false;- if (!name || !url) {- showToast('请输入API名称和链接', 'warning');- return;- }- if (!/^https?:\/\/.+/.test(url)) {- showToast('API链接格式不正确,需以http://或https://开头', 'warning');- return;- }- if (url.endsWith('/')) url = url.slice(0, -1);- // 保存 detail 字段- customAPIs[index] = { name, url, detail, isAdult };- localStorage.setItem('customAPIs', JSON.stringify(customAPIs));- renderCustomAPIsList();- checkAdultAPIsSelected();- restoreAddCustomApiButtons();- nameInput.value = '';- urlInput.value = '';- if (detailInput) detailInput.value = '';- if (isAdultInput) isAdultInput.checked = false;- document.getElementById('addCustomApiForm').classList.add('hidden');- showToast('已更新自定义API: ' + name, 'success');-}--// 取消编辑自定义API-function cancelEditCustomApi() {- // 清空表单- document.getElementById('customApiName').value = '';- document.getElementById('customApiUrl').value = '';- document.getElementById('customApiDetail').value = '';- const isAdultInput = document.getElementById('customApiIsAdult');- if (isAdultInput) isAdultInput.checked = false;-- // 隐藏表单- document.getElementById('addCustomApiForm').classList.add('hidden');-- // 恢复添加按钮- restoreAddCustomApiButtons();-}--// 恢复自定义API添加按钮-function restoreAddCustomApiButtons() {- const form = document.getElementById('addCustomApiForm');- const buttonContainer = form.querySelector('div:last-child');- buttonContainer.innerHTML = `- <button onclick="addCustomApi()" class="bg-blue-600 hover:bg-blue-700 text-white px-3 py-1 rounded text-xs">添加</button>- <button onclick="cancelAddCustomApi()" class="bg-[#444] hover:bg-[#555] text-white px-3 py-1 rounded text-xs">取消</button>- `;-}--// 更新选中的API列表-function updateSelectedAPIs() {- // 获取所有内置API复选框- const builtInApiCheckboxes = document.querySelectorAll('#apiCheckboxes input:checked');-- // 获取选中的内置API- const builtInApis = Array.from(builtInApiCheckboxes).map(input => input.dataset.api);-- // 获取选中的自定义API- const customApiCheckboxes = document.querySelectorAll('#customApisList input:checked');- const customApiIndices = Array.from(customApiCheckboxes).map(input => 'custom_' + input.dataset.customIndex);-- // 合并内置和自定义API- selectedAPIs = [...builtInApis, ...customApiIndices];-- // 保存到localStorage- localStorage.setItem('selectedAPIs', JSON.stringify(selectedAPIs));-- // 更新显示选中的API数量- updateSelectedApiCount();-}--// 更新选中的API数量显示-function updateSelectedApiCount() {- const countEl = document.getElementById('selectedApiCount');- if (countEl) {- countEl.textContent = selectedAPIs.length;- }-}--// 全选或取消全选API-function selectAllAPIs(selectAll = true, excludeAdult = false) {- const checkboxes = document.querySelectorAll('#apiCheckboxes input[type="checkbox"]');-- checkboxes.forEach(checkbox => {- if (excludeAdult && checkbox.classList.contains('api-adult')) {- checkbox.checked = false;- } else {- checkbox.checked = selectAll;- }- });-- updateSelectedAPIs();- checkAdultAPIsSelected();-}--// 显示添加自定义API表单-function showAddCustomApiForm() {- const form = document.getElementById('addCustomApiForm');- if (form) {- form.classList.remove('hidden');- }-}--// 取消添加自定义API - 修改函数来重用恢复按钮逻辑-function cancelAddCustomApi() {- const form = document.getElementById('addCustomApiForm');- if (form) {- form.classList.add('hidden');- document.getElementById('customApiName').value = '';- document.getElementById('customApiUrl').value = '';- document.getElementById('customApiDetail').value = '';- const isAdultInput = document.getElementById('customApiIsAdult');- if (isAdultInput) isAdultInput.checked = false;-- // 确保按钮是添加按钮- restoreAddCustomApiButtons();- }-}--// 添加自定义API-function addCustomApi() {- const nameInput = document.getElementById('customApiName');- const urlInput = document.getElementById('customApiUrl');- const detailInput = document.getElementById('customApiDetail');- const isAdultInput = document.getElementById('customApiIsAdult');- const name = nameInput.value.trim();- let url = urlInput.value.trim();- const detail = detailInput ? detailInput.value.trim() : '';- const isAdult = isAdultInput ? isAdultInput.checked : false;- if (!name || !url) {- showToast('请输入API名称和链接', 'warning');- return;- }- if (!/^https?:\/\/.+/.test(url)) {- showToast('API链接格式不正确,需以http://或https://开头', 'warning');- return;- }- if (url.endsWith('/')) {- url = url.slice(0, -1);- }- // 保存 detail 字段- customAPIs.push({ name, url, detail, isAdult });- localStorage.setItem('customAPIs', JSON.stringify(customAPIs));- const newApiIndex = customAPIs.length - 1;- selectedAPIs.push('custom_' + newApiIndex);- localStorage.setItem('selectedAPIs', JSON.stringify(selectedAPIs));-- // 重新渲染自定义API列表- renderCustomAPIsList();- updateSelectedApiCount();- checkAdultAPIsSelected();- nameInput.value = '';- urlInput.value = '';- if (detailInput) detailInput.value = '';- if (isAdultInput) isAdultInput.checked = false;- document.getElementById('addCustomApiForm').classList.add('hidden');- showToast('已添加自定义API: ' + name, 'success');-}--// 移除自定义API-function removeCustomApi(index) {- if (index < 0 || index >= customAPIs.length) return;-- const apiName = customAPIs[index].name;-- // 从列表中移除API- customAPIs.splice(index, 1);- localStorage.setItem('customAPIs', JSON.stringify(customAPIs));-- // 从选中列表中移除此API- const customApiId = 'custom_' + index;- selectedAPIs = selectedAPIs.filter(id => id !== customApiId);-- // 更新大于此索引的自定义API索引- selectedAPIs = selectedAPIs.map(id => {- if (id.startsWith('custom_')) {- const currentIndex = parseInt(id.replace('custom_', ''));- if (currentIndex > index) {- return 'custom_' + (currentIndex - 1);- }- }- return id;- });-- localStorage.setItem('selectedAPIs', JSON.stringify(selectedAPIs));-- // 重新渲染自定义API列表- renderCustomAPIsList();-- // 更新选中的API数量- updateSelectedApiCount();-- // 重新检查成人API选中状态- checkAdultAPIsSelected();-- showToast('已移除自定义API: ' + apiName, 'info');-}--function toggleSettings(e) {- const settingsPanel = document.getElementById('settingsPanel');- if (!settingsPanel) return;-- if (settingsPanel.classList.contains('show')) {- settingsPanel.classList.remove('show');- } else {- settingsPanel.classList.add('show');- }-- if (e) {- e.preventDefault();- e.stopPropagation();- }-}--// 设置事件监听器-function setupEventListeners() {- // 回车搜索- document.getElementById('searchInput').addEventListener('keypress', function (e) {- if (e.key === 'Enter') {- search();- }- });-- // 点击外部关闭设置面板和历史记录面板- document.addEventListener('click', function (e) {- // 关闭设置面板- const settingsPanel = document.querySelector('#settingsPanel.show');- const settingsButton = document.querySelector('#settingsPanel .close-btn');-- if (settingsPanel && settingsButton &&- !settingsPanel.contains(e.target) &&- !settingsButton.contains(e.target)) {- settingsPanel.classList.remove('show');- }-- // 关闭历史记录面板- const historyPanel = document.querySelector('#historyPanel.show');- const historyButton = document.querySelector('#historyPanel .close-btn');-- if (historyPanel && historyButton &&- !historyPanel.contains(e.target) &&- !historyButton.contains(e.target)) {- historyPanel.classList.remove('show');- }- });-- // 黄色内容过滤开关事件绑定- const yellowFilterToggle = document.getElementById('yellowFilterToggle');- if (yellowFilterToggle) {- yellowFilterToggle.addEventListener('change', function (e) {- localStorage.setItem('yellowFilterEnabled', e.target.checked);-- // 控制黄色内容接口的显示状态- const adultdiv = document.getElementById('adultdiv');- if (adultdiv) {- if (e.target.checked === true) {- adultdiv.style.display = 'none';- } else if (e.target.checked === false) {- adultdiv.style.display = ''- }- } else {- // 添加成人API列表- addAdultAPI();- }- });- }-- // 广告过滤开关事件绑定- const adFilterToggle = document.getElementById('adFilterToggle');- if (adFilterToggle) {- adFilterToggle.addEventListener('change', function (e) {- localStorage.setItem(PLAYER_CONFIG.adFilteringStorage, e.target.checked);- });- }-}--// 重置搜索区域-function resetSearchArea() {- // 清理搜索结果- document.getElementById('results').innerHTML = '';- document.getElementById('searchInput').value = '';-- // 恢复搜索区域的样式- document.getElementById('searchArea').classList.add('flex-1');- document.getElementById('searchArea').classList.remove('mb-8');- document.getElementById('resultsArea').classList.add('hidden');-- // 确保页脚正确显示,移除相对定位- const footer = document.querySelector('.footer');- if (footer) {- footer.style.position = '';- }-- // 如果有豆瓣功能,检查是否需要显示豆瓣推荐区域- if (typeof updateDoubanVisibility === 'function') {- updateDoubanVisibility();- }-- // 重置URL为主页- try {- window.history.pushState(- {},- `LibreTV - 免费在线视频搜索与观看平台`,- `/`- );- // 更新页面标题- document.title = `LibreTV - 免费在线视频搜索与观看平台`;- } catch (e) {- console.error('更新浏览器历史失败:', e);- }-}--// 获取自定义API信息-function getCustomApiInfo(customApiIndex) {- const index = parseInt(customApiIndex);- if (isNaN(index) || index < 0 || index >= customAPIs.length) {- return null;- }- return customAPIs[index];-}--// 搜索功能 - 修改为支持多选API和多页结果-async function search() {- // 强化的密码保护校验 - 防止绕过- try {- if (window.ensurePasswordProtection) {- window.ensurePasswordProtection();- } else {- // 兼容性检查- if (window.isPasswordProtected && window.isPasswordVerified) {- if (window.isPasswordProtected() && !window.isPasswordVerified()) {- showPasswordModal && showPasswordModal();- return;- }- }- }- } catch (error) {- console.warn('Password protection check failed:', error.message);- return;- }- const query = document.getElementById('searchInput').value.trim();-- if (!query) {- showToast('请输入搜索内容', 'info');- return;- }-- if (selectedAPIs.length === 0) {- showToast('请至少选择一个API源', 'warning');- return;- }-- showLoading();-- try {- // 保存搜索历史- saveSearchHistory(query);-- // 从所有选中的API源搜索- let allResults = [];- const searchPromises = selectedAPIs.map(apiId =>- searchByAPIAndKeyWord(apiId, query)- );-- // 等待所有搜索请求完成- const resultsArray = await Promise.all(searchPromises);-- // 合并所有结果- resultsArray.forEach(results => {- if (Array.isArray(results) && results.length > 0) {- allResults = allResults.concat(results);- }- });-- // 跨源去重:相同 source_code + vod_id 视为同一资源(解决多源同名重复)- const seenKeys = new Set();- allResults = allResults.filter(item => {- const key = (item.source_code || '') + '_' + (item.vod_id || '');- if (seenKeys.has(key)) return false;- seenKeys.add(key);- return true;- });-- // 限制最大结果数量(避免一次渲染过多卡片)- const maxResults = (typeof AGGREGATED_SEARCH_CONFIG !== 'undefined' && AGGREGATED_SEARCH_CONFIG.maxResults) || 10000;- if (allResults.length > maxResults) {- allResults = allResults.slice(0, maxResults);- }-- // 对搜索结果进行排序:按名称优先,名称相同时按接口源排序- allResults.sort((a, b) => {- // 首先按照视频名称排序- const nameCompare = (a.vod_name || '').localeCompare(b.vod_name || '');- if (nameCompare !== 0) return nameCompare;-- // 如果名称相同,则按照来源排序- return (a.source_name || '').localeCompare(b.source_name || '');- });-- // 更新搜索结果计数- const searchResultsCount = document.getElementById('searchResultsCount');- if (searchResultsCount) {- searchResultsCount.textContent = allResults.length;- }-- // 显示结果区域,调整搜索区域- document.getElementById('searchArea').classList.remove('flex-1');- document.getElementById('searchArea').classList.add('mb-8');- document.getElementById('resultsArea').classList.remove('hidden');-- // 隐藏豆瓣推荐区域(如果存在)- const doubanArea = document.getElementById('doubanArea');- if (doubanArea) {- doubanArea.classList.add('hidden');- }-- const resultsDiv = document.getElementById('results');-- // 如果没有结果- if (!allResults || allResults.length === 0) {- resultsDiv.innerHTML = `- <div class="col-span-full text-center py-16">- <svg class="mx-auto h-12 w-12 text-gray-500" fill="none" viewBox="0 0 24 24" stroke="currentColor">- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"- d="M9.172 16.172a4 4 0 015.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />- </svg>- <h3 class="mt-2 text-lg font-medium text-gray-400">没有找到匹配的结果</h3>- <p class="mt-1 text-sm text-gray-500">请尝试其他关键词或更换数据源</p>- </div>- `;- hideLoading();- return;- }-- // 有搜索结果时,才更新URL- try {- // 使用URI编码确保特殊字符能够正确显示- const encodedQuery = encodeURIComponent(query);- // 使用HTML5 History API更新URL,不刷新页面- window.history.pushState(- { search: query },- `搜索: ${query} - LibreTV`,- `/s=${encodedQuery}`- );- // 更新页面标题- document.title = `搜索: ${query} - LibreTV`;- } catch (e) {- console.error('更新浏览器历史失败:', e);- // 如果更新URL失败,继续执行搜索- }-- // 处理搜索结果过滤:如果启用了黄色内容过滤,则过滤掉分类含有敏感内容的项目- const yellowFilterEnabled = localStorage.getItem('yellowFilterEnabled') === 'true';- if (yellowFilterEnabled) {- const banned = ['伦理片', '福利', '里番动漫', '门事件', '萝莉少女', '制服诱惑', '国产传媒', 'cosplay', '黑丝诱惑', '无码', '日本无码', '有码', '日本有码', 'SWAG', '网红主播', '色情片', '同性片', '福利视频', '福利片'];- allResults = allResults.filter(item => {- const typeName = item.type_name || '';- return !banned.some(keyword => typeName.includes(keyword));- });- }-- // 添加XSS保护,使用textContent和属性转义- const safeResults = allResults.map(item => {- const safeId = item.vod_id ? item.vod_id.toString().replace(/[^\w-]/g, '') : '';- const safeName = (item.vod_name || '').toString()- .replace(/</g, '<')- .replace(/>/g, '>')- .replace(/"/g, '"');- const sourceInfo = item.source_name ?- `<span class="bg-[#222] text-xs px-1.5 py-0.5 rounded-full">${item.source_name}</span>` : '';- const sourceCode = item.source_code || '';-- // 添加API URL属性,用于详情获取- const apiUrlAttr = item.api_url ?- `data-api-url="${item.api_url.replace(/"/g, '"')}"` : '';-- // 修改为水平卡片布局,图片在左侧,文本在右侧,并优化样式- const hasCover = item.vod_pic && item.vod_pic.startsWith('http');- const imgCfg = hasCover ? buildImageProxyConfig(item.vod_pic) : null;-- return `- <div class="card-hover bg-[#111] rounded-lg overflow-hidden cursor-pointer transition-all hover:scale-[1.02] h-full shadow-sm hover:shadow-md"- data-details-id="${safeId}" data-details-name="${safeName}" data-details-source="${sourceCode}" ${apiUrlAttr} role="button" tabindex="0">- <div class="flex h-full">- ${hasCover ? `- <div class="relative flex-shrink-0 search-card-img-container">- <img src="${escapeHtmlAttr(imgCfg.primary)}" alt="${safeName}"- class="h-full w-full object-cover transition-transform hover:scale-110"- onerror="window.handleImageError(this)"- data-fallback="${imgCfg.fallback}"- data-placeholder="https://via.placeholder.com/300x450?text=无封面"- loading="lazy">- <div class="absolute inset-0 bg-gradient-to-r from-black/30 to-transparent"></div>- </div>` : ''}-- <div class="p-2 flex flex-col flex-grow">- <div class="flex-grow">- <h3 class="font-semibold mb-2 break-words line-clamp-2 ${hasCover ? '' : 'text-center'}" title="${safeName}">${safeName}</h3>-- <div class="flex flex-wrap ${hasCover ? '' : 'justify-center'} gap-1 mb-2">- ${(item.type_name || '').toString().replace(/</g, '<') ?- `<span class="text-xs py-0.5 px-1.5 rounded bg-opacity-20 bg-blue-500 text-blue-300">- ${(item.type_name || '').toString().replace(/</g, '<')}- </span>` : ''}- ${(item.vod_year || '') ?- `<span class="text-xs py-0.5 px-1.5 rounded bg-opacity-20 bg-purple-500 text-purple-300">- ${item.vod_year}- </span>` : ''}- </div>- <p class="text-gray-400 line-clamp-2 overflow-hidden ${hasCover ? '' : 'text-center'} mb-2">- ${(item.vod_remarks || '暂无介绍').toString().replace(/</g, '<')}- </p>- </div>-- <div class="flex justify-between items-center mt-1 pt-1 border-t border-gray-800">- ${sourceInfo ? `<div>${sourceInfo}</div>` : '<div></div>'}- <!-- 接口名称过长会被挤变形- <div>- <span class="text-gray-500 flex items-center hover:text-blue-400 transition-colors">- <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 mr-1" fill="none" viewBox="0 0 24 24" stroke="currentColor">- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z" />- </svg>- 播放- </span>- </div>- -->- </div>- </div>- </div>- </div>- `;- }).join('');-- resultsDiv.innerHTML = safeResults;- } catch (error) {- console.error('搜索错误:', error);- if (error.name === 'AbortError') {- showToast('搜索请求超时,请检查网络连接', 'error');- } else {- showToast('搜索请求失败,请稍后重试', 'error');- }- } finally {- hideLoading();- }-}--// 切换清空按钮的显示状态-function toggleClearButton() {- const searchInput = document.getElementById('searchInput');- const clearButton = document.getElementById('clearSearchInput');- if (searchInput.value !== '') {- clearButton.classList.remove('hidden');- } else {- clearButton.classList.add('hidden');- }-}--// 清空搜索框内容-function clearSearchInput() {- const searchInput = document.getElementById('searchInput');- searchInput.value = '';- const clearButton = document.getElementById('clearSearchInput');- clearButton.classList.add('hidden');-}--// 劫持搜索框的value属性以检测外部修改-function hookInput() {- const input = document.getElementById('searchInput');- const descriptor = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value');-- // 重写 value 属性的 getter 和 setter- Object.defineProperty(input, 'value', {- get: function () {- // 确保读取时返回字符串(即使原始值为 undefined/null)- const originalValue = descriptor.get.call(this);- return originalValue != null ? String(originalValue) : '';- },- set: function (value) {- // 显式将值转换为字符串后写入- const strValue = String(value);- descriptor.set.call(this, strValue);- this.dispatchEvent(new Event('input', { bubbles: true }));- }- });-- // 初始化输入框值为空字符串(避免初始值为 undefined)- input.value = '';-}-document.addEventListener('DOMContentLoaded', hookInput);--// 显示详情 - 修改为支持自定义API-async function showDetails(id, vod_name, sourceCode) {- // 密码保护校验- if (window.isPasswordProtected && window.isPasswordVerified) {- if (window.isPasswordProtected() && !window.isPasswordVerified()) {- showPasswordModal && showPasswordModal();- return;- }- }- if (!id) {- showToast('视频ID无效', 'error');- return;- }-- showLoading();- try {- // 构建API参数- let apiParams = '';-- // 处理自定义API源- if (sourceCode.startsWith('custom_')) {- const customIndex = sourceCode.replace('custom_', '');- const customApi = getCustomApiInfo(customIndex);- if (!customApi) {- showToast('自定义API配置无效', 'error');- hideLoading();- return;- }- // 传递 detail 字段- if (customApi.detail) {- apiParams = '&customApi=' + encodeURIComponent(customApi.url) + '&customDetail=' + encodeURIComponent(customApi.detail) + '&source=custom';- } else {- apiParams = '&customApi=' + encodeURIComponent(customApi.url) + '&source=custom';- }- } else {- // 内置API- apiParams = '&source=' + sourceCode;- }-- // Add a timestamp to prevent caching- const timestamp = new Date().getTime();- const cacheBuster = `&_t=${timestamp}`;- const response = await fetch(`/api/detail?id=${encodeURIComponent(id)}${apiParams}${cacheBuster}`);-- const data = await response.json();-- const modal = document.getElementById('modal');- const modalTitle = document.getElementById('modalTitle');- const modalContent = document.getElementById('modalContent');-- // 显示来源信息- const sourceName = data.videoInfo && data.videoInfo.source_name ?- ` <span class="text-sm font-normal text-gray-400">(${data.videoInfo.source_name})</span>` : '';-- // 不对标题进行截断处理,允许完整显示- modalTitle.innerHTML = `<span class="break-words">${vod_name || '未知视频'}</span>${sourceName}`;- currentVideoTitle = vod_name || '未知视频';-- if (data.episodes && data.episodes.length > 0) {- // 构建详情信息HTML- let detailInfoHtml = '';- if (data.videoInfo) {- // Prepare description text, strip HTML and trim whitespace- const descriptionText = data.videoInfo.desc ? data.videoInfo.desc.replace(/<[^>]+>/g, '').trim() : '';-- // Check if there's any actual grid content- const hasGridContent = data.videoInfo.type || data.videoInfo.year || data.videoInfo.area || data.videoInfo.director || data.videoInfo.actor || data.videoInfo.remarks;-- if (hasGridContent || descriptionText) { // Only build if there's something to show- detailInfoHtml = `- <div class="modal-detail-info">- ${hasGridContent ? `- <div class="detail-grid">- ${data.videoInfo.type ? `<div class="detail-item"><span class="detail-label">类型:</span> <span class="detail-value">${data.videoInfo.type}</span></div>` : ''}- ${data.videoInfo.year ? `<div class="detail-item"><span class="detail-label">年份:</span> <span class="detail-value">${data.videoInfo.year}</span></div>` : ''}- ${data.videoInfo.area ? `<div class="detail-item"><span class="detail-label">地区:</span> <span class="detail-value">${data.videoInfo.area}</span></div>` : ''}- ${data.videoInfo.director ? `<div class="detail-item"><span class="detail-label">导演:</span> <span class="detail-value">${data.videoInfo.director}</span></div>` : ''}- ${data.videoInfo.actor ? `<div class="detail-item"><span class="detail-label">主演:</span> <span class="detail-value">${data.videoInfo.actor}</span></div>` : ''}- ${data.videoInfo.remarks ? `<div class="detail-item"><span class="detail-label">备注:</span> <span class="detail-value">${data.videoInfo.remarks}</span></div>` : ''}- </div>` : ''}- ${descriptionText ? `- <div class="detail-desc">- <p class="detail-label">简介:</p>- <p class="detail-desc-content">${descriptionText}</p>- </div>` : ''}- </div>- `;- }- }-- currentEpisodes = data.episodes;- currentEpisodeIndex = 0;-- modalContent.innerHTML = `- ${detailInfoHtml}- <div class="flex flex-wrap items-center justify-between mb-4 gap-2">- <div class="flex items-center gap-2">- <button onclick="toggleEpisodeOrder('${sourceCode}', '${id}')"- class="px-3 py-1.5 bg-[#333] hover:bg-[#444] border border-[#444] rounded text-sm transition-colors flex items-center gap-1">- <svg class="w-4 h-4 transform ${episodesReversed ? 'rotate-180' : ''}" fill="none" stroke="currentColor" viewBox="0 0 24 24">- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 14l-7 7m0 0l-7-7m7 7V3"></path>- </svg>- <span>${episodesReversed ? '正序排列' : '倒序排列'}</span>- </button>- <span class="text-gray-400 text-sm">共 ${data.episodes.length} 集</span>- </div>- <button onclick="copyLinks()" class="px-3 py-1.5 bg-blue-600 hover:bg-blue-700 text-white rounded text-sm transition-colors">- 复制链接- </button>- </div>- <div id="episodesGrid" class="grid grid-cols-2 sm:grid-cols-4 md:grid-cols-6 lg:grid-cols-8 gap-2">- ${renderEpisodes(vod_name, sourceCode, id)}- </div>- `;- } else {- modalContent.innerHTML = `- <div class="text-center py-8">- <div class="text-red-400 mb-2">❌ 未找到播放资源</div>- <div class="text-gray-500 text-sm">该视频可能暂时无法播放,请尝试其他视频</div>- </div>- `;- }-- modal.classList.remove('hidden');- } catch (error) {- console.error('获取详情错误:', error);- showToast('获取详情失败,请稍后重试', 'error');- } finally {- hideLoading();- }-}--// 更新播放视频函数,修改为使用/watch路径而不是直接打开player.html-function playVideo(url, vod_name, sourceCode, episodeIndex = 0, vodId = '') {- // 密码保护校验- if (window.isPasswordProtected && window.isPasswordVerified) {- if (window.isPasswordProtected() && !window.isPasswordVerified()) {- showPasswordModal && showPasswordModal();- return;- }- }-- // 获取当前路径作为返回页面- let currentPath = window.location.href;-- // 构建播放页面URL,使用watch.html作为中间跳转页- let watchUrl = `watch.html?id=${vodId || ''}&source=${sourceCode || ''}&url=${encodeURIComponent(url)}&index=${episodeIndex}&title=${encodeURIComponent(vod_name || '')}`;-- // 添加返回URL参数- if (currentPath.includes('index.html') || currentPath.endsWith('/')) {- watchUrl += `&back=${encodeURIComponent(currentPath)}`;- }-- // 保存当前状态到localStorage- try {- localStorage.setItem('currentVideoTitle', vod_name || '未知视频');- localStorage.setItem('currentEpisodes', JSON.stringify(currentEpisodes));- localStorage.setItem('currentEpisodeIndex', episodeIndex);- localStorage.setItem('currentSourceCode', sourceCode || '');- localStorage.setItem('lastPlayTime', Date.now());- localStorage.setItem('lastSearchPage', currentPath);- localStorage.setItem('lastPageUrl', currentPath); // 确保保存返回页面URL- } catch (e) {- console.error('保存播放状态失败:', e);- }-- // 在当前标签页中打开播放页面- window.location.href = watchUrl;-}--// 注意:原 showVideoPlayer/closeVideoPlayer(iframe 内嵌播放方案)已移除。-// 当前播放统一通过 watch.html → player.html 全页跳转,逻辑更清晰,返回由 player.js 的 goBack 处理。--// 播放上一集-function playPreviousEpisode(sourceCode) {- if (currentEpisodeIndex > 0) {- const prevIndex = currentEpisodeIndex - 1;- const prevUrl = currentEpisodes[prevIndex];- playVideo(prevUrl, currentVideoTitle, sourceCode, prevIndex);- }-}--// 播放下一集-function playNextEpisode(sourceCode) {- if (currentEpisodeIndex < currentEpisodes.length - 1) {- const nextIndex = currentEpisodeIndex + 1;- const nextUrl = currentEpisodes[nextIndex];- playVideo(nextUrl, currentVideoTitle, sourceCode, nextIndex);- }-}--// 处理播放器加载错误-function handlePlayerError() {- hideLoading();- showToast('视频播放加载失败,请尝试其他视频源', 'error');-}--// 辅助函数用于渲染剧集按钮(使用当前的排序状态)-function renderEpisodes(vodName, sourceCode, vodId) {- const episodes = episodesReversed ? [...currentEpisodes].reverse() : currentEpisodes;- return episodes.map((episode, index) => {- // 根据倒序状态计算真实的剧集索引- const realIndex = episodesReversed ? currentEpisodes.length - 1 - index : index;- return `- <button id="episode-${realIndex}" data-episode="${episode.replace(/"/g, '"')}" data-index="${realIndex}" data-source="${sourceCode}" data-vodid="${vodId}"- class="px-4 py-2 bg-[#222] hover:bg-[#333] border border-[#333] rounded-lg transition-colors text-center episode-btn">- ${realIndex + 1}- </button>- `;- }).join('');-}--// 复制视频链接到剪贴板-function copyLinks() {- const episodes = episodesReversed ? [...currentEpisodes].reverse() : currentEpisodes;- const linkList = episodes.join('\r\n');- navigator.clipboard.writeText(linkList).then(() => {- showToast('播放链接已复制', 'success');- }).catch(err => {- showToast('复制失败,请检查浏览器权限', 'error');- });-}--// 切换排序状态的函数-function toggleEpisodeOrder(sourceCode, vodId) {- episodesReversed = !episodesReversed;- // 重新渲染剧集区域,使用 currentVideoTitle 作为视频标题- const episodesGrid = document.getElementById('episodesGrid');- if (episodesGrid) {- episodesGrid.innerHTML = renderEpisodes(currentVideoTitle, sourceCode, vodId);- }-- // 更新按钮文本和箭头方向- const toggleBtn = document.querySelector(`button[onclick="toggleEpisodeOrder('${sourceCode}', '${vodId}')"]`);- if (toggleBtn) {- toggleBtn.querySelector('span').textContent = episodesReversed ? '正序排列' : '倒序排列';- const arrowIcon = toggleBtn.querySelector('svg');- if (arrowIcon) {- arrowIcon.style.transform = episodesReversed ? 'rotate(180deg)' : 'rotate(0deg)';- }- }-}--// 从URL导入配置-async function importConfigFromUrl() {- // 创建模态框元素- let modal = document.getElementById('importUrlModal');- if (modal) {- document.body.removeChild(modal);- }-- modal = document.createElement('div');- modal.id = 'importUrlModal';- modal.className = 'fixed inset-0 bg-black bg-opacity-75 flex items-center justify-center z-40';-- modal.innerHTML = `- <div class="bg-[#191919] rounded-lg p-6 max-w-md w-full max-h-[90vh] overflow-y-auto relative">- <button id="closeUrlModal" class="absolute top-4 right-4 text-gray-400 hover:text-white text-xl">×</button>-- <h3 class="text-xl font-bold mb-4">从URL导入配置</h3>-- <div class="mb-4">- <input type="text" id="configUrl" placeholder="输入配置文件URL"- class="w-full px-3 py-2 bg-[#222] border border-[#333] rounded-lg text-white focus:outline-none focus:ring-1 focus:ring-blue-500">- </div>-- <div class="flex justify-end space-x-2">- <button id="confirmUrlImport" class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded">导入</button>- <button id="cancelUrlImport" class="bg-[#444] hover:bg-[#555] text-white px-4 py-2 rounded">取消</button>- </div>- </div>`;-- document.body.appendChild(modal);-- // 关闭按钮事件- document.getElementById('closeUrlModal').addEventListener('click', () => {- document.body.removeChild(modal);- });-- // 取消按钮事件- document.getElementById('cancelUrlImport').addEventListener('click', () => {- document.body.removeChild(modal);- });-- // 确认导入按钮事件- document.getElementById('confirmUrlImport').addEventListener('click', async () => {- const url = document.getElementById('configUrl').value.trim();- if (!url) {- showToast('请输入配置文件URL', 'warning');- return;- }-- // 验证URL格式- try {- const urlObj = new URL(url);- if (urlObj.protocol !== 'http:' && urlObj.protocol !== 'https:') {- showToast('URL必须以http://或https://开头', 'warning');- return;- }- } catch (e) {- showToast('URL格式不正确', 'warning');- return;- }-- showLoading('正在从URL导入配置...');-- try {- // 获取配置文件 - 直接请求URL- const response = await fetch(url, {- mode: 'cors',- headers: {- 'Accept': 'application/json'- }- });- if (!response.ok) throw '获取配置文件失败';-- // 验证响应内容类型- const contentType = response.headers.get('content-type');- if (!contentType || !contentType.includes('application/json')) {- throw '响应不是有效的JSON格式';- }-- const config = await response.json();- if (config.name !== 'LibreTV-Settings') throw '配置文件格式不正确';-- // 验证哈希- const dataHash = await sha256(JSON.stringify(config.data));- if (dataHash !== config.hash) throw '配置文件哈希值不匹配';-- // 导入配置- for (let item in config.data) {- localStorage.setItem(item, config.data[item]);- }-- showToast('配置文件导入成功,3 秒后自动刷新本页面。', 'success');- setTimeout(() => {- window.location.reload();- }, 3000);- } catch (error) {- const message = typeof error === 'string' ? error : '导入配置失败';- showToast(`从URL导入配置出错 (${message})`, 'error');- } finally {- hideLoading();- document.body.removeChild(modal);- }- });-- // 点击模态框外部关闭- modal.addEventListener('click', (e) => {- if (e.target === modal) {- document.body.removeChild(modal);- }- });-}--// 配置文件导入功能-async function importConfig() {- showImportBox(async (file) => {- try {- // 检查文件类型- if (!(file.type === 'application/json' || file.name.endsWith('.json'))) throw '文件类型不正确';-- // 检查文件大小- if (file.size > 1024 * 1024 * 10) throw new Error('文件大小超过 10MB');-- // 读取文件内容- const content = await new Promise((resolve, reject) => {- const reader = new FileReader();- reader.onload = () => resolve(reader.result);- reader.onerror = () => reject('文件读取失败');- reader.readAsText(file);- });-- // 解析并验证配置- const config = JSON.parse(content);- if (config.name !== 'LibreTV-Settings') throw '配置文件格式不正确';-- // 验证哈希- const dataHash = await sha256(JSON.stringify(config.data));- if (dataHash !== config.hash) throw '配置文件哈希值不匹配';-- // 导入配置- for (let item in config.data) {- localStorage.setItem(item, config.data[item]);- }-- showToast('配置文件导入成功,3 秒后自动刷新本页面。', 'success');- setTimeout(() => {- window.location.reload();- }, 3000);- } catch (error) {- const message = typeof error === 'string' ? error : '配置文件格式错误';- showToast(`配置文件读取出错 (${message})`, 'error');- }- });-}--// 配置文件导出功能-async function exportConfig() {- // 存储配置数据- const config = {};- const items = {};-- const settingsToExport = [- 'selectedAPIs',- 'customAPIs',- 'yellowFilterEnabled',- 'adFilteringEnabled',- 'doubanEnabled',- 'hasInitializedDefaults'- ];-- // 导出设置项- settingsToExport.forEach(key => {- const value = localStorage.getItem(key);- if (value !== null) {- items[key] = value;- }- });-- // 导出历史记录- const viewingHistory = localStorage.getItem('viewingHistory');- if (viewingHistory) {- items['viewingHistory'] = viewingHistory;- }-- const searchHistory = localStorage.getItem(SEARCH_HISTORY_KEY);- if (searchHistory) {- items[SEARCH_HISTORY_KEY] = searchHistory;- }-- const times = Date.now().toString();- config['name'] = 'LibreTV-Settings'; // 配置文件名,用于校验- config['time'] = times; // 配置文件生成时间- config['cfgVer'] = '1.0.0'; // 配置文件版本- config['data'] = items; // 配置文件数据- config['hash'] = await sha256(JSON.stringify(config['data'])); // 计算数据的哈希值,用于校验-- // 将配置数据保存为 JSON 文件- saveStringAsFile(JSON.stringify(config), 'LibreTV-Settings_' + times + '.json');-}--// 将字符串保存为文件-function saveStringAsFile(content, fileName) {- // 创建Blob对象并指定类型- const blob = new Blob([content], { type: 'text/plain;charset=utf-8' });- // 生成临时URL- const url = window.URL.createObjectURL(blob);- // 创建<a>标签并触发下载- const a = document.createElement('a');- a.href = url;- a.download = fileName;- document.body.appendChild(a);- a.click();- // 清理临时对象- document.body.removeChild(a);- window.URL.revokeObjectURL(url);-}--// 移除Node.js的require语句,因为这是在浏览器环境中运行的diff --git a/js/config.js b/js/config.jsdeleted file mode 100644index b8aff8f..0000000--- a/js/config.js+++ /dev/null@@ -1,133 +0,0 @@-// 全局常量配置-const PROXY_URL = '/proxy/'; // 自托管 Node 后端(server.mjs)提供的代理路径-// const HOPLAYER_URL = 'https://hoplayer.com/index.html';-const SEARCH_HISTORY_KEY = 'videoSearchHistory';-const MAX_HISTORY_ITEMS = 5;--// 密码保护配置-// 注意:PASSWORD 环境变量是必需的,所有部署都必须设置密码以确保安全-const PASSWORD_CONFIG = {- localStorageKey: 'passwordVerified', // 存储验证状态的键名- verificationTTL: 90 * 24 * 60 * 60 * 1000 // 验证有效期(90天,约3个月)-};--// 网站信息配置-const SITE_CONFIG = {- name: 'LibreTV',- url: 'https://libretv.is-an.org',- description: '免费在线视频搜索与观看平台',- logo: 'image/logo.png',- version: '1.1.0'-};--// API站点配置-// 空壳设计:不内置任何数据源,部署者需在「设置 → 自定义API」中添加自己的采集站。-// 这样避免内置源失效/违规带来的维护与合规风险。-const API_SITES = {};--// 定义合并方法-function extendAPISites(newSites) {- Object.assign(API_SITES, newSites);-}--// 暴露到全局-window.API_SITES = API_SITES;-window.extendAPISites = extendAPISites;--// 公共 CORS 代理兜底:当内置 /proxy/ 不可用(如纯静态部署、未配置后端或代理鉴权失败)时回退-const FALLBACK_CORS_PROXY = 'https://ciao-cors.is-an.org/';-window.FALLBACK_CORS_PROXY = FALLBACK_CORS_PROXY;--// 豆瓣/视频海报图片加载方式(可选):-// 'direct' = 直连(默认,速度最快,但部分网络/代理下会被 418)-// 'builtin' = 内置 /proxy/(需后端已部署且已配置密码)-// 'cors' = 公共 CORS 代理(ciao-cors,任何部署环境可用)-// 'custom' = 用户自定义代理-const IMAGE_PROXY_MODE = 'builtin'; // 本地调试用:默认走内置代理避免豆瓣直连418;部署前请改回 'direct'(保持用户在设置中可选)-// 自定义代理模板:直接拼接编码后的图片地址,或写 {url} 占位符由系统替换-const CUSTOM_IMAGE_PROXY = '';-window.IMAGE_PROXY_MODE = localStorage.getItem('imageProxyMode') || IMAGE_PROXY_MODE;-try { window.CUSTOM_IMAGE_PROXY = localStorage.getItem('customImageProxy') || CUSTOM_IMAGE_PROXY; } catch (e) {}---// 添加聚合搜索的配置选项-const AGGREGATED_SEARCH_CONFIG = {- enabled: true, // 是否启用聚合搜索- timeout: 8000, // 单个源超时时间(毫秒)- maxResults: 10000, // 最大结果数量- parallelRequests: true, // 是否并行请求所有源- showSourceBadges: true // 是否显示来源徽章-};--// 抽象API请求配置-const API_CONFIG = {- search: {- // 只拼接参数部分,不再包含 /api.php/provide/vod/- path: '?ac=videolist&wd=',- pagePath: '?ac=videolist&wd={query}&pg={page}',- maxPages: 50, // 最大获取页数- headers: {- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36',- 'Accept': 'application/json'- }- },- detail: {- // 只拼接参数部分- path: '?ac=videolist&ids=',- headers: {- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36',- 'Accept': 'application/json'- }- }-};--// 优化后的正则表达式模式-const M3U8_PATTERN = /\$https?:\/\/[^"'\s]+?\.m3u8/g;--// 添加自定义播放器URL-const CUSTOM_PLAYER_URL = 'player.html'; // 使用相对路径引用本地player.html--// 增加视频播放相关配置-const PLAYER_CONFIG = {- autoplay: true,- allowFullscreen: true,- width: '100%',- height: '600',- timeout: 15000, // 播放器加载超时时间- filterAds: true, // 是否启用广告过滤- autoPlayNext: true, // 默认启用自动连播功能- adFilteringEnabled: true, // 默认开启分片广告过滤- adFilteringStorage: 'adFilteringEnabled' // 存储广告过滤设置的键名-};--// 增加错误信息本地化-const ERROR_MESSAGES = {- NETWORK_ERROR: '网络连接错误,请检查网络设置',- TIMEOUT_ERROR: '请求超时,服务器响应时间过长',- API_ERROR: 'API接口返回错误,请尝试更换数据源',- PLAYER_ERROR: '播放器加载失败,请尝试其他视频源',- UNKNOWN_ERROR: '发生未知错误,请刷新页面重试'-};--// 添加进一步安全设置-const SECURITY_CONFIG = {- enableXSSProtection: true, // 是否启用XSS保护- sanitizeUrls: true, // 是否清理URL- maxQueryLength: 100, // 最大搜索长度- // allowedApiDomains 不再需要,因为所有请求都通过内部代理-};--// 添加多个自定义API源的配置-const CUSTOM_API_CONFIG = {- separator: ',', // 分隔符- maxSources: 5, // 最大允许的自定义源数量- testTimeout: 5000, // 测试超时时间(毫秒)- namePrefix: 'Custom-', // 自定义源名称前缀- validateUrl: true, // 验证URL格式- cacheResults: true, // 缓存测试结果- cacheExpiry: 5184000000, // 缓存过期时间(2个月)- adultPropName: 'isAdult' // 用于标记成人内容的属性名-};--// 隐藏内置黄色采集站API的变量-const HIDE_BUILTIN_ADULT_APIS = false;diff --git a/js/customer_site.js b/js/customer_site.jsdeleted file mode 100644index 1c1a3cd..0000000--- a/js/customer_site.js+++ /dev/null@@ -1,9 +0,0 @@-// 空壳设计:不内置任何数据源,全部由用户在设置中添加自定义 API。-const CUSTOMER_SITES = {};--// 调用全局方法合并-if (window.extendAPISites) {- window.extendAPISites(CUSTOMER_SITES);-} else {- console.error("错误:请先加载 config.js!");-}diff --git a/js/douban.js b/js/douban.jsdeleted file mode 100644index c86bb0d..0000000--- a/js/douban.js+++ /dev/null@@ -1,862 +0,0 @@-// ===== 图片加载方式(可选:直连 / 内置代理 / CORS代理 / 自定义代理)=====-// 各模式的 URL 构造器-const IMAGE_PROXY_BUILDERS = {- // 直连:原图地址- direct: u => u,- // 内置代理:/proxy/ 并附带鉴权 token(需后端+密码)- builtin: u => (window.ProxyAuth && window.ProxyAuth.addAuthToProxyUrl)- ? window.ProxyAuth.addAuthToProxyUrl(PROXY_URL + encodeURIComponent(u))- : PROXY_URL + encodeURIComponent(u),- // 公共 CORS 代理:ciao-cors- cors: u => (window.FALLBACK_CORS_PROXY || '') + encodeURIComponent(u),- // 自定义代理:模板支持 {url} 占位符- custom: u => {- const tpl = (window.CUSTOM_IMAGE_PROXY || '').trim();- if (!tpl) return null;- return tpl.indexOf('{url}') !== -1 ? tpl.replace('{url}', encodeURIComponent(u)) : tpl + encodeURIComponent(u);- }-};--const IMAGE_PROXY_ORDER = ['direct', 'builtin', 'cors', 'custom'];--// 根据当前设置生成主图 URL 与兜底链(其余模式依次尝试)-function buildImageProxyConfig(u) {- const mode = window.IMAGE_PROXY_MODE || 'direct';- let primary = IMAGE_PROXY_BUILDERS[mode] ? IMAGE_PROXY_BUILDERS[mode](u) : null;- if (!primary) primary = u; // 模式无效或自定义代理为空时回退直连- const candidates = IMAGE_PROXY_ORDER- .filter(m => m !== mode)- .map(m => IMAGE_PROXY_BUILDERS[m](u))- .filter(Boolean);- return { primary, fallback: encodeURIComponent(JSON.stringify(candidates)) };-}--// HTML 属性转义,避免 url 中的 & 或 " 破坏标签-function escapeHtmlAttr(s) {- return String(s)- .replace(/&/g, '&')- .replace(/"/g, '"')- .replace(/</g, '<')- .replace(/>/g, '>');-}--// 图片加载失败时按兜底链依次切换(由 img 的 onerror 调用)-window.handleImageError = function (img) {- try {- const arr = JSON.parse(decodeURIComponent(img.getAttribute('data-fallback') || ''));- if (Array.isArray(arr) && arr.length) {- img.src = arr.shift();- img.setAttribute('data-fallback', encodeURIComponent(JSON.stringify(arr)));- return;- }- } catch (e) { /* 忽略 */ }- // 兜底链已耗尽,使用最终占位图(若有),并停止重试避免死循环- const ph = img.getAttribute('data-placeholder');- if (ph) img.src = ph;- img.onerror = null;-};--// 初始化「图片加载方式」设置项-function initImageProxySettings() {- const sel = document.getElementById('imageProxyMode');- const inp = document.getElementById('customImageProxy');- if (!sel) return;-- sel.value = window.IMAGE_PROXY_MODE || 'direct';- if (inp) inp.value = window.CUSTOM_IMAGE_PROXY || '';-- const refresh = () => {- if (localStorage.getItem('doubanEnabled') === 'true') {- renderRecommend(doubanCurrentTag, doubanPageSize, doubanPageStart);- }- };- const apply = () => {- window.IMAGE_PROXY_MODE = sel.value;- if (inp) window.CUSTOM_IMAGE_PROXY = inp.value.trim();- try {- localStorage.setItem('imageProxyMode', sel.value);- if (inp) localStorage.setItem('customImageProxy', inp.value.trim());- } catch (e) { /* 忽略 */ }- refresh();- };-- sel.addEventListener('change', apply);- if (inp) {- // 输入时实时保存(不刷新),失焦/回车时应用并刷新- inp.addEventListener('input', () => {- window.CUSTOM_IMAGE_PROXY = inp.value.trim();- try { localStorage.setItem('customImageProxy', inp.value.trim()); } catch (e) { /* 忽略 */ }- });- inp.addEventListener('change', apply);- }-}--// 豆瓣热门电影电视剧推荐功能--// 豆瓣标签列表 - 修改为默认标签-let defaultMovieTags = ['热门', '最新', '经典', '豆瓣高分', '冷门佳片', '华语', '欧美', '韩国', '日本', '动作', '喜剧', '日综', '爱情', '科幻', '悬疑', '恐怖', '治愈'];-let defaultTvTags = ['热门', '美剧', '英剧', '韩剧', '日剧', '国产剧', '港剧', '日本动画', '综艺', '纪录片'];--// 用户标签列表 - 存储用户实际使用的标签(包含保留的系统标签和用户添加的自定义标签)-let movieTags = [];-let tvTags = [];--// 加载用户标签-function loadUserTags() {- try {- // 尝试从本地存储加载用户保存的标签- const savedMovieTags = localStorage.getItem('userMovieTags');- const savedTvTags = localStorage.getItem('userTvTags');-- // 如果本地存储中有标签数据,则使用它- if (savedMovieTags) {- movieTags = JSON.parse(savedMovieTags);- } else {- // 否则使用默认标签- movieTags = [...defaultMovieTags];- }-- if (savedTvTags) {- tvTags = JSON.parse(savedTvTags);- } else {- // 否则使用默认标签- tvTags = [...defaultTvTags];- }- } catch (e) {- console.error('加载标签失败:', e);- // 初始化为默认值,防止错误- movieTags = [...defaultMovieTags];- tvTags = [...defaultTvTags];- }-}--// 保存用户标签-function saveUserTags() {- try {- localStorage.setItem('userMovieTags', JSON.stringify(movieTags));- localStorage.setItem('userTvTags', JSON.stringify(tvTags));- } catch (e) {- console.error('保存标签失败:', e);- showToast('保存标签失败', 'error');- }-}--let doubanMovieTvCurrentSwitch = 'movie';-let doubanCurrentTag = '热门';-let doubanPageStart = 0;-const doubanPageSize = 16; // 一次显示的项目数量--// 初始化豆瓣功能-function initDouban() {- // 设置豆瓣开关的初始状态- const doubanToggle = document.getElementById('doubanToggle');- if (doubanToggle) {- const isEnabled = localStorage.getItem('doubanEnabled') === 'true';- doubanToggle.checked = isEnabled;-- // 设置开关外观- const toggleBg = doubanToggle.nextElementSibling;- const toggleDot = toggleBg.nextElementSibling;- if (isEnabled) {- toggleBg.classList.add('bg-pink-600');- toggleDot.classList.add('translate-x-6');- }-- // 添加事件监听- doubanToggle.addEventListener('change', function(e) {- const isChecked = e.target.checked;- localStorage.setItem('doubanEnabled', isChecked);-- // 更新开关外观- if (isChecked) {- toggleBg.classList.add('bg-pink-600');- toggleDot.classList.add('translate-x-6');- } else {- toggleBg.classList.remove('bg-pink-600');- toggleDot.classList.remove('translate-x-6');- }-- // 更新显示状态- updateDoubanVisibility();- });-- // 初始更新显示状态- updateDoubanVisibility();-- // 滚动到页面顶部- window.scrollTo(0, 0);- }-- // 初始化图片加载方式设置项(读取并绑定「设置 → 图片加载方式」)- initImageProxySettings();-- // 加载用户标签- loadUserTags();-- // 渲染电影/电视剧切换- renderDoubanMovieTvSwitch();-- // 渲染豆瓣标签- renderDoubanTags();-- // 换一批按钮事件监听- setupDoubanRefreshBtn();-- // 初始加载热门内容- if (localStorage.getItem('doubanEnabled') === 'true') {- renderRecommend(doubanCurrentTag, doubanPageSize, doubanPageStart);- }-}--// 根据设置更新豆瓣区域的显示状态-function updateDoubanVisibility() {- const doubanArea = document.getElementById('doubanArea');- if (!doubanArea) return;-- const isEnabled = localStorage.getItem('doubanEnabled') === 'true';- const isSearching = document.getElementById('resultsArea') &&- !document.getElementById('resultsArea').classList.contains('hidden');-- // 只有在启用且没有搜索结果显示时才显示豆瓣区域- if (isEnabled && !isSearching) {- doubanArea.classList.remove('hidden');- // 如果豆瓣结果为空,重新加载- if (document.getElementById('douban-results').children.length === 0) {- renderRecommend(doubanCurrentTag, doubanPageSize, doubanPageStart);- }- } else {- doubanArea.classList.add('hidden');- }-}--// 只填充搜索框,不执行搜索,让用户自主决定搜索时机-function fillSearchInput(title) {- if (!title) return;-- // 安全处理标题,防止XSS- const safeTitle = title- .replace(/</g, '<')- .replace(/>/g, '>')- .replace(/"/g, '"');-- const input = document.getElementById('searchInput');- if (input) {- input.value = safeTitle;-- // 聚焦搜索框,便于用户立即使用键盘操作- input.focus();-- // 显示一个提示,告知用户点击搜索按钮进行搜索- showToast('已填充搜索内容,点击搜索按钮开始搜索', 'info');- }-}--// 填充搜索框并执行搜索-function fillAndSearch(title) {- if (!title) return;-- // 安全处理标题,防止XSS- const safeTitle = title- .replace(/</g, '<')- .replace(/>/g, '>')- .replace(/"/g, '"');-- const input = document.getElementById('searchInput');- if (input) {- input.value = safeTitle;- search(); // 使用已有的search函数执行搜索-- // 同时更新浏览器URL,使其反映当前的搜索状态- try {- // 使用URI编码确保特殊字符能够正确显示- const encodedQuery = encodeURIComponent(safeTitle);- // 使用HTML5 History API更新URL,不刷新页面- window.history.pushState(- { search: safeTitle },- `搜索: ${safeTitle} - LibreTV`,- `/s=${encodedQuery}`- );- // 更新页面标题- document.title = `搜索: ${safeTitle} - LibreTV`;- } catch (e) {- console.error('更新浏览器历史失败:', e);- }- }-}--// 填充搜索框,确保豆瓣资源API被选中,然后执行搜索-async function fillAndSearchWithDouban(title) {- if (!title) return;-- // 安全处理标题,防止XSS- const safeTitle = title- .replace(/</g, '<')- .replace(/>/g, '>')- .replace(/"/g, '"');-- // 说明:本项目不内置数据源(含豆瓣源),故不再自动勾选不存在的豆瓣资源API。- // 直接填充搜索框并执行用户已有数据源的搜索即可。- const input = document.getElementById('searchInput');- if (input) {- input.value = safeTitle;- await search(); // 使用已有的search函数执行搜索-- // 更新浏览器URL,使其反映当前的搜索状态- try {- // 使用URI编码确保特殊字符能够正确显示- const encodedQuery = encodeURIComponent(safeTitle);- // 使用HTML5 History API更新URL,不刷新页面- window.history.pushState(- { search: safeTitle },- `搜索: ${safeTitle} - LibreTV`,- `/s=${encodedQuery}`- );- // 更新页面标题- document.title = `搜索: ${safeTitle} - LibreTV`;- } catch (e) {- console.error('更新浏览器历史失败:', e);- }-- if (window.innerWidth <= 768) {- window.scrollTo({- top: 0,- behavior: 'smooth'- });- }- }-}--// 渲染电影/电视剧切换器-function renderDoubanMovieTvSwitch() {- // 获取切换按钮元素- const movieToggle = document.getElementById('douban-movie-toggle');- const tvToggle = document.getElementById('douban-tv-toggle');-- if (!movieToggle ||!tvToggle) return;-- movieToggle.addEventListener('click', function() {- if (doubanMovieTvCurrentSwitch !== 'movie') {- // 更新按钮样式- movieToggle.classList.add('bg-pink-600', 'text-white');- movieToggle.classList.remove('text-gray-300');-- tvToggle.classList.remove('bg-pink-600', 'text-white');- tvToggle.classList.add('text-gray-300');-- doubanMovieTvCurrentSwitch = 'movie';- doubanCurrentTag = '热门';-- // 重新加载豆瓣内容- renderDoubanTags(movieTags);-- // 换一批按钮事件监听- setupDoubanRefreshBtn();-- // 初始加载热门内容- if (localStorage.getItem('doubanEnabled') === 'true') {- renderRecommend(doubanCurrentTag, doubanPageSize, doubanPageStart);- }- }- });-- // 电视剧按钮点击事件- tvToggle.addEventListener('click', function() {- if (doubanMovieTvCurrentSwitch !== 'tv') {- // 更新按钮样式- tvToggle.classList.add('bg-pink-600', 'text-white');- tvToggle.classList.remove('text-gray-300');-- movieToggle.classList.remove('bg-pink-600', 'text-white');- movieToggle.classList.add('text-gray-300');-- doubanMovieTvCurrentSwitch = 'tv';- doubanCurrentTag = '热门';-- // 重新加载豆瓣内容- renderDoubanTags(tvTags);-- // 换一批按钮事件监听- setupDoubanRefreshBtn();-- // 初始加载热门内容- if (localStorage.getItem('doubanEnabled') === 'true') {- renderRecommend(doubanCurrentTag, doubanPageSize, doubanPageStart);- }- }- });-}--// 渲染豆瓣标签选择器-function renderDoubanTags(tags) {- const tagContainer = document.getElementById('douban-tags');- if (!tagContainer) return;-- // 确定当前应该使用的标签列表- const currentTags = doubanMovieTvCurrentSwitch === 'movie' ? movieTags : tvTags;-- // 清空标签容器- tagContainer.innerHTML = '';-- // 先添加标签管理按钮- const manageBtn = document.createElement('button');- manageBtn.className = 'py-1.5 px-3.5 rounded text-sm font-medium transition-all duration-300 bg-[#1a1a1a] text-gray-300 hover:bg-pink-700 hover:text-white border border-[#333] hover:border-white';- manageBtn.innerHTML = '<span class="flex items-center"><svg class="w-3 h-3 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"></path></svg>管理标签</span>';- manageBtn.onclick = function() {- showTagManageModal();- };- tagContainer.appendChild(manageBtn);-- // 添加所有标签- currentTags.forEach(tag => {- const btn = document.createElement('button');-- // 设置样式- let btnClass = 'py-1.5 px-3.5 rounded text-sm font-medium transition-all duration-300 border ';-- // 当前选中的标签使用高亮样式- if (tag === doubanCurrentTag) {- btnClass += 'bg-pink-600 text-white shadow-md border-white';- } else {- btnClass += 'bg-[#1a1a1a] text-gray-300 hover:bg-pink-700 hover:text-white border-[#333] hover:border-white';- }-- btn.className = btnClass;- btn.textContent = tag;-- btn.onclick = function() {- if (doubanCurrentTag !== tag) {- doubanCurrentTag = tag;- doubanPageStart = 0;- renderRecommend(doubanCurrentTag, doubanPageSize, doubanPageStart);- renderDoubanTags();- }- };-- tagContainer.appendChild(btn);- });-}--// 设置换一批按钮事件-function setupDoubanRefreshBtn() {- // 修复ID,使用正确的ID douban-refresh 而不是 douban-refresh-btn- const btn = document.getElementById('douban-refresh');- if (!btn) return;-- btn.onclick = function() {- doubanPageStart += doubanPageSize;- if (doubanPageStart > 9 * doubanPageSize) {- doubanPageStart = 0;- }-- renderRecommend(doubanCurrentTag, doubanPageSize, doubanPageStart);- };-}--function fetchDoubanTags() {- const movieTagsTarget = `https://movie.douban.com/j/search_tags?type=movie`- fetchDoubanData(movieTagsTarget)- .then(data => {- movieTags = data.tags;- if (doubanMovieTvCurrentSwitch === 'movie') {- renderDoubanTags(movieTags);- }- })- .catch(error => {- console.error("获取豆瓣热门电影标签失败:", error);- });- const tvTagsTarget = `https://movie.douban.com/j/search_tags?type=tv`- fetchDoubanData(tvTagsTarget)- .then(data => {- tvTags = data.tags;- if (doubanMovieTvCurrentSwitch === 'tv') {- renderDoubanTags(tvTags);- }- })- .catch(error => {- console.error("获取豆瓣热门电视剧标签失败:", error);- });-}--// 渲染热门推荐内容-function renderRecommend(tag, pageLimit, pageStart) {- const container = document.getElementById("douban-results");- if (!container) return;-- const loadingOverlayHTML = `- <div class="absolute inset-0 bg-black/80 backdrop-blur-sm flex items-center justify-center z-10">- <div class="flex items-center justify-center">- <div class="w-6 h-6 border-2 border-pink-500 border-t-transparent rounded-full animate-spin inline-block"></div>- <span class="text-pink-500 ml-4">加载中...</span>- </div>- </div>- `;-- container.classList.add("relative");- container.insertAdjacentHTML('beforeend', loadingOverlayHTML);-- const target = `https://movie.douban.com/j/search_subjects?type=${doubanMovieTvCurrentSwitch}&tag=${tag}&sort=recommend&page_limit=${pageLimit}&page_start=${pageStart}`;-- // 使用通用请求函数- fetchDoubanData(target)- .then(data => {- renderDoubanCards(data, container);- })- .catch(error => {- console.error("获取豆瓣数据失败:", error);- container.innerHTML = `- <div class="col-span-full text-center py-8">- <div class="text-red-400">❌ 获取豆瓣数据失败,请稍后重试</div>- <div class="text-gray-500 text-sm mt-2">提示:使用VPN可能有助于解决此问题</div>- </div>- `;- });-}--async function fetchDoubanData(url) {- // 添加超时控制- const controller = new AbortController();- const timeoutId = setTimeout(() => controller.abort(), 10000); // 10秒超时-- // 设置请求选项,包括信号和头部- const fetchOptions = {- signal: controller.signal,- headers: {- 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36',- 'Referer': 'https://movie.douban.com/',- 'Accept': 'application/json, text/plain, */*',- }- };-- try {- // 添加鉴权参数到代理URL- const proxiedUrl = await window.ProxyAuth?.addAuthToProxyUrl ?- await window.ProxyAuth.addAuthToProxyUrl(PROXY_URL + encodeURIComponent(url)) :- PROXY_URL + encodeURIComponent(url);-- // 尝试直接访问(豆瓣API可能允许部分CORS请求)- const response = await fetch(proxiedUrl, fetchOptions);- clearTimeout(timeoutId);-- if (!response.ok) {- throw new Error(`HTTP error! Status: ${response.status}`);- }-- return await response.json();- } catch (err) {- console.error("豆瓣 API 请求失败(直接代理):", err);-- // 失败后尝试备用方法:作为备选- const fallbackUrl = `https://api.allorigins.win/get?url=${encodeURIComponent(url)}`;-- try {- const fallbackResponse = await fetch(fallbackUrl);-- if (!fallbackResponse.ok) {- throw new Error(`备用API请求失败! 状态: ${fallbackResponse.status}`);- }-- const data = await fallbackResponse.json();-- // 解析原始内容- if (data && data.contents) {- return JSON.parse(data.contents);- } else {- throw new Error("无法获取有效数据");- }- } catch (fallbackErr) {- console.error("豆瓣 API 备用请求也失败:", fallbackErr);- throw fallbackErr; // 向上抛出错误,让调用者处理- }- }-}--// 抽取渲染豆瓣卡片的逻辑到单独函数-function renderDoubanCards(data, container) {- // 创建文档片段以提高性能- const fragment = document.createDocumentFragment();-- // 如果没有数据- if (!data.subjects || data.subjects.length === 0) {- const emptyEl = document.createElement("div");- emptyEl.className = "col-span-full text-center py-8";- emptyEl.innerHTML = `- <div class="text-pink-500">❌ 暂无数据,请尝试其他分类或刷新</div>- `;- fragment.appendChild(emptyEl);- } else {- // 循环创建每个影视卡片- data.subjects.forEach(item => {- const card = document.createElement("div");- card.className = "bg-[#111] hover:bg-[#222] transition-all duration-300 rounded-lg overflow-hidden flex flex-col transform hover:scale-105 shadow-md hover:shadow-lg";-- // 生成卡片内容,确保安全显示(防止XSS)- const safeTitle = item.title- .replace(/</g, '<')- .replace(/>/g, '>')- .replace(/"/g, '"');-- const safeRate = (item.rate || "暂无")- .replace(/</g, '<')- .replace(/>/g, '>');-- // 处理图片URL:根据设置中的「图片加载方式」生成主图与兜底链- const originalCoverUrl = item.cover;- const imgCfg = buildImageProxyConfig(originalCoverUrl);-- // 为不同设备优化卡片布局- card.innerHTML = `- <div class="relative w-full aspect-[2/3] overflow-hidden cursor-pointer" onclick="fillAndSearchWithDouban('${safeTitle}')">- <img src="${escapeHtmlAttr(imgCfg.primary)}" alt="${safeTitle}"- class="w-full h-full object-cover transition-transform duration-500 hover:scale-110"- onerror="window.handleImageError(this)"- data-fallback="${imgCfg.fallback}"- loading="lazy" referrerpolicy="no-referrer">- <div class="absolute inset-0 bg-gradient-to-t from-black to-transparent opacity-60"></div>- <div class="absolute bottom-2 left-2 bg-black/70 text-white text-xs px-2 py-1 rounded-sm">- <span class="text-yellow-400">★</span> ${safeRate}- </div>- <div class="absolute bottom-2 right-2 bg-black/70 text-white text-xs px-2 py-1 rounded-sm hover:bg-[#333] transition-colors">- <a href="${item.url}" target="_blank" rel="noopener noreferrer" title="在豆瓣查看" onclick="event.stopPropagation();">- 🔗- </a>- </div>- </div>- <div class="p-2 text-center bg-[#111]">- <button onclick="fillAndSearchWithDouban('${safeTitle}')"- class="text-sm font-medium text-white truncate w-full hover:text-pink-400 transition"- title="${safeTitle}">- ${safeTitle}- </button>- </div>- `;-- fragment.appendChild(card);- });- }-- // 清空并添加所有新元素- container.innerHTML = "";- container.appendChild(fragment);-}--// 重置到首页-function resetToHome() {- resetSearchArea();- updateDoubanVisibility();-}--// 加载豆瓣首页内容-document.addEventListener('DOMContentLoaded', initDouban);--// 显示标签管理模态框-function showTagManageModal() {- // 确保模态框在页面上只有一个实例- let modal = document.getElementById('tagManageModal');- if (modal) {- document.body.removeChild(modal);- }-- // 创建模态框元素- modal = document.createElement('div');- modal.id = 'tagManageModal';- modal.className = 'fixed inset-0 bg-black bg-opacity-75 flex items-center justify-center z-40';-- // 当前使用的标签类型和默认标签- const isMovie = doubanMovieTvCurrentSwitch === 'movie';- const currentTags = isMovie ? movieTags : tvTags;- const defaultTags = isMovie ? defaultMovieTags : defaultTvTags;-- // 模态框内容- modal.innerHTML = `- <div class="bg-[#191919] rounded-lg p-6 max-w-md w-full max-h-[90vh] overflow-y-auto relative">- <button id="closeTagModal" class="absolute top-4 right-4 text-gray-400 hover:text-white text-xl">×</button>-- <h3 class="text-xl font-bold text-white mb-4">标签管理 (${isMovie ? '电影' : '电视剧'})</h3>-- <div class="mb-4">- <div class="flex justify-between items-center mb-2">- <h4 class="text-lg font-medium text-gray-300">标签列表</h4>- <button id="resetTagsBtn" class="text-xs px-2 py-1 bg-gray-700 hover:bg-gray-600 text-white rounded">- 恢复默认标签- </button>- </div>- <div class="grid grid-cols-2 sm:grid-cols-3 gap-2 mb-4" id="tagsGrid">- ${currentTags.length ? currentTags.map(tag => {- // "热门"标签不能删除- const canDelete = tag !== '热门';- return `- <div class="bg-[#1a1a1a] text-gray-300 py-1.5 px-3 rounded text-sm font-medium flex justify-between items-center group">- <span>${tag}</span>- ${canDelete ?- `<button class="delete-tag-btn text-gray-500 hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity"- data-tag="${tag}">✕</button>` :- `<span class="text-gray-500 text-xs italic opacity-0 group-hover:opacity-100">必需</span>`- }- </div>- `;- }).join('') :- `<div class="col-span-full text-center py-4 text-gray-500">无标签,请添加或恢复默认</div>`}- </div>- </div>-- <div class="border-t border-gray-700 pt-4">- <h4 class="text-lg font-medium text-gray-300 mb-3">添加新标签</h4>- <form id="addTagForm" class="flex items-center">- <input type="text" id="newTagInput" placeholder="输入标签名称..."- class="flex-1 bg-[#222] text-white border border-gray-700 rounded px-3 py-2 focus:outline-none focus:border-pink-500">- <button type="submit" class="ml-2 bg-pink-600 hover:bg-pink-700 text-white px-4 py-2 rounded">添加</button>- </form>- <p class="text-xs text-gray-500 mt-2">提示:标签名称不能为空,不能重复,不能包含特殊字符</p>- </div>- </div>- `;-- // 添加模态框到页面- document.body.appendChild(modal);-- // 焦点放在输入框上- setTimeout(() => {- document.getElementById('newTagInput').focus();- }, 100);-- // 添加事件监听器 - 关闭按钮- document.getElementById('closeTagModal').addEventListener('click', function() {- document.body.removeChild(modal);- });-- // 添加事件监听器 - 点击模态框外部关闭- modal.addEventListener('click', function(e) {- if (e.target === modal) {- document.body.removeChild(modal);- }- });-- // 添加事件监听器 - 恢复默认标签按钮- document.getElementById('resetTagsBtn').addEventListener('click', function() {- resetTagsToDefault();- showTagManageModal(); // 重新加载模态框- });-- // 添加事件监听器 - 删除标签按钮- const deleteButtons = document.querySelectorAll('.delete-tag-btn');- deleteButtons.forEach(btn => {- btn.addEventListener('click', function() {- const tagToDelete = this.getAttribute('data-tag');- deleteTag(tagToDelete);- showTagManageModal(); // 重新加载模态框- });- });-- // 添加事件监听器 - 表单提交- document.getElementById('addTagForm').addEventListener('submit', function(e) {- e.preventDefault();- const input = document.getElementById('newTagInput');- const newTag = input.value.trim();-- if (newTag) {- addTag(newTag);- input.value = '';- showTagManageModal(); // 重新加载模态框- }- });-}--// 添加标签-function addTag(tag) {- // 安全处理标签名,防止XSS- const safeTag = tag- .replace(/</g, '<')- .replace(/>/g, '>')- .replace(/"/g, '"');-- // 确定当前使用的是电影还是电视剧标签- const isMovie = doubanMovieTvCurrentSwitch === 'movie';- const currentTags = isMovie ? movieTags : tvTags;-- // 检查是否已存在(忽略大小写)- const exists = currentTags.some(- existingTag => existingTag.toLowerCase() === safeTag.toLowerCase()- );-- if (exists) {- showToast('标签已存在', 'warning');- return;- }-- // 添加到对应的标签数组- if (isMovie) {- movieTags.push(safeTag);- } else {- tvTags.push(safeTag);- }-- // 保存到本地存储- saveUserTags();-- // 重新渲染标签- renderDoubanTags();-- showToast('标签添加成功', 'success');-}--// 删除标签-function deleteTag(tag) {- // 热门标签不能删除- if (tag === '热门') {- showToast('热门标签不能删除', 'warning');- return;- }-- // 确定当前使用的是电影还是电视剧标签- const isMovie = doubanMovieTvCurrentSwitch === 'movie';- const currentTags = isMovie ? movieTags : tvTags;-- // 寻找标签索引- const index = currentTags.indexOf(tag);-- // 如果找到标签,则删除- if (index !== -1) {- currentTags.splice(index, 1);-- // 保存到本地存储- saveUserTags();-- // 如果当前选中的是被删除的标签,则重置为"热门"- if (doubanCurrentTag === tag) {- doubanCurrentTag = '热门';- doubanPageStart = 0;- renderRecommend(doubanCurrentTag, doubanPageSize, doubanPageStart);- }-- // 重新渲染标签- renderDoubanTags();-- showToast('标签删除成功', 'success');- }-}--// 重置为默认标签-function resetTagsToDefault() {- // 确定当前使用的是电影还是电视剧- const isMovie = doubanMovieTvCurrentSwitch === 'movie';-- // 重置为默认标签- if (isMovie) {- movieTags = [...defaultMovieTags];- } else {- tvTags = [...defaultTvTags];- }-- // 设置当前标签为热门- doubanCurrentTag = '热门';- doubanPageStart = 0;-- // 保存到本地存储- saveUserTags();-- // 重新渲染标签和内容- renderDoubanTags();- renderRecommend(doubanCurrentTag, doubanPageSize, doubanPageStart);-- showToast('已恢复默认标签', 'success');-}diff --git a/js/index-page.js b/js/index-page.jsdeleted file mode 100644index e88d63e..0000000--- a/js/index-page.js+++ /dev/null@@ -1,80 +0,0 @@-// 页面加载后显示弹窗脚本-document.addEventListener('DOMContentLoaded', function() {- // 弹窗显示脚本- // 检查用户是否已经看过声明- const hasSeenDisclaimer = localStorage.getItem('hasSeenDisclaimer');-- if (!hasSeenDisclaimer) {- // 显示弹窗- const disclaimerModal = document.getElementById('disclaimerModal');- disclaimerModal.style.display = 'flex';-- // 添加接受按钮事件- document.getElementById('acceptDisclaimerBtn').addEventListener('click', function() {- // 保存用户已看过声明的状态- localStorage.setItem('hasSeenDisclaimer', 'true');- // 隐藏弹窗- disclaimerModal.style.display = 'none';- });- }-- // URL搜索参数处理脚本- // 首先检查是否是播放URL格式 (/watch 开头的路径)- if (window.location.pathname.startsWith('/watch')) {- // 播放URL,不做额外处理,watch.html会处理重定向- return;- }-- // 检查页面路径中的搜索参数 (格式: /s=keyword)- const path = window.location.pathname;- const searchPrefix = '/s=';-- if (path.startsWith(searchPrefix)) {- // 提取搜索关键词- const keyword = decodeURIComponent(path.substring(searchPrefix.length));- if (keyword) {- // 设置搜索框的值- document.getElementById('searchInput').value = keyword;- // 显示清空按钮- toggleClearButton();- // 执行搜索- setTimeout(() => {- // 使用setTimeout确保其他DOM加载和初始化完成- search();- // 更新浏览器历史,不改变URL (保持搜索参数在地址栏)- try {- window.history.replaceState(- { search: keyword },- `搜索: ${keyword} - LibreTV`,- window.location.href- );- } catch (e) {- console.error('更新浏览器历史失败:', e);- }- }, 300);- }- }-- // 也检查查询字符串中的搜索参数 (格式: ?s=keyword)- const urlParams = new URLSearchParams(window.location.search);- const searchQuery = urlParams.get('s');-- if (searchQuery) {- // 设置搜索框的值- document.getElementById('searchInput').value = searchQuery;- // 执行搜索- setTimeout(() => {- search();- // 更新URL为规范格式- try {- window.history.replaceState(- { search: searchQuery },- `搜索: ${searchQuery} - LibreTV`,- `/s=${encodeURIComponent(searchQuery)}`- );- } catch (e) {- console.error('更新浏览器历史失败:', e);- }- }, 300);- }-});diff --git a/js/password.js b/js/password.jsdeleted file mode 100644index 45aef81..0000000--- a/js/password.js+++ /dev/null@@ -1,249 +0,0 @@-// 密码保护功能--/**- * 检查是否设置了密码保护- * 通过读取页面上嵌入的环境变量来检查- */-function isPasswordProtected() {- // 只检查普通密码- const pwd = window.__ENV__ && window.__ENV__.PASSWORD;-- // 检查普通密码是否有效- return typeof pwd === 'string' && pwd.length === 64 && !/^0+$/.test(pwd);-}--/**- * 检查是否强制要求设置密码- * 如果没有设置有效的 PASSWORD,则认为需要强制设置密码- * 为了安全考虑,所有部署都必须设置密码- */-function isPasswordRequired() {- return !isPasswordProtected();-}--/**- * 强制密码保护检查 - 防止绕过- * 在关键操作前都应该调用此函数- */-function ensurePasswordProtection() {- if (isPasswordRequired()) {- showPasswordModal();- throw new Error('Password protection is required');- }- if (isPasswordProtected() && !isPasswordVerified()) {- showPasswordModal();- throw new Error('Password verification required');- }- return true;-}--window.isPasswordProtected = isPasswordProtected;-window.isPasswordRequired = isPasswordRequired;--/**- * 验证用户输入的密码是否正确(异步,使用SHA-256哈希)- */-async function verifyPassword(password) {- try {- const correctHash = window.__ENV__?.PASSWORD;- if (!correctHash) return false;-- const inputHash = await sha256(password);- const isValid = inputHash === correctHash;-- if (isValid) {- localStorage.setItem(PASSWORD_CONFIG.localStorageKey, JSON.stringify({- verified: true,- timestamp: Date.now(),- passwordHash: correctHash- }));- }- return isValid;- } catch (error) {- console.error('验证密码时出错:', error);- return false;- }-}--// 验证状态检查-function isPasswordVerified() {- try {- if (!isPasswordProtected()) return true;-- const stored = localStorage.getItem(PASSWORD_CONFIG.localStorageKey);- if (!stored) return false;-- const { timestamp, passwordHash } = JSON.parse(stored);- const currentHash = window.__ENV__?.PASSWORD;-- return timestamp && passwordHash === currentHash &&- Date.now() - timestamp < PASSWORD_CONFIG.verificationTTL;- } catch (error) {- console.error('检查密码验证状态时出错:', error);- return false;- }-}--// 更新全局导出-window.isPasswordProtected = isPasswordProtected;-window.isPasswordRequired = isPasswordRequired;-window.isPasswordVerified = isPasswordVerified;-window.verifyPassword = verifyPassword;-window.ensurePasswordProtection = ensurePasswordProtection;--// SHA-256实现,可用Web Crypto API-async function sha256(message) {- if (window.crypto && crypto.subtle && crypto.subtle.digest) {- const msgBuffer = new TextEncoder().encode(message);- const hashBuffer = await crypto.subtle.digest('SHA-256', msgBuffer);- const hashArray = Array.from(new Uint8Array(hashBuffer));- return hashArray.map(b => b.toString(16).padStart(2, '0')).join('');- }- // HTTP 下调用原始 js‑sha256- if (typeof window._jsSha256 === 'function') {- return window._jsSha256(message);- }- throw new Error('No SHA-256 implementation available.');-}--/**- * 显示密码验证弹窗- */-function showPasswordModal() {- const passwordModal = document.getElementById('passwordModal');- if (passwordModal) {- // 防止出现豆瓣区域滚动条- document.getElementById('doubanArea').classList.add('hidden');- document.getElementById('passwordCancelBtn').classList.add('hidden');-- // 检查是否需要强制设置密码- if (isPasswordRequired()) {- // 修改弹窗内容提示用户需要先设置密码- const title = passwordModal.querySelector('h2');- const description = passwordModal.querySelector('p');- if (title) title.textContent = '需要设置密码';- if (description) description.textContent = '请先在部署平台设置 PASSWORD 环境变量来保护您的实例';-- // 隐藏密码输入框和提交按钮,只显示提示信息- const form = passwordModal.querySelector('form');- const errorMsg = document.getElementById('passwordError');- if (form) form.style.display = 'none';- if (errorMsg) {- errorMsg.textContent = '为确保安全,必须设置 PASSWORD 环境变量才能使用本服务,请联系管理员进行配置';- errorMsg.classList.remove('hidden');- errorMsg.className = 'text-red-500 mt-2 font-medium'; // 改为更醒目的红色- }- } else {- // 正常的密码验证模式- const title = passwordModal.querySelector('h2');- const description = passwordModal.querySelector('p');- if (title) title.textContent = '访问验证';- if (description) description.textContent = '请输入密码继续访问';-- const form = passwordModal.querySelector('form');- if (form) form.style.display = 'block';- }-- passwordModal.style.display = 'flex';-- // 只有在非强制设置密码模式下才聚焦输入框- if (!isPasswordRequired()) {- // 确保输入框获取焦点- setTimeout(() => {- const passwordInput = document.getElementById('passwordInput');- if (passwordInput) {- passwordInput.focus();- }- }, 100);- }- }-}--/**- * 隐藏密码验证弹窗- */-function hidePasswordModal() {- const passwordModal = document.getElementById('passwordModal');- if (passwordModal) {- // 隐藏密码错误提示- hidePasswordError();-- // 清空密码输入框- const passwordInput = document.getElementById('passwordInput');- if (passwordInput) passwordInput.value = '';-- passwordModal.style.display = 'none';-- // 如果启用豆瓣区域则显示豆瓣区域- if (localStorage.getItem('doubanEnabled') === 'true') {- document.getElementById('doubanArea').classList.remove('hidden');- initDouban();- }- }-}--/**- * 显示密码错误信息- */-function showPasswordError() {- const errorElement = document.getElementById('passwordError');- if (errorElement) {- errorElement.classList.remove('hidden');- }-}--/**- * 隐藏密码错误信息- */-function hidePasswordError() {- const errorElement = document.getElementById('passwordError');- if (errorElement) {- errorElement.classList.add('hidden');- }-}--/**- * 处理密码提交事件(异步)- */-async function handlePasswordSubmit() {- const passwordInput = document.getElementById('passwordInput');- const password = passwordInput ? passwordInput.value.trim() : '';- if (await verifyPassword(password)) {- // 密码校验通过后用明文密码向服务端换取短时效代理 token(安全模式,需等待完成再放行)- if (window.ProxyAuth && window.ProxyAuth.ensureToken) {- await window.ProxyAuth.ensureToken(password);- }- hidePasswordModal();-- // 触发密码验证成功事件- document.dispatchEvent(new CustomEvent('passwordVerified'));- } else {- showPasswordError();- if (passwordInput) {- passwordInput.value = '';- passwordInput.focus();- }- }-}--/**- * 初始化密码验证系统- */-function initPasswordProtection() {- // 如果需要强制设置密码,显示警告弹窗- if (isPasswordRequired()) {- showPasswordModal();- return;- }-- // 如果设置了密码但用户未验证,显示密码输入框- if (isPasswordProtected() && !isPasswordVerified()) {- showPasswordModal();- return;- }-}--// 在页面加载完成后初始化密码保护-document.addEventListener('DOMContentLoaded', function () {- initPasswordProtection();-});\ No newline at end of filediff --git a/js/player.js b/js/player.jsdeleted file mode 100644index 4ec4ad0..0000000--- a/js/player.js+++ /dev/null@@ -1,1694 +0,0 @@-const selectedAPIs = JSON.parse(localStorage.getItem('selectedAPIs') || '[]');-const customAPIs = JSON.parse(localStorage.getItem('customAPIs') || '[]'); // 存储自定义API列表--// 改进返回功能-function goBack(event) {- // 防止默认链接行为- if (event) event.preventDefault();-- // 1. 优先检查URL参数中的returnUrl- const urlParams = new URLSearchParams(window.location.search);- const returnUrl = urlParams.get('returnUrl');-- if (returnUrl) {- // 如果URL中有returnUrl参数,优先使用- window.location.href = decodeURIComponent(returnUrl);- return;- }-- // 2. 检查localStorage中保存的lastPageUrl- const lastPageUrl = localStorage.getItem('lastPageUrl');- if (lastPageUrl && lastPageUrl !== window.location.href) {- window.location.href = lastPageUrl;- return;- }-- // 3. 检查是否是从搜索页面进入的播放器- const referrer = document.referrer;-- // 检查 referrer 是否包含搜索参数- if (referrer && (referrer.includes('/s=') || referrer.includes('?s='))) {- // 如果是从搜索页面来的,返回到搜索页面- window.location.href = referrer;- return;- }-- // 4. 如果是在iframe中打开的,尝试关闭iframe- if (window.self !== window.top) {- try {- // 尝试调用父窗口的关闭播放器函数- window.parent.closeVideoPlayer && window.parent.closeVideoPlayer();- return;- } catch (e) {- console.error('调用父窗口closeVideoPlayer失败:', e);- }- }-- // 5. 无法确定上一页,则返回首页- if (!referrer || referrer === '') {- window.location.href = '/';- return;- }-- // 6. 以上都不满足,使用默认行为:返回上一页- window.history.back();-}--// 页面加载时保存当前URL到localStorage,作为返回目标-window.addEventListener('load', function () {- // 保存前一页面URL- if (document.referrer && document.referrer !== window.location.href) {- localStorage.setItem('lastPageUrl', document.referrer);- }-- // 提取当前URL中的重要参数,以便在需要时能够恢复当前页面- const urlParams = new URLSearchParams(window.location.search);- const videoId = urlParams.get('id');- const sourceCode = urlParams.get('source');-- if (videoId && sourceCode) {- // 保存当前播放状态,以便其他页面可以返回- localStorage.setItem('currentPlayingId', videoId);- localStorage.setItem('currentPlayingSource', sourceCode);- }-});---// =================================-// ============== PLAYER ==========-// =================================-// 全局变量-let currentVideoTitle = '';-let currentEpisodeIndex = 0;-let art = null; // 用于 ArtPlayer 实例-let currentHls = null; // 跟踪当前HLS实例-let currentEpisodes = [];-let episodesReversed = false;-let autoplayEnabled = true; // 默认开启自动连播-let videoHasEnded = false; // 跟踪视频是否已经自然结束-let userClickedPosition = null; // 记录用户点击的位置-let shortcutHintTimeout = null; // 用于控制快捷键提示显示时间-let adFilteringEnabled = true; // 默认开启广告过滤-let progressSaveInterval = null; // 定期保存进度的计时器-let currentVideoUrl = ''; // 记录当前实际的视频URL-const isWebkit = (typeof window.webkitConvertPointFromNodeToPage === 'function')-Artplayer.FULLSCREEN_WEB_IN_BODY = true;--// 页面加载-document.addEventListener('DOMContentLoaded', function () {- // 先检查用户是否已通过密码验证- if (!isPasswordVerified()) {- // 隐藏加载提示- document.getElementById('player-loading').style.display = 'none';- return;- }-- initializePageContent();-});--// 监听密码验证成功事件-document.addEventListener('passwordVerified', () => {- document.getElementById('player-loading').style.display = 'block';-- initializePageContent();-});--// 初始化页面内容-function initializePageContent() {-- // 解析URL参数- const urlParams = new URLSearchParams(window.location.search);- let videoUrl = urlParams.get('url');- const title = urlParams.get('title');- const sourceCode = urlParams.get('source');- let index = parseInt(urlParams.get('index') || '0');- const episodesList = urlParams.get('episodes'); // 从URL获取集数信息- const savedPosition = parseInt(urlParams.get('position') || '0'); // 获取保存的播放位置- // 解决历史记录问题:检查URL是否是player.html开头的链接- // 如果是,说明这是历史记录重定向,需要解析真实的视频URL- if (videoUrl && videoUrl.includes('player.html')) {- try {- // 尝试从嵌套URL中提取真实的视频链接- const nestedUrlParams = new URLSearchParams(videoUrl.split('?')[1]);- // 从嵌套参数中获取真实视频URL- const nestedVideoUrl = nestedUrlParams.get('url');- // 检查嵌套URL是否包含播放位置信息- const nestedPosition = nestedUrlParams.get('position');- const nestedIndex = nestedUrlParams.get('index');- const nestedTitle = nestedUrlParams.get('title');-- if (nestedVideoUrl) {- videoUrl = nestedVideoUrl;-- // 更新当前URL参数- const url = new URL(window.location.href);- if (!urlParams.has('position') && nestedPosition) {- url.searchParams.set('position', nestedPosition);- }- if (!urlParams.has('index') && nestedIndex) {- url.searchParams.set('index', nestedIndex);- }- if (!urlParams.has('title') && nestedTitle) {- url.searchParams.set('title', nestedTitle);- }- // 替换当前URL- window.history.replaceState({}, '', url);- } else {- showError('历史记录链接无效,请返回首页重新访问');- }- } catch (e) {- }- }-- // 保存当前视频URL- currentVideoUrl = videoUrl || '';-- // 从localStorage获取数据- currentVideoTitle = title || localStorage.getItem('currentVideoTitle') || '未知视频';- currentEpisodeIndex = index;-- // 设置自动连播开关状态- autoplayEnabled = localStorage.getItem('autoplayEnabled') !== 'false'; // 默认为true- document.getElementById('autoplayToggle').checked = autoplayEnabled;-- // 获取广告过滤设置- adFilteringEnabled = localStorage.getItem(PLAYER_CONFIG.adFilteringStorage) !== 'false'; // 默认为true-- // 监听自动连播开关变化- document.getElementById('autoplayToggle').addEventListener('change', function (e) {- autoplayEnabled = e.target.checked;- localStorage.setItem('autoplayEnabled', autoplayEnabled);- });-- // 优先使用URL传递的集数信息,否则从localStorage获取- try {- if (episodesList) {- // 如果URL中有集数数据,优先使用它- currentEpisodes = JSON.parse(decodeURIComponent(episodesList));-- } else {- // 否则从localStorage获取- currentEpisodes = JSON.parse(localStorage.getItem('currentEpisodes') || '[]');-- }-- // 检查集数索引是否有效,如果无效则调整为0- if (index < 0 || (currentEpisodes.length > 0 && index >= currentEpisodes.length)) {- // 如果索引太大,则使用最大有效索引- if (index >= currentEpisodes.length && currentEpisodes.length > 0) {- index = currentEpisodes.length - 1;- } else {- index = 0;- }-- // 更新URL以反映修正后的索引- const newUrl = new URL(window.location.href);- newUrl.searchParams.set('index', index);- window.history.replaceState({}, '', newUrl);- }-- // 更新当前索引为验证过的值- currentEpisodeIndex = index;-- episodesReversed = localStorage.getItem('episodesReversed') === 'true';- } catch (e) {- currentEpisodes = [];- currentEpisodeIndex = 0;- episodesReversed = false;- }-- // 设置页面标题- document.title = currentVideoTitle + ' - LibreTV播放器';- document.getElementById('videoTitle').textContent = currentVideoTitle;-- // 初始化播放器- if (videoUrl) {- initPlayer(videoUrl);- } else {- showError('无效的视频链接');- }-- // 渲染源信息- renderResourceInfoBar();-- // 更新集数信息- updateEpisodeInfo();-- // 渲染集数列表- renderEpisodes();-- // 更新按钮状态- updateButtonStates();-- // 更新排序按钮状态- updateOrderButton();-- // 进度条精确点击由 ArtPlayer 原生支持,无需自定义监听-- // 添加键盘快捷键事件监听- document.addEventListener('keydown', handleKeyboardShortcuts);-- // 添加页面离开事件监听,保存播放位置- window.addEventListener('beforeunload', saveCurrentProgress);-- // 新增:页面隐藏(切后台/切标签)时也保存- document.addEventListener('visibilitychange', function () {- if (document.visibilityState === 'hidden') {- saveCurrentProgress();- }- });-- // 视频暂停时也保存- const waitForVideo = setInterval(() => {- if (art && art.video) {- art.video.addEventListener('pause', saveCurrentProgress);-- // 新增:播放进度变化时节流保存- let lastSave = 0;- art.video.addEventListener('timeupdate', function() {- const now = Date.now();- if (now - lastSave > 5000) { // 每5秒最多保存一次- saveCurrentProgress();- lastSave = now;- }- });-- clearInterval(waitForVideo);- }- }, 200);-}--// 处理键盘快捷键-function handleKeyboardShortcuts(e) {- // 忽略输入框中的按键事件- if (e.target.tagName === 'INPUT' || e.target.tagName === 'TEXTAREA') return;-- // Alt + 左箭头 = 上一集- if (e.altKey && e.key === 'ArrowLeft') {- if (currentEpisodeIndex > 0) {- playPreviousEpisode();- showShortcutHint('上一集', 'left');- e.preventDefault();- }- }-- // Alt + 右箭头 = 下一集- if (e.altKey && e.key === 'ArrowRight') {- if (currentEpisodeIndex < currentEpisodes.length - 1) {- playNextEpisode();- showShortcutHint('下一集', 'right');- e.preventDefault();- }- }-- // 左箭头 = 快退- if (!e.altKey && e.key === 'ArrowLeft') {- if (art && art.currentTime > 5) {- art.currentTime -= 5;- showShortcutHint('快退', 'left');- e.preventDefault();- }- }-- // 右箭头 = 快进- if (!e.altKey && e.key === 'ArrowRight') {- if (art && art.currentTime < art.duration - 5) {- art.currentTime += 5;- showShortcutHint('快进', 'right');- e.preventDefault();- }- }-- // 上箭头 = 音量+- if (e.key === 'ArrowUp') {- if (art && art.volume < 1) {- art.volume += 0.1;- showShortcutHint('音量+', 'up');- e.preventDefault();- }- }-- // 下箭头 = 音量-- if (e.key === 'ArrowDown') {- if (art && art.volume > 0) {- art.volume -= 0.1;- showShortcutHint('音量-', 'down');- e.preventDefault();- }- }-- // 空格 = 播放/暂停- if (e.key === ' ') {- if (art) {- art.toggle();- showShortcutHint('播放/暂停', 'play');- e.preventDefault();- }- }-- // f 键 = 切换全屏- if (e.key === 'f' || e.key === 'F') {- if (art) {- art.fullscreen = !art.fullscreen;- showShortcutHint('切换全屏', 'fullscreen');- e.preventDefault();- }- }-}--// 显示快捷键提示-function showShortcutHint(text, direction) {- const hintElement = document.getElementById('shortcutHint');- const textElement = document.getElementById('shortcutText');- const iconElement = document.getElementById('shortcutIcon');-- // 清除之前的超时- if (shortcutHintTimeout) {- clearTimeout(shortcutHintTimeout);- }-- // 设置文本和图标方向- textElement.textContent = text;-- if (direction === 'left') {- iconElement.innerHTML = '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"></path>';- } else if (direction === 'right') {- iconElement.innerHTML = '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path>';- } else if (direction === 'up') {- iconElement.innerHTML = '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 15l7-7 7 7"></path>';- } else if (direction === 'down') {- iconElement.innerHTML = '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>';- } else if (direction === 'fullscreen') {- iconElement.innerHTML = '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5v-4m0 4h-4m4 0l-5-5"></path>';- } else if (direction === 'play') {- iconElement.innerHTML = '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 3l14 9-14 9V3z"></path>';- }-- // 显示提示- hintElement.classList.add('show');-- // 两秒后隐藏- shortcutHintTimeout = setTimeout(() => {- hintElement.classList.remove('show');- }, 2000);-}--// 初始化播放器-function initPlayer(videoUrl) {- if (!videoUrl) {- return- }-- // 销毁旧实例- if (art) {- art.destroy();- art = null;- }-- // 配置HLS.js选项- const hlsConfig = {- debug: false,- loader: adFilteringEnabled ? CustomHlsJsLoader : Hls.DefaultConfig.loader,- enableWorker: true,- lowLatencyMode: false,- backBufferLength: 90,- maxBufferLength: 30,- maxMaxBufferLength: 60,- maxBufferSize: 30 * 1000 * 1000,- maxBufferHole: 0.5,- fragLoadingMaxRetry: 6,- fragLoadingMaxRetryTimeout: 64000,- fragLoadingRetryDelay: 1000,- manifestLoadingMaxRetry: 3,- manifestLoadingRetryDelay: 1000,- levelLoadingMaxRetry: 4,- levelLoadingRetryDelay: 1000,- startLevel: -1,- abrEwmaDefaultEstimate: 500000,- abrBandWidthFactor: 0.95,- abrBandWidthUpFactor: 0.7,- abrMaxWithRealBitrate: true,- stretchShortVideoTrack: true,- appendErrorMaxRetry: 5, // 增加尝试次数- liveSyncDurationCount: 3,- liveDurationInfinity: false- };-- // Create new ArtPlayer instance- art = new Artplayer({- container: '#player',- url: videoUrl,- type: 'm3u8',- title: currentVideoTitle,- volume: 0.8,- isLive: false,- muted: false,- autoplay: true,- pip: true,- autoSize: false,- autoMini: true,- screenshot: true,- setting: true,- loop: false,- flip: false,- playbackRate: true,- aspectRatio: false,- fullscreen: true,- fullscreenWeb: true,- subtitleOffset: false,- miniProgressBar: true,- mutex: true,- backdrop: true,- playsInline: true,- autoPlayback: false,- airplay: true,- hotkey: false,- theme: '#23ade5',- lang: navigator.language.toLowerCase(),- moreVideoAttr: {- crossOrigin: 'anonymous',- },- customType: {- m3u8: function (video, url) {- // 清理之前的HLS实例- if (currentHls && currentHls.destroy) {- try {- currentHls.destroy();- } catch (e) {- }- }-- // 创建新的HLS实例- const hls = new Hls(hlsConfig);- currentHls = hls;-- // 跟踪是否已经显示错误- let errorDisplayed = false;- // 跟踪是否有错误发生- let errorCount = 0;- // 跟踪视频是否开始播放- let playbackStarted = false;- // 跟踪视频是否出现bufferAppendError- let bufferAppendErrorCount = 0;-- // 监听视频播放事件- video.addEventListener('playing', function () {- playbackStarted = true;- document.getElementById('player-loading').style.display = 'none';- document.getElementById('error').style.display = 'none';- });-- // 监听视频进度事件- video.addEventListener('timeupdate', function () {- if (video.currentTime > 1) {- // 视频进度超过1秒,隐藏错误(如果存在)- document.getElementById('error').style.display = 'none';- }- });-- hls.loadSource(url);- hls.attachMedia(video);-- // enable airplay, from https://github.com/video-dev/hls.js/issues/5989- // 检查是否已存在source元素,如果存在则更新,不存在则创建- let sourceElement = video.querySelector('source');- if (sourceElement) {- // 更新现有source元素的URL- sourceElement.src = videoUrl;- } else {- // 创建新的source元素- sourceElement = document.createElement('source');- sourceElement.src = videoUrl;- video.appendChild(sourceElement);- }- video.disableRemotePlayback = false;-- hls.on(Hls.Events.MANIFEST_PARSED, function () {- video.play().catch(e => {- });- });-- hls.on(Hls.Events.ERROR, function (event, data) {- // 增加错误计数- errorCount++;-- // 处理bufferAppendError- if (data.details === 'bufferAppendError') {- bufferAppendErrorCount++;- // 如果视频已经开始播放,则忽略这个错误- if (playbackStarted) {- return;- }-- // 如果出现多次bufferAppendError但视频未播放,尝试恢复- if (bufferAppendErrorCount >= 3) {- hls.recoverMediaError();- }- }-- // 如果是致命错误,且视频未播放- if (data.fatal && !playbackStarted) {- // 尝试恢复错误- switch (data.type) {- case Hls.ErrorTypes.NETWORK_ERROR:- hls.startLoad();- break;- case Hls.ErrorTypes.MEDIA_ERROR:- hls.recoverMediaError();- break;- default:- // 仅在多次恢复尝试后显示错误- if (errorCount > 3 && !errorDisplayed) {- errorDisplayed = true;- showError('视频加载失败,可能是格式不兼容或源不可用');- }- break;- }- }- });-- // 监听分段加载事件- hls.on(Hls.Events.FRAG_LOADED, function () {- document.getElementById('player-loading').style.display = 'none';- });-- // 监听级别加载事件- hls.on(Hls.Events.LEVEL_LOADED, function () {- document.getElementById('player-loading').style.display = 'none';- });- }- }- });-- // artplayer 没有 'fullscreenWeb:enter', 'fullscreenWeb:exit' 等事件- // 所以原控制栏隐藏代码并没有起作用- // 实际起作用的是 artplayer 默认行为,它支持自动隐藏工具栏- // 但有一个 bug: 在副屏全屏时,鼠标移出副屏后不会自动隐藏工具栏- // 下面进一并重构和修复:- let hideTimer;-- // 隐藏控制栏- function hideControls() {- if (art && art.controls) {- art.controls.show = false;- }- }-- // 重置计时器,计时器超时时间与 artplayer 保持一致- function resetHideTimer() {- clearTimeout(hideTimer);- hideTimer = setTimeout(() => {- hideControls();- }, Artplayer.CONTROL_HIDE_TIME);- }-- // 处理鼠标离开浏览器窗口- function handleMouseOut(e) {- if (e && !e.relatedTarget) {- resetHideTimer();- }- }-- // 全屏状态切换时注册/移除 mouseout 事件,监听鼠标移出屏幕事件- // 从而对播放器状态栏进行隐藏倒计时- function handleFullScreen(isFullScreen, isWeb) {- if (isFullScreen) {- document.addEventListener('mouseout', handleMouseOut);- } else {- document.removeEventListener('mouseout', handleMouseOut);- // 退出全屏时清理计时器- clearTimeout(hideTimer);- }-- if (!isWeb) {- if (window.screen.orientation && window.screen.orientation.lock) {- window.screen.orientation.lock('landscape')- .then(() => {- })- .catch((error) => {- });- }- }- }-- // 播放器加载完成后初始隐藏工具栏- art.on('ready', () => {- hideControls();- });-- // 全屏 Web 模式处理- art.on('fullscreenWeb', function (isFullScreen) {- handleFullScreen(isFullScreen, true);- });-- // 全屏模式处理- art.on('fullscreen', function (isFullScreen) {- handleFullScreen(isFullScreen, false);- });-- art.on('video:loadedmetadata', function() {- document.getElementById('player-loading').style.display = 'none';- videoHasEnded = false; // 视频加载时重置结束标志- // 优先使用URL传递的position参数- const urlParams = new URLSearchParams(window.location.search);- const savedPosition = parseInt(urlParams.get('position') || '0');-- if (savedPosition > 10 && savedPosition < art.duration - 2) {- // 如果URL中有有效的播放位置参数,直接使用它- art.currentTime = savedPosition;- showPositionRestoreHint(savedPosition);- } else {- // 否则尝试从本地存储恢复播放进度- try {- const progressKey = 'videoProgress_' + getVideoId();- const progressStr = localStorage.getItem(progressKey);- if (progressStr && art.duration > 0) {- const progress = JSON.parse(progressStr);- if (- progress &&- typeof progress.position === 'number' &&- progress.position > 10 &&- progress.position < art.duration - 2- ) {- art.currentTime = progress.position;- showPositionRestoreHint(progress.position);- }- }- } catch (e) {- }- }-- // 视频加载成功后,在稍微延迟后将其添加到观看历史- setTimeout(saveToHistory, 3000);-- // 启动定期保存播放进度- startProgressSaveInterval();- })-- // 错误处理- art.on('video:error', function (error) {- // 如果正在切换视频,忽略错误- if (window.isSwitchingVideo) {- return;- }-- // 隐藏所有加载指示器- const loadingElements = document.querySelectorAll('#player-loading, .player-loading-container');- loadingElements.forEach(el => {- if (el) el.style.display = 'none';- });-- showError('视频播放失败: ' + (error.message || '未知错误'));- });-- // 添加移动端长按三倍速播放功能- setupLongPressSpeedControl();-- // 视频播放结束事件- art.on('video:ended', function () {- videoHasEnded = true;-- clearVideoProgress();-- // 如果自动播放下一集开启,且确实有下一集- if (autoplayEnabled && currentEpisodeIndex < currentEpisodes.length - 1) {- // 稍长延迟以确保所有事件处理完成- setTimeout(() => {- // 确认不是因为用户拖拽导致的假结束事件- playNextEpisode();- videoHasEnded = false; // 重置标志- }, 1000);- } else {- art.fullscreen = false;- }- });-- // 添加双击全屏支持(仅在 ready 时绑定一次,避免每次 playing 重复添加监听造成泄漏)- art.on('ready', () => {- if (art.video) {- art.video.addEventListener('dblclick', () => {- art.fullscreen = !art.fullscreen;- art.play();- });- }- });-- // 10秒后如果仍在加载,但不立即显示错误- setTimeout(function () {- // 如果视频已经播放开始,则不显示错误- if (art && art.video && art.video.currentTime > 0) {- return;- }-- const loadingElement = document.getElementById('player-loading');- if (loadingElement && loadingElement.style.display !== 'none') {- loadingElement.innerHTML = `- <div class="loading-spinner"></div>- <div>视频加载时间较长,请耐心等待...</div>- <div style="font-size: 12px; color: #aaa; margin-top: 10px;">如长时间无响应,请尝试其他视频源</div>- `;- }- }, 10000);-}--// 自定义M3U8 Loader用于过滤广告-class CustomHlsJsLoader extends Hls.DefaultConfig.loader {- constructor(config) {- super(config);- const load = this.load.bind(this);- this.load = function (context, config, callbacks) {- // 拦截manifest和level请求- if (context.type === 'manifest' || context.type === 'level') {- const onSuccess = callbacks.onSuccess;- callbacks.onSuccess = function (response, stats, context) {- // 如果是m3u8文件,处理内容以移除广告分段- if (response.data && typeof response.data === 'string') {- // 过滤掉广告段 - 实现更精确的广告过滤逻辑- response.data = filterAdsFromM3U8(response.data, true);- }- return onSuccess(response, stats, context);- };- }- // 执行原始load方法- load(context, config, callbacks);- };- }-}--// 过滤可疑的广告内容-function filterAdsFromM3U8(m3u8Content, strictMode = false) {- if (!m3u8Content) return '';-- // 按行分割M3U8内容- const lines = m3u8Content.split('\n');- const filteredLines = [];-- for (let i = 0; i < lines.length; i++) {- const line = lines[i];-- // 只过滤#EXT-X-DISCONTINUITY标识- if (!line.includes('#EXT-X-DISCONTINUITY')) {- filteredLines.push(line);- }- }-- return filteredLines.join('\n');-}---// 显示错误-function showError(message) {- // 在视频已经播放的情况下不显示错误- if (art && art.video && art.video.currentTime > 1) {- return;- }- const loadingEl = document.getElementById('player-loading');- if (loadingEl) loadingEl.style.display = 'none';- const errorEl = document.getElementById('error');- if (errorEl) errorEl.style.display = 'flex';- const errorMsgEl = document.getElementById('error-message');- if (errorMsgEl) errorMsgEl.textContent = message;-}--// 更新集数信息-function updateEpisodeInfo() {- if (currentEpisodes.length > 0) {- document.getElementById('episodeInfo').textContent = `第 ${currentEpisodeIndex + 1}/${currentEpisodes.length} 集`;- } else {- document.getElementById('episodeInfo').textContent = '无集数信息';- }-}--// 更新按钮状态-function updateButtonStates() {- const prevButton = document.getElementById('prevButton');- const nextButton = document.getElementById('nextButton');-- // 处理上一集按钮- if (currentEpisodeIndex > 0) {- prevButton.classList.remove('bg-gray-700', 'cursor-not-allowed');- prevButton.classList.add('bg-[#222]', 'hover:bg-[#333]');- prevButton.removeAttribute('disabled');- } else {- prevButton.classList.add('bg-gray-700', 'cursor-not-allowed');- prevButton.classList.remove('bg-[#222]', 'hover:bg-[#333]');- prevButton.setAttribute('disabled', '');- }-- // 处理下一集按钮- if (currentEpisodeIndex < currentEpisodes.length - 1) {- nextButton.classList.remove('bg-gray-700', 'cursor-not-allowed');- nextButton.classList.add('bg-[#222]', 'hover:bg-[#333]');- nextButton.removeAttribute('disabled');- } else {- nextButton.classList.add('bg-gray-700', 'cursor-not-allowed');- nextButton.classList.remove('bg-[#222]', 'hover:bg-[#333]');- nextButton.setAttribute('disabled', '');- }-}--// 渲染集数按钮-function renderEpisodes() {- const episodesList = document.getElementById('episodesList');- if (!episodesList) return;-- if (!currentEpisodes || currentEpisodes.length === 0) {- episodesList.innerHTML = '<div class="col-span-full text-center text-gray-400 py-8">没有可用的集数</div>';- return;- }-- const episodes = episodesReversed ? [...currentEpisodes].reverse() : currentEpisodes;- let html = '';-- episodes.forEach((episode, index) => {- // 根据倒序状态计算真实的剧集索引- const realIndex = episodesReversed ? currentEpisodes.length - 1 - index : index;- const isActive = realIndex === currentEpisodeIndex;-- html += `- <button id="episode-${realIndex}"- onclick="playEpisode(${realIndex})"- class="px-4 py-2 ${isActive ? 'episode-active' : '!bg-[#222] hover:!bg-[#333] hover:!shadow-none'} !border ${isActive ? '!border-blue-500' : '!border-[#333]'} rounded-lg transition-colors text-center episode-btn">- ${realIndex + 1}- </button>- `;- });-- episodesList.innerHTML = html;-}--// 播放指定集数-function playEpisode(index) {- // 确保index在有效范围内- if (index < 0 || index >= currentEpisodes.length) {- return;- }-- // 保存当前播放进度(如果正在播放)- if (art && art.video && !art.video.paused && !videoHasEnded) {- saveCurrentProgress();- }-- // 清除进度保存计时器- if (progressSaveInterval) {- clearInterval(progressSaveInterval);- progressSaveInterval = null;- }-- // 首先隐藏之前可能显示的错误- document.getElementById('error').style.display = 'none';- // 显示加载指示器- document.getElementById('player-loading').style.display = 'flex';- document.getElementById('player-loading').innerHTML = `- <div class="loading-spinner"></div>- <div>正在加载视频...</div>- `;-- // 获取 sourceCode- const urlParams2 = new URLSearchParams(window.location.search);- const sourceCode = urlParams2.get('source_code');-- // 准备切换剧集的URL- const url = currentEpisodes[index];-- // 更新当前剧集索引- currentEpisodeIndex = index;- currentVideoUrl = url;- videoHasEnded = false; // 重置视频结束标志-- clearVideoProgress();-- // 更新URL参数(不刷新页面)- const currentUrl = new URL(window.location.href);- currentUrl.searchParams.set('index', index);- currentUrl.searchParams.set('url', url);- currentUrl.searchParams.delete('position');- window.history.replaceState({}, '', currentUrl.toString());-- if (isWebkit) {- initPlayer(url);- } else {- art.switch = url;- }-- // 更新UI- updateEpisodeInfo();- updateButtonStates();- renderEpisodes();-- // 重置用户点击位置记录- userClickedPosition = null;-- // 三秒后保存到历史记录- setTimeout(() => saveToHistory(), 3000);-}--// 播放上一集-function playPreviousEpisode() {- if (currentEpisodeIndex > 0) {- playEpisode(currentEpisodeIndex - 1);- }-}--// 播放下一集-function playNextEpisode() {- if (currentEpisodeIndex < currentEpisodes.length - 1) {- playEpisode(currentEpisodeIndex + 1);- }-}--// 复制播放链接-function copyLinks() {- // 尝试从URL中获取参数- const urlParams = new URLSearchParams(window.location.search);- const linkUrl = urlParams.get('url') || '';- if (linkUrl !== '') {- navigator.clipboard.writeText(linkUrl).then(() => {- showToast('播放链接已复制', 'success');- }).catch(err => {- showToast('复制失败,请检查浏览器权限', 'error');- });- }-}--// 切换集数排序-function toggleEpisodeOrder() {- episodesReversed = !episodesReversed;-- // 保存到localStorage- localStorage.setItem('episodesReversed', episodesReversed);-- // 重新渲染集数列表- renderEpisodes();-- // 更新排序按钮- updateOrderButton();-}--// 更新排序按钮状态-function updateOrderButton() {- const orderText = document.getElementById('orderText');- const orderIcon = document.getElementById('orderIcon');-- if (orderText && orderIcon) {- orderText.textContent = episodesReversed ? '正序排列' : '倒序排列';- orderIcon.style.transform = episodesReversed ? 'rotate(180deg)' : '';- }-}--// 进度条精确点击处理已移除:ArtPlayer 原生支持点击进度条跳转,-// 原 setupProgressBarPreciseClicks 依赖不存在的 .dplayer-bar-wrap 元素,属无效死代码。--// 在播放器初始化后添加视频到历史记录-function saveToHistory() {- // 确保 currentEpisodes 非空且有当前视频URL- if (!currentEpisodes || currentEpisodes.length === 0 || !currentVideoUrl) {- return;- }-- // 尝试从URL中获取参数- const urlParams = new URLSearchParams(window.location.search);- const sourceName = urlParams.get('source') || '';- const sourceCode = urlParams.get('source') || '';- const id_from_params = urlParams.get('id'); // Get video ID from player URL (passed as 'id')-- // 获取当前播放进度- let currentPosition = 0;- let videoDuration = 0;-- if (art && art.video) {- currentPosition = art.video.currentTime;- videoDuration = art.video.duration;- }-- // Define a show identifier: Prioritize sourceName_id, fallback to first episode URL or current video URL- let show_identifier_for_video_info;- if (sourceName && id_from_params) {- show_identifier_for_video_info = `${sourceName}_${id_from_params}`;- } else {- show_identifier_for_video_info = (currentEpisodes && currentEpisodes.length > 0) ? currentEpisodes[0] : currentVideoUrl;- }-- // 构建要保存的视频信息对象- const videoInfo = {- title: currentVideoTitle,- directVideoUrl: currentVideoUrl, // Current episode's direct URL- url: `player.html?url=${encodeURIComponent(currentVideoUrl)}&title=${encodeURIComponent(currentVideoTitle)}&source=${encodeURIComponent(sourceName)}&source_code=${encodeURIComponent(sourceCode)}&id=${encodeURIComponent(id_from_params || '')}&index=${currentEpisodeIndex}&position=${Math.floor(currentPosition || 0)}`,- episodeIndex: currentEpisodeIndex,- sourceName: sourceName,- vod_id: id_from_params || '', // Store the ID from params as vod_id in history item- sourceCode: sourceCode,- showIdentifier: show_identifier_for_video_info, // Identifier for the show/series- timestamp: Date.now(),- playbackPosition: currentPosition,- duration: videoDuration,- episodes: currentEpisodes && currentEpisodes.length > 0 ? [...currentEpisodes] : []- };-- try {- const history = JSON.parse(localStorage.getItem('viewingHistory') || '[]');-- // 检查是否已经存在相同的系列记录 (基于标题、来源和 showIdentifier)- const existingIndex = history.findIndex(item =>- item.title === videoInfo.title &&- item.sourceName === videoInfo.sourceName &&- item.showIdentifier === videoInfo.showIdentifier- );-- if (existingIndex !== -1) {- // 存在则更新现有记录的当前集数、时间戳、播放进度和URL等- const existingItem = history[existingIndex];- existingItem.episodeIndex = videoInfo.episodeIndex;- existingItem.timestamp = videoInfo.timestamp;- existingItem.sourceName = videoInfo.sourceName; // Should be consistent, but update just in case- existingItem.sourceCode = videoInfo.sourceCode;- existingItem.vod_id = videoInfo.vod_id;-- // Update URLs to reflect the current episode being watched- existingItem.directVideoUrl = videoInfo.directVideoUrl; // Current episode's direct URL- existingItem.url = videoInfo.url; // Player link for the current episode-- // 更新播放进度信息- existingItem.playbackPosition = videoInfo.playbackPosition > 10 ? videoInfo.playbackPosition : (existingItem.playbackPosition || 0);- existingItem.duration = videoInfo.duration || existingItem.duration;-- // 更新集数列表(如果新的集数列表与存储的不同,例如集数增加了)- if (videoInfo.episodes && videoInfo.episodes.length > 0) {- if (!existingItem.episodes ||- !Array.isArray(existingItem.episodes) ||- existingItem.episodes.length !== videoInfo.episodes.length ||- !videoInfo.episodes.every((ep, i) => ep === existingItem.episodes[i])) { // Basic check for content change- existingItem.episodes = [...videoInfo.episodes]; // Deep copy- }- }-- // 移到最前面- const updatedItem = history.splice(existingIndex, 1)[0];- history.unshift(updatedItem);- } else {- // 添加新记录到最前面- history.unshift(videoInfo);- }-- // 限制历史记录数量为50条- if (history.length > 50) history.splice(50);-- localStorage.setItem('viewingHistory', JSON.stringify(history));- } catch (e) {- }-}--// 显示恢复位置提示-function showPositionRestoreHint(position) {- if (!position || position < 10) return;-- // 创建提示元素- const hint = document.createElement('div');- hint.className = 'position-restore-hint';- hint.innerHTML = `- <div class="hint-content">- 已从 ${formatTime(position)} 继续播放- </div>- `;-- // 添加到播放器容器- const playerContainer = document.querySelector('.player-container'); // Ensure this selector is correct- if (playerContainer) { // Check if playerContainer exists- playerContainer.appendChild(hint);- } else {- return; // Exit if container not found- }-- // 显示提示- setTimeout(() => {- hint.classList.add('show');-- // 3秒后隐藏- setTimeout(() => {- hint.classList.remove('show');- setTimeout(() => hint.remove(), 300);- }, 3000);- }, 100);-}--// 格式化时间为 mm:ss 格式-function formatTime(seconds) {- if (isNaN(seconds)) return '00:00';-- const minutes = Math.floor(seconds / 60);- const remainingSeconds = Math.floor(seconds % 60);-- return `${minutes.toString().padStart(2, '0')}:${remainingSeconds.toString().padStart(2, '0')}`;-}--// 开始定期保存播放进度-function startProgressSaveInterval() {- // 清除可能存在的旧计时器- if (progressSaveInterval) {- clearInterval(progressSaveInterval);- }-- // 每30秒保存一次播放进度- progressSaveInterval = setInterval(saveCurrentProgress, 30000);-}--// 保存当前播放进度-function saveCurrentProgress() {- if (!art || !art.video) return;- const currentTime = art.video.currentTime;- const duration = art.video.duration;- if (!duration || currentTime < 1) return;-- // 在localStorage中保存进度- const progressKey = `videoProgress_${getVideoId()}`;- const progressData = {- position: currentTime,- duration: duration,- timestamp: Date.now()- };- try {- localStorage.setItem(progressKey, JSON.stringify(progressData));- // --- 新增:同步更新 viewingHistory 中的进度 ---- try {- const historyRaw = localStorage.getItem('viewingHistory');- if (historyRaw) {- const history = JSON.parse(historyRaw);- // 用 title + 集数索引唯一标识- const idx = history.findIndex(item =>- item.title === currentVideoTitle &&- (item.episodeIndex === undefined || item.episodeIndex === currentEpisodeIndex)- );- if (idx !== -1) {- // 只在进度有明显变化时才更新,减少写入- if (- Math.abs((history[idx].playbackPosition || 0) - currentTime) > 2 ||- Math.abs((history[idx].duration || 0) - duration) > 2- ) {- history[idx].playbackPosition = currentTime;- history[idx].duration = duration;- history[idx].timestamp = Date.now();- localStorage.setItem('viewingHistory', JSON.stringify(history));- }- }- }- } catch (e) {- }- } catch (e) {- }-}--// 设置移动端长按三倍速播放功能-function setupLongPressSpeedControl() {- if (!art || !art.video) return;-- const playerElement = document.getElementById('player');- let longPressTimer = null;- let originalPlaybackRate = 1.0;- let isLongPress = false;-- // 显示快速提示- function showSpeedHint(speed) {- showShortcutHint(`${speed}倍速`, 'right');- }-- // 禁用右键- playerElement.oncontextmenu = () => {- // 检测是否为移动设备- const isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);-- // 只在移动设备上禁用右键- if (isMobile) {- // 移动端禁用右键菜单(DPlayer 相关元素已不存在,无需处理)- return false;- }- return true; // 在桌面设备上允许右键菜单- };-- // 触摸开始事件- playerElement.addEventListener('touchstart', function (e) {- // 检查视频是否正在播放,如果没有播放则不触发长按功能- if (art.video.paused) {- return; // 视频暂停时不触发长按功能- }-- // 保存原始播放速度- originalPlaybackRate = art.video.playbackRate;-- // 设置长按计时器- longPressTimer = setTimeout(() => {- // 再次检查视频是否仍在播放- if (art.video.paused) {- clearTimeout(longPressTimer);- longPressTimer = null;- return;- }-- // 长按超过500ms,设置为3倍速- art.video.playbackRate = 3.0;- isLongPress = true;- showSpeedHint(3.0);-- // 只在确认为长按时阻止默认行为- e.preventDefault();- }, 500);- }, { passive: false });-- // 触摸结束事件- playerElement.addEventListener('touchend', function (e) {- // 清除长按计时器- if (longPressTimer) {- clearTimeout(longPressTimer);- longPressTimer = null;- }-- // 如果是长按状态,恢复原始播放速度- if (isLongPress) {- art.video.playbackRate = originalPlaybackRate;- isLongPress = false;- showSpeedHint(originalPlaybackRate);-- // 阻止长按后的点击事件- e.preventDefault();- }- // 如果不是长按,则允许正常的点击事件(暂停/播放)- });-- // 触摸取消事件- playerElement.addEventListener('touchcancel', function () {- // 清除长按计时器- if (longPressTimer) {- clearTimeout(longPressTimer);- longPressTimer = null;- }-- // 如果是长按状态,恢复原始播放速度- if (isLongPress) {- art.video.playbackRate = originalPlaybackRate;- isLongPress = false;- }- });-- // 触摸移动事件 - 防止在长按时触发页面滚动- playerElement.addEventListener('touchmove', function (e) {- if (isLongPress) {- e.preventDefault();- }- }, { passive: false });-- // 视频暂停时取消长按状态- art.video.addEventListener('pause', function () {- if (isLongPress) {- art.video.playbackRate = originalPlaybackRate;- isLongPress = false;- }-- if (longPressTimer) {- clearTimeout(longPressTimer);- longPressTimer = null;- }- });-}--// 清除视频进度记录-function clearVideoProgress() {- const progressKey = `videoProgress_${getVideoId()}`;- try {- localStorage.removeItem(progressKey);- } catch (e) {- }-}--// 获取视频唯一标识-function getVideoId() {- // 使用视频标题和集数索引作为唯一标识- // If currentVideoUrl is available and more unique, prefer it. Otherwise, fallback.- if (currentVideoUrl) {- return `${encodeURIComponent(currentVideoUrl)}`;- }- return `${encodeURIComponent(currentVideoTitle)}_${currentEpisodeIndex}`;-}--let controlsLocked = false;-function toggleControlsLock() {- const container = document.getElementById('playerContainer');- controlsLocked = !controlsLocked;- container.classList.toggle('controls-locked', controlsLocked);- const icon = document.getElementById('lockIcon');- // 切换图标:锁 / 解锁- icon.innerHTML = controlsLocked- ? '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d=\"M12 15v2m0-8V7a4 4 0 00-8 0v2m8 0H4v8h16v-8H6v-6z\"/>'- : '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d=\"M15 11V7a3 3 0 00-6 0v4m-3 4h12v6H6v-6z\"/>';-}--// 支持在iframe中关闭播放器-function closeEmbeddedPlayer() {- try {- if (window.self !== window.top) {- // 如果在iframe中,尝试调用父窗口的关闭方法- if (window.parent && typeof window.parent.closeVideoPlayer === 'function') {- window.parent.closeVideoPlayer();- return true;- }- }- } catch (e) {- console.error('尝试关闭嵌入式播放器失败:', e);- }- return false;-}--function renderResourceInfoBar() {- // 获取容器元素- const container = document.getElementById('resourceInfoBarContainer');- if (!container) {- console.error('找不到资源信息卡片容器');- return;- }-- // 获取当前视频 source_code- const urlParams = new URLSearchParams(window.location.search);- const currentSource = urlParams.get('source') || '';-- // 显示临时加载状态- container.innerHTML = `- <div class="resource-info-bar-left flex">- <span>加载中...</span>- <span class="resource-info-bar-videos">-</span>- </div>- <button class="resource-switch-btn flex" id="switchResourceBtn" onclick="showSwitchResourceModal()">- <span class="resource-switch-icon">- <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 4v16m0 0l-6-6m6 6l6-6" stroke="#a67c2d" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>- </span>- 切换资源- </button>- `;-- // 查找当前源名称,从 API_SITES 和 custom_api 中查找即可- let resourceName = currentSource- if (currentSource && API_SITES[currentSource]) {- resourceName = API_SITES[currentSource].name;- }- if (resourceName === currentSource) {- const customAPIs = JSON.parse(localStorage.getItem('customAPIs') || '[]');- const customIndex = parseInt(currentSource.replace('custom_', ''), 10);- if (customAPIs[customIndex]) {- resourceName = customAPIs[customIndex].name || '自定义资源';- }- }-- container.innerHTML = `- <div class="resource-info-bar-left flex">- <span>${resourceName}</span>- <span class="resource-info-bar-videos">${currentEpisodes.length} 个视频</span>- </div>- <button class="resource-switch-btn flex" id="switchResourceBtn" onclick="showSwitchResourceModal()">- <span class="resource-switch-icon">- <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 4v16m0 0l-6-6m6 6l6-6" stroke="#a67c2d" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>- </span>- 切换资源- </button>- `;-}--// 测试视频源速率的函数-async function testVideoSourceSpeed(sourceKey, vodId) {- try {- const startTime = performance.now();-- // 构建API参数- let apiParams = '';- if (sourceKey.startsWith('custom_')) {- const customIndex = sourceKey.replace('custom_', '');- const customApi = getCustomApiInfo(customIndex);- if (!customApi) {- return { speed: -1, error: 'API配置无效' };- }- if (customApi.detail) {- apiParams = '&customApi=' + encodeURIComponent(customApi.url) + '&customDetail=' + encodeURIComponent(customApi.detail) + '&source=custom';- } else {- apiParams = '&customApi=' + encodeURIComponent(customApi.url) + '&source=custom';- }- } else {- apiParams = '&source=' + sourceKey;- }-- // 添加时间戳防止缓存- const timestamp = new Date().getTime();- const cacheBuster = `&_t=${timestamp}`;-- // 获取视频详情- const response = await fetch(`/api/detail?id=${encodeURIComponent(vodId)}${apiParams}${cacheBuster}`, {- method: 'GET',- cache: 'no-cache'- });-- if (!response.ok) {- return { speed: -1, error: '获取失败' };- }-- const data = await response.json();-- if (!data.episodes || data.episodes.length === 0) {- return { speed: -1, error: '无播放源' };- }-- // 直接以「获取详情接口的耗时」作为速率参考(不再对分片做 no-cors HEAD 探测,- // 因为多数 CDN 不允许跨域 HEAD 且 HEAD 结果不可靠,反而拖慢换源弹窗)- const apiTime = performance.now() - startTime;- return {- speed: Math.round(apiTime),- episodes: data.episodes.length,- error: null,- note: '详情接口'- };-- } catch (error) {- return {- speed: -1,- error: error.name === 'AbortError' ? '超时' : '测试失败'- };- }-}--// 格式化速度显示-function formatSpeedDisplay(speedResult) {- if (speedResult.speed === -1) {- return `<span class="speed-indicator error">❌ ${speedResult.error}</span>`;- }-- const speed = speedResult.speed;- let className = 'speed-indicator good';- let icon = '🟢';-- if (speed > 2000) {- className = 'speed-indicator poor';- icon = '🔴';- } else if (speed > 1000) {- className = 'speed-indicator medium';- icon = '🟡';- }-- const note = speedResult.note ? ` (${speedResult.note})` : '';- return `<span class="${className}">${icon} ${speed}ms${note}</span>`;-}--async function showSwitchResourceModal() {- const urlParams = new URLSearchParams(window.location.search);- const currentSourceCode = urlParams.get('source');- const currentVideoId = urlParams.get('id');-- const modal = document.getElementById('modal');- const modalTitle = document.getElementById('modalTitle');- const modalContent = document.getElementById('modalContent');-- modalTitle.innerHTML = `<span class="break-words">${currentVideoTitle}</span>`;- modalContent.innerHTML = '<div style="text-align:center;padding:20px;color:#aaa;grid-column:1/-1;">正在加载资源列表...</div>';- modal.classList.remove('hidden');-- // 搜索- const resourceOptions = selectedAPIs.map((curr) => {- if (API_SITES[curr]) {- return { key: curr, name: API_SITES[curr].name };- }- const customIndex = parseInt(curr.replace('custom_', ''), 10);- if (customAPIs[customIndex]) {- return { key: curr, name: customAPIs[customIndex].name || '自定义资源' };- }- return { key: curr, name: '未知资源' };- });- let allResults = {};- await Promise.all(resourceOptions.map(async (opt) => {- let queryResult = await searchByAPIAndKeyWord(opt.key, currentVideoTitle);- if (queryResult.length == 0) {- return- }- // 优先取完全同名资源,否则默认取第一个- let result = queryResult[0]- queryResult.forEach((res) => {- if (res.vod_name == currentVideoTitle) {- result = res;- }- })- allResults[opt.key] = result;- }));-- // 更新状态显示:开始速率测试- modalContent.innerHTML = '<div style="text-align:center;padding:20px;color:#aaa;grid-column:1/-1;">正在测试各资源速率...</div>';-- // 同时测试所有资源的速率- const speedResults = {};- await Promise.all(Object.entries(allResults).map(async ([sourceKey, result]) => {- if (result) {- speedResults[sourceKey] = await testVideoSourceSpeed(sourceKey, result.vod_id);- }- }));-- // 对结果进行排序- const sortedResults = Object.entries(allResults).sort(([keyA, resultA], [keyB, resultB]) => {- // 当前播放的源放在最前面- const isCurrentA = String(keyA) === String(currentSourceCode) && String(resultA.vod_id) === String(currentVideoId);- const isCurrentB = String(keyB) === String(currentSourceCode) && String(resultB.vod_id) === String(currentVideoId);-- if (isCurrentA && !isCurrentB) return -1;- if (!isCurrentA && isCurrentB) return 1;-- // 其余按照速度排序,速度快的在前面(速度为-1表示失败,排到最后)- const speedA = speedResults[keyA]?.speed || 99999;- const speedB = speedResults[keyB]?.speed || 99999;-- if (speedA === -1 && speedB !== -1) return 1;- if (speedA !== -1 && speedB === -1) return -1;- if (speedA === -1 && speedB === -1) return 0;-- return speedA - speedB;- });-- // 渲染资源列表- let html = '<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-4 p-4">';-- for (const [sourceKey, result] of sortedResults) {- if (!result) continue;-- // 修复 isCurrentSource 判断,确保类型一致- const isCurrentSource = String(sourceKey) === String(currentSourceCode) && String(result.vod_id) === String(currentVideoId);- const sourceName = resourceOptions.find(opt => opt.key === sourceKey)?.name || '未知资源';- const speedResult = speedResults[sourceKey] || { speed: -1, error: '未测试' };-- const imgCfg = buildImageProxyConfig(result.vod_pic);- html += `- <div class="relative group ${isCurrentSource ? 'opacity-50 cursor-not-allowed' : 'cursor-pointer hover:scale-105 transition-transform'}"- ${!isCurrentSource ? `onclick="switchToResource('${sourceKey}', '${result.vod_id}')"` : ''}>- <div class="aspect-[2/3] rounded-lg overflow-hidden bg-gray-800 relative">- <img src="${escapeHtmlAttr(imgCfg.primary)}"- alt="${result.vod_name}"- class="w-full h-full object-cover"- onerror="window.handleImageError(this)"- data-fallback="${imgCfg.fallback}"- data-placeholder="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjNjY2IiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHJlY3QgeD0iMyIgeT0iMyIgd2lkdGg9IjE4IiBoZWlnaHQ9IjE4IiByeD0iMiIgcnk9IjIiPjwvcmVjdD48cGF0aCBkPSJNMjEgMTV2NGEyIDIgMCAwIDEtMiAySDVhMiAyIDAgMCAxLTItMnYtNCI+PC9wYXRoPjxwb2x5bGluZSBwb2ludHM9IjE3IDggMTIgMyA3IDgiPjwvcG9seWxpbmU+PHBhdGggZD0iTTEyIDN2MTIiPjwvcGF0aD48L3N2Zz4=">-- <!-- 速率显示在图片右上角 -->- <div class="absolute top-1 right-1 speed-badge bg-black bg-opacity-75">- ${formatSpeedDisplay(speedResult)}- </div>- </div>- <div class="mt-2">- <div class="text-xs font-medium text-gray-200 truncate">${result.vod_name}</div>- <div class="text-[10px] text-gray-400 truncate">${sourceName}</div>- <div class="text-[10px] text-gray-500 mt-1">- ${speedResult.episodes ? `${speedResult.episodes}集` : ''}- </div>- </div>- ${isCurrentSource ? `- <div class="absolute inset-0 flex items-center justify-center">- <div class="bg-blue-600 bg-opacity-75 rounded-lg px-2 py-0.5 text-xs text-white font-medium">- 当前播放- </div>- </div>- ` : ''}- </div>- `;- }-- html += '</div>';- modalContent.innerHTML = html;-}--// 切换资源的函数-async function switchToResource(sourceKey, vodId) {- // 关闭模态框- document.getElementById('modal').classList.add('hidden');-- showLoading();- try {- // 构建API参数- let apiParams = '';-- // 处理自定义API源- if (sourceKey.startsWith('custom_')) {- const customIndex = sourceKey.replace('custom_', '');- const customApi = getCustomApiInfo(customIndex);- if (!customApi) {- showToast('自定义API配置无效', 'error');- hideLoading();- return;- }- // 传递 detail 字段- if (customApi.detail) {- apiParams = '&customApi=' + encodeURIComponent(customApi.url) + '&customDetail=' + encodeURIComponent(customApi.detail) + '&source=custom';- } else {- apiParams = '&customApi=' + encodeURIComponent(customApi.url) + '&source=custom';- }- } else {- // 内置API- apiParams = '&source=' + sourceKey;- }-- // Add a timestamp to prevent caching- const timestamp = new Date().getTime();- const cacheBuster = `&_t=${timestamp}`;- const response = await fetch(`/api/detail?id=${encodeURIComponent(vodId)}${apiParams}${cacheBuster}`);-- const data = await response.json();-- if (!data.episodes || data.episodes.length === 0) {- showToast('未找到播放资源', 'error');- hideLoading();- return;- }-- // 获取当前播放的集数索引- const currentIndex = currentEpisodeIndex;-- // 确定要播放的集数索引- let targetIndex = 0;- if (currentIndex < data.episodes.length) {- // 如果当前集数在新资源中存在,则使用相同集数- targetIndex = currentIndex;- }-- // 获取目标集数的URL- const targetUrl = data.episodes[targetIndex];-- // 构建播放页面URL- const watchUrl = `player.html?id=${vodId}&source=${sourceKey}&url=${encodeURIComponent(targetUrl)}&index=${targetIndex}&title=${encodeURIComponent(currentVideoTitle)}`;-- // 保存当前状态到localStorage- try {- localStorage.setItem('currentVideoTitle', data.vod_name || '未知视频');- localStorage.setItem('currentEpisodes', JSON.stringify(data.episodes));- localStorage.setItem('currentEpisodeIndex', targetIndex);- localStorage.setItem('currentSourceCode', sourceKey);- localStorage.setItem('lastPlayTime', Date.now());- } catch (e) {- console.error('保存播放状态失败:', e);- }-- // 跳转到播放页面- window.location.href = watchUrl;-- } catch (error) {- console.error('切换资源失败:', error);- showToast('切换资源失败,请稍后重试', 'error');- } finally {- hideLoading();- }-}\ No newline at end of filediff --git a/js/proxy-auth.js b/js/proxy-auth.jsdeleted file mode 100644index 0021e6e..0000000--- a/js/proxy-auth.js+++ /dev/null@@ -1,76 +0,0 @@-// 代理鉴权模块-// 安全模式(服务端配置了 PROXY_SECRET 并注入 PROXY_TOKEN_MODE='1'):-// 在密码校验通过后,用明文密码向 /api/proxy-token 换取服务端签名的短时效 token,-// 之后所有代理请求携带该 token。前端不再持有可被伪造的静态哈希。-// 为支持刷新后免重复输入,token 以短时效形式存入 localStorage。-// 兼容模式(未注入 PROXY_TOKEN_MODE):回退为静态哈希(与旧部署一致)。-window.ProxyAuth = (function () {- const TOKEN_KEY = 'proxyToken';- let cachedToken = null;- let cachedT = null;-- function loadFromStorage() {- try {- const raw = localStorage.getItem(TOKEN_KEY);- if (!raw) return;- const data = JSON.parse(raw);- if (data && data.token && data.t && (Date.now() - parseInt(data.t, 10)) < 9 * 60 * 1000) {- cachedToken = data.token;- cachedT = data.t;- } else {- localStorage.removeItem(TOKEN_KEY);- }- } catch (e) { /* 忽略 */ }- }-- function saveToStorage() {- try {- if (cachedToken && cachedT) {- localStorage.setItem(TOKEN_KEY, JSON.stringify({ token: cachedToken, t: cachedT }));- }- } catch (e) { /* 忽略 */ }- }-- loadFromStorage();-- // 密码校验通过后调用,向服务端换取短时效 token- async function ensureToken(password) {- if (!password) return;- if (window.__ENV__ && window.__ENV__.PROXY_TOKEN_MODE !== '1') {- // 服务端未启用 token 模式,无需获取- return;- }- try {- const resp = await fetch(`/api/proxy-token?password=${encodeURIComponent(password)}`);- if (!resp.ok) return;- const data = await resp.json();- if (data && data.success && data.token) {- cachedToken = data.token;- cachedT = data.t;- saveToStorage();- }- } catch (e) {- // 获取失败则回退到静态哈希鉴权- }- }-- function hasToken() {- return !!(cachedToken && cachedT && (Date.now() - parseInt(cachedT, 10)) < 9 * 60 * 1000);- }-- function addAuthToProxyUrl(url) {- // 优先使用服务端签发的 token(安全模式)- if (hasToken()) {- const sep = url.includes('?') ? '&' : '?';- return `${url}${sep}token=${cachedToken}&t=${cachedT}`;- }- // 兼容旧部署:使用页面中的静态哈希- const currentPasswordHash = window.__ENV__ ? (window.__ENV__.PASSWORD || '') : '';- if (!currentPasswordHash) return url;- const sep = url.includes('?') ? '&' : '?';- const timestamp = Date.now();- return `${url}${sep}auth=${currentPasswordHash}&t=${timestamp}`;- }-- return { addAuthToProxyUrl, ensureToken, hasToken };-})();diff --git a/js/pwa-register.js b/js/pwa-register.jsdeleted file mode 100644index d973a92..0000000--- a/js/pwa-register.js+++ /dev/null@@ -1,6 +0,0 @@-// PWA 注册-if ('serviceWorker' in navigator) {- window.addEventListener('load', () => {- navigator.serviceWorker.register('/service-worker.js');- });-}diff --git a/js/search.js b/js/search.jsdeleted file mode 100644index f148e8b..0000000--- a/js/search.js+++ /dev/null@@ -1,127 +0,0 @@-async function searchByAPIAndKeyWord(apiId, query) {- try {- let apiUrl, apiName, apiBaseUrl;-- // 处理自定义API- if (apiId.startsWith('custom_')) {- const customIndex = apiId.replace('custom_', '');- const customApi = getCustomApiInfo(customIndex);- if (!customApi) return [];-- apiBaseUrl = customApi.url;- apiUrl = apiBaseUrl + API_CONFIG.search.path + encodeURIComponent(query);- apiName = customApi.name;- } else {- // 内置API- if (!API_SITES[apiId]) return [];- apiBaseUrl = API_SITES[apiId].api;- apiUrl = apiBaseUrl + API_CONFIG.search.path + encodeURIComponent(query);- apiName = API_SITES[apiId].name;- }-- // 添加超时处理- const controller = new AbortController();- const timeoutId = setTimeout(() => controller.abort(), 15000);-- // 添加鉴权参数到代理URL- const proxiedUrl = await window.ProxyAuth?.addAuthToProxyUrl ?- await window.ProxyAuth.addAuthToProxyUrl(PROXY_URL + encodeURIComponent(apiUrl)) :- PROXY_URL + encodeURIComponent(apiUrl);-- const response = await fetch(proxiedUrl, {- headers: API_CONFIG.search.headers,- signal: controller.signal- });-- clearTimeout(timeoutId);-- if (!response.ok) {- return [];- }-- const data = await response.json();-- if (!data || !data.list || !Array.isArray(data.list) || data.list.length === 0) {- return [];- }-- // 处理第一页结果- const results = data.list.map(item => ({- ...item,- source_name: apiName,- source_code: apiId,- api_url: apiId.startsWith('custom_') ? getCustomApiInfo(apiId.replace('custom_', ''))?.url : undefined- }));-- // 获取总页数- const pageCount = data.pagecount || 1;- // 确定需要获取的额外页数 (最多获取maxPages页)- const pagesToFetch = Math.min(pageCount - 1, API_CONFIG.search.maxPages - 1);-- // 如果有额外页数,获取更多页的结果- if (pagesToFetch > 0) {- const additionalPagePromises = [];-- for (let page = 2; page <= pagesToFetch + 1; page++) {- // 构建分页URL- const pageUrl = apiBaseUrl + API_CONFIG.search.pagePath- .replace('{query}', encodeURIComponent(query))- .replace('{page}', page);-- // 创建获取额外页的Promise- const pagePromise = (async () => {- try {- const pageController = new AbortController();- const pageTimeoutId = setTimeout(() => pageController.abort(), 15000);-- // 添加鉴权参数到代理URL- const proxiedPageUrl = await window.ProxyAuth?.addAuthToProxyUrl ?- await window.ProxyAuth.addAuthToProxyUrl(PROXY_URL + encodeURIComponent(pageUrl)) :- PROXY_URL + encodeURIComponent(pageUrl);-- const pageResponse = await fetch(proxiedPageUrl, {- headers: API_CONFIG.search.headers,- signal: pageController.signal- });-- clearTimeout(pageTimeoutId);-- if (!pageResponse.ok) return [];-- const pageData = await pageResponse.json();-- if (!pageData || !pageData.list || !Array.isArray(pageData.list)) return [];-- // 处理当前页结果- return pageData.list.map(item => ({- ...item,- source_name: apiName,- source_code: apiId,- api_url: apiId.startsWith('custom_') ? getCustomApiInfo(apiId.replace('custom_', ''))?.url : undefined- }));- } catch (error) {- console.warn(`API ${apiId} 第${page}页搜索失败:`, error);- return [];- }- })();-- additionalPagePromises.push(pagePromise);- }-- // 等待所有额外页的结果- const additionalResults = await Promise.all(additionalPagePromises);-- // 合并所有页的结果- additionalResults.forEach(pageResults => {- if (pageResults.length > 0) {- results.push(...pageResults);- }- });- }-- return results;- } catch (error) {- console.warn(`API ${apiId} 搜索失败:`, error);- return [];- }-}\ No newline at end of filediff --git a/js/sha256.js b/js/sha256.jsdeleted file mode 100644index 1bf5816..0000000--- a/js/sha256.js+++ /dev/null@@ -1,6 +0,0 @@-export async function sha256(message) {- const msgBuffer = new TextEncoder().encode(message);- const hashBuffer = await crypto.subtle.digest('SHA-256', msgBuffer);- const hashArray = Array.from(new Uint8Array(hashBuffer));- return hashArray.map(b => b.toString(16).padStart(2, '0')).join('');-}diff --git a/js/ui.js b/js/ui.jsdeleted file mode 100644index 6179903..0000000--- a/js/ui.js+++ /dev/null@@ -1,975 +0,0 @@-// UI相关函数-function toggleSettings(e) {- // 强化的密码保护校验 - 防止绕过- try {- if (window.ensurePasswordProtection) {- window.ensurePasswordProtection();- } else {- // 兼容性检查- if (window.isPasswordProtected && window.isPasswordVerified) {- if (window.isPasswordProtected() && !window.isPasswordVerified()) {- showPasswordModal && showPasswordModal();- return;- }- }- }- } catch (error) {- console.warn('Password protection check failed:', error.message);- return;- }- // 阻止事件冒泡,防止触发document的点击事件- e && e.stopPropagation();- const panel = document.getElementById('settingsPanel');- panel.classList.toggle('show');-}--// 改进的Toast显示函数 - 支持队列显示多个Toast-const toastQueue = [];-let isShowingToast = false;--function showToast(message, type = 'error') {- // 首先确保toast元素存在- let toast = document.getElementById('toast');- let toastMessage = document.getElementById('toastMessage');-- // 如果toast元素不存在,创建它- if (!toast) {- toast = document.createElement('div');- toast.id = 'toast';- toast.className = 'fixed top-4 left-1/2 -translate-x-1/2 px-6 py-3 rounded-lg shadow-lg transform transition-all duration-300 z-50 opacity-0';- toast.style = 'z-index: 2147483647'- toastMessage = document.createElement('p');- toastMessage.id = 'toastMessage';- toast.appendChild(toastMessage);-- document.body.appendChild(toast);- }-- // 将新的toast添加到队列- toastQueue.push({ message, type });-- // 如果当前没有显示中的toast,则开始显示- if (!isShowingToast) {- showNextToast();- }-}--function showNextToast() {- if (toastQueue.length === 0) {- isShowingToast = false;- return;- }-- isShowingToast = true;- const { message, type } = toastQueue.shift();-- const toast = document.getElementById('toast');- const toastMessage = document.getElementById('toastMessage');-- const bgColors = {- 'error': 'bg-red-500',- 'success': 'bg-green-500',- 'info': 'bg-blue-500',- 'warning': 'bg-yellow-500'- };-- const bgColor = bgColors[type] || bgColors.error;- toast.className = `fixed top-4 left-1/2 -translate-x-1/2 px-6 py-3 rounded-lg shadow-lg transform transition-all duration-300 ${bgColor} text-white z-50`;- toastMessage.textContent = message;-- // 显示提示- toast.style.opacity = '1';- toast.style.transform = 'translateX(-50%) translateY(0)';-- // 3秒后自动隐藏- setTimeout(() => {- toast.style.opacity = '0';- toast.style.transform = 'translateX(-50%) translateY(-100%)';-- // 等待动画完成后显示下一个toast- setTimeout(() => {- showNextToast();- }, 300);- }, 3000);-}--// 添加显示/隐藏 loading 的函数-let loadingTimeoutId = null;--function showLoading(message = '加载中...') {- // 清除任何现有的超时- if (loadingTimeoutId) {- clearTimeout(loadingTimeoutId);- }-- const loading = document.getElementById('loading');- const messageEl = loading.querySelector('p');- messageEl.textContent = message;- loading.style.display = 'flex';-- // 设置30秒后自动关闭loading,防止无限loading- loadingTimeoutId = setTimeout(() => {- hideLoading();- showToast('操作超时,请稍后重试', 'warning');- }, 30000);-}--function hideLoading() {- // 清除超时- if (loadingTimeoutId) {- clearTimeout(loadingTimeoutId);- loadingTimeoutId = null;- }-- const loading = document.getElementById('loading');- loading.style.display = 'none';-}--function updateSiteStatus(isAvailable) {- const statusEl = document.getElementById('siteStatus');- if (isAvailable) {- statusEl.innerHTML = '<span class="text-green-500">●</span> 可用';- } else {- statusEl.innerHTML = '<span class="text-red-500">●</span> 不可用';- }-}--function closeModal() {- document.getElementById('modal').classList.add('hidden');- // 清除 iframe 内容- document.getElementById('modalContent').innerHTML = '';-}--// 获取搜索历史的增强版本 - 支持新旧格式-function getSearchHistory() {- try {- const data = localStorage.getItem(SEARCH_HISTORY_KEY);- if (!data) return [];-- const parsed = JSON.parse(data);-- // 检查是否是数组- if (!Array.isArray(parsed)) return [];-- // 支持旧格式(字符串数组)和新格式(对象数组)- return parsed.map(item => {- if (typeof item === 'string') {- return { text: item, timestamp: 0 };- }- return item;- }).filter(item => item && item.text);- } catch (e) {- console.error('获取搜索历史出错:', e);- return [];- }-}--// 保存搜索历史的增强版本 - 添加时间戳和最大数量限制,现在缓存2个月-function saveSearchHistory(query) {- if (!query || !query.trim()) return;-- // 清理输入,防止XSS- query = query.trim().substring(0, 50).replace(/</g, '<').replace(/>/g, '>');-- let history = getSearchHistory();-- // 获取当前时间- const now = Date.now();-- // 过滤掉超过2个月的记录(约60天,60*24*60*60*1000 = 5184000000毫秒)- history = history.filter(item =>- typeof item === 'object' && item.timestamp && (now - item.timestamp < 5184000000)- );-- // 删除已存在的相同项- history = history.filter(item =>- typeof item === 'object' ? item.text !== query : item !== query- );-- // 新项添加到开头,包含时间戳- history.unshift({- text: query,- timestamp: now- });-- // 限制历史记录数量- if (history.length > MAX_HISTORY_ITEMS) {- history = history.slice(0, MAX_HISTORY_ITEMS);- }-- try {- localStorage.setItem(SEARCH_HISTORY_KEY, JSON.stringify(history));- } catch (e) {- console.error('保存搜索历史失败:', e);- // 如果存储失败(可能是localStorage已满),尝试清理旧数据- try {- localStorage.removeItem(SEARCH_HISTORY_KEY);- localStorage.setItem(SEARCH_HISTORY_KEY, JSON.stringify(history.slice(0, 3)));- } catch (e2) {- console.error('再次保存搜索历史失败:', e2);- }- }-- renderSearchHistory();-}--// 渲染最近搜索历史的增强版本-function renderSearchHistory() {- const historyContainer = document.getElementById('recentSearches');- if (!historyContainer) return;-- const history = getSearchHistory();-- if (history.length === 0) {- historyContainer.innerHTML = '';- return;- }-- // 创建一个包含标题和清除按钮的行- historyContainer.innerHTML = `- <div class="flex justify-between items-center w-full mb-2">- <div class="text-gray-500">最近搜索:</div>- <button id="clearHistoryBtn" class="text-gray-500 hover:text-white transition-colors"- onclick="clearSearchHistory()" aria-label="清除搜索历史">- 清除搜索历史- </button>- </div>- `;-- history.forEach(item => {- const tag = document.createElement('button');- tag.className = 'search-tag flex items-center gap-1';- const textSpan = document.createElement('span');- textSpan.textContent = item.text;- tag.appendChild(textSpan);-- // 添加删除按钮- const deleteButton = document.createElement('span');- deleteButton.className = 'pl-1 text-gray-500 hover:text-red-500 transition-colors';- deleteButton.innerHTML = '<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>';- deleteButton.onclick = function(e) {- // 阻止事件冒泡,避免触发搜索- e.stopPropagation();- // 删除对应历史记录- deleteSingleSearchHistory(item.text);- // 重新渲染搜索历史- renderSearchHistory();- };- tag.appendChild(deleteButton);-- // 添加时间提示(如果有时间戳)- if (item.timestamp) {- const date = new Date(item.timestamp);- tag.title = `搜索于: ${date.toLocaleString()}`;- }-- tag.onclick = function() {- document.getElementById('searchInput').value = item.text;- search();- };- historyContainer.appendChild(tag);- });-}--// 删除单条搜索历史记录-function deleteSingleSearchHistory(query) {- // 当url中包含删除的关键词时,页面刷新后会自动加入历史记录,导致误认为删除功能有bug。此问题无需修复,功能无实际影响。- try {- let history = getSearchHistory();- // 过滤掉要删除的记录- history = history.filter(item => item.text !== query);- console.log('更新后的搜索历史:', history);- localStorage.setItem(SEARCH_HISTORY_KEY, JSON.stringify(history));- } catch (e) {- console.error('删除单条搜索历史失败:', e);- showToast('删除单条搜索历史失败', 'error');- }-}--// 增加清除搜索历史功能-function clearSearchHistory() {- // 密码保护校验- if (window.isPasswordProtected && window.isPasswordVerified) {- if (window.isPasswordProtected() && !window.isPasswordVerified()) {- showPasswordModal && showPasswordModal();- return;- }- }- try {- localStorage.removeItem(SEARCH_HISTORY_KEY);- renderSearchHistory();- showToast('搜索历史已清除', 'success');- } catch (e) {- console.error('清除搜索历史失败:', e);- showToast('清除搜索历史失败:', 'error');- }-}--// 历史面板相关函数-function toggleHistory(e) {- // 密码保护校验- if (window.isPasswordProtected && window.isPasswordVerified) {- if (window.isPasswordProtected() && !window.isPasswordVerified()) {- showPasswordModal && showPasswordModal();- return;- }- }- if (e) e.stopPropagation();-- const panel = document.getElementById('historyPanel');- if (panel) {- panel.classList.toggle('show');-- // 如果打开了历史记录面板,则加载历史数据- if (panel.classList.contains('show')) {- loadViewingHistory();- }-- // 如果设置面板是打开的,则关闭它- const settingsPanel = document.getElementById('settingsPanel');- if (settingsPanel && settingsPanel.classList.contains('show')) {- settingsPanel.classList.remove('show');- }- }-}--// 格式化时间戳为友好的日期时间格式-function formatTimestamp(timestamp) {- const date = new Date(timestamp);- const now = new Date();- const diff = now - date;-- // 小于1小时,显示"X分钟前"- if (diff < 3600000) {- const minutes = Math.floor(diff / 60000);- return minutes <= 0 ? '刚刚' : `${minutes}分钟前`;- }-- // 小于24小时,显示"X小时前"- if (diff < 86400000) {- const hours = Math.floor(diff / 3600000);- return `${hours}小时前`;- }-- // 小于7天,显示"X天前"- if (diff < 604800000) {- const days = Math.floor(diff / 86400000);- return `${days}天前`;- }-- // 其他情况,显示完整日期- const year = date.getFullYear();- const month = (date.getMonth() + 1).toString().padStart(2, '0');- const day = date.getDate().toString().padStart(2, '0');- const hour = date.getHours().toString().padStart(2, '0');- const minute = date.getMinutes().toString().padStart(2, '0');-- return `${year}-${month}-${day} ${hour}:${minute}`;-}--// 获取观看历史记录-function getViewingHistory() {- try {- const data = localStorage.getItem('viewingHistory');- return data ? JSON.parse(data) : [];- } catch (e) {- console.error('获取观看历史失败:', e);- return [];- }-}--// 加载观看历史并渲染-function loadViewingHistory() {- const historyList = document.getElementById('historyList');- if (!historyList) return;-- const history = getViewingHistory();-- if (history.length === 0) {- historyList.innerHTML = `<div class="text-center text-gray-500 py-8">暂无观看记录</div>`;- return;- }-- // 渲染历史记录- historyList.innerHTML = history.map(item => {- // 防止XSS- const safeTitle = item.title- .replace(/</g, '<')- .replace(/>/g, '>')- .replace(/"/g, '"');-- const safeSource = item.sourceName ?- item.sourceName.replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"') :- '未知来源';-- const episodeText = item.episodeIndex !== undefined ?- `第${item.episodeIndex + 1}集` : '';-- // 格式化剧集信息- let episodeInfoHtml = '';- if (item.episodes && Array.isArray(item.episodes) && item.episodes.length > 0) {- const totalEpisodes = item.episodes.length;- const syncStatus = item.lastSyncTime ?- `<span class="text-green-400 text-xs" title="剧集列表已同步">✓</span>` :- `<span class="text-yellow-400 text-xs" title="使用缓存数据">⚠</span>`;- episodeInfoHtml = `<span class="text-xs text-gray-400">共${totalEpisodes}集 ${syncStatus}</span>`;- }-- // 格式化进度信息- let progressHtml = '';- if (item.playbackPosition && item.duration && item.playbackPosition > 10 && item.playbackPosition < item.duration * 0.95) {- const percent = Math.round((item.playbackPosition / item.duration) * 100);- const formattedTime = formatPlaybackTime(item.playbackPosition);- const formattedDuration = formatPlaybackTime(item.duration);-- progressHtml = `- <div class="history-progress">- <div class="progress-bar">- <div class="progress-filled" style="width:${percent}%"></div>- </div>- <div class="progress-text">${formattedTime} / ${formattedDuration}</div>- </div>- `;- }-- // 为防止XSS,使用encodeURIComponent编码URL- const safeURL = encodeURIComponent(item.url);-- // 构建历史记录项HTML,添加删除按钮,需要放在position:relative的容器中- return `- <div class="history-item cursor-pointer relative group" onclick="playFromHistory('${item.url}', '${safeTitle}', ${item.episodeIndex || 0}, ${item.playbackPosition || 0})">- <button onclick="event.stopPropagation(); deleteHistoryItem('${safeURL}')"- class="absolute right-2 top-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200 text-gray-400 hover:text-red-400 p-1 rounded-full hover:bg-gray-800 z-10"- title="删除记录">- <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>- </svg>- </button>- <div class="history-info">- <div class="history-title">${safeTitle}</div>- <div class="history-meta">- <span class="history-episode">${episodeText}</span>- ${episodeText ? '<span class="history-separator mx-1">·</span>' : ''}- <span class="history-source">${safeSource}</span>- ${episodeInfoHtml ? '<span class="history-separator mx-1">·</span>' : ''}- ${episodeInfoHtml}- </div>- ${progressHtml}- <div class="history-time">${formatTimestamp(item.timestamp)}</div>- </div>- </div>- `;- }).join('');-- // 检查是否存在较多历史记录,添加底部边距确保底部按钮不会挡住内容- if (history.length > 5) {- historyList.classList.add('pb-4');- }-}--// 格式化播放时间为 mm:ss 格式-function formatPlaybackTime(seconds) {- if (!seconds || isNaN(seconds)) return '00:00';-- const minutes = Math.floor(seconds / 60);- const remainingSeconds = Math.floor(seconds % 60);-- return `${minutes.toString().padStart(2, '0')}:${remainingSeconds.toString().padStart(2, '0')}`;-}--// 删除单个历史记录项-function deleteHistoryItem(encodedUrl) {- try {- // 解码URL- const url = decodeURIComponent(encodedUrl);-- // 获取当前历史记录- const history = getViewingHistory();-- // 过滤掉要删除的项- const newHistory = history.filter(item => item.url !== url);-- // 保存回localStorage- localStorage.setItem('viewingHistory', JSON.stringify(newHistory));-- // 重新加载历史记录显示- loadViewingHistory();-- // 显示成功提示- showToast('已删除该记录', 'success');- } catch (e) {- console.error('删除历史记录项失败:', e);- showToast('删除记录失败', 'error');- }-}--// 从历史记录播放-async function playFromHistory(url, title, episodeIndex, playbackPosition = 0) {- // console.log('[playFromHistory in ui.js] Called with:', { url, title, episodeIndex, playbackPosition }); // Log 1- try {- let episodesList = [];- let historyItem = null; // To store the full history item- let syncSuccessful = false;-- // 检查viewingHistory,查找匹配的项- const historyRaw = localStorage.getItem('viewingHistory');- if (historyRaw) {- const history = JSON.parse(historyRaw);- historyItem = history.find(item => item.url === url);- // console.log('[playFromHistory in ui.js] Found historyItem:', historyItem ? JSON.parse(JSON.stringify(historyItem)) : null); // Log 2 (stringify/parse for deep copy)- if (historyItem) {- // console.log('[playFromHistory in ui.js] historyItem.vod_id:', historyItem.vod_id, 'historyItem.sourceName:', historyItem.sourceName); // Log 3- }-- if (historyItem && historyItem.episodes && Array.isArray(historyItem.episodes)) {- episodesList = historyItem.episodes; // Default to stored episodes- // console.log(`从历史记录找到视频 "${title}" 的集数数据 (默认):`, episodesList.length);- }- }-- // Always attempt to fetch fresh episode list if we have the necessary info- if (historyItem && historyItem.vod_id && historyItem.sourceName) {- // Show loading toast to indicate syncing- showToast('正在同步最新剧集列表...', 'info');-- // console.log(`[playFromHistory in ui.js] Attempting to fetch details for vod_id: ${historyItem.vod_id}, sourceName: ${historyItem.sourceName}`); // Log 4- try {- // Construct the API URL for detail fetching- // historyItem.sourceName is used as the sourceCode here- // Add a cache buster timestamp- const timestamp = new Date().getTime();- const apiUrl = `/api/detail?id=${encodeURIComponent(historyItem.vod_id)}&source=${encodeURIComponent(historyItem.sourceName)}&_t=${timestamp}`;-- // Add timeout to the fetch request- const controller = new AbortController();- const timeoutId = setTimeout(() => controller.abort(), 10000); // 10 second timeout-- const response = await fetch(apiUrl, {- signal: controller.signal- });- clearTimeout(timeoutId);-- if (!response.ok) {- throw new Error(`API request failed with status ${response.status}`);- }- const videoDetails = await response.json();-- if (videoDetails && videoDetails.episodes && videoDetails.episodes.length > 0) {- const oldEpisodeCount = episodesList.length;- episodesList = videoDetails.episodes;- syncSuccessful = true;-- // Show success message with episode count info- const newEpisodeCount = episodesList.length;- if (newEpisodeCount > oldEpisodeCount) {- showToast(`已同步最新剧集列表 (${newEpisodeCount}集,新增${newEpisodeCount - oldEpisodeCount}集)`, 'success');- } else if (newEpisodeCount === oldEpisodeCount) {- showToast(`剧集列表已是最新 (${newEpisodeCount}集)`, 'success');- } else {- showToast(`已同步最新剧集列表 (${newEpisodeCount}集)`, 'success');- }-- // console.log(`成功获取 "${title}" 最新剧集列表:`, episodesList.length, "集");- // Update the history item in localStorage with the fresh episodes- if (historyItem) {- historyItem.episodes = [...episodesList]; // Deep copy- historyItem.lastSyncTime = Date.now(); // Add sync timestamp- const history = JSON.parse(historyRaw); // Re-parse to ensure we have the latest version- const idx = history.findIndex(item => item.url === url);- if (idx !== -1) {- history[idx] = { ...history[idx], ...historyItem }; // Merge, ensuring other properties are kept- localStorage.setItem('viewingHistory', JSON.stringify(history));- // console.log("观看历史中的剧集列表已更新。");- }- }- } else {- // console.log(`未能获取 "${title}" 的最新剧集列表,或列表为空。将使用已存储的剧集。`);- showToast('未获取到最新剧集信息,使用缓存数据', 'warning');- }- } catch (fetchError) {- // console.error(`获取 "${title}" 最新剧集列表失败:`, fetchError, "将使用已存储的剧集。");- if (fetchError.name === 'AbortError') {- showToast('同步剧集列表超时,使用缓存数据', 'warning');- } else {- showToast('同步剧集列表失败,使用缓存数据', 'warning');- }- }- } else if (historyItem) {- // console.log(`历史记录项 "${title}" 缺少 vod_id 或 sourceName,无法刷新剧集列表。将使用已存储的剧集。`);- showToast('无法同步剧集列表,使用缓存数据', 'info');- }--- // 如果在历史记录中没找到,尝试使用上一个会话的集数数据- if (episodesList.length === 0) {- try {- const storedEpisodes = JSON.parse(localStorage.getItem('currentEpisodes') || '[]');- if (storedEpisodes.length > 0) {- episodesList = storedEpisodes;- // console.log(`使用localStorage中的集数数据:`, episodesList.length);- }- } catch (e) {- // console.error('解析currentEpisodes失败:', e);- }- }-- // 将剧集列表保存到localStorage,播放器页面会读取它- if (episodesList.length > 0) {- localStorage.setItem('currentEpisodes', JSON.stringify(episodesList));- // console.log(`已将剧集列表保存到localStorage,共 ${episodesList.length} 集`);- }-- // 保存当前页面URL作为返回地址- let currentPath;- if (window.location.pathname.startsWith('/player.html') || window.location.pathname.startsWith('/watch.html')) {- currentPath = localStorage.getItem('lastPageUrl') || '/';- } else {- currentPath = window.location.origin + window.location.pathname + window.location.search;- }- localStorage.setItem('lastPageUrl', currentPath);-- // 构造播放器URL- let playerUrl;- const sourceNameForUrl = historyItem ? historyItem.sourceName : (new URLSearchParams(new URL(url, window.location.origin).search)).get('source');- const sourceCodeForUrl = historyItem ? historyItem.sourceCode || historyItem.sourceName : (new URLSearchParams(new URL(url, window.location.origin).search)).get('source_code');- const idForUrl = historyItem ? historyItem.vod_id : '';--- if (url.includes('player.html') || url.includes('watch.html')) {- // console.log('检测到嵌套播放链接,解析真实URL');- try {- const nestedUrl = new URL(url, window.location.origin);- const nestedParams = nestedUrl.searchParams;- const realVideoUrl = nestedParams.get('url') || url;-- playerUrl = `player.html?url=${encodeURIComponent(realVideoUrl)}&title=${encodeURIComponent(title)}&index=${episodeIndex}&position=${Math.floor(playbackPosition || 0)}&returnUrl=${encodeURIComponent(currentPath)}`;- if (sourceNameForUrl) playerUrl += `&source=${encodeURIComponent(sourceNameForUrl)}`;- if (sourceCodeForUrl) playerUrl += `&source_code=${encodeURIComponent(sourceCodeForUrl)}`;- if (idForUrl) playerUrl += `&id=${encodeURIComponent(idForUrl)}`;--- } catch (e) {- // console.error('解析嵌套URL出错:', e);- playerUrl = `player.html?url=${encodeURIComponent(url)}&title=${encodeURIComponent(title)}&index=${episodeIndex}&position=${Math.floor(playbackPosition || 0)}&returnUrl=${encodeURIComponent(currentPath)}`;- if (sourceNameForUrl) playerUrl += `&source=${encodeURIComponent(sourceNameForUrl)}`;- if (sourceCodeForUrl) playerUrl += `&source_code=${encodeURIComponent(sourceCodeForUrl)}`;- if (idForUrl) playerUrl += `&id=${encodeURIComponent(idForUrl)}`;- }- } else {- // This case should ideally not happen if 'url' is always a player.html link from history- // console.warn("Playing from history with a non-player.html URL structure. This might be an issue.");- const playUrl = new URL(url, window.location.origin);- if (!playUrl.searchParams.has('index') && episodeIndex > 0) {- playUrl.searchParams.set('index', episodeIndex);- }- playUrl.searchParams.set('position', Math.floor(playbackPosition || 0).toString());- playUrl.searchParams.set('returnUrl', encodeURIComponent(currentPath));- if (sourceNameForUrl) playUrl.searchParams.set('source', sourceNameForUrl);- if (sourceCodeForUrl) playUrl.searchParams.set('source_code', sourceCodeForUrl);- if (idForUrl) playUrl.searchParams.set('id', idForUrl);- playerUrl = playUrl.toString();- }-- window.location.href = playerUrl;- } catch (e) {- // console.error('从历史记录播放失败:', e);- const simpleUrl = `player.html?url=${encodeURIComponent(url)}&title=${encodeURIComponent(title)}&index=${episodeIndex}`;- window.location.href = simpleUrl;- }-}--// 添加观看历史 - 确保每个视频标题只有一条记录-// IMPORTANT: videoInfo passed to this function should include a 'showIdentifier' property-// (ideally `${sourceName}_${vod_id}`), 'sourceName', and 'vod_id'.-function addToViewingHistory(videoInfo) {- // 密码保护校验- if (window.isPasswordProtected && window.isPasswordVerified) {- if (window.isPasswordProtected() && !window.isPasswordVerified()) {- showPasswordModal && showPasswordModal();- return;- }- }- try {- const history = getViewingHistory();-- // Ensure videoInfo has a showIdentifier- if (!videoInfo.showIdentifier) {- if (videoInfo.sourceName && videoInfo.vod_id) {- videoInfo.showIdentifier = `${videoInfo.sourceName}_${videoInfo.vod_id}`;- } else {- // Fallback if critical IDs are missing for the preferred identifier- videoInfo.showIdentifier = (videoInfo.episodes && videoInfo.episodes.length > 0) ? videoInfo.episodes[0] : videoInfo.directVideoUrl;- // console.warn(`addToViewingHistory: videoInfo for "${videoInfo.title}" was missing sourceName or vod_id for preferred showIdentifier. Generated fallback: ${videoInfo.showIdentifier}`);- }- }-- const existingIndex = history.findIndex(item =>- item.title === videoInfo.title &&- item.sourceName === videoInfo.sourceName &&- item.showIdentifier === videoInfo.showIdentifier // Strict check using the determined showIdentifier- );-- if (existingIndex !== -1) {- // Exact match with showIdentifier: Update existing series entry- const existingItem = history[existingIndex];- existingItem.episodeIndex = videoInfo.episodeIndex;- existingItem.timestamp = Date.now();- existingItem.sourceName = videoInfo.sourceName || existingItem.sourceName;- existingItem.sourceCode = videoInfo.sourceCode || existingItem.sourceCode;- existingItem.vod_id = videoInfo.vod_id || existingItem.vod_id;- existingItem.directVideoUrl = videoInfo.directVideoUrl || existingItem.directVideoUrl;- existingItem.url = videoInfo.url || existingItem.url;- existingItem.playbackPosition = videoInfo.playbackPosition > 10 ? videoInfo.playbackPosition : (existingItem.playbackPosition || 0);- existingItem.duration = videoInfo.duration || existingItem.duration;-- if (videoInfo.episodes && Array.isArray(videoInfo.episodes) && videoInfo.episodes.length > 0) {- if (!existingItem.episodes ||- !Array.isArray(existingItem.episodes) ||- existingItem.episodes.length !== videoInfo.episodes.length ||- !videoInfo.episodes.every((ep, i) => ep === existingItem.episodes[i])) {- existingItem.episodes = [...videoInfo.episodes];- // console.log(`更新 (addToViewingHistory) "${videoInfo.title}" 的剧集数据: ${videoInfo.episodes.length}集`);- }- }-- history.splice(existingIndex, 1);- history.unshift(existingItem);- // console.log(`更新历史记录 (addToViewingHistory): "${videoInfo.title}", 第 ${videoInfo.episodeIndex !== undefined ? videoInfo.episodeIndex + 1 : 'N/A'} 集`);- } else {- // No exact match: Add as a new entry- const newItem = {- ...videoInfo, // Includes the showIdentifier we ensured is present- timestamp: Date.now()- };-- if (videoInfo.episodes && Array.isArray(videoInfo.episodes)) {- newItem.episodes = [...videoInfo.episodes];- } else {- newItem.episodes = [];- }-- history.unshift(newItem);- // console.log(`创建新的历史记录 (addToViewingHistory): "${videoInfo.title}", Episode: ${videoInfo.episodeIndex !== undefined ? videoInfo.episodeIndex + 1 : 'N/A'}`);- }-- // 限制历史记录数量为50条- const maxHistoryItems = 50;- if (history.length > maxHistoryItems) {- history.splice(maxHistoryItems);- }-- // 保存到本地存储- localStorage.setItem('viewingHistory', JSON.stringify(history));- } catch (e) {- // console.error('保存观看历史失败:', e);- }-}--// 清空观看历史-function clearViewingHistory() {- try {- localStorage.removeItem('viewingHistory');- loadViewingHistory(); // 重新加载空的历史记录- showToast('观看历史已清空', 'success');- } catch (e) {- // console.error('清除观看历史失败:', e);- showToast('清除观看历史失败', 'error');- }-}--// 更新toggleSettings函数以处理历史面板互动-const originalToggleSettings = toggleSettings;-toggleSettings = function(e) {- if (e) e.stopPropagation();-- // 原始设置面板切换逻辑- originalToggleSettings(e);-- // 如果历史记录面板是打开的,则关闭它- const historyPanel = document.getElementById('historyPanel');- if (historyPanel && historyPanel.classList.contains('show')) {- historyPanel.classList.remove('show');- }-};--// 点击外部关闭历史面板-document.addEventListener('DOMContentLoaded', function() {- document.addEventListener('click', function(e) {- const historyPanel = document.getElementById('historyPanel');- const historyButton = document.querySelector('button[onclick="toggleHistory(event)"]');-- if (historyPanel && historyButton &&- !historyPanel.contains(e.target) &&- !historyButton.contains(e.target) &&- historyPanel.classList.contains('show')) {- historyPanel.classList.remove('show');- }- });-});--// 清除本地存储缓存并刷新页面-function clearLocalStorage() {- // 确保模态框在页面上只有一个实例- let modal = document.getElementById('messageBoxModal');- if (modal) {- document.body.removeChild(modal);- }-- // 创建模态框元素- modal = document.createElement('div');- modal.id = 'messageBoxModal';- modal.className = 'fixed inset-0 bg-black bg-opacity-75 flex items-center justify-center z-40';-- modal.innerHTML = `- <div class="bg-[#191919] rounded-lg p-6 max-w-md w-full max-h-[90vh] overflow-y-auto relative">- <button id="closeBoxModal" class="absolute top-4 right-4 text-gray-400 hover:text-white text-xl">×</button>-- <h3 class="text-xl font-bold text-red-500 mb-4">警告</h3>-- <div class="mb-0">- <div class="text-sm font-medium text-gray-300">确定要清除页面缓存吗?</div>- <div class="text-sm font-medium text-gray-300 mb-4">此功能会删除你的观看记录、自定义 API 接口和 Cookie,<scan class="text-red-500 font-bold">此操作不可恢复!</scan></div>- <div class="flex justify-end space-x-2">- <button id="confirmBoxModal" class="ml-2 bg-gray-600 hover:bg-gray-700 text-white px-4 py-1 rounded">确定</button>- <button id="cancelBoxModal" class="ml-2 bg-pink-600 hover:bg-pink-700 text-white px-4 py-1 rounded">取消</button>- </div>- </div>- </div>`;-- // 添加模态框到页面- document.body.appendChild(modal);-- // 添加事件监听器 - 关闭按钮- document.getElementById('closeBoxModal').addEventListener('click', function () {- document.body.removeChild(modal);- });-- // 添加事件监听器 - 确定按钮- document.getElementById('confirmBoxModal').addEventListener('click', function () {- // 清除所有localStorage数据- localStorage.clear();-- // 清除所有cookie- const cookies = document.cookie.split(";");- for (let i = 0; i < cookies.length; i++) {- const cookie = cookies[i];- const eqPos = cookie.indexOf("=");- const name = eqPos > -1 ? cookie.substr(0, eqPos).trim() : cookie.trim();- document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/";- }-- modal.innerHTML = `- <div class="bg-[#191919] rounded-lg p-6 max-w-md w-full max-h-[90vh] overflow-y-auto relative">- <button id="closeBoxModal" class="absolute top-4 right-4 text-gray-400 hover:text-white text-xl">×</button>-- <h3 class="text-xl font-bold text-white mb-4">提示</h3>-- <div class="mb-4">- <div class="text-sm font-medium text-gray-300 mb-4">页面缓存和Cookie已清除,<span id="countdown">3</span> 秒后自动刷新本页面。</div>- </div>- </div>`;-- let countdown = 3;- const countdownElement = document.getElementById('countdown');-- const countdownInterval = setInterval(() => {- countdown--;- if (countdown >= 0) {- countdownElement.textContent = countdown;- } else {- clearInterval(countdownInterval);- window.location.reload();- }- }, 1000);- });-- // 添加事件监听器 - 取消按钮- document.getElementById('cancelBoxModal').addEventListener('click', function () {- document.body.removeChild(modal);- });-- // 添加事件监听器 - 点击模态框外部关闭- modal.addEventListener('click', function (e) {- if (e.target === modal) {- document.body.removeChild(modal);- }- });-}--// 显示配置文件导入页面-function showImportBox(fun) {- // 确保模态框在页面上只有一个实例- let modal = document.getElementById('showImportBoxModal');- if (modal) {- document.body.removeChild(modal);- }-- // 创建模态框元素- modal = document.createElement('div');- modal.id = 'showImportBoxModal';- modal.className = 'fixed inset-0 bg-black bg-opacity-75 flex items-center justify-center z-40';-- modal.innerHTML = `- <div class="bg-[#191919] rounded-lg p-6 max-w-md w-full max-h-[90vh] overflow-y-auto relative">- <button id="closeBoxModal" class="absolute top-4 right-4 text-gray-400 hover:text-white text-xl">×</button>-- <div class="m-4">- <div id="dropZone" class="w-full py-9 bg-[#111] rounded-2xl border border-gray-300 gap-3 grid border-dashed">- <div class="grid gap-1">- <svg class="mx-auto" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">- <g id="File">- <path id="icon" d="M31.6497 10.6056L32.2476 10.0741L31.6497 10.6056ZM28.6559 7.23757L28.058 7.76907L28.058 7.76907L28.6559 7.23757ZM26.5356 5.29253L26.2079 6.02233L26.2079 6.02233L26.5356 5.29253ZM33.1161 12.5827L32.3683 12.867V12.867L33.1161 12.5827ZM31.8692 33.5355L32.4349 34.1012L31.8692 33.5355ZM24.231 11.4836L25.0157 11.3276L24.231 11.4836ZM26.85 14.1026L26.694 14.8872L26.85 14.1026ZM11.667 20.8667C11.2252 20.8667 10.867 21.2248 10.867 21.6667C10.867 22.1085 11.2252 22.4667 11.667 22.4667V20.8667ZM25.0003 22.4667C25.4422 22.4667 25.8003 22.1085 25.8003 21.6667C25.8003 21.2248 25.4422 20.8667 25.0003 20.8667V22.4667ZM11.667 25.8667C11.2252 25.8667 10.867 26.2248 10.867 26.6667C10.867 27.1085 11.2252 27.4667 11.667 27.4667V25.8667ZM20.0003 27.4667C20.4422 27.4667 20.8003 27.1085 20.8003 26.6667C20.8003 26.2248 20.4422 25.8667 20.0003 25.8667V27.4667ZM23.3337 34.2H16.667V35.8H23.3337V34.2ZM7.46699 25V15H5.86699V25H7.46699ZM32.5337 15.0347V25H34.1337V15.0347H32.5337ZM16.667 5.8H23.6732V4.2H16.667V5.8ZM23.6732 5.8C25.2185 5.8 25.7493 5.81639 26.2079 6.02233L26.8633 4.56274C26.0191 4.18361 25.0759 4.2 23.6732 4.2V5.8ZM29.2539 6.70608C28.322 5.65771 27.7076 4.94187 26.8633 4.56274L26.2079 6.02233C26.6665 6.22826 27.0314 6.6141 28.058 7.76907L29.2539 6.70608ZM34.1337 15.0347C34.1337 13.8411 34.1458 13.0399 33.8638 12.2984L32.3683 12.867C32.5216 13.2702 32.5337 13.7221 32.5337 15.0347H34.1337ZM31.0518 11.1371C31.9238 12.1181 32.215 12.4639 32.3683 12.867L33.8638 12.2984C33.5819 11.5569 33.0406 10.9662 32.2476 10.0741L31.0518 11.1371ZM16.667 34.2C14.2874 34.2 12.5831 34.1983 11.2872 34.0241C10.0144 33.8529 9.25596 33.5287 8.69714 32.9698L7.56577 34.1012C8.47142 35.0069 9.62375 35.4148 11.074 35.6098C12.5013 35.8017 14.3326 35.8 16.667 35.8V34.2ZM5.86699 25C5.86699 27.3344 5.86529 29.1657 6.05718 30.593C6.25217 32.0432 6.66012 33.1956 7.56577 34.1012L8.69714 32.9698C8.13833 32.411 7.81405 31.6526 7.64292 30.3798C7.46869 29.0839 7.46699 27.3796 7.46699 25H5.86699ZM23.3337 35.8C25.6681 35.8 27.4993 35.8017 28.9266 35.6098C30.3769 35.4148 31.5292 35.0069 32.4349 34.1012L31.3035 32.9698C30.7447 33.5287 29.9863 33.8529 28.7134 34.0241C27.4175 34.1983 25.7133 34.2 23.3337 34.2V35.8ZM32.5337 25C32.5337 27.3796 32.532 29.0839 32.3577 30.3798C32.1866 31.6526 31.8623 32.411 31.3035 32.9698L32.4349 34.1012C33.3405 33.1956 33.7485 32.0432 33.9435 30.593C34.1354 29.1657 34.1337 27.3344 34.1337 25H32.5337ZM7.46699 15C7.46699 12.6204 7.46869 10.9161 7.64292 9.62024C7.81405 8.34738 8.13833 7.58897 8.69714 7.03015L7.56577 5.89878C6.66012 6.80443 6.25217 7.95676 6.05718 9.40704C5.86529 10.8343 5.86699 12.6656 5.86699 15H7.46699ZM16.667 4.2C14.3326 4.2 12.5013 4.1983 11.074 4.39019C9.62375 4.58518 8.47142 4.99313 7.56577 5.89878L8.69714 7.03015C9.25596 6.47133 10.0144 6.14706 11.2872 5.97592C12.5831 5.8017 14.2874 5.8 16.667 5.8V4.2ZM23.367 5V10H24.967V5H23.367ZM28.3337 14.9667H33.3337V13.3667H28.3337V14.9667ZM23.367 10C23.367 10.7361 23.3631 11.221 23.4464 11.6397L25.0157 11.3276C24.9709 11.1023 24.967 10.8128 24.967 10H23.367ZM28.3337 13.3667C27.5209 13.3667 27.2313 13.3628 27.0061 13.318L26.694 14.8872C27.1127 14.9705 27.5976 14.9667 28.3337 14.9667V13.3667ZM23.4464 11.6397C23.7726 13.2794 25.0543 14.5611 26.694 14.8872L27.0061 13.318C26.0011 13.1181 25.2156 12.3325 25.0157 11.3276L23.4464 11.6397ZM11.667 22.4667H25.0003V20.8667H11.667V22.4667ZM11.667 27.4667H20.0003V25.8667H11.667V27.4667ZM32.2476 10.0741L29.2539 6.70608L28.058 7.76907L31.0518 11.1371L32.2476 10.0741Z" fill="#DB2777" />- </g>- </svg>- </div>- <div class="grid gap-2">- <h4 class="text-center text-white-900 text-sm font-medium leading-snug">将配置文件拖到此处,或手动选择文件</h4>- <div class="flex items-center justify-center gap-2">- <label>- <input type="file" id="ChooseFile" hidden />- <div class="flex w-28 h-9 px-2 flex-col bg-pink-600 rounded-full shadow text-white text-xs font-semibold leading-4 items-center justify-center cursor-pointer focus:outline-none">选择文件</div>- </label>- <button onclick="importConfigFromUrl()" class="flex w-28 h-9 px-2 flex-col bg-blue-600 rounded-full shadow text-white text-xs font-semibold leading-4 items-center justify-center cursor-pointer focus:outline-none">从URL导入</button>- </div>- </div>- </div>- </div>- </div>`;-- // 添加模态框到页面- document.body.appendChild(modal);-- // 添加事件监听器 - 关闭按钮- document.getElementById('closeBoxModal').addEventListener('click', function () {- document.body.removeChild(modal);- });-- // 添加事件监听器 - 点击模态框外部关闭- modal.addEventListener('click', function (e) {- if (e.target === modal) {- document.body.removeChild(modal);- }- });-- // 添加事件监听器 - 拖拽文件- const dropZone = document.getElementById('dropZone');- const fileInput = document.getElementById('ChooseFile');-- dropZone.addEventListener('dragover', (e) => {- e.preventDefault();- dropZone.classList.add('border-blue-500');- });-- dropZone.addEventListener('dragleave', () => {- dropZone.classList.remove('border-blue-500');- });-- dropZone.addEventListener('drop', (e) => {- e.preventDefault();- fun(e.dataTransfer.files[0]);- });-- fileInput.addEventListener('change', (e) => {- fun(fileInput.files[0]);- });-}diff --git a/js/version-check.js b/js/version-check.jsdeleted file mode 100644index a6f10f5..0000000--- a/js/version-check.js+++ /dev/null@@ -1,187 +0,0 @@-// 添加动画样式-(function() {- const style = document.createElement('style');- style.textContent = `- @keyframes pulse {- 0%, 100% {- opacity: 1;- }- 50% {- opacity: 0.6;- }- }- .animate-pulse {- animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;- }- `;- document.head.appendChild(style);-})();--// 获取版本信息-async function fetchVersion(url, errorMessage, options = {}) {- const response = await fetch(url, options);- if (!response.ok) {- throw new Error(errorMessage);- }- return await response.text();-}--// 版本检查函数-async function checkForUpdates() {- try {- // 获取当前版本- const currentVersion = await fetchVersion('/VERSION.txt', '获取当前版本失败', {- cache: 'no-store'- });-- // 获取最新版本- let latestVersion;- const VERSION_URL = {- PROXY: 'https://ghfast.top/raw.githubusercontent.com/LibreSpark/LibreTV/main/VERSION.txt',- DIRECT: 'https://raw.githubusercontent.com/LibreSpark/LibreTV/main/VERSION.txt'- };- const FETCH_TIMEOUT = 1500;-- try {- // 尝试使用代理URL获取最新版本- const proxyPromise = fetchVersion(VERSION_URL.PROXY, '代理请求失败');- const timeoutPromise = new Promise((_, reject) =>- setTimeout(() => reject(new Error('代理请求超时')), FETCH_TIMEOUT)- );-- latestVersion = await Promise.race([proxyPromise, timeoutPromise]);- console.log('通过代理服务器获取版本成功');- } catch (error) {- console.log('代理请求失败,尝试直接请求:', error.message);- try {- // 代理失败后尝试直接获取- latestVersion = await fetchVersion(VERSION_URL.DIRECT, '获取最新版本失败');- console.log('直接请求获取版本成功');- } catch (directError) {- console.error('所有版本检查请求均失败:', directError);- throw new Error('无法获取最新版本信息');- }- }-- console.log('当前版本:', currentVersion);- console.log('最新版本:', latestVersion);-- // 清理版本字符串(移除可能的空格或换行符)- const cleanCurrentVersion = currentVersion.trim();- const cleanLatestVersion = latestVersion.trim();-- // 返回版本信息- return {- current: cleanCurrentVersion,- latest: cleanLatestVersion,- hasUpdate: parseInt(cleanLatestVersion) > parseInt(cleanCurrentVersion),- currentFormatted: formatVersion(cleanCurrentVersion),- latestFormatted: formatVersion(cleanLatestVersion)- };- } catch (error) {- console.error('版本检测出错:', error);- throw error;- }-}--// 格式化版本号为可读形式 (yyyyMMddhhmm -> yyyy-MM-dd hh:mm)-function formatVersion(versionString) {- // 检测版本字符串是否有效- if (!versionString) {- return '未知版本';- }-- // 清理版本字符串(移除可能的空格或换行符)- const cleanedString = versionString.trim();-- // 格式化标准12位版本号- if (cleanedString.length === 12) {- const year = cleanedString.substring(0, 4);- const month = cleanedString.substring(4, 6);- const day = cleanedString.substring(6, 8);- const hour = cleanedString.substring(8, 10);- const minute = cleanedString.substring(10, 12);-- return `${year}-${month}-${day} ${hour}:${minute}`;- }-- return cleanedString;-}--// 创建错误版本信息元素-function createErrorVersionElement(errorMessage) {- const errorElement = document.createElement('p');- errorElement.className = 'text-gray-500 text-sm mt-1 text-center md:text-left';- errorElement.innerHTML = `版本: <span class="text-amber-500">检测失败</span>`;- errorElement.title = errorMessage;- return errorElement;-}--// 添加版本信息到页脚-function addVersionInfoToFooter() {- checkForUpdates().then(result => {- if (!result) {- // 如果版本检测失败,显示错误信息- const versionElement = createErrorVersionElement();- // 在页脚显示错误元素- displayVersionElement(versionElement);- return;- }-- // 创建版本信息元素- const versionElement = document.createElement('p');- versionElement.className = 'text-gray-500 text-sm mt-1 text-center md:text-left';-- // 添加当前版本信息- versionElement.innerHTML = `版本: ${result.currentFormatted}`;-- // 如果有更新,添加更新提示- if (result.hasUpdate) {- versionElement.innerHTML += ` <span class="inline-flex items-center bg-red-600 text-white text-xs px-2 py-0.5 rounded-md ml-1 cursor-pointer animate-pulse font-medium">- <svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3 mr-1" fill="none" viewBox="0 0 24 24" stroke="currentColor">- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z" />- </svg>- 发现新版- </span>`;-- setTimeout(() => {- const updateBtn = versionElement.querySelector('span');- if (updateBtn) {- updateBtn.addEventListener('click', () => {- window.open('https://github.com/LibreSpark/LibreTV', '_blank');- });- }- }, 100);- } else {- // 如果没有更新,显示当前版本为最新版本- versionElement.innerHTML = `版本: ${result.currentFormatted} <span class="text-green-500">(最新版本)</span>`;- }-- // 显示版本元素- displayVersionElement(versionElement);- }).catch(error => {- console.error('版本检测出错:', error);- // 创建错误版本信息元素并显示- const errorElement = createErrorVersionElement(`错误信息: ${error.message}`);- displayVersionElement(errorElement);- });-}--// 在页脚显示版本元素的辅助函数-function displayVersionElement(element) {- // 获取页脚元素- const footerElement = document.querySelector('.footer p.text-gray-500.text-sm');- if (footerElement) {- // 在原版权信息后插入版本信息- footerElement.insertAdjacentElement('afterend', element);- } else {- // 如果找不到页脚元素,尝试在页脚区域最后添加- const footer = document.querySelector('.footer .container');- if (footer) {- footer.querySelector('div').appendChild(element);- }- }-}--// 页面加载完成后添加版本信息-document.addEventListener('DOMContentLoaded', addVersionInfoToFooter);diff --git a/js/watch.js b/js/watch.jsdeleted file mode 100644index 255ccc5..0000000--- a/js/watch.js+++ /dev/null@@ -1,92 +0,0 @@-// 获取当前URL的参数,并将它们传递给player.html-window.onload = function() {- // 获取当前URL的查询参数- const currentParams = new URLSearchParams(window.location.search);-- // 创建player.html的URL对象- const playerUrlObj = new URL("player.html", window.location.origin);-- // 更新状态文本- const statusElement = document.getElementById('redirect-status');- const manualRedirect = document.getElementById('manual-redirect');- let statusMessages = [- "准备视频数据中...",- "正在加载视频信息...",- "即将开始播放...",- ];- let currentStatus = 0;-- // 状态文本动画- let statusInterval = setInterval(() => {- if (currentStatus >= statusMessages.length) {- currentStatus = 0;- }- if (statusElement) {- statusElement.textContent = statusMessages[currentStatus];- statusElement.style.opacity = 0.7;- setTimeout(() => {- if (statusElement) statusElement.style.opacity = 1;- }, 300);- }- currentStatus++;- }, 1000);-- // 确保保留所有原始参数- currentParams.forEach((value, key) => {- playerUrlObj.searchParams.set(key, value);- });-- // 获取来源URL (如果存在)- const referrer = document.referrer;-- // 获取当前URL中的返回URL参数(如果有)- const backUrl = currentParams.get('back');-- // 确定返回URL的优先级:1. 指定的back参数 2. referrer 3. 搜索页面- let returnUrl = '';- if (backUrl) {- // 有显式指定的返回URL- returnUrl = decodeURIComponent(backUrl);- } else if (referrer && (referrer.includes('/s=') || referrer.includes('?s='))) {- // 来源是搜索页面- returnUrl = referrer;- } else if (referrer && referrer.trim() !== '') {- // 如果有referrer但不是搜索页,也使用它- returnUrl = referrer;- } else {- // 默认回到首页- returnUrl = '/';- }-- // 将返回URL添加到player.html的参数中- if (!playerUrlObj.searchParams.has('returnUrl')) {- playerUrlObj.searchParams.set('returnUrl', encodeURIComponent(returnUrl));- }-- // 同时保存在localStorage中,作为备用- localStorage.setItem('lastPageUrl', returnUrl);-- // 标记来自搜索页面- if (returnUrl.includes('/s=') || returnUrl.includes('?s=')) {- localStorage.setItem('cameFromSearch', 'true');- localStorage.setItem('searchPageUrl', returnUrl);- }-- // 获取最终的URL字符串- const finalPlayerUrl = playerUrlObj.toString();-- // 更新手动重定向链接- if (manualRedirect) {- manualRedirect.href = finalPlayerUrl;- }-- // 更新meta refresh标签(兜底,正常由下方 JS 立即跳转)- const metaRefresh = document.querySelector('meta[http-equiv="refresh"]');- if (metaRefresh) {- metaRefresh.content = `0; url=${finalPlayerUrl}`;- }-- // 立即跳转到播放器页面,去除原先人为增加的 2.8s 加载动画延迟- clearInterval(statusInterval);- window.location.href = finalPlayerUrl;-};\ No newline at end of filediff --git a/libretv-next/.env.example b/libretv-next/.env.exampledeleted file mode 100644index 644f122..0000000--- a/libretv-next/.env.example+++ /dev/null@@ -1,12 +0,0 @@-# 必填:访问密码(不设置时站点会提示管理员配置后再可用)-PASSWORD=change-me--# 可选:会话/代理签名密钥;不设置时从 PASSWORD 派生-# PROXY_SECRET=--# 可选:代理请求上游的超时与重试-REQUEST_TIMEOUT=8000-MAX_RETRIES=1--# 可选:调试-DEBUG=falsediff --git a/libretv-next/.gitignore b/libretv-next/.gitignoredeleted file mode 100644index 81b1fe3..0000000--- a/libretv-next/.gitignore+++ /dev/null@@ -1,6 +0,0 @@-node_modules/-.next/-out/-.env*.local-*.tsbuildinfo-vitest-results.jsondiff --git a/libretv-next/Dockerfile b/libretv-next/Dockerfiledeleted file mode 100644index 37fe68b..0000000--- a/libretv-next/Dockerfile+++ /dev/null@@ -1,32 +0,0 @@-# ---- 构建阶段 -----FROM node:22-alpine AS builder-WORKDIR /app--COPY package.json package-lock.json* ./-RUN npm ci --no-audit --no-fund--COPY . .-ENV DOCKER_BUILD=1-ENV NEXT_TELEMETRY_DISABLED=1-RUN npm run build--# ---- 运行阶段 -----FROM node:22-alpine AS runner-WORKDIR /app--ENV NODE_ENV=production-ENV NEXT_TELEMETRY_DISABLED=1-ENV PORT=8080-ENV HOSTNAME=0.0.0.0--# 非 root 用户-RUN addgroup -S nodejs && adduser -S nextjs -G nodejs--COPY --from=builder /app/.next/standalone ./-COPY --from=builder /app/.next/static ./.next/static-COPY --from=builder /app/public ./public--USER nextjs--EXPOSE 8080-CMD ["node", "server.js"]diff --git a/libretv-next/README.md b/libretv-next/README.mddeleted file mode 100644index 5eef3fc..0000000--- a/libretv-next/README.md+++ /dev/null@@ -1,75 +0,0 @@-# LibreTV Next--LibreTV 的 Next.js 重构版:免费在线视频聚合搜索与观看平台。基于 Next.js 15(App Router)+ TypeScript + Tailwind CSS,播放内核为 ArtPlayer + hls.js,支持亮暗双主题。--> 📖 **完整文档(Wiki)**:[docs/](docs/Home) — [架构](docs/Architecture) · [部署](docs/Deployment) · [配置](docs/Configuration) · [数据源](docs/Data-Sources) · [播放器](docs/Player) · [代理与安全](docs/Proxy-Security) · [FAQ](docs/FAQ)--## 与旧版的主要差异--| 方面 | 旧版 | 本版 |-| --- | --- | --- |-| 架构 | 静态 HTML + 全局脚本 + Express | Next.js App Router + React 组件 + Route Handlers |-| 聚合搜索 | 浏览器内并行请求采集站(暴露用户 IP) | 服务端并行聚合 + 失败隔离 + 关键词过滤 |-| 鉴权 | 页面下发 sha256(password),哈希即凭证 | httpOnly Cookie 会话(HMAC 签名),登录走 POST + 速率限制 |-| m3u8 代理 | 分片重写后丢失鉴权参数导致 401 | Cookie 同源自动携带,分片天然通过鉴权 |-| 播放入口 | watch.html → player.html 跳转链 | 单一 `/watch` 路由,URL 即状态,可分享/后退 |-| 播放失败 | 只能换源 | 直连失败自动回退内置代理重试 |-| 历史与进度 | localStorage 存全集 URL(易撑爆配额) | IndexedDB 只存定位信息,进入播放页按需拉详情 |-| 播放器加载 | Tailwind 运行时编译 | Tailwind 构建期编译 |-| 主题 | 仅深色 | 亮 / 暗 / 跟随系统三态切换,无首屏闪烁 |--## 部署--### Docker(推荐)--```bash-# 在 .env 中设置 PASSWORD-echo "PASSWORD=your-password" > .env-docker compose up -d -b-```--### 手动运行--```bash-npm install-PASSWORD=your-password npm run build-PASSWORD=your-password npm start # 监听 8080-```--### 环境变量--| 变量 | 必填 | 说明 |-| --- | --- | --- |-| `PASSWORD` | 是 | 访问密码;未设置时站点会提示管理员配置 |-| `PROXY_SECRET` | 否 | 会话/代理签名密钥;不设置时从 PASSWORD 派生(多实例部署建议显式设置) |-| `REQUEST_TIMEOUT` | 否 | 代理上游请求超时(毫秒),默认 8000 |-| `MAX_RETRIES` | 否 | 代理请求重试次数,默认 1 |-| `DEBUG` | 否 | 调试日志 |--## 使用说明--1. **添加数据源**:设置 → 添加 API,填入 Apple CMS 采集站地址(如 `https://example.com/api.php/provide/vod`),可选填详情页地址(部分源需要爬详情页提取播放地址)。-2. **搜索**:勾选数据源后输入片名;搜索通过服务端聚合,个别源失败不影响整体结果。-3. **播放**:详情弹窗选择剧集进入 `/watch`;支持快捷键(空格/←→/↑↓/F/Alt+←→)、移动端长按 3 倍速、自动连播、换源测速。-4. **进度与历史**:自动保存在本设备 IndexedDB,仅定位信息入库,播放时自动同步最新剧集。-5. **配置迁移**:设置 → 导出/导入配置(兼容旧版 LibreTV-Settings JSON 的历史记录迁移)。--## 开发--```bash-npm install-PASSWORD=dev-password npm run dev # http://localhost:8080-npm test # 核心库单元测试(cms-parser / m3u8 / ssrf)-npm run typecheck-```--## 安全说明--- 密码只保存在服务端环境变量中,前端不持有任何可重放凭证。-- 登录接口有 IP 速率限制(10 次 / 10 分钟)。-- 代理内置 SSRF 防护:拒绝内网/保留地址(含 DNS 解析后校验),仅放行 http(s)。-- 未登录会话仅允许代理图片类目标(豆瓣封面防盗链需要)。--## 免责声明--本项目不存储、不制作任何视频内容,仅提供第三方公开接口的聚合与播放能力,内容的合法性由对应数据源负责。diff --git a/libretv-next/docker-compose.yml b/libretv-next/docker-compose.ymldeleted file mode 100644index 206b554..0000000--- a/libretv-next/docker-compose.yml+++ /dev/null@@ -1,15 +0,0 @@-services:- libretv:- build: .- container_name: libretv-next- restart: unless-stopped- ports:- - "8080:8080"- environment:- # 必填:访问密码- - PASSWORD=${PASSWORD:?请在 .env 中设置 PASSWORD}- # 可选:会话/代理签名密钥(多实例部署建议显式设置)- # - PROXY_SECRET=your-secret- # - REQUEST_TIMEOUT=8000- # - MAX_RETRIES=1- # - DEBUG=falsediff --git a/libretv-next/docs/Architecture.md b/libretv-next/docs/Architecture.mddeleted file mode 100644index 35171a6..0000000--- a/libretv-next/docs/Architecture.md+++ /dev/null@@ -1,114 +0,0 @@-# 架构--## 技术栈--| 层 | 技术 | 说明 |-| --- | --- | --- |-| 框架 | Next.js 15(App Router)+ React 19 | 服务端 API Routes 与客户端页面同仓 |-| 语言 | TypeScript(strict) | 全量类型覆盖 |-| 样式 | Tailwind CSS(构建期编译)+ CSS 变量主题 | 亮暗双主题,`darkMode: 'class'` |-| 数据获取 | TanStack Query | 搜索/详情/豆瓣的缓存、重试、失效 |-| 客户端状态 | Zustand(persist → localStorage) | 数据源列表与播放设置 |-| 持久化 | Dexie(IndexedDB) | 观看历史、播放进度、搜索历史 |-| 播放 | ArtPlayer + hls.js | 广告过滤 loader、代理回退 |--## 目录结构--```-libretv-next/-├── src/-│ ├── app/-│ │ ├── page.tsx # 首页:搜索 + 豆瓣推荐(?s= URL 驱动)-│ │ ├── watch/page.tsx # 播放页(唯一入口,URL 即状态)-│ │ ├── about/page.tsx-│ │ ├── layout.tsx # 主题无闪烁内联脚本 + Providers-│ │ ├── manifest.ts # PWA manifest-│ │ └── api/ # 服务端 Route Handlers-│ │ ├── auth/route.ts # 登录/登出/会话状态-│ │ ├── status/route.ts # 站点状态(客户端据此弹登录框)-│ │ ├── search/route.ts # 聚合搜索(并行 + 失败隔离 + 过滤)-│ │ ├── detail/route.ts # 详情(列表接口 → 详情页 HTML 降级)-│ │ ├── douban/route.ts # 豆瓣推荐(直连 + 缓存 + 代理降级)-│ │ └── proxy/[url]/route.ts# 流式代理(SSRF 防护 + m3u8 重写)-│ ├── components/ # UI 组件(见下)-│ └── lib/ # 纯逻辑库(可单元测试)-│ ├── cms-parser.ts # Apple CMS 解析(列表/详情/详情页爬取)-│ ├── m3u8.ts # m3u8 重写与广告过滤-│ ├── ssrf.ts # 内网地址识别与 DNS 校验-│ ├── auth.ts # 会话签名/校验、登录限流-│ ├── douban.ts # 豆瓣数据获取(降级链 + TTL 缓存)-│ ├── fetch-utils.ts # 超时/重试/内存缓存-│ ├── db.ts # Dexie schema 与历史/进度 CRUD-│ ├── store.ts # Zustand 全局设置-│ ├── client-api.ts # 客户端 API 封装(401 → 全局登录框)-│ └── utils.ts # 时间格式化、图片代理 URL、sha256 等-├── docs/ # 本 Wiki-├── Dockerfile / docker-compose.yml-└── README.md-```--## 组件一览--| 组件 | 职责 |-| --- | --- |-| `providers.tsx` | QueryClient + Theme + Toast + Auth 四层 Provider 嵌套 |-| `theme.tsx` | 亮暗主题上下文与三态切换按钮(light/dark/system) |-| `auth.tsx` | 认证上下文;监听全局 401 事件弹出登录框 |-| `header.tsx` | 顶部导航 + 通用抽屉(Drawer)骨架 |-| `search`(page.tsx 内联) | 搜索框、历史 chips、结果网格、空态引导 |-| `douban-section.tsx` | 豆瓣推荐(分类/标签/分页加载) |-| `video-card.tsx` | 搜索结果卡片 / 豆瓣卡片(封面多级降级) |-| `detail-modal.tsx` | 详情弹窗(海报 + 元信息 + 剧集 + 复制链接) |-| `source-manager.tsx` | 设置抽屉:数据源 CRUD、过滤开关、封面加载方式、配置导入导出 |-| `history-panel.tsx` | 观看历史抽屉(Dexie liveQuery 实时刷新) |-| `player-shell.tsx` | ArtPlayer/HLS 封装:广告过滤、快捷键、长按倍速、代理回退 |-| `switch-source.tsx` | 换源面板:跨源搜索 → 同名匹配 → 测速排序 → 切换 |-| `toast.tsx` | 并行堆叠 Toast + 全局 Loading 遮罩 |--## 数据流--### 搜索--```-浏览器 服务端 上游- │ POST /api/search │ │- │ {wd, sources[], filter} │── 并行 fetch(8s 超时)────→│ 采集站 ×N- │ │← JSON ─────────────────────│- │← {list, failures[]} ──────│ 合并/去重/排序/成人过滤 │-```--- 客户端把自定义数据源配置随请求上传(数据源配置仅存于用户浏览器);-- 单源失败进入 `failures`,不影响其他源结果;-- React Query 以 `['search', wd, selectedKeys, filter]` 为缓存键。--### 播放--```-/watch?source=key&id=vodId&index=n&title=..&sourceUrl=..- │- ├─ resolveSource(): 从 Zustand store 取数据源配置(URL 参数兜底,支持分享链接)- ├─ GET /api/detail → episodes[] → 当前集 URL- └─ PlayerShell(ArtPlayer+hls)- ├─ 直连 m3u8- └─ 致命网络错误 → /api/proxy/<url> 重试一次(cookie 鉴权)-```--进度:`video:timeupdate`(5s 节流)+ 暂停 + 卸载 → IndexedDB `progress`;-历史:进入播放页 2s 后 upsert,仅存定位信息(`sourceKey + vodId + episodeIndex`),不存全集 URL。--### 换源--`switch-source.tsx` → `POST /api/search`(按标题)→ 每源取完全同名结果(否则第一条)→ `GET /api/detail` 并发测速(接口耗时)→ 按速度排序展示 → 切换时保留集数索引。--## 与旧版的架构差异--| 维度 | 旧版 | 本版 |-| --- | --- | --- |-| API 层 | 浏览器内 monkey-patch `window.fetch` 假装 `/api/*` | 真实服务端 Route Handlers |-| 聚合搜索位置 | 用户浏览器(IP 暴露、无法缓存) | 服务端 |-| 鉴权 | 页面下发 sha256(password),`auth=` 哈希即凭证 | httpOnly cookie + HMAC 签名会话 |-| m3u8 分片 | 重写为 `/proxy/...` 但丢失鉴权参数 → 401 | cookie 同源自动携带,天然通过 |-| 页面间状态 | URL + localStorage 双总线(10+ key) | URL 即状态 + IndexedDB |-| 播放入口 | watch.html → player.html 跳转链 | 单一 `/watch` 路由 |-| 转义 | 4 种手工转义函数,存在 XSS 缺口 | React 自动转义,无 innerHTML |-| 主题 | 无 | CSS 变量 + class 策略,三态切换 |diff --git a/libretv-next/docs/Configuration.md b/libretv-next/docs/Configuration.mddeleted file mode 100644index ba69623..0000000--- a/libretv-next/docs/Configuration.md+++ /dev/null@@ -1,60 +0,0 @@-# 配置--## 环境变量--| 变量 | 必填 | 默认 | 说明 |-| --- | --- | --- | --- |-| `PASSWORD` | **是** | — | 访问密码。未设置时站点可用但所有功能接口返回 503,并提示管理员配置 |-| `PROXY_SECRET` | 否 | 从 PASSWORD 派生 | 会话与代理签名密钥。单实例可不设;多实例/负载均衡部署必须显式设置,否则各实例会话互不认账 |-| `REQUEST_TIMEOUT` | 否 | `8000` | 代理上游请求超时(毫秒) |-| `MAX_RETRIES` | 否 | `1` | 代理请求重试次数 |-| `USER_AGENT` | 否 | Chrome UA | 代理请求使用的 UA(豆瓣防盗链等场景) |-| `DEBUG` | 否 | `false` | 调试日志 |--> 旧版的 `CORS_ORIGIN`、`CACHE_MAX_AGE`、`BLOCKED_HOSTS`、`BLOCKED_IP_PREFIXES`、`FILTERED_HEADERS` 在重构版中已内化为安全默认值,不再需要配置。--## 运行时设置(用户级)--以下设置保存在每个用户浏览器的 localStorage(键 `libretv-settings`),通过「设置」抽屉修改:--### 数据源--- **自定义 API 列表**:名称、API 地址、详情页地址(可选)、成人标记;-- **勾选参与搜索的源**:仅勾选的源会参与聚合搜索与换源。--### 播放与过滤--| 开关 | 默认 | 说明 |-| --- | --- | --- |-| 成人内容过滤 | 开 | 服务端按分类关键词过滤(伦理片/福利片等) |-| 广告过滤 | 开 | hls.js loader 剔除 m3u8 中的 `#EXT-X-DISCONTINUITY` 广告片段 |-| 自动连播 | 开 | 单集结束自动播放下一集 |-| 豆瓣推荐 | 开 | 首页展示豆瓣热门影视 |--### 封面图加载方式--| 方式 | 说明 |-| --- | --- |-| 直连(默认) | 浏览器直接加载豆瓣/采集站封面,最快;部分网络下豆瓣图会 418 |-| 内置代理 | 经 `/api/proxy/` 转发(带豆瓣 Referer 伪装),豆瓣图不再被拒 |-| 自定义代理 | 模板字符串,`{url}` 为编码后的原图地址;不含占位符则直接拼接 |--### 主题--- 头部太阳/月亮/显示器图标,点击在 **浅色 → 深色 → 跟随系统** 间循环;-- 存储于 `localStorage['libretv-theme']`;-- 页面 HTML 内有同步脚本,刷新无闪烁;-- 跟随系统模式下监听 `prefers-color-scheme` 变化实时切换。--### 配置导入导出--- **导出**:生成 `LibreTV-Settings_<时间戳>.json`(数据源、播放设置、观看历史、搜索历史);-- **导入**:兼容旧版 LibreTV 导出的配置文件;旧版观看历史(含全集 URL 列表)会自动迁移为定位信息格式。--## 存储结构(IndexedDB `libretv-next`)--| 表 | 主键 | 字段 | 说明 |-| --- | --- | --- | --- |-| `history` | `id = sourceKey_vodId` | title, pic, episodeIndex, totalEpisodes, playbackPosition, duration, timestamp | 上限 100 条,超出淘汰最旧 |-| `progress` | `key = sourceKey_vodId_index` | position, duration, updatedAt | 每集一条,看完清除 |-| `searchHistory` | `text` | timestamp | 上限 10 条 |diff --git a/libretv-next/docs/Data-Sources.md b/libretv-next/docs/Data-Sources.mddeleted file mode 100644index 1da1b5b..0000000--- a/libretv-next/docs/Data-Sources.md+++ /dev/null@@ -1,59 +0,0 @@-# 数据源--LibreTV 采用**空壳设计**:不内置任何采集站,由部署者/用户自行添加,避免内置源失效与合规风险。--## 支持的数据源类型--Apple CMS(苹果CMS)标准采集接口,即提供以下接口的资源站:--```-搜索:{api}?ac=videolist&wd={关键词}-详情:{api}?ac=videolist&ids={vod_id}-```--## 添加数据源--设置 → 数据源 → 「+ 添加 API」:--| 字段 | 必填 | 说明 |-| --- | --- | --- |-| 名称 | 是 | 显示用名称 |-| API 地址 | 是 | 形如 `https://example.com/api.php/provide/vod`,结尾 `/` 会自动去除 |-| 详情页地址 | 否 | 形如 `https://example.com`;部分源列表接口不返回播放地址,需要爬取详情页 HTML 提取 m3u8 |-| 成人标记 | 否 | 标记后受「成人内容过滤」开关控制 |--添加后默认自动勾选参与搜索。--## 详情页爬取(特殊源)--当标准详情接口拿不到播放地址时,服务端自动降级:--1. 请求 `{detail}/index.php/vod/detail/id/{id}.html`;-2. 通用正则提取 `\$https://...m3u8`;-3. 若无结果,尝试非凡影视特征路径模式(`/日期/哈希/index.m3u8`);-4. 去重后作为剧集列表。--## 服务端聚合行为--- 所有勾选的源**并行**搜索,单源 8 秒超时;-- 任一源失败不影响整体,失败源在结果区顶部以名称列出;-- 结果按「源内去重(sourceKey+vodId)→ 名称排序(zh-CN)」合并;-- 成人过滤在服务端执行,关键词包括:伦理片、福利、里番动漫、无码、SWAG 等。--## 自定义源的数据流--数据源配置**只保存在用户浏览器**(localStorage),服务端不存储。每次搜索/详情请求会把用到的源配置随请求上传,因此:--- 同一部署的不同用户可以有不同的数据源集合;-- 分享播放链接时 URL 会携带 `sourceUrl` 参数,接收者即使未配置同名的源也能播放(见 [Player](Player))。--## 常见问题--**Q: 添加源后搜索无结果?**-用浏览器直接访问 `{api}?ac=videolist&wd=test` 验证是否返回 JSON。部分源校验 Referer/UA 或已停更。--**Q: 搜索成功但详情提示"未找到播放资源"?**-该源的播放地址可能需要详情页爬取,请补填「详情页地址」;或该影片在源内本身无 m3u8 地址。--**Q: 可以批量导入吗?**-旧版支持逗号分隔的多个 API 地址一次性导入(`?urls=` 参数)。重构版暂未移植该入口,可通过「导出/导入配置」迁移。diff --git a/libretv-next/docs/Deployment.md b/libretv-next/docs/Deployment.mddeleted file mode 100644index 7fe2d23..0000000--- a/libretv-next/docs/Deployment.md+++ /dev/null@@ -1,86 +0,0 @@-# 部署--## Docker(推荐)--```bash-git clone <本仓库>-cd libretv-next--# 设置密码-echo "PASSWORD=your-strong-password" > .env--docker compose up -d --build-# 访问 http://localhost:8080-```--镜像为多阶段构建(`DOCKER_BUILD=1` 时输出 standalone),运行容器不包含构建工具,体积小。--### docker-compose.yml--```yaml-services:- libretv:- build: .- ports: ["8080:8080"]- environment:- - PASSWORD=${PASSWORD:?请在 .env 中设置 PASSWORD}- # - PROXY_SECRET=your-secret-```--## 手动部署--要求 Node.js ≥ 20(推荐 22):--```bash-npm ci-PASSWORD=your-password npm run build-PASSWORD=your-password npm start # 默认 8080 端口-```--> 注意:`output: 'standalone'` 仅在 `DOCKER_BUILD=1` 时启用,本地 `next start` 无需(也不兼容)standalone。--### 生产建议--- 使用反向代理(Nginx / Caddy)终结 HTTPS,转发到 8080;-- 会话 Cookie 在生产环境(`NODE_ENV=production`)下自动启用 `Secure`,需 HTTPS 访问;-- 设置 `PROXY_SECRET` 而非依赖 PASSWORD 派生,避免更换密码导致全员会话失效以外的副作用。--## 环境变量--完整列表见 [Configuration](Configuration)。最小可运行配置只有一个 `PASSWORD`。--## 健康检查与验证--```bash-curl http://localhost:8080/api/status-# {"passwordRequired":true,"verified":false,"version":"2.0.0"}--# 未登录访问受保护接口应返回 401-curl -X POST http://localhost:8080/api/search -d '{}' -H 'Content-Type: application/json' -i | head -1-# HTTP/1.1 401 Unauthorized--# SSRF 防护应拦截内网地址-curl -i "http://localhost:8080/api/proxy/http%3A%2F%2F127.0.0.1%3A8080%2F" | head -1-# HTTP/1.1 400/403-```--## 升级--1. `git pull`-2. `npm ci && npm run build`(或 `docker compose up -d --build`)-3. 用户数据(历史/进度/设置)在浏览器端,升级无感迁移。--## 从旧版迁移--- 旧版打开「设置 → 配置文件 → 导出」,新版「设置 → 配置 → 导入配置」选择同一文件即可迁移数据源与观看历史;-- 旧版 localStorage 各零散 key 不会被读取,仅识别标准导出 JSON;-- 旧版的 `PASSWORD` 环境变量直接沿用(明文比对改为服务端恒定时间比较,用户无感知)。--## 开发--```bash-npm install-PASSWORD=dev-password npm dev # http://localhost:8080-npm run typecheck # TypeScript 检查-npm test # 单元测试(cms-parser / m3u8 / ssrf)-```diff --git a/libretv-next/docs/FAQ.md b/libretv-next/docs/FAQ.mddeleted file mode 100644index 5c605f6..0000000--- a/libretv-next/docs/FAQ.md+++ /dev/null@@ -1,60 +0,0 @@-# FAQ--## 部署相关--**Q: 打开站点一直提示"需要配置密码"?**-服务器未设置 `PASSWORD` 环境变量。Docker 部署检查 `.env`;手动部署确认启动命令中带 `PASSWORD=...`。设置后需重启服务。--**Q: 登录后刷新又要求输入密码?**-- 生产环境(HTTPS)下 Cookie 为 `Secure`,用 HTTP 访问生产构建会导致 Cookie 无法保存——请配置 HTTPS 或以开发模式运行;-- 多实例部署未设置 `PROXY_SECRET`:各实例派生密钥不同,会话互不认账。--**Q: 忘记密码怎么办?**-修改 `PASSWORD` 环境变量并重启。旧会话立即全部失效(密钥随之改变)。--## 搜索相关--**Q: 搜索提示"请先添加数据源" / "尚未勾选数据源"?**-本项目不内置采集站。到「设置 → 数据源」添加 Apple CMS 采集站地址并勾选。--**Q: 某个源一直搜索失败?**-结果区顶部会列出失败源名称。直接浏览器访问 `{api}?ac=videolist&wd=test` 判断是源挂了还是网络不通;不用的源可以取消勾选或删除。--**Q: 搜索结果为什么按名称排序?**-跨源聚合后按影片名(zh-CN locale)排序、同名片按源名排序,便于对比同一影片在不同源的画质/集数。--## 播放相关--**Q: 视频一直"正在加载"?**-按顺序尝试:① 点「切换资源」换其他源;② 设置中切换封面/直连相关配置确认网络;③ 该源分片可能仅允许特定地区/Referer,代理回退通常能自动解决,若仍失败请换源。--**Q: 出现"直连失败,改用代理重试"后播放正常,但快进卡顿?**-代理播放的带宽受限于服务器。属预期行为,建议优先寻找可直连的源。--**Q: 自动跳到下一集后从头播放了?**-确认「自动连播」开关已打开(播放页操作栏或设置中)。--**Q: 换源后集数对不上?**-换源按集数索引对齐,目标源集数少于当前集数时会回到第 1 集。--## 数据相关--**Q: 换浏览器/设备后历史和进度还在吗?**-不在。历史与进度保存在本机 IndexedDB,不上传服务器。可用「设置 → 导出配置」手动迁移。--**Q: 观看历史里某条记录播放时提示"数据源不存在"?**-该记录的来源源已被删除。重新在设置中添加同名 API 地址(key 一致即可恢复),或删除该历史。--**Q: IndexedDB 数据会占多少空间?**-仅存定位信息(不含全集 URL),100 条历史通常 < 100KB。--## 安全相关--**Q: 密码是明文传输吗?**-登录请求把密码放在 POST body 中,生产环境务必启用 HTTPS 防止传输层被窃听。--**Q: 代理会被滥用吗?**-代理需要登录会话;未登录仅放行图片类目标且同样受 SSRF 校验约束。公网部署建议在反代层再加 IP 级限流。--**Q: 为什么不给站点加注册/多用户?**-LibreTV 定位为轻量自托管工具,单密码门禁 + 本机数据即可满足场景;多用户会引入服务端存储与隐私复杂度。diff --git a/libretv-next/docs/Home.md b/libretv-next/docs/Home.mddeleted file mode 100644index f28b23e..0000000--- a/libretv-next/docs/Home.md+++ /dev/null@@ -1,42 +0,0 @@-# LibreTV Next Wiki--欢迎来到 LibreTV Next 的项目文档。LibreTV 是一个免费的在线视频聚合搜索与观看平台,基于 Next.js 15 重构。--## 文档目录--| 文档 | 内容 |-| --- | --- |-| [Architecture](Architecture) | 系统架构、目录结构、数据流、技术选型说明 |-| [Deployment](Deployment) | Docker / 手动部署、环境变量、升级指南 |-| [Configuration](Configuration) | 环境变量详解、主题系统、数据源管理、配置导入导出 |-| [Data-Sources](Data-Sources) | 采集站(Apple CMS)接入说明、自定义 API 格式、常见问题源 |-| [Player](Player) | 播放器功能、快捷键、广告过滤、代理回退、进度与历史 |-| [Proxy-Security](Proxy-Security) | 代理鉴权设计、SSRF 防护、安全模型与旧版对比 |-| [FAQ](FAQ) | 常见问题排查 |--## 快速开始--```bash-# Docker 部署(推荐)-echo "PASSWORD=your-password" > .env-docker compose up -d--# 本地开发-npm install-PASSWORD=dev-password npm run dev # http://localhost:8080-```--## 核心特性--- **聚合搜索**:多采集站服务端并行搜索,单源失败不影响整体,用户 IP 不暴露给第三方-- **HLS 播放**:ArtPlayer + hls.js,广告分片过滤、自动连播、倍速、快捷键、移动端长按 3 倍速-- **智能回退**:视频直连失败(CORS / 防盗链)时自动改走内置代理重试-- **进度同步**:播放进度与观看历史存于本机 IndexedDB,精确到秒的续播-- **换源测速**:跨源搜索同名资源并测速排序,一键切换保留集数位置-- **豆瓣推荐**:电影 / 剧集分类浏览,服务端直连避免公共 CORS 代理-- **亮暗主题**:跟随系统 / 手动切换,无首屏闪烁-- **PWA**:可安装到桌面 / 主屏幕--## 与旧版(静态 HTML + Express)的关系--本项目是 [LibreTV 旧版](https://github.com/bestZwei/LibreTV)的完整重构。功能对齐的同时修复了旧版的多项问题(历史记录 XSS、m3u8 分片鉴权丢失、密码哈希暴露等),架构差异详见 [Architecture](Architecture)。diff --git a/libretv-next/docs/Player.md b/libretv-next/docs/Player.mddeleted file mode 100644index caf0e2a..0000000--- a/libretv-next/docs/Player.md+++ /dev/null@@ -1,52 +0,0 @@-# 播放器--播放器基于 ArtPlayer + hls.js,封装在 `src/components/player-shell.tsx`,页面入口为 `/watch` 路由。--## 播放链接格式--```-/watch?source=custom_0&id=20717&index=0&title=流浪地球&sourceUrl=https://..- └─数据源 key └─影片 id └─集数 └─标题 └─数据源地址(分享链接兜底)-```--- `source` + `id` 存在时:从 `/api/detail` 拉取剧集列表,`index` 指定当前集;-- 仅 `url` 参数时(直连分享):直接播放该地址,无剧集列表;-- URL 即状态:刷新/分享/前进后退均无损。--## 功能--| 功能 | 说明 |-| --- | --- |-| 自动连播 | 单集结束 0.8s 后自动下一集;片尾自动清除该集进度 |-| 进度恢复 | 优先 URL `position` 参数,否则读 IndexedDB;>10s 且非片尾(95%)时恢复并提示"已从 XX:XX 继续播放" |-| 换源 | 「切换资源」→ 跨源搜索同名影片 → 详情接口测速 → 按速度排序;切换后保留当前集数索引 |-| 集数倒序 | 倒序排列按钮,激活集自动滚动进可视区 |-| 广告过滤 | 自定义 hls.js loader 对 manifest/level 文本剔除 `#EXT-X-DISCONTINUITY` 广告分段(设置中可关) |-| 错误恢复 | HLS 网络错误自动 `startLoad`,媒体错误自动 `recoverMediaError`;多次失败显示错误面板 |-| 代理回退 | 直连致命网络错误(CORS/防盗链/分片被拒)时,自动改走 `/api/proxy/`(cookie 鉴权)重试一次 |-| 画中画 / 截图 / 网页全屏 / 倍速 | ArtPlayer 原生能力 |--## 快捷键--| 按键 | 功能 |-| --- | --- |-| `空格` | 播放 / 暂停 |-| `←` / `→` | 快退 / 快进 5 秒 |-| `↑` / `↓` | 音量 ±10% |-| `F` | 全屏切换 |-| `Alt + ←` / `Alt + →` | 上一集 / 下一集 |-| 双击 | 全屏切换 |-| 移动端长按 | 3 倍速播放(松开恢复) |--## 播放进度与历史--- **进度**:`video:timeupdate` 每 5 秒节流保存 + 暂停/页面隐藏/组件卸载时强制保存 → IndexedDB `progress` 表;-- **历史**:进入播放页 2 秒后写入 `history` 表(仅 `sourceKey + vodId + episodeIndex` 定位信息),播放中增量更新进度;-- **剧集同步**:从历史进入播放页时重新拉取详情,天然获得最新剧集列表(旧版需专门的同步逻辑)。--## 播放失败的排查顺序--1. **换源**:点击「切换资源」,选择测速绿色(低延迟)的其他源;-2. **观察回退提示**:若出现"直连失败,改用代理重试"说明该源分片有防盗链,代理通常可解;-3. **关广告过滤**:个别源本身依赖 DISCONTINUITY 做多码率切换,误过滤会黑屏;-4. **直接验证**:浏览器访问详情返回的 m3u8 地址确认源本身可用。diff --git a/libretv-next/docs/Proxy-Security.md b/libretv-next/docs/Proxy-Security.mddeleted file mode 100644index 7e4b61a..0000000--- a/libretv-next/docs/Proxy-Security.md+++ /dev/null@@ -1,61 +0,0 @@-# 代理与安全--本项目的服务端承担三类安全职责:**访问鉴权**、**代理防护(SSRF)**、**上游伪装(防盗链)**。--## 鉴权模型--### 会话--- 登录:`POST /api/auth`,body 携带明文密码(**不走 URL**,避免进访问日志);-- 服务端用 SHA-256 摘要做**恒定时间比较**(`crypto.timingSafeEqual`),不暴露时序信息;-- 通过后签发会话 Cookie:`ltv_session = <过期时间戳>.<HMAC-SHA256(密钥, 时间戳)>`;- - `httpOnly`(JS 不可读)、`SameSite=Lax`、生产环境 `Secure`、有效期 90 天;- - 密钥 = `PROXY_SECRET`,未设置时从 `PASSWORD` 派生;-- 所有 `/api/*`(除 status/登录外)通过 `guardRequest` 校验会话,未登录返回 401,客户端全局弹出登录框。--### 速率限制--登录接口按 IP 限流:**10 次 / 10 分钟**,超限返回 429。内存实现,适合单实例部署。--### 与旧版的安全差异--| 问题 | 旧版 | 本版 |-| --- | --- | --- |-| 密码哈希下发 | 页面源码含 `sha256(PASSWORD)` | 服务端独享,前端零凭证 |-| 哈希即凭证 | `?auth=<哈希>` 可无限重放代理请求 | 已移除该兼容模式 |-| 明文密码上 URL | `GET /api/proxy-token?password=...` | `POST /api/auth` body |-| 登录限流 | 无 | 10 次 / 10 分钟 |-| token 轮换 | 10 分钟短时效 token(需手工附参) | 会话 Cookie,m3u8 分片同源自动携带 |--## 代理(`GET /api/proxy/<encoded-url>`)--### 访问规则--- **已登录**:可代理任意符合 SSRF 校验的目标(视频分片、key、JSON、图片);-- **未登录**:仅放行图片类目标(`.jpg/.png/...` 或 `doubanio.com` 域),用于登录页前的封面展示;其余一律 401。--### SSRF 防护(双层)--1. **字面量校验**(请求前):协议白名单 http/https;主机名黑名单(localhost 等);IPv4/IPv6 字面量直接比对私有段;-2. **DNS 解析校验**(请求前):域名解析出的所有地址逐一检查,拦截解析到内网的域名(防 DNS rebinding 基础形态)。--被拦截的地址段:回环(127.0.0.0/8, ::1)、私有(10/8, 172.16/12, 192.168/16)、链路本地(169.254/16,含云元数据 169.254.169.254)、CGNAT(100.64/10)、协议保留(192.0.0.0/24)、唯一本地(fc00::/7)、链路本地 v6(fe80::/10)。--### 行为--- **流式透传**:视频分片 / 图片 / key 不落盘,直接 pipe;-- **m3u8 重写**:manifest/level 文本中的分片、`#EXT-X-KEY`、`#EXT-X-MAP` 地址全部改写为 `/api/proxy/<encoded>`(递归深度 ≤5),嵌套播放列表同样经代理,规避上游 CORS 限制;-- **响应头净化**:剔除 CSP/Cookie/Set-Cookie/X-Frame-Options/CORS 头与 Content-Encoding/Length(fetch 已解压,防止二次解压乱码);-- **Range 透传**:保留 `Range`/`Content-Range`,支持拖动;-- **重试**:上游失败按 `MAX_RETRIES` 重试。--### 上游伪装--- 目标为 `doubanio.com` 时自动携带 `Referer: https://movie.douban.com/`,绕过豆瓣图片 418 防盗链;-- 统一携带 Chrome UA。--## 已知边界--- 速率限制为内存实现,多实例部署需换共享存储(Redis);-- SSRF 的 DNS 校验存在理论上的 TOCTOU 窗口(校验后、请求前 DNS 记录变更);对公网部署建议叠加网络层出口限制;-- 会话无法服务端主动吊销(无状态签名);更换 `PROXY_SECRET` 或 `PASSWORD` 可使全部会话失效。diff --git a/libretv-next/package-lock.json b/libretv-next/package-lock.jsondeleted file mode 100644index 4dcce44..0000000--- a/libretv-next/package-lock.json+++ /dev/null@@ -1,3574 +0,0 @@-{- "name": "libretv-next",- "version": "2.0.0",- "lockfileVersion": 3,- "requires": true,- "packages": {- "": {- "name": "libretv-next",- "version": "2.0.0",- "license": "Apache-2.0",- "dependencies": {- "@tanstack/react-query": "^5.59.0",- "artplayer": "^5.2.3",- "dexie": "^4.0.8",- "dexie-react-hooks": "^1.1.7",- "hls.js": "^1.5.17",- "next": "^15.1.0",- "react": "^19.0.0",- "react-dom": "^19.0.0",- "zustand": "^5.0.2"- },- "devDependencies": {- "@types/node": "^22.10.0",- "@types/react": "^19.0.0",- "@types/react-dom": "^19.0.0",- "autoprefixer": "^10.4.20",- "postcss": "^8.4.49",- "tailwindcss": "^3.4.15",- "typescript": "^5.7.2",- "vitest": "^2.1.8"- }- },- "node_modules/@alloc/quick-lru": {- "version": "5.3.0",- "resolved": "https://registry.npmmirror.com/@alloc/quick-lru/-/quick-lru-5.3.0.tgz",- "integrity": "sha512-U4+70Pc5ZS9osnCBCE5Jha/ciHM+Yp+CNMNC/7HvYbNRk1Ldd+f7qO65W5qfhu/TCv+/ozljlXXe9Nj8419DMA==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">=10"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },- "node_modules/@emnapi/runtime": {- "version": "1.11.3",- "resolved": "https://registry.npmmirror.com/@emnapi/runtime/-/runtime-1.11.3.tgz",- "integrity": "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==",- "license": "MIT",- "optional": true,- "dependencies": {- "tslib": "^2.4.0"- }- },- "node_modules/@esbuild/aix-ppc64": {- "version": "0.21.5",- "resolved": "https://registry.npmmirror.com/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz",- "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==",- "cpu": [- "ppc64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "aix"- ],- "engines": {- "node": ">=12"- }- },- "node_modules/@esbuild/android-arm": {- "version": "0.21.5",- "resolved": "https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.21.5.tgz",- "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==",- "cpu": [- "arm"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "android"- ],- "engines": {- "node": ">=12"- }- },- "node_modules/@esbuild/android-arm64": {- "version": "0.21.5",- "resolved": "https://registry.npmmirror.com/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz",- "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==",- "cpu": [- "arm64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "android"- ],- "engines": {- "node": ">=12"- }- },- "node_modules/@esbuild/android-x64": {- "version": "0.21.5",- "resolved": "https://registry.npmmirror.com/@esbuild/android-x64/-/android-x64-0.21.5.tgz",- "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==",- "cpu": [- "x64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "android"- ],- "engines": {- "node": ">=12"- }- },- "node_modules/@esbuild/darwin-arm64": {- "version": "0.21.5",- "resolved": "https://registry.npmmirror.com/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz",- "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==",- "cpu": [- "arm64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "darwin"- ],- "engines": {- "node": ">=12"- }- },- "node_modules/@esbuild/darwin-x64": {- "version": "0.21.5",- "resolved": "https://registry.npmmirror.com/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz",- "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==",- "cpu": [- "x64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "darwin"- ],- "engines": {- "node": ">=12"- }- },- "node_modules/@esbuild/freebsd-arm64": {- "version": "0.21.5",- "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz",- "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==",- "cpu": [- "arm64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "freebsd"- ],- "engines": {- "node": ">=12"- }- },- "node_modules/@esbuild/freebsd-x64": {- "version": "0.21.5",- "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz",- "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==",- "cpu": [- "x64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "freebsd"- ],- "engines": {- "node": ">=12"- }- },- "node_modules/@esbuild/linux-arm": {- "version": "0.21.5",- "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz",- "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==",- "cpu": [- "arm"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">=12"- }- },- "node_modules/@esbuild/linux-arm64": {- "version": "0.21.5",- "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz",- "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==",- "cpu": [- "arm64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">=12"- }- },- "node_modules/@esbuild/linux-ia32": {- "version": "0.21.5",- "resolved": "https://registry.npmmirror.com/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz",- "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==",- "cpu": [- "ia32"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">=12"- }- },- "node_modules/@esbuild/linux-loong64": {- "version": "0.21.5",- "resolved": "https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz",- "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==",- "cpu": [- "loong64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">=12"- }- },- "node_modules/@esbuild/linux-mips64el": {- "version": "0.21.5",- "resolved": "https://registry.npmmirror.com/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz",- "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==",- "cpu": [- "mips64el"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">=12"- }- },- "node_modules/@esbuild/linux-ppc64": {- "version": "0.21.5",- "resolved": "https://registry.npmmirror.com/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz",- "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==",- "cpu": [- "ppc64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">=12"- }- },- "node_modules/@esbuild/linux-riscv64": {- "version": "0.21.5",- "resolved": "https://registry.npmmirror.com/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz",- "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==",- "cpu": [- "riscv64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">=12"- }- },- "node_modules/@esbuild/linux-s390x": {- "version": "0.21.5",- "resolved": "https://registry.npmmirror.com/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz",- "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==",- "cpu": [- "s390x"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">=12"- }- },- "node_modules/@esbuild/linux-x64": {- "version": "0.21.5",- "resolved": "https://registry.npmmirror.com/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz",- "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==",- "cpu": [- "x64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">=12"- }- },- "node_modules/@esbuild/netbsd-x64": {- "version": "0.21.5",- "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz",- "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==",- "cpu": [- "x64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "netbsd"- ],- "engines": {- "node": ">=12"- }- },- "node_modules/@esbuild/openbsd-x64": {- "version": "0.21.5",- "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz",- "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==",- "cpu": [- "x64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "openbsd"- ],- "engines": {- "node": ">=12"- }- },- "node_modules/@esbuild/sunos-x64": {- "version": "0.21.5",- "resolved": "https://registry.npmmirror.com/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz",- "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==",- "cpu": [- "x64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "sunos"- ],- "engines": {- "node": ">=12"- }- },- "node_modules/@esbuild/win32-arm64": {- "version": "0.21.5",- "resolved": "https://registry.npmmirror.com/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz",- "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==",- "cpu": [- "arm64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "win32"- ],- "engines": {- "node": ">=12"- }- },- "node_modules/@esbuild/win32-ia32": {- "version": "0.21.5",- "resolved": "https://registry.npmmirror.com/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz",- "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==",- "cpu": [- "ia32"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "win32"- ],- "engines": {- "node": ">=12"- }- },- "node_modules/@esbuild/win32-x64": {- "version": "0.21.5",- "resolved": "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz",- "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==",- "cpu": [- "x64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "win32"- ],- "engines": {- "node": ">=12"- }- },- "node_modules/@img/colour": {- "version": "1.1.0",- "resolved": "https://registry.npmmirror.com/@img/colour/-/colour-1.1.0.tgz",- "integrity": "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==",- "license": "MIT",- "optional": true,- "engines": {- "node": ">=18"- }- },- "node_modules/@img/sharp-darwin-arm64": {- "version": "0.35.4",- "resolved": "https://registry.npmmirror.com/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.35.4.tgz",- "integrity": "sha512-Uhfl4V4lhP2nbUVF9+hyH1+luj86f1gUFeo8ALYxFoULoU+G87D43BfeMP8XHsk9boxAnCY/bf2EHwhA7MuGsA==",- "cpu": [- "arm64"- ],- "license": "Apache-2.0",- "optional": true,- "os": [- "darwin"- ],- "engines": {- "node": ">=20.9.0"- },- "funding": {- "url": "https://opencollective.com/libvips"- },- "optionalDependencies": {- "@img/sharp-libvips-darwin-arm64": "1.3.3"- }- },- "node_modules/@img/sharp-darwin-x64": {- "version": "0.35.4",- "resolved": "https://registry.npmmirror.com/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.35.4.tgz",- "integrity": "sha512-hWniXY3bG5qKpkKrAwPe4y+VTPmf086YQAnkxWh7uA1YrlRouWGa0M0Mxj3ZjnXFkv7/TD1bTy9lGUK26vRvWw==",- "cpu": [- "x64"- ],- "license": "Apache-2.0",- "optional": true,- "os": [- "darwin"- ],- "engines": {- "node": ">=20.9.0"- },- "funding": {- "url": "https://opencollective.com/libvips"- },- "optionalDependencies": {- "@img/sharp-libvips-darwin-x64": "1.3.3"- }- },- "node_modules/@img/sharp-freebsd-wasm32": {- "version": "0.35.4",- "resolved": "https://registry.npmmirror.com/@img/sharp-freebsd-wasm32/-/sharp-freebsd-wasm32-0.35.4.tgz",- "integrity": "sha512-lIsKw/BU+kjB4eZjxrYrZmwOJYi3Ajrv66iAlBmUPyKc3HpnloevB1g3wxGD9P/5BbQ1brBGl65VRRrCvQDEqA==",- "license": "Apache-2.0",- "optional": true,- "os": [- "freebsd"- ],- "dependencies": {- "@img/sharp-wasm32": "0.35.4"- },- "engines": {- "node": ">=20.9.0"- },- "funding": {- "url": "https://opencollective.com/libvips"- }- },- "node_modules/@img/sharp-libvips-darwin-arm64": {- "version": "1.3.3",- "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.3.3.tgz",- "integrity": "sha512-suTBPTDGrI9WodccaDdwZItTSaBYASlBk1NSfElSHrUfzu3szG6lvIF58+WiFvnfzuK8ZBFS5zE00PxqxnRiPg==",- "cpu": [- "arm64"- ],- "license": "LGPL-3.0-or-later",- "optional": true,- "os": [- "darwin"- ],- "funding": {- "url": "https://opencollective.com/libvips"- }- },- "node_modules/@img/sharp-libvips-darwin-x64": {- "version": "1.3.3",- "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.3.3.tgz",- "integrity": "sha512-FVJZ5mITMobmXIz/hPDTw0EintTW5H3WfrxwLqEqjiIihlu+hVRyGrFQ60xl0Lxn7Bt3zdpevPaQi0HEzqz9fw==",- "cpu": [- "x64"- ],- "license": "LGPL-3.0-or-later",- "optional": true,- "os": [- "darwin"- ],- "funding": {- "url": "https://opencollective.com/libvips"- }- },- "node_modules/@img/sharp-libvips-linux-arm": {- "version": "1.3.3",- "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.3.3.tgz",- "integrity": "sha512-3rbU4vqXXc3hY/OiXdl52xZvT0F1yEngWfvqudtPJg/KkyiaQw2DRsFrNzpmLvfavbwOq3qXn36GP8obHRULQA==",- "cpu": [- "arm"- ],- "license": "LGPL-3.0-or-later",- "optional": true,- "os": [- "linux"- ],- "funding": {- "url": "https://opencollective.com/libvips"- }- },- "node_modules/@img/sharp-libvips-linux-arm64": {- "version": "1.3.3",- "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.3.3.tgz",- "integrity": "sha512-0DaL0A6Xu6sQSQFwe4iVCrKWU2cCTItnRsYsCdxAMm9NF6twAA9BKnoqy4hqz4+azQ0JHuA26qiUKsf1XJ/v5A==",- "cpu": [- "arm64"- ],- "license": "LGPL-3.0-or-later",- "optional": true,- "os": [- "linux"- ],- "funding": {- "url": "https://opencollective.com/libvips"- }- },- "node_modules/@img/sharp-libvips-linux-ppc64": {- "version": "1.3.3",- "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.3.3.tgz",- "integrity": "sha512-cdn1OvUBwsXhbC0zSzJnNzf5MZ/mTrobawDvNXBTxe8VtqKAm0sRuEY2Evzovb/w9JMk4TvRxqt1mekSuJz64w==",- "cpu": [- "ppc64"- ],- "license": "LGPL-3.0-or-later",- "optional": true,- "os": [- "linux"- ],- "funding": {- "url": "https://opencollective.com/libvips"- }- },- "node_modules/@img/sharp-libvips-linux-riscv64": {- "version": "1.3.3",- "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linux-riscv64/-/sharp-libvips-linux-riscv64-1.3.3.tgz",- "integrity": "sha512-HjPVx7yKz+0lqdhDlTw1tt90wamBoxhiXpvl1XZpJLiHH4RCJ5yDTqH+VlYPv2fwFs89JFw4c1IexYOcQUi4IQ==",- "cpu": [- "riscv64"- ],- "license": "LGPL-3.0-or-later",- "optional": true,- "os": [- "linux"- ],- "funding": {- "url": "https://opencollective.com/libvips"- }- },- "node_modules/@img/sharp-libvips-linux-s390x": {- "version": "1.3.3",- "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.3.3.tgz",- "integrity": "sha512-neWLh+3yCNThxnfy3c4BbVBeGgt9aftno+XbT56iK28RgeDs3UOFWviLWlUu0bArYVYJaFDK+RRohbicUNCm8Q==",- "cpu": [- "s390x"- ],- "license": "LGPL-3.0-or-later",- "optional": true,- "os": [- "linux"- ],- "funding": {- "url": "https://opencollective.com/libvips"- }- },- "node_modules/@img/sharp-libvips-linux-x64": {- "version": "1.3.3",- "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.3.3.tgz",- "integrity": "sha512-4vKmvAst9nrowcqquKFAyZJUDolUaIp8uRiN0mWFguJ1IplC9/pitXtlnnlU4aa/eJw3J7i67V+pwUL+wZGdsA==",- "cpu": [- "x64"- ],- "license": "LGPL-3.0-or-later",- "optional": true,- "os": [- "linux"- ],- "funding": {- "url": "https://opencollective.com/libvips"- }- },- "node_modules/@img/sharp-libvips-linuxmusl-arm64": {- "version": "1.3.3",- "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.3.3.tgz",- "integrity": "sha512-Y9kQaLMuNoB0bPYOOdcZMaseNrFpPodIWWMrx+CZyydf2xn68j9WYc6sWWRrDwNkzCQjKYfc68L7jKjGlHMibw==",- "cpu": [- "arm64"- ],- "license": "LGPL-3.0-or-later",- "optional": true,- "os": [- "linux"- ],- "funding": {- "url": "https://opencollective.com/libvips"- }- },- "node_modules/@img/sharp-libvips-linuxmusl-x64": {- "version": "1.3.3",- "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.3.3.tgz",- "integrity": "sha512-fj8Mv0HHfD1Rr+4I68+3agJynxDWtBFgicTbSOb9Bke6pIwzGcJ+RX/yHjmiEGFMCavY/dxvem7MyNaJF+wDiw==",- "cpu": [- "x64"- ],- "license": "LGPL-3.0-or-later",- "optional": true,- "os": [- "linux"- ],- "funding": {- "url": "https://opencollective.com/libvips"- }- },- "node_modules/@img/sharp-linux-arm": {- "version": "0.35.4",- "resolved": "https://registry.npmmirror.com/@img/sharp-linux-arm/-/sharp-linux-arm-0.35.4.tgz",- "integrity": "sha512-7OAS8gI0EReKGVN2HssHlM6umJgxF5VI3xN0p9FA91p/YO+ou5hiNghLdZ5BEHztwaaK5+bLKRf8x/o2L2nk9A==",- "cpu": [- "arm"- ],- "license": "Apache-2.0",- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">=20.9.0"- },- "funding": {- "url": "https://opencollective.com/libvips"- },- "optionalDependencies": {- "@img/sharp-libvips-linux-arm": "1.3.3"- }- },- "node_modules/@img/sharp-linux-arm64": {- "version": "0.35.4",- "resolved": "https://registry.npmmirror.com/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.35.4.tgz",- "integrity": "sha512-De4jpEnAU8Hd5oT0j1G3uL4ZvTuipVMn7YC6vPaJhy6/7EwEae0SVAoBrUMYQbkLGDm85taVWwuPc1a44LTzCQ==",- "cpu": [- "arm64"- ],- "license": "Apache-2.0",- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">=20.9.0"- },- "funding": {- "url": "https://opencollective.com/libvips"- },- "optionalDependencies": {- "@img/sharp-libvips-linux-arm64": "1.3.3"- }- },- "node_modules/@img/sharp-linux-ppc64": {- "version": "0.35.4",- "resolved": "https://registry.npmmirror.com/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.35.4.tgz",- "integrity": "sha512-2oYZJeIl4kCcMGk4ouZVjnkCtFrpQFlNEtJ6GbxzhHQchwH0NH/qEb9ykmOl29dqwMq+JhFdZn+1ak2FKhI9fQ==",- "cpu": [- "ppc64"- ],- "license": "Apache-2.0",- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">=20.9.0"- },- "funding": {- "url": "https://opencollective.com/libvips"- },- "optionalDependencies": {- "@img/sharp-libvips-linux-ppc64": "1.3.3"- }- },- "node_modules/@img/sharp-linux-riscv64": {- "version": "0.35.4",- "resolved": "https://registry.npmmirror.com/@img/sharp-linux-riscv64/-/sharp-linux-riscv64-0.35.4.tgz",- "integrity": "sha512-cPbNChoRURAWdebDIHSenxRpgEdy7JkPydSnUxRm9VvKD7m0/xVaR/8Fzlu81pk5nHEvHH87UZUA7cTtwnbJSA==",- "cpu": [- "riscv64"- ],- "license": "Apache-2.0",- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">=20.9.0"- },- "funding": {- "url": "https://opencollective.com/libvips"- },- "optionalDependencies": {- "@img/sharp-libvips-linux-riscv64": "1.3.3"- }- },- "node_modules/@img/sharp-linux-s390x": {- "version": "0.35.4",- "resolved": "https://registry.npmmirror.com/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.35.4.tgz",- "integrity": "sha512-RY0JFY8Fd6RonCBtHz+DvadaPkXDSI1AUn6yWL9TipqkZ1vY8w8evqdgyDFnkm4/K1ve1TvZiaePP5oSd4+WVQ==",- "cpu": [- "s390x"- ],- "license": "Apache-2.0",- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">=20.9.0"- },- "funding": {- "url": "https://opencollective.com/libvips"- },- "optionalDependencies": {- "@img/sharp-libvips-linux-s390x": "1.3.3"- }- },- "node_modules/@img/sharp-linux-x64": {- "version": "0.35.4",- "resolved": "https://registry.npmmirror.com/@img/sharp-linux-x64/-/sharp-linux-x64-0.35.4.tgz",- "integrity": "sha512-9qvvEAuk8k89TfWUoX2htWjbAMX8p+NxCppjpcg5k6xMsjhBQPTsoIh36h9Qde4WRuGpJeYnOjdosDn/cnv+OA==",- "cpu": [- "x64"- ],- "license": "Apache-2.0",- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">=20.9.0"- },- "funding": {- "url": "https://opencollective.com/libvips"- },- "optionalDependencies": {- "@img/sharp-libvips-linux-x64": "1.3.3"- }- },- "node_modules/@img/sharp-linuxmusl-arm64": {- "version": "0.35.4",- "resolved": "https://registry.npmmirror.com/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.35.4.tgz",- "integrity": "sha512-KB5jxpfWQTr0nc3xdHtWChdbifHrBGsd2SM62Eyxrl8afikm+f5qGBU75SJIZBT/S1MC8XyacdlXBMSWq6OURA==",- "cpu": [- "arm64"- ],- "license": "Apache-2.0",- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">=20.9.0"- },- "funding": {- "url": "https://opencollective.com/libvips"- },- "optionalDependencies": {- "@img/sharp-libvips-linuxmusl-arm64": "1.3.3"- }- },- "node_modules/@img/sharp-linuxmusl-x64": {- "version": "0.35.4",- "resolved": "https://registry.npmmirror.com/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.35.4.tgz",- "integrity": "sha512-f+eZJZIQNEEd26RPSW+76chwOf1XtA2Y/O+5ocVyLliHkeih3e+jhLVBdNTd2rS3IbNXK8+ug93Vf5ZXtF5Lxg==",- "cpu": [- "x64"- ],- "license": "Apache-2.0",- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">=20.9.0"- },- "funding": {- "url": "https://opencollective.com/libvips"- },- "optionalDependencies": {- "@img/sharp-libvips-linuxmusl-x64": "1.3.3"- }- },- "node_modules/@img/sharp-wasm32": {- "version": "0.35.4",- "resolved": "https://registry.npmmirror.com/@img/sharp-wasm32/-/sharp-wasm32-0.35.4.tgz",- "integrity": "sha512-zQnl4Kwp7Q6NHsENtU2T/00Zi+w3AQNwz3+UaTyVBy2FpXrzXzGjndpK61onhZjRtRpQXxCTeqw19bVyXOh7jA==",- "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT",- "optional": true,- "dependencies": {- "@emnapi/runtime": "^1.11.3"- },- "engines": {- "node": ">=20.9.0"- },- "funding": {- "url": "https://opencollective.com/libvips"- }- },- "node_modules/@img/sharp-webcontainers-wasm32": {- "version": "0.35.4",- "resolved": "https://registry.npmmirror.com/@img/sharp-webcontainers-wasm32/-/sharp-webcontainers-wasm32-0.35.4.tgz",- "integrity": "sha512-ESfNkywmCfPNyaZjxooddJQiQ+l/nTpGEOGthxiLnIHXC/CmcBixnfwUleX9mCz9ovrUUvKMap/pm8RYbzfwaA==",- "cpu": [- "wasm32"- ],- "license": "Apache-2.0",- "optional": true,- "dependencies": {- "@img/sharp-wasm32": "0.35.4"- },- "engines": {- "node": ">=20.9.0"- },- "funding": {- "url": "https://opencollective.com/libvips"- }- },- "node_modules/@img/sharp-win32-arm64": {- "version": "0.35.4",- "resolved": "https://registry.npmmirror.com/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.35.4.tgz",- "integrity": "sha512-iNdlBX9gLVvqe2I3uIJSIKTq6wckP/DYxZtcqxm09x5Gi24DnFBmPAWZmr60ZyYMG0xlzo6goG3670ar+RXvRw==",- "cpu": [- "arm64"- ],- "license": "Apache-2.0 AND LGPL-3.0-or-later",- "optional": true,- "os": [- "win32"- ],- "engines": {- "node": ">=20.9.0"- },- "funding": {- "url": "https://opencollective.com/libvips"- }- },- "node_modules/@img/sharp-win32-ia32": {- "version": "0.35.4",- "resolved": "https://registry.npmmirror.com/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.35.4.tgz",- "integrity": "sha512-kqRsbaa5CS6KHlpxnN7WhE6vAAugXyZButpRdvDWetlv6Qv4N9WTcrWzF7tXfB9T7MsoadqdI8hmwLq6UlLvtw==",- "cpu": [- "ia32"- ],- "license": "Apache-2.0 AND LGPL-3.0-or-later",- "optional": true,- "os": [- "win32"- ],- "engines": {- "node": "^20.9.0"- },- "funding": {- "url": "https://opencollective.com/libvips"- }- },- "node_modules/@img/sharp-win32-x64": {- "version": "0.35.4",- "resolved": "https://registry.npmmirror.com/@img/sharp-win32-x64/-/sharp-win32-x64-0.35.4.tgz",- "integrity": "sha512-XtmnYhBcrORsJ4XJngyzr/EWP0hRZLAZRFaApdKuviyqF78+ylxh2y06ZmtULAMOnObJ3ucpN0AcwSWnMowTRg==",- "cpu": [- "x64"- ],- "license": "Apache-2.0 AND LGPL-3.0-or-later",- "optional": true,- "os": [- "win32"- ],- "engines": {- "node": ">=20.9.0"- },- "funding": {- "url": "https://opencollective.com/libvips"- }- },- "node_modules/@jridgewell/gen-mapping": {- "version": "0.3.13",- "resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",- "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==",- "dev": true,- "license": "MIT",- "dependencies": {- "@jridgewell/sourcemap-codec": "^1.5.0",- "@jridgewell/trace-mapping": "^0.3.24"- }- },- "node_modules/@jridgewell/resolve-uri": {- "version": "3.1.2",- "resolved": "https://registry.npmmirror.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",- "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">=6.0.0"- }- },- "node_modules/@jridgewell/sourcemap-codec": {- "version": "1.6.0",- "resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz",- "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==",- "dev": true,- "license": "MIT"- },- "node_modules/@jridgewell/trace-mapping": {- "version": "0.3.31",- "resolved": "https://registry.npmmirror.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz",- "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==",- "dev": true,- "license": "MIT",- "dependencies": {- "@jridgewell/resolve-uri": "^3.1.0",- "@jridgewell/sourcemap-codec": "^1.4.14"- }- },- "node_modules/@napi-rs/lzma-linux-x64-gnu": {- "version": "1.5.1",- "resolved": "https://registry.npmmirror.com/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz",- "integrity": "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==",- "cpu": [- "x64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": "^22.20 || ^24.12 || >=25"- }- },- "node_modules/@next/env": {- "version": "15.5.25",- "resolved": "https://registry.npmmirror.com/@next/env/-/env-15.5.25.tgz",- "integrity": "sha512-42h1lLr07vl4gawALP1hsgRZjHB1xYa58JfUfHwr0f7jG/zhPakh5GHkADHXOC9ZxUvlQFOPIrp7s6qX4DezPQ==",- "license": "MIT"- },- "node_modules/@next/swc-darwin-arm64": {- "version": "15.5.25",- "resolved": "https://registry.npmmirror.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.5.25.tgz",- "integrity": "sha512-w+RR0v/QuApnWEjRGm1z6gcObKwGMb5YPA7V3bzBEVSBpMFUXprer0tS27UxjUcEnqbhL7Zuzohej79B6rYmBg==",- "cpu": [- "arm64"- ],- "license": "MIT",- "optional": true,- "os": [- "darwin"- ],- "engines": {- "node": ">= 10"- }- },- "node_modules/@next/swc-darwin-x64": {- "version": "15.5.25",- "resolved": "https://registry.npmmirror.com/@next/swc-darwin-x64/-/swc-darwin-x64-15.5.25.tgz",- "integrity": "sha512-QiGGBUSakt8S1H4Lt9Ehsh6Ja87axiBnQQgysOObvCbI7iUfJnRGntF1P64S4/ijuHFnSB8KLsEddkY3nN26uw==",- "cpu": [- "x64"- ],- "license": "MIT",- "optional": true,- "os": [- "darwin"- ],- "engines": {- "node": ">= 10"- }- },- "node_modules/@next/swc-linux-arm64-gnu": {- "version": "15.5.25",- "resolved": "https://registry.npmmirror.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.5.25.tgz",- "integrity": "sha512-ehLos/66zo0d/mJCU5u96a/VDcr01aaUrX0o/i16UdInxz8qPTCDSxGtjk/Lps1sIr1RJFdiX3hxc0fxJo+cPA==",- "cpu": [- "arm64"- ],- "license": "MIT",- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">= 10"- }- },- "node_modules/@next/swc-linux-arm64-musl": {- "version": "15.5.25",- "resolved": "https://registry.npmmirror.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.5.25.tgz",- "integrity": "sha512-ZVMrqLiJ7DiChgmbkQwFtdhAnUkSH/4p7tB29QY+giATb0Q/XGHNRSKAb/B8XGDHRUaA67NepOW5W8u3ZRJBAA==",- "cpu": [- "arm64"- ],- "license": "MIT",- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">= 10"- }- },- "node_modules/@next/swc-linux-x64-gnu": {- "version": "15.5.25",- "resolved": "https://registry.npmmirror.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.5.25.tgz",- "integrity": "sha512-UOewtDGkTMJTiODrEdeLZ50yGb59xCZSriNpXkfPMxRRgwDkGc7i8mLWqV5076wEdb+Ca/XN7MhJyM3CupyNyQ==",- "cpu": [- "x64"- ],- "license": "MIT",- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">= 10"- }- },- "node_modules/@next/swc-linux-x64-musl": {- "version": "15.5.25",- "resolved": "https://registry.npmmirror.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.5.25.tgz",- "integrity": "sha512-UBHwA8AhkCZgtRfU1aJpunuAJe/6gZv6jDESQe4p5MjTb5V0YEeJBWCdNqx15Vj3x+5jmauRfeMJSjfQj9HGFQ==",- "cpu": [- "x64"- ],- "license": "MIT",- "optional": true,- "os": [- "linux"- ],- "engines": {- "node": ">= 10"- }- },- "node_modules/@next/swc-win32-arm64-msvc": {- "version": "15.5.25",- "resolved": "https://registry.npmmirror.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.5.25.tgz",- "integrity": "sha512-QcFcPRr16djk5IqK5+e8O80eZfgWzIvVBXfitIq0tQ/uc+eyfdoZ0NmKc0cnbIJyfVwREapKuG97YcxWA9gcpA==",- "cpu": [- "arm64"- ],- "license": "MIT",- "optional": true,- "os": [- "win32"- ],- "engines": {- "node": ">= 10"- }- },- "node_modules/@next/swc-win32-x64-msvc": {- "version": "15.5.25",- "resolved": "https://registry.npmmirror.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.5.25.tgz",- "integrity": "sha512-zREeykps3ndWr9egJgvJKqVkkDuaw6Zrrg23cYBos0ygydFkAWYU4+PaPVwXzP1eAYQJe53ShSK45iDM529BOg==",- "cpu": [- "x64"- ],- "license": "MIT",- "optional": true,- "os": [- "win32"- ],- "engines": {- "node": ">= 10"- }- },- "node_modules/@nodelib/fs.scandir": {- "version": "2.1.5",- "resolved": "https://registry.npmmirror.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",- "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",- "dev": true,- "license": "MIT",- "dependencies": {- "@nodelib/fs.stat": "2.0.5",- "run-parallel": "^1.1.9"- },- "engines": {- "node": ">= 8"- }- },- "node_modules/@nodelib/fs.stat": {- "version": "2.0.5",- "resolved": "https://registry.npmmirror.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",- "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">= 8"- }- },- "node_modules/@nodelib/fs.walk": {- "version": "1.2.8",- "resolved": "https://registry.npmmirror.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",- "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",- "dev": true,- "license": "MIT",- "dependencies": {- "@nodelib/fs.scandir": "2.1.5",- "fastq": "^1.6.0"- },- "engines": {- "node": ">= 8"- }- },- "node_modules/@rollup/rollup-android-arm-eabi": {- "version": "4.63.1",- "resolved": "https://registry.npmmirror.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.63.1.tgz",- "integrity": "sha512-UZ8sUxPTiHWYX9QNdJedb1kDZSpS1t/VPWBWGSgqHNi9w3Cu6IXvu2mzbhiTiPvtrqgTQJ+zqiAq2iPIPilpaQ==",- "cpu": [- "arm"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "android"- ]- },- "node_modules/@rollup/rollup-android-arm64": {- "version": "4.63.1",- "resolved": "https://registry.npmmirror.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.63.1.tgz",- "integrity": "sha512-cQ4nFQABN5cDvDpbvJ7bMStCpnaVxynZrRMfUJYgxcIk9Sh54FIO1vtfkg0B69REjER77ioZ/ov+eAApx/KmLQ==",- "cpu": [- "arm64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "android"- ]- },- "node_modules/@rollup/rollup-darwin-arm64": {- "version": "4.63.1",- "resolved": "https://registry.npmmirror.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.63.1.tgz",- "integrity": "sha512-FQNqd1lRy/0QhDk3xeRIkSBiCpXCiDnZO3YLVdcDKN1UBiKToNftCzcXYNLshmPDUMlu2TdeS8tGcsU6f3YF1Q==",- "cpu": [- "arm64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "darwin"- ]- },- "node_modules/@rollup/rollup-darwin-x64": {- "version": "4.63.1",- "resolved": "https://registry.npmmirror.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.63.1.tgz",- "integrity": "sha512-pvD16V939D3CloK0+qikpGaxiPrDUXTe7Y5cWOMkMSy7m1cawa8EGy/kXYi/G/cKAC4HDAbSnzCIk1WmsoOKXg==",- "cpu": [- "x64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "darwin"- ]- },- "node_modules/@rollup/rollup-freebsd-arm64": {- "version": "4.63.1",- "resolved": "https://registry.npmmirror.com/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.63.1.tgz",- "integrity": "sha512-pcFGeL2345VwdTnJhA6zLbew+YgWB0qBG2+dMtXjCicf6+rm6kO6cOoh5VnTe0ZMrMRgRyuHmCJxZWrIdzYuOw==",- "cpu": [- "arm64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "freebsd"- ]- },- "node_modules/@rollup/rollup-freebsd-x64": {- "version": "4.63.1",- "resolved": "https://registry.npmmirror.com/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.63.1.tgz",- "integrity": "sha512-mRJlqSRulVzcKq/LKA6ICSIc3K/l4fzlVn/gePn2nXIHy8seRi5z/eeRE0d/XMBxcMldiXtQTSpRj0tkkC3g8Q==",- "cpu": [- "x64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "freebsd"- ]- },- "node_modules/@rollup/rollup-linux-arm-gnueabihf": {- "version": "4.63.1",- "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.63.1.tgz",- "integrity": "sha512-YDUNvVM85TI3g/1OpnqKP1h4NeW/j64DfWMf+G3M809xNk1bJSnpFp4sh83NpmVE5DXnkh8ULor4LTVZKoYLHw==",- "cpu": [- "arm"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "linux"- ]- },- "node_modules/@rollup/rollup-linux-arm-musleabihf": {- "version": "4.63.1",- "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.63.1.tgz",- "integrity": "sha512-7Mcn71p9ZuQFAj+h+dhQXy/yeLePRS2yKRnmW1DijA9thKO5qap0GNOIQK4yQ6iP3SU0Mrb/yWo8h8vgRba8lw==",- "cpu": [- "arm"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "linux"- ]- },- "node_modules/@rollup/rollup-linux-arm64-gnu": {- "version": "4.63.1",- "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.63.1.tgz",- "integrity": "sha512-4YiLQTX6U4CSl0L9cluep9A9W6UmTfqBDc2/CH6wlu54pl4E7Jn3cOD8oxzvBDEGk/JMKgJ47C8g+radF7mwvg==",- "cpu": [- "arm64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "linux"- ]- },- "node_modules/@rollup/rollup-linux-arm64-musl": {- "version": "4.63.1",- "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.63.1.tgz",- "integrity": "sha512-2ra8F7w8OquwZN9z2/fKFnli69wa8PLwaVzRMIPGb13ByMJwC28Fbp8YcVGoUhlYMTt7j5j9bNgpysrN2UM+vw==",- "cpu": [- "arm64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "linux"- ]- },- "node_modules/@rollup/rollup-linux-loong64-gnu": {- "version": "4.63.1",- "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.63.1.tgz",- "integrity": "sha512-Sy20ncyhjmBP0Ml+UvQbimjlk6VFgjW5uNP+qqwHB00mTE8Bl2C1TuHTlRwK2YoXeZbee5lP2XevBWVkAQAtSQ==",- "cpu": [- "loong64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "linux"- ]- },- "node_modules/@rollup/rollup-linux-loong64-musl": {- "version": "4.63.1",- "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.63.1.tgz",- "integrity": "sha512-noITLp8oNjYliPnGWmLyelIHwULGqbHloQHGw1rtxbWhTuWooRpnZarZQJ1y9EUC4szuCusCc+HEpUtxpIwYvA==",- "cpu": [- "loong64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "linux"- ]- },- "node_modules/@rollup/rollup-linux-ppc64-gnu": {- "version": "4.63.1",- "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.63.1.tgz",- "integrity": "sha512-hlxxXd+F1mWiAcaFR7Sv9ZQT6m6UfI8+Vy/kFJzztq2pDMU/0wZ9sish0iszNZvsQDo8Gc0i5yuFEOz5dDf6fA==",- "cpu": [- "ppc64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "linux"- ]- },- "node_modules/@rollup/rollup-linux-ppc64-musl": {- "version": "4.63.1",- "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.63.1.tgz",- "integrity": "sha512-EF7OpqQTQ/BvGqLzUi4rEHuagCV9MugAUXSHemwPW5vxZ75RR+jxO/2j95Ph2dalMpFHSVECjRoioHZgA9zOYA==",- "cpu": [- "ppc64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "linux"- ]- },- "node_modules/@rollup/rollup-linux-riscv64-gnu": {- "version": "4.63.1",- "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.63.1.tgz",- "integrity": "sha512-wQO3JesW9PRkwlabQ27y7sPfVOOTLRG73I4F2UYHG5PXun3J9U3y+b7ezVKSYbsvSKGQ1k1cq8Qlun4C9kLt3w==",- "cpu": [- "riscv64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "linux"- ]- },- "node_modules/@rollup/rollup-linux-riscv64-musl": {- "version": "4.63.1",- "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.63.1.tgz",- "integrity": "sha512-ouAGwhO6wHRXdnOVCOsB0tRFkA7nhNB2Nwax6oECXN0YiN8EYUTBAOudADOB1PI+yDL61TeNx/u7MVCzksNbkQ==",- "cpu": [- "riscv64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "linux"- ]- },- "node_modules/@rollup/rollup-linux-s390x-gnu": {- "version": "4.63.1",- "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.63.1.tgz",- "integrity": "sha512-q2R38Sn+1J8RxhfJ+T54wSWmyKXWec+9jgDfqO2AtArEqHO5R2aeayp5H5OYLr5UYDVGsVaZPEFUooMhYCdz5A==",- "cpu": [- "s390x"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "linux"- ]- },- "node_modules/@rollup/rollup-linux-x64-gnu": {- "version": "4.63.1",- "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.63.1.tgz",- "integrity": "sha512-gfI5T24WLLuFfSKw7Go/zDXjAAV0fny0swTaDv+WjK7vqcw4cRhFfdsyKL1n+ukI+ooBxn3bVQnyrn06WpI50w==",- "cpu": [- "x64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "linux"- ]- },- "node_modules/@rollup/rollup-linux-x64-musl": {- "version": "4.63.1",- "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.63.1.tgz",- "integrity": "sha512-4h6XqthmB4Hspji84wvgk+ElodTsGj+dbZqHJHHtKxj4mYq0ANSEEPX9ys3moJueqsRjwpaJYH7874Itwnj2ow==",- "cpu": [- "x64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "linux"- ]- },- "node_modules/@rollup/rollup-openbsd-x64": {- "version": "4.63.1",- "resolved": "https://registry.npmmirror.com/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.63.1.tgz",- "integrity": "sha512-dlfCOa87o1VAYegLQ9EKilx2JCeRofiyPGhTCmqnuXZ6bMPiycO1rq1+sKoulAp7pGLIsTIw+1x5R+zgh5LhhA==",- "cpu": [- "x64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "openbsd"- ]- },- "node_modules/@rollup/rollup-openharmony-arm64": {- "version": "4.63.1",- "resolved": "https://registry.npmmirror.com/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.63.1.tgz",- "integrity": "sha512-cjkLbOlfcm3QGhMM1J5zaZjsw1GggbN6rw9UTSSRrPrR1KkcXnN7Uq9rPw34xImQ9VOY9GN+6u2Zj80B9ptkcw==",- "cpu": [- "arm64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "openharmony"- ]- },- "node_modules/@rollup/rollup-win32-arm64-msvc": {- "version": "4.63.1",- "resolved": "https://registry.npmmirror.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.63.1.tgz",- "integrity": "sha512-Li1KdUnWGE4N3e1F/B4RTB1ms+nG4WBgjByO46pkeBVX/2UBsY53xf5vK9WygVmnH3RwncIST7lkSdLSY6P9lg==",- "cpu": [- "arm64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "win32"- ]- },- "node_modules/@rollup/rollup-win32-ia32-msvc": {- "version": "4.63.1",- "resolved": "https://registry.npmmirror.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.63.1.tgz",- "integrity": "sha512-t4ZYOSoLTgwhuFMrmTMLx/+i1DQVK7HYqMc6kY46EApwi8X0nIVphzdNoThU3xt6n+N5urG1/gxBdCaKDLavfg==",- "cpu": [- "ia32"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "win32"- ]- },- "node_modules/@rollup/rollup-win32-x64-gnu": {- "version": "4.63.1",- "resolved": "https://registry.npmmirror.com/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.63.1.tgz",- "integrity": "sha512-RgroPfMmKlD1RzSDxvwgcPiy2HNQKoYV7OmwIXDsk73uKW5t6B/V8KIy27SMv/FNXFo/oSBtWc9J0X7t91ezZg==",- "cpu": [- "x64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "win32"- ]- },- "node_modules/@rollup/rollup-win32-x64-msvc": {- "version": "4.63.1",- "resolved": "https://registry.npmmirror.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.63.1.tgz",- "integrity": "sha512-at8QVep6S3h5Y6gSbdGU06bRY5WJkf6WUduM9YtvYMbYhB1MOFfUgc6kehitQXzOtMSaT70q7f9ydPhpqu821w==",- "cpu": [- "x64"- ],- "dev": true,- "license": "MIT",- "optional": true,- "os": [- "win32"- ]- },- "node_modules/@swc/helpers": {- "version": "0.5.15",- "resolved": "https://registry.npmmirror.com/@swc/helpers/-/helpers-0.5.15.tgz",- "integrity": "sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==",- "license": "Apache-2.0",- "dependencies": {- "tslib": "^2.8.0"- }- },- "node_modules/@tanstack/query-core": {- "version": "5.102.8",- "resolved": "https://registry.npmmirror.com/@tanstack/query-core/-/query-core-5.102.8.tgz",- "integrity": "sha512-ZNjkJ33CqvPNec/6lZBnHqLc3EVGPZ9ySLhYahU9TcuRFdmwXewuj0c4hwSWcGHqEUwcSrKeZ+oGcvPBqXcQcg==",- "license": "MIT",- "funding": {- "type": "github",- "url": "https://github.com/sponsors/tannerlinsley"- }- },- "node_modules/@tanstack/react-query": {- "version": "5.102.8",- "resolved": "https://registry.npmmirror.com/@tanstack/react-query/-/react-query-5.102.8.tgz",- "integrity": "sha512-TYBea4OuXWD7MhaSHq069TWbFe7rcwWN6kzT7JF0OKi1K6c1gTv2IzD6A6ExJsCMozdkqBWeuIUZmu4KQg0O5A==",- "license": "MIT",- "dependencies": {- "@tanstack/query-core": "5.102.8"- },- "funding": {- "type": "github",- "url": "https://github.com/sponsors/tannerlinsley"- },- "peerDependencies": {- "react": "^18 || ^19"- }- },- "node_modules/@types/estree": {- "version": "1.0.9",- "resolved": "https://registry.npmmirror.com/@types/estree/-/estree-1.0.9.tgz",- "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==",- "dev": true,- "license": "MIT"- },- "node_modules/@types/node": {- "version": "22.20.1",- "resolved": "https://registry.npmmirror.com/@types/node/-/node-22.20.1.tgz",- "integrity": "sha512-EANqOCF9QFyra+4pfxUcX9STKJpCLjMbObVzljIJomAWSnuSIEAvyzEU53GaajbXJEgdh0iEcPL+DGvpUd4k1Q==",- "dev": true,- "license": "MIT",- "dependencies": {- "undici-types": "~6.21.0"- }- },- "node_modules/@types/react": {- "version": "19.2.18",- "resolved": "https://registry.npmmirror.com/@types/react/-/react-19.2.18.tgz",- "integrity": "sha512-AnzbBERsrLKtk2XSfTbYRLjQPdy116Sty4q+T+Bp3IC4l6jNBvreVPAHmpq9qhXQM7CXZPjLVmGMw9sy+hxQ3w==",- "license": "MIT",- "dependencies": {- "csstype": "^3.2.2"- }- },- "node_modules/@types/react-dom": {- "version": "19.2.5",- "resolved": "https://registry.npmmirror.com/@types/react-dom/-/react-dom-19.2.5.tgz",- "integrity": "sha512-fMPwH9v7r/pp43yUd2/Mbiex5KouJwwR3dzHkhLREUC6764VyDsqxhAxv6OFEYR1RhjOyD1naqba8ECDBe7ZQg==",- "dev": true,- "license": "MIT",- "peerDependencies": {- "@types/react": "^19.2.0"- }- },- "node_modules/@vitest/expect": {- "version": "2.1.9",- "resolved": "https://registry.npmmirror.com/@vitest/expect/-/expect-2.1.9.tgz",- "integrity": "sha512-UJCIkTBenHeKT1TTlKMJWy1laZewsRIzYighyYiJKZreqtdxSos/S1t+ktRMQWu2CKqaarrkeszJx1cgC5tGZw==",- "dev": true,- "license": "MIT",- "dependencies": {- "@vitest/spy": "2.1.9",- "@vitest/utils": "2.1.9",- "chai": "^5.1.2",- "tinyrainbow": "^1.2.0"- },- "funding": {- "url": "https://opencollective.com/vitest"- }- },- "node_modules/@vitest/mocker": {- "version": "2.1.9",- "resolved": "https://registry.npmmirror.com/@vitest/mocker/-/mocker-2.1.9.tgz",- "integrity": "sha512-tVL6uJgoUdi6icpxmdrn5YNo3g3Dxv+IHJBr0GXHaEdTcw3F+cPKnsXFhli6nO+f/6SDKPHEK1UN+k+TQv0Ehg==",- "dev": true,- "license": "MIT",- "dependencies": {- "@vitest/spy": "2.1.9",- "estree-walker": "^3.0.3",- "magic-string": "^0.30.12"- },- "funding": {- "url": "https://opencollective.com/vitest"- },- "peerDependencies": {- "msw": "^2.4.9",- "vite": "^5.0.0"- },- "peerDependenciesMeta": {- "msw": {- "optional": true- },- "vite": {- "optional": true- }- }- },- "node_modules/@vitest/pretty-format": {- "version": "2.1.9",- "resolved": "https://registry.npmmirror.com/@vitest/pretty-format/-/pretty-format-2.1.9.tgz",- "integrity": "sha512-KhRIdGV2U9HOUzxfiHmY8IFHTdqtOhIzCpd8WRdJiE7D/HUcZVD0EgQCVjm+Q9gkUXWgBvMmTtZgIG48wq7sOQ==",- "dev": true,- "license": "MIT",- "dependencies": {- "tinyrainbow": "^1.2.0"- },- "funding": {- "url": "https://opencollective.com/vitest"- }- },- "node_modules/@vitest/runner": {- "version": "2.1.9",- "resolved": "https://registry.npmmirror.com/@vitest/runner/-/runner-2.1.9.tgz",- "integrity": "sha512-ZXSSqTFIrzduD63btIfEyOmNcBmQvgOVsPNPe0jYtESiXkhd8u2erDLnMxmGrDCwHCCHE7hxwRDCT3pt0esT4g==",- "dev": true,- "license": "MIT",- "dependencies": {- "@vitest/utils": "2.1.9",- "pathe": "^1.1.2"- },- "funding": {- "url": "https://opencollective.com/vitest"- }- },- "node_modules/@vitest/snapshot": {- "version": "2.1.9",- "resolved": "https://registry.npmmirror.com/@vitest/snapshot/-/snapshot-2.1.9.tgz",- "integrity": "sha512-oBO82rEjsxLNJincVhLhaxxZdEtV0EFHMK5Kmx5sJ6H9L183dHECjiefOAdnqpIgT5eZwT04PoggUnW88vOBNQ==",- "dev": true,- "license": "MIT",- "dependencies": {- "@vitest/pretty-format": "2.1.9",- "magic-string": "^0.30.12",- "pathe": "^1.1.2"- },- "funding": {- "url": "https://opencollective.com/vitest"- }- },- "node_modules/@vitest/spy": {- "version": "2.1.9",- "resolved": "https://registry.npmmirror.com/@vitest/spy/-/spy-2.1.9.tgz",- "integrity": "sha512-E1B35FwzXXTs9FHNK6bDszs7mtydNi5MIfUWpceJ8Xbfb1gBMscAnwLbEu+B44ed6W3XjL9/ehLPHR1fkf1KLQ==",- "dev": true,- "license": "MIT",- "dependencies": {- "tinyspy": "^3.0.2"- },- "funding": {- "url": "https://opencollective.com/vitest"- }- },- "node_modules/@vitest/utils": {- "version": "2.1.9",- "resolved": "https://registry.npmmirror.com/@vitest/utils/-/utils-2.1.9.tgz",- "integrity": "sha512-v0psaMSkNJ3A2NMrUEHFRzJtDPFn+/VWZ5WxImB21T9fjucJRmS7xCS3ppEnARb9y11OAzaD+P2Ps+b+BGX5iQ==",- "dev": true,- "license": "MIT",- "dependencies": {- "@vitest/pretty-format": "2.1.9",- "loupe": "^3.1.2",- "tinyrainbow": "^1.2.0"- },- "funding": {- "url": "https://opencollective.com/vitest"- }- },- "node_modules/any-promise": {- "version": "1.3.0",- "resolved": "https://registry.npmmirror.com/any-promise/-/any-promise-1.3.0.tgz",- "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==",- "dev": true,- "license": "MIT"- },- "node_modules/anymatch": {- "version": "3.1.3",- "resolved": "https://registry.npmmirror.com/anymatch/-/anymatch-3.1.3.tgz",- "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",- "dev": true,- "license": "ISC",- "dependencies": {- "normalize-path": "^3.0.0",- "picomatch": "^2.0.4"- },- "engines": {- "node": ">= 8"- }- },- "node_modules/arg": {- "version": "5.0.2",- "resolved": "https://registry.npmmirror.com/arg/-/arg-5.0.2.tgz",- "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==",- "dev": true,- "license": "MIT"- },- "node_modules/artplayer": {- "version": "5.4.0",- "resolved": "https://registry.npmmirror.com/artplayer/-/artplayer-5.4.0.tgz",- "integrity": "sha512-2B+plbx8N2yNsjK4nJU3+EOG8TULm1LRZk/QPkWRAMEX2Ee/MSnZG/WJYz8kcoZxZuLKcQ3uXifqLuPxZOH29A==",- "license": "MIT",- "dependencies": {- "option-validator": "^2.0.6"- }- },- "node_modules/assertion-error": {- "version": "2.0.1",- "resolved": "https://registry.npmmirror.com/assertion-error/-/assertion-error-2.0.1.tgz",- "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">=12"- }- },- "node_modules/autoprefixer": {- "version": "10.5.4",- "resolved": "https://registry.npmmirror.com/autoprefixer/-/autoprefixer-10.5.4.tgz",- "integrity": "sha512-MaU0U/za7N3r6brxD4YB/l4NSrFzLPlANv6wEuQVaIPlD3L4W9rFcQPbL/EilY9BHhHvhfcz3gInDLrEtWT4EA==",- "dev": true,- "funding": [- {- "type": "opencollective",- "url": "https://opencollective.com/postcss/"- },- {- "type": "tidelift",- "url": "https://tidelift.com/funding/github/npm/autoprefixer"- },- {- "type": "github",- "url": "https://github.com/sponsors/ai"- }- ],- "license": "MIT",- "dependencies": {- "browserslist": "^4.28.6",- "caniuse-lite": "^1.0.30001806",- "fraction.js": "^5.3.4",- "picocolors": "^1.1.1",- "postcss-value-parser": "^4.2.0"- },- "bin": {- "autoprefixer": "bin/autoprefixer"- },- "engines": {- "node": "^10 || ^12 || >=14"- },- "peerDependencies": {- "postcss": "^8.1.0"- }- },- "node_modules/baseline-browser-mapping": {- "version": "2.11.20",- "resolved": "https://registry.npmmirror.com/baseline-browser-mapping/-/baseline-browser-mapping-2.11.20.tgz",- "integrity": "sha512-H0ulySigv6icDJ1F7SjtdCD6PrhTpdYCmP0CactWy1+ekh0AFd0o1Wn5T8b+hnTmdBx19u9yhL6wvCylXMY7zw==",- "dev": true,- "license": "Apache-2.0",- "bin": {- "baseline-browser-mapping": "dist/cli.cjs"- },- "engines": {- "node": ">=6.0.0"- }- },- "node_modules/binary-extensions": {- "version": "2.3.0",- "resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.3.0.tgz",- "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">=8"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },- "node_modules/braces": {- "version": "3.0.3",- "resolved": "https://registry.npmmirror.com/braces/-/braces-3.0.3.tgz",- "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",- "dev": true,- "license": "MIT",- "dependencies": {- "fill-range": "^7.1.1"- },- "engines": {- "node": ">=8"- }- },- "node_modules/browserslist": {- "version": "4.28.8",- "resolved": "https://registry.npmmirror.com/browserslist/-/browserslist-4.28.8.tgz",- "integrity": "sha512-V2NpofLblG64mfOtSgDhOJESZEGogzDMBv/q+W6oc4LXWP/q75eOXoOaaOu1EOadB9U4Bwx/e0yzbvwKH8zalA==",- "dev": true,- "funding": [- {- "type": "opencollective",- "url": "https://opencollective.com/browserslist"- },- {- "type": "tidelift",- "url": "https://tidelift.com/funding/github/npm/browserslist"- },- {- "type": "github",- "url": "https://github.com/sponsors/ai"- }- ],- "license": "MIT",- "dependencies": {- "baseline-browser-mapping": "^2.11.12",- "caniuse-lite": "^1.0.30001809",- "electron-to-chromium": "^1.5.402",- "node-releases": "^2.0.53",- "update-browserslist-db": "^1.3.0"- },- "bin": {- "browserslist": "cli.js"- },- "engines": {- "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"- }- },- "node_modules/cac": {- "version": "6.7.14",- "resolved": "https://registry.npmmirror.com/cac/-/cac-6.7.14.tgz",- "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">=8"- }- },- "node_modules/camelcase-css": {- "version": "2.0.1",- "resolved": "https://registry.npmmirror.com/camelcase-css/-/camelcase-css-2.0.1.tgz",- "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">= 6"- }- },- "node_modules/caniuse-lite": {- "version": "1.0.30001810",- "resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001810.tgz",- "integrity": "sha512-TITQPUkaz+aVk5GL6NhOdwk1aEaNTSDPsGFWrTuhKGtjTF70jL/Oht2W4c6rXUe5fu7Ie19VIahAXHIIiWWNeg==",- "funding": [- {- "type": "opencollective",- "url": "https://opencollective.com/browserslist"- },- {- "type": "tidelift",- "url": "https://tidelift.com/funding/github/npm/caniuse-lite"- },- {- "type": "github",- "url": "https://github.com/sponsors/ai"- }- ],- "license": "CC-BY-4.0"- },- "node_modules/chai": {- "version": "5.3.3",- "resolved": "https://registry.npmmirror.com/chai/-/chai-5.3.3.tgz",- "integrity": "sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==",- "dev": true,- "license": "MIT",- "dependencies": {- "assertion-error": "^2.0.1",- "check-error": "^2.1.1",- "deep-eql": "^5.0.1",- "loupe": "^3.1.0",- "pathval": "^2.0.0"- },- "engines": {- "node": ">=18"- }- },- "node_modules/check-error": {- "version": "2.1.3",- "resolved": "https://registry.npmmirror.com/check-error/-/check-error-2.1.3.tgz",- "integrity": "sha512-PAJdDJusoxnwm1VwW07VWwUN1sl7smmC3OKggvndJFadxxDRyFJBX/ggnu/KE4kQAB7a3Dp8f/YXC1FlUprWmA==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">= 16"- }- },- "node_modules/chokidar": {- "version": "3.6.0",- "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.6.0.tgz",- "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",- "dev": true,- "license": "MIT",- "dependencies": {- "anymatch": "~3.1.2",- "braces": "~3.0.2",- "glob-parent": "~5.1.2",- "is-binary-path": "~2.1.0",- "is-glob": "~4.0.1",- "normalize-path": "~3.0.0",- "readdirp": "~3.6.0"- },- "engines": {- "node": ">= 8.10.0"- },- "funding": {- "url": "https://paulmillr.com/funding/"- },- "optionalDependencies": {- "fsevents": "~2.3.2"- }- },- "node_modules/chokidar/node_modules/glob-parent": {- "version": "5.1.2",- "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz",- "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",- "dev": true,- "license": "ISC",- "dependencies": {- "is-glob": "^4.0.1"- },- "engines": {- "node": ">= 6"- }- },- "node_modules/client-only": {- "version": "0.0.1",- "resolved": "https://registry.npmmirror.com/client-only/-/client-only-0.0.1.tgz",- "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==",- "license": "MIT"- },- "node_modules/commander": {- "version": "4.1.1",- "resolved": "https://registry.npmmirror.com/commander/-/commander-4.1.1.tgz",- "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">= 6"- }- },- "node_modules/cssesc": {- "version": "3.0.0",- "resolved": "https://registry.npmmirror.com/cssesc/-/cssesc-3.0.0.tgz",- "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",- "dev": true,- "license": "MIT",- "bin": {- "cssesc": "bin/cssesc"- },- "engines": {- "node": ">=4"- }- },- "node_modules/csstype": {- "version": "3.2.3",- "resolved": "https://registry.npmmirror.com/csstype/-/csstype-3.2.3.tgz",- "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==",- "license": "MIT"- },- "node_modules/debug": {- "version": "4.4.3",- "resolved": "https://registry.npmmirror.com/debug/-/debug-4.4.3.tgz",- "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",- "dev": true,- "license": "MIT",- "dependencies": {- "ms": "^2.1.3"- },- "engines": {- "node": ">=6.0"- },- "peerDependenciesMeta": {- "supports-color": {- "optional": true- }- }- },- "node_modules/deep-eql": {- "version": "5.0.2",- "resolved": "https://registry.npmmirror.com/deep-eql/-/deep-eql-5.0.2.tgz",- "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">=6"- }- },- "node_modules/detect-libc": {- "version": "2.1.2",- "resolved": "https://registry.npmmirror.com/detect-libc/-/detect-libc-2.1.2.tgz",- "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",- "license": "Apache-2.0",- "optional": true,- "engines": {- "node": ">=8"- }- },- "node_modules/dexie": {- "version": "4.4.5",- "resolved": "https://registry.npmmirror.com/dexie/-/dexie-4.4.5.tgz",- "integrity": "sha512-wWCHdihT3dmlUSuNhn5mMZDWSpG0suxjAni7YjjiZdzabZcKmy3uNZGZ7AeYYXBoLbpSXX35fikPLkPC44Osiw==",- "license": "Apache-2.0"- },- "node_modules/dexie-react-hooks": {- "version": "1.1.7",- "resolved": "https://registry.npmmirror.com/dexie-react-hooks/-/dexie-react-hooks-1.1.7.tgz",- "integrity": "sha512-Lwv5W0Hk+uOW3kGnsU9GZoR1er1B7WQ5DSdonoNG+focTNeJbHW6vi6nBoX534VKI3/uwHebYzSw1fwY6a7mTw==",- "license": "Apache-2.0",- "peerDependencies": {- "@types/react": ">=16",- "dexie": "^3.2 || ^4.0.1-alpha",- "react": ">=16"- }- },- "node_modules/didyoumean": {- "version": "1.2.2",- "resolved": "https://registry.npmmirror.com/didyoumean/-/didyoumean-1.2.2.tgz",- "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==",- "dev": true,- "license": "Apache-2.0"- },- "node_modules/dlv": {- "version": "1.1.3",- "resolved": "https://registry.npmmirror.com/dlv/-/dlv-1.1.3.tgz",- "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==",- "dev": true,- "license": "MIT"- },- "node_modules/electron-to-chromium": {- "version": "1.5.418",- "resolved": "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.5.418.tgz",- "integrity": "sha512-UzS26r3AEbG5wSoGVpJKqwHIU9zwQN7LHdVIThDrJpS0I5KdlXFMEb8543fhc9dVnIIAST6ar8rhwa00AL5MlA==",- "dev": true,- "license": "ISC"- },- "node_modules/es-errors": {- "version": "1.3.0",- "resolved": "https://registry.npmmirror.com/es-errors/-/es-errors-1.3.0.tgz",- "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">= 0.4"- }- },- "node_modules/es-module-lexer": {- "version": "1.7.0",- "resolved": "https://registry.npmmirror.com/es-module-lexer/-/es-module-lexer-1.7.0.tgz",- "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==",- "dev": true,- "license": "MIT"- },- "node_modules/esbuild": {- "version": "0.21.5",- "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.21.5.tgz",- "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==",- "dev": true,- "hasInstallScript": true,- "license": "MIT",- "bin": {- "esbuild": "bin/esbuild"- },- "engines": {- "node": ">=12"- },- "optionalDependencies": {- "@esbuild/aix-ppc64": "0.21.5",- "@esbuild/android-arm": "0.21.5",- "@esbuild/android-arm64": "0.21.5",- "@esbuild/android-x64": "0.21.5",- "@esbuild/darwin-arm64": "0.21.5",- "@esbuild/darwin-x64": "0.21.5",- "@esbuild/freebsd-arm64": "0.21.5",- "@esbuild/freebsd-x64": "0.21.5",- "@esbuild/linux-arm": "0.21.5",- "@esbuild/linux-arm64": "0.21.5",- "@esbuild/linux-ia32": "0.21.5",- "@esbuild/linux-loong64": "0.21.5",- "@esbuild/linux-mips64el": "0.21.5",- "@esbuild/linux-ppc64": "0.21.5",- "@esbuild/linux-riscv64": "0.21.5",- "@esbuild/linux-s390x": "0.21.5",- "@esbuild/linux-x64": "0.21.5",- "@esbuild/netbsd-x64": "0.21.5",- "@esbuild/openbsd-x64": "0.21.5",- "@esbuild/sunos-x64": "0.21.5",- "@esbuild/win32-arm64": "0.21.5",- "@esbuild/win32-ia32": "0.21.5",- "@esbuild/win32-x64": "0.21.5"- }- },- "node_modules/escalade": {- "version": "3.2.0",- "resolved": "https://registry.npmmirror.com/escalade/-/escalade-3.2.0.tgz",- "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">=6"- }- },- "node_modules/estree-walker": {- "version": "3.0.3",- "resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-3.0.3.tgz",- "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",- "dev": true,- "license": "MIT",- "dependencies": {- "@types/estree": "^1.0.0"- }- },- "node_modules/expect-type": {- "version": "1.4.0",- "resolved": "https://registry.npmmirror.com/expect-type/-/expect-type-1.4.0.tgz",- "integrity": "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==",- "dev": true,- "license": "Apache-2.0",- "engines": {- "node": ">=12.0.0"- }- },- "node_modules/fast-glob": {- "version": "3.3.3",- "resolved": "https://registry.npmmirror.com/fast-glob/-/fast-glob-3.3.3.tgz",- "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==",- "dev": true,- "license": "MIT",- "dependencies": {- "@nodelib/fs.stat": "^2.0.2",- "@nodelib/fs.walk": "^1.2.3",- "glob-parent": "^5.1.2",- "merge2": "^1.3.0",- "micromatch": "^4.0.8"- },- "engines": {- "node": ">=8.6.0"- }- },- "node_modules/fast-glob/node_modules/glob-parent": {- "version": "5.1.2",- "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz",- "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",- "dev": true,- "license": "ISC",- "dependencies": {- "is-glob": "^4.0.1"- },- "engines": {- "node": ">= 6"- }- },- "node_modules/fastq": {- "version": "1.20.3",- "resolved": "https://registry.npmmirror.com/fastq/-/fastq-1.20.3.tgz",- "integrity": "sha512-XKv5nnLs6nLF71NgiKJLIZFLkPyIEuOselLG7ujZnGrRfQK8HpvY+WqKhAJUAdLomwVHErVS4LfxFlPq0/FTAw==",- "dev": true,- "license": "ISC",- "dependencies": {- "reusify": "^1.0.4"- }- },- "node_modules/fill-range": {- "version": "7.1.1",- "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.1.1.tgz",- "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",- "dev": true,- "license": "MIT",- "dependencies": {- "to-regex-range": "^5.0.1"- },- "engines": {- "node": ">=8"- }- },- "node_modules/fraction.js": {- "version": "5.3.4",- "resolved": "https://registry.npmmirror.com/fraction.js/-/fraction.js-5.3.4.tgz",- "integrity": "sha512-1X1NTtiJphryn/uLQz3whtY6jK3fTqoE3ohKs0tT+Ujr1W59oopxmoEh7Lu5p6vBaPbgoM0bzveAW4Qi5RyWDQ==",- "dev": true,- "license": "MIT",- "engines": {- "node": "*"- },- "funding": {- "type": "github",- "url": "https://github.com/sponsors/rawify"- }- },- "node_modules/fsevents": {- "version": "2.3.3",- "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz",- "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",- "dev": true,- "hasInstallScript": true,- "license": "MIT",- "optional": true,- "os": [- "darwin"- ],- "engines": {- "node": "^8.16.0 || ^10.6.0 || >=11.0.0"- }- },- "node_modules/function-bind": {- "version": "1.1.2",- "resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz",- "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",- "dev": true,- "license": "MIT",- "funding": {- "url": "https://github.com/sponsors/ljharb"- }- },- "node_modules/glob-parent": {- "version": "6.0.2",- "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-6.0.2.tgz",- "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",- "dev": true,- "license": "ISC",- "dependencies": {- "is-glob": "^4.0.3"- },- "engines": {- "node": ">=10.13.0"- }- },- "node_modules/hasown": {- "version": "2.0.4",- "resolved": "https://registry.npmmirror.com/hasown/-/hasown-2.0.4.tgz",- "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==",- "dev": true,- "license": "MIT",- "dependencies": {- "function-bind": "^1.1.2"- },- "engines": {- "node": ">= 0.4"- }- },- "node_modules/hls.js": {- "version": "1.7.1",- "resolved": "https://registry.npmmirror.com/hls.js/-/hls.js-1.7.1.tgz",- "integrity": "sha512-DlzIkeBAS9IIQ432k3BUf3HlwbsR0+trB1i2lDdN2gUkNkrehFurh0/48M5c1/EjlDkdGng1gwZIpwyPxvdZ/g==",- "license": "Apache-2.0"- },- "node_modules/is-binary-path": {- "version": "2.1.0",- "resolved": "https://registry.npmmirror.com/is-binary-path/-/is-binary-path-2.1.0.tgz",- "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",- "dev": true,- "license": "MIT",- "dependencies": {- "binary-extensions": "^2.0.0"- },- "engines": {- "node": ">=8"- }- },- "node_modules/is-core-module": {- "version": "2.16.2",- "resolved": "https://registry.npmmirror.com/is-core-module/-/is-core-module-2.16.2.tgz",- "integrity": "sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==",- "dev": true,- "license": "MIT",- "dependencies": {- "hasown": "^2.0.3"- },- "engines": {- "node": ">= 0.4"- },- "funding": {- "url": "https://github.com/sponsors/ljharb"- }- },- "node_modules/is-extglob": {- "version": "2.1.1",- "resolved": "https://registry.npmmirror.com/is-extglob/-/is-extglob-2.1.1.tgz",- "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">=0.10.0"- }- },- "node_modules/is-glob": {- "version": "4.0.3",- "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz",- "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",- "dev": true,- "license": "MIT",- "dependencies": {- "is-extglob": "^2.1.1"- },- "engines": {- "node": ">=0.10.0"- }- },- "node_modules/is-number": {- "version": "7.0.0",- "resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz",- "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">=0.12.0"- }- },- "node_modules/jiti": {- "version": "1.21.7",- "resolved": "https://registry.npmmirror.com/jiti/-/jiti-1.21.7.tgz",- "integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==",- "dev": true,- "license": "MIT",- "bin": {- "jiti": "bin/jiti.js"- }- },- "node_modules/kind-of": {- "version": "6.0.3",- "resolved": "https://registry.npmmirror.com/kind-of/-/kind-of-6.0.3.tgz",- "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",- "license": "MIT",- "engines": {- "node": ">=0.10.0"- }- },- "node_modules/lilconfig": {- "version": "3.1.3",- "resolved": "https://registry.npmmirror.com/lilconfig/-/lilconfig-3.1.3.tgz",- "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">=14"- },- "funding": {- "url": "https://github.com/sponsors/antonk52"- }- },- "node_modules/lines-and-columns": {- "version": "1.2.4",- "resolved": "https://registry.npmmirror.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz",- "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",- "dev": true,- "license": "MIT"- },- "node_modules/loupe": {- "version": "3.2.1",- "resolved": "https://registry.npmmirror.com/loupe/-/loupe-3.2.1.tgz",- "integrity": "sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==",- "dev": true,- "license": "MIT"- },- "node_modules/magic-string": {- "version": "0.30.21",- "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.21.tgz",- "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==",- "dev": true,- "license": "MIT",- "dependencies": {- "@jridgewell/sourcemap-codec": "^1.5.5"- }- },- "node_modules/merge2": {- "version": "1.4.1",- "resolved": "https://registry.npmmirror.com/merge2/-/merge2-1.4.1.tgz",- "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">= 8"- }- },- "node_modules/micromatch": {- "version": "4.0.8",- "resolved": "https://registry.npmmirror.com/micromatch/-/micromatch-4.0.8.tgz",- "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",- "dev": true,- "license": "MIT",- "dependencies": {- "braces": "^3.0.3",- "picomatch": "^2.3.1"- },- "engines": {- "node": ">=8.6"- }- },- "node_modules/ms": {- "version": "2.1.3",- "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz",- "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",- "dev": true,- "license": "MIT"- },- "node_modules/mz": {- "version": "2.7.0",- "resolved": "https://registry.npmmirror.com/mz/-/mz-2.7.0.tgz",- "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==",- "dev": true,- "license": "MIT",- "dependencies": {- "any-promise": "^1.0.0",- "object-assign": "^4.0.1",- "thenify-all": "^1.0.0"- }- },- "node_modules/nanoid": {- "version": "3.3.18",- "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.18.tgz",- "integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==",- "funding": [- {- "type": "github",- "url": "https://github.com/sponsors/ai"- }- ],- "license": "MIT",- "bin": {- "nanoid": "bin/nanoid.cjs"- },- "engines": {- "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"- }- },- "node_modules/next": {- "version": "15.5.25",- "resolved": "https://registry.npmmirror.com/next/-/next-15.5.25.tgz",- "integrity": "sha512-OMWNulIIqKM2ykvC2qMjIt0IoavB4UB2SCs4iXJ6z6847FvyH8jBmBWcvrF5iuhTu8Przh20Fo/aoszIdqx4PA==",- "license": "MIT",- "dependencies": {- "@next/env": "15.5.25",- "@swc/helpers": "0.5.15",- "caniuse-lite": "^1.0.30001579",- "postcss": "8.4.31",- "styled-jsx": "5.1.6"- },- "bin": {- "next": "dist/bin/next"- },- "engines": {- "node": "^18.18.0 || ^19.8.0 || >= 20.0.0"- },- "optionalDependencies": {- "@next/swc-darwin-arm64": "15.5.25",- "@next/swc-darwin-x64": "15.5.25",- "@next/swc-linux-arm64-gnu": "15.5.25",- "@next/swc-linux-arm64-musl": "15.5.25",- "@next/swc-linux-x64-gnu": "15.5.25",- "@next/swc-linux-x64-musl": "15.5.25",- "@next/swc-win32-arm64-msvc": "15.5.25",- "@next/swc-win32-x64-msvc": "15.5.25",- "sharp": "^0.34.3 || ^0.35.4"- },- "peerDependencies": {- "@opentelemetry/api": "^1.1.0",- "@playwright/test": "^1.51.1",- "babel-plugin-react-compiler": "*",- "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0",- "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0",- "sass": "^1.3.0"- },- "peerDependenciesMeta": {- "@opentelemetry/api": {- "optional": true- },- "@playwright/test": {- "optional": true- },- "babel-plugin-react-compiler": {- "optional": true- },- "sass": {- "optional": true- }- }- },- "node_modules/next/node_modules/postcss": {- "version": "8.4.31",- "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.31.tgz",- "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",- "funding": [- {- "type": "opencollective",- "url": "https://opencollective.com/postcss/"- },- {- "type": "tidelift",- "url": "https://tidelift.com/funding/github/npm/postcss"- },- {- "type": "github",- "url": "https://github.com/sponsors/ai"- }- ],- "license": "MIT",- "dependencies": {- "nanoid": "^3.3.6",- "picocolors": "^1.0.0",- "source-map-js": "^1.0.2"- },- "engines": {- "node": "^10 || ^12 || >=14"- }- },- "node_modules/node-releases": {- "version": "2.0.54",- "resolved": "https://registry.npmmirror.com/node-releases/-/node-releases-2.0.54.tgz",- "integrity": "sha512-YHs7BmmcsdAI5Ozuf8JZo6PT0mv2GIWC9vMfvUC3dp65M8hn7Ux8CPL+2oBI7juNuj9d0ndhTcznq2ODBps9cQ==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">=18"- }- },- "node_modules/normalize-path": {- "version": "3.0.0",- "resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz",- "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">=0.10.0"- }- },- "node_modules/object-assign": {- "version": "4.1.1",- "resolved": "https://registry.npmmirror.com/object-assign/-/object-assign-4.1.1.tgz",- "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">=0.10.0"- }- },- "node_modules/object-hash": {- "version": "3.0.0",- "resolved": "https://registry.npmmirror.com/object-hash/-/object-hash-3.0.0.tgz",- "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">= 6"- }- },- "node_modules/option-validator": {- "version": "2.0.6",- "resolved": "https://registry.npmmirror.com/option-validator/-/option-validator-2.0.6.tgz",- "integrity": "sha512-tmZDan2LRIRQyhUGvkff68/O0R8UmF+Btmiiz0SmSw2ng3CfPZB9wJlIjHpe/MKUZqyIZkVIXCrwr1tIN+0Dzg==",- "license": "MIT",- "dependencies": {- "kind-of": "^6.0.3"- }- },- "node_modules/path-parse": {- "version": "1.0.7",- "resolved": "https://registry.npmmirror.com/path-parse/-/path-parse-1.0.7.tgz",- "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",- "dev": true,- "license": "MIT"- },- "node_modules/pathe": {- "version": "1.1.2",- "resolved": "https://registry.npmmirror.com/pathe/-/pathe-1.1.2.tgz",- "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==",- "dev": true,- "license": "MIT"- },- "node_modules/pathval": {- "version": "2.0.1",- "resolved": "https://registry.npmmirror.com/pathval/-/pathval-2.0.1.tgz",- "integrity": "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">= 14.16"- }- },- "node_modules/picocolors": {- "version": "1.1.1",- "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.1.1.tgz",- "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",- "license": "ISC"- },- "node_modules/picomatch": {- "version": "2.3.2",- "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.2.tgz",- "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">=8.6"- },- "funding": {- "url": "https://github.com/sponsors/jonschlinkert"- }- },- "node_modules/pirates": {- "version": "4.0.7",- "resolved": "https://registry.npmmirror.com/pirates/-/pirates-4.0.7.tgz",- "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">= 6"- }- },- "node_modules/postcss": {- "version": "8.5.26",- "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.5.26.tgz",- "integrity": "sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==",- "dev": true,- "funding": [- {- "type": "opencollective",- "url": "https://opencollective.com/postcss/"- },- {- "type": "tidelift",- "url": "https://tidelift.com/funding/github/npm/postcss"- },- {- "type": "github",- "url": "https://github.com/sponsors/ai"- }- ],- "license": "MIT",- "dependencies": {- "nanoid": "^3.3.17",- "picocolors": "^1.1.1",- "source-map-js": "^1.2.1"- },- "engines": {- "node": "^10 || ^12 || >=14"- }- },- "node_modules/postcss-import": {- "version": "15.1.0",- "resolved": "https://registry.npmmirror.com/postcss-import/-/postcss-import-15.1.0.tgz",- "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==",- "dev": true,- "license": "MIT",- "dependencies": {- "postcss-value-parser": "^4.0.0",- "read-cache": "^1.0.0",- "resolve": "^1.1.7"- },- "engines": {- "node": ">=14.0.0"- },- "peerDependencies": {- "postcss": "^8.0.0"- }- },- "node_modules/postcss-js": {- "version": "4.1.0",- "resolved": "https://registry.npmmirror.com/postcss-js/-/postcss-js-4.1.0.tgz",- "integrity": "sha512-oIAOTqgIo7q2EOwbhb8UalYePMvYoIeRY2YKntdpFQXNosSu3vLrniGgmH9OKs/qAkfoj5oB3le/7mINW1LCfw==",- "dev": true,- "funding": [- {- "type": "opencollective",- "url": "https://opencollective.com/postcss/"- },- {- "type": "github",- "url": "https://github.com/sponsors/ai"- }- ],- "license": "MIT",- "dependencies": {- "camelcase-css": "^2.0.1"- },- "engines": {- "node": "^12 || ^14 || >= 16"- },- "peerDependencies": {- "postcss": "^8.4.21"- }- },- "node_modules/postcss-load-config": {- "version": "6.0.1",- "resolved": "https://registry.npmmirror.com/postcss-load-config/-/postcss-load-config-6.0.1.tgz",- "integrity": "sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==",- "dev": true,- "funding": [- {- "type": "opencollective",- "url": "https://opencollective.com/postcss/"- },- {- "type": "github",- "url": "https://github.com/sponsors/ai"- }- ],- "license": "MIT",- "dependencies": {- "lilconfig": "^3.1.1"- },- "engines": {- "node": ">= 18"- },- "peerDependencies": {- "jiti": ">=1.21.0",- "postcss": ">=8.0.9",- "tsx": "^4.8.1",- "yaml": "^2.4.2"- },- "peerDependenciesMeta": {- "jiti": {- "optional": true- },- "postcss": {- "optional": true- },- "tsx": {- "optional": true- },- "yaml": {- "optional": true- }- }- },- "node_modules/postcss-nested": {- "version": "6.2.0",- "resolved": "https://registry.npmmirror.com/postcss-nested/-/postcss-nested-6.2.0.tgz",- "integrity": "sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==",- "dev": true,- "funding": [- {- "type": "opencollective",- "url": "https://opencollective.com/postcss/"- },- {- "type": "github",- "url": "https://github.com/sponsors/ai"- }- ],- "license": "MIT",- "dependencies": {- "postcss-selector-parser": "^6.1.1"- },- "engines": {- "node": ">=12.0"- },- "peerDependencies": {- "postcss": "^8.2.14"- }- },- "node_modules/postcss-selector-parser": {- "version": "6.1.4",- "resolved": "https://registry.npmmirror.com/postcss-selector-parser/-/postcss-selector-parser-6.1.4.tgz",- "integrity": "sha512-bIoJLOmjCO1S9XdY/DcnR5hJxvrDir1PbGChrzXG3vw0/FOliy/fA3dmdhQ441kah4gKv+TwckGzex6wNS5cnQ==",- "dev": true,- "license": "MIT",- "dependencies": {- "cssesc": "^3.0.0",- "util-deprecate": "^1.0.2"- },- "engines": {- "node": ">=4"- }- },- "node_modules/postcss-value-parser": {- "version": "4.2.0",- "resolved": "https://registry.npmmirror.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",- "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",- "dev": true,- "license": "MIT"- },- "node_modules/queue-microtask": {- "version": "1.2.3",- "resolved": "https://registry.npmmirror.com/queue-microtask/-/queue-microtask-1.2.3.tgz",- "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",- "dev": true,- "funding": [- {- "type": "github",- "url": "https://github.com/sponsors/feross"- },- {- "type": "patreon",- "url": "https://www.patreon.com/feross"- },- {- "type": "consulting",- "url": "https://feross.org/support"- }- ],- "license": "MIT"- },- "node_modules/react": {- "version": "19.2.8",- "resolved": "https://registry.npmmirror.com/react/-/react-19.2.8.tgz",- "integrity": "sha512-PWaYA1L/q9u2u7xYQi+Y3L3Yfnie7XyLeaJICV1MGD6LprsBxcAqGjYyr0eY3p+QdsA+x/Irkt4Qif8D63+Sbw==",- "license": "MIT",- "engines": {- "node": ">=0.10.0"- }- },- "node_modules/react-dom": {- "version": "19.2.8",- "resolved": "https://registry.npmmirror.com/react-dom/-/react-dom-19.2.8.tgz",- "integrity": "sha512-rVprimfGBG3DR+Tq0IQG2DT5PxKth1WIGDmj5yPmlzr4YBe7uyE+Du4oVqTDXZSHGGGXRtTJEGSSePyQCMBglQ==",- "license": "MIT",- "dependencies": {- "scheduler": "^0.27.0"- },- "peerDependencies": {- "react": "^19.2.8"- }- },- "node_modules/read-cache": {- "version": "1.0.2",- "resolved": "https://registry.npmmirror.com/read-cache/-/read-cache-1.0.2.tgz",- "integrity": "sha512-/peqiBB/n07gQGLsWaHho3WfvUyRscw0gYTsEFMhrIe/nWLkYaf5SbKYjGYqtRV3aPwykJgF2VEMo1ac4bnsGA==",- "dev": true,- "license": "MIT"- },- "node_modules/readdirp": {- "version": "3.6.0",- "resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-3.6.0.tgz",- "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",- "dev": true,- "license": "MIT",- "dependencies": {- "picomatch": "^2.2.1"- },- "engines": {- "node": ">=8.10.0"- }- },- "node_modules/resolve": {- "version": "1.22.12",- "resolved": "https://registry.npmmirror.com/resolve/-/resolve-1.22.12.tgz",- "integrity": "sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==",- "dev": true,- "license": "MIT",- "dependencies": {- "es-errors": "^1.3.0",- "is-core-module": "^2.16.1",- "path-parse": "^1.0.7",- "supports-preserve-symlinks-flag": "^1.0.0"- },- "bin": {- "resolve": "bin/resolve"- },- "engines": {- "node": ">= 0.4"- },- "funding": {- "url": "https://github.com/sponsors/ljharb"- }- },- "node_modules/reusify": {- "version": "1.1.0",- "resolved": "https://registry.npmmirror.com/reusify/-/reusify-1.1.0.tgz",- "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==",- "dev": true,- "license": "MIT",- "engines": {- "iojs": ">=1.0.0",- "node": ">=0.10.0"- }- },- "node_modules/rollup": {- "version": "4.63.1",- "resolved": "https://registry.npmmirror.com/rollup/-/rollup-4.63.1.tgz",- "integrity": "sha512-3Df9jsstwhccuEfmAMi9l8XUh/GOkVObmFTU7CCVBysEbcOZLl84jCtaAZMcPiMz2EGKsATzQcU+Xr3n/wU6cg==",- "dev": true,- "license": "MIT",- "dependencies": {- "@types/estree": "1.0.9"- },- "bin": {- "rollup": "dist/bin/rollup"- },- "engines": {- "node": ">=18.0.0",- "npm": ">=8.0.0"- },- "optionalDependencies": {- "@napi-rs/lzma-linux-x64-gnu": "1.5.1",- "@rollup/rollup-android-arm-eabi": "4.63.1",- "@rollup/rollup-android-arm64": "4.63.1",- "@rollup/rollup-darwin-arm64": "4.63.1",- "@rollup/rollup-darwin-x64": "4.63.1",- "@rollup/rollup-freebsd-arm64": "4.63.1",- "@rollup/rollup-freebsd-x64": "4.63.1",- "@rollup/rollup-linux-arm-gnueabihf": "4.63.1",- "@rollup/rollup-linux-arm-musleabihf": "4.63.1",- "@rollup/rollup-linux-arm64-gnu": "4.63.1",- "@rollup/rollup-linux-arm64-musl": "4.63.1",- "@rollup/rollup-linux-loong64-gnu": "4.63.1",- "@rollup/rollup-linux-loong64-musl": "4.63.1",- "@rollup/rollup-linux-ppc64-gnu": "4.63.1",- "@rollup/rollup-linux-ppc64-musl": "4.63.1",- "@rollup/rollup-linux-riscv64-gnu": "4.63.1",- "@rollup/rollup-linux-riscv64-musl": "4.63.1",- "@rollup/rollup-linux-s390x-gnu": "4.63.1",- "@rollup/rollup-linux-x64-gnu": "4.63.1",- "@rollup/rollup-linux-x64-musl": "4.63.1",- "@rollup/rollup-openbsd-x64": "4.63.1",- "@rollup/rollup-openharmony-arm64": "4.63.1",- "@rollup/rollup-win32-arm64-msvc": "4.63.1",- "@rollup/rollup-win32-ia32-msvc": "4.63.1",- "@rollup/rollup-win32-x64-gnu": "4.63.1",- "@rollup/rollup-win32-x64-msvc": "4.63.1",- "fsevents": "~2.3.2"- }- },- "node_modules/run-parallel": {- "version": "1.2.0",- "resolved": "https://registry.npmmirror.com/run-parallel/-/run-parallel-1.2.0.tgz",- "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",- "dev": true,- "funding": [- {- "type": "github",- "url": "https://github.com/sponsors/feross"- },- {- "type": "patreon",- "url": "https://www.patreon.com/feross"- },- {- "type": "consulting",- "url": "https://feross.org/support"- }- ],- "license": "MIT",- "dependencies": {- "queue-microtask": "^1.2.2"- }- },- "node_modules/scheduler": {- "version": "0.27.0",- "resolved": "https://registry.npmmirror.com/scheduler/-/scheduler-0.27.0.tgz",- "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==",- "license": "MIT"- },- "node_modules/semver": {- "version": "7.8.5",- "resolved": "https://registry.npmmirror.com/semver/-/semver-7.8.5.tgz",- "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==",- "license": "ISC",- "optional": true,- "bin": {- "semver": "bin/semver.js"- },- "engines": {- "node": ">=10"- }- },- "node_modules/sharp": {- "version": "0.35.4",- "resolved": "https://registry.npmmirror.com/sharp/-/sharp-0.35.4.tgz",- "integrity": "sha512-n++8XWcj+jCOr2IOl7h8LbKnGBDY4aPbmprMONBNFdn0ImXqpGVv5zliDs0V9HbmbCQLpbuo2ej9rAoOQTvMDA==",- "license": "Apache-2.0",- "optional": true,- "dependencies": {- "@img/colour": "^1.1.0",- "detect-libc": "^2.1.2",- "semver": "^7.8.5"- },- "engines": {- "node": ">=20.9.0"- },- "funding": {- "url": "https://opencollective.com/libvips"- },- "optionalDependencies": {- "@img/sharp-darwin-arm64": "0.35.4",- "@img/sharp-darwin-x64": "0.35.4",- "@img/sharp-freebsd-wasm32": "0.35.4",- "@img/sharp-libvips-darwin-arm64": "1.3.3",- "@img/sharp-libvips-darwin-x64": "1.3.3",- "@img/sharp-libvips-linux-arm": "1.3.3",- "@img/sharp-libvips-linux-arm64": "1.3.3",- "@img/sharp-libvips-linux-ppc64": "1.3.3",- "@img/sharp-libvips-linux-riscv64": "1.3.3",- "@img/sharp-libvips-linux-s390x": "1.3.3",- "@img/sharp-libvips-linux-x64": "1.3.3",- "@img/sharp-libvips-linuxmusl-arm64": "1.3.3",- "@img/sharp-libvips-linuxmusl-x64": "1.3.3",- "@img/sharp-linux-arm": "0.35.4",- "@img/sharp-linux-arm64": "0.35.4",- "@img/sharp-linux-ppc64": "0.35.4",- "@img/sharp-linux-riscv64": "0.35.4",- "@img/sharp-linux-s390x": "0.35.4",- "@img/sharp-linux-x64": "0.35.4",- "@img/sharp-linuxmusl-arm64": "0.35.4",- "@img/sharp-linuxmusl-x64": "0.35.4",- "@img/sharp-webcontainers-wasm32": "0.35.4",- "@img/sharp-win32-arm64": "0.35.4",- "@img/sharp-win32-ia32": "0.35.4",- "@img/sharp-win32-x64": "0.35.4"- },- "peerDependenciesMeta": {- "@types/node": {- "optional": true- }- }- },- "node_modules/siginfo": {- "version": "2.0.0",- "resolved": "https://registry.npmmirror.com/siginfo/-/siginfo-2.0.0.tgz",- "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==",- "dev": true,- "license": "ISC"- },- "node_modules/source-map-js": {- "version": "1.2.1",- "resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.1.tgz",- "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",- "license": "BSD-3-Clause",- "engines": {- "node": ">=0.10.0"- }- },- "node_modules/stackback": {- "version": "0.0.2",- "resolved": "https://registry.npmmirror.com/stackback/-/stackback-0.0.2.tgz",- "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==",- "dev": true,- "license": "MIT"- },- "node_modules/std-env": {- "version": "3.10.0",- "resolved": "https://registry.npmmirror.com/std-env/-/std-env-3.10.0.tgz",- "integrity": "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==",- "dev": true,- "license": "MIT"- },- "node_modules/styled-jsx": {- "version": "5.1.6",- "resolved": "https://registry.npmmirror.com/styled-jsx/-/styled-jsx-5.1.6.tgz",- "integrity": "sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA==",- "license": "MIT",- "dependencies": {- "client-only": "0.0.1"- },- "engines": {- "node": ">= 12.0.0"- },- "peerDependencies": {- "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0 || ^19.0.0-0"- },- "peerDependenciesMeta": {- "@babel/core": {- "optional": true- },- "babel-plugin-macros": {- "optional": true- }- }- },- "node_modules/sucrase": {- "version": "3.35.1",- "resolved": "https://registry.npmmirror.com/sucrase/-/sucrase-3.35.1.tgz",- "integrity": "sha512-DhuTmvZWux4H1UOnWMB3sk0sbaCVOoQZjv8u1rDoTV0HTdGem9hkAZtl4JZy8P2z4Bg0nT+YMeOFyVr4zcG5Tw==",- "dev": true,- "license": "MIT",- "dependencies": {- "@jridgewell/gen-mapping": "^0.3.2",- "commander": "^4.0.0",- "lines-and-columns": "^1.1.6",- "mz": "^2.7.0",- "pirates": "^4.0.1",- "tinyglobby": "^0.2.11",- "ts-interface-checker": "^0.1.9"- },- "bin": {- "sucrase": "bin/sucrase",- "sucrase-node": "bin/sucrase-node"- },- "engines": {- "node": ">=16 || 14 >=14.17"- }- },- "node_modules/supports-preserve-symlinks-flag": {- "version": "1.0.0",- "resolved": "https://registry.npmmirror.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",- "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">= 0.4"- },- "funding": {- "url": "https://github.com/sponsors/ljharb"- }- },- "node_modules/tailwindcss": {- "version": "3.4.19",- "resolved": "https://registry.npmmirror.com/tailwindcss/-/tailwindcss-3.4.19.tgz",- "integrity": "sha512-3ofp+LL8E+pK/JuPLPggVAIaEuhvIz4qNcf3nA1Xn2o/7fb7s/TYpHhwGDv1ZU3PkBluUVaF8PyCHcm48cKLWQ==",- "dev": true,- "license": "MIT",- "dependencies": {- "@alloc/quick-lru": "^5.2.0",- "arg": "^5.0.2",- "chokidar": "^3.6.0",- "didyoumean": "^1.2.2",- "dlv": "^1.1.3",- "fast-glob": "^3.3.2",- "glob-parent": "^6.0.2",- "is-glob": "^4.0.3",- "jiti": "^1.21.7",- "lilconfig": "^3.1.3",- "micromatch": "^4.0.8",- "normalize-path": "^3.0.0",- "object-hash": "^3.0.0",- "picocolors": "^1.1.1",- "postcss": "^8.4.47",- "postcss-import": "^15.1.0",- "postcss-js": "^4.0.1",- "postcss-load-config": "^4.0.2 || ^5.0 || ^6.0",- "postcss-nested": "^6.2.0",- "postcss-selector-parser": "^6.1.2",- "resolve": "^1.22.8",- "sucrase": "^3.35.0"- },- "bin": {- "tailwind": "lib/cli.js",- "tailwindcss": "lib/cli.js"- },- "engines": {- "node": ">=14.0.0"- }- },- "node_modules/thenify": {- "version": "3.3.1",- "resolved": "https://registry.npmmirror.com/thenify/-/thenify-3.3.1.tgz",- "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==",- "dev": true,- "license": "MIT",- "dependencies": {- "any-promise": "^1.0.0"- }- },- "node_modules/thenify-all": {- "version": "1.6.0",- "resolved": "https://registry.npmmirror.com/thenify-all/-/thenify-all-1.6.0.tgz",- "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==",- "dev": true,- "license": "MIT",- "dependencies": {- "thenify": ">= 3.1.0 < 4"- },- "engines": {- "node": ">=0.8"- }- },- "node_modules/tinybench": {- "version": "2.9.0",- "resolved": "https://registry.npmmirror.com/tinybench/-/tinybench-2.9.0.tgz",- "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==",- "dev": true,- "license": "MIT"- },- "node_modules/tinyexec": {- "version": "0.3.2",- "resolved": "https://registry.npmmirror.com/tinyexec/-/tinyexec-0.3.2.tgz",- "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==",- "dev": true,- "license": "MIT"- },- "node_modules/tinyglobby": {- "version": "0.2.17",- "resolved": "https://registry.npmmirror.com/tinyglobby/-/tinyglobby-0.2.17.tgz",- "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==",- "dev": true,- "license": "MIT",- "dependencies": {- "fdir": "^6.5.0",- "picomatch": "^4.0.4"- },- "engines": {- "node": ">=12.0.0"- },- "funding": {- "url": "https://github.com/sponsors/SuperchupuDev"- }- },- "node_modules/tinyglobby/node_modules/fdir": {- "version": "6.5.0",- "resolved": "https://registry.npmmirror.com/fdir/-/fdir-6.5.0.tgz",- "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">=12.0.0"- },- "peerDependencies": {- "picomatch": "^3 || ^4"- },- "peerDependenciesMeta": {- "picomatch": {- "optional": true- }- }- },- "node_modules/tinyglobby/node_modules/picomatch": {- "version": "4.0.7",- "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-4.0.7.tgz",- "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">=12"- },- "funding": {- "url": "https://github.com/sponsors/jonschlinkert"- }- },- "node_modules/tinypool": {- "version": "1.1.1",- "resolved": "https://registry.npmmirror.com/tinypool/-/tinypool-1.1.1.tgz",- "integrity": "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==",- "dev": true,- "license": "MIT",- "engines": {- "node": "^18.0.0 || >=20.0.0"- }- },- "node_modules/tinyrainbow": {- "version": "1.2.0",- "resolved": "https://registry.npmmirror.com/tinyrainbow/-/tinyrainbow-1.2.0.tgz",- "integrity": "sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">=14.0.0"- }- },- "node_modules/tinyspy": {- "version": "3.0.2",- "resolved": "https://registry.npmmirror.com/tinyspy/-/tinyspy-3.0.2.tgz",- "integrity": "sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">=14.0.0"- }- },- "node_modules/to-regex-range": {- "version": "5.0.1",- "resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz",- "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",- "dev": true,- "license": "MIT",- "dependencies": {- "is-number": "^7.0.0"- },- "engines": {- "node": ">=8.0"- }- },- "node_modules/ts-interface-checker": {- "version": "0.1.13",- "resolved": "https://registry.npmmirror.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz",- "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==",- "dev": true,- "license": "Apache-2.0"- },- "node_modules/tslib": {- "version": "2.8.1",- "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.8.1.tgz",- "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",- "license": "0BSD"- },- "node_modules/typescript": {- "version": "5.9.3",- "resolved": "https://registry.npmmirror.com/typescript/-/typescript-5.9.3.tgz",- "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",- "dev": true,- "license": "Apache-2.0",- "bin": {- "tsc": "bin/tsc",- "tsserver": "bin/tsserver"- },- "engines": {- "node": ">=14.17"- }- },- "node_modules/undici-types": {- "version": "6.21.0",- "resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-6.21.0.tgz",- "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",- "dev": true,- "license": "MIT"- },- "node_modules/update-browserslist-db": {- "version": "1.3.2",- "resolved": "https://registry.npmmirror.com/update-browserslist-db/-/update-browserslist-db-1.3.2.tgz",- "integrity": "sha512-UQ+MSxlhRm1bzjhU+DcuXfjFO1FzNtqhK5+9Yvlp90ItDLk5vT932A0rFu619nf7RVS+Y/VeaUW1jaRDqZ8VJw==",- "dev": true,- "funding": [- {- "type": "opencollective",- "url": "https://opencollective.com/browserslist"- },- {- "type": "tidelift",- "url": "https://tidelift.com/funding/github/npm/browserslist"- },- {- "type": "github",- "url": "https://github.com/sponsors/ai"- }- ],- "license": "MIT",- "dependencies": {- "escalade": "^3.2.0",- "picocolors": "^1.1.1"- },- "bin": {- "update-browserslist-db": "cli.js"- },- "peerDependencies": {- "browserslist": ">= 4.21.0"- }- },- "node_modules/util-deprecate": {- "version": "1.0.2",- "resolved": "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz",- "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",- "dev": true,- "license": "MIT"- },- "node_modules/vite": {- "version": "5.4.21",- "resolved": "https://registry.npmmirror.com/vite/-/vite-5.4.21.tgz",- "integrity": "sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==",- "dev": true,- "license": "MIT",- "dependencies": {- "esbuild": "^0.21.3",- "postcss": "^8.4.43",- "rollup": "^4.20.0"- },- "bin": {- "vite": "bin/vite.js"- },- "engines": {- "node": "^18.0.0 || >=20.0.0"- },- "funding": {- "url": "https://github.com/vitejs/vite?sponsor=1"- },- "optionalDependencies": {- "fsevents": "~2.3.3"- },- "peerDependencies": {- "@types/node": "^18.0.0 || >=20.0.0",- "less": "*",- "lightningcss": "^1.21.0",- "sass": "*",- "sass-embedded": "*",- "stylus": "*",- "sugarss": "*",- "terser": "^5.4.0"- },- "peerDependenciesMeta": {- "@types/node": {- "optional": true- },- "less": {- "optional": true- },- "lightningcss": {- "optional": true- },- "sass": {- "optional": true- },- "sass-embedded": {- "optional": true- },- "stylus": {- "optional": true- },- "sugarss": {- "optional": true- },- "terser": {- "optional": true- }- }- },- "node_modules/vite-node": {- "version": "2.1.9",- "resolved": "https://registry.npmmirror.com/vite-node/-/vite-node-2.1.9.tgz",- "integrity": "sha512-AM9aQ/IPrW/6ENLQg3AGY4K1N2TGZdR5e4gu/MmmR2xR3Ll1+dib+nook92g4TV3PXVyeyxdWwtaCAiUL0hMxA==",- "dev": true,- "license": "MIT",- "dependencies": {- "cac": "^6.7.14",- "debug": "^4.3.7",- "es-module-lexer": "^1.5.4",- "pathe": "^1.1.2",- "vite": "^5.0.0"- },- "bin": {- "vite-node": "vite-node.mjs"- },- "engines": {- "node": "^18.0.0 || >=20.0.0"- },- "funding": {- "url": "https://opencollective.com/vitest"- }- },- "node_modules/vitest": {- "version": "2.1.9",- "resolved": "https://registry.npmmirror.com/vitest/-/vitest-2.1.9.tgz",- "integrity": "sha512-MSmPM9REYqDGBI8439mA4mWhV5sKmDlBKWIYbA3lRb2PTHACE0mgKwA8yQ2xq9vxDTuk4iPrECBAEW2aoFXY0Q==",- "dev": true,- "license": "MIT",- "dependencies": {- "@vitest/expect": "2.1.9",- "@vitest/mocker": "2.1.9",- "@vitest/pretty-format": "^2.1.9",- "@vitest/runner": "2.1.9",- "@vitest/snapshot": "2.1.9",- "@vitest/spy": "2.1.9",- "@vitest/utils": "2.1.9",- "chai": "^5.1.2",- "debug": "^4.3.7",- "expect-type": "^1.1.0",- "magic-string": "^0.30.12",- "pathe": "^1.1.2",- "std-env": "^3.8.0",- "tinybench": "^2.9.0",- "tinyexec": "^0.3.1",- "tinypool": "^1.0.1",- "tinyrainbow": "^1.2.0",- "vite": "^5.0.0",- "vite-node": "2.1.9",- "why-is-node-running": "^2.3.0"- },- "bin": {- "vitest": "vitest.mjs"- },- "engines": {- "node": "^18.0.0 || >=20.0.0"- },- "funding": {- "url": "https://opencollective.com/vitest"- },- "peerDependencies": {- "@edge-runtime/vm": "*",- "@types/node": "^18.0.0 || >=20.0.0",- "@vitest/browser": "2.1.9",- "@vitest/ui": "2.1.9",- "happy-dom": "*",- "jsdom": "*"- },- "peerDependenciesMeta": {- "@edge-runtime/vm": {- "optional": true- },- "@types/node": {- "optional": true- },- "@vitest/browser": {- "optional": true- },- "@vitest/ui": {- "optional": true- },- "happy-dom": {- "optional": true- },- "jsdom": {- "optional": true- }- }- },- "node_modules/why-is-node-running": {- "version": "2.3.0",- "resolved": "https://registry.npmmirror.com/why-is-node-running/-/why-is-node-running-2.3.0.tgz",- "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==",- "dev": true,- "license": "MIT",- "dependencies": {- "siginfo": "^2.0.0",- "stackback": "0.0.2"- },- "bin": {- "why-is-node-running": "cli.js"- },- "engines": {- "node": ">=8"- }- },- "node_modules/zustand": {- "version": "5.0.15",- "resolved": "https://registry.npmmirror.com/zustand/-/zustand-5.0.15.tgz",- "integrity": "sha512-MpSEjRiBkA9crSYeOUH32rJC7SVqAbm0Fqcqge/bUi2PPoLcBWKOsG+C8mevmpr8TwXHBVkChbbJiyvkE+i/3A==",- "license": "MIT",- "engines": {- "node": ">=12.20.0"- },- "peerDependencies": {- "@types/react": ">=18.0.0",- "immer": ">=9.0.6",- "react": ">=18.0.0",- "use-sync-external-store": ">=1.2.0"- },- "peerDependenciesMeta": {- "@types/react": {- "optional": true- },- "immer": {- "optional": true- },- "react": {- "optional": true- },- "use-sync-external-store": {- "optional": true- }- }- }- }-}diff --git a/libretv-next/package.json b/libretv-next/package.jsondeleted file mode 100644index 3bd5135..0000000--- a/libretv-next/package.json+++ /dev/null@@ -1,35 +0,0 @@-{- "name": "libretv-next",- "version": "2.0.0",- "private": true,- "description": "免费在线视频搜索与观看平台(Next.js 重构版)",- "license": "Apache-2.0",- "scripts": {- "dev": "next dev -p 8080",- "build": "next build",- "start": "next start -p 8080",- "typecheck": "tsc --noEmit",- "test": "vitest run"- },- "dependencies": {- "@tanstack/react-query": "^5.59.0",- "artplayer": "^5.2.3",- "dexie": "^4.0.8",- "dexie-react-hooks": "^1.1.7",- "hls.js": "^1.5.17",- "next": "^15.1.0",- "react": "^19.0.0",- "react-dom": "^19.0.0",- "zustand": "^5.0.2"- },- "devDependencies": {- "@types/node": "^22.10.0",- "@types/react": "^19.0.0",- "@types/react-dom": "^19.0.0",- "autoprefixer": "^10.4.20",- "postcss": "^8.4.49",- "tailwindcss": "^3.4.15",- "typescript": "^5.7.2",- "vitest": "^2.1.8"- }-}diff --git a/libs/artplayer.min.js b/libs/artplayer.min.jsdeleted file mode 100644index ca4221f..0000000--- a/libs/artplayer.min.js+++ /dev/null@@ -1,8 +0,0 @@--/*!- * artplayer.js v5.2.4- * Github: https://github.com/zhw2590582/ArtPlayer- * (c) 2017-2025 Harvey Zack- * Released under the MIT License.- */-!function(e,t,r,a,o,i,n,s){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},c="function"==typeof l[a]&&l[a],p=c.i||{},u=c.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(t,r){if(!u[t]){if(!e[t]){if(o[t])return o[t];var i="function"==typeof l[a]&&l[a];if(!r&&i)return i(t,!0);if(c)return c(t,!0);if(d&&"string"==typeof t)return d(t);var n=Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}p.resolve=function(r){var a=e[t][1][r];return null!=a?a:r},p.cache={};var s=u[t]=new f.Module(t);e[t][0].call(s.exports,p,s,s.exports,l)}return u[t].exports;function p(e){var t=p.resolve(e);return!1===t?{}:f(t)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.require=d,this.exports={}},f.modules=e,f.cache=u,f.parent=c,f.distDir=void 0,f.publicUrl=void 0,f.devServer=void 0,f.i=p,f.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(f,"root",{get:function(){return l[a]}}),l[a]=f;for(var h=0;h<t.length;h++)f(t[h]);if(r){var m=f(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=m:"function"==typeof define&&define.amd&&define(function(){return m})}}({jz4E5:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../package.json"),n=e("bundle-text:./style/index.less"),s=o.interopDefault(n),l=e("option-validator"),c=o.interopDefault(l),p=e("./utils/emitter"),u=o.interopDefault(p),d=e("./utils"),f=e("./scheme"),h=o.interopDefault(f),m=e("./config"),g=o.interopDefault(m),v=e("./template"),y=o.interopDefault(v),b=e("./i18n"),x=o.interopDefault(b),w=e("./player"),j=o.interopDefault(w),k=e("./control"),S=o.interopDefault(k),E=e("./contextmenu"),z=o.interopDefault(E),$=e("./info"),I=o.interopDefault($),T=e("./subtitle"),M=o.interopDefault(T),F=e("./events"),P=o.interopDefault(F),C=e("./hotkey"),D=o.interopDefault(C),A=e("./layer"),R=o.interopDefault(A),L=e("./loading"),O=o.interopDefault(L),q=e("./notice"),_=o.interopDefault(q),H=e("./mask"),V=o.interopDefault(H),N=e("./icons"),B=o.interopDefault(N),U=e("./setting"),Y=o.interopDefault(U),W=e("./storage"),K=o.interopDefault(W),Q=e("./plugins"),X=o.interopDefault(Q);let Z=0,G=[];class J extends u.default{constructor(e,t){super(),this.id=++Z;let r=d.mergeDeep(J.option,e);if(r.container=e.container,this.option=(0,c.default)(r,h.default),this.isLock=!1,this.isReady=!1,this.isFocus=!1,this.isInput=!1,this.isRotate=!1,this.isDestroy=!1,this.template=new(0,y.default)(this),this.events=new(0,P.default)(this),this.storage=new(0,K.default)(this),this.icons=new(0,B.default)(this),this.i18n=new(0,x.default)(this),this.notice=new(0,_.default)(this),this.player=new(0,j.default)(this),this.layers=new(0,R.default)(this),this.controls=new(0,S.default)(this),this.contextmenu=new(0,z.default)(this),this.subtitle=new(0,M.default)(this),this.info=new(0,I.default)(this),this.loading=new(0,O.default)(this),this.hotkey=new(0,D.default)(this),this.mask=new(0,V.default)(this),this.setting=new(0,Y.default)(this),this.plugins=new(0,X.default)(this),"function"==typeof t&&this.on("ready",()=>t.call(this,this)),J.DEBUG){let e=e=>console.log(`[ART.${this.id}] -> ${e}`);e("Version@"+J.version);for(let t=0;t<g.default.events.length;t++)this.on("video:"+g.default.events[t],t=>e("Event@"+t.type))}G.push(this)}static get instances(){return G}static get version(){return i.version}static get config(){return g.default}static get utils(){return d}static get scheme(){return h.default}static get Emitter(){return u.default}static get validator(){return c.default}static get kindOf(){return c.default.kindOf}static get html(){return y.default.html}static get option(){return{id:"",container:"#artplayer",url:"",poster:"",type:"",theme:"#f00",volume:.7,isLive:!1,muted:!1,autoplay:!1,autoSize:!1,autoMini:!1,loop:!1,flip:!1,playbackRate:!1,aspectRatio:!1,screenshot:!1,setting:!1,hotkey:!0,pip:!1,mutex:!0,backdrop:!0,fullscreen:!1,fullscreenWeb:!1,subtitleOffset:!1,miniProgressBar:!1,useSSR:!1,playsInline:!0,lock:!1,gesture:!0,fastForward:!1,autoPlayback:!1,autoOrientation:!1,airplay:!1,proxy:void 0,layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],thumbnails:{url:"",number:60,column:10,width:0,height:0,scale:1},subtitle:{url:"",type:"",style:{},name:"",escape:!0,encoding:"utf-8",onVttLoad:e=>e},moreVideoAttr:{controls:!1,preload:d.isSafari?"auto":"metadata"},i18n:{},icons:{},cssVar:{},customType:{},lang:navigator?.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}get video(){return this.template.$video}destroy(e=!0){this.events.destroy(),this.template.destroy(e),G.splice(G.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}r.default=J,J.STYLE=s.default,J.DEBUG=!1,J.CONTEXTMENU=!0,J.NOTICE_TIME=2e3,J.SETTING_WIDTH=250,J.SETTING_ITEM_WIDTH=200,J.SETTING_ITEM_HEIGHT=35,J.RESIZE_TIME=200,J.SCROLL_TIME=200,J.SCROLL_GAP=50,J.AUTO_PLAYBACK_MAX=10,J.AUTO_PLAYBACK_MIN=5,J.AUTO_PLAYBACK_TIMEOUT=3e3,J.RECONNECT_TIME_MAX=5,J.RECONNECT_SLEEP_TIME=1e3,J.CONTROL_HIDE_TIME=3e3,J.DBCLICK_TIME=300,J.DBCLICK_FULLSCREEN=!0,J.MOBILE_DBCLICK_PLAY=!0,J.MOBILE_CLICK_PLAY=!1,J.AUTO_ORIENTATION_TIME=200,J.INFO_LOOP_TIME=1e3,J.FAST_FORWARD_VALUE=3,J.FAST_FORWARD_TIME=1e3,J.TOUCH_MOVE_RATIO=.5,J.VOLUME_STEP=.1,J.SEEK_STEP=5,J.PLAYBACK_RATE=[.5,.75,1,1.25,1.5,2],J.ASPECT_RATIO=["default","4:3","16:9"],J.FLIP=["normal","horizontal","vertical"],J.FULLSCREEN_WEB_IN_BODY=!1,J.LOG_VERSION=!0,J.USE_RAF=!1,d.isBrowser&&(window.Artplayer=J,d.setStyleText("artplayer-style",s.default),setTimeout(()=>{J.LOG_VERSION&&console.log(`%c ArtPlayer %c ${J.version} %c https://artplayer.org`,"color: #fff; background: #5f5f5f","color: #fff; background: #4bc729","")},100))},{"../package.json":"aQnLI","bundle-text:./style/index.less":"6KiDz","option-validator":"49gY0","./utils/emitter":"b0EdR","./utils":"gpvEP","./scheme":"bEi0U","./config":"eQRJX","./template":"dokTM","./i18n":"1bZfm","./player":"3xuL2","./control":"4zOCk","./contextmenu":"iAXzm","./info":"bFUCG","./subtitle":"lEARb","./events":"fpHt3","./hotkey":"9z96t","./layer":"e9ahx","./loading":"hlSVU","./notice":"eDyfI","./mask":"uwUok","./icons":"1F2QO","./setting":"aqPSH","./storage":"48Pli","./plugins":"eOOz3","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],aQnLI:[function(e,t,r,a){t.exports=JSON.parse('{"license":"MIT","name":"artplayer","version":"5.2.4","main":"dist/artplayer.js","legacy":"dist/artplayer.legacy.js","module":"dist/artplayer.esm.js","types":"types/artplayer.d.ts","exports":{"import":"./dist/artplayer.esm.js","require":"./dist/artplayer.js","default":"./dist/artplayer.js"},"homepage":"https://artplayer.org","author":"Harvey Zack<[email protected]>","browserslist":"last 1 Chrome version","description":"ArtPlayer.js is a modern and full featured HTML5 video player","repository":{"type":"git","url":"git+https://github.com/zhw2590582/ArtPlayer.git"},"bugs":{"url":"https://github.com/zhw2590582/ArtPlayer/issues"},"keywords":["html5","video","player"],"dependencies":{"option-validator":"^2.0.6"}}')},{}],"6KiDz":[function(e,t,r,a){t.exports='.art-video-player{--art-theme:red;--art-font-color:#fff;--art-background-color:#000;--art-text-shadow-color:#00000080;--art-transition-duration:.2s;--art-padding:10px;--art-border-radius:3px;--art-progress-height:6px;--art-progress-color:#ffffff40;--art-hover-color:#ffffff40;--art-loaded-color:#ffffff40;--art-state-size:80px;--art-state-opacity:.8;--art-bottom-height:100px;--art-bottom-offset:20px;--art-bottom-gap:5px;--art-highlight-width:8px;--art-highlight-color:#ffffff80;--art-control-height:46px;--art-control-opacity:.75;--art-control-icon-size:36px;--art-control-icon-scale:1.1;--art-volume-height:120px;--art-volume-handle-size:14px;--art-lock-size:36px;--art-indicator-scale:0;--art-indicator-size:16px;--art-fullscreen-web-index:9999;--art-settings-icon-size:24px;--art-settings-max-height:300px;--art-selector-max-height:300px;--art-contextmenus-min-width:250px;--art-subtitle-font-size:20px;--art-subtitle-gap:5px;--art-subtitle-bottom:15px;--art-subtitle-border:#000;--art-widget-background:#000000d9;--art-tip-background:#000000b3;--art-scrollbar-size:4px;--art-scrollbar-background:#ffffff40;--art-scrollbar-background-hover:#ffffff80;--art-mini-progress-height:2px}.art-bg-cover{background-position:50%;background-repeat:no-repeat;background-size:cover}.art-bottom-gradient{background-image:linear-gradient(#0000,#0006,#000);background-position:bottom;background-repeat:repeat-x}.art-backdrop-filter{backdrop-filter:saturate(180%)blur(20px);background-color:#000000bf!important}.art-truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.art-video-player{zoom:1;text-align:left;user-select:none;box-sizing:border-box;width:100%;height:100%;color:var(--art-font-color);background-color:var(--art-background-color);text-shadow:0 0 2px var(--art-text-shadow-color);-webkit-tap-highlight-color:#0000;-ms-touch-action:manipulation;touch-action:manipulation;-ms-high-contrast-adjust:none;direction:ltr;outline:0;margin:0 auto;padding:0;font-family:PingFang SC,Helvetica Neue,Microsoft YaHei,Roboto,Arial,sans-serif;font-size:14px;line-height:1.3;position:relative}.art-video-player *,.art-video-player :before,.art-video-player :after{box-sizing:border-box}.art-video-player ::-webkit-scrollbar{width:var(--art-scrollbar-size);height:var(--art-scrollbar-size)}.art-video-player ::-webkit-scrollbar-thumb{background-color:var(--art-scrollbar-background)}.art-video-player ::-webkit-scrollbar-thumb:hover{background-color:var(--art-scrollbar-background-hover)}.art-video-player img{vertical-align:top;max-width:100%}.art-video-player svg{fill:var(--art-font-color)}.art-video-player a{color:var(--art-font-color);text-decoration:none}.art-icon{justify-content:center;align-items:center;line-height:1;display:flex}.art-video-player.art-backdrop .art-contextmenus,.art-video-player.art-backdrop .art-info,.art-video-player.art-backdrop .art-settings,.art-video-player.art-backdrop .art-layer-auto-playback,.art-video-player.art-backdrop .art-selector-list,.art-video-player.art-backdrop .art-volume-inner{backdrop-filter:saturate(180%)blur(20px);background-color:#000000bf!important}.art-video{z-index:10;cursor:pointer;width:100%;height:100%;position:absolute;inset:0}.art-poster{z-index:11;pointer-events:none;background-position:50%;background-repeat:no-repeat;background-size:cover;width:100%;height:100%;position:absolute;inset:0}.art-video-player .art-subtitle{z-index:20;text-align:center;pointer-events:none;justify-content:center;align-items:center;gap:var(--art-subtitle-gap);width:100%;bottom:var(--art-subtitle-bottom);font-size:var(--art-subtitle-font-size);transition:bottom var(--art-transition-duration)ease;text-shadow:var(--art-subtitle-border)1px 0 1px,var(--art-subtitle-border)0 1px 1px,var(--art-subtitle-border)-1px 0 1px,var(--art-subtitle-border)0 -1px 1px,var(--art-subtitle-border)1px 1px 1px,var(--art-subtitle-border)-1px -1px 1px,var(--art-subtitle-border)1px -1px 1px,var(--art-subtitle-border)-1px 1px 1px;flex-direction:column;padding:0 5%;display:none;position:absolute}.art-video-player.art-subtitle-show .art-subtitle{display:flex}.art-video-player.art-control-show .art-subtitle{bottom:calc(var(--art-control-height) + var(--art-subtitle-bottom))}.art-danmuku{z-index:30;pointer-events:none;width:100%;height:100%;position:absolute;inset:0;overflow:hidden}.art-video-player .art-layers{z-index:40;pointer-events:none;width:100%;height:100%;display:none;position:absolute;inset:0}.art-video-player .art-layers .art-layer{pointer-events:auto}.art-video-player.art-layer-show .art-layers{display:flex}.art-video-player .art-mask{z-index:50;pointer-events:none;justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:absolute;inset:0}.art-video-player .art-mask .art-state{opacity:0;width:var(--art-state-size);height:var(--art-state-size);transition:all var(--art-transition-duration)ease;justify-content:center;align-items:center;display:flex;transform:scale(2)}.art-video-player.art-mask-show .art-state{cursor:pointer;pointer-events:auto;opacity:var(--art-state-opacity);transform:scale(1)}.art-video-player.art-loading-show .art-state{display:none}.art-video-player .art-loading{z-index:70;pointer-events:none;justify-content:center;align-items:center;width:100%;height:100%;display:none;position:absolute;inset:0}.art-video-player.art-loading-show .art-loading{display:flex}.art-video-player .art-bottom{z-index:60;opacity:0;pointer-events:none;width:100%;height:100%;padding:0 var(--art-padding);transition:all var(--art-transition-duration)ease;background-size:100% var(--art-bottom-height);background-image:linear-gradient(#0000,#0006,#000);background-position:bottom;background-repeat:repeat-x;flex-direction:column;justify-content:flex-end;display:flex;position:absolute;inset:0;overflow:hidden}.art-video-player .art-bottom .art-controls,.art-video-player .art-bottom .art-progress{transform:translateY(var(--art-bottom-offset));transition:transform var(--art-transition-duration)ease}.art-video-player.art-control-show .art-bottom,.art-video-player.art-hover .art-bottom{opacity:1}.art-video-player.art-control-show .art-bottom .art-controls,.art-video-player.art-hover .art-bottom .art-controls,.art-video-player.art-control-show .art-bottom .art-progress,.art-video-player.art-hover .art-bottom .art-progress{transform:translateY(0)}.art-bottom .art-progress{z-index:0;pointer-events:auto;padding-bottom:var(--art-bottom-gap);position:relative}.art-bottom .art-progress .art-control-progress{cursor:pointer;height:var(--art-progress-height);justify-content:center;align-items:center;display:flex;position:relative}.art-bottom .art-progress .art-control-progress .art-control-progress-inner{width:100%;height:50%;transition:height var(--art-transition-duration)ease;background-color:var(--art-progress-color);align-items:center;display:flex;position:relative}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-hover{z-index:0;background-color:var(--art-hover-color);width:0%;height:100%;position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-loaded{z-index:10;background-color:var(--art-loaded-color);width:0%;height:100%;position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-played{z-index:20;background-color:var(--art-theme);width:0%;height:100%;position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight{z-index:30;pointer-events:none;width:100%;height:100%;position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight span{z-index:0;pointer-events:auto;width:100%;height:100%;transform:translateX(calc(var(--art-highlight-width)/-2));background-color:var(--art-highlight-color);position:absolute;inset:0 auto 0 0;width:var(--art-highlight-width)!important}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{z-index:40;width:var(--art-indicator-size);height:var(--art-indicator-size);transform:scale(var(--art-indicator-scale));margin-left:calc(var(--art-indicator-size)/-2);transition:transform var(--art-transition-duration)ease;border-radius:50%;justify-content:center;align-items:center;display:flex;position:absolute;left:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator .art-icon{pointer-events:none;width:100%;height:100%}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator:hover{transform:scale(1.2)!important}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator:active{transform:scale(1)!important}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-tip{z-index:50;border-radius:var(--art-border-radius);white-space:nowrap;background-color:var(--art-tip-background);padding:3px 5px;font-size:12px;line-height:1;display:none;position:absolute;top:-25px;left:0}.art-bottom .art-progress .art-control-progress:hover .art-control-progress-inner{height:100%}.art-bottom .art-progress .art-control-thumbnails{bottom:calc(var(--art-bottom-gap) + 10px);border-radius:var(--art-border-radius);pointer-events:none;background-color:var(--art-widget-background);display:none;position:absolute;left:0;box-shadow:0 1px 3px #0003,0 1px 2px -1px #0003}.art-bottom:hover .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{transform:scale(1)}.art-controls{z-index:10;pointer-events:auto;height:var(--art-control-height);justify-content:space-between;align-items:center;display:flex;position:relative}.art-controls .art-controls-left,.art-controls .art-controls-right{height:100%;display:flex}.art-controls .art-controls-center{flex:1;justify-content:center;align-items:center;height:100%;padding:0 10px;display:none}.art-controls .art-controls-right{justify-content:flex-end}.art-controls .art-control{cursor:pointer;white-space:nowrap;opacity:var(--art-control-opacity);min-height:var(--art-control-height);min-width:var(--art-control-height);transition:opacity var(--art-transition-duration)ease;flex-shrink:0;justify-content:center;align-items:center;display:flex}.art-controls .art-control .art-icon{height:var(--art-control-icon-size);width:var(--art-control-icon-size);transform:scale(var(--art-control-icon-scale));transition:transform var(--art-transition-duration)ease}.art-controls .art-control .art-icon:active{transform:scale(calc(var(--art-control-icon-scale)*.8))}.art-controls .art-control:hover{opacity:1}.art-control-volume{position:relative}.art-control-volume .art-volume-panel{text-align:center;cursor:default;opacity:0;pointer-events:none;left:0;right:0;bottom:var(--art-control-height);width:var(--art-control-height);height:var(--art-volume-height);transition:all var(--art-transition-duration)ease;justify-content:center;align-items:center;padding:0 5px;font-size:12px;display:flex;position:absolute;transform:translateY(10px)}.art-control-volume .art-volume-panel .art-volume-inner{border-radius:var(--art-border-radius);background-color:var(--art-widget-background);flex-direction:column;align-items:center;gap:10px;width:100%;height:100%;padding:10px 0 12px;display:flex}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider{cursor:pointer;flex:1;justify-content:center;width:100%;display:flex;position:relative}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-handle{border-radius:var(--art-border-radius);background-color:#ffffff40;justify-content:center;width:2px;display:flex;position:relative;overflow:hidden}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-handle .art-volume-loaded{z-index:0;background-color:var(--art-theme);width:100%;height:100%;position:absolute;inset:0}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-indicator{width:var(--art-volume-handle-size);height:var(--art-volume-handle-size);margin-top:calc(var(--art-volume-handle-size)/-2);background-color:var(--art-theme);transition:transform var(--art-transition-duration)ease;border-radius:100%;flex-shrink:0;position:absolute;transform:scale(1)}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider:active .art-volume-indicator{transform:scale(.9)}.art-control-volume:hover .art-volume-panel{opacity:1;pointer-events:auto;transform:translateY(0)}.art-video-player .art-notice{z-index:80;width:100%;height:auto;padding:var(--art-padding);pointer-events:none;display:none;position:absolute;inset:0 0 auto}.art-video-player .art-notice .art-notice-inner{border-radius:var(--art-border-radius);background-color:var(--art-tip-background);padding:5px;line-height:1;display:inline-flex}.art-video-player.art-notice-show .art-notice{display:flex}.art-video-player .art-contextmenus{z-index:120;border-radius:var(--art-border-radius);background-color:var(--art-widget-background);min-width:var(--art-contextmenus-min-width);flex-direction:column;padding:5px 0;font-size:12px;display:none;position:absolute}.art-video-player .art-contextmenus .art-contextmenu{cursor:pointer;border-bottom:1px solid #ffffff1a;padding:10px 15px;display:flex}.art-video-player .art-contextmenus .art-contextmenu span{padding:0 8px}.art-video-player .art-contextmenus .art-contextmenu span:hover,.art-video-player .art-contextmenus .art-contextmenu span.art-current{color:var(--art-theme)}.art-video-player .art-contextmenus .art-contextmenu:hover{background-color:#ffffff1a}.art-video-player .art-contextmenus .art-contextmenu:last-child{border-bottom:none}.art-video-player.art-contextmenu-show .art-contextmenus{display:flex}.art-video-player .art-settings{z-index:90;border-radius:var(--art-border-radius);max-height:var(--art-settings-max-height);left:auto;right:var(--art-padding);bottom:var(--art-control-height);transition:all var(--art-transition-duration)ease;background-color:var(--art-widget-background);flex-direction:column;display:none;position:absolute;overflow:hidden auto}.art-video-player .art-settings .art-setting-panel{flex-direction:column;display:none}.art-video-player .art-settings .art-setting-panel.art-current{display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item{cursor:pointer;transition:background-color var(--art-transition-duration)ease;justify-content:space-between;align-items:center;padding:0 5px;display:flex;overflow:hidden}.art-video-player .art-settings .art-setting-panel .art-setting-item:hover{background-color:#ffffff1a}.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current{color:var(--art-theme)}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-icon-check{visibility:hidden;height:15px}.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current .art-icon-check{visibility:visible}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left{flex-shrink:0;justify-content:center;align-items:center;gap:5px;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left .art-setting-item-left-icon{height:var(--art-settings-icon-size);width:var(--art-settings-icon-size);justify-content:center;align-items:center;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right{justify-content:center;align-items:center;gap:5px;font-size:12px;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-tooltip{white-space:nowrap;color:#ffffff80}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-icon{justify-content:center;align-items:center;min-width:32px;height:24px;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-range{appearance:none;background-color:#fff3;outline:none;width:80px;height:3px}.art-video-player .art-settings .art-setting-panel .art-setting-item-back{border-bottom:1px solid #ffffff1a}.art-video-player.art-setting-show .art-settings{display:flex}.art-video-player .art-info{left:var(--art-padding);top:var(--art-padding);z-index:100;border-radius:var(--art-border-radius);background-color:var(--art-widget-background);padding:10px;font-size:12px;display:none;position:absolute}.art-video-player .art-info .art-info-panel{flex-direction:column;gap:5px;display:flex}.art-video-player .art-info .art-info-panel .art-info-item{align-items:center;gap:5px;display:flex}.art-video-player .art-info .art-info-panel .art-info-item .art-info-title{text-align:right;width:100px}.art-video-player .art-info .art-info-panel .art-info-item .art-info-content{text-overflow:ellipsis;white-space:nowrap;user-select:all;width:250px;overflow:hidden}.art-video-player .art-info .art-info-close{cursor:pointer;position:absolute;top:5px;right:5px}.art-video-player.art-info-show .art-info{display:flex}.art-hide-cursor *{cursor:none!important}.art-video-player[data-aspect-ratio]{overflow:hidden}.art-video-player[data-aspect-ratio] .art-video{object-fit:fill;box-sizing:content-box}.art-fullscreen{--art-progress-height:8px;--art-indicator-size:20px;--art-control-height:60px;--art-control-icon-scale:1.3}.art-fullscreen-web{--art-progress-height:8px;--art-indicator-size:20px;--art-control-height:60px;--art-control-icon-scale:1.3;z-index:var(--art-fullscreen-web-index);width:100%;height:100%;position:fixed;inset:0}.art-mini-popup{z-index:9999;border-radius:var(--art-border-radius);cursor:move;user-select:none;background:#000;width:320px;height:180px;transition:opacity .2s;position:fixed;overflow:hidden;box-shadow:0 0 5px #00000080}.art-mini-popup svg{fill:#fff}.art-mini-popup .art-video{pointer-events:none}.art-mini-popup .art-mini-close{z-index:20;cursor:pointer;opacity:0;transition:opacity .2s;position:absolute;top:10px;right:10px}.art-mini-popup .art-mini-state{z-index:30;pointer-events:none;opacity:0;background-color:#00000040;justify-content:center;align-items:center;width:100%;height:100%;transition:opacity .2s;display:flex;position:absolute;inset:0}.art-mini-popup .art-mini-state .art-icon{opacity:.75;cursor:pointer;pointer-events:auto;transition:transform .2s;transform:scale(3)}.art-mini-popup .art-mini-state .art-icon:active{transform:scale(2.5)}.art-mini-popup.art-mini-dragging{opacity:.9}.art-mini-popup:hover .art-mini-close,.art-mini-popup:hover .art-mini-state{opacity:1}.art-video-player[data-flip=horizontal] .art-video{transform:scaleX(-1)}.art-video-player[data-flip=vertical] .art-video{transform:scaleY(-1)}.art-video-player .art-layer-lock{height:var(--art-lock-size);width:var(--art-lock-size);top:50%;left:var(--art-padding);background-color:var(--art-tip-background);border-radius:50%;justify-content:center;align-items:center;display:none;position:absolute;transform:translateY(-50%)}.art-video-player .art-layer-auto-playback{border-radius:var(--art-border-radius);left:var(--art-padding);bottom:calc(var(--art-control-height) + var(--art-bottom-gap) + 10px);background-color:var(--art-widget-background);align-items:center;gap:10px;padding:10px;line-height:1;display:none;position:absolute}.art-video-player .art-layer-auto-playback .art-auto-playback-close{cursor:pointer;justify-content:center;align-items:center;display:flex}.art-video-player .art-layer-auto-playback .art-auto-playback-close svg{width:15px;height:15px;fill:var(--art-theme)}.art-video-player .art-layer-auto-playback .art-auto-playback-jump{color:var(--art-theme);cursor:pointer}.art-video-player.art-lock .art-subtitle{bottom:var(--art-subtitle-bottom)!important}.art-video-player.art-mini-progress-bar .art-bottom,.art-video-player.art-lock .art-bottom{opacity:1;background-image:none;padding:0}.art-video-player.art-mini-progress-bar .art-bottom .art-controls,.art-video-player.art-lock .art-bottom .art-controls,.art-video-player.art-mini-progress-bar .art-bottom .art-progress,.art-video-player.art-lock .art-bottom .art-progress{transform:translateY(calc(var(--art-control-height) + var(--art-bottom-gap) + var(--art-progress-height)/4))}.art-video-player.art-mini-progress-bar .art-bottom .art-progress-indicator,.art-video-player.art-lock .art-bottom .art-progress-indicator{display:none!important}.art-video-player.art-control-show .art-layer-lock{display:flex}.art-control-selector{justify-content:center;display:flex;position:relative}.art-control-selector .art-selector-list{text-align:center;border-radius:var(--art-border-radius);opacity:0;pointer-events:none;bottom:var(--art-control-height);max-height:var(--art-selector-max-height);background-color:var(--art-widget-background);transition:all var(--art-transition-duration)ease;flex-direction:column;align-items:center;display:flex;position:absolute;overflow:hidden auto;transform:translateY(10px)}.art-control-selector .art-selector-list .art-selector-item{flex-shrink:0;justify-content:center;align-items:center;width:100%;padding:10px 15px;line-height:1;display:flex}.art-control-selector .art-selector-list .art-selector-item:hover{background-color:#ffffff1a}.art-control-selector .art-selector-list .art-selector-item:hover,.art-control-selector .art-selector-list .art-selector-item.art-current{color:var(--art-theme)}.art-control-selector:hover .art-selector-list{opacity:1;pointer-events:auto;transform:translateY(0)}[class*=hint--]{font-style:normal;display:inline-block;position:relative}[class*=hint--]:before,[class*=hint--]:after{visibility:hidden;opacity:0;z-index:1000000;pointer-events:none;transition:all .3s;position:absolute;transform:translate(0,0)}[class*=hint--]:hover:before,[class*=hint--]:hover:after{visibility:visible;opacity:1;transition-delay:.1s}[class*=hint--]:before{content:"";z-index:1000001;background:0 0;border:6px solid #0000;position:absolute}[class*=hint--]:after{color:#fff;white-space:nowrap;background:#000;padding:8px 10px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:12px;line-height:12px}[class*=hint--][aria-label]:after{content:attr(aria-label)}[class*=hint--][data-hint]:after{content:attr(data-hint)}[aria-label=""]:before,[aria-label=""]:after,[data-hint=""]:before,[data-hint=""]:after{display:none!important}.hint--top-left:before,.hint--top-right:before,.hint--top:before{border-top-color:#000}.hint--bottom-left:before,.hint--bottom-right:before,.hint--bottom:before{border-bottom-color:#000}.hint--left:before{border-left-color:#000}.hint--right:before{border-right-color:#000}.hint--top:before{margin-bottom:-11px}.hint--top:before,.hint--top:after{bottom:100%;left:50%}.hint--top:before{left:calc(50% - 6px)}.hint--top:after{transform:translate(-50%)}.hint--top:hover:before{transform:translateY(-8px)}.hint--top:hover:after{transform:translate(-50%)translateY(-8px)}.hint--bottom:before{margin-top:-11px}.hint--bottom:before,.hint--bottom:after{top:100%;left:50%}.hint--bottom:before{left:calc(50% - 6px)}.hint--bottom:after{transform:translate(-50%)}.hint--bottom:hover:before{transform:translateY(8px)}.hint--bottom:hover:after{transform:translate(-50%)translateY(8px)}.hint--right:before{margin-bottom:-6px;margin-left:-11px}.hint--right:after{margin-bottom:-14px}.hint--right:before,.hint--right:after{bottom:50%;left:100%}.hint--right:hover:before,.hint--right:hover:after{transform:translate(8px)}.hint--left:before{margin-bottom:-6px;margin-right:-11px}.hint--left:after{margin-bottom:-14px}.hint--left:before,.hint--left:after{bottom:50%;right:100%}.hint--left:hover:before,.hint--left:hover:after{transform:translate(-8px)}.hint--top-left:before{margin-bottom:-11px}.hint--top-left:before,.hint--top-left:after{bottom:100%;left:50%}.hint--top-left:before{left:calc(50% - 6px)}.hint--top-left:after{margin-left:12px;transform:translate(-100%)}.hint--top-left:hover:before{transform:translateY(-8px)}.hint--top-left:hover:after{transform:translate(-100%)translateY(-8px)}.hint--top-right:before{margin-bottom:-11px}.hint--top-right:before,.hint--top-right:after{bottom:100%;left:50%}.hint--top-right:before{left:calc(50% - 6px)}.hint--top-right:after{margin-left:-12px;transform:translate(0)}.hint--top-right:hover:before,.hint--top-right:hover:after{transform:translateY(-8px)}.hint--bottom-left:before{margin-top:-11px}.hint--bottom-left:before,.hint--bottom-left:after{top:100%;left:50%}.hint--bottom-left:before{left:calc(50% - 6px)}.hint--bottom-left:after{margin-left:12px;transform:translate(-100%)}.hint--bottom-left:hover:before{transform:translateY(8px)}.hint--bottom-left:hover:after{transform:translate(-100%)translateY(8px)}.hint--bottom-right:before{margin-top:-11px}.hint--bottom-right:before,.hint--bottom-right:after{top:100%;left:50%}.hint--bottom-right:before{left:calc(50% - 6px)}.hint--bottom-right:after{margin-left:-12px;transform:translate(0)}.hint--bottom-right:hover:before,.hint--bottom-right:hover:after{transform:translateY(8px)}.hint--small:after,.hint--medium:after,.hint--large:after{white-space:normal;word-wrap:break-word;line-height:1.4em}.hint--small:after{width:80px}.hint--medium:after{width:150px}.hint--large:after{width:300px}[class*=hint--]:after{text-shadow:0 -1px #000;box-shadow:4px 4px 8px #0000004d}.hint--error:after{text-shadow:0 -1px #592726;background-color:#b34e4d}.hint--error.hint--top-left:before,.hint--error.hint--top-right:before,.hint--error.hint--top:before{border-top-color:#b34e4d}.hint--error.hint--bottom-left:before,.hint--error.hint--bottom-right:before,.hint--error.hint--bottom:before{border-bottom-color:#b34e4d}.hint--error.hint--left:before{border-left-color:#b34e4d}.hint--error.hint--right:before{border-right-color:#b34e4d}.hint--warning:after{text-shadow:0 -1px #6c5328;background-color:#c09854}.hint--warning.hint--top-left:before,.hint--warning.hint--top-right:before,.hint--warning.hint--top:before{border-top-color:#c09854}.hint--warning.hint--bottom-left:before,.hint--warning.hint--bottom-right:before,.hint--warning.hint--bottom:before{border-bottom-color:#c09854}.hint--warning.hint--left:before{border-left-color:#c09854}.hint--warning.hint--right:before{border-right-color:#c09854}.hint--info:after{text-shadow:0 -1px #1a3c4d;background-color:#3986ac}.hint--info.hint--top-left:before,.hint--info.hint--top-right:before,.hint--info.hint--top:before{border-top-color:#3986ac}.hint--info.hint--bottom-left:before,.hint--info.hint--bottom-right:before,.hint--info.hint--bottom:before{border-bottom-color:#3986ac}.hint--info.hint--left:before{border-left-color:#3986ac}.hint--info.hint--right:before{border-right-color:#3986ac}.hint--success:after{text-shadow:0 -1px #1a321a;background-color:#458746}.hint--success.hint--top-left:before,.hint--success.hint--top-right:before,.hint--success.hint--top:before{border-top-color:#458746}.hint--success.hint--bottom-left:before,.hint--success.hint--bottom-right:before,.hint--success.hint--bottom:before{border-bottom-color:#458746}.hint--success.hint--left:before{border-left-color:#458746}.hint--success.hint--right:before{border-right-color:#458746}.hint--always:after,.hint--always:before{opacity:1;visibility:visible}.hint--always.hint--top:before{transform:translateY(-8px)}.hint--always.hint--top:after{transform:translate(-50%)translateY(-8px)}.hint--always.hint--top-left:before{transform:translateY(-8px)}.hint--always.hint--top-left:after{transform:translate(-100%)translateY(-8px)}.hint--always.hint--top-right:before,.hint--always.hint--top-right:after{transform:translateY(-8px)}.hint--always.hint--bottom:before{transform:translateY(8px)}.hint--always.hint--bottom:after{transform:translate(-50%)translateY(8px)}.hint--always.hint--bottom-left:before{transform:translateY(8px)}.hint--always.hint--bottom-left:after{transform:translate(-100%)translateY(8px)}.hint--always.hint--bottom-right:before,.hint--always.hint--bottom-right:after{transform:translateY(8px)}.hint--always.hint--left:before,.hint--always.hint--left:after{transform:translate(-8px)}.hint--always.hint--right:before,.hint--always.hint--right:after{transform:translate(8px)}.hint--rounded:after{border-radius:4px}.hint--no-animate:before,.hint--no-animate:after{transition-duration:0s}.hint--bounce:before,.hint--bounce:after{-webkit-transition:opacity .3s,visibility .3s,-webkit-transform .3s cubic-bezier(.71,1.7,.77,1.24);-moz-transition:opacity .3s,visibility .3s,-moz-transform .3s cubic-bezier(.71,1.7,.77,1.24);transition:opacity .3s,visibility .3s,transform .3s cubic-bezier(.71,1.7,.77,1.24)}.hint--no-shadow:before,.hint--no-shadow:after{text-shadow:initial;box-shadow:initial}.hint--no-arrow:before{display:none}.art-video-player.art-mobile{--art-bottom-gap:10px;--art-control-height:38px;--art-control-icon-scale:1;--art-state-size:60px;--art-settings-max-height:180px;--art-selector-max-height:180px;--art-indicator-scale:1;--art-control-opacity:1}.art-video-player.art-mobile .art-controls-left{margin-left:calc(var(--art-padding)/-1)}.art-video-player.art-mobile .art-controls-right{margin-right:calc(var(--art-padding)/-1)}'},{}],"49gY0":[function(e,t,r,a){t.exports=function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}var t=Object.prototype.toString,r=function(r){if(void 0===r)return"undefined";if(null===r)return"null";var o=e(r);if("boolean"===o)return"boolean";if("string"===o)return"string";if("number"===o)return"number";if("symbol"===o)return"symbol";if("function"===o)return"GeneratorFunction"===a(r)?"generatorfunction":"function";if(Array.isArray?Array.isArray(r):r instanceof Array)return"array";if(r.constructor&&"function"==typeof r.constructor.isBuffer&&r.constructor.isBuffer(r))return"buffer";if(function(e){try{if("number"==typeof e.length&&"function"==typeof e.callee)return!0}catch(e){if(-1!==e.message.indexOf("callee"))return!0}return!1}(r))return"arguments";if(r instanceof Date||"function"==typeof r.toDateString&&"function"==typeof r.getDate&&"function"==typeof r.setDate)return"date";if(r instanceof Error||"string"==typeof r.message&&r.constructor&&"number"==typeof r.constructor.stackTraceLimit)return"error";if(r instanceof RegExp||"string"==typeof r.flags&&"boolean"==typeof r.ignoreCase&&"boolean"==typeof r.multiline&&"boolean"==typeof r.global)return"regexp";switch(a(r)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if("function"==typeof r.throw&&"function"==typeof r.return&&"function"==typeof r.next)return"generator";switch(o=t.call(r)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return o.slice(8,-1).toLowerCase().replace(/\s/g,"")};function a(e){return e.constructor?e.constructor.name:null}function o(e,t){var a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:["option"];return i(e,t,a),n(e,t,a),function(e,t,a){var s=r(t),l=r(e);if("object"===s){if("object"!==l)throw Error("[Type Error]: '".concat(a.join("."),"' require 'object' type, but got '").concat(l,"'"));Object.keys(t).forEach(function(r){var s=e[r],l=t[r],c=a.slice();c.push(r),i(s,l,c),n(s,l,c),o(s,l,c)})}if("array"===s){if("array"!==l)throw Error("[Type Error]: '".concat(a.join("."),"' require 'array' type, but got '").concat(l,"'"));e.forEach(function(r,s){var l=e[s],c=t[s]||t[0],p=a.slice();p.push(s),i(l,c,p),n(l,c,p),o(l,c,p)})}}(e,t,a),e}function i(e,t,a){if("string"===r(t)){var o=r(e);if("?"===t[0]&&(t=t.slice(1)+"|undefined"),!(-1<t.indexOf("|")?t.split("|").map(function(e){return e.toLowerCase().trim()}).filter(Boolean).some(function(e){return o===e}):t.toLowerCase().trim()===o))throw Error("[Type Error]: '".concat(a.join("."),"' require '").concat(t,"' type, but got '").concat(o,"'"))}}function n(e,t,a){if("function"===r(t)){var o=t(e,r(e),a);if(!0!==o){var i=r(o);throw"string"===i?Error(o):"error"===i?o:Error("[Validator Error]: The scheme for '".concat(a.join("."),"' validator require return true, but got '").concat(o,"'"))}}}return o.kindOf=r,o}()},{}],b0EdR:[function(e,t,r,a){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=class{on(e,t,r){let a=this.e||(this.e={});return(a[e]||(a[e]=[])).push({fn:t,ctx:r}),this}once(e,t,r){let a=this;function o(...i){a.off(e,o),t.apply(r,i)}return o._=t,this.on(e,o,r)}emit(e,...t){let r=((this.e||(this.e={}))[e]||[]).slice();for(let e=0;e<r.length;e+=1)r[e].fn.apply(r[e].ctx,t);return this}off(e,t){let r=this.e||(this.e={}),a=r[e],o=[];if(a&&t)for(let e=0,r=a.length;e<r;e+=1)a[e].fn!==t&&a[e].fn._!==t&&o.push(a[e]);return o.length?r[e]=o:delete r[e],this}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"7o2zS":[function(e,t,r,a){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}],gpvEP:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./dom");o.exportAll(i,r);var n=e("./error");o.exportAll(n,r);var s=e("./subtitle");o.exportAll(s,r);var l=e("./file");o.exportAll(l,r);var c=e("./property");o.exportAll(c,r);var p=e("./time");o.exportAll(p,r);var u=e("./format");o.exportAll(u,r);var d=e("./compatibility");o.exportAll(d,r)},{"./dom":"jghk1","./error":"9OXL0","./subtitle":"dSV4f","./file":"8Ue1J","./property":"6OkQd","./time":"55T7g","./format":"4YeYK","./compatibility":"h19pd","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],jghk1:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"query",()=>n),o.export(r,"queryAll",()=>s),o.export(r,"addClass",()=>l),o.export(r,"removeClass",()=>c),o.export(r,"hasClass",()=>p),o.export(r,"append",()=>u),o.export(r,"remove",()=>d),o.export(r,"setStyle",()=>f),o.export(r,"setStyles",()=>h),o.export(r,"getStyle",()=>m),o.export(r,"siblings",()=>g),o.export(r,"inverseClass",()=>v),o.export(r,"tooltip",()=>y),o.export(r,"isInViewport",()=>b),o.export(r,"includeFromEvent",()=>x),o.export(r,"replaceElement",()=>w),o.export(r,"createElement",()=>j),o.export(r,"getIcon",()=>k),o.export(r,"setStyleText",()=>S),o.export(r,"supportsFlex",()=>E),o.export(r,"getRect",()=>z),o.export(r,"loadImg",()=>$);var i=e("./compatibility");function n(e,t=document){return t.querySelector(e)}function s(e,t=document){return Array.from(t.querySelectorAll(e))}function l(e,t){return e.classList.add(t)}function c(e,t){return e.classList.remove(t)}function p(e,t){return e.classList.contains(t)}function u(e,t){return t instanceof Element?e.appendChild(t):e.insertAdjacentHTML("beforeend",String(t)),e.lastElementChild||e.lastChild}function d(e){return e.parentNode.removeChild(e)}function f(e,t,r){return e.style[t]=r,e}function h(e,t){for(let r in t)f(e,r,t[r]);return e}function m(e,t,r=!0){let a=window.getComputedStyle(e,null).getPropertyValue(t);return r?parseFloat(a):a}function g(e){return Array.from(e.parentElement.children).filter(t=>t!==e)}function v(e,t){g(e).forEach(e=>c(e,t)),l(e,t)}function y(e,t,r="top"){i.isMobile||(e.setAttribute("aria-label",t),l(e,"hint--rounded"),l(e,`hint--${r}`))}function b(e,t=0){let r=e.getBoundingClientRect(),a=window.innerHeight||document.documentElement.clientHeight,o=window.innerWidth||document.documentElement.clientWidth,i=r.top-t<=a&&r.top+r.height+t>=0,n=r.left-t<=o+t&&r.left+r.width+t>=0;return i&&n}function x(e,t){return e.composedPath&&e.composedPath().indexOf(t)>-1}function w(e,t){return t.parentNode.replaceChild(e,t),e}function j(e){return document.createElement(e)}function k(e="",t=""){let r=j("i");return l(r,"art-icon"),l(r,`art-icon-${e}`),u(r,t),r}function S(e,t){let r=document.getElementById(e);r||((r=document.createElement("style")).id=e,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(r)}):(document.head||document.documentElement).appendChild(r)),r.textContent=t}function E(){let e=document.createElement("div");return e.style.display="flex","flex"===e.style.display}function z(e){return e.getBoundingClientRect()}function $(e,t){return new Promise((r,a)=>{let o=new Image;o.onload=function(){if(t&&1!==t){let i=document.createElement("canvas"),n=i.getContext("2d");i.width=o.width*t,i.height=o.height*t,n.drawImage(o,0,0,i.width,i.height),i.toBlob(t=>{let o=URL.createObjectURL(t),i=new Image;i.onload=function(){r(i)},i.onerror=function(){URL.revokeObjectURL(o),a(Error(`Image load failed: ${e}`))},i.src=o})}else r(o)},o.onerror=function(){a(Error(`Image load failed: ${e}`))},o.src=e})}},{"./compatibility":"h19pd","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],h19pd:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"userAgent",()=>i),o.export(r,"isSafari",()=>n),o.export(r,"isWechat",()=>s),o.export(r,"isIE",()=>l),o.export(r,"isAndroid",()=>c),o.export(r,"isIOS",()=>p),o.export(r,"isIOS13",()=>u),o.export(r,"isMobile",()=>d),o.export(r,"isBrowser",()=>f);let i=globalThis?.CUSTOM_USER_AGENT??("undefined"!=typeof navigator?navigator.userAgent:""),n=/^((?!chrome|android).)*safari/i.test(i),s=/MicroMessenger/i.test(i),l=/MSIE|Trident/i.test(i),c=/android/i.test(i),p=/iPad|iPhone|iPod/i.test(i)&&!window.MSStream,u=p||i.includes("Macintosh")&&navigator.maxTouchPoints>=1,d=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(i)||u,f="undefined"!=typeof window},{"@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"9OXL0":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"ArtPlayerError",()=>i),o.export(r,"errorHandle",()=>n);class i extends Error{constructor(e,t){super(e),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t||this.constructor),this.name="ArtPlayerError"}}function n(e,t){if(!e)throw new i(t);return e}},{"@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],dSV4f:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){return"WEBVTT \r\n\r\n".concat(e.replace(/(\d\d:\d\d:\d\d)[,.](\d+)/g,(e,t,r)=>{let a=r.slice(0,3);return 1===r.length&&(a=r+"00"),2===r.length&&(a=r+"0"),`${t},${a}`}).replace(/\{\\([ibu])\}/g,"</$1>").replace(/\{\\([ibu])1\}/g,"<$1>").replace(/\{([ibu])\}/g,"<$1>").replace(/\{\/([ibu])\}/g,"</$1>").replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g,"$1.$2").replace(/{[\s\S]*?}/g,"").concat("\r\n\r\n"))}function n(e){return URL.createObjectURL(new Blob([e],{type:"text/vtt"}))}function s(e){let t=RegExp("Dialogue:\\s\\d,(\\d+:\\d\\d:\\d\\d.\\d\\d),(\\d+:\\d\\d:\\d\\d.\\d\\d),([^,]*),([^,]*),(?:[^,]*,){4}([\\s\\S]*)$","i");function r(e=""){return e.split(/[:.]/).map((e,t,r)=>{if(t===r.length-1){if(1===e.length)return`.${e}00`;if(2===e.length)return`.${e}0`}else if(1===e.length)return(0===t?"0":":0")+e;return 0===t?e:t===r.length-1?`.${e}`:`:${e}`}).join("")}return"WEBVTT\n\n"+e.split(/\r?\n/).map(e=>{let a=e.match(t);return a?{start:r(a[1].trim()),end:r(a[2].trim()),text:a[5].replace(/{[\s\S]*?}/g,"").replace(/(\\N)/g,"\n").trim().split(/\r?\n/).map(e=>e.trim()).join("\n")}:null}).filter(e=>e).map((e,t)=>e?t+1+"\n"+`${e.start} --> ${e.end}`+"\n"+`${e.text}`:"").filter(e=>e.trim()).join("\n\n")}o.defineInteropFlag(r),o.export(r,"srtToVtt",()=>i),o.export(r,"vttToBlob",()=>n),o.export(r,"assToVtt",()=>s)},{"@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"8Ue1J":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,t){let r=document.createElement("a");r.style.display="none",r.href=e,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}o.defineInteropFlag(r),o.export(r,"getExt",()=>function e(t){return t.includes("?")?e(t.split("?")[0]):t.includes("#")?e(t.split("#")[0]):t.trim().toLowerCase().split(".").pop()}),o.export(r,"download",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"6OkQd":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"def",()=>i),o.export(r,"has",()=>s),o.export(r,"get",()=>l),o.export(r,"mergeDeep",()=>function e(...t){let r=e=>e&&"object"==typeof e&&!Array.isArray(e);return t.reduce((t,a)=>(Object.keys(a).forEach(o=>{let i=t[o],n=a[o];Array.isArray(i)&&Array.isArray(n)?t[o]=i.concat(...n):r(i)&&r(n)?t[o]=e(i,n):t[o]=n}),t),{})});let i=Object.defineProperty,{hasOwnProperty:n}=Object.prototype;function s(e,t){return n.call(e,t)}function l(e,t){return Object.getOwnPropertyDescriptor(e,t)}},{"@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"55T7g":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e=0){return new Promise(t=>setTimeout(t,e))}function n(e,t){let r;return function(...a){clearTimeout(r),r=setTimeout(()=>(r=null,e.apply(this,a)),t)}}function s(e,t){let r=!1;return function(...a){r||(e.apply(this,a),r=!0,setTimeout(function(){r=!1},t))}}o.defineInteropFlag(r),o.export(r,"sleep",()=>i),o.export(r,"debounce",()=>n),o.export(r,"throttle",()=>s)},{"@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"4YeYK":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,t,r){return Math.max(Math.min(e,Math.max(t,r)),Math.min(t,r))}function n(e){return e.charAt(0).toUpperCase()+e.slice(1)}function s(e){if(!e)return"00:00";let t=Math.floor(e/3600),r=Math.floor((e-3600*t)/60),a=Math.floor(e-3600*t-60*r);return(t>0?[t,r,a]:[r,a]).map(e=>e<10?`0${e}`:String(e)).join(":")}function l(e){return e.replace(/[&<>'"]/g,e=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[e]||e)}function c(e){let t={"&":"&","<":"<",">":">","'":"'",""":'"'},r=RegExp(`(${Object.keys(t).join("|")})`,"g");return e.replace(r,e=>t[e]||e)}o.defineInteropFlag(r),o.export(r,"clamp",()=>i),o.export(r,"capitalize",()=>n),o.export(r,"secondToTime",()=>s),o.export(r,"escape",()=>l),o.export(r,"unescape",()=>c)},{"@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],bEi0U:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"ComponentOption",()=>f);var i=e("../utils");let n="array",s="boolean",l="string",c="number",p="object",u="function";function d(e,t,r){return(0,i.errorHandle)(t===l||t===c||e instanceof Element,`${r.join(".")} require '${l}' or 'Element' type`)}let f={html:d,disable:`?${s}`,name:`?${l}`,index:`?${c}`,style:`?${p}`,click:`?${u}`,mounted:`?${u}`,tooltip:`?${l}|${c}`,width:`?${c}`,selector:`?${n}`,onSelect:`?${u}`,switch:`?${s}`,onSwitch:`?${u}`,range:`?${n}`,onRange:`?${u}`,onChange:`?${u}`};r.default={id:l,container:d,url:l,poster:l,type:l,theme:l,lang:l,volume:c,isLive:s,muted:s,autoplay:s,autoSize:s,autoMini:s,loop:s,flip:s,playbackRate:s,aspectRatio:s,screenshot:s,setting:s,hotkey:s,pip:s,mutex:s,backdrop:s,fullscreen:s,fullscreenWeb:s,subtitleOffset:s,miniProgressBar:s,useSSR:s,playsInline:s,lock:s,gesture:s,fastForward:s,autoPlayback:s,autoOrientation:s,airplay:s,proxy:`?${u}`,plugins:[u],layers:[f],contextmenu:[f],settings:[f],controls:[{...f,position:(e,t,r)=>{let a=["top","left","right"];return(0,i.errorHandle)(a.includes(e),`${r.join(".")} only accept ${a.toString()} as parameters`)}}],quality:[{default:`?${s}`,html:l,url:l}],highlight:[{time:c,text:l}],thumbnails:{url:l,number:c,column:c,width:c,height:c,scale:c},subtitle:{url:l,name:l,type:l,style:p,escape:s,encoding:l,onVttLoad:u},moreVideoAttr:p,i18n:p,icons:p,cssVar:p,customType:p}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],eQRJX:[function(e,t,r,a){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default={properties:["audioTracks","autoplay","buffered","controller","controls","crossOrigin","currentSrc","currentTime","defaultMuted","defaultPlaybackRate","duration","ended","error","loop","mediaGroup","muted","networkState","paused","playbackRate","played","preload","readyState","seekable","seeking","src","startDate","textTracks","videoTracks","volume"],methods:["addTextTrack","canPlayType","load","play","pause"],events:["abort","canplay","canplaythrough","durationchange","emptied","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],prototypes:["width","height","videoWidth","videoHeight","poster","webkitDecodedFrameCount","webkitDroppedFrameCount","playsInline","webkitSupportsFullscreen","webkitDisplayingFullscreen","onenterpictureinpicture","onleavepictureinpicture","disablePictureInPicture","cancelVideoFrameCallback","requestVideoFrameCallback","getVideoPlaybackQuality","requestPictureInPicture","webkitEnterFullScreen","webkitEnterFullscreen","webkitExitFullScreen","webkitExitFullscreen"]}},{"@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],dokTM:[function(e,t,r,a){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("../package.json"),i=e("./utils");class n{constructor(e){this.art=e;let{option:t,constructor:r}=e;t.container instanceof Element?this.$container=t.container:(this.$container=(0,i.query)(t.container),(0,i.errorHandle)(this.$container,`No container element found by ${t.container}`)),(0,i.errorHandle)((0,i.supportsFlex)(),"The current browser does not support flex layout");let a=this.$container.tagName.toLowerCase();(0,i.errorHandle)("div"===a,`Unsupported container element type, only support 'div' but got '${a}'`),(0,i.errorHandle)(r.instances.every(e=>e.template.$container!==this.$container),"Cannot mount multiple instances on the same dom element"),this.query=this.query.bind(this),this.$container.dataset.artId=e.id,this.init()}static get html(){return`<div class="art-video-player art-subtitle-show art-layer-show art-control-show art-mask-show"><video class="art-video"><track default kind="metadata" src=""></track></video><div class="art-poster"></div><div class="art-subtitle"></div><div class="art-danmuku"></div><div class="art-layers"></div><div class="art-mask"><div class="art-state"></div></div><div class="art-bottom"><div class="art-progress"></div><div class="art-controls"><div class="art-controls-left"></div><div class="art-controls-center"></div><div class="art-controls-right"></div></div></div><div class="art-loading"></div><div class="art-notice"><div class="art-notice-inner"></div></div><div class="art-settings"></div><div class="art-info"><div class="art-info-panel"><div class="art-info-item"><div class="art-info-title">Player version:</div><div class="art-info-content">${o.version}</div></div><div class="art-info-item"><div class="art-info-title">Video url:</div><div class="art-info-content" data-video="src"></div></div><div class="art-info-item"><div class="art-info-title">Video volume:</div><div class="art-info-content" data-video="volume"></div></div><div class="art-info-item"><div class="art-info-title">Video time:</div><div class="art-info-content" data-video="currentTime"></div></div><div class="art-info-item"><div class="art-info-title">Video duration:</div><div class="art-info-content" data-video="duration"></div></div><div class="art-info-item"><div class="art-info-title">Video resolution:</div><div class="art-info-content"><span data-video="videoWidth"></span>x<span data-video="videoHeight"></span></div></div></div><div class="art-info-close">[x]</div></div><div class="art-contextmenus"></div></div>`}query(e){return(0,i.query)(e,this.$container)}init(){let{option:e}=this.art;if(e.useSSR||(this.$container.innerHTML=n.html),this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video"),this.$track=this.query("track"),this.$poster=this.query(".art-poster"),this.$subtitle=this.query(".art-subtitle"),this.$danmuku=this.query(".art-danmuku"),this.$bottom=this.query(".art-bottom"),this.$progress=this.query(".art-progress"),this.$controls=this.query(".art-controls"),this.$controlsLeft=this.query(".art-controls-left"),this.$controlsCenter=this.query(".art-controls-center"),this.$controlsRight=this.query(".art-controls-right"),this.$layer=this.query(".art-layers"),this.$loading=this.query(".art-loading"),this.$notice=this.query(".art-notice"),this.$noticeInner=this.query(".art-notice-inner"),this.$mask=this.query(".art-mask"),this.$state=this.query(".art-state"),this.$setting=this.query(".art-settings"),this.$info=this.query(".art-info"),this.$infoPanel=this.query(".art-info-panel"),this.$infoClose=this.query(".art-info-close"),this.$contextmenu=this.query(".art-contextmenus"),e.proxy){let t=e.proxy.call(this.art,this.art);(0,i.errorHandle)(t instanceof HTMLVideoElement||t instanceof HTMLCanvasElement,"Function 'option.proxy' needs to return 'HTMLVideoElement' or 'HTMLCanvasElement'"),(0,i.replaceElement)(t,this.$video),t.className="art-video",this.$video=t}e.backdrop&&(0,i.addClass)(this.$player,"art-backdrop"),i.isMobile&&(0,i.addClass)(this.$player,"art-mobile")}destroy(e){this.$video.src="",e?this.$container.innerHTML="":(0,i.addClass)(this.$player,"art-destroy")}}r.default=n},{"../package.json":"aQnLI","./utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"1bZfm":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("./zh-cn"),s=o.interopDefault(n);r.default=class{constructor(e){this.art=e,this.languages={"zh-cn":s.default},this.language={},this.update(e.option.i18n)}init(){let e=this.art.option.lang.toLowerCase();this.language=this.languages[e]||{}}get(e){return this.language[e]||e}update(e){this.languages=(0,i.mergeDeep)(this.languages,e),this.init()}}},{"../utils":"gpvEP","./zh-cn":"kRuwK","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],kRuwK:[function(e,t,r,a){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);let o={"Video Info":"统计信息",Close:"关闭","Video Load Failed":"加载失败",Volume:"音量",Play:"播放",Pause:"暂停",Rate:"速度",Mute:"静音","Video Flip":"画面翻转",Horizontal:"水平",Vertical:"垂直",Reconnect:"重新连接","Show Setting":"显示设置","Hide Setting":"隐藏设置",Screenshot:"截图","Play Speed":"播放速度","Aspect Ratio":"画面比例",Default:"默认",Normal:"正常",Open:"打开","Switch Video":"切换","Switch Subtitle":"切换字幕",Fullscreen:"全屏","Exit Fullscreen":"退出全屏","Web Fullscreen":"网页全屏","Exit Web Fullscreen":"退出网页全屏","Mini Player":"迷你播放器","PIP Mode":"开启画中画","Exit PIP Mode":"退出画中画","PIP Not Supported":"不支持画中画","Fullscreen Not Supported":"不支持全屏","Subtitle Offset":"字幕偏移","Last Seen":"上次看到","Jump Play":"跳转播放",AirPlay:"隔空播放","AirPlay Not Available":"隔空播放不可用"};r.default=o,"undefined"!=typeof window&&(window["artplayer-i18n-zh-cn"]=o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"3xuL2":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./urlMix"),n=o.interopDefault(i),s=e("./attrMix"),l=o.interopDefault(s),c=e("./playMix"),p=o.interopDefault(c),u=e("./pauseMix"),d=o.interopDefault(u),f=e("./toggleMix"),h=o.interopDefault(f),m=e("./seekMix"),g=o.interopDefault(m),v=e("./volumeMix"),y=o.interopDefault(v),b=e("./currentTimeMix"),x=o.interopDefault(b),w=e("./durationMix"),j=o.interopDefault(w),k=e("./switchMix"),S=o.interopDefault(k),E=e("./playbackRateMix"),z=o.interopDefault(E),$=e("./aspectRatioMix"),I=o.interopDefault($),T=e("./screenshotMix"),M=o.interopDefault(T),F=e("./fullscreenMix"),P=o.interopDefault(F),C=e("./fullscreenWebMix"),D=o.interopDefault(C),A=e("./pipMix"),R=o.interopDefault(A),L=e("./loadedMix"),O=o.interopDefault(L),q=e("./playedMix"),_=o.interopDefault(q),H=e("./playingMix"),V=o.interopDefault(H),N=e("./autoSizeMix"),B=o.interopDefault(N),U=e("./rectMix"),Y=o.interopDefault(U),W=e("./flipMix"),K=o.interopDefault(W),Q=e("./miniMix"),X=o.interopDefault(Q),Z=e("./posterMix"),G=o.interopDefault(Z),J=e("./autoHeightMix"),ee=o.interopDefault(J),et=e("./cssVarMix"),er=o.interopDefault(et),ea=e("./themeMix"),eo=o.interopDefault(ea),ei=e("./typeMix"),en=o.interopDefault(ei),es=e("./stateMix"),el=o.interopDefault(es),ec=e("./subtitleOffsetMix"),ep=o.interopDefault(ec),eu=e("./airplayMix"),ed=o.interopDefault(eu),ef=e("./qualityMix"),eh=o.interopDefault(ef),em=e("./thumbnailsMix"),eg=o.interopDefault(em),ev=e("./optionInit"),ey=o.interopDefault(ev),eb=e("./eventInit"),ex=o.interopDefault(eb);r.default=class{constructor(e){(0,n.default)(e),(0,l.default)(e),(0,p.default)(e),(0,d.default)(e),(0,h.default)(e),(0,g.default)(e),(0,y.default)(e),(0,x.default)(e),(0,j.default)(e),(0,S.default)(e),(0,z.default)(e),(0,I.default)(e),(0,M.default)(e),(0,P.default)(e),(0,D.default)(e),(0,R.default)(e),(0,O.default)(e),(0,_.default)(e),(0,V.default)(e),(0,B.default)(e),(0,Y.default)(e),(0,K.default)(e),(0,X.default)(e),(0,G.default)(e),(0,ee.default)(e),(0,er.default)(e),(0,eo.default)(e),(0,en.default)(e),(0,el.default)(e),(0,ep.default)(e),(0,ed.default)(e),(0,eh.default)(e),(0,eg.default)(e),(0,ex.default)(e),(0,ey.default)(e)}}},{"./urlMix":"hXrQD","./attrMix":"6pNgq","./playMix":"krR40","./pauseMix":"eFrQn","./toggleMix":"5mk0x","./seekMix":"kNVxo","./volumeMix":"j0CPw","./currentTimeMix":"3Qlk2","./durationMix":"ej83c","./switchMix":"4DKMC","./playbackRateMix":"3q2BJ","./aspectRatioMix":"kKNdy","./screenshotMix":"jEOGf","./fullscreenMix":"6fcMx","./fullscreenWebMix":"2fgOZ","./pipMix":"7ctTv","./loadedMix":"748cK","./playedMix":"2v3kJ","./playingMix":"7NTUH","./autoSizeMix":"lVqio","./rectMix":"i0rvQ","./flipMix":"f8acK","./miniMix":"htzAz","./posterMix":"iIy8c","./autoHeightMix":"4JyZb","./cssVarMix":"9iyPY","./themeMix":"7NNfU","./typeMix":"ipJQa","./stateMix":"6P1Bw","./subtitleOffsetMix":"eqBmH","./airplayMix":"etKzV","./qualityMix":"1CuDr","./thumbnailsMix":"63zKA","./optionInit":"cIuaY","./eventInit":"lqh1e","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],hXrQD:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{option:t,template:{$video:r}}=e;(0,i.def)(e,"url",{get:()=>r.src,async set(a){if(a){let o=e.url,n=t.type||(0,i.getExt)(a),s=t.customType[n];n&&s?(await (0,i.sleep)(),e.loading.show=!0,s.call(e,r,a,e)):(URL.revokeObjectURL(o),r.src=a),o!==e.url&&(e.option.url=a,e.isReady&&o&&e.once("video:canplay",()=>{e.emit("restart",a)}))}else await (0,i.sleep)(),e.loading.show=!0}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"6pNgq":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{template:{$video:t}}=e;(0,i.def)(e,"attr",{value(e,r){if(void 0===r)return t[e];t[e]=r}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],krR40:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{i18n:t,notice:r,option:a,constructor:{instances:o},template:{$video:n}}=e;(0,i.def)(e,"play",{value:async function(){let i=await n.play();if(r.show=t.get("Play"),e.emit("play"),a.mutex)for(let t=0;t<o.length;t++){let r=o[t];r!==e&&r.pause()}return i}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],eFrQn:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{template:{$video:t},i18n:r,notice:a}=e;(0,i.def)(e,"pause",{value(){let o=t.pause();return a.show=r.get("Pause"),e.emit("pause"),o}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"5mk0x":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){(0,i.def)(e,"toggle",{value:()=>e.playing?e.pause():e.play()})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],kNVxo:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{notice:t}=e;(0,i.def)(e,"seek",{set(r){e.currentTime=r,e.duration&&(t.show=`${(0,i.secondToTime)(e.currentTime)} / ${(0,i.secondToTime)(e.duration)}`),e.emit("seek",e.currentTime)}}),(0,i.def)(e,"forward",{set(t){e.seek=e.currentTime+t}}),(0,i.def)(e,"backward",{set(t){e.seek=e.currentTime-t}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],j0CPw:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{template:{$video:t},i18n:r,notice:a,storage:o}=e;(0,i.def)(e,"volume",{get:()=>t.volume||0,set:e=>{t.volume=(0,i.clamp)(e,0,1),a.show=`${r.get("Volume")}: ${parseInt(100*t.volume,10)}`,0!==t.volume&&o.set("volume",t.volume)}}),(0,i.def)(e,"muted",{get:()=>t.muted,set:r=>{t.muted=r,e.emit("muted",r)}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"3Qlk2":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{$video:t}=e.template;(0,i.def)(e,"currentTime",{get:()=>t.currentTime||0,set:r=>{Number.isNaN(r=parseFloat(r))||(t.currentTime=(0,i.clamp)(r,0,e.duration))}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],ej83c:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){(0,i.def)(e,"duration",{get:()=>{let{duration:t}=e.template.$video;return t===1/0?0:t||0}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"4DKMC":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){function t(t,r){return new Promise((a,o)=>{if(t===e.url)return;let{playing:i,aspectRatio:n,playbackRate:s}=e;e.pause(),e.url=t,e.notice.show="",e.once("video:error",o),e.once("video:loadedmetadata",()=>{e.currentTime=r}),e.once("video:canplay",async()=>{e.playbackRate=s,e.aspectRatio=n,i&&await e.play(),e.notice.show="",a()})})}(0,i.def)(e,"switchQuality",{value:r=>t(r,e.currentTime)}),(0,i.def)(e,"switchUrl",{value:e=>t(e,0)}),(0,i.def)(e,"switch",{set:e.switchUrl})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"3q2BJ":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{template:{$video:t},i18n:r,notice:a}=e;(0,i.def)(e,"playbackRate",{get:()=>t.playbackRate,set(o){o?o!==t.playbackRate&&(t.playbackRate=o,a.show=`${r.get("Rate")}: ${1===o?r.get("Normal"):`${o}x`}`):e.playbackRate=1}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],kKNdy:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{i18n:t,notice:r,template:{$video:a,$player:o}}=e;(0,i.def)(e,"aspectRatio",{get:()=>o.dataset.aspectRatio||"default",set(n){if(n||(n="default"),"default"===n)(0,i.setStyle)(a,"width",null),(0,i.setStyle)(a,"height",null),(0,i.setStyle)(a,"margin",null),delete o.dataset.aspectRatio;else{let e=n.split(":").map(Number),{clientWidth:t,clientHeight:r}=o,s=e[0]/e[1];t/r>s?((0,i.setStyle)(a,"width",`${s*r}px`),(0,i.setStyle)(a,"height","100%"),(0,i.setStyle)(a,"margin","0 auto")):((0,i.setStyle)(a,"width","100%"),(0,i.setStyle)(a,"height",`${t/s}px`),(0,i.setStyle)(a,"margin","auto 0")),o.dataset.aspectRatio=n}r.show=`${t.get("Aspect Ratio")}: ${"default"===n?t.get("Default"):n}`,e.emit("aspectRatio",n)}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],jEOGf:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{notice:t,template:{$video:r}}=e,a=(0,i.createElement)("canvas");(0,i.def)(e,"getDataURL",{value:()=>new Promise((e,o)=>{try{a.width=r.videoWidth,a.height=r.videoHeight,a.getContext("2d").drawImage(r,0,0),e(a.toDataURL("image/png"))}catch(e){t.show=e,o(e)}})}),(0,i.def)(e,"getBlobUrl",{value:()=>new Promise((e,o)=>{try{a.width=r.videoWidth,a.height=r.videoHeight,a.getContext("2d").drawImage(r,0,0),a.toBlob(t=>{e(URL.createObjectURL(t))})}catch(e){t.show=e,o(e)}})}),(0,i.def)(e,"screenshot",{value:async t=>{let a=await e.getDataURL(),o=t||`artplayer_${(0,i.secondToTime)(r.currentTime)}`;return(0,i.download)(a,`${o}.png`),e.emit("screenshot",a),a}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"6fcMx":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>l);var i=e("../libs/screenfull"),n=o.interopDefault(i),s=e("../utils");function l(e){let{i18n:t,notice:r,template:{$video:a,$player:o}}=e,i=e=>{n.default.on("change",()=>{e.emit("fullscreen",n.default.isFullscreen),n.default.isFullscreen?(e.state="fullscreen",(0,s.addClass)(o,"art-fullscreen")):(0,s.removeClass)(o,"art-fullscreen"),e.emit("resize")}),n.default.on("error",t=>{e.emit("fullscreenError",t)}),(0,s.def)(e,"fullscreen",{get:()=>n.default.isFullscreen,async set(e){e?await n.default.request(o):await n.default.exit()}})},l=e=>{e.proxy(document,"webkitfullscreenchange",()=>{e.emit("fullscreen",e.fullscreen),e.emit("resize")}),(0,s.def)(e,"fullscreen",{get:()=>document.fullscreenElement===a,set(t){t?(e.state="fullscreen",a.webkitEnterFullscreen()):a.webkitExitFullscreen()}})};e.once("video:loadedmetadata",()=>{n.default.isEnabled?i(e):a.webkitSupportsFullscreen?l(e):(0,s.def)(e,"fullscreen",{get:()=>!1,set(){r.show=t.get("Fullscreen Not Supported")}}),(0,s.def)(e,"fullscreen",(0,s.get)(e,"fullscreen"))})}},{"../libs/screenfull":"kQNoU","../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],kQNoU:[function(e,t,r,a){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);let o=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],i=(()=>{if("undefined"==typeof document)return!1;let e=o[0],t={};for(let r of o)if(r[1]in document){for(let[a,o]of r.entries())t[e[a]]=o;return t}return!1})(),n={change:i.fullscreenchange,error:i.fullscreenerror},s={request:(e=document.documentElement,t)=>new Promise((r,a)=>{let o=()=>{s.off("change",o),r()};s.on("change",o);let n=e[i.requestFullscreen](t);n instanceof Promise&&n.then(o).catch(a)}),exit:()=>new Promise((e,t)=>{if(!s.isFullscreen)return void e();let r=()=>{s.off("change",r),e()};s.on("change",r);let a=document[i.exitFullscreen]();a instanceof Promise&&a.then(r).catch(t)}),toggle:(e,t)=>s.isFullscreen?s.exit():s.request(e,t),onchange(e){s.on("change",e)},onerror(e){s.on("error",e)},on(e,t){let r=n[e];r&&document.addEventListener(r,t,!1)},off(e,t){let r=n[e];r&&document.removeEventListener(r,t,!1)},raw:i};Object.defineProperties(s,{isFullscreen:{get:()=>!!document[i.fullscreenElement]},element:{enumerable:!0,get:()=>document[i.fullscreenElement]},isEnabled:{enumerable:!0,get:()=>!!document[i.fullscreenEnabled]}}),i||(s={isEnabled:!1}),r.default=s},{"@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"2fgOZ":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{constructor:t,template:{$container:r,$player:a}}=e,o="";(0,i.def)(e,"fullscreenWeb",{get:()=>(0,i.hasClass)(a,"art-fullscreen-web"),set(n){n?(o=a.style.cssText,t.FULLSCREEN_WEB_IN_BODY&&(0,i.append)(document.body,a),e.state="fullscreenWeb",(0,i.setStyle)(a,"width","100%"),(0,i.setStyle)(a,"height","100%"),(0,i.addClass)(a,"art-fullscreen-web"),e.emit("fullscreenWeb",!0)):(t.FULLSCREEN_WEB_IN_BODY&&(0,i.append)(r,a),o&&(a.style.cssText=o,o=""),(0,i.removeClass)(a,"art-fullscreen-web"),e.emit("fullscreenWeb",!1)),e.emit("resize")}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"7ctTv":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{i18n:t,notice:r,template:{$video:a}}=e;if(document.pictureInPictureEnabled){let{template:{$video:t},proxy:r,notice:a}=e;t.disablePictureInPicture=!1,(0,i.def)(e,"pip",{get:()=>document.pictureInPictureElement,set(r){r?(e.state="pip",t.requestPictureInPicture().catch(e=>{throw a.show=e,e})):document.exitPictureInPicture().catch(e=>{throw a.show=e,e})}}),r(t,"enterpictureinpicture",()=>{e.emit("pip",!0)}),r(t,"leavepictureinpicture",()=>{e.emit("pip",!1)})}else if(a.webkitSupportsPresentationMode){let{$video:t}=e.template;t.webkitSetPresentationMode("inline"),(0,i.def)(e,"pip",{get:()=>"picture-in-picture"===t.webkitPresentationMode,set(r){r?(e.state="pip",t.webkitSetPresentationMode("picture-in-picture"),e.emit("pip",!0)):(t.webkitSetPresentationMode("inline"),e.emit("pip",!1))}})}else(0,i.def)(e,"pip",{get:()=>!1,set(){r.show=t.get("PIP Not Supported")}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"748cK":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{$video:t}=e.template;(0,i.def)(e,"loaded",{get:()=>e.loadedTime/t.duration}),(0,i.def)(e,"loadedTime",{get:()=>t.buffered.length?t.buffered.end(t.buffered.length-1):0})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"2v3kJ":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){(0,i.def)(e,"played",{get:()=>e.currentTime/e.duration})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"7NTUH":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{$video:t}=e.template;(0,i.def)(e,"playing",{get:()=>"boolean"==typeof t.playing?t.playing:!!(t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>2)})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],lVqio:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{$container:t,$player:r,$video:a}=e.template;(0,i.def)(e,"autoSize",{value(){let{videoWidth:o,videoHeight:n}=a,{width:s,height:l}=(0,i.getRect)(t),c=o/n;s/l>c?((0,i.setStyle)(r,"width",`${l*c/s*100}%`),(0,i.setStyle)(r,"height","100%")):((0,i.setStyle)(r,"width","100%"),(0,i.setStyle)(r,"height",`${s/c/l*100}%`)),e.emit("autoSize",{width:e.width,height:e.height})}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],i0rvQ:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){(0,i.def)(e,"rect",{get:()=>(0,i.getRect)(e.template.$player)});let t=["bottom","height","left","right","top","width"];for(let r=0;r<t.length;r++){let a=t[r];(0,i.def)(e,a,{get:()=>e.rect[a]})}(0,i.def)(e,"x",{get:()=>e.left+window.pageXOffset}),(0,i.def)(e,"y",{get:()=>e.top+window.pageYOffset})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],f8acK:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{template:{$player:t},i18n:r,notice:a}=e;(0,i.def)(e,"flip",{get:()=>t.dataset.flip||"normal",set(o){o||(o="normal"),"normal"===o?delete t.dataset.flip:t.dataset.flip=o,a.show=`${r.get("Video Flip")}: ${r.get((0,i.capitalize)(o))}`,e.emit("flip",o)}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],htzAz:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{icons:t,proxy:r,storage:a,template:{$player:o,$video:n}}=e,s=!1,l=0,c=0;function p(){let{$mini:t}=e.template;t&&((0,i.removeClass)(o,"art-mini"),(0,i.setStyle)(t,"display","none"),o.prepend(n),e.emit("mini",!1))}function u(t,r){e.playing?((0,i.setStyle)(t,"display","none"),(0,i.setStyle)(r,"display","flex")):((0,i.setStyle)(t,"display","flex"),(0,i.setStyle)(r,"display","none"))}function d(){let{$mini:t}=e.template,r=(0,i.getRect)(t),o=window.innerHeight-r.height-50,n=window.innerWidth-r.width-50;a.set("top",o),a.set("left",n),(0,i.setStyle)(t,"top",`${o}px`),(0,i.setStyle)(t,"left",`${n}px`)}(0,i.def)(e,"mini",{get:()=>(0,i.hasClass)(o,"art-mini"),set(f){if(f){e.state="mini",(0,i.addClass)(o,"art-mini");let f=function(){let{$mini:o}=e.template;if(o)return(0,i.append)(o,n),(0,i.setStyle)(o,"display","flex");{let o=(0,i.createElement)("div");(0,i.addClass)(o,"art-mini-popup"),(0,i.append)(document.body,o),e.template.$mini=o,(0,i.append)(o,n);let d=(0,i.append)(o,'<div class="art-mini-close"></div>');(0,i.append)(d,t.close),r(d,"click",p);let f=(0,i.append)(o,'<div class="art-mini-state"></div>'),h=(0,i.append)(f,t.play),m=(0,i.append)(f,t.pause);return r(h,"click",()=>e.play()),r(m,"click",()=>e.pause()),u(h,m),e.on("video:playing",()=>u(h,m)),e.on("video:pause",()=>u(h,m)),e.on("video:timeupdate",()=>u(h,m)),r(o,"mousedown",e=>{s=0===e.button,l=e.pageX,c=e.pageY}),e.on("document:mousemove",e=>{if(s){(0,i.addClass)(o,"art-mini-dragging");let t=e.pageX-l,r=e.pageY-c;(0,i.setStyle)(o,"transform",`translate(${t}px, ${r}px)`)}}),e.on("document:mouseup",()=>{if(s){s=!1,(0,i.removeClass)(o,"art-mini-dragging");let e=(0,i.getRect)(o);a.set("left",e.left),a.set("top",e.top),(0,i.setStyle)(o,"left",`${e.left}px`),(0,i.setStyle)(o,"top",`${e.top}px`),(0,i.setStyle)(o,"transform",null)}}),o}}(),h=a.get("top"),m=a.get("left");"number"==typeof h&&"number"==typeof m?((0,i.setStyle)(f,"top",`${h}px`),(0,i.setStyle)(f,"left",`${m}px`),(0,i.isInViewport)(f)||d()):d(),e.emit("mini",!0)}else p()}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],iIy8c:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{template:{$poster:t}}=e;(0,i.def)(e,"poster",{get:()=>{try{return t.style.backgroundImage.match(/"(.*)"/)[1]}catch(e){return""}},set(e){(0,i.setStyle)(t,"backgroundImage",`url(${e})`)}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"4JyZb":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{template:{$container:t,$video:r}}=e;(0,i.def)(e,"autoHeight",{value(){let{clientWidth:a}=t,{videoHeight:o,videoWidth:n}=r,s=a/n*o;(0,i.setStyle)(t,"height",s+"px"),e.emit("autoHeight",s)}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"9iyPY":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{$player:t}=e.template;(0,i.def)(e,"cssVar",{value:(e,r)=>r?t.style.setProperty(e,r):getComputedStyle(t).getPropertyValue(e)})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"7NNfU":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){(0,i.def)(e,"theme",{get:()=>e.cssVar("--art-theme"),set(t){e.cssVar("--art-theme",t)}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],ipJQa:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){(0,i.def)(e,"type",{get:()=>e.option.type,set(t){e.option.type=t}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"6P1Bw":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let t=["mini","pip","fullscreen","fullscreenWeb"];(0,i.def)(e,"state",{get:()=>t.find(t=>e[t])||"standard",set(r){for(let a=0;a<t.length;a++){let o=t[a];o!==r&&e[o]&&(e[o]=!1)}}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],eqBmH:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{notice:t,i18n:r,template:a}=e;(0,i.def)(e,"subtitleOffset",{get:()=>a.$track?.offset||0,set(o){let{cues:n}=e.subtitle;if(!a.$track||0===n.length)return;let s=(0,i.clamp)(o,-10,10);a.$track.offset=s;for(let t=0;t<n.length;t++){let r=n[t];r.originalStartTime=r.originalStartTime??r.startTime,r.originalEndTime=r.originalEndTime??r.endTime,r.startTime=(0,i.clamp)(r.originalStartTime+s,0,e.duration),r.endTime=(0,i.clamp)(r.originalEndTime+s,0,e.duration)}e.subtitle.update(),t.show=`${r.get("Subtitle Offset")}: ${o}s`,e.emit("subtitleOffset",o)}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],etKzV:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{i18n:t,notice:r,proxy:a,template:{$video:o}}=e,n=!0;window.WebKitPlaybackTargetAvailabilityEvent&&o.webkitShowPlaybackTargetPicker?a(o,"webkitplaybacktargetavailabilitychanged",e=>{switch(e.availability){case"available":n=!0;break;case"not-available":n=!1}}):n=!1,(0,i.def)(e,"airplay",{value(){n?(o.webkitShowPlaybackTargetPicker(),e.emit("airplay")):r.show=t.get("AirPlay Not Available")}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"1CuDr":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){(0,i.def)(e,"quality",{set(t){let{controls:r,notice:a,i18n:o}=e,i=t.find(e=>e.default)||t[0];r.update({name:"quality",position:"right",index:10,style:{marginRight:"10px"},html:i?.html||"",selector:t,onSelect:async t=>(await e.switchQuality(t.url),a.show=`${o.get("Switch Video")}: ${t.html}`,t.html)})}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"63zKA":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{events:t,option:r,template:{$progress:a,$video:o}}=e,n=null,s=null,l=!1,c=!1,p=!1;t.hover(a,()=>{p=!0},()=>{p=!1}),e.on("setBar",async(t,u,d)=>{let f=e.controls?.thumbnails,{url:h,scale:m}=r.thumbnails;if(!f||!h)return;let g="played"===t&&d&&i.isMobile;if("hover"===t||g){if(l||(l=!0,s=await (0,i.loadImg)(h,m),c=!0),!c||!p)return;let t=a.clientWidth*u;(0,i.setStyle)(f,"display","flex"),t>0&&t<a.clientWidth?function(t){let n=e.controls?.thumbnails;if(!n)return;let{number:l,column:c,width:p,height:u,scale:d}=r.thumbnails,f=p*d||s.naturalWidth/c,h=u*d||f/(o.videoWidth/o.videoHeight),m=Math.floor(t/(a.clientWidth/l)),g=Math.ceil(m/c)-1;(0,i.setStyle)(n,"backgroundImage",`url(${s.src})`),(0,i.setStyle)(n,"height",`${h}px`),(0,i.setStyle)(n,"width",`${f}px`),(0,i.setStyle)(n,"backgroundPosition",`-${(m%c||c-1)*f}px -${g*h}px`),t<=f/2?(0,i.setStyle)(n,"left",0):t>a.clientWidth-f/2?(0,i.setStyle)(n,"left",`${a.clientWidth-f}px`):(0,i.setStyle)(n,"left",`${t-f/2}px`)}(t):i.isMobile||(0,i.setStyle)(f,"display","none"),g&&(clearTimeout(n),n=setTimeout(()=>{(0,i.setStyle)(f,"display","none")},500))}}),(0,i.def)(e,"thumbnails",{get:()=>e.option.thumbnails,set(t){t.url&&!e.option.isLive&&(e.option.thumbnails=t,clearTimeout(n),n=null,s=null,l=!1,c=!1)}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],cIuaY:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{option:t,storage:r,template:{$video:a,$poster:o}}=e;for(let r in t.moreVideoAttr)e.attr(r,t.moreVideoAttr[r]);t.muted&&(e.muted=t.muted),t.volume&&(a.volume=(0,i.clamp)(t.volume,0,1));let n=r.get("volume");for(let r in"number"==typeof n&&(a.volume=(0,i.clamp)(n,0,1)),t.poster&&(0,i.setStyle)(o,"backgroundImage",`url(${t.poster})`),t.autoplay&&(a.autoplay=t.autoplay),t.playsInline&&(a.playsInline=!0,a["webkit-playsinline"]=!0),t.theme&&(t.cssVar["--art-theme"]=t.theme),t.cssVar)e.cssVar(r,t.cssVar[r]);e.url=t.url}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],lqh1e:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>l);var i=e("../config"),n=o.interopDefault(i),s=e("../utils");function l(e){let{i18n:t,notice:r,option:a,constructor:o,proxy:i,template:{$player:l,$video:c,$poster:p}}=e,u=0;for(let t=0;t<n.default.events.length;t++)i(c,n.default.events[t],t=>{e.emit(`video:${t.type}`,t)});e.on("video:canplay",()=>{u=0,e.loading.show=!1}),e.once("video:canplay",()=>{e.loading.show=!1,e.controls.show=!0,e.mask.show=!0,e.isReady=!0,e.emit("ready")}),e.on("video:ended",()=>{a.loop?(e.seek=0,e.play(),e.controls.show=!1,e.mask.show=!1):(e.controls.show=!0,e.mask.show=!0)}),e.on("video:error",async i=>{u<o.RECONNECT_TIME_MAX?(await (0,s.sleep)(o.RECONNECT_SLEEP_TIME),u+=1,e.url=a.url,r.show=`${t.get("Reconnect")}: ${u}`,e.emit("error",i,u)):(e.mask.show=!0,e.loading.show=!1,e.controls.show=!0,(0,s.addClass)(l,"art-error"),await (0,s.sleep)(o.RECONNECT_SLEEP_TIME),r.show=t.get("Video Load Failed"))}),e.on("video:loadedmetadata",()=>{e.emit("resize"),s.isMobile&&(e.loading.show=!1,e.controls.show=!0,e.mask.show=!0)}),e.on("video:loadstart",()=>{e.loading.show=!0,e.mask.show=!1,e.controls.show=!0}),e.on("video:pause",()=>{e.controls.show=!0,e.mask.show=!0}),e.on("video:play",()=>{e.mask.show=!1,(0,s.setStyle)(p,"display","none")}),e.on("video:playing",()=>{e.mask.show=!1}),e.on("video:progress",()=>{e.playing&&(e.loading.show=!1)}),e.on("video:seeked",()=>{e.loading.show=!1,e.mask.show=!0}),e.on("video:seeking",()=>{e.loading.show=!0,e.mask.show=!1}),e.on("video:timeupdate",()=>{e.mask.show=!1}),e.on("video:waiting",()=>{e.loading.show=!0,e.mask.show=!1})}},{"../config":"eQRJX","../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"4zOCk":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils/component"),n=o.interopDefault(i),s=e("./fullscreen"),l=o.interopDefault(s),c=e("./fullscreenWeb"),p=o.interopDefault(c),u=e("./pip"),d=o.interopDefault(u),f=e("./playAndPause"),h=o.interopDefault(f),m=e("./progress"),g=o.interopDefault(m),v=e("./time"),y=o.interopDefault(v),b=e("./volume"),x=o.interopDefault(b),w=e("./setting"),j=o.interopDefault(w),k=e("./screenshot"),S=o.interopDefault(k),E=e("./airplay"),z=o.interopDefault(E),$=e("../utils");class I extends n.default{constructor(e){super(e),this.isHover=!1,this.name="control",this.timer=Date.now();let{constructor:t}=e,{$player:r,$bottom:a}=this.art.template;e.on("mousemove",()=>{$.isMobile||(this.show=!0)}),e.on("click",()=>{$.isMobile?this.toggle():this.show=!0}),e.on("document:mousemove",e=>{this.isHover=(0,$.includeFromEvent)(e,a)}),e.on("video:timeupdate",()=>{!e.setting.show&&!this.isHover&&!e.isInput&&e.playing&&this.show&&Date.now()-this.timer>=t.CONTROL_HIDE_TIME&&(this.show=!1)}),e.on("control",e=>{e?((0,$.removeClass)(r,"art-hide-cursor"),(0,$.addClass)(r,"art-hover"),this.timer=Date.now()):((0,$.addClass)(r,"art-hide-cursor"),(0,$.removeClass)(r,"art-hover"))}),this.init()}init(){let{option:e}=this.art;e.isLive||this.add((0,g.default)({name:"progress",position:"top",index:10})),this.add({name:"thumbnails",position:"top",index:20}),this.add((0,h.default)({name:"playAndPause",position:"left",index:10})),this.add((0,x.default)({name:"volume",position:"left",index:20})),e.isLive||this.add((0,y.default)({name:"time",position:"left",index:30})),e.quality.length&&(0,$.sleep)().then(()=>{this.art.quality=e.quality}),e.screenshot&&!$.isMobile&&this.add((0,S.default)({name:"screenshot",position:"right",index:20})),e.setting&&this.add((0,j.default)({name:"setting",position:"right",index:30})),e.pip&&this.add((0,d.default)({name:"pip",position:"right",index:40})),e.airplay&&window.WebKitPlaybackTargetAvailabilityEvent&&this.add((0,z.default)({name:"airplay",position:"right",index:50})),e.fullscreenWeb&&this.add((0,p.default)({name:"fullscreenWeb",position:"right",index:60})),e.fullscreen&&this.add((0,l.default)({name:"fullscreen",position:"right",index:70}));for(let t=0;t<e.controls.length;t++)this.add(e.controls[t])}add(e){let t="function"==typeof e?e(this.art):e,{$progress:r,$controlsLeft:a,$controlsRight:o}=this.art.template;switch(t.position){case"top":this.$parent=r;break;case"left":this.$parent=a;break;case"right":this.$parent=o;break;default:(0,$.errorHandle)(!1,"Control option.position must one of 'top', 'left', 'right'")}super.add(t)}check(e){e.$control_value.innerHTML=e.html;for(let t=0;t<e.$control_option.length;t++){let r=e.$control_option[t];r.default=r===e,r.default&&(0,$.inverseClass)(r.$control_item,"art-current")}}selector(e,t,r){let{proxy:a}=this.art.events;(0,$.addClass)(t,"art-control-selector");let o=(0,$.createElement)("div");(0,$.addClass)(o,"art-selector-value"),(0,$.append)(o,e.html),t.innerText="",(0,$.append)(t,o);let i=(0,$.createElement)("div");(0,$.addClass)(i,"art-selector-list"),(0,$.append)(t,i);for(let t=0;t<e.selector.length;t++){let r=e.selector[t],a=(0,$.createElement)("div");(0,$.addClass)(a,"art-selector-item"),r.default&&(0,$.addClass)(a,"art-current"),a.dataset.index=t,a.dataset.value=r.value,a.innerHTML=r.html,(0,$.append)(i,a),(0,$.def)(r,"$control_option",{get:()=>e.selector}),(0,$.def)(r,"$control_item",{get:()=>a}),(0,$.def)(r,"$control_value",{get:()=>o})}let n=a(i,"click",async t=>{let r=t.composedPath()||[],a=e.selector.find(e=>e.$control_item===r.find(t=>e.$control_item===t));this.check(a),e.onSelect&&(o.innerHTML=await e.onSelect.call(this.art,a,a.$control_item,t))});r.push(n)}}r.default=I},{"../utils/component":"j4qZZ","./fullscreen":"7juzt","./fullscreenWeb":"dukaq","./pip":"lt0U6","./playAndPause":"eyIIx","./progress":"2S7vj","./time":"bgLbI","./volume":"lA6hu","./setting":"cH3Og","./screenshot":"gGGQI","./airplay":"4TMBv","../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],j4qZZ:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./dom"),n=e("./error"),s=e("option-validator"),l=o.interopDefault(s),c=e("../scheme");r.default=class{constructor(e){this.id=0,this.art=e,this.cache=new Map,this.add=this.add.bind(this),this.remove=this.remove.bind(this),this.update=this.update.bind(this)}get show(){return(0,i.hasClass)(this.art.template.$player,`art-${this.name}-show`)}set show(e){let{$player:t}=this.art.template,r=`art-${this.name}-show`;e?(0,i.addClass)(t,r):(0,i.removeClass)(t,r),this.art.emit(this.name,e)}toggle(){this.show=!this.show}add(e){let t="function"==typeof e?e(this.art):e;if(t.html=t.html||"",(0,l.default)(t,c.ComponentOption),!this.$parent||!this.name||t.disable)return;let r=t.name||`${this.name}${this.id}`,a=this.cache.get(r);(0,n.errorHandle)(!a,`Can't add an existing [${r}] to the [${this.name}]`),this.id+=1;let o=(0,i.createElement)("div");(0,i.addClass)(o,`art-${this.name}`),(0,i.addClass)(o,`art-${this.name}-${r}`);let s=Array.from(this.$parent.children);o.dataset.index=t.index||this.id;let p=s.find(e=>Number(e.dataset.index)>=Number(o.dataset.index));p?p.insertAdjacentElement("beforebegin",o):(0,i.append)(this.$parent,o),t.html&&(0,i.append)(o,t.html),t.style&&(0,i.setStyles)(o,t.style),t.tooltip&&(0,i.tooltip)(o,t.tooltip);let u=[];if(t.click){let e=this.art.events.proxy(o,"click",e=>{e.preventDefault(),t.click.call(this.art,this,e)});u.push(e)}return t.selector&&["left","right"].includes(t.position)&&this.selector(t,o,u),this[r]=o,this.cache.set(r,{$ref:o,events:u,option:t}),t.mounted&&t.mounted.call(this.art,o),o}remove(e){let t=this.cache.get(e);(0,n.errorHandle)(t,`Can't find [${e}] from the [${this.name}]`),t.option.beforeUnmount&&t.option.beforeUnmount.call(this.art,t.$ref);for(let e=0;e<t.events.length;e++)this.art.events.remove(t.events[e]);this.cache.delete(e),delete this[e],(0,i.remove)(t.$ref)}update(e){let t=this.cache.get(e.name);return t&&(e=Object.assign(t.option,e),this.remove(e.name)),this.add(e)}}},{"./dom":"jghk1","./error":"9OXL0","option-validator":"49gY0","../scheme":"bEi0U","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"7juzt":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>({...e,tooltip:t.i18n.get("Fullscreen"),mounted:e=>{let{proxy:r,icons:a,i18n:o}=t,n=(0,i.append)(e,a.fullscreenOn),s=(0,i.append)(e,a.fullscreenOff);(0,i.setStyle)(s,"display","none"),r(e,"click",()=>{t.fullscreen=!t.fullscreen}),t.on("fullscreen",t=>{t?((0,i.tooltip)(e,o.get("Exit Fullscreen")),(0,i.setStyle)(n,"display","none"),(0,i.setStyle)(s,"display","inline-flex")):((0,i.tooltip)(e,o.get("Fullscreen")),(0,i.setStyle)(n,"display","inline-flex"),(0,i.setStyle)(s,"display","none"))})}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],dukaq:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>({...e,tooltip:t.i18n.get("Web Fullscreen"),mounted:e=>{let{proxy:r,icons:a,i18n:o}=t,n=(0,i.append)(e,a.fullscreenWebOn),s=(0,i.append)(e,a.fullscreenWebOff);(0,i.setStyle)(s,"display","none"),r(e,"click",()=>{t.fullscreenWeb=!t.fullscreenWeb}),t.on("fullscreenWeb",t=>{t?((0,i.tooltip)(e,o.get("Exit Web Fullscreen")),(0,i.setStyle)(n,"display","none"),(0,i.setStyle)(s,"display","inline-flex")):((0,i.tooltip)(e,o.get("Web Fullscreen")),(0,i.setStyle)(n,"display","inline-flex"),(0,i.setStyle)(s,"display","none"))})}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],lt0U6:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>({...e,tooltip:t.i18n.get("PIP Mode"),mounted:e=>{let{proxy:r,icons:a,i18n:o}=t;(0,i.append)(e,a.pip),r(e,"click",()=>{t.pip=!t.pip}),t.on("pip",t=>{(0,i.tooltip)(e,o.get(t?"Exit PIP Mode":"PIP Mode"))})}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],eyIIx:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>({...e,mounted:e=>{let{proxy:r,icons:a,i18n:o}=t,n=(0,i.append)(e,a.play),s=(0,i.append)(e,a.pause);function l(){(0,i.setStyle)(n,"display","flex"),(0,i.setStyle)(s,"display","none")}function c(){(0,i.setStyle)(n,"display","none"),(0,i.setStyle)(s,"display","flex")}(0,i.tooltip)(n,o.get("Play")),(0,i.tooltip)(s,o.get("Pause")),r(n,"click",()=>{t.play()}),r(s,"click",()=>{t.pause()}),t.playing?c():l(),t.on("video:playing",()=>{c()}),t.on("video:pause",()=>{l()})}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"2S7vj":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"getPosFromEvent",()=>n),o.export(r,"setCurrentTime",()=>s),o.export(r,"default",()=>l);var i=e("../utils");function n(e,t){let{$progress:r}=e.template,{left:a}=(0,i.getRect)(r),o=i.isMobile?t.touches[0].clientX:t.clientX,n=(0,i.clamp)(o-a,0,r.clientWidth),s=n/r.clientWidth*e.duration,l=(0,i.secondToTime)(s),c=(0,i.clamp)(n/r.clientWidth,0,1);return{second:s,time:l,width:n,percentage:c}}function s(e,t){if(e.isRotate){let r=t.touches[0].clientY/e.height,a=r*e.duration;e.emit("setBar","played",r,t),e.seek=a}else{let{second:r,percentage:a}=n(e,t);e.emit("setBar","played",a,t),e.seek=r}}function l(e){return t=>{let{icons:r,option:a,proxy:o}=t;return{...e,html:`<div class="art-control-progress-inner"><div class="art-progress-hover"></div><div class="art-progress-loaded"></div><div class="art-progress-played"></div><div class="art-progress-highlight"></div><div class="art-progress-indicator"></div><div class="art-progress-tip"></div></div>`,mounted:e=>{let l=null,c=!1,p=(0,i.query)(".art-progress-hover",e),u=(0,i.query)(".art-progress-loaded",e),d=(0,i.query)(".art-progress-played",e),f=(0,i.query)(".art-progress-highlight",e),h=(0,i.query)(".art-progress-indicator",e),m=(0,i.query)(".art-progress-tip",e);function g(r,a){let{width:o,time:s}=a||n(t,r);m.innerText=s;let l=m.clientWidth;o<=l/2?(0,i.setStyle)(m,"left",0):o>e.clientWidth-l/2?(0,i.setStyle)(m,"left",`${e.clientWidth-l}px`):(0,i.setStyle)(m,"left",`${o-l/2}px`)}r.indicator?(0,i.append)(h,r.indicator):(0,i.setStyle)(h,"backgroundColor","var(--art-theme)"),t.on("setBar",function(r,a,o){let n="played"===r&&o&&i.isMobile;"loaded"===r&&(0,i.setStyle)(u,"width",`${100*a}%`),"hover"===r&&(0,i.setStyle)(p,"width",`${100*a}%`),"played"===r&&((0,i.setStyle)(d,"width",`${100*a}%`),(0,i.setStyle)(h,"left",`${100*a}%`)),n&&((0,i.setStyle)(m,"display","flex"),g(o,{width:e.clientWidth*a,time:(0,i.secondToTime)(a*t.duration)}),clearTimeout(l),l=setTimeout(()=>{(0,i.setStyle)(m,"display","none")},500))}),t.on("video:loadedmetadata",function(){f.innerText="";for(let e=0;e<a.highlight.length;e++){let r=a.highlight[e],o=(0,i.clamp)(r.time,0,t.duration)/t.duration*100,n=`<span data-text="${r.text}" data-time="${r.time}" style="left: ${o}%"></span>`;(0,i.append)(f,n)}}),t.constructor.USE_RAF?t.on("raf",()=>{t.emit("setBar","played",t.played),t.emit("setBar","loaded",t.loaded)}):(t.on("video:timeupdate",()=>{t.emit("setBar","played",t.played)}),t.on("video:progress",()=>{t.emit("setBar","loaded",t.loaded)}),t.on("video:ended",()=>{t.emit("setBar","played",1)})),t.emit("setBar","loaded",t.loaded||0),i.isMobile||(o(e,"click",e=>{e.target!==h&&s(t,e)}),o(e,"mousemove",r=>{let{percentage:a}=n(t,r);if(t.emit("setBar","hover",a,r),(0,i.setStyle)(m,"display","flex"),(0,i.includeFromEvent)(r,f)){let{width:a}=n(t,r),{text:o}=r.target.dataset;m.innerText=o;let s=m.clientWidth;a<=s/2?(0,i.setStyle)(m,"left",0):a>e.clientWidth-s/2?(0,i.setStyle)(m,"left",`${e.clientWidth-s}px`):(0,i.setStyle)(m,"left",`${a-s/2}px`)}else g(r)}),o(e,"mouseleave",e=>{(0,i.setStyle)(m,"display","none"),t.emit("setBar","hover",0,e)}),o(e,"mousedown",e=>{c=0===e.button}),t.on("document:mousemove",e=>{if(c){let{second:r,percentage:a}=n(t,e);t.emit("setBar","played",a,e),t.seek=r}}),t.on("document:mouseup",()=>{c&&(c=!1)}))}}}}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],bgLbI:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>({...e,style:i.isMobile?{fontSize:"12px",padding:"0 5px"}:{cursor:"auto",padding:"0 10px"},mounted:e=>{function r(){let r=`${(0,i.secondToTime)(t.currentTime)} / ${(0,i.secondToTime)(t.duration)}`;r!==e.innerText&&(e.innerText=r)}r();let a=["video:loadedmetadata","video:timeupdate","video:progress"];for(let e=0;e<a.length;e++)t.on(a[e],r)}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],lA6hu:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>({...e,mounted:e=>{let{proxy:r,icons:a}=t,o=(0,i.append)(e,a.volume),n=(0,i.append)(e,a.volumeClose),s=(0,i.append)(e,'<div class="art-volume-panel"></div>'),l=(0,i.append)(s,'<div class="art-volume-inner"></div>'),c=(0,i.append)(l,'<div class="art-volume-val"></div>'),p=(0,i.append)(l,'<div class="art-volume-slider"></div>'),u=(0,i.append)(p,'<div class="art-volume-handle"></div>'),d=(0,i.append)(u,'<div class="art-volume-loaded"></div>'),f=(0,i.append)(p,'<div class="art-volume-indicator"></div>');function h(e){let{top:t,height:r}=(0,i.getRect)(p);return 1-(e.clientY-t)/r}function m(){if(t.muted||0===t.volume)(0,i.setStyle)(o,"display","none"),(0,i.setStyle)(n,"display","flex"),(0,i.setStyle)(f,"top","100%"),(0,i.setStyle)(d,"top","100%"),c.innerText=0;else{let e=100*t.volume;(0,i.setStyle)(o,"display","flex"),(0,i.setStyle)(n,"display","none"),(0,i.setStyle)(f,"top",`${100-e}%`),(0,i.setStyle)(d,"top",`${100-e}%`),c.innerText=Math.floor(e)}}if(m(),t.on("video:volumechange",m),r(o,"click",()=>{t.muted=!0}),r(n,"click",()=>{t.muted=!1}),i.isMobile)(0,i.setStyle)(s,"display","none");else{let e=!1;r(p,"mousedown",r=>{e=0===r.button,t.volume=h(r)}),t.on("document:mousemove",r=>{e&&(t.muted=!1,t.volume=h(r))}),t.on("document:mouseup",()=>{e&&(e=!1)})}}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],cH3Og:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>({...e,tooltip:t.i18n.get("Show Setting"),mounted:e=>{let{proxy:r,icons:a,i18n:o}=t;(0,i.append)(e,a.setting),r(e,"click",()=>{t.setting.toggle(),t.setting.resize()}),t.on("setting",t=>{(0,i.tooltip)(e,o.get(t?"Hide Setting":"Show Setting"))})}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],gGGQI:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>({...e,tooltip:t.i18n.get("Screenshot"),mounted:e=>{let{proxy:r,icons:a}=t;(0,i.append)(e,a.screenshot),r(e,"click",()=>{t.screenshot()})}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"4TMBv":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>({...e,tooltip:t.i18n.get("AirPlay"),mounted:e=>{let{proxy:r,icons:a}=t;(0,i.append)(e,a.airplay),r(e,"click",()=>t.airplay())}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],iAXzm:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("../utils/component"),s=o.interopDefault(n),l=e("./playbackRate"),c=o.interopDefault(l),p=e("./aspectRatio"),u=o.interopDefault(p),d=e("./flip"),f=o.interopDefault(d),h=e("./info"),m=o.interopDefault(h),g=e("./version"),v=o.interopDefault(g),y=e("./close"),b=o.interopDefault(y);class x extends s.default{constructor(e){super(e),this.name="contextmenu",this.$parent=e.template.$contextmenu,i.isMobile||this.init()}init(){let{option:e,proxy:t,template:{$player:r,$contextmenu:a}}=this.art;e.playbackRate&&this.add((0,c.default)({name:"playbackRate",index:10})),e.aspectRatio&&this.add((0,u.default)({name:"aspectRatio",index:20})),e.flip&&this.add((0,f.default)({name:"flip",index:30})),this.add((0,m.default)({name:"info",index:40})),this.add((0,v.default)({name:"version",index:50})),this.add((0,b.default)({name:"close",index:60}));for(let t=0;t<e.contextmenu.length;t++)this.add(e.contextmenu[t]);t(r,"contextmenu",e=>{if(!this.art.constructor.CONTEXTMENU)return;e.preventDefault(),this.show=!0;let t=e.clientX,o=e.clientY,{height:n,width:s,left:l,top:c}=(0,i.getRect)(r),{height:p,width:u}=(0,i.getRect)(a),d=t-l,f=o-c;t+u>l+s&&(d=s-u),o+p>c+n&&(f=n-p),(0,i.setStyles)(a,{top:`${f}px`,left:`${d}px`})}),t(r,"click",e=>{(0,i.includeFromEvent)(e,a)||(this.show=!1)}),this.art.on("blur",()=>{this.show=!1})}}r.default=x},{"../utils":"gpvEP","../utils/component":"j4qZZ","./playbackRate":"9jior","./aspectRatio":"igCMy","./flip":"4eLts","./info":"kETiY","./version":"abcPF","./close":"aWF54","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"9jior":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>{let{i18n:r,constructor:{PLAYBACK_RATE:a}}=t,o=a.map(e=>`<span data-value="${e}">${1===e?r.get("Normal"):e.toFixed(1)}</span>`).join("");return{...e,html:`${r.get("Play Speed")}: ${o}`,click:(e,r)=>{let{value:a}=r.target.dataset;a&&(t.playbackRate=Number(a),e.show=!1)},mounted:e=>{let r=(0,i.query)('[data-value="1"]',e);r&&(0,i.inverseClass)(r,"art-current"),t.on("video:ratechange",()=>{let r=(0,i.queryAll)("span",e).find(e=>Number(e.dataset.value)===t.playbackRate);r&&(0,i.inverseClass)(r,"art-current")})}}}}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],igCMy:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>{let{i18n:r,constructor:{ASPECT_RATIO:a}}=t,o=a.map(e=>`<span data-value="${e}">${"default"===e?r.get("Default"):e}</span>`).join("");return{...e,html:`${r.get("Aspect Ratio")}: ${o}`,click:(e,r)=>{let{value:a}=r.target.dataset;a&&(t.aspectRatio=a,e.show=!1)},mounted:e=>{let r=(0,i.query)('[data-value="default"]',e);r&&(0,i.inverseClass)(r,"art-current"),t.on("aspectRatio",t=>{let r=(0,i.queryAll)("span",e).find(e=>e.dataset.value===t);r&&(0,i.inverseClass)(r,"art-current")})}}}}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"4eLts":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return t=>{let{i18n:r,constructor:{FLIP:a}}=t,o=a.map(e=>`<span data-value="${e}">${r.get((0,i.capitalize)(e))}</span>`).join("");return{...e,html:`${r.get("Video Flip")}: ${o}`,click:(e,r)=>{let{value:a}=r.target.dataset;a&&(t.flip=a.toLowerCase(),e.show=!1)},mounted:e=>{let r=(0,i.query)('[data-value="normal"]',e);r&&(0,i.inverseClass)(r,"art-current"),t.on("flip",t=>{let r=(0,i.queryAll)("span",e).find(e=>e.dataset.value===t);r&&(0,i.inverseClass)(r,"art-current")})}}}}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],kETiY:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){return t=>({...e,html:t.i18n.get("Video Info"),click:e=>{t.info.show=!0,e.show=!1}})}o.defineInteropFlag(r),o.export(r,"default",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],abcPF:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>function(e){return{...e,html:`<a href="https://artplayer.org" target="_blank">ArtPlayer ${i.version}</a>`}});var i=e("../../package.json")},{"../../package.json":"aQnLI","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],aWF54:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){return t=>({...e,html:t.i18n.get("Close"),click:e=>{e.show=!1}})}o.defineInteropFlag(r),o.export(r,"default",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],bFUCG:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./utils"),n=e("./utils/component"),s=o.interopDefault(n);class l extends s.default{constructor(e){super(e),this.name="info",i.isMobile||this.init()}init(){let{proxy:e,constructor:t,template:{$infoPanel:r,$infoClose:a,$video:o}}=this.art;e(a,"click",()=>{this.show=!1});let n=null,s=(0,i.queryAll)("[data-video]",r)||[];this.art.on("destroy",()=>clearTimeout(n)),!function e(){for(let e=0;e<s.length;e++){let t=s[e],r=o[t.dataset.video],a="number"==typeof r?r.toFixed(2):r;t.innerText!==a&&(t.innerText=a)}n=setTimeout(e,t.INFO_LOOP_TIME)}()}}r.default=l},{"./utils":"gpvEP","./utils/component":"j4qZZ","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],lEARb:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./utils"),n=e("./utils/component"),s=o.interopDefault(n),l=e("option-validator"),c=o.interopDefault(l),p=e("./scheme"),u=o.interopDefault(p);class d extends s.default{constructor(e){super(e),this.name="subtitle",this.option=null,this.destroyEvent=()=>null,this.init(e.option.subtitle);let t=!1;e.on("video:timeupdate",()=>{if(!this.url)return;let e=this.art.template.$video.webkitDisplayingFullscreen;"boolean"==typeof e&&e!==t&&(t=e,this.createTrack(e?"subtitles":"metadata",this.url))})}get url(){return this.art.template.$track.src}set url(e){this.switch(e)}get textTrack(){return this.art.template.$video?.textTracks?.[0]}get activeCues(){return this.textTrack?Array.from(this.textTrack.activeCues):[]}get cues(){return this.textTrack?Array.from(this.textTrack.cues):[]}style(e,t){let{$subtitle:r}=this.art.template;return"object"==typeof e?(0,i.setStyles)(r,e):(0,i.setStyle)(r,e,t)}update(){let{option:{subtitle:e},template:{$subtitle:t}}=this.art;t.innerHTML="",this.activeCues.length&&(this.art.emit("subtitleBeforeUpdate",this.activeCues),t.innerHTML=this.activeCues.map((t,r)=>t.text.split(/\r?\n/).filter(e=>e.trim()).map(t=>`<div class="art-subtitle-line" data-group="${r}">${e.escape?(0,i.escape)(t):t}</div>`).join("")).join(""),this.art.emit("subtitleAfterUpdate",this.activeCues))}async switch(e,t={}){let{i18n:r,notice:a,option:o}=this.art,i={...o.subtitle,...t,url:e},n=await this.init(i);return t.name&&(a.show=`${r.get("Switch Subtitle")}: ${t.name}`),n}createTrack(e,t){let{template:r,proxy:a,option:o}=this.art,{$video:n,$track:s}=r,l=(0,i.createElement)("track");l.default=!0,l.kind=e,l.src=t,l.label=o.subtitle.name||"Artplayer",l.track.mode="hidden",l.onload=()=>{this.art.emit("subtitleLoad",this.cues,this.option)},this.art.events.remove(this.destroyEvent),s.onload=null,(0,i.remove)(s),(0,i.append)(n,l),r.$track=l,this.destroyEvent=a(this.textTrack,"cuechange",()=>this.update())}async init(e){let{notice:t,template:{$subtitle:r}}=this.art;return this.textTrack?((0,c.default)(e,u.default.subtitle),e.url)?(this.option=e,this.style(e.style),fetch(e.url).then(e=>e.arrayBuffer()).then(t=>{let r=new TextDecoder(e.encoding).decode(t);switch(e.type||(0,i.getExt)(e.url)){case"srt":{let t=(0,i.srtToVtt)(r),a=e.onVttLoad(t);return(0,i.vttToBlob)(a)}case"ass":{let t=(0,i.assToVtt)(r),a=e.onVttLoad(t);return(0,i.vttToBlob)(a)}case"vtt":{let t=e.onVttLoad(r);return(0,i.vttToBlob)(t)}default:return e.url}}).then(e=>(r.innerHTML="",this.url===e||(URL.revokeObjectURL(this.url),this.createTrack("metadata",e)),e)).catch(e=>{throw r.innerHTML="",t.show=e,e})):void 0:null}}r.default=d},{"./utils":"gpvEP","./utils/component":"j4qZZ","option-validator":"49gY0","./scheme":"bEi0U","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],fpHt3:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./clickInit"),n=o.interopDefault(i),s=e("./hoverInit"),l=o.interopDefault(s),c=e("./moveInit"),p=o.interopDefault(c),u=e("./resizeInit"),d=o.interopDefault(u),f=e("./gestureInit"),h=o.interopDefault(f),m=e("./viewInit"),g=o.interopDefault(m),v=e("./documentInit"),y=o.interopDefault(v),b=e("./updateInit"),x=o.interopDefault(b),w=e("./restoreInit"),j=o.interopDefault(w);r.default=class{constructor(e){this.destroyEvents=[],this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),(0,n.default)(e,this),(0,l.default)(e,this),(0,p.default)(e,this),(0,d.default)(e,this),(0,h.default)(e,this),(0,g.default)(e,this),(0,y.default)(e,this),(0,x.default)(e,this),(0,j.default)(e,this)}proxy(e,t,r,a={}){if(Array.isArray(t))return t.map(t=>this.proxy(e,t,r,a));e.addEventListener(t,r,a);let o=()=>e.removeEventListener(t,r,a);return this.destroyEvents.push(o),o}hover(e,t,r){t&&this.proxy(e,"mouseenter",t),r&&this.proxy(e,"mouseleave",r)}remove(e){let t=this.destroyEvents.indexOf(e);t>-1&&(e(),this.destroyEvents.splice(t,1))}destroy(){for(let e=0;e<this.destroyEvents.length;e++)this.destroyEvents[e]()}}},{"./clickInit":"iJ3NQ","./hoverInit":"8qahy","./moveInit":"5Eivu","./resizeInit":"905Dr","./gestureInit":"8F0uv","./viewInit":"26qSX","./documentInit":"9wES9","./updateInit":"cY9iQ","./restoreInit":"3YYY5","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],iJ3NQ:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e,t){let{constructor:r,template:{$player:a,$video:o}}=e;t.proxy(document,["click","contextmenu"],t=>{(0,i.includeFromEvent)(t,a)?(e.isInput="INPUT"===t.target.tagName,e.isFocus=!0,e.emit("focus",t)):(e.isInput=!1,e.isFocus=!1,e.emit("blur",t))});let n=[];t.proxy(o,"click",t=>{let a=Date.now();n.push(a);let{MOBILE_CLICK_PLAY:o,DBCLICK_TIME:s,MOBILE_DBCLICK_PLAY:l,DBCLICK_FULLSCREEN:c}=r,p=n.filter(e=>a-e<=s);switch(p.length){case 1:e.emit("click",t),i.isMobile?!e.isLock&&o&&e.toggle():e.toggle(),n=p;break;case 2:e.emit("dblclick",t),i.isMobile?!e.isLock&&l&&e.toggle():c&&(e.fullscreen=!e.fullscreen),n=[];break;default:n=[]}})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"8qahy":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e,t){let{$player:r}=e.template;t.hover(r,t=>{(0,i.addClass)(r,"art-hover"),e.emit("hover",!0,t)},t=>{(0,i.removeClass)(r,"art-hover"),e.emit("hover",!1,t)})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"5Eivu":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,t){let{$player:r}=e.template;t.proxy(r,"mousemove",t=>{e.emit("mousemove",t)})}o.defineInteropFlag(r),o.export(r,"default",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"905Dr":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e,t){let{option:r,constructor:a}=e;e.on("resize",()=>{let{aspectRatio:t,notice:a}=e;"standard"===e.state&&r.autoSize&&e.autoSize(),e.aspectRatio=t,a.show=""});let o=(0,i.debounce)(()=>e.emit("resize"),a.RESIZE_TIME);t.proxy(window,["orientationchange","resize"],()=>o()),screen&&screen.orientation&&screen.orientation.onchange&&t.proxy(screen.orientation,"change",()=>o())}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"8F0uv":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>s);var i=e("../utils"),n=e("../control/progress");function s(e,t){if(i.isMobile&&!e.option.isLive){let{$video:r,$progress:a}=e.template,o=null,s=!1,l=0,c=0,p=0,u=t=>{if(1===t.touches.length&&!e.isLock){o===a&&(0,n.setCurrentTime)(e,t),s=!0;let{pageX:r,pageY:i}=t.touches[0];l=r,c=i,p=e.currentTime}},d=t=>{if(1===t.touches.length&&s&&e.duration){let{pageX:a,pageY:n}=t.touches[0],s=function(e,t,r,a){var o=t-a,i=r-e,n=0;if(2>Math.abs(i)&&2>Math.abs(o))return n;var s=180*Math.atan2(o,i)/Math.PI;return s>=-45&&s<45?n=4:s>=45&&s<135?n=1:s>=-135&&s<-45?n=2:(s>=135&&s<=180||s>=-180&&s<-135)&&(n=3),n}(l,c,a,n),u=[3,4].includes(s),d=[1,2].includes(s);if(u&&!e.isRotate||d&&e.isRotate){let s=(0,i.clamp)((a-l)/e.width,-1,1),u=(0,i.clamp)((n-c)/e.height,-1,1),d=e.isRotate?u:s,f=o===r?e.constructor.TOUCH_MOVE_RATIO:1,h=(0,i.clamp)(p+e.duration*d*f,0,e.duration);e.seek=h,e.emit("setBar","played",(0,i.clamp)(h/e.duration,0,1),t),e.notice.show=`${(0,i.secondToTime)(h)} / ${(0,i.secondToTime)(e.duration)}`}}};e.option.gesture&&(t.proxy(r,"touchstart",e=>{o=r,u(e)}),t.proxy(r,"touchmove",d)),t.proxy(a,"touchstart",e=>{o=a,u(e)}),t.proxy(a,"touchmove",d),t.proxy(document,"touchend",()=>{s&&(l=0,c=0,p=0,s=!1,o=null)})}}},{"../utils":"gpvEP","../control/progress":"2S7vj","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"26qSX":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e,t){let{option:r,constructor:a,template:{$container:o}}=e,n=(0,i.throttle)(()=>{e.emit("view",(0,i.isInViewport)(o,a.SCROLL_GAP))},a.SCROLL_TIME);t.proxy(window,"scroll",()=>n()),e.on("view",t=>{r.autoMini&&(e.mini=!t)})}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"9wES9":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,t){t.proxy(document,"mousemove",t=>{e.emit("document:mousemove",t)}),t.proxy(document,"mouseup",t=>{e.emit("document:mouseup",t)})}o.defineInteropFlag(r),o.export(r,"default",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],cY9iQ:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){if(e.constructor.USE_RAF){let t=null;!function r(){e.playing&&e.emit("raf"),e.isDestroy||(t=requestAnimationFrame(r))}(),e.on("destroy",()=>{cancelAnimationFrame(t)})}}o.defineInteropFlag(r),o.export(r,"default",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"3YYY5":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e,t){}o.defineInteropFlag(r),o.export(r,"default",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"9z96t":[function(e,t,r,a){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("./utils");r.default=class{constructor(e){this.art=e,this.keys={},e.option.hotkey&&!o.isMobile&&this.init()}init(){let{proxy:e,constructor:t}=this.art;this.add("Escape",()=>{this.art.fullscreenWeb&&(this.art.fullscreenWeb=!1)}),this.add("Space",()=>{this.art.toggle()}),this.add("ArrowLeft",()=>{this.art.backward=t.SEEK_STEP}),this.add("ArrowUp",()=>{this.art.volume+=t.VOLUME_STEP}),this.add("ArrowRight",()=>{this.art.forward=t.SEEK_STEP}),this.add("ArrowDown",()=>{this.art.volume-=t.VOLUME_STEP}),e(document,"keydown",e=>{if(this.art.isFocus){let t=document.activeElement.tagName.toUpperCase(),r=document.activeElement.getAttribute("contenteditable");if("INPUT"!==t&&"TEXTAREA"!==t&&""!==r&&"true"!==r&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey){let t=this.keys[e.code];if(t){e.preventDefault();for(let r=0;r<t.length;r++)t[r].call(this.art,e);this.art.emit("hotkey",e)}}}this.art.emit("keydown",e)})}add(e,t){return this.keys[e]?this.keys[e].push(t):this.keys[e]=[t],this}remove(e,t){if(this.keys[e]){let r=this.keys[e].indexOf(t);-1!==r&&this.keys[e].splice(r,1)}return this}}},{"./utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],e9ahx:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./utils/component"),n=o.interopDefault(i);class s extends n.default{constructor(e){super(e);let{option:t,template:{$layer:r}}=e;this.name="layer",this.$parent=r;for(let e=0;e<t.layers.length;e++)this.add(t.layers[e])}}r.default=s},{"./utils/component":"j4qZZ","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],hlSVU:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./utils"),n=e("./utils/component"),s=o.interopDefault(n);class l extends s.default{constructor(e){super(e),this.name="loading",(0,i.append)(e.template.$loading,e.icons.loading)}}r.default=l},{"./utils":"gpvEP","./utils/component":"j4qZZ","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],eDyfI:[function(e,t,r,a){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=e("./utils");r.default=class{constructor(e){this.art=e,this.timer=null}set show(e){let{constructor:t,template:{$player:r,$noticeInner:a}}=this.art;e?(a.innerText=e instanceof Error?e.message.trim():e,(0,o.addClass)(r,"art-notice-show"),clearTimeout(this.timer),this.timer=setTimeout(()=>{a.innerText="",(0,o.removeClass)(r,"art-notice-show")},t.NOTICE_TIME)):(0,o.removeClass)(r,"art-notice-show")}}},{"./utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],uwUok:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./utils"),n=e("./utils/component"),s=o.interopDefault(n);class l extends s.default{constructor(e){super(e),this.name="mask";let{template:t,icons:r,events:a}=e,o=(0,i.append)(t.$state,r.state),n=(0,i.append)(t.$state,r.error);(0,i.setStyle)(n,"display","none"),e.on("destroy",()=>{(0,i.setStyle)(o,"display","none"),(0,i.setStyle)(n,"display",null)}),a.proxy(t.$state,"click",()=>e.play())}}r.default=l},{"./utils":"gpvEP","./utils/component":"j4qZZ","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"1F2QO":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("bundle-text:./loading.svg"),s=o.interopDefault(n),l=e("bundle-text:./state.svg"),c=o.interopDefault(l),p=e("bundle-text:./check.svg"),u=o.interopDefault(p),d=e("bundle-text:./play.svg"),f=o.interopDefault(d),h=e("bundle-text:./pause.svg"),m=o.interopDefault(h),g=e("bundle-text:./volume.svg"),v=o.interopDefault(g),y=e("bundle-text:./volume-close.svg"),b=o.interopDefault(y),x=e("bundle-text:./screenshot.svg"),w=o.interopDefault(x),j=e("bundle-text:./setting.svg"),k=o.interopDefault(j),S=e("bundle-text:./arrow-left.svg"),E=o.interopDefault(S),z=e("bundle-text:./arrow-right.svg"),$=o.interopDefault(z),I=e("bundle-text:./playback-rate.svg"),T=o.interopDefault(I),M=e("bundle-text:./aspect-ratio.svg"),F=o.interopDefault(M),P=e("bundle-text:./config.svg"),C=o.interopDefault(P),D=e("bundle-text:./pip.svg"),A=o.interopDefault(D),R=e("bundle-text:./lock.svg"),L=o.interopDefault(R),O=e("bundle-text:./unlock.svg"),q=o.interopDefault(O),_=e("bundle-text:./fullscreen-off.svg"),H=o.interopDefault(_),V=e("bundle-text:./fullscreen-on.svg"),N=o.interopDefault(V),B=e("bundle-text:./fullscreen-web-off.svg"),U=o.interopDefault(B),Y=e("bundle-text:./fullscreen-web-on.svg"),W=o.interopDefault(Y),K=e("bundle-text:./switch-on.svg"),Q=o.interopDefault(K),X=e("bundle-text:./switch-off.svg"),Z=o.interopDefault(X),G=e("bundle-text:./flip.svg"),J=o.interopDefault(G),ee=e("bundle-text:./error.svg"),et=o.interopDefault(ee),er=e("bundle-text:./close.svg"),ea=o.interopDefault(er),eo=e("bundle-text:./airplay.svg"),ei=o.interopDefault(eo);r.default=class{constructor(e){let t={loading:s.default,state:c.default,play:f.default,pause:m.default,check:u.default,volume:v.default,volumeClose:b.default,screenshot:w.default,setting:k.default,pip:A.default,arrowLeft:E.default,arrowRight:$.default,playbackRate:T.default,aspectRatio:F.default,config:C.default,lock:L.default,flip:J.default,unlock:q.default,fullscreenOff:H.default,fullscreenOn:N.default,fullscreenWebOff:U.default,fullscreenWebOn:W.default,switchOn:Q.default,switchOff:Z.default,error:et.default,close:ea.default,airplay:ei.default,...e.option.icons};for(let e in t)(0,i.def)(this,e,{get:()=>(0,i.getIcon)(e,t[e])})}}},{"../utils":"gpvEP","bundle-text:./loading.svg":"OH22M","bundle-text:./state.svg":"exeDr","bundle-text:./check.svg":"jDV5m","bundle-text:./play.svg":"8azN4","bundle-text:./pause.svg":"5ROTD","bundle-text:./volume.svg":"gd6yR","bundle-text:./volume-close.svg":"3xcqi","bundle-text:./screenshot.svg":"4bQmt","bundle-text:./setting.svg":"8JYeE","bundle-text:./arrow-left.svg":"1vtAE","bundle-text:./arrow-right.svg":"89K7J","bundle-text:./playback-rate.svg":"aboDI","bundle-text:./aspect-ratio.svg":"iXCLk","bundle-text:./config.svg":"f8v0I","bundle-text:./pip.svg":"5TDKn","bundle-text:./lock.svg":"7ioy7","bundle-text:./unlock.svg":"8M4rv","bundle-text:./fullscreen-off.svg":"iY4Nz","bundle-text:./fullscreen-on.svg":"8DF0G","bundle-text:./fullscreen-web-off.svg":"64eDf","bundle-text:./fullscreen-web-on.svg":"gxLKk","bundle-text:./switch-on.svg":"1a3p7","bundle-text:./switch-off.svg":"ioXaN","bundle-text:./flip.svg":"ghEK8","bundle-text:./error.svg":"3iobs","bundle-text:./close.svg":"dhbAn","bundle-text:./airplay.svg":"hbZQA","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],OH22M:[function(e,t,r,a){t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" class="uil-default" preserveAspectRatio="xMidYMid" viewBox="0 0 100 100"><path fill="none" d="M0 0h100v100H0z" class="bk"/><rect width="6" height="20" x="47" y="40" fill="#fff" rx="5" ry="5" transform="translate(0 -30)"><animate attributeName="opacity" begin="-1s" dur="1s" from="1" repeatCount="indefinite" to="0"/></rect><rect width="6" height="20" x="47" y="40" fill="#fff" rx="5" ry="5" transform="rotate(30 105.98 65)"><animate attributeName="opacity" begin="-0.9166666666666666s" dur="1s" from="1" repeatCount="indefinite" to="0"/></rect><rect width="6" height="20" x="47" y="40" fill="#fff" rx="5" ry="5" transform="rotate(60 75.98 65)"><animate attributeName="opacity" begin="-0.8333333333333334s" dur="1s" from="1" repeatCount="indefinite" to="0"/></rect><rect width="6" height="20" x="47" y="40" fill="#fff" rx="5" ry="5" transform="rotate(90 65 65)"><animate attributeName="opacity" begin="-0.75s" dur="1s" from="1" repeatCount="indefinite" to="0"/></rect><rect width="6" height="20" x="47" y="40" fill="#fff" rx="5" ry="5" transform="rotate(120 58.66 65)"><animate attributeName="opacity" begin="-0.6666666666666666s" dur="1s" from="1" repeatCount="indefinite" to="0"/></rect><rect width="6" height="20" x="47" y="40" fill="#fff" rx="5" ry="5" transform="rotate(150 54.02 65)"><animate attributeName="opacity" begin="-0.5833333333333334s" dur="1s" from="1" repeatCount="indefinite" to="0"/></rect><rect width="6" height="20" x="47" y="40" fill="#fff" rx="5" ry="5" transform="rotate(180 50 65)"><animate attributeName="opacity" begin="-0.5s" dur="1s" from="1" repeatCount="indefinite" to="0"/></rect><rect width="6" height="20" x="47" y="40" fill="#fff" rx="5" ry="5" transform="rotate(-150 45.98 65)"><animate attributeName="opacity" begin="-0.4166666666666667s" dur="1s" from="1" repeatCount="indefinite" to="0"/></rect><rect width="6" height="20" x="47" y="40" fill="#fff" rx="5" ry="5" transform="rotate(-120 41.34 65)"><animate attributeName="opacity" begin="-0.3333333333333333s" dur="1s" from="1" repeatCount="indefinite" to="0"/></rect><rect width="6" height="20" x="47" y="40" fill="#fff" rx="5" ry="5" transform="rotate(-90 35 65)"><animate attributeName="opacity" begin="-0.25s" dur="1s" from="1" repeatCount="indefinite" to="0"/></rect><rect width="6" height="20" x="47" y="40" fill="#fff" rx="5" ry="5" transform="rotate(-60 24.02 65)"><animate attributeName="opacity" begin="-0.16666666666666666s" dur="1s" from="1" repeatCount="indefinite" to="0"/></rect><rect width="6" height="20" x="47" y="40" fill="#fff" rx="5" ry="5" transform="rotate(-30 -5.98 65)"><animate attributeName="opacity" begin="-0.08333333333333333s" dur="1s" from="1" repeatCount="indefinite" to="0"/></rect></svg>'},{}],exeDr:[function(e,t,r,a){t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 24 24"><path fill="#fff" d="M9.5 9.325v5.35q0 .575.525.875t1.025-.05l4.15-2.65q.475-.3.475-.85t-.475-.85L11.05 8.5q-.5-.35-1.025-.05t-.525.875M12 22q-2.075 0-3.9-.788t-3.175-2.137q-1.35-1.35-2.137-3.175T2 12t.788-3.9 2.137-3.175q1.35-1.35 3.175-2.137T12 2t3.9.788 3.175 2.137q1.35 1.35 2.138 3.175T22 12q0 2.075-.788 3.9t-2.137 3.175q-1.35 1.35-3.175 2.138T12 22"/></svg>'},{}],jDV5m:[function(e,t,r,a){t.exports='<svg xmlns="http://www.w3.org/2000/svg" style="width:100%;height:100%" viewBox="0 0 24 24"><path fill="#fff" d="M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"/></svg>'},{}],"8azN4":[function(e,t,r,a){t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22"><path d="M17.982 9.275 8.06 3.27A2.013 2.013 0 0 0 5 4.994v12.011a2.017 2.017 0 0 0 3.06 1.725l9.922-6.005a2.017 2.017 0 0 0 0-3.45"/></svg>'},{}],"5ROTD":[function(e,t,r,a){t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22"><path d="M7 3a2 2 0 0 0-2 2v12a2 2 0 1 0 4 0V5a2 2 0 0 0-2-2m8 0a2 2 0 0 0-2 2v12a2 2 0 1 0 4 0V5a2 2 0 0 0-2-2"/></svg>'},{}],gd6yR:[function(e,t,r,a){t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22"><path d="M10.188 4.65 6 8H5a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h1l4.188 3.35a.5.5 0 0 0 .812-.39V5.04a.498.498 0 0 0-.812-.39m4.258-.872a1 1 0 0 0-.862 1.804 6.002 6.002 0 0 1-.007 10.838 1 1 0 0 0 .86 1.806A8 8 0 0 0 19 11a8 8 0 0 0-4.554-7.222"/><path d="M15 11a4 4 0 0 0-2-3.465v6.93A4 4 0 0 0 15 11"/></svg>'},{}],"3xcqi":[function(e,t,r,a){t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22"><path d="M15 11a4 4 0 0 0-2-3.465v2.636l1.865 1.865A4 4 0 0 0 15 11"/><path d="M13.583 5.583A6 6 0 0 1 17 11a6 6 0 0 1-.585 2.587l1.477 1.477a8 8 0 0 0-3.446-11.286 1 1 0 0 0-.863 1.805m5.195 13.195-2.121-2.121-1.414-1.414-1.415-1.415L13 13l-2-2-3.889-3.889-3.889-3.889a.999.999 0 1 0-1.414 1.414L5.172 8H5a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h1l4.188 3.35a.5.5 0 0 0 .812-.39v-3.131l2.587 2.587-.01.005a1 1 0 0 0 .86 1.806q.322-.154.627-.333l2.3 2.3a1.001 1.001 0 0 0 1.414-1.416M11 5.04a.5.5 0 0 0-.813-.39L8.682 5.854 11 8.172z"/></svg>'},{}],"4bQmt":[function(e,t,r,a){t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 50 50"><path d="M19.402 6a5 5 0 0 0-4.902 4.012L14.098 12H9a5 5 0 0 0-5 5v21a5 5 0 0 0 5 5h32a5 5 0 0 0 5-5V17a5 5 0 0 0-5-5h-5.098l-.402-1.988A5 5 0 0 0 30.598 6ZM25 17c5.52 0 10 4.48 10 10s-4.48 10-10 10-10-4.48-10-10 4.48-10 10-10m0 2c-4.41 0-8 3.59-8 8s3.59 8 8 8 8-3.59 8-8-3.59-8-8-8"/></svg>'},{}],"8JYeE":[function(e,t,r,a){t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22"><circle cx="11" cy="11" r="2"/><path d="M19.164 8.861 17.6 8.6a7 7 0 0 0-1.186-2.099l.574-1.533a1 1 0 0 0-.436-1.217l-1.997-1.153a1 1 0 0 0-1.272.23l-1.008 1.225a7 7 0 0 0-2.55.001L8.716 2.829a1 1 0 0 0-1.272-.23L5.447 3.751a1 1 0 0 0-.436 1.217l.574 1.533A7 7 0 0 0 4.4 8.6l-1.564.261A1 1 0 0 0 2 9.847v2.306c0 .489.353.906.836.986l1.613.269a7 7 0 0 0 1.228 2.075l-.558 1.487a1 1 0 0 0 .436 1.217l1.997 1.153c.423.244.961.147 1.272-.23l1.04-1.263a7.1 7.1 0 0 0 2.272 0l1.04 1.263a1 1 0 0 0 1.272.23l1.997-1.153a1 1 0 0 0 .436-1.217l-.557-1.487c.521-.61.94-1.31 1.228-2.075l1.613-.269a1 1 0 0 0 .835-.986V9.847a1 1 0 0 0-.836-.986M11 15a4 4 0 1 1 0-8 4 4 0 0 1 0 8"/></svg>'},{}],"1vtAE":[function(e,t,r,a){t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32"><path fill="#fff" d="m19.41 20.09-4.58-4.59 4.58-4.59L18 9.5l-6 6 6 6z"/></svg>'},{}],"89K7J":[function(e,t,r,a){t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32"><path fill="#fff" d="m12.59 20.34 4.58-4.59-4.58-4.59L14 9.75l6 6-6 6z"/></svg>'},{}],aboDI:[function(e,t,r,a){t.exports='<svg width="24" height="24"><path fill="#fff" d="M10 8v8l6-4zM6.3 5l-.6-.8C7.2 3 9 2.2 11 2l.1 1c-1.8.2-3.4.9-4.8 2M5 6.3l-.8-.6C3 7.2 2.2 9 2 11l1 .1c.2-1.8.9-3.4 2-4.8m0 11.4c-1.1-1.4-1.8-3.1-2-4.8L2 13c.2 2 1 3.8 2.2 5.4zm6.1 3.3c-1.8-.2-3.4-.9-4.8-2l-.6.8C7.2 21 9 21.8 11 22zM22 12c0-5.2-3.9-9.4-9-10l-.1 1c4.6.5 8.1 4.3 8.1 9s-3.5 8.5-8.1 9l.1 1c5.2-.5 9-4.8 9-10" style="--darkreader-inline-fill:#a8a6a4"/></svg>'},{}],iXCLk:[function(e,t,r,a){t.exports='<svg xmlns="http://www.w3.org/2000/svg" style="width:100%;height:100%;transform:translate(0,0)" viewBox="0 0 88 88"><defs><clipPath id="__lottie_element_216"><path d="M0 0h88v88H0z"/></clipPath></defs><g clip-path="url(\'#__lottie_element_216\')" style="display:block"><path fill="#FFF" d="m12.438-12.702-2.82 2.82c-.79.79-.79 2.05 0 2.83l7.07 7.07-7.07 7.07c-.79.79-.79 2.05 0 2.83l2.82 2.83c.79.78 2.05.78 2.83 0l11.32-11.31c.78-.78.78-2.05 0-2.83l-11.32-11.31c-.78-.79-2.04-.79-2.83 0m-24.88 0c-.74-.74-1.92-.78-2.7-.12l-.13.12-11.31 11.31a2 2 0 0 0-.12 2.7l.12.13 11.31 11.31a2 2 0 0 0 2.7.12l.13-.12 2.83-2.83c.74-.74.78-1.91.11-2.7l-.11-.13-7.07-7.07 7.07-7.07c.74-.74.78-1.91.11-2.7l-.11-.13zM28-28c4.42 0 8 3.58 8 8v40c0 4.42-3.58 8-8 8h-56c-4.42 0-8-3.58-8-8v-40c0-4.42 3.58-8 8-8z" style="--darkreader-inline-fill:#a8a6a4" transform="translate(44 44)"/></g></svg>'},{}],f8v0I:[function(e,t,r,a){t.exports='<svg width="24" height="24"><path fill="#fff" d="M15 17h6v1h-6zm-4 0H3v1h8v2h1v-5h-1zm3-9h1V3h-1v2H3v1h11zm4-3v1h3V5zM6 14h1V9H6v2H3v1h3zm4-2h11v-1H10z" style="--darkreader-inline-fill:#a8a6a4"/></svg>'},{}],"5TDKn":[function(e,t,r,a){t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 36 36"><path d="M25 17h-8v6h8zm4 8V10.98C29 9.88 28.1 9 27 9H9c-1.1 0-2 .88-2 1.98V25c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2m-2 .02H9V10.97h18z"/></svg>'},{}],"7ioy7":[function(e,t,r,a){t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" class="icon" viewBox="0 0 1024 1024"><path fill="#fff" d="M298.667 426.667v-85.334a213.333 213.333 0 1 1 426.666 0v85.334H768A85.333 85.333 0 0 1 853.333 512v256A85.333 85.333 0 0 1 768 853.333H256A85.333 85.333 0 0 1 170.667 768V512A85.333 85.333 0 0 1 256 426.667zM512 213.333a128 128 0 0 0-128 128v85.334h256v-85.334a128 128 0 0 0-128-128"/></svg>'},{}],"8M4rv":[function(e,t,r,a){t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" class="icon" viewBox="0 0 1024 1024"><path fill="#fff" d="m666.752 194.517-49.365 74.112A128 128 0 0 0 384 341.333l.043 85.334h384A85.333 85.333 0 0 1 853.376 512v256a85.333 85.333 0 0 1-85.333 85.333H256A85.333 85.333 0 0 1 170.667 768V512A85.333 85.333 0 0 1 256 426.667h42.667v-85.334a213.333 213.333 0 0 1 368.085-146.816"/></svg>'},{}],iY4Nz:[function(e,t,r,a){t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" class="icon" viewBox="0 0 1024 1024"><path fill="#fff" d="M768 298.667h170.667V384h-256V128H768zM341.333 384h-256v-85.333H256V128h85.333zM768 725.333V896h-85.333V640h256v85.333zM341.333 640v256H256V725.333H85.333V640z"/></svg>'},{}],"8DF0G":[function(e,t,r,a){t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" class="icon" viewBox="0 0 1024 1024"><path fill="#fff" d="M625.778 256H768v142.222h113.778v-256h-256zM256 398.222V256h142.222V142.222h-256v256zm512 227.556V768H625.778v113.778h256v-256zM398.222 768H256V625.778H142.222v256h256z"/></svg>'},{}],"64eDf":[function(e,t,r,a){t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" class="icon" viewBox="0 0 1152 1024"><path fill="#fff" d="M1075.2 0H76.8A76.8 76.8 0 0 0 0 76.8v870.4a76.8 76.8 0 0 0 76.8 76.8h998.4a76.8 76.8 0 0 0 76.8-76.8V76.8A76.8 76.8 0 0 0 1075.2 0M1024 128v768H128V128zM896 512a64 64 0 0 1 7.488 127.552L896 640H768v128a64 64 0 0 1-56.512 63.552L704 832a64 64 0 0 1-63.552-56.512L640 768V582.592c0-34.496 25.024-66.112 61.632-70.208l8-.384zm-640 0a64 64 0 0 1-7.488-127.552L256 384h128V256a64 64 0 0 1 56.512-63.552L448 192a64 64 0 0 1 63.552 56.512L512 256v185.408c0 34.432-25.024 66.112-61.632 70.144l-8 .448z"/></svg>'},{}],gxLKk:[function(e,t,r,a){t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" class="icon" viewBox="0 0 1152 1024"><path fill="#fff" d="M1075.2 0H76.8A76.8 76.8 0 0 0 0 76.8v870.4a76.8 76.8 0 0 0 76.8 76.8h998.4a76.8 76.8 0 0 0 76.8-76.8V76.8A76.8 76.8 0 0 0 1075.2 0M1024 128v768H128V128zm-576 64a64 64 0 0 1 7.488 127.552L448 320H320v128a64 64 0 0 1-56.512 63.552L256 512a64 64 0 0 1-63.552-56.512L192 448V262.592c0-34.432 25.024-66.112 61.632-70.144l8-.448zm256 640a64 64 0 0 1-7.488-127.552L704 704h128V576a64 64 0 0 1 56.512-63.552L896 512a64 64 0 0 1 63.552 56.512L960 576v185.408c0 34.496-25.024 66.112-61.632 70.208l-8 .384z"/></svg>'},{}],"1a3p7":[function(e,t,r,a){t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" class="icon" viewBox="0 0 1664 1024"><path fill="#648FFC" d="M1152 0H512a512 512 0 0 0 0 1024h640a512 512 0 0 0 0-1024m0 960a448 448 0 1 1 448-448 448 448 0 0 1-448 448"/></svg>'},{}],ioXaN:[function(e,t,r,a){t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" class="icon" viewBox="0 0 1740 1024"><path fill="#fff" d="M511.898 1024h670.515c282.419-.41 511.18-229.478 511.18-511.898 0-282.419-228.761-511.488-511.18-511.897H511.898C229.478.615.717 229.683.717 512.102c0 282.42 228.761 511.488 511.18 511.898m-.564-975.36A464.589 464.589 0 1 1 48.026 513.024 463.87 463.87 0 0 1 511.334 48.435z"/></svg>'},{}],ghEK8:[function(e,t,r,a){t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="icon" viewBox="0 0 1024 1024"><path fill="#fff" d="M554.667 810.667V896h-85.334v-85.333zm-384-632.662a42.67 42.67 0 0 1 34.986 18.219l203.904 291.328a42.67 42.67 0 0 1 0 48.896L205.611 827.776A42.667 42.667 0 0 1 128 803.328V220.672a42.667 42.667 0 0 1 42.667-42.667m682.666 0a42.667 42.667 0 0 1 42.368 37.718l.299 4.949v582.656a42.667 42.667 0 0 1-74.24 28.63l-3.413-4.182-203.904-291.328a42.67 42.67 0 0 1-3.03-43.861l3.03-5.035 203.946-291.328a42.67 42.67 0 0 1 34.944-18.219M554.667 640v85.333h-85.334V640zm-358.4-320.896V716.8L335.957 512 196.31 319.104zm358.4 150.23v85.333h-85.334v-85.334zm0-170.667V384h-85.334v-85.333zm0-170.667v85.333h-85.334V128z"/></svg>'},{}],"3iobs":[function(e,t,r,a){t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 1024 1024"><path d="M593.818 168.55 949.82 763.76c26.153 43.746 10.732 99.738-34.447 125.052-14.397 8.069-30.72 12.308-47.37 12.308H155.976c-52.224 0-94.536-40.96-94.536-91.505 0-16.097 4.383-31.928 12.718-45.875l356.004-595.19c26.173-43.724 84.009-58.654 129.208-33.341a93.1 93.1 0 0 1 34.448 33.341M512 819.2a61.44 61.44 0 1 0 0-122.88 61.44 61.44 0 0 0 0 122.88m0-512a72.315 72.315 0 0 0-71.762 81.306l25.723 205.721a46.408 46.408 0 0 0 92.078 0l25.723-205.742A72.315 72.315 0 0 0 512 307.2"/></svg>'},{}],dhbAn:[function(e,t,r,a){t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" class="icon" viewBox="0 0 1024 1024"><path d="m571.733 512 268.8-268.8c17.067-17.067 17.067-42.667 0-59.733-17.066-17.067-42.666-17.067-59.733 0L512 452.267l-268.8-268.8c-17.067-17.067-42.667-17.067-59.733 0-17.067 17.066-17.067 42.666 0 59.733l268.8 268.8-268.8 268.8c-17.067 17.067-17.067 42.667 0 59.733 8.533 8.534 19.2 12.8 29.866 12.8s21.334-4.266 29.867-12.8l268.8-268.8 268.8 268.8c8.533 8.534 19.2 12.8 29.867 12.8s21.333-4.266 29.866-12.8c17.067-17.066 17.067-42.666 0-59.733z"/></svg>'},{}],hbZQA:[function(e,t,r,a){t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18"><g fill="#fff"><path d="M16 1H2a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h3v-2H3V3h12v8h-2v2h3a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1"/><path d="M4 17h10l-5-6z"/></g></svg>'},{}],aqPSH:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("./flip"),n=o.interopDefault(i),s=e("./aspectRatio"),l=o.interopDefault(s),c=e("./playbackRate"),p=o.interopDefault(c),u=e("./subtitleOffset"),d=o.interopDefault(u),f=e("../utils/component"),h=o.interopDefault(f),m=e("../utils");class g extends h.default{constructor(e){super(e);let{option:t,controls:r,template:{$setting:a}}=e;this.name="setting",this.$parent=a,this.id=0,this.active=null,this.cache=new Map,this.option=[...this.builtin,...t.settings],t.setting&&(this.format(),this.render(),e.on("blur",()=>{this.show&&(this.show=!1,this.render())}),e.on("focus",e=>{let t=(0,m.includeFromEvent)(e,r.setting),a=(0,m.includeFromEvent)(e,this.$parent);!this.show||t||a||(this.show=!1,this.render())}),e.on("resize",()=>this.resize()))}get builtin(){let e=[],{option:t}=this.art;return t.playbackRate&&e.push((0,p.default)(this.art)),t.aspectRatio&&e.push((0,l.default)(this.art)),t.flip&&e.push((0,n.default)(this.art)),t.subtitleOffset&&e.push((0,d.default)(this.art)),e}traverse(e,t=this.option){for(let r=0;r<t.length;r++){let a=t[r];e(a),a.selector?.length&&this.traverse.call(this,e,a.selector)}}check(e){e.$parent.tooltip=e.html,this.traverse(t=>{t.default=t===e,t.default&&t.$item&&(0,m.inverseClass)(t.$item,"art-current")},e.$option),this.render(e.$parents)}format(e=this.option,t,r,a=[]){for(let o=0;o<e.length;o++){let i=e[o];if(i?.name?((0,m.errorHandle)(!a.includes(i.name),`The [${i.name}] already exists in [setting]`),a.push(i.name)):i.name=`setting-${this.id++}`,!i.$formatted){(0,m.def)(i,"$parent",{get:()=>t}),(0,m.def)(i,"$parents",{get:()=>r}),(0,m.def)(i,"$option",{get:()=>e});let a=[];(0,m.def)(i,"$events",{get:()=>a}),(0,m.def)(i,"$formatted",{get:()=>!0})}this.format(i.selector||[],i,e,a)}this.option=e}find(e=""){let t=null;return this.traverse(r=>{r.name===e&&(t=r)}),t}resize(){let{controls:e,constructor:{SETTING_WIDTH:t,SETTING_ITEM_HEIGHT:r},template:{$player:a,$setting:o}}=this.art;if(e.setting&&this.show){let i=this.active[0]?.$parent?.width||t,{left:n,width:s}=(0,m.getRect)(e.setting),{left:l,width:c}=(0,m.getRect)(a),p=n-l+s/2-i/2,u=this.active===this.option?this.active.length*r:(this.active.length+1)*r;if((0,m.setStyle)(o,"height",`${u}px`),(0,m.setStyle)(o,"width",`${i}px`),this.art.isRotate||m.isMobile)return;p+i>c?((0,m.setStyle)(o,"left",null),(0,m.setStyle)(o,"right",null)):((0,m.setStyle)(o,"left",`${p}px`),(0,m.setStyle)(o,"right","auto"))}}inactivate(e){for(let t=0;t<e.$events.length;t++)this.art.events.remove(e.$events[t]);e.$events.length=0}remove(e){let t=this.find(e);(0,m.errorHandle)(t,`Can't find [${e}] in the [setting]`);let r=t.$option.indexOf(t);t.$option.splice(r,1),this.inactivate(t),t.$item&&(0,m.remove)(t.$item),this.render()}update(e){let t=this.find(e.name);return t?(this.inactivate(t),Object.assign(t,e),this.format(),this.createItem(t,!0),this.render(),t):this.add(e)}add(e,t=this.option){return t.push(e),this.format(),this.createItem(e),this.render(),e}createHeader(e){if(!this.cache.has(e.$option))return;let t=this.cache.get(e.$option),{proxy:r,icons:{arrowLeft:a},constructor:{SETTING_ITEM_HEIGHT:o}}=this.art,i=(0,m.createElement)("div");(0,m.setStyle)(i,"height",`${o}px`),(0,m.addClass)(i,"art-setting-item"),(0,m.addClass)(i,"art-setting-item-back");let n=(0,m.append)(i,'<div class="art-setting-item-left"></div>'),s=(0,m.createElement)("div");(0,m.addClass)(s,"art-setting-item-left-icon"),(0,m.append)(s,a),(0,m.append)(n,s),(0,m.append)(n,e.$parent.html);let l=r(i,"click",()=>this.render(e.$parents));e.$parent.$events.push(l),(0,m.append)(t,i)}createItem(e,t=!1){if(!this.cache.has(e.$option))return;let r=this.cache.get(e.$option),a=e.$item,o="selector";(0,m.has)(e,"switch")&&(o="switch"),(0,m.has)(e,"range")&&(o="range"),(0,m.has)(e,"onClick")&&(o="button");let{icons:i,proxy:n,constructor:s}=this.art,l=(0,m.createElement)("div");(0,m.addClass)(l,"art-setting-item"),(0,m.setStyle)(l,"height",`${s.SETTING_ITEM_HEIGHT}px`),l.dataset.name=e.name||"",l.dataset.value=e.value||"";let c=(0,m.append)(l,'<div class="art-setting-item-left"></div>'),p=(0,m.append)(l,'<div class="art-setting-item-right"></div>'),u=(0,m.createElement)("div");switch((0,m.addClass)(u,"art-setting-item-left-icon"),o){case"button":case"switch":case"range":(0,m.append)(u,e.icon||i.config);break;case"selector":e.selector?.length?(0,m.append)(u,e.icon||i.config):(0,m.append)(u,i.check)}(0,m.append)(c,u),(0,m.def)(e,"$icon",{configurable:!0,get:()=>u}),(0,m.def)(e,"icon",{configurable:!0,get:()=>u.innerHTML,set(e){u.innerHTML="",(0,m.append)(u,e)}});let d=(0,m.createElement)("div");(0,m.addClass)(d,"art-setting-item-left-text"),(0,m.append)(d,e.html||""),(0,m.append)(c,d),(0,m.def)(e,"$html",{configurable:!0,get:()=>d}),(0,m.def)(e,"html",{configurable:!0,get:()=>d.innerHTML,set(e){d.innerHTML="",(0,m.append)(d,e)}});let f=(0,m.createElement)("div");switch((0,m.addClass)(f,"art-setting-item-right-tooltip"),(0,m.append)(f,e.tooltip||""),(0,m.append)(p,f),(0,m.def)(e,"$tooltip",{configurable:!0,get:()=>f}),(0,m.def)(e,"tooltip",{configurable:!0,get:()=>f.innerHTML,set(e){f.innerHTML="",(0,m.append)(f,e)}}),o){case"switch":{let t=(0,m.createElement)("div");(0,m.addClass)(t,"art-setting-item-right-icon");let r=(0,m.append)(t,i.switchOn),a=(0,m.append)(t,i.switchOff);(0,m.setStyle)(e.switch?a:r,"display","none"),(0,m.append)(p,t),(0,m.def)(e,"$switch",{configurable:!0,get:()=>t});let o=e.switch;(0,m.def)(e,"switch",{configurable:!0,get:()=>o,set(e){o=e,e?((0,m.setStyle)(a,"display","none"),(0,m.setStyle)(r,"display",null)):((0,m.setStyle)(a,"display",null),(0,m.setStyle)(r,"display","none"))}});break}case"range":{let t=(0,m.createElement)("div");(0,m.addClass)(t,"art-setting-item-right-icon");let r=(0,m.append)(t,'<input type="range">');r.value=e.range[0],r.min=e.range[1],r.max=e.range[2],r.step=e.range[3],(0,m.addClass)(r,"art-setting-range"),(0,m.append)(p,t),(0,m.def)(e,"$range",{configurable:!0,get:()=>r});let a=[...e.range];(0,m.def)(e,"range",{configurable:!0,get:()=>a,set(e){a=[...e],r.value=e[0],r.min=e[1],r.max=e[2],r.step=e[3]}})}break;case"selector":if(e.selector?.length){let e=(0,m.createElement)("div");(0,m.addClass)(e,"art-setting-item-right-icon"),(0,m.append)(e,i.arrowRight),(0,m.append)(p,e)}}switch(o){case"switch":if(e.onSwitch){let t=n(l,"click",async t=>{e.switch=await e.onSwitch.call(this.art,e,l,t)});e.$events.push(t)}break;case"range":if(e.$range){if(e.onRange){let t=n(e.$range,"change",async t=>{e.range[0]=e.$range.valueAsNumber,e.tooltip=await e.onRange.call(this.art,e,l,t)});e.$events.push(t)}if(e.onChange){let t=n(e.$range,"input",async t=>{e.range[0]=e.$range.valueAsNumber,e.tooltip=await e.onChange.call(this.art,e,l,t)});e.$events.push(t)}}break;case"selector":{let t=n(l,"click",async t=>{e.selector?.length?this.render(e.selector):(this.check(e),e.$parent.onSelect&&(e.$parent.tooltip=await e.$parent.onSelect.call(this.art,e,l,t)))});e.$events.push(t),e.default&&(0,m.addClass)(l,"art-current")}break;case"button":if(e.onClick){let t=n(l,"click",async t=>{e.tooltip=await e.onClick.call(this.art,e,l,t)});e.$events.push(t)}}(0,m.def)(e,"$item",{configurable:!0,get:()=>l}),t?(0,m.replaceElement)(l,a):(0,m.append)(r,l),e.mounted&&setTimeout(()=>e.mounted.call(this.art,e.$item,e),0)}render(e=this.option){if(this.active=e,this.cache.has(e)){let t=this.cache.get(e);(0,m.inverseClass)(t,"art-current")}else{let t=(0,m.createElement)("div");this.cache.set(e,t),(0,m.addClass)(t,"art-setting-panel"),(0,m.append)(this.$parent,t),(0,m.inverseClass)(t,"art-current"),e[0]?.$parent&&this.createHeader(e[0]);for(let t=0;t<e.length;t++)this.createItem(e[t])}this.resize()}}r.default=g},{"./flip":"7YotA","./aspectRatio":"6Hidr","./playbackRate":"3qrNj","./subtitleOffset":"4G52T","../utils/component":"j4qZZ","../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"7YotA":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{i18n:t,icons:r,constructor:{SETTING_ITEM_WIDTH:a,FLIP:o}}=e;function n(e){return t.get((0,i.capitalize)(e))}function s(){let t=e.setting.find(`flip-${e.flip}`);e.setting.check(t)}return{width:a,name:"flip",html:t.get("Video Flip"),tooltip:n(e.flip),icon:r.flip,selector:o.map(t=>({value:t,name:`flip-${t}`,default:t===e.flip,html:n(t)})),onSelect:t=>(e.flip=t.value,t.html),mounted:()=>{s(),e.on("flip",()=>s())}}}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"6Hidr":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){let{i18n:t,icons:r,constructor:{SETTING_ITEM_WIDTH:a,ASPECT_RATIO:o}}=e;function i(e){return"default"===e?t.get("Default"):e}function n(){let t=e.setting.find(`aspect-ratio-${e.aspectRatio}`);e.setting.check(t)}return{width:a,name:"aspect-ratio",html:t.get("Aspect Ratio"),icon:r.aspectRatio,tooltip:i(e.aspectRatio),selector:o.map(t=>({value:t,name:`aspect-ratio-${t}`,default:t===e.aspectRatio,html:i(t)})),onSelect:t=>(e.aspectRatio=t.value,t.html),mounted:()=>{n(),e.on("aspectRatio",()=>n())}}}o.defineInteropFlag(r),o.export(r,"default",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"3qrNj":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){let{i18n:t,icons:r,constructor:{SETTING_ITEM_WIDTH:a,PLAYBACK_RATE:o}}=e;function i(e){return 1===e?t.get("Normal"):e.toFixed(1)}function n(){let t=e.setting.find(`playback-rate-${e.playbackRate}`);e.setting.check(t)}return{width:a,name:"playback-rate",html:t.get("Play Speed"),tooltip:i(e.playbackRate),icon:r.playbackRate,selector:o.map(t=>({value:t,name:`playback-rate-${t}`,default:t===e.playbackRate,html:i(t)})),onSelect:t=>(e.playbackRate=t.value,t.html),mounted:()=>{n(),e.on("video:ratechange",()=>n())}}}o.defineInteropFlag(r),o.export(r,"default",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"4G52T":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){let{i18n:t,icons:r,constructor:a}=e;return{width:a.SETTING_ITEM_WIDTH,name:"subtitle-offset",html:t.get("Subtitle Offset"),icon:r.subtitle,tooltip:"0s",range:[0,-10,10,.1],onChange:t=>(e.subtitleOffset=t.range[0],t.range[0]+"s"),mounted:(t,r)=>{e.on("subtitleOffset",e=>{r.$range.value=e,r.tooltip=e+"s"})}}}o.defineInteropFlag(r),o.export(r,"default",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"48Pli":[function(e,t,r,a){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=class{constructor(){this.name="artplayer_settings",this.settings={}}get(e){try{let t=JSON.parse(window.localStorage.getItem(this.name))||{};return e?t[e]:t}catch(t){return e?this.settings[e]:this.settings}}set(e,t){try{let r=Object.assign({},this.get(),{[e]:t});window.localStorage.setItem(this.name,JSON.stringify(r))}catch(r){this.settings[e]=t}}del(e){try{let t=this.get();delete t[e],window.localStorage.setItem(this.name,JSON.stringify(t))}catch(t){delete this.settings[e]}}clear(){try{window.localStorage.removeItem(this.name)}catch(e){this.settings={}}}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],eOOz3:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("../utils"),n=e("./miniProgressBar"),s=o.interopDefault(n),l=e("./autoOrientation"),c=o.interopDefault(l),p=e("./autoPlayback"),u=o.interopDefault(p),d=e("./fastForward"),f=o.interopDefault(d),h=e("./lock"),m=o.interopDefault(h);r.default=class{constructor(e){this.art=e,this.id=0;let{option:t}=e;t.miniProgressBar&&!t.isLive&&this.add(s.default),t.lock&&i.isMobile&&this.add(m.default),t.autoPlayback&&!t.isLive&&this.add(u.default),t.autoOrientation&&i.isMobile&&this.add(c.default),t.fastForward&&i.isMobile&&!t.isLive&&this.add(f.default);for(let e=0;e<t.plugins.length;e++)this.add(t.plugins[e])}add(e){this.id+=1;let t=e.call(this.art,this.art);return t instanceof Promise?t.then(t=>this.next(e,t)):this.next(e,t)}next(e,t){let r=t&&t.name||e.name||`plugin${this.id}`;return(0,i.errorHandle)(!(0,i.has)(this,r),`Cannot add a plugin that already has the same name: ${r}`),(0,i.def)(this,r,{value:t}),this}}},{"../utils":"gpvEP","./miniProgressBar":"bAQc0","./autoOrientation":"31jHc","./autoPlayback":"UojkI","./fastForward":"k8rjo","./lock":"ifBkM","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],bAQc0:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){return e.on("control",t=>{t?(0,i.removeClass)(e.template.$player,"art-mini-progress-bar"):(0,i.addClass)(e.template.$player,"art-mini-progress-bar")}),{name:"mini-progress-bar"}}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],"31jHc":[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{constructor:t,template:{$player:r,$video:a}}=e;return e.on("fullscreenWeb",o=>{if(o){let{videoWidth:o,videoHeight:n}=a,{clientWidth:s,clientHeight:l}=document.documentElement;(o>n&&s<l||o<n&&s>l)&&setTimeout(()=>{(0,i.setStyle)(r,"width",`${l}px`),(0,i.setStyle)(r,"height",`${s}px`),(0,i.setStyle)(r,"transform-origin","0 0"),(0,i.setStyle)(r,"transform",`rotate(90deg) translate(0, -${s}px)`),(0,i.addClass)(r,"art-auto-orientation"),e.isRotate=!0,e.emit("resize")},t.AUTO_ORIENTATION_TIME)}else(0,i.hasClass)(r,"art-auto-orientation")&&((0,i.removeClass)(r,"art-auto-orientation"),e.isRotate=!1,e.emit("resize"))}),e.on("fullscreen",async e=>{if(!screen?.orientation?.lock)return;let t=screen.orientation.type;if(e){let{videoWidth:e,videoHeight:o}=a,{clientWidth:n,clientHeight:s}=document.documentElement;if(e>o&&n<s||e<o&&n>s){let e=t.startsWith("portrait")?"landscape":"portrait";await screen.orientation.lock(e),(0,i.addClass)(r,"art-auto-orientation-fullscreen")}}else(0,i.hasClass)(r,"art-auto-orientation-fullscreen")&&(await screen.orientation.lock(t),(0,i.removeClass)(r,"art-auto-orientation-fullscreen"))}),{name:"autoOrientation",get state(){return(0,i.hasClass)(r,"art-auto-orientation")}}}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],UojkI:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{i18n:t,icons:r,storage:a,constructor:o,proxy:n,template:{$poster:s}}=e,l=e.layers.add({name:"auto-playback",html:`<div class="art-auto-playback-close"></div><div class="art-auto-playback-last"></div><div class="art-auto-playback-jump"></div>`}),c=(0,i.query)(".art-auto-playback-last",l),p=(0,i.query)(".art-auto-playback-jump",l),u=(0,i.query)(".art-auto-playback-close",l);(0,i.append)(u,r.close);let d=null;function f(){let r=(a.get("times")||{})[e.option.id||e.option.url];clearTimeout(d),(0,i.setStyle)(l,"display","none"),r&&r>=o.AUTO_PLAYBACK_MIN&&((0,i.setStyle)(l,"display","flex"),c.innerText=`${t.get("Last Seen")} ${(0,i.secondToTime)(r)}`,p.innerText=t.get("Jump Play"),n(u,"click",()=>{(0,i.setStyle)(l,"display","none")}),n(p,"click",()=>{e.seek=r,e.play(),(0,i.setStyle)(s,"display","none"),(0,i.setStyle)(l,"display","none")}),e.once("video:timeupdate",()=>{d=setTimeout(()=>{(0,i.setStyle)(l,"display","none")},o.AUTO_PLAYBACK_TIMEOUT)}))}return e.on("video:timeupdate",()=>{if(e.playing){let t=a.get("times")||{},r=Object.keys(t);r.length>o.AUTO_PLAYBACK_MAX&&delete t[r[0]],t[e.option.id||e.option.url]=e.currentTime,a.set("times",t)}}),e.on("ready",f),e.on("restart",f),{name:"auto-playback",get times(){return a.get("times")||{}},clear:()=>a.del("times"),delete(e){let t=a.get("times")||{};return delete t[e],a.set("times",t),t}}}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],k8rjo:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{constructor:t,proxy:r,template:{$player:a,$video:o}}=e,n=null,s=!1,l=1,c=()=>{clearTimeout(n),s&&(s=!1,e.playbackRate=l,(0,i.removeClass)(a,"art-fast-forward"))};return r(o,"touchstart",r=>{1===r.touches.length&&e.playing&&!e.isLock&&(n=setTimeout(()=>{s=!0,l=e.playbackRate,e.playbackRate=t.FAST_FORWARD_VALUE,(0,i.addClass)(a,"art-fast-forward")},t.FAST_FORWARD_TIME))}),r(document,"touchmove",c),r(document,"touchend",c),{name:"fastForward",get state(){return(0,i.hasClass)(a,"art-fast-forward")}}}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}],ifBkM:[function(e,t,r,a){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>n);var i=e("../utils");function n(e){let{layers:t,icons:r,template:{$player:a}}=e;function o(){return(0,i.hasClass)(a,"art-lock")}function n(){(0,i.addClass)(a,"art-lock"),e.isLock=!0,e.emit("lock",!0)}function s(){(0,i.removeClass)(a,"art-lock"),e.isLock=!1,e.emit("lock",!1)}return t.add({name:"lock",mounted(t){let a=(0,i.append)(t,r.lock),o=(0,i.append)(t,r.unlock);(0,i.setStyle)(a,"display","none"),e.on("lock",e=>{e?((0,i.setStyle)(a,"display","inline-flex"),(0,i.setStyle)(o,"display","none")):((0,i.setStyle)(a,"display","none"),(0,i.setStyle)(o,"display","inline-flex"))})},click(){o()?s():n()}}),{name:"lock",get state(){return o()},set state(value){value?n():s()}}}},{"../utils":"gpvEP","@parcel/transformer-js/src/esmodule-helpers.js":"7o2zS"}]},["jz4E5"],"jz4E5","parcelRequireb749",{});\ No newline at end of filediff --git a/libs/hls.min.js b/libs/hls.min.jsdeleted file mode 100644index 2fdbf34..0000000--- a/libs/hls.min.js+++ /dev/null@@ -1,2 +0,0 @@-!function e(t){var r,i;r=this,i=function(){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,g(i.key),i)}}function n(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return r(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?r(e,t):void 0}}(e))||t){i&&(e=i);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t,r){return(t=g(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},o.apply(null,arguments)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function u(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,c(e,t)}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function g(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function v(e){var t="function"==typeof Map?new Map:void 0;return v=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(d())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,t);var n=new(e.bind.apply(e,i));return r&&c(n,r.prototype),n}(e,arguments,l(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,e)},v(e)}function m(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var p,y,E={exports:{}},T=(p||(p=1,function(e){var t=Object.prototype.hasOwnProperty,r="~";function i(){}function n(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function a(e,t,i,a,s){if("function"!=typeof i)throw new TypeError("The listener must be a function");var o=new n(i,a||e,s),l=r?r+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],o]:e._events[l].push(o):(e._events[l]=o,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new i:delete e._events[t]}function o(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(r=!1)),o.prototype.eventNames=function(){var e,i,n=[];if(0===this._eventsCount)return n;for(i in e=this._events)t.call(e,i)&&n.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},o.prototype.listeners=function(e){var t=r?r+e:e,i=this._events[t];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,a=i.length,s=new Array(a);n<a;n++)s[n]=i[n].fn;return s},o.prototype.listenerCount=function(e){var t=r?r+e:e,i=this._events[t];return i?i.fn?1:i.length:0},o.prototype.emit=function(e,t,i,n,a,s){var o=r?r+e:e;if(!this._events[o])return!1;var l,u,d=this._events[o],h=arguments.length;if(d.fn){switch(d.once&&this.removeListener(e,d.fn,void 0,!0),h){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,t),!0;case 3:return d.fn.call(d.context,t,i),!0;case 4:return d.fn.call(d.context,t,i,n),!0;case 5:return d.fn.call(d.context,t,i,n,a),!0;case 6:return d.fn.call(d.context,t,i,n,a,s),!0}for(u=1,l=new Array(h-1);u<h;u++)l[u-1]=arguments[u];d.fn.apply(d.context,l)}else{var f,c=d.length;for(u=0;u<c;u++)switch(d[u].once&&this.removeListener(e,d[u].fn,void 0,!0),h){case 1:d[u].fn.call(d[u].context);break;case 2:d[u].fn.call(d[u].context,t);break;case 3:d[u].fn.call(d[u].context,t,i);break;case 4:d[u].fn.call(d[u].context,t,i,n);break;default:if(!l)for(f=1,l=new Array(h-1);f<h;f++)l[f-1]=arguments[f];d[u].fn.apply(d[u].context,l)}}return!0},o.prototype.on=function(e,t,r){return a(this,e,t,r,!1)},o.prototype.once=function(e,t,r){return a(this,e,t,r,!0)},o.prototype.removeListener=function(e,t,i,n){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn!==t||n&&!o.once||i&&o.context!==i||s(this,a);else{for(var l=0,u=[],d=o.length;l<d;l++)(o[l].fn!==t||n&&!o[l].once||i&&o[l].context!==i)&&u.push(o[l]);u.length?this._events[a]=1===u.length?u[0]:u:s(this,a)}return this},o.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=r,o.EventEmitter=o,e.exports=o}(E)),E.exports),S=m(T),A={exports:{}},L=(y||(y=1,function(e,t){var r,i,n,a,s;r=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,i=/^(?=([^\/?#]*))\1([^]*)$/,n=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,s={buildAbsoluteURL:function(e,t,r){if(r=r||{},e=e.trim(),!(t=t.trim())){if(!r.alwaysNormalize)return e;var n=s.parseURL(e);if(!n)throw new Error("Error trying to parse base URL.");return n.path=s.normalizePath(n.path),s.buildURLFromParts(n)}var a=s.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return r.alwaysNormalize?(a.path=s.normalizePath(a.path),s.buildURLFromParts(a)):t;var o=s.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var l=i.exec(o.path);o.netLoc=l[1],o.path=l[2]}o.netLoc&&!o.path&&(o.path="/");var u={scheme:o.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(u.netLoc=o.netLoc,"/"!==a.path[0]))if(a.path){var d=o.path,h=d.substring(0,d.lastIndexOf("/")+1)+a.path;u.path=s.normalizePath(h)}else u.path=o.path,a.params||(u.params=o.params,a.query||(u.query=o.query));return null===u.path&&(u.path=r.alwaysNormalize?s.normalizePath(a.path):a.path),s.buildURLFromParts(u)},parseURL:function(e){var t=r.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(n,"");e.length!==(e=e.replace(a,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=s}(A)),A.exports),R=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},I=Number.isSafeInteger||function(e){return"number"==typeof e&&Math.abs(e)<=b},b=Number.MAX_SAFE_INTEGER||9007199254740991,k=function(e){return e.NETWORK_ERROR="networkError",e.MEDIA_ERROR="mediaError",e.KEY_SYSTEM_ERROR="keySystemError",e.MUX_ERROR="muxError",e.OTHER_ERROR="otherError",e}({}),D=function(e){return e.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",e.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",e.KEY_SYSTEM_NO_SESSION="keySystemNoSession",e.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",e.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",e.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",e.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",e.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",e.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",e.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",e.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR="keySystemDestroyMediaKeysError",e.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR="keySystemDestroyCloseSessionError",e.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR="keySystemDestroyRemoveSessionError",e.MANIFEST_LOAD_ERROR="manifestLoadError",e.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",e.MANIFEST_PARSING_ERROR="manifestParsingError",e.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",e.LEVEL_EMPTY_ERROR="levelEmptyError",e.LEVEL_LOAD_ERROR="levelLoadError",e.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",e.LEVEL_PARSING_ERROR="levelParsingError",e.LEVEL_SWITCH_ERROR="levelSwitchError",e.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",e.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",e.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",e.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",e.FRAG_LOAD_ERROR="fragLoadError",e.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",e.FRAG_DECRYPT_ERROR="fragDecryptError",e.FRAG_PARSING_ERROR="fragParsingError",e.FRAG_GAP="fragGap",e.REMUX_ALLOC_ERROR="remuxAllocError",e.KEY_LOAD_ERROR="keyLoadError",e.KEY_LOAD_TIMEOUT="keyLoadTimeOut",e.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",e.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",e.BUFFER_APPEND_ERROR="bufferAppendError",e.BUFFER_APPENDING_ERROR="bufferAppendingError",e.BUFFER_STALLED_ERROR="bufferStalledError",e.BUFFER_FULL_ERROR="bufferFullError",e.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",e.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",e.ASSET_LIST_LOAD_ERROR="assetListLoadError",e.ASSET_LIST_LOAD_TIMEOUT="assetListLoadTimeout",e.ASSET_LIST_PARSING_ERROR="assetListParsingError",e.INTERSTITIAL_ASSET_ITEM_ERROR="interstitialAssetItemError",e.INTERNAL_EXCEPTION="internalException",e.INTERNAL_ABORTED="aborted",e.ATTACH_MEDIA_ERROR="attachMediaError",e.UNKNOWN="unknown",e}({}),_=function(e){return e.MEDIA_ATTACHING="hlsMediaAttaching",e.MEDIA_ATTACHED="hlsMediaAttached",e.MEDIA_DETACHING="hlsMediaDetaching",e.MEDIA_DETACHED="hlsMediaDetached",e.MEDIA_ENDED="hlsMediaEnded",e.STALL_RESOLVED="hlsStallResolved",e.BUFFER_RESET="hlsBufferReset",e.BUFFER_CODECS="hlsBufferCodecs",e.BUFFER_CREATED="hlsBufferCreated",e.BUFFER_APPENDING="hlsBufferAppending",e.BUFFER_APPENDED="hlsBufferAppended",e.BUFFER_EOS="hlsBufferEos",e.BUFFERED_TO_END="hlsBufferedToEnd",e.BUFFER_FLUSHING="hlsBufferFlushing",e.BUFFER_FLUSHED="hlsBufferFlushed",e.MANIFEST_LOADING="hlsManifestLoading",e.MANIFEST_LOADED="hlsManifestLoaded",e.MANIFEST_PARSED="hlsManifestParsed",e.LEVEL_SWITCHING="hlsLevelSwitching",e.LEVEL_SWITCHED="hlsLevelSwitched",e.LEVEL_LOADING="hlsLevelLoading",e.LEVEL_LOADED="hlsLevelLoaded",e.LEVEL_UPDATED="hlsLevelUpdated",e.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",e.LEVELS_UPDATED="hlsLevelsUpdated",e.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",e.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",e.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",e.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",e.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",e.AUDIO_TRACK_UPDATED="hlsAudioTrackUpdated",e.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",e.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",e.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",e.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",e.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",e.SUBTITLE_TRACK_UPDATED="hlsSubtitleTrackUpdated",e.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",e.CUES_PARSED="hlsCuesParsed",e.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",e.INIT_PTS_FOUND="hlsInitPtsFound",e.FRAG_LOADING="hlsFragLoading",e.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",e.FRAG_LOADED="hlsFragLoaded",e.FRAG_DECRYPTED="hlsFragDecrypted",e.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",e.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",e.FRAG_PARSING_METADATA="hlsFragParsingMetadata",e.FRAG_PARSED="hlsFragParsed",e.FRAG_BUFFERED="hlsFragBuffered",e.FRAG_CHANGED="hlsFragChanged",e.FPS_DROP="hlsFpsDrop",e.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",e.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",e.ERROR="hlsError",e.DESTROYING="hlsDestroying",e.KEY_LOADING="hlsKeyLoading",e.KEY_LOADED="hlsKeyLoaded",e.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",e.BACK_BUFFER_REACHED="hlsBackBufferReached",e.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",e.ASSET_LIST_LOADING="hlsAssetListLoading",e.ASSET_LIST_LOADED="hlsAssetListLoaded",e.INTERSTITIALS_UPDATED="hlsInterstitialsUpdated",e.INTERSTITIALS_BUFFERED_TO_BOUNDARY="hlsInterstitialsBufferedToBoundary",e.INTERSTITIAL_ASSET_PLAYER_CREATED="hlsInterstitialAssetPlayerCreated",e.INTERSTITIAL_STARTED="hlsInterstitialStarted",e.INTERSTITIAL_ASSET_STARTED="hlsInterstitialAssetStarted",e.INTERSTITIAL_ASSET_ENDED="hlsInterstitialAssetEnded",e.INTERSTITIAL_ASSET_ERROR="hlsInterstitialAssetError",e.INTERSTITIAL_ENDED="hlsInterstitialEnded",e.INTERSTITIALS_PRIMARY_RESUMED="hlsInterstitialsPrimaryResumed",e.PLAYOUT_LIMIT_REACHED="hlsPlayoutLimitReached",e.EVENT_CUE_ENTER="hlsEventCueEnter",e}({}),P="manifest",C="level",w="audioTrack",O="subtitleTrack",x="main",M="audio",F="subtitle",N=function(){function e(e,t,r){void 0===t&&(t=0),void 0===r&&(r=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=r}var t=e.prototype;return t.sample=function(e,t){var r=Math.pow(this.alpha_,e);this.estimate_=t*(1-r)+r*this.estimate_,this.totalWeight_+=e},t.getTotalWeight=function(){return this.totalWeight_},t.getEstimate=function(){if(this.alpha_){var e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_},e}(),U=function(){function e(e,t,r,i){void 0===i&&(i=100),this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=r,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new N(e),this.fast_=new N(t),this.defaultTTFB_=i,this.ttfb_=new N(e)}var t=e.prototype;return t.update=function(e,t){var r=this.slow_,i=this.fast_,n=this.ttfb_;r.halfLife!==e&&(this.slow_=new N(e,r.getEstimate(),r.getTotalWeight())),i.halfLife!==t&&(this.fast_=new N(t,i.getEstimate(),i.getTotalWeight())),n.halfLife!==e&&(this.ttfb_=new N(e,n.getEstimate(),n.getTotalWeight()))},t.sample=function(e,t){var r=(e=Math.max(e,this.minDelayMs_))/1e3,i=8*t/r;this.fast_.sample(r,i),this.slow_.sample(r,i)},t.sampleTTFB=function(e){var t=e/1e3,r=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(r,Math.max(e,5))},t.canEstimate=function(){return this.fast_.getTotalWeight()>=this.minWeight_},t.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},t.getEstimateTTFB=function(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_},t.destroy=function(){},n(e,[{key:"defaultEstimate",get:function(){return this.defaultEstimate_}}])}(),B=function(e,t){this.trace=void 0,this.debug=void 0,this.log=void 0,this.warn=void 0,this.info=void 0,this.error=void 0;var r="["+e+"]:";this.trace=G,this.debug=t.debug.bind(null,r),this.log=t.log.bind(null,r),this.warn=t.warn.bind(null,r),this.info=t.info.bind(null,r),this.error=t.error.bind(null,r)},G=function(){},K={trace:G,debug:G,log:G,warn:G,info:G,error:G};function H(){return o({},K)}function V(e,t,r){return t[e]?t[e].bind(t):function(e,t){var r=self.console[e];return r?r.bind(self.console,(t?"["+t+"] ":"")+"["+e+"] >"):G}(e,r)}var Y=H();function W(e,t,r){var i=H();if("object"==typeof console&&!0===e||"object"==typeof e){var n=["debug","log","info","warn","error"];n.forEach((function(t){i[t]=V(t,e,r)}));try{i.log('Debug logs enabled for "'+t+'" in hls.js version 1.6.2')}catch(e){return H()}n.forEach((function(t){Y[t]=V(t,e)}))}else o(Y,i);return i}var j=Y;function q(e){if(void 0===e&&(e=!0),"undefined"!=typeof self)return(e||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function X(e,t){var r=Object.keys(e),i=Object.keys(t),n=r.length,a=i.length;return!n||!a||n===a&&!r.some((function(e){return-1===i.indexOf(e)}))}function z(e,t){if(void 0===t&&(t=!1),"undefined"!=typeof TextDecoder){var r=new TextDecoder("utf-8").decode(e);if(t){var i=r.indexOf("\0");return-1!==i?r.substring(0,i):r}return r.replace(/\0/g,"")}for(var n,a,s,o=e.length,l="",u=0;u<o;){if(0===(n=e[u++])&&t)return l;if(0!==n&&3!==n)switch(n>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:l+=String.fromCharCode(n);break;case 12:case 13:a=e[u++],l+=String.fromCharCode((31&n)<<6|63&a);break;case 14:a=e[u++],s=e[u++],l+=String.fromCharCode((15&n)<<12|(63&a)<<6|(63&s)<<0)}}return l}var Q={hexDump:function(e){for(var t="",r=0;r<e.length;r++){var i=e[r].toString(16);i.length<2&&(i="0"+i),t+=i}return t}},$=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}},J="audio",Z="video",ee="audiovideo",te=function(){function e(e){var t,r,i;this._byteRange=null,this._url=null,this._stats=null,this._streams=null,this.base=void 0,this.relurl=void 0,"string"==typeof e&&(e={url:e}),this.base=e,(i=ae(t=this,r="stats"))&&(i.enumerable=!0,Object.defineProperty(t,r,i))}var t=e.prototype;return t.setByteRange=function(e,t){var r,i=e.split("@",2);r=1===i.length?(null==t?void 0:t.byteRangeEndOffset)||0:parseInt(i[1]),this._byteRange=[r,parseInt(i[0])+r]},t.clearElementaryStreamInfo=function(){var e=this.elementaryStreams;e[J]=null,e[Z]=null,e[ee]=null},n(e,[{key:"baseurl",get:function(){return this.base.url}},{key:"byteRange",get:function(){return null===this._byteRange?[]:this._byteRange}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"elementaryStreams",get:function(){var e;return null===this._streams&&(this._streams=((e={})[J]=null,e[Z]=null,e[ee]=null,e)),this._streams},set:function(e){this._streams=e}},{key:"hasStats",get:function(){return null!==this._stats}},{key:"hasStreams",get:function(){return null!==this._streams}},{key:"stats",get:function(){return null===this._stats&&(this._stats=new $),this._stats},set:function(e){this._stats=e}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=L.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(e){this._url=e}}])}();function re(e){return"initSegment"!==e.sn}var ie=function(e){function t(t,r){var i;return(i=e.call(this,r)||this)._decryptdata=null,i._programDateTime=null,i._ref=null,i._bitrate=void 0,i.rawProgramDateTime=null,i.tagList=[],i.duration=0,i.sn=0,i.levelkeys=void 0,i.type=void 0,i.loader=null,i.keyLoader=null,i.level=-1,i.cc=0,i.startPTS=void 0,i.endPTS=void 0,i.startDTS=void 0,i.endDTS=void 0,i.start=0,i.playlistOffset=0,i.deltaPTS=void 0,i.maxStartPTS=void 0,i.minEndPTS=void 0,i.data=void 0,i.bitrateTest=!1,i.title=null,i.initSegment=null,i.endList=void 0,i.gap=void 0,i.urlId=0,i.type=t,i}u(t,e);var r=t.prototype;return r.addStart=function(e){this.setStart(this.start+e)},r.setStart=function(e){this.start=e,this._ref&&(this._ref.start=e)},r.setDuration=function(e){this.duration=e,this._ref&&(this._ref.duration=e)},r.setKeyFormat=function(e){if(this.levelkeys){var t=this.levelkeys[e];t&&!this._decryptdata&&(this._decryptdata=t.getDecryptData(this.sn))}},r.abortRequests=function(){var e,t;null==(e=this.loader)||e.abort(),null==(t=this.keyLoader)||t.abort()},r.setElementaryStreamInfo=function(e,t,r,i,n,a){void 0===a&&(a=!1);var s=this.elementaryStreams,o=s[e];o?(o.startPTS=Math.min(o.startPTS,t),o.endPTS=Math.max(o.endPTS,r),o.startDTS=Math.min(o.startDTS,i),o.endDTS=Math.max(o.endDTS,n)):s[e]={startPTS:t,endPTS:r,startDTS:i,endDTS:n,partial:a}},n(t,[{key:"byteLength",get:function(){if(this.hasStats){var e=this.stats.total;if(e)return e}if(this.byteRange){var t=this.byteRange[0],r=this.byteRange[1];if(R(t)&&R(r))return r-t}return null}},{key:"bitrate",get:function(){return this.byteLength?8*this.byteLength/this.duration:this._bitrate?this._bitrate:null},set:function(e){this._bitrate=e}},{key:"decryptdata",get:function(){if(!this.levelkeys&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){var e=this.levelkeys.identity;if(e)this._decryptdata=e.getDecryptData(this.sn);else{var t=Object.keys(this.levelkeys);if(1===t.length)return this._decryptdata=this.levelkeys[t[0]].getDecryptData(this.sn)}}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;var e=R(this.duration)?this.duration:0;return this.programDateTime+1e3*e}},{key:"encrypted",get:function(){var e;if(null!=(e=this._decryptdata)&&e.encrypted)return!0;if(this.levelkeys){var t=Object.keys(this.levelkeys),r=t.length;if(r>1||1===r&&this.levelkeys[t[0]].encrypted)return!0}return!1}},{key:"programDateTime",get:function(){return null===this._programDateTime&&this.rawProgramDateTime&&(this.programDateTime=Date.parse(this.rawProgramDateTime)),this._programDateTime},set:function(e){R(e)?this._programDateTime=e:this._programDateTime=this.rawProgramDateTime=null}},{key:"ref",get:function(){return re(this)?(this._ref||(this._ref={base:this.base,start:this.start,duration:this.duration,sn:this.sn,programDateTime:this.programDateTime}),this._ref):null}}])}(te),ne=function(e){function t(t,r,i,n,a){var s;(s=e.call(this,i)||this).fragOffset=0,s.duration=0,s.gap=!1,s.independent=!1,s.relurl=void 0,s.fragment=void 0,s.index=void 0,s.duration=t.decimalFloatingPoint("DURATION"),s.gap=t.bool("GAP"),s.independent=t.bool("INDEPENDENT"),s.relurl=t.enumeratedString("URI"),s.fragment=r,s.index=n;var o=t.enumeratedString("BYTERANGE");return o&&s.setByteRange(o,a),a&&(s.fragOffset=a.fragOffset+a.duration),s}return u(t,e),n(t,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var e=this.elementaryStreams;return!!(e.audio||e.video||e.audiovideo)}}])}(te);function ae(e,t){var r=Object.getPrototypeOf(e);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i||ae(r,t)}}var se=Math.pow(2,32)-1,oe=[].push,le={video:1,audio:2,id3:3,text:4};function ue(e){return String.fromCharCode.apply(null,e)}function de(e,t){var r=e[t]<<8|e[t+1];return r<0?65536+r:r}function he(e,t){var r=ce(e,t);return r<0?4294967296+r:r}function fe(e,t){var r=he(e,t);return r*=Math.pow(2,32),r+=he(e,t+4)}function ce(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function ge(e,t,r){e[t]=r>>24,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r}function ve(e,t){var r=[];if(!t.length)return r;for(var i=e.byteLength,n=0;n<i;){var a=he(e,n),s=a>1?n+a:i;if(ue(e.subarray(n+4,n+8))===t[0])if(1===t.length)r.push(e.subarray(n+8,s));else{var o=ve(e.subarray(n+8,s),t.slice(1));o.length&&oe.apply(r,o)}n=s}return r}function me(e){var t=[],r=e[0],i=8,n=he(e,i);i+=4;var a=0,s=0;0===r?(a=he(e,i),s=he(e,i+4),i+=8):(a=fe(e,i),s=fe(e,i+8),i+=16),i+=2;var o=e.length+s,l=de(e,i);i+=2;for(var u=0;u<l;u++){var d=i,h=he(e,d);d+=4;var f=2147483647&h;if(1==(2147483648&h)>>>31)return j.warn("SIDX has hierarchical references (not supported)"),null;var c=he(e,d);d+=4,t.push({referenceSize:f,subsegmentDuration:c,info:{duration:c/n,start:o,end:o+f-1}}),o+=f,i=d+=4}return{earliestPresentationTime:a,timescale:n,version:r,referencesCount:l,references:t}}function pe(e){for(var t=[],r=ve(e,["moov","trak"]),i=0;i<r.length;i++){var n=r[i],a=ve(n,["tkhd"])[0];if(a){var s=a[0],o=he(a,0===s?12:20),l=ve(n,["mdia","mdhd"])[0];if(l){var u=he(l,0===(s=l[0])?12:20),d=ve(n,["mdia","hdlr"])[0];if(d){var h=ue(d.subarray(8,12)),c={soun:J,vide:Z}[h],g=ye(ve(n,["mdia","minf","stbl","stsd"])[0]);c?(t[o]={timescale:u,type:c,stsd:g},t[c]=f({timescale:u,id:o},g)):t[o]={timescale:u,type:h,stsd:g}}}}}return ve(e,["moov","mvex","trex"]).forEach((function(e){var r=he(e,4),i=t[r];i&&(i.default={duration:he(e,12),flags:he(e,20)})})),t}function ye(e){var t,r=e.subarray(8),i=r.subarray(86),n=ue(r.subarray(4,8)),a=n,s="enca"===n||"encv"===n;if(s){var o=ve(r,[n])[0];ve(o.subarray("enca"===n?28:78),["sinf"]).forEach((function(e){var t=ve(e,["schm"])[0];if(t){var r=ue(t.subarray(4,8));if("cbcs"===r||"cenc"===r){var i=ve(e,["frma"])[0];i&&(a=ue(i))}}}))}var l=a;switch(a){case"avc1":case"avc2":case"avc3":case"avc4":var u=ve(i,["avcC"])[0];u&&u.length>3&&(a+="."+Se(u[1])+Se(u[2])+Se(u[3]),t=Ee("avc1"===l?"dva1":"dvav",i));break;case"mp4a":var d=ve(r,[n])[0],h=ve(d.subarray(28),["esds"])[0];if(h&&h.length>7){var f=4;if(3!==h[f++])break;f=Te(h,f),f+=2;var c=h[f++];if(128&c&&(f+=2),64&c&&(f+=h[f++]),4!==h[f++])break;f=Te(h,f);var g=h[f++];if(64!==g)break;if(a+="."+Se(g),f+=12,5!==h[f++])break;f=Te(h,f);var v=h[f++],m=(248&v)>>3;31===m&&(m+=1+((7&v)<<3)+((224&h[f])>>5)),a+="."+m}break;case"hvc1":case"hev1":var p=ve(i,["hvcC"])[0];if(p&&p.length>12){var y=p[1],E=["","A","B","C"][y>>6],T=31&y,S=he(p,2),A=(32&y)>>5?"H":"L",L=p[12],R=p.subarray(6,12);a+="."+E+T,a+="."+S.toString(16).toUpperCase(),a+="."+A+L;for(var I="",b=R.length;b--;){var k=R[b];(k||I)&&(I="."+k.toString(16).toUpperCase()+I)}a+=I}t=Ee("hev1"==l?"dvhe":"dvh1",i);break;case"dvh1":case"dvhe":case"dvav":case"dva1":case"dav1":a=Ee(a,i)||a;break;case"vp09":var D=ve(i,["vpcC"])[0];if(D&&D.length>6){var _=D[4],P=D[5],C=D[6]>>4&15;a+="."+Ae(_)+"."+Ae(P)+"."+Ae(C)}break;case"av01":var w=ve(i,["av1C"])[0];if(w&&w.length>2){var O=w[1]>>>5,x=31&w[1],M=w[2]>>>7?"H":"M",F=(64&w[2])>>6,N=(32&w[2])>>5,U=2===O&&F?N?12:10:F?10:8,B=(16&w[2])>>4,G=(8&w[2])>>3,K=(4&w[2])>>2,H=3&w[2];a+="."+O+"."+Ae(x)+M+"."+Ae(U)+"."+B+"."+G+K+H+"."+Ae(1)+"."+Ae(1)+"."+Ae(1)+".0",t=Ee("dav1",i)}}return{codec:a,encrypted:s,supplemental:t}}function Ee(e,t){var r=ve(t,["dvvC"]),i=r.length?r[0]:ve(t,["dvcC"])[0];if(i){var n=i[2]>>1&127,a=i[2]<<5&32|i[3]>>3&31;return e+"."+Ae(n)+"."+Ae(a)}}function Te(e,t){for(var r=t+5;128&e[t++]&&t<r;);return t}function Se(e){return("0"+e.toString(16).toUpperCase()).slice(-2)}function Ae(e){return(e<10?"0":"")+e}function Le(e){var t=ve(e,["schm"])[0];if(t){var r=ue(t.subarray(4,8));if("cbcs"===r||"cenc"===r)return ve(e,["schi","tenc"])[0]}return null}function Re(e){var t=he(e,0),r=8;1&t&&(r+=4),4&t&&(r+=4);for(var i=0,n=he(e,4),a=0;a<n;a++)256&t&&(i+=he(e,r),r+=4),512&t&&(r+=4),1024&t&&(r+=4),2048&t&&(r+=4);return i}function Ie(e,t){var r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}function be(e,t){var r=[],i=t.samples,n=t.timescale,a=t.id,s=!1;return ve(i,["moof"]).map((function(o){var l=o.byteOffset-8;ve(o,["traf"]).map((function(o){var u=ve(o,["tfdt"]).map((function(e){var t=e[0],r=he(e,4);return 1===t&&(r*=Math.pow(2,32),r+=he(e,8)),r/n}))[0];return void 0!==u&&(e=u),ve(o,["tfhd"]).map((function(u){var d=he(u,4),h=16777215&he(u,0),f=0,c=0!=(16&h),g=0,v=0!=(32&h),m=8;d===a&&(0!=(1&h)&&(m+=8),0!=(2&h)&&(m+=4),0!=(8&h)&&(f=he(u,m),m+=4),c&&(g=he(u,m),m+=4),v&&(m+=4),"video"===t.type&&(s=ke(t.codec)),ve(o,["trun"]).map((function(a){var o=a[0],u=16777215&he(a,0),d=0!=(1&u),h=0,c=0!=(4&u),v=0!=(256&u),m=0,p=0!=(512&u),y=0,E=0!=(1024&u),T=0!=(2048&u),S=0,A=he(a,4),L=8;d&&(h=he(a,L),L+=4),c&&(L+=4);for(var R=h+l,I=0;I<A;I++){if(v?(m=he(a,L),L+=4):m=f,p?(y=he(a,L),L+=4):y=g,E&&(L+=4),T&&(S=0===o?he(a,L):ce(a,L),L+=4),t.type===Z)for(var b=0;b<y;){var k=he(i,R);De(s,i[R+=4])&&_e(i.subarray(R,R+k),s?2:1,e+S/n,r),R+=k,b+=k+4}e+=m/n}})))}))}))})),r}function ke(e){if(!e)return!1;var t=e.substring(0,4);return"hvc1"===t||"hev1"===t||"dvh1"===t||"dvhe"===t}function De(e,t){if(e){var r=t>>1&63;return 39===r||40===r}return 6==(31&t)}function _e(e,t,r,i){var n=Pe(e),a=0;a+=t;for(var s=0,o=0,l=0;a<n.length;){s=0;do{if(a>=n.length)break;s+=l=n[a++]}while(255===l);o=0;do{if(a>=n.length)break;o+=l=n[a++]}while(255===l);var u=n.length-a,d=a;if(o<u)a+=o;else if(o>u){j.error("Malformed SEI payload. "+o+" is too small, only "+u+" bytes left to parse.");break}if(4===s){if(181===n[d++]){var h=de(n,d);if(d+=2,49===h){var f=he(n,d);if(d+=4,1195456820===f){var c=n[d++];if(3===c){var g=n[d++],v=64&g,m=v?2+3*(31&g):0,p=new Uint8Array(m);if(v){p[0]=g;for(var y=1;y<m;y++)p[y]=n[d++]}i.push({type:c,payloadType:s,pts:r,bytes:p})}}}}}else if(5===s&&o>16){for(var E=[],T=0;T<16;T++){var S=n[d++].toString(16);E.push(1==S.length?"0"+S:S),3!==T&&5!==T&&7!==T&&9!==T||E.push("-")}for(var A=o-16,L=new Uint8Array(A),R=0;R<A;R++)L[R]=n[d++];i.push({payloadType:s,pts:r,uuid:E.join(""),userData:z(L),userDataBytes:L})}}}function Pe(e){for(var t=e.byteLength,r=[],i=1;i<t-2;)0===e[i]&&0===e[i+1]&&3===e[i+2]?(r.push(i+2),i+=2):i++;if(0===r.length)return e;var n=t-r.length,a=new Uint8Array(n),s=0;for(i=0;i<n;s++,i++)s===r[0]&&(s++,r.shift()),a[i]=e[s];return a}function Ce(e,t,r){if(16!==e.byteLength)throw new RangeError("Invalid system id");var i,n;i=new Uint8Array,n=new Uint8Array;var a=new Uint8Array(4);return r&&r.byteLength>0&&new DataView(a.buffer).setUint32(0,r.byteLength,!1),function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];for(var n=r.length,a=8,s=n;s--;)a+=r[s].byteLength;var o=new Uint8Array(a);for(o[0]=a>>24&255,o[1]=a>>16&255,o[2]=a>>8&255,o[3]=255&a,o.set(e,4),s=0,a=8;s<n;s++)o.set(r[s],a),a+=r[s].byteLength;return o}([112,115,115,104],new Uint8Array([0,0,0,0]),e,n,i,a,r||new Uint8Array)}function we(e){var t=e.getUint32(0),r=e.byteOffset,i=e.byteLength;if(i<t)return{offset:r,size:i};if(1886614376!==e.getUint32(4))return{offset:r,size:t};var n=e.getUint32(8)>>>24;if(0!==n&&1!==n)return{offset:r,size:t};var a=e.buffer,s=Q.hexDump(new Uint8Array(a,r+12,16)),o=e.getUint32(28),l=null,u=null;if(0===n){if(t-32<o||o<22)return{offset:r,size:t};u=new Uint8Array(a,r+32,o)}else if(1===n){if(!o||i<r+32+16*o+16)return{offset:r,size:t};l=[];for(var d=0;d<o;d++)l.push(new Uint8Array(a,r+32+16*d,16))}return{version:n,systemId:s,kids:l,data:u,offset:r,size:t}}var Oe=function(){return/\(Windows.+Firefox\//i.test(navigator.userAgent)},xe={audio:{a3ds:1,"ac-3":.95,"ac-4":1,alac:.9,alaw:1,dra1:1,"dts+":1,"dts-":1,dtsc:1,dtse:1,dtsh:1,"ec-3":.9,enca:1,fLaC:.9,flac:.9,FLAC:.9,g719:1,g726:1,m4ae:1,mha1:1,mha2:1,mhm1:1,mhm2:1,mlpa:1,mp4a:1,"raw ":1,Opus:1,opus:1,samr:1,sawb:1,sawp:1,sevc:1,sqcp:1,ssmv:1,twos:1,ulaw:1},video:{avc1:1,avc2:1,avc3:1,avc4:1,avcp:1,av01:.8,dav1:.8,drac:1,dva1:1,dvav:1,dvh1:.7,dvhe:.7,encv:1,hev1:.75,hvc1:.75,mjp2:1,mp4v:1,mvc1:1,mvc2:1,mvc3:1,mvc4:1,resv:1,rv60:1,s263:1,svc1:1,svc2:1,"vc-1":1,vp08:1,vp09:.9},text:{stpp:1,wvtt:1}};function Me(e,t){var r=xe[t];return!!r&&!!r[e.slice(0,4)]}function Fe(e,t,r){return void 0===r&&(r=!0),!e.split(",").some((function(e){return!Ne(e,t,r)}))}function Ne(e,t,r){var i;void 0===r&&(r=!0);var n=q(r);return null!=(i=null==n?void 0:n.isTypeSupported(Ue(e,t)))&&i}function Ue(e,t){return t+"/mp4;codecs="+e}function Be(e){if(e){var t=e.substring(0,4);return xe.video[t]}return 2}function Ge(e){var t=Oe();return e.split(",").reduce((function(e,r){var i=t&&ke(r)?9:xe.video[r];return i?(2*i+e)/(e?3:2):(xe.audio[r]+e)/(e?2:1)}),0)}var Ke={},He=/flac|opus|mp4a\.40\.34/i;function Ve(e,t){return void 0===t&&(t=!0),e.replace(He,(function(e){return function(e,t){if(void 0===t&&(t=!0),Ke[e])return Ke[e];for(var r={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"],"mp4a.40.34":["mp3"]}[e],i=0;i<r.length;i++){var n;if(Ne(r[i],"audio",t))return Ke[e]=r[i],r[i];if("mp3"===r[i]&&null!=(n=q(t))&&n.isTypeSupported("audio/mpeg"))return""}return e}(e.toLowerCase(),t)}))}function Ye(e,t){if(e&&(e.length>4||-1!==["ac-3","ec-3","alac","fLaC","Opus"].indexOf(e)))return e;if(t){var r=t.split(",");if(r.length>1){if(e)for(var i=r.length;i--;)if(r[i].substring(0,4)===e.substring(0,4))return r[i];return r[0]}}return t||e}function We(e){if(e.startsWith("av01.")){for(var t=e.split("."),r=["0","111","01","01","01","0"],i=t.length;i>4&&i<10;i++)t[i]=r[i-4];return t.join(".")}return e}function je(e){var t=q(e)||{isTypeSupported:function(){return!1}};return{mpeg:t.isTypeSupported("audio/mpeg"),mp3:t.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:t.isTypeSupported('audio/mp4; codecs="ac-3"')}}function qe(e){return e.replace(/^.+codecs=["']?([^"']+).*$/,"$1")}var Xe={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]};function ze(e,t){return{supported:!1,configurations:t,decodingInfoResults:[{supported:!1,smooth:!1,powerEfficient:!1}],error:e}}var Qe={};function $e(e,t,r){var i=e.videoCodec,n=e.audioCodec;if(!i&&!n||!r)return Promise.resolve(Xe);var a=[];if(i){var s={width:e.width,height:e.height,bitrate:Math.ceil(Math.max(.9*e.bitrate,e.averageBitrate)),framerate:e.frameRate||30},o=e.videoRange;"SDR"!==o&&(s.transferFunction=o.toLowerCase());var l=i.split(","),u=navigator.userAgent;if(l.some((function(e){return ke(e)}))&&Oe())return Promise.resolve(ze(new Error("Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent sting: ("+u+")"),a));a.push.apply(a,l.map((function(e){return{type:"media-source",video:f(f({},s),{},{contentType:Ue(We(e),"video")})}})))}return n&&e.audioGroups&&e.audioGroups.forEach((function(e){var r;e&&(null==(r=t.groups[e])||r.tracks.forEach((function(t){if(t.groupId===e){var r=t.channels||"",i=parseFloat(r);R(i)&&i>2&&a.push.apply(a,n.split(",").map((function(e){return{type:"media-source",audio:{contentType:Ue(e,"audio"),channels:""+i}}})))}})))})),Promise.all(a.map((function(e){var t=function(e){var t=e.audio,r=e.video,i=r||t;if(i){var n=qe(i.contentType);if(r)return"r"+r.height+"x"+r.width+"f"+Math.ceil(r.framerate)+(r.transferFunction||"sd")+"_"+n+"_"+Math.ceil(r.bitrate/1e5);if(t)return"c"+t.channels+(t.spatialRendering?"s":"n")+"_"+n}return""}(e);return Qe[t]||(Qe[t]=r.decodingInfo(e))}))).then((function(e){return{supported:!e.some((function(e){return!e.supported})),configurations:a,decodingInfoResults:e}})).catch((function(e){return{supported:!1,configurations:a,decodingInfoResults:[],error:e}}))}var Je=["NONE","TYPE-0","TYPE-1",null],Ze=["SDR","PQ","HLG"],et="",tt="YES",rt="v2";function it(e){var t=e.canSkipUntil,r=e.canSkipDateRanges,i=e.age;return t&&i<t/2?r?rt:tt:et}var nt=function(){function e(e,t,r){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=r}return e.prototype.addDirectives=function(e){var t=new self.URL(e);return void 0!==this.msn&&t.searchParams.set("_HLS_msn",this.msn.toString()),void 0!==this.part&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href},e}(),at=function(){function e(e){if(this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.url=void 0,this.frameRate=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.supplemental=void 0,this.videoCodec=void 0,this.width=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.supportedPromise=void 0,this.supportedResult=void 0,this._avgBitrate=0,this._audioGroups=void 0,this._subtitleGroups=void 0,this._urlId=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.frameRate=e.attrs.optionalFloat("FRAME-RATE",0),this._avgBitrate=e.attrs.decimalInteger("AVERAGE-BANDWIDTH"),this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.codecSet=[e.videoCodec,e.audioCodec].filter((function(e){return!!e})).map((function(e){return e.substring(0,4)})).join(","),"supplemental"in e){var t;this.supplemental=e.supplemental;var r=null==(t=e.supplemental)?void 0:t.videoCodec;r&&r!==e.videoCodec&&(this.codecSet+=","+r.substring(0,4))}this.addGroupId("audio",e.attrs.AUDIO),this.addGroupId("text",e.attrs.SUBTITLES)}var t=e.prototype;return t.hasAudioGroup=function(e){return st(this._audioGroups,e)},t.hasSubtitleGroup=function(e){return st(this._subtitleGroups,e)},t.addGroupId=function(e,t){if(t)if("audio"===e){var r=this._audioGroups;r||(r=this._audioGroups=[]),-1===r.indexOf(t)&&r.push(t)}else if("text"===e){var i=this._subtitleGroups;i||(i=this._subtitleGroups=[]),-1===i.indexOf(t)&&i.push(t)}},t.addFallback=function(){},n(e,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"averageBitrate",get:function(){return this._avgBitrate||this.realBitrate||this.bitrate}},{key:"attrs",get:function(){return this._attrs[0]}},{key:"codecs",get:function(){return this.attrs.CODECS||""}},{key:"pathwayId",get:function(){return this.attrs["PATHWAY-ID"]||"."}},{key:"videoRange",get:function(){return this.attrs["VIDEO-RANGE"]||"SDR"}},{key:"score",get:function(){return this.attrs.optionalFloat("SCORE",0)}},{key:"uri",get:function(){return this.url[0]||""}},{key:"audioGroups",get:function(){return this._audioGroups}},{key:"subtitleGroups",get:function(){return this._subtitleGroups}},{key:"urlId",get:function(){return 0},set:function(e){}},{key:"audioGroupIds",get:function(){return this.audioGroups?[this.audioGroupId]:void 0}},{key:"textGroupIds",get:function(){return this.subtitleGroups?[this.textGroupId]:void 0}},{key:"audioGroupId",get:function(){var e;return null==(e=this.audioGroups)?void 0:e[0]}},{key:"textGroupId",get:function(){var e;return null==(e=this.subtitleGroups)?void 0:e[0]}}])}();function st(e,t){return!(!t||!e)&&-1!==e.indexOf(t)}function ot(e,t){var r=!1,i=[];if(e&&(r="SDR"!==e,i=[e]),t){var n="SDR"!==(i=t.allowedVideoRanges||Ze.slice(0)).join("")&&!t.videoCodec;(r=void 0!==t.preferHDR?t.preferHDR:n&&function(){if("function"==typeof matchMedia){var e=matchMedia("(dynamic-range: high)"),t=matchMedia("bad query");if(e.media!==t.media)return!0===e.matches}return!1}())||(i=["SDR"])}return{preferHDR:r,allowedVideoRanges:i}}var lt=function(e,t){return JSON.stringify(e,function(e){var t=new WeakSet;return function(r,i){if(e&&(i=e(r,i)),"object"==typeof i&&null!==i){if(t.has(i))return;t.add(i)}return i}}(t))};function ut(e,t){j.log('[abr] start candidates with "'+e+'" ignored because '+t)}function dt(e){return e.reduce((function(e,t){var r=e.groups[t.groupId];r||(r=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),r.tracks.push(t);var i=t.channels||"2";return r.channels[i]=(r.channels[i]||0)+1,r.hasDefault=r.hasDefault||t.default,r.hasAutoSelect=r.hasAutoSelect||t.autoselect,r.hasDefault&&(e.hasDefaultAudio=!0),r.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e}),{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}function ht(e){if(!e)return e;var t=e;return{lang:t.lang,assocLang:t.assocLang,characteristics:t.characteristics,channels:t.channels,audioCodec:t.audioCodec}}function ft(e,t,r){if("attrs"in e){var i=t.indexOf(e);if(-1!==i)return i}for(var n=0;n<t.length;n++)if(ct(e,t[n],r))return n;return-1}function ct(e,t,r){var i,n,a=e.groupId,s=e.name,o=e.lang,l=e.assocLang,u=e.default,d=e.forced;return(void 0===a||t.groupId===a)&&(void 0===s||t.name===s)&&(void 0===o||(i=o,void 0===(n=t.lang)&&(n="--"),i.length===n.length?i===n:i.startsWith(n)||n.startsWith(i)))&&(void 0===o||t.assocLang===l)&&(void 0===u||t.default===u)&&(void 0===d||t.forced===d)&&(!("characteristics"in e)||function(e,t){void 0===t&&(t="");var r=e.split(","),i=t.split(",");return r.length===i.length&&!r.some((function(e){return-1===i.indexOf(e)}))}(e.characteristics||"",t.characteristics))&&(void 0===r||r(e,t))}function gt(e,t){var r=e.audioCodec,i=e.channels;return!(void 0!==r&&(t.audioCodec||"").substring(0,4)!==r.substring(0,4)||void 0!==i&&i!==(t.channels||"2"))}function vt(e,t,r){for(var i=t;i>-1;i--)if(r(e[i]))return i;for(var n=t+1;n<e.length;n++)if(r(e[n]))return n;return-1}function mt(e,t){var r;return!!e&&e!==(null==(r=t.loadLevelObj)?void 0:r.uri)}var pt=function(e){function t(t){var r;return(r=e.call(this,"abr",t.logger)||this).hls=void 0,r.lastLevelLoadSec=0,r.lastLoadedFragLevel=-1,r.firstSelection=-1,r._nextAutoLevel=-1,r.nextAutoLevelKey="",r.audioTracksByGroup=null,r.codecTiers=null,r.timer=-1,r.fragCurrent=null,r.partCurrent=null,r.bitrateTestDelay=0,r.rebufferNotice=-1,r.bwEstimator=void 0,r._abandonRulesCheck=function(e){var t,i=r,n=i.fragCurrent,a=i.partCurrent,s=i.hls,o=s.autoLevelEnabled,l=s.media;if(n&&l){var u=performance.now(),d=a?a.stats:n.stats,h=a?a.duration:n.duration,f=u-d.loading.start,c=s.minAutoLevel,g=n.level,v=r._nextAutoLevel;if(d.aborted||d.loaded&&d.loaded===d.total||g<=c)return r.clearTimer(),void(r._nextAutoLevel=-1);if(o){var m=v>-1&&v!==g,p=!!e||m;if(p||!l.paused&&l.playbackRate&&l.readyState){var y=s.mainForwardBufferInfo;if(p||null!==y){var E=r.bwEstimator.getEstimateTTFB(),T=Math.abs(l.playbackRate);if(!(f<=Math.max(E,h/(2*T)*1e3))){var S=y?y.len/T:0,A=d.loading.first?d.loading.first-d.loading.start:-1,L=d.loaded&&A>-1,I=r.getBwEstimate(),b=s.levels,k=b[g],D=Math.max(d.loaded,Math.round(h*(n.bitrate||k.averageBitrate)/8)),P=L?f-A:f;P<1&&L&&(P=Math.min(f,8*d.loaded/I));var C=L?1e3*d.loaded/P:0,w=E/1e3,O=C?(D-d.loaded)/C:8*D/I+w;if(!(O<=S)){var x,M=C?8*C:I,F=!0===(null==(t=(null==e?void 0:e.details)||r.hls.latestLevelDetails)?void 0:t.live),N=r.hls.config.abrBandWidthUpFactor,U=Number.POSITIVE_INFINITY;for(x=g-1;x>c;x--){var B=b[x].maxBitrate,G=!b[x].details||F;if((U=r.getTimeToLoadFrag(w,M,h*B,G))<Math.min(S,h+w))break}if(!(U>=O||U>10*h)){L?r.bwEstimator.sample(f-Math.min(E,A),d.loaded):r.bwEstimator.sampleTTFB(f);var K=b[x].maxBitrate;r.getBwEstimate()*N>K&&r.resetEstimator(K);var H=r.findBestLevel(K,c,x,0,S,1,1);H>-1&&(x=H),r.warn("Fragment "+n.sn+(a?" part "+a.index:"")+" of level "+g+" is loading too slowly;\n Fragment duration: "+n.duration.toFixed(3)+"\n Time to underbuffer: "+S.toFixed(3)+" s\n Estimated load time for current fragment: "+O.toFixed(3)+" s\n Estimated load time for down switch fragment: "+U.toFixed(3)+" s\n TTFB estimate: "+(0|A)+" ms\n Current BW estimate: "+(R(I)?0|I:"Unknown")+" bps\n New BW estimate: "+(0|r.getBwEstimate())+" bps\n Switching to level "+x+" @ "+(0|K)+" bps"),s.nextLoadLevel=s.nextAutoLevel=x,r.clearTimer();var V=function(){if(r.clearTimer(),r.fragCurrent===n&&r.hls.loadLevel===x&&x>0){var e=r.getStarvationDelay();if(r.warn("Aborting inflight request "+(x>0?"and switching down":"")+"\n Fragment duration: "+n.duration.toFixed(3)+" s\n Time to underbuffer: "+e.toFixed(3)+" s"),n.abortRequests(),r.fragCurrent=r.partCurrent=null,x>c){var t=r.findBestLevel(r.hls.levels[c].bitrate,c,x,0,e,1,1);-1===t&&(t=c),r.hls.nextLoadLevel=r.hls.nextAutoLevel=t,r.resetEstimator(r.hls.levels[t].bitrate)}}};m||O>2*U?V():r.timer=self.setInterval(V,1e3*U),s.trigger(_.FRAG_LOAD_EMERGENCY_ABORTED,{frag:n,part:a,stats:d})}}}}}}}},r.hls=t,r.bwEstimator=r.initEstimator(),r.registerListeners(),r}u(t,e);var r=t.prototype;return r.resetEstimator=function(e){e&&(this.log("setting initial bwe to "+e),this.hls.config.abrEwmaDefaultEstimate=e),this.firstSelection=-1,this.bwEstimator=this.initEstimator()},r.initEstimator=function(){var e=this.hls.config;return new U(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)},r.registerListeners=function(){var e=this.hls;e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.FRAG_LOADING,this.onFragLoading,this),e.on(_.FRAG_LOADED,this.onFragLoaded,this),e.on(_.FRAG_BUFFERED,this.onFragBuffered,this),e.on(_.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(_.LEVEL_LOADED,this.onLevelLoaded,this),e.on(_.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(_.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(_.ERROR,this.onError,this)},r.unregisterListeners=function(){var e=this.hls;e&&(e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.FRAG_LOADING,this.onFragLoading,this),e.off(_.FRAG_LOADED,this.onFragLoaded,this),e.off(_.FRAG_BUFFERED,this.onFragBuffered,this),e.off(_.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(_.LEVEL_LOADED,this.onLevelLoaded,this),e.off(_.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(_.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(_.ERROR,this.onError,this))},r.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=null,this.fragCurrent=this.partCurrent=null},r.onManifestLoading=function(e,t){this.lastLoadedFragLevel=-1,this.firstSelection=-1,this.lastLevelLoadSec=0,this.fragCurrent=this.partCurrent=null,this.onLevelsUpdated(),this.clearTimer()},r.onLevelsUpdated=function(){this.lastLoadedFragLevel>-1&&this.fragCurrent&&(this.lastLoadedFragLevel=this.fragCurrent.level),this._nextAutoLevel=-1,this.onMaxAutoLevelUpdated(),this.codecTiers=null,this.audioTracksByGroup=null},r.onMaxAutoLevelUpdated=function(){this.firstSelection=-1,this.nextAutoLevelKey=""},r.onFragLoading=function(e,t){var r,i=t.frag;this.ignoreFragment(i)||(i.bitrateTest||(this.fragCurrent=i,this.partCurrent=null!=(r=t.part)?r:null),this.clearTimer(),this.timer=self.setInterval(this._abandonRulesCheck,100))},r.onLevelSwitching=function(e,t){this.clearTimer()},r.onError=function(e,t){if(!t.fatal)switch(t.details){case D.BUFFER_ADD_CODEC_ERROR:case D.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case D.FRAG_LOAD_TIMEOUT:var r=t.frag,i=this.fragCurrent,n=this.partCurrent;if(r&&i&&r.sn===i.sn&&r.level===i.level){var a=performance.now(),s=n?n.stats:r.stats,o=a-s.loading.start,l=s.loading.first?s.loading.first-s.loading.start:-1;if(s.loaded&&l>-1){var u=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(o-Math.min(u,l),s.loaded)}else this.bwEstimator.sampleTTFB(o)}}},r.getTimeToLoadFrag=function(e,t,r,i){return e+r/t+(i?e+this.lastLevelLoadSec:0)},r.onLevelLoaded=function(e,t){var r=this.hls.config,i=t.stats.loading,n=i.end-i.first;R(n)&&(this.lastLevelLoadSec=n/1e3),t.details.live?this.bwEstimator.update(r.abrEwmaSlowLive,r.abrEwmaFastLive):this.bwEstimator.update(r.abrEwmaSlowVoD,r.abrEwmaFastVoD),this.timer>-1&&this._abandonRulesCheck(t.levelInfo)},r.onFragLoaded=function(e,t){var r=t.frag,i=t.part,n=i?i.stats:r.stats;if(r.type===x&&this.bwEstimator.sampleTTFB(n.loading.first-n.loading.start),!this.ignoreFragment(r)){if(this.clearTimer(),r.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){var a=i?i.duration:r.duration,s=this.hls.levels[r.level],o=(s.loaded?s.loaded.bytes:0)+n.loaded,l=(s.loaded?s.loaded.duration:0)+a;s.loaded={bytes:o,duration:l},s.realBitrate=Math.round(8*o/l)}if(r.bitrateTest){var u={stats:n,frag:r,part:i,id:r.type};this.onFragBuffered(_.FRAG_BUFFERED,u),r.bitrateTest=!1}else this.lastLoadedFragLevel=r.level}},r.onFragBuffered=function(e,t){var r=t.frag,i=t.part,n=null!=i&&i.stats.loaded?i.stats:r.stats;if(!n.aborted&&!this.ignoreFragment(r)){var a=n.parsing.end-n.loading.start-Math.min(n.loading.first-n.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(a,n.loaded),n.bwEstimate=this.getBwEstimate(),r.bitrateTest?this.bitrateTestDelay=a/1e3:this.bitrateTestDelay=0}},r.ignoreFragment=function(e){return e.type!==x||"initSegment"===e.sn},r.clearTimer=function(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)},r.getAutoLevelKey=function(){return this.getBwEstimate()+"_"+this.getStarvationDelay().toFixed(2)},r.getNextABRAutoLevel=function(){var e=this.fragCurrent,t=this.partCurrent,r=this.hls;if(r.levels.length<=1)return r.loadLevel;var i=r.maxAutoLevel,n=r.config,a=r.minAutoLevel,s=t?t.duration:e?e.duration:0,o=this.getBwEstimate(),l=this.getStarvationDelay(),u=n.abrBandWidthFactor,d=n.abrBandWidthUpFactor;if(l){var h=this.findBestLevel(o,a,i,l,0,u,d);if(h>=0)return this.rebufferNotice=-1,h}var f=s?Math.min(s,n.maxStarvationDelay):n.maxStarvationDelay;if(!l){var c=this.bitrateTestDelay;c&&(f=(s?Math.min(s,n.maxLoadingDelay):n.maxLoadingDelay)-c,this.info("bitrate test took "+Math.round(1e3*c)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*f)+" ms"),u=d=1)}var g=this.findBestLevel(o,a,i,l,f,u,d);if(this.rebufferNotice!==g&&(this.rebufferNotice=g,this.info((l?"rebuffering expected":"buffer is empty")+", optimal quality level "+g)),g>-1)return g;var v=r.levels[a],m=r.loadLevelObj;return m&&(null==v?void 0:v.bitrate)<m.bitrate?a:r.loadLevel},r.getStarvationDelay=function(){var e=this.hls,t=e.media;if(!t)return 1/0;var r=t&&0!==t.playbackRate?Math.abs(t.playbackRate):1,i=e.mainForwardBufferInfo;return(i?i.len:0)/r},r.getBwEstimate=function(){return this.bwEstimator.canEstimate()?this.bwEstimator.getEstimate():this.hls.config.abrEwmaDefaultEstimate},r.findBestLevel=function(e,t,r,i,n,a,s){var o,l=this,u=i+n,d=this.lastLoadedFragLevel,h=-1===d?this.hls.firstLevel:d,f=this.fragCurrent,c=this.partCurrent,g=this.hls,v=g.levels,m=g.allAudioTracks,p=g.loadLevel,y=g.config;if(1===v.length)return 0;var E,T=v[h],S=!(null==(o=this.hls.latestLevelDetails)||!o.live),A=-1===p||-1===d,L="SDR",I=(null==T?void 0:T.frameRate)||0,b=y.audioPreference,k=y.videoPreference,D=this.audioTracksByGroup||(this.audioTracksByGroup=dt(m)),_=-1;if(A){if(-1!==this.firstSelection)return this.firstSelection;var P=this.codecTiers||(this.codecTiers=function(e,t,r,i){return e.slice(r,i+1).reduce((function(e,r,i){if(!r.codecSet)return e;var n=r.audioGroups,a=e[r.codecSet];a||(e[r.codecSet]=a={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,minIndex:i,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!n,fragmentError:0}),a.minBitrate=Math.min(a.minBitrate,r.bitrate);var s=Math.min(r.height,r.width);return a.minHeight=Math.min(a.minHeight,s),a.minFramerate=Math.min(a.minFramerate,r.frameRate),a.minIndex=Math.min(a.minIndex,i),a.maxScore=Math.max(a.maxScore,r.score),a.fragmentError+=r.fragmentError,a.videoRanges[r.videoRange]=(a.videoRanges[r.videoRange]||0)+1,n&&n.forEach((function(e){if(e){var r=t.groups[e];r&&(a.hasDefaultAudio=a.hasDefaultAudio||t.hasDefaultAudio?r.hasDefault:r.hasAutoSelect||!t.hasDefaultAudio&&!t.hasAutoSelectAudio,Object.keys(r.channels).forEach((function(e){a.channels[e]=(a.channels[e]||0)+r.channels[e]})))}})),e}),{})}(v,D,t,r)),C=function(e,t,r,i,n){for(var a=Object.keys(e),s=null==i?void 0:i.channels,o=null==i?void 0:i.audioCodec,l=null==n?void 0:n.videoCodec,u=s&&2===parseInt(s),d=!1,h=!1,f=1/0,c=1/0,g=1/0,v=1/0,m=0,p=[],y=ot(t,n),E=y.preferHDR,T=y.allowedVideoRanges,S=function(){var t=e[a[A]];d||(d=t.channels[2]>0),f=Math.min(f,t.minHeight),c=Math.min(c,t.minFramerate),g=Math.min(g,t.minBitrate),T.filter((function(e){return t.videoRanges[e]>0})).length>0&&(h=!0)},A=a.length;A--;)S();f=R(f)?f:0,c=R(c)?c:0;var L=Math.max(1080,f),I=Math.max(30,c);g=R(g)?g:r,r=Math.max(g,r),h||(t=void 0);var b=a.length>1;return{codecSet:a.reduce((function(t,i){var n=e[i];if(i===t)return t;if(p=h?T.filter((function(e){return n.videoRanges[e]>0})):[],b){if(n.minBitrate>r)return ut(i,"min bitrate of "+n.minBitrate+" > current estimate of "+r),t;if(!n.hasDefaultAudio)return ut(i,"no renditions with default or auto-select sound found"),t;if(o&&i.indexOf(o.substring(0,4))%5!=0)return ut(i,'audio codec preference "'+o+'" not found'),t;if(s&&!u){if(!n.channels[s])return ut(i,"no renditions with "+s+" channel sound found (channels options: "+Object.keys(n.channels)+")"),t}else if((!o||u)&&d&&0===n.channels[2])return ut(i,"no renditions with stereo sound found"),t;if(n.minHeight>L)return ut(i,"min resolution of "+n.minHeight+" > maximum of "+L),t;if(n.minFramerate>I)return ut(i,"min framerate of "+n.minFramerate+" > maximum of "+I),t;if(!p.some((function(e){return n.videoRanges[e]>0})))return ut(i,"no variants with VIDEO-RANGE of "+lt(p)+" found"),t;if(l&&i.indexOf(l.substring(0,4))%5!=0)return ut(i,'video codec preference "'+l+'" not found'),t;if(n.maxScore<m)return ut(i,"max score of "+n.maxScore+" < selected max of "+m),t}return t&&(Ge(i)>=Ge(t)||n.fragmentError>e[t].fragmentError)?t:(v=n.minIndex,m=n.maxScore,i)}),void 0),videoRanges:p,preferHDR:E,minFramerate:c,minBitrate:g,minIndex:v}}(P,L,e,b,k),w=C.codecSet,O=C.videoRanges,x=C.minFramerate,M=C.minBitrate,F=C.minIndex,N=C.preferHDR;_=F,E=w,L=N?O[O.length-1]:O[0],I=x,e=Math.max(e,M),this.log("picked start tier "+lt(C))}else E=null==T?void 0:T.codecSet,L=null==T?void 0:T.videoRange;for(var U,B=c?c.duration:f?f.duration:0,G=this.bwEstimator.getEstimateTTFB()/1e3,K=[],H=function(){var t,o=v[V],f=V>h;if(!o)return 0;if(y.useMediaCapabilities&&!o.supportedResult&&!o.supportedPromise){var g=navigator.mediaCapabilities;"function"==typeof(null==g?void 0:g.decodingInfo)&&(function(e,t,r,i,n,a){var s=e.audioCodec?e.audioGroups:null,o=null==a?void 0:a.audioCodec,l=null==a?void 0:a.channels,u=l?parseInt(l):o?1/0:2,d=null;if(null!=s&&s.length)try{d=1===s.length&&s[0]?t.groups[s[0]].channels:s.reduce((function(e,r){if(r){var i=t.groups[r];if(!i)throw new Error("Audio track group "+r+" not found");Object.keys(i.channels).forEach((function(t){e[t]=(e[t]||0)+i.channels[t]}))}return e}),{2:0})}catch(e){return!0}return void 0!==e.videoCodec&&(e.width>1920&&e.height>1088||e.height>1920&&e.width>1088||e.frameRate>Math.max(i,30)||"SDR"!==e.videoRange&&e.videoRange!==r||e.bitrate>Math.max(n,8e6))||!!d&&R(u)&&Object.keys(d).some((function(e){return parseInt(e)>u}))}(o,D,L,I,e,b)||ke(o.videoCodec))?(o.supportedPromise=$e(o,D,g),o.supportedPromise.then((function(e){if(l.hls){o.supportedResult=e;var t=l.hls.levels,r=t.indexOf(o);e.error?l.warn('MediaCapabilities decodingInfo error: "'+e.error+'" for level '+r+" "+lt(e)):e.supported||(l.warn("Unsupported MediaCapabilities decodingInfo result for level "+r+" "+lt(e)),r>-1&&t.length>1&&(l.log("Removing unsupported level "+r),l.hls.removeLevel(r),-1===l.hls.loadLevel&&(l.hls.nextLoadLevel=0)))}}))):o.supportedResult=Xe}if((E&&o.codecSet!==E||L&&o.videoRange!==L||f&&I>o.frameRate||!f&&I>0&&I<o.frameRate||o.supportedResult&&(null==(t=o.supportedResult.decodingInfoResults)||!t[0].smooth))&&(!A||V!==_))return K.push(V),0;var m,T=o.details,k=(c?null==T?void 0:T.partTarget:null==T?void 0:T.averagetargetduration)||B;m=f?s*e:a*e;var P=B&&i>=2*B&&0===n?o.averageBitrate:o.maxBitrate,C=l.getTimeToLoadFrag(G,m,P*k,void 0===T);if(m>=P&&(V===d||0===o.loadError&&0===o.fragmentError)&&(C<=G||!R(C)||S&&!l.bitrateTestDelay||C<u)){var w=l.forcedAutoLevel;return V===p||-1!==w&&w===p||(K.length&&l.trace("Skipped level(s) "+K.join(",")+" of "+r+' max with CODECS and VIDEO-RANGE:"'+v[K[0]].codecs+'" '+v[K[0]].videoRange+'; not compatible with "'+E+'" '+L),l.info("switch candidate:"+h+"->"+V+" adjustedbw("+Math.round(m)+")-bitrate="+Math.round(m-P)+" ttfb:"+G.toFixed(1)+" avgDuration:"+k.toFixed(1)+" maxFetchDuration:"+u.toFixed(1)+" fetchDuration:"+C.toFixed(1)+" firstSelection:"+A+" codecSet:"+o.codecSet+" videoRange:"+o.videoRange+" hls.loadLevel:"+p)),A&&(l.firstSelection=V),{v:V}}},V=r;V>=t;V--)if(0!==(U=H())&&U)return U.v;return-1},r.deriveNextAutoLevel=function(e){var t=this.hls,r=t.maxAutoLevel,i=t.minAutoLevel;return Math.min(Math.max(e,i),r)},n(t,[{key:"firstAutoLevel",get:function(){var e=this.hls,t=e.maxAutoLevel,r=e.minAutoLevel,i=this.getBwEstimate(),n=this.hls.config.maxStarvationDelay,a=this.findBestLevel(i,r,t,0,n,1,1);if(a>-1)return a;var s=this.hls.firstLevel,o=Math.min(Math.max(s,r),t);return this.warn("Could not find best starting auto level. Defaulting to first in playlist "+s+" clamped to "+o),o}},{key:"forcedAutoLevel",get:function(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}},{key:"nextAutoLevel",get:function(){var e=this.forcedAutoLevel,t=this.bwEstimator.canEstimate(),r=this.lastLoadedFragLevel>-1;if(!(-1===e||t&&r&&this.nextAutoLevelKey!==this.getAutoLevelKey()))return e;var i=t&&r?this.getNextABRAutoLevel():this.firstAutoLevel;if(-1!==e){var n=this.hls.levels;if(n.length>Math.max(e,i)&&n[e].loadError<=n[i].loadError)return e}return this._nextAutoLevel=i,this.nextAutoLevelKey=this.getAutoLevelKey(),i},set:function(e){var t=this.deriveNextAutoLevel(e);this._nextAutoLevel!==t&&(this.nextAutoLevelKey="",this._nextAutoLevel=t)}}])}(B),yt=function(e,t){for(var r=0,i=e.length-1,n=null,a=null;r<=i;){var s=t(a=e[n=(r+i)/2|0]);if(s>0)r=n+1;else{if(!(s<0))return a;i=n-1}}return null};function Et(e,t,r,i,n){void 0===r&&(r=0),void 0===i&&(i=0),void 0===n&&(n=.005);var a=null;if(e){a=t[1+e.sn-t[0].sn]||null;var s=e.endDTS-r;s>0&&s<15e-7&&(r+=15e-7),a&&e.level!==a.level&&a.end<=e.end&&(a=t[2+e.sn-t[0].sn]||null)}else 0===r&&0===t[0].start&&(a=t[0]);if(a&&((!e||e.level===a.level)&&0===Tt(r,i,a)||function(e,t,r){if(t&&0===t.start&&t.level<e.level&&(t.endPTS||0)>0){var i=t.tagList.reduce((function(e,t){return"INF"===t[0]&&(e+=parseFloat(t[1])),e}),r);return e.start<=i}return!1}(a,e,Math.min(n,i))))return a;var o=yt(t,Tt.bind(null,r,i));return!o||o===e&&a?a:o}function Tt(e,t,r){if(void 0===e&&(e=0),void 0===t&&(t=0),r.start<=e&&r.start+r.duration>e)return 0;var i=Math.min(t,r.duration+(r.deltaPTS?r.deltaPTS:0));return r.start+r.duration-i<=e?1:r.start-i>e&&r.start?-1:0}function St(e,t,r){var i=1e3*Math.min(t,r.duration+(r.deltaPTS?r.deltaPTS:0));return(r.endProgramDateTime||0)-i>e}function At(e,t){return yt(e,(function(e){return e.cc<t?1:e.cc>t?-1:0}))}function Lt(e){switch(e.details){case D.FRAG_LOAD_TIMEOUT:case D.KEY_LOAD_TIMEOUT:case D.LEVEL_LOAD_TIMEOUT:case D.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function Rt(e,t){var r=Lt(t);return e.default[(r?"timeout":"error")+"Retry"]}function It(e,t){var r="linear"===e.backoff?1:Math.pow(2,t);return Math.min(r*e.retryDelayMs,e.maxRetryDelayMs)}function bt(e){return f(f({},e),{errorRetry:null,timeoutRetry:null})}function kt(e,t,r,i){if(!e)return!1;var n=null==i?void 0:i.code,a=t<e.maxNumRetry&&(function(e){return 0===e&&!1===navigator.onLine||!!e&&(e<400||e>499)}(n)||!!r);return e.shouldRetry?e.shouldRetry(e,t,r,i,a):a}var Dt=0,_t=2,Pt=3,Ct=5,wt=0,Ot=1,xt=2,Mt=function(e){function t(t){var r;return(r=e.call(this,"error-controller",t.logger)||this).hls=void 0,r.playlistError=0,r.penalizedRenditions={},r.hls=t,r.registerListeners(),r}u(t,e);var r=t.prototype;return r.registerListeners=function(){var e=this.hls;e.on(_.ERROR,this.onError,this),e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.LEVEL_UPDATED,this.onLevelUpdated,this)},r.unregisterListeners=function(){var e=this.hls;e&&(e.off(_.ERROR,this.onError,this),e.off(_.ERROR,this.onErrorOut,this),e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.LEVEL_UPDATED,this.onLevelUpdated,this))},r.destroy=function(){this.unregisterListeners(),this.hls=null,this.penalizedRenditions={}},r.startLoad=function(e){},r.stopLoad=function(){this.playlistError=0},r.getVariantLevelIndex=function(e){return(null==e?void 0:e.type)===x?e.level:this.hls.loadLevel},r.onManifestLoading=function(){this.playlistError=0,this.penalizedRenditions={}},r.onLevelUpdated=function(){this.playlistError=0},r.onError=function(e,t){var r;if(!t.fatal){var i=this.hls,n=t.context;switch(t.details){case D.FRAG_LOAD_ERROR:case D.FRAG_LOAD_TIMEOUT:case D.KEY_LOAD_ERROR:case D.KEY_LOAD_TIMEOUT:return void(t.errorAction=this.getFragRetryOrSwitchAction(t));case D.FRAG_PARSING_ERROR:if(null!=(r=t.frag)&&r.gap)return void(t.errorAction=Ft());case D.FRAG_GAP:case D.FRAG_DECRYPT_ERROR:return t.errorAction=this.getFragRetryOrSwitchAction(t),void(t.errorAction.action=_t);case D.LEVEL_EMPTY_ERROR:case D.LEVEL_PARSING_ERROR:var a,s,o=t.parent===x?t.level:i.loadLevel;return void(t.details===D.LEVEL_EMPTY_ERROR&&null!=(a=t.context)&&null!=(s=a.levelDetails)&&s.live?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,o):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,o)));case D.LEVEL_LOAD_ERROR:case D.LEVEL_LOAD_TIMEOUT:return void("number"==typeof(null==n?void 0:n.level)&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,n.level)));case D.AUDIO_TRACK_LOAD_ERROR:case D.AUDIO_TRACK_LOAD_TIMEOUT:case D.SUBTITLE_LOAD_ERROR:case D.SUBTITLE_TRACK_LOAD_TIMEOUT:if(n){var l=i.loadLevelObj;if(l&&(n.type===w&&l.hasAudioGroup(n.groupId)||n.type===O&&l.hasSubtitleGroup(n.groupId)))return t.errorAction=this.getPlaylistRetryOrSwitchAction(t,i.loadLevel),t.errorAction.action=_t,void(t.errorAction.flags=Ot)}return;case D.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:var u=i.loadLevelObj,d=null==u?void 0:u.attrs["HDCP-LEVEL"];return void(d?t.errorAction={action:_t,flags:xt,hdcpLevel:d}:this.keySystemError(t));case D.BUFFER_ADD_CODEC_ERROR:case D.REMUX_ALLOC_ERROR:case D.BUFFER_APPEND_ERROR:var h;return void(t.errorAction||(t.errorAction=this.getLevelSwitchAction(t,null!=(h=t.level)?h:i.loadLevel)));case D.INTERNAL_EXCEPTION:case D.BUFFER_APPENDING_ERROR:case D.BUFFER_FULL_ERROR:case D.LEVEL_SWITCH_ERROR:case D.BUFFER_STALLED_ERROR:case D.BUFFER_SEEK_OVER_HOLE:case D.BUFFER_NUDGE_ON_STALL:return void(t.errorAction=Ft())}t.type===k.KEY_SYSTEM_ERROR&&this.keySystemError(t)}},r.keySystemError=function(e){var t=this.getVariantLevelIndex(e.frag);e.levelRetry=!1,e.errorAction=this.getLevelSwitchAction(e,t)},r.getPlaylistRetryOrSwitchAction=function(e,t){var r=Rt(this.hls.config.playlistLoadPolicy,e),i=this.playlistError++;if(kt(r,i,Lt(e),e.response))return{action:Ct,flags:wt,retryConfig:r,retryCount:i};var n=this.getLevelSwitchAction(e,t);return r&&(n.retryConfig=r,n.retryCount=i),n},r.getFragRetryOrSwitchAction=function(e){var t=this.hls,r=this.getVariantLevelIndex(e.frag),i=t.levels[r],n=t.config,a=n.fragLoadPolicy,s=n.keyLoadPolicy,o=Rt(e.details.startsWith("key")?s:a,e),l=t.levels.reduce((function(e,t){return e+t.fragmentError}),0);if(i&&(e.details!==D.FRAG_GAP&&i.fragmentError++,kt(o,l,Lt(e),e.response)))return{action:Ct,flags:wt,retryConfig:o,retryCount:l};var u=this.getLevelSwitchAction(e,r);return o&&(u.retryConfig=o,u.retryCount=l),u},r.getLevelSwitchAction=function(e,t){var r=this.hls;null==t&&(t=r.loadLevel);var i=this.hls.levels[t];if(i){var n,a,s=e.details;i.loadError++,s===D.BUFFER_APPEND_ERROR&&i.fragmentError++;var o=-1,l=r.levels,u=r.loadLevel,d=r.minAutoLevel,h=r.maxAutoLevel;r.autoLevelEnabled||(r.loadLevel=-1);for(var f,c=null==(n=e.frag)?void 0:n.type,g=(c===M&&s===D.FRAG_PARSING_ERROR||"audio"===e.sourceBufferName&&(s===D.BUFFER_ADD_CODEC_ERROR||s===D.BUFFER_APPEND_ERROR))&&l.some((function(e){var t=e.audioCodec;return i.audioCodec!==t})),v="video"===e.sourceBufferName&&(s===D.BUFFER_ADD_CODEC_ERROR||s===D.BUFFER_APPEND_ERROR)&&l.some((function(e){var t=e.codecSet,r=e.audioCodec;return i.codecSet!==t&&i.audioCodec===r})),m=null!=(a=e.context)?a:{},p=m.type,y=m.groupId,E=function(){var t=(T+u)%l.length;if(t!==u&&t>=d&&t<=h&&0===l[t].loadError){var r,n,a=l[t];if(s===D.FRAG_GAP&&c===x&&e.frag){var f=l[t].details;if(f){var m=Et(e.frag,f.fragments,e.frag.start);if(null!=m&&m.gap)return 0}}else{if(p===w&&a.hasAudioGroup(y)||p===O&&a.hasSubtitleGroup(y))return 0;if(c===M&&null!=(r=i.audioGroups)&&r.some((function(e){return a.hasAudioGroup(e)}))||c===F&&null!=(n=i.subtitleGroups)&&n.some((function(e){return a.hasSubtitleGroup(e)}))||g&&i.audioCodec===a.audioCodec||!g&&i.audioCodec!==a.audioCodec||v&&i.codecSet===a.codecSet)return 0}return o=t,1}},T=l.length;T--&&(0===(f=E())||1!==f););if(o>-1&&r.loadLevel!==o)return e.levelRetry=!0,this.playlistError=0,{action:_t,flags:wt,nextAutoLevel:o}}return{action:_t,flags:Ot}},r.onErrorOut=function(e,t){var r;switch(null==(r=t.errorAction)?void 0:r.action){case Dt:break;case _t:this.sendAlternateToPenaltyBox(t),t.errorAction.resolved||t.details===D.FRAG_GAP?/MediaSource readyState: ended/.test(t.error.message)&&(this.warn('MediaSource ended after "'+t.sourceBufferName+'" sourceBuffer append error. Attempting to recover from media error.'),this.hls.recoverMediaError()):t.fatal=!0}t.fatal&&this.hls.stopLoad()},r.sendAlternateToPenaltyBox=function(e){var t=this.hls,r=e.errorAction;if(r){var i=r.flags,n=r.hdcpLevel,a=r.nextAutoLevel;switch(i){case wt:this.switchLevel(e,a);break;case xt:n&&(t.maxHdcpLevel=Je[Je.indexOf(n)-1],r.resolved=!0),this.warn('Restricting playback to HDCP-LEVEL of "'+t.maxHdcpLevel+'" or lower')}r.resolved||this.switchLevel(e,a)}},r.switchLevel=function(e,t){if(void 0!==t&&e.errorAction&&(this.warn("switching to level "+t+" after "+e.details),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel,e.details===D.BUFFER_ADD_CODEC_ERROR&&e.mimeType&&"audiovideo"!==e.sourceBufferName))for(var r=qe(e.mimeType),i=this.hls.levels,n=i.length;n--;)i[n][e.sourceBufferName+"Codec"]===r&&this.hls.removeLevel(n)},t}(B);function Ft(e){var t={action:Dt,flags:wt};return e&&(t.resolved=!0),t}var Nt="NOT_LOADED",Ut="APPENDING",Bt="PARTIAL",Gt="OK",Kt=function(){function e(e){this.activePartLists=Object.create(null),this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hasGaps=!1,this.hls=e,this._registerListeners()}var t=e.prototype;return t._registerListeners=function(){var e=this.hls;e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.BUFFER_APPENDED,this.onBufferAppended,this),e.on(_.FRAG_BUFFERED,this.onFragBuffered,this),e.on(_.FRAG_LOADED,this.onFragLoaded,this)},t._unregisterListeners=function(){var e=this.hls;e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.BUFFER_APPENDED,this.onBufferAppended,this),e.off(_.FRAG_BUFFERED,this.onFragBuffered,this),e.off(_.FRAG_LOADED,this.onFragLoaded,this)},t.destroy=function(){this._unregisterListeners(),this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null},t.getAppendedFrag=function(e,t){var r=this.activePartLists[t];if(r)for(var i=r.length;i--;){var n=r[i];if(!n)break;var a=n.end;if(n.start<=e&&null!==a&&e<=a)return n}return this.getBufferedFrag(e,t)},t.getBufferedFrag=function(e,t){return this.getFragAtPos(e,t,!0)},t.getFragAtPos=function(e,t,r){for(var i=this.fragments,n=Object.keys(i),a=n.length;a--;){var s=i[n[a]];if((null==s?void 0:s.body.type)===t&&(!r||s.buffered)){var o=s.body;if(o.start<=e&&e<=o.end)return o}}return null},t.detectEvictedFragments=function(e,t,r,i,n){var a=this;this.timeRanges&&(this.timeRanges[e]=t);var s=(null==i?void 0:i.fragment.sn)||-1;Object.keys(this.fragments).forEach((function(i){var o=a.fragments[i];if(o&&!(s>=o.body.sn))if(o.buffered||o.loaded&&!n){var l=o.range[e];l&&(0!==l.time.length?l.time.some((function(e){var r=!a.isTimeBuffered(e.startPTS,e.endPTS,t);return r&&a.removeFragment(o.body),r})):a.removeFragment(o.body))}else o.body.type===r&&a.removeFragment(o.body)}))},t.detectPartialFragments=function(e){var t=this,r=this.timeRanges;if(r&&"initSegment"!==e.frag.sn){var i=e.frag,n=Vt(i),a=this.fragments[n];if(!(!a||a.buffered&&i.gap)){var s=!i.relurl;Object.keys(r).forEach((function(n){var o=i.elementaryStreams[n];if(o){var l=r[n],u=s||!0===o.partial;a.range[n]=t.getBufferedTimes(i,e.part,u,l)}})),a.loaded=null,Object.keys(a.range).length?(a.buffered=!0,(a.body.endList=i.endList||a.body.endList)&&(this.endListFragments[a.body.type]=a),Ht(a)||this.removeParts(i.sn-1,i.type)):this.removeFragment(a.body)}}},t.removeParts=function(e,t){var r=this.activePartLists[t];r&&(this.activePartLists[t]=Yt(r,(function(t){return t.fragment.sn>=e})))},t.fragBuffered=function(e,t){var r=Vt(e),i=this.fragments[r];!i&&t&&(i=this.fragments[r]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),i&&(i.loaded=null,i.buffered=!0)},t.getBufferedTimes=function(e,t,r,i){for(var n={time:[],partial:r},a=e.start,s=e.end,o=e.minEndPTS||s,l=e.maxStartPTS||a,u=0;u<i.length;u++){var d=i.start(u)-this.bufferPadding,h=i.end(u)+this.bufferPadding;if(l>=d&&o<=h){n.time.push({startPTS:Math.max(a,i.start(u)),endPTS:Math.min(s,i.end(u))});break}if(a<h&&s>d){var f=Math.max(a,i.start(u)),c=Math.min(s,i.end(u));c>f&&(n.partial=!0,n.time.push({startPTS:f,endPTS:c}))}else if(s<=d)break}return n},t.getPartialFragment=function(e){var t,r,i,n=null,a=0,s=this.bufferPadding,o=this.fragments;return Object.keys(o).forEach((function(l){var u=o[l];u&&Ht(u)&&(r=u.body.start-s,i=u.body.end+s,e>=r&&e<=i&&(t=Math.min(e-r,i-e),a<=t&&(n=u.body,a=t)))})),n},t.isEndListAppended=function(e){var t=this.endListFragments[e];return void 0!==t&&(t.buffered||Ht(t))},t.getState=function(e){var t=Vt(e),r=this.fragments[t];return r?r.buffered?Ht(r)?Bt:Gt:Ut:Nt},t.isTimeBuffered=function(e,t,r){for(var i,n,a=0;a<r.length;a++){if(i=r.start(a)-this.bufferPadding,n=r.end(a)+this.bufferPadding,e>=i&&t<=n)return!0;if(t<=i)return!1}return!1},t.onManifestLoading=function(){this.removeAllFragments()},t.onFragLoaded=function(e,t){if("initSegment"!==t.frag.sn&&!t.frag.bitrateTest){var r=t.frag,i=t.part?null:t,n=Vt(r);this.fragments[n]={body:r,appendedPTS:null,loaded:i,buffered:!1,range:Object.create(null)}}},t.onBufferAppended=function(e,t){var r=t.frag,i=t.part,n=t.timeRanges,a=t.type;if("initSegment"!==r.sn){var s=r.type;if(i){var o=this.activePartLists[s];o||(this.activePartLists[s]=o=[]),o.push(i)}this.timeRanges=n;var l=n[a];this.detectEvictedFragments(a,l,s,i)}},t.onFragBuffered=function(e,t){this.detectPartialFragments(t)},t.hasFragment=function(e){var t=Vt(e);return!!this.fragments[t]},t.hasFragments=function(e){var t=this.fragments,r=Object.keys(t);if(!e)return r.length>0;for(var i=r.length;i--;){var n=t[r[i]];if((null==n?void 0:n.body.type)===e)return!0}return!1},t.hasParts=function(e){var t;return!(null==(t=this.activePartLists[e])||!t.length)},t.removeFragmentsInRange=function(e,t,r,i,n){var a=this;i&&!this.hasGaps||Object.keys(this.fragments).forEach((function(s){var o=a.fragments[s];if(o){var l=o.body;l.type!==r||i&&!l.gap||l.start<t&&l.end>e&&(o.buffered||n)&&a.removeFragment(l)}}))},t.removeFragment=function(e){var t=Vt(e);e.clearElementaryStreamInfo();var r=this.activePartLists[e.type];if(r){var i=e.sn;this.activePartLists[e.type]=Yt(r,(function(e){return e.fragment.sn!==i}))}delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]},t.removeAllFragments=function(){var e,t;this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1;var r=null==(e=this.hls)||null==(t=e.latestLevelDetails)?void 0:t.partList;r&&r.forEach((function(e){return e.clearElementaryStreamInfo()}))},e}();function Ht(e){var t,r,i;return e.buffered&&(e.body.gap||(null==(t=e.range.video)?void 0:t.partial)||(null==(r=e.range.audio)?void 0:r.partial)||(null==(i=e.range.audiovideo)?void 0:i.partial))}function Vt(e){return e.type+"_"+e.level+"_"+e.sn}function Yt(e,t){return e.filter((function(e){var r=t(e);return r||e.clearElementaryStreamInfo(),r}))}var Wt=0,jt=1,qt=function(){function e(e,t,r){this.subtle=void 0,this.aesIV=void 0,this.aesMode=void 0,this.subtle=e,this.aesIV=t,this.aesMode=r}return e.prototype.decrypt=function(e,t){switch(this.aesMode){case Wt:return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e);case jt:return this.subtle.decrypt({name:"AES-CTR",counter:this.aesIV,length:64},t,e);default:throw new Error("[AESCrypto] invalid aes mode "+this.aesMode)}},e}(),Xt=function(){function e(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var t=e.prototype;return t.uint8ArrayToUint32Array_=function(e){for(var t=new DataView(e),r=new Uint32Array(4),i=0;i<4;i++)r[i]=t.getUint32(4*i);return r},t.initTable=function(){var e=this.sBox,t=this.invSBox,r=this.subMix,i=r[0],n=r[1],a=r[2],s=r[3],o=this.invSubMix,l=o[0],u=o[1],d=o[2],h=o[3],f=new Uint32Array(256),c=0,g=0,v=0;for(v=0;v<256;v++)f[v]=v<128?v<<1:v<<1^283;for(v=0;v<256;v++){var m=g^g<<1^g<<2^g<<3^g<<4;m=m>>>8^255&m^99,e[c]=m,t[m]=c;var p=f[c],y=f[p],E=f[y],T=257*f[m]^16843008*m;i[c]=T<<24|T>>>8,n[c]=T<<16|T>>>16,a[c]=T<<8|T>>>24,s[c]=T,T=16843009*E^65537*y^257*p^16843008*c,l[m]=T<<24|T>>>8,u[m]=T<<16|T>>>16,d[m]=T<<8|T>>>24,h[m]=T,c?(c=p^f[f[f[E^p]]],g^=f[f[g]]):c=g=1}},t.expandKey=function(e){for(var t=this.uint8ArrayToUint32Array_(e),r=!0,i=0;i<t.length&&r;)r=t[i]===this.key[i],i++;if(!r){this.key=t;var n=this.keySize=t.length;if(4!==n&&6!==n&&8!==n)throw new Error("Invalid aes key size="+n);var a,s,o,l,u=this.ksRows=4*(n+6+1),d=this.keySchedule=new Uint32Array(u),h=this.invKeySchedule=new Uint32Array(u),f=this.sBox,c=this.rcon,g=this.invSubMix,v=g[0],m=g[1],p=g[2],y=g[3];for(a=0;a<u;a++)a<n?o=d[a]=t[a]:(l=o,a%n==0?(l=f[(l=l<<8|l>>>24)>>>24]<<24|f[l>>>16&255]<<16|f[l>>>8&255]<<8|f[255&l],l^=c[a/n|0]<<24):n>6&&a%n==4&&(l=f[l>>>24]<<24|f[l>>>16&255]<<16|f[l>>>8&255]<<8|f[255&l]),d[a]=o=(d[a-n]^l)>>>0);for(s=0;s<u;s++)a=u-s,l=3&s?d[a]:d[a-4],h[s]=s<4||a<=4?l:v[f[l>>>24]]^m[f[l>>>16&255]]^p[f[l>>>8&255]]^y[f[255&l]],h[s]=h[s]>>>0}},t.networkToHostOrderSwap=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},t.decrypt=function(e,t,r){for(var i,n,a,s,o,l,u,d,h,f,c,g,v,m,p=this.keySize+6,y=this.invKeySchedule,E=this.invSBox,T=this.invSubMix,S=T[0],A=T[1],L=T[2],R=T[3],I=this.uint8ArrayToUint32Array_(r),b=I[0],k=I[1],D=I[2],_=I[3],P=new Int32Array(e),C=new Int32Array(P.length),w=this.networkToHostOrderSwap;t<P.length;){for(h=w(P[t]),f=w(P[t+1]),c=w(P[t+2]),g=w(P[t+3]),o=h^y[0],l=g^y[1],u=c^y[2],d=f^y[3],v=4,m=1;m<p;m++)i=S[o>>>24]^A[l>>16&255]^L[u>>8&255]^R[255&d]^y[v],n=S[l>>>24]^A[u>>16&255]^L[d>>8&255]^R[255&o]^y[v+1],a=S[u>>>24]^A[d>>16&255]^L[o>>8&255]^R[255&l]^y[v+2],s=S[d>>>24]^A[o>>16&255]^L[l>>8&255]^R[255&u]^y[v+3],o=i,l=n,u=a,d=s,v+=4;i=E[o>>>24]<<24^E[l>>16&255]<<16^E[u>>8&255]<<8^E[255&d]^y[v],n=E[l>>>24]<<24^E[u>>16&255]<<16^E[d>>8&255]<<8^E[255&o]^y[v+1],a=E[u>>>24]<<24^E[d>>16&255]<<16^E[o>>8&255]<<8^E[255&l]^y[v+2],s=E[d>>>24]<<24^E[o>>16&255]<<16^E[l>>8&255]<<8^E[255&u]^y[v+3],C[t]=w(i^b),C[t+1]=w(s^k),C[t+2]=w(a^D),C[t+3]=w(n^_),b=h,k=f,D=c,_=g,t+=4}return C.buffer},e}(),zt=function(){function e(e,t,r){this.subtle=void 0,this.key=void 0,this.aesMode=void 0,this.subtle=e,this.key=t,this.aesMode=r}return e.prototype.expandKey=function(){var e=function(e){switch(e){case Wt:return"AES-CBC";case jt:return"AES-CTR";default:throw new Error("[FastAESKey] invalid aes mode "+e)}}(this.aesMode);return this.subtle.importKey("raw",this.key,{name:e},!1,["encrypt","decrypt"])},e}(),Qt=function(){function e(e,t){var r=(void 0===t?{}:t).removePKCS7Padding,i=void 0===r||r;if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.enableSoftwareAES=void 0,this.enableSoftwareAES=e.enableSoftwareAES,this.removePKCS7Padding=i,i)try{var n=self.crypto;n&&(this.subtle=n.subtle||n.webkitSubtle)}catch(e){}this.useSoftware=!this.subtle}var t=e.prototype;return t.destroy=function(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null},t.isSync=function(){return this.useSoftware},t.flush=function(){var e=this.currentResult,t=this.remainderData;if(!e||t)return this.reset(),null;var r,i,n,a=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?(i=(r=a).byteLength,(n=i&&new DataView(r.buffer).getUint8(i-1))?r.slice(0,i-n):r):a},t.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},t.decrypt=function(e,t,r,i){var n=this;return this.useSoftware?new Promise((function(a,s){var o=ArrayBuffer.isView(e)?e:new Uint8Array(e);n.softwareDecrypt(o,t,r,i);var l=n.flush();l?a(l.buffer):s(new Error("[softwareDecrypt] Failed to decrypt data"))})):this.webCryptoDecrypt(new Uint8Array(e),t,r,i)},t.softwareDecrypt=function(e,t,r,i){var n=this.currentIV,a=this.currentResult,s=this.remainderData;if(i!==Wt||16!==t.byteLength)return j.warn("SoftwareDecrypt: can only handle AES-128-CBC"),null;this.logOnce("JS AES decrypt"),s&&(e=Ie(s,e),this.remainderData=null);var o=this.getValidChunk(e);if(!o.length)return null;n&&(r=n);var l=this.softwareDecrypter;l||(l=this.softwareDecrypter=new Xt),l.expandKey(t);var u=a;return this.currentResult=l.decrypt(o.buffer,0,r),this.currentIV=o.slice(-16).buffer,u||null},t.webCryptoDecrypt=function(e,t,r,i){var n=this;if(this.key!==t||!this.fastAesKey){if(!this.subtle)return Promise.resolve(this.onWebCryptoError(e,t,r,i));this.key=t,this.fastAesKey=new zt(this.subtle,t,i)}return this.fastAesKey.expandKey().then((function(t){return n.subtle?(n.logOnce("WebCrypto AES decrypt"),new qt(n.subtle,new Uint8Array(r),i).decrypt(e.buffer,t)):Promise.reject(new Error("web crypto not initialized"))})).catch((function(a){return j.warn("[decrypter]: WebCrypto Error, disable WebCrypto API, "+a.name+": "+a.message),n.onWebCryptoError(e,t,r,i)}))},t.onWebCryptoError=function(e,t,r,i){var n=this.enableSoftwareAES;if(n){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,r,i);var a=this.flush();if(a)return a.buffer}throw new Error("WebCrypto"+(n?" and softwareDecrypt":"")+": failed to decrypt data")},t.getValidChunk=function(e){var t=e,r=e.length-e.length%16;return r!==e.length&&(t=e.slice(0,r),this.remainderData=e.slice(r)),t},t.logOnce=function(e){this.logEnabled&&(j.log("[decrypter]: "+e),this.logEnabled=!1)},e}(),$t=Math.pow(2,17),Jt=function(){function e(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}var t=e.prototype;return t.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},t.abort=function(){this.loader&&this.loader.abort()},t.load=function(e,t){var r=this,i=e.url;if(!i)return Promise.reject(new tr({type:k.NETWORK_ERROR,details:D.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error("Fragment does not have a "+(i?"part list":"url")),networkDetails:null}));this.abort();var n=this.config,a=n.fLoader,s=n.loader;return new Promise((function(o,l){if(r.loader&&r.loader.destroy(),e.gap){if(e.tagList.some((function(e){return"GAP"===e[0]})))return void l(er(e));e.gap=!1}var u=r.loader=a?new a(n):new s(n),d=Zt(e);e.loader=u;var h=bt(n.fragLoadPolicy.default),c={loadPolicy:h,timeout:h.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:"initSegment"===e.sn?1/0:$t};e.stats=u.stats;var g={onSuccess:function(t,i,n,a){r.resetLoader(e,u);var s=t.data;n.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(s.slice(0,16)),s=s.slice(16)),o({frag:e,part:null,payload:s,networkDetails:a})},onError:function(t,n,a,s){r.resetLoader(e,u),l(new tr({type:k.NETWORK_ERROR,details:D.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:f({url:i,data:void 0},t),error:new Error("HTTP Error "+t.code+" "+t.text),networkDetails:a,stats:s}))},onAbort:function(t,i,n){r.resetLoader(e,u),l(new tr({type:k.NETWORK_ERROR,details:D.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:n,stats:t}))},onTimeout:function(t,i,n){r.resetLoader(e,u),l(new tr({type:k.NETWORK_ERROR,details:D.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error("Timeout after "+c.timeout+"ms"),networkDetails:n,stats:t}))}};t&&(g.onProgress=function(r,i,n,a){return t({frag:e,part:null,payload:n,networkDetails:a})}),u.load(d,c,g)}))},t.loadPart=function(e,t,r){var i=this;this.abort();var n=this.config,a=n.fLoader,s=n.loader;return new Promise((function(o,l){if(i.loader&&i.loader.destroy(),e.gap||t.gap)l(er(e,t));else{var u=i.loader=a?new a(n):new s(n),d=Zt(e,t);e.loader=u;var h=bt(n.fragLoadPolicy.default),c={loadPolicy:h,timeout:h.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:$t};t.stats=u.stats,u.load(d,c,{onSuccess:function(n,a,s,l){i.resetLoader(e,u),i.updateStatsFromPart(e,t);var d={frag:e,part:t,payload:n.data,networkDetails:l};r(d),o(d)},onError:function(r,n,a,s){i.resetLoader(e,u),l(new tr({type:k.NETWORK_ERROR,details:D.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:f({url:d.url,data:void 0},r),error:new Error("HTTP Error "+r.code+" "+r.text),networkDetails:a,stats:s}))},onAbort:function(r,n,a){e.stats.aborted=t.stats.aborted,i.resetLoader(e,u),l(new tr({type:k.NETWORK_ERROR,details:D.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:a,stats:r}))},onTimeout:function(r,n,a){i.resetLoader(e,u),l(new tr({type:k.NETWORK_ERROR,details:D.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error("Timeout after "+c.timeout+"ms"),networkDetails:a,stats:r}))}})}}))},t.updateStatsFromPart=function(e,t){var r=e.stats,i=t.stats,n=i.total;if(r.loaded+=i.loaded,n){var a=Math.round(e.duration/t.duration),s=Math.min(Math.round(r.loaded/n),a),o=(a-s)*Math.round(r.loaded/s);r.total=r.loaded+o}else r.total=Math.max(r.loaded,r.total);var l=r.loading,u=i.loading;l.start?l.first+=u.first-u.start:(l.start=u.start,l.first=u.first),l.end=u.end},t.resetLoader=function(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()},e}();function Zt(e,t){void 0===t&&(t=null);var r,i=t||e,n={frag:e,part:t,responseType:"arraybuffer",url:i.url,headers:{},rangeStart:0,rangeEnd:0},a=i.byteRangeStartOffset,s=i.byteRangeEndOffset;if(R(a)&&R(s)){var o,l=a,u=s;if("initSegment"===e.sn&&("AES-128"===(r=null==(o=e.decryptdata)?void 0:o.method)||"AES-256"===r)){var d=s-a;d%16&&(u=s+(16-d%16)),0!==a&&(n.resetIV=!0,l=a-16)}n.rangeStart=l,n.rangeEnd=u}return n}function er(e,t){var r=new Error("GAP "+(e.gap?"tag":"attribute")+" found"),i={type:k.MEDIA_ERROR,details:D.FRAG_GAP,fatal:!1,frag:e,error:r,networkDetails:null};return t&&(i.part=t),(t||e).stats.aborted=!0,new tr(i)}var tr=function(e){function t(t){var r;return(r=e.call(this,t.error.message)||this).data=void 0,r.data=t,r}return u(t,e),t}(v(Error)),rr=function(e){function t(t,r){var i;return(i=e.call(this,t,r)||this)._boundTick=void 0,i._tickTimer=null,i._tickInterval=null,i._tickCallCount=0,i._boundTick=i.tick.bind(i),i}u(t,e);var r=t.prototype;return r.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},r.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},r.onHandlerDestroyed=function(){},r.hasInterval=function(){return!!this._tickInterval},r.hasNextTick=function(){return!!this._tickTimer},r.setInterval=function(e){return!this._tickInterval&&(this._tickCallCount=0,this._tickInterval=self.setInterval(this._boundTick,e),!0)},r.clearInterval=function(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)},r.clearNextTick=function(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)},r.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},r.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},r.doTick=function(){},t}(B),ir=function(e,t,r,i,n,a){void 0===i&&(i=0),void 0===n&&(n=-1),void 0===a&&(a=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing={start:0,executeStart:0,executeEnd:0,end:0},this.buffering={audio:{start:0,executeStart:0,executeEnd:0,end:0},video:{start:0,executeStart:0,executeEnd:0,end:0},audiovideo:{start:0,executeStart:0,executeEnd:0,end:0}},this.level=e,this.sn=t,this.id=r,this.size=i,this.part=n,this.partial=a},nr={length:0,start:function(){return 0},end:function(){return 0}},ar=function(){function e(){}return e.isBuffered=function(t,r){if(t)for(var i=e.getBuffered(t),n=i.length;n--;)if(r>=i.start(n)&&r<=i.end(n))return!0;return!1},e.bufferedRanges=function(t){if(t){var r=e.getBuffered(t);return e.timeRangesToArray(r)}return[]},e.timeRangesToArray=function(e){for(var t=[],r=0;r<e.length;r++)t.push({start:e.start(r),end:e.end(r)});return t},e.bufferInfo=function(t,r,i){if(t){var n=e.bufferedRanges(t);if(n.length)return e.bufferedInfo(n,r,i)}return{len:0,start:r,end:r,bufferedIndex:-1}},e.bufferedInfo=function(e,t,r){t=Math.max(0,t),e.length>1&&e.sort((function(e,t){return e.start-t.start||t.end-e.end}));var i=-1,n=[];if(r)for(var a=0;a<e.length;a++){t>=e[a].start&&t<=e[a].end&&(i=a);var s=n.length;if(s){var o=n[s-1].end;e[a].start-o<r?e[a].end>o&&(n[s-1].end=e[a].end):n.push(e[a])}else n.push(e[a])}else n=e;for(var l,u=0,d=t,h=t,f=0;f<n.length;f++){var c=n[f].start,g=n[f].end;if(-1===i&&t>=c&&t<=g&&(i=f),t+r>=c&&t<g)d=c,u=(h=g)-t;else if(t+r<c){l=c;break}}return{len:u,start:d||0,end:h||0,nextStart:l,buffered:e,bufferedIndex:i}},e.getBuffered=function(e){try{return e.buffered||nr}catch(e){return j.log("failed to get media.buffered",e),nr}},e}(),sr=/\{\$([a-zA-Z0-9-_]+)\}/g;function or(e){return sr.test(e)}function lr(e,t){if(null!==e.variableList||e.hasVariableRefs){var r=e.variableList;return t.replace(sr,(function(t){var i=t.substring(2,t.length-1),n=null==r?void 0:r[i];return void 0===n?(e.playlistParsingError||(e.playlistParsingError=new Error('Missing preceding EXT-X-DEFINE tag for Variable Reference: "'+i+'"')),t):n}))}return t}function ur(e,t,r){var i,n,a=e.variableList;if(a||(e.variableList=a={}),"QUERYPARAM"in t){i=t.QUERYPARAM;try{var s=new self.URL(r).searchParams;if(!s.has(i))throw new Error('"'+i+'" does not match any query parameter in URI: "'+r+'"');n=s.get(i)}catch(t){e.playlistParsingError||(e.playlistParsingError=new Error("EXT-X-DEFINE QUERYPARAM: "+t.message))}}else i=t.NAME,n=t.VALUE;i in a?e.playlistParsingError||(e.playlistParsingError=new Error('EXT-X-DEFINE duplicate Variable Name declarations: "'+i+'"')):a[i]=n||""}function dr(e,t,r){var i=t.IMPORT;if(r&&i in r){var n=e.variableList;n||(e.variableList=n={}),n[i]=r[i]}else e.playlistParsingError||(e.playlistParsingError=new Error('EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "'+i+'"'))}var hr=/^(\d+)x(\d+)$/,fr=/(.+?)=(".*?"|.*?)(?:,|$)/g,cr=function(){function e(t,r){"string"==typeof t&&(t=e.parseAttrList(t,r)),o(this,t)}var t=e.prototype;return t.decimalInteger=function(e){var t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t},t.hexadecimalInteger=function(e){if(this[e]){var t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;for(var r=new Uint8Array(t.length/2),i=0;i<t.length/2;i++)r[i]=parseInt(t.slice(2*i,2*i+2),16);return r}return null},t.hexadecimalIntegerAsNumber=function(e){var t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t},t.decimalFloatingPoint=function(e){return parseFloat(this[e])},t.optionalFloat=function(e,t){var r=this[e];return r?parseFloat(r):t},t.enumeratedString=function(e){return this[e]},t.enumeratedStringList=function(e,t){var r=this[e];return(r?r.split(/[ ,]+/):[]).reduce((function(e,t){return e[t.toLowerCase()]=!0,e}),t)},t.bool=function(e){return"YES"===this[e]},t.decimalResolution=function(e){var t=hr.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}},e.parseAttrList=function(e,t){var r,i={};for(fr.lastIndex=0;null!==(r=fr.exec(e));){var n=r[1].trim(),a=r[2],s=0===a.indexOf('"')&&a.lastIndexOf('"')===a.length-1,o=!1;if(s)a=a.slice(1,-1);else switch(n){case"IV":case"SCTE35-CMD":case"SCTE35-IN":case"SCTE35-OUT":o=!0}if(t&&(s||o))a=lr(t,a);else if(!o&&!s)switch(n){case"CLOSED-CAPTIONS":if("NONE"===a)break;case"ALLOWED-CPC":case"CLASS":case"ASSOC-LANGUAGE":case"AUDIO":case"BYTERANGE":case"CHANNELS":case"CHARACTERISTICS":case"CODECS":case"DATA-ID":case"END-DATE":case"GROUP-ID":case"ID":case"IMPORT":case"INSTREAM-ID":case"KEYFORMAT":case"KEYFORMATVERSIONS":case"LANGUAGE":case"NAME":case"PATHWAY-ID":case"QUERYPARAM":case"RECENTLY-REMOVED-DATERANGES":case"SERVER-URI":case"STABLE-RENDITION-ID":case"STABLE-VARIANT-ID":case"START-DATE":case"SUBTITLES":case"SUPPLEMENTAL-CODECS":case"URI":case"VALUE":case"VIDEO":case"X-ASSET-LIST":case"X-ASSET-URI":j.warn(e+": attribute "+n+" is missing quotes")}i[n]=a}return i},n(e,[{key:"clientAttrs",get:function(){return Object.keys(this).filter((function(e){return"X-"===e.substring(0,2)}))}}])}();function gr(e){return"SCTE35-OUT"===e||"SCTE35-IN"===e||"SCTE35-CMD"===e}var vr=function(){return n((function(e,t,r){var i;if(void 0===r&&(r=0),this.attr=void 0,this.tagAnchor=void 0,this.tagOrder=void 0,this._startDate=void 0,this._endDate=void 0,this._dateAtEnd=void 0,this._cue=void 0,this._badValueForSameId=void 0,this.tagAnchor=(null==t?void 0:t.tagAnchor)||null,this.tagOrder=null!=(i=null==t?void 0:t.tagOrder)?i:r,t){var n=t.attr;for(var a in n)if(Object.prototype.hasOwnProperty.call(e,a)&&e[a]!==n[a]){j.warn('DATERANGE tag attribute: "'+a+'" does not match for tags with ID: "'+e.ID+'"'),this._badValueForSameId=a;break}e=o(new cr({}),n,e)}if(this.attr=e,t?(this._startDate=t._startDate,this._cue=t._cue,this._endDate=t._endDate,this._dateAtEnd=t._dateAtEnd):this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){var s=(null==t?void 0:t.endDate)||new Date(this.attr["END-DATE"]);R(s.getTime())&&(this._endDate=s)}}),[{key:"id",get:function(){return this.attr.ID}},{key:"class",get:function(){return this.attr.CLASS}},{key:"cue",get:function(){var e=this._cue;return void 0===e?this._cue=this.attr.enumeratedStringList(this.attr.CUE?"CUE":"X-CUE",{pre:!1,post:!1,once:!1}):e}},{key:"startTime",get:function(){var e=this.tagAnchor;return null===e||null===e.programDateTime?(j.warn('Expected tagAnchor Fragment with PDT set for DateRange "'+this.id+'": '+e),NaN):e.start+(this.startDate.getTime()-e.programDateTime)/1e3}},{key:"startDate",get:function(){return this._startDate}},{key:"endDate",get:function(){var e=this._endDate||this._dateAtEnd;if(e)return e;var t=this.duration;return null!==t?this._dateAtEnd=new Date(this._startDate.getTime()+1e3*t):null}},{key:"duration",get:function(){if("DURATION"in this.attr){var e=this.attr.decimalFloatingPoint("DURATION");if(R(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}},{key:"plannedDuration",get:function(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}},{key:"endOnNext",get:function(){return this.attr.bool("END-ON-NEXT")}},{key:"isInterstitial",get:function(){return"com.apple.hls.interstitial"===this.class}},{key:"isValid",get:function(){return!!this.id&&!this._badValueForSameId&&R(this.startDate.getTime())&&(null===this.duration||this.duration>=0)&&(!this.endOnNext||!!this.class)&&(!this.attr.CUE||!this.cue.pre&&!this.cue.post||this.cue.pre!==this.cue.post)&&(!this.isInterstitial||"X-ASSET-URI"in this.attr||"X-ASSET-LIST"in this.attr)}}])}(),mr=function(){function e(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.dateRangeTagCount=0,this.live=!0,this.requestScheduled=-1,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.appliedTimelineOffset=void 0,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}return e.prototype.reloaded=function(e){if(!e)return this.advanced=!0,void(this.updated=!0);var t=this.lastPartSn-e.lastPartSn,r=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!r||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||0===t&&r>0,this.updated||this.advanced?this.misses=Math.floor(.6*e.misses):this.misses=e.misses+1},n(e,[{key:"hasProgramDateTime",get:function(){return!!this.fragments.length&&R(this.fragments[this.fragments.length-1].programDateTime)}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||10}},{key:"drift",get:function(){var e=this.driftEndTime-this.driftStartTime;return e>0?1e3*(this.driftEnd-this.driftStart)/e:1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var e;return null!=(e=this.fragments)&&e.length?this.fragments[this.fragments.length-1].end:0}},{key:"fragmentStart",get:function(){var e;return null!=(e=this.fragments)&&e.length?this.fragments[0].start:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].index:-1}},{key:"maxPartIndex",get:function(){var e=this.partList;if(e){var t=this.lastPartIndex;if(-1!==t){for(var r=e.length;r--;)if(e[r].index>t)return e[r].index;return t}}return 0}},{key:"lastPartSn",get:function(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}},{key:"expired",get:function(){if(this.live&&this.age&&this.misses<3){var e=this.partEnd-this.fragmentStart;return this.age>Math.max(e,this.totalduration)+this.levelTargetDuration}return!1}}])}();function pr(e){return"AES-128"===e||"AES-256"===e||"AES-256-CTR"===e}function yr(e){switch(e){case"AES-128":case"AES-256":return Wt;case"AES-256-CTR":return jt;default:throw new Error("invalid full segment method "+e)}}function Er(e){return Uint8Array.from(atob(e),(function(e){return e.charCodeAt(0)}))}function Tr(e){return Uint8Array.from(unescape(encodeURIComponent(e)),(function(e){return e.charCodeAt(0)}))}function Sr(e){var t,r,i=e.split(":"),n=null;if("data"===i[0]&&2===i.length){var a=i[1].split(";"),s=a[a.length-1].split(",");if(2===s.length){var o="base64"===s[0],l=s[1];o?(a.splice(-1,1),n=Er(l)):(t=Tr(l).subarray(0,16),(r=new Uint8Array(16)).set(t,16-t.length),n=r)}}return n}var Ar="undefined"!=typeof self?self:void 0,Lr={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},Rr="org.w3.clearkey",Ir="com.apple.streamingkeydelivery",br="com.microsoft.playready",kr="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";function Dr(e){switch(e){case Ir:return Lr.FAIRPLAY;case br:return Lr.PLAYREADY;case kr:return Lr.WIDEVINE;case Rr:return Lr.CLEARKEY}}var _r="1077efecc0b24d02ace33c1e52e2fb4b",Pr="e2719d58a985b3c9781ab030af78d30e",Cr="9a04f07998404286ab92e65be0885f95",wr="edef8ba979d64acea3c827dcd51d21ed";function Or(e){return e===wr?Lr.WIDEVINE:e===Cr?Lr.PLAYREADY:e===_r||e===Pr?Lr.CLEARKEY:void 0}function xr(e){switch(e){case Lr.FAIRPLAY:return Ir;case Lr.PLAYREADY:return br;case Lr.WIDEVINE:return kr;case Lr.CLEARKEY:return Rr}}function Mr(e){var t=e.drmSystems,r=e.widevineLicenseUrl,i=t?[Lr.FAIRPLAY,Lr.WIDEVINE,Lr.PLAYREADY,Lr.CLEARKEY].filter((function(e){return!!t[e]})):[];return!i[Lr.WIDEVINE]&&r&&i.push(Lr.WIDEVINE),i}var Fr,Nr=null!=Ar&&null!=(Fr=Ar.navigator)&&Fr.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null;function Ur(e){var t=new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2),r=String.fromCharCode.apply(null,Array.from(t)),i=r.substring(r.indexOf("<"),r.length),n=(new DOMParser).parseFromString(i,"text/xml").getElementsByTagName("KID")[0];if(n){var a=n.childNodes[0]?n.childNodes[0].nodeValue:n.getAttribute("VALUE");if(a){var s=Er(a).subarray(0,16);return function(e){var t=function(e,t,r){var i=e[t];e[t]=e[r],e[r]=i};t(e,0,3),t(e,1,2),t(e,4,5),t(e,6,7)}(s),s}}return null}var Br={},Gr=function(){function e(e,t,r,i,n){void 0===i&&(i=[1]),void 0===n&&(n=null),this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=e,this.uri=t,this.keyFormat=r,this.keyFormatVersions=i,this.iv=n,this.encrypted=!!e&&"NONE"!==e,this.isCommonEncryption=this.encrypted&&!pr(e)}e.clearKeyUriToKeyIdMap=function(){Br={}};var t=e.prototype;return t.isSupported=function(){if(this.method){if(pr(this.method)||"NONE"===this.method)return!0;if("identity"===this.keyFormat)return"SAMPLE-AES"===this.method;switch(this.keyFormat){case Ir:case kr:case br:case Rr:return-1!==["ISO-23001-7","SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)}}return!1},t.getDecryptData=function(t){if(!this.encrypted||!this.uri)return null;if(pr(this.method)&&this.uri&&!this.iv){"number"!=typeof t&&(j.warn('missing IV for initialization segment with method="'+this.method+'" - compliance issue'),t=0);var r=function(e){for(var t=new Uint8Array(16),r=12;r<16;r++)t[r]=e>>8*(15-r)&255;return t}(t);return new e(this.method,this.uri,"identity",this.keyFormatVersions,r)}var i=Sr(this.uri);if(i)switch(this.keyFormat){case kr:this.pssh=i,i.length>=22&&(this.keyId=i.subarray(i.length-22,i.length-6));break;case br:var n=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=Ce(n,0,i),this.keyId=Ur(i);break;default:var a=i.subarray(0,16);if(16!==a.length){var s=new Uint8Array(16);s.set(a,16-a.length),a=s}this.keyId=a}if(!this.keyId||16!==this.keyId.byteLength){var o=Br[this.uri];if(!o){var l=Object.keys(Br).length%Number.MAX_SAFE_INTEGER;o=new Uint8Array(16),new DataView(o.buffer,12,4).setUint32(0,l),Br[this.uri]=o}this.keyId=o}return this},e}(),Kr=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-(SESSION-DATA|SESSION-KEY|DEFINE|CONTENT-STEERING|START):([^\r\n]*)[\r\n]+/g,Hr=/#EXT-X-MEDIA:(.*)/g,Vr=/^#EXT(?:INF|-X-TARGETDURATION):/m,Yr=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#.*/.source].join("|"),"g"),Wr=new RegExp([/#EXT-X-(PROGRAM-DATE-TIME|BYTERANGE|DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP|INDEPENDENT-SEGMENTS)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),jr=function(){function e(){}return e.findGroup=function(e,t){for(var r=0;r<e.length;r++){var i=e[r];if(i.id===t)return i}},e.resolve=function(e,t){return L.buildAbsoluteURL(t,e,{alwaysNormalize:!0})},e.isMediaPlaylist=function(e){return Vr.test(e)},e.parseMasterPlaylist=function(t,r){var i,n={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:or(t)},a=[];for(Kr.lastIndex=0;null!=(i=Kr.exec(t));)if(i[1]){var s,o=new cr(i[1],n),l=lr(n,i[2]),u={attrs:o,bitrate:o.decimalInteger("BANDWIDTH")||o.decimalInteger("AVERAGE-BANDWIDTH"),name:o.NAME,url:e.resolve(l,r)},d=o.decimalResolution("RESOLUTION");d&&(u.width=d.width,u.height=d.height),$r(o.CODECS,u);var h=o["SUPPLEMENTAL-CODECS"];h&&(u.supplemental={},$r(h,u.supplemental)),null!=(s=u.unknownCodecs)&&s.length||a.push(u),n.levels.push(u)}else if(i[3]){var f=i[3],c=i[4];switch(f){case"SESSION-DATA":var g=new cr(c,n),v=g["DATA-ID"];v&&(null===n.sessionData&&(n.sessionData={}),n.sessionData[v]=g);break;case"SESSION-KEY":var m=zr(c,r,n);m.encrypted&&m.isSupported()?(null===n.sessionKeys&&(n.sessionKeys=[]),n.sessionKeys.push(m)):j.warn('[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "'+c+'"');break;case"DEFINE":ur(n,new cr(c,n),r);break;case"CONTENT-STEERING":var p=new cr(c,n);n.contentSteering={uri:e.resolve(p["SERVER-URI"],r),pathwayId:p["PATHWAY-ID"]||"."};break;case"START":n.startTimeOffset=Qr(c)}}var y=a.length>0&&a.length<n.levels.length;return n.levels=y?a:n.levels,0===n.levels.length&&(n.playlistParsingError=new Error("no levels found in manifest")),n},e.parseMasterPlaylistMedia=function(t,r,i){var n,a={},s=i.levels,o={AUDIO:s.map((function(e){return{id:e.attrs.AUDIO,audioCodec:e.audioCodec}})),SUBTITLES:s.map((function(e){return{id:e.attrs.SUBTITLES,textCodec:e.textCodec}})),"CLOSED-CAPTIONS":[]},l=0;for(Hr.lastIndex=0;null!==(n=Hr.exec(t));){var u=new cr(n[1],i),d=u.TYPE;if(d){var h=o[d],f=a[d]||[];a[d]=f;var c=u.LANGUAGE,g=u["ASSOC-LANGUAGE"],v=u.CHANNELS,m=u.CHARACTERISTICS,p=u["INSTREAM-ID"],y={attrs:u,bitrate:0,id:l++,groupId:u["GROUP-ID"]||"",name:u.NAME||c||"",type:d,default:u.bool("DEFAULT"),autoselect:u.bool("AUTOSELECT"),forced:u.bool("FORCED"),lang:c,url:u.URI?e.resolve(u.URI,r):""};if(g&&(y.assocLang=g),v&&(y.channels=v),m&&(y.characteristics=m),p&&(y.instreamId=p),null!=h&&h.length){var E=e.findGroup(h,y.groupId)||h[0];Jr(y,E,"audioCodec"),Jr(y,E,"textCodec")}f.push(y)}}return a},e.parseLevelPlaylist=function(e,t,r,i,n,a){var s,l,u,d,h,f={url:t},c=new mr(t),g=c.fragments,v=[],m=null,p=0,y=0,E=0,T=0,S=0,A=null,L=new ie(i,f),I=-1,b=!1,k=null;if(Yr.lastIndex=0,c.m3u8=e,c.hasVariableRefs=or(e),"#EXTM3U"!==(null==(s=Yr.exec(e))?void 0:s[0]))return c.playlistParsingError=new Error("Missing format identifier #EXTM3U"),c;for(;null!==(l=Yr.exec(e));){b&&(b=!1,(L=new ie(i,f)).playlistOffset=E,L.start=E,L.sn=p,L.cc=T,S&&(L.bitrate=S),L.level=r,m&&(L.initSegment=m,m.rawProgramDateTime&&(L.rawProgramDateTime=m.rawProgramDateTime,m.rawProgramDateTime=null),k&&(L.setByteRange(k),k=null)));var D=l[1];if(D){L.duration=parseFloat(D);var _=(" "+l[2]).slice(1);L.title=_||null,L.tagList.push(_?["INF",D,_]:["INF",D])}else if(l[3]){if(R(L.duration)){L.playlistOffset=E,L.start=E,d&&ti(L,d,c),L.sn=p,L.level=r,L.cc=T,g.push(L);var P=(" "+l[3]).slice(1);L.relurl=lr(c,P),Zr(L,A,v),A=L,E+=L.duration,p++,y=0,b=!0}}else{if(!(l=l[0].match(Wr))){j.warn("No matches on slow regex match for level playlist!");continue}for(u=1;u<l.length&&void 0===l[u];u++);var C=(" "+l[u]).slice(1),w=(" "+l[u+1]).slice(1),O=l[u+2]?(" "+l[u+2]).slice(1):null;switch(C){case"BYTERANGE":A?L.setByteRange(w,A):L.setByteRange(w);break;case"PROGRAM-DATE-TIME":L.rawProgramDateTime=w,L.tagList.push(["PROGRAM-DATE-TIME",w]),-1===I&&(I=g.length);break;case"PLAYLIST-TYPE":c.type&&ri(c,C,l),c.type=w.toUpperCase();break;case"MEDIA-SEQUENCE":0!==c.startSN?ri(c,C,l):g.length>0&&ii(c,C,l),p=c.startSN=parseInt(w);break;case"SKIP":c.skippedSegments&&ri(c,C,l);var x=new cr(w,c),M=x.decimalInteger("SKIPPED-SEGMENTS");if(R(M)){c.skippedSegments+=M;for(var F=M;F--;)g.push(null);p+=M}var N=x.enumeratedString("RECENTLY-REMOVED-DATERANGES");N&&(c.recentlyRemovedDateranges=(c.recentlyRemovedDateranges||[]).concat(N.split("\t")));break;case"TARGETDURATION":0!==c.targetduration&&ri(c,C,l),c.targetduration=Math.max(parseInt(w),1);break;case"VERSION":null!==c.version&&ri(c,C,l),c.version=parseInt(w);break;case"INDEPENDENT-SEGMENTS":break;case"ENDLIST":c.live||ri(c,C,l),c.live=!1;break;case"#":(w||O)&&L.tagList.push(O?[w,O]:[w]);break;case"DISCONTINUITY":T++,L.tagList.push(["DIS"]);break;case"GAP":L.gap=!0,L.tagList.push([C]);break;case"BITRATE":L.tagList.push([C,w]),S=1e3*parseInt(w),R(S)?L.bitrate=S:S=0;break;case"DATERANGE":var U=new cr(w,c),B=new vr(U,c.dateRanges[U.ID],c.dateRangeTagCount);c.dateRangeTagCount++,B.isValid||c.skippedSegments?c.dateRanges[B.id]=B:j.warn('Ignoring invalid DATERANGE tag: "'+w+'"'),L.tagList.push(["EXT-X-DATERANGE",w]);break;case"DEFINE":var G=new cr(w,c);"IMPORT"in G?dr(c,G,a):ur(c,G,t);break;case"DISCONTINUITY-SEQUENCE":0!==c.startCC?ri(c,C,l):g.length>0&&ii(c,C,l),c.startCC=T=parseInt(w);break;case"KEY":var K=zr(w,t,c);if(K.isSupported()){if("NONE"===K.method){d=void 0;break}d||(d={}),d[K.keyFormat]&&(d=o({},d)),d[K.keyFormat]=K}else j.warn('[Keys] Ignoring invalid EXT-X-KEY tag: "'+w+'"');break;case"START":c.startTimeOffset=Qr(w);break;case"MAP":var H=new cr(w,c);if(L.duration){var V=new ie(i,f);ei(V,H,r,d),m=V,L.initSegment=m,m.rawProgramDateTime&&!L.rawProgramDateTime&&(L.rawProgramDateTime=m.rawProgramDateTime)}else{var Y=L.byteRangeEndOffset;if(Y){var W=L.byteRangeStartOffset;k=Y-W+"@"+W}else k=null;ei(L,H,r,d),m=L,b=!0}m.cc=T;break;case"SERVER-CONTROL":h&&ri(c,C,l),h=new cr(w),c.canBlockReload=h.bool("CAN-BLOCK-RELOAD"),c.canSkipUntil=h.optionalFloat("CAN-SKIP-UNTIL",0),c.canSkipDateRanges=c.canSkipUntil>0&&h.bool("CAN-SKIP-DATERANGES"),c.partHoldBack=h.optionalFloat("PART-HOLD-BACK",0),c.holdBack=h.optionalFloat("HOLD-BACK",0);break;case"PART-INF":c.partTarget&&ri(c,C,l);var q=new cr(w);c.partTarget=q.decimalFloatingPoint("PART-TARGET");break;case"PART":var X=c.partList;X||(X=c.partList=[]);var z=y>0?X[X.length-1]:void 0,Q=y++,$=new cr(w,c),J=new ne($,L,f,Q,z);X.push(J),L.duration+=J.duration;break;case"PRELOAD-HINT":var Z=new cr(w,c);c.preloadHint=Z;break;case"RENDITION-REPORT":var ee=new cr(w,c);c.renditionReports=c.renditionReports||[],c.renditionReports.push(ee);break;default:j.warn("line parsed but not handled: "+l)}}}A&&!A.relurl?(g.pop(),E-=A.duration,c.partList&&(c.fragmentHint=A)):c.partList&&(Zr(L,A,v),L.cc=T,c.fragmentHint=L,d&&ti(L,d,c)),c.targetduration||(c.playlistParsingError=new Error("#EXT-X-TARGETDURATION is required"));var te=g.length,re=g[0],ae=g[te-1];if((E+=c.skippedSegments*c.targetduration)>0&&te&&ae){c.averagetargetduration=E/te;var se=ae.sn;c.endSN="initSegment"!==se?se:0,c.live||(ae.endList=!0),re&&void 0===c.startCC&&(c.startCC=re.cc),I>0&&(function(e,t){for(var r=e[t],i=t;i--;){var n=e[i];if(!n)return;n.programDateTime=r.programDateTime-1e3*n.duration,r=n}}(g,I),re&&v.unshift(re))}else c.endSN=0,c.startCC=0;return c.fragmentHint&&(E+=c.fragmentHint.duration),c.totalduration=E,v.length&&c.dateRangeTagCount&&re&&qr(v,c),c.endCC=T,c},e}();function qr(e,t){for(var r=e.length,i=e[r-1],n=t.live?1/0:t.totalduration,a=Object.keys(t.dateRanges),s=a.length;s--;){var o=t.dateRanges[a[s]],l=o.startDate.getTime();o.tagAnchor=i.ref;for(var u=r;u--;){var d=Xr(t,l,e,u,n);if(-1!==d){o.tagAnchor=t.fragments[d].ref;break}}}}function Xr(e,t,r,i,n){var a=r[i];if(a){var s,o=a.programDateTime;if((t>=o||0===i)&&t<=o+1e3*(((null==(s=r[i+1])?void 0:s.start)||n)-a.start)){var l=r[i].sn-e.startSN,u=e.fragments;if(u.length>r.length)for(var d=(r[i+1]||u[u.length-1]).sn-e.startSN;d>l;d--){var h=u[d].programDateTime;if(t>=h&&t<h+1e3*u[d].duration)return d}return l}}return-1}function zr(e,t,r){var i,n,a=new cr(e,r),s=null!=(i=a.METHOD)?i:"",o=a.URI,l=a.hexadecimalInteger("IV"),u=a.KEYFORMATVERSIONS,d=null!=(n=a.KEYFORMAT)?n:"identity";o&&a.IV&&!l&&j.error("Invalid IV: "+a.IV);var h=o?jr.resolve(o,t):"",f=(u||"1").split("/").map(Number).filter(Number.isFinite);return new Gr(s,h,d,f,l)}function Qr(e){var t=new cr(e).decimalFloatingPoint("TIME-OFFSET");return R(t)?t:null}function $r(e,t){var r=(e||"").split(/[ ,]+/).filter((function(e){return e}));["video","audio","text"].forEach((function(e){var i=r.filter((function(t){return Me(t,e)}));i.length&&(t[e+"Codec"]=i.map((function(e){return e.split("/")[0]})).join(","),r=r.filter((function(e){return-1===i.indexOf(e)})))})),t.unknownCodecs=r}function Jr(e,t,r){var i=t[r];i&&(e[r]=i)}function Zr(e,t,r){e.rawProgramDateTime?r.push(e):null!=t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime)}function ei(e,t,r,i){e.relurl=t.URI,t.BYTERANGE&&e.setByteRange(t.BYTERANGE),e.level=r,e.sn="initSegment",i&&(e.levelkeys=i),e.initSegment=null}function ti(e,t,r){e.levelkeys=t;var i=r.encryptedFragments;i.length&&i[i.length-1].levelkeys===t||!Object.keys(t).some((function(e){return t[e].isCommonEncryption}))||i.push(e)}function ri(e,t,r){e.playlistParsingError=new Error("#EXT-X-"+t+" must not appear more than once ("+r[0]+")")}function ii(e,t,r){e.playlistParsingError=new Error("#EXT-X-"+t+" must appear before the first Media Segment ("+r[0]+")")}function ni(e,t){var r=t.startPTS;if(R(r)){var i,n=0;t.sn>e.sn?(n=r-e.start,i=e):(n=e.start-r,i=t),i.duration!==n&&i.setDuration(n)}else t.sn>e.sn?e.cc===t.cc&&e.minEndPTS?t.setStart(e.start+(e.minEndPTS-e.start)):t.setStart(e.start+e.duration):t.setStart(Math.max(e.start-t.duration,0))}function ai(e,t,r,i,n,a){i-r<=0&&(j.warn("Fragment should have a positive duration",t),i=r+t.duration,a=n+t.duration);var s=r,o=i,l=t.startPTS,u=t.endPTS;if(R(l)){var d=Math.abs(l-r);R(t.deltaPTS)?t.deltaPTS=Math.max(d,t.deltaPTS):t.deltaPTS=d,s=Math.max(r,l),r=Math.min(r,l),n=Math.min(n,t.startDTS),o=Math.min(i,u),i=Math.max(i,u),a=Math.max(a,t.endDTS)}var h=r-t.start;0!==t.start&&t.setStart(r),t.setDuration(i-t.start),t.startPTS=r,t.maxStartPTS=s,t.startDTS=n,t.endPTS=i,t.minEndPTS=o,t.endDTS=a;var f,c=t.sn;if(!e||c<e.startSN||c>e.endSN)return 0;var g=c-e.startSN,v=e.fragments;for(v[g]=t,f=g;f>0;f--)ni(v[f],v[f-1]);for(f=g;f<v.length-1;f++)ni(v[f],v[f+1]);return e.fragmentHint&&ni(v[v.length-1],e.fragmentHint),e.PTSKnown=e.alignedSliding=!0,h}function si(e,t){if(e!==t){for(var r,i=null,n=e.fragments,a=n.length-1;a>=0;a--){var s=n[a].initSegment;if(s){i=s;break}}e.fragmentHint&&delete e.fragmentHint.endPTS,function(e,t,r){for(var i=t.skippedSegments,n=Math.max(e.startSN,t.startSN)-t.startSN,a=(e.fragmentHint?1:0)+(i?t.endSN:Math.min(e.endSN,t.endSN))-t.startSN,s=t.startSN-e.startSN,o=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,l=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,u=n;u<=a;u++){var d=l[s+u],h=o[u];if(i&&!h&&d&&(h=t.fragments[u]=d),d&&h){if(r(d,h,u,o),d.url&&d.url!==h.url)return void(t.playlistParsingError=oi("media sequence mismatch "+h.sn+":",e,t,0,h));if(d.cc!==h.cc)return void(t.playlistParsingError=oi("discontinuity sequence mismatch ("+d.cc+"!="+h.cc+")",e,t,0,h))}}}(e,t,(function(n,a,s,o){if(!t.startCC&&a.cc!==n.cc){for(var l,u,d=n.cc-a.cc,h=s;h<o.length;h++)o[h].cc+=d;t.startCC=null!=(l=null==(u=hi(e,t.startSN-1))?void 0:u.cc)?l:o[0].cc,t.endCC=o[o.length-1].cc}R(n.startPTS)&&R(n.endPTS)&&(a.setStart(a.startPTS=n.startPTS),a.startDTS=n.startDTS,a.maxStartPTS=n.maxStartPTS,a.endPTS=n.endPTS,a.endDTS=n.endDTS,a.minEndPTS=n.minEndPTS,a.setDuration(n.endPTS-n.startPTS),a.duration&&(r=a),t.PTSKnown=t.alignedSliding=!0),n.hasStreams&&(a.elementaryStreams=n.elementaryStreams),a.loader=n.loader,n.hasStats&&(a.stats=n.stats),n.initSegment&&(a.initSegment=n.initSegment,i=n.initSegment)}));var l=t.fragments,u=t.fragmentHint?l.concat(t.fragmentHint):l;if(i&&u.forEach((function(e){var t;!e||e.initSegment&&e.initSegment.relurl!==(null==(t=i)?void 0:t.relurl)||(e.initSegment=i)})),t.skippedSegments)if(t.deltaUpdateFailed=l.some((function(e){return!e})),t.deltaUpdateFailed){j.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var d=t.skippedSegments;d--;)l.shift();t.startSN=l[0].sn}else{t.endCC=l[l.length-1].cc,t.canSkipDateRanges&&(t.dateRanges=function(e,t){var r=t.dateRanges,i=t.recentlyRemovedDateranges,n=o({},e);i&&i.forEach((function(e){delete n[e]}));var a=Object.keys(n).length;return a&&Object.keys(r).forEach((function(e){var t=n[e],i=new vr(r[e].attr,t);i.isValid?(n[e]=i,t||(i.tagOrder+=a)):j.warn('Ignoring invalid Playlist Delta Update DATERANGE tag: "'+lt(r[e].attr)+'"')})),n}(e.dateRanges,t));var h=e.fragments.filter((function(e){return e.rawProgramDateTime}));if(e.hasProgramDateTime&&!t.hasProgramDateTime)for(var f=1;f<u.length;f++)null===u[f].programDateTime&&Zr(u[f],u[f-1],h);qr(h,t)}!function(e,t,r){if(e&&t)for(var i=0,n=0,a=e.length;n<=a;n++){var s=e[n],o=t[n+i];s&&o&&s.index===o.index&&s.fragment.sn===o.fragment.sn?r(s,o):i--}}(e.partList,t.partList,(function(e,t){t.elementaryStreams=e.elementaryStreams,t.stats=e.stats})),r?ai(t,r,r.startPTS,r.endPTS,r.startDTS,r.endDTS):li(e,t),l.length&&(t.totalduration=t.edge-l[0].start),t.driftStartTime=e.driftStartTime,t.driftStart=e.driftStart;var c=t.advancedDateTime;if(t.advanced&&c){var g=t.edge;t.driftStart||(t.driftStartTime=c,t.driftStart=g),t.driftEndTime=c,t.driftEnd=g}else t.driftEndTime=e.driftEndTime,t.driftEnd=e.driftEnd,t.advancedDateTime=e.advancedDateTime;-1===t.requestScheduled&&(t.requestScheduled=e.requestScheduled)}}function oi(e,t,r,i,n){return new Error(e+" "+n.url+"\nPlaylist starting @"+t.startSN+"\n"+t.m3u8+"\n\nPlaylist starting @"+r.startSN+"\n"+r.m3u8)}function li(e,t,r){void 0===r&&(r=!0);var i=t.startSN+t.skippedSegments-e.startSN,n=e.fragments,a=i>=0,s=0;if(a&&i<n.length)s=n[i].start;else if(a&&t.startSN===e.endSN+1)s=e.fragmentEnd;else if(a&&r)s=e.fragmentStart+i*t.levelTargetDuration;else{if(t.skippedSegments||0!==t.fragmentStart)return;s=e.fragmentStart}ui(t,s)}function ui(e,t){if(t){for(var r=e.fragments,i=e.skippedSegments;i<r.length;i++)r[i].addStart(t);e.fragmentHint&&e.fragmentHint.addStart(t)}}function di(e,t){void 0===t&&(t=1/0);var r=1e3*e.targetduration;if(e.updated){var i=e.fragments;if(i.length&&4*r>t){var n=1e3*i[i.length-1].duration;n<r&&(r=n)}}else r/=2;return Math.round(r)}function hi(e,t,r){if(!e)return null;var i=e.fragments[t-e.startSN];return i||((i=e.fragmentHint)&&i.sn===t?i:t<e.startSN&&r&&r.sn===t?r:null)}function fi(e,t,r){return e?ci(e.partList,t,r):null}function ci(e,t,r){if(e)for(var i=e.length;i--;){var n=e[i];if(n.index===r&&n.fragment.sn===t)return n}return null}function gi(e){e.forEach((function(e,t){var r;null==(r=e.details)||r.fragments.forEach((function(e){e.level=t,e.initSegment&&(e.initSegment.level=t)}))}))}function vi(e,t){for(var r=0,i=e.length;r<i;r++){var n;if((null==(n=e[r])?void 0:n.cc)===t)return e[r]}return null}function mi(e,t){if(e){var r=e.start+t;e.start=e.startPTS=r,e.endPTS=r+e.duration}}function pi(e,t){for(var r=t.fragments,i=0,n=r.length;i<n;i++)mi(r[i],e);t.fragmentHint&&mi(t.fragmentHint,e),t.alignedSliding=!0}function yi(e,t){if(function(e,t){return!!(e&&t.startCC<e.endCC&&t.endCC>e.startCC)}(t,e)){var r=Math.min(t.endCC,e.endCC),i=vi(t.fragments,r),n=vi(e.fragments,r);i&&n&&(j.log("Aligning playlist at start of dicontinuity sequence "+r),pi(i.start-n.start,e))}}function Ei(e,t){if(e.hasProgramDateTime&&t.hasProgramDateTime){var r=e.fragments,i=t.fragments;if(r.length&&i.length){var n,a,s=Math.min(t.endCC,e.endCC);t.startCC<s&&e.startCC<s&&(n=vi(i,s),a=vi(r,s)),n&&a||(a=vi(r,(n=i[Math.floor(i.length/2)]).cc)||r[Math.floor(r.length/2)]);var o=n.programDateTime,l=a.programDateTime;o&&l&&pi((l-o)/1e3-(a.start-n.start),e)}}}var Ti=function(e){for(var t="",r=e.length,i=0;i<r;i++)t+="["+e.start(i).toFixed(3)+"-"+e.end(i).toFixed(3)+"]";return t},Si={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},Ai=function(e){function t(t,r,i,n,a){var s;return(s=e.call(this,n,t.logger)||this).hls=void 0,s.fragPrevious=null,s.fragCurrent=null,s.fragmentTracker=void 0,s.transmuxer=null,s._state=Si.STOPPED,s.playlistType=void 0,s.media=null,s.mediaBuffer=null,s.config=void 0,s.bitrateTest=!1,s.lastCurrentTime=0,s.nextLoadPosition=0,s.startPosition=0,s.startTimeOffset=null,s.retryDate=0,s.levels=null,s.fragmentLoader=void 0,s.keyLoader=void 0,s.levelLastLoaded=null,s.startFragRequested=!1,s.decrypter=void 0,s.initPTS=[],s.buffering=!0,s.loadingParts=!1,s.loopSn=void 0,s.onMediaSeeking=function(){var e=s,t=e.config,r=e.fragCurrent,i=e.media,n=e.mediaBuffer,a=e.state,o=i?i.currentTime:0,l=ar.bufferInfo(n||i,o,t.maxBufferHole);if(s.log("media seeking to "+(R(o)?o.toFixed(3):o)+", state: "+a),s.state===Si.ENDED)s.resetLoadingState();else if(r){var u=t.maxFragLookUpTolerance,d=r.start-u,h=r.start+r.duration+u;if(!l.len||h<l.start||d>l.end){var f=o>h;(o<d||f)&&(f&&r.loader&&(s.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),r.abortRequests(),s.resetLoadingState()),s.fragPrevious=null)}}if(i&&(s.fragmentTracker.removeFragmentsInRange(o,1/0,s.playlistType,!0),o>s.lastCurrentTime&&(s.lastCurrentTime=o),!s.loadingParts)){var c=Math.max(l.end,o),g=s.shouldLoadParts(s.getLevelDetails(),c);g&&(s.log("LL-Part loading ON after seeking to "+o.toFixed(2)+" with buffer @"+c.toFixed(2)),s.loadingParts=g)}s.hls.hasEnoughToStart||l.len||(s.log("setting startPosition to "+o+" because of seek before start"),s.nextLoadPosition=s.startPosition=o),s.tickImmediate()},s.onMediaEnded=function(){s.log("setting startPosition to 0 because media ended"),s.startPosition=s.lastCurrentTime=0},s.playlistType=a,s.hls=t,s.fragmentLoader=new Jt(t.config),s.keyLoader=i,s.fragmentTracker=r,s.config=t.config,s.decrypter=new Qt(t.config),s}u(t,e);var r=t.prototype;return r.registerListeners=function(){var e=this.hls;e.on(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(_.ERROR,this.onError,this)},r.unregisterListeners=function(){var e=this.hls;e.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(_.ERROR,this.onError,this)},r.doTick=function(){this.onTickEnd()},r.onTickEnd=function(){},r.startLoad=function(e){},r.stopLoad=function(){if(this.state!==Si.STOPPED){this.fragmentLoader.abort(),this.keyLoader.abort(this.playlistType);var e=this.fragCurrent;null!=e&&e.loader&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=Si.STOPPED}},r.pauseBuffering=function(){this.buffering=!1},r.resumeBuffering=function(){this.buffering=!0},r._streamEnded=function(e,t){if(t.live||!this.media)return!1;var r=e.end||0,i=this.config.timelineOffset||0;if(r<=i)return!1;var n=e.nextStart;if(n&&n>i&&n<t.edge)return!1;if(this.media.currentTime<e.start)return!1;var a=t.partList;if(null!=a&&a.length){var s=a[a.length-1];return ar.isBuffered(this.media,s.start+s.duration/2)}var o=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(o)},r.getLevelDetails=function(){var e;if(this.levels&&null!==this.levelLastLoaded)return null==(e=this.levelLastLoaded)?void 0:e.details},r.onMediaAttached=function(e,t){var r=this.media=this.mediaBuffer=t.media;r.removeEventListener("seeking",this.onMediaSeeking),r.removeEventListener("ended",this.onMediaEnded),r.addEventListener("seeking",this.onMediaSeeking),r.addEventListener("ended",this.onMediaEnded);var i=this.config;this.levels&&i.autoStartLoad&&this.state===Si.STOPPED&&this.startLoad(i.startPosition)},r.onMediaDetaching=function(e,t){var r=!!t.transferMedia,i=this.media;if(null!==i){if(i.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),i.removeEventListener("seeking",this.onMediaSeeking),i.removeEventListener("ended",this.onMediaEnded),this.keyLoader&&!r&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loopSn=void 0,r)return this.resetLoadingState(),void this.resetTransmuxer();this.loadingParts=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}},r.onManifestLoading=function(){this.initPTS=[],this.levels=this.levelLastLoaded=this.fragCurrent=null,this.lastCurrentTime=this.startPosition=0,this.startFragRequested=!1},r.onError=function(e,t){},r.onManifestLoaded=function(e,t){this.startTimeOffset=t.startTimeOffset},r.onHandlerDestroying=function(){this.stopLoad(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),e.prototype.onHandlerDestroying.call(this),this.hls=this.onMediaSeeking=this.onMediaEnded=null},r.onHandlerDestroyed=function(){this.state=Si.STOPPED,this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,e.prototype.onHandlerDestroyed.call(this)},r.loadFragment=function(e,t,r){this.startFragRequested=!0,this._loadFragForPlayback(e,t,r)},r._loadFragForPlayback=function(e,t,r){var i=this;this._doFragLoad(e,t,r,(function(e){var t=e.frag;if(i.fragContextChanged(t))return i.warn(t.type+" sn: "+t.sn+(e.part?" part: "+e.part.index:"")+" of "+i.fragInfo(t,!1,e.part)+") was dropped during download."),void i.fragmentTracker.removeFragment(t);t.stats.chunkCount++,i._handleFragmentLoadProgress(e)})).then((function(e){if(e){var t=i.state,r=e.frag;i.fragContextChanged(r)?(t===Si.FRAG_LOADING||!i.fragCurrent&&t===Si.PARSING)&&(i.fragmentTracker.removeFragment(r),i.state=Si.IDLE):("payload"in e&&(i.log("Loaded "+r.type+" sn: "+r.sn+" of "+i.playlistLabel()+" "+r.level),i.hls.trigger(_.FRAG_LOADED,e)),i._handleFragmentLoadComplete(e))}})).catch((function(t){i.state!==Si.STOPPED&&i.state!==Si.ERROR&&(i.warn("Frag error: "+((null==t?void 0:t.message)||t)),i.resetFragmentLoading(e))}))},r.clearTrackerIfNeeded=function(e){var t,r=this.fragmentTracker;if(r.getState(e)===Ut){var i=e.type,n=this.getFwdBufferInfo(this.mediaBuffer,i),a=Math.max(e.duration,n?n.len:this.config.maxBufferLength),s=this.backtrackFragment;(1==(s?e.sn-s.sn:0)||this.reduceMaxBufferLength(a,e.duration))&&r.removeFragment(e)}else 0===(null==(t=this.mediaBuffer)?void 0:t.buffered.length)?r.removeAllFragments():r.hasParts(e.type)&&(r.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),r.getState(e)===Bt&&r.removeFragment(e))},r.checkLiveUpdate=function(e){if(e.updated&&!e.live){var t=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:t,part:null,stats:t.stats,id:t.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)},r.waitForLive=function(e){var t=e.details;return(null==t?void 0:t.live)&&"EVENT"!==t.type&&(this.levelLastLoaded!==e||t.expired)},r.flushMainBuffer=function(e,t,r){if(void 0===r&&(r=null),e-t){var i={startOffset:e,endOffset:t,type:r};this.hls.trigger(_.BUFFER_FLUSHING,i)}},r._loadInitSegment=function(e,t){var r=this;this._doFragLoad(e,t).then((function(e){var t=null==e?void 0:e.frag;if(!t||r.fragContextChanged(t)||!r.levels)throw new Error("init load aborted");return e})).then((function(e){var t=r.hls,i=e.frag,n=e.payload,a=i.decryptdata;if(n&&n.byteLength>0&&null!=a&&a.key&&a.iv&&pr(a.method)){var s=self.performance.now();return r.decrypter.decrypt(new Uint8Array(n),a.key.buffer,a.iv.buffer,yr(a.method)).catch((function(e){throw t.trigger(_.ERROR,{type:k.MEDIA_ERROR,details:D.FRAG_DECRYPT_ERROR,fatal:!1,error:e,reason:e.message,frag:i}),e})).then((function(n){var a=self.performance.now();return t.trigger(_.FRAG_DECRYPTED,{frag:i,payload:n,stats:{tstart:s,tdecrypt:a}}),e.payload=n,r.completeInitSegmentLoad(e)}))}return r.completeInitSegmentLoad(e)})).catch((function(t){r.state!==Si.STOPPED&&r.state!==Si.ERROR&&(r.warn(t),r.resetFragmentLoading(e))}))},r.completeInitSegmentLoad=function(e){if(!this.levels)throw new Error("init load aborted, missing levels");var t=e.frag.stats;this.state!==Si.STOPPED&&(this.state=Si.IDLE),e.frag.data=new Uint8Array(e.payload),t.parsing.start=t.buffering.start=self.performance.now(),t.parsing.end=t.buffering.end=self.performance.now(),this.tick()},r.fragContextChanged=function(e){var t=this.fragCurrent;return!e||!t||e.sn!==t.sn||e.level!==t.level},r.fragBufferedComplete=function(e,t){var r=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log("Buffered "+e.type+" sn: "+e.sn+(t?" part: "+t.index:"")+" of "+this.fragInfo(e,!1,t)+" > buffer:"+(r?Ti(ar.getBuffered(r)):"(detached)")+")"),re(e)){var i;if(e.type!==F){var n=e.elementaryStreams;if(!Object.keys(n).some((function(e){return!!n[e]})))return void(this.state=Si.IDLE)}var a=null==(i=this.levels)?void 0:i[e.level];null!=a&&a.fragmentError&&(this.log("Resetting level fragment error count of "+a.fragmentError+" on frag buffered"),a.fragmentError=0)}this.state=Si.IDLE},r._handleFragmentLoadComplete=function(e){var t=this.transmuxer;if(t){var r=e.frag,i=e.part,n=e.partsLoaded,a=!n||0===n.length||n.some((function(e){return!e})),s=new ir(r.level,r.sn,r.stats.chunkCount+1,0,i?i.index:-1,!a);t.flush(s)}},r._handleFragmentLoadProgress=function(e){},r._doFragLoad=function(e,t,r,i){var n,a=this;void 0===r&&(r=null),this.fragCurrent=e;var s=null==t?void 0:t.details;if(!this.levels||!s)throw new Error("frag load aborted, missing level"+(s?"":" detail")+"s");var o=null;!e.encrypted||null!=(n=e.decryptdata)&&n.key?!e.encrypted&&s.encryptedFragments.length&&this.keyLoader.loadClear(e,s.encryptedFragments):(this.log("Loading key for "+e.sn+" of ["+s.startSN+"-"+s.endSN+"], "+this.playlistLabel()+" "+e.level),this.state=Si.KEY_LOADING,this.fragCurrent=e,o=this.keyLoader.load(e).then((function(e){if(!a.fragContextChanged(e.frag))return a.hls.trigger(_.KEY_LOADED,e),a.state===Si.KEY_LOADING&&(a.state=Si.IDLE),e})),this.hls.trigger(_.KEY_LOADING,{frag:e}),null===this.fragCurrent&&(o=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING"))));var l=this.fragPrevious;if(re(e)&&(!l||e.sn!==l.sn)){var u=this.shouldLoadParts(t.details,e.end);u!==this.loadingParts&&(this.log("LL-Part loading "+(u?"ON":"OFF")+" loading sn "+(null==l?void 0:l.sn)+"->"+e.sn),this.loadingParts=u)}if(r=Math.max(e.start,r||0),this.loadingParts&&re(e)){var d=s.partList;if(d&&i){r>e.end&&s.fragmentHint&&(e=s.fragmentHint);var h=this.getNextPart(d,e,r);if(h>-1){var f,c=d[h];return e=this.fragCurrent=c.fragment,this.log("Loading "+e.type+" sn: "+e.sn+" part: "+c.index+" ("+h+"/"+(d.length-1)+") of "+this.fragInfo(e,!1,c)+") cc: "+e.cc+" ["+s.startSN+"-"+s.endSN+"], target: "+parseFloat(r.toFixed(3))),this.nextLoadPosition=c.start+c.duration,this.state=Si.FRAG_LOADING,f=o?o.then((function(r){return!r||a.fragContextChanged(r.frag)?null:a.doFragPartsLoad(e,c,t,i)})).catch((function(e){return a.handleFragLoadError(e)})):this.doFragPartsLoad(e,c,t,i).catch((function(e){return a.handleFragLoadError(e)})),this.hls.trigger(_.FRAG_LOADING,{frag:e,part:c,targetBufferTime:r}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):f}if(!e.url||this.loadedEndOfParts(d,r))return Promise.resolve(null)}}if(re(e)&&this.loadingParts)this.log("LL-Part loading OFF after next part miss @"+r.toFixed(2)),this.loadingParts=!1;else if(!e.url)return Promise.resolve(null);this.log("Loading "+e.type+" sn: "+e.sn+" of "+this.fragInfo(e,!1)+") cc: "+e.cc+" "+(s?"["+s.startSN+"-"+s.endSN+"]":"")+", target: "+parseFloat(r.toFixed(3))),R(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=Si.FRAG_LOADING;var g,v=this.config.progressive;return g=v&&o?o.then((function(t){return!t||a.fragContextChanged(null==t?void 0:t.frag)?null:a.fragmentLoader.load(e,i)})).catch((function(e){return a.handleFragLoadError(e)})):Promise.all([this.fragmentLoader.load(e,v?i:void 0),o]).then((function(e){var t=e[0];return!v&&t&&i&&i(t),t})).catch((function(e){return a.handleFragLoadError(e)})),this.hls.trigger(_.FRAG_LOADING,{frag:e,targetBufferTime:r}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):g},r.doFragPartsLoad=function(e,t,r,i){var n=this;return new Promise((function(a,s){var o,l=[],u=null==(o=r.details)?void 0:o.partList,d=function(t){n.fragmentLoader.loadPart(e,t,i).then((function(i){l[t.index]=i;var s=i.part;n.hls.trigger(_.FRAG_LOADED,i);var o=fi(r.details,e.sn,t.index+1)||ci(u,e.sn,t.index+1);if(!o)return a({frag:e,part:s,partsLoaded:l});d(o)})).catch(s)};d(t)}))},r.handleFragLoadError=function(e){if("data"in e){var t=e.data;e.data&&t.details===D.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(_.ERROR,t)}else this.hls.trigger(_.ERROR,{type:k.OTHER_ERROR,details:D.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null},r._handleTransmuxerFlush=function(e){var t=this.getCurrentContext(e);if(t&&this.state===Si.PARSING){var r=t.frag,i=t.part,n=t.level,a=self.performance.now();r.stats.parsing.end=a,i&&(i.stats.parsing.end=a);var s=this.getLevelDetails(),o=s&&r.sn>s.endSN||this.shouldLoadParts(s,r.end);o!==this.loadingParts&&(this.log("LL-Part loading "+(o?"ON":"OFF")+" after parsing segment ending @"+r.end.toFixed(2)),this.loadingParts=o),this.updateLevelTiming(r,i,n,e.partial)}else this.fragCurrent||this.state===Si.STOPPED||this.state===Si.ERROR||(this.state=Si.IDLE)},r.shouldLoadParts=function(e,t){if(this.config.lowLatencyMode){if(!e)return this.loadingParts;if(null!=e&&e.partList){var r,i,n=e.partList[0];if(t>=n.end+((null==(r=e.fragmentHint)?void 0:r.duration)||0)&&(this.hls.hasEnoughToStart?(null==(i=this.media)?void 0:i.currentTime)||this.lastCurrentTime:this.getLoadPosition())>n.start-n.fragment.duration)return!0}}return!1},r.getCurrentContext=function(e){var t=this.levels,r=this.fragCurrent,i=e.level,n=e.sn,a=e.part;if(null==t||!t[i])return this.warn("Levels object was unset while buffering fragment "+n+" of "+this.playlistLabel()+" "+i+". The current chunk will not be buffered."),null;var s=t[i],o=s.details,l=a>-1?fi(o,n,a):null,u=l?l.fragment:hi(o,n,r);return u?(r&&r!==u&&(u.stats=r.stats),{frag:u,part:l,level:s}):null},r.bufferFragmentData=function(e,t,r,i,n){var a;if(e&&this.state===Si.PARSING){var s=e.data1,o=e.data2,l=s;if(s&&o&&(l=Ie(s,o)),null!=(a=l)&&a.length){var u={type:e.type,frag:t,part:r,chunkMeta:i,parent:t.type,data:l};if(this.hls.trigger(_.BUFFER_APPENDING,u),e.dropped&&e.independent&&!r){if(n)return;this.flushBufferGap(t)}}}},r.flushBufferGap=function(e){var t=this.media;if(t)if(ar.isBuffered(t,t.currentTime)){var r=t.currentTime,i=ar.bufferInfo(t,r,0),n=e.duration,a=Math.min(2*this.config.maxFragLookUpTolerance,.25*n),s=Math.max(Math.min(e.start-a,i.end-a),r+a);e.start-s>a&&this.flushMainBuffer(s,e.start)}else this.flushMainBuffer(0,e.start)},r.getFwdBufferInfo=function(e,t){var r,i=this.getLoadPosition();if(!R(i))return null;var n=this.lastCurrentTime>i||null!=(r=this.media)&&r.paused?0:this.config.maxBufferHole;return this.getFwdBufferInfoAtPos(e,i,t,n)},r.getFwdBufferInfoAtPos=function(e,t,r,i){var n=ar.bufferInfo(e,t,i);if(0===n.len&&void 0!==n.nextStart){var a=this.fragmentTracker.getBufferedFrag(t,r);if(a&&(n.nextStart<=a.end||a.gap)){var s=Math.max(Math.min(n.nextStart,a.end)-t,i);return ar.bufferInfo(e,t,s)}}return n},r.getMaxBufferLength=function(e){var t,r=this.config;return t=e?Math.max(8*r.maxBufferSize/e,r.maxBufferLength):r.maxBufferLength,Math.min(t,r.maxMaxBufferLength)},r.reduceMaxBufferLength=function(e,t){var r=this.config,i=Math.max(Math.min(e-t,r.maxBufferLength),t),n=Math.max(e-3*t,r.maxMaxBufferLength/2,i);return n>=i&&(r.maxMaxBufferLength=n,this.warn("Reduce max buffer length to "+n+"s"),!0)},r.getAppendedFrag=function(e,t){var r;void 0===t&&(t=x);var i=null==(r=this.fragmentTracker)?void 0:r.getAppendedFrag(e,t);return i&&"fragment"in i?i.fragment:i},r.getNextFragment=function(e,t){var r=t.fragments,i=r.length;if(!i)return null;var n=this.config,a=r[0].start,s=n.lowLatencyMode&&!!t.partList,o=null;if(t.live){var l=n.initialLiveManifestSize;if(i<l)return this.warn("Not enough fragments to start playback (have: "+i+", need: "+l+")"),null;if(!t.PTSKnown&&!this.startFragRequested&&-1===this.startPosition||e<a){var u;s&&!this.loadingParts&&(this.log("LL-Part loading ON for initial live fragment"),this.loadingParts=!0),o=this.getInitialLiveFragment(t,r);var d=this.hls.startPosition,h=this.hls.liveSyncPosition,f=o?(-1!==d&&d>=a?d:h)||o.start:e;this.log("Setting startPosition to "+f+" to match start frag at live edge. mainStart: "+d+" liveSyncPosition: "+h+" frag.start: "+(null==(u=o)?void 0:u.start)),this.startPosition=this.nextLoadPosition=f}}else e<=a&&(o=r[0]);if(!o){var c=this.loadingParts?t.partEnd:t.fragmentEnd;o=this.getFragmentAtPosition(e,c,t)}var g=this.filterReplacedPrimary(o,t);if(!g&&o){var v=o.sn-t.startSN;g=this.filterReplacedPrimary(r[v+1]||null,t)}return this.mapToInitFragWhenRequired(g)},r.isLoopLoading=function(e,t){var r=this.fragmentTracker.getState(e);return(r===Gt||r===Bt&&!!e.gap)&&this.nextLoadPosition>t},r.getNextFragmentLoopLoading=function(e,t,r,i,n){var a=null;if(e.gap&&(a=this.getNextFragment(this.nextLoadPosition,t))&&!a.gap&&r.nextStart){var s=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,r.nextStart,i,0);if(null!==s&&r.len+s.len>=n){var o=a.sn;return this.loopSn!==o&&(this.log('buffer full after gaps in "'+i+'" playlist starting at sn: '+o),this.loopSn=o),null}}return this.loopSn=void 0,a},r.filterReplacedPrimary=function(e,t){if(!e)return e;if(Li(this.hls.config)&&e.type!==F){var r=this.hls.interstitialsManager,i=null==r?void 0:r.bufferingItem;if(i){var n=i.event;if(n){if(n.appendInPlace||Math.abs(e.start-i.start)>1||0===i.start)return null}else{if(e.end<=i.start&&!1===(null==t?void 0:t.live))return null;if(e.start>i.end&&i.nextEvent&&(i.nextEvent.appendInPlace||e.start-i.end>1))return null}}var a=null==r?void 0:r.playerQueue;if(a)for(var s=a.length;s--;){var o=a[s].interstitial;if(o.appendInPlace&&e.start>=o.startTime&&e.end<=o.resumeTime)return null}}return e},r.mapToInitFragWhenRequired=function(e){return null==e||!e.initSegment||null!=e&&e.initSegment.data||this.bitrateTest?e:e.initSegment},r.getNextPart=function(e,t,r){for(var i=-1,n=!1,a=!0,s=0,o=e.length;s<o;s++){var l=e[s];if(a=a&&!l.independent,i>-1&&r<l.start)break;var u=l.loaded;u?i=-1:(n||l.independent||a)&&l.fragment===t&&(i=s),n=u}return i},r.loadedEndOfParts=function(e,t){var r=e[e.length-1];return r&&t>r.start&&r.loaded},r.getInitialLiveFragment=function(e,t){var r=this.fragPrevious,i=null;if(r){if(e.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+r.programDateTime),i=function(e,t,r){if(null===t||!Array.isArray(e)||!e.length||!R(t))return null;if(t<(e[0].programDateTime||0))return null;if(t>=(e[e.length-1].endProgramDateTime||0))return null;r=r||0;for(var i=0;i<e.length;++i){var n=e[i];if(St(t,r,n))return n}return null}(t,r.endProgramDateTime,this.config.maxFragLookUpTolerance)),!i){var n=r.sn+1;if(n>=e.startSN&&n<=e.endSN){var a=t[n-e.startSN];r.cc===a.cc&&(i=a,this.log("Live playlist, switching playlist, load frag with next SN: "+i.sn))}i||(i=At(t,r.cc))&&this.log("Live playlist, switching playlist, load frag with same CC: "+i.sn)}}else{var s=this.hls.liveSyncPosition;null!==s&&(i=this.getFragmentAtPosition(s,this.bitrateTest?e.fragmentEnd:e.edge,e))}return i},r.getFragmentAtPosition=function(e,t,r){var i,n,a=this.config,s=this.fragPrevious,o=r.fragments,l=r.endSN,u=r.fragmentHint,d=a.maxFragLookUpTolerance,h=r.partList,f=!!(this.loadingParts&&null!=h&&h.length&&u);if(f&&u&&!this.bitrateTest&&h[h.length-1].fragment.sn===u.sn&&(o=o.concat(u),l=u.sn),i=e<t?Et(s,o,e,e<this.lastCurrentTime||e>t-d||null!=(n=this.media)&&n.paused||!this.startFragRequested?0:d):o[o.length-1]){var c=i.sn-r.startSN,g=this.fragmentTracker.getState(i);if((g===Gt||g===Bt&&i.gap)&&(s=i),s&&i.sn===s.sn&&(!f||h[0].fragment.sn>i.sn||!r.live&&!f)&&s&&i.level===s.level){var v=o[c+1];i=i.sn<l&&this.fragmentTracker.getState(v)!==Gt?v:null}}return i},r.alignPlaylists=function(e,t,r){var i=e.fragments.length;if(!i)return this.warn("No fragments in live playlist"),0;var n=e.fragmentStart,a=!t,s=e.alignedSliding&&R(n);if(a||!s&&!n){!function(e,t){e&&(yi(t,e),!t.alignedSliding&&e&&Ei(t,e),t.alignedSliding||!e||t.skippedSegments||li(e,t,!1))}(r,e);var o=e.fragmentStart;return this.log("Live playlist sliding: "+o.toFixed(2)+" start-sn: "+(t?t.startSN:"na")+"->"+e.startSN+" fragments: "+i),o}return n},r.waitForCdnTuneIn=function(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,3*e.partTarget)},r.setStartPosition=function(e,t){var r=this.startPosition;r<t&&(r=-1);var i=this.timelineOffset;if(-1===r){var n=null!==this.startTimeOffset,a=n?this.startTimeOffset:e.startTimeOffset;null!==a&&R(a)?(r=t+a,a<0&&(r+=e.edge),r=Math.min(Math.max(t,r),t+e.totalduration),this.log("Setting startPosition to "+r+" for start time offset "+a+" found in "+(n?"multivariant":"media")+" playlist"),this.startPosition=r):e.live?(r=this.hls.liveSyncPosition||t,this.log("Setting startPosition to -1 to start at live edge "+r),this.startPosition=-1):(this.log("setting startPosition to 0 by default"),this.startPosition=r=0),this.lastCurrentTime=r+i}this.nextLoadPosition=r+i},r.getLoadPosition=function(){var e,t=this.media,r=0;return null!=(e=this.hls)&&e.hasEnoughToStart&&t?r=t.currentTime:this.nextLoadPosition>=0&&(r=this.nextLoadPosition),r},r.handleFragLoadAborted=function(e,t){this.transmuxer&&e.type===this.playlistType&&re(e)&&e.stats.aborted&&(this.warn("Fragment "+e.sn+(t?" part "+t.index:"")+" of "+this.playlistLabel()+" "+e.level+" was aborted"),this.resetFragmentLoading(e))},r.resetFragmentLoading=function(e){this.fragCurrent&&(this.fragContextChanged(e)||this.state===Si.FRAG_LOADING_WAITING_RETRY)||(this.state=Si.IDLE)},r.onFragmentOrKeyLoadError=function(e,t){if(t.chunkMeta&&!t.frag){var r=this.getCurrentContext(t.chunkMeta);r&&(t.frag=r.frag)}var i=t.frag;if(i&&i.type===e&&this.levels)if(this.fragContextChanged(i)){var n;this.warn("Frag load error must match current frag to retry "+i.url+" > "+(null==(n=this.fragCurrent)?void 0:n.url))}else{var a=t.details===D.FRAG_GAP;a&&this.fragmentTracker.fragBuffered(i,!0);var s=t.errorAction,o=s||{},l=o.action,u=o.flags,d=o.retryCount,h=void 0===d?0:d,f=o.retryConfig,c=!!s&&!!f,g=c&&l===Ct,v=c&&!s.resolved&&u===Ot;if(!g&&v&&re(i)&&!i.endList)this.resetFragmentErrors(e),this.treatAsGap(i),s.resolved=!0;else if((g||v)&&h<f.maxNumRetry){this.resetStartWhenNotLoaded(this.levelLastLoaded);var m=It(f,h);this.warn("Fragment "+i.sn+" of "+e+" "+i.level+" errored with "+t.details+", retrying loading "+(h+1)+"/"+f.maxNumRetry+" in "+m+"ms"),s.resolved=!0,this.retryDate=self.performance.now()+m,this.state=Si.FRAG_LOADING_WAITING_RETRY}else if(f&&s){if(this.resetFragmentErrors(e),!(h<f.maxNumRetry))return void this.warn(t.details+" reached or exceeded max retry ("+h+")");a||l===Pt||(s.resolved=!0)}else this.state=l===_t?Si.WAITING_LEVEL:Si.ERROR;this.tickImmediate()}},r.reduceLengthAndFlushBuffer=function(e){if(this.state===Si.PARSING||this.state===Si.PARSED){var t=e.frag,r=e.parent,i=this.getFwdBufferInfo(this.mediaBuffer,r),n=i&&i.len>.5;n&&this.reduceMaxBufferLength(i.len,(null==t?void 0:t.duration)||10);var a=!n;return a&&this.warn("Buffer full error while media.currentTime is not buffered, flush "+r+" buffer"),t&&(this.fragmentTracker.removeFragment(t),this.nextLoadPosition=t.start),this.resetLoadingState(),a}return!1},r.resetFragmentErrors=function(e){e===M&&(this.fragCurrent=null),this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.state!==Si.STOPPED&&(this.state=Si.IDLE)},r.afterBufferFlushed=function(e,t,r){if(e){var i=ar.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,i,r),this.state===Si.ENDED&&this.resetLoadingState()}},r.resetLoadingState=function(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state!==Si.STOPPED&&(this.state=Si.IDLE)},r.resetStartWhenNotLoaded=function(e){if(!this.hls.hasEnoughToStart){this.startFragRequested=!1;var t=e?e.details:null;null!=t&&t.live?(this.log("resetting startPosition for live start"),this.startPosition=-1,this.setStartPosition(t,t.fragmentStart),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}},r.resetWhenMissingContext=function(e){this.warn("The loading context changed while buffering fragment "+e.sn+" of "+this.playlistLabel()+" "+e.level+". This chunk will not be buffered."),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState()},r.removeUnbufferedFrags=function(e){void 0===e&&(e=0),this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)},r.updateLevelTiming=function(e,t,r,i){var n=this,a=r.details;if(a){var s;if(!Object.keys(e.elementaryStreams).reduce((function(t,s){var o=e.elementaryStreams[s];if(o){var l=o.endPTS-o.startPTS;if(l<=0)return n.warn("Could not parse fragment "+e.sn+" "+s+" duration reliably ("+l+")"),t||!1;var u=i?0:ai(a,e,o.startPTS,o.endPTS,o.startDTS,o.endDTS);return n.hls.trigger(_.LEVEL_PTS_UPDATED,{details:a,level:r,drift:u,type:s,frag:e,start:o.startPTS,end:o.endPTS}),!0}return t}),!1)&&(0===r.fragmentError&&this.treatAsGap(e,r),null===(null==(s=this.transmuxer)?void 0:s.error))){var o=new Error("Found no media in fragment "+e.sn+" of "+this.playlistLabel()+" "+e.level+" resetting transmuxer to fallback to playlist timing");if(this.warn(o.message),this.hls.trigger(_.ERROR,{type:k.MEDIA_ERROR,details:D.FRAG_PARSING_ERROR,fatal:!1,error:o,frag:e,reason:"Found no media in msn "+e.sn+" of "+this.playlistLabel()+' "'+r.url+'"'}),!this.hls)return;this.resetTransmuxer()}this.state=Si.PARSED,this.log("Parsed "+e.type+" sn: "+e.sn+(t?" part: "+t.index:"")+" of "+this.fragInfo(e,!1,t)+")"),this.hls.trigger(_.FRAG_PARSED,{frag:e,part:t})}else this.warn("level.details undefined")},r.playlistLabel=function(){return this.playlistType===x?"level":"track"},r.fragInfo=function(e,t,r){var i,n;return void 0===t&&(t=!0),this.playlistLabel()+" "+e.level+" ("+(r?"part":"frag")+":["+(null!=(i=t&&!r?e.startPTS:(r||e).start)?i:NaN).toFixed(3)+"-"+(null!=(n=t&&!r?e.endPTS:(r||e).end)?n:NaN).toFixed(3)+"]"+(r&&"main"===e.type?"INDEPENDENT="+(r.independent?"YES":"NO"):"")},r.treatAsGap=function(e,t){t&&t.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)},r.resetTransmuxer=function(){var e;null==(e=this.transmuxer)||e.reset()},r.recoverWorkerError=function(e){"demuxerWorker"===e.event&&(this.fragmentTracker.removeAllFragments(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState())},n(t,[{key:"startPositionValue",get:function(){var e=this.nextLoadPosition,t=this.startPosition;return-1===t&&e?e:t}},{key:"bufferingEnabled",get:function(){return this.buffering}},{key:"inFlightFrag",get:function(){return{frag:this.fragCurrent,state:this.state}}},{key:"timelineOffset",get:function(){var e,t=this.config.timelineOffset;return t?(null==(e=this.getLevelDetails())?void 0:e.appliedTimelineOffset)||t:0}},{key:"primaryPrefetch",get:function(){var e,t;return!(!Li(this.hls.config)||!(null==(e=this.hls.interstitialsManager)||null==(t=e.playingItem)?void 0:t.event))}},{key:"state",get:function(){return this._state},set:function(e){var t=this._state;t!==e&&(this._state=e,this.log(t+"->"+e))}}])}(rr);function Li(e){return!!e.interstitialsController&&!1!==e.enableInterstitialPlayback}var Ri=function(){function e(){this.chunks=[],this.dataLength=0}var t=e.prototype;return t.push=function(e){this.chunks.push(e),this.dataLength+=e.length},t.flush=function(){var e,t=this.chunks,r=this.dataLength;return t.length?(e=1===t.length?t[0]:function(e,t){for(var r=new Uint8Array(t),i=0,n=0;n<e.length;n++){var a=e[n];r.set(a,i),i+=a.length}return r}(t,r),this.reset(),e):new Uint8Array(0)},t.reset=function(){this.chunks.length=0,this.dataLength=0},e}();function Ii(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128}function bi(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128}function ki(e,t){var r=0;return r=(127&e[t])<<21,r|=(127&e[t+1])<<14,r|=(127&e[t+2])<<7,r|=127&e[t+3]}function Di(e,t){for(var r=t,i=0;bi(e,t);)i+=10,i+=ki(e,t+6),Ii(e,t+10)&&(i+=10),t+=i;if(i>0)return e.subarray(r,r+i)}function _i(e,t){return 255===e[t]&&240==(246&e[t+1])}function Pi(e,t){return 1&e[t+1]?7:9}function Ci(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function wi(e,t){return t+1<e.length&&_i(e,t)}function Oi(e,t){if(wi(e,t)){var r=Pi(e,t);if(t+r>=e.length)return!1;var i=Ci(e,t);if(i<=r)return!1;var n=t+i;return n===e.length||wi(e,n)}return!1}function xi(e,t,r,i,n){if(!e.samplerate){var a=function(e,t,r,i){var n=t[r+2],a=n>>2&15;if(!(a>12)){var s=1+(n>>6&3),o=t[r+3]>>6&3|(1&n)<<2,l="mp4a.40."+s,u=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350][a],d=a;5!==s&&29!==s||(d-=3);var h=[s<<3|(14&d)>>1,(1&d)<<7|o<<3];return j.log("manifest codec:"+i+", parsed codec:"+l+", channels:"+o+", rate:"+u+" (ADTS object type:"+s+" sampling index:"+a+")"),{config:h,samplerate:u,channelCount:o,codec:l,parsedCodec:l,manifestCodec:i}}var f=new Error("invalid ADTS sampling index:"+a);e.emit(_.ERROR,_.ERROR,{type:k.MEDIA_ERROR,details:D.FRAG_PARSING_ERROR,fatal:!0,error:f,reason:f.message})}(t,r,i,n);if(!a)return;o(e,a)}}function Mi(e){return 9216e4/e}function Fi(e,t,r,i,n){var a,s=i+n*Mi(e.samplerate),o=function(e,t){var r=Pi(e,t);if(t+r<=e.length){var i=Ci(e,t)-r;if(i>0)return{headerLength:r,frameLength:i}}}(t,r);if(o){var l=o.frameLength,u=o.headerLength,d=u+l,h=Math.max(0,r+d-t.length);h?(a=new Uint8Array(d-u)).set(t.subarray(r+u,t.length),0):a=t.subarray(r+u,r+d);var f={unit:a,pts:s};return h||e.samples.push(f),{sample:f,length:d,missing:h}}var c=t.length-r;return(a=new Uint8Array(c)).set(t.subarray(r,t.length),0),{sample:{unit:a,pts:s},length:c,missing:-1}}function Ni(e,t){return bi(e,t)&&ki(e,t+6)+10<=e.length-t}function Ui(e,t){if(e<0)return-Ui(-e,t);var r=Math.pow(10,t);if(Math.abs(e*r%1-.5)<Number.EPSILON){var i=Math.floor(e*r);return(i%2==0?i:i+1)/r}return Math.round(e*r)/r}function Bi(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=1/0),function(e,t,r,i){var n=function(e){return e instanceof ArrayBuffer?e:e.buffer}(e),a=1;"BYTES_PER_ELEMENT"in i&&(a=i.BYTES_PER_ELEMENT);var s,o=(s=e)&&s.buffer instanceof ArrayBuffer&&void 0!==s.byteLength&&void 0!==s.byteOffset?e.byteOffset:0,l=(o+e.byteLength)/a,u=(o+t)/a,d=Math.floor(Math.max(0,Math.min(u,l))),h=Math.floor(Math.min(d+Math.max(r,0),l));return new i(n,d,h-d)}(e,t,r,Uint8Array)}function Gi(e){var t={key:e.type,description:"",data:"",mimeType:null,pictureType:null};if(!(e.size<2))if(3===e.data[0]){var r=e.data.subarray(1).indexOf(0);if(-1!==r){var i=z(Bi(e.data,1,r)),n=e.data[2+r],a=e.data.subarray(3+r).indexOf(0);if(-1!==a){var s,o=z(Bi(e.data,3+r,a));return s="--\x3e"===i?z(Bi(e.data,4+r+a)):function(e){return e instanceof ArrayBuffer?e:0==e.byteOffset&&e.byteLength==e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer}(e.data.subarray(4+r+a)),t.mimeType=i,t.pictureType=n,t.description=o,t.data=s,t}}}else console.log("Ignore frame with unrecognized character encoding")}function Ki(e){return"PRIV"===e.type?function(e){if(!(e.size<2)){var t=z(e.data,!0),r=new Uint8Array(e.data.subarray(t.length+1));return{key:e.type,info:t,data:r.buffer}}}(e):"W"===e.type[0]?function(e){if("WXXX"===e.type){if(e.size<2)return;var t=1,r=z(e.data.subarray(t),!0);t+=r.length+1;var i=z(e.data.subarray(t));return{key:e.type,info:r,data:i}}var n=z(e.data);return{key:e.type,info:"",data:n}}(e):"APIC"===e.type?Gi(e):function(e){if(!(e.size<2)){if("TXXX"===e.type){var t=1,r=z(e.data.subarray(t),!0);t+=r.length+1;var i=z(e.data.subarray(t));return{key:e.type,info:r,data:i}}var n=z(e.data.subarray(1));return{key:e.type,info:"",data:n}}}(e)}function Hi(e){var t=String.fromCharCode(e[0],e[1],e[2],e[3]),r=ki(e,4);return{type:t,size:r,data:e.subarray(10,10+r)}}var Vi=10,Yi=10;function Wi(e){for(var t=0,r=[];bi(e,t);){var i=ki(e,t+6);e[t+5]>>6&1&&(t+=Vi);for(var n=(t+=Vi)+i;t+Yi<n;){var a=Hi(e.subarray(t)),s=Ki(a);s&&r.push(s),t+=a.size+Vi}Ii(e,t)&&(t+=Vi)}return r}function ji(e){return e&&"PRIV"===e.key&&"com.apple.streaming.transportStreamTimestamp"===e.info}function qi(e){if(8===e.data.byteLength){var t=new Uint8Array(e.data),r=1&t[3],i=(t[4]<<23)+(t[5]<<15)+(t[6]<<7)+t[7];return i/=45,r&&(i+=47721858.84),Math.round(i)}}function Xi(e){for(var t=Wi(e),r=0;r<t.length;r++){var i=t[r];if(ji(i))return qi(i)}}var zi=function(e){return e.audioId3="org.id3",e.dateRange="com.apple.quicktime.HLS",e.emsg="https://aomedia.org/emsg/ID3",e.misbklv="urn:misb:KLV:bin:1910.1",e}({});function Qi(e,t){return void 0===e&&(e=""),void 0===t&&(t=9e4),{type:e,id:-1,pid:-1,inputTimeScale:t,sequenceNumber:-1,samples:[],dropped:0}}var $i=function(){function e(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}var t=e.prototype;return t.resetInitSegment=function(e,t,r,i){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},t.resetTimeStamp=function(e){this.initPTS=e,this.resetContiguity()},t.resetContiguity=function(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0},t.canParse=function(e,t){return!1},t.appendFrame=function(e,t,r){},t.demux=function(e,t){this.cachedData&&(e=Ie(this.cachedData,e),this.cachedData=null);var r,i=Di(e,0),n=i?i.length:0,a=this._audioTrack,s=this._id3Track,o=i?Xi(i):void 0,l=e.length;for((null===this.basePTS||0===this.frameIndex&&R(o))&&(this.basePTS=Ji(o,t,this.initPTS),this.lastPTS=this.basePTS),null===this.lastPTS&&(this.lastPTS=this.basePTS),i&&i.length>0&&s.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:i,type:zi.audioId3,duration:Number.POSITIVE_INFINITY});n<l;){if(this.canParse(e,n)){var u=this.appendFrame(a,e,n);u?(this.frameIndex++,this.lastPTS=u.sample.pts,r=n+=u.length):n=l}else Ni(e,n)?(i=Di(e,n),s.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:i,type:zi.audioId3,duration:Number.POSITIVE_INFINITY}),r=n+=i.length):n++;if(n===l&&r!==l){var d=e.slice(r);this.cachedData?this.cachedData=Ie(this.cachedData,d):this.cachedData=d}}return{audioTrack:a,videoTrack:Qi(),id3Track:s,textTrack:Qi()}},t.demuxSampleAes=function(e,t,r){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},t.flush=function(e){var t=this.cachedData;return t&&(this.cachedData=null,this.demux(t,0)),{audioTrack:this._audioTrack,videoTrack:Qi(),id3Track:this._id3Track,textTrack:Qi()}},t.destroy=function(){this.cachedData=null,this._audioTrack=this._id3Track=void 0},e}(),Ji=function(e,t,r){return R(e)?90*e:9e4*t+(r?9e4*r.baseTime/r.timescale:0)},Zi=null,en=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],tn=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],rn=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],nn=[0,1,1,4];function an(e,t,r,i,n){if(!(r+24>t.length)){var a=sn(t,r);if(a&&r+a.frameLength<=t.length){var s=i+n*(9e4*a.samplesPerFrame/a.sampleRate),o={unit:t.subarray(r,r+a.frameLength),pts:s,dts:s};return e.config=[],e.channelCount=a.channelCount,e.samplerate=a.sampleRate,e.samples.push(o),{sample:o,length:a.frameLength,missing:0}}}}function sn(e,t){var r=e[t+1]>>3&3,i=e[t+1]>>1&3,n=e[t+2]>>4&15,a=e[t+2]>>2&3;if(1!==r&&0!==n&&15!==n&&3!==a){var s=e[t+2]>>1&1,o=e[t+3]>>6,l=1e3*en[14*(3===r?3-i:3===i?3:4)+n-1],u=tn[3*(3===r?0:2===r?1:2)+a],d=3===o?1:2,h=rn[r][i],f=nn[i],c=8*h*f,g=Math.floor(h*l/u+s)*f;if(null===Zi){var v=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Zi=v?parseInt(v[1]):0}return!!Zi&&Zi<=87&&2===i&&l>=224e3&&0===o&&(e[t+3]=128|e[t+3]),{sampleRate:u,channelCount:d,frameLength:g,samplesPerFrame:c}}}function on(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])}function ln(e,t){return t+1<e.length&&on(e,t)}function un(e,t){if(t+1<e.length&&on(e,t)){var r=sn(e,t),i=4;null!=r&&r.frameLength&&(i=r.frameLength);var n=t+i;return n===e.length||ln(e,n)}return!1}var dn=function(e){function t(t,r){var i;return(i=e.call(this)||this).observer=void 0,i.config=void 0,i.observer=t,i.config=r,i}u(t,e);var r=t.prototype;return r.resetInitSegment=function(t,r,i,n){e.prototype.resetInitSegment.call(this,t,r,i,n),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:r,duration:n,inputTimeScale:9e4,dropped:0}},t.probe=function(e,t){if(!e)return!1;var r=Di(e,0),i=(null==r?void 0:r.length)||0;if(un(e,i))return!1;for(var n=e.length;i<n;i++)if(Oi(e,i))return t.log("ADTS sync word found !"),!0;return!1},r.canParse=function(e,t){return function(e,t){return function(e,t){return t+5<e.length}(e,t)&&_i(e,t)&&Ci(e,t)<=e.length-t}(e,t)},r.appendFrame=function(e,t,r){xi(e,this.observer,t,r,e.manifestCodec);var i=Fi(e,t,r,this.basePTS,this.frameIndex);if(i&&0===i.missing)return i},t}($i),hn=function(e,t){var r=0,i=5;t+=i;for(var n=new Uint32Array(1),a=new Uint32Array(1),s=new Uint8Array(1);i>0;){s[0]=e[t];var o=Math.min(i,8),l=8-o;a[0]=4278190080>>>24+l<<l,n[0]=(s[0]&a[0])>>l,r=r?r<<o|n[0]:n[0],t+=1,i-=o}return r},fn=function(e){function t(t){var r;return(r=e.call(this)||this).observer=void 0,r.observer=t,r}u(t,e);var r=t.prototype;return r.resetInitSegment=function(t,r,i,n){e.prototype.resetInitSegment.call(this,t,r,i,n),this._audioTrack={container:"audio/ac-3",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"ac3",samples:[],manifestCodec:r,duration:n,inputTimeScale:9e4,dropped:0}},r.canParse=function(e,t){return t+64<e.length},r.appendFrame=function(e,t,r){var i=cn(e,t,r,this.basePTS,this.frameIndex);if(-1!==i)return{sample:e.samples[e.samples.length-1],length:i,missing:0}},t.probe=function(e){if(!e)return!1;var t=Di(e,0);if(!t)return!1;var r=t.length;return 11===e[r]&&119===e[r+1]&&void 0!==Xi(t)&&hn(e,r)<16},t}($i);function cn(e,t,r,i,n){if(r+8>t.length)return-1;if(11!==t[r]||119!==t[r+1])return-1;var a=t[r+4]>>6;if(a>=3)return-1;var s=[48e3,44100,32e3][a],o=63&t[r+4],l=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*o+a];if(r+l>t.length)return-1;var u=t[r+6]>>5,d=0;2===u?d+=2:(1&u&&1!==u&&(d+=2),4&u&&(d+=2));var h=(t[r+6]<<8|t[r+7])>>12-d&1,f=[2,1,2,3,3,4,4,5][u]+h,c=t[r+5]>>3,g=7&t[r+5],v=new Uint8Array([a<<6|c<<1|g>>2,(3&g)<<6|u<<3|h<<2|o>>4,o<<4&224]),m=i+n*(1536/s*9e4),p=t.subarray(r,r+l);return e.config=v,e.channelCount=f,e.samplerate=s,e.samples.push({unit:p,pts:m}),l}var gn=function(e){function t(){return e.apply(this,arguments)||this}u(t,e);var r=t.prototype;return r.resetInitSegment=function(t,r,i,n){e.prototype.resetInitSegment.call(this,t,r,i,n),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:r,duration:n,inputTimeScale:9e4,dropped:0}},t.probe=function(e){if(!e)return!1;var t=Di(e,0),r=(null==t?void 0:t.length)||0;if(t&&11===e[r]&&119===e[r+1]&&void 0!==Xi(t)&&hn(e,r)<=16)return!1;for(var i=e.length;r<i;r++)if(un(e,r))return j.log("MPEG Audio sync word found !"),!0;return!1},r.canParse=function(e,t){return function(e,t){return on(e,t)&&4<=e.length-t}(e,t)},r.appendFrame=function(e,t,r){if(null!==this.basePTS)return an(e,t,r,this.basePTS,this.frameIndex)},t}($i),vn=/\/emsg[-/]ID3/i,mn=function(){function e(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}var t=e.prototype;return t.resetTimeStamp=function(){},t.resetInitSegment=function(e,t,r,i){var n=this.videoTrack=Qi("video",1),a=this.audioTrack=Qi("audio",1),s=this.txtTrack=Qi("text",1);if(this.id3Track=Qi("id3",1),this.timeOffset=0,null!=e&&e.byteLength){var o=pe(e);if(o.video){var l=o.video,u=l.id,d=l.timescale,h=l.codec,f=l.supplemental;n.id=u,n.timescale=s.timescale=d,n.codec=h,n.supplemental=f}if(o.audio){var c=o.audio,g=c.id,v=c.timescale,m=c.codec;a.id=g,a.timescale=v,a.codec=m}s.id=le.text,n.sampleDuration=0,n.duration=a.duration=i}},t.resetContiguity=function(){this.remainderData=null},e.probe=function(e){return function(e){for(var t=e.byteLength,r=0;r<t;){var i=he(e,r);if(i>8&&109===e[r+4]&&111===e[r+5]&&111===e[r+6]&&102===e[r+7])return!0;r=i>1?r+i:t}return!1}(e)},t.demux=function(e,t){this.timeOffset=t;var r=e,i=this.videoTrack,n=this.txtTrack;if(this.config.progressive){this.remainderData&&(r=Ie(this.remainderData,e));var a=function(e){var t={valid:null,remainder:null},r=ve(e,["moof"]);if(r.length<2)return t.remainder=e,t;var i=r[r.length-1];return t.valid=e.slice(0,i.byteOffset-8),t.remainder=e.slice(i.byteOffset-8),t}(r);this.remainderData=a.remainder,i.samples=a.valid||new Uint8Array}else i.samples=r;var s=this.extractID3Track(i,t);return n.samples=be(t,i),{videoTrack:i,audioTrack:this.audioTrack,id3Track:s,textTrack:this.txtTrack}},t.flush=function(){var e=this.timeOffset,t=this.videoTrack,r=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;var i=this.extractID3Track(t,this.timeOffset);return r.samples=be(e,t),{videoTrack:t,audioTrack:Qi(),id3Track:i,textTrack:Qi()}},t.extractID3Track=function(e,t){var r=this,i=this.id3Track;if(e.samples.length){var n=ve(e.samples,["emsg"]);n&&n.forEach((function(e){var n=function(e){var t=e[0],r="",i="",n=0,a=0,s=0,o=0,l=0,u=0;if(0===t){for(;"\0"!==ue(e.subarray(u,u+1));)r+=ue(e.subarray(u,u+1)),u+=1;for(r+=ue(e.subarray(u,u+1)),u+=1;"\0"!==ue(e.subarray(u,u+1));)i+=ue(e.subarray(u,u+1)),u+=1;i+=ue(e.subarray(u,u+1)),u+=1,n=he(e,12),a=he(e,16),o=he(e,20),l=he(e,24),u=28}else if(1===t){n=he(e,u+=4);var d=he(e,u+=4),h=he(e,u+=4);for(u+=4,s=Math.pow(2,32)*d+h,I(s)||(s=Number.MAX_SAFE_INTEGER,j.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),o=he(e,u),l=he(e,u+=4),u+=4;"\0"!==ue(e.subarray(u,u+1));)r+=ue(e.subarray(u,u+1)),u+=1;for(r+=ue(e.subarray(u,u+1)),u+=1;"\0"!==ue(e.subarray(u,u+1));)i+=ue(e.subarray(u,u+1)),u+=1;i+=ue(e.subarray(u,u+1)),u+=1}return{schemeIdUri:r,value:i,timeScale:n,presentationTime:s,presentationTimeDelta:a,eventDuration:o,id:l,payload:e.subarray(u,e.byteLength)}}(e);if(vn.test(n.schemeIdUri)){var a=pn(n,t),s=4294967295===n.eventDuration?Number.POSITIVE_INFINITY:n.eventDuration/n.timeScale;s<=.001&&(s=Number.POSITIVE_INFINITY);var o=n.payload;i.samples.push({data:o,len:o.byteLength,dts:a,pts:a,type:zi.emsg,duration:s})}else if(r.config.enableEmsgKLVMetadata&&n.schemeIdUri.startsWith("urn:misb:KLV:bin:1910.1")){var l=pn(n,t);i.samples.push({data:n.payload,len:n.payload.byteLength,dts:l,pts:l,type:zi.misbklv,duration:Number.POSITIVE_INFINITY})}}))}return i},t.demuxSampleAes=function(e,t,r){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},t.destroy=function(){this.config=null,this.remainderData=null,this.videoTrack=this.audioTrack=this.id3Track=this.txtTrack=void 0},e}();function pn(e,t){return R(e.presentationTime)?e.presentationTime/e.timeScale:t+e.presentationTimeDelta/e.timeScale}var yn=function(){function e(e,t,r){this.keyData=void 0,this.decrypter=void 0,this.keyData=r,this.decrypter=new Qt(t,{removePKCS7Padding:!1})}var t=e.prototype;return t.decryptBuffer=function(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer,Wt)},t.decryptAacSample=function(e,t,r){var i=this,n=e[t].unit;if(!(n.length<=16)){var a=n.subarray(16,n.length-n.length%16),s=a.buffer.slice(a.byteOffset,a.byteOffset+a.length);this.decryptBuffer(s).then((function(a){var s=new Uint8Array(a);n.set(s,16),i.decrypter.isSync()||i.decryptAacSamples(e,t+1,r)}))}},t.decryptAacSamples=function(e,t,r){for(;;t++){if(t>=e.length)return void r();if(!(e[t].unit.length<32||(this.decryptAacSample(e,t,r),this.decrypter.isSync())))return}},t.getAvcEncryptedData=function(e){for(var t=16*Math.floor((e.length-48)/160)+16,r=new Int8Array(t),i=0,n=32;n<e.length-16;n+=160,i+=16)r.set(e.subarray(n,n+16),i);return r},t.getAvcDecryptedUnit=function(e,t){for(var r=new Uint8Array(t),i=0,n=32;n<e.length-16;n+=160,i+=16)e.set(r.subarray(i,i+16),n);return e},t.decryptAvcSample=function(e,t,r,i,n){var a=this,s=Pe(n.data),o=this.getAvcEncryptedData(s);this.decryptBuffer(o.buffer).then((function(o){n.data=a.getAvcDecryptedUnit(s,o),a.decrypter.isSync()||a.decryptAvcSamples(e,t,r+1,i)}))},t.decryptAvcSamples=function(e,t,r,i){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,r=0){if(t>=e.length)return void i();for(var n=e[t].units;!(r>=n.length);r++){var a=n[r];if(!(a.data.length<=48||1!==a.type&&5!==a.type||(this.decryptAvcSample(e,t,r,i,a),this.decrypter.isSync())))return}}},e}(),En=function(){function e(){this.VideoSample=null}var t=e.prototype;return t.createVideoSample=function(e,t,r){return{key:e,frame:!1,pts:t,dts:r,units:[],length:0}},t.getLastNalUnit=function(e){var t,r,i=this.VideoSample;if(i&&0!==i.units.length||(i=e[e.length-1]),null!=(t=i)&&t.units){var n=i.units;r=n[n.length-1]}return r},t.pushAccessUnit=function(e,t){if(e.units.length&&e.frame){if(void 0===e.pts){var r=t.samples,i=r.length;if(!i)return void t.dropped++;var n=r[i-1];e.pts=n.pts,e.dts=n.dts}t.samples.push(e)}},t.parseNALu=function(e,t,r){var i,n,a=t.byteLength,s=e.naluState||0,o=s,l=[],u=0,d=-1,h=0;for(-1===s&&(d=0,h=this.getNALuType(t,0),s=0,u=1);u<a;)if(i=t[u++],s)if(1!==s)if(i)if(1===i){if(n=u-s-1,d>=0){var f={data:t.subarray(d,n),type:h};l.push(f)}else{var c=this.getLastNalUnit(e.samples);c&&(o&&u<=4-o&&c.state&&(c.data=c.data.subarray(0,c.data.byteLength-o)),n>0&&(c.data=Ie(c.data,t.subarray(0,n)),c.state=0))}u<a?(d=u,h=this.getNALuType(t,u),s=0):s=-1}else s=0;else s=3;else s=i?0:2;else s=i?0:1;if(d>=0&&s>=0){var g={data:t.subarray(d,a),type:h,state:s};l.push(g)}if(0===l.length){var v=this.getLastNalUnit(e.samples);v&&(v.data=Ie(v.data,t))}return e.naluState=s,l},e}(),Tn=function(){function e(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}var t=e.prototype;return t.loadWord=function(){var e=this.data,t=this.bytesAvailable,r=e.byteLength-t,i=new Uint8Array(4),n=Math.min(4,t);if(0===n)throw new Error("no bytes available");i.set(e.subarray(r,r+n)),this.word=new DataView(i.buffer).getUint32(0),this.bitsAvailable=8*n,this.bytesAvailable-=n},t.skipBits=function(e){var t;e=Math.min(e,8*this.bytesAvailable+this.bitsAvailable),this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,e-=(t=e>>3)<<3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},t.readBits=function(e){var t=Math.min(this.bitsAvailable,e),r=this.word>>>32-t;if(e>32&&j.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0)this.word<<=t;else{if(!(this.bytesAvailable>0))throw new Error("no bits available");this.loadWord()}return(t=e-t)>0&&this.bitsAvailable?r<<t|this.readBits(t):r},t.skipLZ=function(){var e;for(e=0;e<this.bitsAvailable;++e)if(0!=(this.word&2147483648>>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},t.skipUEG=function(){this.skipBits(1+this.skipLZ())},t.skipEG=function(){this.skipBits(1+this.skipLZ())},t.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},t.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},t.readBoolean=function(){return 1===this.readBits(1)},t.readUByte=function(){return this.readBits(8)},t.readUShort=function(){return this.readBits(16)},t.readUInt=function(){return this.readBits(32)},e}(),Sn=function(e){function t(){return e.apply(this,arguments)||this}u(t,e);var r=t.prototype;return r.parsePES=function(e,t,r,i){var n,a=this,s=this.parseNALu(e,r.data,i),o=this.VideoSample,l=!1;r.data=null,o&&s.length&&!e.audFound&&(this.pushAccessUnit(o,e),o=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts)),s.forEach((function(i){var s,u;switch(i.type){case 1:var d=!1;n=!0;var h,f=i.data;if(l&&f.length>4){var c=a.readSliceType(f);2!==c&&4!==c&&7!==c&&9!==c||(d=!0)}d&&null!=(h=o)&&h.frame&&!o.key&&(a.pushAccessUnit(o,e),o=a.VideoSample=null),o||(o=a.VideoSample=a.createVideoSample(!0,r.pts,r.dts)),o.frame=!0,o.key=d;break;case 5:n=!0,null!=(s=o)&&s.frame&&!o.key&&(a.pushAccessUnit(o,e),o=a.VideoSample=null),o||(o=a.VideoSample=a.createVideoSample(!0,r.pts,r.dts)),o.key=!0,o.frame=!0;break;case 6:n=!0,_e(i.data,1,r.pts,t.samples);break;case 7:var g,v;n=!0,l=!0;var m=i.data,p=a.readSPS(m);if(!e.sps||e.width!==p.width||e.height!==p.height||(null==(g=e.pixelRatio)?void 0:g[0])!==p.pixelRatio[0]||(null==(v=e.pixelRatio)?void 0:v[1])!==p.pixelRatio[1]){e.width=p.width,e.height=p.height,e.pixelRatio=p.pixelRatio,e.sps=[m];for(var y=m.subarray(1,4),E="avc1.",T=0;T<3;T++){var S=y[T].toString(16);S.length<2&&(S="0"+S),E+=S}e.codec=E}break;case 8:n=!0,e.pps=[i.data];break;case 9:n=!0,e.audFound=!0,null!=(u=o)&&u.frame&&(a.pushAccessUnit(o,e),o=null),o||(o=a.VideoSample=a.createVideoSample(!1,r.pts,r.dts));break;case 12:n=!0;break;default:n=!1}o&&n&&o.units.push(i)})),i&&o&&(this.pushAccessUnit(o,e),this.VideoSample=null)},r.getNALuType=function(e,t){return 31&e[t]},r.readSliceType=function(e){var t=new Tn(e);return t.readUByte(),t.readUEG(),t.readUEG()},r.skipScalingList=function(e,t){for(var r=8,i=8,n=0;n<e;n++)0!==i&&(i=(r+t.readEG()+256)%256),r=0===i?r:i},r.readSPS=function(e){var t,r,i,n=new Tn(e),a=0,s=0,o=0,l=0,u=n.readUByte.bind(n),d=n.readBits.bind(n),h=n.readUEG.bind(n),f=n.readBoolean.bind(n),c=n.skipBits.bind(n),g=n.skipEG.bind(n),v=n.skipUEG.bind(n),m=this.skipScalingList.bind(this);u();var p=u();if(d(5),c(3),u(),v(),100===p||110===p||122===p||244===p||44===p||83===p||86===p||118===p||128===p){var y=h();if(3===y&&c(1),v(),v(),c(1),f())for(r=3!==y?8:12,i=0;i<r;i++)f()&&m(i<6?16:64,n)}v();var E=h();if(0===E)h();else if(1===E)for(c(1),g(),g(),t=h(),i=0;i<t;i++)g();v(),c(1);var T=h(),S=h(),A=d(1);0===A&&c(1),c(1),f()&&(a=h(),s=h(),o=h(),l=h());var L=[1,1];if(f()&&f())switch(u()){case 1:L=[1,1];break;case 2:L=[12,11];break;case 3:L=[10,11];break;case 4:L=[16,11];break;case 5:L=[40,33];break;case 6:L=[24,11];break;case 7:L=[20,11];break;case 8:L=[32,11];break;case 9:L=[80,33];break;case 10:L=[18,11];break;case 11:L=[15,11];break;case 12:L=[64,33];break;case 13:L=[160,99];break;case 14:L=[4,3];break;case 15:L=[3,2];break;case 16:L=[2,1];break;case 255:L=[u()<<8|u(),u()<<8|u()]}return{width:Math.ceil(16*(T+1)-2*a-2*s),height:(2-A)*(S+1)*16-(A?2:4)*(o+l),pixelRatio:L}},t}(En),An=function(e){function t(){for(var t,r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];return(t=e.call.apply(e,[this].concat(i))||this).initVPS=null,t}u(t,e);var r=t.prototype;return r.parsePES=function(e,t,r,i){var n,a=this,s=this.parseNALu(e,r.data,i),l=this.VideoSample,u=!1;r.data=null,l&&s.length&&!e.audFound&&(this.pushAccessUnit(l,e),l=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts)),s.forEach((function(i){var s,d;switch(i.type){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:l||(l=a.VideoSample=a.createVideoSample(!1,r.pts,r.dts)),l.frame=!0,n=!0;break;case 16:case 17:case 18:case 21:var h;n=!0,u&&null!=(h=l)&&h.frame&&!l.key&&(a.pushAccessUnit(l,e),l=a.VideoSample=null),l||(l=a.VideoSample=a.createVideoSample(!0,r.pts,r.dts)),l.key=!0,l.frame=!0;break;case 19:case 20:n=!0,null!=(s=l)&&s.frame&&!l.key&&(a.pushAccessUnit(l,e),l=a.VideoSample=null),l||(l=a.VideoSample=a.createVideoSample(!0,r.pts,r.dts)),l.key=!0,l.frame=!0;break;case 39:n=!0,_e(i.data,2,r.pts,t.samples);break;case 32:n=!0,e.vps||("object"!=typeof e.params&&(e.params={}),e.params=o(e.params,a.readVPS(i.data)),a.initVPS=i.data),e.vps=[i.data];break;case 33:if(n=!0,u=!0,void 0===e.vps||e.vps[0]===a.initVPS||void 0===e.sps||a.matchSPS(e.sps[0],i.data)||(a.initVPS=e.vps[0],e.sps=e.pps=void 0),!e.sps){var f=a.readSPS(i.data);for(var c in e.width=f.width,e.height=f.height,e.pixelRatio=f.pixelRatio,e.codec=f.codecString,e.sps=[],"object"!=typeof e.params&&(e.params={}),f.params)e.params[c]=f.params[c]}a.pushParameterSet(e.sps,i.data,e.vps),l||(l=a.VideoSample=a.createVideoSample(!0,r.pts,r.dts)),l.key=!0;break;case 34:if(n=!0,"object"==typeof e.params){if(!e.pps){e.pps=[];var g=a.readPPS(i.data);for(var v in g)e.params[v]=g[v]}a.pushParameterSet(e.pps,i.data,e.vps)}break;case 35:n=!0,e.audFound=!0,null!=(d=l)&&d.frame&&(a.pushAccessUnit(l,e),l=null),l||(l=a.VideoSample=a.createVideoSample(!1,r.pts,r.dts));break;default:n=!1}l&&n&&l.units.push(i)})),i&&l&&(this.pushAccessUnit(l,e),this.VideoSample=null)},r.pushParameterSet=function(e,t,r){(r&&r[0]===this.initVPS||!r&&!e.length)&&e.push(t)},r.getNALuType=function(e,t){return(126&e[t])>>>1},r.ebsp2rbsp=function(e){for(var t=new Uint8Array(e.byteLength),r=0,i=0;i<e.byteLength;i++)i>=2&&3===e[i]&&0===e[i-1]&&0===e[i-2]||(t[r]=e[i],r++);return new Uint8Array(t.buffer,0,r)},r.pushAccessUnit=function(t,r){e.prototype.pushAccessUnit.call(this,t,r),this.initVPS&&(this.initVPS=null)},r.readVPS=function(e){var t=new Tn(e);return t.readUByte(),t.readUByte(),t.readBits(4),t.skipBits(2),t.readBits(6),{numTemporalLayers:t.readBits(3)+1,temporalIdNested:t.readBoolean()}},r.readSPS=function(e){var t=new Tn(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.readBits(4);var r=t.readBits(3);t.readBoolean();for(var i=t.readBits(2),n=t.readBoolean(),a=t.readBits(5),s=t.readUByte(),o=t.readUByte(),l=t.readUByte(),u=t.readUByte(),d=t.readUByte(),h=t.readUByte(),f=t.readUByte(),c=t.readUByte(),g=t.readUByte(),v=t.readUByte(),m=t.readUByte(),p=[],y=[],E=0;E<r;E++)p.push(t.readBoolean()),y.push(t.readBoolean());if(r>0)for(var T=r;T<8;T++)t.readBits(2);for(var S=0;S<r;S++)p[S]&&(t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte()),y[S]&&t.readUByte();t.readUEG();var A=t.readUEG();3==A&&t.skipBits(1);var L=t.readUEG(),R=t.readUEG(),I=t.readBoolean(),b=0,k=0,D=0,_=0;I&&(b+=t.readUEG(),k+=t.readUEG(),D+=t.readUEG(),_+=t.readUEG());for(var P=t.readUEG(),C=t.readUEG(),w=t.readUEG(),O=t.readBoolean()?0:r;O<=r;O++)t.skipUEG(),t.skipUEG(),t.skipUEG();if(t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.readBoolean()&&t.readBoolean())for(var x=0;x<4;x++)for(var M=0;M<(3===x?2:6);M++)if(t.readBoolean()){var F=Math.min(64,1<<4+(x<<1));x>1&&t.readEG();for(var N=0;N<F;N++)t.readEG()}else t.readUEG();t.readBoolean(),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.skipUEG(),t.skipUEG(),t.readBoolean());for(var U=t.readUEG(),B=0,G=0;G<U;G++){var K=!1;if(0!==G&&(K=t.readBoolean()),K){G===U&&t.readUEG(),t.readBoolean(),t.readUEG();for(var H=0,V=0;V<=B;V++){var Y=t.readBoolean(),W=!1;Y||(W=t.readBoolean()),(Y||W)&&H++}B=H}else{var j=t.readUEG(),q=t.readUEG();B=j+q;for(var X=0;X<j;X++)t.readUEG(),t.readBoolean();for(var z=0;z<q;z++)t.readUEG(),t.readBoolean()}}if(t.readBoolean())for(var Q=t.readUEG(),$=0;$<Q;$++){for(var J=0;J<w+4;J++)t.readBits(1);t.readBits(1)}var Z=0,ee=1,te=1,re=!0,ie=1,ne=0;t.readBoolean(),t.readBoolean();var ae=!1;if(t.readBoolean()){if(t.readBoolean()){var se=t.readUByte();se>0&&se<16?(ee=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][se-1],te=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][se-1]):255===se&&(ee=t.readBits(16),te=t.readBits(16))}if(t.readBoolean()&&t.readBoolean(),t.readBoolean()&&(t.readBits(3),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.readUByte(),t.readUByte())),t.readBoolean()&&(t.readUEG(),t.readUEG()),t.readBoolean(),t.readBoolean(),t.readBoolean(),(ae=t.readBoolean())&&(b+=t.readUEG(),k+=t.readUEG(),D+=t.readUEG(),_+=t.readUEG()),t.readBoolean()&&(ie=t.readBits(32),ne=t.readBits(32),t.readBoolean()&&t.readUEG(),t.readBoolean())){var oe=t.readBoolean(),le=t.readBoolean(),ue=!1;(oe||le)&&((ue=t.readBoolean())&&(t.readUByte(),t.readBits(5),t.readBoolean(),t.readBits(5)),t.readBits(4),t.readBits(4),ue&&t.readBits(4),t.readBits(5),t.readBits(5),t.readBits(5));for(var de=0;de<=r;de++){var he=!1;(re=t.readBoolean())||t.readBoolean()?t.readEG():he=t.readBoolean();var fe=he?1:t.readUEG()+1;if(oe)for(var ce=0;ce<fe;ce++)t.readUEG(),t.readUEG(),ue&&(t.readUEG(),t.readUEG()),t.skipBits(1);if(le)for(var ge=0;ge<fe;ge++)t.readUEG(),t.readUEG(),ue&&(t.readUEG(),t.readUEG()),t.skipBits(1)}}t.readBoolean()&&(t.readBoolean(),t.readBoolean(),t.readBoolean(),Z=t.readUEG())}var ve=L,me=R;if(I||ae){var pe=1,ye=1;1===A?pe=ye=2:2==A&&(pe=2),ve=L-pe*k-pe*b,me=R-ye*_-ye*D}for(var Ee=i?["A","B","C"][i]:"",Te=s<<24|o<<16|l<<8|u,Se=0,Ae=0;Ae<32;Ae++)Se=(Se|(Te>>Ae&1)<<31-Ae)>>>0;var Le=Se.toString(16);return 1===a&&"2"===Le&&(Le="6"),{codecString:"hvc1."+Ee+a+"."+Le+"."+(n?"H":"L")+m+".B0",params:{general_tier_flag:n,general_profile_idc:a,general_profile_space:i,general_profile_compatibility_flags:[s,o,l,u],general_constraint_indicator_flags:[d,h,f,c,g,v],general_level_idc:m,bit_depth:P+8,bit_depth_luma_minus8:P,bit_depth_chroma_minus8:C,min_spatial_segmentation_idc:Z,chroma_format_idc:A,frame_rate:{fixed:re,fps:ne/ie}},width:ve,height:me,pixelRatio:[ee,te]}},r.readPPS=function(e){var t=new Tn(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.skipUEG(),t.skipUEG(),t.skipBits(2),t.skipBits(3),t.skipBits(2),t.skipUEG(),t.skipUEG(),t.skipEG(),t.skipBits(2),t.readBoolean()&&t.skipUEG(),t.skipEG(),t.skipEG(),t.skipBits(4);var r=t.readBoolean(),i=t.readBoolean(),n=1;return i&&r?n=0:i?n=3:r&&(n=2),{parallelismType:n}},r.matchSPS=function(e,t){return String.fromCharCode.apply(null,e).substr(3)===String.fromCharCode.apply(null,t).substr(3)},t}(En),Ln=188,Rn=function(){function e(e,t,r,i){this.logger=void 0,this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._pmtId=-1,this._videoTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.remainderData=null,this.videoParser=void 0,this.observer=e,this.config=t,this.typeSupported=r,this.logger=i,this.videoParser=null}e.probe=function(t,r){var i=e.syncOffset(t);return i>0&&r.warn("MPEG2-TS detected but first sync word found @ offset "+i),-1!==i},e.syncOffset=function(e){for(var t=e.length,r=Math.min(940,t-Ln)+1,i=0;i<r;){for(var n=!1,a=-1,s=0,o=i;o<t;o+=Ln){if(71!==e[o]||t-o!==Ln&&71!==e[o+Ln]){if(s)return-1;break}if(s++,-1===a&&0!==(a=o)&&(r=Math.min(a+18612,e.length-Ln)+1),n||(n=0===In(e,o)),n&&s>1&&(0===a&&s>2||o+Ln>r))return a}i++}return-1},e.createTrack=function(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:le[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:"audio"===e?t:void 0}};var t=e.prototype;return t.resetInitSegment=function(t,r,i,n){this.pmtParsed=!1,this._pmtId=-1,this._videoTrack=e.createTrack("video"),this._videoTrack.duration=n,this._audioTrack=e.createTrack("audio",n),this._id3Track=e.createTrack("id3"),this._txtTrack=e.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.remainderData=null,this.audioCodec=r,this.videoCodec=i},t.resetTimeStamp=function(){},t.resetContiguity=function(){var e=this._audioTrack,t=this._videoTrack,r=this._id3Track;e&&(e.pesData=null),t&&(t.pesData=null),r&&(r.pesData=null),this.aacOverFlow=null,this.remainderData=null},t.demux=function(t,r,i,n){var a;void 0===i&&(i=!1),void 0===n&&(n=!1),i||(this.sampleAes=null);var s=this._videoTrack,o=this._audioTrack,l=this._id3Track,u=this._txtTrack,d=s.pid,h=s.pesData,f=o.pid,c=l.pid,g=o.pesData,v=l.pesData,m=null,p=this.pmtParsed,y=this._pmtId,E=t.length;if(this.remainderData&&(E=(t=Ie(this.remainderData,t)).length,this.remainderData=null),E<Ln&&!n)return this.remainderData=t,{audioTrack:o,videoTrack:s,id3Track:l,textTrack:u};var T=Math.max(0,e.syncOffset(t));(E-=(E-T)%Ln)<t.byteLength&&!n&&(this.remainderData=new Uint8Array(t.buffer,E,t.buffer.byteLength-E));for(var S=0,A=T;A<E;A+=Ln)if(71===t[A]){var L=!!(64&t[A+1]),R=In(t,A),I=void 0;if((48&t[A+3])>>4>1){if((I=A+5+t[A+4])===A+Ln)continue}else I=A+4;switch(R){case d:if(L){if(h&&(a=Pn(h,this.logger))){if(null===this.videoParser)switch(s.segmentCodec){case"avc":this.videoParser=new Sn;break;case"hevc":this.videoParser=new An}null!==this.videoParser&&this.videoParser.parsePES(s,u,a,!1)}h={data:[],size:0}}h&&(h.data.push(t.subarray(I,A+Ln)),h.size+=A+Ln-I);break;case f:if(L){if(g&&(a=Pn(g,this.logger)))switch(o.segmentCodec){case"aac":this.parseAACPES(o,a);break;case"mp3":this.parseMPEGPES(o,a);break;case"ac3":this.parseAC3PES(o,a)}g={data:[],size:0}}g&&(g.data.push(t.subarray(I,A+Ln)),g.size+=A+Ln-I);break;case c:L&&(v&&(a=Pn(v,this.logger))&&this.parseID3PES(l,a),v={data:[],size:0}),v&&(v.data.push(t.subarray(I,A+Ln)),v.size+=A+Ln-I);break;case 0:L&&(I+=t[I]+1),y=this._pmtId=bn(t,I);break;case y:L&&(I+=t[I]+1);var b=kn(t,I,this.typeSupported,i,this.observer,this.logger);(d=b.videoPid)>0&&(s.pid=d,s.segmentCodec=b.segmentVideoCodec),(f=b.audioPid)>0&&(o.pid=f,o.segmentCodec=b.segmentAudioCodec),(c=b.id3Pid)>0&&(l.pid=c),null===m||p||(this.logger.warn("MPEG-TS PMT found at "+A+" after unknown PID '"+m+"'. Backtracking to sync byte @"+T+" to parse all TS packets."),m=null,A=T-188),p=this.pmtParsed=!0;break;case 17:case 8191:break;default:m=R}}else S++;S>0&&Dn(this.observer,new Error("Found "+S+" TS packet/s that do not start with 0x47"),void 0,this.logger),s.pesData=h,o.pesData=g,l.pesData=v;var k={audioTrack:o,videoTrack:s,id3Track:l,textTrack:u};return n&&this.extractRemainingSamples(k),k},t.flush=function(){var e,t=this.remainderData;return this.remainderData=null,e=t?this.demux(t,-1,!1,!0):{videoTrack:this._videoTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(e),this.sampleAes?this.decrypt(e,this.sampleAes):e},t.extractRemainingSamples=function(e){var t,r=e.audioTrack,i=e.videoTrack,n=e.id3Track,a=e.textTrack,s=i.pesData,o=r.pesData,l=n.pesData;if(s&&(t=Pn(s,this.logger))){if(null===this.videoParser)switch(i.segmentCodec){case"avc":this.videoParser=new Sn;break;case"hevc":this.videoParser=new An}null!==this.videoParser&&(this.videoParser.parsePES(i,a,t,!0),i.pesData=null)}else i.pesData=s;if(o&&(t=Pn(o,this.logger))){switch(r.segmentCodec){case"aac":this.parseAACPES(r,t);break;case"mp3":this.parseMPEGPES(r,t);break;case"ac3":this.parseAC3PES(r,t)}r.pesData=null}else null!=o&&o.size&&this.logger.log("last AAC PES packet truncated,might overlap between fragments"),r.pesData=o;l&&(t=Pn(l,this.logger))?(this.parseID3PES(n,t),n.pesData=null):n.pesData=l},t.demuxSampleAes=function(e,t,r){var i=this.demux(e,r,!0,!this.config.progressive),n=this.sampleAes=new yn(this.observer,this.config,t);return this.decrypt(i,n)},t.decrypt=function(e,t){return new Promise((function(r){var i=e.audioTrack,n=e.videoTrack;i.samples&&"aac"===i.segmentCodec?t.decryptAacSamples(i.samples,0,(function(){n.samples?t.decryptAvcSamples(n.samples,0,0,(function(){r(e)})):r(e)})):n.samples&&t.decryptAvcSamples(n.samples,0,0,(function(){r(e)}))}))},t.destroy=function(){this.observer&&this.observer.removeAllListeners(),this.config=this.logger=this.observer=null,this.aacOverFlow=this.videoParser=this.remainderData=this.sampleAes=null,this._videoTrack=this._audioTrack=this._id3Track=this._txtTrack=void 0},t.parseAACPES=function(e,t){var r,i,n,a=0,s=this.aacOverFlow,o=t.data;if(s){this.aacOverFlow=null;var l=s.missing,u=s.sample.unit.byteLength;if(-1===l)o=Ie(s.sample.unit,o);else{var d=u-l;s.sample.unit.set(o.subarray(0,l),d),e.samples.push(s.sample),a=s.missing}}for(r=a,i=o.length;r<i-1&&!wi(o,r);r++);if(r!==a){var h,f=r<i-1;if(h=f?"AAC PES did not start with ADTS header,offset:"+r:"No ADTS header found in AAC PES",Dn(this.observer,new Error(h),f,this.logger),!f)return}if(xi(e,this.observer,o,r,this.audioCodec),void 0!==t.pts)n=t.pts;else{if(!s)return void this.logger.warn("[tsdemuxer]: AAC PES unknown PTS");var c=Mi(e.samplerate);n=s.sample.pts+c}for(var g,v=0;r<i;){if(r+=(g=Fi(e,o,r,n,v)).length,g.missing){this.aacOverFlow=g;break}for(v++;r<i-1&&!wi(o,r);r++);}},t.parseMPEGPES=function(e,t){var r=t.data,i=r.length,n=0,a=0,s=t.pts;if(void 0!==s)for(;a<i;)if(ln(r,a)){var o=an(e,r,a,s,n);if(!o)break;a+=o.length,n++}else a++;else this.logger.warn("[tsdemuxer]: MPEG PES unknown PTS")},t.parseAC3PES=function(e,t){var r=t.data,i=t.pts;if(void 0!==i)for(var n,a=r.length,s=0,o=0;o<a&&(n=cn(e,r,o,i,s++))>0;)o+=n;else this.logger.warn("[tsdemuxer]: AC3 PES unknown PTS")},t.parseID3PES=function(e,t){if(void 0!==t.pts){var r=o({},t,{type:this._videoTrack?zi.emsg:zi.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(r)}else this.logger.warn("[tsdemuxer]: ID3 PES unknown PTS")},e}();function In(e,t){return((31&e[t+1])<<8)+e[t+2]}function bn(e,t){return(31&e[t+10])<<8|e[t+11]}function kn(e,t,r,i,n,a){var s={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},o=t+3+((15&e[t+1])<<8|e[t+2])-4;for(t+=12+((15&e[t+10])<<8|e[t+11]);t<o;){var l=In(e,t),u=(15&e[t+3])<<8|e[t+4];switch(e[t]){case 207:if(!i){_n("ADTS AAC",a);break}case 15:-1===s.audioPid&&(s.audioPid=l);break;case 21:-1===s.id3Pid&&(s.id3Pid=l);break;case 219:if(!i){_n("H.264",a);break}case 27:-1===s.videoPid&&(s.videoPid=l);break;case 3:case 4:r.mpeg||r.mp3?-1===s.audioPid&&(s.audioPid=l,s.segmentAudioCodec="mp3"):a.log("MPEG audio found, not supported in this browser");break;case 193:if(!i){_n("AC-3",a);break}case 129:r.ac3?-1===s.audioPid&&(s.audioPid=l,s.segmentAudioCodec="ac3"):a.log("AC-3 audio found, not supported in this browser");break;case 6:if(-1===s.audioPid&&u>0)for(var d=t+5,h=u;h>2;){106===e[d]&&(!0!==r.ac3?a.log("AC-3 audio found, not supported in this browser for now"):(s.audioPid=l,s.segmentAudioCodec="ac3"));var f=e[d+1]+2;d+=f,h-=f}break;case 194:case 135:return Dn(n,new Error("Unsupported EC-3 in M2TS found"),void 0,a),s;case 36:-1===s.videoPid&&(s.videoPid=l,s.segmentVideoCodec="hevc",a.log("HEVC in M2TS found"))}t+=u+5}return s}function Dn(e,t,r,i){i.warn("parsing error: "+t.message),e.emit(_.ERROR,_.ERROR,{type:k.MEDIA_ERROR,details:D.FRAG_PARSING_ERROR,fatal:!1,levelRetry:r,error:t,reason:t.message})}function _n(e,t){t.log(e+" with AES-128-CBC encryption found in unencrypted stream")}function Pn(e,t){var r,i,n,a,s,o=0,l=e.data;if(!e||0===e.size)return null;for(;l[0].length<19&&l.length>1;)l[0]=Ie(l[0],l[1]),l.splice(1,1);if(1===((r=l[0])[0]<<16)+(r[1]<<8)+r[2]){if((i=(r[4]<<8)+r[5])&&i>e.size-6)return null;var u=r[7];192&u&&(a=536870912*(14&r[9])+4194304*(255&r[10])+16384*(254&r[11])+128*(255&r[12])+(254&r[13])/2,64&u?a-(s=536870912*(14&r[14])+4194304*(255&r[15])+16384*(254&r[16])+128*(255&r[17])+(254&r[18])/2)>54e5&&(t.warn(Math.round((a-s)/9e4)+"s delta between PTS and DTS, align them"),a=s):s=a);var d=(n=r[8])+9;if(e.size<=d)return null;e.size-=d;for(var h=new Uint8Array(e.size),f=0,c=l.length;f<c;f++){var g=(r=l[f]).byteLength;if(d){if(d>g){d-=g;continue}r=r.subarray(d),g-=d,d=0}h.set(r,o),o+=g}return i&&(i-=n+3),{data:h,pts:a,dts:s,len:i}}return null}var Cn=function(){function e(){}return e.getSilentFrame=function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}},e}(),wn=Math.pow(2,32)-1,On=function(){function e(){}return e.init=function(){var t;for(t in e.types={avc1:[],avcC:[],hvc1:[],hvcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],dac3:[],"ac-3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]},e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var r=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),i=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);e.HDLR_TYPES={video:r,audio:i};var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),a=new Uint8Array([0,0,0,0,0,0,0,0]);e.STTS=e.STSC=e.STCO=a,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var s=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);e.FTYP=e.box(e.types.ftyp,s,l,s,o),e.DINF=e.box(e.types.dinf,e.box(e.types.dref,n))},e.box=function(e){for(var t=8,r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];for(var a=i.length,s=a;a--;)t+=i[a].byteLength;var o=new Uint8Array(t);for(o[0]=t>>24&255,o[1]=t>>16&255,o[2]=t>>8&255,o[3]=255&t,o.set(e,4),a=0,t=8;a<s;a++)o.set(i[a],t),t+=i[a].byteLength;return o},e.hdlr=function(t){return e.box(e.types.hdlr,e.HDLR_TYPES[t])},e.mdat=function(t){return e.box(e.types.mdat,t)},e.mdhd=function(t,r){r*=t;var i=Math.floor(r/(wn+1)),n=Math.floor(r%(wn+1));return e.box(e.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,i>>24,i>>16&255,i>>8&255,255&i,n>>24,n>>16&255,n>>8&255,255&n,85,196,0,0]))},e.mdia=function(t){return e.box(e.types.mdia,e.mdhd(t.timescale||0,t.duration||0),e.hdlr(t.type),e.minf(t))},e.mfhd=function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))},e.minf=function(t){return"audio"===t.type?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(t)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(t))},e.moof=function(t,r,i){return e.box(e.types.moof,e.mfhd(t),e.traf(i,r))},e.moov=function(t){for(var r=t.length,i=[];r--;)i[r]=e.trak(t[r]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale||0,t[0].duration||0)].concat(i).concat(e.mvex(t)))},e.mvex=function(t){for(var r=t.length,i=[];r--;)i[r]=e.trex(t[r]);return e.box.apply(null,[e.types.mvex].concat(i))},e.mvhd=function(t,r){r*=t;var i=Math.floor(r/(wn+1)),n=Math.floor(r%(wn+1)),a=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,i>>24,i>>16&255,i>>8&255,255&i,n>>24,n>>16&255,n>>8&255,255&n,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return e.box(e.types.mvhd,a)},e.sdtp=function(t){var r,i,n=t.samples||[],a=new Uint8Array(4+n.length);for(r=0;r<n.length;r++)i=n[r].flags,a[r+4]=i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy;return e.box(e.types.sdtp,a)},e.stbl=function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.STTS),e.box(e.types.stsc,e.STSC),e.box(e.types.stsz,e.STSZ),e.box(e.types.stco,e.STCO))},e.avc1=function(t){var r,i,n,a=[],s=[];for(r=0;r<t.sps.length;r++)n=(i=t.sps[r]).byteLength,a.push(n>>>8&255),a.push(255&n),a=a.concat(Array.prototype.slice.call(i));for(r=0;r<t.pps.length;r++)n=(i=t.pps[r]).byteLength,s.push(n>>>8&255),s.push(255&n),s=s.concat(Array.prototype.slice.call(i));var o=e.box(e.types.avcC,new Uint8Array([1,a[3],a[4],a[5],255,224|t.sps.length].concat(a).concat([t.pps.length]).concat(s))),l=t.width,u=t.height,d=t.pixelRatio[0],h=t.pixelRatio[1];return e.box(e.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),e.box(e.types.pasp,new Uint8Array([d>>24,d>>16&255,d>>8&255,255&d,h>>24,h>>16&255,h>>8&255,255&h])))},e.esds=function(e){var t=e.config;return new Uint8Array([0,0,0,0,3,25,0,1,0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2].concat(t,[6,1,2]))},e.audioStsd=function(e){var t=e.samplerate||0;return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount||0,0,16,0,0,0,0,t>>8&255,255&t,0,0])},e.mp4a=function(t){return e.box(e.types.mp4a,e.audioStsd(t),e.box(e.types.esds,e.esds(t)))},e.mp3=function(t){return e.box(e.types[".mp3"],e.audioStsd(t))},e.ac3=function(t){return e.box(e.types["ac-3"],e.audioStsd(t),e.box(e.types.dac3,t.config))},e.stsd=function(t){var r=t.segmentCodec;if("audio"===t.type){if("aac"===r)return e.box(e.types.stsd,e.STSD,e.mp4a(t));if("ac3"===r&&t.config)return e.box(e.types.stsd,e.STSD,e.ac3(t));if("mp3"===r&&"mp3"===t.codec)return e.box(e.types.stsd,e.STSD,e.mp3(t))}else{if(!t.pps||!t.sps)throw new Error("video track missing pps or sps");if("avc"===r)return e.box(e.types.stsd,e.STSD,e.avc1(t));if("hevc"===r&&t.vps)return e.box(e.types.stsd,e.STSD,e.hvc1(t))}throw new Error("unsupported "+t.type+" segment codec ("+r+"/"+t.codec+")")},e.tkhd=function(t){var r=t.id,i=(t.duration||0)*(t.timescale||0),n=t.width||0,a=t.height||0,s=Math.floor(i/(wn+1)),o=Math.floor(i%(wn+1));return e.box(e.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,r>>24&255,r>>16&255,r>>8&255,255&r,0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s,o>>24,o>>16&255,o>>8&255,255&o,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,n>>8&255,255&n,0,0,a>>8&255,255&a,0,0]))},e.traf=function(t,r){var i=e.sdtp(t),n=t.id,a=Math.floor(r/(wn+1)),s=Math.floor(r%(wn+1));return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n])),e.box(e.types.tfdt,new Uint8Array([1,0,0,0,a>>24,a>>16&255,a>>8&255,255&a,s>>24,s>>16&255,s>>8&255,255&s])),e.trun(t,i.length+16+20+8+16+8+8),i)},e.trak=function(t){return t.duration=t.duration||4294967295,e.box(e.types.trak,e.tkhd(t),e.mdia(t))},e.trex=function(t){var r=t.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},e.trun=function(t,r){var i,n,a,s,o,l,u=t.samples||[],d=u.length,h=12+16*d,f=new Uint8Array(h);for(r+=8+h,f.set(["video"===t.type?1:0,0,15,1,d>>>24&255,d>>>16&255,d>>>8&255,255&d,r>>>24&255,r>>>16&255,r>>>8&255,255&r],0),i=0;i<d;i++)a=(n=u[i]).duration,s=n.size,o=n.flags,l=n.cts,f.set([a>>>24&255,a>>>16&255,a>>>8&255,255&a,s>>>24&255,s>>>16&255,s>>>8&255,255&s,o.isLeading<<2|o.dependsOn,o.isDependedOn<<6|o.hasRedundancy<<4|o.paddingValue<<1|o.isNonSync,61440&o.degradPrio,15&o.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*i);return e.box(e.types.trun,f)},e.initSegment=function(t){e.types||e.init();var r=e.moov(t);return Ie(e.FTYP,r)},e.hvc1=function(t){for(var r=t.params,i=[t.vps,t.sps,t.pps],n=new Uint8Array([1,r.general_profile_space<<6|(r.general_tier_flag?32:0)|r.general_profile_idc,r.general_profile_compatibility_flags[0],r.general_profile_compatibility_flags[1],r.general_profile_compatibility_flags[2],r.general_profile_compatibility_flags[3],r.general_constraint_indicator_flags[0],r.general_constraint_indicator_flags[1],r.general_constraint_indicator_flags[2],r.general_constraint_indicator_flags[3],r.general_constraint_indicator_flags[4],r.general_constraint_indicator_flags[5],r.general_level_idc,240|r.min_spatial_segmentation_idc>>8,255&r.min_spatial_segmentation_idc,252|r.parallelismType,252|r.chroma_format_idc,248|r.bit_depth_luma_minus8,248|r.bit_depth_chroma_minus8,0,parseInt(r.frame_rate.fps),3|r.temporal_id_nested<<2|r.num_temporal_layers<<3|(r.frame_rate.fixed?64:0),i.length]),a=n.length,s=0;s<i.length;s+=1){a+=3;for(var o=0;o<i[s].length;o+=1)a+=2+i[s][o].length}var l=new Uint8Array(a);l.set(n,0),a=n.length;for(var u=i.length-1,d=0;d<i.length;d+=1){l.set(new Uint8Array([32+d|(d===u?128:0),0,i[d].length]),a),a+=3;for(var h=0;h<i[d].length;h+=1)l.set(new Uint8Array([i[d][h].length>>8,255&i[d][h].length]),a),a+=2,l.set(i[d][h],a),a+=i[d][h].length}var f=e.box(e.types.hvcC,l),c=t.width,g=t.height,v=t.pixelRatio[0],m=t.pixelRatio[1];return e.box(e.types.hvc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,c>>8&255,255&c,g>>8&255,255&g,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),f,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),e.box(e.types.pasp,new Uint8Array([v>>24,v>>16&255,v>>8&255,255&v,m>>24,m>>16&255,m>>8&255,255&m])))},e}();On.types=void 0,On.HDLR_TYPES=void 0,On.STTS=void 0,On.STSC=void 0,On.STCO=void 0,On.STSZ=void 0,On.VMHD=void 0,On.SMHD=void 0,On.STSD=void 0,On.FTYP=void 0,On.DINF=void 0;var xn=9e4;function Mn(e,t,r,i){void 0===r&&(r=1),void 0===i&&(i=!1);var n=e*t*r;return i?Math.round(n):n}function Fn(e,t){return Mn(e,1e3,1/xn,t)}var Nn=null,Un=null;function Bn(e,t,r,i){return{duration:t,size:r,cts:i,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:e?2:1,isNonSync:e?0:1}}}var Gn=function(){function e(e,t,r,i){if(this.logger=void 0,this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextAvcDts=null,this.nextAudioPts=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.videoTrackConfig=void 0,this.observer=e,this.config=t,this.typeSupported=r,this.logger=i,this.ISGenerated=!1,null===Nn){var n=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Nn=n?parseInt(n[1]):0}if(null===Un){var a=navigator.userAgent.match(/Safari\/(\d+)/i);Un=a?parseInt(a[1]):0}}var t=e.prototype;return t.destroy=function(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null},t.resetTimeStamp=function(e){this.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e},t.resetNextTimestamp=function(){this.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},t.resetInitSegment=function(){this.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1,this.videoTrackConfig=void 0},t.getVideoStartPts=function(e){var t=!1,r=e[0].pts,i=e.reduce((function(e,i){var n=i.pts,a=n-e;return a<-4294967296&&(t=!0,a=(n=Kn(n,r))-e),a>0?e:n}),r);return t&&this.logger.debug("PTS rollover detected"),i},t.remux=function(e,t,r,i,n,a,s,o){var l,u,d,h,f,c,g=n,v=n,m=e.pid>-1,p=t.pid>-1,y=t.samples.length,E=e.samples.length>0,T=s&&y>0||y>1;if((!m||E)&&(!p||T)||this.ISGenerated||s){if(this.ISGenerated){var S,A,L,R,I=this.videoTrackConfig;(I&&(t.width!==I.width||t.height!==I.height||(null==(S=t.pixelRatio)?void 0:S[0])!==(null==(A=I.pixelRatio)?void 0:A[0])||(null==(L=t.pixelRatio)?void 0:L[1])!==(null==(R=I.pixelRatio)?void 0:R[1]))||!I&&T||null===this.nextAudioPts&&E)&&this.resetInitSegment()}this.ISGenerated||(d=this.generateIS(e,t,n,a));var b,k=this.isVideoContiguous,D=-1;if(T&&(D=function(e){for(var t=0;t<e.length;t++)if(e[t].key)return t;return-1}(t.samples),!k&&this.config.forceKeyFrameOnDiscontinuity))if(c=!0,D>0){this.logger.warn("[mp4-remuxer]: Dropped "+D+" out of "+y+" video samples due to a missing keyframe");var _=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(D),t.dropped+=D,b=v+=(t.samples[0].pts-_)/t.inputTimeScale}else-1===D&&(this.logger.warn("[mp4-remuxer]: No keyframe found out of "+y+" video samples"),c=!1);if(this.ISGenerated){if(E&&T){var P=this.getVideoStartPts(t.samples),C=(Kn(e.samples[0].pts,P)-P)/t.inputTimeScale;g+=Math.max(0,C),v+=Math.max(0,-C)}if(E){if(e.samplerate||(this.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),d=this.generateIS(e,t,n,a)),u=this.remuxAudio(e,g,this.isAudioContiguous,a,p||T||o===M?v:void 0),T){var w=u?u.endPTS-u.startPTS:0;t.inputTimeScale||(this.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),d=this.generateIS(e,t,n,a)),l=this.remuxVideo(t,v,k,w)}}else T&&(l=this.remuxVideo(t,v,k,0));l&&(l.firstKeyFrame=D,l.independent=-1!==D,l.firstKeyFramePTS=b)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(r.samples.length&&(f=Hn(r,n,this._initPTS,this._initDTS)),i.samples.length&&(h=Vn(i,n,this._initPTS))),{audio:u,video:l,initSegment:d,independent:c,text:h,id3:f}},t.generateIS=function(e,t,r,i){var n,a,s,o=e.samples,l=t.samples,u=this.typeSupported,d={},h=this._initPTS,f=!h||i,c="audio/mp4";if(f&&(n=a=1/0),e.config&&o.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":u.mpeg?(c="audio/mpeg",e.codec=""):u.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3"}d.audio={id:"audio",container:c,codec:e.codec,initSegment:"mp3"===e.segmentCodec&&u.mpeg?new Uint8Array(0):On.initSegment([e]),metadata:{channelCount:e.channelCount}},f&&(s=e.inputTimeScale,h&&s===h.timescale?f=!1:n=a=o[0].pts-Math.round(s*r))}if(t.sps&&t.pps&&l.length){if(t.timescale=t.inputTimeScale,d.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:On.initSegment([t]),metadata:{width:t.width,height:t.height}},f)if(s=t.inputTimeScale,h&&s===h.timescale)f=!1;else{var g=this.getVideoStartPts(l),v=Math.round(s*r);a=Math.min(a,Kn(l[0].dts,g)-v),n=Math.min(n,g-v)}this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(d).length)return this.ISGenerated=!0,f?(this._initPTS={baseTime:n,timescale:s},this._initDTS={baseTime:a,timescale:s}):n=s=void 0,{tracks:d,initPTS:n,timescale:s}},t.remuxVideo=function(e,t,r,i){var n,a,s=e.inputTimeScale,l=e.samples,u=[],d=l.length,h=this._initPTS,f=this.nextAvcDts,c=8,g=this.videoSampleDuration,v=Number.POSITIVE_INFINITY,m=Number.NEGATIVE_INFINITY,p=!1;if(!r||null===f){var y=t*s,E=l[0].pts-Kn(l[0].dts,l[0].pts);Nn&&null!==f&&Math.abs(y-E-f)<15e3?r=!0:f=y-E}for(var T=h.baseTime*s/h.timescale,S=0;S<d;S++){var A=l[S];A.pts=Kn(A.pts-T,f),A.dts=Kn(A.dts-T,f),A.dts<l[S>0?S-1:S].dts&&(p=!0)}p&&l.sort((function(e,t){var r=e.dts-t.dts,i=e.pts-t.pts;return r||i})),n=l[0].dts;var L=(a=l[l.length-1].dts)-n,R=L?Math.round(L/(d-1)):g||e.inputTimeScale/30;if(r){var I=n-f,b=I>R,P=I<-1;if((b||P)&&(b?this.logger.warn((e.segmentCodec||"").toUpperCase()+": "+Fn(I,!0)+" ms ("+I+"dts) hole between fragments detected at "+t.toFixed(3)):this.logger.warn((e.segmentCodec||"").toUpperCase()+": "+Fn(-I,!0)+" ms ("+I+"dts) overlapping between fragments detected at "+t.toFixed(3)),!P||f>=l[0].pts||Nn)){n=f;var C=l[0].pts-I;if(b)l[0].dts=n,l[0].pts=C;else for(var w=!0,O=0;O<l.length&&!(l[O].dts>C&&w);O++){var x=l[O].pts;if(l[O].dts-=I,l[O].pts-=I,O<l.length-1){var M=l[O+1].pts;w=M<=l[O].pts==M<=x}}this.logger.log("Video: Initial PTS/DTS adjusted: "+Fn(C,!0)+"/"+Fn(n,!0)+", delta: "+Fn(I,!0)+" ms")}}for(var F=0,N=0,U=n=Math.max(0,n),B=0;B<d;B++){for(var G=l[B],K=G.units,H=K.length,V=0,Y=0;Y<H;Y++)V+=K[Y].data.length;N+=V,F+=H,G.length=V,G.dts<U?(G.dts=U,U+=R/4|0||1):U=G.dts,v=Math.min(G.pts,v),m=Math.max(G.pts,m)}a=l[d-1].dts;var W,j=N+4*F+8;try{W=new Uint8Array(j)}catch(e){return void this.observer.emit(_.ERROR,_.ERROR,{type:k.MUX_ERROR,details:D.REMUX_ALLOC_ERROR,fatal:!1,error:e,bytes:j,reason:"fail allocating video mdat "+j})}var q=new DataView(W.buffer);q.setUint32(0,j),W.set(On.types.mdat,4);for(var X=!1,z=Number.POSITIVE_INFINITY,Q=Number.POSITIVE_INFINITY,$=Number.NEGATIVE_INFINITY,J=Number.NEGATIVE_INFINITY,Z=0;Z<d;Z++){for(var ee=l[Z],te=ee.units,re=0,ie=0,ne=te.length;ie<ne;ie++){var ae=te[ie],se=ae.data,oe=ae.data.byteLength;q.setUint32(c,oe),c+=4,W.set(se,c),c+=oe,re+=4+oe}var le=void 0;if(Z<d-1)g=l[Z+1].dts-ee.dts,le=l[Z+1].pts-ee.pts;else{var ue=this.config,de=Z>0?ee.dts-l[Z-1].dts:R;if(le=Z>0?ee.pts-l[Z-1].pts:R,ue.stretchShortVideoTrack&&null!==this.nextAudioPts){var he=Math.floor(ue.maxBufferHole*s),fe=(i?v+i*s:this.nextAudioPts)-ee.pts;fe>he?((g=fe-de)<0?g=de:X=!0,this.logger.log("[mp4-remuxer]: It is approximately "+fe/90+" ms to the next segment; using duration "+g/90+" ms for the last video frame.")):g=de}else g=de}var ce=Math.round(ee.pts-ee.dts);z=Math.min(z,g),$=Math.max($,g),Q=Math.min(Q,le),J=Math.max(J,le),u.push(Bn(ee.key,g,re,ce))}if(u.length)if(Nn){if(Nn<70){var ge=u[0].flags;ge.dependsOn=2,ge.isNonSync=0}}else if(Un&&J-Q<$-z&&R/$<.025&&0===u[0].cts){this.logger.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");for(var ve=n,me=0,pe=u.length;me<pe;me++){var ye=ve+u[me].duration,Ee=ve+u[me].cts;if(me<pe-1){var Te=ye+u[me+1].cts;u[me].duration=Te-Ee}else u[me].duration=me?u[me-1].duration:R;u[me].cts=0,ve=ye}}g=X||!g?R:g,this.nextAvcDts=f=a+g,this.videoSampleDuration=g,this.isVideoContiguous=!0;var Se={data1:On.moof(e.sequenceNumber++,n,o(e,{samples:u})),data2:W,startPTS:v/s,endPTS:(m+g)/s,startDTS:n/s,endDTS:f/s,type:"video",hasAudio:!1,hasVideo:!0,nb:u.length,dropped:e.dropped};return e.samples=[],e.dropped=0,Se},t.getSamplesPerFrame=function(e){switch(e.segmentCodec){case"mp3":return 1152;case"ac3":return 1536;default:return 1024}},t.remuxAudio=function(e,t,r,i,n){var a=e.inputTimeScale,s=a/(e.samplerate?e.samplerate:a),l=this.getSamplesPerFrame(e),u=l*s,d=this._initPTS,h="mp3"===e.segmentCodec&&this.typeSupported.mpeg,f=[],c=void 0!==n,g=e.samples,v=h?0:8,m=this.nextAudioPts||-1,p=t*a,y=d.baseTime*a/d.timescale;if(this.isAudioContiguous=r=r||g.length&&m>0&&(i&&Math.abs(p-m)<9e3||Math.abs(Kn(g[0].pts-y,p)-m)<20*u),g.forEach((function(e){e.pts=Kn(e.pts-y,p)})),!r||m<0){if(g=g.filter((function(e){return e.pts>=0})),!g.length)return;m=0===n?0:i&&!c?Math.max(0,p):g[0].pts}if("aac"===e.segmentCodec)for(var E=this.config.maxAudioFramesDrift,T=0,S=m;T<g.length;T++){var A=g[T],L=A.pts,R=L-S,I=Math.abs(1e3*R/a);if(R<=-E*u&&c)0===T&&(this.logger.warn("Audio frame @ "+(L/a).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*R/a)+" ms."),this.nextAudioPts=m=S=L);else if(R>=E*u&&I<1e4&&c){var b=Math.round(R/u);(S=L-b*u)<0&&(b--,S+=u),0===T&&(this.nextAudioPts=m=S),this.logger.warn("[mp4-remuxer]: Injecting "+b+" audio frame @ "+(S/a).toFixed(3)+"s due to "+Math.round(1e3*R/a)+" ms gap.");for(var P=0;P<b;P++){var C=Math.max(S,0),w=Cn.getSilentFrame(e.parsedCodec||e.manifestCodec||e.codec,e.channelCount);w||(this.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),w=A.unit.subarray()),g.splice(T,0,{unit:w,pts:C}),S+=u,T++}}A.pts=S,S+=u}for(var O,x=null,M=null,F=0,N=g.length;N--;)F+=g[N].unit.byteLength;for(var U=0,B=g.length;U<B;U++){var G=g[U],K=G.unit,H=G.pts;if(null!==M)f[U-1].duration=Math.round((H-M)/s);else{if(r&&"aac"===e.segmentCodec&&(H=m),x=H,!(F>0))return;F+=v;try{O=new Uint8Array(F)}catch(e){return void this.observer.emit(_.ERROR,_.ERROR,{type:k.MUX_ERROR,details:D.REMUX_ALLOC_ERROR,fatal:!1,error:e,bytes:F,reason:"fail allocating audio mdat "+F})}h||(new DataView(O.buffer).setUint32(0,F),O.set(On.types.mdat,4))}O.set(K,v);var V=K.byteLength;v+=V,f.push(Bn(!0,l,V,0)),M=H}var Y=f.length;if(Y){var W=f[f.length-1];this.nextAudioPts=m=M+s*W.duration;var j=h?new Uint8Array(0):On.moof(e.sequenceNumber++,x/s,o({},e,{samples:f}));e.samples=[];var q=x/a,X=m/a,z={data1:j,data2:O,startPTS:q,endPTS:X,startDTS:q,endDTS:X,type:"audio",hasAudio:!0,hasVideo:!1,nb:Y};return this.isAudioContiguous=!0,z}},e}();function Kn(e,t){var r;if(null===t)return e;for(r=t<e?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=r;return e}function Hn(e,t,r,i){var n=e.samples.length;if(n){for(var a=e.inputTimeScale,s=0;s<n;s++){var o=e.samples[s];o.pts=Kn(o.pts-r.baseTime*a/r.timescale,t*a)/a,o.dts=Kn(o.dts-i.baseTime*a/i.timescale,t*a)/a}var l=e.samples;return e.samples=[],{samples:l}}}function Vn(e,t,r){var i=e.samples.length;if(i){for(var n=e.inputTimeScale,a=0;a<i;a++){var s=e.samples[a];s.pts=Kn(s.pts-r.baseTime*n/r.timescale,t*n)/n}e.samples.sort((function(e,t){return e.pts-t.pts}));var o=e.samples;return e.samples=[],{samples:o}}}var Yn,Wn=function(){function e(e,t,r,i){this.logger=void 0,this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,this.initTracks=void 0,this.lastEndTime=null,this.logger=i}var t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(e){this.initPTS=e,this.lastEndTime=null},t.resetNextTimestamp=function(){this.lastEndTime=null},t.resetInitSegment=function(e,t,r,i){this.audioCodec=t,this.videoCodec=r,this.generateInitSegment(function(e,t){if(!e||!t)return e;var r=t.keyId;return r&&t.isCommonEncryption&&ve(e,["moov","trak"]).forEach((function(e){var t=ve(e,["mdia","minf","stbl","stsd"])[0].subarray(8),i=ve(t,["enca"]),n=i.length>0;n||(i=ve(t,["encv"])),i.forEach((function(e){ve(n?e.subarray(28):e.subarray(78),["sinf"]).forEach((function(e){var t=Le(e);if(t){var i=t.subarray(8,24);i.some((function(e){return 0!==e}))||(j.log("[eme] Patching keyId in 'enc"+(n?"a":"v")+">sinf>>tenc' box: "+Q.hexDump(i)+" -> "+Q.hexDump(r)),t.set(r,8))}}))}))})),e}(e,i)),this.emitInitSegment=!0},t.generateInitSegment=function(e){var t=this.audioCodec,r=this.videoCodec;if(null==e||!e.byteLength)return this.initTracks=void 0,void(this.initData=void 0);var i=this.initData=pe(e);i.audio&&(t=jn(i.audio,J)),i.video&&(r=jn(i.video,Z));var n={};i.audio&&i.video?n.audiovideo={container:"video/mp4",codec:t+","+r,supplemental:i.video.supplemental,initSegment:e,id:"main"}:i.audio?n.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:i.video?n.video={container:"video/mp4",codec:r,supplemental:i.video.supplemental,initSegment:e,id:"main"}:this.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=n},t.remux=function(e,t,r,i,n,a){var s,o,l=this.initPTS,u=this.lastEndTime,d={audio:void 0,video:void 0,text:i,id3:r,initSegment:void 0};R(u)||(u=this.lastEndTime=n||0);var h=t.samples;if(null==h||!h.length)return d;var f={initPTS:void 0,timescale:1},c=this.initData;if(null!=(s=c)&&s.length||(this.generateInitSegment(h),c=this.initData),null==(o=c)||!o.length)return this.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),d;this.emitInitSegment&&(f.tracks=this.initTracks,this.emitInitSegment=!1);var g=function(e,t){for(var r=0,i=0,n=0,a=ve(e,["moof","traf"]),s=0;s<a.length;s++){var o=a[s],l=ve(o,["tfhd"])[0],u=t[he(l,4)];if(u){var d=u.default,h=he(l,0)|(null==d?void 0:d.flags),f=null==d?void 0:d.duration;8&h&&(f=he(l,2&h?12:8));for(var c=u.timescale||9e4,g=ve(o,["trun"]),v=0;v<g.length;v++)!(r=Re(g[v]))&&f&&(r=f*he(g[v],4)),u.type===Z?i+=r/c:u.type===J&&(n+=r/c)}}if(0===i&&0===n){for(var m=1/0,p=0,y=0,E=ve(e,["sidx"]),T=0;T<E.length;T++){var S=me(E[T]);if(null!=S&&S.references){m=Math.min(m,S.earliestPresentationTime/S.timescale);var A=S.references.reduce((function(e,t){return e+t.info.duration||0}),0);y=(p=Math.max(p,A+S.earliestPresentationTime/S.timescale))-m}}if(y&&R(y))return y}return i||n}(h,c),v=function(e,t){return ve(t,["moof","traf"]).reduce((function(t,r){var i=ve(r,["tfdt"])[0],n=i[0],a=ve(r,["tfhd"]).reduce((function(t,r){var a=he(r,4),s=e[a];if(s){var o=he(i,4);if(1===n){if(o===se)return j.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),t;o*=se+1,o+=he(i,8)}var l=o/(s.timescale||9e4);if(R(l)&&(null===t||l<t))return l}return t}),null);return null!==a&&R(a)&&(null===t||a<t)?a:t}),null)}(c,h),m=null===v?n:v;!a&&l||!function(e,t,r,i){if(null===e)return!0;var n=Math.max(i,1),a=t-e.baseTime/e.timescale;return Math.abs(a-r)>n}(l,m,n,g)&&f.timescale===l.timescale||(f.initPTS=m-n,l&&1===l.timescale&&this.logger.warn("Adjusting initPTS @"+n+" from "+l.baseTime/l.timescale+" to "+f.initPTS),this.initPTS=l={baseTime:f.initPTS,timescale:1});var p=e?m-l.baseTime/l.timescale:u,y=p+g;!function(e,t,r){ve(t,["moof","traf"]).forEach((function(t){ve(t,["tfhd"]).forEach((function(i){var n=he(i,4),a=e[n];if(a){var s=a.timescale||9e4;ve(t,["tfdt"]).forEach((function(e){var t=e[0],i=r*s;if(i){var n=he(e,4);if(0===t)n-=i,ge(e,4,n=Math.max(n,0));else{n*=Math.pow(2,32),n+=he(e,8),n-=i,n=Math.max(n,0);var a=Math.floor(n/(se+1)),o=Math.floor(n%(se+1));ge(e,4,a),ge(e,8,o)}}}))}}))}))}(c,h,l.baseTime/l.timescale),g>0?this.lastEndTime=y:(this.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var E=!!c.audio,T=!!c.video,S="";E&&(S+="audio"),T&&(S+="video");var A={data1:h,startPTS:p,startDTS:p,endPTS:y,endDTS:y,type:S,hasAudio:E,hasVideo:T,nb:1,dropped:0};return d.audio="audio"===A.type?A:void 0,d.video="audio"!==A.type?A:void 0,d.initSegment=f,d.id3=Hn(r,n,l,l),i.samples.length&&(d.text=Vn(i,n,l)),d},e}();function jn(e,t){var r=null==e?void 0:e.codec;return r&&r.length>4?r:t===J?"ec-3"===r||"ac-3"===r||"alac"===r?r:"fLaC"===r||"Opus"===r?Ve(r,!1):(j.warn('Unhandled audio codec "'+r+'" in mp4 MAP'),r||"mp4a"):(j.warn('Unhandled video codec "'+r+'" in mp4 MAP'),r||"avc1")}try{Yn=self.performance.now.bind(self.performance)}catch(e){Yn=Date.now}var qn=[{demux:mn,remux:Wn},{demux:Rn,remux:Gn},{demux:dn,remux:Gn},{demux:gn,remux:Gn}];qn.splice(2,0,{demux:fn,remux:Gn});var Xn=function(){function e(e,t,r,i,n,a){this.asyncResult=!1,this.logger=void 0,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=t,this.config=r,this.id=n,this.logger=a}var t=e.prototype;return t.configure=function(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()},t.push=function(e,t,r,i){var n=this,a=r.transmuxing;a.executeStart=Yn();var s=new Uint8Array(e),o=this.currentTransmuxState,l=this.transmuxConfig;i&&(this.currentTransmuxState=i);var u=i||o,d=u.contiguous,h=u.discontinuity,f=u.trackSwitch,c=u.accurateTimeOffset,g=u.timeOffset,v=u.initSegmentChange,m=l.audioCodec,p=l.videoCodec,y=l.defaultInitPts,E=l.duration,T=l.initSegmentData,S=function(e,t){var r=null;return e.byteLength>0&&null!=(null==t?void 0:t.key)&&null!==t.iv&&null!=t.method&&(r=t),r}(s,t);if(S&&pr(S.method)){var A=this.getDecrypter(),L=yr(S.method);if(!A.isSync())return this.asyncResult=!0,this.decryptionPromise=A.webCryptoDecrypt(s,S.key.buffer,S.iv.buffer,L).then((function(e){var t=n.push(e,null,r);return n.decryptionPromise=null,t})),this.decryptionPromise;var R=A.softwareDecrypt(s,S.key.buffer,S.iv.buffer,L);if(r.part>-1){var I=A.flush();R=I?I.buffer:I}if(!R)return a.executeEnd=Yn(),zn(r);s=new Uint8Array(R)}var b=this.needsProbing(h,f);if(b){var P=this.configureTransmuxer(s);if(P)return this.logger.warn("[transmuxer] "+P.message),this.observer.emit(_.ERROR,_.ERROR,{type:k.MEDIA_ERROR,details:D.FRAG_PARSING_ERROR,fatal:!1,error:P,reason:P.message}),a.executeEnd=Yn(),zn(r)}(h||f||v||b)&&this.resetInitSegment(T,m,p,E,t),(h||v||b)&&this.resetInitialTimestamp(y),d||this.resetContiguity();var C=this.transmux(s,S,g,c,r);this.asyncResult=Qn(C);var w=this.currentTransmuxState;return w.contiguous=!0,w.discontinuity=!1,w.trackSwitch=!1,a.executeEnd=Yn(),C},t.flush=function(e){var t=this,r=e.transmuxing;r.executeStart=Yn();var i=this.decrypter,n=this.currentTransmuxState,a=this.decryptionPromise;if(a)return this.asyncResult=!0,a.then((function(){return t.flush(e)}));var s=[],o=n.timeOffset;if(i){var l=i.flush();l&&s.push(this.push(l.buffer,null,e))}var u=this.demuxer,d=this.remuxer;if(!u||!d){r.executeEnd=Yn();var h=[zn(e)];return this.asyncResult?Promise.resolve(h):h}var f=u.flush(o);return Qn(f)?(this.asyncResult=!0,f.then((function(r){return t.flushRemux(s,r,e),s}))):(this.flushRemux(s,f,e),this.asyncResult?Promise.resolve(s):s)},t.flushRemux=function(e,t,r){var i=t.audioTrack,n=t.videoTrack,a=t.id3Track,s=t.textTrack,o=this.currentTransmuxState,l=o.accurateTimeOffset,u=o.timeOffset;this.logger.log("[transmuxer.ts]: Flushed "+this.id+" sn: "+r.sn+(r.part>-1?" part: "+r.part:"")+" of "+(this.id===x?"level":"track")+" "+r.level);var d=this.remuxer.remux(i,n,a,s,u,l,!0,this.id);e.push({remuxResult:d,chunkMeta:r}),r.transmuxing.executeEnd=Yn()},t.resetInitialTimestamp=function(e){var t=this.demuxer,r=this.remuxer;t&&r&&(t.resetTimeStamp(e),r.resetTimeStamp(e))},t.resetContiguity=function(){var e=this.demuxer,t=this.remuxer;e&&t&&(e.resetContiguity(),t.resetNextTimestamp())},t.resetInitSegment=function(e,t,r,i,n){var a=this.demuxer,s=this.remuxer;a&&s&&(a.resetInitSegment(e,t,r,i),s.resetInitSegment(e,t,r,n))},t.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},t.transmux=function(e,t,r,i,n){return t&&"SAMPLE-AES"===t.method?this.transmuxSampleAes(e,t,r,i,n):this.transmuxUnencrypted(e,r,i,n)},t.transmuxUnencrypted=function(e,t,r,i){var n=this.demuxer.demux(e,t,!1,!this.config.progressive),a=n.audioTrack,s=n.videoTrack,o=n.id3Track,l=n.textTrack;return{remuxResult:this.remuxer.remux(a,s,o,l,t,r,!1,this.id),chunkMeta:i}},t.transmuxSampleAes=function(e,t,r,i,n){var a=this;return this.demuxer.demuxSampleAes(e,t,r).then((function(e){return{remuxResult:a.remuxer.remux(e.audioTrack,e.videoTrack,e.id3Track,e.textTrack,r,i,!1,a.id),chunkMeta:n}}))},t.configureTransmuxer=function(e){for(var t,r=this.config,i=this.observer,n=this.typeSupported,a=0,s=qn.length;a<s;a++){var o;if(null!=(o=qn[a].demux)&&o.probe(e,this.logger)){t=qn[a];break}}if(!t)return new Error("Failed to find demuxer by probing fragment data");var l=this.demuxer,u=this.remuxer,d=t.remux,h=t.demux;u&&u instanceof d||(this.remuxer=new d(i,r,n,this.logger)),l&&l instanceof h||(this.demuxer=new h(i,r,n,this.logger),this.probe=h.probe)},t.needsProbing=function(e,t){return!this.demuxer||!this.remuxer||e||t},t.getDecrypter=function(){var e=this.decrypter;return e||(e=this.decrypter=new Qt(this.config)),e},e}(),zn=function(e){return{remuxResult:{},chunkMeta:e}};function Qn(e){return"then"in e&&e.then instanceof Function}var $n=function(e,t,r,i,n){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=r,this.duration=i,this.defaultInitPts=n||null},Jn=function(e,t,r,i,n,a){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=r,this.trackSwitch=i,this.timeOffset=n,this.initSegmentChange=a},Zn=[];function ea(e,t,r){if(!((i=t.remuxResult).audio||i.video||i.text||i.id3||i.initSegment))return!1;var i,n=[],a=t.remuxResult,s=a.audio,o=a.video;return s&&ta(n,s),o&&ta(n,o),e.postMessage({event:"transmuxComplete",data:t,instanceNo:r},n),!0}function ta(e,t){t.data1&&e.push(t.data1.buffer),t.data2&&e.push(t.data2.buffer)}function ra(e,t,r,i){t.reduce((function(t,r){return ea(e,r,i)||t}),!1)||e.postMessage({event:"transmuxComplete",data:t[0],instanceNo:i}),e.postMessage({event:"flush",data:r,instanceNo:i})}function ia(e,t,r){self.postMessage({event:e,data:t,instanceNo:r})}void 0!==t&&t&&self.addEventListener("message",(function(e){var t=e.data,r=t.instanceNo;if(void 0!==r){var i=Zn[r];if("reset"===t.cmd&&(delete Zn[t.resetNo],i&&i.destroy(),t.cmd="init"),"init"===t.cmd){var n=JSON.parse(t.config),a=new S;a.on(_.FRAG_DECRYPTED,ia),a.on(_.ERROR,ia);var s=W(n.debug,t.id);return function(e,t){var r=function(r){var i=function(e){ia("workerLog",{logType:r,message:e},t)};e[r]=i};for(var i in e)r(i)}(s,r),Zn[r]=new Xn(a,t.typeSupported,n,"",t.id,s),void ia("init",null,r)}if(i)switch(t.cmd){case"configure":i.configure(t.config);break;case"demux":var o=i.push(t.data,t.decryptdata,t.chunkMeta,t.state);Qn(o)?o.then((function(e){ea(self,e,r)})).catch((function(e){ia(_.ERROR,{instanceNo:r,type:k.MEDIA_ERROR,details:D.FRAG_PARSING_ERROR,chunkMeta:t.chunkMeta,fatal:!1,error:e,err:e,reason:"transmuxer-worker push error"},r)})):ea(self,o,r);break;case"flush":var l=t.chunkMeta,u=i.flush(l);Qn(u)?u.then((function(e){ra(self,e,l,r)})).catch((function(e){ia(_.ERROR,{type:k.MEDIA_ERROR,details:D.FRAG_PARSING_ERROR,chunkMeta:t.chunkMeta,fatal:!1,error:e,err:e,reason:"transmuxer-worker flush error"},r)})):ra(self,u,l,r)}}}));var na="1.6.2",aa={},sa=0,oa=function(){function t(t,r,i,n){var a=this;this.error=null,this.hls=void 0,this.id=void 0,this.instanceNo=sa++,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.workerContext=null,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.onWorkerMessage=function(e){var t=e.data,r=a.hls;if(r&&null!=t&&t.event&&t.instanceNo===a.instanceNo)switch(t.event){case"init":var i,n=null==(i=a.workerContext)?void 0:i.objectURL;n&&self.URL.revokeObjectURL(n);break;case"transmuxComplete":a.handleTransmuxComplete(t.data);break;case"flush":a.onFlush(t.data);break;case"workerLog":r.logger[t.data.logType]&&r.logger[t.data.logType](t.data.message);break;default:t.data=t.data||{},t.data.frag=a.frag,t.data.part=a.part,t.data.id=a.id,r.trigger(t.event,t.data)}},this.onWorkerError=function(e){if(a.hls){var t=new Error(e.message+" ("+e.filename+":"+e.lineno+")");a.hls.config.enableWorker=!1,a.hls.logger.warn('Error in "'+a.id+'" Web Worker, fallback to inline'),a.hls.trigger(_.ERROR,{type:k.OTHER_ERROR,details:D.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:t})}};var s=t.config;this.hls=t,this.id=r,this.useWorker=!!s.enableWorker,this.onTransmuxComplete=i,this.onFlush=n;var o=function(e,t){(t=t||{}).frag=a.frag||void 0,e===_.ERROR&&(t.parent=a.id,t.part=a.part,a.error=t.error),a.hls.trigger(e,t)};this.observer=new S,this.observer.on(_.FRAG_DECRYPTED,o),this.observer.on(_.ERROR,o);var l=je(s.preferManagedMediaSource);if(this.useWorker&&"undefined"!=typeof Worker){var u=this.hls.logger;s.workerPath;try{s.workerPath?(u.log("loading Web Worker "+s.workerPath+' for "'+r+'"'),this.workerContext=function(e){var t=aa[e];if(t)return t.clientCount++,t;var r=new self.URL(e,self.location.href).href,i={worker:new self.Worker(r),scriptURL:r,clientCount:1};return aa[e]=i,i}(s.workerPath)):(u.log('injecting Web Worker for "'+r+'"'),this.workerContext=function(){var t=aa[na];if(t)return t.clientCount++,t;var r=new self.Blob(["var exports={};var module={exports:exports};function define(f){f()};define.amd=true;("+e.toString()+")(true);"],{type:"text/javascript"}),i=self.URL.createObjectURL(r),n={worker:new self.Worker(i),objectURL:i,clientCount:1};return aa[na]=n,n}());var d=this.workerContext.worker;d.addEventListener("message",this.onWorkerMessage),d.addEventListener("error",this.onWorkerError),d.postMessage({instanceNo:this.instanceNo,cmd:"init",typeSupported:l,id:r,config:lt(s)})}catch(e){u.warn('Error setting up "'+r+'" Web Worker, fallback to inline',e),this.terminateWorker(),this.error=null,this.transmuxer=new Xn(this.observer,l,s,"",r,t.logger)}}else this.transmuxer=new Xn(this.observer,l,s,"",r,t.logger)}var r=t.prototype;return r.reset=function(){if(this.frag=null,this.part=null,this.workerContext){var e=this.instanceNo;this.instanceNo=sa++;var t=this.hls.config,r=je(t.preferManagedMediaSource);this.workerContext.worker.postMessage({instanceNo:this.instanceNo,cmd:"reset",resetNo:e,typeSupported:r,id:this.id,config:lt(t)})}},r.terminateWorker=function(){if(this.workerContext){var e=this.workerContext.worker;this.workerContext=null,e.removeEventListener("message",this.onWorkerMessage),e.removeEventListener("error",this.onWorkerError),function(e){var t=aa[e||na];if(t&&1==t.clientCount--){var r=t.worker,i=t.objectURL;delete aa[e||na],i&&self.URL.revokeObjectURL(i),r.terminate()}}(this.hls.config.workerPath)}},r.destroy=function(){if(this.workerContext)this.terminateWorker(),this.onWorkerMessage=this.onWorkerError=null;else{var e=this.transmuxer;e&&(e.destroy(),this.transmuxer=null)}var t=this.observer;t&&t.removeAllListeners(),this.frag=null,this.part=null,this.observer=null,this.hls=null},r.push=function(e,t,r,i,n,a,s,o,l,u){var d,h,f=this;l.transmuxing.start=self.performance.now();var c=this.instanceNo,g=this.transmuxer,v=a?a.start:n.start,m=n.decryptdata,p=this.frag,y=!(p&&n.cc===p.cc),E=!(p&&l.level===p.level),T=p?l.sn-p.sn:-1,S=this.part?l.part-this.part.index:-1,A=0===T&&l.id>1&&l.id===(null==p?void 0:p.stats.chunkCount),L=!E&&(1===T||0===T&&(1===S||A&&S<=0)),R=self.performance.now();(E||T||0===n.stats.parsing.start)&&(n.stats.parsing.start=R),!a||!S&&L||(a.stats.parsing.start=R);var I=!(p&&(null==(d=n.initSegment)?void 0:d.url)===(null==(h=p.initSegment)?void 0:h.url)),b=new Jn(y,L,o,E,v,I);if(!L||y||I){this.hls.logger.log("[transmuxer-interface]: Starting new transmux session for "+n.type+" sn: "+l.sn+(l.part>-1?" part: "+l.part:"")+" "+(this.id===x?"level":"track")+": "+l.level+" id: "+l.id+"\n discontinuity: "+y+"\n trackSwitch: "+E+"\n contiguous: "+L+"\n accurateTimeOffset: "+o+"\n timeOffset: "+v+"\n initSegmentChange: "+I);var k=new $n(r,i,t,s,u);this.configureTransmuxer(k)}if(this.frag=n,this.part=a,this.workerContext)this.workerContext.worker.postMessage({instanceNo:c,cmd:"demux",data:e,decryptdata:m,chunkMeta:l,state:b},e instanceof ArrayBuffer?[e]:[]);else if(g){var D=g.push(e,m,l,b);Qn(D)?D.then((function(e){f.handleTransmuxComplete(e)})).catch((function(e){f.transmuxerError(e,l,"transmuxer-interface push error")})):this.handleTransmuxComplete(D)}},r.flush=function(e){var t=this;e.transmuxing.start=self.performance.now();var r=this.instanceNo,i=this.transmuxer;if(this.workerContext)this.workerContext.worker.postMessage({instanceNo:r,cmd:"flush",chunkMeta:e});else if(i){var n=i.flush(e);Qn(n)?n.then((function(r){t.handleFlushResult(r,e)})).catch((function(r){t.transmuxerError(r,e,"transmuxer-interface flush error")})):this.handleFlushResult(n,e)}},r.transmuxerError=function(e,t,r){this.hls&&(this.error=e,this.hls.trigger(_.ERROR,{type:k.MEDIA_ERROR,details:D.FRAG_PARSING_ERROR,chunkMeta:t,frag:this.frag||void 0,part:this.part||void 0,fatal:!1,error:e,err:e,reason:r}))},r.handleFlushResult=function(e,t){var r=this;e.forEach((function(e){r.handleTransmuxComplete(e)})),this.onFlush(t)},r.configureTransmuxer=function(e){var t=this.instanceNo,r=this.transmuxer;this.workerContext?this.workerContext.worker.postMessage({instanceNo:t,cmd:"configure",config:e}):r&&r.configure(e)},r.handleTransmuxComplete=function(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)},t}(),la=function(e){function t(t,r,i){var n;return(n=e.call(this,t,r,i,"audio-stream-controller",M)||this).mainAnchor=null,n.mainFragLoading=null,n.audioOnly=!1,n.bufferedTrack=null,n.switchingTrack=null,n.trackId=-1,n.waitingData=null,n.mainDetails=null,n.flushing=!1,n.bufferFlushed=!1,n.cachedTrackLoadedData=null,n.registerListeners(),n}u(t,e);var r=t.prototype;return r.onHandlerDestroying=function(){this.unregisterListeners(),e.prototype.onHandlerDestroying.call(this),this.resetItem()},r.resetItem=function(){this.mainDetails=this.mainAnchor=this.mainFragLoading=this.bufferedTrack=this.switchingTrack=this.waitingData=this.cachedTrackLoadedData=null},r.registerListeners=function(){e.prototype.registerListeners.call(this);var t=this.hls;t.on(_.LEVEL_LOADED,this.onLevelLoaded,this),t.on(_.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),t.on(_.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),t.on(_.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),t.on(_.BUFFER_RESET,this.onBufferReset,this),t.on(_.BUFFER_CREATED,this.onBufferCreated,this),t.on(_.BUFFER_FLUSHING,this.onBufferFlushing,this),t.on(_.BUFFER_FLUSHED,this.onBufferFlushed,this),t.on(_.INIT_PTS_FOUND,this.onInitPtsFound,this),t.on(_.FRAG_LOADING,this.onFragLoading,this),t.on(_.FRAG_BUFFERED,this.onFragBuffered,this)},r.unregisterListeners=function(){var t=this.hls;t&&(e.prototype.unregisterListeners.call(this),t.off(_.LEVEL_LOADED,this.onLevelLoaded,this),t.off(_.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),t.off(_.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),t.off(_.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),t.off(_.BUFFER_RESET,this.onBufferReset,this),t.off(_.BUFFER_CREATED,this.onBufferCreated,this),t.off(_.BUFFER_FLUSHING,this.onBufferFlushing,this),t.off(_.BUFFER_FLUSHED,this.onBufferFlushed,this),t.off(_.INIT_PTS_FOUND,this.onInitPtsFound,this),t.off(_.FRAG_LOADING,this.onFragLoading,this),t.off(_.FRAG_BUFFERED,this.onFragBuffered,this))},r.onInitPtsFound=function(e,t){var r=t.frag,i=t.id,n=t.initPTS,a=t.timescale;if(i===x){var s=r.cc,o=this.fragCurrent;if(this.initPTS[s]={baseTime:n,timescale:a},this.log("InitPTS for cc: "+s+" found from main: "+n+"/"+a),this.mainAnchor=r,this.state===Si.WAITING_INIT_PTS){var l=this.waitingData;(!l&&!this.loadingParts||l&&l.frag.cc!==s)&&(this.nextLoadPosition=this.findSyncFrag(r).start),this.tick()}else!this.hls.hasEnoughToStart&&o&&o.cc!==s?(this.startFragRequested=!1,this.nextLoadPosition=this.findSyncFrag(r).start,o.abortRequests(),this.resetLoadingState()):this.state===Si.IDLE&&this.tick()}},r.findSyncFrag=function(e){var t=this.getLevelDetails(),r=e.cc;return function(e,t,r){if(e&&e.startCC<=t&&e.endCC>=t){var i=r.start,n=r.end,a=e.fragments;if(!r.relurl){var s=e.fragmentHint;s&&(a=a.concat(s))}return yt(a,(function(e){return e.cc<t||e.end<=i?1:e.cc>t||e.start>=n?-1:0}))}return null}(t,r,e)||t&&At(t.fragments,r)||e},r.startLoad=function(e,t){if(!this.levels)return this.startPosition=e,void(this.state=Si.STOPPED);var r=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),r>0&&-1===e?(this.log("Override startPosition with lastCurrentTime @"+r.toFixed(3)),e=r,this.state=Si.IDLE):this.state=Si.WAITING_TRACK,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()},r.doTick=function(){switch(this.state){case Si.IDLE:this.doTickIdle();break;case Si.WAITING_TRACK:var t=this.levels,r=this.trackId,i=null==t?void 0:t[r],n=null==i?void 0:i.details;if(n&&!this.waitForLive(i)){if(this.waitForCdnTuneIn(n))break;this.state=Si.WAITING_INIT_PTS}break;case Si.FRAG_LOADING_WAITING_RETRY:var a,s=performance.now(),o=this.retryDate;if(!o||s>=o||null!=(a=this.media)&&a.seeking){var l=this.levels,u=this.trackId;this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded((null==l?void 0:l[u])||null),this.state=Si.IDLE}break;case Si.WAITING_INIT_PTS:var d=this.waitingData;if(d){var h=d.frag,f=d.part,c=d.cache,g=d.complete,v=this.mainAnchor;if(void 0!==this.initPTS[h.cc]){this.waitingData=null,this.state=Si.FRAG_LOADING;var m={frag:h,part:f,payload:c.flush().buffer,networkDetails:null};this._handleFragmentLoadProgress(m),g&&e.prototype._handleFragmentLoadComplete.call(this,m)}else v&&v.cc!==d.frag.cc&&(this.log("Waiting fragment cc ("+h.cc+") cancelled because video is at cc "+v.cc),this.nextLoadPosition=this.findSyncFrag(v).start,this.clearWaitingFragment())}else this.state=Si.IDLE}this.onTickEnd()},r.clearWaitingFragment=function(){var e=this.waitingData;e&&(this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.state!==Si.STOPPED&&(this.state=Si.IDLE))},r.resetLoadingState=function(){this.clearWaitingFragment(),e.prototype.resetLoadingState.call(this)},r.onTickEnd=function(){var e=this.media;null!=e&&e.readyState&&(this.lastCurrentTime=e.currentTime)},r.doTickIdle=function(){var e,t=this.hls,r=this.levels,i=this.media,n=this.trackId,a=t.config;if(this.buffering&&(i||this.primaryPrefetch||!this.startFragRequested&&a.startFragPrefetch)&&null!=r&&r[n]){var s=r[n],o=s.details;if(!o||this.waitForLive(s)||this.waitForCdnTuneIn(o))return this.state=Si.WAITING_TRACK,void(this.startFragRequested=!1);var l=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&l&&(this.bufferFlushed=!1,this.afterBufferFlushed(l,J,M));var u=this.getFwdBufferInfo(l,M);if(null!==u){if(!this.switchingTrack&&this._streamEnded(u,o))return t.trigger(_.BUFFER_EOS,{type:"audio"}),void(this.state=Si.ENDED);var d=u.len,h=t.maxBufferLength,f=o.fragments,c=f[0].start,g=this.getLoadPosition(),v=this.flushing?g:u.end;if(this.switchingTrack&&i){var m=g;o.PTSKnown&&m<c&&(u.end>c||u.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),i.currentTime=c+.05)}if(!(d>=h&&!this.switchingTrack&&v<f[f.length-1].start)){var p=this.getNextFragment(v,o);if(p&&this.isLoopLoading(p,v)&&(p=this.getNextFragmentLoopLoading(p,o,u,x,h)),p){var y=(null==(e=this.mainFragLoading)?void 0:e.frag)||null;if(!this.audioOnly&&this.startFragRequested&&y&&re(p)&&!p.endList&&(!o.live||!this.loadingParts&&v<this.hls.liveSyncPosition)&&(this.fragmentTracker.getState(y)===Gt&&(this.mainFragLoading=y=null),y&&re(y))){if(p.start>y.end){var E=this.fragmentTracker.getFragAtPos(v,x);E&&E.end>y.end&&(y=E,this.mainFragLoading={frag:E,targetBufferTime:null})}if(p.start>y.end)return}this.loadFragment(p,s,v)}else this.bufferFlushed=!0}}}},r.onMediaDetaching=function(t,r){this.bufferFlushed=this.flushing=!1,e.prototype.onMediaDetaching.call(this,t,r)},r.onAudioTracksUpdated=function(e,t){var r=t.audioTracks;this.resetTransmuxer(),this.levels=r.map((function(e){return new at(e)}))},r.onAudioTrackSwitching=function(e,t){var r=!!t.url;this.trackId=t.id;var i=this.fragCurrent;i&&(i.abortRequests(),this.removeUnbufferedFrags(i.start)),this.resetLoadingState(),r?(this.switchingTrack=t,this.flushAudioIfNeeded(t),this.state!==Si.STOPPED&&(this.setInterval(100),this.state=Si.IDLE,this.tick())):(this.resetTransmuxer(),this.switchingTrack=null,this.bufferedTrack=t,this.clearInterval())},r.onManifestLoading=function(){e.prototype.onManifestLoading.call(this),this.bufferFlushed=this.flushing=this.audioOnly=!1,this.resetItem(),this.trackId=-1},r.onLevelLoaded=function(e,t){this.mainDetails=t.details;var r=this.cachedTrackLoadedData;r&&(this.cachedTrackLoadedData=null,this.onAudioTrackLoaded(_.AUDIO_TRACK_LOADED,r))},r.onAudioTrackLoaded=function(e,t){var r,i=this.levels,n=t.details,a=t.id,s=t.groupId,o=t.track;if(i){var l=this.mainDetails;if(!l||n.endCC>l.endCC||l.expired)return this.cachedTrackLoadedData=t,void(this.state!==Si.STOPPED&&(this.state=Si.WAITING_TRACK));this.cachedTrackLoadedData=null,this.log("Audio track "+a+' "'+o.name+'" of "'+s+'" loaded ['+n.startSN+","+n.endSN+"]"+(n.lastPartSn?"[part-"+n.lastPartSn+"-"+n.lastPartIndex+"]":"")+",duration:"+n.totalduration);var u=i[a],d=0;if(n.live||null!=(r=u.details)&&r.live){if(this.checkLiveUpdate(n),n.deltaUpdateFailed)return;var h;u.details&&(d=this.alignPlaylists(n,u.details,null==(h=this.levelLastLoaded)?void 0:h.details)),n.alignedSliding||(yi(n,l),n.alignedSliding||Ei(n,l),d=n.fragmentStart)}u.details=n,this.levelLastLoaded=u,this.startFragRequested||this.setStartPosition(l,d),this.hls.trigger(_.AUDIO_TRACK_UPDATED,{details:n,id:a,groupId:t.groupId}),this.state!==Si.WAITING_TRACK||this.waitForCdnTuneIn(n)||(this.state=Si.IDLE),this.tick()}else this.warn("Audio tracks reset while loading track "+a+' "'+o.name+'" of "'+s+'"')},r._handleFragmentLoadProgress=function(e){var t,r=e.frag,i=e.part,n=e.payload,a=this.config,s=this.trackId,o=this.levels;if(o){var l=o[s];if(l){var u=l.details;if(!u)return this.warn("Audio track details undefined on fragment load progress"),void this.removeUnbufferedFrags(r.start);var d=a.defaultAudioCodec||l.audioCodec||"mp4a.40.2",h=this.transmuxer;h||(h=this.transmuxer=new oa(this.hls,M,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var f=this.initPTS[r.cc],c=null==(t=r.initSegment)?void 0:t.data;if(void 0!==f){var g=i?i.index:-1,v=-1!==g,m=new ir(r.level,r.sn,r.stats.chunkCount,n.byteLength,g,v);h.push(n,c,d,"",r,i,u.totalduration,!1,m,f)}else this.log("Unknown video PTS for cc "+r.cc+", waiting for video PTS before demuxing audio frag "+r.sn+" of ["+u.startSN+" ,"+u.endSN+"],track "+s),(this.waitingData=this.waitingData||{frag:r,part:i,cache:new Ri,complete:!1}).cache.push(new Uint8Array(n)),this.state!==Si.STOPPED&&(this.state=Si.WAITING_INIT_PTS)}else this.warn("Audio track is undefined on fragment load progress")}else this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+r.sn+" of level "+r.level+" will not be buffered")},r._handleFragmentLoadComplete=function(t){this.waitingData?this.waitingData.complete=!0:e.prototype._handleFragmentLoadComplete.call(this,t)},r.onBufferReset=function(){this.mediaBuffer=null},r.onBufferCreated=function(e,t){this.bufferFlushed=this.flushing=!1;var r=t.tracks.audio;r&&(this.mediaBuffer=r.buffer||null)},r.onFragLoading=function(e,t){!this.audioOnly&&t.frag.type===x&&re(t.frag)&&(this.mainFragLoading=t,this.state===Si.IDLE&&this.tick())},r.onFragBuffered=function(e,t){var r=t.frag,i=t.part;if(r.type===M)if(this.fragContextChanged(r))this.warn("Fragment "+r.sn+(i?" p: "+i.index:"")+" of level "+r.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+(this.switchingTrack?this.switchingTrack.name:"false"));else{if(re(r)){this.fragPrevious=r;var n=this.switchingTrack;n&&(this.bufferedTrack=n,this.switchingTrack=null,this.hls.trigger(_.AUDIO_TRACK_SWITCHED,f({},n)))}this.fragBufferedComplete(r,i),this.media&&this.tick()}else this.audioOnly||r.type!==x||r.elementaryStreams.video||r.elementaryStreams.audiovideo||(this.audioOnly=!0,this.mainFragLoading=null)},r.onError=function(t,r){var i;if(r.fatal)this.state=Si.ERROR;else switch(r.details){case D.FRAG_GAP:case D.FRAG_PARSING_ERROR:case D.FRAG_DECRYPT_ERROR:case D.FRAG_LOAD_ERROR:case D.FRAG_LOAD_TIMEOUT:case D.KEY_LOAD_ERROR:case D.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(M,r);break;case D.AUDIO_TRACK_LOAD_ERROR:case D.AUDIO_TRACK_LOAD_TIMEOUT:case D.LEVEL_PARSING_ERROR:r.levelRetry||this.state!==Si.WAITING_TRACK||(null==(i=r.context)?void 0:i.type)!==w||(this.state=Si.IDLE);break;case D.BUFFER_ADD_CODEC_ERROR:case D.BUFFER_APPEND_ERROR:if("audio"!==r.parent)return;this.resetLoadingState();break;case D.BUFFER_FULL_ERROR:if("audio"!==r.parent)return;this.reduceLengthAndFlushBuffer(r)&&(this.bufferedTrack=null,e.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio"));break;case D.INTERNAL_EXCEPTION:this.recoverWorkerError(r)}},r.onBufferFlushing=function(e,t){t.type!==Z&&(this.flushing=!0)},r.onBufferFlushed=function(e,t){var r=t.type;if(r!==Z){this.flushing=!1,this.bufferFlushed=!0,this.state===Si.ENDED&&(this.state=Si.IDLE);var i=this.mediaBuffer||this.media;i&&(this.afterBufferFlushed(i,r,M),this.tick())}},r._handleTransmuxComplete=function(e){var t,r="audio",i=this.hls,n=e.remuxResult,a=e.chunkMeta,s=this.getCurrentContext(a);if(s){var l=s.frag,u=s.part,d=s.level,h=d.details,f=n.audio,c=n.text,g=n.id3,v=n.initSegment;if(!this.fragContextChanged(l)&&h){if(this.state=Si.PARSING,this.switchingTrack&&f&&this.completeAudioSwitch(this.switchingTrack),null!=v&&v.tracks){var m=l.initSegment||l;this._bufferInitSegment(d,v.tracks,m,a),i.trigger(_.FRAG_PARSING_INIT_SEGMENT,{frag:m,id:r,tracks:v.tracks})}if(f){var p=f.startPTS,y=f.endPTS,E=f.startDTS,T=f.endDTS;u&&(u.elementaryStreams[J]={startPTS:p,endPTS:y,startDTS:E,endDTS:T}),l.setElementaryStreamInfo(J,p,y,E,T),this.bufferFragmentData(f,l,u,a)}if(null!=g&&null!=(t=g.samples)&&t.length){var S=o({id:r,frag:l,details:h},g);i.trigger(_.FRAG_PARSING_METADATA,S)}if(c){var A=o({id:r,frag:l,details:h},c);i.trigger(_.FRAG_PARSING_USERDATA,A)}}else this.fragmentTracker.removeFragment(l)}else this.resetWhenMissingContext(a)},r._bufferInitSegment=function(e,t,r,i){if(this.state===Si.PARSING&&(t.video&&delete t.video,t.audiovideo&&delete t.audiovideo,t.audio)){var n=t.audio;n.id=M;var a=e.audioCodec;this.log("Init audio buffer, container:"+n.container+", codecs[level/parsed]=["+a+"/"+n.codec+"]"),a&&1===a.split(",").length&&(n.levelCodec=a),this.hls.trigger(_.BUFFER_CODECS,t);var s=n.initSegment;if(null!=s&&s.byteLength){var o={type:"audio",frag:r,part:null,chunkMeta:i,parent:r.type,data:s};this.hls.trigger(_.BUFFER_APPENDING,o)}this.tickImmediate()}},r.loadFragment=function(t,r,i){var n,a=this.fragmentTracker.getState(t);if(this.switchingTrack||a===Nt||a===Bt)if(re(t))if(null!=(n=r.details)&&n.live&&!this.initPTS[t.cc]){this.log("Waiting for video PTS in continuity counter "+t.cc+" of live stream before loading audio fragment "+t.sn+" of level "+this.trackId),this.state=Si.WAITING_INIT_PTS;var s=this.mainDetails;s&&s.fragmentStart!==r.details.fragmentStart&&Ei(r.details,s)}else e.prototype.loadFragment.call(this,t,r,i);else this._loadInitSegment(t,r);else this.clearTrackerIfNeeded(t)},r.flushAudioIfNeeded=function(t){if(this.media&&this.bufferedTrack){var r=this.bufferedTrack;ct({name:r.name,lang:r.lang,assocLang:r.assocLang,characteristics:r.characteristics,audioCodec:r.audioCodec,channels:r.channels},t,gt)||(mt(t.url,this.hls)?(this.log("Switching audio track : flushing all audio"),e.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio"),this.bufferedTrack=null):this.bufferedTrack=t)}},r.completeAudioSwitch=function(e){var t=this.hls;this.flushAudioIfNeeded(e),this.bufferedTrack=e,this.switchingTrack=null,t.trigger(_.AUDIO_TRACK_SWITCHED,f({},e))},t}(Ai),ua=function(e){function t(t,r){var i;return(i=e.call(this,r,t.logger)||this).hls=void 0,i.canLoad=!1,i.timer=-1,i.hls=t,i}u(t,e);var r=t.prototype;return r.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},r.clearTimer=function(){-1!==this.timer&&(self.clearTimeout(this.timer),this.timer=-1)},r.startLoad=function(){this.canLoad=!0,this.loadPlaylist()},r.stopLoad=function(){this.canLoad=!1,this.clearTimer()},r.switchParams=function(e,t,r){var i=null==t?void 0:t.renditionReports;if(i){for(var n=-1,a=0;a<i.length;a++){var s=i[a],o=void 0;try{o=new self.URL(s.URI,t.url).href}catch(e){this.warn("Could not construct new URL for Rendition Report: "+e),o=s.URI||""}if(o===e){n=a;break}o===e.substring(0,o.length)&&(n=a)}if(-1!==n){var l=i[n],u=parseInt(l["LAST-MSN"])||(null==t?void 0:t.lastPartSn),d=parseInt(l["LAST-PART"])||(null==t?void 0:t.lastPartIndex);if(this.hls.config.lowLatencyMode){var h=Math.min(t.age-t.partTarget,t.targetduration);d>=0&&h>t.partTarget&&(d+=1)}var f=r&&it(r);return new nt(u,d>=0?d:void 0,f)}}},r.loadPlaylist=function(e){this.clearTimer()},r.loadingPlaylist=function(e,t){this.clearTimer()},r.shouldLoadPlaylist=function(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)},r.getUrlWithDirectives=function(e,t){if(t)try{return t.addDirectives(e)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}return e},r.playlistLoaded=function(e,t,r){var i=t.details,n=t.stats,a=self.performance.now(),s=n.loading.first?Math.max(0,a-n.loading.first):0;i.advancedDateTime=Date.now()-s;var o=this.hls.config.timelineOffset;if(o!==i.appliedTimelineOffset){var l=Math.max(o||0,0);i.appliedTimelineOffset=l,i.fragments.forEach((function(e){e.start=e.playlistOffset+l}))}if(i.live||null!=r&&r.live){var u="levelInfo"in t?t.levelInfo:t.track;if(i.reloaded(r),r&&i.fragments.length>0){si(r,i);var d=i.playlistParsingError;if(d){this.warn(d);var h=this.hls;if(!h.config.ignorePlaylistParsingErrors){var f,c=t.networkDetails;return void h.trigger(_.ERROR,{type:k.NETWORK_ERROR,details:D.LEVEL_PARSING_ERROR,fatal:!1,url:i.url,error:d,reason:d.message,level:t.level||void 0,parent:null==(f=i.fragments[0])?void 0:f.type,networkDetails:c,stats:n})}i.playlistParsingError=null}}-1===i.requestScheduled&&(i.requestScheduled=n.loading.start);var g,v=this.hls.mainForwardBufferInfo,m=v?v.end-v.len:0,p=di(i,1e3*(i.edge-m));if(i.requestScheduled+p<a?i.requestScheduled=a:i.requestScheduled+=p,this.log("live playlist "+e+" "+(i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:i.updated?"UPDATED":"MISSED")),!this.canLoad||!i.live)return;var y=void 0,E=void 0;if(i.canBlockReload&&i.endSN&&i.advanced){var T=this.hls.config.lowLatencyMode,S=i.lastPartSn,A=i.endSN,L=i.lastPartIndex,R=S===A;-1!==L?R?(y=A+1,E=T?0:L):(y=S,E=T?L+1:i.maxPartIndex):y=A+1;var I=i.age,b=I+i.ageHeader,P=Math.min(b-i.partTarget,1.5*i.targetduration);if(P>0){if(b>3*i.targetduration)this.log("Playlist last advanced "+I.toFixed(2)+"s ago. Omitting segment and part directives."),y=void 0,E=void 0;else if(null!=r&&r.tuneInGoal&&b-i.partTarget>r.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+r.tuneInGoal+" to: "+P+" with playlist age: "+i.age),P=0;else{var C=Math.floor(P/i.targetduration);y+=C,void 0!==E&&(E+=Math.round(P%i.targetduration/i.partTarget)),this.log("CDN Tune-in age: "+i.ageHeader+"s last advanced "+I.toFixed(2)+"s goal: "+P+" skip sn "+C+" to part "+E)}i.tuneInGoal=P}if(g=this.getDeliveryDirectives(i,t.deliveryDirectives,y,E),T||!R)return i.requestScheduled=a,void this.loadingPlaylist(u,g)}else(i.canBlockReload||i.canSkipUntil)&&(g=this.getDeliveryDirectives(i,t.deliveryDirectives,y,E));g&&void 0!==y&&i.canBlockReload&&(i.requestScheduled=n.loading.first+Math.max(p-2*s,p/2)),this.scheduleLoading(u,g,i)}else this.clearTimer()},r.scheduleLoading=function(e,t,r){var i=this,n=r||e.details;if(n){var a=self.performance.now(),s=n.requestScheduled;if(a>=s)this.loadingPlaylist(e,t);else{var o=s-a;this.log("reload live playlist "+(e.name||e.bitrate+"bps")+" in "+Math.round(o)+" ms"),this.clearTimer(),this.timer=self.setTimeout((function(){return i.loadingPlaylist(e,t)}),o)}}else this.loadingPlaylist(e,t)},r.getDeliveryDirectives=function(e,t,r,i){var n=it(e);return null!=t&&t.skip&&e.deltaUpdateFailed&&(r=t.msn,i=t.part,n=et),new nt(r,i,n)},r.checkRetry=function(e){var t=this,r=e.details,i=Lt(e),n=e.errorAction,a=n||{},s=a.action,o=a.retryCount,l=void 0===o?0:o,u=a.retryConfig,d=!!n&&!!u&&(s===Ct||!n.resolved&&s===_t);if(d){var h;if(l>=u.maxNumRetry)return!1;if(i&&null!=(h=e.context)&&h.deliveryDirectives)this.warn("Retrying playlist loading "+(l+1)+"/"+u.maxNumRetry+' after "'+r+'" without delivery-directives'),this.loadPlaylist();else{var f=It(u,l);this.clearTimer(),this.timer=self.setTimeout((function(){return t.loadPlaylist()}),f),this.warn("Retrying playlist loading "+(l+1)+"/"+u.maxNumRetry+' after "'+r+'" in '+f+"ms")}e.levelRetry=!0,n.resolved=!0}return d},t}(B);function da(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!ha(e[r].attrs,t[r].attrs))return!1;return!0}function ha(e,t,r){var i=e["STABLE-RENDITION-ID"];return i&&!r?i===t["STABLE-RENDITION-ID"]:!(r||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some((function(r){return e[r]!==t[r]}))}function fa(e,t){return t.label.toLowerCase()===e.name.toLowerCase()&&(!t.language||t.language.toLowerCase()===(e.lang||"").toLowerCase())}var ca=function(e){function t(t){var r;return(r=e.call(this,t,"audio-track-controller")||this).tracks=[],r.groupIds=null,r.tracksInGroup=[],r.trackId=-1,r.currentTrack=null,r.selectDefaultTrack=!0,r.registerListeners(),r}u(t,e);var r=t.prototype;return r.registerListeners=function(){var e=this.hls;e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.MANIFEST_PARSED,this.onManifestParsed,this),e.on(_.LEVEL_LOADING,this.onLevelLoading,this),e.on(_.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(_.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(_.ERROR,this.onError,this)},r.unregisterListeners=function(){var e=this.hls;e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.MANIFEST_PARSED,this.onManifestParsed,this),e.off(_.LEVEL_LOADING,this.onLevelLoading,this),e.off(_.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(_.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(_.ERROR,this.onError,this)},r.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,e.prototype.destroy.call(this)},r.onManifestLoading=function(){this.tracks=[],this.tracksInGroup=[],this.groupIds=null,this.currentTrack=null,this.trackId=-1,this.selectDefaultTrack=!0},r.onManifestParsed=function(e,t){this.tracks=t.audioTracks||[]},r.onAudioTrackLoaded=function(e,t){var r=t.id,i=t.groupId,n=t.details,a=this.tracksInGroup[r];if(a&&a.groupId===i){var s=a.details;a.details=t.details,this.log("Audio track "+r+' "'+a.name+'" lang:'+a.lang+" group:"+i+" loaded ["+n.startSN+"-"+n.endSN+"]"),r===this.trackId&&this.playlistLoaded(r,t,s)}else this.warn("Audio track with id:"+r+" and group:"+i+" not found in active group "+(null==a?void 0:a.groupId))},r.onLevelLoading=function(e,t){this.switchLevel(t.level)},r.onLevelSwitching=function(e,t){this.switchLevel(t.level)},r.switchLevel=function(e){var t=this.hls.levels[e];if(t){var r=t.audioGroups||null,i=this.groupIds,n=this.currentTrack;if(!r||(null==i?void 0:i.length)!==(null==r?void 0:r.length)||null!=r&&r.some((function(e){return-1===(null==i?void 0:i.indexOf(e))}))){this.groupIds=r,this.trackId=-1,this.currentTrack=null;var a=this.tracks.filter((function(e){return!r||-1!==r.indexOf(e.groupId)}));if(a.length)this.selectDefaultTrack&&!a.some((function(e){return e.default}))&&(this.selectDefaultTrack=!1),a.forEach((function(e,t){e.id=t}));else if(!n&&!this.tracksInGroup.length)return;this.tracksInGroup=a;var s=this.hls.config.audioPreference;if(!n&&s){var o=ft(s,a,gt);if(o>-1)n=a[o];else{var l=ft(s,this.tracks);n=this.tracks[l]}}var u=this.findTrackId(n);-1===u&&n&&(u=this.findTrackId(null));var d={audioTracks:a};this.log("Updating audio tracks, "+a.length+" track(s) found in group(s): "+(null==r?void 0:r.join(","))),this.hls.trigger(_.AUDIO_TRACKS_UPDATED,d);var h=this.trackId;if(-1!==u&&-1===h)this.setAudioTrack(u);else if(a.length&&-1===h){var f,c=new Error("No audio track selected for current audio group-ID(s): "+(null==(f=this.groupIds)?void 0:f.join(","))+" track count: "+a.length);this.warn(c.message),this.hls.trigger(_.ERROR,{type:k.MEDIA_ERROR,details:D.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:c})}}}},r.onError=function(e,t){!t.fatal&&t.context&&(t.context.type!==w||t.context.id!==this.trackId||this.groupIds&&-1===this.groupIds.indexOf(t.context.groupId)||this.checkRetry(t))},r.setAudioOption=function(e){var t=this.hls;if(t.config.audioPreference=e,e){var r=this.allAudioTracks;if(this.selectDefaultTrack=!1,r.length){var i=this.currentTrack;if(i&&ct(e,i,gt))return i;var n=ft(e,this.tracksInGroup,gt);if(n>-1){var a=this.tracksInGroup[n];return this.setAudioTrack(n),a}if(i){var s=t.loadLevel;-1===s&&(s=t.firstAutoLevel);var o=function(e,t,r,i,n){var a=t[i],s=t.reduce((function(e,t,r){var i=t.uri;return(e[i]||(e[i]=[])).push(r),e}),{})[a.uri];s.length>1&&(i=Math.max.apply(Math,s));var o=a.videoRange,l=a.frameRate,u=a.codecSet.substring(0,4),d=vt(t,i,(function(t){if(t.videoRange!==o||t.frameRate!==l||t.codecSet.substring(0,4)!==u)return!1;var i=t.audioGroups,a=r.filter((function(e){return!i||-1!==i.indexOf(e.groupId)}));return ft(e,a,n)>-1}));return d>-1?d:vt(t,i,(function(t){var i=t.audioGroups,a=r.filter((function(e){return!i||-1!==i.indexOf(e.groupId)}));return ft(e,a,n)>-1}))}(e,t.levels,r,s,gt);if(-1===o)return null;t.nextLoadLevel=o}if(e.channels||e.audioCodec){var l=ft(e,r);if(l>-1)return r[l]}}}return null},r.setAudioTrack=function(e){var t=this.tracksInGroup;if(e<0||e>=t.length)this.warn("Invalid audio track id: "+e);else{this.selectDefaultTrack=!1;var r=this.currentTrack,i=t[e],n=i.details&&!i.details.live;if(!(e===this.trackId&&i===r&&n||(this.log("Switching to audio-track "+e+' "'+i.name+'" lang:'+i.lang+" group:"+i.groupId+" channels:"+i.channels),this.trackId=e,this.currentTrack=i,this.hls.trigger(_.AUDIO_TRACK_SWITCHING,f({},i)),n))){var a=this.switchParams(i.url,null==r?void 0:r.details,i.details);this.loadPlaylist(a)}}},r.findTrackId=function(e){for(var t=this.tracksInGroup,r=0;r<t.length;r++){var i=t[r];if((!this.selectDefaultTrack||i.default)&&(!e||ct(e,i,gt)))return r}if(e){for(var n=e.name,a=e.lang,s=e.assocLang,o=e.characteristics,l=e.audioCodec,u=e.channels,d=0;d<t.length;d++)if(ct({name:n,lang:a,assocLang:s,characteristics:o,audioCodec:l,channels:u},t[d],gt))return d;for(var h=0;h<t.length;h++){var f=t[h];if(ha(e.attrs,f.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return h}for(var c=0;c<t.length;c++){var g=t[c];if(ha(e.attrs,g.attrs,["LANGUAGE"]))return c}}return-1},r.loadPlaylist=function(t){e.prototype.loadPlaylist.call(this);var r=this.currentTrack;this.shouldLoadPlaylist(r)&&mt(r.url,this.hls)&&this.scheduleLoading(r,t)},r.loadingPlaylist=function(t,r){e.prototype.loadingPlaylist.call(this,t,r);var i=t.id,n=t.groupId,a=this.getUrlWithDirectives(t.url,r),s=t.details,o=null==s?void 0:s.age;this.log("Loading audio-track "+i+' "'+t.name+'" lang:'+t.lang+" group:"+n+(void 0!==(null==r?void 0:r.msn)?" at sn "+r.msn+" part "+r.part:"")+(o&&s.live?" age "+o.toFixed(1)+(s.type&&" "+s.type||""):"")+" "+a),this.hls.trigger(_.AUDIO_TRACK_LOADING,{url:a,id:i,groupId:n,deliveryDirectives:r||null,track:t})},n(t,[{key:"allAudioTracks",get:function(){return this.tracks}},{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}}])}(ua),ga=function(){function e(e){this.tracks=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.tracks=e}var t=e.prototype;return t.destroy=function(){this.tracks=this.queues=null},t.append=function(e,t,r){if(null!==this.queues&&null!==this.tracks){var i=this.queues[t];i.push(e),1!==i.length||r||this.executeNext(t)}},t.appendBlocker=function(e){var t=this;return new Promise((function(r){var i={label:"async-blocker",execute:r,onStart:function(){},onComplete:function(){},onError:function(){}};t.append(i,e)}))},t.prependBlocker=function(e){var t=this;return new Promise((function(r){if(t.queues){var i={label:"async-blocker-prepend",execute:r,onStart:function(){},onComplete:function(){},onError:function(){}};t.queues[e].unshift(i)}}))},t.removeBlockers=function(){null!==this.queues&&[this.queues.video,this.queues.audio,this.queues.audiovideo].forEach((function(e){var t,r=null==(t=e[0])?void 0:t.label;"async-blocker"!==r&&"async-blocker-prepend"!==r||(e[0].execute(),e.splice(0,1))}))},t.unblockAudio=function(e){null!==this.queues&&this.queues.audio[0]===e&&this.shiftAndExecuteNext("audio")},t.executeNext=function(e){if(null!==this.queues&&null!==this.tracks){var t=this.queues[e];if(t.length){var r=t[0];try{r.execute()}catch(t){var i;if(r.onError(t),null===this.queues||null===this.tracks)return;var n=null==(i=this.tracks[e])?void 0:i.buffer;null!=n&&n.updating||this.shiftAndExecuteNext(e)}}}},t.shiftAndExecuteNext=function(e){null!==this.queues&&(this.queues[e].shift(),this.executeNext(e))},t.current=function(e){var t;return(null==(t=this.queues)?void 0:t[e][0])||null},t.toString=function(){var e=this.queues,t=this.tracks;return null===e||null===t?"<destroyed>":"\n"+this.list("video")+"\n"+this.list("audio")+"\n"+this.list("audiovideo")+"}"},t.list=function(e){var t,r;return null!=(t=this.queues)&&t[e]||null!=(r=this.tracks)&&r[e]?e+": ("+this.listSbInfo(e)+") "+this.listOps(e):""},t.listSbInfo=function(e){var t,r=null==(t=this.tracks)?void 0:t[e],i=null==r?void 0:r.buffer;return i?"SourceBuffer"+(i.updating?" updating":"")+(r.ended?" ended":"")+(r.ending?" ending":""):"none"},t.listOps=function(e){var t;return(null==(t=this.queues)?void 0:t[e].map((function(e){return e.label})).join(", "))||""},e}(),va=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/,ma="HlsJsTrackRemovedError",pa=function(e){function t(t){var r;return(r=e.call(this,t)||this).name=ma,r}return u(t,e),t}(v(Error)),ya=function(e){function t(t,r){var i,n;return(i=e.call(this,"buffer-controller",t.logger)||this).hls=void 0,i.fragmentTracker=void 0,i.details=null,i._objectUrl=null,i.operationQueue=null,i.bufferCodecEventsTotal=0,i.media=null,i.mediaSource=null,i.lastMpegAudioChunk=null,i.blockedAudioAppend=null,i.lastVideoAppendEnd=0,i.appendSource=void 0,i.transferData=void 0,i.overrides=void 0,i.appendErrors={audio:0,video:0,audiovideo:0},i.tracks={},i.sourceBuffers=[[null,null],[null,null]],i._onEndStreaming=function(e){var t;i.hls&&"open"===(null==(t=i.mediaSource)?void 0:t.readyState)&&i.hls.pauseBuffering()},i._onStartStreaming=function(e){i.hls&&i.hls.resumeBuffering()},i._onMediaSourceOpen=function(e){var t=i,r=t.media,n=t.mediaSource;e&&i.log("Media source opened"),r&&n&&(n.removeEventListener("sourceopen",i._onMediaSourceOpen),r.removeEventListener("emptied",i._onMediaEmptied),i.updateDuration(),i.hls.trigger(_.MEDIA_ATTACHED,{media:r,mediaSource:n}),null!==i.mediaSource&&i.checkPendingTracks())},i._onMediaSourceClose=function(){i.log("Media source closed")},i._onMediaSourceEnded=function(){i.log("Media source ended")},i._onMediaEmptied=function(){var e=i,t=e.mediaSrc,r=e._objectUrl;t!==r&&i.error("Media element src was set while attaching MediaSource ("+r+" > "+t+")")},i.hls=t,i.fragmentTracker=r,i.appendSource=(n=q(t.config.preferManagedMediaSource),"undefined"!=typeof self&&n===self.ManagedMediaSource),i.initTracks(),i.registerListeners(),i}u(t,e);var r=t.prototype;return r.hasSourceTypes=function(){return Object.keys(this.tracks).length>0},r.destroy=function(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.transferData=this.overrides=void 0,this.operationQueue&&(this.operationQueue.destroy(),this.operationQueue=null),this.hls=this.fragmentTracker=null,this._onMediaSourceOpen=this._onMediaSourceClose=null,this._onMediaSourceEnded=null,this._onStartStreaming=this._onEndStreaming=null},r.registerListeners=function(){var e=this.hls;e.on(_.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.MANIFEST_PARSED,this.onManifestParsed,this),e.on(_.BUFFER_RESET,this.onBufferReset,this),e.on(_.BUFFER_APPENDING,this.onBufferAppending,this),e.on(_.BUFFER_CODECS,this.onBufferCodecs,this),e.on(_.BUFFER_EOS,this.onBufferEos,this),e.on(_.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(_.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(_.FRAG_PARSED,this.onFragParsed,this),e.on(_.FRAG_CHANGED,this.onFragChanged,this),e.on(_.ERROR,this.onError,this)},r.unregisterListeners=function(){var e=this.hls;e.off(_.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.MANIFEST_PARSED,this.onManifestParsed,this),e.off(_.BUFFER_RESET,this.onBufferReset,this),e.off(_.BUFFER_APPENDING,this.onBufferAppending,this),e.off(_.BUFFER_CODECS,this.onBufferCodecs,this),e.off(_.BUFFER_EOS,this.onBufferEos,this),e.off(_.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(_.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(_.FRAG_PARSED,this.onFragParsed,this),e.off(_.FRAG_CHANGED,this.onFragChanged,this),e.off(_.ERROR,this.onError,this)},r.transferMedia=function(){var e=this,t=this.media,r=this.mediaSource;if(!t)return null;var i={};if(this.operationQueue){var n=this.isUpdating();n||this.operationQueue.removeBlockers();var a=this.isQueued();(n||a)&&this.warn("Transfering MediaSource with"+(a?" operations in queue":"")+(n?" updating SourceBuffer(s)":"")+" "+this.operationQueue),this.operationQueue.destroy()}var s=this.transferData;return!this.sourceBufferCount&&s&&s.mediaSource===r?o(i,s.tracks):this.sourceBuffers.forEach((function(t){var r=t[0];r&&(i[r]=o({},e.tracks[r]),e.removeBuffer(r)),t[0]=t[1]=null})),{media:t,mediaSource:r,tracks:i}},r.initTracks=function(){this.sourceBuffers=[[null,null],[null,null]],this.tracks={},this.resetQueue(),this.resetAppendErrors(),this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.lastVideoAppendEnd=0},r.onManifestLoading=function(){this.bufferCodecEventsTotal=0,this.details=null},r.onManifestParsed=function(e,t){var r,i=2;(t.audio&&!t.video||!t.altAudio)&&(i=1),this.bufferCodecEventsTotal=i,this.log(i+" bufferCodec event(s) expected."),null!=(r=this.transferData)&&r.mediaSource&&this.sourceBufferCount&&i&&this.bufferCreated()},r.onMediaAttaching=function(e,t){var r=this.media=t.media,i=q(this.appendSource);if(this.transferData=this.overrides=void 0,r&&i){var n=!!t.mediaSource;(n||t.overrides)&&(this.transferData=t,this.overrides=t.overrides);var a=this.mediaSource=t.mediaSource||new i;if(this.assignMediaSource(a),n)this._objectUrl=r.src,this.attachTransferred();else{var s=this._objectUrl=self.URL.createObjectURL(a);if(this.appendSource)try{r.removeAttribute("src");var o=self.ManagedMediaSource;r.disableRemotePlayback=r.disableRemotePlayback||o&&a instanceof o,Ea(r),function(e,t){var r=self.document.createElement("source");r.type="video/mp4",r.src=t,e.appendChild(r)}(r,s),r.load()}catch(e){r.src=s}else r.src=s}r.addEventListener("emptied",this._onMediaEmptied)}},r.assignMediaSource=function(e){var t,r;this.log(((null==(t=this.transferData)?void 0:t.mediaSource)===e?"transferred":"created")+" media source: "+(null==(r=e.constructor)?void 0:r.name)),e.addEventListener("sourceopen",this._onMediaSourceOpen),e.addEventListener("sourceended",this._onMediaSourceEnded),e.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(e.addEventListener("startstreaming",this._onStartStreaming),e.addEventListener("endstreaming",this._onEndStreaming))},r.attachTransferred=function(){var e=this,t=this.media,r=this.transferData;if(r&&t){var i=this.tracks,n=r.tracks,a=n?Object.keys(n):null,s=a?a.length:0,o=function(){e.media&&e.mediaSourceOpenOrEnded&&e._onMediaSourceOpen()};if(n&&a&&s){if(!this.tracksReady)return this.hls.config.startFragPrefetch=!0,void this.log("attachTransferred: waiting for SourceBuffer track info");if(this.log("attachTransferred: (bufferCodecEventsTotal "+this.bufferCodecEventsTotal+")\nrequired tracks: "+lt(i,(function(e,t){return"initSegment"===e?void 0:t}))+";\ntransfer tracks: "+lt(n,(function(e,t){return"initSegment"===e?void 0:t}))+"}"),!X(n,i)){r.mediaSource=null,r.tracks=void 0;var l=t.currentTime,u=this.details,d=Math.max(l,(null==u?void 0:u.fragments[0].start)||0);return d-l>1?void this.log("attachTransferred: waiting for playback to reach new tracks start time "+l+" -> "+d):(this.warn('attachTransferred: resetting MediaSource for incompatible tracks ("'+Object.keys(n)+'"->"'+Object.keys(i)+'") start time: '+d+" currentTime: "+l),this.onMediaDetaching(_.MEDIA_DETACHING,{}),this.onMediaAttaching(_.MEDIA_ATTACHING,r),void(t.currentTime=d))}this.transferData=void 0,a.forEach((function(t){var r=t,i=n[r];if(i){var a=i.buffer;if(a){var s=e.fragmentTracker,o=i.id;if(s.hasFragments(o)||s.hasParts(o)){var l=ar.getBuffered(a);s.detectEvictedFragments(r,l,o,null,!0)}var u=Ta(r),d=[r,a];e.sourceBuffers[u]=d,a.updating&&e.operationQueue&&e.operationQueue.prependBlocker(r),e.trackSourceBuffer(r,i)}}})),o(),this.bufferCreated()}else this.log("attachTransferred: MediaSource w/o SourceBuffers"),o()}},r.onMediaDetaching=function(e,t){var r=this,i=!!t.transferMedia;this.transferData=this.overrides=void 0;var n=this.media,a=this.mediaSource,s=this._objectUrl;if(a){if(this.log("media source "+(i?"transferring":"detaching")),i)this.sourceBuffers.forEach((function(e){var t=e[0];t&&r.removeBuffer(t)})),this.resetQueue();else{if(this.mediaSourceOpenOrEnded){var o="open"===a.readyState;try{for(var l=a.sourceBuffers,u=l.length;u--;)o&&l[u].abort(),a.removeSourceBuffer(l[u]);o&&a.endOfStream()}catch(e){this.warn("onMediaDetaching: "+e.message+" while calling endOfStream")}}this.sourceBufferCount&&this.onBufferReset()}a.removeEventListener("sourceopen",this._onMediaSourceOpen),a.removeEventListener("sourceended",this._onMediaSourceEnded),a.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(a.removeEventListener("startstreaming",this._onStartStreaming),a.removeEventListener("endstreaming",this._onEndStreaming)),this.mediaSource=null,this._objectUrl=null}n&&(n.removeEventListener("emptied",this._onMediaEmptied),i||(s&&self.URL.revokeObjectURL(s),this.mediaSrc===s?(n.removeAttribute("src"),this.appendSource&&Ea(n),n.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.media=null),this.hls.trigger(_.MEDIA_DETACHED,t)},r.onBufferReset=function(){var e=this;this.sourceBuffers.forEach((function(t){var r=t[0];r&&e.resetBuffer(r)})),this.initTracks()},r.resetBuffer=function(e){var t,r=null==(t=this.tracks[e])?void 0:t.buffer;if(this.removeBuffer(e),r)try{var i;null!=(i=this.mediaSource)&&i.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(r)}catch(t){this.warn("onBufferReset "+e,t)}delete this.tracks[e]},r.removeBuffer=function(e){this.removeBufferListeners(e),this.sourceBuffers[Ta(e)]=[null,null];var t=this.tracks[e];t&&(t.buffer=void 0)},r.resetQueue=function(){this.operationQueue&&this.operationQueue.destroy(),this.operationQueue=new ga(this.tracks)},r.onBufferCodecs=function(e,t){var r=this,i=this.tracks,n=Object.keys(t);this.log('BUFFER_CODECS: "'+n+'" (current SB count '+this.sourceBufferCount+")");var a="audiovideo"in t&&(i.audio||i.video)||i.audiovideo&&("audio"in t||"video"in t),s=!a&&this.sourceBufferCount&&this.media&&n.some((function(e){return!i[e]}));a||s?this.warn('Unsupported transition between "'+Object.keys(i)+'" and "'+n+'" SourceBuffers'):(n.forEach((function(e){var n,a,s,o=t[e],l=o.id,u=o.codec,d=o.levelCodec,h=o.container,f=o.metadata,c=o.supplemental,g=i[e],v=null==(n=r.transferData)||null==(a=n.tracks)?void 0:a[e],m=null!=v&&v.buffer?v:g,p=(null==m?void 0:m.pendingCodec)||(null==m?void 0:m.codec),y=null==m?void 0:m.levelCodec;g||(g=i[e]={buffer:void 0,listeners:[],codec:u,supplemental:c,container:h,levelCodec:d,metadata:f,id:l});var E=Ye(p,y),T=null==E?void 0:E.replace(va,"$1"),S=Ye(u,d),A=null==(s=S)?void 0:s.replace(va,"$1");S&&E&&T!==A&&("audio"===e.slice(0,5)&&(S=Ve(S,r.appendSource)),r.log("switching codec "+p+" to "+S),S!==(g.pendingCodec||g.codec)&&(g.pendingCodec=S),g.container=h,r.appendChangeType(e,h,S))})),(this.tracksReady||this.sourceBufferCount)&&(t.tracks=this.sourceBufferTracks),this.sourceBufferCount||this.mediaSourceOpenOrEnded&&this.checkPendingTracks())},r.appendChangeType=function(e,t,r){var i=this,n=t+";codecs="+r,a={label:"change-type="+n,execute:function(){var a=i.tracks[e];if(a){var s=a.buffer;null!=s&&s.changeType&&(i.log("changing "+e+" sourceBuffer type to "+n),s.changeType(n),a.codec=r,a.container=t)}i.shiftAndExecuteNext(e)},onStart:function(){},onComplete:function(){},onError:function(t){i.warn("Failed to change "+e+" SourceBuffer type",t)}};this.append(a,e,this.isPending(this.tracks[e]))},r.blockAudio=function(e){var t,r=this,i=e.start,n=i+.05*e.duration;if(!0!==(null==(t=this.fragmentTracker.getAppendedFrag(i,x))?void 0:t.gap)){var a={label:"block-audio",execute:function(){var e,t=r.tracks.video;(r.lastVideoAppendEnd>n||null!=t&&t.buffer&&ar.isBuffered(t.buffer,n)||!0===(null==(e=r.fragmentTracker.getAppendedFrag(n,x))?void 0:e.gap))&&(r.blockedAudioAppend=null,r.shiftAndExecuteNext("audio"))},onStart:function(){},onComplete:function(){},onError:function(e){r.warn("Error executing block-audio operation",e)}};this.blockedAudioAppend={op:a,frag:e},this.append(a,"audio",!0)}},r.unblockAudio=function(){var e=this.blockedAudioAppend,t=this.operationQueue;e&&t&&(this.blockedAudioAppend=null,t.unblockAudio(e.op))},r.onBufferAppending=function(e,t){var r=this,i=this.tracks,n=t.data,a=t.type,s=t.parent,o=t.frag,l=t.part,u=t.chunkMeta,d=u.buffering[a],h=o.sn,f=self.performance.now();d.start=f;var c=o.stats.buffering,g=l?l.stats.buffering:null;0===c.start&&(c.start=f),g&&0===g.start&&(g.start=f);var v=i.audio,m=!1;"audio"===a&&"audio/mpeg"===(null==v?void 0:v.container)&&(m=!this.lastMpegAudioChunk||1===u.id||this.lastMpegAudioChunk.sn!==u.sn,this.lastMpegAudioChunk=u);var p=this.tracks.video,y=null==p?void 0:p.buffer;if(y&&"initSegment"!==h){var E=l||o,T=this.blockedAudioAppend;if("audio"!==a||"main"===s||this.blockedAudioAppend){if("video"===a){var S=E.end;if(T){var A=T.frag.start;(S>A||S<this.lastVideoAppendEnd||ar.isBuffered(y,A))&&this.unblockAudio()}this.lastVideoAppendEnd=S}}else{var L=E.start+.05*E.duration,R=y.buffered,I=this.currentOp("video");R.length||I?!I&&!ar.isBuffered(y,L)&&this.lastVideoAppendEnd<L&&this.blockAudio(E):this.blockAudio(E)}}var b=(l||o).start,P={label:"append-"+a,execute:function(){if(d.executeStart=self.performance.now(),m){var e=r.tracks[a];if(e){var t=e.buffer;if(t){var i=b-t.timestampOffset;Math.abs(i)>=.1&&(r.log("Updating audio SourceBuffer timestampOffset to "+b+" (delta: "+i+") sn: "+h+")"),t.timestampOffset=b)}}}r.appendExecutor(n,a)},onStart:function(){},onComplete:function(){var e=self.performance.now();d.executeEnd=d.end=e,0===c.first&&(c.first=e),g&&0===g.first&&(g.first=e);var t={};r.sourceBuffers.forEach((function(e){var r=e[0],i=e[1];r&&(t[r]=ar.getBuffered(i))})),r.appendErrors[a]=0,"audio"===a||"video"===a?r.appendErrors.audiovideo=0:(r.appendErrors.audio=0,r.appendErrors.video=0),r.hls.trigger(_.BUFFER_APPENDED,{type:a,frag:o,part:l,chunkMeta:u,parent:o.type,timeRanges:t})},onError:function(e){var t,i={type:k.MEDIA_ERROR,parent:o.type,details:D.BUFFER_APPEND_ERROR,sourceBufferName:a,frag:o,part:l,chunkMeta:u,error:e,err:e,fatal:!1},n=null==(t=r.media)?void 0:t.error;if(e.code===DOMException.QUOTA_EXCEEDED_ERR)i.details=D.BUFFER_FULL_ERROR;else if(e.code===DOMException.INVALID_STATE_ERR&&r.mediaSourceOpenOrEnded&&!n)i.errorAction=Ft(!0);else if(e.name===ma&&0===r.sourceBufferCount)i.errorAction=Ft(!0);else{var s=++r.appendErrors[a];r.warn("Failed "+s+"/"+r.hls.config.appendErrorMaxRetry+' times to append segment in "'+a+'" sourceBuffer ('+(n||"no media error")+")"),(s>=r.hls.config.appendErrorMaxRetry||n)&&(i.fatal=!0)}r.hls.trigger(_.ERROR,i)}};this.append(P,a,this.isPending(this.tracks[a]))},r.getFlushOp=function(e,t,r){var i=this;return this.log('queuing "'+e+'" remove '+t+"-"+r),{label:"remove",execute:function(){i.removeExecutor(e,t,r)},onStart:function(){},onComplete:function(){i.hls.trigger(_.BUFFER_FLUSHED,{type:e})},onError:function(n){i.warn("Failed to remove "+t+"-"+r+' from "'+e+'" SourceBuffer',n)}}},r.onBufferFlushing=function(e,t){var r=this,i=t.type,n=t.startOffset,a=t.endOffset;i?this.append(this.getFlushOp(i,n,a),i):this.sourceBuffers.forEach((function(e){var t=e[0];t&&r.append(r.getFlushOp(t,n,a),t)}))},r.onFragParsed=function(e,t){var r=this,i=t.frag,n=t.part,a=[],s=n?n.elementaryStreams:i.elementaryStreams;s[ee]?a.push("audiovideo"):(s[J]&&a.push("audio"),s[Z]&&a.push("video")),0===a.length&&this.warn("Fragments must have at least one ElementaryStreamType set. type: "+i.type+" level: "+i.level+" sn: "+i.sn),this.blockBuffers((function(){var e=self.performance.now();i.stats.buffering.end=e,n&&(n.stats.buffering.end=e);var t=n?n.stats:i.stats;r.hls.trigger(_.FRAG_BUFFERED,{frag:i,part:n,stats:t,id:i.type})}),a).catch((function(e){r.warn("Fragment buffered callback "+e),r.stepOperationQueue(r.sourceBufferTypes)}))},r.onFragChanged=function(e,t){this.trimBuffers()},r.onBufferEos=function(e,t){var r,i=this;this.sourceBuffers.forEach((function(e){var r=e[0];if(r){var n=i.tracks[r];t.type&&t.type!==r||(n.ending=!0,n.ended||(n.ended=!0,i.log(r+" buffer reached EOS")))}}));var n=!1!==(null==(r=this.overrides)?void 0:r.endOfStream);this.sourceBufferCount>0&&!this.sourceBuffers.some((function(e){var t,r=e[0];return r&&!(null!=(t=i.tracks[r])&&t.ended)}))&&(n?(this.log("Queueing EOS"),this.blockUntilOpen((function(){i.tracksEnded();var e=i.mediaSource;e&&"open"===e.readyState?(i.log("Calling mediaSource.endOfStream()"),e.endOfStream(),i.hls.trigger(_.BUFFERED_TO_END,void 0)):e&&i.log("Could not call mediaSource.endOfStream(). mediaSource.readyState: "+e.readyState)}))):(this.tracksEnded(),this.hls.trigger(_.BUFFERED_TO_END,void 0)))},r.tracksEnded=function(){var e=this;this.sourceBuffers.forEach((function(t){var r=t[0];if(null!==r){var i=e.tracks[r];i&&(i.ending=!1)}}))},r.onLevelUpdated=function(e,t){var r=t.details;r.fragments.length&&(this.details=r,this.updateDuration())},r.updateDuration=function(){var e=this,t=this.getDurationAndRange();t&&this.blockUntilOpen((function(){return e.updateMediaSource(t)}))},r.onError=function(e,t){if(t.details===D.BUFFER_APPEND_ERROR&&t.frag){var r,i=null==(r=t.errorAction)?void 0:r.nextAutoLevel;R(i)&&i!==t.frag.level&&this.resetAppendErrors()}},r.resetAppendErrors=function(){this.appendErrors={audio:0,video:0,audiovideo:0}},r.trimBuffers=function(){var e=this.hls,t=this.details,r=this.media;if(r&&null!==t&&this.sourceBufferCount){var i=e.config,n=r.currentTime,a=t.levelTargetDuration,s=t.live&&null!==i.liveBackBufferLength?i.liveBackBufferLength:i.backBufferLength;if(R(s)&&s>=0){var o=Math.max(s,a),l=Math.floor(n/a)*a-o;this.flushBackBuffer(n,a,l)}if(R(i.frontBufferFlushThreshold)&&i.frontBufferFlushThreshold>0){var u=Math.max(i.maxBufferLength,i.frontBufferFlushThreshold),d=Math.max(u,a),h=Math.floor(n/a)*a+d;this.flushFrontBuffer(n,a,h)}}},r.flushBackBuffer=function(e,t,r){var i=this;this.sourceBuffers.forEach((function(e){var t=e[0],n=e[1];if(n){var a=ar.getBuffered(n);if(a.length>0&&r>a.start(0)){var s;i.hls.trigger(_.BACK_BUFFER_REACHED,{bufferEnd:r});var o=i.tracks[t];if(null!=(s=i.details)&&s.live)i.hls.trigger(_.LIVE_BACK_BUFFER_REACHED,{bufferEnd:r});else if(null!=o&&o.ended)return void i.log("Cannot flush "+t+" back buffer while SourceBuffer is in ended state");i.hls.trigger(_.BUFFER_FLUSHING,{startOffset:0,endOffset:r,type:t})}}}))},r.flushFrontBuffer=function(e,t,r){var i=this;this.sourceBuffers.forEach((function(t){var n=t[0],a=t[1];if(a){var s=ar.getBuffered(a),o=s.length;if(o<2)return;var l=s.start(o-1),u=s.end(o-1);if(r>l||e>=l&&e<=u)return;i.hls.trigger(_.BUFFER_FLUSHING,{startOffset:l,endOffset:1/0,type:n})}}))},r.getDurationAndRange=function(){var e,t=this.details,r=this.mediaSource;if(!t||!this.media||"open"!==(null==r?void 0:r.readyState))return null;var i=t.edge;if(t.live&&this.hls.config.liveDurationInfinity){if(t.fragments.length&&t.live&&r.setLiveSeekableRange){var n=Math.max(0,t.fragmentStart);return{duration:1/0,start:n,end:Math.max(n,i)}}return{duration:1/0}}var a=null==(e=this.overrides)?void 0:e.duration;if(a)return R(a)?{duration:a}:null;var s=this.media.duration;return i>(R(r.duration)?r.duration:0)&&i>s||!R(s)?{duration:i}:null},r.updateMediaSource=function(e){var t=e.duration,r=e.start,i=e.end,n=this.mediaSource;this.media&&n&&"open"===n.readyState&&(n.duration!==t&&(R(t)&&this.log("Updating MediaSource duration to "+t.toFixed(3)),n.duration=t),void 0!==r&&void 0!==i&&(this.log("MediaSource duration is set to "+n.duration+". Setting seekable range to "+r+"-"+i+"."),n.setLiveSeekableRange(r,i)))},r.checkPendingTracks=function(){var e=this.bufferCodecEventsTotal,t=this.pendingTrackCount,r=this.tracks;if(this.log("checkPendingTracks (pending: "+t+" codec events expected: "+e+") "+lt(r)),this.tracksReady){var i,n=null==(i=this.transferData)?void 0:i.tracks;n&&Object.keys(n).length?this.attachTransferred():this.createSourceBuffers()}},r.bufferCreated=function(){var e=this;if(this.sourceBufferCount){var t={};this.sourceBuffers.forEach((function(r){var i=r[0],n=r[1];if(i){var a=e.tracks[i];t[i]={buffer:n,container:a.container,codec:a.codec,supplemental:a.supplemental,levelCodec:a.levelCodec,id:a.id,metadata:a.metadata}}})),this.hls.trigger(_.BUFFER_CREATED,{tracks:t}),this.log("SourceBuffers created. Running queue: "+this.operationQueue),this.sourceBuffers.forEach((function(t){var r=t[0];e.executeNext(r)}))}else{var r=new Error("could not create source buffer for media codec(s)");this.hls.trigger(_.ERROR,{type:k.MEDIA_ERROR,details:D.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:r,reason:r.message})}},r.createSourceBuffers=function(){var e=this.tracks,t=this.sourceBuffers,r=this.mediaSource;if(!r)throw new Error("createSourceBuffers called when mediaSource was null");for(var i in e){var n=i,a=e[n];if(this.isPending(a)){var s=this.getTrackCodec(a,n),o=a.container+";codecs="+s;a.codec=s,this.log("creating sourceBuffer("+o+")"+(this.currentOp(n)?" Queued":"")+" "+lt(a));try{var l=r.addSourceBuffer(o),u=Ta(n),d=[n,l];t[u]=d,a.buffer=l}catch(e){var h;return this.error("error while trying to add sourceBuffer: "+e.message),this.shiftAndExecuteNext(n),null==(h=this.operationQueue)||h.removeBlockers(),delete this.tracks[n],void this.hls.trigger(_.ERROR,{type:k.MEDIA_ERROR,details:D.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:e,sourceBufferName:n,mimeType:o,parent:a.id})}this.trackSourceBuffer(n,a)}}this.bufferCreated()},r.getTrackCodec=function(e,t){var r=e.supplemental,i=e.codec;r&&("video"===t||"audiovideo"===t)&&Fe(r,"video")&&(i=function(e,t){var r=[];if(e)for(var i=e.split(","),n=0;n<i.length;n++)Me(i[n],"video")||r.push(i[n]);return t&&r.push(t),r.join(",")}(i,r));var n=Ye(i,e.levelCodec);return n?"audio"===t.slice(0,5)?Ve(n,this.appendSource):n:""},r.trackSourceBuffer=function(e,t){var r=this,i=t.buffer;if(i){var n=this.getTrackCodec(t,e);this.tracks[e]={buffer:i,codec:n,container:t.container,levelCodec:t.levelCodec,supplemental:t.supplemental,metadata:t.metadata,id:t.id,listeners:[]},this.removeBufferListeners(e),this.addBufferListener(e,"updatestart",this.onSBUpdateStart),this.addBufferListener(e,"updateend",this.onSBUpdateEnd),this.addBufferListener(e,"error",this.onSBUpdateError),this.appendSource&&this.addBufferListener(e,"bufferedchange",(function(e,t){var i=t.removedRanges;null!=i&&i.length&&r.hls.trigger(_.BUFFER_FLUSHED,{type:e})}))}},r.onSBUpdateStart=function(e){var t=this.currentOp(e);t&&t.onStart()},r.onSBUpdateEnd=function(e){var t;if("closed"!==(null==(t=this.mediaSource)?void 0:t.readyState)){var r=this.currentOp(e);r&&(r.onComplete(),this.shiftAndExecuteNext(e))}else this.resetBuffer(e)},r.onSBUpdateError=function(e,t){var r,i=new Error(e+" SourceBuffer error. MediaSource readyState: "+(null==(r=this.mediaSource)?void 0:r.readyState));this.error(""+i,t),this.hls.trigger(_.ERROR,{type:k.MEDIA_ERROR,details:D.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:i,fatal:!1});var n=this.currentOp(e);n&&n.onError(i)},r.removeExecutor=function(e,t,r){var i=this.media,n=this.mediaSource,a=this.tracks[e],s=null==a?void 0:a.buffer;if(!i||!n||!s)return this.warn("Attempting to remove from the "+e+" SourceBuffer, but it does not exist"),void this.shiftAndExecuteNext(e);var o=R(i.duration)?i.duration:1/0,l=R(n.duration)?n.duration:1/0,u=Math.max(0,t),d=Math.min(r,o,l);d>u&&(!a.ending||a.ended)?(a.ended=!1,this.log("Removing ["+u+","+d+"] from the "+e+" SourceBuffer"),s.remove(u,d)):this.shiftAndExecuteNext(e)},r.appendExecutor=function(e,t){var r=this.tracks[t],i=null==r?void 0:r.buffer;if(!i)throw new pa("Attempting to append to the "+t+" SourceBuffer, but it does not exist");r.ending=!1,r.ended=!1,i.appendBuffer(e)},r.blockUntilOpen=function(e){var t=this;if(this.isUpdating()||this.isQueued())this.blockBuffers(e).catch((function(e){t.warn("SourceBuffer blocked callback "+e),t.stepOperationQueue(t.sourceBufferTypes)}));else try{e()}catch(e){this.warn("Callback run without blocking "+this.operationQueue+" "+e)}},r.isUpdating=function(){return this.sourceBuffers.some((function(e){var t=e[0],r=e[1];return t&&r.updating}))},r.isQueued=function(){var e=this;return this.sourceBuffers.some((function(t){var r=t[0];return r&&!!e.currentOp(r)}))},r.isPending=function(e){return!!e&&!e.buffer},r.blockBuffers=function(e,t){var r=this;if(void 0===t&&(t=this.sourceBufferTypes),!t.length)return this.log("Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(e);var i=this.operationQueue,n=t.map((function(e){return r.appendBlocker(e)}));return t.length>1&&!!this.blockedAudioAppend&&this.unblockAudio(),Promise.all(n).then((function(t){i===r.operationQueue&&(e(),r.stepOperationQueue(r.sourceBufferTypes))}))},r.stepOperationQueue=function(e){var t=this;e.forEach((function(e){var r,i=null==(r=t.tracks[e])?void 0:r.buffer;i&&!i.updating&&t.shiftAndExecuteNext(e)}))},r.append=function(e,t,r){this.operationQueue&&this.operationQueue.append(e,t,r)},r.appendBlocker=function(e){if(this.operationQueue)return this.operationQueue.appendBlocker(e)},r.currentOp=function(e){return this.operationQueue?this.operationQueue.current(e):null},r.executeNext=function(e){e&&this.operationQueue&&this.operationQueue.executeNext(e)},r.shiftAndExecuteNext=function(e){this.operationQueue&&this.operationQueue.shiftAndExecuteNext(e)},r.addBufferListener=function(e,t,r){var i=this.tracks[e];if(i){var n=i.buffer;if(n){var a=r.bind(this,e);i.listeners.push({event:t,listener:a}),n.addEventListener(t,a)}}},r.removeBufferListeners=function(e){var t=this.tracks[e];if(t){var r=t.buffer;r&&(t.listeners.forEach((function(e){r.removeEventListener(e.event,e.listener)})),t.listeners.length=0)}},n(t,[{key:"mediaSourceOpenOrEnded",get:function(){var e,t=null==(e=this.mediaSource)?void 0:e.readyState;return"open"===t||"ended"===t}},{key:"sourceBufferTracks",get:function(){var e=this;return Object.keys(this.tracks).reduce((function(t,r){var i=e.tracks[r];return t[r]={id:i.id,container:i.container,codec:i.codec,levelCodec:i.levelCodec},t}),{})}},{key:"bufferedToEnd",get:function(){var e=this;return this.sourceBufferCount>0&&!this.sourceBuffers.some((function(t){var r,i,n=t[0];return n&&(!(null!=(r=e.tracks[n])&&r.ended)||(null==(i=e.tracks[n])?void 0:i.ending))}))}},{key:"tracksReady",get:function(){var e=this.pendingTrackCount;return e>0&&(e>=this.bufferCodecEventsTotal||this.isPending(this.tracks.audiovideo))}},{key:"mediaSrc",get:function(){var e,t,r=(null==(e=this.media)||null==(t=e.querySelector)?void 0:t.call(e,"source"))||this.media;return null==r?void 0:r.src}},{key:"pendingTrackCount",get:function(){var e=this;return Object.keys(this.tracks).reduce((function(t,r){return t+(e.isPending(e.tracks[r])?1:0)}),0)}},{key:"sourceBufferCount",get:function(){return this.sourceBuffers.reduce((function(e,t){return e+(t[0]?1:0)}),0)}},{key:"sourceBufferTypes",get:function(){return this.sourceBuffers.map((function(e){return e[0]})).filter((function(e){return!!e}))}}])}(B);function Ea(e){var t=e.querySelectorAll("source");[].slice.call(t).forEach((function(t){e.removeChild(t)}))}function Ta(e){return"audio"===e?1:0}var Sa,Aa=function(){function e(e){this.hls=void 0,this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.clientRect=void 0,this.streamController=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var t=e.prototype;return t.setStreamController=function(e){this.streamController=e},t.destroy=function(){this.hls&&this.unregisterListener(),this.timer&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},t.registerListeners=function(){var e=this.hls;e.on(_.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(_.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(_.MANIFEST_PARSED,this.onManifestParsed,this),e.on(_.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(_.BUFFER_CODECS,this.onBufferCodecs,this),e.on(_.MEDIA_DETACHING,this.onMediaDetaching,this)},t.unregisterListener=function(){var e=this.hls;e.off(_.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(_.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(_.MANIFEST_PARSED,this.onManifestParsed,this),e.off(_.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(_.BUFFER_CODECS,this.onBufferCodecs,this),e.off(_.MEDIA_DETACHING,this.onMediaDetaching,this)},t.onFpsDropLevelCapping=function(e,t){var r=this.hls.levels[t.droppedLevel];this.isLevelAllowed(r)&&this.restrictedLevels.push({bitrate:r.bitrate,height:r.height,width:r.width})},t.onMediaAttaching=function(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null,this.timer&&this.hls.levels.length&&this.detectPlayerSize()},t.onManifestParsed=function(e,t){var r=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,r.config.capLevelToPlayerSize&&t.video&&this.startCapping()},t.onLevelsUpdated=function(e,t){this.timer&&R(this.autoLevelCapping)&&this.detectPlayerSize()},t.onBufferCodecs=function(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()},t.onMediaDetaching=function(){this.stopCapping(),this.media=null},t.detectPlayerSize=function(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0)return void(this.clientRect=null);var e=this.hls.levels;if(e.length){var t=this.hls,r=this.getMaxLevel(e.length-1);r!==this.autoLevelCapping&&t.logger.log("Setting autoLevelCapping to "+r+": "+e[r].height+"p@"+e[r].bitrate+" for media "+this.mediaWidth+"x"+this.mediaHeight),t.autoLevelCapping=r,t.autoLevelEnabled&&t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}},t.getMaxLevel=function(t){var r=this,i=this.hls.levels;if(!i.length)return-1;var n=i.filter((function(e,i){return r.isLevelAllowed(e)&&i<=t}));return this.clientRect=null,e.getMaxLevelByMediaSize(n,this.mediaWidth,this.mediaHeight)},t.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},t.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},t.getDimensions=function(){if(this.clientRect)return this.clientRect;var e=this.media,t={width:0,height:0};if(e){var r=e.getBoundingClientRect();t.width=r.width,t.height=r.height,t.width||t.height||(t.width=r.right-r.left||e.width||0,t.height=r.bottom-r.top||e.height||0)}return this.clientRect=t,t},t.isLevelAllowed=function(e){return!this.restrictedLevels.some((function(t){return e.bitrate===t.bitrate&&e.width===t.width&&e.height===t.height}))},e.getMaxLevelByMediaSize=function(e,t,r){if(null==e||!e.length)return-1;for(var i,n,a=e.length-1,s=Math.max(t,r),o=0;o<e.length;o+=1){var l=e[o];if((l.width>=s||l.height>=s)&&(i=l,!(n=e[o+1])||i.width!==n.width||i.height!==n.height)){a=o;break}}return a},n(e,[{key:"mediaWidth",get:function(){return this.getDimensions().width*this.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*this.contentScaleFactor}},{key:"contentScaleFactor",get:function(){var e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch(e){}return Math.min(e,this.hls.config.maxDevicePixelRatio)}}])}(),La={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"},Ra={HLS:"h"},Ia={OBJECT:"CMCD-Object",REQUEST:"CMCD-Request",SESSION:"CMCD-Session",STATUS:"CMCD-Status"},ba=((Sa={})[Ia.OBJECT]=["br","d","ot","tb"],Sa[Ia.REQUEST]=["bl","dl","mtp","nor","nrr","su"],Sa[Ia.SESSION]=["cid","pr","sf","sid","st","v"],Sa[Ia.STATUS]=["bs","rtp"],Sa),ka=function e(t,r){Array.isArray(t)&&(t=t.map((function(t){return t instanceof e?t:new e(t)}))),this.value=t,this.params=r},Da="Dict";function _a(e,t,r,i){return new Error("failed to "+e+' "'+(n=t,(Array.isArray(n)?JSON.stringify(n):n instanceof Map?"Map{}":n instanceof Set?"Set{}":"object"==typeof n?JSON.stringify(n):String(n))+'" as ')+r,{cause:i});var n}function Pa(e,t,r){return _a("serialize",e,t,r)}var Ca=function(e){this.description=e},wa="Bare Item",Oa="Boolean",xa="Byte Sequence";function Ma(e){if(!1===ArrayBuffer.isView(e))throw Pa(e,xa);return":"+(t=e,btoa(String.fromCharCode.apply(String,t))+":");var t}var Fa="Integer";function Na(e){if(function(e){return e<-999999999999999||999999999999999<e}(e))throw Pa(e,Fa);return e.toString()}var Ua="Decimal";function Ba(e){var t=Ui(e,3);if(Math.floor(Math.abs(t)).toString().length>12)throw Pa(e,Ua);var r=t.toString();return r.includes(".")?r:r+".0"}var Ga="String",Ka=/[\x00-\x1f\x7f]+/,Ha="Token";function Va(e){var t,r=(t=e).description||t.toString().slice(7,-1);if(!1===/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(r))throw Pa(r,Ha);return r}function Ya(e){switch(typeof e){case"number":if(!R(e))throw Pa(e,wa);return Number.isInteger(e)?Na(e):Ba(e);case"string":return function(e){if(Ka.test(e))throw Pa(e,Ga);return'"'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'}(e);case"symbol":return Va(e);case"boolean":return function(e){if("boolean"!=typeof e)throw Pa(e,Oa);return e?"?1":"?0"}(e);case"object":if(e instanceof Date)return function(e){return"@"+Na(e.getTime()/1e3)}(e);if(e instanceof Uint8Array)return Ma(e);if(e instanceof Ca)return Va(e);default:throw Pa(e,wa)}}var Wa="Key";function ja(e){if(!1===/^[a-z*][a-z0-9\-_.*]*$/.test(e))throw Pa(e,Wa);return e}function qa(e){return null==e?"":Object.entries(e).map((function(e){var t=e[0],r=e[1];return!0===r?";"+ja(t):";"+ja(t)+"="+Ya(r)})).join("")}function Xa(e){return e instanceof ka?""+Ya(e.value)+qa(e.params):Ya(e)}function za(e,t){if(void 0===t&&(t={whitespace:!0}),"object"!=typeof e)throw Pa(e,Da);var r=e instanceof Map?e.entries():Object.entries(e),i=(null==t?void 0:t.whitespace)?" ":"";return Array.from(r).map((function(e){var t=e[0],r=e[1];r instanceof ka==0&&(r=new ka(r));var i,n=ja(t);return!0===r.value?n+=qa(r.params):(n+="=",Array.isArray(r.value)?n+="("+(i=r).value.map(Xa).join(" ")+")"+qa(i.params):n+=Xa(r)),n})).join(","+i)}var Qa=function(e){return Math.round(e)},$a=function(e){return 100*Qa(e/100)},Ja={br:Qa,d:Qa,bl:$a,dl:$a,mtp:$a,nor:function(e,t){return(null==t?void 0:t.baseUrl)&&(e=function(e,t){var r=new URL(e),i=new URL(t);if(r.origin!==i.origin)return e;for(var n=r.pathname.split("/").slice(1),a=i.pathname.split("/").slice(1,-1);n[0]===a[0];)n.shift(),a.shift();for(;a.length;)a.shift(),n.unshift("..");return n.join("/")}(e,t.baseUrl)),encodeURIComponent(e)},rtp:$a,tb:Qa};function Za(e,t){var r={};if(null==e||"object"!=typeof e)return r;var i=Object.keys(e).sort(),n=o({},Ja,null==t?void 0:t.formatters),a=null==t?void 0:t.filter;return i.forEach((function(i){if(!(null==a?void 0:a(i))){var s=e[i],o=n[i];o&&(s=o(s,t)),"v"===i&&1===s||"pr"==i&&1===s||function(e){return"number"==typeof e?R(e):null!=e&&""!==e&&!1!==e}(s)&&(function(e){return"ot"===e||"sf"===e||"st"===e}(i)&&"string"==typeof s&&(s=new Ca(s)),r[i]=s)}})),r}function es(e,t){return void 0===t&&(t={}),e?function(e,t){return za(e,t)}(Za(e,t),o({whitespace:!1},t)):""}function ts(e,t,r){return o(e,function(e,t){void 0===t&&(t={});var r={};if(!e)return r;var i=Object.entries(e),n=Object.entries(ba).concat(Object.entries((null==t?void 0:t.customHeaderMap)||{})),a=i.reduce((function(e,t){var r,i,a=t[0],s=t[1],o=(null===(r=n.find((function(e){return e[1].includes(a)})))||void 0===r?void 0:r[0])||Ia.REQUEST;return null!==(i=e[o])&&void 0!==i||(e[o]={}),e[o][a]=s,e}),{});return Object.entries(a).reduce((function(e,r){var i=r[0],n=r[1];return e[i]=es(n,t),e}),r)}(t,r))}var rs="CMCD",is=/CMCD=[^&#]+/;function ns(e,t,r){var i=function(e,t){if(void 0===t&&(t={}),!e)return"";var r=es(e,t);return rs+"="+encodeURIComponent(r)}(t,r);if(!i)return e;if(is.test(e))return e.replace(is,i);var n=e.includes("?")?"&":"?";return""+e+n+i}var as=function(){function e(e){var t=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.includeKeys=void 0,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){t.initialized&&(t.starved=!0),t.buffering=!0},this.onPlaying=function(){t.initialized||(t.initialized=!0),t.buffering=!1},this.applyPlaylistData=function(e){try{t.apply(e,{ot:La.MANIFEST,su:!t.initialized})}catch(e){t.hls.logger.warn("Could not generate manifest CMCD data.",e)}},this.applyFragmentData=function(e){try{var r=e.frag,i=e.part,n=t.hls.levels[r.level],a=t.getObjectType(r),s={d:1e3*(i||r).duration,ot:a};a!==La.VIDEO&&a!==La.AUDIO&&a!=La.MUXED||(s.br=n.bitrate/1e3,s.tb=t.getTopBandwidth(a)/1e3,s.bl=t.getBufferLength(a));var o=i?t.getNextPart(i):t.getNextFrag(r);null!=o&&o.url&&o.url!==r.url&&(s.nor=o.url),t.apply(e,s)}catch(e){t.hls.logger.warn("Could not generate segment CMCD data.",e)}},this.hls=e;var r=this.config=e.config,i=r.cmcd;null!=i&&(r.pLoader=this.createPlaylistLoader(),r.fLoader=this.createFragmentLoader(),this.sid=i.sessionId||e.sessionId,this.cid=i.contentId,this.useHeaders=!0===i.useHeaders,this.includeKeys=i.includeKeys,this.registerListeners())}var t=e.prototype;return t.registerListeners=function(){var e=this.hls;e.on(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(_.MEDIA_DETACHED,this.onMediaDetached,this),e.on(_.BUFFER_CREATED,this.onBufferCreated,this)},t.unregisterListeners=function(){var e=this.hls;e.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(_.MEDIA_DETACHED,this.onMediaDetached,this),e.off(_.BUFFER_CREATED,this.onBufferCreated,this)},t.destroy=function(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=this.media=null},t.onMediaAttached=function(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},t.onMediaDetached=function(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)},t.onBufferCreated=function(e,t){var r,i;this.audioBuffer=null==(r=t.tracks.audio)?void 0:r.buffer,this.videoBuffer=null==(i=t.tracks.video)?void 0:i.buffer},t.createData=function(){var e;return{v:1,sf:Ra.HLS,sid:this.sid,cid:this.cid,pr:null==(e=this.media)?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},t.apply=function(e,t){void 0===t&&(t={}),o(t,this.createData());var r=t.ot===La.INIT||t.ot===La.VIDEO||t.ot===La.MUXED;this.starved&&r&&(t.bs=!0,t.su=!0,this.starved=!1),null==t.su&&(t.su=this.buffering);var i=this.includeKeys;i&&(t=Object.keys(t).reduce((function(e,r){return i.includes(r)&&(e[r]=t[r]),e}),{}));var n={baseUrl:e.url};this.useHeaders?(e.headers||(e.headers={}),ts(e.headers,t,n)):e.url=ns(e.url,t,n)},t.getNextFrag=function(e){var t,r=null==(t=this.hls.levels[e.level])?void 0:t.details;if(r){var i=e.sn-r.startSN;return r.fragments[i+1]}},t.getNextPart=function(e){var t,r,i=e.index,n=e.fragment,a=null==(t=this.hls.levels[n.level])||null==(r=t.details)?void 0:r.partList;if(a)for(var s=n.sn,o=a.length-1;o>=0;o--){var l=a[o];if(l.index===i&&l.fragment.sn===s)return a[o+1]}},t.getObjectType=function(e){var t=e.type;return"subtitle"===t?La.TIMED_TEXT:"initSegment"===e.sn?La.INIT:"audio"===t?La.AUDIO:"main"===t?this.hls.audioTracks.length?La.VIDEO:La.MUXED:void 0},t.getTopBandwidth=function(e){var t,r=0,i=this.hls;if(e===La.AUDIO)t=i.audioTracks;else{var n=i.maxAutoLevel,s=n>-1?n+1:i.levels.length;t=i.levels.slice(0,s)}for(var o,l=a(t);!(o=l()).done;){var u=o.value;u.bitrate>r&&(r=u.bitrate)}return r>0?r:NaN},t.getBufferLength=function(e){var t=this.media,r=e===La.AUDIO?this.audioBuffer:this.videoBuffer;return r&&t?1e3*ar.bufferInfo(r,t.currentTime,this.config.maxBufferHole).len:NaN},t.createPlaylistLoader=function(){var e=this.config.pLoader,t=this.applyPlaylistData,r=e||this.config.loader;return function(){function e(e){this.loader=void 0,this.loader=new r(e)}var i=e.prototype;return i.destroy=function(){this.loader.destroy()},i.abort=function(){this.loader.abort()},i.load=function(e,r,i){t(e),this.loader.load(e,r,i)},n(e,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}])}()},t.createFragmentLoader=function(){var e=this.config.fLoader,t=this.applyFragmentData,r=e||this.config.loader;return function(){function e(e){this.loader=void 0,this.loader=new r(e)}var i=e.prototype;return i.destroy=function(){this.loader.destroy()},i.abort=function(){this.loader.abort()},i.load=function(e,r,i){t(e),this.loader.load(e,r,i)},n(e,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}])}()},e}(),ss=function(e){function t(t){var r;return(r=e.call(this,"content-steering",t.logger)||this).hls=void 0,r.loader=null,r.uri=null,r.pathwayId=".",r._pathwayPriority=null,r.timeToLoad=300,r.reloadTimer=-1,r.updated=0,r.started=!1,r.enabled=!0,r.levels=null,r.audioTracks=null,r.subtitleTracks=null,r.penalizedPathways={},r.hls=t,r.registerListeners(),r}u(t,e);var r=t.prototype;return r.registerListeners=function(){var e=this.hls;e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(_.MANIFEST_PARSED,this.onManifestParsed,this),e.on(_.ERROR,this.onError,this)},r.unregisterListeners=function(){var e=this.hls;e&&(e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(_.MANIFEST_PARSED,this.onManifestParsed,this),e.off(_.ERROR,this.onError,this))},r.pathways=function(){return(this.levels||[]).reduce((function(e,t){return-1===e.indexOf(t.pathwayId)&&e.push(t.pathwayId),e}),[])},r.startLoad=function(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){var e=1e3*this.timeToLoad-(performance.now()-this.updated);if(e>0)return void this.scheduleRefresh(this.uri,e)}this.loadSteeringManifest(this.uri)}},r.stopLoad=function(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()},r.clearTimeout=function(){-1!==this.reloadTimer&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)},r.destroy=function(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null},r.removeLevel=function(e){var t=this.levels;t&&(this.levels=t.filter((function(t){return t!==e})))},r.onManifestLoading=function(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null},r.onManifestLoaded=function(e,t){var r=t.contentSteering;null!==r&&(this.pathwayId=r.pathwayId,this.uri=r.uri,this.started&&this.startLoad())},r.onManifestParsed=function(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks},r.onError=function(e,t){var r=t.errorAction;if((null==r?void 0:r.action)===_t&&r.flags===Ot){var i=this.levels,n=this._pathwayPriority,a=this.pathwayId;if(t.context){var s=t.context,o=s.groupId,l=s.pathwayId,u=s.type;o&&i?a=this.getPathwayForGroupId(o,u,a):l&&(a=l)}a in this.penalizedPathways||(this.penalizedPathways[a]=performance.now()),!n&&i&&(n=this.pathways()),n&&n.length>1&&(this.updatePathwayPriority(n),r.resolved=this.pathwayId!==a),r.resolved||this.warn("Could not resolve "+t.details+' ("'+t.error.message+'") with content-steering for Pathway: '+a+" levels: "+(i?i.length:i)+" priorities: "+lt(n)+" penalized: "+lt(this.penalizedPathways))}},r.filterParsedLevels=function(e){this.levels=e;var t=this.getLevelsForPathway(this.pathwayId);if(0===t.length){var r=e[0].pathwayId;this.log("No levels found in Pathway "+this.pathwayId+'. Setting initial Pathway to "'+r+'"'),t=this.getLevelsForPathway(r),this.pathwayId=r}return t.length!==e.length&&this.log("Found "+t.length+"/"+e.length+' levels in Pathway "'+this.pathwayId+'"'),t},r.getLevelsForPathway=function(e){return null===this.levels?[]:this.levels.filter((function(t){return e===t.pathwayId}))},r.updatePathwayPriority=function(e){var t;this._pathwayPriority=e;var r=this.penalizedPathways,i=performance.now();Object.keys(r).forEach((function(e){i-r[e]>3e5&&delete r[e]}));for(var n=0;n<e.length;n++){var a=e[n];if(!(a in r)){if(a===this.pathwayId)return;var s=this.hls.nextLoadLevel,o=this.hls.levels[s];if((t=this.getLevelsForPathway(a)).length>0){this.log('Setting Pathway to "'+a+'"'),this.pathwayId=a,gi(t),this.hls.trigger(_.LEVELS_UPDATED,{levels:t});var l=this.hls.levels[s];o&&l&&this.levels&&(l.attrs["STABLE-VARIANT-ID"]!==o.attrs["STABLE-VARIANT-ID"]&&l.bitrate!==o.bitrate&&this.log("Unstable Pathways change from bitrate "+o.bitrate+" to "+l.bitrate),this.hls.nextLoadLevel=s);break}}}},r.getPathwayForGroupId=function(e,t,r){for(var i=this.getLevelsForPathway(r).concat(this.levels||[]),n=0;n<i.length;n++)if(t===w&&i[n].hasAudioGroup(e)||t===O&&i[n].hasSubtitleGroup(e))return i[n].pathwayId;return r},r.clonePathways=function(e){var t=this,r=this.levels;if(r){var i={},n={};e.forEach((function(e){var a=e.ID,s=e["BASE-ID"],o=e["URI-REPLACEMENT"];if(!r.some((function(e){return e.pathwayId===a}))){var l=t.getLevelsForPathway(s).map((function(e){var t=new cr(e.attrs);t["PATHWAY-ID"]=a;var r=t.AUDIO&&t.AUDIO+"_clone_"+a,s=t.SUBTITLES&&t.SUBTITLES+"_clone_"+a;r&&(i[t.AUDIO]=r,t.AUDIO=r),s&&(n[t.SUBTITLES]=s,t.SUBTITLES=s);var l=ls(e.uri,t["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",o),u=new at({attrs:t,audioCodec:e.audioCodec,bitrate:e.bitrate,height:e.height,name:e.name,url:l,videoCodec:e.videoCodec,width:e.width});if(e.audioGroups)for(var d=1;d<e.audioGroups.length;d++)u.addGroupId("audio",e.audioGroups[d]+"_clone_"+a);if(e.subtitleGroups)for(var h=1;h<e.subtitleGroups.length;h++)u.addGroupId("text",e.subtitleGroups[h]+"_clone_"+a);return u}));r.push.apply(r,l),os(t.audioTracks,i,o,a),os(t.subtitleTracks,n,o,a)}}))}},r.loadSteeringManifest=function(e){var t,r=this,i=this.hls.config,n=i.loader;this.loader&&this.loader.destroy(),this.loader=new n(i);try{t=new self.URL(e)}catch(t){return this.enabled=!1,void this.log("Failed to parse Steering Manifest URI: "+e)}if("data:"!==t.protocol){var a=0|(this.hls.bandwidthEstimate||i.abrEwmaDefaultEstimate);t.searchParams.set("_HLS_pathway",this.pathwayId),t.searchParams.set("_HLS_throughput",""+a)}var s={responseType:"json",url:t.href},o=i.steeringManifestLoadPolicy.default,l=o.errorRetry||o.timeoutRetry||{},u={loadPolicy:o,timeout:o.maxLoadTimeMs,maxRetry:l.maxNumRetry||0,retryDelay:l.retryDelayMs||0,maxRetryDelay:l.maxRetryDelayMs||0},d={onSuccess:function(e,i,n,a){r.log('Loaded steering manifest: "'+t+'"');var s=e.data;if(1===(null==s?void 0:s.VERSION)){r.updated=performance.now(),r.timeToLoad=s.TTL;var o=s["RELOAD-URI"],l=s["PATHWAY-CLONES"],u=s["PATHWAY-PRIORITY"];if(o)try{r.uri=new self.URL(o,t).href}catch(e){return r.enabled=!1,void r.log("Failed to parse Steering Manifest RELOAD-URI: "+o)}r.scheduleRefresh(r.uri||n.url),l&&r.clonePathways(l);var d={steeringManifest:s,url:t.toString()};r.hls.trigger(_.STEERING_MANIFEST_LOADED,d),u&&r.updatePathwayPriority(u)}else r.log("Steering VERSION "+s.VERSION+" not supported!")},onError:function(e,t,i,n){if(r.log("Error loading steering manifest: "+e.code+" "+e.text+" ("+t.url+")"),r.stopLoad(),410===e.code)return r.enabled=!1,void r.log("Steering manifest "+t.url+" no longer available");var a=1e3*r.timeToLoad;if(429!==e.code)r.scheduleRefresh(r.uri||t.url,a);else{var s=r.loader;if("function"==typeof(null==s?void 0:s.getResponseHeader)){var o=s.getResponseHeader("Retry-After");o&&(a=1e3*parseFloat(o))}r.log("Steering manifest "+t.url+" rate limited")}},onTimeout:function(e,t,i){r.log("Timeout loading steering manifest ("+t.url+")"),r.scheduleRefresh(r.uri||t.url)}};this.log("Requesting steering manifest: "+t),this.loader.load(s,u,d)},r.scheduleRefresh=function(e,t){var r=this;void 0===t&&(t=1e3*this.timeToLoad),this.clearTimeout(),this.reloadTimer=self.setTimeout((function(){var t,i=null==(t=r.hls)?void 0:t.media;!i||i.ended?r.scheduleRefresh(e,1e3*r.timeToLoad):r.loadSteeringManifest(e)}),t)},n(t,[{key:"pathwayPriority",get:function(){return this._pathwayPriority},set:function(e){this.updatePathwayPriority(e)}}])}(B);function os(e,t,r,i){e&&Object.keys(t).forEach((function(n){var a=e.filter((function(e){return e.groupId===n})).map((function(e){var a=o({},e);return a.details=void 0,a.attrs=new cr(a.attrs),a.url=a.attrs.URI=ls(e.url,e.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",r),a.groupId=a.attrs["GROUP-ID"]=t[n],a.attrs["PATHWAY-ID"]=i,a}));e.push.apply(e,a)}))}function ls(e,t,r,i){var n,a=i.HOST,s=i.PARAMS,o=i[r];t&&(n=null==o?void 0:o[t])&&(e=n);var l=new self.URL(e);return a&&!n&&(l.host=a),s&&Object.keys(s).sort().forEach((function(e){e&&l.searchParams.set(e,s[e])})),l.href}var us=function(e){function t(r){var i;return(i=e.call(this,"eme",r.logger)||this).hls=void 0,i.config=void 0,i.media=null,i.keyFormatPromise=null,i.keySystemAccessPromises={},i._requestLicenseFailureCount=0,i.mediaKeySessions=[],i.keyIdToKeySessionPromise={},i.setMediaKeysQueue=t.CDMCleanupPromise?[t.CDMCleanupPromise]:[],i.onMediaEncrypted=function(e){var t=e.initDataType,r=e.initData,n='"'+e.type+'" event: init data type: "'+t+'"';if(i.debug(n),null!==r){if(!i.keyFormatPromise){var a=Object.keys(i.keySystemAccessPromises);a.length||(a=Mr(i.config));var s=a.map(xr).filter((function(e){return!!e}));i.keyFormatPromise=i.getKeyFormatPromise(s)}i.keyFormatPromise.then((function(a){var s,o,l=Dr(a);if("sinf"===t){if(l!==Lr.FAIRPLAY)return void i.warn('Ignoring unexpected "'+e.type+'" event with init data type: "'+t+'" for selected key-system '+l);var u=ue(new Uint8Array(r));try{var d=Le(Er(JSON.parse(u).sinf));if(!d)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");s=new Uint8Array(d.subarray(8,24)),o=Lr.FAIRPLAY}catch(e){return void i.warn(n+" Failed to parse sinf: "+e)}}else{if(l!==Lr.WIDEVINE&&l!==Lr.PLAYREADY)return void i.warn('Ignoring unexpected "'+e.type+'" event with init data type: "'+t+'" for selected key-system '+l);var h=function(e){var t=[];if(e instanceof ArrayBuffer)for(var r=e.byteLength,i=0;i+32<r;){var n=we(new DataView(e,i));t.push(n),i+=n.size}return t}(r),f=h.filter((function(e){return!!e.systemId&&Or(e.systemId)===l}));f.length>1&&i.warn(n+" Using first of "+f.length+" pssh found for selected key-system "+l);var c=f[0];if(!c)return void(0===h.length||h.some((function(e){return!e.systemId}))?i.warn(n+" contains incomplete or invalid pssh data"):i.log("ignoring "+n+" for "+h.map((function(e){return Or(e.systemId)})).join(",")+" pssh data in favor of playlist keys"));if(o=Or(c.systemId),0===c.version&&c.data)if(o===Lr.WIDEVINE){var g=c.data.length-22;s=new Uint8Array(c.data.subarray(g,g+16))}else o===Lr.PLAYREADY&&(s=Ur(c.data))}if(o&&s){for(var v,m=Q.hexDump(s),p=i,y=p.keyIdToKeySessionPromise,E=p.mediaKeySessions,T=y[m],S=function(){var e=E[A],n=e.decryptdata;if(!n.keyId)return 0;var a=Q.hexDump(n.keyId);return m===a||-1!==n.uri.replace(/-/g,"").indexOf(m)?(T=y[a],n.pssh||(delete y[a],n.pssh=new Uint8Array(r),n.keyId=s,(T=y[m]=T.then((function(){return i.generateRequestWithPreferredKeySession(e,t,r,"encrypted-event-key-match")}))).catch((function(e){return i.handleError(e)}))),1):void 0},A=0;A<E.length&&(0===(v=S())||1!==v);A++);if(!T){if(o!==l)return void i.log('Ignoring "'+e.type+'" event with '+o+" init data for selected key-system "+l);T=y[m]=i.getKeySystemSelectionPromise([o]).then((function(e){var n,a=e.keySystem,o=e.mediaKeys;i.throwIfDestroyed();var l=new Gr("ISO-23001-7",m,null!=(n=xr(a))?n:"");return l.pssh=new Uint8Array(r),l.keyId=s,i.attemptSetMediaKeys(a,o).then((function(){i.throwIfDestroyed();var e=i.createMediaKeySessionContext({decryptdata:l,keySystem:a,mediaKeys:o});return i.generateRequestWithPreferredKeySession(e,t,r,"encrypted-event-no-match")}))})),T.catch((function(e){return i.handleError(e)}))}}}))}},i.onWaitingForKey=function(e){i.log('"'+e.type+'" event')},i.hls=r,i.config=r.config,i.registerListeners(),i}u(t,e);var r=t.prototype;return r.destroy=function(){var e=this.media;this.unregisterListeners(),this.onMediaDetached(),this._clear(e);var t=this.config;t.requestMediaKeySystemAccessFunc=null,t.licenseXhrSetup=t.licenseResponseCallback=void 0,t.drmSystems=t.drmSystemOptions={},this.hls=this.config=this.keyIdToKeySessionPromise=null,this.onMediaEncrypted=this.onWaitingForKey=null},r.registerListeners=function(){this.hls.on(_.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(_.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(_.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(_.MANIFEST_LOADED,this.onManifestLoaded,this)},r.unregisterListeners=function(){this.hls.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(_.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(_.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(_.MANIFEST_LOADED,this.onManifestLoaded,this)},r.getLicenseServerUrl=function(e){var t=this.config,r=t.drmSystems,i=t.widevineLicenseUrl,n=r[e];return n?n.licenseUrl:e===Lr.WIDEVINE&&i?i:void 0},r.getLicenseServerUrlOrThrow=function(e){var t=this.getLicenseServerUrl(e);if(void 0===t)throw new Error('no license server URL configured for key-system "'+e+'"');return t},r.getServerCertificateUrl=function(e){var t=this.config.drmSystems[e];if(t)return t.serverCertificateUrl;this.log('No Server Certificate in config.drmSystems["'+e+'"]')},r.attemptKeySystemAccess=function(e){var t=this,r=this.hls.levels,i=function(e,t,r){return!!e&&r.indexOf(e)===t},n=r.map((function(e){return e.audioCodec})).filter(i),a=r.map((function(e){return e.videoCodec})).filter(i);return n.length+a.length===0&&a.push("avc1.42e01e"),new Promise((function(r,i){var s=function(e){var o=e.shift();t.getMediaKeysPromise(o,n,a).then((function(e){return r({keySystem:o,mediaKeys:e})})).catch((function(t){e.length?s(e):i(t instanceof ds?t:new ds({type:k.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_NO_ACCESS,error:t,fatal:!0},t.message))}))};s(e)}))},r.requestMediaKeySystemAccess=function(e,t){var r=this.config.requestMediaKeySystemAccessFunc;if("function"!=typeof r){var i="Configured requestMediaKeySystemAccess is not a function "+r;return null===Nr&&"http:"===self.location.protocol&&(i="navigator.requestMediaKeySystemAccess is not available over insecure protocol "+location.protocol),Promise.reject(new Error(i))}return r(e,t)},r.getMediaKeysPromise=function(e,t,r){var i=this,n=function(e,t,r,i){var n;switch(e){case Lr.FAIRPLAY:n=["cenc","sinf"];break;case Lr.WIDEVINE:case Lr.PLAYREADY:n=["cenc"];break;case Lr.CLEARKEY:n=["cenc","keyids"];break;default:throw new Error("Unknown key-system: "+e)}return function(e,t,r,i){return[{initDataTypes:e,persistentState:i.persistentState||"optional",distinctiveIdentifier:i.distinctiveIdentifier||"optional",sessionTypes:i.sessionTypes||[i.sessionType||"temporary"],audioCapabilities:t.map((function(e){return{contentType:"audio/mp4; codecs="+e,robustness:i.audioRobustness||"",encryptionScheme:i.audioEncryptionScheme||null}})),videoCapabilities:r.map((function(e){return{contentType:"video/mp4; codecs="+e,robustness:i.videoRobustness||"",encryptionScheme:i.videoEncryptionScheme||null}}))}]}(n,t,r,i)}(e,t,r,this.config.drmSystemOptions),a=this.keySystemAccessPromises[e],s=null==a?void 0:a.keySystemAccess;if(!s){this.log('Requesting encrypted media "'+e+'" key-system access with config: '+lt(n)),s=this.requestMediaKeySystemAccess(e,n);var o=this.keySystemAccessPromises[e]={keySystemAccess:s};return s.catch((function(t){i.log('Failed to obtain access to key-system "'+e+'": '+t)})),s.then((function(t){i.log('Access for key-system "'+t.keySystem+'" obtained');var r=i.fetchServerCertificate(e);return i.log('Create media-keys for "'+e+'"'),o.mediaKeys=t.createMediaKeys().then((function(t){return i.log('Media-keys created for "'+e+'"'),r.then((function(r){return r?i.setMediaKeysServerCertificate(t,e,r):t}))})),o.mediaKeys.catch((function(t){i.error('Failed to create media-keys for "'+e+'"}: '+t)})),o.mediaKeys}))}return s.then((function(){return a.mediaKeys}))},r.createMediaKeySessionContext=function(e){var t=e.decryptdata,r=e.keySystem,i=e.mediaKeys;this.log('Creating key-system session "'+r+'" keyId: '+Q.hexDump(t.keyId||[]));var n=i.createSession(),a={decryptdata:t,keySystem:r,mediaKeys:i,mediaKeysSession:n,keyStatus:"status-pending"};return this.mediaKeySessions.push(a),a},r.renewKeySession=function(e){var t=e.decryptdata;if(t.pssh){var r=this.createMediaKeySessionContext(e),i=this.getKeyIdString(t);this.keyIdToKeySessionPromise[i]=this.generateRequestWithPreferredKeySession(r,"cenc",t.pssh.buffer,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)},r.getKeyIdString=function(e){if(!e)throw new Error("Could not read keyId of undefined decryptdata");if(null===e.keyId)throw new Error("keyId is null");return Q.hexDump(e.keyId)},r.updateKeySession=function(e,t){var r,i=e.mediaKeysSession;return this.log('Updating key-session "'+i.sessionId+'" for keyID '+Q.hexDump((null==(r=e.decryptdata)?void 0:r.keyId)||[])+"\n } (data length: "+(t?t.byteLength:t)+")"),i.update(t)},r.selectKeySystemFormat=function(e){var t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log("Selecting key-system from fragment (sn: "+e.sn+" "+e.type+": "+e.level+") key formats "+t.join(", ")),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise},r.getKeyFormatPromise=function(e){var t=this;return new Promise((function(r,i){var n=Mr(t.config),a=e.map(Dr).filter((function(e){return!!e&&-1!==n.indexOf(e)}));return t.getKeySystemSelectionPromise(a).then((function(e){var t=e.keySystem,n=xr(t);n?r(n):i(new Error('Unable to find format for key-system "'+t+'"'))})).catch(i)}))},r.loadKey=function(e){var t=this,r=e.keyInfo.decryptdata,i=this.getKeyIdString(r),n="(keyId: "+i+' format: "'+r.keyFormat+'" method: '+r.method+" uri: "+r.uri+")";this.log("Starting session for key "+n);var a=this.keyIdToKeySessionPromise[i];return a||(a=this.getKeySystemForKeyPromise(r).then((function(i){var a=i.keySystem,s=i.mediaKeys;return t.throwIfDestroyed(),t.log("Handle encrypted media sn: "+e.frag.sn+" "+e.frag.type+": "+e.frag.level+" using key "+n),t.attemptSetMediaKeys(a,s).then((function(){return t.throwIfDestroyed(),t.createMediaKeySessionContext({keySystem:a,mediaKeys:s,decryptdata:r})}))})),(this.keyIdToKeySessionPromise[i]=a.then((function(e){var i=r.pssh?r.pssh.buffer:null;return t.generateRequestWithPreferredKeySession(e,"cenc",i,"playlist-key")}))).catch((function(e){return t.handleError(e)}))),a},r.throwIfDestroyed=function(e){if(!this.hls)throw new Error("invalid state")},r.handleError=function(e){this.hls&&(this.error(e.message),e instanceof ds?this.hls.trigger(_.ERROR,e.data):this.hls.trigger(_.ERROR,{type:k.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))},r.getKeySystemForKeyPromise=function(e){var t=this.getKeyIdString(e),r=this.keyIdToKeySessionPromise[t];if(!r){var i=Dr(e.keyFormat),n=i?[i]:Mr(this.config);return this.attemptKeySystemAccess(n)}return r},r.getKeySystemSelectionPromise=function(e){if(e.length||(e=Mr(this.config)),0===e.length)throw new ds({type:k.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},"Missing key-system license configuration options "+lt({drmSystems:this.config.drmSystems}));return this.attemptKeySystemAccess(e)},r.attemptSetMediaKeys=function(e,t){var r=this,i=this.setMediaKeysQueue.slice();this.log('Setting media-keys for "'+e+'"');var n=Promise.all(i).then((function(){if(!r.media)throw new Error("Attempted to set mediaKeys without media element attached");return r.media.setMediaKeys(t)}));return this.setMediaKeysQueue.push(n),n.then((function(){r.log('Media-keys set for "'+e+'"'),i.push(n),r.setMediaKeysQueue=r.setMediaKeysQueue.filter((function(e){return-1===i.indexOf(e)}))}))},r.generateRequestWithPreferredKeySession=function(e,t,r,i){var n,a,s=this,o=null==(n=this.config.drmSystems)||null==(a=n[e.keySystem])?void 0:a.generateRequest;if(o)try{var l=o.call(this.hls,t,r,e);if(!l)throw new Error("Invalid response from configured generateRequest filter");t=l.initDataType,r=l.initData?l.initData:null,e.decryptdata.pssh=r?new Uint8Array(r):null}catch(e){var u;if(this.warn(e.message),null!=(u=this.hls)&&u.config.debug)throw e}if(null===r)return this.log('Skipping key-session request for "'+i+'" (no initData)'),Promise.resolve(e);var d=this.getKeyIdString(e.decryptdata);this.log('Generating key-session request for "'+i+'": '+d+" (init data type: "+t+" length: "+(r?r.byteLength:null)+")");var h=new S,f=e._onmessage=function(t){var r=e.mediaKeysSession;if(r){var i=t.messageType,n=t.message;s.log('"'+i+'" message event for session "'+r.sessionId+'" message size: '+n.byteLength),"license-request"===i||"license-renewal"===i?s.renewLicense(e,n).catch((function(e){h.eventNames().length?h.emit("error",e):s.handleError(e)})):"license-release"===i?e.keySystem===Lr.FAIRPLAY&&(s.updateKeySession(e,Tr("acknowledged")),s.removeSession(e)):s.warn('unhandled media key message type "'+i+'"')}else h.emit("error",new Error("invalid state"))},c=e._onkeystatuseschange=function(t){if(e.mediaKeysSession){s.onKeyStatusChange(e);var r=e.keyStatus;h.emit("keyStatus",r),"expired"===r&&(s.warn(e.keySystem+" expired for key "+d),s.renewKeySession(e))}else h.emit("error",new Error("invalid state"))};e.mediaKeysSession.addEventListener("message",f),e.mediaKeysSession.addEventListener("keystatuseschange",c);var g=new Promise((function(e,t){h.on("error",t),h.on("keyStatus",(function(r){r.startsWith("usable")?e():"output-restricted"===r?t(new ds({type:k.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):"internal-error"===r?t(new ds({type:k.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},'key status changed to "'+r+'"')):"expired"===r?t(new Error("key expired while generating request")):s.warn('unhandled key status change "'+r+'"')}))}));return e.mediaKeysSession.generateRequest(t,r).then((function(){var t;s.log('Request generated for key-session "'+(null==(t=e.mediaKeysSession)?void 0:t.sessionId)+'" keyId: '+d)})).catch((function(e){throw new ds({type:k.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_NO_SESSION,error:e,fatal:!1},"Error generating key-session request: "+e)})).then((function(){return g})).catch((function(t){throw h.removeAllListeners(),s.removeSession(e),t})).then((function(){return h.removeAllListeners(),e}))},r.onKeyStatusChange=function(e){var t=this;e.mediaKeysSession.keyStatuses.forEach((function(r,i){if("string"==typeof i&&"object"==typeof r){var n=i;i=r,r=n}t.log('key status change "'+r+'" for keyStatuses keyId: '+Q.hexDump("buffer"in i?new Uint8Array(i.buffer,i.byteOffset,i.byteLength):new Uint8Array(i))+" session keyId: "+Q.hexDump(new Uint8Array(e.decryptdata.keyId||[]))+" uri: "+e.decryptdata.uri),e.keyStatus=r}))},r.fetchServerCertificate=function(e){var t=this.config,r=new(0,t.loader)(t),i=this.getServerCertificateUrl(e);return i?(this.log('Fetching server certificate for "'+e+'"'),new Promise((function(n,a){var s={responseType:"arraybuffer",url:i},o=t.certLoadPolicy.default,l={loadPolicy:o,timeout:o.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},u={onSuccess:function(e,t,r,i){n(e.data)},onError:function(t,r,n,o){a(new ds({type:k.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:n,response:f({url:s.url,data:void 0},t)},'"'+e+'" certificate request failed ('+i+"). Status: "+t.code+" ("+t.text+")"))},onTimeout:function(t,r,n){a(new ds({type:k.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:n,response:{url:s.url,data:void 0}},'"'+e+'" certificate request timed out ('+i+")"))},onAbort:function(e,t,r){a(new Error("aborted"))}};r.load(s,l,u)}))):Promise.resolve()},r.setMediaKeysServerCertificate=function(e,t,r){var i=this;return new Promise((function(n,a){e.setServerCertificate(r).then((function(a){i.log("setServerCertificate "+(a?"success":"not supported by CDM")+" ("+(null==r?void 0:r.byteLength)+') on "'+t+'"'),n(e)})).catch((function(e){a(new ds({type:k.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:e,fatal:!0},e.message))}))}))},r.renewLicense=function(e,t){var r=this;return this.requestLicense(e,new Uint8Array(t)).then((function(t){return r.updateKeySession(e,new Uint8Array(t)).catch((function(e){throw new ds({type:k.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:e,fatal:!0},e.message)}))}))},r.unpackPlayReadyKeyMessage=function(e,t){var r=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!r.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;var i=(new DOMParser).parseFromString(r,"application/xml"),n=i.querySelectorAll("HttpHeader");if(n.length>0)for(var a,s=0,o=n.length;s<o;s++){var l,u,d=null==(l=(a=n[s]).querySelector("name"))?void 0:l.textContent,h=null==(u=a.querySelector("value"))?void 0:u.textContent;d&&h&&e.setRequestHeader(d,h)}var f=i.querySelector("Challenge"),c=null==f?void 0:f.textContent;if(!c)throw new Error("Cannot find <Challenge> in key message");return Tr(atob(c))},r.setupLicenseXHR=function(e,t,r,i){var n=this,a=this.config.licenseXhrSetup;return a?Promise.resolve().then((function(){if(!r.decryptdata)throw new Error("Key removed");return a.call(n.hls,e,t,r,i)})).catch((function(s){if(!r.decryptdata)throw s;return e.open("POST",t,!0),a.call(n.hls,e,t,r,i)})).then((function(r){return e.readyState||e.open("POST",t,!0),{xhr:e,licenseChallenge:r||i}})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:i}))},r.requestLicense=function(e,t){var r=this,i=this.config.keyLoadPolicy.default;return new Promise((function(n,a){var s=r.getLicenseServerUrlOrThrow(e.keySystem);r.log("Sending license request to URL: "+s);var o=new XMLHttpRequest;o.responseType="arraybuffer",o.onreadystatechange=function(){if(!r.hls||!e.mediaKeysSession)return a(new Error("invalid state"));if(4===o.readyState)if(200===o.status){r._requestLicenseFailureCount=0;var l=o.response;r.log("License received "+(l instanceof ArrayBuffer?l.byteLength:l));var u=r.config.licenseResponseCallback;if(u)try{l=u.call(r.hls,o,s,e)}catch(e){r.error(e)}n(l)}else{var d=i.errorRetry,h=d?d.maxNumRetry:0;if(r._requestLicenseFailureCount++,r._requestLicenseFailureCount>h||o.status>=400&&o.status<500)a(new ds({type:k.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:o,response:{url:s,data:void 0,code:o.status,text:o.statusText}},"License Request XHR failed ("+s+"). Status: "+o.status+" ("+o.statusText+")"));else{var f=h-r._requestLicenseFailureCount+1;r.warn("Retrying license request, "+f+" attempts left"),r.requestLicense(e,t).then(n,a)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=o,r.setupLicenseXHR(o,s,e,t).then((function(t){var i=t.xhr,n=t.licenseChallenge;e.keySystem==Lr.PLAYREADY&&(n=r.unpackPlayReadyKeyMessage(i,n)),i.send(n)}))}))},r.onMediaAttached=function(e,t){if(this.config.emeEnabled){var r=t.media;this.media=r,r.removeEventListener("encrypted",this.onMediaEncrypted),r.removeEventListener("waitingforkey",this.onWaitingForKey),r.addEventListener("encrypted",this.onMediaEncrypted),r.addEventListener("waitingforkey",this.onWaitingForKey)}},r.onMediaDetached=function(){var e=this.media;e&&(e.removeEventListener("encrypted",this.onMediaEncrypted),e.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null)},r._clear=function(e){var r,i=this,n=this.mediaKeySessions;this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},Gr.clearKeyUriToKeyIdMap();var a=n.length;t.CDMCleanupPromise=Promise.all(n.map((function(e){return i.removeSession(e)})).concat(null==e||null==(r=e.setMediaKeys(null))?void 0:r.catch((function(e){var t;i.log("Could not clear media keys: "+e),null==(t=i.hls)||t.trigger(_.ERROR,{type:k.OTHER_ERROR,details:D.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR,fatal:!1,error:new Error("Could not clear media keys: "+e)})})))).then((function(){a&&(i.log("finished closing key sessions and clearing media keys"),n.length=0)})).catch((function(e){var t;i.log("Could not close sessions and clear media keys: "+e),null==(t=i.hls)||t.trigger(_.ERROR,{type:k.OTHER_ERROR,details:D.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error("Could not close sessions and clear media keys: "+e)})}))},r.onManifestLoading=function(){this.keyFormatPromise=null},r.onManifestLoaded=function(e,t){var r=t.sessionKeys;if(r&&this.config.emeEnabled&&!this.keyFormatPromise){var i=r.reduce((function(e,t){return-1===e.indexOf(t.keyFormat)&&e.push(t.keyFormat),e}),[]);this.log("Selecting key-system from session-keys "+i.join(", ")),this.keyFormatPromise=this.getKeyFormatPromise(i)}},r.removeSession=function(e){var t=this,r=e.mediaKeysSession,i=e.licenseXhr;if(r){this.log("Remove licenses and keys and close session "+r.sessionId),e._onmessage&&(r.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(r.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),i&&i.readyState!==XMLHttpRequest.DONE&&i.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;var n=this.mediaKeySessions.indexOf(e);n>-1&&this.mediaKeySessions.splice(n,1);var a=function(e){var t;return"persistent-license"===e.sessionType||!(null==(t=e.sessionTypes)||!t.some((function(e){return"persistent-license"===e})))}(this.config.drmSystemOptions)?new Promise((function(e,t){self.setTimeout((function(){return t(new Error("MediaKeySession.remove() timeout"))}),8e3),r.remove().then(e)})):Promise.resolve();return a.catch((function(e){var r;t.log("Could not remove session: "+e),null==(r=t.hls)||r.trigger(_.ERROR,{type:k.OTHER_ERROR,details:D.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR,fatal:!1,error:new Error("Could not remove session: "+e)})})).then((function(){return r.close()})).catch((function(e){var r;t.log("Could not close session: "+e),null==(r=t.hls)||r.trigger(_.ERROR,{type:k.OTHER_ERROR,details:D.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error("Could not close session: "+e)})}))}},t}(B);us.CDMCleanupPromise=void 0;var ds=function(e){function t(t,r){var i;return(i=e.call(this,r)||this).data=void 0,t.error||(t.error=new Error(r)),i.data=t,t.err=t.error,i}return u(t,e),t}(v(Error)),hs=function(){function e(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}var t=e.prototype;return t.setStreamController=function(e){this.streamController=e},t.registerListeners=function(){this.hls.on(_.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.on(_.MEDIA_DETACHING,this.onMediaDetaching,this)},t.unregisterListeners=function(){this.hls.off(_.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.off(_.MEDIA_DETACHING,this.onMediaDetaching,this)},t.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},t.onMediaAttaching=function(e,t){var r=this.hls.config;if(r.capLevelOnFPSDrop){var i=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=i,i&&"function"==typeof i.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),r.fpsDroppedMonitoringPeriod)}},t.onMediaDetaching=function(){this.media=null},t.checkFPS=function(e,t,r){var i=performance.now();if(t){if(this.lastTime){var n=i-this.lastTime,a=r-this.lastDroppedFrames,s=t-this.lastDecodedFrames,o=1e3*a/n,l=this.hls;if(l.trigger(_.FPS_DROP,{currentDropped:a,currentDecoded:s,totalDroppedFrames:r}),o>0&&a>l.config.fpsDroppedMonitoringThreshold*s){var u=l.currentLevel;l.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+u),u>0&&(-1===l.autoLevelCapping||l.autoLevelCapping>=u)&&(u-=1,l.trigger(_.FPS_DROP_LEVEL_CAPPING,{level:u,droppedLevel:l.currentLevel}),l.autoLevelCapping=u,this.streamController.nextLevelSwitch())}}this.lastTime=i,this.lastDroppedFrames=r,this.lastDecodedFrames=t}},t.checkFPSInterval=function(){var e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){var t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)},e}();function fs(e){for(var t=5381,r=e.length;r;)t=33*t^e.charCodeAt(--r);return(t>>>0).toString()}var cs=.025,gs=function(e){return e[e.Point=0]="Point",e[e.Range=1]="Range",e}({});function vs(e,t,r){return e.identifier+"-"+(r+1)+"-"+fs(t)}var ms=function(){function e(e,t){this.base=void 0,this._duration=null,this._timelineStart=null,this.appendInPlaceDisabled=void 0,this.appendInPlaceStarted=void 0,this.dateRange=void 0,this.hasPlayed=!1,this.cumulativeDuration=0,this.resumeOffset=NaN,this.playoutLimit=NaN,this.restrictions={skip:!1,jump:!1},this.snapOptions={out:!1,in:!1},this.assetList=[],this.assetListLoader=void 0,this.assetListResponse=null,this.resumeAnchor=void 0,this.error=void 0,this.resetOnResume=void 0,this.base=t,this.dateRange=e,this.setDateRange(e)}var t=e.prototype;return t.setDateRange=function(e){this.dateRange=e,this.resumeOffset=e.attr.optionalFloat("X-RESUME-OFFSET",this.resumeOffset),this.playoutLimit=e.attr.optionalFloat("X-PLAYOUT-LIMIT",this.playoutLimit),this.restrictions=e.attr.enumeratedStringList("X-RESTRICT",this.restrictions),this.snapOptions=e.attr.enumeratedStringList("X-SNAP",this.snapOptions)},t.reset=function(){var e;this.appendInPlaceStarted=!1,null==(e=this.assetListLoader)||e.destroy(),this.assetListLoader=void 0,this.supplementsPrimary||(this.assetListResponse=null,this.assetList=[],this._duration=null)},t.isAssetPastPlayoutLimit=function(e){if(e>=this.assetList.length)return!0;var t=this.playoutLimit;return!(e<=0||isNaN(t))&&this.assetList[e].startOffset>t},t.findAssetIndex=function(e){return this.assetList.indexOf(e)},t.toString=function(){return'["'+(e=this).identifier+'" '+(e.cue.pre?"<pre>":e.cue.post?"<post>":"")+e.timelineStart.toFixed(2)+"-"+e.resumeTime.toFixed(2)+"]";var e},n(e,[{key:"identifier",get:function(){return this.dateRange.id}},{key:"startDate",get:function(){return this.dateRange.startDate}},{key:"startTime",get:function(){var e=this.dateRange.startTime;if(this.snapOptions.out){var t=this.dateRange.tagAnchor;if(t)return ps(e,t)}return e}},{key:"startOffset",get:function(){return this.cue.pre?0:this.startTime}},{key:"startIsAligned",get:function(){if(0===this.startTime||this.snapOptions.out)return!0;var e=this.dateRange.tagAnchor;if(e){var t=this.dateRange.startTime;return t-ps(t,e)<.1}return!1}},{key:"resumptionOffset",get:function(){var e=this.resumeOffset,t=R(e)?e:this.duration;return this.cumulativeDuration+t}},{key:"resumeTime",get:function(){var e=this.startOffset+this.resumptionOffset;if(this.snapOptions.in){var t=this.resumeAnchor;if(t)return ps(e,t)}return e}},{key:"appendInPlace",get:function(){return!!this.appendInPlaceStarted||!this.appendInPlaceDisabled&&!(this.cue.once||this.cue.pre||!this.startIsAligned||!(isNaN(this.playoutLimit)&&isNaN(this.resumeOffset)||this.resumeOffset&&this.duration&&Math.abs(this.resumeOffset-this.duration)<cs))},set:function(e){this.appendInPlaceStarted?this.resetOnResume=!e:this.appendInPlaceDisabled=!e}},{key:"timelineStart",get:function(){return null!==this._timelineStart?this._timelineStart:this.startTime},set:function(e){this._timelineStart=e}},{key:"duration",get:function(){var e,t=this.playoutLimit;return e=null!==this._duration?this._duration:this.dateRange.duration?this.dateRange.duration:this.dateRange.plannedDuration||0,!isNaN(t)&&t<e&&(e=t),e},set:function(e){this._duration=e}},{key:"cue",get:function(){return this.dateRange.cue}},{key:"timelineOccupancy",get:function(){return"RANGE"===this.dateRange.attr["X-TIMELINE-OCCUPIES"]?gs.Range:gs.Point}},{key:"supplementsPrimary",get:function(){return"PRIMARY"===this.dateRange.attr["X-TIMELINE-STYLE"]}},{key:"contentMayVary",get:function(){return"NO"!==this.dateRange.attr["X-CONTENT-MAY-VARY"]}},{key:"assetUrl",get:function(){return this.dateRange.attr["X-ASSET-URI"]}},{key:"assetListUrl",get:function(){return this.dateRange.attr["X-ASSET-LIST"]}},{key:"baseUrl",get:function(){return this.base.url}},{key:"assetListLoaded",get:function(){return this.assetList.length>0||null!==this.assetListResponse}}])}();function ps(e,t){return e-t.start<t.duration/2&&!(Math.abs(e-(t.start+t.duration))<cs)?t.start:t.start+t.duration}function ys(e,t,r){var i=new self.URL(e,r);return"data:"!==i.protocol&&i.searchParams.set("_HLS_primary_id",t),i}function Es(e){var t=e.timelineStart,r=e.duration||0;return'["'+e.identifier+'" '+t.toFixed(2)+"-"+(t+r).toFixed(2)+"]"}var Ts=function(){function e(e,t,r,i){var n=this;this.hls=void 0,this.interstitial=void 0,this.assetItem=void 0,this.tracks=null,this.hasDetails=!1,this.mediaAttached=null,this._currentTime=void 0,this._bufferedEosTime=void 0,this.checkPlayout=function(){var e=n.interstitial.playoutLimit,t=n.currentTime;n.startOffset+t>=e&&n.hls.trigger(_.PLAYOUT_LIMIT_REACHED,{})};var a=this.hls=new e(t);this.interstitial=r,this.assetItem=i;var s=i.uri;try{s=ys(s,a.sessionId).href}catch(e){}a.loadSource(s);var o=function(){n.hasDetails=!0};a.once(_.LEVEL_LOADED,o),a.once(_.AUDIO_TRACK_LOADED,o),a.once(_.SUBTITLE_TRACK_LOADED,o),a.on(_.MEDIA_ATTACHING,(function(e,t){var r=t.media;n.removeMediaListeners(),n.mediaAttached=r,n.interstitial.playoutLimit&&r.addEventListener("timeupdate",n.checkPlayout)}))}var t=e.prototype;return t.bufferedInPlaceToEnd=function(e){var t;if(!this.interstitial.appendInPlace)return!1;if(null!=(t=this.hls)&&t.bufferedToEnd)return!0;if(!e||!this._bufferedEosTime)return!1;var r=this.timelineOffset,i=ar.bufferInfo(e,r,0);return this.getAssetTime(i.end)>=this._bufferedEosTime-.02},t.getAssetTime=function(e){var t=this.timelineOffset,r=this.duration;return Math.min(Math.max(0,e-t),r)},t.removeMediaListeners=function(){var e=this.mediaAttached;e&&(this._currentTime=e.currentTime,this.bufferSnapShot(),e.removeEventListener("timeupdate",this.checkPlayout))},t.bufferSnapShot=function(){var e;this.mediaAttached&&null!=(e=this.hls)&&e.bufferedToEnd&&(this._bufferedEosTime=this.bufferedEnd)},t.destroy=function(){this.removeMediaListeners(),this.hls.destroy(),this.hls=this.interstitial=null,this.tracks=this.mediaAttached=this.checkPlayout=null},t.attachMedia=function(e){this.hls.attachMedia(e)},t.detachMedia=function(){this.removeMediaListeners(),this.mediaAttached=null,this.hls.detachMedia()},t.resumeBuffering=function(){this.hls.resumeBuffering()},t.pauseBuffering=function(){this.hls.pauseBuffering()},t.transferMedia=function(){return this.bufferSnapShot(),this.hls.transferMedia()},t.on=function(e,t,r){this.hls.on(e,t)},t.once=function(e,t,r){this.hls.once(e,t)},t.off=function(e,t,r){this.hls.off(e,t)},t.toString=function(){var e,t;return"HlsAssetPlayer: "+Es(this.assetItem)+" "+(null==(e=this.hls)?void 0:e.sessionId)+" "+(null!=(t=this.interstitial)&&t.appendInPlace?"append-in-place":"")},n(e,[{key:"destroyed",get:function(){var e;return!(null!=(e=this.hls)&&e.userConfig)}},{key:"assetId",get:function(){return this.assetItem.identifier}},{key:"interstitialId",get:function(){return this.assetItem.parentIdentifier}},{key:"media",get:function(){var e;return(null==(e=this.hls)?void 0:e.media)||null}},{key:"bufferedEnd",get:function(){var e=this.media||this.mediaAttached;if(!e)return this._bufferedEosTime?this._bufferedEosTime:this.currentTime;var t=ar.bufferInfo(e,e.currentTime,.001);return this.getAssetTime(t.end)}},{key:"currentTime",get:function(){var e=this.media||this.mediaAttached;return e?this.getAssetTime(e.currentTime):this._currentTime||0}},{key:"duration",get:function(){var e=this.assetItem.duration;return e||0}},{key:"remaining",get:function(){var e=this.duration;return e?Math.max(0,e-this.currentTime):0}},{key:"startOffset",get:function(){return this.assetItem.startOffset}},{key:"timelineOffset",get:function(){var e;return(null==(e=this.hls)?void 0:e.config.timelineOffset)||0},set:function(e){var t=this.timelineOffset;if(e!==t){var r=e-t;if(Math.abs(r)>1/9e4){if(this.hasDetails)throw new Error("Cannot set timelineOffset after playlists are loaded");this.hls.config.timelineOffset=e}}}}])}(),Ss=function(e){function t(t,r){var i;return(i=e.call(this,"interstitials-sched",r)||this).onScheduleUpdate=void 0,i.eventMap={},i.events=null,i.items=null,i.durations={primary:0,playout:0,integrated:0},i.onScheduleUpdate=t,i}u(t,e);var r=t.prototype;return r.destroy=function(){this.reset(),this.onScheduleUpdate=null},r.reset=function(){this.eventMap={},this.setDurations(0,0,0),this.events&&this.events.forEach((function(e){return e.reset()})),this.events=this.items=null},r.resetErrorsInRange=function(e,t){return this.events?this.events.reduce((function(r,i){return e<=i.startOffset&&t>i.startOffset?(delete i.error,r+1):r}),0):0},r.getEvent=function(e){return e&&this.eventMap[e]||null},r.hasEvent=function(e){return e in this.eventMap},r.findItemIndex=function(e,t){if(e.event)return this.findEventIndex(e.event.identifier);var r=-1;e.nextEvent?r=this.findEventIndex(e.nextEvent.identifier)-1:e.previousEvent&&(r=this.findEventIndex(e.previousEvent.identifier)+1);var i=this.items;if(i)for(i[r]||(void 0===t&&(t=e.start),r=this.findItemIndexAtTime(t));r>=0&&null!=(n=i[r])&&n.event;){var n;r--}return r},r.findItemIndexAtTime=function(e,t){var r=this.items;if(r)for(var i=0;i<r.length;i++){var n=r[i];if(t&&"primary"!==t&&(n=n[t]),e===n.start||e>n.start&&e<n.end)return i}return-1},r.findJumpRestrictedIndex=function(e,t){var r=this.items;if(r)for(var i=e;i<=t&&r[i];i++){var n=r[i].event;if(null!=n&&n.restrictions.jump&&!n.appendInPlace)return i}return-1},r.findEventIndex=function(e){var t=this.items;if(t)for(var r=t.length;r--;){var i;if((null==(i=t[r].event)?void 0:i.identifier)===e)return r}return-1},r.findAssetIndex=function(e,t){var r=e.assetList,i=r.length;if(i>1)for(var n=0;n<i;n++){var a=r[n];if(!a.error){var s=a.timelineStart;if(t===s||t>s&&t<s+(a.duration||0))return n}}return 0},r.parseInterstitialDateRanges=function(e,t){var r=this,i=e.main.details,n=i.dateRanges,a=this.events,s=this.parseDateRanges(n,{url:i.url},t),o=Object.keys(n),l=a?a.filter((function(e){return!o.includes(e.identifier)})):[];s.length&&s.sort((function(e,t){var r=e.cue.pre,i=e.cue.post,n=t.cue.pre,a=t.cue.post;if(r&&!n)return-1;if(n&&!r)return 1;if(i&&!a)return 1;if(a&&!i)return-1;if(!(r||n||i||a)){var s=e.startTime,o=t.startTime;if(s!==o)return s-o}return e.dateRange.tagOrder-t.dateRange.tagOrder})),this.events=s,l.forEach((function(e){r.removeEvent(e)})),this.updateSchedule(e,l)},r.updateSchedule=function(e,t){void 0===t&&(t=[]);var r=this.events||[];if(r.length||t.length||this.length<2){var i=this.items,n=this.parseSchedule(r,e);(t.length||(null==i?void 0:i.length)!==n.length||n.some((function(e,t){return Math.abs(e.playout.start-i[t].playout.start)>.005||Math.abs(e.playout.end-i[t].playout.end)>.005})))&&(this.items=n,this.onScheduleUpdate(t,i))}},r.parseDateRanges=function(e,t,r){for(var i=[],n=Object.keys(e),a=0;a<n.length;a++){var s=n[a],o=e[s];if(o.isInterstitial){var l=this.eventMap[s];l?l.setDateRange(o):(l=new ms(o,t),this.eventMap[s]=l,!1===r&&(l.appendInPlace=r)),i.push(l)}}return i},r.parseSchedule=function(e,t){var r=[],i=t.main.details,n=i.live?1/0:i.edge,a=0;if((e=e.filter((function(e){return!(e.error||e.cue.once&&e.hasPlayed)}))).length){this.resolveOffsets(e,t);var s=0,o=0;if(e.forEach((function(t,i){var l=t.cue.pre,u=t.cue.post,d=e[i-1]||null,h=t.appendInPlace,f=u?n:t.startOffset,c=t.duration,g=t.timelineOccupancy===gs.Range?c:0,v=t.resumptionOffset,m=(null==d?void 0:d.startTime)===f,p=f+t.cumulativeDuration,y=h?p+c:f+v;if(l||!u&&f<=0){var E=o;o+=g,t.timelineStart=p;var T=a;a+=c,r.push({event:t,start:p,end:y,playout:{start:T,end:a},integrated:{start:E,end:o}})}else{if(!(f<=n))return;if(!m){var S=f-s;if(S>.033){var A=s,L=o;o+=S;var R=a;a+=S;var I={previousEvent:e[i-1]||null,nextEvent:t,start:A,end:A+S,playout:{start:R,end:a},integrated:{start:L,end:o}};r.push(I)}else S>0&&d&&(d.cumulativeDuration+=S,r[r.length-1].end=f)}u&&(y=p),t.timelineStart=p;var b=o;o+=g;var k=a;a+=c,r.push({event:t,start:p,end:y,playout:{start:k,end:a},integrated:{start:b,end:o}})}var D=t.resumeTime;s=u||D>n?n:D})),s<n){var l,u=s,d=o,h=n-s;o+=h;var f=a;a+=h,r.push({previousEvent:(null==(l=r[r.length-1])?void 0:l.event)||null,nextEvent:null,start:s,end:u+h,playout:{start:f,end:a},integrated:{start:d,end:o}})}this.setDurations(n,a,o)}else r.push({previousEvent:null,nextEvent:null,start:0,end:n,playout:{start:0,end:n},integrated:{start:0,end:n}}),this.setDurations(n,n,n);return r},r.setDurations=function(e,t,r){this.durations={primary:e,playout:t,integrated:r}},r.resolveOffsets=function(e,t){var r=this,i=t.main.details,n=i.live?1/0:i.edge,a=0,s=-1;e.forEach((function(o,l){var u=o.cue.pre,d=o.cue.post,h=u?0:d?n:o.startTime;r.updateAssetDurations(o),s===h?o.cumulativeDuration=a:(a=0,s=h),!d&&o.snapOptions.in&&(o.resumeAnchor=Et(null,i.fragments,o.startOffset+o.resumptionOffset,0,0)||void 0),o.appendInPlace&&!o.appendInPlaceStarted&&(r.primaryCanResumeInPlaceAt(o,t)||(o.appendInPlace=!1)),!o.appendInPlace&&l+1<e.length&&e[l+1].startTime-e[l].resumeTime<.033&&(e[l+1].appendInPlace=!1,e[l+1].appendInPlace&&r.warn("Could not change append strategy for abutting event "+o));var f=R(o.resumeOffset)?o.resumeOffset:o.duration;a+=f}))},r.primaryCanResumeInPlaceAt=function(e,t){var r=this,i=e.resumeTime,n=e.startTime+e.resumptionOffset;return Math.abs(i-n)>cs?(this.log('"'+e.identifier+'" resumption '+i+" not aligned with estimated timeline end "+n),!1):t?!Object.keys(t).some((function(n){var a=t[n].details,s=a.edge;if(i>=s)return r.log('"'+e.identifier+'" resumption '+i+" past "+n+" playlist end "+s),!1;var o=Et(null,a.fragments,i);if(!o)return r.log('"'+e.identifier+'" resumption '+i+" does not align with any fragments in "+n+" playlist ("+a.fragStart+"-"+a.fragmentEnd+")"),!0;var l="audio"===n?.175:0;return!(Math.abs(o.start-i)<cs+l||Math.abs(o.end-i)<cs+l||(r.log('"'+e.identifier+'" resumption '+i+" not aligned with "+n+" fragment bounds ("+o.start+"-"+o.end+" sn: "+o.sn+" cc: "+o.cc+")"),0))})):(this.log('"'+e.identifier+'" resumption '+i+" can not be aligned with media (none selected)"),!1)},r.updateAssetDurations=function(e){if(e.assetListLoaded){var t=e.timelineStart,r=0,i=!1,n=!1;e.assetList.forEach((function(e,a){var s=t+r;e.startOffset=r,e.timelineStart=s,i||(i=null===e.duration),n||(n=!!e.error);var o=e.error?0:e.duration||0;r+=o})),e.duration=i&&!n?Math.max(r,e.duration):r}},r.removeEvent=function(e){e.reset(),delete this.eventMap[e.identifier]},n(t,[{key:"duration",get:function(){var e=this.items;return e?e[e.length-1].end:0}},{key:"length",get:function(){return this.items?this.items.length:0}},{key:"assetIdAtEnd",get:function(){var e,t,r=null==(e=this.items)||null==(t=e[this.length-1])?void 0:t.event;if(r){var i=r.assetList,n=i[i.length-1];if(n)return n.identifier}return null}}])}(B);function As(e){return"["+(e.event?'"'+e.event.identifier+'"':"primary")+": "+e.start.toFixed(2)+"-"+e.end.toFixed(2)+"]"}var Ls=function(){function e(e){this.hls=void 0,this.hls=e}var t=e.prototype;return t.destroy=function(){this.hls=null},t.loadAssetList=function(e,t){var r,i=this,n=e.assetListUrl;try{r=ys(n,this.hls.sessionId,e.baseUrl)}catch(t){var a=this.assignAssetListError(e,D.ASSET_LIST_LOAD_ERROR,t,n);return void this.hls.trigger(_.ERROR,a)}t&&"data:"!==r.protocol&&r.searchParams.set("_HLS_start_offset",""+t);var s=this.hls.config,o=new(0,s.loader)(s),l={responseType:"json",url:r.href},u=s.interstitialAssetListLoadPolicy.default,d={loadPolicy:u,timeout:u.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},h={onSuccess:function(t,r,n,a){var s=t.data,o=null==s?void 0:s.ASSETS;if(Array.isArray(o))e.assetListResponse=s,i.hls.trigger(_.ASSET_LIST_LOADED,{event:e,assetListResponse:s,networkDetails:a});else{var l=i.assignAssetListError(e,D.ASSET_LIST_PARSING_ERROR,new Error("Invalid interstitial asset list"),n.url,r,a);i.hls.trigger(_.ERROR,l)}},onError:function(t,r,n,a){var s=i.assignAssetListError(e,D.ASSET_LIST_LOAD_ERROR,new Error("Error loading X-ASSET-LIST: HTTP status "+t.code+" "+t.text+" ("+r.url+")"),r.url,a,n);i.hls.trigger(_.ERROR,s)},onTimeout:function(t,r,n){var a=i.assignAssetListError(e,D.ASSET_LIST_LOAD_TIMEOUT,new Error("Timeout loading X-ASSET-LIST ("+r.url+")"),r.url,t,n);i.hls.trigger(_.ERROR,a)}};return o.load(l,d,h),this.hls.trigger(_.ASSET_LIST_LOADING,{event:e}),o},t.assignAssetListError=function(e,t,r,i,n,a){return e.error=r,{type:k.NETWORK_ERROR,details:t,fatal:!1,interstitial:e,url:i,error:r,networkDetails:a,stats:n}},e}();function Rs(e,t,r){Is(e,t,r),e.addEventListener(t,r)}function Is(e,t,r){e.removeEventListener(t,r)}function bs(e){null==e||e.play().catch((function(){}))}var ks=function(e){function t(t,r){var i;return(i=e.call(this,"interstitials",t.logger)||this).HlsPlayerClass=void 0,i.hls=void 0,i.assetListLoader=void 0,i.mediaSelection=null,i.altSelection=null,i.media=null,i.detachedData=null,i.requiredTracks=null,i.manager=null,i.playerQueue=[],i.bufferedPos=-1,i.timelinePos=-1,i.schedule=void 0,i.playingItem=null,i.bufferingItem=null,i.waitingItem=null,i.endedItem=null,i.playingAsset=null,i.endedAsset=null,i.bufferingAsset=null,i.shouldPlay=!1,i.onPlay=function(){i.shouldPlay=!0},i.onPause=function(){i.shouldPlay=!1},i.onSeeking=function(){var e=i.currentTime;if(void 0!==e&&!i.playbackDisabled){var t=e-i.timelinePos;if(!(Math.abs(t)<1/7056e5)){var r=t<=-.01;i.timelinePos=e,i.bufferedPos=e;var n=i.playingItem;if(n)if(r&&i.schedule.resetErrorsInRange(e,e-t)&&i.updateSchedule(),i.checkBuffer(),r&&e<n.start||e>=n.end){var a,s=i.schedule.findItemIndexAtTime(i.timelinePos);if(!i.isInterstitial(n)&&null!=(a=i.media)&&a.paused&&(i.shouldPlay=!1),!r){var o=i.findItemIndex(n);if(s>o){var l=i.schedule.findJumpRestrictedIndex(o+1,s);if(l>o)return void i.setSchedulePosition(l)}}i.setSchedulePosition(s)}else{var u=i.playingAsset;if(u){var d=u.timelineStart,h=u.duration||0;(r&&e<d||e>=d+h)&&i.setScheduleToAssetAtTime(e,u)}else if(i.playingLastItem&&i.isInterstitial(n)){var f=n.event.assetList[0];f&&(i.endedItem=i.playingItem,i.playingItem=null,i.setScheduleToAssetAtTime(e,f))}}else i.checkBuffer()}}},i.onTimeupdate=function(){var e=i.currentTime;if(void 0!==e&&!i.playbackDisabled&&e>i.timelinePos){i.timelinePos=e,e>i.bufferedPos&&i.checkBuffer();var t=i.playingItem;if(t&&!i.playingLastItem){if(e>=t.end){i.timelinePos=t.end;var r=i.findItemIndex(t);i.setSchedulePosition(r+1)}var n=i.playingAsset;n&&e>=n.timelineStart+(n.duration||0)&&i.setScheduleToAssetAtTime(e,n)}}},i.onScheduleUpdate=function(e,t){var r=i.schedule,n=i.playingItem,a=r.events||[],s=r.items||[],o=r.durations,l=e.map((function(e){return e.identifier})),u=!(!a.length&&!l.length);if(u&&i.log("INTERSTITIALS_UPDATED ("+a.length+"): "+a+"\nSchedule: "+s.map((function(e){return As(e)}))),l.length&&i.log("Removed events "+l),i.playerQueue.forEach((function(e){if(e.interstitial.appendInPlace){var t=e.assetItem.timelineStart,r=e.timelineOffset-t;if(r)try{e.timelineOffset=t}catch(n){Math.abs(r)>cs&&i.warn(n+' ("'+e.assetId+'" '+e.timelineOffset+"->"+t+")")}}})),n){var d=i.updateItem(n,i.timelinePos);i.itemsMatch(n,d)&&(i.playingItem=d,i.waitingItem=i.endedItem=null)}else i.waitingItem=i.updateItem(i.waitingItem),i.endedItem=i.updateItem(i.endedItem);var h=i.bufferingItem;if(h){var f=i.updateItem(h,i.bufferedPos);i.itemsMatch(h,f)?i.bufferingItem=f:h.event&&(i.bufferingItem=i.playingItem,i.clearInterstitial(h.event,null))}if(e.forEach((function(e){e.assetList.forEach((function(e){i.clearAssetPlayer(e.identifier,null)}))})),u||t){if(i.hls.trigger(_.INTERSTITIALS_UPDATED,{events:a.slice(0),schedule:s.slice(0),durations:o,removedIds:l}),i.isInterstitial(n)&&l.includes(n.event.identifier))return i.warn('Interstitial "'+n.event.identifier+'" removed while playing'),void i.primaryFallback(n.event);i.checkBuffer()}},i.hls=t,i.HlsPlayerClass=r,i.assetListLoader=new Ls(t),i.schedule=new Ss(i.onScheduleUpdate,t.logger),i.registerListeners(),i}u(t,e);var r=t.prototype;return r.registerListeners=function(){var e=this.hls;e.on(_.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(_.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(_.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.on(_.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(_.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.on(_.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.on(_.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.on(_.BUFFER_APPENDED,this.onBufferAppended,this),e.on(_.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(_.BUFFERED_TO_END,this.onBufferedToEnd,this),e.on(_.MEDIA_ENDED,this.onMediaEnded,this),e.on(_.ERROR,this.onError,this),e.on(_.DESTROYING,this.onDestroying,this)},r.unregisterListeners=function(){var e=this.hls;e&&(e.off(_.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(_.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(_.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.off(_.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(_.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.off(_.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.off(_.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.off(_.BUFFER_CODECS,this.onBufferCodecs,this),e.off(_.BUFFER_APPENDED,this.onBufferAppended,this),e.off(_.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(_.BUFFERED_TO_END,this.onBufferedToEnd,this),e.off(_.MEDIA_ENDED,this.onMediaEnded,this),e.off(_.ERROR,this.onError,this),e.off(_.DESTROYING,this.onDestroying,this))},r.startLoad=function(){this.resumeBuffering()},r.stopLoad=function(){this.pauseBuffering()},r.resumeBuffering=function(){var e;null==(e=this.getBufferingPlayer())||e.resumeBuffering()},r.pauseBuffering=function(){var e;null==(e=this.getBufferingPlayer())||e.pauseBuffering()},r.destroy=function(){this.unregisterListeners(),this.stopLoad(),this.assetListLoader&&this.assetListLoader.destroy(),this.emptyPlayerQueue(),this.clearScheduleState(),this.schedule&&this.schedule.destroy(),this.media=this.detachedData=this.mediaSelection=this.requiredTracks=this.altSelection=this.manager=null,this.hls=this.HlsPlayerClass=this.schedule=this.log=null,this.assetListLoader=null,this.onPlay=this.onPause=this.onSeeking=this.onTimeupdate=null,this.onScheduleUpdate=null},r.onDestroying=function(){var e=this.primaryMedia||this.media;e&&this.removeMediaListeners(e)},r.removeMediaListeners=function(e){Is(e,"play",this.onPlay),Is(e,"pause",this.onPause),Is(e,"seeking",this.onSeeking),Is(e,"timeupdate",this.onTimeupdate)},r.onMediaAttaching=function(e,t){var r=this.media=t.media;Rs(r,"seeking",this.onSeeking),Rs(r,"timeupdate",this.onTimeupdate),Rs(r,"play",this.onPlay),Rs(r,"pause",this.onPause)},r.onMediaAttached=function(e,t){var r=this.effectivePlayingItem,i=this.detachedData;if(this.detachedData=null,null===r)this.checkStart();else if(!i){this.clearScheduleState();var n=this.findItemIndex(r);this.setSchedulePosition(n)}},r.clearScheduleState=function(){this.playingItem=this.bufferingItem=this.waitingItem=this.endedItem=this.playingAsset=this.endedAsset=this.bufferingAsset=null},r.onMediaDetaching=function(e,t){var r=!!t.transferMedia,i=this.media;if(this.media=null,!r&&(i&&this.removeMediaListeners(i),this.detachedData)){var n=this.getBufferingPlayer();n&&(this.playingAsset=this.endedAsset=this.bufferingAsset=this.bufferingItem=this.waitingItem=this.detachedData=null,n.detachMedia()),this.shouldPlay=!1}},r.isInterstitial=function(e){return!(null==e||!e.event)},r.retreiveMediaSource=function(e,t){var r=this.getAssetPlayer(e);r&&this.transferMediaFromPlayer(r,t)},r.transferMediaFromPlayer=function(e,t){var r=e.interstitial.appendInPlace,i=e.media;if(r&&i===this.primaryMedia){if(this.bufferingAsset=null,(!t||this.isInterstitial(t)&&!t.event.appendInPlace)&&t&&i)return void(this.detachedData={media:i});var n=e.transferMedia();this.log("transfer MediaSource from "+e+" "+lt(n)),this.detachedData=n}else t&&i&&(this.shouldPlay||(this.shouldPlay=!i.paused))},r.transferMediaTo=function(e,t){var r,i,n=this;if(e.media!==t){var a,s=null,o=this.hls,l=e!==o,u=l&&e.interstitial.appendInPlace,d=null==(r=this.detachedData)?void 0:r.mediaSource;if(o.media)u&&(s=o.transferMedia(),this.detachedData=s),a="Primary";else if(d){var h=this.getBufferingPlayer();h?(s=h.transferMedia(),a=""+h):a="detached MediaSource"}else a="detached media";if(!s)if(d)s=this.detachedData,this.log("using detachedData: MediaSource "+lt(s));else if(!this.detachedData||o.media===t){var f=this.playerQueue;f.length>1&&f.forEach((function(e){if(l&&e.interstitial.appendInPlace!==u){var t=e.interstitial;n.clearInterstitial(e.interstitial,null),t.appendInPlace=!1,t.appendInPlace&&n.warn("Could not change append strategy for queued assets "+t)}})),this.hls.detachMedia(),this.detachedData={media:t}}var c=s&&"mediaSource"in s&&"closed"!==(null==(i=s.mediaSource)?void 0:i.readyState),g=c&&s?s:t;if(this.log((c?"transfering MediaSource":"attaching media")+" to "+(l?e:"Primary")+" from "+a),g===s){var v=l&&e.assetId===this.schedule.assetIdAtEnd;g.overrides={duration:this.schedule.duration,endOfStream:!l||v,cueRemoval:!l}}e.attachMedia(g)}},r.onInterstitialCueEnter=function(){this.onTimeupdate()},r.checkStart=function(){var e=this.schedule,t=e.events;if(t&&!this.playbackDisabled&&this.media){-1===this.bufferedPos&&(this.bufferedPos=0);var r=this.timelinePos,i=this.effectivePlayingItem;if(-1===r){var n=this.hls.startPosition;if(this.timelinePos=n,t.length&&t[0].cue.pre){var a=e.findEventIndex(t[0].identifier);this.setSchedulePosition(a)}else if(n>=0||!this.primaryLive){var s=this.timelinePos=n>0?n:0,o=e.findItemIndexAtTime(s);this.setSchedulePosition(o)}}else if(i&&!this.playingItem){var l=e.findItemIndex(i);this.setSchedulePosition(l)}}},r.advanceAfterAssetEnded=function(e,t,r){var i=r+1;if(e.isAssetPastPlayoutLimit(i)||e.assetList[i].error){var n=this.schedule.items;if(n){var a=t+1;if(a>=n.length)return void this.setSchedulePosition(-1);var s=e.resumeTime;this.timelinePos<s&&(this.timelinePos=s,this.checkBuffer()),this.setSchedulePosition(a)}}else this.setSchedulePosition(t,i)},r.setScheduleToAssetAtTime=function(e,t){var r=this.schedule,i=t.parentIdentifier,n=r.getEvent(i);if(n){var a=r.findEventIndex(i),s=r.findAssetIndex(n,e);this.setSchedulePosition(a,s)}},r.setSchedulePosition=function(e,t){var r=this.schedule.items;if(r&&!this.playbackDisabled){this.log("setSchedulePosition "+e+", "+t);var i=e>=0?r[e]:null,n=this.playingItem,a=this.playingLastItem;if(this.isInterstitial(n)){var s,o=n.event,l=this.playingAsset,u=null==l?void 0:l.identifier,d=u?this.getAssetPlayer(u):null;if(d&&u&&(!this.eventItemsMatch(n,i)||void 0!==t&&u!==(null==(s=o.assetList)?void 0:s[t].identifier))){var h,f=o.findAssetIndex(l);this.log("INTERSTITIAL_ASSET_ENDED "+(f+1)+"/"+o.assetList.length+" "+Es(l)),this.endedAsset=l,this.playingAsset=null,this.hls.trigger(_.INTERSTITIAL_ASSET_ENDED,{asset:l,assetListIndex:f,event:o,schedule:r.slice(0),scheduleIndex:e,player:d}),this.retreiveMediaSource(u,i),!d.media||null!=(h=this.detachedData)&&h.mediaSource||d.detachMedia()}if(!this.eventItemsMatch(n,i)&&(this.endedItem=n,this.playingItem=null,this.log("INTERSTITIAL_ENDED "+o+" "+As(n)),o.hasPlayed=!0,this.hls.trigger(_.INTERSTITIAL_ENDED,{event:o,schedule:r.slice(0),scheduleIndex:e}),o.cue.once)){this.updateSchedule();var c=this.schedule.items;if(i&&c){var g=this.schedule.findItemIndex(i);this.advanceSchedule(g,c,t,n,a)}return}}this.advanceSchedule(e,r,t,n,a)}},r.advanceSchedule=function(e,t,r,i,n){var a=this,s=e>=0?t[e]:null,o=this.primaryMedia,l=this.playerQueue;if(l.length&&l.forEach((function(t){var r=t.interstitial,i=a.schedule.findEventIndex(r.identifier);(i<e||i>e+1)&&a.clearInterstitial(r,s)})),this.isInterstitial(s)){this.timelinePos=Math.min(Math.max(this.timelinePos,s.start),s.end);var u=s.event;void 0===r&&(r=this.schedule.findAssetIndex(u,this.timelinePos));var d=this.waitingItem;this.assetsBuffered(s,o)||this.setBufferingItem(s);var h=this.preloadAssets(u,r);if(this.eventItemsMatch(s,d||i)||(this.waitingItem=s,this.log("INTERSTITIAL_STARTED "+As(s)+" "+(u.appendInPlace?"append in place":"")),this.hls.trigger(_.INTERSTITIAL_STARTED,{event:u,schedule:t.slice(0),scheduleIndex:e})),!u.assetListLoaded)return void this.log("Waiting for ASSET-LIST to complete loading "+u);if(u.assetListLoader&&(u.assetListLoader.destroy(),u.assetListLoader=void 0),!o)return void this.log("Waiting for attachMedia to start Interstitial "+u);this.waitingItem=this.endedItem=null,this.playingItem=s;var f=u.assetList[r];if(!f){var c=t[e+1],g=this.media;return c&&g&&!this.isInterstitial(c)&&g.currentTime<c.start&&(g.currentTime=this.timelinePos=c.start),void this.advanceAfterAssetEnded(u,e,r||0)}if(h||(h=this.getAssetPlayer(f.identifier)),null===h||h.destroyed){var v=u.assetList.length;this.warn("asset "+(r+1)+"/"+v+" player destroyed "+u),h=this.createAssetPlayer(u,f,r)}if(!this.eventItemsMatch(s,this.bufferingItem)&&u.appendInPlace&&this.isAssetBuffered(f))return;this.startAssetPlayer(h,r,t,e,o),this.shouldPlay&&bs(h.media)}else null!==s?(this.resumePrimary(s,e,i),this.shouldPlay&&bs(this.hls.media)):n&&this.isInterstitial(i)&&(this.endedItem=null,this.playingItem=i,i.event.appendInPlace||this.attachPrimary(this.schedule.durations.primary,null))},r.resumePrimary=function(e,t,r){var i;if(this.playingItem=e,this.playingAsset=this.endedAsset=null,this.waitingItem=this.endedItem=null,this.bufferedToItem(e),this.log("resuming "+As(e)),null==(i=this.detachedData)||!i.mediaSource){var n=this.timelinePos;(n<e.start||n>=e.end)&&(n=this.getPrimaryResumption(e,t),this.timelinePos=n),this.attachPrimary(n,e)}if(r){var a=this.schedule.items;a&&(this.log("resumed "+As(e)),this.hls.trigger(_.INTERSTITIALS_PRIMARY_RESUMED,{schedule:a.slice(0),scheduleIndex:t}),this.checkBuffer())}},r.getPrimaryResumption=function(e,t){var r=e.start;if(this.primaryLive){var i=this.primaryDetails;if(0===t)return this.hls.startPosition;if(i&&(r<i.fragmentStart||r>i.edge))return this.hls.liveSyncPosition||-1}return r},r.isAssetBuffered=function(e){var t=this.getAssetPlayer(e.identifier);return null!=t&&t.hls?t.hls.bufferedToEnd:ar.bufferInfo(this.primaryMedia,this.timelinePos,0).end+1>=e.timelineStart+(e.duration||0)},r.attachPrimary=function(e,t,r){t?this.setBufferingItem(t):this.bufferingItem=this.playingItem,this.bufferingAsset=null;var i=this.primaryMedia;if(i){var n=this.hls;n.media?this.checkBuffer():(this.transferMediaTo(n,i),r&&this.startLoadingPrimaryAt(e,r)),r||(this.timelinePos=e,this.startLoadingPrimaryAt(e,r))}},r.startLoadingPrimaryAt=function(e,t){var r,i=this.hls;!i.loadingEnabled||!i.media||Math.abs(((null==(r=i.mainForwardBufferInfo)?void 0:r.start)||i.media.currentTime)-e)>.5?i.startLoad(e,t):i.bufferingEnabled||i.resumeBuffering()},r.onManifestLoading=function(){this.stopLoad(),this.schedule.reset(),this.emptyPlayerQueue(),this.clearScheduleState(),this.shouldPlay=!1,this.bufferedPos=this.timelinePos=-1,this.mediaSelection=this.altSelection=this.manager=this.requiredTracks=null,this.hls.off(_.BUFFER_CODECS,this.onBufferCodecs,this),this.hls.on(_.BUFFER_CODECS,this.onBufferCodecs,this)},r.onLevelUpdated=function(e,t){if(-1!==t.level){var r=this.hls.levels[t.level],i=f(f({},this.mediaSelection||this.altSelection),{},{main:r});this.mediaSelection=i,this.schedule.parseInterstitialDateRanges(i,this.hls.config.interstitialAppendInPlace),!this.effectivePlayingItem&&this.schedule.items&&this.checkStart()}},r.onAudioTrackUpdated=function(e,t){var r=this.hls.audioTracks[t.id],i=this.mediaSelection;if(i){var n=f(f({},i),{},{audio:r});this.mediaSelection=n}else this.altSelection=f(f({},this.altSelection),{},{audio:r})},r.onSubtitleTrackUpdated=function(e,t){var r=this.hls.subtitleTracks[t.id],i=this.mediaSelection;if(i){var n=f(f({},i),{},{subtitles:r});this.mediaSelection=n}else this.altSelection=f(f({},this.altSelection),{},{subtitles:r})},r.onAudioTrackSwitching=function(e,t){var r=ht(t);this.playerQueue.forEach((function(e){return e.hls.setAudioOption(t)||e.hls.setAudioOption(r)}))},r.onSubtitleTrackSwitch=function(e,t){var r=ht(t);this.playerQueue.forEach((function(e){return e.hls.setSubtitleOption(t)||-1!==t.id&&e.hls.setSubtitleOption(r)}))},r.onBufferCodecs=function(e,t){var r=t.tracks;r&&(this.requiredTracks=r)},r.onBufferAppended=function(e,t){this.checkBuffer()},r.onBufferFlushed=function(e,t){var r=this.playingItem;if(r&&!this.itemsMatch(r,this.bufferingItem)&&!this.isInterstitial(r)){var i=this.timelinePos;this.bufferedPos=i,this.checkBuffer()}},r.onBufferedToEnd=function(e){var t=this.schedule.events;if(this.bufferedPos<Number.MAX_VALUE&&t){for(var r=0;r<t.length;r++){var i=t[r];if(i.cue.post){var n,a=this.schedule.findEventIndex(i.identifier),s=null==(n=this.schedule.items)?void 0:n[a];this.isInterstitial(s)&&this.eventItemsMatch(s,this.bufferingItem)&&this.bufferedToItem(s,0);break}}this.bufferedPos=Number.MAX_VALUE}},r.onMediaEnded=function(e){var t=this.playingItem;if(!this.playingLastItem&&t){var r=this.findItemIndex(t);this.setSchedulePosition(r+1)}else this.shouldPlay=!1},r.updateItem=function(e,t){var r=this.schedule.items;return e&&r&&r[this.findItemIndex(e,t)]||null},r.itemsMatch=function(e,t){return!!t&&(e===t||e.event&&t.event&&this.eventItemsMatch(e,t)||!e.event&&!t.event&&this.findItemIndex(e)===this.findItemIndex(t))},r.eventItemsMatch=function(e,t){var r;return!!t&&(e===t||e.event.identifier===(null==(r=t.event)?void 0:r.identifier))},r.findItemIndex=function(e,t){return e?this.schedule.findItemIndex(e,t):-1},r.updateSchedule=function(){var e=this.mediaSelection;e&&this.schedule.updateSchedule(e,[])},r.checkBuffer=function(e){var t=this.schedule.items;if(t){var r=ar.bufferInfo(this.primaryMedia,this.timelinePos,0);e&&(this.bufferedPos=this.timelinePos),e||(e=r.len<1),this.updateBufferedPos(r.end,t,e)}},r.updateBufferedPos=function(e,t,r){var i=this.schedule,n=this.bufferingItem;if(!(this.bufferedPos>e))if(1===t.length&&this.itemsMatch(t[0],n))this.bufferedPos=e;else{var a=this.playingItem,s=this.findItemIndex(a),o=i.findItemIndexAtTime(e);if(this.bufferedPos<e){var l,u,d=this.findItemIndex(n),h=Math.min(d+1,t.length-1),f=t[h];if((-1===o&&n&&e>=n.end||null!=(l=f.event)&&l.appendInPlace&&e+.01>=f.start)&&(o=h),h-s>1&&!1===(null==n||null==(u=n.event)?void 0:u.appendInPlace))return;if(this.bufferedPos=e,o>d&&o>s)this.bufferedToItem(f);else{var c=this.primaryDetails;this.primaryLive&&c&&e>c.edge-c.targetduration&&f.start<c.edge+this.hls.config.interstitialLiveLookAhead&&this.isInterstitial(f)&&this.preloadAssets(f.event,0)}}else r&&a&&!this.itemsMatch(a,n)&&(o===s?this.bufferedToItem(a):o===s+1&&this.bufferedToItem(t[o]))}},r.assetsBuffered=function(e,t){var r=this;return 0!==e.event.assetList.length&&!e.event.assetList.some((function(e){var i=r.getAssetPlayer(e.identifier);return!(null!=i&&i.bufferedInPlaceToEnd(t))}))},r.setBufferingItem=function(e){var t=this,r=this.bufferingItem,i=this.schedule;if(this.itemsMatch(e,r))this.bufferingItem!==e&&(this.bufferingItem=e);else{var n=i.items,a=i.events;if(!n||!a)return r;var s=this.isInterstitial(e),o=this.getBufferingPlayer();if(this.bufferingItem=e,this.bufferedPos=Math.max(e.start,Math.min(e.end,this.timelinePos)),!this.playbackDisabled){var l=o?o.remaining:r?r.end-this.timelinePos:0;this.log("buffered to boundary "+As(e)+(r?" ("+l.toFixed(2)+" remaining)":"")),s?e.event.assetList.forEach((function(e){var r=t.getAssetPlayer(e.identifier);r&&r.resumeBuffering()})):(this.hls.resumeBuffering(),this.playerQueue.forEach((function(e){return e.pauseBuffering()})))}this.hls.trigger(_.INTERSTITIALS_BUFFERED_TO_BOUNDARY,{events:a.slice(0),schedule:n.slice(0),bufferingIndex:this.findItemIndex(e),playingIndex:this.findItemIndex(this.playingItem)})}return r},r.bufferedToItem=function(e,t){void 0===t&&(t=0);var r=this.setBufferingItem(e);if(!this.playbackDisabled)if(this.isInterstitial(e))this.bufferedToEvent(e,t);else if(null!==r){this.bufferingAsset=null;var i=this.detachedData;i&&i.mediaSource?this.attachPrimary(e.start,e,!0):this.preloadPrimary(e)}},r.preloadPrimary=function(e){var t=this.findItemIndex(e),r=this.getPrimaryResumption(e,t);this.startLoadingPrimaryAt(r)},r.bufferedToEvent=function(e,t){var r=e.event,i=0===r.assetList.length&&!r.assetListLoader,n=r.cue.once;if(i||!n){var a=this.preloadAssets(r,t);if(null!=a&&a.interstitial.appendInPlace){var s=r.assetList[t],o=this.primaryMedia;s&&o&&this.bufferAssetPlayer(a,o)}}},r.preloadAssets=function(e,t){var r=e.assetUrl,i=e.assetList.length,n=0===i&&!e.assetListLoader,a=e.cue.once;if(n){var s,o=e.timelineStart;if(e.appendInPlace){var l,u=this.playingItem;this.isInterstitial(u)||(null==u||null==(l=u.nextEvent)?void 0:l.identifier)!==e.identifier||this.flushFrontBuffer(o+.25)}var d=0;if(!this.playingItem&&this.primaryLive&&-1===(d=this.hls.startPosition)&&(d=this.hls.liveSyncPosition||0),d&&!e.cue.pre&&!e.cue.post){var h=d-o;h>0&&(s=Math.round(1e3*h)/1e3)}if(this.log("Load interstitial asset "+(t+1)+"/"+(r?1:i)+" "+e+(s?" live-start: "+d+" start-offset: "+s:"")),r)return this.createAsset(e,0,0,o,e.duration,r);var f=this.assetListLoader.loadAssetList(e,s);f&&(e.assetListLoader=f)}else if(!a&&i){for(var c=t;c<i;c++){var g=e.assetList[c],v=this.getAssetPlayerQueueIndex(g.identifier);-1!==v&&!this.playerQueue[v].destroyed||g.error||this.createAssetPlayer(e,g,c)}return this.getAssetPlayer(e.assetList[t].identifier)}return null},r.flushFrontBuffer=function(e){var t=this,r=this.requiredTracks;r&&(this.log("Removing front buffer starting at "+e),Object.keys(r).forEach((function(r){t.hls.trigger(_.BUFFER_FLUSHING,{startOffset:e,endOffset:1/0,type:r})})))},r.getAssetPlayerQueueIndex=function(e){for(var t=this.playerQueue,r=0;r<t.length;r++)if(e===t[r].assetId)return r;return-1},r.getAssetPlayer=function(e){var t=this.getAssetPlayerQueueIndex(e);return this.playerQueue[t]||null},r.getBufferingPlayer=function(){var e=this.playerQueue,t=this.primaryMedia;if(t)for(var r=0;r<e.length;r++)if(e[r].media===t)return e[r];return null},r.createAsset=function(e,t,r,i,n,a){var s={parentIdentifier:e.identifier,identifier:vs(e,a,t),duration:n,startOffset:r,timelineStart:i,uri:a};return this.createAssetPlayer(e,s,t)},r.createAssetPlayer=function(e,t,r){var i=this;this.log("create HLSAssetPlayer for "+Es(t));var n=this.hls,a=n.userConfig,s=a.videoPreference,l=n.loadLevelObj||n.levels[n.currentLevel];(s||l)&&(s=o({},s),l.videoCodec&&(s.videoCodec=l.videoCodec),l.videoRange&&(s.allowedVideoRanges=[l.videoRange]));var u=n.audioTracks[n.audioTrack],d=n.subtitleTracks[n.subtitleTrack],h=0;if(this.primaryLive||e.appendInPlace){var c=this.timelinePos-t.timelineStart;if(c>1){var g=t.duration;g&&c<g&&(h=c)}}var v=t.identifier,m=f(f({},a),{},{autoStartLoad:!0,startFragPrefetch:!0,primarySessionId:n.sessionId,assetPlayerId:v,abrEwmaDefaultEstimate:n.bandwidthEstimate,interstitialsController:void 0,startPosition:h,liveDurationInfinity:!1,testBandwidth:!1,videoPreference:s,audioPreference:u||a.audioPreference,subtitlePreference:d||a.subtitlePreference});e.appendInPlace&&(e.appendInPlaceStarted=!0,t.timelineStart&&(m.timelineOffset=t.timelineStart));var p=m.cmcd;null!=p&&p.sessionId&&p.contentId&&(m.cmcd=o({},p,{contentId:fs(t.uri)})),this.getAssetPlayer(v)&&this.warn("Duplicate date range identifier "+e+" and asset "+v);var y=new Ts(this.HlsPlayerClass,m,e,t);this.playerQueue.push(y),e.assetList[r]=t;var E=function(n){if(n.live){var a=new Error("Interstitials MUST be VOD assets "+e),s={fatal:!0,type:k.OTHER_ERROR,details:D.INTERSTITIAL_ASSET_ITEM_ERROR,error:a};i.handleAssetItemError(s,e,i.schedule.findEventIndex(e.identifier),r,a.message)}else{var o=n.edge-n.fragmentStart,l=t.duration;(null===l||o>l)&&(i.log('Interstitial asset "'+v+'" duration change '+l+" > "+o),t.duration=o,i.updateSchedule())}};y.on(_.LEVEL_UPDATED,(function(e,t){var r=t.details;return E(r)})),y.on(_.LEVEL_PTS_UPDATED,(function(e,t){var r=t.details;return E(r)}));var T=function(e,t){var r=i.getAssetPlayer(v);if(r&&t.tracks){r.off(_.BUFFER_CODECS,T),r.tracks=t.tracks;var n=i.primaryMedia;i.bufferingAsset===r.assetItem&&n&&!r.media&&i.bufferAssetPlayer(r,n)}};y.on(_.BUFFER_CODECS,T);var S=function(){var r,n=i.getAssetPlayer(v);if(i.log("buffered to end of asset "+n),n){var a=i.schedule.findEventIndex(e.identifier),s=e.findAssetIndex(t),o=s+1,l=null==(r=i.schedule.items)?void 0:r[a];if(i.isInterstitial(l))if(-1===s||e.isAssetPastPlayoutLimit(o)||e.assetList[o].error){var u,d=null==(u=i.schedule.items)?void 0:u[a+1];d&&i.bufferedToItem(d)}else i.bufferedToItem(l,o)}};y.on(_.BUFFERED_TO_END,S);var A=function(t){return function(){if(i.getAssetPlayer(v)){i.shouldPlay=!0;var r=i.schedule.findEventIndex(e.identifier);i.advanceAfterAssetEnded(e,r,t)}}};return y.once(_.MEDIA_ENDED,A(r)),y.once(_.PLAYOUT_LIMIT_REACHED,A(1/0)),y.on(_.ERROR,(function(t,n){var a=i.getAssetPlayer(v);if(n.details!==D.BUFFER_STALLED_ERROR)i.handleAssetItemError(n,e,i.schedule.findEventIndex(e.identifier),r,"Asset player error "+n.error+" "+e);else if(null!=a&&a.media){var s=a.currentTime,o=a.duration-s;s&&e.appendInPlace&&o/a.media.playbackRate<.5?(i.log("Advancing buffer past end of asset "+v+" "+e+" at "+a.media.currentTime),S()):(i.warn("Stalled at "+s+" of "+(s+o)+" in asset "+v+" "+e),i.onTimeupdate(),i.checkBuffer(!0))}})),y.on(_.DESTROYING,(function(){if(i.getAssetPlayer(v)){var t=new Error("Asset player destroyed unexpectedly "+v),n={fatal:!0,type:k.OTHER_ERROR,details:D.INTERSTITIAL_ASSET_ITEM_ERROR,error:t};i.handleAssetItemError(n,e,i.schedule.findEventIndex(e.identifier),r,t.message)}})),this.hls.trigger(_.INTERSTITIAL_ASSET_PLAYER_CREATED,{asset:t,assetListIndex:r,event:e,player:y}),y},r.clearInterstitial=function(e,t){var r=this;e.assetList.forEach((function(e){r.clearAssetPlayer(e.identifier,t)})),e.reset()},r.clearAssetPlayer=function(e,t){var r=this.getAssetPlayerQueueIndex(e);if(-1!==r){this.log('clearAssetPlayer "'+e+'" toSegment: '+(t?As(t):t));var i=this.playerQueue[r];this.transferMediaFromPlayer(i,t),this.playerQueue.splice(r,1),i.destroy()}},r.emptyPlayerQueue=function(){for(var e;e=this.playerQueue.pop();)e.destroy();this.playerQueue=[]},r.startAssetPlayer=function(e,t,r,i,n){var a=e.interstitial,s=e.assetItem,o=e.assetId,l=a.assetList.length,u=this.playingAsset;this.endedAsset=null,this.playingAsset=s,u&&u.identifier===o||(u&&(this.clearAssetPlayer(u.identifier,r[i]),delete u.error),this.log("INTERSTITIAL_ASSET_STARTED "+(t+1)+"/"+l+" "+e),this.hls.trigger(_.INTERSTITIAL_ASSET_STARTED,{asset:s,assetListIndex:t,event:a,schedule:r.slice(0),scheduleIndex:i,player:e})),this.bufferAssetPlayer(e,n)},r.bufferAssetPlayer=function(e,t){var r,i,n=e.interstitial,a=e.assetItem,s=e.assetId,o=this.schedule.findEventIndex(n.identifier),l=null==(r=this.schedule.items)?void 0:r[o];if(l){this.setBufferingItem(l),this.bufferingAsset=a;var u=this.getBufferingPlayer();if(u!==e){var d=n.appendInPlace;if(!d||!1!==(null==u?void 0:u.interstitial.appendInPlace)){var h=(null==u?void 0:u.tracks)||(null==(i=this.detachedData)?void 0:i.tracks)||this.requiredTracks;if(d&&a!==this.playingAsset){if(!e.tracks)return;if(h&&!X(h,e.tracks)){var f=new Error('Asset "'+s+"\" SourceBuffer tracks ('"+Object.keys(e.tracks)+"') are not compatible with primary content tracks ('"+Object.keys(h)+"')"),c={fatal:!0,type:k.OTHER_ERROR,details:D.INTERSTITIAL_ASSET_ITEM_ERROR,error:f},g=n.findAssetIndex(a);return void this.handleAssetItemError(c,n,o,g,f.message)}}this.transferMediaTo(e,t)}}}},r.handleAssetItemError=function(e,t,r,i,n){if(e.details!==D.BUFFER_STALLED_ERROR){var a=t.assetList[i]||null,s=null;if(a){var l=this.getAssetPlayerQueueIndex(a.identifier);s=this.playerQueue[l]||null}var u=this.schedule.items,d=o({},e,{fatal:!1,errorAction:Ft(!0),asset:a,assetListIndex:i,event:t,schedule:u,scheduleIndex:r,player:s});if(this.warn("Asset item error: "+e.error),this.hls.trigger(_.INTERSTITIAL_ASSET_ERROR,d),e.fatal){var h=new Error(n);a&&(this.playingAsset!==a&&this.clearAssetPlayer(a.identifier,null),a.error=h),t.assetList.some((function(e){return!e.error}))?t.appendInPlace&&(t.error=h):t.error=h,this.primaryFallback(t)}}},r.primaryFallback=function(e){var t=e.timelineStart,r=this.effectivePlayingItem;if(this.updateSchedule(),r){this.log('Fallback to primary from event "'+e.identifier+'" start: '+t+" pos: "+this.timelinePos+" playing: "+(r?As(r):"<none>")+" error: "+e.error),e.appendInPlace&&(this.attachPrimary(t,null),this.flushFrontBuffer(t));var i=this.timelinePos;-1===i&&(i=this.hls.startPosition);var n=this.updateItem(r,i);if(this.itemsMatch(r,n))this.clearInterstitial(e,null);else{var a=this.schedule.findItemIndexAtTime(i);this.setSchedulePosition(a)}}else this.checkStart()},r.onAssetListLoaded=function(e,t){var r,i=this,n=t.event,a=n.identifier,s=t.assetListResponse.ASSETS;if(this.schedule.hasEvent(a)){var o=n.timelineStart,l=n.duration,u=0;s.forEach((function(e,t){var r=parseFloat(e.DURATION);i.createAsset(n,t,u,o+u,r,e.URI),u+=r})),n.duration=u,this.log("Loaded asset-list with duration: "+u+" (was: "+l+") "+n);var d=this.waitingItem,h=(null==d?void 0:d.event.identifier)===a;this.updateSchedule();var f=null==(r=this.bufferingItem)?void 0:r.event;if(h){var c,g=this.schedule.findEventIndex(a),v=null==(c=this.schedule.items)?void 0:c[g];if(v){if(!this.playingItem&&this.timelinePos>v.end&&this.schedule.findItemIndexAtTime(this.timelinePos)!==g)return n.error=new Error("Interstitial no longer within playback range "+this.timelinePos+" "+n),void this.primaryFallback(n);this.setBufferingItem(v)}this.setSchedulePosition(g)}else if((null==f?void 0:f.identifier)===a&&f.appendInPlace){var m=n.assetList[0],p=this.getAssetPlayer(m.identifier),y=this.primaryMedia;m&&p&&y&&this.bufferAssetPlayer(p,y)}}},r.onError=function(e,t){switch(t.details){case D.ASSET_LIST_PARSING_ERROR:case D.ASSET_LIST_LOAD_ERROR:case D.ASSET_LIST_LOAD_TIMEOUT:var r=t.interstitial;r&&this.primaryFallback(r);break;case D.BUFFER_STALLED_ERROR:this.onTimeupdate(),this.checkBuffer(!0)}},n(t,[{key:"interstitialsManager",get:function(){if(!this.manager){if(!this.hls)return null;var e=this,t=function(){return e.bufferingItem||e.waitingItem},r=function(t){return t?e.getAssetPlayer(t.identifier):t},i=function(t,i,a,s,o){if(t){var l=t[i].start,u=t.event;if(u){if("playout"===i||u.timelineOccupancy!==gs.Point){var d=r(a);(null==d?void 0:d.interstitial)===u&&(l+=d.assetItem.startOffset+d[o])}}else l+=("bufferedPos"===s?n():e[s])-t.start;return l}return 0},n=function(){var t=e.bufferedPos;return t===Number.MAX_VALUE?a("primary"):Math.max(t,0)},a=function(t){var r;return null!=(r=e.primaryDetails)&&r.live?e.primaryDetails.edge:e.schedule.durations[t]},s=function(t,n){var a,s,o=e.effectivePlayingItem;if(null==o||null==(a=o.event)||!a.restrictions.skip){e.log("seek to "+t+' "'+n+'"');var l=e.effectivePlayingItem,u=e.schedule.findItemIndexAtTime(t,n),d=null==(s=e.schedule.items)?void 0:s[u],h=e.getBufferingPlayer(),f=null==h?void 0:h.interstitial,c=null==f?void 0:f.appendInPlace,g=l&&e.itemsMatch(l,d);if(l&&(c||g)){var v=r(e.playingAsset),m=(null==v?void 0:v.media)||e.primaryMedia;if(m){var p="primary"===n?m.currentTime:i(l,n,e.playingAsset,"timelinePos","currentTime"),y=t-p,E=(c?p:m.currentTime)+y;if(E>=0&&(!v||c||E<=v.duration))return void(m.currentTime=E)}}if(d){var T=t;if("primary"!==n){var S=t-d[n].start;T=d.start+S}var A=!e.isInterstitial(d);if(e.isInterstitial(l)&&!l.event.appendInPlace||!A&&!d.event.appendInPlace){if(l){var L=e.findItemIndex(l);if(u>L){var R=e.schedule.findJumpRestrictedIndex(L+1,u);if(R>L)return void e.setSchedulePosition(R)}var I=0;if(A)e.timelinePos=T,e.checkBuffer();else{var b,k=null==d||null==(b=d.event)?void 0:b.assetList;if(k)for(var D=t-(d[n]||d).start,_=k.length;_--;){var P=k[_];if(P.duration&&D>=P.startOffset&&D<P.startOffset+P.duration){I=_;break}}}e.setSchedulePosition(u,I)}}else{var C=e.media||(c?null==h?void 0:h.media:null);C&&(C.currentTime=T)}}}},o=function(){var r=e.effectivePlayingItem;if(e.isInterstitial(r))return r;var i=t();return e.isInterstitial(i)?i:null},l={get currentTime(){var t=o(),r=e.effectivePlayingItem;return r&&r===t?i(r,"playout",e.effectivePlayingAsset,"timelinePos","currentTime")-r.playout.start:0},set currentTime(t){var r=o(),i=e.effectivePlayingItem;i&&i===r&&s(t+i.playout.start,"playout")},get duration(){var e=o();return e?e.playout.end-e.playout.start:0},get assetPlayers(){var t,r=null==(t=o())?void 0:t.event.assetList;return r?r.map((function(t){return e.getAssetPlayer(t.identifier)})):[]},get playingIndex(){var t,r=null==(t=o())?void 0:t.event;return r&&e.effectivePlayingAsset?r.findAssetIndex(e.effectivePlayingAsset):-1},get scheduleItem(){return o()}};this.manager={get events(){var t,r;return(null==(t=e.schedule)||null==(r=t.events)?void 0:r.slice(0))||[]},get schedule(){var t,r;return(null==(t=e.schedule)||null==(r=t.items)?void 0:r.slice(0))||[]},get interstitialPlayer(){return o()?l:null},get playerQueue(){return e.playerQueue.slice(0)},get bufferingAsset(){return e.bufferingAsset},get bufferingItem(){return t()},get bufferingIndex(){var r=t();return e.findItemIndex(r)},get playingAsset(){return e.effectivePlayingAsset},get playingItem(){return e.effectivePlayingItem},get playingIndex(){var t=e.effectivePlayingItem;return e.findItemIndex(t)},primary:{get bufferedEnd(){return n()},get currentTime(){var t=e.timelinePos;return t>0?t:0},set currentTime(e){s(e,"primary")},get duration(){return a("primary")},get seekableStart(){var t;return(null==(t=e.primaryDetails)?void 0:t.fragmentStart)||0}},integrated:{get bufferedEnd(){return i(t(),"integrated",e.bufferingAsset,"bufferedPos","bufferedEnd")},get currentTime(){return i(e.effectivePlayingItem,"integrated",e.effectivePlayingAsset,"timelinePos","currentTime")},set currentTime(e){s(e,"integrated")},get duration(){return a("integrated")},get seekableStart(){var t;return function(t,r){if(0!==t&&"primary"!==r&&e.schedule.length){var i,n=e.schedule.findItemIndexAtTime(t),a=null==(i=e.schedule.items)?void 0:i[n];if(a)return t+(a[r].start-a.start)}return t}((null==(t=e.primaryDetails)?void 0:t.fragmentStart)||0,"integrated")}},skip:function(){var t=e.effectivePlayingItem,r=null==t?void 0:t.event;if(r&&!r.restrictions.skip){var i=e.findItemIndex(t);if(r.appendInPlace){var n=t.playout.start+t.event.duration;s(n+.001,"playout")}else e.advanceAfterAssetEnded(r,i,1/0)}}}}return this.manager}},{key:"effectivePlayingItem",get:function(){return this.waitingItem||this.playingItem||this.endedItem}},{key:"effectivePlayingAsset",get:function(){return this.playingAsset||this.endedAsset}},{key:"playingLastItem",get:function(){var e,t=this.playingItem,r=null==(e=this.schedule)?void 0:e.items;return!!(this.playbackStarted&&t&&r)&&this.findItemIndex(t)===r.length-1}},{key:"playbackStarted",get:function(){return null!==this.effectivePlayingItem}},{key:"currentTime",get:function(){var e,t,r;if(null!==this.mediaSelection){var i=this.waitingItem||this.playingItem;if(!this.isInterstitial(i)||i.event.appendInPlace){var n=this.media;!n&&null!=(e=this.bufferingItem)&&null!=(t=e.event)&&t.appendInPlace&&(n=this.primaryMedia);var a=null==(r=n)?void 0:r.currentTime;if(void 0!==a&&R(a))return a}}}},{key:"primaryMedia",get:function(){var e;return this.media||(null==(e=this.detachedData)?void 0:e.media)||null}},{key:"playbackDisabled",get:function(){return!1===this.hls.config.enableInterstitialPlayback}},{key:"primaryDetails",get:function(){var e,t;return null==(e=this.mediaSelection)||null==(t=e.main)?void 0:t.details}},{key:"primaryLive",get:function(){var e;return!(null==(e=this.primaryDetails)||!e.live)}}])}(B),Ds=function(e){function t(t,r,i){var n;return(n=e.call(this,t,r,i,"subtitle-stream-controller",F)||this).currentTrackId=-1,n.tracksBuffered=[],n.mainDetails=null,n.registerListeners(),n}u(t,e);var r=t.prototype;return r.onHandlerDestroying=function(){this.unregisterListeners(),e.prototype.onHandlerDestroying.call(this),this.mainDetails=null},r.registerListeners=function(){e.prototype.registerListeners.call(this);var t=this.hls;t.on(_.LEVEL_LOADED,this.onLevelLoaded,this),t.on(_.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.on(_.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),t.on(_.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),t.on(_.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),t.on(_.BUFFER_FLUSHING,this.onBufferFlushing,this)},r.unregisterListeners=function(){e.prototype.unregisterListeners.call(this);var t=this.hls;t.off(_.LEVEL_LOADED,this.onLevelLoaded,this),t.off(_.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.off(_.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),t.off(_.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),t.off(_.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),t.off(_.BUFFER_FLUSHING,this.onBufferFlushing,this)},r.startLoad=function(e,t){this.stopLoad(),this.state=Si.IDLE,this.setInterval(500),this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()},r.onManifestLoading=function(){e.prototype.onManifestLoading.call(this),this.mainDetails=null},r.onMediaDetaching=function(t,r){this.tracksBuffered=[],e.prototype.onMediaDetaching.call(this,t,r)},r.onLevelLoaded=function(e,t){this.mainDetails=t.details},r.onSubtitleFragProcessed=function(e,t){var r=t.frag,i=t.success;if(re(r)&&(this.fragPrevious=r),this.state=Si.IDLE,i){var n=this.tracksBuffered[this.currentTrackId];if(n){for(var a,s=r.start,o=0;o<n.length;o++)if(s>=n[o].start&&s<=n[o].end){a=n[o];break}var l=r.start+r.duration;a?a.end=l:(a={start:s,end:l},n.push(a)),this.fragmentTracker.fragBuffered(r),this.fragBufferedComplete(r,null),this.media&&this.tick()}}},r.onBufferFlushing=function(e,t){var r=t.startOffset,i=t.endOffset;if(0===r&&i!==Number.POSITIVE_INFINITY){var n=i-1;if(n<=0)return;t.endOffsetSubtitles=Math.max(0,n),this.tracksBuffered.forEach((function(e){for(var t=0;t<e.length;)if(e[t].end<=n)e.shift();else{if(!(e[t].start<n))break;e[t].start=n,t++}})),this.fragmentTracker.removeFragmentsInRange(r,n,F)}},r.onError=function(e,t){var r=t.frag;(null==r?void 0:r.type)===F&&(t.details===D.FRAG_GAP&&this.fragmentTracker.fragBuffered(r,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==Si.STOPPED&&(this.state=Si.IDLE))},r.onSubtitleTracksUpdated=function(e,t){var r=this,i=t.subtitleTracks;this.levels&&da(this.levels,i)?this.levels=i.map((function(e){return new at(e)})):(this.tracksBuffered=[],this.levels=i.map((function(e){var t=new at(e);return r.tracksBuffered[t.id]=[],t})),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,F),this.fragPrevious=null,this.mediaBuffer=null)},r.onSubtitleTrackSwitch=function(e,t){var r;if(this.currentTrackId=t.id,null!=(r=this.levels)&&r.length&&-1!==this.currentTrackId){var i=this.levels[this.currentTrackId];null!=i&&i.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,i&&this.state!==Si.STOPPED&&this.setInterval(500)}else this.clearInterval()},r.onSubtitleTrackLoaded=function(e,t){var r,i=this.currentTrackId,n=this.levels,a=t.details,s=t.id;if(n){var o=n[s];if(!(s>=n.length)&&o){if(this.log("Subtitle track "+s+" loaded ["+a.startSN+","+a.endSN+"]"+(a.lastPartSn?"[part-"+a.lastPartSn+"-"+a.lastPartIndex+"]":"")+",duration:"+a.totalduration),this.mediaBuffer=this.mediaBufferTimeRanges,a.live||null!=(r=o.details)&&r.live){var l=this.mainDetails;if(a.deltaUpdateFailed||!l)return;var u,d=l.fragments[0];o.details?0===this.alignPlaylists(a,o.details,null==(u=this.levelLastLoaded)?void 0:u.details)&&d&&ui(a,d.start):a.hasProgramDateTime&&l.hasProgramDateTime?(Ei(a,l),a.fragmentStart):d&&ui(a,d.start)}o.details=a,this.levelLastLoaded=o,s===i&&(this.hls.trigger(_.SUBTITLE_TRACK_UPDATED,{details:a,id:s,groupId:t.groupId}),this.tick(),a.live&&!this.fragCurrent&&this.media&&this.state===Si.IDLE&&(Et(null,a.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),o.details=void 0)))}}else this.warn("Subtitle tracks were reset while loading level "+s)},r._handleFragmentLoadComplete=function(e){var t=this,r=e.frag,i=e.payload,n=r.decryptdata,a=this.hls;if(!this.fragContextChanged(r)&&i&&i.byteLength>0&&null!=n&&n.key&&n.iv&&pr(n.method)){var s=performance.now();this.decrypter.decrypt(new Uint8Array(i),n.key.buffer,n.iv.buffer,yr(n.method)).catch((function(e){throw a.trigger(_.ERROR,{type:k.MEDIA_ERROR,details:D.FRAG_DECRYPT_ERROR,fatal:!1,error:e,reason:e.message,frag:r}),e})).then((function(e){var t=performance.now();a.trigger(_.FRAG_DECRYPTED,{frag:r,payload:e,stats:{tstart:s,tdecrypt:t}})})).catch((function(e){t.warn(e.name+": "+e.message),t.state=Si.IDLE}))}},r.doTick=function(){if(this.media){if(this.state===Si.IDLE){var e=this.currentTrackId,t=this.levels,r=null==t?void 0:t[e];if(!r||!t.length||!r.details)return;if(this.waitForLive(r))return;var i=this.config,n=this.getLoadPosition(),a=ar.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],n,i.maxBufferHole),s=a.end,o=a.len,l=r.details;if(o>this.hls.maxBufferLength+l.levelTargetDuration)return;var u=l.fragments,d=u.length,h=l.edge,f=null,c=this.fragPrevious;if(s<h){var g=i.maxFragLookUpTolerance,v=s>h-g?0:g;!(f=Et(c,u,Math.max(u[0].start,s),v))&&c&&c.start<u[0].start&&(f=u[0])}else f=u[d-1];if(!(f=this.filterReplacedPrimary(f,r.details)))return;var m=u[f.sn-l.startSN-1];if(m&&m.cc===f.cc&&this.fragmentTracker.getState(m)===Nt&&(f=m),this.fragmentTracker.getState(f)===Nt){var p=this.mapToInitFragWhenRequired(f);p&&this.loadFragment(p,r,s)}}}else this.state=Si.IDLE},r.loadFragment=function(t,r,i){re(t)?e.prototype.loadFragment.call(this,t,r,i):this._loadInitSegment(t,r)},n(t,[{key:"mediaBufferTimeRanges",get:function(){return new _s(this.tracksBuffered[this.currentTrackId]||[])}}])}(Ai),_s=function(e){this.buffered=void 0;var t=function(t,r,i){if((r>>>=0)>i-1)throw new DOMException("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+r+") is greater than the maximum bound ("+i+")");return e[r][t]};this.buffered={get length(){return e.length},end:function(r){return t("end",r,e.length)},start:function(r){return t("start",r,e.length)}}};function Ps(e,t){var r;try{r=new Event("addtrack")}catch(e){(r=document.createEvent("Event")).initEvent("addtrack",!1,!1)}r.track=e,t.dispatchEvent(r)}function Cs(e,t){var r=e.mode;if("disabled"===r&&(e.mode="hidden"),e.cues&&!e.cues.getCueById(t.id))try{if(e.addCue(t),!e.cues.getCueById(t.id))throw new Error("addCue is failed for: "+t)}catch(r){j.debug("[texttrack-utils]: "+r);try{var i=new self.TextTrackCue(t.startTime,t.endTime,t.text);i.id=t.id,e.addCue(i)}catch(e){j.debug("[texttrack-utils]: Legacy TextTrackCue fallback failed: "+e)}}"disabled"===r&&(e.mode=r)}function ws(e,t){var r=e.mode;if("disabled"===r&&(e.mode="hidden"),e.cues)for(var i=e.cues.length;i--;)t&&e.cues[i].removeEventListener("enter",t),e.removeCue(e.cues[i]);"disabled"===r&&(e.mode=r)}function Os(e,t,r,i){var n=e.mode;if("disabled"===n&&(e.mode="hidden"),e.cues&&e.cues.length>0)for(var a=function(e,t,r){var i=[],n=function(e,t){if(t<=e[0].startTime)return 0;var r=e.length-1;if(t>e[r].endTime)return-1;for(var i,n=0,a=r;n<=a;)if(t<e[i=Math.floor((a+n)/2)].startTime)a=i-1;else{if(!(t>e[i].startTime&&n<r))return i;n=i+1}return e[n].startTime-t<t-e[a].startTime?n:a}(e,t);if(n>-1)for(var a=n,s=e.length;a<s;a++){var o=e[a];if(o.startTime>=t&&o.endTime<=r)i.push(o);else if(o.startTime>r)return i}return i}(e.cues,t,r),s=0;s<a.length;s++)i&&!i(a[s])||e.removeCue(a[s]);"disabled"===n&&(e.mode=n)}function xs(e){for(var t=[],r=0;r<e.length;r++){var i=e[r];"subtitles"!==i.kind&&"captions"!==i.kind||!i.label||t.push(e[r])}return t}var Ms=function(e){function t(t){var r;return(r=e.call(this,t,"subtitle-track-controller")||this).media=null,r.tracks=[],r.groupIds=null,r.tracksInGroup=[],r.trackId=-1,r.currentTrack=null,r.selectDefaultTrack=!0,r.queuedDefaultTrack=-1,r.useTextTrackPolling=!1,r.subtitlePollingInterval=-1,r._subtitleDisplay=!0,r.asyncPollTrackChange=function(){return r.pollTrackChange(0)},r.onTextTracksChanged=function(){if(r.useTextTrackPolling||self.clearInterval(r.subtitlePollingInterval),r.media&&r.hls.config.renderTextTracksNatively){for(var e=null,t=xs(r.media.textTracks),i=0;i<t.length;i++)if("hidden"===t[i].mode)e=t[i];else if("showing"===t[i].mode){e=t[i];break}var n=r.findTrackForTextTrack(e);r.subtitleTrack!==n&&r.setSubtitleTrack(n)}},r.registerListeners(),r}u(t,e);var r=t.prototype;return r.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,this.onTextTracksChanged=this.asyncPollTrackChange=null,e.prototype.destroy.call(this)},r.registerListeners=function(){var e=this.hls;e.on(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.MANIFEST_PARSED,this.onManifestParsed,this),e.on(_.LEVEL_LOADING,this.onLevelLoading,this),e.on(_.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(_.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(_.ERROR,this.onError,this)},r.unregisterListeners=function(){var e=this.hls;e.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.MANIFEST_PARSED,this.onManifestParsed,this),e.off(_.LEVEL_LOADING,this.onLevelLoading,this),e.off(_.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(_.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(_.ERROR,this.onError,this)},r.onMediaAttached=function(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))},r.pollTrackChange=function(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.onTextTracksChanged,e)},r.onMediaDetaching=function(e,t){var r=this.media;if(r){var i=!!t.transferMedia;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||r.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),this.subtitleTrack=-1,this.media=null,i||xs(r.textTracks).forEach((function(e){ws(e)}))}},r.onManifestLoading=function(){this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0},r.onManifestParsed=function(e,t){this.tracks=t.subtitleTracks},r.onSubtitleTrackLoaded=function(e,t){var r=t.id,i=t.groupId,n=t.details,a=this.tracksInGroup[r];if(a&&a.groupId===i){var s=a.details;a.details=t.details,this.log("Subtitle track "+r+' "'+a.name+'" lang:'+a.lang+" group:"+i+" loaded ["+n.startSN+"-"+n.endSN+"]"),r===this.trackId&&this.playlistLoaded(r,t,s)}else this.warn("Subtitle track with id:"+r+" and group:"+i+" not found in active group "+(null==a?void 0:a.groupId))},r.onLevelLoading=function(e,t){this.switchLevel(t.level)},r.onLevelSwitching=function(e,t){this.switchLevel(t.level)},r.switchLevel=function(e){var t=this.hls.levels[e];if(t){var r=t.subtitleGroups||null,i=this.groupIds,n=this.currentTrack;if(!r||(null==i?void 0:i.length)!==(null==r?void 0:r.length)||null!=r&&r.some((function(e){return-1===(null==i?void 0:i.indexOf(e))}))){this.groupIds=r,this.trackId=-1,this.currentTrack=null;var a=this.tracks.filter((function(e){return!r||-1!==r.indexOf(e.groupId)}));if(a.length)this.selectDefaultTrack&&!a.some((function(e){return e.default}))&&(this.selectDefaultTrack=!1),a.forEach((function(e,t){e.id=t}));else if(!n&&!this.tracksInGroup.length)return;this.tracksInGroup=a;var s=this.hls.config.subtitlePreference;if(!n&&s){this.selectDefaultTrack=!1;var o=ft(s,a);if(o>-1)n=a[o];else{var l=ft(s,this.tracks);n=this.tracks[l]}}var u=this.findTrackId(n);-1===u&&n&&(u=this.findTrackId(null));var d={subtitleTracks:a};this.log("Updating subtitle tracks, "+a.length+' track(s) found in "'+(null==r?void 0:r.join(","))+'" group-id'),this.hls.trigger(_.SUBTITLE_TRACKS_UPDATED,d),-1!==u&&-1===this.trackId&&this.setSubtitleTrack(u)}}},r.findTrackId=function(e){for(var t=this.tracksInGroup,r=this.selectDefaultTrack,i=0;i<t.length;i++){var n=t[i];if((!r||n.default)&&(r||e)&&(!e||ct(n,e)))return i}if(e){for(var a=0;a<t.length;a++){var s=t[a];if(ha(e.attrs,s.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return a}for(var o=0;o<t.length;o++){var l=t[o];if(ha(e.attrs,l.attrs,["LANGUAGE"]))return o}}return-1},r.findTrackForTextTrack=function(e){if(e)for(var t=this.tracksInGroup,r=0;r<t.length;r++)if(fa(t[r],e))return r;return-1},r.onError=function(e,t){!t.fatal&&t.context&&(t.context.type!==O||t.context.id!==this.trackId||this.groupIds&&-1===this.groupIds.indexOf(t.context.groupId)||this.checkRetry(t))},r.setSubtitleOption=function(e){if(this.hls.config.subtitlePreference=e,e){if(-1===e.id)return this.setSubtitleTrack(-1),null;var t=this.allSubtitleTracks;if(this.selectDefaultTrack=!1,t.length){var r=this.currentTrack;if(r&&ct(e,r))return r;var i=ft(e,this.tracksInGroup);if(i>-1){var n=this.tracksInGroup[i];return this.setSubtitleTrack(i),n}if(r)return null;var a=ft(e,t);if(a>-1)return t[a]}}return null},r.loadPlaylist=function(t){e.prototype.loadPlaylist.call(this),this.shouldLoadPlaylist(this.currentTrack)&&this.scheduleLoading(this.currentTrack,t)},r.loadingPlaylist=function(t,r){e.prototype.loadingPlaylist.call(this,t,r);var i=t.id,n=t.groupId,a=this.getUrlWithDirectives(t.url,r),s=t.details,o=null==s?void 0:s.age;this.log("Loading subtitle "+i+' "'+t.name+'" lang:'+t.lang+" group:"+n+(void 0!==(null==r?void 0:r.msn)?" at sn "+r.msn+" part "+r.part:"")+(o&&s.live?" age "+o.toFixed(1)+(s.type&&" "+s.type||""):"")+" "+a),this.hls.trigger(_.SUBTITLE_TRACK_LOADING,{url:a,id:i,groupId:n,deliveryDirectives:r||null,track:t})},r.toggleTrackModes=function(){var e=this.media;if(e){var t,r=xs(e.textTracks),i=this.currentTrack;if(i&&((t=r.filter((function(e){return fa(i,e)}))[0])||this.warn('Unable to find subtitle TextTrack with name "'+i.name+'" and language "'+i.lang+'"')),[].slice.call(r).forEach((function(e){"disabled"!==e.mode&&e!==t&&(e.mode="disabled")})),t){var n=this.subtitleDisplay?"showing":"hidden";t.mode!==n&&(t.mode=n)}}},r.setSubtitleTrack=function(e){var t=this.tracksInGroup;if(this.media)if(e<-1||e>=t.length||!R(e))this.warn("Invalid subtitle track id: "+e);else{this.selectDefaultTrack=!1;var r=this.currentTrack,i=t[e]||null;if(this.trackId=e,this.currentTrack=i,this.toggleTrackModes(),i){var n=!!i.details&&!i.details.live;if(e!==this.trackId||i!==r||!n){this.log("Switching to subtitle-track "+e+(i?' "'+i.name+'" lang:'+i.lang+" group:"+i.groupId:""));var a=i.id,s=i.groupId,o=void 0===s?"":s,l=i.name,u=i.type,d=i.url;this.hls.trigger(_.SUBTITLE_TRACK_SWITCH,{id:a,groupId:o,name:l,type:u,url:d});var h=this.switchParams(i.url,null==r?void 0:r.details,i.details);this.loadPlaylist(h)}}else this.hls.trigger(_.SUBTITLE_TRACK_SWITCH,{id:e})}else this.queuedDefaultTrack=e},n(t,[{key:"subtitleDisplay",get:function(){return this._subtitleDisplay},set:function(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes()}},{key:"allSubtitleTracks",get:function(){return this.tracks}},{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(e){this.selectDefaultTrack=!1,this.setSubtitleTrack(e)}}])}(ua),Fs={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},Ns=function(e){return String.fromCharCode(Fs[e]||e)},Us=15,Bs=100,Gs={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},Ks={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Hs={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Vs={25:2,26:4,29:6,30:8,31:10,27:13,28:15},Ys=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],Ws=function(){function e(){this.time=null,this.verboseLevel=0}return e.prototype.log=function(e,t){if(this.verboseLevel>=e){var r="function"==typeof t?t():t;j.log(this.time+" ["+e+"] "+r)}},e}(),js=function(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r].toString(16));return t},qs=function(){function e(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}var t=e.prototype;return t.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},t.setStyles=function(e){for(var t=["foreground","underline","italics","background","flash"],r=0;r<t.length;r++){var i=t[r];e.hasOwnProperty(i)&&(this[i]=e[i])}},t.isDefault=function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},t.equals=function(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash},t.copy=function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash},t.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},e}(),Xs=function(){function e(){this.uchar=" ",this.penState=new qs}var t=e.prototype;return t.reset=function(){this.uchar=" ",this.penState.reset()},t.setChar=function(e,t){this.uchar=e,this.penState.copy(t)},t.setPenState=function(e){this.penState.copy(e)},t.equals=function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)},t.copy=function(e){this.uchar=e.uchar,this.penState.copy(e.penState)},t.isEmpty=function(){return" "===this.uchar&&this.penState.isDefault()},e}(),zs=function(){function e(e){this.chars=[],this.pos=0,this.currPenState=new qs,this.cueStartTime=null,this.logger=void 0;for(var t=0;t<Bs;t++)this.chars.push(new Xs);this.logger=e}var t=e.prototype;return t.equals=function(e){for(var t=0;t<Bs;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0},t.copy=function(e){for(var t=0;t<Bs;t++)this.chars[t].copy(e.chars[t])},t.isEmpty=function(){for(var e=!0,t=0;t<Bs;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e},t.setCursor=function(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(3,"Negative cursor position "+this.pos),this.pos=0):this.pos>Bs&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=Bs)},t.moveCursor=function(e){var t=this.pos+e;if(e>1)for(var r=this.pos+1;r<t+1;r++)this.chars[r].setPenState(this.currPenState);this.setCursor(t)},t.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},t.insertChar=function(e){var t=this;e>=144&&this.backSpace();var r=Ns(e);this.pos>=Bs?this.logger.log(0,(function(){return"Cannot insert "+e.toString(16)+" ("+r+") at position "+t.pos+". Skipping it!"})):(this.chars[this.pos].setChar(r,this.currPenState),this.moveCursor(1))},t.clearFromPos=function(e){var t;for(t=e;t<Bs;t++)this.chars[t].reset()},t.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},t.clearToEndOfRow=function(){this.clearFromPos(this.pos)},t.getTextString=function(){for(var e=[],t=!0,r=0;r<Bs;r++){var i=this.chars[r].uchar;" "!==i&&(t=!1),e.push(i)}return t?"":e.join("")},t.setPenStyles=function(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)},e}(),Qs=function(){function e(e){this.rows=[],this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(var t=0;t<Us;t++)this.rows.push(new zs(e));this.logger=e}var t=e.prototype;return t.reset=function(){for(var e=0;e<Us;e++)this.rows[e].clear();this.currRow=14},t.equals=function(e){for(var t=!0,r=0;r<Us;r++)if(!this.rows[r].equals(e.rows[r])){t=!1;break}return t},t.copy=function(e){for(var t=0;t<Us;t++)this.rows[t].copy(e.rows[t])},t.isEmpty=function(){for(var e=!0,t=0;t<Us;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e},t.backSpace=function(){this.rows[this.currRow].backSpace()},t.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},t.insertChar=function(e){this.rows[this.currRow].insertChar(e)},t.setPen=function(e){this.rows[this.currRow].setPenStyles(e)},t.moveCursor=function(e){this.rows[this.currRow].moveCursor(e)},t.setCursor=function(e){this.logger.log(2,"setCursor: "+e),this.rows[this.currRow].setCursor(e)},t.setPAC=function(e){this.logger.log(2,(function(){return"pacData = "+lt(e)}));var t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(var r=0;r<Us;r++)this.rows[r].clear();var i=this.currRow+1-this.nrRollUpRows,n=this.lastOutputScreen;if(n){var a=n.rows[i].cueStartTime,s=this.logger.time;if(null!==a&&null!==s&&a<s)for(var o=0;o<this.nrRollUpRows;o++)this.rows[t-this.nrRollUpRows+o+1].copy(n.rows[i+o])}}this.currRow=t;var l=this.rows[this.currRow];if(null!==e.indent){var u=e.indent,d=Math.max(u-1,0);l.setCursor(e.indent),e.color=l.chars[d].penState.foreground}var h={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(h)},t.setBkgData=function(e){this.logger.log(2,(function(){return"bkgData = "+lt(e)})),this.backSpace(),this.setPen(e),this.insertChar(32)},t.setRollUpRows=function(e){this.nrRollUpRows=e},t.rollUp=function(){var e=this;if(null!==this.nrRollUpRows){this.logger.log(1,(function(){return e.getDisplayText()}));var t=this.currRow+1-this.nrRollUpRows,r=this.rows.splice(t,1)[0];r.clear(),this.rows.splice(this.currRow,0,r),this.logger.log(2,"Rolling up")}else this.logger.log(3,"roll_up but nrRollUpRows not set yet")},t.getDisplayText=function(e){e=e||!1;for(var t=[],r="",i=-1,n=0;n<Us;n++){var a=this.rows[n].getTextString();a&&(i=n+1,e?t.push("Row "+i+": '"+a+"'"):t.push(a.trim()))}return t.length>0&&(r=e?"["+t.join(" | ")+"]":t.join("\n")),r},t.getTextAndFormat=function(){return this.rows},e}(),$s=function(){function e(e,t,r){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new Qs(r),this.nonDisplayedMemory=new Qs(r),this.lastOutputScreen=new Qs(r),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=r}var t=e.prototype;return t.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},t.getHandler=function(){return this.outputFilter},t.setHandler=function(e){this.outputFilter=e},t.setPAC=function(e){this.writeScreen.setPAC(e)},t.setBkgData=function(e){this.writeScreen.setBkgData(e)},t.setMode=function(e){e!==this.mode&&(this.mode=e,this.logger.log(2,(function(){return"MODE="+e})),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)},t.insertChars=function(e){for(var t=this,r=0;r<e.length;r++)this.writeScreen.insertChar(e[r]);var i=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,(function(){return i+": "+t.writeScreen.getDisplayText(!0)})),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(this.logger.log(1,(function(){return"DISPLAYED: "+t.displayedMemory.getDisplayText(!0)})),this.outputDataUpdate())},t.ccRCL=function(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},t.ccBS=function(){this.logger.log(2,"BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},t.ccAOF=function(){},t.ccAON=function(){},t.ccDER=function(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},t.ccRU=function(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)},t.ccFON=function(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},t.ccRDC=function(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},t.ccTR=function(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")},t.ccRTD=function(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")},t.ccEDM=function(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},t.ccCR=function(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},t.ccENM=function(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},t.ccEOC=function(){var e=this;if(this.logger.log(2,"EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var t=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=t,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,(function(){return"DISP: "+e.displayedMemory.getDisplayText()}))}this.outputDataUpdate(!0)},t.ccTO=function(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)},t.ccMIDROW=function(e){var t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{var r=Math.floor(e/2)-16;t.foreground=["white","green","blue","cyan","red","yellow","magenta"][r]}this.logger.log(2,"MIDROW: "+lt(t)),this.writeScreen.setPen(t)},t.outputDataUpdate=function(e){void 0===e&&(e=!1);var t=this.logger.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))},t.cueSplitAtTime=function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))},e}(),Js=function(){function e(e,t,r){this.channels=void 0,this.currentChannel=0,this.cmdHistory={a:null,b:null},this.logger=void 0;var i=this.logger=new Ws;this.channels=[null,new $s(e,t,i),new $s(e+1,r,i)]}var t=e.prototype;return t.getHandler=function(e){return this.channels[e].getHandler()},t.setHandler=function(e,t){this.channels[e].setHandler(t)},t.addData=function(e,t){var r=this;this.logger.time=e;for(var i=function(e){var i=127&t[e],n=127&t[e+1],a=!1,s=null;if(0===i&&0===n)return 0;r.logger.log(3,(function(){return"["+js([t[e],t[e+1]])+"] -> ("+js([i,n])+")"}));var o=r.cmdHistory;if(i>=16&&i<=31){if(function(e,t,r){return r.a===e&&r.b===t}(i,n,o))return Zs(null,null,o),r.logger.log(3,(function(){return"Repeated command ("+js([i,n])+") is dropped"})),0;Zs(i,n,r.cmdHistory),(a=r.parseCmd(i,n))||(a=r.parseMidrow(i,n)),a||(a=r.parsePAC(i,n)),a||(a=r.parseBackgroundAttributes(i,n))}else Zs(null,null,o);if(!a&&(s=r.parseChars(i,n))){var l=r.currentChannel;l&&l>0?r.channels[l].insertChars(s):r.logger.log(2,"No channel found yet. TEXT-MODE?")}a||s||r.logger.log(2,(function(){return"Couldn't parse cleaned data "+js([i,n])+" orig: "+js([t[e],t[e+1]])}))},n=0;n<t.length;n+=2)i(n)},t.parseCmd=function(e,t){if(!((20===e||28===e||21===e||29===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=33&&t<=35))return!1;var r=20===e||21===e||23===e?1:2,i=this.channels[r];return 20===e||21===e||28===e||29===e?32===t?i.ccRCL():33===t?i.ccBS():34===t?i.ccAOF():35===t?i.ccAON():36===t?i.ccDER():37===t?i.ccRU(2):38===t?i.ccRU(3):39===t?i.ccRU(4):40===t?i.ccFON():41===t?i.ccRDC():42===t?i.ccTR():43===t?i.ccRTD():44===t?i.ccEDM():45===t?i.ccCR():46===t?i.ccENM():47===t&&i.ccEOC():i.ccTO(t-32),this.currentChannel=r,!0},t.parseMidrow=function(e,t){var r=0;if((17===e||25===e)&&t>=32&&t<=47){if((r=17===e?1:2)!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;var i=this.channels[r];return!!i&&(i.ccMIDROW(t),this.logger.log(3,(function(){return"MIDROW ("+js([e,t])+")"})),!0)}return!1},t.parsePAC=function(e,t){var r;if(!((e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127||(16===e||24===e)&&t>=64&&t<=95))return!1;var i=e<=23?1:2;r=t>=64&&t<=95?1===i?Gs[e]:Hs[e]:1===i?Ks[e]:Vs[e];var n=this.channels[i];return!!n&&(n.setPAC(this.interpretPAC(r,t)),this.currentChannel=i,!0)},t.interpretPAC=function(e,t){var r,i={color:null,italics:!1,indent:null,underline:!1,row:e};return r=t>95?t-96:t-64,i.underline=1==(1&r),r<=13?i.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(r/2)]:r<=15?(i.italics=!0,i.color="white"):i.indent=4*Math.floor((r-16)/2),i},t.parseChars=function(e,t){var r,i,n=null,a=null;return e>=25?(r=2,a=e-8):(r=1,a=e),a>=17&&a<=19?(i=17===a?t+80:18===a?t+112:t+144,this.logger.log(2,(function(){return"Special char '"+Ns(i)+"' in channel "+r})),n=[i]):e>=32&&e<=127&&(n=0===t?[e]:[e,t]),n&&this.logger.log(3,(function(){return"Char codes = "+js(n).join(",")})),n},t.parseBackgroundAttributes=function(e,t){var r;if(!((16===e||24===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=45&&t<=47))return!1;var i={};16===e||24===e?(r=Math.floor((t-32)/2),i.background=Ys[r],t%2==1&&(i.background=i.background+"_semi")):45===t?i.background="transparent":(i.foreground="black",47===t&&(i.underline=!0));var n=e<=23?1:2;return this.channels[n].setBkgData(i),!0},t.reset=function(){for(var e=0;e<Object.keys(this.channels).length;e++){var t=this.channels[e];t&&t.reset()}Zs(null,null,this.cmdHistory)},t.cueSplitAtTime=function(e){for(var t=0;t<this.channels.length;t++){var r=this.channels[t];r&&r.cueSplitAtTime(e)}},e}();function Zs(e,t,r){r.a=e,r.b=t}var eo=function(){if(null!=Ar&&Ar.VTTCue)return self.VTTCue;var e=["","lr","rl"],t=["start","middle","end","left","right"];function r(e,t){if("string"!=typeof t)return!1;if(!Array.isArray(e))return!1;var r=t.toLowerCase();return!!~e.indexOf(r)&&r}function i(e){return r(t,e)}function n(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];for(var n=1;n<arguments.length;n++){var a=arguments[n];for(var s in a)e[s]=a[s]}return e}function a(t,a,s){var o=this,l={enumerable:!0};o.hasBeenReset=!1;var u="",d=!1,h=t,f=a,c=s,g=null,v="",m=!0,p="auto",y="start",E=50,T="middle",S=50,A="middle";Object.defineProperty(o,"id",n({},l,{get:function(){return u},set:function(e){u=""+e}})),Object.defineProperty(o,"pauseOnExit",n({},l,{get:function(){return d},set:function(e){d=!!e}})),Object.defineProperty(o,"startTime",n({},l,{get:function(){return h},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");h=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"endTime",n({},l,{get:function(){return f},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");f=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"text",n({},l,{get:function(){return c},set:function(e){c=""+e,this.hasBeenReset=!0}})),Object.defineProperty(o,"region",n({},l,{get:function(){return g},set:function(e){g=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"vertical",n({},l,{get:function(){return v},set:function(t){var i=function(t){return r(e,t)}(t);if(!1===i)throw new SyntaxError("An invalid or illegal string was specified.");v=i,this.hasBeenReset=!0}})),Object.defineProperty(o,"snapToLines",n({},l,{get:function(){return m},set:function(e){m=!!e,this.hasBeenReset=!0}})),Object.defineProperty(o,"line",n({},l,{get:function(){return p},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");p=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"lineAlign",n({},l,{get:function(){return y},set:function(e){var t=i(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");y=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"position",n({},l,{get:function(){return E},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");E=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"positionAlign",n({},l,{get:function(){return T},set:function(e){var t=i(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");T=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"size",n({},l,{get:function(){return S},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");S=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"align",n({},l,{get:function(){return A},set:function(e){var t=i(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");A=t,this.hasBeenReset=!0}})),o.displayState=void 0}return a.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},a}(),to=function(){function e(){}return e.prototype.decode=function(e,t){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))},e}();function ro(e){function t(e,t,r,i){return 3600*(0|e)+60*(0|t)+(0|r)+parseFloat(i||0)}var r=e.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return r?parseFloat(r[2])>59?t(r[2],r[3],0,r[4]):t(r[1],r[2],r[3],r[4]):null}var io=function(){function e(){this.values=Object.create(null)}var t=e.prototype;return t.set=function(e,t){this.get(e)||""===t||(this.values[e]=t)},t.get=function(e,t,r){return r?this.has(e)?this.values[e]:t[r]:this.has(e)?this.values[e]:t},t.has=function(e){return e in this.values},t.alt=function(e,t,r){for(var i=0;i<r.length;++i)if(t===r[i]){this.set(e,t);break}},t.integer=function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},t.percent=function(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){var r=parseFloat(t);if(r>=0&&r<=100)return this.set(e,r),!0}return!1},e}();function no(e,t,r,i){var n=i?e.split(i):[e];for(var a in n)if("string"==typeof n[a]){var s=n[a].split(r);2===s.length&&t(s[0],s[1])}}var ao=new eo(0,0,""),so="middle"===ao.align?"middle":"center";function oo(e,t,r){var i=e;function n(){var t=ro(e);if(null===t)throw new Error("Malformed timestamp: "+i);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function a(){e=e.replace(/^\s+/,"")}if(a(),t.startTime=n(),a(),"--\x3e"!==e.slice(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+i);e=e.slice(3),a(),t.endTime=n(),a(),function(e,t){var i=new io;no(e,(function(e,t){var n;switch(e){case"region":for(var a=r.length-1;a>=0;a--)if(r[a].id===t){i.set(e,r[a].region);break}break;case"vertical":i.alt(e,t,["rl","lr"]);break;case"line":n=t.split(","),i.integer(e,n[0]),i.percent(e,n[0])&&i.set("snapToLines",!1),i.alt(e,n[0],["auto"]),2===n.length&&i.alt("lineAlign",n[1],["start",so,"end"]);break;case"position":n=t.split(","),i.percent(e,n[0]),2===n.length&&i.alt("positionAlign",n[1],["start",so,"end","line-left","line-right","auto"]);break;case"size":i.percent(e,t);break;case"align":i.alt(e,t,["start",so,"end","left","right"])}}),/:/,/\s/),t.region=i.get("region",null),t.vertical=i.get("vertical","");var n=i.get("line","auto");"auto"===n&&-1===ao.line&&(n=-1),t.line=n,t.lineAlign=i.get("lineAlign","start"),t.snapToLines=i.get("snapToLines",!0),t.size=i.get("size",100),t.align=i.get("align",so);var a=i.get("position","auto");"auto"===a&&50===ao.position&&(a="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=a}(e,t)}function lo(e){return e.replace(/<br(?: \/)?>/gi,"\n")}var uo=function(){function e(){this.state="INITIAL",this.buffer="",this.decoder=new to,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var t=e.prototype;return t.parse=function(e){var t=this;function r(){var e=t.buffer,r=0;for(e=lo(e);r<e.length&&"\r"!==e[r]&&"\n"!==e[r];)++r;var i=e.slice(0,r);return"\r"===e[r]&&++r,"\n"===e[r]&&++r,t.buffer=e.slice(r),i}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var i="";if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var n=(i=r()).match(/^()?WEBVTT([ \t].*)?$/);if(null==n||!n[0])throw new Error("Malformed WebVTT signature.");t.state="HEADER"}for(var a=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(a?a=!1:i=r(),t.state){case"HEADER":/:/.test(i)?no(i,(function(e,t){}),/:/):i||(t.state="ID");continue;case"NOTE":i||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){t.state="NOTE";break}if(!i)continue;if(t.cue=new eo(0,0,""),t.state="CUE",-1===i.indexOf("--\x3e")){t.cue.id=i;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{oo(i,t.cue,t.regionList)}catch(e){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var s=-1!==i.indexOf("--\x3e");if(!i||s&&(a=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(null===t.cue)continue;t.cue.text&&(t.cue.text+="\n"),t.cue.text+=i;continue;case"BADCUE":i||(t.state="ID")}}}catch(e){"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},t.flush=function(){var e=this;try{if((e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state||"BADWEBVTT"===e.state)throw new Error("Malformed WebVTT signature.")}catch(t){e.onparsingerror&&e.onparsingerror(t)}return e.onflush&&e.onflush(),this},e}(),ho=/\r\n|\n\r|\n|\r/g,fo=function(e,t,r){return void 0===r&&(r=0),e.slice(r,r+t.length)===t};function co(e,t,r){return fs(e.toString())+fs(t.toString())+fs(r)}function go(e,t,r,i,n,a,s){var o,l,u,d=new uo,h=z(new Uint8Array(e)).trim().replace(ho,"\n").split("\n"),f=[],c=t?(o=t.baseTime,void 0===(l=t.timescale)&&(l=1),Mn(o,xn,1/l)):0,g="00:00.000",v=0,m=0,p=!0;d.oncue=function(e){var a=r[i],s=r.ccOffset,o=(v-c)/9e4;if(null!=a&&a.new&&(void 0!==m?s=r.ccOffset=a.start:function(e,t,r){var i=e[t],n=e[i.prevCC];if(!n||!n.new&&i.new)return e.ccOffset=e.presentationOffset=i.start,void(i.new=!1);for(;null!=(a=n)&&a.new;){var a;e.ccOffset+=i.start-n.start,i.new=!1,n=e[(i=n).prevCC]}e.presentationOffset=r}(r,i,o)),o){if(!t)return void(u=new Error("Missing initPTS for VTT MPEGTS"));s=o-r.presentationOffset}var l=e.endTime-e.startTime,d=Kn(9e4*(e.startTime+s-m),9e4*n)/9e4;e.startTime=Math.max(d,0),e.endTime=Math.max(d+l,0);var h=e.text.trim();e.text=decodeURIComponent(encodeURIComponent(h)),e.id||(e.id=co(e.startTime,e.endTime,h)),e.endTime>0&&f.push(e)},d.onparsingerror=function(e){u=e},d.onflush=function(){u?s(u):a(f)},h.forEach((function(e){if(p){if(fo(e,"X-TIMESTAMP-MAP=")){p=!1,e.slice(16).split(",").forEach((function(e){fo(e,"LOCAL:")?g=e.slice(6):fo(e,"MPEGTS:")&&(v=parseInt(e.slice(7)))}));try{m=function(e){var t=parseInt(e.slice(-3)),r=parseInt(e.slice(-6,-4)),i=parseInt(e.slice(-9,-7)),n=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!(R(t)&&R(r)&&R(i)&&R(n)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+e);return t+=1e3*r,(t+=6e4*i)+36e5*n}(g)/1e3}catch(e){u=e}return}""===e&&(p=!1)}d.parse(e+"\n")})),d.flush()}var vo="stpp.ttml.im1t",mo=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,po=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,yo={left:"start",center:"center",right:"end",start:"start",end:"end"};function Eo(e,t,r,i){var n=ve(new Uint8Array(e),["mdat"]);if(0!==n.length){var a,s,l,u,d=n.map((function(e){return z(e)})),h=(a=t.baseTime,s=1,void 0===(l=t.timescale)&&(l=1),void 0===u&&(u=!1),Mn(a,s,1/l,u));try{d.forEach((function(e){return r(function(e,t){var r=(new DOMParser).parseFromString(e,"text/xml"),i=r.getElementsByTagName("tt")[0];if(!i)throw new Error("Invalid ttml");var n={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},a=Object.keys(n).reduce((function(e,t){return e[t]=i.getAttribute("ttp:"+t)||n[t],e}),{}),s="preserve"!==i.getAttribute("xml:space"),l=So(To(i,"styling","style")),u=So(To(i,"layout","region")),d=To(i,"body","[begin]");return[].map.call(d,(function(e){var r=Ao(e,s);if(!r||!e.hasAttribute("begin"))return null;var i=Io(e.getAttribute("begin"),a),n=Io(e.getAttribute("dur"),a),d=Io(e.getAttribute("end"),a);if(null===i)throw Ro(e);if(null===d){if(null===n)throw Ro(e);d=i+n}var h=new eo(i-t,d-t,r);h.id=co(h.startTime,h.endTime,h.text);var f=function(e,t,r){var i="http://www.w3.org/ns/ttml#styling",n=null,a=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],s=null!=e&&e.hasAttribute("style")?e.getAttribute("style"):null;return s&&r.hasOwnProperty(s)&&(n=r[s]),a.reduce((function(r,a){var s=Lo(t,i,a)||Lo(e,i,a)||Lo(n,i,a);return s&&(r[a]=s),r}),{})}(u[e.getAttribute("region")],l[e.getAttribute("style")],l),c=f.textAlign;if(c){var g=yo[c];g&&(h.lineAlign=g),h.align=c}return o(h,f),h})).filter((function(e){return null!==e}))}(e,h))}))}catch(e){i(e)}}else i(new Error("Could not parse IMSC1 mdat"))}function To(e,t,r){var i=e.getElementsByTagName(t)[0];return i?[].slice.call(i.querySelectorAll(r)):[]}function So(e){return e.reduce((function(e,t){var r=t.getAttribute("xml:id");return r&&(e[r]=t),e}),{})}function Ao(e,t){return[].slice.call(e.childNodes).reduce((function(e,r,i){var n;return"br"===r.nodeName&&i?e+"\n":null!=(n=r.childNodes)&&n.length?Ao(r,t):t?e+r.textContent.trim().replace(/\s+/g," "):e+r.textContent}),"")}function Lo(e,t,r){return e&&e.hasAttributeNS(t,r)?e.getAttributeNS(t,r):null}function Ro(e){return new Error("Could not parse ttml timestamp "+e)}function Io(e,t){if(!e)return null;var r=ro(e);return null===r&&(mo.test(e)?r=function(e,t){var r=mo.exec(e),i=(0|r[4])+(0|r[5])/t.subFrameRate;return 3600*(0|r[1])+60*(0|r[2])+(0|r[3])+i/t.frameRate}(e,t):po.test(e)&&(r=function(e,t){var r=po.exec(e),i=Number(r[1]);switch(r[2]){case"h":return 3600*i;case"m":return 60*i;case"ms":return 1e3*i;case"f":return i/t.frameRate;case"t":return i/t.tickRate}return i}(e,t))),r}var bo=function(){function e(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}var t=e.prototype;return t.dispatchCue=function(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)},t.newCue=function(e,t,r){(null===this.startTime||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=r,this.timelineController.createCaptionsTrack(this.trackName)},t.reset=function(){this.cueRanges=[],this.startTime=null},e}(),ko=function(){function e(e){this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this.captionsProperties=void 0,this.hls=e,this.config=e.config,this.Cues=e.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},e.on(_.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(_.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(_.FRAG_LOADING,this.onFragLoading,this),e.on(_.FRAG_LOADED,this.onFragLoaded,this),e.on(_.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(_.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(_.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(_.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(_.BUFFER_FLUSHING,this.onBufferFlushing,this)}var t=e.prototype;return t.destroy=function(){var e=this.hls;e.off(_.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(_.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(_.FRAG_LOADING,this.onFragLoading,this),e.off(_.FRAG_LOADED,this.onFragLoaded,this),e.off(_.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(_.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(_.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(_.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(_.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.media=null,this.cea608Parser1=this.cea608Parser2=void 0},t.initCea608Parsers=function(){var e=new bo(this,"textTrack1"),t=new bo(this,"textTrack2"),r=new bo(this,"textTrack3"),i=new bo(this,"textTrack4");this.cea608Parser1=new Js(1,e,t),this.cea608Parser2=new Js(3,r,i)},t.addCues=function(e,t,r,i,n){for(var a,s,o,l,u=!1,d=n.length;d--;){var h=n[d],f=(a=h[0],s=h[1],o=t,l=r,Math.min(s,l)-Math.max(a,o));if(f>=0&&(h[0]=Math.min(h[0],t),h[1]=Math.max(h[1],r),u=!0,f/(r-t)>.5))return}if(u||n.push([t,r]),this.config.renderTextTracksNatively){var c=this.captionsTracks[e];this.Cues.newCue(c,t,r,i)}else{var g=this.Cues.newCue(null,t,r,i);this.hls.trigger(_.CUES_PARSED,{type:"captions",cues:g,track:e})}},t.onInitPtsFound=function(e,t){var r=this,i=t.frag,n=t.id,a=t.initPTS,s=t.timescale,o=this.unparsedVttFrags;n===x&&(this.initPTS[i.cc]={baseTime:a,timescale:s}),o.length&&(this.unparsedVttFrags=[],o.forEach((function(e){r.onFragLoaded(_.FRAG_LOADED,e)})))},t.getExistingTrack=function(e,t){var r=this.media;if(r)for(var i=0;i<r.textTracks.length;i++){var n=r.textTracks[i];if(_o(n,{name:e,lang:t,characteristics:"transcribes-spoken-dialog,describes-music-and-sound"}))return n}return null},t.createCaptionsTrack=function(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)},t.createNativeTrack=function(e){if(!this.captionsTracks[e]){var t=this.captionsProperties,r=this.captionsTracks,i=this.media,n=t[e],a=n.label,s=n.languageCode,o=this.getExistingTrack(a,s);if(o)r[e]=o,ws(r[e]),Ps(r[e],i);else{var l=this.createTextTrack("captions",a,s);l&&(l[e]=!0,r[e]=l)}}},t.createNonNativeTrack=function(e){if(!this.nonNativeCaptionsTracks[e]){var t=this.captionsProperties[e];if(t){var r={_id:e,label:t.label,kind:"captions",default:!!t.media&&!!t.media.default,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=r,this.hls.trigger(_.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[r]})}}},t.createTextTrack=function(e,t,r){var i=this.media;if(i)return i.addTextTrack(e,t,r)},t.onMediaAttaching=function(e,t){this.media=t.media,t.mediaSource||this._cleanTracks()},t.onMediaDetaching=function(e,t){var r=!!t.transferMedia;if(this.media=null,!r){var i=this.captionsTracks;Object.keys(i).forEach((function(e){ws(i[e]),delete i[e]})),this.nonNativeCaptionsTracks={}}},t.onManifestLoading=function(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},t._cleanTracks=function(){var e=this.media;if(e){var t=e.textTracks;if(t)for(var r=0;r<t.length;r++)ws(t[r])}},t.onSubtitleTracksUpdated=function(e,t){var r=this,i=t.subtitleTracks||[],n=i.some((function(e){return e.textCodec===vo}));if(this.config.enableWebVTT||n&&this.config.enableIMSC1){if(da(this.tracks,i))return void(this.tracks=i);if(this.textTracks=[],this.tracks=i,this.config.renderTextTracksNatively){var a=this.media,s=a?xs(a.textTracks):null;if(this.tracks.forEach((function(e,t){var i;if(s){for(var n=null,a=0;a<s.length;a++)if(s[a]&&_o(s[a],e)){n=s[a],s[a]=null;break}n&&(i=n)}if(i)ws(i);else{var o=Do(e);(i=r.createTextTrack(o,e.name,e.lang))&&(i.mode="disabled")}i&&r.textTracks.push(i)})),null!=s&&s.length){var o=s.filter((function(e){return null!==e})).map((function(e){return e.label}));o.length&&this.hls.logger.warn("Media element contains unused subtitle tracks: "+o.join(", ")+". Replace media element for each source to clear TextTracks and captions menu.")}}else if(this.tracks.length){var l=this.tracks.map((function(e){return{label:e.name,kind:e.type.toLowerCase(),default:e.default,subtitleTrack:e}}));this.hls.trigger(_.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:l})}}},t.onManifestLoaded=function(e,t){var r=this;this.config.enableCEA708Captions&&t.captions&&t.captions.forEach((function(e){var t=/(?:CC|SERVICE)([1-4])/.exec(e.instreamId);if(t){var i="textTrack"+t[1],n=r.captionsProperties[i];n&&(n.label=e.name,e.lang&&(n.languageCode=e.lang),n.media=e)}}))},t.closedCaptionsForLevel=function(e){var t=this.hls.levels[e.level];return null==t?void 0:t.attrs["CLOSED-CAPTIONS"]},t.onFragLoading=function(e,t){if(this.enabled&&t.frag.type===x){var r,i,n=this.cea608Parser1,a=this.cea608Parser2,s=this.lastSn,o=t.frag,l=o.cc,u=o.sn,d=null!=(r=null==(i=t.part)?void 0:i.index)?r:-1;n&&a&&(u!==s+1||u===s&&d!==this.lastPartIndex+1||l!==this.lastCc)&&(n.reset(),a.reset()),this.lastCc=l,this.lastSn=u,this.lastPartIndex=d}},t.onFragLoaded=function(e,t){var r=t.frag,i=t.payload;if(r.type===F)if(i.byteLength){var n=r.decryptdata,a="stats"in t;if(null==n||!n.encrypted||a){var s=this.tracks[r.level],o=this.vttCCs;o[r.cc]||(o[r.cc]={start:r.start,prevCC:this.prevCC,new:!0},this.prevCC=r.cc),s&&s.textCodec===vo?this._parseIMSC1(r,i):this._parseVTTs(t)}}else this.hls.trigger(_.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:new Error("Empty subtitle payload")})},t._parseIMSC1=function(e,t){var r=this,i=this.hls;Eo(t,this.initPTS[e.cc],(function(t){r._appendCues(t,e.level),i.trigger(_.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})}),(function(t){i.logger.log("Failed to parse IMSC1: "+t),i.trigger(_.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:t})}))},t._parseVTTs=function(e){var t,r=this,i=e.frag,n=e.payload,a=this.initPTS,s=this.unparsedVttFrags,o=a.length-1;if(a[i.cc]||-1!==o){var l=this.hls;go(null!=(t=i.initSegment)&&t.data?Ie(i.initSegment.data,new Uint8Array(n)).buffer:n,this.initPTS[i.cc],this.vttCCs,i.cc,i.start,(function(e){r._appendCues(e,i.level),l.trigger(_.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:i})}),(function(t){var a="Missing initPTS for VTT MPEGTS"===t.message;a?s.push(e):r._fallbackToIMSC1(i,n),l.logger.log("Failed to parse VTT cue: "+t),a&&o>i.cc||l.trigger(_.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:i,error:t})}))}else s.push(e)},t._fallbackToIMSC1=function(e,t){var r=this,i=this.tracks[e.level];i.textCodec||Eo(t,this.initPTS[e.cc],(function(){i.textCodec=vo,r._parseIMSC1(e,t)}),(function(){i.textCodec="wvtt"}))},t._appendCues=function(e,t){var r=this.hls;if(this.config.renderTextTracksNatively){var i=this.textTracks[t];if(!i||"disabled"===i.mode)return;e.forEach((function(e){return Cs(i,e)}))}else{var n=this.tracks[t];if(!n)return;var a=n.default?"default":"subtitles"+t;r.trigger(_.CUES_PARSED,{type:"subtitles",cues:e,track:a})}},t.onFragDecrypted=function(e,t){t.frag.type===F&&this.onFragLoaded(_.FRAG_LOADED,t)},t.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},t.onFragParsingUserdata=function(e,t){if(this.enabled&&this.config.enableCEA708Captions){var r=t.frag,i=t.samples;if(r.type!==x||"NONE"!==this.closedCaptionsForLevel(r))for(var n=0;n<i.length;n++){var a=i[n].bytes;if(a){this.cea608Parser1||this.initCea608Parsers();var s=this.extractCea608Data(a);this.cea608Parser1.addData(i[n].pts,s[0]),this.cea608Parser2.addData(i[n].pts,s[1])}}}},t.onBufferFlushing=function(e,t){var r=t.startOffset,i=t.endOffset,n=t.endOffsetSubtitles,a=t.type,s=this.media;if(s&&!(s.currentTime<i)){if(!a||"video"===a){var o=this.captionsTracks;Object.keys(o).forEach((function(e){return Os(o[e],r,i)}))}if(this.config.renderTextTracksNatively&&0===r&&void 0!==n){var l=this.textTracks;Object.keys(l).forEach((function(e){return Os(l[e],r,n)}))}}},t.extractCea608Data=function(e){for(var t=[[],[]],r=31&e[0],i=2,n=0;n<r;n++){var a=e[i++],s=127&e[i++],o=127&e[i++];if((0!==s||0!==o)&&0!=(4&a)){var l=3&a;0!==l&&1!==l||(t[l].push(s),t[l].push(o))}}return t},e}();function Do(e){return e.characteristics&&/transcribes-spoken-dialog/gi.test(e.characteristics)&&/describes-music-and-sound/gi.test(e.characteristics)?"captions":"subtitles"}function _o(e,t){return!!e&&e.kind===Do(t)&&fa(t,e)}var Po=/\s/,Co={newCue:function(e,t,r,i){for(var n,a,s,o,l,u=[],d=self.VTTCue||self.TextTrackCue,h=0;h<i.rows.length;h++)if(s=!0,o=0,l="",!(n=i.rows[h]).isEmpty()){for(var f,c=0;c<n.chars.length;c++)Po.test(n.chars[c].uchar)&&s?o++:(l+=n.chars[c].uchar,s=!1);n.cueStartTime=t,t===r&&(r+=1e-4),o>=16?o--:o++;var g=lo(l.trim()),v=co(t,r,g);null!=e&&null!=(f=e.cues)&&f.getCueById(v)||((a=new d(t,r,g)).id=v,a.line=h+1,a.align="left",a.position=10+Math.min(80,10*Math.floor(8*o/32)),u.push(a))}return e&&u.length&&(u.sort((function(e,t){return"auto"===e.line||"auto"===t.line?0:e.line>8&&t.line>8?t.line-e.line:e.line-t.line})),u.forEach((function(t){return Cs(e,t)}))),u}},wo=/(\d+)-(\d+)\/(\d+)/,Oo=function(){function e(e){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=null,this.response=null,this.controller=void 0,this.context=null,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=e.fetchSetup||xo,this.controller=new self.AbortController,this.stats=new $}var t=e.prototype;return t.destroy=function(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null},t.abortInternal=function(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())},t.abort=function(){var e;this.abortInternal(),null!=(e=this.callbacks)&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},t.load=function(e,t,r){var i=this,n=this.stats;if(n.loading.start)throw new Error("Loader can only be used once.");n.loading.start=self.performance.now();var a=function(e,t){var r={method:"GET",mode:"cors",credentials:"same-origin",signal:t,headers:new self.Headers(o({},e.headers))};return e.rangeEnd&&r.headers.set("Range","bytes="+e.rangeStart+"-"+String(e.rangeEnd-1)),r}(e,this.controller.signal),s="arraybuffer"===e.responseType,l=s?"byteLength":"length",u=t.loadPolicy,d=u.maxTimeToFirstByteMs,h=u.maxLoadTimeMs;this.context=e,this.config=t,this.callbacks=r,this.request=this.fetchSetup(e,a),self.clearTimeout(this.requestTimeout),t.timeout=d&&R(d)?d:h,this.requestTimeout=self.setTimeout((function(){i.callbacks&&(i.abortInternal(),i.callbacks.onTimeout(n,e,i.response))}),t.timeout),(Qn(this.request)?this.request.then(self.fetch):self.fetch(this.request)).then((function(r){var a;i.response=i.loader=r;var o=Math.max(self.performance.now(),n.loading.start);if(self.clearTimeout(i.requestTimeout),t.timeout=h,i.requestTimeout=self.setTimeout((function(){i.callbacks&&(i.abortInternal(),i.callbacks.onTimeout(n,e,i.response))}),h-(o-n.loading.start)),!r.ok){var l=r.status,u=r.statusText;throw new Mo(u||"fetch, bad network response",l,r)}n.loading.first=o,n.total=function(e){var t=e.get("Content-Range");if(t){var r=function(e){var t=wo.exec(e);if(t)return parseInt(t[2])-parseInt(t[1])+1}(t);if(R(r))return r}var i=e.get("Content-Length");if(i)return parseInt(i)}(r.headers)||n.total;var d=null==(a=i.callbacks)?void 0:a.onProgress;return d&&R(t.highWaterMark)?i.loadProgressively(r,n,e,t.highWaterMark,d):s?r.arrayBuffer():"json"===e.responseType?r.json():r.text()})).then((function(r){var a,s,o=i.response;if(!o)throw new Error("loader destroyed");self.clearTimeout(i.requestTimeout),n.loading.end=Math.max(self.performance.now(),n.loading.first);var u=r[l];u&&(n.loaded=n.total=u);var d={url:o.url,data:r,code:o.status},h=null==(a=i.callbacks)?void 0:a.onProgress;h&&!R(t.highWaterMark)&&h(n,e,r,o),null==(s=i.callbacks)||s.onSuccess(d,n,e,o)})).catch((function(t){var r;if(self.clearTimeout(i.requestTimeout),!n.aborted){var a=t&&t.code||0,s=t?t.message:null;null==(r=i.callbacks)||r.onError({code:a,text:s},e,t?t.details:null,n)}}))},t.getCacheAge=function(){var e=null;if(this.response){var t=this.response.headers.get("age");e=t?parseFloat(t):null}return e},t.getResponseHeader=function(e){return this.response?this.response.headers.get(e):null},t.loadProgressively=function(e,t,r,i,n){void 0===i&&(i=0);var a=new Ri,s=e.body.getReader(),o=function(){return s.read().then((function(s){if(s.done)return a.dataLength&&n(t,r,a.flush().buffer,e),Promise.resolve(new ArrayBuffer(0));var l=s.value,u=l.length;return t.loaded+=u,u<i||a.dataLength?(a.push(l),a.dataLength>=i&&n(t,r,a.flush().buffer,e)):n(t,r,l.buffer,e),o()})).catch((function(){return Promise.reject()}))};return o()},e}();function xo(e,t){return new self.Request(e.url,t)}var Mo=function(e){function t(t,r,i){var n;return(n=e.call(this,t)||this).code=void 0,n.details=void 0,n.code=r,n.details=i,n}return u(t,e),t}(v(Error)),Fo=/^age:\s*[\d.]+\s*$/im,No=function(){function e(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=null,this.loader=null,this.stats=void 0,this.xhrSetup=e&&e.xhrSetup||null,this.stats=new $,this.retryDelay=0}var t=e.prototype;return t.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null},t.abortInternal=function(){var e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,4!==e.readyState&&(this.stats.aborted=!0,e.abort()))},t.abort=function(){var e;this.abortInternal(),null!=(e=this.callbacks)&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},t.load=function(e,t,r){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=r,this.loadInternal()},t.loadInternal=function(){var e=this,t=this.config,r=this.context;if(t&&r){var i=this.loader=new self.XMLHttpRequest,n=this.stats;n.loading.first=0,n.loaded=0,n.aborted=!1;var a=this.xhrSetup;a?Promise.resolve().then((function(){if(e.loader===i&&!e.stats.aborted)return a(i,r.url)})).catch((function(t){if(e.loader===i&&!e.stats.aborted)return i.open("GET",r.url,!0),a(i,r.url)})).then((function(){e.loader!==i||e.stats.aborted||e.openAndSendXhr(i,r,t)})).catch((function(t){var a;null==(a=e.callbacks)||a.onError({code:i.status,text:t.message},r,i,n)})):this.openAndSendXhr(i,r,t)}},t.openAndSendXhr=function(e,t,r){e.readyState||e.open("GET",t.url,!0);var i=t.headers,n=r.loadPolicy,a=n.maxTimeToFirstByteMs,s=n.maxLoadTimeMs;if(i)for(var o in i)e.setRequestHeader(o,i[o]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),r.timeout=a&&R(a)?a:s,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.timeout),e.send()},t.readystatechange=function(){var e=this.context,t=this.loader,r=this.stats;if(e&&t){var i=t.readyState,n=this.config;if(!r.aborted&&i>=2&&(0===r.loading.first&&(r.loading.first=Math.max(self.performance.now(),r.loading.start),n.timeout!==n.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),n.timeout=n.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.loadPolicy.maxLoadTimeMs-(r.loading.first-r.loading.start)))),4===i)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;var a=t.status,s="text"===t.responseType?t.responseText:null;if(a>=200&&a<300){var o=null!=s?s:t.response;if(null!=o){var l,u;r.loading.end=Math.max(self.performance.now(),r.loading.first);var d="arraybuffer"===t.responseType?o.byteLength:o.length;r.loaded=r.total=d,r.bwEstimate=8e3*r.total/(r.loading.end-r.loading.first);var h=null==(l=this.callbacks)?void 0:l.onProgress;h&&h(r,e,o,t);var f={url:t.responseURL,data:o,code:a};return void(null==(u=this.callbacks)||u.onSuccess(f,r,e,t))}}var c,g=n.loadPolicy.errorRetry;kt(g,r.retry,!1,{url:e.url,data:void 0,code:a})?this.retry(g):(j.error(a+" while loading "+e.url),null==(c=this.callbacks)||c.onError({code:a,text:t.statusText},e,t,r))}}},t.loadtimeout=function(){if(this.config){var e=this.config.loadPolicy.timeoutRetry;if(kt(e,this.stats.retry,!0))this.retry(e);else{var t;j.warn("timeout while loading "+(null==(t=this.context)?void 0:t.url));var r=this.callbacks;r&&(this.abortInternal(),r.onTimeout(this.stats,this.context,this.loader))}}},t.retry=function(e){var t=this.context,r=this.stats;this.retryDelay=It(e,r.retry),r.retry++,j.warn((status?"HTTP Status "+status:"Timeout")+" while loading "+(null==t?void 0:t.url)+", retrying "+r.retry+"/"+e.maxNumRetry+" in "+this.retryDelay+"ms"),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)},t.loadprogress=function(e){var t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)},t.getCacheAge=function(){var e=null;if(this.loader&&Fo.test(this.loader.getAllResponseHeaders())){var t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e},t.getResponseHeader=function(e){return this.loader&&new RegExp("^"+e+":\\s*[\\d.]+\\s*$","im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null},e}(),Uo=f(f({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,maxDevicePixelRatio:Number.POSITIVE_INFINITY,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,frontBufferFlushThreshold:1/0,maxBufferSize:6e7,maxFragLookUpTolerance:.25,maxBufferHole:.1,detectStallWithCurrentTimeMs:1250,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,nudgeOnVideoHole:!0,liveSyncDurationCount:3,liveSyncOnStallIncrease:1,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,ignorePlaylistParsingErrors:!1,loader:No,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:pt,bufferController:ya,capLevelController:Aa,errorController:Mt,fpsController:hs,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrEwmaDefaultEstimateMax:5e6,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:Nr,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableEmsgKLVMetadata:!1,enableID3MetadataCues:!0,enableInterstitialPlayback:!0,interstitialAppendInPlace:!0,interstitialLiveLookAhead:10,useMediaCapabilities:!0,certLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null}},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},interstitialAssetListLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:3e4,timeoutRetry:{maxNumRetry:0,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:0,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},{cueHandler:Co,enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}),{},{subtitleStreamController:Ds,subtitleTrackController:Ms,timelineController:ko,audioStreamController:la,audioTrackController:ca,emeController:us,cmcdController:as,contentSteeringController:ss,interstitialsController:ks});function Bo(e){return e&&"object"==typeof e?Array.isArray(e)?e.map(Bo):Object.keys(e).reduce((function(t,r){return t[r]=Bo(e[r]),t}),{}):e}function Go(e,t){var r=e.loader;r!==Oo&&r!==No?(t.log("[config]: Custom loader detected, cannot enable progressive streaming"),e.progressive=!1):function(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(e){}return!1}()&&(e.loader=Oo,e.progressive=!0,e.enableSoftwareAES=!0,t.log("[config]: Progressive streaming enabled, using FetchLoader"))}var Ko=function(e){function t(t,r){var i;return(i=e.call(this,"gap-controller",t.logger)||this).hls=null,i.fragmentTracker=null,i.media=null,i.mediaSource=void 0,i.nudgeRetry=0,i.stallReported=!1,i.stalled=null,i.moved=!1,i.seeking=!1,i.buffered={},i.lastCurrentTime=0,i.ended=0,i.waiting=0,i.onMediaPlaying=function(){i.ended=0,i.waiting=0},i.onMediaWaiting=function(){var e;null!=(e=i.media)&&e.seeking||(i.waiting=self.performance.now(),i.tick())},i.onMediaEnded=function(){var e;i.hls&&(i.ended=(null==(e=i.media)?void 0:e.currentTime)||1,i.hls.trigger(_.MEDIA_ENDED,{stalled:!1}))},i.hls=t,i.fragmentTracker=r,i.registerListeners(),i}u(t,e);var r=t.prototype;return r.registerListeners=function(){var e=this.hls;e&&(e.on(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(_.BUFFER_APPENDED,this.onBufferAppended,this))},r.unregisterListeners=function(){var e=this.hls;e&&(e.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(_.BUFFER_APPENDED,this.onBufferAppended,this))},r.destroy=function(){e.prototype.destroy.call(this),this.unregisterListeners(),this.media=this.hls=this.fragmentTracker=null,this.mediaSource=void 0},r.onMediaAttached=function(e,t){this.setInterval(100),this.mediaSource=t.mediaSource;var r=this.media=t.media;Rs(r,"playing",this.onMediaPlaying),Rs(r,"waiting",this.onMediaWaiting),Rs(r,"ended",this.onMediaEnded)},r.onMediaDetaching=function(e,t){this.clearInterval();var r=this.media;r&&(Is(r,"playing",this.onMediaPlaying),Is(r,"waiting",this.onMediaWaiting),Is(r,"ended",this.onMediaEnded),this.media=null),this.mediaSource=void 0},r.onBufferAppended=function(e,t){this.buffered=t.timeRanges},r.tick=function(){var e;if(null!=(e=this.media)&&e.readyState&&this.hasBuffered){var t=this.media.currentTime;this.poll(t,this.lastCurrentTime),this.lastCurrentTime=t}},r.poll=function(e,t){var r,i,n=null==(r=this.hls)?void 0:r.config;if(n){var a=this.media,s=this.stalled;if(a){var o=a.seeking,l=this.seeking&&!o,u=!this.seeking&&o,d=a.paused&&!o||a.ended||0===a.playbackRate;if(this.seeking=o,e!==t)return t&&(this.ended=0),this.moved=!0,o||(this.nudgeRetry=0,n.nudgeOnVideoHole&&!d&&e>t&&this.nudgeOnVideoHole(e,t)),void(0===this.waiting&&this.stallResolved(e));if(u||l)l&&this.stallResolved(e);else{if(d)return this.nudgeRetry=0,this.stallResolved(e),void(!this.ended&&a.ended&&this.hls&&(this.ended=e||1,this.hls.trigger(_.MEDIA_ENDED,{stalled:!1})));if(ar.getBuffered(a).length){var h=ar.bufferInfo(a,e,0),f=h.nextStart||0,c=this.fragmentTracker;if(o&&c&&this.hls){var g=Ho(this.hls.inFlightFragments,e),v=h.len>2,m=!f||g||f-e>2&&!c.getPartialFragment(e);if(v||m)return;this.moved=!1}var p=null==(i=this.hls)?void 0:i.latestLevelDetails;if(!this.moved&&null!==this.stalled&&c){if(!(h.len>0||f))return;var y=Math.max(f,h.start||0)-e,E=null!=p&&p.live?2*p.targetduration:2,T=c.getPartialFragment(e);if(y>0&&(y<=E||T))return void(a.paused||this._trySkipBufferHole(T))}var S=n.detectStallWithCurrentTimeMs,A=self.performance.now(),L=this.waiting;if(null!==s){var R=A-s;if(!o&&(R>=S||L)&&this.hls){var I;if("ended"===(null==(I=this.mediaSource)?void 0:I.readyState)&&(null==p||!p.live)&&Math.abs(e-((null==p?void 0:p.edge)||0))<1){if(this.ended)return;return this.ended=e||1,void this.hls.trigger(_.MEDIA_ENDED,{stalled:!0})}if(this._reportStall(h),!this.media||!this.hls)return}var b=ar.bufferInfo(a,e,n.maxBufferHole);this._tryFixBufferStall(b,R)}else this.stalled=L>0&&A-L<S?L:A}else this.nudgeRetry=0}}}},r.stallResolved=function(e){var t=this.stalled;if(t&&this.hls&&(this.stalled=null,this.stallReported)){var r=self.performance.now()-t;this.log("playback not stuck anymore @"+e+", after "+Math.round(r)+"ms"),this.stallReported=!1,this.waiting=0,this.hls.trigger(_.STALL_RESOLVED,{})}},r.nudgeOnVideoHole=function(e,t){var r,i=this.buffered.video;if(this.hls&&this.media&&this.fragmentTracker&&null!=(r=this.buffered.audio)&&r.length&&i&&i.length>1&&e>i.end(0)){var n=ar.bufferedInfo(ar.timeRangesToArray(this.buffered.audio),e,0);if(n.len>1&&t>=n.start){var a=ar.timeRangesToArray(i),s=ar.bufferedInfo(a,t,0).bufferedIndex;if(s>-1&&s<a.length-1){var o=ar.bufferedInfo(a,e,0).bufferedIndex,l=a[s].end,u=a[s+1].start;if((-1===o||o>s)&&u-l<1&&e-l<2){var d=new Error("nudging playhead to flush pipeline after video hole. currentTime: "+e+" hole: "+l+" -> "+u+" buffered index: "+o);this.warn(d.message),this.media.currentTime+=1e-6;var h=this.fragmentTracker.getPartialFragment(e)||void 0,f=ar.bufferInfo(this.media,e,0);this.hls.trigger(_.ERROR,{type:k.MEDIA_ERROR,details:D.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:d,reason:d.message,frag:h,buffer:f.len,bufferInfo:f})}}}}},r._tryFixBufferStall=function(e,t){var r,i,n=this.fragmentTracker,a=this.media,s=null==(r=this.hls)?void 0:r.config;if(a&&n&&s){var o=a.currentTime,l=null==(i=this.hls)?void 0:i.latestLevelDetails,u=n.getPartialFragment(o);if((u||null!=l&&l.live&&o<l.fragmentStart)&&(this._trySkipBufferHole(u)||!this.media))return;var d=e.buffered;(d&&d.length>1&&e.len>s.maxBufferHole||e.nextStart&&e.nextStart-o<s.maxBufferHole)&&(t>1e3*s.highBufferWatchdogPeriod||this.waiting)&&(this.warn("Trying to nudge playhead over buffer-hole"),this._tryNudgeBuffer(e))}},r._reportStall=function(e){var t=this.hls,r=this.media,i=this.stallReported,n=this.stalled;if(!i&&null!==n&&r&&t){this.stallReported=!0;var a=new Error("Playback stalling at @"+r.currentTime+" due to low buffer ("+lt(e)+")");this.warn(a.message),t.trigger(_.ERROR,{type:k.MEDIA_ERROR,details:D.BUFFER_STALLED_ERROR,fatal:!1,error:a,buffer:e.len,bufferInfo:e,stalled:{start:n}})}},r._trySkipBufferHole=function(e){var t,r=this.fragmentTracker,i=this.media,n=null==(t=this.hls)?void 0:t.config;if(!i||!r||!n)return 0;var a=i.currentTime,s=ar.bufferInfo(i,a,0),o=a<s.start?s.start:s.nextStart;if(o&&this.hls){var l=s.len<=n.maxBufferHole,u=s.len>0&&s.len<1&&i.readyState<3,d=o-a;if(d>0&&(l||u)){if(d>n.maxBufferHole){var h=!1;if(0===a){var f=r.getAppendedFrag(0,x);f&&o<f.end&&(h=!0)}if(!h){var c=e||r.getAppendedFrag(a,x);if(c){var g;if(null==(g=this.hls.loadLevelObj)||!g.details)return 0;if(Ho(this.hls.inFlightFragments,o))return 0;for(var v=!1,m=c.end;m<o;){var p=r.getPartialFragment(m);if(!p){v=!0;break}m+=p.duration}if(v)return 0}}}var y=Math.max(o+.05,a+.1);if(this.warn("skipping hole, adjusting currentTime from "+a+" to "+y),this.moved=!0,i.currentTime=y,null==e||!e.gap){var E=new Error("fragment loaded with buffer holes, seeking from "+a+" to "+y);this.hls.trigger(_.ERROR,{type:k.MEDIA_ERROR,details:D.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:E,reason:E.message,frag:e||void 0,buffer:s.len,bufferInfo:s})}return y}}return 0},r._tryNudgeBuffer=function(e){var t=this.hls,r=this.media,i=this.nudgeRetry,n=null==t?void 0:t.config;if(!r||!n)return 0;var a=r.currentTime;if(this.nudgeRetry++,i<n.nudgeMaxRetry){var s=a+(i+1)*n.nudgeOffset,o=new Error("Nudging 'currentTime' from "+a+" to "+s);this.warn(o.message),r.currentTime=s,t.trigger(_.ERROR,{type:k.MEDIA_ERROR,details:D.BUFFER_NUDGE_ON_STALL,error:o,fatal:!1,buffer:e.len,bufferInfo:e})}else{var l=new Error("Playhead still not moving while enough data buffered @"+a+" after "+n.nudgeMaxRetry+" nudges");this.error(l.message),t.trigger(_.ERROR,{type:k.MEDIA_ERROR,details:D.BUFFER_STALLED_ERROR,error:l,fatal:!0,buffer:e.len,bufferInfo:e})}},n(t,[{key:"hasBuffered",get:function(){return Object.keys(this.buffered).length>0}}])}(rr);function Ho(e,t){var r=Vo(e.main);if(r&&r.start<=t)return r;var i=Vo(e.audio);return i&&i.start<=t?i:null}function Vo(e){if(!e)return null;switch(e.state){case Si.IDLE:case Si.STOPPED:case Si.ENDED:case Si.ERROR:return null}return e.frag}function Yo(){if("undefined"!=typeof self)return self.VTTCue||self.TextTrackCue}function Wo(e,t,r,i,n){var a=new e(t,r,"");try{a.value=i,n&&(a.type=n)}catch(s){a=new e(t,r,lt(n?f({type:n},i):i))}return a}var jo=function(){var e=Yo();try{e&&new e(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY}(),qo=function(){function e(e){var t=this;this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.removeCues=!0,this.onEventCueEnter=function(){t.hls&&t.hls.trigger(_.EVENT_CUE_ENTER,{})},this.hls=e,this._registerListeners()}var t=e.prototype;return t.destroy=function(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=this.onEventCueEnter=null},t._registerListeners=function(){var e=this.hls;e.on(_.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(_.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(_.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(_.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this)},t._unregisterListeners=function(){var e=this.hls;e.off(_.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(_.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(_.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(_.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this)},t.onMediaAttaching=function(e,t){var r;this.media=t.media,!1===(null==(r=t.overrides)?void 0:r.cueRemoval)&&(this.removeCues=!1)},t.onMediaAttached=function(){var e=this.hls.latestLevelDetails;e&&this.updateDateRangeCues(e)},t.onMediaDetaching=function(e,t){this.media=null,t.transferMedia||(this.id3Track&&(this.removeCues&&ws(this.id3Track,this.onEventCueEnter),this.id3Track=null),this.dateRangeCuesAppended={})},t.onManifestLoading=function(){this.dateRangeCuesAppended={}},t.createTrack=function(e){var t=this.getID3Track(e.textTracks);return t.mode="hidden",t},t.getID3Track=function(e){if(this.media){for(var t=0;t<e.length;t++){var r=e[t];if("metadata"===r.kind&&"id3"===r.label)return Ps(r,this.media),r}return this.media.addTextTrack("metadata","id3")}},t.onFragParsingMetadata=function(e,t){if(this.media){var r=this.hls.config,i=r.enableEmsgMetadataCues,n=r.enableID3MetadataCues;if(i||n){var a=t.samples;this.id3Track||(this.id3Track=this.createTrack(this.media));var s=Yo();if(s)for(var o=0;o<a.length;o++){var l=a[o].type;if((l!==zi.emsg||i)&&n){var u=Wi(a[o].data);if(u){var d=a[o].pts,h=d+a[o].duration;h>jo&&(h=jo),h-d<=0&&(h=d+.25);for(var f=0;f<u.length;f++){var c=u[f];if(!ji(c)){this.updateId3CueEnds(d,l);var g=Wo(s,d,h,c,l);g&&this.id3Track.addCue(g)}}}}}}}},t.updateId3CueEnds=function(e,t){var r,i=null==(r=this.id3Track)?void 0:r.cues;if(i)for(var n=i.length;n--;){var a=i[n];a.type===t&&a.startTime<e&&a.endTime===jo&&(a.endTime=e)}},t.onBufferFlushing=function(e,t){var r=t.startOffset,i=t.endOffset,n=t.type,a=this.id3Track,s=this.hls;if(s){var o=s.config,l=o.enableEmsgMetadataCues,u=o.enableID3MetadataCues;a&&(l||u)&&Os(a,r,i,"audio"===n?function(e){return e.type===zi.audioId3&&u}:"video"===n?function(e){return e.type===zi.emsg&&l}:function(e){return e.type===zi.audioId3&&u||e.type===zi.emsg&&l})}},t.onLevelUpdated=function(e,t){var r=t.details;this.updateDateRangeCues(r,!0)},t.onLevelPtsUpdated=function(e,t){Math.abs(t.drift)>.01&&this.updateDateRangeCues(t.details)},t.updateDateRangeCues=function(e,t){var r=this;if(this.media&&e.hasProgramDateTime&&this.hls.config.enableDateRangeMetadataCues){var i,n=this.id3Track,a=e.dateRanges,s=Object.keys(a),o=this.dateRangeCuesAppended;if(n&&t)if(null!=(i=n.cues)&&i.length)for(var l=Object.keys(o).filter((function(e){return!s.includes(e)})),u=function(){var e=l[d],t=o[e].cues;delete o[e],Object.keys(t).forEach((function(e){try{var i=t[e];i.removeEventListener("enter",r.onEventCueEnter),n.removeCue(i)}catch(e){}}))},d=l.length;d--;)u();else o=this.dateRangeCuesAppended={};var h=e.fragments[e.fragments.length-1];if(0!==s.length&&R(null==h?void 0:h.programDateTime)){this.id3Track||(this.id3Track=this.createTrack(this.media));for(var f=Yo(),c=function(){var e=s[g],t=a[e],i=t.startTime,n=o[e],l=(null==n?void 0:n.cues)||{},u=(null==n?void 0:n.durationKnown)||!1,d=jo,h=t.duration;if(t.endDate&&null!==h)d=i+h,u=!0;else if(t.endOnNext&&!u){var c=s.reduce((function(e,r){if(r!==t.id){var i=a[r];if(i.class===t.class&&i.startDate>t.startDate&&(!e||t.startDate<e.startDate))return i}return e}),null);c&&(d=c.startTime,u=!0)}for(var v,m,p=Object.keys(t.attr),y=0;y<p.length;y++){var E=p[y];if("ID"!==(m=E)&&"CLASS"!==m&&"CUE"!==m&&"START-DATE"!==m&&"DURATION"!==m&&"END-DATE"!==m&&"END-ON-NEXT"!==m){var T=l[E];if(T)u&&!n.durationKnown?T.endTime=d:Math.abs(T.startTime-i)>.01&&(T.startTime=i,T.endTime=d);else if(f){var S=t.attr[E];gr(E)&&(v=S,S=Uint8Array.from(v.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer);var A=Wo(f,i,d,{key:E,data:S},zi.dateRange);A&&(A.id=e,r.id3Track.addCue(A),l[E]=A,r.hls.config.interstitialsController&&("X-ASSET-LIST"!==E&&"X-ASSET-URL"!==E||A.addEventListener("enter",r.onEventCueEnter)))}}}o[e]={cues:l,dateRange:t,durationKnown:u}},g=0;g<s.length;g++)c()}}},e}(),Xo=function(){function e(e){var t=this;this.hls=void 0,this.config=void 0,this.media=null,this.currentTime=0,this.stallCount=0,this._latency=null,this._targetLatencyUpdated=!1,this.onTimeupdate=function(){var e=t.media,r=t.levelDetails;if(e&&r){t.currentTime=e.currentTime;var i=t.computeLatency();if(null!==i){t._latency=i;var n=t.config,a=n.lowLatencyMode,s=n.maxLiveSyncPlaybackRate;if(a&&1!==s&&r.live){var o=t.targetLatency;if(null!==o){var l=i-o;if(l<Math.min(t.maxLatency,o+r.targetduration)&&l>.05&&t.forwardBufferLength>1){var u=Math.min(2,Math.max(1,s)),d=Math.round(2/(1+Math.exp(-.75*l-t.edgeStalled))*20)/20,h=Math.min(u,Math.max(1,d));t.changeMediaPlaybackRate(e,h)}else 1!==e.playbackRate&&0!==e.playbackRate&&t.changeMediaPlaybackRate(e,1)}}}}},this.hls=e,this.config=e.config,this.registerListeners()}var t=e.prototype;return t.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.hls=null},t.registerListeners=function(){var e=this.hls;e&&(e.on(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(_.ERROR,this.onError,this))},t.unregisterListeners=function(){var e=this.hls;e&&(e.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(_.ERROR,this.onError,this))},t.onMediaAttached=function(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.onTimeupdate)},t.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.onTimeupdate),this.media=null)},t.onManifestLoading=function(){this._latency=null,this.stallCount=0},t.onLevelUpdated=function(e,t){var r=t.details;r.advanced&&this.onTimeupdate(),!r.live&&this.media&&this.media.removeEventListener("timeupdate",this.onTimeupdate)},t.onError=function(e,t){var r;t.details===D.BUFFER_STALLED_ERROR&&(this.stallCount++,this.hls&&null!=(r=this.levelDetails)&&r.live&&this.hls.logger.warn("[latency-controller]: Stall detected, adjusting target latency"))},t.changeMediaPlaybackRate=function(e,t){var r,i;e.playbackRate!==t&&(null==(r=this.hls)||r.logger.debug("[latency-controller]: latency="+this.latency.toFixed(3)+", targetLatency="+(null==(i=this.targetLatency)?void 0:i.toFixed(3))+", forwardBufferLength="+this.forwardBufferLength.toFixed(3)+": adjusting playback rate from "+e.playbackRate+" to "+t),e.playbackRate=t)},t.estimateLiveEdge=function(){var e=this.levelDetails;return null===e?null:e.edge+e.age},t.computeLatency=function(){var e=this.estimateLiveEdge();return null===e?null:e-this.currentTime},n(e,[{key:"levelDetails",get:function(){var e;return(null==(e=this.hls)?void 0:e.latestLevelDetails)||null}},{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var e=this.config;if(void 0!==e.liveMaxLatencyDuration)return e.liveMaxLatencyDuration;var t=this.levelDetails;return t?e.liveMaxLatencyDurationCount*t.targetduration:0}},{key:"targetLatency",get:function(){var e=this.levelDetails;if(null===e||null===this.hls)return null;var t=e.holdBack,r=e.partHoldBack,i=e.targetduration,n=this.config,a=n.liveSyncDuration,s=n.liveSyncDurationCount,o=n.lowLatencyMode,l=this.hls.userConfig,u=o&&r||t;(this._targetLatencyUpdated||l.liveSyncDuration||l.liveSyncDurationCount||0===u)&&(u=void 0!==a?a:s*i);var d=i;return u+Math.min(this.stallCount*this.config.liveSyncOnStallIncrease,d)},set:function(e){this.stallCount=0,this.config.liveSyncDuration=e,this._targetLatencyUpdated=!0}},{key:"liveSyncPosition",get:function(){var e=this.estimateLiveEdge(),t=this.targetLatency;if(null===e||null===t)return null;var r=this.levelDetails;if(null===r)return null;var i=r.edge,n=e-t-this.edgeStalled,a=i-r.totalduration,s=i-(this.config.lowLatencyMode&&r.partTarget||r.targetduration);return Math.min(Math.max(a,n),s)}},{key:"drift",get:function(){var e=this.levelDetails;return null===e?1:e.drift}},{key:"edgeStalled",get:function(){var e=this.levelDetails;if(null===e)return 0;var t=3*(this.config.lowLatencyMode&&e.partTarget||e.targetduration);return Math.max(e.age-t,0)}},{key:"forwardBufferLength",get:function(){var e=this.media,t=this.levelDetails;if(!e||!t)return 0;var r=e.buffered.length;return(r?e.buffered.end(r-1):t.edge)-this.currentTime}}])}(),zo=function(e){function t(t,r){var i;return(i=e.call(this,t,"level-controller")||this)._levels=[],i._firstLevel=-1,i._maxAutoLevel=-1,i._startLevel=void 0,i.currentLevel=null,i.currentLevelIndex=-1,i.manualLevelIndex=-1,i.steering=void 0,i.onParsedComplete=void 0,i.steering=r,i._registerListeners(),i}u(t,e);var r=t.prototype;return r._registerListeners=function(){var e=this.hls;e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(_.LEVEL_LOADED,this.onLevelLoaded,this),e.on(_.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(_.FRAG_BUFFERED,this.onFragBuffered,this),e.on(_.ERROR,this.onError,this)},r._unregisterListeners=function(){var e=this.hls;e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(_.LEVEL_LOADED,this.onLevelLoaded,this),e.off(_.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(_.FRAG_BUFFERED,this.onFragBuffered,this),e.off(_.ERROR,this.onError,this)},r.destroy=function(){this._unregisterListeners(),this.steering=null,this.resetLevels(),e.prototype.destroy.call(this)},r.stopLoad=function(){this._levels.forEach((function(e){e.loadError=0,e.fragmentError=0})),e.prototype.stopLoad.call(this)},r.resetLevels=function(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1},r.onManifestLoading=function(e,t){this.resetLevels()},r.onManifestLoaded=function(e,t){var r=this,i=this.hls.config.preferManagedMediaSource,n=[],a={},s={},o=!1,l=!1,u=!1;t.levels.forEach((function(e){var t,d=e.attrs,h=e.audioCodec,f=e.videoCodec;h&&(e.audioCodec=h=Ve(h,i)||void 0),0===(null==(t=f)?void 0:t.indexOf("avc1"))&&(f=e.videoCodec=function(e){for(var t=e.split(","),r=0;r<t.length;r++){var i=t[r].split(".");if(i.length>2){var n=i.shift()+".";n+=parseInt(i.shift()).toString(16),n+=("000"+parseInt(i.shift()).toString(16)).slice(-4),t[r]=n}}return t.join(",")}(f));var c=e.width,g=e.height,v=e.unknownCodecs,m=v?v.length:0;if(v)for(var p=m;p--;){var y=v[p];r.isAudioSupported(y)?(e.audioCodec=h=h?h+","+y:y,m--,xe.audio[h.substring(0,4)]=2):r.isVideoSupported(y)&&(e.videoCodec=f=f?f+","+y:y,m--,xe.video[f.substring(0,4)]=2)}if(o||(o=!(!c||!g)),l||(l=!!f),u||(u=!!h),m||h&&!r.isAudioSupported(h)||f&&!r.isVideoSupported(f))r.log('Some or all CODECS not supported "'+d.CODECS+'"');else{var E=d.CODECS,T=d["FRAME-RATE"],S=d["HDCP-LEVEL"],A=d["PATHWAY-ID"],L=d.RESOLUTION,R=d["VIDEO-RANGE"],I=(A||".")+"-"+e.bitrate+"-"+L+"-"+T+"-"+E+"-"+R+"-"+S;if(a[I])if(a[I].uri===e.url||e.attrs["PATHWAY-ID"])a[I].addGroupId("audio",d.AUDIO),a[I].addGroupId("text",d.SUBTITLES);else{var b=s[I]+=1;e.attrs["PATHWAY-ID"]=new Array(b+1).join(".");var k=r.createLevel(e);a[I]=k,n.push(k)}else{var D=r.createLevel(e);a[I]=D,s[I]=1,n.push(D)}}})),this.filterAndSortMediaOptions(n,t,o,l,u)},r.createLevel=function(e){var t=new at(e),r=e.supplemental;if(null!=r&&r.videoCodec&&!this.isVideoSupported(r.videoCodec)){var i=new Error('SUPPLEMENTAL-CODECS not supported "'+r.videoCodec+'"');this.log(i.message),t.supportedResult=ze(i,[])}return t},r.isAudioSupported=function(e){return Fe(e,"audio",this.hls.config.preferManagedMediaSource)},r.isVideoSupported=function(e){return Fe(e,"video",this.hls.config.preferManagedMediaSource)},r.filterAndSortMediaOptions=function(e,t,r,i,n){var a=this,s=[],o=[],l=e;if((r||i)&&n&&(l=l.filter((function(e){var t,r=e.videoCodec,i=e.videoRange,n=e.width,a=e.height;return(!!r||!(!n||!a))&&!!(t=i)&&Ze.indexOf(t)>-1}))),0!==l.length){t.audioTracks&&Qo(s=t.audioTracks.filter((function(e){return!e.audioCodec||a.isAudioSupported(e.audioCodec)}))),t.subtitles&&Qo(o=t.subtitles);var u=l.slice(0);l.sort((function(e,t){if(e.attrs["HDCP-LEVEL"]!==t.attrs["HDCP-LEVEL"])return(e.attrs["HDCP-LEVEL"]||"")>(t.attrs["HDCP-LEVEL"]||"")?1:-1;if(r&&e.height!==t.height)return e.height-t.height;if(e.frameRate!==t.frameRate)return e.frameRate-t.frameRate;if(e.videoRange!==t.videoRange)return Ze.indexOf(e.videoRange)-Ze.indexOf(t.videoRange);if(e.videoCodec!==t.videoCodec){var i=Be(e.videoCodec),n=Be(t.videoCodec);if(i!==n)return n-i}if(e.uri===t.uri&&e.codecSet!==t.codecSet){var a=Ge(e.codecSet),s=Ge(t.codecSet);if(a!==s)return s-a}return e.averageBitrate!==t.averageBitrate?e.averageBitrate-t.averageBitrate:0}));var d=u[0];if(this.steering&&(l=this.steering.filterParsedLevels(l)).length!==u.length)for(var h=0;h<u.length;h++)if(u[h].pathwayId===l[0].pathwayId){d=u[h];break}this._levels=l;for(var f=0;f<l.length;f++)if(l[f]===d){var c;this._firstLevel=f;var g=d.bitrate,v=this.hls.bandwidthEstimate;if(this.log("manifest loaded, "+l.length+" level(s) found, first bitrate: "+g),void 0===(null==(c=this.hls.userConfig)?void 0:c.abrEwmaDefaultEstimate)){var m=Math.min(g,this.hls.config.abrEwmaDefaultEstimateMax);m>v&&v===this.hls.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=m)}break}var p=n&&!i,y=this.hls.config,E=!(!y.audioStreamController||!y.audioTrackController),T={levels:l,audioTracks:s,subtitleTracks:o,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:n,video:i,altAudio:E&&!p&&s.some((function(e){return!!e.url}))};this.hls.trigger(_.MANIFEST_PARSED,T)}else Promise.resolve().then((function(){if(a.hls){var e="no level with compatible codecs found in manifest",r=e;t.levels.length&&(r="one or more CODECS in variant not supported: "+lt(t.levels.map((function(e){return e.attrs.CODECS})).filter((function(e,t,r){return r.indexOf(e)===t}))),a.warn(r),e+=" ("+r+")");var i=new Error(e);a.hls.trigger(_.ERROR,{type:k.MEDIA_ERROR,details:D.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:i,reason:r})}}))},r.onError=function(e,t){!t.fatal&&t.context&&t.context.type===C&&t.context.level===this.level&&this.checkRetry(t)},r.onFragBuffered=function(e,t){var r=t.frag;if(void 0!==r&&r.type===x){var i=r.elementaryStreams;if(!Object.keys(i).some((function(e){return!!i[e]})))return;var n=this._levels[r.level];null!=n&&n.loadError&&(this.log("Resetting level error count of "+n.loadError+" on frag buffered"),n.loadError=0)}},r.onLevelLoaded=function(e,t){var r,i,n=t.level,a=t.details,s=t.levelInfo;if(!s)return this.warn("Invalid level index "+n),void(null!=(i=t.deliveryDirectives)&&i.skip&&(a.deltaUpdateFailed=!0));if(s===this.currentLevel||t.withoutMultiVariant){0===s.fragmentError&&(s.loadError=0);var o=s.details;o===t.details&&o.advanced&&(o=void 0),this.playlistLoaded(n,t,o)}else null!=(r=t.deliveryDirectives)&&r.skip&&(a.deltaUpdateFailed=!0)},r.loadPlaylist=function(t){e.prototype.loadPlaylist.call(this),this.shouldLoadPlaylist(this.currentLevel)&&this.scheduleLoading(this.currentLevel,t)},r.loadingPlaylist=function(t,r){e.prototype.loadingPlaylist.call(this,t,r);var i=this.getUrlWithDirectives(t.uri,r),n=this.currentLevelIndex,a=t.attrs["PATHWAY-ID"],s=t.details,o=null==s?void 0:s.age;this.log("Loading level index "+n+(void 0!==(null==r?void 0:r.msn)?" at sn "+r.msn+" part "+r.part:"")+(a?" Pathway "+a:"")+(o&&s.live?" age "+o.toFixed(1)+(s.type&&" "+s.type||""):"")+" "+i),this.hls.trigger(_.LEVEL_LOADING,{url:i,level:n,levelInfo:t,pathwayId:t.attrs["PATHWAY-ID"],id:0,deliveryDirectives:r||null})},r.removeLevel=function(e){var t,r=this;if(1!==this._levels.length){var i=this._levels.filter((function(t,i){return i!==e||(r.steering&&r.steering.removeLevel(t),t===r.currentLevel&&(r.currentLevel=null,r.currentLevelIndex=-1,t.details&&t.details.fragments.forEach((function(e){return e.level=-1}))),!1)}));gi(i),this._levels=i,this.currentLevelIndex>-1&&null!=(t=this.currentLevel)&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.manualLevelIndex>-1&&(this.manualLevelIndex=this.currentLevelIndex);var n=i.length-1;this._firstLevel=Math.min(this._firstLevel,n),this._startLevel&&(this._startLevel=Math.min(this._startLevel,n)),this.hls.trigger(_.LEVELS_UPDATED,{levels:i})}},r.onLevelsUpdated=function(e,t){var r=t.levels;this._levels=r},r.checkMaxAutoUpdated=function(){var e=this.hls,t=e.autoLevelCapping,r=e.maxAutoLevel,i=e.maxHdcpLevel;this._maxAutoLevel!==r&&(this._maxAutoLevel=r,this.hls.trigger(_.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:t,levels:this.levels,maxAutoLevel:r,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:i}))},n(t,[{key:"levels",get:function(){return 0===this._levels.length?null:this._levels}},{key:"loadLevelObj",get:function(){return this.currentLevel}},{key:"level",get:function(){return this.currentLevelIndex},set:function(e){var t=this._levels;if(0!==t.length){if(e<0||e>=t.length){var r=new Error("invalid level idx"),i=e<0;if(this.hls.trigger(_.ERROR,{type:k.OTHER_ERROR,details:D.LEVEL_SWITCH_ERROR,level:e,fatal:i,error:r,reason:r.message}),i)return;e=Math.min(e,t.length-1)}var n=this.currentLevelIndex,a=this.currentLevel,s=a?a.attrs["PATHWAY-ID"]:void 0,o=t[e],l=o.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=o,n!==e||!a||s!==l){this.log("Switching to level "+e+" ("+(o.height?o.height+"p ":"")+(o.videoRange?o.videoRange+" ":"")+(o.codecSet?o.codecSet+" ":"")+"@"+o.bitrate+")"+(l?" with Pathway "+l:"")+" from level "+n+(s?" with Pathway "+s:""));var u={level:e,attrs:o.attrs,details:o.details,bitrate:o.bitrate,averageBitrate:o.averageBitrate,maxBitrate:o.maxBitrate,realBitrate:o.realBitrate,width:o.width,height:o.height,codecSet:o.codecSet,audioCodec:o.audioCodec,videoCodec:o.videoCodec,audioGroups:o.audioGroups,subtitleGroups:o.subtitleGroups,loaded:o.loaded,loadError:o.loadError,fragmentError:o.fragmentError,name:o.name,id:o.id,uri:o.uri,url:o.url,urlId:0,audioGroupIds:o.audioGroupIds,textGroupIds:o.textGroupIds};this.hls.trigger(_.LEVEL_SWITCHING,u);var d=o.details;if(!d||d.live){var h=this.switchParams(o.uri,null==a?void 0:a.details,d);this.loadPlaylist(h)}}}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(e){this._firstLevel=e}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var e=this.hls.config.startLevel;return void 0!==e?e:this.hls.firstAutoLevel}return this._startLevel},set:function(e){this._startLevel=e}},{key:"pathways",get:function(){return this.steering?this.steering.pathways():[]}},{key:"pathwayPriority",get:function(){return this.steering?this.steering.pathwayPriority:null},set:function(e){if(this.steering){var t=this.steering.pathways(),r=e.filter((function(e){return-1!==t.indexOf(e)}));if(e.length<1)return void this.warn("pathwayPriority "+e+" should contain at least one pathway from list: "+t);this.steering.pathwayPriority=r}}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)}}])}(ua);function Qo(e){var t={};e.forEach((function(e){var r=e.groupId||"";e.id=t[r]=t[r]||0,t[r]++}))}function $o(){return self.SourceBuffer||self.WebKitSourceBuffer}function Jo(){if(!q())return!1;var e=$o();return!e||e.prototype&&"function"==typeof e.prototype.appendBuffer&&"function"==typeof e.prototype.remove}var Zo=function(e){function t(t,r,i){var n;return(n=e.call(this,t,r,i,"stream-controller",x)||this).audioCodecSwap=!1,n.level=-1,n._forceStartLoad=!1,n._hasEnoughToStart=!1,n.altAudio=0,n.audioOnly=!1,n.fragPlaying=null,n.fragLastKbps=0,n.couldBacktrack=!1,n.backtrackFragment=null,n.audioCodecSwitch=!1,n.videoBuffer=null,n.onMediaPlaying=function(){n.tick()},n.onMediaSeeked=function(){var e=n.media,t=e?e.currentTime:null;if(null!==t&&R(t)&&(n.log("Media seeked to "+t.toFixed(3)),n.getBufferedFrag(t))){var r=n.getFwdBufferInfoAtPos(e,t,x,0);null!==r&&0!==r.len?n.tick():n.warn("Main forward buffer length at "+t+' on "seeked" event '+(r?r.len:"empty")+")")}},n.registerListeners(),n}u(t,e);var r=t.prototype;return r.registerListeners=function(){e.prototype.registerListeners.call(this);var t=this.hls;t.on(_.MANIFEST_PARSED,this.onManifestParsed,this),t.on(_.LEVEL_LOADING,this.onLevelLoading,this),t.on(_.LEVEL_LOADED,this.onLevelLoaded,this),t.on(_.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),t.on(_.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),t.on(_.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),t.on(_.BUFFER_CREATED,this.onBufferCreated,this),t.on(_.BUFFER_FLUSHED,this.onBufferFlushed,this),t.on(_.LEVELS_UPDATED,this.onLevelsUpdated,this),t.on(_.FRAG_BUFFERED,this.onFragBuffered,this)},r.unregisterListeners=function(){e.prototype.unregisterListeners.call(this);var t=this.hls;t.off(_.MANIFEST_PARSED,this.onManifestParsed,this),t.off(_.LEVEL_LOADED,this.onLevelLoaded,this),t.off(_.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),t.off(_.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),t.off(_.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),t.off(_.BUFFER_CREATED,this.onBufferCreated,this),t.off(_.BUFFER_FLUSHED,this.onBufferFlushed,this),t.off(_.LEVELS_UPDATED,this.onLevelsUpdated,this),t.off(_.FRAG_BUFFERED,this.onFragBuffered,this)},r.onHandlerDestroying=function(){this.onMediaPlaying=this.onMediaSeeked=null,this.unregisterListeners(),e.prototype.onHandlerDestroying.call(this)},r.startLoad=function(e,t){if(this.levels){var r=this.lastCurrentTime,i=this.hls;if(this.stopLoad(),this.setInterval(100),this.level=-1,!this.startFragRequested){var n=i.startLevel;-1===n&&(i.config.testBandwidth&&this.levels.length>1?(n=0,this.bitrateTest=!0):n=i.firstAutoLevel),i.nextLoadLevel=n,this.level=i.loadLevel,this._hasEnoughToStart=!!t}r>0&&-1===e&&!t&&(this.log("Override startPosition with lastCurrentTime @"+r.toFixed(3)),e=r),this.state=Si.IDLE,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}else this._forceStartLoad=!0,this.state=Si.STOPPED},r.stopLoad=function(){this._forceStartLoad=!1,e.prototype.stopLoad.call(this)},r.doTick=function(){switch(this.state){case Si.WAITING_LEVEL:var e=this.levels,t=this.level,r=null==e?void 0:e[t],i=null==r?void 0:r.details;if(i&&(!i.live||this.levelLastLoaded===r&&!this.waitForLive(r))){if(this.waitForCdnTuneIn(i))break;this.state=Si.IDLE;break}if(this.hls.nextLoadLevel!==this.level){this.state=Si.IDLE;break}break;case Si.FRAG_LOADING_WAITING_RETRY:var n,a=self.performance.now(),s=this.retryDate;if(!s||a>=s||null!=(n=this.media)&&n.seeking){var o=this.levels,l=this.level,u=null==o?void 0:o[l];this.resetStartWhenNotLoaded(u||null),this.state=Si.IDLE}}this.state===Si.IDLE&&this.doTickIdle(),this.onTickEnd()},r.onTickEnd=function(){var t;e.prototype.onTickEnd.call(this),null!=(t=this.media)&&t.readyState&&!1===this.media.seeking&&(this.lastCurrentTime=this.media.currentTime),this.checkFragmentChanged()},r.doTickIdle=function(){var e=this.hls,t=this.levelLastLoaded,r=this.levels,i=this.media;if(null!==t&&(i||this.primaryPrefetch||!this.startFragRequested&&e.config.startFragPrefetch)&&(!this.altAudio||!this.audioOnly)){var n=this.buffering?e.nextLoadLevel:e.loadLevel;if(null!=r&&r[n]){var a=r[n],s=this.getMainFwdBufferInfo();if(null!==s){var o=this.getLevelDetails();if(o&&this._streamEnded(s,o)){var l={};return 2===this.altAudio&&(l.type="video"),this.hls.trigger(_.BUFFER_EOS,l),void(this.state=Si.ENDED)}if(this.buffering){e.loadLevel!==n&&-1===e.manualLevel&&this.log("Adapting to level "+n+" from level "+this.level),this.level=e.nextLoadLevel=n;var u=a.details;if(!u||this.state===Si.WAITING_LEVEL||this.waitForLive(a))return this.level=n,this.state=Si.WAITING_LEVEL,void(this.startFragRequested=!1);var d=s.len,h=this.getMaxBufferLength(a.maxBitrate);if(!(d>=h)){this.backtrackFragment&&this.backtrackFragment.start>s.end&&(this.backtrackFragment=null);var f=this.backtrackFragment?this.backtrackFragment.start:s.end,c=this.getNextFragment(f,u);if(this.couldBacktrack&&!this.fragPrevious&&c&&re(c)&&this.fragmentTracker.getState(c)!==Gt){var g,v=(null!=(g=this.backtrackFragment)?g:c).sn-u.startSN,m=u.fragments[v-1];m&&c.cc===m.cc&&(c=m,this.fragmentTracker.removeFragment(m))}else this.backtrackFragment&&s.len&&(this.backtrackFragment=null);if(c&&this.isLoopLoading(c,f)){if(!c.gap){var p=this.audioOnly&&!this.altAudio?J:Z,y=(p===Z?this.videoBuffer:this.mediaBuffer)||this.media;y&&this.afterBufferFlushed(y,p,x)}c=this.getNextFragmentLoopLoading(c,u,s,x,h)}c&&(!c.initSegment||c.initSegment.data||this.bitrateTest||(c=c.initSegment),this.loadFragment(c,a,f))}}}}}},r.loadFragment=function(t,r,i){var n=this.fragmentTracker.getState(t);n===Nt||n===Bt?re(t)?this.bitrateTest?(this.log("Fragment "+t.sn+" of level "+t.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(t,r)):e.prototype.loadFragment.call(this,t,r,i):this._loadInitSegment(t,r):this.clearTrackerIfNeeded(t)},r.getBufferedFrag=function(e){return this.fragmentTracker.getBufferedFrag(e,x)},r.followingBufferedFrag=function(e){return e?this.getBufferedFrag(e.end+.5):null},r.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},r.nextLevelSwitch=function(){var e=this.levels,t=this.media;if(null!=t&&t.readyState){var r,i=this.getAppendedFrag(t.currentTime);i&&i.start>1&&this.flushMainBuffer(0,i.start-1);var n=this.getLevelDetails();if(null!=n&&n.live){var a=this.getMainFwdBufferInfo();if(!a||a.len<2*n.targetduration)return}if(!t.paused&&e){var s=e[this.hls.nextLoadLevel],o=this.fragLastKbps;r=o&&this.fragCurrent?this.fragCurrent.duration*s.maxBitrate/(1e3*o)+1:0}else r=0;var l=this.getBufferedFrag(t.currentTime+r);if(l){var u=this.followingBufferedFrag(l);if(u){this.abortCurrentFrag();var d=u.maxStartPTS?u.maxStartPTS:u.start,h=u.duration,f=Math.max(l.end,d+Math.min(Math.max(h-this.config.maxFragLookUpTolerance,h*(this.couldBacktrack?.5:.125)),h*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(f,Number.POSITIVE_INFINITY)}}}},r.abortCurrentFrag=function(){var e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case Si.KEY_LOADING:case Si.FRAG_LOADING:case Si.FRAG_LOADING_WAITING_RETRY:case Si.PARSING:case Si.PARSED:this.state=Si.IDLE}this.nextLoadPosition=this.getLoadPosition()},r.flushMainBuffer=function(t,r){e.prototype.flushMainBuffer.call(this,t,r,2===this.altAudio?"video":null)},r.onMediaAttached=function(t,r){e.prototype.onMediaAttached.call(this,t,r);var i=r.media;Rs(i,"playing",this.onMediaPlaying),Rs(i,"seeked",this.onMediaSeeked)},r.onMediaDetaching=function(t,r){var i=this.media;i&&(Is(i,"playing",this.onMediaPlaying),Is(i,"seeked",this.onMediaSeeked)),this.videoBuffer=null,this.fragPlaying=null,e.prototype.onMediaDetaching.call(this,t,r),r.transferMedia||(this._hasEnoughToStart=!1)},r.onManifestLoading=function(){e.prototype.onManifestLoading.call(this),this.log("Trigger BUFFER_RESET"),this.hls.trigger(_.BUFFER_RESET,void 0),this.couldBacktrack=!1,this.fragLastKbps=0,this.fragPlaying=this.backtrackFragment=null,this.altAudio=0,this.audioOnly=!1},r.onManifestParsed=function(e,t){var r,i,n=!1,a=!1;t.levels.forEach((function(e){var t=e.audioCodec;t&&(n=n||-1!==t.indexOf("mp4a.40.2"),a=a||-1!==t.indexOf("mp4a.40.5"))})),this.audioCodecSwitch=n&&a&&!("function"==typeof(null==(i=$o())||null==(r=i.prototype)?void 0:r.changeType)),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1},r.onLevelLoading=function(e,t){if(this.levels&&this.state===Si.IDLE){var r=t.levelInfo;(!r.details||r.details.live&&(this.levelLastLoaded!==r||r.details.expired)||this.waitForCdnTuneIn(r.details))&&(this.state=Si.WAITING_LEVEL)}},r.onLevelLoaded=function(e,t){var r,i=this.levels,n=this.startFragRequested,a=t.level,s=t.details,o=s.totalduration;if(i){this.log("Level "+a+" loaded ["+s.startSN+","+s.endSN+"]"+(s.lastPartSn?"[part-"+s.lastPartSn+"-"+s.lastPartIndex+"]":"")+", cc ["+s.startCC+", "+s.endCC+"] duration:"+o);var l=t.levelInfo,u=this.fragCurrent;!u||this.state!==Si.FRAG_LOADING&&this.state!==Si.FRAG_LOADING_WAITING_RETRY||u.level!==t.level&&u.loader&&this.abortCurrentFrag();var d=0;if(s.live||null!=(r=l.details)&&r.live){var h;if(this.checkLiveUpdate(s),s.deltaUpdateFailed)return;d=this.alignPlaylists(s,l.details,null==(h=this.levelLastLoaded)?void 0:h.details)}if(l.details=s,this.levelLastLoaded=l,n||this.setStartPosition(s,d),this.hls.trigger(_.LEVEL_UPDATED,{details:s,level:a}),this.state===Si.WAITING_LEVEL){if(this.waitForCdnTuneIn(s))return;this.state=Si.IDLE}n&&s.live&&this.synchronizeToLiveEdge(s),this.tick()}else this.warn("Levels were reset while loading level "+a)},r.synchronizeToLiveEdge=function(e){var t=this.config,r=this.media;if(r){var i=this.hls.liveSyncPosition,n=this.getLoadPosition(),a=e.fragmentStart,s=e.edge,o=n>=a-t.maxFragLookUpTolerance&&n<=s;if(null!==i&&r.duration>i&&(n<i||!o)){var l=void 0!==t.liveMaxLatencyDuration?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;(!o&&r.readyState<4||n<s-l)&&(this._hasEnoughToStart||(this.nextLoadPosition=i),r.readyState&&(this.warn("Playback: "+n.toFixed(3)+" is located too far from the end of live sliding playlist: "+s+", reset currentTime to : "+i.toFixed(3)),r.currentTime=i))}}},r._handleFragmentLoadProgress=function(e){var t,r=e.frag,i=e.part,n=e.payload,a=this.levels;if(a){var s=a[r.level];if(s){var o=s.details;if(!o)return this.warn("Dropping fragment "+r.sn+" of level "+r.level+" after level details were reset"),void this.fragmentTracker.removeFragment(r);var l=s.videoCodec,u=o.PTSKnown||!o.live,d=null==(t=r.initSegment)?void 0:t.data,h=this._getAudioCodec(s),f=this.transmuxer=this.transmuxer||new oa(this.hls,x,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),c=i?i.index:-1,g=-1!==c,v=new ir(r.level,r.sn,r.stats.chunkCount,n.byteLength,c,g),m=this.initPTS[r.cc];f.push(n,d,h,l,r,i,o.totalduration,u,v,m)}else this.warn("Level "+r.level+" not found on progress")}else this.warn("Levels were reset while fragment load was in progress. Fragment "+r.sn+" of level "+r.level+" will not be buffered")},r.onAudioTrackSwitching=function(e,t){var r=this,i=this.hls,n=2===this.altAudio;if(mt(t.url,i))this.altAudio=1;else{if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var a=this.fragCurrent;a&&(this.log("Switching to main audio track, cancel main fragment load"),a.abortRequests(),this.fragmentTracker.removeFragment(a)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();if(n)return this.fragmentTracker.removeAllFragments(),i.once(_.BUFFER_FLUSHED,(function(){var e;null==(e=r.hls)||e.trigger(_.AUDIO_TRACK_SWITCHED,t)})),void i.trigger(_.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null});i.trigger(_.AUDIO_TRACK_SWITCHED,t)}},r.onAudioTrackSwitched=function(e,t){var r=mt(t.url,this.hls);if(r){var i=this.videoBuffer;i&&this.mediaBuffer!==i&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=r?2:0,this.tick()},r.onBufferCreated=function(e,t){var r,i,n=t.tracks,a=!1;for(var s in n){var o=n[s];if("main"===o.id){if(i=s,r=o,"video"===s){var l=n[s];l&&(this.videoBuffer=l.buffer)}}else a=!0}a&&r?(this.log("Alternate track found, use "+i+".buffered to schedule main fragment loading"),this.mediaBuffer=r.buffer):this.mediaBuffer=this.media},r.onFragBuffered=function(e,t){var r=t.frag,i=t.part,n=r.type===x;if(n){if(this.fragContextChanged(r))return this.warn("Fragment "+r.sn+(i?" p: "+i.index:"")+" of level "+r.level+" finished buffering, but was aborted. state: "+this.state),void(this.state===Si.PARSED&&(this.state=Si.IDLE));var a=i?i.stats:r.stats;this.fragLastKbps=Math.round(8*a.total/(a.buffering.end-a.loading.first)),re(r)&&(this.fragPrevious=r),this.fragBufferedComplete(r,i)}var s=this.media;s&&(!this._hasEnoughToStart&&ar.getBuffered(s).length&&(this._hasEnoughToStart=!0,this.seekToStartPos()),n&&this.tick())},r.onError=function(e,t){var r;if(t.fatal)this.state=Si.ERROR;else switch(t.details){case D.FRAG_GAP:case D.FRAG_PARSING_ERROR:case D.FRAG_DECRYPT_ERROR:case D.FRAG_LOAD_ERROR:case D.FRAG_LOAD_TIMEOUT:case D.KEY_LOAD_ERROR:case D.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(x,t);break;case D.LEVEL_LOAD_ERROR:case D.LEVEL_LOAD_TIMEOUT:case D.LEVEL_PARSING_ERROR:t.levelRetry||this.state!==Si.WAITING_LEVEL||(null==(r=t.context)?void 0:r.type)!==C||(this.state=Si.IDLE);break;case D.BUFFER_ADD_CODEC_ERROR:case D.BUFFER_APPEND_ERROR:if("main"!==t.parent)return;this.resetLoadingState();break;case D.BUFFER_FULL_ERROR:if("main"!==t.parent)return;this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case D.INTERNAL_EXCEPTION:this.recoverWorkerError(t)}},r.onFragLoadEmergencyAborted=function(){this.state=Si.IDLE,this._hasEnoughToStart||(this.startFragRequested=!1,this.nextLoadPosition=this.lastCurrentTime),this.tickImmediate()},r.onBufferFlushed=function(e,t){var r=t.type;if(r!==J||!this.altAudio){var i=(r===Z?this.videoBuffer:this.mediaBuffer)||this.media;i&&(this.afterBufferFlushed(i,r,x),this.tick())}},r.onLevelsUpdated=function(e,t){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level,-1===this.level&&this.resetWhenMissingContext(this.fragCurrent)),this.levels=t.levels},r.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},r.seekToStartPos=function(){var e=this.media;if(e){var t=e.currentTime,r=this.startPosition;if(r>=0&&t<r){if(e.seeking)return void this.log("could not seek to "+r+", already seeking at "+t);var i=this.timelineOffset;i&&r&&(r+=i);var n=this.getLevelDetails(),a=ar.getBuffered(e),s=a.length?a.start(0):0,o=s-r,l=Math.max(this.config.maxBufferHole,this.config.maxFragLookUpTolerance);o>0&&(o<l||this.loadingParts&&o<2*((null==n?void 0:n.partTarget)||0))&&(this.log("adjusting start position by "+o+" to match buffer start"),r+=o,this.startPosition=r),t<r&&(this.log("seek to target start position "+r+" from current time "+t+" buffer start "+s),e.currentTime=r)}}},r._getAudioCodec=function(e){var t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t=-1!==t.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),t},r._loadBitrateTestFrag=function(e,t){var r=this;e.bitrateTest=!0,this._doFragLoad(e,t).then((function(e){var i=r.hls,n=null==e?void 0:e.frag;if(n&&!r.fragContextChanged(n)){t.fragmentError=0,r.state=Si.IDLE,r.startFragRequested=!1,r.bitrateTest=!1;var a=n.stats;a.parsing.start=a.parsing.end=a.buffering.start=a.buffering.end=self.performance.now(),i.trigger(_.FRAG_LOADED,e),n.bitrateTest=!1}}))},r._handleTransmuxComplete=function(e){var t,r=this.playlistType,i=this.hls,n=e.remuxResult,a=e.chunkMeta,s=this.getCurrentContext(a);if(s){var o=s.frag,l=s.part,u=s.level,d=n.video,h=n.text,f=n.id3,c=n.initSegment,g=u.details,v=this.altAudio?void 0:n.audio;if(this.fragContextChanged(o))this.fragmentTracker.removeFragment(o);else{if(this.state=Si.PARSING,c){if(null!=c&&c.tracks){var m=o.initSegment||o;this._bufferInitSegment(u,c.tracks,m,a),i.trigger(_.FRAG_PARSING_INIT_SEGMENT,{frag:m,id:r,tracks:c.tracks})}var p=c.initPTS,y=c.timescale;R(p)&&(this.initPTS[o.cc]={baseTime:p,timescale:y},i.trigger(_.INIT_PTS_FOUND,{frag:o,id:r,initPTS:p,timescale:y}))}if(d&&g){v&&"audiovideo"===d.type&&this.logMuxedErr(o);var E=g.fragments[o.sn-1-g.startSN],T=o.sn===g.startSN,S=!E||o.cc>E.cc;if(!1!==n.independent){var A=d.startPTS,L=d.endPTS,I=d.startDTS,b=d.endDTS;if(l)l.elementaryStreams[d.type]={startPTS:A,endPTS:L,startDTS:I,endDTS:b};else if(d.firstKeyFrame&&d.independent&&1===a.id&&!S&&(this.couldBacktrack=!0),d.dropped&&d.independent){var k=this.getMainFwdBufferInfo(),D=(k?k.end:this.getLoadPosition())+this.config.maxBufferHole,P=d.firstKeyFramePTS?d.firstKeyFramePTS:A;if(!T&&D<P-this.config.maxBufferHole&&!S)return void this.backtrack(o);S&&(o.gap=!0),o.setElementaryStreamInfo(d.type,o.start,L,o.start,b,!0)}else T&&A-(g.appliedTimelineOffset||0)>2&&(o.gap=!0);o.setElementaryStreamInfo(d.type,A,L,I,b),this.backtrackFragment&&(this.backtrackFragment=o),this.bufferFragmentData(d,o,l,a,T||S)}else{if(!T&&!S)return void this.backtrack(o);o.gap=!0}}if(v){var C=v.startPTS,w=v.endPTS,O=v.startDTS,x=v.endDTS;l&&(l.elementaryStreams[J]={startPTS:C,endPTS:w,startDTS:O,endDTS:x}),o.setElementaryStreamInfo(J,C,w,O,x),this.bufferFragmentData(v,o,l,a)}if(g&&null!=f&&null!=(t=f.samples)&&t.length){var M={id:r,frag:o,details:g,samples:f.samples};i.trigger(_.FRAG_PARSING_METADATA,M)}if(g&&h){var F={id:r,frag:o,details:g,samples:h.samples};i.trigger(_.FRAG_PARSING_USERDATA,F)}}}else this.resetWhenMissingContext(a)},r.logMuxedErr=function(e){this.warn((re(e)?"Media":"Init")+" segment with muxed audiovideo where only video expected: "+e.url)},r._bufferInitSegment=function(e,t,r,i){var n=this;if(this.state===Si.PARSING){this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&(delete t.audio,t.audiovideo&&this.logMuxedErr(r));var a=t.audio,s=t.video,o=t.audiovideo;if(a){var l=Ye(a.codec,e.audioCodec);"mp4a"===l&&(l="mp4a.40.5");var u=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){l&&(l=-1!==l.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5");var d=a.metadata;d&&"channelCount"in d&&1!==(d.channelCount||1)&&-1===u.indexOf("firefox")&&(l="mp4a.40.5")}l&&-1!==l.indexOf("mp4a.40.5")&&-1!==u.indexOf("android")&&"audio/mpeg"!==a.container&&(l="mp4a.40.2",this.log("Android: force audio codec to "+l)),e.audioCodec&&e.audioCodec!==l&&this.log('Swapping manifest audio codec "'+e.audioCodec+'" for "'+l+'"'),a.levelCodec=l,a.id=x,this.log("Init audio buffer, container:"+a.container+", codecs[selected/level/parsed]=["+(l||"")+"/"+(e.audioCodec||"")+"/"+a.codec+"]"),delete t.audiovideo}if(s){s.levelCodec=e.videoCodec,s.id=x;var h=s.codec;if(4===(null==h?void 0:h.length))switch(h){case"hvc1":case"hev1":s.codec="hvc1.1.6.L120.90";break;case"av01":s.codec="av01.0.04M.08";break;case"avc1":s.codec="avc1.42e01e"}this.log("Init video buffer, container:"+s.container+", codecs[level/parsed]=["+(e.videoCodec||"")+"/"+h+"]"+(s.codec!==h?" parsed-corrected="+s.codec:"")+(s.supplemental?" supplemental="+s.supplemental:"")),delete t.audiovideo}o&&(this.log("Init audiovideo buffer, container:"+o.container+", codecs[level/parsed]=["+e.codecs+"/"+o.codec+"]"),delete t.video,delete t.audio);var f=Object.keys(t);if(f.length){if(this.hls.trigger(_.BUFFER_CODECS,t),!this.hls)return;f.forEach((function(e){var a=t[e].initSegment;null!=a&&a.byteLength&&n.hls.trigger(_.BUFFER_APPENDING,{type:e,data:a,frag:r,part:null,chunkMeta:i,parent:r.type})}))}this.tickImmediate()}},r.getMainFwdBufferInfo=function(){var e=this.mediaBuffer&&2===this.altAudio?this.mediaBuffer:this.media;return this.getFwdBufferInfo(e,x)},r.backtrack=function(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=Si.IDLE},r.checkFragmentChanged=function(){var e=this.media,t=null;if(e&&e.readyState>1&&!1===e.seeking){var r=e.currentTime;if(ar.isBuffered(e,r)?t=this.getAppendedFrag(r):ar.isBuffered(e,r+.1)&&(t=this.getAppendedFrag(r+.1)),t){this.backtrackFragment=null;var i=this.fragPlaying,n=t.level;i&&t.sn===i.sn&&i.level===n||(this.fragPlaying=t,this.hls.trigger(_.FRAG_CHANGED,{frag:t}),i&&i.level===n||this.hls.trigger(_.LEVEL_SWITCHED,{level:n}))}}},n(t,[{key:"hasEnoughToStart",get:function(){return this._hasEnoughToStart}},{key:"maxBufferLength",get:function(){var e=this.levels,t=this.level,r=null==e?void 0:e[t];return r?this.getMaxBufferLength(r.maxBitrate):this.config.maxBufferLength}},{key:"nextLevel",get:function(){var e=this.nextBufferedFrag;return e?e.level:-1}},{key:"currentFrag",get:function(){var e;if(this.fragPlaying)return this.fragPlaying;var t=(null==(e=this.media)?void 0:e.currentTime)||this.lastCurrentTime;return R(t)?this.getAppendedFrag(t):null}},{key:"currentProgramDateTime",get:function(){var e,t=(null==(e=this.media)?void 0:e.currentTime)||this.lastCurrentTime;if(R(t)){var r=this.getLevelDetails(),i=this.currentFrag||(r?Et(null,r.fragments,t):null);if(i){var n=i.programDateTime;if(null!==n){var a=n+1e3*(t-i.start);return new Date(a)}}}return null}},{key:"currentLevel",get:function(){var e=this.currentFrag;return e?e.level:-1}},{key:"nextBufferedFrag",get:function(){var e=this.currentFrag;return e?this.followingBufferedFrag(e):null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}])}(Ai),el=function(){function e(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}var t=e.prototype;return t.abort=function(e){for(var t in this.keyUriToKeyInfo){var r=this.keyUriToKeyInfo[t].loader;if(r){var i;if(e&&e!==(null==(i=r.context)?void 0:i.frag.type))return;r.abort()}}},t.detach=function(){for(var e in this.keyUriToKeyInfo){var t=this.keyUriToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[e]}},t.destroy=function(){for(var e in this.detach(),this.keyUriToKeyInfo){var t=this.keyUriToKeyInfo[e].loader;t&&t.destroy()}this.keyUriToKeyInfo={}},t.createKeyLoadError=function(e,t,r,i,n){return void 0===t&&(t=D.KEY_LOAD_ERROR),new tr({type:k.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:n,error:r,networkDetails:i})},t.loadClear=function(e,t){var r=this;if(this.emeController&&this.config.emeEnabled)for(var i=e.sn,n=e.cc,a=function(){var e=t[s];if(n<=e.cc&&("initSegment"===i||"initSegment"===e.sn||i<e.sn))return r.emeController.selectKeySystemFormat(e).then((function(t){e.setKeyFormat(t)})),1},s=0;s<t.length&&!a();s++);},t.load=function(e){var t=this;return!e.decryptdata&&e.encrypted&&this.emeController&&this.config.emeEnabled?this.emeController.selectKeySystemFormat(e).then((function(r){return t.loadInternal(e,r)})):this.loadInternal(e)},t.loadInternal=function(e,t){var r,i;t&&e.setKeyFormat(t);var n=e.decryptdata;if(!n){var a=new Error(t?"Expected frag.decryptdata to be defined after setting format "+t:"Missing decryption data on fragment in onKeyLoading");return Promise.reject(this.createKeyLoadError(e,D.KEY_LOAD_ERROR,a))}var s=n.uri;if(!s)return Promise.reject(this.createKeyLoadError(e,D.KEY_LOAD_ERROR,new Error('Invalid key URI: "'+s+'"')));var o,l=this.keyUriToKeyInfo[s];if(null!=(r=l)&&r.decryptdata.key)return n.key=l.decryptdata.key,Promise.resolve({frag:e,keyInfo:l});if(null!=(i=l)&&i.keyLoadPromise)switch(null==(o=l.mediaKeySessionContext)?void 0:o.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return l.keyLoadPromise.then((function(t){return n.key=t.keyInfo.decryptdata.key,{frag:e,keyInfo:l}}))}switch(l=this.keyUriToKeyInfo[s]={decryptdata:n,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},n.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return"identity"===n.keyFormat?this.loadKeyHTTP(l,e):this.loadKeyEME(l,e);case"AES-128":case"AES-256":case"AES-256-CTR":return this.loadKeyHTTP(l,e);default:return Promise.reject(this.createKeyLoadError(e,D.KEY_LOAD_ERROR,new Error('Key supplied with unsupported METHOD: "'+n.method+'"')))}},t.loadKeyEME=function(e,t){var r={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){var i=this.emeController.loadKey(r);if(i)return(e.keyLoadPromise=i.then((function(t){return e.mediaKeySessionContext=t,r}))).catch((function(t){throw e.keyLoadPromise=null,t}))}return Promise.resolve(r)},t.loadKeyHTTP=function(e,t){var r=this,i=this.config,n=new(0,i.loader)(i);return t.keyLoader=e.loader=n,e.keyLoadPromise=new Promise((function(a,s){var o={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},l=i.keyLoadPolicy.default,u={loadPolicy:l,timeout:l.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},d={onSuccess:function(e,t,i,n){var o=i.frag,l=i.keyInfo,u=i.url;if(!o.decryptdata||l!==r.keyUriToKeyInfo[u])return s(r.createKeyLoadError(o,D.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),n));l.decryptdata.key=o.decryptdata.key=new Uint8Array(e.data),o.keyLoader=null,l.loader=null,a({frag:o,keyInfo:l})},onError:function(e,i,n,a){r.resetLoader(i),s(r.createKeyLoadError(t,D.KEY_LOAD_ERROR,new Error("HTTP Error "+e.code+" loading key "+e.text),n,f({url:o.url,data:void 0},e)))},onTimeout:function(e,i,n){r.resetLoader(i),s(r.createKeyLoadError(t,D.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),n))},onAbort:function(e,i,n){r.resetLoader(i),s(r.createKeyLoadError(t,D.INTERNAL_ABORTED,new Error("key loading aborted"),n))}};n.load(o,u,d)}))},t.resetLoader=function(e){var t=e.frag,r=e.keyInfo,i=e.url,n=r.loader;t.keyLoader===n&&(t.keyLoader=null,r.loader=null),delete this.keyUriToKeyInfo[i],n&&n.destroy()},e}();function tl(e){switch(e.type){case w:return M;case O:return F;default:return x}}function rl(e,t){var r=e.url;return void 0!==r&&0!==r.indexOf("data:")||(r=t.url),r}var il=function(){function e(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.onManifestLoaded=this.checkAutostartLoad,this.hls=e,this.registerListeners()}var t=e.prototype;return t.startLoad=function(e){},t.stopLoad=function(){this.destroyInternalLoaders()},t.registerListeners=function(){var e=this.hls;e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.LEVEL_LOADING,this.onLevelLoading,this),e.on(_.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(_.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.on(_.LEVELS_UPDATED,this.onLevelsUpdated,this)},t.unregisterListeners=function(){var e=this.hls;e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.LEVEL_LOADING,this.onLevelLoading,this),e.off(_.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(_.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.off(_.LEVELS_UPDATED,this.onLevelsUpdated,this)},t.createInternalLoader=function(e){var t=this.hls.config,r=t.pLoader,i=t.loader,n=new(r||i)(t);return this.loaders[e.type]=n,n},t.getInternalLoader=function(e){return this.loaders[e.type]},t.resetInternalLoader=function(e){this.loaders[e]&&delete this.loaders[e]},t.destroyInternalLoaders=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}},t.destroy=function(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()},t.onManifestLoading=function(e,t){var r=t.url;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:P,url:r,deliveryDirectives:null,levelOrTrack:null})},t.onLevelLoading=function(e,t){var r=t.id,i=t.level,n=t.pathwayId,a=t.url,s=t.deliveryDirectives,o=t.levelInfo;this.load({id:r,level:i,pathwayId:n,responseType:"text",type:C,url:a,deliveryDirectives:s,levelOrTrack:o})},t.onAudioTrackLoading=function(e,t){var r=t.id,i=t.groupId,n=t.url,a=t.deliveryDirectives,s=t.track;this.load({id:r,groupId:i,level:null,responseType:"text",type:w,url:n,deliveryDirectives:a,levelOrTrack:s})},t.onSubtitleTrackLoading=function(e,t){var r=t.id,i=t.groupId,n=t.url,a=t.deliveryDirectives,s=t.track;this.load({id:r,groupId:i,level:null,responseType:"text",type:O,url:n,deliveryDirectives:a,levelOrTrack:s})},t.onLevelsUpdated=function(e,t){var r=this.loaders[C];if(r){var i=r.context;i&&!t.levels.some((function(e){return e===i.levelOrTrack}))&&(r.abort(),delete this.loaders[C])}},t.load=function(e){var t,r,i,n=this,a=this.hls.config,s=this.getInternalLoader(e);if(s){var l=this.hls.logger,u=s.context;if(u&&u.levelOrTrack===e.levelOrTrack&&(u.url===e.url||u.deliveryDirectives&&!e.deliveryDirectives))return void(u.url===e.url?l.log("[playlist-loader]: ignore "+e.url+" ongoing request"):l.log("[playlist-loader]: ignore "+e.url+" in favor of "+u.url));l.log("[playlist-loader]: aborting previous loader for type: "+e.type),s.abort()}if(r=e.type===P?a.manifestLoadPolicy.default:o({},a.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),s=this.createInternalLoader(e),R(null==(t=e.deliveryDirectives)?void 0:t.part)&&(e.type===C&&null!==e.level?i=this.hls.levels[e.level].details:e.type===w&&null!==e.id?i=this.hls.audioTracks[e.id].details:e.type===O&&null!==e.id&&(i=this.hls.subtitleTracks[e.id].details),i)){var d=i.partTarget,h=i.targetduration;if(d&&h){var f=1e3*Math.max(3*d,.8*h);r=o({},r,{maxTimeToFirstByteMs:Math.min(f,r.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(f,r.maxTimeToFirstByteMs)})}}var c=r.errorRetry||r.timeoutRetry||{},g={loadPolicy:r,timeout:r.maxLoadTimeMs,maxRetry:c.maxNumRetry||0,retryDelay:c.retryDelayMs||0,maxRetryDelay:c.maxRetryDelayMs||0},v={onSuccess:function(e,t,r,i){var a=n.getInternalLoader(r);n.resetInternalLoader(r.type);var s=e.data;0===s.indexOf("#EXTM3U")?(t.parsing.start=performance.now(),jr.isMediaPlaylist(s)||r.type!==P?n.handleTrackOrLevelPlaylist(e,t,r,i||null,a):n.handleMasterPlaylist(e,t,r,i)):n.handleManifestParsingError(e,r,new Error("no EXTM3U delimiter"),i||null,t)},onError:function(e,t,r,i){n.handleNetworkError(t,r,!1,e,i)},onTimeout:function(e,t,r){n.handleNetworkError(t,r,!0,void 0,e)}};s.load(e,g,v)},t.checkAutostartLoad=function(){if(this.hls){var e=this.hls,t=e.config,r=t.autoStartLoad,i=t.startPosition,n=e.forceStartLoad;(r||n)&&(this.hls.logger.log((r?"auto":"force")+" startLoad with configured startPosition "+i),this.hls.startLoad(i))}},t.handleMasterPlaylist=function(e,t,r,i){var n=this.hls,a=e.data,s=rl(e,r),o=jr.parseMasterPlaylist(a,s);if(o.playlistParsingError)this.handleManifestParsingError(e,r,o.playlistParsingError,i,t);else{var l=o.contentSteering,u=o.levels,d=o.sessionData,h=o.sessionKeys,f=o.startTimeOffset,c=o.variableList;this.variableList=c;var g=jr.parseMasterPlaylistMedia(a,s,o),v=g.AUDIO,m=void 0===v?[]:v,p=g.SUBTITLES,y=g["CLOSED-CAPTIONS"];m.length&&(m.some((function(e){return!e.url}))||!u[0].audioCodec||u[0].attrs.AUDIO||(this.hls.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),m.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new cr({}),bitrate:0,url:""}))),n.trigger(_.MANIFEST_LOADED,{levels:u,audioTracks:m,subtitles:p,captions:y,contentSteering:l,url:s,stats:t,networkDetails:i,sessionData:d,sessionKeys:h,startTimeOffset:f,variableList:c})}},t.handleTrackOrLevelPlaylist=function(e,t,r,i,n){var a=this.hls,s=r.id,o=r.level,l=r.type,u=rl(e,r),d=R(o)?o:R(s)?s:0,h=tl(r),f=jr.parseLevelPlaylist(e.data,u,d,h,0,this.variableList);if(l===P){var c={attrs:new cr({}),bitrate:0,details:f,name:"",url:u};f.requestScheduled=t.loading.start+di(f,0),a.trigger(_.MANIFEST_LOADED,{levels:[c],audioTracks:[],url:u,stats:t,networkDetails:i,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),r.levelDetails=f,this.handlePlaylistLoaded(f,e,t,r,i,n)},t.handleManifestParsingError=function(e,t,r,i,n){this.hls.trigger(_.ERROR,{type:k.NETWORK_ERROR,details:D.MANIFEST_PARSING_ERROR,fatal:t.type===P,url:e.url,err:r,error:r,reason:r.message,response:e,context:t,networkDetails:i,stats:n})},t.handleNetworkError=function(e,t,r,i,n){void 0===r&&(r=!1);var a="A network "+(r?"timeout":"error"+(i?" (status "+i.code+")":""))+" occurred while loading "+e.type;e.type===C?a+=": "+e.level+" id: "+e.id:e.type!==w&&e.type!==O||(a+=" id: "+e.id+' group-id: "'+e.groupId+'"');var s=new Error(a);this.hls.logger.warn("[playlist-loader]: "+a);var o=D.UNKNOWN,l=!1,u=this.getInternalLoader(e);switch(e.type){case P:o=r?D.MANIFEST_LOAD_TIMEOUT:D.MANIFEST_LOAD_ERROR,l=!0;break;case C:o=r?D.LEVEL_LOAD_TIMEOUT:D.LEVEL_LOAD_ERROR,l=!1;break;case w:o=r?D.AUDIO_TRACK_LOAD_TIMEOUT:D.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case O:o=r?D.SUBTITLE_TRACK_LOAD_TIMEOUT:D.SUBTITLE_LOAD_ERROR,l=!1}u&&this.resetInternalLoader(e.type);var d={type:k.NETWORK_ERROR,details:o,fatal:l,url:e.url,loader:u,context:e,error:s,networkDetails:t,stats:n};if(i){var h=(null==t?void 0:t.url)||e.url;d.response=f({url:h,data:void 0},i)}this.hls.trigger(_.ERROR,d)},t.handlePlaylistLoaded=function(e,t,r,i,n,a){var s=this.hls,o=i.type,l=i.level,u=i.id,d=i.groupId,h=i.deliveryDirectives,f=rl(t,i),c=tl(i),g="number"==typeof i.level&&c===x?l:void 0;if(e.fragments.length){e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));var v=e.playlistParsingError;if(v){if(this.hls.logger.warn(v),!s.config.ignorePlaylistParsingErrors)return void s.trigger(_.ERROR,{type:k.NETWORK_ERROR,details:D.LEVEL_PARSING_ERROR,fatal:!1,url:f,error:v,reason:v.message,response:t,context:i,level:g,parent:c,networkDetails:n,stats:r});e.playlistParsingError=null}switch(e.live&&a&&(a.getCacheAge&&(e.ageHeader=a.getCacheAge()||0),a.getCacheAge&&!isNaN(e.ageHeader)||(e.ageHeader=0)),o){case P:case C:s.trigger(_.LEVEL_LOADED,{details:e,levelInfo:i.levelOrTrack||s.levels[0],level:g||0,id:u||0,stats:r,networkDetails:n,deliveryDirectives:h,withoutMultiVariant:o===P});break;case w:s.trigger(_.AUDIO_TRACK_LOADED,{details:e,track:i.levelOrTrack,id:u||0,groupId:d||"",stats:r,networkDetails:n,deliveryDirectives:h});break;case O:s.trigger(_.SUBTITLE_TRACK_LOADED,{details:e,track:i.levelOrTrack,id:u||0,groupId:d||"",stats:r,networkDetails:n,deliveryDirectives:h})}}else{var m=e.playlistParsingError=new Error("No Segments found in Playlist");s.trigger(_.ERROR,{type:k.NETWORK_ERROR,details:D.LEVEL_EMPTY_ERROR,fatal:!1,url:f,error:m,reason:m.message,response:t,context:i,level:g,parent:c,networkDetails:n,stats:r})}},e}(),nl=function(){function e(t){void 0===t&&(t={}),this.config=void 0,this.userConfig=void 0,this.logger=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new S,this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioStreamController=void 0,this.subtititleStreamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.interstitialsController=void 0,this.gapController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this._url=null,this._sessionId=void 0,this.triggeringException=void 0,this.started=!1;var r=this.logger=W(t.debug||!1,"Hls instance",t.assetPlayerId),i=this.config=function(e,t,r){if((t.liveSyncDurationCount||t.liveMaxLatencyDurationCount)&&(t.liveSyncDuration||t.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(void 0!==t.liveMaxLatencyDurationCount&&(void 0===t.liveSyncDurationCount||t.liveMaxLatencyDurationCount<=t.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(void 0!==t.liveMaxLatencyDuration&&(void 0===t.liveSyncDuration||t.liveMaxLatencyDuration<=t.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');var i=Bo(e),n=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return["manifest","level","frag"].forEach((function(e){var a=("level"===e?"playlist":e)+"LoadPolicy",s=void 0===t[a],o=[];n.forEach((function(r){var n=e+"Loading"+r,l=t[n];if(void 0!==l&&s){o.push(n);var u=i[a].default;switch(t[a]={default:u},r){case"TimeOut":u.maxLoadTimeMs=l,u.maxTimeToFirstByteMs=l;break;case"MaxRetry":u.errorRetry.maxNumRetry=l,u.timeoutRetry.maxNumRetry=l;break;case"RetryDelay":u.errorRetry.retryDelayMs=l,u.timeoutRetry.retryDelayMs=l;break;case"MaxRetryTimeout":u.errorRetry.maxRetryDelayMs=l,u.timeoutRetry.maxRetryDelayMs=l}}})),o.length&&r.warn('hls.js config: "'+o.join('", "')+'" setting(s) are deprecated, use "'+a+'": '+lt(t[a]))})),f(f({},i),t)}(e.DefaultConfig,t,r);this.userConfig=t,i.progressive&&Go(i,r);var n=i.abrController,a=i.bufferController,s=i.capLevelController,o=i.errorController,l=i.fpsController,u=new o(this),d=this.abrController=new n(this),h=new Kt(this),c=i.interstitialsController,g=c?this.interstitialsController=new c(this,e):null,v=this.bufferController=new a(this,h),m=this.capLevelController=new s(this),p=new l(this),y=new il(this),E=i.contentSteeringController,T=E?new E(this):null,A=this.levelController=new zo(this,T),L=new qo(this),R=new el(this.config),I=this.streamController=new Zo(this,h,R),b=this.gapController=new Ko(this,h);m.setStreamController(I),p.setStreamController(I);var k=[y,A,I];g&&k.splice(1,0,g),T&&k.splice(1,0,T),this.networkControllers=k;var D=[d,v,b,m,p,L,h];this.audioTrackController=this.createController(i.audioTrackController,k);var P=i.audioStreamController;P&&k.push(this.audioStreamController=new P(this,h,R)),this.subtitleTrackController=this.createController(i.subtitleTrackController,k);var C=i.subtitleStreamController;C&&k.push(this.subtititleStreamController=new C(this,h,R)),this.createController(i.timelineController,D),R.emeController=this.emeController=this.createController(i.emeController,D),this.cmcdController=this.createController(i.cmcdController,D),this.latencyController=this.createController(Xo,D),this.coreComponents=D,k.push(u);var w=u.onErrorOut;"function"==typeof w&&this.on(_.ERROR,w,u),this.on(_.MANIFEST_LOADED,y.onManifestLoaded,y)}e.isMSESupported=function(){return Jo()},e.isSupported=function(){return function(){if(!Jo())return!1;var e=q();return"function"==typeof(null==e?void 0:e.isTypeSupported)&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some((function(t){return e.isTypeSupported(Ue(t,"video"))}))||["mp4a.40.2","fLaC"].some((function(t){return e.isTypeSupported(Ue(t,"audio"))})))}()},e.getMediaSource=function(){return q()};var t=e.prototype;return t.createController=function(e,t){if(e){var r=new e(this);return t&&t.push(r),r}return null},t.on=function(e,t,r){void 0===r&&(r=this),this._emitter.on(e,t,r)},t.once=function(e,t,r){void 0===r&&(r=this),this._emitter.once(e,t,r)},t.removeAllListeners=function(e){this._emitter.removeAllListeners(e)},t.off=function(e,t,r,i){void 0===r&&(r=this),this._emitter.off(e,t,r,i)},t.listeners=function(e){return this._emitter.listeners(e)},t.emit=function(e,t,r){return this._emitter.emit(e,t,r)},t.trigger=function(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(t){if(this.logger.error("An internal error happened while handling event "+e+'. Error message: "'+t.message+'". Here is a stacktrace:',t),!this.triggeringException){this.triggeringException=!0;var r=e===_.ERROR;this.trigger(_.ERROR,{type:k.OTHER_ERROR,details:D.INTERNAL_EXCEPTION,fatal:r,event:e,error:t}),this.triggeringException=!1}}return!1},t.listenerCount=function(e){return this._emitter.listenerCount(e)},t.destroy=function(){this.logger.log("destroy"),this.trigger(_.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this._url=null,this.networkControllers.forEach((function(e){return e.destroy()})),this.networkControllers.length=0,this.coreComponents.forEach((function(e){return e.destroy()})),this.coreComponents.length=0;var e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null},t.attachMedia=function(e){if(!e||"media"in e&&!e.media){var t=new Error("attachMedia failed: invalid argument ("+e+")");this.trigger(_.ERROR,{type:k.OTHER_ERROR,details:D.ATTACH_MEDIA_ERROR,fatal:!0,error:t})}else{this.logger.log("attachMedia"),this._media&&(this.logger.warn("media must be detached before attaching"),this.detachMedia());var r="media"in e,i=r?e.media:e,n=r?e:{media:i};this._media=i,this.trigger(_.MEDIA_ATTACHING,n)}},t.detachMedia=function(){this.logger.log("detachMedia"),this.trigger(_.MEDIA_DETACHING,{}),this._media=null},t.transferMedia=function(){this._media=null;var e=this.bufferController.transferMedia();return this.trigger(_.MEDIA_DETACHING,{transferMedia:e}),e},t.loadSource=function(e){this.stopLoad();var t=this.media,r=this._url,i=this._url=L.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.logger.log("loadSource:"+i),t&&r&&(r!==i||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(_.MANIFEST_LOADING,{url:e})},t.startLoad=function(e,t){void 0===e&&(e=-1),this.logger.log("startLoad("+e+(t?", <skip seek to start>":"")+")"),this.started=!0,this.resumeBuffering();for(var r=0;r<this.networkControllers.length&&(this.networkControllers[r].startLoad(e,t),this.started&&this.networkControllers);r++);},t.stopLoad=function(){this.logger.log("stopLoad"),this.started=!1;for(var e=0;e<this.networkControllers.length&&(this.networkControllers[e].stopLoad(),!this.started&&this.networkControllers);e++);},t.resumeBuffering=function(){this.bufferingEnabled||(this.logger.log("resume buffering"),this.networkControllers.forEach((function(e){e.resumeBuffering&&e.resumeBuffering()})))},t.pauseBuffering=function(){this.bufferingEnabled&&(this.logger.log("pause buffering"),this.networkControllers.forEach((function(e){e.pauseBuffering&&e.pauseBuffering()})))},t.swapAudioCodec=function(){this.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},t.recoverMediaError=function(){this.logger.log("recoverMediaError");var e=this._media,t=null==e?void 0:e.currentTime;this.detachMedia(),e&&(this.attachMedia(e),t&&this.startLoad(t))},t.removeLevel=function(e){this.levelController.removeLevel(e)},t.setAudioOption=function(e){var t;return(null==(t=this.audioTrackController)?void 0:t.setAudioOption(e))||null},t.setSubtitleOption=function(e){var t;return(null==(t=this.subtitleTrackController)?void 0:t.setSubtitleOption(e))||null},t.getMediaDecodingInfo=function(e,t){return void 0===t&&(t=this.allAudioTracks),$e(e,dt(t),navigator.mediaCapabilities)},n(e,[{key:"url",get:function(){return this._url}},{key:"hasEnoughToStart",get:function(){return this.streamController.hasEnoughToStart}},{key:"startPosition",get:function(){return this.streamController.startPositionValue}},{key:"loadingEnabled",get:function(){return this.started}},{key:"bufferingEnabled",get:function(){return this.streamController.bufferingEnabled}},{key:"inFlightFragments",get:function(){var e,t=((e={})[x]=this.streamController.inFlightFrag,e);return this.audioStreamController&&(t[M]=this.audioStreamController.inFlightFrag),this.subtititleStreamController&&(t[F]=this.subtititleStreamController.inFlightFrag),t}},{key:"sessionId",get:function(){var e=this._sessionId;return e||(e=this._sessionId=function(){try{return crypto.randomUUID()}catch(i){try{var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)}catch(e){var r=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=(r+16*Math.random())%16|0;return r=Math.floor(r/16),("x"==e?t:3&t|8).toString(16)}))}}}()),e}},{key:"levels",get:function(){var e=this.levelController.levels;return e||[]}},{key:"latestLevelDetails",get:function(){return this.streamController.getLevelDetails()||null}},{key:"loadLevelObj",get:function(){return this.levelController.loadLevelObj}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(e){this.logger.log("set currentLevel:"+e),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(e){this.logger.log("set nextLevel:"+e),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(e){this.logger.log("set loadLevel:"+e),this.levelController.manualLevel=e}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(e){this.levelController.nextLoadLevel=e}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(e){this.logger.log("set firstLevel:"+e),this.levelController.firstLevel=e}},{key:"startLevel",get:function(){var e=this.levelController.startLevel;return-1===e&&this.abrController.forcedAutoLevel>-1?this.abrController.forcedAutoLevel:e},set:function(e){this.logger.log("set startLevel:"+e),-1!==e&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(e){var t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(e){this._autoLevelCapping!==e&&(this.logger.log("set autoLevelCapping:"+e),this._autoLevelCapping=e,this.levelController.checkMaxAutoUpdated())}},{key:"bandwidthEstimate",get:function(){var e=this.abrController.bwEstimator;return e?e.getEstimate():NaN},set:function(e){this.abrController.resetEstimator(e)}},{key:"abrEwmaDefaultEstimate",get:function(){var e=this.abrController.bwEstimator;return e?e.defaultEstimate:NaN}},{key:"ttfbEstimate",get:function(){var e=this.abrController.bwEstimator;return e?e.getEstimateTTFB():NaN}},{key:"maxHdcpLevel",get:function(){return this._maxHdcpLevel},set:function(e){(function(e){return Je.indexOf(e)>-1})(e)&&this._maxHdcpLevel!==e&&(this._maxHdcpLevel=e,this.levelController.checkMaxAutoUpdated())}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var e=this.levels,t=this.config.minAutoBitrate;if(!e)return 0;for(var r=e.length,i=0;i<r;i++)if(e[i].maxBitrate>=t)return i;return 0}},{key:"maxAutoLevel",get:function(){var e,t=this.levels,r=this.autoLevelCapping,i=this.maxHdcpLevel;if(e=-1===r&&null!=t&&t.length?t.length-1:r,i)for(var n=e;n--;){var a=t[n].attrs["HDCP-LEVEL"];if(a&&a<=i)return n}return e}},{key:"firstAutoLevel",get:function(){return this.abrController.firstAutoLevel}},{key:"nextAutoLevel",get:function(){return this.abrController.nextAutoLevel},set:function(e){this.abrController.nextAutoLevel=e}},{key:"playingDate",get:function(){return this.streamController.currentProgramDateTime}},{key:"mainForwardBufferInfo",get:function(){return this.streamController.getMainFwdBufferInfo()}},{key:"maxBufferLength",get:function(){return this.streamController.maxBufferLength}},{key:"allAudioTracks",get:function(){var e=this.audioTrackController;return e?e.allAudioTracks:[]}},{key:"audioTracks",get:function(){var e=this.audioTrackController;return e?e.audioTracks:[]}},{key:"audioTrack",get:function(){var e=this.audioTrackController;return e?e.audioTrack:-1},set:function(e){var t=this.audioTrackController;t&&(t.audioTrack=e)}},{key:"allSubtitleTracks",get:function(){var e=this.subtitleTrackController;return e?e.allSubtitleTracks:[]}},{key:"subtitleTracks",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTrack:-1},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var e=this.subtitleTrackController;return!!e&&e.subtitleDisplay},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(e){this.config.lowLatencyMode=e}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency},set:function(e){this.latencyController.targetLatency=e}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}},{key:"pathways",get:function(){return this.levelController.pathways}},{key:"pathwayPriority",get:function(){return this.levelController.pathwayPriority},set:function(e){this.levelController.pathwayPriority=e}},{key:"bufferedToEnd",get:function(){var e;return!(null==(e=this.bufferController)||!e.bufferedToEnd)}},{key:"interstitialsManager",get:function(){var e;return(null==(e=this.interstitialsController)?void 0:e.interstitialsManager)||null}}],[{key:"version",get:function(){return na}},{key:"Events",get:function(){return _}},{key:"MetadataSchema",get:function(){return zi}},{key:"ErrorTypes",get:function(){return k}},{key:"ErrorDetails",get:function(){return D}},{key:"DefaultConfig",get:function(){return e.defaultConfig?e.defaultConfig:Uo},set:function(t){e.defaultConfig=t}}])}();return nl.defaultConfig=void 0,nl},"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):(r="undefined"!=typeof globalThis?globalThis:r||self).Hls=i()}(!1);-//# sourceMappingURL=hls.min.js.mapdiff --git a/libs/sha256.min.js b/libs/sha256.min.jsdeleted file mode 100644index 74bcdf5..0000000--- a/libs/sha256.min.js+++ /dev/null@@ -1,9 +0,0 @@-/**- * [js-sha256]{@link https://github.com/emn178/js-sha256}- *- * @version 0.9.0- * @author Chen, Yi-Cyuan [[email protected]]- * @copyright Chen, Yi-Cyuan 2014-2017- * @license MIT- */-!function(){"use strict";function t(t,i){i?(d[0]=d[16]=d[1]=d[2]=d[3]=d[4]=d[5]=d[6]=d[7]=d[8]=d[9]=d[10]=d[11]=d[12]=d[13]=d[14]=d[15]=0,this.blocks=d):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=t}function i(i,r,s){var e,n=typeof i;if("string"===n){var o,a=[],u=i.length,c=0;for(e=0;e<u;++e)(o=i.charCodeAt(e))<128?a[c++]=o:o<2048?(a[c++]=192|o>>6,a[c++]=128|63&o):o<55296||o>=57344?(a[c++]=224|o>>12,a[c++]=128|o>>6&63,a[c++]=128|63&o):(o=65536+((1023&o)<<10|1023&i.charCodeAt(++e)),a[c++]=240|o>>18,a[c++]=128|o>>12&63,a[c++]=128|o>>6&63,a[c++]=128|63&o);i=a}else{if("object"!==n)throw new Error(h);if(null===i)throw new Error(h);if(f&&i.constructor===ArrayBuffer)i=new Uint8Array(i);else if(!(Array.isArray(i)||f&&ArrayBuffer.isView(i)))throw new Error(h)}i.length>64&&(i=new t(r,!0).update(i).array());var y=[],p=[];for(e=0;e<64;++e){var l=i[e]||0;y[e]=92^l,p[e]=54^l}t.call(this,r,s),this.update(p),this.oKeyPad=y,this.inner=!0,this.sharedMemory=s}var h="input is invalid type",r="object"==typeof window,s=r?window:{};s.JS_SHA256_NO_WINDOW&&(r=!1);var e=!r&&"object"==typeof self,n=!s.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;n?s=global:e&&(s=self);var o=!s.JS_SHA256_NO_COMMON_JS&&"object"==typeof module&&module.exports,a="function"==typeof define&&define.amd,f=!s.JS_SHA256_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,u="0123456789abcdef".split(""),c=[-2147483648,8388608,32768,128],y=[24,16,8,0],p=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=["hex","array","digest","arrayBuffer"],d=[];!s.JS_SHA256_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!f||!s.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});var A=function(i,h){return function(r){return new t(h,!0).update(r)[i]()}},w=function(i){var h=A("hex",i);n&&(h=b(h,i)),h.create=function(){return new t(i)},h.update=function(t){return h.create().update(t)};for(var r=0;r<l.length;++r){var s=l[r];h[s]=A(s,i)}return h},b=function(t,i){var r=eval("require('crypto')"),s=eval("require('buffer').Buffer"),e=i?"sha224":"sha256",n=function(i){if("string"==typeof i)return r.createHash(e).update(i,"utf8").digest("hex");if(null===i||void 0===i)throw new Error(h);return i.constructor===ArrayBuffer&&(i=new Uint8Array(i)),Array.isArray(i)||ArrayBuffer.isView(i)||i.constructor===s?r.createHash(e).update(new s(i)).digest("hex"):t(i)};return n},v=function(t,h){return function(r,s){return new i(r,h,!0).update(s)[t]()}},_=function(t){var h=v("hex",t);h.create=function(h){return new i(h,t)},h.update=function(t,i){return h.create(t).update(i)};for(var r=0;r<l.length;++r){var s=l[r];h[s]=v(s,t)}return h};t.prototype.update=function(t){if(!this.finalized){var i,r=typeof t;if("string"!==r){if("object"!==r)throw new Error(h);if(null===t)throw new Error(h);if(f&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||f&&ArrayBuffer.isView(t)))throw new Error(h);i=!0}for(var s,e,n=0,o=t.length,a=this.blocks;n<o;){if(this.hashed&&(this.hashed=!1,a[0]=this.block,a[16]=a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=a[7]=a[8]=a[9]=a[10]=a[11]=a[12]=a[13]=a[14]=a[15]=0),i)for(e=this.start;n<o&&e<64;++n)a[e>>2]|=t[n]<<y[3&e++];else for(e=this.start;n<o&&e<64;++n)(s=t.charCodeAt(n))<128?a[e>>2]|=s<<y[3&e++]:s<2048?(a[e>>2]|=(192|s>>6)<<y[3&e++],a[e>>2]|=(128|63&s)<<y[3&e++]):s<55296||s>=57344?(a[e>>2]|=(224|s>>12)<<y[3&e++],a[e>>2]|=(128|s>>6&63)<<y[3&e++],a[e>>2]|=(128|63&s)<<y[3&e++]):(s=65536+((1023&s)<<10|1023&t.charCodeAt(++n)),a[e>>2]|=(240|s>>18)<<y[3&e++],a[e>>2]|=(128|s>>12&63)<<y[3&e++],a[e>>2]|=(128|s>>6&63)<<y[3&e++],a[e>>2]|=(128|63&s)<<y[3&e++]);this.lastByteIndex=e,this.bytes+=e-this.start,e>=64?(this.block=a[16],this.start=e-64,this.hash(),this.hashed=!0):this.start=e}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},t.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,i=this.lastByteIndex;t[16]=this.block,t[i>>2]|=c[3&i],this.block=t[16],i>=56&&(this.hashed||this.hash(),t[0]=this.block,t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.hBytes<<3|this.bytes>>>29,t[15]=this.bytes<<3,this.hash()}},t.prototype.hash=function(){var t,i,h,r,s,e,n,o,a,f=this.h0,u=this.h1,c=this.h2,y=this.h3,l=this.h4,d=this.h5,A=this.h6,w=this.h7,b=this.blocks;for(t=16;t<64;++t)i=((s=b[t-15])>>>7|s<<25)^(s>>>18|s<<14)^s>>>3,h=((s=b[t-2])>>>17|s<<15)^(s>>>19|s<<13)^s>>>10,b[t]=b[t-16]+i+b[t-7]+h<<0;for(a=u&c,t=0;t<64;t+=4)this.first?(this.is224?(e=300032,w=(s=b[0]-1413257819)-150054599<<0,y=s+24177077<<0):(e=704751109,w=(s=b[0]-210244248)-1521486534<<0,y=s+143694565<<0),this.first=!1):(i=(f>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10),r=(e=f&u)^f&c^a,w=y+(s=w+(h=(l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7))+(l&d^~l&A)+p[t]+b[t])<<0,y=s+(i+r)<<0),i=(y>>>2|y<<30)^(y>>>13|y<<19)^(y>>>22|y<<10),r=(n=y&f)^y&u^e,A=c+(s=A+(h=(w>>>6|w<<26)^(w>>>11|w<<21)^(w>>>25|w<<7))+(w&l^~w&d)+p[t+1]+b[t+1])<<0,i=((c=s+(i+r)<<0)>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),r=(o=c&y)^c&f^n,d=u+(s=d+(h=(A>>>6|A<<26)^(A>>>11|A<<21)^(A>>>25|A<<7))+(A&w^~A&l)+p[t+2]+b[t+2])<<0,i=((u=s+(i+r)<<0)>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),r=(a=u&c)^u&y^o,l=f+(s=l+(h=(d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&A^~d&w)+p[t+3]+b[t+3])<<0,f=s+(i+r)<<0;this.h0=this.h0+f<<0,this.h1=this.h1+u<<0,this.h2=this.h2+c<<0,this.h3=this.h3+y<<0,this.h4=this.h4+l<<0,this.h5=this.h5+d<<0,this.h6=this.h6+A<<0,this.h7=this.h7+w<<0},t.prototype.hex=function(){this.finalize();var t=this.h0,i=this.h1,h=this.h2,r=this.h3,s=this.h4,e=this.h5,n=this.h6,o=this.h7,a=u[t>>28&15]+u[t>>24&15]+u[t>>20&15]+u[t>>16&15]+u[t>>12&15]+u[t>>8&15]+u[t>>4&15]+u[15&t]+u[i>>28&15]+u[i>>24&15]+u[i>>20&15]+u[i>>16&15]+u[i>>12&15]+u[i>>8&15]+u[i>>4&15]+u[15&i]+u[h>>28&15]+u[h>>24&15]+u[h>>20&15]+u[h>>16&15]+u[h>>12&15]+u[h>>8&15]+u[h>>4&15]+u[15&h]+u[r>>28&15]+u[r>>24&15]+u[r>>20&15]+u[r>>16&15]+u[r>>12&15]+u[r>>8&15]+u[r>>4&15]+u[15&r]+u[s>>28&15]+u[s>>24&15]+u[s>>20&15]+u[s>>16&15]+u[s>>12&15]+u[s>>8&15]+u[s>>4&15]+u[15&s]+u[e>>28&15]+u[e>>24&15]+u[e>>20&15]+u[e>>16&15]+u[e>>12&15]+u[e>>8&15]+u[e>>4&15]+u[15&e]+u[n>>28&15]+u[n>>24&15]+u[n>>20&15]+u[n>>16&15]+u[n>>12&15]+u[n>>8&15]+u[n>>4&15]+u[15&n];return this.is224||(a+=u[o>>28&15]+u[o>>24&15]+u[o>>20&15]+u[o>>16&15]+u[o>>12&15]+u[o>>8&15]+u[o>>4&15]+u[15&o]),a},t.prototype.toString=t.prototype.hex,t.prototype.digest=function(){this.finalize();var t=this.h0,i=this.h1,h=this.h2,r=this.h3,s=this.h4,e=this.h5,n=this.h6,o=this.h7,a=[t>>24&255,t>>16&255,t>>8&255,255&t,i>>24&255,i>>16&255,i>>8&255,255&i,h>>24&255,h>>16&255,h>>8&255,255&h,r>>24&255,r>>16&255,r>>8&255,255&r,s>>24&255,s>>16&255,s>>8&255,255&s,e>>24&255,e>>16&255,e>>8&255,255&e,n>>24&255,n>>16&255,n>>8&255,255&n];return this.is224||a.push(o>>24&255,o>>16&255,o>>8&255,255&o),a},t.prototype.array=t.prototype.digest,t.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(this.is224?28:32),i=new DataView(t);return i.setUint32(0,this.h0),i.setUint32(4,this.h1),i.setUint32(8,this.h2),i.setUint32(12,this.h3),i.setUint32(16,this.h4),i.setUint32(20,this.h5),i.setUint32(24,this.h6),this.is224||i.setUint32(28,this.h7),t},i.prototype=new t,i.prototype.finalize=function(){if(t.prototype.finalize.call(this),this.inner){this.inner=!1;var i=this.array();t.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(i),t.prototype.finalize.call(this)}};var B=w();B.sha256=B,B.sha224=w(!0),B.sha256.hmac=_(),B.sha224.hmac=_(!0),o?module.exports=B:(s.sha256=B.sha256,s.sha224=B.sha224,a&&define(function(){return B}))}();\ No newline at end of filediff --git a/libs/tailwindcss.min.js b/libs/tailwindcss.min.jsdeleted file mode 100644index 47c4273..0000000--- a/libs/tailwindcss.min.js+++ /dev/null@@ -1,83 +0,0 @@-(()=>{var qv=Object.create;var Hi=Object.defineProperty;var $v=Object.getOwnPropertyDescriptor;var Lv=Object.getOwnPropertyNames;var Mv=Object.getPrototypeOf,Nv=Object.prototype.hasOwnProperty;var df=r=>Hi(r,"__esModule",{value:!0});var hf=r=>{if(typeof require!="undefined")return require(r);throw new Error('Dynamic require of "'+r+'" is not supported')};var P=(r,e)=>()=>(r&&(e=r(r=0)),e);var x=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Ge=(r,e)=>{df(r);for(var t in e)Hi(r,t,{get:e[t],enumerable:!0})},Bv=(r,e,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Lv(e))!Nv.call(r,i)&&i!=="default"&&Hi(r,i,{get:()=>e[i],enumerable:!(t=$v(e,i))||t.enumerable});return r},pe=r=>Bv(df(Hi(r!=null?qv(Mv(r)):{},"default",r&&r.__esModule&&"default"in r?{get:()=>r.default,enumerable:!0}:{value:r,enumerable:!0})),r);var m,u=P(()=>{m={platform:"",env:{},versions:{node:"14.17.6"}}});var Fv,be,ft=P(()=>{u();Fv=0,be={readFileSync:r=>self[r]||"",statSync:()=>({mtimeMs:Fv++}),promises:{readFile:r=>Promise.resolve(self[r]||"")}}});var Fs=x((oP,gf)=>{u();"use strict";var mf=class{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if(typeof e.maxAge=="number"&&e.maxAge===0)throw new TypeError("`maxAge` must be a number greater than 0");this.maxSize=e.maxSize,this.maxAge=e.maxAge||1/0,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_emitEvictions(e){if(typeof this.onEviction=="function")for(let[t,i]of e)this.onEviction(t,i.value)}_deleteIfExpired(e,t){return typeof t.expiry=="number"&&t.expiry<=Date.now()?(typeof this.onEviction=="function"&&this.onEviction(e,t.value),this.delete(e)):!1}_getOrDeleteIfExpired(e,t){if(this._deleteIfExpired(e,t)===!1)return t.value}_getItemValue(e,t){return t.expiry?this._getOrDeleteIfExpired(e,t):t.value}_peek(e,t){let i=t.get(e);return this._getItemValue(e,i)}_set(e,t){this.cache.set(e,t),this._size++,this._size>=this.maxSize&&(this._size=0,this._emitEvictions(this.oldCache),this.oldCache=this.cache,this.cache=new Map)}_moveToRecent(e,t){this.oldCache.delete(e),this._set(e,t)}*_entriesAscending(){for(let e of this.oldCache){let[t,i]=e;this.cache.has(t)||this._deleteIfExpired(t,i)===!1&&(yield e)}for(let e of this.cache){let[t,i]=e;this._deleteIfExpired(t,i)===!1&&(yield e)}}get(e){if(this.cache.has(e)){let t=this.cache.get(e);return this._getItemValue(e,t)}if(this.oldCache.has(e)){let t=this.oldCache.get(e);if(this._deleteIfExpired(e,t)===!1)return this._moveToRecent(e,t),t.value}}set(e,t,{maxAge:i=this.maxAge===1/0?void 0:Date.now()+this.maxAge}={}){this.cache.has(e)?this.cache.set(e,{value:t,maxAge:i}):this._set(e,{value:t,expiry:i})}has(e){return this.cache.has(e)?!this._deleteIfExpired(e,this.cache.get(e)):this.oldCache.has(e)?!this._deleteIfExpired(e,this.oldCache.get(e)):!1}peek(e){if(this.cache.has(e))return this._peek(e,this.cache);if(this.oldCache.has(e))return this._peek(e,this.oldCache)}delete(e){let t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}resize(e){if(!(e&&e>0))throw new TypeError("`maxSize` must be a number greater than 0");let t=[...this._entriesAscending()],i=t.length-e;i<0?(this.cache=new Map(t),this.oldCache=new Map,this._size=t.length):(i>0&&this._emitEvictions(t.slice(0,i)),this.oldCache=new Map(t.slice(i)),this.cache=new Map,this._size=0),this.maxSize=e}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.cache){let[t,i]=e;this._deleteIfExpired(t,i)===!1&&(yield[t,i.value])}for(let e of this.oldCache){let[t,i]=e;this.cache.has(t)||this._deleteIfExpired(t,i)===!1&&(yield[t,i.value])}}*entriesDescending(){let e=[...this.cache];for(let t=e.length-1;t>=0;--t){let i=e[t],[n,s]=i;this._deleteIfExpired(n,s)===!1&&(yield[n,s.value])}e=[...this.oldCache];for(let t=e.length-1;t>=0;--t){let i=e[t],[n,s]=i;this.cache.has(n)||this._deleteIfExpired(n,s)===!1&&(yield[n,s.value])}}*entriesAscending(){for(let[e,t]of this._entriesAscending())yield[e,t.value]}get size(){if(!this._size)return this.oldCache.size;let e=0;for(let t of this.oldCache.keys())this.cache.has(t)||e++;return Math.min(this._size+e,this.maxSize)}};gf.exports=mf});var yf,bf=P(()=>{u();yf=r=>r&&r._hash});function Wi(r){return yf(r,{ignoreUnknown:!0})}var wf=P(()=>{u();bf()});function xt(r){if(r=`${r}`,r==="0")return"0";if(/^[+-]?(\d+|\d*\.\d+)(e[+-]?\d+)?(%|\w+)?$/.test(r))return r.replace(/^[+-]?/,t=>t==="-"?"":"-");let e=["var","calc","min","max","clamp"];for(let t of e)if(r.includes(`${t}(`))return`calc(${r} * -1)`}var Gi=P(()=>{u()});var vf,xf=P(()=>{u();vf=["preflight","container","accessibility","pointerEvents","visibility","position","inset","isolation","zIndex","order","gridColumn","gridColumnStart","gridColumnEnd","gridRow","gridRowStart","gridRowEnd","float","clear","margin","boxSizing","lineClamp","display","aspectRatio","size","height","maxHeight","minHeight","width","minWidth","maxWidth","flex","flexShrink","flexGrow","flexBasis","tableLayout","captionSide","borderCollapse","borderSpacing","transformOrigin","translate","rotate","skew","scale","transform","animation","cursor","touchAction","userSelect","resize","scrollSnapType","scrollSnapAlign","scrollSnapStop","scrollMargin","scrollPadding","listStylePosition","listStyleType","listStyleImage","appearance","columns","breakBefore","breakInside","breakAfter","gridAutoColumns","gridAutoFlow","gridAutoRows","gridTemplateColumns","gridTemplateRows","flexDirection","flexWrap","placeContent","placeItems","alignContent","alignItems","justifyContent","justifyItems","gap","space","divideWidth","divideStyle","divideColor","divideOpacity","placeSelf","alignSelf","justifySelf","overflow","overscrollBehavior","scrollBehavior","textOverflow","hyphens","whitespace","textWrap","wordBreak","borderRadius","borderWidth","borderStyle","borderColor","borderOpacity","backgroundColor","backgroundOpacity","backgroundImage","gradientColorStops","boxDecorationBreak","backgroundSize","backgroundAttachment","backgroundClip","backgroundPosition","backgroundRepeat","backgroundOrigin","fill","stroke","strokeWidth","objectFit","objectPosition","padding","textAlign","textIndent","verticalAlign","fontFamily","fontSize","fontWeight","textTransform","fontStyle","fontVariantNumeric","lineHeight","letterSpacing","textColor","textOpacity","textDecoration","textDecorationColor","textDecorationStyle","textDecorationThickness","textUnderlineOffset","fontSmoothing","placeholderColor","placeholderOpacity","caretColor","accentColor","opacity","backgroundBlendMode","mixBlendMode","boxShadow","boxShadowColor","outlineStyle","outlineWidth","outlineOffset","outlineColor","ringWidth","ringColor","ringOpacity","ringOffsetWidth","ringOffsetColor","blur","brightness","contrast","dropShadow","grayscale","hueRotate","invert","saturate","sepia","filter","backdropBlur","backdropBrightness","backdropContrast","backdropGrayscale","backdropHueRotate","backdropInvert","backdropOpacity","backdropSaturate","backdropSepia","backdropFilter","transitionProperty","transitionDelay","transitionDuration","transitionTimingFunction","willChange","contain","content","forcedColorAdjust"]});function kf(r,e){return r===void 0?e:Array.isArray(r)?r:[...new Set(e.filter(i=>r!==!1&&r[i]!==!1).concat(Object.keys(r).filter(i=>r[i]!==!1)))]}var Sf=P(()=>{u()});var Af={};Ge(Af,{default:()=>Qe});var Qe,Qi=P(()=>{u();Qe=new Proxy({},{get:()=>String})});function js(r,e,t){typeof m!="undefined"&&m.env.JEST_WORKER_ID||t&&Cf.has(t)||(t&&Cf.add(t),console.warn(""),e.forEach(i=>console.warn(r,"-",i)))}function zs(r){return Qe.dim(r)}var Cf,G,Be=P(()=>{u();Qi();Cf=new Set;G={info(r,e){js(Qe.bold(Qe.cyan("info")),...Array.isArray(r)?[r]:[e,r])},warn(r,e){["content-problems"].includes(r)||js(Qe.bold(Qe.yellow("warn")),...Array.isArray(r)?[r]:[e,r])},risk(r,e){js(Qe.bold(Qe.magenta("risk")),...Array.isArray(r)?[r]:[e,r])}}});var _f={};Ge(_f,{default:()=>Us});function qr({version:r,from:e,to:t}){G.warn(`${e}-color-renamed`,[`As of Tailwind CSS ${r}, \`${e}\` has been renamed to \`${t}\`.`,"Update your configuration file to silence this warning."])}var Us,Vs=P(()=>{u();Be();Us={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"},get lightBlue(){return qr({version:"v2.2",from:"lightBlue",to:"sky"}),this.sky},get warmGray(){return qr({version:"v3.0",from:"warmGray",to:"stone"}),this.stone},get trueGray(){return qr({version:"v3.0",from:"trueGray",to:"neutral"}),this.neutral},get coolGray(){return qr({version:"v3.0",from:"coolGray",to:"gray"}),this.gray},get blueGray(){return qr({version:"v3.0",from:"blueGray",to:"slate"}),this.slate}}});function Hs(r,...e){for(let t of e){for(let i in t)r?.hasOwnProperty?.(i)||(r[i]=t[i]);for(let i of Object.getOwnPropertySymbols(t))r?.hasOwnProperty?.(i)||(r[i]=t[i])}return r}var Ef=P(()=>{u()});function kt(r){if(Array.isArray(r))return r;let e=r.split("[").length-1,t=r.split("]").length-1;if(e!==t)throw new Error(`Path is invalid. Has unbalanced brackets: ${r}`);return r.split(/\.(?![^\[]*\])|[\[\]]/g).filter(Boolean)}var Yi=P(()=>{u()});function we(r,e){return Ki.future.includes(e)?r.future==="all"||(r?.future?.[e]??Of[e]??!1):Ki.experimental.includes(e)?r.experimental==="all"||(r?.experimental?.[e]??Of[e]??!1):!1}function Tf(r){return r.experimental==="all"?Ki.experimental:Object.keys(r?.experimental??{}).filter(e=>Ki.experimental.includes(e)&&r.experimental[e])}function Rf(r){if(m.env.JEST_WORKER_ID===void 0&&Tf(r).length>0){let e=Tf(r).map(t=>Qe.yellow(t)).join(", ");G.warn("experimental-flags-enabled",[`You have enabled experimental features: ${e}`,"Experimental features in Tailwind CSS are not covered by semver, may introduce breaking changes, and can change at any time."])}}var Of,Ki,ct=P(()=>{u();Qi();Be();Of={optimizeUniversalDefaults:!1,generalizedModifiers:!0,disableColorOpacityUtilitiesByDefault:!1,relativeContentPathsByDefault:!1},Ki={future:["hoverOnlyWhenSupported","respectDefaultRingColorOpacity","disableColorOpacityUtilitiesByDefault","relativeContentPathsByDefault"],experimental:["optimizeUniversalDefaults","generalizedModifiers"]}});function Pf(r){(()=>{if(r.purge||!r.content||!Array.isArray(r.content)&&!(typeof r.content=="object"&&r.content!==null))return!1;if(Array.isArray(r.content))return r.content.every(t=>typeof t=="string"?!0:!(typeof t?.raw!="string"||t?.extension&&typeof t?.extension!="string"));if(typeof r.content=="object"&&r.content!==null){if(Object.keys(r.content).some(t=>!["files","relative","extract","transform"].includes(t)))return!1;if(Array.isArray(r.content.files)){if(!r.content.files.every(t=>typeof t=="string"?!0:!(typeof t?.raw!="string"||t?.extension&&typeof t?.extension!="string")))return!1;if(typeof r.content.extract=="object"){for(let t of Object.values(r.content.extract))if(typeof t!="function")return!1}else if(!(r.content.extract===void 0||typeof r.content.extract=="function"))return!1;if(typeof r.content.transform=="object"){for(let t of Object.values(r.content.transform))if(typeof t!="function")return!1}else if(!(r.content.transform===void 0||typeof r.content.transform=="function"))return!1;if(typeof r.content.relative!="boolean"&&typeof r.content.relative!="undefined")return!1}return!0}return!1})()||G.warn("purge-deprecation",["The `purge`/`content` options have changed in Tailwind CSS v3.0.","Update your configuration file to eliminate this warning.","https://tailwindcss.com/docs/upgrade-guide#configure-content-sources"]),r.safelist=(()=>{let{content:t,purge:i,safelist:n}=r;return Array.isArray(n)?n:Array.isArray(t?.safelist)?t.safelist:Array.isArray(i?.safelist)?i.safelist:Array.isArray(i?.options?.safelist)?i.options.safelist:[]})(),r.blocklist=(()=>{let{blocklist:t}=r;if(Array.isArray(t)){if(t.every(i=>typeof i=="string"))return t;G.warn("blocklist-invalid",["The `blocklist` option must be an array of strings.","https://tailwindcss.com/docs/content-configuration#discarding-classes"])}return[]})(),typeof r.prefix=="function"?(G.warn("prefix-function",["As of Tailwind CSS v3.0, `prefix` cannot be a function.","Update `prefix` in your configuration to be a string to eliminate this warning.","https://tailwindcss.com/docs/upgrade-guide#prefix-cannot-be-a-function"]),r.prefix=""):r.prefix=r.prefix??"",r.content={relative:(()=>{let{content:t}=r;return t?.relative?t.relative:we(r,"relativeContentPathsByDefault")})(),files:(()=>{let{content:t,purge:i}=r;return Array.isArray(i)?i:Array.isArray(i?.content)?i.content:Array.isArray(t)?t:Array.isArray(t?.content)?t.content:Array.isArray(t?.files)?t.files:[]})(),extract:(()=>{let t=(()=>r.purge?.extract?r.purge.extract:r.content?.extract?r.content.extract:r.purge?.extract?.DEFAULT?r.purge.extract.DEFAULT:r.content?.extract?.DEFAULT?r.content.extract.DEFAULT:r.purge?.options?.extractors?r.purge.options.extractors:r.content?.options?.extractors?r.content.options.extractors:{})(),i={},n=(()=>{if(r.purge?.options?.defaultExtractor)return r.purge.options.defaultExtractor;if(r.content?.options?.defaultExtractor)return r.content.options.defaultExtractor})();if(n!==void 0&&(i.DEFAULT=n),typeof t=="function")i.DEFAULT=t;else if(Array.isArray(t))for(let{extensions:s,extractor:a}of t??[])for(let o of s)i[o]=a;else typeof t=="object"&&t!==null&&Object.assign(i,t);return i})(),transform:(()=>{let t=(()=>r.purge?.transform?r.purge.transform:r.content?.transform?r.content.transform:r.purge?.transform?.DEFAULT?r.purge.transform.DEFAULT:r.content?.transform?.DEFAULT?r.content.transform.DEFAULT:{})(),i={};return typeof t=="function"?i.DEFAULT=t:typeof t=="object"&&t!==null&&Object.assign(i,t),i})()};for(let t of r.content.files)if(typeof t=="string"&&/{([^,]*?)}/g.test(t)){G.warn("invalid-glob-braces",[`The glob pattern ${zs(t)} in your Tailwind CSS configuration is invalid.`,`Update it to ${zs(t.replace(/{([^,]*?)}/g,"$1"))} to silence this warning.`]);break}return r}var If=P(()=>{u();ct();Be()});function ke(r){if(Object.prototype.toString.call(r)!=="[object Object]")return!1;let e=Object.getPrototypeOf(r);return e===null||Object.getPrototypeOf(e)===null}var Kt=P(()=>{u()});function St(r){return Array.isArray(r)?r.map(e=>St(e)):typeof r=="object"&&r!==null?Object.fromEntries(Object.entries(r).map(([e,t])=>[e,St(t)])):r}var Xi=P(()=>{u()});function jt(r){return r.replace(/\\,/g,"\\2c ")}var Zi=P(()=>{u()});var Ws,Df=P(()=>{u();Ws={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});function $r(r,{loose:e=!1}={}){if(typeof r!="string")return null;if(r=r.trim(),r==="transparent")return{mode:"rgb",color:["0","0","0"],alpha:"0"};if(r in Ws)return{mode:"rgb",color:Ws[r].map(s=>s.toString())};let t=r.replace(zv,(s,a,o,l,c)=>["#",a,a,o,o,l,l,c?c+c:""].join("")).match(jv);if(t!==null)return{mode:"rgb",color:[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)].map(s=>s.toString()),alpha:t[4]?(parseInt(t[4],16)/255).toString():void 0};let i=r.match(Uv)??r.match(Vv);if(i===null)return null;let n=[i[2],i[3],i[4]].filter(Boolean).map(s=>s.toString());return n.length===2&&n[0].startsWith("var(")?{mode:i[1],color:[n[0]],alpha:n[1]}:!e&&n.length!==3||n.length<3&&!n.some(s=>/^var\(.*?\)$/.test(s))?null:{mode:i[1],color:n,alpha:i[5]?.toString?.()}}function Gs({mode:r,color:e,alpha:t}){let i=t!==void 0;return r==="rgba"||r==="hsla"?`${r}(${e.join(", ")}${i?`, ${t}`:""})`:`${r}(${e.join(" ")}${i?` / ${t}`:""})`}var jv,zv,At,Ji,qf,Ct,Uv,Vv,Qs=P(()=>{u();Df();jv=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,zv=/^#([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,At=/(?:\d+|\d*\.\d+)%?/,Ji=/(?:\s*,\s*|\s+)/,qf=/\s*[,/]\s*/,Ct=/var\(--(?:[^ )]*?)(?:,(?:[^ )]*?|var\(--[^ )]*?\)))?\)/,Uv=new RegExp(`^(rgba?)\\(\\s*(${At.source}|${Ct.source})(?:${Ji.source}(${At.source}|${Ct.source}))?(?:${Ji.source}(${At.source}|${Ct.source}))?(?:${qf.source}(${At.source}|${Ct.source}))?\\s*\\)$`),Vv=new RegExp(`^(hsla?)\\(\\s*((?:${At.source})(?:deg|rad|grad|turn)?|${Ct.source})(?:${Ji.source}(${At.source}|${Ct.source}))?(?:${Ji.source}(${At.source}|${Ct.source}))?(?:${qf.source}(${At.source}|${Ct.source}))?\\s*\\)$`)});function Je(r,e,t){if(typeof r=="function")return r({opacityValue:e});let i=$r(r,{loose:!0});return i===null?t:Gs({...i,alpha:e})}function Ae({color:r,property:e,variable:t}){let i=[].concat(e);if(typeof r=="function")return{[t]:"1",...Object.fromEntries(i.map(s=>[s,r({opacityVariable:t,opacityValue:`var(${t}, 1)`})]))};let n=$r(r);return n===null?Object.fromEntries(i.map(s=>[s,r])):n.alpha!==void 0?Object.fromEntries(i.map(s=>[s,r])):{[t]:"1",...Object.fromEntries(i.map(s=>[s,Gs({...n,alpha:`var(${t}, 1)`})]))}}var Lr=P(()=>{u();Qs()});function ve(r,e){let t=[],i=[],n=0,s=!1;for(let a=0;a<r.length;a++){let o=r[a];t.length===0&&o===e[0]&&!s&&(e.length===1||r.slice(a,a+e.length)===e)&&(i.push(r.slice(n,a)),n=a+e.length),s=s?!1:o==="\\",o==="("||o==="["||o==="{"?t.push(o):(o===")"&&t[t.length-1]==="("||o==="]"&&t[t.length-1]==="["||o==="}"&&t[t.length-1]==="{")&&t.pop()}return i.push(r.slice(n)),i}var zt=P(()=>{u()});function en(r){return ve(r,",").map(t=>{let i=t.trim(),n={raw:i},s=i.split(Wv),a=new Set;for(let o of s)$f.lastIndex=0,!a.has("KEYWORD")&&Hv.has(o)?(n.keyword=o,a.add("KEYWORD")):$f.test(o)?a.has("X")?a.has("Y")?a.has("BLUR")?a.has("SPREAD")||(n.spread=o,a.add("SPREAD")):(n.blur=o,a.add("BLUR")):(n.y=o,a.add("Y")):(n.x=o,a.add("X")):n.color?(n.unknown||(n.unknown=[]),n.unknown.push(o)):n.color=o;return n.valid=n.x!==void 0&&n.y!==void 0,n})}function Lf(r){return r.map(e=>e.valid?[e.keyword,e.x,e.y,e.blur,e.spread,e.color].filter(Boolean).join(" "):e.raw).join(", ")}var Hv,Wv,$f,Ys=P(()=>{u();zt();Hv=new Set(["inset","inherit","initial","revert","unset"]),Wv=/\ +(?![^(]*\))/g,$f=/^-?(\d+|\.\d+)(.*?)$/g});function Ks(r){return Gv.some(e=>new RegExp(`^${e}\\(.*\\)`).test(r))}function K(r,e=null,t=!0){let i=e&&Qv.has(e.property);return r.startsWith("--")&&!i?`var(${r})`:r.includes("url(")?r.split(/(url\(.*?\))/g).filter(Boolean).map(n=>/^url\(.*?\)$/.test(n)?n:K(n,e,!1)).join(""):(r=r.replace(/([^\\])_+/g,(n,s)=>s+" ".repeat(n.length-1)).replace(/^_/g," ").replace(/\\_/g,"_"),t&&(r=r.trim()),r=Yv(r),r)}function Ye(r){return r.includes("=")&&(r=r.replace(/(=.*)/g,(e,t)=>{if(t[1]==="'"||t[1]==='"')return t;if(t.length>2){let i=t[t.length-1];if(t[t.length-2]===" "&&(i==="i"||i==="I"||i==="s"||i==="S"))return`="${t.slice(1,-2)}" ${t[t.length-1]}`}return`="${t.slice(1)}"`})),r}function Yv(r){let e=["theme"],t=["min-content","max-content","fit-content","safe-area-inset-top","safe-area-inset-right","safe-area-inset-bottom","safe-area-inset-left","titlebar-area-x","titlebar-area-y","titlebar-area-width","titlebar-area-height","keyboard-inset-top","keyboard-inset-right","keyboard-inset-bottom","keyboard-inset-left","keyboard-inset-width","keyboard-inset-height","radial-gradient","linear-gradient","conic-gradient","repeating-radial-gradient","repeating-linear-gradient","repeating-conic-gradient","anchor-size"];return r.replace(/(calc|min|max|clamp)\(.+\)/g,i=>{let n="";function s(){let a=n.trimEnd();return a[a.length-1]}for(let a=0;a<i.length;a++){let o=function(f){return f.split("").every((d,p)=>i[a+p]===d)},l=function(f){let d=1/0;for(let h of f){let b=i.indexOf(h,a);b!==-1&&b<d&&(d=b)}let p=i.slice(a,d);return a+=p.length-1,p},c=i[a];if(o("var"))n+=l([")",","]);else if(t.some(f=>o(f))){let f=t.find(d=>o(d));n+=f,a+=f.length-1}else e.some(f=>o(f))?n+=l([")"]):o("[")?n+=l(["]"]):["+","-","*","/"].includes(c)&&!["(","+","-","*","/",","].includes(s())?n+=` ${c} `:n+=c}return n.replace(/\s+/g," ")})}function Xs(r){return r.startsWith("url(")}function Zs(r){return!isNaN(Number(r))||Ks(r)}function Mr(r){return r.endsWith("%")&&Zs(r.slice(0,-1))||Ks(r)}function Nr(r){return r==="0"||new RegExp(`^[+-]?[0-9]*.?[0-9]+(?:[eE][+-]?[0-9]+)?${Xv}$`).test(r)||Ks(r)}function Mf(r){return Zv.has(r)}function Nf(r){let e=en(K(r));for(let t of e)if(!t.valid)return!1;return!0}function Bf(r){let e=0;return ve(r,"_").every(i=>(i=K(i),i.startsWith("var(")?!0:$r(i,{loose:!0})!==null?(e++,!0):!1))?e>0:!1}function Ff(r){let e=0;return ve(r,",").every(i=>(i=K(i),i.startsWith("var(")?!0:Xs(i)||ex(i)||["element(","image(","cross-fade(","image-set("].some(n=>i.startsWith(n))?(e++,!0):!1))?e>0:!1}function ex(r){r=K(r);for(let e of Jv)if(r.startsWith(`${e}(`))return!0;return!1}function jf(r){let e=0;return ve(r,"_").every(i=>(i=K(i),i.startsWith("var(")?!0:tx.has(i)||Nr(i)||Mr(i)?(e++,!0):!1))?e>0:!1}function zf(r){let e=0;return ve(r,",").every(i=>(i=K(i),i.startsWith("var(")?!0:i.includes(" ")&&!/(['"])([^"']+)\1/g.test(i)||/^\d/g.test(i)?!1:(e++,!0)))?e>0:!1}function Uf(r){return rx.has(r)}function Vf(r){return ix.has(r)}function Hf(r){return nx.has(r)}var Gv,Qv,Kv,Xv,Zv,Jv,tx,rx,ix,nx,Br=P(()=>{u();Qs();Ys();zt();Gv=["min","max","clamp","calc"];Qv=new Set(["scroll-timeline-name","timeline-scope","view-timeline-name","font-palette","anchor-name","anchor-scope","position-anchor","position-try-options","scroll-timeline","animation-timeline","view-timeline","position-try"]);Kv=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","rlh","vw","vh","vmin","vmax","vb","vi","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax"],Xv=`(?:${Kv.join("|")})`;Zv=new Set(["thin","medium","thick"]);Jv=new Set(["conic-gradient","linear-gradient","radial-gradient","repeating-conic-gradient","repeating-linear-gradient","repeating-radial-gradient"]);tx=new Set(["center","top","right","bottom","left"]);rx=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","math","emoji","fangsong"]);ix=new Set(["xx-small","x-small","small","medium","large","x-large","xx-large","xxx-large"]);nx=new Set(["larger","smaller"])});function Wf(r){let e=["cover","contain"];return ve(r,",").every(t=>{let i=ve(t,"_").filter(Boolean);return i.length===1&&e.includes(i[0])?!0:i.length!==1&&i.length!==2?!1:i.every(n=>Nr(n)||Mr(n)||n==="auto")})}var Gf=P(()=>{u();Br();zt()});function Qf(r,e){r.walkClasses(t=>{t.value=e(t.value),t.raws&&t.raws.value&&(t.raws.value=jt(t.raws.value))})}function Yf(r,e){if(!_t(r))return;let t=r.slice(1,-1);if(!!e(t))return K(t)}function sx(r,e={},t){let i=e[r];if(i!==void 0)return xt(i);if(_t(r)){let n=Yf(r,t);return n===void 0?void 0:xt(n)}}function tn(r,e={},{validate:t=()=>!0}={}){let i=e.values?.[r];return i!==void 0?i:e.supportsNegativeValues&&r.startsWith("-")?sx(r.slice(1),e.values,t):Yf(r,t)}function _t(r){return r.startsWith("[")&&r.endsWith("]")}function Kf(r){let e=r.lastIndexOf("/"),t=r.lastIndexOf("[",e),i=r.indexOf("]",e);return r[e-1]==="]"||r[e+1]==="["||t!==-1&&i!==-1&&t<e&&e<i&&(e=r.lastIndexOf("/",t)),e===-1||e===r.length-1?[r,void 0]:_t(r)&&!r.includes("]/[")?[r,void 0]:[r.slice(0,e),r.slice(e+1)]}function Xt(r){if(typeof r=="string"&&r.includes("<alpha-value>")){let e=r;return({opacityValue:t=1})=>e.replace(/<alpha-value>/g,t)}return r}function Xf(r){return K(r.slice(1,-1))}function ax(r,e={},{tailwindConfig:t={}}={}){if(e.values?.[r]!==void 0)return Xt(e.values?.[r]);let[i,n]=Kf(r);if(n!==void 0){let s=e.values?.[i]??(_t(i)?i.slice(1,-1):void 0);return s===void 0?void 0:(s=Xt(s),_t(n)?Je(s,Xf(n)):t.theme?.opacity?.[n]===void 0?void 0:Je(s,t.theme.opacity[n]))}return tn(r,e,{validate:Bf})}function ox(r,e={}){return e.values?.[r]}function qe(r){return(e,t)=>tn(e,t,{validate:r})}function lx(r,e){let t=r.indexOf(e);return t===-1?[void 0,r]:[r.slice(0,t),r.slice(t+1)]}function ea(r,e,t,i){if(t.values&&e in t.values)for(let{type:s}of r??[]){let a=Js[s](e,t,{tailwindConfig:i});if(a!==void 0)return[a,s,null]}if(_t(e)){let s=e.slice(1,-1),[a,o]=lx(s,":");if(!/^[\w-_]+$/g.test(a))o=s;else if(a!==void 0&&!Zf.includes(a))return[];if(o.length>0&&Zf.includes(a))return[tn(`[${o}]`,t),a,null]}let n=ta(r,e,t,i);for(let s of n)return s;return[]}function*ta(r,e,t,i){let n=we(i,"generalizedModifiers"),[s,a]=Kf(e);if(n&&t.modifiers!=null&&(t.modifiers==="any"||typeof t.modifiers=="object"&&(a&&_t(a)||a in t.modifiers))||(s=e,a=void 0),a!==void 0&&s===""&&(s="DEFAULT"),a!==void 0&&typeof t.modifiers=="object"){let l=t.modifiers?.[a]??null;l!==null?a=l:_t(a)&&(a=Xf(a))}for(let{type:l}of r??[]){let c=Js[l](s,t,{tailwindConfig:i});c!==void 0&&(yield[c,l,a??null])}}var Js,Zf,Fr=P(()=>{u();Zi();Lr();Br();Gi();Gf();ct();Js={any:tn,color:ax,url:qe(Xs),image:qe(Ff),length:qe(Nr),percentage:qe(Mr),position:qe(jf),lookup:ox,"generic-name":qe(Uf),"family-name":qe(zf),number:qe(Zs),"line-width":qe(Mf),"absolute-size":qe(Vf),"relative-size":qe(Hf),shadow:qe(Nf),size:qe(Wf)},Zf=Object.keys(Js)});function X(r){return typeof r=="function"?r({}):r}var ra=P(()=>{u()});function Zt(r){return typeof r=="function"}function jr(r,...e){let t=e.pop();for(let i of e)for(let n in i){let s=t(r[n],i[n]);s===void 0?ke(r[n])&&ke(i[n])?r[n]=jr({},r[n],i[n],t):r[n]=i[n]:r[n]=s}return r}function ux(r,...e){return Zt(r)?r(...e):r}function fx(r){return r.reduce((e,{extend:t})=>jr(e,t,(i,n)=>i===void 0?[n]:Array.isArray(i)?[n,...i]:[n,i]),{})}function cx(r){return{...r.reduce((e,t)=>Hs(e,t),{}),extend:fx(r)}}function Jf(r,e){if(Array.isArray(r)&&ke(r[0]))return r.concat(e);if(Array.isArray(e)&&ke(e[0])&&ke(r))return[r,...e];if(Array.isArray(e))return e}function px({extend:r,...e}){return jr(e,r,(t,i)=>!Zt(t)&&!i.some(Zt)?jr({},t,...i,Jf):(n,s)=>jr({},...[t,...i].map(a=>ux(a,n,s)),Jf))}function*dx(r){let e=kt(r);if(e.length===0||(yield e,Array.isArray(r)))return;let t=/^(.*?)\s*\/\s*([^/]+)$/,i=r.match(t);if(i!==null){let[,n,s]=i,a=kt(n);a.alpha=s,yield a}}function hx(r){let e=(t,i)=>{for(let n of dx(t)){let s=0,a=r;for(;a!=null&&s<n.length;)a=a[n[s++]],a=Zt(a)&&(n.alpha===void 0||s<=n.length-1)?a(e,ia):a;if(a!==void 0){if(n.alpha!==void 0){let o=Xt(a);return Je(o,n.alpha,X(o))}return ke(a)?St(a):a}}return i};return Object.assign(e,{theme:e,...ia}),Object.keys(r).reduce((t,i)=>(t[i]=Zt(r[i])?r[i](e,ia):r[i],t),{})}function ec(r){let e=[];return r.forEach(t=>{e=[...e,t];let i=t?.plugins??[];i.length!==0&&i.forEach(n=>{n.__isOptionsFunction&&(n=n()),e=[...e,...ec([n?.config??{}])]})}),e}function mx(r){return[...r].reduceRight((t,i)=>Zt(i)?i({corePlugins:t}):kf(i,t),vf)}function gx(r){return[...r].reduceRight((t,i)=>[...t,...i],[])}function na(r){let e=[...ec(r),{prefix:"",important:!1,separator:":"}];return Pf(Hs({theme:hx(px(cx(e.map(t=>t?.theme??{})))),corePlugins:mx(e.map(t=>t.corePlugins)),plugins:gx(r.map(t=>t?.plugins??[]))},...e))}var ia,tc=P(()=>{u();Gi();xf();Sf();Vs();Ef();Yi();If();Kt();Xi();Fr();Lr();ra();ia={colors:Us,negative(r){return Object.keys(r).filter(e=>r[e]!=="0").reduce((e,t)=>{let i=xt(r[t]);return i!==void 0&&(e[`-${t}`]=i),e},{})},breakpoints(r){return Object.keys(r).filter(e=>typeof r[e]=="string").reduce((e,t)=>({...e,[`screen-${t}`]:r[t]}),{})}}});var rn=x((f3,rc)=>{u();rc.exports={content:[],presets:[],darkMode:"media",theme:{accentColor:({theme:r})=>({...r("colors"),auto:"auto"}),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{busy:'busy="true"',checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9"},backdropBlur:({theme:r})=>r("blur"),backdropBrightness:({theme:r})=>r("brightness"),backdropContrast:({theme:r})=>r("contrast"),backdropGrayscale:({theme:r})=>r("grayscale"),backdropHueRotate:({theme:r})=>r("hueRotate"),backdropInvert:({theme:r})=>r("invert"),backdropOpacity:({theme:r})=>r("opacity"),backdropSaturate:({theme:r})=>r("saturate"),backdropSepia:({theme:r})=>r("sepia"),backgroundColor:({theme:r})=>r("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:r})=>r("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:r})=>({...r("colors"),DEFAULT:r("colors.gray.200","currentColor")}),borderOpacity:({theme:r})=>r("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:r})=>({...r("spacing")}),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px"},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:r})=>r("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2"},caretColor:({theme:r})=>r("colors"),colors:({colors:r})=>({inherit:r.inherit,current:r.current,transparent:r.transparent,black:r.black,white:r.white,slate:r.slate,gray:r.gray,zinc:r.zinc,neutral:r.neutral,stone:r.stone,red:r.red,orange:r.orange,amber:r.amber,yellow:r.yellow,lime:r.lime,green:r.green,emerald:r.emerald,teal:r.teal,cyan:r.cyan,sky:r.sky,blue:r.blue,indigo:r.indigo,violet:r.violet,purple:r.purple,fuchsia:r.fuchsia,pink:r.pink,rose:r.rose}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2"},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:r})=>r("borderColor"),divideOpacity:({theme:r})=>r("borderOpacity"),divideWidth:({theme:r})=>r("borderWidth"),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:r})=>({none:"none",...r("colors")}),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:r})=>({auto:"auto",...r("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%"}),flexGrow:{0:"0",DEFAULT:"1"},flexShrink:{0:"0",DEFAULT:"1"},fontFamily:{sans:["ui-sans-serif","system-ui","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:r})=>r("spacing"),gradientColorStops:({theme:r})=>r("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%"},grayscale:{0:"0",DEFAULT:"100%"},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridTemplateColumns:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))"},gridTemplateRows:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))"},height:({theme:r})=>({auto:"auto",...r("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content"}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},inset:({theme:r})=>({auto:"auto",...r("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),invert:{0:"0",DEFAULT:"100%"},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:r})=>({auto:"auto",...r("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6"},maxHeight:({theme:r})=>({...r("spacing"),none:"none",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content"}),maxWidth:({theme:r,breakpoints:e})=>({...r("spacing"),none:"none",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...e(r("screens"))}),minHeight:({theme:r})=>({...r("spacing"),full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content"}),minWidth:({theme:r})=>({...r("spacing"),full:"100%",min:"min-content",max:"max-content",fit:"fit-content"}),objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",15:"0.15",20:"0.2",25:"0.25",30:"0.3",35:"0.35",40:"0.4",45:"0.45",50:"0.5",55:"0.55",60:"0.6",65:"0.65",70:"0.7",75:"0.75",80:"0.8",85:"0.85",90:"0.9",95:"0.95",100:"1"},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12"},outlineColor:({theme:r})=>r("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},padding:({theme:r})=>r("spacing"),placeholderColor:({theme:r})=>r("colors"),placeholderOpacity:({theme:r})=>r("opacity"),ringColor:({theme:r})=>({DEFAULT:r("colors.blue.500","#3b82f6"),...r("colors")}),ringOffsetColor:({theme:r})=>r("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},ringOpacity:({theme:r})=>({DEFAULT:"0.5",...r("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg"},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2"},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5"},screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},scrollMargin:({theme:r})=>({...r("spacing")}),scrollPadding:({theme:r})=>r("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg"},space:({theme:r})=>({...r("spacing")}),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:r})=>({none:"none",...r("colors")}),strokeWidth:{0:"0",1:"1",2:"2"},supports:{},data:{},textColor:({theme:r})=>r("colors"),textDecorationColor:({theme:r})=>r("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},textIndent:({theme:r})=>({...r("spacing")}),textOpacity:({theme:r})=>r("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:r})=>({...r("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),size:({theme:r})=>({auto:"auto",...r("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"}),width:({theme:r})=>({auto:"auto",...r("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",svw:"100svw",lvw:"100lvw",dvw:"100dvw",min:"min-content",max:"max-content",fit:"fit-content"}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50"}},plugins:[]}});function nn(r){let e=(r?.presets??[ic.default]).slice().reverse().flatMap(n=>nn(n instanceof Function?n():n)),t={respectDefaultRingColorOpacity:{theme:{ringColor:({theme:n})=>({DEFAULT:"#3b82f67f",...n("colors")})}},disableColorOpacityUtilitiesByDefault:{corePlugins:{backgroundOpacity:!1,borderOpacity:!1,divideOpacity:!1,placeholderOpacity:!1,ringOpacity:!1,textOpacity:!1}}},i=Object.keys(t).filter(n=>we(r,n)).map(n=>t[n]);return[r,...i,...e]}var ic,nc=P(()=>{u();ic=pe(rn());ct()});var sc={};Ge(sc,{default:()=>zr});function zr(...r){let[,...e]=nn(r[0]);return na([...r,...e])}var sa=P(()=>{u();tc();nc()});var Ur={};Ge(Ur,{default:()=>me});var me,et=P(()=>{u();me={resolve:r=>r,extname:r=>"."+r.split(".").pop()}});function sn(r){return typeof r=="object"&&r!==null}function bx(r){return Object.keys(r).length===0}function ac(r){return typeof r=="string"||r instanceof String}function aa(r){return sn(r)&&r.config===void 0&&!bx(r)?null:sn(r)&&r.config!==void 0&&ac(r.config)?me.resolve(r.config):sn(r)&&r.config!==void 0&&sn(r.config)?null:ac(r)?me.resolve(r):wx()}function wx(){for(let r of yx)try{let e=me.resolve(r);return be.accessSync(e),e}catch(e){}return null}var yx,oc=P(()=>{u();ft();et();yx=["./tailwind.config.js","./tailwind.config.cjs","./tailwind.config.mjs","./tailwind.config.ts","./tailwind.config.cts","./tailwind.config.mts"]});var lc={};Ge(lc,{default:()=>oa});var oa,la=P(()=>{u();oa={parse:r=>({href:r})}});var ua=x(()=>{u()});var an=x((v3,cc)=>{u();"use strict";var uc=(Qi(),Af),fc=ua(),Jt=class extends Error{constructor(e,t,i,n,s,a){super(e);this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),n&&(this.source=n),a&&(this.plugin=a),typeof t!="undefined"&&typeof i!="undefined"&&(typeof t=="number"?(this.line=t,this.column=i):(this.line=t.line,this.column=t.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Jt)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=uc.isColorSupported);let i=f=>f,n=f=>f,s=f=>f;if(e){let{bold:f,gray:d,red:p}=uc.createColors(!0);n=h=>f(p(h)),i=h=>d(h),fc&&(s=h=>fc(h))}let a=t.split(/\r?\n/),o=Math.max(this.line-3,0),l=Math.min(this.line+2,a.length),c=String(l).length;return a.slice(o,l).map((f,d)=>{let p=o+1+d,h=" "+(" "+p).slice(-c)+" | ";if(p===this.line){if(f.length>160){let v=20,y=Math.max(0,this.column-v),w=Math.max(this.column+v,this.endColumn+v),k=f.slice(y,w),S=i(h.replace(/\d/g," "))+f.slice(0,Math.min(this.column-1,v-1)).replace(/[^\t]/g," ");return n(">")+i(h)+s(k)+`- `+S+n("^")}let b=i(h.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+i(h)+s(f)+`- `+b+n("^")}return" "+i(h)+s(f)}).join(`-`)}toString(){let e=this.showSourceCode();return e&&(e=`--`+e+`-`),this.name+": "+this.message+e}};cc.exports=Jt;Jt.default=Jt});var fa=x((x3,dc)=>{u();"use strict";var pc={after:`-`,beforeClose:`-`,beforeComment:`-`,beforeDecl:`-`,beforeOpen:" ",beforeRule:`-`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function vx(r){return r[0].toUpperCase()+r.slice(1)}var on=class{constructor(e){this.builder=e}atrule(e,t){let i="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?i+=e.raws.afterName:n&&(i+=" "),e.nodes)this.block(e,i+n);else{let s=(e.raws.between||"")+(t?";":"");this.builder(i+n+s,e)}}beforeAfter(e,t){let i;e.type==="decl"?i=this.raw(e,null,"beforeDecl"):e.type==="comment"?i=this.raw(e,null,"beforeComment"):t==="before"?i=this.raw(e,null,"beforeRule"):i=this.raw(e,null,"beforeClose");let n=e.parent,s=0;for(;n&&n.type!=="root";)s+=1,n=n.parent;if(i.includes(`-`)){let a=this.raw(e,null,"indent");if(a.length)for(let o=0;o<s;o++)i+=a}return i}block(e,t){let i=this.raw(e,"between","beforeOpen");this.builder(t+i+"{",e,"start");let n;e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let i=this.raw(e,"semicolon");for(let n=0;n<e.nodes.length;n++){let s=e.nodes[n],a=this.raw(s,"before");a&&this.builder(a),this.stringify(s,t!==n||i)}}comment(e){let t=this.raw(e,"left","commentLeft"),i=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+i+"*/",e)}decl(e,t){let i=this.raw(e,"between","colon"),n=e.prop+i+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}document(e){this.body(e)}raw(e,t,i){let n;if(i||(i=t),t&&(n=e.raws[t],typeof n!="undefined"))return n;let s=e.parent;if(i==="before"&&(!s||s.type==="root"&&s.first===e||s&&s.type==="document"))return"";if(!s)return pc[i];let a=e.root();if(a.rawCache||(a.rawCache={}),typeof a.rawCache[i]!="undefined")return a.rawCache[i];if(i==="before"||i==="after")return this.beforeAfter(e,i);{let o="raw"+vx(i);this[o]?n=this[o](a,e):a.walk(l=>{if(n=l.raws[t],typeof n!="undefined")return!1})}return typeof n=="undefined"&&(n=pc[i]),a.rawCache[i]=n,n}rawBeforeClose(e){let t;return e.walk(i=>{if(i.nodes&&i.nodes.length>0&&typeof i.raws.after!="undefined")return t=i.raws.after,t.includes(`-`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let i;return e.walkComments(n=>{if(typeof n.raws.before!="undefined")return i=n.raws.before,i.includes(`-`)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i=="undefined"?i=this.raw(t,null,"beforeDecl"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeDecl(e,t){let i;return e.walkDecls(n=>{if(typeof n.raws.before!="undefined")return i=n.raws.before,i.includes(`-`)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i=="undefined"?i=this.raw(t,null,"beforeRule"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeOpen(e){let t;return e.walk(i=>{if(i.type!=="decl"&&(t=i.raws.between,typeof t!="undefined"))return!1}),t}rawBeforeRule(e){let t;return e.walk(i=>{if(i.nodes&&(i.parent!==e||e.first!==i)&&typeof i.raws.before!="undefined")return t=i.raws.before,t.includes(`-`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(i=>{if(typeof i.raws.between!="undefined")return t=i.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(i=>{if(i.nodes&&i.nodes.length===0&&(t=i.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(i=>{let n=i.parent;if(n&&n!==e&&n.parent&&n.parent===e&&typeof i.raws.before!="undefined"){let s=i.raws.before.split(`-`);return t=s[s.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(i=>{if(i.nodes&&i.nodes.length&&i.last.type==="decl"&&(t=i.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let i=e[t],n=e.raws[t];return n&&n.value===i?n.raw:i}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};dc.exports=on;on.default=on});var Vr=x((k3,hc)=>{u();"use strict";var xx=fa();function ca(r,e){new xx(e).stringify(r)}hc.exports=ca;ca.default=ca});var ln=x((S3,pa)=>{u();"use strict";pa.exports.isClean=Symbol("isClean");pa.exports.my=Symbol("my")});var Gr=x((A3,mc)=>{u();"use strict";var kx=an(),Sx=fa(),Ax=Vr(),{isClean:Hr,my:Cx}=ln();function da(r,e){let t=new r.constructor;for(let i in r){if(!Object.prototype.hasOwnProperty.call(r,i)||i==="proxyCache")continue;let n=r[i],s=typeof n;i==="parent"&&s==="object"?e&&(t[i]=e):i==="source"?t[i]=n:Array.isArray(n)?t[i]=n.map(a=>da(a,t)):(s==="object"&&n!==null&&(n=da(n)),t[i]=n)}return t}function Wr(r,e){if(e&&typeof e.offset!="undefined")return e.offset;let t=1,i=1,n=0;for(let s=0;s<r.length;s++){if(i===e.line&&t===e.column){n=s;break}r[s]===`-`?(t=1,i+=1):t+=1}return n}var un=class{constructor(e={}){this.raws={},this[Hr]=!1,this[Cx]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let i of e[t])typeof i.clone=="function"?this.append(i.clone()):this.append(i)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=da(this);for(let i in e)t[i]=e[i];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:i,start:n}=this.rangeBy(t);return this.source.input.error(e,{column:n.column,line:n.line},{column:i.column,line:i.line},t)}return new kx(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,i){return e[t]===i||(e[t]=i,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markClean(){this[Hr]=!0}markDirty(){if(this[Hr]){this[Hr]=!1;let e=this;for(;e=e.parent;)e[Hr]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let n=this.source.input.css.slice(Wr(this.source.input.css,this.source.start),Wr(this.source.input.css,this.source.end)).indexOf(e.word);n!==-1&&(t=this.positionInside(n))}return t}positionInside(e){let t=this.source.start.column,i=this.source.start.line,n=Wr(this.source.input.css,this.source.start),s=n+e;for(let a=n;a<s;a++)this.source.input.css[a]===`-`?(t=1,i+=1):t+=1;return{column:t,line:i}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.source.input.css.slice(Wr(this.source.input.css,this.source.start),Wr(this.source.input.css,this.source.end)).indexOf(e.word);s!==-1&&(t=this.positionInside(s),i=this.positionInside(s+e.word.length))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1));return(i.line<t.line||i.line===t.line&&i.column<=t.column)&&(i={column:t.column+1,line:t.line}),{end:i,start:t}}raw(e,t){return new Sx().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,i=!1;for(let n of e)n===this?i=!0:i?(this.parent.insertAfter(t,n),t=n):this.parent.insertBefore(t,n);i||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let i={},n=t==null;t=t||new Map;let s=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let o=this[a];if(Array.isArray(o))i[a]=o.map(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof o=="object"&&o.toJSON)i[a]=o.toJSON(null,t);else if(a==="source"){let l=t.get(o.input);l==null&&(l=s,t.set(o.input,s),s++),i[a]={end:o.end,inputId:l,start:o.start}}else i[a]=o}return n&&(i.inputs=[...t.keys()].map(a=>a.toJSON())),i}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Ax){e.stringify&&(e=e.stringify);let t="";return e(this,i=>{t+=i}),t}warn(e,t,i){let n={node:this};for(let s in i)n[s]=i[s];return e.warn(t,n)}get proxyOf(){return this}};mc.exports=un;un.default=un});var Qr=x((C3,gc)=>{u();"use strict";var _x=Gr(),fn=class extends _x{constructor(e){super(e);this.type="comment"}};gc.exports=fn;fn.default=fn});var Yr=x((_3,yc)=>{u();"use strict";var Ex=Gr(),cn=class extends Ex{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e={...e,value:String(e.value)});super(e);this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};yc.exports=cn;cn.default=cn});var Et=x((E3,_c)=>{u();"use strict";var bc=Qr(),wc=Yr(),Ox=Gr(),{isClean:vc,my:xc}=ln(),ha,kc,Sc,ma;function Ac(r){return r.map(e=>(e.nodes&&(e.nodes=Ac(e.nodes)),delete e.source,e))}function Cc(r){if(r[vc]=!1,r.proxyOf.nodes)for(let e of r.proxyOf.nodes)Cc(e)}var Fe=class extends Ox{append(...e){for(let t of e){let i=this.normalize(t,this.last);for(let n of i)this.proxyOf.nodes.push(n)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),i,n;for(;this.indexes[t]<this.proxyOf.nodes.length&&(i=this.indexes[t],n=e(this.proxyOf.nodes[i],i),n!==!1);)this.indexes[t]+=1;return delete this.indexes[t],n}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...i)=>e[t](...i.map(n=>typeof n=="function"?(s,a)=>n(s.toProxy(),a):n)):t==="every"||t==="some"?i=>e[t]((n,...s)=>i(n.toProxy(),...s)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(i=>i.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,i){return e[t]===i||(e[t]=i,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let i=this.index(e),n=this.normalize(t,this.proxyOf.nodes[i]).reverse();i=this.index(e);for(let a of n)this.proxyOf.nodes.splice(i+1,0,a);let s;for(let a in this.indexes)s=this.indexes[a],i<s&&(this.indexes[a]=s+n.length);return this.markDirty(),this}insertBefore(e,t){let i=this.index(e),n=i===0?"prepend":!1,s=this.normalize(t,this.proxyOf.nodes[i],n).reverse();i=this.index(e);for(let o of s)this.proxyOf.nodes.splice(i,0,o);let a;for(let o in this.indexes)a=this.indexes[o],i<=a&&(this.indexes[o]=a+s.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Ac(kc(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let n of e)n.parent&&n.parent.removeChild(n,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let n of e)n.parent&&n.parent.removeChild(n,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new wc(e)]}else if(e.selector||e.selectors)e=[new ma(e)];else if(e.name)e=[new ha(e)];else if(e.text)e=[new bc(e)];else throw new Error("Unknown node type in node creation");return e.map(n=>(n[xc]||Fe.rebuild(n),n=n.proxyOf,n.parent&&n.parent.removeChild(n),n[vc]&&Cc(n),n.raws||(n.raws={}),typeof n.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(n.raws.before=t.raws.before.replace(/\S/g,"")),n.parent=this.proxyOf,n))}prepend(...e){e=e.reverse();for(let t of e){let i=this.normalize(t,this.first,"prepend").reverse();for(let n of i)this.proxyOf.nodes.unshift(n);for(let n in this.indexes)this.indexes[n]=this.indexes[n]+i.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let i in this.indexes)t=this.indexes[i],t>=e&&(this.indexes[i]=t-1);return this.markDirty(),this}replaceValues(e,t,i){return i||(i=t,t={}),this.walkDecls(n=>{t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,i))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,i)=>{let n;try{n=e(t,i)}catch(s){throw t.addToError(s)}return n!==!1&&t.walk&&(n=t.walk(e)),n})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((i,n)=>{if(i.type==="atrule"&&e.test(i.name))return t(i,n)}):this.walk((i,n)=>{if(i.type==="atrule"&&i.name===e)return t(i,n)}):(t=e,this.walk((i,n)=>{if(i.type==="atrule")return t(i,n)}))}walkComments(e){return this.walk((t,i)=>{if(t.type==="comment")return e(t,i)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((i,n)=>{if(i.type==="decl"&&e.test(i.prop))return t(i,n)}):this.walk((i,n)=>{if(i.type==="decl"&&i.prop===e)return t(i,n)}):(t=e,this.walk((i,n)=>{if(i.type==="decl")return t(i,n)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((i,n)=>{if(i.type==="rule"&&e.test(i.selector))return t(i,n)}):this.walk((i,n)=>{if(i.type==="rule"&&i.selector===e)return t(i,n)}):(t=e,this.walk((i,n)=>{if(i.type==="rule")return t(i,n)}))}get first(){if(!!this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(!!this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Fe.registerParse=r=>{kc=r};Fe.registerRule=r=>{ma=r};Fe.registerAtRule=r=>{ha=r};Fe.registerRoot=r=>{Sc=r};_c.exports=Fe;Fe.default=Fe;Fe.rebuild=r=>{r.type==="atrule"?Object.setPrototypeOf(r,ha.prototype):r.type==="rule"?Object.setPrototypeOf(r,ma.prototype):r.type==="decl"?Object.setPrototypeOf(r,wc.prototype):r.type==="comment"?Object.setPrototypeOf(r,bc.prototype):r.type==="root"&&Object.setPrototypeOf(r,Sc.prototype),r[xc]=!0,r.nodes&&r.nodes.forEach(e=>{Fe.rebuild(e)})}});var pn=x((O3,Oc)=>{u();"use strict";var Ec=Et(),Kr=class extends Ec{constructor(e){super(e);this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};Oc.exports=Kr;Kr.default=Kr;Ec.registerAtRule(Kr)});var dn=x((T3,Pc)=>{u();"use strict";var Tx=Et(),Tc,Rc,er=class extends Tx{constructor(e){super({type:"document",...e});this.nodes||(this.nodes=[])}toResult(e={}){return new Tc(new Rc,this,e).stringify()}};er.registerLazyResult=r=>{Tc=r};er.registerProcessor=r=>{Rc=r};Pc.exports=er;er.default=er});var Dc=x((R3,Ic)=>{u();var Rx="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Px=(r,e=21)=>(t=e)=>{let i="",n=t;for(;n--;)i+=r[Math.random()*r.length|0];return i},Ix=(r=21)=>{let e="",t=r;for(;t--;)e+=Rx[Math.random()*64|0];return e};Ic.exports={nanoid:Ix,customAlphabet:Px}});var qc=x(()=>{u()});var ga=x((D3,$c)=>{u();$c.exports={}});var mn=x((q3,Bc)=>{u();"use strict";var{nanoid:Dx}=Dc(),{isAbsolute:ya,resolve:ba}=(et(),Ur),{SourceMapConsumer:qx,SourceMapGenerator:$x}=qc(),{fileURLToPath:Lc,pathToFileURL:hn}=(la(),lc),Mc=an(),Lx=ga(),wa=ua(),va=Symbol("fromOffsetCache"),Mx=Boolean(qx&&$x),Nc=Boolean(ba&&ya),Xr=class{constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Nc||/^\w+:\/\//.test(t.from)||ya(t.from)?this.file=t.from:this.file=ba(t.from)),Nc&&Mx){let i=new Lx(this.css,t);if(i.text){this.map=i;let n=i.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n))}}this.file||(this.id="<input css "+Dx(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,i,n={}){let s,a,o;if(t&&typeof t=="object"){let c=t,f=i;if(typeof c.offset=="number"){let d=this.fromOffset(c.offset);t=d.line,i=d.col}else t=c.line,i=c.column;if(typeof f.offset=="number"){let d=this.fromOffset(f.offset);a=d.line,s=d.col}else a=f.line,s=f.column}else if(!i){let c=this.fromOffset(t);t=c.line,i=c.col}let l=this.origin(t,i,a,s);return l?o=new Mc(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,n.plugin):o=new Mc(e,a===void 0?t:{column:i,line:t},a===void 0?i:{column:s,line:a},this.css,this.file,n.plugin),o.input={column:i,endColumn:s,endLine:a,line:t,source:this.css},this.file&&(hn&&(o.input.url=hn(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,i;if(this[va])i=this[va];else{let s=this.css.split(`-`);i=new Array(s.length);let a=0;for(let o=0,l=s.length;o<l;o++)i[o]=a,a+=s[o].length+1;this[va]=i}t=i[i.length-1];let n=0;if(e>=t)n=i.length-1;else{let s=i.length-2,a;for(;n<s;)if(a=n+(s-n>>1),e<i[a])s=a-1;else if(e>=i[a+1])n=a+1;else{n=a;break}}return{col:e-i[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ba(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,i,n){if(!this.map)return!1;let s=this.map.consumer(),a=s.originalPositionFor({column:t,line:e});if(!a.source)return!1;let o;typeof i=="number"&&(o=s.originalPositionFor({column:n,line:i}));let l;ya(a.source)?l=hn(a.source):l=new URL(a.source,this.map.consumer().sourceRoot||hn(this.map.mapFile));let c={column:a.column,endColumn:o&&o.column,endLine:o&&o.line,line:a.line,url:l.toString()};if(l.protocol==="file:")if(Lc)c.file=Lc(l);else throw new Error("file: protocol is not available in this PostCSS build");let f=s.sourceContentFor(a.source);return f&&(c.source=f),c}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};Bc.exports=Xr;Xr.default=Xr;wa&&wa.registerInput&&wa.registerInput(Xr)});var tr=x(($3,Uc)=>{u();"use strict";var Fc=Et(),jc,zc,Ut=class extends Fc{constructor(e){super(e);this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,i){let n=super.normalize(e);if(t){if(i==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let s of n)s.raws.before=t.raws.before}return n}removeChild(e,t){let i=this.index(e);return!t&&i===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(e)}toResult(e={}){return new jc(new zc,this,e).stringify()}};Ut.registerLazyResult=r=>{jc=r};Ut.registerProcessor=r=>{zc=r};Uc.exports=Ut;Ut.default=Ut;Fc.registerRoot(Ut)});var xa=x((L3,Vc)=>{u();"use strict";var Zr={comma(r){return Zr.split(r,[","],!0)},space(r){let e=[" ",`-`," "];return Zr.split(r,e)},split(r,e,t){let i=[],n="",s=!1,a=0,o=!1,l="",c=!1;for(let f of r)c?c=!1:f==="\\"?c=!0:o?f===l&&(o=!1):f==='"'||f==="'"?(o=!0,l=f):f==="("?a+=1:f===")"?a>0&&(a-=1):a===0&&e.includes(f)&&(s=!0),s?(n!==""&&i.push(n.trim()),n="",s=!1):n+=f;return(t||n!=="")&&i.push(n.trim()),i}};Vc.exports=Zr;Zr.default=Zr});var gn=x((M3,Wc)=>{u();"use strict";var Hc=Et(),Nx=xa(),Jr=class extends Hc{constructor(e){super(e);this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Nx.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,i=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(i)}};Wc.exports=Jr;Jr.default=Jr;Hc.registerRule(Jr)});var Qc=x((N3,Gc)=>{u();"use strict";var Bx=pn(),Fx=Qr(),jx=Yr(),zx=mn(),Ux=ga(),Vx=tr(),Hx=gn();function ei(r,e){if(Array.isArray(r))return r.map(n=>ei(n));let{inputs:t,...i}=r;if(t){e=[];for(let n of t){let s={...n,__proto__:zx.prototype};s.map&&(s.map={...s.map,__proto__:Ux.prototype}),e.push(s)}}if(i.nodes&&(i.nodes=r.nodes.map(n=>ei(n,e))),i.source){let{inputId:n,...s}=i.source;i.source=s,n!=null&&(i.source.input=e[n])}if(i.type==="root")return new Vx(i);if(i.type==="decl")return new jx(i);if(i.type==="rule")return new Hx(i);if(i.type==="comment")return new Fx(i);if(i.type==="atrule")return new Bx(i);throw new Error("Unknown node type: "+r.type)}Gc.exports=ei;ei.default=ei});var ka=x((B3,Yc)=>{u();Yc.exports=function(r,e){return{generate:()=>{let t="";return r(e,i=>{t+=i}),[t]}}}});var ep=x((F3,Jc)=>{u();"use strict";var Sa="'".charCodeAt(0),Kc='"'.charCodeAt(0),yn="\\".charCodeAt(0),Xc="/".charCodeAt(0),bn=`-`.charCodeAt(0),ti=" ".charCodeAt(0),wn="\f".charCodeAt(0),vn=" ".charCodeAt(0),xn="\r".charCodeAt(0),Wx="[".charCodeAt(0),Gx="]".charCodeAt(0),Qx="(".charCodeAt(0),Yx=")".charCodeAt(0),Kx="{".charCodeAt(0),Xx="}".charCodeAt(0),Zx=";".charCodeAt(0),Jx="*".charCodeAt(0),e1=":".charCodeAt(0),t1="@".charCodeAt(0),kn=/[\t\n\f\r "#'()/;[\\\]{}]/g,Sn=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,r1=/.[\r\n"'(/\\]/,Zc=/[\da-f]/i;Jc.exports=function(e,t={}){let i=e.css.valueOf(),n=t.ignoreErrors,s,a,o,l,c,f,d,p,h,b,v=i.length,y=0,w=[],k=[];function S(){return y}function E(R){throw e.error("Unclosed "+R,y)}function T(){return k.length===0&&y>=v}function B(R){if(k.length)return k.pop();if(y>=v)return;let F=R?R.ignoreUnclosed:!1;switch(s=i.charCodeAt(y),s){case bn:case ti:case vn:case xn:case wn:{l=y;do l+=1,s=i.charCodeAt(l);while(s===ti||s===bn||s===vn||s===xn||s===wn);f=["space",i.slice(y,l)],y=l-1;break}case Wx:case Gx:case Kx:case Xx:case e1:case Zx:case Yx:{let Y=String.fromCharCode(s);f=[Y,Y,y];break}case Qx:{if(b=w.length?w.pop()[1]:"",h=i.charCodeAt(y+1),b==="url"&&h!==Sa&&h!==Kc&&h!==ti&&h!==bn&&h!==vn&&h!==wn&&h!==xn){l=y;do{if(d=!1,l=i.indexOf(")",l+1),l===-1)if(n||F){l=y;break}else E("bracket");for(p=l;i.charCodeAt(p-1)===yn;)p-=1,d=!d}while(d);f=["brackets",i.slice(y,l+1),y,l],y=l}else l=i.indexOf(")",y+1),a=i.slice(y,l+1),l===-1||r1.test(a)?f=["(","(",y]:(f=["brackets",a,y,l],y=l);break}case Sa:case Kc:{c=s===Sa?"'":'"',l=y;do{if(d=!1,l=i.indexOf(c,l+1),l===-1)if(n||F){l=y+1;break}else E("string");for(p=l;i.charCodeAt(p-1)===yn;)p-=1,d=!d}while(d);f=["string",i.slice(y,l+1),y,l],y=l;break}case t1:{kn.lastIndex=y+1,kn.test(i),kn.lastIndex===0?l=i.length-1:l=kn.lastIndex-2,f=["at-word",i.slice(y,l+1),y,l],y=l;break}case yn:{for(l=y,o=!0;i.charCodeAt(l+1)===yn;)l+=1,o=!o;if(s=i.charCodeAt(l+1),o&&s!==Xc&&s!==ti&&s!==bn&&s!==vn&&s!==xn&&s!==wn&&(l+=1,Zc.test(i.charAt(l)))){for(;Zc.test(i.charAt(l+1));)l+=1;i.charCodeAt(l+1)===ti&&(l+=1)}f=["word",i.slice(y,l+1),y,l],y=l;break}default:{s===Xc&&i.charCodeAt(y+1)===Jx?(l=i.indexOf("*/",y+2)+1,l===0&&(n||F?l=i.length:E("comment")),f=["comment",i.slice(y,l+1),y,l],y=l):(Sn.lastIndex=y+1,Sn.test(i),Sn.lastIndex===0?l=i.length-1:l=Sn.lastIndex-2,f=["word",i.slice(y,l+1),y,l],w.push(f),y=l);break}}return y++,f}function N(R){k.push(R)}return{back:N,endOfFile:T,nextToken:B,position:S}}});var sp=x((j3,np)=>{u();"use strict";var i1=pn(),n1=Qr(),s1=Yr(),a1=tr(),tp=gn(),o1=ep(),rp={empty:!0,space:!0};function l1(r){for(let e=r.length-1;e>=0;e--){let t=r[e],i=t[3]||t[2];if(i)return i}}var ip=class{constructor(e){this.input=e,this.root=new a1,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new i1;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let i,n,s,a=!1,o=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),i=e[0],i==="("||i==="["?c.push(i==="("?")":"]"):i==="{"&&c.length>0?c.push("}"):i===c[c.length-1]&&c.pop(),c.length===0)if(i===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(i==="{"){o=!0;break}else if(i==="}"){if(l.length>0){for(s=l.length-1,n=l[s];n&&n[0]==="space";)n=l[--s];n&&(t.source.end=this.getPosition(n[3]||n[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),a&&(e=l[l.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),o&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let i=0,n;for(let s=t-1;s>=0&&(n=e[s],!(n[0]!=="space"&&(i+=1,i===2)));s--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(e){let t=0,i,n,s;for(let[a,o]of e.entries()){if(n=o,s=n[0],s==="("&&(t+=1),s===")"&&(t-=1),t===0&&s===":")if(!i)this.doubleColon(n);else{if(i[0]==="word"&&i[1]==="progid")continue;return a}i=n}return!1}comment(e){let t=new n1;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let i=e[1].slice(2,-2);if(/^\s*$/.test(i))t.text="",t.raws.left=i,t.raws.right="";else{let n=i.match(/^(\s*)([^]*\S)(\s*)$/);t.text=n[2],t.raws.left=n[1],t.raws.right=n[3]}}createTokenizer(){this.tokenizer=o1(this.input)}decl(e,t){let i=new s1;this.init(i,e[0][2]);let n=e[e.length-1];for(n[0]===";"&&(this.semicolon=!0,e.pop()),i.source.end=this.getPosition(n[3]||n[2]||l1(e)),i.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),i.raws.before+=e.shift()[1];for(i.source.start=this.getPosition(e[0][2]),i.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;i.prop+=e.shift()[1]}i.raws.between="";let s;for(;e.length;)if(s=e.shift(),s[0]===":"){i.raws.between+=s[1];break}else s[0]==="word"&&/\w/.test(s[1])&&this.unknownWord([s]),i.raws.between+=s[1];(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let a=[],o;for(;e.length&&(o=e[0][0],!(o!=="space"&&o!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(s=e[c],s[1].toLowerCase()==="!important"){i.important=!0;let f=this.stringFrom(e,c);f=this.spacesFromEnd(e)+f,f!==" !important"&&(i.raws.important=f);break}else if(s[1].toLowerCase()==="important"){let f=e.slice(0),d="";for(let p=c;p>0;p--){let h=f[p][0];if(d.trim().startsWith("!")&&h!=="space")break;d=f.pop()[1]+d}d.trim().startsWith("!")&&(i.important=!0,i.raws.important=d,e=f)}if(s[0]!=="space"&&s[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(i.raws.between+=a.map(c=>c[1]).join(""),a=[]),this.raw(i,"value",a.concat(e),t),i.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new tp;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,i=null,n=!1,s=null,a=[],o=e[1].startsWith("--"),l=[],c=e;for(;c;){if(i=c[0],l.push(c),i==="("||i==="[")s||(s=c),a.push(i==="("?")":"]");else if(o&&n&&i==="{")s||(s=c),a.push("}");else if(a.length===0)if(i===";")if(n){this.decl(l,o);return}else break;else if(i==="{"){this.rule(l);return}else if(i==="}"){this.tokenizer.back(l.pop()),t=!0;break}else i===":"&&(n=!0);else i===a[a.length-1]&&(a.pop(),a.length===0&&(s=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(s),t&&n){if(!o)for(;l.length&&(c=l[l.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,o)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,i,n){let s,a,o=i.length,l="",c=!0,f,d;for(let p=0;p<o;p+=1)s=i[p],a=s[0],a==="space"&&p===o-1&&!n?c=!1:a==="comment"?(d=i[p-1]?i[p-1][0]:"empty",f=i[p+1]?i[p+1][0]:"empty",!rp[d]&&!rp[f]?l.slice(-1)===","?c=!1:l+=s[1]:c=!1):l+=s[1];if(!c){let p=i.reduce((h,b)=>h+b[1],"");e.raws[t]={raw:p,value:l}}e[t]=l}rule(e){e.pop();let t=new tp;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,i="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)i=e.pop()[1]+i;return i}spacesAndCommentsFromStart(e){let t,i="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)i+=e.shift()[1];return i}spacesFromEnd(e){let t,i="";for(;e.length&&(t=e[e.length-1][0],t==="space");)i=e.pop()[1]+i;return i}stringFrom(e,t){let i="";for(let n=t;n<e.length;n++)i+=e[n][1];return e.splice(t,e.length-t),i}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};np.exports=ip});var Cn=x((z3,ap)=>{u();"use strict";var u1=Et(),f1=mn(),c1=sp();function An(r,e){let t=new f1(r,e),i=new c1(t);try{i.parse()}catch(n){throw n}return i.root}ap.exports=An;An.default=An;u1.registerParse(An)});var Aa=x((U3,op)=>{u();"use strict";var _n=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let i=t.node.rangeBy(t);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in t)this[i]=t[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};op.exports=_n;_n.default=_n});var On=x((V3,lp)=>{u();"use strict";var p1=Aa(),En=class{constructor(e,t,i){this.processor=e,this.messages=[],this.root=t,this.opts=i,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let i=new p1(e,t);return this.messages.push(i),i}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};lp.exports=En;En.default=En});var Ca=x((H3,fp)=>{u();"use strict";var up={};fp.exports=function(e){up[e]||(up[e]=!0,typeof console!="undefined"&&console.warn&&console.warn(e))}});var Oa=x((G3,hp)=>{u();"use strict";var d1=Et(),h1=dn(),m1=ka(),g1=Cn(),cp=On(),y1=tr(),b1=Vr(),{isClean:tt,my:w1}=ln(),W3=Ca(),v1={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},x1={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},k1={Once:!0,postcssPlugin:!0,prepare:!0},rr=0;function ri(r){return typeof r=="object"&&typeof r.then=="function"}function pp(r){let e=!1,t=v1[r.type];return r.type==="decl"?e=r.prop.toLowerCase():r.type==="atrule"&&(e=r.name.toLowerCase()),e&&r.append?[t,t+"-"+e,rr,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:r.append?[t,rr,t+"Exit"]:[t,t+"Exit"]}function dp(r){let e;return r.type==="document"?e=["Document",rr,"DocumentExit"]:r.type==="root"?e=["Root",rr,"RootExit"]:e=pp(r),{eventIndex:0,events:e,iterator:0,node:r,visitorIndex:0,visitors:[]}}function _a(r){return r[tt]=!1,r.nodes&&r.nodes.forEach(e=>_a(e)),r}var Ea={},pt=class{constructor(e,t,i){this.stringified=!1,this.processed=!1;let n;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))n=_a(t);else if(t instanceof pt||t instanceof cp)n=_a(t.root),t.map&&(typeof i.map=="undefined"&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=t.map);else{let s=g1;i.syntax&&(s=i.syntax.parse),i.parser&&(s=i.parser),s.parse&&(s=s.parse);try{n=s(t,i)}catch(a){this.processed=!0,this.error=a}n&&!n[w1]&&d1.rebuild(n)}this.result=new cp(e,n,i),this.helpers={...Ea,postcss:Ea,result:this.result},this.plugins=this.processor.plugins.map(s=>typeof s=="object"&&s.prepare?{...s,...s.prepare(this.result)}:s)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let i=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=i.postcssPlugin,e.setMessage()):i.postcssVersion}catch(n){console&&console.error&&console.error(n)}return e}prepareVisitors(){this.listeners={};let e=(t,i,n)=>{this.listeners[i]||(this.listeners[i]=[]),this.listeners[i].push([t,n])};for(let t of this.plugins)if(typeof t=="object")for(let i in t){if(!x1[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!k1[i])if(typeof t[i]=="object")for(let n in t[i])n==="*"?e(t,i,t[i][n]):e(t,i+"-"+n.toLowerCase(),t[i][n]);else typeof t[i]=="function"&&e(t,i,t[i])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],i=this.runOnRoot(t);if(ri(i))try{await i}catch(n){throw this.handleError(n)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[tt];){e[tt]=!0;let t=[dp(e)];for(;t.length>0;){let i=this.visitTick(t);if(ri(i))try{await i}catch(n){let s=t[t.length-1].node;throw this.handleError(n,s)}}}if(this.listeners.OnceExit)for(let[t,i]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let n=e.nodes.map(s=>i(s,this.helpers));await Promise.all(n)}else await i(e,this.helpers)}catch(n){throw this.handleError(n)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(i=>e.Once(i,this.helpers));return ri(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=b1;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new m1(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(ri(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[tt];)e[tt]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[i,n]of e){this.result.lastPlugin=i;let s;try{s=n(t,this.helpers)}catch(a){throw this.handleError(a,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(ri(s))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:i,visitors:n}=t;if(i.type!=="root"&&i.type!=="document"&&!i.parent){e.pop();return}if(n.length>0&&t.visitorIndex<n.length){let[a,o]=n[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===n.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=a;try{return o(i.toProxy(),this.helpers)}catch(l){throw this.handleError(l,i)}}if(t.iterator!==0){let a=t.iterator,o;for(;o=i.nodes[i.indexes[a]];)if(i.indexes[a]+=1,!o[tt]){o[tt]=!0,e.push(dp(o));return}t.iterator=0,delete i.indexes[a]}let s=t.events;for(;t.eventIndex<s.length;){let a=s[t.eventIndex];if(t.eventIndex+=1,a===rr){i.nodes&&i.nodes.length&&(i[tt]=!0,t.iterator=i.getIterator());return}else if(this.listeners[a]){t.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[tt]=!0;let t=pp(e);for(let i of t)if(i===rr)e.nodes&&e.each(n=>{n[tt]||this.walkSync(n)});else{let n=this.listeners[i];if(n&&this.visitSync(n,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};pt.registerPostcss=r=>{Ea=r};hp.exports=pt;pt.default=pt;y1.registerLazyResult(pt);h1.registerLazyResult(pt)});var gp=x((Y3,mp)=>{u();"use strict";var S1=ka(),A1=Cn(),C1=On(),_1=Vr(),Q3=Ca(),Tn=class{constructor(e,t,i){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=i,this._map=void 0;let n,s=_1;this.result=new C1(this._processor,n,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let o=new S1(s,n,this._opts,t);if(o.isMap()){let[l,c]=o.generate();l&&(this.result.css=l),c&&(this.result.map=c)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=A1;try{e=t(this._css,this._opts)}catch(i){this.error=i}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};mp.exports=Tn;Tn.default=Tn});var bp=x((K3,yp)=>{u();"use strict";var E1=dn(),O1=Oa(),T1=gp(),R1=tr(),ir=class{constructor(e=[]){this.version="8.4.49",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let i of e)if(i.postcss===!0?i=i():i.postcss&&(i=i.postcss),typeof i=="object"&&Array.isArray(i.plugins))t=t.concat(i.plugins);else if(typeof i=="object"&&i.postcssPlugin)t.push(i);else if(typeof i=="function")t.push(i);else if(!(typeof i=="object"&&(i.parse||i.stringify)))throw new Error(i+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new T1(this,e,t):new O1(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};yp.exports=ir;ir.default=ir;R1.registerProcessor(ir);E1.registerProcessor(ir)});var $e=x((X3,Cp)=>{u();"use strict";var wp=pn(),vp=Qr(),P1=Et(),I1=an(),xp=Yr(),kp=dn(),D1=Qc(),q1=mn(),$1=Oa(),L1=xa(),M1=Gr(),N1=Cn(),Ta=bp(),B1=On(),Sp=tr(),Ap=gn(),F1=Vr(),j1=Aa();function J(...r){return r.length===1&&Array.isArray(r[0])&&(r=r[0]),new Ta(r)}J.plugin=function(e,t){let i=!1;function n(...a){console&&console.warn&&!i&&(i=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:-https://evilmartians.com/chronicles/postcss-8-plugin-migration`),m.env.LANG&&m.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:-https://www.w3ctech.com/topic/2226`));let o=t(...a);return o.postcssPlugin=e,o.postcssVersion=new Ta().version,o}let s;return Object.defineProperty(n,"postcss",{get(){return s||(s=n()),s}}),n.process=function(a,o,l){return J([n(l)]).process(a,o)},n};J.stringify=F1;J.parse=N1;J.fromJSON=D1;J.list=L1;J.comment=r=>new vp(r);J.atRule=r=>new wp(r);J.decl=r=>new xp(r);J.rule=r=>new Ap(r);J.root=r=>new Sp(r);J.document=r=>new kp(r);J.CssSyntaxError=I1;J.Declaration=xp;J.Container=P1;J.Processor=Ta;J.Document=kp;J.Comment=vp;J.Warning=j1;J.AtRule=wp;J.Result=B1;J.Input=q1;J.Rule=Ap;J.Root=Sp;J.Node=M1;$1.registerPostcss(J);Cp.exports=J;J.default=J});var re,ee,Z3,J3,eI,tI,rI,iI,nI,sI,aI,oI,lI,uI,fI,cI,pI,dI,hI,mI,gI,yI,bI,wI,vI,xI,Ot=P(()=>{u();re=pe($e()),ee=re.default,Z3=re.default.stringify,J3=re.default.fromJSON,eI=re.default.plugin,tI=re.default.parse,rI=re.default.list,iI=re.default.document,nI=re.default.comment,sI=re.default.atRule,aI=re.default.rule,oI=re.default.decl,lI=re.default.root,uI=re.default.CssSyntaxError,fI=re.default.Declaration,cI=re.default.Container,pI=re.default.Processor,dI=re.default.Document,hI=re.default.Comment,mI=re.default.Warning,gI=re.default.AtRule,yI=re.default.Result,bI=re.default.Input,wI=re.default.Rule,vI=re.default.Root,xI=re.default.Node});var Ra=x((SI,_p)=>{u();_p.exports=function(r,e,t,i,n){for(e=e.split?e.split("."):e,i=0;i<e.length;i++)r=r?r[e[i]]:n;return r===n?t:r}});var Pn=x((Rn,Ep)=>{u();"use strict";Rn.__esModule=!0;Rn.default=V1;function z1(r){for(var e=r.toLowerCase(),t="",i=!1,n=0;n<6&&e[n]!==void 0;n++){var s=e.charCodeAt(n),a=s>=97&&s<=102||s>=48&&s<=57;if(i=s===32,!a)break;t+=e[n]}if(t.length!==0){var o=parseInt(t,16),l=o>=55296&&o<=57343;return l||o===0||o>1114111?["\uFFFD",t.length+(i?1:0)]:[String.fromCodePoint(o),t.length+(i?1:0)]}}var U1=/\\/;function V1(r){var e=U1.test(r);if(!e)return r;for(var t="",i=0;i<r.length;i++){if(r[i]==="\\"){var n=z1(r.slice(i+1,i+7));if(n!==void 0){t+=n[0],i+=n[1];continue}if(r[i+1]==="\\"){t+="\\",i++;continue}r.length===i+1&&(t+=r[i]);continue}t+=r[i]}return t}Ep.exports=Rn.default});var Tp=x((In,Op)=>{u();"use strict";In.__esModule=!0;In.default=H1;function H1(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),i=1;i<e;i++)t[i-1]=arguments[i];for(;t.length>0;){var n=t.shift();if(!r[n])return;r=r[n]}return r}Op.exports=In.default});var Pp=x((Dn,Rp)=>{u();"use strict";Dn.__esModule=!0;Dn.default=W1;function W1(r){for(var e=arguments.length,t=new Array(e>1?e-1:0),i=1;i<e;i++)t[i-1]=arguments[i];for(;t.length>0;){var n=t.shift();r[n]||(r[n]={}),r=r[n]}}Rp.exports=Dn.default});var Dp=x((qn,Ip)=>{u();"use strict";qn.__esModule=!0;qn.default=G1;function G1(r){for(var e="",t=r.indexOf("/*"),i=0;t>=0;){e=e+r.slice(i,t);var n=r.indexOf("*/",t+2);if(n<0)return e;i=n+2,t=r.indexOf("/*",i)}return e=e+r.slice(i),e}Ip.exports=qn.default});var ii=x(rt=>{u();"use strict";rt.__esModule=!0;rt.unesc=rt.stripComments=rt.getProp=rt.ensureObject=void 0;var Q1=$n(Pn());rt.unesc=Q1.default;var Y1=$n(Tp());rt.getProp=Y1.default;var K1=$n(Pp());rt.ensureObject=K1.default;var X1=$n(Dp());rt.stripComments=X1.default;function $n(r){return r&&r.__esModule?r:{default:r}}});var dt=x((ni,Lp)=>{u();"use strict";ni.__esModule=!0;ni.default=void 0;var qp=ii();function $p(r,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(r,i.key,i)}}function Z1(r,e,t){return e&&$p(r.prototype,e),t&&$p(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}var J1=function r(e,t){if(typeof e!="object"||e===null)return e;var i=new e.constructor;for(var n in e)if(!!e.hasOwnProperty(n)){var s=e[n],a=typeof s;n==="parent"&&a==="object"?t&&(i[n]=t):s instanceof Array?i[n]=s.map(function(o){return r(o,i)}):i[n]=r(s,i)}return i},ek=function(){function r(t){t===void 0&&(t={}),Object.assign(this,t),this.spaces=this.spaces||{},this.spaces.before=this.spaces.before||"",this.spaces.after=this.spaces.after||""}var e=r.prototype;return e.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},e.replaceWith=function(){if(this.parent){for(var i in arguments)this.parent.insertBefore(this,arguments[i]);this.remove()}return this},e.next=function(){return this.parent.at(this.parent.index(this)+1)},e.prev=function(){return this.parent.at(this.parent.index(this)-1)},e.clone=function(i){i===void 0&&(i={});var n=J1(this);for(var s in i)n[s]=i[s];return n},e.appendToPropertyAndEscape=function(i,n,s){this.raws||(this.raws={});var a=this[i],o=this.raws[i];this[i]=a+n,o||s!==n?this.raws[i]=(o||a)+s:delete this.raws[i]},e.setPropertyAndEscape=function(i,n,s){this.raws||(this.raws={}),this[i]=n,this.raws[i]=s},e.setPropertyWithoutEscape=function(i,n){this[i]=n,this.raws&&delete this.raws[i]},e.isAtPosition=function(i,n){if(this.source&&this.source.start&&this.source.end)return!(this.source.start.line>i||this.source.end.line<i||this.source.start.line===i&&this.source.start.column>n||this.source.end.line===i&&this.source.end.column<n)},e.stringifyProperty=function(i){return this.raws&&this.raws[i]||this[i]},e.valueToString=function(){return String(this.stringifyProperty("value"))},e.toString=function(){return[this.rawSpaceBefore,this.valueToString(),this.rawSpaceAfter].join("")},Z1(r,[{key:"rawSpaceBefore",get:function(){var i=this.raws&&this.raws.spaces&&this.raws.spaces.before;return i===void 0&&(i=this.spaces&&this.spaces.before),i||""},set:function(i){(0,qp.ensureObject)(this,"raws","spaces"),this.raws.spaces.before=i}},{key:"rawSpaceAfter",get:function(){var i=this.raws&&this.raws.spaces&&this.raws.spaces.after;return i===void 0&&(i=this.spaces.after),i||""},set:function(i){(0,qp.ensureObject)(this,"raws","spaces"),this.raws.spaces.after=i}}]),r}();ni.default=ek;Lp.exports=ni.default});var Se=x(ie=>{u();"use strict";ie.__esModule=!0;ie.UNIVERSAL=ie.TAG=ie.STRING=ie.SELECTOR=ie.ROOT=ie.PSEUDO=ie.NESTING=ie.ID=ie.COMMENT=ie.COMBINATOR=ie.CLASS=ie.ATTRIBUTE=void 0;var tk="tag";ie.TAG=tk;var rk="string";ie.STRING=rk;var ik="selector";ie.SELECTOR=ik;var nk="root";ie.ROOT=nk;var sk="pseudo";ie.PSEUDO=sk;var ak="nesting";ie.NESTING=ak;var ok="id";ie.ID=ok;var lk="comment";ie.COMMENT=lk;var uk="combinator";ie.COMBINATOR=uk;var fk="class";ie.CLASS=fk;var ck="attribute";ie.ATTRIBUTE=ck;var pk="universal";ie.UNIVERSAL=pk});var Ln=x((si,Fp)=>{u();"use strict";si.__esModule=!0;si.default=void 0;var dk=mk(dt()),ht=hk(Se());function Mp(r){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(Mp=function(n){return n?t:e})(r)}function hk(r,e){if(!e&&r&&r.__esModule)return r;if(r===null||typeof r!="object"&&typeof r!="function")return{default:r};var t=Mp(e);if(t&&t.has(r))return t.get(r);var i={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in r)if(s!=="default"&&Object.prototype.hasOwnProperty.call(r,s)){var a=n?Object.getOwnPropertyDescriptor(r,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=r[s]}return i.default=r,t&&t.set(r,i),i}function mk(r){return r&&r.__esModule?r:{default:r}}function gk(r,e){var t=typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(t)return(t=t.call(r)).next.bind(t);if(Array.isArray(r)||(t=yk(r))||e&&r&&typeof r.length=="number"){t&&(r=t);var i=0;return function(){return i>=r.length?{done:!0}:{done:!1,value:r[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yk(r,e){if(!!r){if(typeof r=="string")return Np(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Np(r,e)}}function Np(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,i=new Array(e);t<e;t++)i[t]=r[t];return i}function Bp(r,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(r,i.key,i)}}function bk(r,e,t){return e&&Bp(r.prototype,e),t&&Bp(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}function wk(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,Pa(r,e)}function Pa(r,e){return Pa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},Pa(r,e)}var vk=function(r){wk(e,r);function e(i){var n;return n=r.call(this,i)||this,n.nodes||(n.nodes=[]),n}var t=e.prototype;return t.append=function(n){return n.parent=this,this.nodes.push(n),this},t.prepend=function(n){return n.parent=this,this.nodes.unshift(n),this},t.at=function(n){return this.nodes[n]},t.index=function(n){return typeof n=="number"?n:this.nodes.indexOf(n)},t.removeChild=function(n){n=this.index(n),this.at(n).parent=void 0,this.nodes.splice(n,1);var s;for(var a in this.indexes)s=this.indexes[a],s>=n&&(this.indexes[a]=s-1);return this},t.removeAll=function(){for(var n=gk(this.nodes),s;!(s=n()).done;){var a=s.value;a.parent=void 0}return this.nodes=[],this},t.empty=function(){return this.removeAll()},t.insertAfter=function(n,s){s.parent=this;var a=this.index(n);this.nodes.splice(a+1,0,s),s.parent=this;var o;for(var l in this.indexes)o=this.indexes[l],a<=o&&(this.indexes[l]=o+1);return this},t.insertBefore=function(n,s){s.parent=this;var a=this.index(n);this.nodes.splice(a,0,s),s.parent=this;var o;for(var l in this.indexes)o=this.indexes[l],o<=a&&(this.indexes[l]=o+1);return this},t._findChildAtPosition=function(n,s){var a=void 0;return this.each(function(o){if(o.atPosition){var l=o.atPosition(n,s);if(l)return a=l,!1}else if(o.isAtPosition(n,s))return a=o,!1}),a},t.atPosition=function(n,s){if(this.isAtPosition(n,s))return this._findChildAtPosition(n,s)||this},t._inferEndPosition=function(){this.last&&this.last.source&&this.last.source.end&&(this.source=this.source||{},this.source.end=this.source.end||{},Object.assign(this.source.end,this.last.source.end))},t.each=function(n){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var s=this.lastEach;if(this.indexes[s]=0,!!this.length){for(var a,o;this.indexes[s]<this.length&&(a=this.indexes[s],o=n(this.at(a),a),o!==!1);)this.indexes[s]+=1;if(delete this.indexes[s],o===!1)return!1}},t.walk=function(n){return this.each(function(s,a){var o=n(s,a);if(o!==!1&&s.length&&(o=s.walk(n)),o===!1)return!1})},t.walkAttributes=function(n){var s=this;return this.walk(function(a){if(a.type===ht.ATTRIBUTE)return n.call(s,a)})},t.walkClasses=function(n){var s=this;return this.walk(function(a){if(a.type===ht.CLASS)return n.call(s,a)})},t.walkCombinators=function(n){var s=this;return this.walk(function(a){if(a.type===ht.COMBINATOR)return n.call(s,a)})},t.walkComments=function(n){var s=this;return this.walk(function(a){if(a.type===ht.COMMENT)return n.call(s,a)})},t.walkIds=function(n){var s=this;return this.walk(function(a){if(a.type===ht.ID)return n.call(s,a)})},t.walkNesting=function(n){var s=this;return this.walk(function(a){if(a.type===ht.NESTING)return n.call(s,a)})},t.walkPseudos=function(n){var s=this;return this.walk(function(a){if(a.type===ht.PSEUDO)return n.call(s,a)})},t.walkTags=function(n){var s=this;return this.walk(function(a){if(a.type===ht.TAG)return n.call(s,a)})},t.walkUniversals=function(n){var s=this;return this.walk(function(a){if(a.type===ht.UNIVERSAL)return n.call(s,a)})},t.split=function(n){var s=this,a=[];return this.reduce(function(o,l,c){var f=n.call(s,l);return a.push(l),f?(o.push(a),a=[]):c===s.length-1&&o.push(a),o},[])},t.map=function(n){return this.nodes.map(n)},t.reduce=function(n,s){return this.nodes.reduce(n,s)},t.every=function(n){return this.nodes.every(n)},t.some=function(n){return this.nodes.some(n)},t.filter=function(n){return this.nodes.filter(n)},t.sort=function(n){return this.nodes.sort(n)},t.toString=function(){return this.map(String).join("")},bk(e,[{key:"first",get:function(){return this.at(0)}},{key:"last",get:function(){return this.at(this.length-1)}},{key:"length",get:function(){return this.nodes.length}}]),e}(dk.default);si.default=vk;Fp.exports=si.default});var Da=x((ai,zp)=>{u();"use strict";ai.__esModule=!0;ai.default=void 0;var xk=Sk(Ln()),kk=Se();function Sk(r){return r&&r.__esModule?r:{default:r}}function jp(r,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(r,i.key,i)}}function Ak(r,e,t){return e&&jp(r.prototype,e),t&&jp(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}function Ck(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,Ia(r,e)}function Ia(r,e){return Ia=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},Ia(r,e)}var _k=function(r){Ck(e,r);function e(i){var n;return n=r.call(this,i)||this,n.type=kk.ROOT,n}var t=e.prototype;return t.toString=function(){var n=this.reduce(function(s,a){return s.push(String(a)),s},[]).join(",");return this.trailingComma?n+",":n},t.error=function(n,s){return this._error?this._error(n,s):new Error(n)},Ak(e,[{key:"errorGenerator",set:function(n){this._error=n}}]),e}(xk.default);ai.default=_k;zp.exports=ai.default});var $a=x((oi,Up)=>{u();"use strict";oi.__esModule=!0;oi.default=void 0;var Ek=Tk(Ln()),Ok=Se();function Tk(r){return r&&r.__esModule?r:{default:r}}function Rk(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,qa(r,e)}function qa(r,e){return qa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},qa(r,e)}var Pk=function(r){Rk(e,r);function e(t){var i;return i=r.call(this,t)||this,i.type=Ok.SELECTOR,i}return e}(Ek.default);oi.default=Pk;Up.exports=oi.default});var Mn=x((_I,Vp)=>{u();"use strict";var Ik={},Dk=Ik.hasOwnProperty,qk=function(e,t){if(!e)return t;var i={};for(var n in t)i[n]=Dk.call(e,n)?e[n]:t[n];return i},$k=/[ -,\.\/:-@\[-\^`\{-~]/,Lk=/[ -,\.\/:-@\[\]\^`\{-~]/,Mk=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,La=function r(e,t){t=qk(t,r.options),t.quotes!="single"&&t.quotes!="double"&&(t.quotes="single");for(var i=t.quotes=="double"?'"':"'",n=t.isIdentifier,s=e.charAt(0),a="",o=0,l=e.length;o<l;){var c=e.charAt(o++),f=c.charCodeAt(),d=void 0;if(f<32||f>126){if(f>=55296&&f<=56319&&o<l){var p=e.charCodeAt(o++);(p&64512)==56320?f=((f&1023)<<10)+(p&1023)+65536:o--}d="\\"+f.toString(16).toUpperCase()+" "}else t.escapeEverything?$k.test(c)?d="\\"+c:d="\\"+f.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(c)?d="\\"+f.toString(16).toUpperCase()+" ":c=="\\"||!n&&(c=='"'&&i==c||c=="'"&&i==c)||n&&Lk.test(c)?d="\\"+c:d=c;a+=d}return n&&(/^-[-\d]/.test(a)?a="\\-"+a.slice(1):/\d/.test(s)&&(a="\\3"+s+" "+a.slice(1))),a=a.replace(Mk,function(h,b,v){return b&&b.length%2?h:(b||"")+v}),!n&&t.wrap?i+a+i:a};La.options={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1};La.version="3.0.0";Vp.exports=La});var Na=x((li,Gp)=>{u();"use strict";li.__esModule=!0;li.default=void 0;var Nk=Hp(Mn()),Bk=ii(),Fk=Hp(dt()),jk=Se();function Hp(r){return r&&r.__esModule?r:{default:r}}function Wp(r,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(r,i.key,i)}}function zk(r,e,t){return e&&Wp(r.prototype,e),t&&Wp(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}function Uk(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,Ma(r,e)}function Ma(r,e){return Ma=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},Ma(r,e)}var Vk=function(r){Uk(e,r);function e(i){var n;return n=r.call(this,i)||this,n.type=jk.CLASS,n._constructed=!0,n}var t=e.prototype;return t.valueToString=function(){return"."+r.prototype.valueToString.call(this)},zk(e,[{key:"value",get:function(){return this._value},set:function(n){if(this._constructed){var s=(0,Nk.default)(n,{isIdentifier:!0});s!==n?((0,Bk.ensureObject)(this,"raws"),this.raws.value=s):this.raws&&delete this.raws.value}this._value=n}}]),e}(Fk.default);li.default=Vk;Gp.exports=li.default});var Fa=x((ui,Qp)=>{u();"use strict";ui.__esModule=!0;ui.default=void 0;var Hk=Gk(dt()),Wk=Se();function Gk(r){return r&&r.__esModule?r:{default:r}}function Qk(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,Ba(r,e)}function Ba(r,e){return Ba=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},Ba(r,e)}var Yk=function(r){Qk(e,r);function e(t){var i;return i=r.call(this,t)||this,i.type=Wk.COMMENT,i}return e}(Hk.default);ui.default=Yk;Qp.exports=ui.default});var za=x((fi,Yp)=>{u();"use strict";fi.__esModule=!0;fi.default=void 0;var Kk=Zk(dt()),Xk=Se();function Zk(r){return r&&r.__esModule?r:{default:r}}function Jk(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,ja(r,e)}function ja(r,e){return ja=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},ja(r,e)}var eS=function(r){Jk(e,r);function e(i){var n;return n=r.call(this,i)||this,n.type=Xk.ID,n}var t=e.prototype;return t.valueToString=function(){return"#"+r.prototype.valueToString.call(this)},e}(Kk.default);fi.default=eS;Yp.exports=fi.default});var Nn=x((ci,Zp)=>{u();"use strict";ci.__esModule=!0;ci.default=void 0;var tS=Kp(Mn()),rS=ii(),iS=Kp(dt());function Kp(r){return r&&r.__esModule?r:{default:r}}function Xp(r,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(r,i.key,i)}}function nS(r,e,t){return e&&Xp(r.prototype,e),t&&Xp(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}function sS(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,Ua(r,e)}function Ua(r,e){return Ua=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},Ua(r,e)}var aS=function(r){sS(e,r);function e(){return r.apply(this,arguments)||this}var t=e.prototype;return t.qualifiedName=function(n){return this.namespace?this.namespaceString+"|"+n:n},t.valueToString=function(){return this.qualifiedName(r.prototype.valueToString.call(this))},nS(e,[{key:"namespace",get:function(){return this._namespace},set:function(n){if(n===!0||n==="*"||n==="&"){this._namespace=n,this.raws&&delete this.raws.namespace;return}var s=(0,tS.default)(n,{isIdentifier:!0});this._namespace=n,s!==n?((0,rS.ensureObject)(this,"raws"),this.raws.namespace=s):this.raws&&delete this.raws.namespace}},{key:"ns",get:function(){return this._namespace},set:function(n){this.namespace=n}},{key:"namespaceString",get:function(){if(this.namespace){var n=this.stringifyProperty("namespace");return n===!0?"":n}else return""}}]),e}(iS.default);ci.default=aS;Zp.exports=ci.default});var Ha=x((pi,Jp)=>{u();"use strict";pi.__esModule=!0;pi.default=void 0;var oS=uS(Nn()),lS=Se();function uS(r){return r&&r.__esModule?r:{default:r}}function fS(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,Va(r,e)}function Va(r,e){return Va=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},Va(r,e)}var cS=function(r){fS(e,r);function e(t){var i;return i=r.call(this,t)||this,i.type=lS.TAG,i}return e}(oS.default);pi.default=cS;Jp.exports=pi.default});var Ga=x((di,ed)=>{u();"use strict";di.__esModule=!0;di.default=void 0;var pS=hS(dt()),dS=Se();function hS(r){return r&&r.__esModule?r:{default:r}}function mS(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,Wa(r,e)}function Wa(r,e){return Wa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},Wa(r,e)}var gS=function(r){mS(e,r);function e(t){var i;return i=r.call(this,t)||this,i.type=dS.STRING,i}return e}(pS.default);di.default=gS;ed.exports=di.default});var Ya=x((hi,td)=>{u();"use strict";hi.__esModule=!0;hi.default=void 0;var yS=wS(Ln()),bS=Se();function wS(r){return r&&r.__esModule?r:{default:r}}function vS(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,Qa(r,e)}function Qa(r,e){return Qa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},Qa(r,e)}var xS=function(r){vS(e,r);function e(i){var n;return n=r.call(this,i)||this,n.type=bS.PSEUDO,n}var t=e.prototype;return t.toString=function(){var n=this.length?"("+this.map(String).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),n,this.rawSpaceAfter].join("")},e}(yS.default);hi.default=xS;td.exports=hi.default});var Bn={};Ge(Bn,{deprecate:()=>kS});function kS(r){return r}var Fn=P(()=>{u()});var id=x((EI,rd)=>{u();rd.exports=(Fn(),Bn).deprecate});var to=x(yi=>{u();"use strict";yi.__esModule=!0;yi.default=void 0;yi.unescapeValue=Ja;var mi=Xa(Mn()),SS=Xa(Pn()),AS=Xa(Nn()),CS=Se(),Ka;function Xa(r){return r&&r.__esModule?r:{default:r}}function nd(r,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(r,i.key,i)}}function _S(r,e,t){return e&&nd(r.prototype,e),t&&nd(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}function ES(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,Za(r,e)}function Za(r,e){return Za=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},Za(r,e)}var gi=id(),OS=/^('|")([^]*)\1$/,TS=gi(function(){},"Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead."),RS=gi(function(){},"Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."),PS=gi(function(){},"Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");function Ja(r){var e=!1,t=null,i=r,n=i.match(OS);return n&&(t=n[1],i=n[2]),i=(0,SS.default)(i),i!==r&&(e=!0),{deprecatedUsage:e,unescaped:i,quoteMark:t}}function IS(r){if(r.quoteMark!==void 0||r.value===void 0)return r;PS();var e=Ja(r.value),t=e.quoteMark,i=e.unescaped;return r.raws||(r.raws={}),r.raws.value===void 0&&(r.raws.value=r.value),r.value=i,r.quoteMark=t,r}var jn=function(r){ES(e,r);function e(i){var n;return i===void 0&&(i={}),n=r.call(this,IS(i))||this,n.type=CS.ATTRIBUTE,n.raws=n.raws||{},Object.defineProperty(n.raws,"unquoted",{get:gi(function(){return n.value},"attr.raws.unquoted is deprecated. Call attr.value instead."),set:gi(function(){return n.value},"Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")}),n._constructed=!0,n}var t=e.prototype;return t.getQuotedValue=function(n){n===void 0&&(n={});var s=this._determineQuoteMark(n),a=eo[s],o=(0,mi.default)(this._value,a);return o},t._determineQuoteMark=function(n){return n.smart?this.smartQuoteMark(n):this.preferredQuoteMark(n)},t.setValue=function(n,s){s===void 0&&(s={}),this._value=n,this._quoteMark=this._determineQuoteMark(s),this._syncRawValue()},t.smartQuoteMark=function(n){var s=this.value,a=s.replace(/[^']/g,"").length,o=s.replace(/[^"]/g,"").length;if(a+o===0){var l=(0,mi.default)(s,{isIdentifier:!0});if(l===s)return e.NO_QUOTE;var c=this.preferredQuoteMark(n);if(c===e.NO_QUOTE){var f=this.quoteMark||n.quoteMark||e.DOUBLE_QUOTE,d=eo[f],p=(0,mi.default)(s,d);if(p.length<l.length)return f}return c}else return o===a?this.preferredQuoteMark(n):o<a?e.DOUBLE_QUOTE:e.SINGLE_QUOTE},t.preferredQuoteMark=function(n){var s=n.preferCurrentQuoteMark?this.quoteMark:n.quoteMark;return s===void 0&&(s=n.preferCurrentQuoteMark?n.quoteMark:this.quoteMark),s===void 0&&(s=e.DOUBLE_QUOTE),s},t._syncRawValue=function(){var n=(0,mi.default)(this._value,eo[this.quoteMark]);n===this._value?this.raws&&delete this.raws.value:this.raws.value=n},t._handleEscapes=function(n,s){if(this._constructed){var a=(0,mi.default)(s,{isIdentifier:!0});a!==s?this.raws[n]=a:delete this.raws[n]}},t._spacesFor=function(n){var s={before:"",after:""},a=this.spaces[n]||{},o=this.raws.spaces&&this.raws.spaces[n]||{};return Object.assign(s,a,o)},t._stringFor=function(n,s,a){s===void 0&&(s=n),a===void 0&&(a=sd);var o=this._spacesFor(s);return a(this.stringifyProperty(n),o)},t.offsetOf=function(n){var s=1,a=this._spacesFor("attribute");if(s+=a.before.length,n==="namespace"||n==="ns")return this.namespace?s:-1;if(n==="attributeNS"||(s+=this.namespaceString.length,this.namespace&&(s+=1),n==="attribute"))return s;s+=this.stringifyProperty("attribute").length,s+=a.after.length;var o=this._spacesFor("operator");s+=o.before.length;var l=this.stringifyProperty("operator");if(n==="operator")return l?s:-1;s+=l.length,s+=o.after.length;var c=this._spacesFor("value");s+=c.before.length;var f=this.stringifyProperty("value");if(n==="value")return f?s:-1;s+=f.length,s+=c.after.length;var d=this._spacesFor("insensitive");return s+=d.before.length,n==="insensitive"&&this.insensitive?s:-1},t.toString=function(){var n=this,s=[this.rawSpaceBefore,"["];return s.push(this._stringFor("qualifiedAttribute","attribute")),this.operator&&(this.value||this.value==="")&&(s.push(this._stringFor("operator")),s.push(this._stringFor("value")),s.push(this._stringFor("insensitiveFlag","insensitive",function(a,o){return a.length>0&&!n.quoted&&o.before.length===0&&!(n.spaces.value&&n.spaces.value.after)&&(o.before=" "),sd(a,o)}))),s.push("]"),s.push(this.rawSpaceAfter),s.join("")},_S(e,[{key:"quoted",get:function(){var n=this.quoteMark;return n==="'"||n==='"'},set:function(n){RS()}},{key:"quoteMark",get:function(){return this._quoteMark},set:function(n){if(!this._constructed){this._quoteMark=n;return}this._quoteMark!==n&&(this._quoteMark=n,this._syncRawValue())}},{key:"qualifiedAttribute",get:function(){return this.qualifiedName(this.raws.attribute||this.attribute)}},{key:"insensitiveFlag",get:function(){return this.insensitive?"i":""}},{key:"value",get:function(){return this._value},set:function(n){if(this._constructed){var s=Ja(n),a=s.deprecatedUsage,o=s.unescaped,l=s.quoteMark;if(a&&TS(),o===this._value&&l===this._quoteMark)return;this._value=o,this._quoteMark=l,this._syncRawValue()}else this._value=n}},{key:"insensitive",get:function(){return this._insensitive},set:function(n){n||(this._insensitive=!1,this.raws&&(this.raws.insensitiveFlag==="I"||this.raws.insensitiveFlag==="i")&&(this.raws.insensitiveFlag=void 0)),this._insensitive=n}},{key:"attribute",get:function(){return this._attribute},set:function(n){this._handleEscapes("attribute",n),this._attribute=n}}]),e}(AS.default);yi.default=jn;jn.NO_QUOTE=null;jn.SINGLE_QUOTE="'";jn.DOUBLE_QUOTE='"';var eo=(Ka={"'":{quotes:"single",wrap:!0},'"':{quotes:"double",wrap:!0}},Ka[null]={isIdentifier:!0},Ka);function sd(r,e){return""+e.before+r+e.after}});var io=x((bi,ad)=>{u();"use strict";bi.__esModule=!0;bi.default=void 0;var DS=$S(Nn()),qS=Se();function $S(r){return r&&r.__esModule?r:{default:r}}function LS(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,ro(r,e)}function ro(r,e){return ro=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},ro(r,e)}var MS=function(r){LS(e,r);function e(t){var i;return i=r.call(this,t)||this,i.type=qS.UNIVERSAL,i.value="*",i}return e}(DS.default);bi.default=MS;ad.exports=bi.default});var so=x((wi,od)=>{u();"use strict";wi.__esModule=!0;wi.default=void 0;var NS=FS(dt()),BS=Se();function FS(r){return r&&r.__esModule?r:{default:r}}function jS(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,no(r,e)}function no(r,e){return no=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},no(r,e)}var zS=function(r){jS(e,r);function e(t){var i;return i=r.call(this,t)||this,i.type=BS.COMBINATOR,i}return e}(NS.default);wi.default=zS;od.exports=wi.default});var oo=x((vi,ld)=>{u();"use strict";vi.__esModule=!0;vi.default=void 0;var US=HS(dt()),VS=Se();function HS(r){return r&&r.__esModule?r:{default:r}}function WS(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,ao(r,e)}function ao(r,e){return ao=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},ao(r,e)}var GS=function(r){WS(e,r);function e(t){var i;return i=r.call(this,t)||this,i.type=VS.NESTING,i.value="&",i}return e}(US.default);vi.default=GS;ld.exports=vi.default});var fd=x((zn,ud)=>{u();"use strict";zn.__esModule=!0;zn.default=QS;function QS(r){return r.sort(function(e,t){return e-t})}ud.exports=zn.default});var lo=x(M=>{u();"use strict";M.__esModule=!0;M.word=M.tilde=M.tab=M.str=M.space=M.slash=M.singleQuote=M.semicolon=M.plus=M.pipe=M.openSquare=M.openParenthesis=M.newline=M.greaterThan=M.feed=M.equals=M.doubleQuote=M.dollar=M.cr=M.comment=M.comma=M.combinator=M.colon=M.closeSquare=M.closeParenthesis=M.caret=M.bang=M.backslash=M.at=M.asterisk=M.ampersand=void 0;var YS=38;M.ampersand=YS;var KS=42;M.asterisk=KS;var XS=64;M.at=XS;var ZS=44;M.comma=ZS;var JS=58;M.colon=JS;var eA=59;M.semicolon=eA;var tA=40;M.openParenthesis=tA;var rA=41;M.closeParenthesis=rA;var iA=91;M.openSquare=iA;var nA=93;M.closeSquare=nA;var sA=36;M.dollar=sA;var aA=126;M.tilde=aA;var oA=94;M.caret=oA;var lA=43;M.plus=lA;var uA=61;M.equals=uA;var fA=124;M.pipe=fA;var cA=62;M.greaterThan=cA;var pA=32;M.space=pA;var cd=39;M.singleQuote=cd;var dA=34;M.doubleQuote=dA;var hA=47;M.slash=hA;var mA=33;M.bang=mA;var gA=92;M.backslash=gA;var yA=13;M.cr=yA;var bA=12;M.feed=bA;var wA=10;M.newline=wA;var vA=9;M.tab=vA;var xA=cd;M.str=xA;var kA=-1;M.comment=kA;var SA=-2;M.word=SA;var AA=-3;M.combinator=AA});var hd=x(xi=>{u();"use strict";xi.__esModule=!0;xi.FIELDS=void 0;xi.default=PA;var D=CA(lo()),nr,te;function pd(r){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(pd=function(n){return n?t:e})(r)}function CA(r,e){if(!e&&r&&r.__esModule)return r;if(r===null||typeof r!="object"&&typeof r!="function")return{default:r};var t=pd(e);if(t&&t.has(r))return t.get(r);var i={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in r)if(s!=="default"&&Object.prototype.hasOwnProperty.call(r,s)){var a=n?Object.getOwnPropertyDescriptor(r,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=r[s]}return i.default=r,t&&t.set(r,i),i}var _A=(nr={},nr[D.tab]=!0,nr[D.newline]=!0,nr[D.cr]=!0,nr[D.feed]=!0,nr),EA=(te={},te[D.space]=!0,te[D.tab]=!0,te[D.newline]=!0,te[D.cr]=!0,te[D.feed]=!0,te[D.ampersand]=!0,te[D.asterisk]=!0,te[D.bang]=!0,te[D.comma]=!0,te[D.colon]=!0,te[D.semicolon]=!0,te[D.openParenthesis]=!0,te[D.closeParenthesis]=!0,te[D.openSquare]=!0,te[D.closeSquare]=!0,te[D.singleQuote]=!0,te[D.doubleQuote]=!0,te[D.plus]=!0,te[D.pipe]=!0,te[D.tilde]=!0,te[D.greaterThan]=!0,te[D.equals]=!0,te[D.dollar]=!0,te[D.caret]=!0,te[D.slash]=!0,te),uo={},dd="0123456789abcdefABCDEF";for(Un=0;Un<dd.length;Un++)uo[dd.charCodeAt(Un)]=!0;var Un;function OA(r,e){var t=e,i;do{if(i=r.charCodeAt(t),EA[i])return t-1;i===D.backslash?t=TA(r,t)+1:t++}while(t<r.length);return t-1}function TA(r,e){var t=e,i=r.charCodeAt(t+1);if(!_A[i])if(uo[i]){var n=0;do t++,n++,i=r.charCodeAt(t+1);while(uo[i]&&n<6);n<6&&i===D.space&&t++}else t++;return t}var RA={TYPE:0,START_LINE:1,START_COL:2,END_LINE:3,END_COL:4,START_POS:5,END_POS:6};xi.FIELDS=RA;function PA(r){var e=[],t=r.css.valueOf(),i=t,n=i.length,s=-1,a=1,o=0,l=0,c,f,d,p,h,b,v,y,w,k,S,E,T;function B(N,R){if(r.safe)t+=R,w=t.length-1;else throw r.error("Unclosed "+N,a,o-s,o)}for(;o<n;){switch(c=t.charCodeAt(o),c===D.newline&&(s=o,a+=1),c){case D.space:case D.tab:case D.newline:case D.cr:case D.feed:w=o;do w+=1,c=t.charCodeAt(w),c===D.newline&&(s=w,a+=1);while(c===D.space||c===D.newline||c===D.tab||c===D.cr||c===D.feed);T=D.space,p=a,d=w-s-1,l=w;break;case D.plus:case D.greaterThan:case D.tilde:case D.pipe:w=o;do w+=1,c=t.charCodeAt(w);while(c===D.plus||c===D.greaterThan||c===D.tilde||c===D.pipe);T=D.combinator,p=a,d=o-s,l=w;break;case D.asterisk:case D.ampersand:case D.bang:case D.comma:case D.equals:case D.dollar:case D.caret:case D.openSquare:case D.closeSquare:case D.colon:case D.semicolon:case D.openParenthesis:case D.closeParenthesis:w=o,T=c,p=a,d=o-s,l=w+1;break;case D.singleQuote:case D.doubleQuote:E=c===D.singleQuote?"'":'"',w=o;do for(h=!1,w=t.indexOf(E,w+1),w===-1&&B("quote",E),b=w;t.charCodeAt(b-1)===D.backslash;)b-=1,h=!h;while(h);T=D.str,p=a,d=o-s,l=w+1;break;default:c===D.slash&&t.charCodeAt(o+1)===D.asterisk?(w=t.indexOf("*/",o+2)+1,w===0&&B("comment","*/"),f=t.slice(o,w+1),y=f.split(`-`),v=y.length-1,v>0?(k=a+v,S=w-y[v].length):(k=a,S=s),T=D.comment,a=k,p=k,d=w-S):c===D.slash?(w=o,T=c,p=a,d=o-s,l=w+1):(w=OA(t,o),T=D.word,p=a,d=w-s),l=w+1;break}e.push([T,a,o-s,p,d,o,l]),S&&(s=S,S=null),o=l}return e}});var kd=x((ki,xd)=>{u();"use strict";ki.__esModule=!0;ki.default=void 0;var IA=je(Da()),fo=je($a()),DA=je(Na()),md=je(Fa()),qA=je(za()),$A=je(Ha()),co=je(Ga()),LA=je(Ya()),gd=Vn(to()),MA=je(io()),po=je(so()),NA=je(oo()),BA=je(fd()),O=Vn(hd()),q=Vn(lo()),FA=Vn(Se()),ue=ii(),Vt,ho;function yd(r){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(yd=function(n){return n?t:e})(r)}function Vn(r,e){if(!e&&r&&r.__esModule)return r;if(r===null||typeof r!="object"&&typeof r!="function")return{default:r};var t=yd(e);if(t&&t.has(r))return t.get(r);var i={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in r)if(s!=="default"&&Object.prototype.hasOwnProperty.call(r,s)){var a=n?Object.getOwnPropertyDescriptor(r,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=r[s]}return i.default=r,t&&t.set(r,i),i}function je(r){return r&&r.__esModule?r:{default:r}}function bd(r,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(r,i.key,i)}}function jA(r,e,t){return e&&bd(r.prototype,e),t&&bd(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}var mo=(Vt={},Vt[q.space]=!0,Vt[q.cr]=!0,Vt[q.feed]=!0,Vt[q.newline]=!0,Vt[q.tab]=!0,Vt),zA=Object.assign({},mo,(ho={},ho[q.comment]=!0,ho));function wd(r){return{line:r[O.FIELDS.START_LINE],column:r[O.FIELDS.START_COL]}}function vd(r){return{line:r[O.FIELDS.END_LINE],column:r[O.FIELDS.END_COL]}}function Ht(r,e,t,i){return{start:{line:r,column:e},end:{line:t,column:i}}}function sr(r){return Ht(r[O.FIELDS.START_LINE],r[O.FIELDS.START_COL],r[O.FIELDS.END_LINE],r[O.FIELDS.END_COL])}function go(r,e){if(!!r)return Ht(r[O.FIELDS.START_LINE],r[O.FIELDS.START_COL],e[O.FIELDS.END_LINE],e[O.FIELDS.END_COL])}function ar(r,e){var t=r[e];if(typeof t=="string")return t.indexOf("\\")!==-1&&((0,ue.ensureObject)(r,"raws"),r[e]=(0,ue.unesc)(t),r.raws[e]===void 0&&(r.raws[e]=t)),r}function yo(r,e){for(var t=-1,i=[];(t=r.indexOf(e,t+1))!==-1;)i.push(t);return i}function UA(){var r=Array.prototype.concat.apply([],arguments);return r.filter(function(e,t){return t===r.indexOf(e)})}var VA=function(){function r(t,i){i===void 0&&(i={}),this.rule=t,this.options=Object.assign({lossy:!1,safe:!1},i),this.position=0,this.css=typeof this.rule=="string"?this.rule:this.rule.selector,this.tokens=(0,O.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var n=go(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new IA.default({source:n}),this.root.errorGenerator=this._errorGenerator();var s=new fo.default({source:{start:{line:1,column:1}},sourceIndex:0});this.root.append(s),this.current=s,this.loop()}var e=r.prototype;return e._errorGenerator=function(){var i=this;return function(n,s){return typeof i.rule=="string"?new Error(n):i.rule.error(n,s)}},e.attribute=function(){var i=[],n=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[O.FIELDS.TYPE]!==q.closeSquare;)i.push(this.currToken),this.position++;if(this.currToken[O.FIELDS.TYPE]!==q.closeSquare)return this.expected("closing square bracket",this.currToken[O.FIELDS.START_POS]);var s=i.length,a={source:Ht(n[1],n[2],this.currToken[3],this.currToken[4]),sourceIndex:n[O.FIELDS.START_POS]};if(s===1&&!~[q.word].indexOf(i[0][O.FIELDS.TYPE]))return this.expected("attribute",i[0][O.FIELDS.START_POS]);for(var o=0,l="",c="",f=null,d=!1;o<s;){var p=i[o],h=this.content(p),b=i[o+1];switch(p[O.FIELDS.TYPE]){case q.space:if(d=!0,this.options.lossy)break;if(f){(0,ue.ensureObject)(a,"spaces",f);var v=a.spaces[f].after||"";a.spaces[f].after=v+h;var y=(0,ue.getProp)(a,"raws","spaces",f,"after")||null;y&&(a.raws.spaces[f].after=y+h)}else l=l+h,c=c+h;break;case q.asterisk:if(b[O.FIELDS.TYPE]===q.equals)a.operator=h,f="operator";else if((!a.namespace||f==="namespace"&&!d)&&b){l&&((0,ue.ensureObject)(a,"spaces","attribute"),a.spaces.attribute.before=l,l=""),c&&((0,ue.ensureObject)(a,"raws","spaces","attribute"),a.raws.spaces.attribute.before=l,c=""),a.namespace=(a.namespace||"")+h;var w=(0,ue.getProp)(a,"raws","namespace")||null;w&&(a.raws.namespace+=h),f="namespace"}d=!1;break;case q.dollar:if(f==="value"){var k=(0,ue.getProp)(a,"raws","value");a.value+="$",k&&(a.raws.value=k+"$");break}case q.caret:b[O.FIELDS.TYPE]===q.equals&&(a.operator=h,f="operator"),d=!1;break;case q.combinator:if(h==="~"&&b[O.FIELDS.TYPE]===q.equals&&(a.operator=h,f="operator"),h!=="|"){d=!1;break}b[O.FIELDS.TYPE]===q.equals?(a.operator=h,f="operator"):!a.namespace&&!a.attribute&&(a.namespace=!0),d=!1;break;case q.word:if(b&&this.content(b)==="|"&&i[o+2]&&i[o+2][O.FIELDS.TYPE]!==q.equals&&!a.operator&&!a.namespace)a.namespace=h,f="namespace";else if(!a.attribute||f==="attribute"&&!d){l&&((0,ue.ensureObject)(a,"spaces","attribute"),a.spaces.attribute.before=l,l=""),c&&((0,ue.ensureObject)(a,"raws","spaces","attribute"),a.raws.spaces.attribute.before=c,c=""),a.attribute=(a.attribute||"")+h;var S=(0,ue.getProp)(a,"raws","attribute")||null;S&&(a.raws.attribute+=h),f="attribute"}else if(!a.value&&a.value!==""||f==="value"&&!(d||a.quoteMark)){var E=(0,ue.unesc)(h),T=(0,ue.getProp)(a,"raws","value")||"",B=a.value||"";a.value=B+E,a.quoteMark=null,(E!==h||T)&&((0,ue.ensureObject)(a,"raws"),a.raws.value=(T||B)+h),f="value"}else{var N=h==="i"||h==="I";(a.value||a.value==="")&&(a.quoteMark||d)?(a.insensitive=N,(!N||h==="I")&&((0,ue.ensureObject)(a,"raws"),a.raws.insensitiveFlag=h),f="insensitive",l&&((0,ue.ensureObject)(a,"spaces","insensitive"),a.spaces.insensitive.before=l,l=""),c&&((0,ue.ensureObject)(a,"raws","spaces","insensitive"),a.raws.spaces.insensitive.before=c,c="")):(a.value||a.value==="")&&(f="value",a.value+=h,a.raws.value&&(a.raws.value+=h))}d=!1;break;case q.str:if(!a.attribute||!a.operator)return this.error("Expected an attribute followed by an operator preceding the string.",{index:p[O.FIELDS.START_POS]});var R=(0,gd.unescapeValue)(h),F=R.unescaped,Y=R.quoteMark;a.value=F,a.quoteMark=Y,f="value",(0,ue.ensureObject)(a,"raws"),a.raws.value=h,d=!1;break;case q.equals:if(!a.attribute)return this.expected("attribute",p[O.FIELDS.START_POS],h);if(a.value)return this.error('Unexpected "=" found; an operator was already defined.',{index:p[O.FIELDS.START_POS]});a.operator=a.operator?a.operator+h:h,f="operator",d=!1;break;case q.comment:if(f)if(d||b&&b[O.FIELDS.TYPE]===q.space||f==="insensitive"){var _=(0,ue.getProp)(a,"spaces",f,"after")||"",Q=(0,ue.getProp)(a,"raws","spaces",f,"after")||_;(0,ue.ensureObject)(a,"raws","spaces",f),a.raws.spaces[f].after=Q+h}else{var U=a[f]||"",le=(0,ue.getProp)(a,"raws",f)||U;(0,ue.ensureObject)(a,"raws"),a.raws[f]=le+h}else c=c+h;break;default:return this.error('Unexpected "'+h+'" found.',{index:p[O.FIELDS.START_POS]})}o++}ar(a,"attribute"),ar(a,"namespace"),this.newNode(new gd.default(a)),this.position++},e.parseWhitespaceEquivalentTokens=function(i){i<0&&(i=this.tokens.length);var n=this.position,s=[],a="",o=void 0;do if(mo[this.currToken[O.FIELDS.TYPE]])this.options.lossy||(a+=this.content());else if(this.currToken[O.FIELDS.TYPE]===q.comment){var l={};a&&(l.before=a,a=""),o=new md.default({value:this.content(),source:sr(this.currToken),sourceIndex:this.currToken[O.FIELDS.START_POS],spaces:l}),s.push(o)}while(++this.position<i);if(a){if(o)o.spaces.after=a;else if(!this.options.lossy){var c=this.tokens[n],f=this.tokens[this.position-1];s.push(new co.default({value:"",source:Ht(c[O.FIELDS.START_LINE],c[O.FIELDS.START_COL],f[O.FIELDS.END_LINE],f[O.FIELDS.END_COL]),sourceIndex:c[O.FIELDS.START_POS],spaces:{before:a,after:""}}))}}return s},e.convertWhitespaceNodesToSpace=function(i,n){var s=this;n===void 0&&(n=!1);var a="",o="";i.forEach(function(c){var f=s.lossySpace(c.spaces.before,n),d=s.lossySpace(c.rawSpaceBefore,n);a+=f+s.lossySpace(c.spaces.after,n&&f.length===0),o+=f+c.value+s.lossySpace(c.rawSpaceAfter,n&&d.length===0)}),o===a&&(o=void 0);var l={space:a,rawSpace:o};return l},e.isNamedCombinator=function(i){return i===void 0&&(i=this.position),this.tokens[i+0]&&this.tokens[i+0][O.FIELDS.TYPE]===q.slash&&this.tokens[i+1]&&this.tokens[i+1][O.FIELDS.TYPE]===q.word&&this.tokens[i+2]&&this.tokens[i+2][O.FIELDS.TYPE]===q.slash},e.namedCombinator=function(){if(this.isNamedCombinator()){var i=this.content(this.tokens[this.position+1]),n=(0,ue.unesc)(i).toLowerCase(),s={};n!==i&&(s.value="/"+i+"/");var a=new po.default({value:"/"+n+"/",source:Ht(this.currToken[O.FIELDS.START_LINE],this.currToken[O.FIELDS.START_COL],this.tokens[this.position+2][O.FIELDS.END_LINE],this.tokens[this.position+2][O.FIELDS.END_COL]),sourceIndex:this.currToken[O.FIELDS.START_POS],raws:s});return this.position=this.position+3,a}else this.unexpected()},e.combinator=function(){var i=this;if(this.content()==="|")return this.namespace();var n=this.locateNextMeaningfulToken(this.position);if(n<0||this.tokens[n][O.FIELDS.TYPE]===q.comma||this.tokens[n][O.FIELDS.TYPE]===q.closeParenthesis){var s=this.parseWhitespaceEquivalentTokens(n);if(s.length>0){var a=this.current.last;if(a){var o=this.convertWhitespaceNodesToSpace(s),l=o.space,c=o.rawSpace;c!==void 0&&(a.rawSpaceAfter+=c),a.spaces.after+=l}else s.forEach(function(T){return i.newNode(T)})}return}var f=this.currToken,d=void 0;n>this.position&&(d=this.parseWhitespaceEquivalentTokens(n));var p;if(this.isNamedCombinator()?p=this.namedCombinator():this.currToken[O.FIELDS.TYPE]===q.combinator?(p=new po.default({value:this.content(),source:sr(this.currToken),sourceIndex:this.currToken[O.FIELDS.START_POS]}),this.position++):mo[this.currToken[O.FIELDS.TYPE]]||d||this.unexpected(),p){if(d){var h=this.convertWhitespaceNodesToSpace(d),b=h.space,v=h.rawSpace;p.spaces.before=b,p.rawSpaceBefore=v}}else{var y=this.convertWhitespaceNodesToSpace(d,!0),w=y.space,k=y.rawSpace;k||(k=w);var S={},E={spaces:{}};w.endsWith(" ")&&k.endsWith(" ")?(S.before=w.slice(0,w.length-1),E.spaces.before=k.slice(0,k.length-1)):w.startsWith(" ")&&k.startsWith(" ")?(S.after=w.slice(1),E.spaces.after=k.slice(1)):E.value=k,p=new po.default({value:" ",source:go(f,this.tokens[this.position-1]),sourceIndex:f[O.FIELDS.START_POS],spaces:S,raws:E})}return this.currToken&&this.currToken[O.FIELDS.TYPE]===q.space&&(p.spaces.after=this.optionalSpace(this.content()),this.position++),this.newNode(p)},e.comma=function(){if(this.position===this.tokens.length-1){this.root.trailingComma=!0,this.position++;return}this.current._inferEndPosition();var i=new fo.default({source:{start:wd(this.tokens[this.position+1])},sourceIndex:this.tokens[this.position+1][O.FIELDS.START_POS]});this.current.parent.append(i),this.current=i,this.position++},e.comment=function(){var i=this.currToken;this.newNode(new md.default({value:this.content(),source:sr(i),sourceIndex:i[O.FIELDS.START_POS]})),this.position++},e.error=function(i,n){throw this.root.error(i,n)},e.missingBackslash=function(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[O.FIELDS.START_POS]})},e.missingParenthesis=function(){return this.expected("opening parenthesis",this.currToken[O.FIELDS.START_POS])},e.missingSquareBracket=function(){return this.expected("opening square bracket",this.currToken[O.FIELDS.START_POS])},e.unexpected=function(){return this.error("Unexpected '"+this.content()+"'. Escaping special characters with \\ may help.",this.currToken[O.FIELDS.START_POS])},e.unexpectedPipe=function(){return this.error("Unexpected '|'.",this.currToken[O.FIELDS.START_POS])},e.namespace=function(){var i=this.prevToken&&this.content(this.prevToken)||!0;if(this.nextToken[O.FIELDS.TYPE]===q.word)return this.position++,this.word(i);if(this.nextToken[O.FIELDS.TYPE]===q.asterisk)return this.position++,this.universal(i);this.unexpectedPipe()},e.nesting=function(){if(this.nextToken){var i=this.content(this.nextToken);if(i==="|"){this.position++;return}}var n=this.currToken;this.newNode(new NA.default({value:this.content(),source:sr(n),sourceIndex:n[O.FIELDS.START_POS]})),this.position++},e.parentheses=function(){var i=this.current.last,n=1;if(this.position++,i&&i.type===FA.PSEUDO){var s=new fo.default({source:{start:wd(this.tokens[this.position])},sourceIndex:this.tokens[this.position][O.FIELDS.START_POS]}),a=this.current;for(i.append(s),this.current=s;this.position<this.tokens.length&&n;)this.currToken[O.FIELDS.TYPE]===q.openParenthesis&&n++,this.currToken[O.FIELDS.TYPE]===q.closeParenthesis&&n--,n?this.parse():(this.current.source.end=vd(this.currToken),this.current.parent.source.end=vd(this.currToken),this.position++);this.current=a}else{for(var o=this.currToken,l="(",c;this.position<this.tokens.length&&n;)this.currToken[O.FIELDS.TYPE]===q.openParenthesis&&n++,this.currToken[O.FIELDS.TYPE]===q.closeParenthesis&&n--,c=this.currToken,l+=this.parseParenthesisToken(this.currToken),this.position++;i?i.appendToPropertyAndEscape("value",l,l):this.newNode(new co.default({value:l,source:Ht(o[O.FIELDS.START_LINE],o[O.FIELDS.START_COL],c[O.FIELDS.END_LINE],c[O.FIELDS.END_COL]),sourceIndex:o[O.FIELDS.START_POS]}))}if(n)return this.expected("closing parenthesis",this.currToken[O.FIELDS.START_POS])},e.pseudo=function(){for(var i=this,n="",s=this.currToken;this.currToken&&this.currToken[O.FIELDS.TYPE]===q.colon;)n+=this.content(),this.position++;if(!this.currToken)return this.expected(["pseudo-class","pseudo-element"],this.position-1);if(this.currToken[O.FIELDS.TYPE]===q.word)this.splitWord(!1,function(a,o){n+=a,i.newNode(new LA.default({value:n,source:go(s,i.currToken),sourceIndex:s[O.FIELDS.START_POS]})),o>1&&i.nextToken&&i.nextToken[O.FIELDS.TYPE]===q.openParenthesis&&i.error("Misplaced parenthesis.",{index:i.nextToken[O.FIELDS.START_POS]})});else return this.expected(["pseudo-class","pseudo-element"],this.currToken[O.FIELDS.START_POS])},e.space=function(){var i=this.content();this.position===0||this.prevToken[O.FIELDS.TYPE]===q.comma||this.prevToken[O.FIELDS.TYPE]===q.openParenthesis||this.current.nodes.every(function(n){return n.type==="comment"})?(this.spaces=this.optionalSpace(i),this.position++):this.position===this.tokens.length-1||this.nextToken[O.FIELDS.TYPE]===q.comma||this.nextToken[O.FIELDS.TYPE]===q.closeParenthesis?(this.current.last.spaces.after=this.optionalSpace(i),this.position++):this.combinator()},e.string=function(){var i=this.currToken;this.newNode(new co.default({value:this.content(),source:sr(i),sourceIndex:i[O.FIELDS.START_POS]})),this.position++},e.universal=function(i){var n=this.nextToken;if(n&&this.content(n)==="|")return this.position++,this.namespace();var s=this.currToken;this.newNode(new MA.default({value:this.content(),source:sr(s),sourceIndex:s[O.FIELDS.START_POS]}),i),this.position++},e.splitWord=function(i,n){for(var s=this,a=this.nextToken,o=this.content();a&&~[q.dollar,q.caret,q.equals,q.word].indexOf(a[O.FIELDS.TYPE]);){this.position++;var l=this.content();if(o+=l,l.lastIndexOf("\\")===l.length-1){var c=this.nextToken;c&&c[O.FIELDS.TYPE]===q.space&&(o+=this.requiredSpace(this.content(c)),this.position++)}a=this.nextToken}var f=yo(o,".").filter(function(b){var v=o[b-1]==="\\",y=/^\d+\.\d+%$/.test(o);return!v&&!y}),d=yo(o,"#").filter(function(b){return o[b-1]!=="\\"}),p=yo(o,"#{");p.length&&(d=d.filter(function(b){return!~p.indexOf(b)}));var h=(0,BA.default)(UA([0].concat(f,d)));h.forEach(function(b,v){var y=h[v+1]||o.length,w=o.slice(b,y);if(v===0&&n)return n.call(s,w,h.length);var k,S=s.currToken,E=S[O.FIELDS.START_POS]+h[v],T=Ht(S[1],S[2]+b,S[3],S[2]+(y-1));if(~f.indexOf(b)){var B={value:w.slice(1),source:T,sourceIndex:E};k=new DA.default(ar(B,"value"))}else if(~d.indexOf(b)){var N={value:w.slice(1),source:T,sourceIndex:E};k=new qA.default(ar(N,"value"))}else{var R={value:w,source:T,sourceIndex:E};ar(R,"value"),k=new $A.default(R)}s.newNode(k,i),i=null}),this.position++},e.word=function(i){var n=this.nextToken;return n&&this.content(n)==="|"?(this.position++,this.namespace()):this.splitWord(i)},e.loop=function(){for(;this.position<this.tokens.length;)this.parse(!0);return this.current._inferEndPosition(),this.root},e.parse=function(i){switch(this.currToken[O.FIELDS.TYPE]){case q.space:this.space();break;case q.comment:this.comment();break;case q.openParenthesis:this.parentheses();break;case q.closeParenthesis:i&&this.missingParenthesis();break;case q.openSquare:this.attribute();break;case q.dollar:case q.caret:case q.equals:case q.word:this.word();break;case q.colon:this.pseudo();break;case q.comma:this.comma();break;case q.asterisk:this.universal();break;case q.ampersand:this.nesting();break;case q.slash:case q.combinator:this.combinator();break;case q.str:this.string();break;case q.closeSquare:this.missingSquareBracket();case q.semicolon:this.missingBackslash();default:this.unexpected()}},e.expected=function(i,n,s){if(Array.isArray(i)){var a=i.pop();i=i.join(", ")+" or "+a}var o=/^[aeiou]/.test(i[0])?"an":"a";return s?this.error("Expected "+o+" "+i+', found "'+s+'" instead.',{index:n}):this.error("Expected "+o+" "+i+".",{index:n})},e.requiredSpace=function(i){return this.options.lossy?" ":i},e.optionalSpace=function(i){return this.options.lossy?"":i},e.lossySpace=function(i,n){return this.options.lossy?n?" ":"":i},e.parseParenthesisToken=function(i){var n=this.content(i);return i[O.FIELDS.TYPE]===q.space?this.requiredSpace(n):n},e.newNode=function(i,n){return n&&(/^ +$/.test(n)&&(this.options.lossy||(this.spaces=(this.spaces||"")+n),n=!0),i.namespace=n,ar(i,"namespace")),this.spaces&&(i.spaces.before=this.spaces,this.spaces=""),this.current.append(i)},e.content=function(i){return i===void 0&&(i=this.currToken),this.css.slice(i[O.FIELDS.START_POS],i[O.FIELDS.END_POS])},e.locateNextMeaningfulToken=function(i){i===void 0&&(i=this.position+1);for(var n=i;n<this.tokens.length;)if(zA[this.tokens[n][O.FIELDS.TYPE]]){n++;continue}else return n;return-1},jA(r,[{key:"currToken",get:function(){return this.tokens[this.position]}},{key:"nextToken",get:function(){return this.tokens[this.position+1]}},{key:"prevToken",get:function(){return this.tokens[this.position-1]}}]),r}();ki.default=VA;xd.exports=ki.default});var Ad=x((Si,Sd)=>{u();"use strict";Si.__esModule=!0;Si.default=void 0;var HA=WA(kd());function WA(r){return r&&r.__esModule?r:{default:r}}var GA=function(){function r(t,i){this.func=t||function(){},this.funcRes=null,this.options=i}var e=r.prototype;return e._shouldUpdateSelector=function(i,n){n===void 0&&(n={});var s=Object.assign({},this.options,n);return s.updateSelector===!1?!1:typeof i!="string"},e._isLossy=function(i){i===void 0&&(i={});var n=Object.assign({},this.options,i);return n.lossless===!1},e._root=function(i,n){n===void 0&&(n={});var s=new HA.default(i,this._parseOptions(n));return s.root},e._parseOptions=function(i){return{lossy:this._isLossy(i)}},e._run=function(i,n){var s=this;return n===void 0&&(n={}),new Promise(function(a,o){try{var l=s._root(i,n);Promise.resolve(s.func(l)).then(function(c){var f=void 0;return s._shouldUpdateSelector(i,n)&&(f=l.toString(),i.selector=f),{transform:c,root:l,string:f}}).then(a,o)}catch(c){o(c);return}})},e._runSync=function(i,n){n===void 0&&(n={});var s=this._root(i,n),a=this.func(s);if(a&&typeof a.then=="function")throw new Error("Selector processor returned a promise to a synchronous call.");var o=void 0;return n.updateSelector&&typeof i!="string"&&(o=s.toString(),i.selector=o),{transform:a,root:s,string:o}},e.ast=function(i,n){return this._run(i,n).then(function(s){return s.root})},e.astSync=function(i,n){return this._runSync(i,n).root},e.transform=function(i,n){return this._run(i,n).then(function(s){return s.transform})},e.transformSync=function(i,n){return this._runSync(i,n).transform},e.process=function(i,n){return this._run(i,n).then(function(s){return s.string||s.root.toString()})},e.processSync=function(i,n){var s=this._runSync(i,n);return s.string||s.root.toString()},r}();Si.default=GA;Sd.exports=Si.default});var Cd=x(ne=>{u();"use strict";ne.__esModule=!0;ne.universal=ne.tag=ne.string=ne.selector=ne.root=ne.pseudo=ne.nesting=ne.id=ne.comment=ne.combinator=ne.className=ne.attribute=void 0;var QA=ze(to()),YA=ze(Na()),KA=ze(so()),XA=ze(Fa()),ZA=ze(za()),JA=ze(oo()),eC=ze(Ya()),tC=ze(Da()),rC=ze($a()),iC=ze(Ga()),nC=ze(Ha()),sC=ze(io());function ze(r){return r&&r.__esModule?r:{default:r}}var aC=function(e){return new QA.default(e)};ne.attribute=aC;var oC=function(e){return new YA.default(e)};ne.className=oC;var lC=function(e){return new KA.default(e)};ne.combinator=lC;var uC=function(e){return new XA.default(e)};ne.comment=uC;var fC=function(e){return new ZA.default(e)};ne.id=fC;var cC=function(e){return new JA.default(e)};ne.nesting=cC;var pC=function(e){return new eC.default(e)};ne.pseudo=pC;var dC=function(e){return new tC.default(e)};ne.root=dC;var hC=function(e){return new rC.default(e)};ne.selector=hC;var mC=function(e){return new iC.default(e)};ne.string=mC;var gC=function(e){return new nC.default(e)};ne.tag=gC;var yC=function(e){return new sC.default(e)};ne.universal=yC});var Td=x(Z=>{u();"use strict";Z.__esModule=!0;Z.isComment=Z.isCombinator=Z.isClassName=Z.isAttribute=void 0;Z.isContainer=TC;Z.isIdentifier=void 0;Z.isNamespace=RC;Z.isNesting=void 0;Z.isNode=bo;Z.isPseudo=void 0;Z.isPseudoClass=OC;Z.isPseudoElement=Od;Z.isUniversal=Z.isTag=Z.isString=Z.isSelector=Z.isRoot=void 0;var fe=Se(),Oe,bC=(Oe={},Oe[fe.ATTRIBUTE]=!0,Oe[fe.CLASS]=!0,Oe[fe.COMBINATOR]=!0,Oe[fe.COMMENT]=!0,Oe[fe.ID]=!0,Oe[fe.NESTING]=!0,Oe[fe.PSEUDO]=!0,Oe[fe.ROOT]=!0,Oe[fe.SELECTOR]=!0,Oe[fe.STRING]=!0,Oe[fe.TAG]=!0,Oe[fe.UNIVERSAL]=!0,Oe);function bo(r){return typeof r=="object"&&bC[r.type]}function Ue(r,e){return bo(e)&&e.type===r}var _d=Ue.bind(null,fe.ATTRIBUTE);Z.isAttribute=_d;var wC=Ue.bind(null,fe.CLASS);Z.isClassName=wC;var vC=Ue.bind(null,fe.COMBINATOR);Z.isCombinator=vC;var xC=Ue.bind(null,fe.COMMENT);Z.isComment=xC;var kC=Ue.bind(null,fe.ID);Z.isIdentifier=kC;var SC=Ue.bind(null,fe.NESTING);Z.isNesting=SC;var wo=Ue.bind(null,fe.PSEUDO);Z.isPseudo=wo;var AC=Ue.bind(null,fe.ROOT);Z.isRoot=AC;var CC=Ue.bind(null,fe.SELECTOR);Z.isSelector=CC;var _C=Ue.bind(null,fe.STRING);Z.isString=_C;var Ed=Ue.bind(null,fe.TAG);Z.isTag=Ed;var EC=Ue.bind(null,fe.UNIVERSAL);Z.isUniversal=EC;function Od(r){return wo(r)&&r.value&&(r.value.startsWith("::")||r.value.toLowerCase()===":before"||r.value.toLowerCase()===":after"||r.value.toLowerCase()===":first-letter"||r.value.toLowerCase()===":first-line")}function OC(r){return wo(r)&&!Od(r)}function TC(r){return!!(bo(r)&&r.walk)}function RC(r){return _d(r)||Ed(r)}});var Rd=x(Ke=>{u();"use strict";Ke.__esModule=!0;var vo=Se();Object.keys(vo).forEach(function(r){r==="default"||r==="__esModule"||r in Ke&&Ke[r]===vo[r]||(Ke[r]=vo[r])});var xo=Cd();Object.keys(xo).forEach(function(r){r==="default"||r==="__esModule"||r in Ke&&Ke[r]===xo[r]||(Ke[r]=xo[r])});var ko=Td();Object.keys(ko).forEach(function(r){r==="default"||r==="__esModule"||r in Ke&&Ke[r]===ko[r]||(Ke[r]=ko[r])})});var it=x((Ai,Id)=>{u();"use strict";Ai.__esModule=!0;Ai.default=void 0;var PC=qC(Ad()),IC=DC(Rd());function Pd(r){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(Pd=function(n){return n?t:e})(r)}function DC(r,e){if(!e&&r&&r.__esModule)return r;if(r===null||typeof r!="object"&&typeof r!="function")return{default:r};var t=Pd(e);if(t&&t.has(r))return t.get(r);var i={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in r)if(s!=="default"&&Object.prototype.hasOwnProperty.call(r,s)){var a=n?Object.getOwnPropertyDescriptor(r,s):null;a&&(a.get||a.set)?Object.defineProperty(i,s,a):i[s]=r[s]}return i.default=r,t&&t.set(r,i),i}function qC(r){return r&&r.__esModule?r:{default:r}}var So=function(e){return new PC.default(e)};Object.assign(So,IC);delete So.__esModule;var $C=So;Ai.default=$C;Id.exports=Ai.default});function mt(r){return["fontSize","outline"].includes(r)?e=>(typeof e=="function"&&(e=e({})),Array.isArray(e)&&(e=e[0]),e):r==="fontFamily"?e=>{typeof e=="function"&&(e=e({}));let t=Array.isArray(e)&&ke(e[1])?e[0]:e;return Array.isArray(t)?t.join(", "):t}:["boxShadow","transitionProperty","transitionDuration","transitionDelay","transitionTimingFunction","backgroundImage","backgroundSize","backgroundColor","cursor","animation"].includes(r)?e=>(typeof e=="function"&&(e=e({})),Array.isArray(e)&&(e=e.join(", ")),e):["gridTemplateColumns","gridTemplateRows","objectPosition"].includes(r)?e=>(typeof e=="function"&&(e=e({})),typeof e=="string"&&(e=ee.list.comma(e).join(" ")),e):(e,t={})=>(typeof e=="function"&&(e=e(t)),e)}var Ci=P(()=>{u();Ot();Kt()});var Bd=x((MI,Oo)=>{u();var{AtRule:LC,Rule:Dd}=$e(),qd=it();function Ao(r,e){let t;try{qd(i=>{t=i}).processSync(r)}catch(i){throw r.includes(":")?e?e.error("Missed semicolon"):i:e?e.error(i.message):i}return t.at(0)}function $d(r,e){let t=!1;return r.each(i=>{if(i.type==="nesting"){let n=e.clone({});i.value!=="&"?i.replaceWith(Ao(i.value.replace("&",n.toString()))):i.replaceWith(n),t=!0}else"nodes"in i&&i.nodes&&$d(i,e)&&(t=!0)}),t}function Ld(r,e){let t=[];return r.selectors.forEach(i=>{let n=Ao(i,r);e.selectors.forEach(s=>{if(!s)return;let a=Ao(s,e);$d(a,n)||(a.prepend(qd.combinator({value:" "})),a.prepend(n.clone({}))),t.push(a.toString())})}),t}function Hn(r,e){let t=r.prev();for(e.after(r);t&&t.type==="comment";){let i=t.prev();e.after(t),t=i}return r}function MC(r){return function e(t,i,n,s=n){let a=[];if(i.each(o=>{o.type==="rule"&&n?s&&(o.selectors=Ld(t,o)):o.type==="atrule"&&o.nodes?r[o.name]?e(t,o,s):i[_o]!==!1&&a.push(o):a.push(o)}),n&&a.length){let o=t.clone({nodes:[]});for(let l of a)o.append(l);i.prepend(o)}}}function Co(r,e,t){let i=new Dd({nodes:[],selector:r});return i.append(e),t.after(i),i}function Md(r,e){let t={};for(let i of r)t[i]=!0;if(e)for(let i of e)t[i.replace(/^@/,"")]=!0;return t}function NC(r){r=r.trim();let e=r.match(/^\((.*)\)$/);if(!e)return{selector:r,type:"basic"};let t=e[1].match(/^(with(?:out)?):(.+)$/);if(t){let i=t[1]==="with",n=Object.fromEntries(t[2].trim().split(/\s+/).map(a=>[a,!0]));if(i&&n.all)return{type:"noop"};let s=a=>!!n[a];return n.all?s=()=>!0:i&&(s=a=>a==="all"?!1:!n[a]),{escapes:s,type:"withrules"}}return{type:"unknown"}}function BC(r){let e=[],t=r.parent;for(;t&&t instanceof LC;)e.push(t),t=t.parent;return e}function FC(r){let e=r[Nd];if(!e)r.after(r.nodes);else{let t=r.nodes,i,n=-1,s,a,o,l=BC(r);if(l.forEach((c,f)=>{if(e(c.name))i=c,n=f,a=o;else{let d=o;o=c.clone({nodes:[]}),d&&o.append(d),s=s||o}}),i?a?(s.append(t),i.after(a)):i.after(t):r.after(t),r.next()&&i){let c;l.slice(0,n+1).forEach((f,d,p)=>{let h=c;c=f.clone({nodes:[]}),h&&c.append(h);let b=[],y=(p[d-1]||r).next();for(;y;)b.push(y),y=y.next();c.append(b)}),c&&(a||t[t.length-1]).after(c)}}r.remove()}var _o=Symbol("rootRuleMergeSel"),Nd=Symbol("rootRuleEscapes");function jC(r){let{params:e}=r,{escapes:t,selector:i,type:n}=NC(e);if(n==="unknown")throw r.error(`Unknown @${r.name} parameter ${JSON.stringify(e)}`);if(n==="basic"&&i){let s=new Dd({nodes:r.nodes,selector:i});r.removeAll(),r.append(s)}r[Nd]=t,r[_o]=t?!t("all"):n==="noop"}var Eo=Symbol("hasRootRule");Oo.exports=(r={})=>{let e=Md(["media","supports","layer","container","starting-style"],r.bubble),t=MC(e),i=Md(["document","font-face","keyframes","-webkit-keyframes","-moz-keyframes"],r.unwrap),n=(r.rootRuleName||"at-root").replace(/^@/,""),s=r.preserveEmpty;return{Once(a){a.walkAtRules(n,o=>{jC(o),a[Eo]=!0})},postcssPlugin:"postcss-nested",RootExit(a){a[Eo]&&(a.walkAtRules(n,FC),a[Eo]=!1)},Rule(a){let o=!1,l=a,c=!1,f=[];a.each(d=>{d.type==="rule"?(f.length&&(l=Co(a.selector,f,l),f=[]),c=!0,o=!0,d.selectors=Ld(a,d),l=Hn(d,l)):d.type==="atrule"?(f.length&&(l=Co(a.selector,f,l),f=[]),d.name===n?(o=!0,t(a,d,!0,d[_o]),l=Hn(d,l)):e[d.name]?(c=!0,o=!0,t(a,d,!0),l=Hn(d,l)):i[d.name]?(c=!0,o=!0,t(a,d,!1),l=Hn(d,l)):c&&f.push(d)):d.type==="decl"&&c&&f.push(d)}),f.length&&(l=Co(a.selector,f,l)),o&&s!==!0&&(a.raws.semicolon=!0,a.nodes.length===0&&a.remove())}}};Oo.exports.postcss=!0});var Ud=x((NI,zd)=>{u();"use strict";var Fd=/-(\w|$)/g,jd=(r,e)=>e.toUpperCase(),zC=r=>(r=r.toLowerCase(),r==="float"?"cssFloat":r.startsWith("-ms-")?r.substr(1).replace(Fd,jd):r.replace(Fd,jd));zd.exports=zC});var Po=x((BI,Vd)=>{u();var UC=Ud(),VC={boxFlex:!0,boxFlexGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0};function To(r){return typeof r.nodes=="undefined"?!0:Ro(r)}function Ro(r){let e,t={};return r.each(i=>{if(i.type==="atrule")e="@"+i.name,i.params&&(e+=" "+i.params),typeof t[e]=="undefined"?t[e]=To(i):Array.isArray(t[e])?t[e].push(To(i)):t[e]=[t[e],To(i)];else if(i.type==="rule"){let n=Ro(i);if(t[i.selector])for(let s in n)t[i.selector][s]=n[s];else t[i.selector]=n}else if(i.type==="decl"){i.prop[0]==="-"&&i.prop[1]==="-"||i.parent&&i.parent.selector===":export"?e=i.prop:e=UC(i.prop);let n=i.value;!isNaN(i.value)&&VC[e]&&(n=parseFloat(i.value)),i.important&&(n+=" !important"),typeof t[e]=="undefined"?t[e]=n:Array.isArray(t[e])?t[e].push(n):t[e]=[t[e],n]}}),t}Vd.exports=Ro});var Wn=x((FI,Qd)=>{u();var _i=$e(),Hd=/\s*!important\s*$/i,HC={"box-flex":!0,"box-flex-group":!0,"column-count":!0,flex:!0,"flex-grow":!0,"flex-positive":!0,"flex-shrink":!0,"flex-negative":!0,"font-weight":!0,"line-clamp":!0,"line-height":!0,opacity:!0,order:!0,orphans:!0,"tab-size":!0,widows:!0,"z-index":!0,zoom:!0,"fill-opacity":!0,"stroke-dashoffset":!0,"stroke-opacity":!0,"stroke-width":!0};function WC(r){return r.replace(/([A-Z])/g,"-$1").replace(/^ms-/,"-ms-").toLowerCase()}function Wd(r,e,t){t===!1||t===null||(e.startsWith("--")||(e=WC(e)),typeof t=="number"&&(t===0||HC[e]?t=t.toString():t+="px"),e==="css-float"&&(e="float"),Hd.test(t)?(t=t.replace(Hd,""),r.push(_i.decl({prop:e,value:t,important:!0}))):r.push(_i.decl({prop:e,value:t})))}function Gd(r,e,t){let i=_i.atRule({name:e[1],params:e[3]||""});typeof t=="object"&&(i.nodes=[],Io(t,i)),r.push(i)}function Io(r,e){let t,i,n;for(t in r)if(i=r[t],!(i===null||typeof i=="undefined"))if(t[0]==="@"){let s=t.match(/@(\S+)(\s+([\W\w]*)\s*)?/);if(Array.isArray(i))for(let a of i)Gd(e,s,a);else Gd(e,s,i)}else if(Array.isArray(i))for(let s of i)Wd(e,t,s);else typeof i=="object"?(n=_i.rule({selector:t}),Io(i,n),e.push(n)):Wd(e,t,i)}Qd.exports=function(r){let e=_i.root();return Io(r,e),e}});var Do=x((jI,Yd)=>{u();var GC=Po();Yd.exports=function(e){return console&&console.warn&&e.warnings().forEach(t=>{let i=t.plugin||"PostCSS";console.warn(i+": "+t.text)}),GC(e.root)}});var Xd=x((zI,Kd)=>{u();var QC=$e(),YC=Do(),KC=Wn();Kd.exports=function(e){let t=QC(e);return async i=>{let n=await t.process(i,{parser:KC,from:void 0});return YC(n)}}});var Jd=x((UI,Zd)=>{u();var XC=$e(),ZC=Do(),JC=Wn();Zd.exports=function(r){let e=XC(r);return t=>{let i=e.process(t,{parser:JC,from:void 0});return ZC(i)}}});var th=x((VI,eh)=>{u();var e_=Po(),t_=Wn(),r_=Xd(),i_=Jd();eh.exports={objectify:e_,parse:t_,async:r_,sync:i_}});var or,rh,HI,WI,GI,QI,ih=P(()=>{u();or=pe(th()),rh=or.default,HI=or.default.objectify,WI=or.default.parse,GI=or.default.async,QI=or.default.sync});function lr(r){return Array.isArray(r)?r.flatMap(e=>ee([(0,nh.default)({bubble:["screen"]})]).process(e,{parser:rh}).root.nodes):lr([r])}var nh,qo=P(()=>{u();Ot();nh=pe(Bd());ih()});function ur(r,e,t=!1){if(r==="")return e;let i=typeof e=="string"?(0,sh.default)().astSync(e):e;return i.walkClasses(n=>{let s=n.value,a=t&&s.startsWith("-");n.value=a?`-${r}${s.slice(1)}`:`${r}${s}`}),typeof e=="string"?i.toString():i}var sh,Gn=P(()=>{u();sh=pe(it())});function Te(r){let e=ah.default.className();return e.value=r,jt(e?.raws?.value??e.value)}var ah,fr=P(()=>{u();ah=pe(it());Zi()});function $o(r){return jt(`.${Te(r)}`)}function Qn(r,e){return $o(Ei(r,e))}function Ei(r,e){return e==="DEFAULT"?r:e==="-"||e==="-DEFAULT"?`-${r}`:e.startsWith("-")?`-${r}${e}`:e.startsWith("/")?`${r}${e}`:`${r}-${e}`}var Lo=P(()=>{u();fr();Zi()});function L(r,e=[[r,[r]]],{filterDefault:t=!1,...i}={}){let n=mt(r);return function({matchUtilities:s,theme:a}){for(let o of e){let l=Array.isArray(o[0])?o:[o];s(l.reduce((c,[f,d])=>Object.assign(c,{[f]:p=>d.reduce((h,b)=>Array.isArray(b)?Object.assign(h,{[b[0]]:b[1]}):Object.assign(h,{[b]:n(p)}),{})}),{}),{...i,values:t?Object.fromEntries(Object.entries(a(r)??{}).filter(([c])=>c!=="DEFAULT")):a(r)})}}}var oh=P(()=>{u();Ci()});function Tt(r){return r=Array.isArray(r)?r:[r],r.map(e=>{let t=e.values.map(i=>i.raw!==void 0?i.raw:[i.min&&`(min-width: ${i.min})`,i.max&&`(max-width: ${i.max})`].filter(Boolean).join(" and "));return e.not?`not all and ${t}`:t}).join(", ")}var Yn=P(()=>{u()});function Mo(r){return r.split(f_).map(t=>{let i=t.trim(),n={value:i},s=i.split(c_),a=new Set;for(let o of s)!a.has("DIRECTIONS")&&n_.has(o)?(n.direction=o,a.add("DIRECTIONS")):!a.has("PLAY_STATES")&&s_.has(o)?(n.playState=o,a.add("PLAY_STATES")):!a.has("FILL_MODES")&&a_.has(o)?(n.fillMode=o,a.add("FILL_MODES")):!a.has("ITERATION_COUNTS")&&(o_.has(o)||p_.test(o))?(n.iterationCount=o,a.add("ITERATION_COUNTS")):!a.has("TIMING_FUNCTION")&&l_.has(o)||!a.has("TIMING_FUNCTION")&&u_.some(l=>o.startsWith(`${l}(`))?(n.timingFunction=o,a.add("TIMING_FUNCTION")):!a.has("DURATION")&&lh.test(o)?(n.duration=o,a.add("DURATION")):!a.has("DELAY")&&lh.test(o)?(n.delay=o,a.add("DELAY")):a.has("NAME")?(n.unknown||(n.unknown=[]),n.unknown.push(o)):(n.name=o,a.add("NAME"));return n})}var n_,s_,a_,o_,l_,u_,f_,c_,lh,p_,uh=P(()=>{u();n_=new Set(["normal","reverse","alternate","alternate-reverse"]),s_=new Set(["running","paused"]),a_=new Set(["none","forwards","backwards","both"]),o_=new Set(["infinite"]),l_=new Set(["linear","ease","ease-in","ease-out","ease-in-out","step-start","step-end"]),u_=["cubic-bezier","steps"],f_=/\,(?![^(]*\))/g,c_=/\ +(?![^(]*\))/g,lh=/^(-?[\d.]+m?s)$/,p_=/^(\d+)$/});var fh,xe,ch=P(()=>{u();fh=r=>Object.assign({},...Object.entries(r??{}).flatMap(([e,t])=>typeof t=="object"?Object.entries(fh(t)).map(([i,n])=>({[e+(i==="DEFAULT"?"":`-${i}`)]:n})):[{[`${e}`]:t}])),xe=fh});var dh,ph=P(()=>{dh="3.4.16"});function Rt(r,e=!0){return Array.isArray(r)?r.map(t=>{if(e&&Array.isArray(t))throw new Error("The tuple syntax is not supported for `screens`.");if(typeof t=="string")return{name:t.toString(),not:!1,values:[{min:t,max:void 0}]};let[i,n]=t;return i=i.toString(),typeof n=="string"?{name:i,not:!1,values:[{min:n,max:void 0}]}:Array.isArray(n)?{name:i,not:!1,values:n.map(s=>mh(s))}:{name:i,not:!1,values:[mh(n)]}}):Rt(Object.entries(r??{}),!1)}function Kn(r){return r.values.length!==1?{result:!1,reason:"multiple-values"}:r.values[0].raw!==void 0?{result:!1,reason:"raw-values"}:r.values[0].min!==void 0&&r.values[0].max!==void 0?{result:!1,reason:"min-and-max"}:{result:!0,reason:null}}function hh(r,e,t){let i=Xn(e,r),n=Xn(t,r),s=Kn(i),a=Kn(n);if(s.reason==="multiple-values"||a.reason==="multiple-values")throw new Error("Attempted to sort a screen with multiple values. This should never happen. Please open a bug report.");if(s.reason==="raw-values"||a.reason==="raw-values")throw new Error("Attempted to sort a screen with raw values. This should never happen. Please open a bug report.");if(s.reason==="min-and-max"||a.reason==="min-and-max")throw new Error("Attempted to sort a screen with both min and max values. This should never happen. Please open a bug report.");let{min:o,max:l}=i.values[0],{min:c,max:f}=n.values[0];e.not&&([o,l]=[l,o]),t.not&&([c,f]=[f,c]),o=o===void 0?o:parseFloat(o),l=l===void 0?l:parseFloat(l),c=c===void 0?c:parseFloat(c),f=f===void 0?f:parseFloat(f);let[d,p]=r==="min"?[o,c]:[f,l];return d-p}function Xn(r,e){return typeof r=="object"?r:{name:"arbitrary-screen",values:[{[e]:r}]}}function mh({"min-width":r,min:e=r,max:t,raw:i}={}){return{min:e,max:t,raw:i}}var Zn=P(()=>{u()});function Jn(r,e){r.walkDecls(t=>{if(e.includes(t.prop)){t.remove();return}for(let i of e)t.value.includes(`/ var(${i})`)?t.value=t.value.replace(`/ var(${i})`,""):t.value.includes(`/ var(${i}, 1)`)&&(t.value=t.value.replace(`/ var(${i}, 1)`,""))})}var gh=P(()=>{u()});var se,Xe,nt,ge,yh,bh=P(()=>{u();ft();et();Ot();oh();Yn();fr();uh();ch();Lr();ra();Kt();Ci();ph();Be();Zn();Ys();gh();ct();Br();Oi();se={childVariant:({addVariant:r})=>{r("*","& > *")},pseudoElementVariants:({addVariant:r})=>{r("first-letter","&::first-letter"),r("first-line","&::first-line"),r("marker",[({container:e})=>(Jn(e,["--tw-text-opacity"]),"& *::marker"),({container:e})=>(Jn(e,["--tw-text-opacity"]),"&::marker")]),r("selection",["& *::selection","&::selection"]),r("file","&::file-selector-button"),r("placeholder","&::placeholder"),r("backdrop","&::backdrop"),r("before",({container:e})=>(e.walkRules(t=>{let i=!1;t.walkDecls("content",()=>{i=!0}),i||t.prepend(ee.decl({prop:"content",value:"var(--tw-content)"}))}),"&::before")),r("after",({container:e})=>(e.walkRules(t=>{let i=!1;t.walkDecls("content",()=>{i=!0}),i||t.prepend(ee.decl({prop:"content",value:"var(--tw-content)"}))}),"&::after"))},pseudoClassVariants:({addVariant:r,matchVariant:e,config:t,prefix:i})=>{let n=[["first","&:first-child"],["last","&:last-child"],["only","&:only-child"],["odd","&:nth-child(odd)"],["even","&:nth-child(even)"],"first-of-type","last-of-type","only-of-type",["visited",({container:a})=>(Jn(a,["--tw-text-opacity","--tw-border-opacity","--tw-bg-opacity"]),"&:visited")],"target",["open","&[open]"],"default","checked","indeterminate","placeholder-shown","autofill","optional","required","valid","invalid","in-range","out-of-range","read-only","empty","focus-within",["hover",we(t(),"hoverOnlyWhenSupported")?"@media (hover: hover) and (pointer: fine) { &:hover }":"&:hover"],"focus","focus-visible","active","enabled","disabled"].map(a=>Array.isArray(a)?a:[a,`&:${a}`]);for(let[a,o]of n)r(a,l=>typeof o=="function"?o(l):o);let s={group:(a,{modifier:o})=>o?[`:merge(${i(".group")}\\/${Te(o)})`," &"]:[`:merge(${i(".group")})`," &"],peer:(a,{modifier:o})=>o?[`:merge(${i(".peer")}\\/${Te(o)})`," ~ &"]:[`:merge(${i(".peer")})`," ~ &"]};for(let[a,o]of Object.entries(s))e(a,(l="",c)=>{let f=K(typeof l=="function"?l(c):l);f.includes("&")||(f="&"+f);let[d,p]=o("",c),h=null,b=null,v=0;for(let y=0;y<f.length;++y){let w=f[y];w==="&"?h=y:w==="'"||w==='"'?v+=1:h!==null&&w===" "&&!v&&(b=y)}return h!==null&&b===null&&(b=f.length),f.slice(0,h)+d+f.slice(h+1,b)+p+f.slice(b)},{values:Object.fromEntries(n),[Pt]:{respectPrefix:!1}})},directionVariants:({addVariant:r})=>{r("ltr",'&:where([dir="ltr"], [dir="ltr"] *)'),r("rtl",'&:where([dir="rtl"], [dir="rtl"] *)')},reducedMotionVariants:({addVariant:r})=>{r("motion-safe","@media (prefers-reduced-motion: no-preference)"),r("motion-reduce","@media (prefers-reduced-motion: reduce)")},darkVariants:({config:r,addVariant:e})=>{let[t,i=".dark"]=[].concat(r("darkMode","media"));if(t===!1&&(t="media",G.warn("darkmode-false",["The `darkMode` option in your Tailwind CSS configuration is set to `false`, which now behaves the same as `media`.","Change `darkMode` to `media` or remove it entirely.","https://tailwindcss.com/docs/upgrade-guide#remove-dark-mode-configuration"])),t==="variant"){let n;if(Array.isArray(i)||typeof i=="function"?n=i:typeof i=="string"&&(n=[i]),Array.isArray(n))for(let s of n)s===".dark"?(t=!1,G.warn("darkmode-variant-without-selector",["When using `variant` for `darkMode`, you must provide a selector.",'Example: `darkMode: ["variant", ".your-selector &"]`'])):s.includes("&")||(t=!1,G.warn("darkmode-variant-without-ampersand",["When using `variant` for `darkMode`, your selector must contain `&`.",'Example `darkMode: ["variant", ".your-selector &"]`']));i=n}t==="selector"?e("dark",`&:where(${i}, ${i} *)`):t==="media"?e("dark","@media (prefers-color-scheme: dark)"):t==="variant"?e("dark",i):t==="class"&&e("dark",`&:is(${i} *)`)},printVariant:({addVariant:r})=>{r("print","@media print")},screenVariants:({theme:r,addVariant:e,matchVariant:t})=>{let i=r("screens")??{},n=Object.values(i).every(w=>typeof w=="string"),s=Rt(r("screens")),a=new Set([]);function o(w){return w.match(/(\D+)$/)?.[1]??"(none)"}function l(w){w!==void 0&&a.add(o(w))}function c(w){return l(w),a.size===1}for(let w of s)for(let k of w.values)l(k.min),l(k.max);let f=a.size<=1;function d(w){return Object.fromEntries(s.filter(k=>Kn(k).result).map(k=>{let{min:S,max:E}=k.values[0];if(w==="min"&&S!==void 0)return k;if(w==="min"&&E!==void 0)return{...k,not:!k.not};if(w==="max"&&E!==void 0)return k;if(w==="max"&&S!==void 0)return{...k,not:!k.not}}).map(k=>[k.name,k]))}function p(w){return(k,S)=>hh(w,k.value,S.value)}let h=p("max"),b=p("min");function v(w){return k=>{if(n)if(f){if(typeof k=="string"&&!c(k))return G.warn("minmax-have-mixed-units",["The `min-*` and `max-*` variants are not supported with a `screens` configuration containing mixed units."]),[]}else return G.warn("mixed-screen-units",["The `min-*` and `max-*` variants are not supported with a `screens` configuration containing mixed units."]),[];else return G.warn("complex-screen-config",["The `min-*` and `max-*` variants are not supported with a `screens` configuration containing objects."]),[];return[`@media ${Tt(Xn(k,w))}`]}}t("max",v("max"),{sort:h,values:n?d("max"):{}});let y="min-screens";for(let w of s)e(w.name,`@media ${Tt(w)}`,{id:y,sort:n&&f?b:void 0,value:w});t("min",v("min"),{id:y,sort:b})},supportsVariants:({matchVariant:r,theme:e})=>{r("supports",(t="")=>{let i=K(t),n=/^\w*\s*\(/.test(i);return i=n?i.replace(/\b(and|or|not)\b/g," $1 "):i,n?`@supports ${i}`:(i.includes(":")||(i=`${i}: var(--tw)`),i.startsWith("(")&&i.endsWith(")")||(i=`(${i})`),`@supports ${i}`)},{values:e("supports")??{}})},hasVariants:({matchVariant:r,prefix:e})=>{r("has",t=>`&:has(${K(t)})`,{values:{},[Pt]:{respectPrefix:!1}}),r("group-has",(t,{modifier:i})=>i?`:merge(${e(".group")}\\/${i}):has(${K(t)}) &`:`:merge(${e(".group")}):has(${K(t)}) &`,{values:{},[Pt]:{respectPrefix:!1}}),r("peer-has",(t,{modifier:i})=>i?`:merge(${e(".peer")}\\/${i}):has(${K(t)}) ~ &`:`:merge(${e(".peer")}):has(${K(t)}) ~ &`,{values:{},[Pt]:{respectPrefix:!1}})},ariaVariants:({matchVariant:r,theme:e})=>{r("aria",t=>`&[aria-${Ye(K(t))}]`,{values:e("aria")??{}}),r("group-aria",(t,{modifier:i})=>i?`:merge(.group\\/${i})[aria-${Ye(K(t))}] &`:`:merge(.group)[aria-${Ye(K(t))}] &`,{values:e("aria")??{}}),r("peer-aria",(t,{modifier:i})=>i?`:merge(.peer\\/${i})[aria-${Ye(K(t))}] ~ &`:`:merge(.peer)[aria-${Ye(K(t))}] ~ &`,{values:e("aria")??{}})},dataVariants:({matchVariant:r,theme:e})=>{r("data",t=>`&[data-${Ye(K(t))}]`,{values:e("data")??{}}),r("group-data",(t,{modifier:i})=>i?`:merge(.group\\/${i})[data-${Ye(K(t))}] &`:`:merge(.group)[data-${Ye(K(t))}] &`,{values:e("data")??{}}),r("peer-data",(t,{modifier:i})=>i?`:merge(.peer\\/${i})[data-${Ye(K(t))}] ~ &`:`:merge(.peer)[data-${Ye(K(t))}] ~ &`,{values:e("data")??{}})},orientationVariants:({addVariant:r})=>{r("portrait","@media (orientation: portrait)"),r("landscape","@media (orientation: landscape)")},prefersContrastVariants:({addVariant:r})=>{r("contrast-more","@media (prefers-contrast: more)"),r("contrast-less","@media (prefers-contrast: less)")},forcedColorsVariants:({addVariant:r})=>{r("forced-colors","@media (forced-colors: active)")}},Xe=["translate(var(--tw-translate-x), var(--tw-translate-y))","rotate(var(--tw-rotate))","skewX(var(--tw-skew-x))","skewY(var(--tw-skew-y))","scaleX(var(--tw-scale-x))","scaleY(var(--tw-scale-y))"].join(" "),nt=["var(--tw-blur)","var(--tw-brightness)","var(--tw-contrast)","var(--tw-grayscale)","var(--tw-hue-rotate)","var(--tw-invert)","var(--tw-saturate)","var(--tw-sepia)","var(--tw-drop-shadow)"].join(" "),ge=["var(--tw-backdrop-blur)","var(--tw-backdrop-brightness)","var(--tw-backdrop-contrast)","var(--tw-backdrop-grayscale)","var(--tw-backdrop-hue-rotate)","var(--tw-backdrop-invert)","var(--tw-backdrop-opacity)","var(--tw-backdrop-saturate)","var(--tw-backdrop-sepia)"].join(" "),yh={preflight:({addBase:r})=>{let e=ee.parse(`*,::after,::before{box-sizing:border-box;border-width:0;border-style:solid;border-color:theme('borderColor.DEFAULT', currentColor)}::after,::before{--tw-content:''}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:theme('fontFamily.sans', ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:theme('fontFamily.sans[1].fontFeatureSettings', normal);font-variation-settings:theme('fontFamily.sans[1].fontVariationSettings', normal);-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:theme('fontFamily.mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:theme('fontFamily.mono[1].fontFeatureSettings', normal);font-variation-settings:theme('fontFamily.mono[1].fontVariationSettings', normal);font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:theme('colors.gray.4', #9ca3af)}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}`);r([ee.comment({text:`! tailwindcss v${dh} | MIT License | https://tailwindcss.com`}),...e.nodes])},container:(()=>{function r(t=[]){return t.flatMap(i=>i.values.map(n=>n.min)).filter(i=>i!==void 0)}function e(t,i,n){if(typeof n=="undefined")return[];if(!(typeof n=="object"&&n!==null))return[{screen:"DEFAULT",minWidth:0,padding:n}];let s=[];n.DEFAULT&&s.push({screen:"DEFAULT",minWidth:0,padding:n.DEFAULT});for(let a of t)for(let o of i)for(let{min:l}of o.values)l===a&&s.push({minWidth:a,padding:n[o.name]});return s}return function({addComponents:t,theme:i}){let n=Rt(i("container.screens",i("screens"))),s=r(n),a=e(s,n,i("container.padding")),o=c=>{let f=a.find(d=>d.minWidth===c);return f?{paddingRight:f.padding,paddingLeft:f.padding}:{}},l=Array.from(new Set(s.slice().sort((c,f)=>parseInt(c)-parseInt(f)))).map(c=>({[`@media (min-width: ${c})`]:{".container":{"max-width":c,...o(c)}}}));t([{".container":Object.assign({width:"100%"},i("container.center",!1)?{marginRight:"auto",marginLeft:"auto"}:{},o(0))},...l])}})(),accessibility:({addUtilities:r})=>{r({".sr-only":{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},".not-sr-only":{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",clip:"auto",whiteSpace:"normal"}})},pointerEvents:({addUtilities:r})=>{r({".pointer-events-none":{"pointer-events":"none"},".pointer-events-auto":{"pointer-events":"auto"}})},visibility:({addUtilities:r})=>{r({".visible":{visibility:"visible"},".invisible":{visibility:"hidden"},".collapse":{visibility:"collapse"}})},position:({addUtilities:r})=>{r({".static":{position:"static"},".fixed":{position:"fixed"},".absolute":{position:"absolute"},".relative":{position:"relative"},".sticky":{position:"sticky"}})},inset:L("inset",[["inset",["inset"]],[["inset-x",["left","right"]],["inset-y",["top","bottom"]]],[["start",["inset-inline-start"]],["end",["inset-inline-end"]],["top",["top"]],["right",["right"]],["bottom",["bottom"]],["left",["left"]]]],{supportsNegativeValues:!0}),isolation:({addUtilities:r})=>{r({".isolate":{isolation:"isolate"},".isolation-auto":{isolation:"auto"}})},zIndex:L("zIndex",[["z",["zIndex"]]],{supportsNegativeValues:!0}),order:L("order",void 0,{supportsNegativeValues:!0}),gridColumn:L("gridColumn",[["col",["gridColumn"]]]),gridColumnStart:L("gridColumnStart",[["col-start",["gridColumnStart"]]],{supportsNegativeValues:!0}),gridColumnEnd:L("gridColumnEnd",[["col-end",["gridColumnEnd"]]],{supportsNegativeValues:!0}),gridRow:L("gridRow",[["row",["gridRow"]]]),gridRowStart:L("gridRowStart",[["row-start",["gridRowStart"]]],{supportsNegativeValues:!0}),gridRowEnd:L("gridRowEnd",[["row-end",["gridRowEnd"]]],{supportsNegativeValues:!0}),float:({addUtilities:r})=>{r({".float-start":{float:"inline-start"},".float-end":{float:"inline-end"},".float-right":{float:"right"},".float-left":{float:"left"},".float-none":{float:"none"}})},clear:({addUtilities:r})=>{r({".clear-start":{clear:"inline-start"},".clear-end":{clear:"inline-end"},".clear-left":{clear:"left"},".clear-right":{clear:"right"},".clear-both":{clear:"both"},".clear-none":{clear:"none"}})},margin:L("margin",[["m",["margin"]],[["mx",["margin-left","margin-right"]],["my",["margin-top","margin-bottom"]]],[["ms",["margin-inline-start"]],["me",["margin-inline-end"]],["mt",["margin-top"]],["mr",["margin-right"]],["mb",["margin-bottom"]],["ml",["margin-left"]]]],{supportsNegativeValues:!0}),boxSizing:({addUtilities:r})=>{r({".box-border":{"box-sizing":"border-box"},".box-content":{"box-sizing":"content-box"}})},lineClamp:({matchUtilities:r,addUtilities:e,theme:t})=>{r({"line-clamp":i=>({overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":`${i}`})},{values:t("lineClamp")}),e({".line-clamp-none":{overflow:"visible",display:"block","-webkit-box-orient":"horizontal","-webkit-line-clamp":"none"}})},display:({addUtilities:r})=>{r({".block":{display:"block"},".inline-block":{display:"inline-block"},".inline":{display:"inline"},".flex":{display:"flex"},".inline-flex":{display:"inline-flex"},".table":{display:"table"},".inline-table":{display:"inline-table"},".table-caption":{display:"table-caption"},".table-cell":{display:"table-cell"},".table-column":{display:"table-column"},".table-column-group":{display:"table-column-group"},".table-footer-group":{display:"table-footer-group"},".table-header-group":{display:"table-header-group"},".table-row-group":{display:"table-row-group"},".table-row":{display:"table-row"},".flow-root":{display:"flow-root"},".grid":{display:"grid"},".inline-grid":{display:"inline-grid"},".contents":{display:"contents"},".list-item":{display:"list-item"},".hidden":{display:"none"}})},aspectRatio:L("aspectRatio",[["aspect",["aspect-ratio"]]]),size:L("size",[["size",["width","height"]]]),height:L("height",[["h",["height"]]]),maxHeight:L("maxHeight",[["max-h",["maxHeight"]]]),minHeight:L("minHeight",[["min-h",["minHeight"]]]),width:L("width",[["w",["width"]]]),minWidth:L("minWidth",[["min-w",["minWidth"]]]),maxWidth:L("maxWidth",[["max-w",["maxWidth"]]]),flex:L("flex"),flexShrink:L("flexShrink",[["flex-shrink",["flex-shrink"]],["shrink",["flex-shrink"]]]),flexGrow:L("flexGrow",[["flex-grow",["flex-grow"]],["grow",["flex-grow"]]]),flexBasis:L("flexBasis",[["basis",["flex-basis"]]]),tableLayout:({addUtilities:r})=>{r({".table-auto":{"table-layout":"auto"},".table-fixed":{"table-layout":"fixed"}})},captionSide:({addUtilities:r})=>{r({".caption-top":{"caption-side":"top"},".caption-bottom":{"caption-side":"bottom"}})},borderCollapse:({addUtilities:r})=>{r({".border-collapse":{"border-collapse":"collapse"},".border-separate":{"border-collapse":"separate"}})},borderSpacing:({addDefaults:r,matchUtilities:e,theme:t})=>{r("border-spacing",{"--tw-border-spacing-x":0,"--tw-border-spacing-y":0}),e({"border-spacing":i=>({"--tw-border-spacing-x":i,"--tw-border-spacing-y":i,"@defaults border-spacing":{},"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"}),"border-spacing-x":i=>({"--tw-border-spacing-x":i,"@defaults border-spacing":{},"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"}),"border-spacing-y":i=>({"--tw-border-spacing-y":i,"@defaults border-spacing":{},"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})},{values:t("borderSpacing")})},transformOrigin:L("transformOrigin",[["origin",["transformOrigin"]]]),translate:L("translate",[[["translate-x",[["@defaults transform",{}],"--tw-translate-x",["transform",Xe]]],["translate-y",[["@defaults transform",{}],"--tw-translate-y",["transform",Xe]]]]],{supportsNegativeValues:!0}),rotate:L("rotate",[["rotate",[["@defaults transform",{}],"--tw-rotate",["transform",Xe]]]],{supportsNegativeValues:!0}),skew:L("skew",[[["skew-x",[["@defaults transform",{}],"--tw-skew-x",["transform",Xe]]],["skew-y",[["@defaults transform",{}],"--tw-skew-y",["transform",Xe]]]]],{supportsNegativeValues:!0}),scale:L("scale",[["scale",[["@defaults transform",{}],"--tw-scale-x","--tw-scale-y",["transform",Xe]]],[["scale-x",[["@defaults transform",{}],"--tw-scale-x",["transform",Xe]]],["scale-y",[["@defaults transform",{}],"--tw-scale-y",["transform",Xe]]]]],{supportsNegativeValues:!0}),transform:({addDefaults:r,addUtilities:e})=>{r("transform",{"--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1"}),e({".transform":{"@defaults transform":{},transform:Xe},".transform-cpu":{transform:Xe},".transform-gpu":{transform:Xe.replace("translate(var(--tw-translate-x), var(--tw-translate-y))","translate3d(var(--tw-translate-x), var(--tw-translate-y), 0)")},".transform-none":{transform:"none"}})},animation:({matchUtilities:r,theme:e,config:t})=>{let i=s=>Te(t("prefix")+s),n=Object.fromEntries(Object.entries(e("keyframes")??{}).map(([s,a])=>[s,{[`@keyframes ${i(s)}`]:a}]));r({animate:s=>{let a=Mo(s);return[...a.flatMap(o=>n[o.name]),{animation:a.map(({name:o,value:l})=>o===void 0||n[o]===void 0?l:l.replace(o,i(o))).join(", ")}]}},{values:e("animation")})},cursor:L("cursor"),touchAction:({addDefaults:r,addUtilities:e})=>{r("touch-action",{"--tw-pan-x":" ","--tw-pan-y":" ","--tw-pinch-zoom":" "});let t="var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)";e({".touch-auto":{"touch-action":"auto"},".touch-none":{"touch-action":"none"},".touch-pan-x":{"@defaults touch-action":{},"--tw-pan-x":"pan-x","touch-action":t},".touch-pan-left":{"@defaults touch-action":{},"--tw-pan-x":"pan-left","touch-action":t},".touch-pan-right":{"@defaults touch-action":{},"--tw-pan-x":"pan-right","touch-action":t},".touch-pan-y":{"@defaults touch-action":{},"--tw-pan-y":"pan-y","touch-action":t},".touch-pan-up":{"@defaults touch-action":{},"--tw-pan-y":"pan-up","touch-action":t},".touch-pan-down":{"@defaults touch-action":{},"--tw-pan-y":"pan-down","touch-action":t},".touch-pinch-zoom":{"@defaults touch-action":{},"--tw-pinch-zoom":"pinch-zoom","touch-action":t},".touch-manipulation":{"touch-action":"manipulation"}})},userSelect:({addUtilities:r})=>{r({".select-none":{"user-select":"none"},".select-text":{"user-select":"text"},".select-all":{"user-select":"all"},".select-auto":{"user-select":"auto"}})},resize:({addUtilities:r})=>{r({".resize-none":{resize:"none"},".resize-y":{resize:"vertical"},".resize-x":{resize:"horizontal"},".resize":{resize:"both"}})},scrollSnapType:({addDefaults:r,addUtilities:e})=>{r("scroll-snap-type",{"--tw-scroll-snap-strictness":"proximity"}),e({".snap-none":{"scroll-snap-type":"none"},".snap-x":{"@defaults scroll-snap-type":{},"scroll-snap-type":"x var(--tw-scroll-snap-strictness)"},".snap-y":{"@defaults scroll-snap-type":{},"scroll-snap-type":"y var(--tw-scroll-snap-strictness)"},".snap-both":{"@defaults scroll-snap-type":{},"scroll-snap-type":"both var(--tw-scroll-snap-strictness)"},".snap-mandatory":{"--tw-scroll-snap-strictness":"mandatory"},".snap-proximity":{"--tw-scroll-snap-strictness":"proximity"}})},scrollSnapAlign:({addUtilities:r})=>{r({".snap-start":{"scroll-snap-align":"start"},".snap-end":{"scroll-snap-align":"end"},".snap-center":{"scroll-snap-align":"center"},".snap-align-none":{"scroll-snap-align":"none"}})},scrollSnapStop:({addUtilities:r})=>{r({".snap-normal":{"scroll-snap-stop":"normal"},".snap-always":{"scroll-snap-stop":"always"}})},scrollMargin:L("scrollMargin",[["scroll-m",["scroll-margin"]],[["scroll-mx",["scroll-margin-left","scroll-margin-right"]],["scroll-my",["scroll-margin-top","scroll-margin-bottom"]]],[["scroll-ms",["scroll-margin-inline-start"]],["scroll-me",["scroll-margin-inline-end"]],["scroll-mt",["scroll-margin-top"]],["scroll-mr",["scroll-margin-right"]],["scroll-mb",["scroll-margin-bottom"]],["scroll-ml",["scroll-margin-left"]]]],{supportsNegativeValues:!0}),scrollPadding:L("scrollPadding",[["scroll-p",["scroll-padding"]],[["scroll-px",["scroll-padding-left","scroll-padding-right"]],["scroll-py",["scroll-padding-top","scroll-padding-bottom"]]],[["scroll-ps",["scroll-padding-inline-start"]],["scroll-pe",["scroll-padding-inline-end"]],["scroll-pt",["scroll-padding-top"]],["scroll-pr",["scroll-padding-right"]],["scroll-pb",["scroll-padding-bottom"]],["scroll-pl",["scroll-padding-left"]]]]),listStylePosition:({addUtilities:r})=>{r({".list-inside":{"list-style-position":"inside"},".list-outside":{"list-style-position":"outside"}})},listStyleType:L("listStyleType",[["list",["listStyleType"]]]),listStyleImage:L("listStyleImage",[["list-image",["listStyleImage"]]]),appearance:({addUtilities:r})=>{r({".appearance-none":{appearance:"none"},".appearance-auto":{appearance:"auto"}})},columns:L("columns",[["columns",["columns"]]]),breakBefore:({addUtilities:r})=>{r({".break-before-auto":{"break-before":"auto"},".break-before-avoid":{"break-before":"avoid"},".break-before-all":{"break-before":"all"},".break-before-avoid-page":{"break-before":"avoid-page"},".break-before-page":{"break-before":"page"},".break-before-left":{"break-before":"left"},".break-before-right":{"break-before":"right"},".break-before-column":{"break-before":"column"}})},breakInside:({addUtilities:r})=>{r({".break-inside-auto":{"break-inside":"auto"},".break-inside-avoid":{"break-inside":"avoid"},".break-inside-avoid-page":{"break-inside":"avoid-page"},".break-inside-avoid-column":{"break-inside":"avoid-column"}})},breakAfter:({addUtilities:r})=>{r({".break-after-auto":{"break-after":"auto"},".break-after-avoid":{"break-after":"avoid"},".break-after-all":{"break-after":"all"},".break-after-avoid-page":{"break-after":"avoid-page"},".break-after-page":{"break-after":"page"},".break-after-left":{"break-after":"left"},".break-after-right":{"break-after":"right"},".break-after-column":{"break-after":"column"}})},gridAutoColumns:L("gridAutoColumns",[["auto-cols",["gridAutoColumns"]]]),gridAutoFlow:({addUtilities:r})=>{r({".grid-flow-row":{gridAutoFlow:"row"},".grid-flow-col":{gridAutoFlow:"column"},".grid-flow-dense":{gridAutoFlow:"dense"},".grid-flow-row-dense":{gridAutoFlow:"row dense"},".grid-flow-col-dense":{gridAutoFlow:"column dense"}})},gridAutoRows:L("gridAutoRows",[["auto-rows",["gridAutoRows"]]]),gridTemplateColumns:L("gridTemplateColumns",[["grid-cols",["gridTemplateColumns"]]]),gridTemplateRows:L("gridTemplateRows",[["grid-rows",["gridTemplateRows"]]]),flexDirection:({addUtilities:r})=>{r({".flex-row":{"flex-direction":"row"},".flex-row-reverse":{"flex-direction":"row-reverse"},".flex-col":{"flex-direction":"column"},".flex-col-reverse":{"flex-direction":"column-reverse"}})},flexWrap:({addUtilities:r})=>{r({".flex-wrap":{"flex-wrap":"wrap"},".flex-wrap-reverse":{"flex-wrap":"wrap-reverse"},".flex-nowrap":{"flex-wrap":"nowrap"}})},placeContent:({addUtilities:r})=>{r({".place-content-center":{"place-content":"center"},".place-content-start":{"place-content":"start"},".place-content-end":{"place-content":"end"},".place-content-between":{"place-content":"space-between"},".place-content-around":{"place-content":"space-around"},".place-content-evenly":{"place-content":"space-evenly"},".place-content-baseline":{"place-content":"baseline"},".place-content-stretch":{"place-content":"stretch"}})},placeItems:({addUtilities:r})=>{r({".place-items-start":{"place-items":"start"},".place-items-end":{"place-items":"end"},".place-items-center":{"place-items":"center"},".place-items-baseline":{"place-items":"baseline"},".place-items-stretch":{"place-items":"stretch"}})},alignContent:({addUtilities:r})=>{r({".content-normal":{"align-content":"normal"},".content-center":{"align-content":"center"},".content-start":{"align-content":"flex-start"},".content-end":{"align-content":"flex-end"},".content-between":{"align-content":"space-between"},".content-around":{"align-content":"space-around"},".content-evenly":{"align-content":"space-evenly"},".content-baseline":{"align-content":"baseline"},".content-stretch":{"align-content":"stretch"}})},alignItems:({addUtilities:r})=>{r({".items-start":{"align-items":"flex-start"},".items-end":{"align-items":"flex-end"},".items-center":{"align-items":"center"},".items-baseline":{"align-items":"baseline"},".items-stretch":{"align-items":"stretch"}})},justifyContent:({addUtilities:r})=>{r({".justify-normal":{"justify-content":"normal"},".justify-start":{"justify-content":"flex-start"},".justify-end":{"justify-content":"flex-end"},".justify-center":{"justify-content":"center"},".justify-between":{"justify-content":"space-between"},".justify-around":{"justify-content":"space-around"},".justify-evenly":{"justify-content":"space-evenly"},".justify-stretch":{"justify-content":"stretch"}})},justifyItems:({addUtilities:r})=>{r({".justify-items-start":{"justify-items":"start"},".justify-items-end":{"justify-items":"end"},".justify-items-center":{"justify-items":"center"},".justify-items-stretch":{"justify-items":"stretch"}})},gap:L("gap",[["gap",["gap"]],[["gap-x",["columnGap"]],["gap-y",["rowGap"]]]]),space:({matchUtilities:r,addUtilities:e,theme:t})=>{r({"space-x":i=>(i=i==="0"?"0px":i,{"& > :not([hidden]) ~ :not([hidden])":{"--tw-space-x-reverse":"0","margin-right":`calc(${i} * var(--tw-space-x-reverse))`,"margin-left":`calc(${i} * calc(1 - var(--tw-space-x-reverse)))`}}),"space-y":i=>(i=i==="0"?"0px":i,{"& > :not([hidden]) ~ :not([hidden])":{"--tw-space-y-reverse":"0","margin-top":`calc(${i} * calc(1 - var(--tw-space-y-reverse)))`,"margin-bottom":`calc(${i} * var(--tw-space-y-reverse))`}})},{values:t("space"),supportsNegativeValues:!0}),e({".space-y-reverse > :not([hidden]) ~ :not([hidden])":{"--tw-space-y-reverse":"1"},".space-x-reverse > :not([hidden]) ~ :not([hidden])":{"--tw-space-x-reverse":"1"}})},divideWidth:({matchUtilities:r,addUtilities:e,theme:t})=>{r({"divide-x":i=>(i=i==="0"?"0px":i,{"& > :not([hidden]) ~ :not([hidden])":{"@defaults border-width":{},"--tw-divide-x-reverse":"0","border-right-width":`calc(${i} * var(--tw-divide-x-reverse))`,"border-left-width":`calc(${i} * calc(1 - var(--tw-divide-x-reverse)))`}}),"divide-y":i=>(i=i==="0"?"0px":i,{"& > :not([hidden]) ~ :not([hidden])":{"@defaults border-width":{},"--tw-divide-y-reverse":"0","border-top-width":`calc(${i} * calc(1 - var(--tw-divide-y-reverse)))`,"border-bottom-width":`calc(${i} * var(--tw-divide-y-reverse))`}})},{values:t("divideWidth"),type:["line-width","length","any"]}),e({".divide-y-reverse > :not([hidden]) ~ :not([hidden])":{"@defaults border-width":{},"--tw-divide-y-reverse":"1"},".divide-x-reverse > :not([hidden]) ~ :not([hidden])":{"@defaults border-width":{},"--tw-divide-x-reverse":"1"}})},divideStyle:({addUtilities:r})=>{r({".divide-solid > :not([hidden]) ~ :not([hidden])":{"border-style":"solid"},".divide-dashed > :not([hidden]) ~ :not([hidden])":{"border-style":"dashed"},".divide-dotted > :not([hidden]) ~ :not([hidden])":{"border-style":"dotted"},".divide-double > :not([hidden]) ~ :not([hidden])":{"border-style":"double"},".divide-none > :not([hidden]) ~ :not([hidden])":{"border-style":"none"}})},divideColor:({matchUtilities:r,theme:e,corePlugins:t})=>{r({divide:i=>t("divideOpacity")?{["& > :not([hidden]) ~ :not([hidden])"]:Ae({color:i,property:"border-color",variable:"--tw-divide-opacity"})}:{["& > :not([hidden]) ~ :not([hidden])"]:{"border-color":X(i)}}},{values:(({DEFAULT:i,...n})=>n)(xe(e("divideColor"))),type:["color","any"]})},divideOpacity:({matchUtilities:r,theme:e})=>{r({"divide-opacity":t=>({["& > :not([hidden]) ~ :not([hidden])"]:{"--tw-divide-opacity":t}})},{values:e("divideOpacity")})},placeSelf:({addUtilities:r})=>{r({".place-self-auto":{"place-self":"auto"},".place-self-start":{"place-self":"start"},".place-self-end":{"place-self":"end"},".place-self-center":{"place-self":"center"},".place-self-stretch":{"place-self":"stretch"}})},alignSelf:({addUtilities:r})=>{r({".self-auto":{"align-self":"auto"},".self-start":{"align-self":"flex-start"},".self-end":{"align-self":"flex-end"},".self-center":{"align-self":"center"},".self-stretch":{"align-self":"stretch"},".self-baseline":{"align-self":"baseline"}})},justifySelf:({addUtilities:r})=>{r({".justify-self-auto":{"justify-self":"auto"},".justify-self-start":{"justify-self":"start"},".justify-self-end":{"justify-self":"end"},".justify-self-center":{"justify-self":"center"},".justify-self-stretch":{"justify-self":"stretch"}})},overflow:({addUtilities:r})=>{r({".overflow-auto":{overflow:"auto"},".overflow-hidden":{overflow:"hidden"},".overflow-clip":{overflow:"clip"},".overflow-visible":{overflow:"visible"},".overflow-scroll":{overflow:"scroll"},".overflow-x-auto":{"overflow-x":"auto"},".overflow-y-auto":{"overflow-y":"auto"},".overflow-x-hidden":{"overflow-x":"hidden"},".overflow-y-hidden":{"overflow-y":"hidden"},".overflow-x-clip":{"overflow-x":"clip"},".overflow-y-clip":{"overflow-y":"clip"},".overflow-x-visible":{"overflow-x":"visible"},".overflow-y-visible":{"overflow-y":"visible"},".overflow-x-scroll":{"overflow-x":"scroll"},".overflow-y-scroll":{"overflow-y":"scroll"}})},overscrollBehavior:({addUtilities:r})=>{r({".overscroll-auto":{"overscroll-behavior":"auto"},".overscroll-contain":{"overscroll-behavior":"contain"},".overscroll-none":{"overscroll-behavior":"none"},".overscroll-y-auto":{"overscroll-behavior-y":"auto"},".overscroll-y-contain":{"overscroll-behavior-y":"contain"},".overscroll-y-none":{"overscroll-behavior-y":"none"},".overscroll-x-auto":{"overscroll-behavior-x":"auto"},".overscroll-x-contain":{"overscroll-behavior-x":"contain"},".overscroll-x-none":{"overscroll-behavior-x":"none"}})},scrollBehavior:({addUtilities:r})=>{r({".scroll-auto":{"scroll-behavior":"auto"},".scroll-smooth":{"scroll-behavior":"smooth"}})},textOverflow:({addUtilities:r})=>{r({".truncate":{overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},".overflow-ellipsis":{"text-overflow":"ellipsis"},".text-ellipsis":{"text-overflow":"ellipsis"},".text-clip":{"text-overflow":"clip"}})},hyphens:({addUtilities:r})=>{r({".hyphens-none":{hyphens:"none"},".hyphens-manual":{hyphens:"manual"},".hyphens-auto":{hyphens:"auto"}})},whitespace:({addUtilities:r})=>{r({".whitespace-normal":{"white-space":"normal"},".whitespace-nowrap":{"white-space":"nowrap"},".whitespace-pre":{"white-space":"pre"},".whitespace-pre-line":{"white-space":"pre-line"},".whitespace-pre-wrap":{"white-space":"pre-wrap"},".whitespace-break-spaces":{"white-space":"break-spaces"}})},textWrap:({addUtilities:r})=>{r({".text-wrap":{"text-wrap":"wrap"},".text-nowrap":{"text-wrap":"nowrap"},".text-balance":{"text-wrap":"balance"},".text-pretty":{"text-wrap":"pretty"}})},wordBreak:({addUtilities:r})=>{r({".break-normal":{"overflow-wrap":"normal","word-break":"normal"},".break-words":{"overflow-wrap":"break-word"},".break-all":{"word-break":"break-all"},".break-keep":{"word-break":"keep-all"}})},borderRadius:L("borderRadius",[["rounded",["border-radius"]],[["rounded-s",["border-start-start-radius","border-end-start-radius"]],["rounded-e",["border-start-end-radius","border-end-end-radius"]],["rounded-t",["border-top-left-radius","border-top-right-radius"]],["rounded-r",["border-top-right-radius","border-bottom-right-radius"]],["rounded-b",["border-bottom-right-radius","border-bottom-left-radius"]],["rounded-l",["border-top-left-radius","border-bottom-left-radius"]]],[["rounded-ss",["border-start-start-radius"]],["rounded-se",["border-start-end-radius"]],["rounded-ee",["border-end-end-radius"]],["rounded-es",["border-end-start-radius"]],["rounded-tl",["border-top-left-radius"]],["rounded-tr",["border-top-right-radius"]],["rounded-br",["border-bottom-right-radius"]],["rounded-bl",["border-bottom-left-radius"]]]]),borderWidth:L("borderWidth",[["border",[["@defaults border-width",{}],"border-width"]],[["border-x",[["@defaults border-width",{}],"border-left-width","border-right-width"]],["border-y",[["@defaults border-width",{}],"border-top-width","border-bottom-width"]]],[["border-s",[["@defaults border-width",{}],"border-inline-start-width"]],["border-e",[["@defaults border-width",{}],"border-inline-end-width"]],["border-t",[["@defaults border-width",{}],"border-top-width"]],["border-r",[["@defaults border-width",{}],"border-right-width"]],["border-b",[["@defaults border-width",{}],"border-bottom-width"]],["border-l",[["@defaults border-width",{}],"border-left-width"]]]],{type:["line-width","length"]}),borderStyle:({addUtilities:r})=>{r({".border-solid":{"border-style":"solid"},".border-dashed":{"border-style":"dashed"},".border-dotted":{"border-style":"dotted"},".border-double":{"border-style":"double"},".border-hidden":{"border-style":"hidden"},".border-none":{"border-style":"none"}})},borderColor:({matchUtilities:r,theme:e,corePlugins:t})=>{r({border:i=>t("borderOpacity")?Ae({color:i,property:"border-color",variable:"--tw-border-opacity"}):{"border-color":X(i)}},{values:(({DEFAULT:i,...n})=>n)(xe(e("borderColor"))),type:["color","any"]}),r({"border-x":i=>t("borderOpacity")?Ae({color:i,property:["border-left-color","border-right-color"],variable:"--tw-border-opacity"}):{"border-left-color":X(i),"border-right-color":X(i)},"border-y":i=>t("borderOpacity")?Ae({color:i,property:["border-top-color","border-bottom-color"],variable:"--tw-border-opacity"}):{"border-top-color":X(i),"border-bottom-color":X(i)}},{values:(({DEFAULT:i,...n})=>n)(xe(e("borderColor"))),type:["color","any"]}),r({"border-s":i=>t("borderOpacity")?Ae({color:i,property:"border-inline-start-color",variable:"--tw-border-opacity"}):{"border-inline-start-color":X(i)},"border-e":i=>t("borderOpacity")?Ae({color:i,property:"border-inline-end-color",variable:"--tw-border-opacity"}):{"border-inline-end-color":X(i)},"border-t":i=>t("borderOpacity")?Ae({color:i,property:"border-top-color",variable:"--tw-border-opacity"}):{"border-top-color":X(i)},"border-r":i=>t("borderOpacity")?Ae({color:i,property:"border-right-color",variable:"--tw-border-opacity"}):{"border-right-color":X(i)},"border-b":i=>t("borderOpacity")?Ae({color:i,property:"border-bottom-color",variable:"--tw-border-opacity"}):{"border-bottom-color":X(i)},"border-l":i=>t("borderOpacity")?Ae({color:i,property:"border-left-color",variable:"--tw-border-opacity"}):{"border-left-color":X(i)}},{values:(({DEFAULT:i,...n})=>n)(xe(e("borderColor"))),type:["color","any"]})},borderOpacity:L("borderOpacity",[["border-opacity",["--tw-border-opacity"]]]),backgroundColor:({matchUtilities:r,theme:e,corePlugins:t})=>{r({bg:i=>t("backgroundOpacity")?Ae({color:i,property:"background-color",variable:"--tw-bg-opacity"}):{"background-color":X(i)}},{values:xe(e("backgroundColor")),type:["color","any"]})},backgroundOpacity:L("backgroundOpacity",[["bg-opacity",["--tw-bg-opacity"]]]),backgroundImage:L("backgroundImage",[["bg",["background-image"]]],{type:["lookup","image","url"]}),gradientColorStops:(()=>{function r(e){return Je(e,0,"rgb(255 255 255 / 0)")}return function({matchUtilities:e,theme:t,addDefaults:i}){i("gradient-color-stops",{"--tw-gradient-from-position":" ","--tw-gradient-via-position":" ","--tw-gradient-to-position":" "});let n={values:xe(t("gradientColorStops")),type:["color","any"]},s={values:t("gradientColorStopPositions"),type:["length","percentage"]};e({from:a=>{let o=r(a);return{"@defaults gradient-color-stops":{},"--tw-gradient-from":`${X(a)} var(--tw-gradient-from-position)`,"--tw-gradient-to":`${o} var(--tw-gradient-to-position)`,"--tw-gradient-stops":"var(--tw-gradient-from), var(--tw-gradient-to)"}}},n),e({from:a=>({"--tw-gradient-from-position":a})},s),e({via:a=>{let o=r(a);return{"@defaults gradient-color-stops":{},"--tw-gradient-to":`${o} var(--tw-gradient-to-position)`,"--tw-gradient-stops":`var(--tw-gradient-from), ${X(a)} var(--tw-gradient-via-position), var(--tw-gradient-to)`}}},n),e({via:a=>({"--tw-gradient-via-position":a})},s),e({to:a=>({"@defaults gradient-color-stops":{},"--tw-gradient-to":`${X(a)} var(--tw-gradient-to-position)`})},n),e({to:a=>({"--tw-gradient-to-position":a})},s)}})(),boxDecorationBreak:({addUtilities:r})=>{r({".decoration-slice":{"box-decoration-break":"slice"},".decoration-clone":{"box-decoration-break":"clone"},".box-decoration-slice":{"box-decoration-break":"slice"},".box-decoration-clone":{"box-decoration-break":"clone"}})},backgroundSize:L("backgroundSize",[["bg",["background-size"]]],{type:["lookup","length","percentage","size"]}),backgroundAttachment:({addUtilities:r})=>{r({".bg-fixed":{"background-attachment":"fixed"},".bg-local":{"background-attachment":"local"},".bg-scroll":{"background-attachment":"scroll"}})},backgroundClip:({addUtilities:r})=>{r({".bg-clip-border":{"background-clip":"border-box"},".bg-clip-padding":{"background-clip":"padding-box"},".bg-clip-content":{"background-clip":"content-box"},".bg-clip-text":{"background-clip":"text"}})},backgroundPosition:L("backgroundPosition",[["bg",["background-position"]]],{type:["lookup",["position",{preferOnConflict:!0}]]}),backgroundRepeat:({addUtilities:r})=>{r({".bg-repeat":{"background-repeat":"repeat"},".bg-no-repeat":{"background-repeat":"no-repeat"},".bg-repeat-x":{"background-repeat":"repeat-x"},".bg-repeat-y":{"background-repeat":"repeat-y"},".bg-repeat-round":{"background-repeat":"round"},".bg-repeat-space":{"background-repeat":"space"}})},backgroundOrigin:({addUtilities:r})=>{r({".bg-origin-border":{"background-origin":"border-box"},".bg-origin-padding":{"background-origin":"padding-box"},".bg-origin-content":{"background-origin":"content-box"}})},fill:({matchUtilities:r,theme:e})=>{r({fill:t=>({fill:X(t)})},{values:xe(e("fill")),type:["color","any"]})},stroke:({matchUtilities:r,theme:e})=>{r({stroke:t=>({stroke:X(t)})},{values:xe(e("stroke")),type:["color","url","any"]})},strokeWidth:L("strokeWidth",[["stroke",["stroke-width"]]],{type:["length","number","percentage"]}),objectFit:({addUtilities:r})=>{r({".object-contain":{"object-fit":"contain"},".object-cover":{"object-fit":"cover"},".object-fill":{"object-fit":"fill"},".object-none":{"object-fit":"none"},".object-scale-down":{"object-fit":"scale-down"}})},objectPosition:L("objectPosition",[["object",["object-position"]]]),padding:L("padding",[["p",["padding"]],[["px",["padding-left","padding-right"]],["py",["padding-top","padding-bottom"]]],[["ps",["padding-inline-start"]],["pe",["padding-inline-end"]],["pt",["padding-top"]],["pr",["padding-right"]],["pb",["padding-bottom"]],["pl",["padding-left"]]]]),textAlign:({addUtilities:r})=>{r({".text-left":{"text-align":"left"},".text-center":{"text-align":"center"},".text-right":{"text-align":"right"},".text-justify":{"text-align":"justify"},".text-start":{"text-align":"start"},".text-end":{"text-align":"end"}})},textIndent:L("textIndent",[["indent",["text-indent"]]],{supportsNegativeValues:!0}),verticalAlign:({addUtilities:r,matchUtilities:e})=>{r({".align-baseline":{"vertical-align":"baseline"},".align-top":{"vertical-align":"top"},".align-middle":{"vertical-align":"middle"},".align-bottom":{"vertical-align":"bottom"},".align-text-top":{"vertical-align":"text-top"},".align-text-bottom":{"vertical-align":"text-bottom"},".align-sub":{"vertical-align":"sub"},".align-super":{"vertical-align":"super"}}),e({align:t=>({"vertical-align":t})})},fontFamily:({matchUtilities:r,theme:e})=>{r({font:t=>{let[i,n={}]=Array.isArray(t)&&ke(t[1])?t:[t],{fontFeatureSettings:s,fontVariationSettings:a}=n;return{"font-family":Array.isArray(i)?i.join(", "):i,...s===void 0?{}:{"font-feature-settings":s},...a===void 0?{}:{"font-variation-settings":a}}}},{values:e("fontFamily"),type:["lookup","generic-name","family-name"]})},fontSize:({matchUtilities:r,theme:e})=>{r({text:(t,{modifier:i})=>{let[n,s]=Array.isArray(t)?t:[t];if(i)return{"font-size":n,"line-height":i};let{lineHeight:a,letterSpacing:o,fontWeight:l}=ke(s)?s:{lineHeight:s};return{"font-size":n,...a===void 0?{}:{"line-height":a},...o===void 0?{}:{"letter-spacing":o},...l===void 0?{}:{"font-weight":l}}}},{values:e("fontSize"),modifiers:e("lineHeight"),type:["absolute-size","relative-size","length","percentage"]})},fontWeight:L("fontWeight",[["font",["fontWeight"]]],{type:["lookup","number","any"]}),textTransform:({addUtilities:r})=>{r({".uppercase":{"text-transform":"uppercase"},".lowercase":{"text-transform":"lowercase"},".capitalize":{"text-transform":"capitalize"},".normal-case":{"text-transform":"none"}})},fontStyle:({addUtilities:r})=>{r({".italic":{"font-style":"italic"},".not-italic":{"font-style":"normal"}})},fontVariantNumeric:({addDefaults:r,addUtilities:e})=>{let t="var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)";r("font-variant-numeric",{"--tw-ordinal":" ","--tw-slashed-zero":" ","--tw-numeric-figure":" ","--tw-numeric-spacing":" ","--tw-numeric-fraction":" "}),e({".normal-nums":{"font-variant-numeric":"normal"},".ordinal":{"@defaults font-variant-numeric":{},"--tw-ordinal":"ordinal","font-variant-numeric":t},".slashed-zero":{"@defaults font-variant-numeric":{},"--tw-slashed-zero":"slashed-zero","font-variant-numeric":t},".lining-nums":{"@defaults font-variant-numeric":{},"--tw-numeric-figure":"lining-nums","font-variant-numeric":t},".oldstyle-nums":{"@defaults font-variant-numeric":{},"--tw-numeric-figure":"oldstyle-nums","font-variant-numeric":t},".proportional-nums":{"@defaults font-variant-numeric":{},"--tw-numeric-spacing":"proportional-nums","font-variant-numeric":t},".tabular-nums":{"@defaults font-variant-numeric":{},"--tw-numeric-spacing":"tabular-nums","font-variant-numeric":t},".diagonal-fractions":{"@defaults font-variant-numeric":{},"--tw-numeric-fraction":"diagonal-fractions","font-variant-numeric":t},".stacked-fractions":{"@defaults font-variant-numeric":{},"--tw-numeric-fraction":"stacked-fractions","font-variant-numeric":t}})},lineHeight:L("lineHeight",[["leading",["lineHeight"]]]),letterSpacing:L("letterSpacing",[["tracking",["letterSpacing"]]],{supportsNegativeValues:!0}),textColor:({matchUtilities:r,theme:e,corePlugins:t})=>{r({text:i=>t("textOpacity")?Ae({color:i,property:"color",variable:"--tw-text-opacity"}):{color:X(i)}},{values:xe(e("textColor")),type:["color","any"]})},textOpacity:L("textOpacity",[["text-opacity",["--tw-text-opacity"]]]),textDecoration:({addUtilities:r})=>{r({".underline":{"text-decoration-line":"underline"},".overline":{"text-decoration-line":"overline"},".line-through":{"text-decoration-line":"line-through"},".no-underline":{"text-decoration-line":"none"}})},textDecorationColor:({matchUtilities:r,theme:e})=>{r({decoration:t=>({"text-decoration-color":X(t)})},{values:xe(e("textDecorationColor")),type:["color","any"]})},textDecorationStyle:({addUtilities:r})=>{r({".decoration-solid":{"text-decoration-style":"solid"},".decoration-double":{"text-decoration-style":"double"},".decoration-dotted":{"text-decoration-style":"dotted"},".decoration-dashed":{"text-decoration-style":"dashed"},".decoration-wavy":{"text-decoration-style":"wavy"}})},textDecorationThickness:L("textDecorationThickness",[["decoration",["text-decoration-thickness"]]],{type:["length","percentage"]}),textUnderlineOffset:L("textUnderlineOffset",[["underline-offset",["text-underline-offset"]]],{type:["length","percentage","any"]}),fontSmoothing:({addUtilities:r})=>{r({".antialiased":{"-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale"},".subpixel-antialiased":{"-webkit-font-smoothing":"auto","-moz-osx-font-smoothing":"auto"}})},placeholderColor:({matchUtilities:r,theme:e,corePlugins:t})=>{r({placeholder:i=>t("placeholderOpacity")?{"&::placeholder":Ae({color:i,property:"color",variable:"--tw-placeholder-opacity"})}:{"&::placeholder":{color:X(i)}}},{values:xe(e("placeholderColor")),type:["color","any"]})},placeholderOpacity:({matchUtilities:r,theme:e})=>{r({"placeholder-opacity":t=>({["&::placeholder"]:{"--tw-placeholder-opacity":t}})},{values:e("placeholderOpacity")})},caretColor:({matchUtilities:r,theme:e})=>{r({caret:t=>({"caret-color":X(t)})},{values:xe(e("caretColor")),type:["color","any"]})},accentColor:({matchUtilities:r,theme:e})=>{r({accent:t=>({"accent-color":X(t)})},{values:xe(e("accentColor")),type:["color","any"]})},opacity:L("opacity",[["opacity",["opacity"]]]),backgroundBlendMode:({addUtilities:r})=>{r({".bg-blend-normal":{"background-blend-mode":"normal"},".bg-blend-multiply":{"background-blend-mode":"multiply"},".bg-blend-screen":{"background-blend-mode":"screen"},".bg-blend-overlay":{"background-blend-mode":"overlay"},".bg-blend-darken":{"background-blend-mode":"darken"},".bg-blend-lighten":{"background-blend-mode":"lighten"},".bg-blend-color-dodge":{"background-blend-mode":"color-dodge"},".bg-blend-color-burn":{"background-blend-mode":"color-burn"},".bg-blend-hard-light":{"background-blend-mode":"hard-light"},".bg-blend-soft-light":{"background-blend-mode":"soft-light"},".bg-blend-difference":{"background-blend-mode":"difference"},".bg-blend-exclusion":{"background-blend-mode":"exclusion"},".bg-blend-hue":{"background-blend-mode":"hue"},".bg-blend-saturation":{"background-blend-mode":"saturation"},".bg-blend-color":{"background-blend-mode":"color"},".bg-blend-luminosity":{"background-blend-mode":"luminosity"}})},mixBlendMode:({addUtilities:r})=>{r({".mix-blend-normal":{"mix-blend-mode":"normal"},".mix-blend-multiply":{"mix-blend-mode":"multiply"},".mix-blend-screen":{"mix-blend-mode":"screen"},".mix-blend-overlay":{"mix-blend-mode":"overlay"},".mix-blend-darken":{"mix-blend-mode":"darken"},".mix-blend-lighten":{"mix-blend-mode":"lighten"},".mix-blend-color-dodge":{"mix-blend-mode":"color-dodge"},".mix-blend-color-burn":{"mix-blend-mode":"color-burn"},".mix-blend-hard-light":{"mix-blend-mode":"hard-light"},".mix-blend-soft-light":{"mix-blend-mode":"soft-light"},".mix-blend-difference":{"mix-blend-mode":"difference"},".mix-blend-exclusion":{"mix-blend-mode":"exclusion"},".mix-blend-hue":{"mix-blend-mode":"hue"},".mix-blend-saturation":{"mix-blend-mode":"saturation"},".mix-blend-color":{"mix-blend-mode":"color"},".mix-blend-luminosity":{"mix-blend-mode":"luminosity"},".mix-blend-plus-darker":{"mix-blend-mode":"plus-darker"},".mix-blend-plus-lighter":{"mix-blend-mode":"plus-lighter"}})},boxShadow:(()=>{let r=mt("boxShadow"),e=["var(--tw-ring-offset-shadow, 0 0 #0000)","var(--tw-ring-shadow, 0 0 #0000)","var(--tw-shadow)"].join(", ");return function({matchUtilities:t,addDefaults:i,theme:n}){i("box-shadow",{"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000"}),t({shadow:s=>{s=r(s);let a=en(s);for(let o of a)!o.valid||(o.color="var(--tw-shadow-color)");return{"@defaults box-shadow":{},"--tw-shadow":s==="none"?"0 0 #0000":s,"--tw-shadow-colored":s==="none"?"0 0 #0000":Lf(a),"box-shadow":e}}},{values:n("boxShadow"),type:["shadow"]})}})(),boxShadowColor:({matchUtilities:r,theme:e})=>{r({shadow:t=>({"--tw-shadow-color":X(t),"--tw-shadow":"var(--tw-shadow-colored)"})},{values:xe(e("boxShadowColor")),type:["color","any"]})},outlineStyle:({addUtilities:r})=>{r({".outline-none":{outline:"2px solid transparent","outline-offset":"2px"},".outline":{"outline-style":"solid"},".outline-dashed":{"outline-style":"dashed"},".outline-dotted":{"outline-style":"dotted"},".outline-double":{"outline-style":"double"}})},outlineWidth:L("outlineWidth",[["outline",["outline-width"]]],{type:["length","number","percentage"]}),outlineOffset:L("outlineOffset",[["outline-offset",["outline-offset"]]],{type:["length","number","percentage","any"],supportsNegativeValues:!0}),outlineColor:({matchUtilities:r,theme:e})=>{r({outline:t=>({"outline-color":X(t)})},{values:xe(e("outlineColor")),type:["color","any"]})},ringWidth:({matchUtilities:r,addDefaults:e,addUtilities:t,theme:i,config:n})=>{let s=(()=>{if(we(n(),"respectDefaultRingColorOpacity"))return i("ringColor.DEFAULT");let a=i("ringOpacity.DEFAULT","0.5");return i("ringColor")?.DEFAULT?Je(i("ringColor")?.DEFAULT,a,`rgb(147 197 253 / ${a})`):`rgb(147 197 253 / ${a})`})();e("ring-width",{"--tw-ring-inset":" ","--tw-ring-offset-width":i("ringOffsetWidth.DEFAULT","0px"),"--tw-ring-offset-color":i("ringOffsetColor.DEFAULT","#fff"),"--tw-ring-color":s,"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000"}),r({ring:a=>({"@defaults ring-width":{},"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${a} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,"box-shadow":["var(--tw-ring-offset-shadow)","var(--tw-ring-shadow)","var(--tw-shadow, 0 0 #0000)"].join(", ")})},{values:i("ringWidth"),type:"length"}),t({".ring-inset":{"@defaults ring-width":{},"--tw-ring-inset":"inset"}})},ringColor:({matchUtilities:r,theme:e,corePlugins:t})=>{r({ring:i=>t("ringOpacity")?Ae({color:i,property:"--tw-ring-color",variable:"--tw-ring-opacity"}):{"--tw-ring-color":X(i)}},{values:Object.fromEntries(Object.entries(xe(e("ringColor"))).filter(([i])=>i!=="DEFAULT")),type:["color","any"]})},ringOpacity:r=>{let{config:e}=r;return L("ringOpacity",[["ring-opacity",["--tw-ring-opacity"]]],{filterDefault:!we(e(),"respectDefaultRingColorOpacity")})(r)},ringOffsetWidth:L("ringOffsetWidth",[["ring-offset",["--tw-ring-offset-width"]]],{type:"length"}),ringOffsetColor:({matchUtilities:r,theme:e})=>{r({"ring-offset":t=>({"--tw-ring-offset-color":X(t)})},{values:xe(e("ringOffsetColor")),type:["color","any"]})},blur:({matchUtilities:r,theme:e})=>{r({blur:t=>({"--tw-blur":t.trim()===""?" ":`blur(${t})`,"@defaults filter":{},filter:nt})},{values:e("blur")})},brightness:({matchUtilities:r,theme:e})=>{r({brightness:t=>({"--tw-brightness":`brightness(${t})`,"@defaults filter":{},filter:nt})},{values:e("brightness")})},contrast:({matchUtilities:r,theme:e})=>{r({contrast:t=>({"--tw-contrast":`contrast(${t})`,"@defaults filter":{},filter:nt})},{values:e("contrast")})},dropShadow:({matchUtilities:r,theme:e})=>{r({"drop-shadow":t=>({"--tw-drop-shadow":Array.isArray(t)?t.map(i=>`drop-shadow(${i})`).join(" "):`drop-shadow(${t})`,"@defaults filter":{},filter:nt})},{values:e("dropShadow")})},grayscale:({matchUtilities:r,theme:e})=>{r({grayscale:t=>({"--tw-grayscale":`grayscale(${t})`,"@defaults filter":{},filter:nt})},{values:e("grayscale")})},hueRotate:({matchUtilities:r,theme:e})=>{r({"hue-rotate":t=>({"--tw-hue-rotate":`hue-rotate(${t})`,"@defaults filter":{},filter:nt})},{values:e("hueRotate"),supportsNegativeValues:!0})},invert:({matchUtilities:r,theme:e})=>{r({invert:t=>({"--tw-invert":`invert(${t})`,"@defaults filter":{},filter:nt})},{values:e("invert")})},saturate:({matchUtilities:r,theme:e})=>{r({saturate:t=>({"--tw-saturate":`saturate(${t})`,"@defaults filter":{},filter:nt})},{values:e("saturate")})},sepia:({matchUtilities:r,theme:e})=>{r({sepia:t=>({"--tw-sepia":`sepia(${t})`,"@defaults filter":{},filter:nt})},{values:e("sepia")})},filter:({addDefaults:r,addUtilities:e})=>{r("filter",{"--tw-blur":" ","--tw-brightness":" ","--tw-contrast":" ","--tw-grayscale":" ","--tw-hue-rotate":" ","--tw-invert":" ","--tw-saturate":" ","--tw-sepia":" ","--tw-drop-shadow":" "}),e({".filter":{"@defaults filter":{},filter:nt},".filter-none":{filter:"none"}})},backdropBlur:({matchUtilities:r,theme:e})=>{r({"backdrop-blur":t=>({"--tw-backdrop-blur":t.trim()===""?" ":`blur(${t})`,"@defaults backdrop-filter":{},"-webkit-backdrop-filter":ge,"backdrop-filter":ge})},{values:e("backdropBlur")})},backdropBrightness:({matchUtilities:r,theme:e})=>{r({"backdrop-brightness":t=>({"--tw-backdrop-brightness":`brightness(${t})`,"@defaults backdrop-filter":{},"-webkit-backdrop-filter":ge,"backdrop-filter":ge})},{values:e("backdropBrightness")})},backdropContrast:({matchUtilities:r,theme:e})=>{r({"backdrop-contrast":t=>({"--tw-backdrop-contrast":`contrast(${t})`,"@defaults backdrop-filter":{},"-webkit-backdrop-filter":ge,"backdrop-filter":ge})},{values:e("backdropContrast")})},backdropGrayscale:({matchUtilities:r,theme:e})=>{r({"backdrop-grayscale":t=>({"--tw-backdrop-grayscale":`grayscale(${t})`,"@defaults backdrop-filter":{},"-webkit-backdrop-filter":ge,"backdrop-filter":ge})},{values:e("backdropGrayscale")})},backdropHueRotate:({matchUtilities:r,theme:e})=>{r({"backdrop-hue-rotate":t=>({"--tw-backdrop-hue-rotate":`hue-rotate(${t})`,"@defaults backdrop-filter":{},"-webkit-backdrop-filter":ge,"backdrop-filter":ge})},{values:e("backdropHueRotate"),supportsNegativeValues:!0})},backdropInvert:({matchUtilities:r,theme:e})=>{r({"backdrop-invert":t=>({"--tw-backdrop-invert":`invert(${t})`,"@defaults backdrop-filter":{},"-webkit-backdrop-filter":ge,"backdrop-filter":ge})},{values:e("backdropInvert")})},backdropOpacity:({matchUtilities:r,theme:e})=>{r({"backdrop-opacity":t=>({"--tw-backdrop-opacity":`opacity(${t})`,"@defaults backdrop-filter":{},"-webkit-backdrop-filter":ge,"backdrop-filter":ge})},{values:e("backdropOpacity")})},backdropSaturate:({matchUtilities:r,theme:e})=>{r({"backdrop-saturate":t=>({"--tw-backdrop-saturate":`saturate(${t})`,"@defaults backdrop-filter":{},"-webkit-backdrop-filter":ge,"backdrop-filter":ge})},{values:e("backdropSaturate")})},backdropSepia:({matchUtilities:r,theme:e})=>{r({"backdrop-sepia":t=>({"--tw-backdrop-sepia":`sepia(${t})`,"@defaults backdrop-filter":{},"-webkit-backdrop-filter":ge,"backdrop-filter":ge})},{values:e("backdropSepia")})},backdropFilter:({addDefaults:r,addUtilities:e})=>{r("backdrop-filter",{"--tw-backdrop-blur":" ","--tw-backdrop-brightness":" ","--tw-backdrop-contrast":" ","--tw-backdrop-grayscale":" ","--tw-backdrop-hue-rotate":" ","--tw-backdrop-invert":" ","--tw-backdrop-opacity":" ","--tw-backdrop-saturate":" ","--tw-backdrop-sepia":" "}),e({".backdrop-filter":{"@defaults backdrop-filter":{},"-webkit-backdrop-filter":ge,"backdrop-filter":ge},".backdrop-filter-none":{"-webkit-backdrop-filter":"none","backdrop-filter":"none"}})},transitionProperty:({matchUtilities:r,theme:e})=>{let t=e("transitionTimingFunction.DEFAULT"),i=e("transitionDuration.DEFAULT");r({transition:n=>({"transition-property":n,...n==="none"?{}:{"transition-timing-function":t,"transition-duration":i}})},{values:e("transitionProperty")})},transitionDelay:L("transitionDelay",[["delay",["transitionDelay"]]]),transitionDuration:L("transitionDuration",[["duration",["transitionDuration"]]],{filterDefault:!0}),transitionTimingFunction:L("transitionTimingFunction",[["ease",["transitionTimingFunction"]]],{filterDefault:!0}),willChange:L("willChange",[["will-change",["will-change"]]]),contain:({addDefaults:r,addUtilities:e})=>{let t="var(--tw-contain-size) var(--tw-contain-layout) var(--tw-contain-paint) var(--tw-contain-style)";r("contain",{"--tw-contain-size":" ","--tw-contain-layout":" ","--tw-contain-paint":" ","--tw-contain-style":" "}),e({".contain-none":{contain:"none"},".contain-content":{contain:"content"},".contain-strict":{contain:"strict"},".contain-size":{"@defaults contain":{},"--tw-contain-size":"size",contain:t},".contain-inline-size":{"@defaults contain":{},"--tw-contain-size":"inline-size",contain:t},".contain-layout":{"@defaults contain":{},"--tw-contain-layout":"layout",contain:t},".contain-paint":{"@defaults contain":{},"--tw-contain-paint":"paint",contain:t},".contain-style":{"@defaults contain":{},"--tw-contain-style":"style",contain:t}})},content:L("content",[["content",["--tw-content",["content","var(--tw-content)"]]]]),forcedColorAdjust:({addUtilities:r})=>{r({".forced-color-adjust-auto":{"forced-color-adjust":"auto"},".forced-color-adjust-none":{"forced-color-adjust":"none"}})}}});function h_(r){if(r===void 0)return!1;if(r==="true"||r==="1")return!0;if(r==="false"||r==="0")return!1;if(r==="*")return!0;let e=r.split(",").map(t=>t.split(":")[0]);return e.includes("-tailwindcss")?!1:!!e.includes("tailwindcss")}var Ze,wh,vh,es,No,gt,Ti,It=P(()=>{u();Ze=typeof m!="undefined"?{NODE_ENV:"production",DEBUG:h_(m.env.DEBUG)}:{NODE_ENV:"production",DEBUG:!1},wh=new Map,vh=new Map,es=new Map,No=new Map,gt=new String("*"),Ti=Symbol("__NONE__")});function cr(r){let e=[],t=!1;for(let i=0;i<r.length;i++){let n=r[i];if(n===":"&&!t&&e.length===0)return!1;if(m_.has(n)&&r[i-1]!=="\\"&&(t=!t),!t&&r[i-1]!=="\\"){if(xh.has(n))e.push(n);else if(kh.has(n)){let s=kh.get(n);if(e.length<=0||e.pop()!==s)return!1}}}return!(e.length>0)}var xh,kh,m_,Bo=P(()=>{u();xh=new Map([["{","}"],["[","]"],["(",")"]]),kh=new Map(Array.from(xh.entries()).map(([r,e])=>[e,r])),m_=new Set(['"',"'","`"])});function pr(r){let[e]=Sh(r);return e.forEach(([t,i])=>t.removeChild(i)),r.nodes.push(...e.map(([,t])=>t)),r}function Sh(r){let e=[],t=null;for(let i of r.nodes)if(i.type==="combinator")e=e.filter(([,n])=>jo(n).includes("jumpable")),t=null;else if(i.type==="pseudo"){g_(i)?(t=i,e.push([r,i,null])):t&&y_(i,t)?e.push([r,i,t]):t=null;for(let n of i.nodes??[]){let[s,a]=Sh(n);t=a||t,e.push(...s)}}return[e,t]}function Ah(r){return r.value.startsWith("::")||Fo[r.value]!==void 0}function g_(r){return Ah(r)&&jo(r).includes("terminal")}function y_(r,e){return r.type!=="pseudo"||Ah(r)?!1:jo(e).includes("actionable")}function jo(r){return Fo[r.value]??Fo.__default__}var Fo,ts=P(()=>{u();Fo={"::after":["terminal","jumpable"],"::backdrop":["terminal","jumpable"],"::before":["terminal","jumpable"],"::cue":["terminal"],"::cue-region":["terminal"],"::first-letter":["terminal","jumpable"],"::first-line":["terminal","jumpable"],"::grammar-error":["terminal"],"::marker":["terminal","jumpable"],"::part":["terminal","actionable"],"::placeholder":["terminal","jumpable"],"::selection":["terminal","jumpable"],"::slotted":["terminal"],"::spelling-error":["terminal"],"::target-text":["terminal"],"::file-selector-button":["terminal","actionable"],"::deep":["actionable"],"::v-deep":["actionable"],"::ng-deep":["actionable"],":after":["terminal","jumpable"],":before":["terminal","jumpable"],":first-letter":["terminal","jumpable"],":first-line":["terminal","jumpable"],":where":[],":is":[],":has":[],__default__:["terminal","actionable"]}});function dr(r,{context:e,candidate:t}){let i=e?.tailwindConfig.prefix??"",n=r.map(a=>{let o=(0,st.default)().astSync(a.format);return{...a,ast:a.respectPrefix?ur(i,o):o}}),s=st.default.root({nodes:[st.default.selector({nodes:[st.default.className({value:Te(t)})]})]});for(let{ast:a}of n)[s,a]=w_(s,a),a.walkNesting(o=>o.replaceWith(...s.nodes[0].nodes)),s=a;return s}function _h(r){let e=[];for(;r.prev()&&r.prev().type!=="combinator";)r=r.prev();for(;r&&r.type!=="combinator";)e.push(r),r=r.next();return e}function b_(r){return r.sort((e,t)=>e.type==="tag"&&t.type==="class"?-1:e.type==="class"&&t.type==="tag"?1:e.type==="class"&&t.type==="pseudo"&&t.value.startsWith("::")?-1:e.type==="pseudo"&&e.value.startsWith("::")&&t.type==="class"?1:r.index(e)-r.index(t)),r}function Uo(r,e){let t=!1;r.walk(i=>{if(i.type==="class"&&i.value===e)return t=!0,!1}),t||r.remove()}function rs(r,e,{context:t,candidate:i,base:n}){let s=t?.tailwindConfig?.separator??":";n=n??ve(i,s).pop();let a=(0,st.default)().astSync(r);if(a.walkClasses(f=>{f.raws&&f.value.includes(n)&&(f.raws.value=Te((0,Ch.default)(f.raws.value)))}),a.each(f=>Uo(f,n)),a.length===0)return null;let o=Array.isArray(e)?dr(e,{context:t,candidate:i}):e;if(o===null)return a.toString();let l=st.default.comment({value:"/*__simple__*/"}),c=st.default.comment({value:"/*__simple__*/"});return a.walkClasses(f=>{if(f.value!==n)return;let d=f.parent,p=o.nodes[0].nodes;if(d.nodes.length===1){f.replaceWith(...p);return}let h=_h(f);d.insertBefore(h[0],l),d.insertAfter(h[h.length-1],c);for(let v of p)d.insertBefore(h[0],v.clone());f.remove(),h=_h(l);let b=d.index(l);d.nodes.splice(b,h.length,...b_(st.default.selector({nodes:h})).nodes),l.remove(),c.remove()}),a.walkPseudos(f=>{f.value===zo&&f.replaceWith(f.nodes)}),a.each(f=>pr(f)),a.toString()}function w_(r,e){let t=[];return r.walkPseudos(i=>{i.value===zo&&t.push({pseudo:i,value:i.nodes[0].toString()})}),e.walkPseudos(i=>{if(i.value!==zo)return;let n=i.nodes[0].toString(),s=t.find(c=>c.value===n);if(!s)return;let a=[],o=i.next();for(;o&&o.type!=="combinator";)a.push(o),o=o.next();let l=o;s.pseudo.parent.insertAfter(s.pseudo,st.default.selector({nodes:a.map(c=>c.clone())})),i.remove(),a.forEach(c=>c.remove()),l&&l.type==="combinator"&&l.remove()}),[r,e]}var st,Ch,zo,Vo=P(()=>{u();st=pe(it()),Ch=pe(Pn());fr();Gn();ts();zt();zo=":merge"});function is(r,e){let t=(0,Ho.default)().astSync(r);return t.each(i=>{i.nodes.some(s=>s.type==="combinator")&&(i.nodes=[Ho.default.pseudo({value:":is",nodes:[i.clone()]})]),pr(i)}),`${e} ${t.toString()}`}var Ho,Wo=P(()=>{u();Ho=pe(it());ts()});function Go(r){return v_.transformSync(r)}function*x_(r){let e=1/0;for(;e>=0;){let t,i=!1;if(e===1/0&&r.endsWith("]")){let a=r.indexOf("[");r[a-1]==="-"?t=a-1:r[a-1]==="/"?(t=a-1,i=!0):t=-1}else e===1/0&&r.includes("/")?(t=r.lastIndexOf("/"),i=!0):t=r.lastIndexOf("-",e);if(t<0)break;let n=r.slice(0,t),s=r.slice(i?t:t+1);e=t-1,!(n===""||s==="/")&&(yield[n,s])}}function k_(r,e){if(r.length===0||e.tailwindConfig.prefix==="")return r;for(let t of r){let[i]=t;if(i.options.respectPrefix){let n=ee.root({nodes:[t[1].clone()]}),s=t[1].raws.tailwind.classCandidate;n.walkRules(a=>{let o=s.startsWith("-");a.selector=ur(e.tailwindConfig.prefix,a.selector,o)}),t[1]=n.nodes[0]}}return r}function S_(r,e){if(r.length===0)return r;let t=[];function i(n){return n.parent&&n.parent.type==="atrule"&&n.parent.name==="keyframes"}for(let[n,s]of r){let a=ee.root({nodes:[s.clone()]});a.walkRules(o=>{if(i(o))return;let l=(0,ns.default)().astSync(o.selector);l.each(c=>Uo(c,e)),Qf(l,c=>c===e?`!${c}`:c),o.selector=l.toString(),o.walkDecls(c=>c.important=!0)}),t.push([{...n,important:!0},a.nodes[0]])}return t}function A_(r,e,t){if(e.length===0)return e;let i={modifier:null,value:Ti};{let[n,...s]=ve(r,"/");if(s.length>1&&(n=n+"/"+s.slice(0,-1).join("/"),s=s.slice(-1)),s.length&&!t.variantMap.has(r)&&(r=n,i.modifier=s[0],!we(t.tailwindConfig,"generalizedModifiers")))return[]}if(r.endsWith("]")&&!r.startsWith("[")){let n=/(.)(-?)\[(.*)\]/g.exec(r);if(n){let[,s,a,o]=n;if(s==="@"&&a==="-")return[];if(s!=="@"&&a==="")return[];r=r.replace(`${a}[${o}]`,""),i.value=o}}if(Ko(r)&&!t.variantMap.has(r)){let n=t.offsets.recordVariant(r),s=K(r.slice(1,-1)),a=ve(s,",");if(a.length>1)return[];if(!a.every(ls))return[];let o=a.map((l,c)=>[t.offsets.applyParallelOffset(n,c),Ri(l.trim())]);t.variantMap.set(r,o)}if(t.variantMap.has(r)){let n=Ko(r),s=t.variantOptions.get(r)?.[Pt]??{},a=t.variantMap.get(r).slice(),o=[],l=(()=>!(n||s.respectPrefix===!1))();for(let[c,f]of e){if(c.layer==="user")continue;let d=ee.root({nodes:[f.clone()]});for(let[p,h,b]of a){let w=function(){v.raws.neededBackup||(v.raws.neededBackup=!0,v.walkRules(T=>T.raws.originalSelector=T.selector))},k=function(T){return w(),v.each(B=>{B.type==="rule"&&(B.selectors=B.selectors.map(N=>T({get className(){return Go(N)},selector:N})))}),v},v=(b??d).clone(),y=[],S=h({get container(){return w(),v},separator:t.tailwindConfig.separator,modifySelectors:k,wrap(T){let B=v.nodes;v.removeAll(),T.append(B),v.append(T)},format(T){y.push({format:T,respectPrefix:l})},args:i});if(Array.isArray(S)){for(let[T,B]of S.entries())a.push([t.offsets.applyParallelOffset(p,T),B,v.clone()]);continue}if(typeof S=="string"&&y.push({format:S,respectPrefix:l}),S===null)continue;v.raws.neededBackup&&(delete v.raws.neededBackup,v.walkRules(T=>{let B=T.raws.originalSelector;if(!B||(delete T.raws.originalSelector,B===T.selector))return;let N=T.selector,R=(0,ns.default)(F=>{F.walkClasses(Y=>{Y.value=`${r}${t.tailwindConfig.separator}${Y.value}`})}).processSync(B);y.push({format:N.replace(R,"&"),respectPrefix:l}),T.selector=B})),v.nodes[0].raws.tailwind={...v.nodes[0].raws.tailwind,parentLayer:c.layer};let E=[{...c,sort:t.offsets.applyVariantOffset(c.sort,p,Object.assign(i,t.variantOptions.get(r))),collectedFormats:(c.collectedFormats??[]).concat(y)},v.nodes[0]];o.push(E)}}return o}return[]}function Qo(r,e,t={}){return!ke(r)&&!Array.isArray(r)?[[r],t]:Array.isArray(r)?Qo(r[0],e,r[1]):(e.has(r)||e.set(r,lr(r)),[e.get(r),t])}function __(r){return C_.test(r)}function E_(r){if(!r.includes("://"))return!1;try{let e=new URL(r);return e.scheme!==""&&e.host!==""}catch(e){return!1}}function Eh(r){let e=!0;return r.walkDecls(t=>{if(!Oh(t.prop,t.value))return e=!1,!1}),e}function Oh(r,e){if(E_(`${r}:${e}`))return!1;try{return ee.parse(`a{${r}:${e}}`).toResult(),!0}catch(t){return!1}}function O_(r,e){let[,t,i]=r.match(/^\[([a-zA-Z0-9-_]+):(\S+)\]$/)??[];if(i===void 0||!__(t)||!cr(i))return null;let n=K(i,{property:t});return Oh(t,n)?[[{sort:e.offsets.arbitraryProperty(r),layer:"utilities",options:{respectImportant:!0}},()=>({[$o(r)]:{[t]:n}})]]:null}function*T_(r,e){e.candidateRuleMap.has(r)&&(yield[e.candidateRuleMap.get(r),"DEFAULT"]),yield*function*(o){o!==null&&(yield[o,"DEFAULT"])}(O_(r,e));let t=r,i=!1,n=e.tailwindConfig.prefix,s=n.length,a=t.startsWith(n)||t.startsWith(`-${n}`);t[s]==="-"&&a&&(i=!0,t=n+t.slice(s+1)),i&&e.candidateRuleMap.has(t)&&(yield[e.candidateRuleMap.get(t),"-DEFAULT"]);for(let[o,l]of x_(t))e.candidateRuleMap.has(o)&&(yield[e.candidateRuleMap.get(o),i?`-${l}`:l])}function R_(r,e){return r===gt?[gt]:ve(r,e)}function*P_(r,e){for(let t of r)t[1].raws.tailwind={...t[1].raws.tailwind,classCandidate:e,preserveSource:t[0].options?.preserveSource??!1},yield t}function*Yo(r,e){let t=e.tailwindConfig.separator,[i,...n]=R_(r,t).reverse(),s=!1;i.startsWith("!")&&(s=!0,i=i.slice(1));for(let a of T_(i,e)){let o=[],l=new Map,[c,f]=a,d=c.length===1;for(let[p,h]of c){let b=[];if(typeof h=="function")for(let v of[].concat(h(f,{isOnlyPlugin:d}))){let[y,w]=Qo(v,e.postCssNodeCache);for(let k of y)b.push([{...p,options:{...p.options,...w}},k])}else if(f==="DEFAULT"||f==="-DEFAULT"){let v=h,[y,w]=Qo(v,e.postCssNodeCache);for(let k of y)b.push([{...p,options:{...p.options,...w}},k])}if(b.length>0){let v=Array.from(ta(p.options?.types??[],f,p.options??{},e.tailwindConfig)).map(([y,w])=>w);v.length>0&&l.set(b,v),o.push(b)}}if(Ko(f)){if(o.length>1){let b=function(y){return y.length===1?y[0]:y.find(w=>{let k=l.get(w);return w.some(([{options:S},E])=>Eh(E)?S.types.some(({type:T,preferOnConflict:B})=>k.includes(T)&&B):!1)})},[p,h]=o.reduce((y,w)=>(w.some(([{options:S}])=>S.types.some(({type:E})=>E==="any"))?y[0].push(w):y[1].push(w),y),[[],[]]),v=b(h)??b(p);if(v)o=[v];else{let y=o.map(k=>new Set([...l.get(k)??[]]));for(let k of y)for(let S of k){let E=!1;for(let T of y)k!==T&&T.has(S)&&(T.delete(S),E=!0);E&&k.delete(S)}let w=[];for(let[k,S]of y.entries())for(let E of S){let T=o[k].map(([,B])=>B).flat().map(B=>B.toString().split(`-`).slice(1,-1).map(N=>N.trim()).map(N=>` ${N}`).join(`-`)).join(`--`);w.push(` Use \`${r.replace("[",`[${E}:`)}\` for \`${T.trim()}\``);break}G.warn([`The class \`${r}\` is ambiguous and matches multiple utilities.`,...w,`If this is content and not a class, replace it with \`${r.replace("[","[").replace("]","]")}\` to silence this warning.`]);continue}}o=o.map(p=>p.filter(h=>Eh(h[1])))}o=o.flat(),o=Array.from(P_(o,i)),o=k_(o,e),s&&(o=S_(o,i));for(let p of n)o=A_(p,o,e);for(let p of o)p[1].raws.tailwind={...p[1].raws.tailwind,candidate:r},p=I_(p,{context:e,candidate:r}),p!==null&&(yield p)}}function I_(r,{context:e,candidate:t}){if(!r[0].collectedFormats)return r;let i=!0,n;try{n=dr(r[0].collectedFormats,{context:e,candidate:t})}catch{return null}let s=ee.root({nodes:[r[1].clone()]});return s.walkRules(a=>{if(!ss(a))try{let o=rs(a.selector,n,{candidate:t,context:e});if(o===null){a.remove();return}a.selector=o}catch{return i=!1,!1}}),!i||s.nodes.length===0?null:(r[1]=s.nodes[0],r)}function ss(r){return r.parent&&r.parent.type==="atrule"&&r.parent.name==="keyframes"}function D_(r){if(r===!0)return e=>{ss(e)||e.walkDecls(t=>{t.parent.type==="rule"&&!ss(t.parent)&&(t.important=!0)})};if(typeof r=="string")return e=>{ss(e)||(e.selectors=e.selectors.map(t=>is(t,r)))}}function as(r,e,t=!1){let i=[],n=D_(e.tailwindConfig.important);for(let s of r){if(e.notClassCache.has(s))continue;if(e.candidateRuleCache.has(s)){i=i.concat(Array.from(e.candidateRuleCache.get(s)));continue}let a=Array.from(Yo(s,e));if(a.length===0){e.notClassCache.add(s);continue}e.classCache.set(s,a);let o=e.candidateRuleCache.get(s)??new Set;e.candidateRuleCache.set(s,o);for(let l of a){let[{sort:c,options:f},d]=l;if(f.respectImportant&&n){let h=ee.root({nodes:[d.clone()]});h.walkRules(n),d=h.nodes[0]}let p=[c,t?d.clone():d];o.add(p),e.ruleCache.add(p),i.push(p)}}return i}function Ko(r){return r.startsWith("[")&&r.endsWith("]")}var ns,v_,C_,os=P(()=>{u();Ot();ns=pe(it());qo();Kt();Gn();Fr();Be();It();Vo();Lo();Br();Oi();Bo();zt();ct();Wo();v_=(0,ns.default)(r=>r.first.filter(({type:e})=>e==="class").pop().value);C_=/^[a-z_-]/});var Th,Rh=P(()=>{u();Th={}});function q_(r){try{return Th.createHash("md5").update(r,"utf-8").digest("binary")}catch(e){return""}}function Ph(r,e){let t=e.toString();if(!t.includes("@tailwind"))return!1;let i=No.get(r),n=q_(t),s=i!==n;return No.set(r,n),s}var Ih=P(()=>{u();Rh();It()});function us(r){return(r>0n)-(r<0n)}var Dh=P(()=>{u()});function qh(r,e){let t=0n,i=0n;for(let[n,s]of e)r&n&&(t=t|n,i=i|s);return r&~t|i}var $h=P(()=>{u()});function Lh(r){let e=null;for(let t of r)e=e??t,e=e>t?e:t;return e}function $_(r,e){let t=r.length,i=e.length,n=t<i?t:i;for(let s=0;s<n;s++){let a=r.charCodeAt(s)-e.charCodeAt(s);if(a!==0)return a}return t-i}var Xo,Mh=P(()=>{u();Dh();$h();Xo=class{constructor(){this.offsets={defaults:0n,base:0n,components:0n,utilities:0n,variants:0n,user:0n},this.layerPositions={defaults:0n,base:1n,components:2n,utilities:3n,user:4n,variants:5n},this.reservedVariantBits=0n,this.variantOffsets=new Map}create(e){return{layer:e,parentLayer:e,arbitrary:0n,variants:0n,parallelIndex:0n,index:this.offsets[e]++,propertyOffset:0n,property:"",options:[]}}arbitraryProperty(e){return{...this.create("utilities"),arbitrary:1n,property:e}}forVariant(e,t=0){let i=this.variantOffsets.get(e);if(i===void 0)throw new Error(`Cannot find offset for unknown variant ${e}`);return{...this.create("variants"),variants:i<<BigInt(t)}}applyVariantOffset(e,t,i){return i.variant=t.variants,{...e,layer:"variants",parentLayer:e.layer==="variants"?e.parentLayer:e.layer,variants:e.variants|t.variants,options:i.sort?[].concat(i,e.options):e.options,parallelIndex:Lh([e.parallelIndex,t.parallelIndex])}}applyParallelOffset(e,t){return{...e,parallelIndex:BigInt(t)}}recordVariants(e,t){for(let i of e)this.recordVariant(i,t(i))}recordVariant(e,t=1){return this.variantOffsets.set(e,1n<<this.reservedVariantBits),this.reservedVariantBits+=BigInt(t),{...this.create("variants"),variants:this.variantOffsets.get(e)}}compare(e,t){if(e.layer!==t.layer)return this.layerPositions[e.layer]-this.layerPositions[t.layer];if(e.parentLayer!==t.parentLayer)return this.layerPositions[e.parentLayer]-this.layerPositions[t.parentLayer];for(let i of e.options)for(let n of t.options){if(i.id!==n.id||!i.sort||!n.sort)continue;let s=Lh([i.variant,n.variant])??0n,a=~(s|s-1n),o=e.variants&a,l=t.variants&a;if(o!==l)continue;let c=i.sort({value:i.value,modifier:i.modifier},{value:n.value,modifier:n.modifier});if(c!==0)return c}return e.variants!==t.variants?e.variants-t.variants:e.parallelIndex!==t.parallelIndex?e.parallelIndex-t.parallelIndex:e.arbitrary!==t.arbitrary?e.arbitrary-t.arbitrary:e.propertyOffset!==t.propertyOffset?e.propertyOffset-t.propertyOffset:e.index-t.index}recalculateVariantOffsets(){let e=Array.from(this.variantOffsets.entries()).filter(([n])=>n.startsWith("[")).sort(([n],[s])=>$_(n,s)),t=e.map(([,n])=>n).sort((n,s)=>us(n-s));return e.map(([,n],s)=>[n,t[s]]).filter(([n,s])=>n!==s)}remapArbitraryVariantOffsets(e){let t=this.recalculateVariantOffsets();return t.length===0?e:e.map(i=>{let[n,s]=i;return n={...n,variants:qh(n.variants,t)},[n,s]})}sortArbitraryProperties(e){let t=new Set;for(let[a]of e)a.arbitrary===1n&&t.add(a.property);if(t.size===0)return e;let i=Array.from(t).sort(),n=new Map,s=1n;for(let a of i)n.set(a,s++);return e.map(a=>{let[o,l]=a;return o={...o,propertyOffset:n.get(o.property)??0n},[o,l]})}sort(e){return e=this.remapArbitraryVariantOffsets(e),e=this.sortArbitraryProperties(e),e.sort(([t],[i])=>us(this.compare(t,i)))}}});function tl(r,e){let t=r.tailwindConfig.prefix;return typeof t=="function"?t(e):t+e}function Bh({type:r="any",...e}){let t=[].concat(r);return{...e,types:t.map(i=>Array.isArray(i)?{type:i[0],...i[1]}:{type:i,preferOnConflict:!1})}}function L_(r){let e=[],t="",i=0;for(let n=0;n<r.length;n++){let s=r[n];if(s==="\\")t+="\\"+r[++n];else if(s==="{")++i,e.push(t.trim()),t="";else if(s==="}"){if(--i<0)throw new Error("Your { and } are unbalanced.");e.push(t.trim()),t=""}else t+=s}return t.length>0&&e.push(t.trim()),e=e.filter(n=>n!==""),e}function M_(r,e,{before:t=[]}={}){if(t=[].concat(t),t.length<=0){r.push(e);return}let i=r.length-1;for(let n of t){let s=r.indexOf(n);s!==-1&&(i=Math.min(i,s))}r.splice(i,0,e)}function Fh(r){return Array.isArray(r)?r.flatMap(e=>!Array.isArray(e)&&!ke(e)?e:lr(e)):Fh([r])}function N_(r,e){return(0,Zo.default)(i=>{let n=[];return e&&e(i),i.walkClasses(s=>{n.push(s.value)}),n}).transformSync(r)}function B_(r){r.walkPseudos(e=>{e.value===":not"&&e.remove()})}function F_(r,e={containsNonOnDemandable:!1},t=0){let i=[],n=[];r.type==="rule"?n.push(...r.selectors):r.type==="atrule"&&r.walkRules(s=>n.push(...s.selectors));for(let s of n){let a=N_(s,B_);a.length===0&&(e.containsNonOnDemandable=!0);for(let o of a)i.push(o)}return t===0?[e.containsNonOnDemandable||i.length===0,i]:i}function fs(r){return Fh(r).flatMap(e=>{let t=new Map,[i,n]=F_(e);return i&&n.unshift(gt),n.map(s=>(t.has(e)||t.set(e,e),[s,t.get(e)]))})}function ls(r){return r.startsWith("@")||r.includes("&")}function Ri(r){r=r.replace(/\n+/g,"").replace(/\s{1,}/g," ").trim();let e=L_(r).map(t=>{if(!t.startsWith("@"))return({format:s})=>s(t);let[,i,n]=/@(\S*)( .+|[({].*)?/g.exec(t);return({wrap:s})=>s(ee.atRule({name:i,params:n?.trim()??""}))}).reverse();return t=>{for(let i of e)i(t)}}function j_(r,e,{variantList:t,variantMap:i,offsets:n,classList:s}){function a(p,h){return p?(0,Nh.default)(r,p,h):r}function o(p){return ur(r.prefix,p)}function l(p,h){return p===gt?gt:h.respectPrefix?e.tailwindConfig.prefix+p:p}function c(p,h,b={}){let v=kt(p),y=a(["theme",...v],h);return mt(v[0])(y,b)}let f=0,d={postcss:ee,prefix:o,e:Te,config:a,theme:c,corePlugins:p=>Array.isArray(r.corePlugins)?r.corePlugins.includes(p):a(["corePlugins",p],!0),variants:()=>[],addBase(p){for(let[h,b]of fs(p)){let v=l(h,{}),y=n.create("base");e.candidateRuleMap.has(v)||e.candidateRuleMap.set(v,[]),e.candidateRuleMap.get(v).push([{sort:y,layer:"base"},b])}},addDefaults(p,h){let b={[`@defaults ${p}`]:h};for(let[v,y]of fs(b)){let w=l(v,{});e.candidateRuleMap.has(w)||e.candidateRuleMap.set(w,[]),e.candidateRuleMap.get(w).push([{sort:n.create("defaults"),layer:"defaults"},y])}},addComponents(p,h){h=Object.assign({},{preserveSource:!1,respectPrefix:!0,respectImportant:!1},Array.isArray(h)?{}:h);for(let[v,y]of fs(p)){let w=l(v,h);s.add(w),e.candidateRuleMap.has(w)||e.candidateRuleMap.set(w,[]),e.candidateRuleMap.get(w).push([{sort:n.create("components"),layer:"components",options:h},y])}},addUtilities(p,h){h=Object.assign({},{preserveSource:!1,respectPrefix:!0,respectImportant:!0},Array.isArray(h)?{}:h);for(let[v,y]of fs(p)){let w=l(v,h);s.add(w),e.candidateRuleMap.has(w)||e.candidateRuleMap.set(w,[]),e.candidateRuleMap.get(w).push([{sort:n.create("utilities"),layer:"utilities",options:h},y])}},matchUtilities:function(p,h){h=Bh({...{respectPrefix:!0,respectImportant:!0,modifiers:!1},...h});let v=n.create("utilities");for(let y in p){let S=function(T,{isOnlyPlugin:B}){let[N,R,F]=ea(h.types,T,h,r);if(N===void 0)return[];if(!h.types.some(({type:U})=>U===R))if(B)G.warn([`Unnecessary typehint \`${R}\` in \`${y}-${T}\`.`,`You can safely update it to \`${y}-${T.replace(R+":","")}\`.`]);else return[];if(!cr(N))return[];let Y={get modifier(){return h.modifiers||G.warn(`modifier-used-without-options-for-${y}`,["Your plugin must set `modifiers: true` in its options to support modifiers."]),F}},_=we(r,"generalizedModifiers");return[].concat(_?k(N,Y):k(N)).filter(Boolean).map(U=>({[Qn(y,T)]:U}))},w=l(y,h),k=p[y];s.add([w,h]);let E=[{sort:v,layer:"utilities",options:h},S];e.candidateRuleMap.has(w)||e.candidateRuleMap.set(w,[]),e.candidateRuleMap.get(w).push(E)}},matchComponents:function(p,h){h=Bh({...{respectPrefix:!0,respectImportant:!1,modifiers:!1},...h});let v=n.create("components");for(let y in p){let S=function(T,{isOnlyPlugin:B}){let[N,R,F]=ea(h.types,T,h,r);if(N===void 0)return[];if(!h.types.some(({type:U})=>U===R))if(B)G.warn([`Unnecessary typehint \`${R}\` in \`${y}-${T}\`.`,`You can safely update it to \`${y}-${T.replace(R+":","")}\`.`]);else return[];if(!cr(N))return[];let Y={get modifier(){return h.modifiers||G.warn(`modifier-used-without-options-for-${y}`,["Your plugin must set `modifiers: true` in its options to support modifiers."]),F}},_=we(r,"generalizedModifiers");return[].concat(_?k(N,Y):k(N)).filter(Boolean).map(U=>({[Qn(y,T)]:U}))},w=l(y,h),k=p[y];s.add([w,h]);let E=[{sort:v,layer:"components",options:h},S];e.candidateRuleMap.has(w)||e.candidateRuleMap.set(w,[]),e.candidateRuleMap.get(w).push(E)}},addVariant(p,h,b={}){h=[].concat(h).map(v=>{if(typeof v!="string")return(y={})=>{let{args:w,modifySelectors:k,container:S,separator:E,wrap:T,format:B}=y,N=v(Object.assign({modifySelectors:k,container:S,separator:E},b.type===Jo.MatchVariant&&{args:w,wrap:T,format:B}));if(typeof N=="string"&&!ls(N))throw new Error(`Your custom variant \`${p}\` has an invalid format string. Make sure it's an at-rule or contains a \`&\` placeholder.`);return Array.isArray(N)?N.filter(R=>typeof R=="string").map(R=>Ri(R)):N&&typeof N=="string"&&Ri(N)(y)};if(!ls(v))throw new Error(`Your custom variant \`${p}\` has an invalid format string. Make sure it's an at-rule or contains a \`&\` placeholder.`);return Ri(v)}),M_(t,p,b),i.set(p,h),e.variantOptions.set(p,b)},matchVariant(p,h,b){let v=b?.id??++f,y=p==="@",w=we(r,"generalizedModifiers");for(let[S,E]of Object.entries(b?.values??{}))S!=="DEFAULT"&&d.addVariant(y?`${p}${S}`:`${p}-${S}`,({args:T,container:B})=>h(E,w?{modifier:T?.modifier,container:B}:{container:B}),{...b,value:E,id:v,type:Jo.MatchVariant,variantInfo:el.Base});let k="DEFAULT"in(b?.values??{});d.addVariant(p,({args:S,container:E})=>S?.value===Ti&&!k?null:h(S?.value===Ti?b.values.DEFAULT:S?.value??(typeof S=="string"?S:""),w?{modifier:S?.modifier,container:E}:{container:E}),{...b,id:v,type:Jo.MatchVariant,variantInfo:el.Dynamic})}};return d}function cs(r){return rl.has(r)||rl.set(r,new Map),rl.get(r)}function jh(r,e){let t=!1,i=new Map;for(let n of r){if(!n)continue;let s=oa.parse(n),a=s.hash?s.href.replace(s.hash,""):s.href;a=s.search?a.replace(s.search,""):a;let o=be.statSync(decodeURIComponent(a),{throwIfNoEntry:!1})?.mtimeMs;!o||((!e.has(n)||o>e.get(n))&&(t=!0),i.set(n,o))}return[t,i]}function zh(r){r.walkAtRules(e=>{["responsive","variants"].includes(e.name)&&(zh(e),e.before(e.nodes),e.remove())})}function z_(r){let e=[];return r.each(t=>{t.type==="atrule"&&["responsive","variants"].includes(t.name)&&(t.name="layer",t.params="utilities")}),r.walkAtRules("layer",t=>{if(zh(t),t.params==="base"){for(let i of t.nodes)e.push(function({addBase:n}){n(i,{respectPrefix:!1})});t.remove()}else if(t.params==="components"){for(let i of t.nodes)e.push(function({addComponents:n}){n(i,{respectPrefix:!1,preserveSource:!0})});t.remove()}else if(t.params==="utilities"){for(let i of t.nodes)e.push(function({addUtilities:n}){n(i,{respectPrefix:!1,preserveSource:!0})});t.remove()}}),e}function U_(r,e){let t=Object.entries({...se,...yh}).map(([l,c])=>r.tailwindConfig.corePlugins.includes(l)?c:null).filter(Boolean),i=r.tailwindConfig.plugins.map(l=>(l.__isOptionsFunction&&(l=l()),typeof l=="function"?l:l.handler)),n=z_(e),s=[se.childVariant,se.pseudoElementVariants,se.pseudoClassVariants,se.hasVariants,se.ariaVariants,se.dataVariants],a=[se.supportsVariants,se.reducedMotionVariants,se.prefersContrastVariants,se.screenVariants,se.orientationVariants,se.directionVariants,se.darkVariants,se.forcedColorsVariants,se.printVariant];return(r.tailwindConfig.darkMode==="class"||Array.isArray(r.tailwindConfig.darkMode)&&r.tailwindConfig.darkMode[0]==="class")&&(a=[se.supportsVariants,se.reducedMotionVariants,se.prefersContrastVariants,se.darkVariants,se.screenVariants,se.orientationVariants,se.directionVariants,se.forcedColorsVariants,se.printVariant]),[...t,...s,...i,...a,...n]}function V_(r,e){let t=[],i=new Map;e.variantMap=i;let n=new Xo;e.offsets=n;let s=new Set,a=j_(e.tailwindConfig,e,{variantList:t,variantMap:i,offsets:n,classList:s});for(let f of r)if(Array.isArray(f))for(let d of f)d(a);else f?.(a);n.recordVariants(t,f=>i.get(f).length);for(let[f,d]of i.entries())e.variantMap.set(f,d.map((p,h)=>[n.forVariant(f,h),p]));let o=(e.tailwindConfig.safelist??[]).filter(Boolean);if(o.length>0){let f=[];for(let d of o){if(typeof d=="string"){e.changedContent.push({content:d,extension:"html"});continue}if(d instanceof RegExp){G.warn("root-regex",["Regular expressions in `safelist` work differently in Tailwind CSS v3.0.","Update your `safelist` configuration to eliminate this warning.","https://tailwindcss.com/docs/content-configuration#safelisting-classes"]);continue}f.push(d)}if(f.length>0){let d=new Map,p=e.tailwindConfig.prefix.length,h=f.some(b=>b.pattern.source.includes("!"));for(let b of s){let v=Array.isArray(b)?(()=>{let[y,w]=b,S=Object.keys(w?.values??{}).map(E=>Ei(y,E));return w?.supportsNegativeValues&&(S=[...S,...S.map(E=>"-"+E)],S=[...S,...S.map(E=>E.slice(0,p)+"-"+E.slice(p))]),w.types.some(({type:E})=>E==="color")&&(S=[...S,...S.flatMap(E=>Object.keys(e.tailwindConfig.theme.opacity).map(T=>`${E}/${T}`))]),h&&w?.respectImportant&&(S=[...S,...S.map(E=>"!"+E)]),S})():[b];for(let y of v)for(let{pattern:w,variants:k=[]}of f)if(w.lastIndex=0,d.has(w)||d.set(w,0),!!w.test(y)){d.set(w,d.get(w)+1),e.changedContent.push({content:y,extension:"html"});for(let S of k)e.changedContent.push({content:S+e.tailwindConfig.separator+y,extension:"html"})}}for(let[b,v]of d.entries())v===0&&G.warn([`The safelist pattern \`${b}\` doesn't match any Tailwind CSS classes.`,"Fix this pattern or remove it from your `safelist` configuration.","https://tailwindcss.com/docs/content-configuration#safelisting-classes"])}}let l=[].concat(e.tailwindConfig.darkMode??"media")[1]??"dark",c=[tl(e,l),tl(e,"group"),tl(e,"peer")];e.getClassOrder=function(d){let p=[...d].sort((y,w)=>y===w?0:y<w?-1:1),h=new Map(p.map(y=>[y,null])),b=as(new Set(p),e,!0);b=e.offsets.sort(b);let v=BigInt(c.length);for(let[,y]of b){let w=y.raws.tailwind.candidate;h.set(w,h.get(w)??v++)}return d.map(y=>{let w=h.get(y)??null,k=c.indexOf(y);return w===null&&k!==-1&&(w=BigInt(k)),[y,w]})},e.getClassList=function(d={}){let p=[];for(let h of s)if(Array.isArray(h)){let[b,v]=h,y=[],w=Object.keys(v?.modifiers??{});v?.types?.some(({type:E})=>E==="color")&&w.push(...Object.keys(e.tailwindConfig.theme.opacity??{}));let k={modifiers:w},S=d.includeMetadata&&w.length>0;for(let[E,T]of Object.entries(v?.values??{})){if(T==null)continue;let B=Ei(b,E);if(p.push(S?[B,k]:B),v?.supportsNegativeValues&&xt(T)){let N=Ei(b,`-${E}`);y.push(S?[N,k]:N)}}p.push(...y)}else p.push(h);return p},e.getVariants=function(){let d=Math.random().toString(36).substring(7).toUpperCase(),p=[];for(let[h,b]of e.variantOptions.entries())b.variantInfo!==el.Base&&p.push({name:h,isArbitrary:b.type===Symbol.for("MATCH_VARIANT"),values:Object.keys(b.values??{}),hasDash:h!=="@",selectors({modifier:v,value:y}={}){let w=`TAILWINDPLACEHOLDER${d}`,k=ee.rule({selector:`.${w}`}),S=ee.root({nodes:[k.clone()]}),E=S.toString(),T=(e.variantMap.get(h)??[]).flatMap(([le,A])=>A),B=[];for(let le of T){let A=[],C={args:{modifier:v,value:b.values?.[y]??y},separator:e.tailwindConfig.separator,modifySelectors(V){return S.each(Ee=>{Ee.type==="rule"&&(Ee.selectors=Ee.selectors.map(Ie=>V({get className(){return Go(Ie)},selector:Ie})))}),S},format(V){A.push(V)},wrap(V){A.push(`@${V.name} ${V.params} { & }`)},container:S},he=le(C);if(A.length>0&&B.push(A),Array.isArray(he))for(let V of he)A=[],V(C),B.push(A)}let N=[],R=S.toString();E!==R&&(S.walkRules(le=>{let A=le.selector,C=(0,Zo.default)(he=>{he.walkClasses(V=>{V.value=`${h}${e.tailwindConfig.separator}${V.value}`})}).processSync(A);N.push(A.replace(C,"&").replace(w,"&"))}),S.walkAtRules(le=>{N.push(`@${le.name} (${le.params}) { & }`)}));let F=!(y in(b.values??{})),Y=b[Pt]??{},_=(()=>!(F||Y.respectPrefix===!1))();B=B.map(le=>le.map(A=>({format:A,respectPrefix:_}))),N=N.map(le=>({format:le,respectPrefix:_}));let Q={candidate:w,context:e},U=B.map(le=>rs(`.${w}`,dr(le,Q),Q).replace(`.${w}`,"&").replace("{ & }","").trim());return N.length>0&&U.push(dr(N,Q).toString().replace(`.${w}`,"&")),U}});return p}}function Uh(r,e){!r.classCache.has(e)||(r.notClassCache.add(e),r.classCache.delete(e),r.applyClassCache.delete(e),r.candidateRuleMap.delete(e),r.candidateRuleCache.delete(e),r.stylesheetCache=null)}function H_(r,e){let t=e.raws.tailwind.candidate;if(!!t){for(let i of r.ruleCache)i[1].raws.tailwind.candidate===t&&r.ruleCache.delete(i);Uh(r,t)}}function il(r,e=[],t=ee.root()){let i={disposables:[],ruleCache:new Set,candidateRuleCache:new Map,classCache:new Map,applyClassCache:new Map,notClassCache:new Set(r.blocklist??[]),postCssNodeCache:new Map,candidateRuleMap:new Map,tailwindConfig:r,changedContent:e,variantMap:new Map,stylesheetCache:null,variantOptions:new Map,markInvalidUtilityCandidate:s=>Uh(i,s),markInvalidUtilityNode:s=>H_(i,s)},n=U_(i,t);return V_(n,i),i}function Vh(r,e,t,i,n,s){let a=e.opts.from,o=i!==null;Ze.DEBUG&&console.log("Source path:",a);let l;if(o&&hr.has(a))l=hr.get(a);else if(Pi.has(n)){let p=Pi.get(n);Dt.get(p).add(a),hr.set(a,p),l=p}let c=Ph(a,r);if(l){let[p,h]=jh([...s],cs(l));if(!p&&!c)return[l,!1,h]}if(hr.has(a)){let p=hr.get(a);if(Dt.has(p)&&(Dt.get(p).delete(a),Dt.get(p).size===0)){Dt.delete(p);for(let[h,b]of Pi)b===p&&Pi.delete(h);for(let h of p.disposables.splice(0))h(p)}}Ze.DEBUG&&console.log("Setting up new context...");let f=il(t,[],r);Object.assign(f,{userConfigPath:i});let[,d]=jh([...s],cs(f));return Pi.set(n,f),hr.set(a,f),Dt.has(f)||Dt.set(f,new Set),Dt.get(f).add(a),[f,!0,d]}var Nh,Zo,Pt,Jo,el,rl,hr,Pi,Dt,Oi=P(()=>{u();ft();la();Ot();Nh=pe(Ra()),Zo=pe(it());Ci();qo();Gn();Kt();fr();Lo();Fr();bh();It();It();Yi();Be();Gi();Bo();os();Ih();Mh();ct();Vo();Pt=Symbol(),Jo={AddVariant:Symbol.for("ADD_VARIANT"),MatchVariant:Symbol.for("MATCH_VARIANT")},el={Base:1<<0,Dynamic:1<<1};rl=new WeakMap;hr=wh,Pi=vh,Dt=es});function nl(r){return r.ignore?[]:r.glob?m.env.ROLLUP_WATCH==="true"?[{type:"dependency",file:r.base}]:[{type:"dir-dependency",dir:r.base,glob:r.glob}]:[{type:"dependency",file:r.base}]}var Hh=P(()=>{u()});function Wh(r,e){return{handler:r,config:e}}var Gh,Qh=P(()=>{u();Wh.withOptions=function(r,e=()=>({})){let t=function(i){return{__options:i,handler:r(i),config:e(i)}};return t.__isOptionsFunction=!0,t.__pluginFunction=r,t.__configFunction=e,t};Gh=Wh});var sl={};Ge(sl,{default:()=>W_});var W_,al=P(()=>{u();Qh();W_=Gh});var Kh=x((z4,Yh)=>{u();var G_=(al(),sl).default,Q_={overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical"},Y_=G_(function({matchUtilities:r,addUtilities:e,theme:t,variants:i}){let n=t("lineClamp");r({"line-clamp":s=>({...Q_,"-webkit-line-clamp":`${s}`})},{values:n}),e([{".line-clamp-none":{"-webkit-line-clamp":"unset"}}],i("lineClamp"))},{theme:{lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6"}},variants:{lineClamp:["responsive"]}});Yh.exports=Y_});function ol(r){r.content.files.length===0&&G.warn("content-problems",["The `content` option in your Tailwind CSS configuration is missing or empty.","Configure your content sources or your generated CSS will be missing styles.","https://tailwindcss.com/docs/content-configuration"]);try{let e=Kh();r.plugins.includes(e)&&(G.warn("line-clamp-in-core",["As of Tailwind CSS v3.3, the `@tailwindcss/line-clamp` plugin is now included by default.","Remove it from the `plugins` array in your configuration to eliminate this warning."]),r.plugins=r.plugins.filter(t=>t!==e))}catch{}return r}var Xh=P(()=>{u();Be()});var Zh,Jh=P(()=>{u();Zh=()=>!1});var ps,em=P(()=>{u();ps={sync:r=>[].concat(r),generateTasks:r=>[{dynamic:!1,base:".",negative:[],positive:[].concat(r),patterns:[].concat(r)}],escapePath:r=>r}});var ll,tm=P(()=>{u();ll=r=>r});var rm,im=P(()=>{u();rm=()=>""});function nm(r){let e=r,t=rm(r);return t!=="."&&(e=r.substr(t.length),e.charAt(0)==="/"&&(e=e.substr(1))),e.substr(0,2)==="./"?e=e.substr(2):e.charAt(0)==="/"&&(e=e.substr(1)),{base:t,glob:e}}var sm=P(()=>{u();im()});var ds=x(Ve=>{u();"use strict";Ve.isInteger=r=>typeof r=="number"?Number.isInteger(r):typeof r=="string"&&r.trim()!==""?Number.isInteger(Number(r)):!1;Ve.find=(r,e)=>r.nodes.find(t=>t.type===e);Ve.exceedsLimit=(r,e,t=1,i)=>i===!1||!Ve.isInteger(r)||!Ve.isInteger(e)?!1:(Number(e)-Number(r))/Number(t)>=i;Ve.escapeNode=(r,e=0,t)=>{let i=r.nodes[e];!i||(t&&i.type===t||i.type==="open"||i.type==="close")&&i.escaped!==!0&&(i.value="\\"+i.value,i.escaped=!0)};Ve.encloseBrace=r=>r.type!=="brace"?!1:r.commas>>0+r.ranges>>0==0?(r.invalid=!0,!0):!1;Ve.isInvalidBrace=r=>r.type!=="brace"?!1:r.invalid===!0||r.dollar?!0:r.commas>>0+r.ranges>>0==0||r.open!==!0||r.close!==!0?(r.invalid=!0,!0):!1;Ve.isOpenOrClose=r=>r.type==="open"||r.type==="close"?!0:r.open===!0||r.close===!0;Ve.reduce=r=>r.reduce((e,t)=>(t.type==="text"&&e.push(t.value),t.type==="range"&&(t.type="text"),e),[]);Ve.flatten=(...r)=>{let e=[],t=i=>{for(let n=0;n<i.length;n++){let s=i[n];if(Array.isArray(s)){t(s);continue}s!==void 0&&e.push(s)}return e};return t(r),e}});var hs=x((Z4,om)=>{u();"use strict";var am=ds();om.exports=(r,e={})=>{let t=(i,n={})=>{let s=e.escapeInvalid&&am.isInvalidBrace(n),a=i.invalid===!0&&e.escapeInvalid===!0,o="";if(i.value)return(s||a)&&am.isOpenOrClose(i)?"\\"+i.value:i.value;if(i.value)return i.value;if(i.nodes)for(let l of i.nodes)o+=t(l);return o};return t(r)}});var um=x((J4,lm)=>{u();"use strict";lm.exports=function(r){return typeof r=="number"?r-r==0:typeof r=="string"&&r.trim()!==""?Number.isFinite?Number.isFinite(+r):isFinite(+r):!1}});var bm=x((e6,ym)=>{u();"use strict";var fm=um(),Wt=(r,e,t)=>{if(fm(r)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||r===e)return String(r);if(fm(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let i={relaxZeros:!0,...t};typeof i.strictZeros=="boolean"&&(i.relaxZeros=i.strictZeros===!1);let n=String(i.relaxZeros),s=String(i.shorthand),a=String(i.capture),o=String(i.wrap),l=r+":"+e+"="+n+s+a+o;if(Wt.cache.hasOwnProperty(l))return Wt.cache[l].result;let c=Math.min(r,e),f=Math.max(r,e);if(Math.abs(c-f)===1){let v=r+"|"+e;return i.capture?`(${v})`:i.wrap===!1?v:`(?:${v})`}let d=gm(r)||gm(e),p={min:r,max:e,a:c,b:f},h=[],b=[];if(d&&(p.isPadded=d,p.maxLen=String(p.max).length),c<0){let v=f<0?Math.abs(f):1;b=cm(v,Math.abs(c),p,i),c=p.a=0}return f>=0&&(h=cm(c,f,p,i)),p.negatives=b,p.positives=h,p.result=K_(b,h,i),i.capture===!0?p.result=`(${p.result})`:i.wrap!==!1&&h.length+b.length>1&&(p.result=`(?:${p.result})`),Wt.cache[l]=p,p.result};function K_(r,e,t){let i=ul(r,e,"-",!1,t)||[],n=ul(e,r,"",!1,t)||[],s=ul(r,e,"-?",!0,t)||[];return i.concat(s).concat(n).join("|")}function X_(r,e){let t=1,i=1,n=dm(r,t),s=new Set([e]);for(;r<=n&&n<=e;)s.add(n),t+=1,n=dm(r,t);for(n=hm(e+1,i)-1;r<n&&n<=e;)s.add(n),i+=1,n=hm(e+1,i)-1;return s=[...s],s.sort(eE),s}function Z_(r,e,t){if(r===e)return{pattern:r,count:[],digits:0};let i=J_(r,e),n=i.length,s="",a=0;for(let o=0;o<n;o++){let[l,c]=i[o];l===c?s+=l:l!=="0"||c!=="9"?s+=tE(l,c,t):a++}return a&&(s+=t.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[a],digits:n}}function cm(r,e,t,i){let n=X_(r,e),s=[],a=r,o;for(let l=0;l<n.length;l++){let c=n[l],f=Z_(String(a),String(c),i),d="";if(!t.isPadded&&o&&o.pattern===f.pattern){o.count.length>1&&o.count.pop(),o.count.push(f.count[0]),o.string=o.pattern+mm(o.count),a=c+1;continue}t.isPadded&&(d=rE(c,t,i)),f.string=d+f.pattern+mm(f.count),s.push(f),a=c+1,o=f}return s}function ul(r,e,t,i,n){let s=[];for(let a of r){let{string:o}=a;!i&&!pm(e,"string",o)&&s.push(t+o),i&&pm(e,"string",o)&&s.push(t+o)}return s}function J_(r,e){let t=[];for(let i=0;i<r.length;i++)t.push([r[i],e[i]]);return t}function eE(r,e){return r>e?1:e>r?-1:0}function pm(r,e,t){return r.some(i=>i[e]===t)}function dm(r,e){return Number(String(r).slice(0,-e)+"9".repeat(e))}function hm(r,e){return r-r%Math.pow(10,e)}function mm(r){let[e=0,t=""]=r;return t||e>1?`{${e+(t?","+t:"")}}`:""}function tE(r,e,t){return`[${r}${e-r==1?"":"-"}${e}]`}function gm(r){return/^-?(0+)\d/.test(r)}function rE(r,e,t){if(!e.isPadded)return r;let i=Math.abs(e.maxLen-String(r).length),n=t.relaxZeros!==!1;switch(i){case 0:return"";case 1:return n?"0?":"0";case 2:return n?"0{0,2}":"00";default:return n?`0{0,${i}}`:`0{${i}}`}}Wt.cache={};Wt.clearCache=()=>Wt.cache={};ym.exports=Wt});var pl=x((t6,Cm)=>{u();"use strict";var iE=(Fn(),Bn),wm=bm(),vm=r=>r!==null&&typeof r=="object"&&!Array.isArray(r),nE=r=>e=>r===!0?Number(e):String(e),fl=r=>typeof r=="number"||typeof r=="string"&&r!=="",Ii=r=>Number.isInteger(+r),cl=r=>{let e=`${r}`,t=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++t]==="0";);return t>0},sE=(r,e,t)=>typeof r=="string"||typeof e=="string"?!0:t.stringify===!0,aE=(r,e,t)=>{if(e>0){let i=r[0]==="-"?"-":"";i&&(r=r.slice(1)),r=i+r.padStart(i?e-1:e,"0")}return t===!1?String(r):r},ms=(r,e)=>{let t=r[0]==="-"?"-":"";for(t&&(r=r.slice(1),e--);r.length<e;)r="0"+r;return t?"-"+r:r},oE=(r,e,t)=>{r.negatives.sort((o,l)=>o<l?-1:o>l?1:0),r.positives.sort((o,l)=>o<l?-1:o>l?1:0);let i=e.capture?"":"?:",n="",s="",a;return r.positives.length&&(n=r.positives.map(o=>ms(String(o),t)).join("|")),r.negatives.length&&(s=`-(${i}${r.negatives.map(o=>ms(String(o),t)).join("|")})`),n&&s?a=`${n}|${s}`:a=n||s,e.wrap?`(${i}${a})`:a},xm=(r,e,t,i)=>{if(t)return wm(r,e,{wrap:!1,...i});let n=String.fromCharCode(r);if(r===e)return n;let s=String.fromCharCode(e);return`[${n}-${s}]`},km=(r,e,t)=>{if(Array.isArray(r)){let i=t.wrap===!0,n=t.capture?"":"?:";return i?`(${n}${r.join("|")})`:r.join("|")}return wm(r,e,t)},Sm=(...r)=>new RangeError("Invalid range arguments: "+iE.inspect(...r)),Am=(r,e,t)=>{if(t.strictRanges===!0)throw Sm([r,e]);return[]},lE=(r,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${r}" to be a number`);return[]},uE=(r,e,t=1,i={})=>{let n=Number(r),s=Number(e);if(!Number.isInteger(n)||!Number.isInteger(s)){if(i.strictRanges===!0)throw Sm([r,e]);return[]}n===0&&(n=0),s===0&&(s=0);let a=n>s,o=String(r),l=String(e),c=String(t);t=Math.max(Math.abs(t),1);let f=cl(o)||cl(l)||cl(c),d=f?Math.max(o.length,l.length,c.length):0,p=f===!1&&sE(r,e,i)===!1,h=i.transform||nE(p);if(i.toRegex&&t===1)return xm(ms(r,d),ms(e,d),!0,i);let b={negatives:[],positives:[]},v=k=>b[k<0?"negatives":"positives"].push(Math.abs(k)),y=[],w=0;for(;a?n>=s:n<=s;)i.toRegex===!0&&t>1?v(n):y.push(aE(h(n,w),d,p)),n=a?n-t:n+t,w++;return i.toRegex===!0?t>1?oE(b,i,d):km(y,null,{wrap:!1,...i}):y},fE=(r,e,t=1,i={})=>{if(!Ii(r)&&r.length>1||!Ii(e)&&e.length>1)return Am(r,e,i);let n=i.transform||(p=>String.fromCharCode(p)),s=`${r}`.charCodeAt(0),a=`${e}`.charCodeAt(0),o=s>a,l=Math.min(s,a),c=Math.max(s,a);if(i.toRegex&&t===1)return xm(l,c,!1,i);let f=[],d=0;for(;o?s>=a:s<=a;)f.push(n(s,d)),s=o?s-t:s+t,d++;return i.toRegex===!0?km(f,null,{wrap:!1,options:i}):f},gs=(r,e,t,i={})=>{if(e==null&&fl(r))return[r];if(!fl(r)||!fl(e))return Am(r,e,i);if(typeof t=="function")return gs(r,e,1,{transform:t});if(vm(t))return gs(r,e,0,t);let n={...i};return n.capture===!0&&(n.wrap=!0),t=t||n.step||1,Ii(t)?Ii(r)&&Ii(e)?uE(r,e,t,n):fE(r,e,Math.max(Math.abs(t),1),n):t!=null&&!vm(t)?lE(t,n):gs(r,e,1,t)};Cm.exports=gs});var Om=x((r6,Em)=>{u();"use strict";var cE=pl(),_m=ds(),pE=(r,e={})=>{let t=(i,n={})=>{let s=_m.isInvalidBrace(n),a=i.invalid===!0&&e.escapeInvalid===!0,o=s===!0||a===!0,l=e.escapeInvalid===!0?"\\":"",c="";if(i.isOpen===!0)return l+i.value;if(i.isClose===!0)return console.log("node.isClose",l,i.value),l+i.value;if(i.type==="open")return o?l+i.value:"(";if(i.type==="close")return o?l+i.value:")";if(i.type==="comma")return i.prev.type==="comma"?"":o?i.value:"|";if(i.value)return i.value;if(i.nodes&&i.ranges>0){let f=_m.reduce(i.nodes),d=cE(...f,{...e,wrap:!1,toRegex:!0,strictZeros:!0});if(d.length!==0)return f.length>1&&d.length>1?`(${d})`:d}if(i.nodes)for(let f of i.nodes)c+=t(f,i);return c};return t(r)};Em.exports=pE});var Pm=x((i6,Rm)=>{u();"use strict";var dE=pl(),Tm=hs(),mr=ds(),Gt=(r="",e="",t=!1)=>{let i=[];if(r=[].concat(r),e=[].concat(e),!e.length)return r;if(!r.length)return t?mr.flatten(e).map(n=>`{${n}}`):e;for(let n of r)if(Array.isArray(n))for(let s of n)i.push(Gt(s,e,t));else for(let s of e)t===!0&&typeof s=="string"&&(s=`{${s}}`),i.push(Array.isArray(s)?Gt(n,s,t):n+s);return mr.flatten(i)},hE=(r,e={})=>{let t=e.rangeLimit===void 0?1e3:e.rangeLimit,i=(n,s={})=>{n.queue=[];let a=s,o=s.queue;for(;a.type!=="brace"&&a.type!=="root"&&a.parent;)a=a.parent,o=a.queue;if(n.invalid||n.dollar){o.push(Gt(o.pop(),Tm(n,e)));return}if(n.type==="brace"&&n.invalid!==!0&&n.nodes.length===2){o.push(Gt(o.pop(),["{}"]));return}if(n.nodes&&n.ranges>0){let d=mr.reduce(n.nodes);if(mr.exceedsLimit(...d,e.step,t))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let p=dE(...d,e);p.length===0&&(p=Tm(n,e)),o.push(Gt(o.pop(),p)),n.nodes=[];return}let l=mr.encloseBrace(n),c=n.queue,f=n;for(;f.type!=="brace"&&f.type!=="root"&&f.parent;)f=f.parent,c=f.queue;for(let d=0;d<n.nodes.length;d++){let p=n.nodes[d];if(p.type==="comma"&&n.type==="brace"){d===1&&c.push(""),c.push("");continue}if(p.type==="close"){o.push(Gt(o.pop(),c,l));continue}if(p.value&&p.type!=="open"){c.push(Gt(c.pop(),p.value));continue}p.nodes&&i(p,n)}return c};return mr.flatten(i(r))};Rm.exports=hE});var Dm=x((n6,Im)=>{u();"use strict";Im.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`-`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var Nm=x((s6,Mm)=>{u();"use strict";var mE=hs(),{MAX_LENGTH:qm,CHAR_BACKSLASH:dl,CHAR_BACKTICK:gE,CHAR_COMMA:yE,CHAR_DOT:bE,CHAR_LEFT_PARENTHESES:wE,CHAR_RIGHT_PARENTHESES:vE,CHAR_LEFT_CURLY_BRACE:xE,CHAR_RIGHT_CURLY_BRACE:kE,CHAR_LEFT_SQUARE_BRACKET:$m,CHAR_RIGHT_SQUARE_BRACKET:Lm,CHAR_DOUBLE_QUOTE:SE,CHAR_SINGLE_QUOTE:AE,CHAR_NO_BREAK_SPACE:CE,CHAR_ZERO_WIDTH_NOBREAK_SPACE:_E}=Dm(),EE=(r,e={})=>{if(typeof r!="string")throw new TypeError("Expected a string");let t=e||{},i=typeof t.maxLength=="number"?Math.min(qm,t.maxLength):qm;if(r.length>i)throw new SyntaxError(`Input length (${r.length}), exceeds max characters (${i})`);let n={type:"root",input:r,nodes:[]},s=[n],a=n,o=n,l=0,c=r.length,f=0,d=0,p,h=()=>r[f++],b=v=>{if(v.type==="text"&&o.type==="dot"&&(o.type="text"),o&&o.type==="text"&&v.type==="text"){o.value+=v.value;return}return a.nodes.push(v),v.parent=a,v.prev=o,o=v,v};for(b({type:"bos"});f<c;)if(a=s[s.length-1],p=h(),!(p===_E||p===CE)){if(p===dl){b({type:"text",value:(e.keepEscaping?p:"")+h()});continue}if(p===Lm){b({type:"text",value:"\\"+p});continue}if(p===$m){l++;let v;for(;f<c&&(v=h());){if(p+=v,v===$m){l++;continue}if(v===dl){p+=h();continue}if(v===Lm&&(l--,l===0))break}b({type:"text",value:p});continue}if(p===wE){a=b({type:"paren",nodes:[]}),s.push(a),b({type:"text",value:p});continue}if(p===vE){if(a.type!=="paren"){b({type:"text",value:p});continue}a=s.pop(),b({type:"text",value:p}),a=s[s.length-1];continue}if(p===SE||p===AE||p===gE){let v=p,y;for(e.keepQuotes!==!0&&(p="");f<c&&(y=h());){if(y===dl){p+=y+h();continue}if(y===v){e.keepQuotes===!0&&(p+=y);break}p+=y}b({type:"text",value:p});continue}if(p===xE){d++;let v=o.value&&o.value.slice(-1)==="$"||a.dollar===!0;a=b({type:"brace",open:!0,close:!1,dollar:v,depth:d,commas:0,ranges:0,nodes:[]}),s.push(a),b({type:"open",value:p});continue}if(p===kE){if(a.type!=="brace"){b({type:"text",value:p});continue}let v="close";a=s.pop(),a.close=!0,b({type:v,value:p}),d--,a=s[s.length-1];continue}if(p===yE&&d>0){if(a.ranges>0){a.ranges=0;let v=a.nodes.shift();a.nodes=[v,{type:"text",value:mE(a)}]}b({type:"comma",value:p}),a.commas++;continue}if(p===bE&&d>0&&a.commas===0){let v=a.nodes;if(d===0||v.length===0){b({type:"text",value:p});continue}if(o.type==="dot"){if(a.range=[],o.value+=p,o.type="range",a.nodes.length!==3&&a.nodes.length!==5){a.invalid=!0,a.ranges=0,o.type="text";continue}a.ranges++,a.args=[];continue}if(o.type==="range"){v.pop();let y=v[v.length-1];y.value+=o.value+p,o=y,a.ranges--;continue}b({type:"dot",value:p});continue}b({type:"text",value:p})}do if(a=s.pop(),a.type!=="root"){a.nodes.forEach(w=>{w.nodes||(w.type==="open"&&(w.isOpen=!0),w.type==="close"&&(w.isClose=!0),w.nodes||(w.type="text"),w.invalid=!0)});let v=s[s.length-1],y=v.nodes.indexOf(a);v.nodes.splice(y,1,...a.nodes)}while(s.length>0);return b({type:"eos"}),n};Mm.exports=EE});var jm=x((a6,Fm)=>{u();"use strict";var Bm=hs(),OE=Om(),TE=Pm(),RE=Nm(),Le=(r,e={})=>{let t=[];if(Array.isArray(r))for(let i of r){let n=Le.create(i,e);Array.isArray(n)?t.push(...n):t.push(n)}else t=[].concat(Le.create(r,e));return e&&e.expand===!0&&e.nodupes===!0&&(t=[...new Set(t)]),t};Le.parse=(r,e={})=>RE(r,e);Le.stringify=(r,e={})=>typeof r=="string"?Bm(Le.parse(r,e),e):Bm(r,e);Le.compile=(r,e={})=>(typeof r=="string"&&(r=Le.parse(r,e)),OE(r,e));Le.expand=(r,e={})=>{typeof r=="string"&&(r=Le.parse(r,e));let t=TE(r,e);return e.noempty===!0&&(t=t.filter(Boolean)),e.nodupes===!0&&(t=[...new Set(t)]),t};Le.create=(r,e={})=>r===""||r.length<3?[r]:e.expand!==!0?Le.compile(r,e):Le.expand(r,e);Fm.exports=Le});var Di=x((o6,Wm)=>{u();"use strict";var PE=(et(),Ur),at="\\\\/",zm=`[^${at}]`,yt="\\.",IE="\\+",DE="\\?",ys="\\/",qE="(?=.)",Um="[^/]",hl=`(?:${ys}|$)`,Vm=`(?:^|${ys})`,ml=`${yt}{1,2}${hl}`,$E=`(?!${yt})`,LE=`(?!${Vm}${ml})`,ME=`(?!${yt}{0,1}${hl})`,NE=`(?!${ml})`,BE=`[^.${ys}]`,FE=`${Um}*?`,Hm={DOT_LITERAL:yt,PLUS_LITERAL:IE,QMARK_LITERAL:DE,SLASH_LITERAL:ys,ONE_CHAR:qE,QMARK:Um,END_ANCHOR:hl,DOTS_SLASH:ml,NO_DOT:$E,NO_DOTS:LE,NO_DOT_SLASH:ME,NO_DOTS_SLASH:NE,QMARK_NO_DOT:BE,STAR:FE,START_ANCHOR:Vm},jE={...Hm,SLASH_LITERAL:`[${at}]`,QMARK:zm,STAR:`${zm}*?`,DOTS_SLASH:`${yt}{1,2}(?:[${at}]|$)`,NO_DOT:`(?!${yt})`,NO_DOTS:`(?!(?:^|[${at}])${yt}{1,2}(?:[${at}]|$))`,NO_DOT_SLASH:`(?!${yt}{0,1}(?:[${at}]|$))`,NO_DOTS_SLASH:`(?!${yt}{1,2}(?:[${at}]|$))`,QMARK_NO_DOT:`[^.${at}]`,START_ANCHOR:`(?:^|[${at}])`,END_ANCHOR:`(?:[${at}]|$)`},zE={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};Wm.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:zE,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:PE.sep,extglobChars(r){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${r.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(r){return r===!0?jE:Hm}}});var qi=x(Re=>{u();"use strict";var UE=(et(),Ur),VE=m.platform==="win32",{REGEX_BACKSLASH:HE,REGEX_REMOVE_BACKSLASH:WE,REGEX_SPECIAL_CHARS:GE,REGEX_SPECIAL_CHARS_GLOBAL:QE}=Di();Re.isObject=r=>r!==null&&typeof r=="object"&&!Array.isArray(r);Re.hasRegexChars=r=>GE.test(r);Re.isRegexChar=r=>r.length===1&&Re.hasRegexChars(r);Re.escapeRegex=r=>r.replace(QE,"\\$1");Re.toPosixSlashes=r=>r.replace(HE,"/");Re.removeBackslashes=r=>r.replace(WE,e=>e==="\\"?"":e);Re.supportsLookbehinds=()=>{let r=m.version.slice(1).split(".").map(Number);return r.length===3&&r[0]>=9||r[0]===8&&r[1]>=10};Re.isWindows=r=>r&&typeof r.windows=="boolean"?r.windows:VE===!0||UE.sep==="\\";Re.escapeLast=(r,e,t)=>{let i=r.lastIndexOf(e,t);return i===-1?r:r[i-1]==="\\"?Re.escapeLast(r,e,i-1):`${r.slice(0,i)}\\${r.slice(i)}`};Re.removePrefix=(r,e={})=>{let t=r;return t.startsWith("./")&&(t=t.slice(2),e.prefix="./"),t};Re.wrapOutput=(r,e={},t={})=>{let i=t.contains?"":"^",n=t.contains?"":"$",s=`${i}(?:${r})${n}`;return e.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var eg=x((u6,Jm)=>{u();"use strict";var Gm=qi(),{CHAR_ASTERISK:gl,CHAR_AT:YE,CHAR_BACKWARD_SLASH:$i,CHAR_COMMA:KE,CHAR_DOT:yl,CHAR_EXCLAMATION_MARK:bl,CHAR_FORWARD_SLASH:Qm,CHAR_LEFT_CURLY_BRACE:wl,CHAR_LEFT_PARENTHESES:vl,CHAR_LEFT_SQUARE_BRACKET:XE,CHAR_PLUS:ZE,CHAR_QUESTION_MARK:Ym,CHAR_RIGHT_CURLY_BRACE:JE,CHAR_RIGHT_PARENTHESES:Km,CHAR_RIGHT_SQUARE_BRACKET:e2}=Di(),Xm=r=>r===Qm||r===$i,Zm=r=>{r.isPrefix!==!0&&(r.depth=r.isGlobstar?1/0:1)},t2=(r,e)=>{let t=e||{},i=r.length-1,n=t.parts===!0||t.scanToEnd===!0,s=[],a=[],o=[],l=r,c=-1,f=0,d=0,p=!1,h=!1,b=!1,v=!1,y=!1,w=!1,k=!1,S=!1,E=!1,T=!1,B=0,N,R,F={value:"",depth:0,isGlob:!1},Y=()=>c>=i,_=()=>l.charCodeAt(c+1),Q=()=>(N=R,l.charCodeAt(++c));for(;c<i;){R=Q();let he;if(R===$i){k=F.backslashes=!0,R=Q(),R===wl&&(w=!0);continue}if(w===!0||R===wl){for(B++;Y()!==!0&&(R=Q());){if(R===$i){k=F.backslashes=!0,Q();continue}if(R===wl){B++;continue}if(w!==!0&&R===yl&&(R=Q())===yl){if(p=F.isBrace=!0,b=F.isGlob=!0,T=!0,n===!0)continue;break}if(w!==!0&&R===KE){if(p=F.isBrace=!0,b=F.isGlob=!0,T=!0,n===!0)continue;break}if(R===JE&&(B--,B===0)){w=!1,p=F.isBrace=!0,T=!0;break}}if(n===!0)continue;break}if(R===Qm){if(s.push(c),a.push(F),F={value:"",depth:0,isGlob:!1},T===!0)continue;if(N===yl&&c===f+1){f+=2;continue}d=c+1;continue}if(t.noext!==!0&&(R===ZE||R===YE||R===gl||R===Ym||R===bl)===!0&&_()===vl){if(b=F.isGlob=!0,v=F.isExtglob=!0,T=!0,R===bl&&c===f&&(E=!0),n===!0){for(;Y()!==!0&&(R=Q());){if(R===$i){k=F.backslashes=!0,R=Q();continue}if(R===Km){b=F.isGlob=!0,T=!0;break}}continue}break}if(R===gl){if(N===gl&&(y=F.isGlobstar=!0),b=F.isGlob=!0,T=!0,n===!0)continue;break}if(R===Ym){if(b=F.isGlob=!0,T=!0,n===!0)continue;break}if(R===XE){for(;Y()!==!0&&(he=Q());){if(he===$i){k=F.backslashes=!0,Q();continue}if(he===e2){h=F.isBracket=!0,b=F.isGlob=!0,T=!0;break}}if(n===!0)continue;break}if(t.nonegate!==!0&&R===bl&&c===f){S=F.negated=!0,f++;continue}if(t.noparen!==!0&&R===vl){if(b=F.isGlob=!0,n===!0){for(;Y()!==!0&&(R=Q());){if(R===vl){k=F.backslashes=!0,R=Q();continue}if(R===Km){T=!0;break}}continue}break}if(b===!0){if(T=!0,n===!0)continue;break}}t.noext===!0&&(v=!1,b=!1);let U=l,le="",A="";f>0&&(le=l.slice(0,f),l=l.slice(f),d-=f),U&&b===!0&&d>0?(U=l.slice(0,d),A=l.slice(d)):b===!0?(U="",A=l):U=l,U&&U!==""&&U!=="/"&&U!==l&&Xm(U.charCodeAt(U.length-1))&&(U=U.slice(0,-1)),t.unescape===!0&&(A&&(A=Gm.removeBackslashes(A)),U&&k===!0&&(U=Gm.removeBackslashes(U)));let C={prefix:le,input:r,start:f,base:U,glob:A,isBrace:p,isBracket:h,isGlob:b,isExtglob:v,isGlobstar:y,negated:S,negatedExtglob:E};if(t.tokens===!0&&(C.maxDepth=0,Xm(R)||a.push(F),C.tokens=a),t.parts===!0||t.tokens===!0){let he;for(let V=0;V<s.length;V++){let Ee=he?he+1:f,Ie=s[V],De=r.slice(Ee,Ie);t.tokens&&(V===0&&f!==0?(a[V].isPrefix=!0,a[V].value=le):a[V].value=De,Zm(a[V]),C.maxDepth+=a[V].depth),(V!==0||De!=="")&&o.push(De),he=Ie}if(he&&he+1<r.length){let V=r.slice(he+1);o.push(V),t.tokens&&(a[a.length-1].value=V,Zm(a[a.length-1]),C.maxDepth+=a[a.length-1].depth)}C.slashes=s,C.parts=o}return C};Jm.exports=t2});var ig=x((f6,rg)=>{u();"use strict";var bs=Di(),Me=qi(),{MAX_LENGTH:ws,POSIX_REGEX_SOURCE:r2,REGEX_NON_SPECIAL_CHARS:i2,REGEX_SPECIAL_CHARS_BACKREF:n2,REPLACEMENTS:tg}=bs,s2=(r,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...r,e);r.sort();let t=`[${r.join("-")}]`;try{new RegExp(t)}catch(i){return r.map(n=>Me.escapeRegex(n)).join("..")}return t},gr=(r,e)=>`Missing ${r}: "${e}" - use "\\\\${e}" to match literal characters`,xl=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a string");r=tg[r]||r;let t={...e},i=typeof t.maxLength=="number"?Math.min(ws,t.maxLength):ws,n=r.length;if(n>i)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${i}`);let s={type:"bos",value:"",output:t.prepend||""},a=[s],o=t.capture?"":"?:",l=Me.isWindows(e),c=bs.globChars(l),f=bs.extglobChars(c),{DOT_LITERAL:d,PLUS_LITERAL:p,SLASH_LITERAL:h,ONE_CHAR:b,DOTS_SLASH:v,NO_DOT:y,NO_DOT_SLASH:w,NO_DOTS_SLASH:k,QMARK:S,QMARK_NO_DOT:E,STAR:T,START_ANCHOR:B}=c,N=$=>`(${o}(?:(?!${B}${$.dot?v:d}).)*?)`,R=t.dot?"":y,F=t.dot?S:E,Y=t.bash===!0?N(t):T;t.capture&&(Y=`(${Y})`),typeof t.noext=="boolean"&&(t.noextglob=t.noext);let _={input:r,index:-1,start:0,dot:t.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:a};r=Me.removePrefix(r,_),n=r.length;let Q=[],U=[],le=[],A=s,C,he=()=>_.index===n-1,V=_.peek=($=1)=>r[_.index+$],Ee=_.advance=()=>r[++_.index]||"",Ie=()=>r.slice(_.index+1),De=($="",ae=0)=>{_.consumed+=$,_.index+=ae},ji=$=>{_.output+=$.output!=null?$.output:$.value,De($.value)},Iv=()=>{let $=1;for(;V()==="!"&&(V(2)!=="("||V(3)==="?");)Ee(),_.start++,$++;return $%2==0?!1:(_.negated=!0,_.start++,!0)},zi=$=>{_[$]++,le.push($)},Ft=$=>{_[$]--,le.pop()},W=$=>{if(A.type==="globstar"){let ae=_.braces>0&&($.type==="comma"||$.type==="brace"),I=$.extglob===!0||Q.length&&($.type==="pipe"||$.type==="paren");$.type!=="slash"&&$.type!=="paren"&&!ae&&!I&&(_.output=_.output.slice(0,-A.output.length),A.type="star",A.value="*",A.output=Y,_.output+=A.output)}if(Q.length&&$.type!=="paren"&&(Q[Q.length-1].inner+=$.value),($.value||$.output)&&ji($),A&&A.type==="text"&&$.type==="text"){A.value+=$.value,A.output=(A.output||"")+$.value;return}$.prev=A,a.push($),A=$},Ui=($,ae)=>{let I={...f[ae],conditions:1,inner:""};I.prev=A,I.parens=_.parens,I.output=_.output;let H=(t.capture?"(":"")+I.open;zi("parens"),W({type:$,value:ae,output:_.output?"":b}),W({type:"paren",extglob:!0,value:Ee(),output:H}),Q.push(I)},Dv=$=>{let ae=$.close+(t.capture?")":""),I;if($.type==="negate"){let H=Y;if($.inner&&$.inner.length>1&&$.inner.includes("/")&&(H=N(t)),(H!==Y||he()||/^\)+$/.test(Ie()))&&(ae=$.close=`)$))${H}`),$.inner.includes("*")&&(I=Ie())&&/^\.[^\\/.]+$/.test(I)){let ce=xl(I,{...e,fastpaths:!1}).output;ae=$.close=`)${ce})${H})`}$.prev.type==="bos"&&(_.negatedExtglob=!0)}W({type:"paren",extglob:!0,value:C,output:ae}),Ft("parens")};if(t.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(r)){let $=!1,ae=r.replace(n2,(I,H,ce,Ce,ye,Bs)=>Ce==="\\"?($=!0,I):Ce==="?"?H?H+Ce+(ye?S.repeat(ye.length):""):Bs===0?F+(ye?S.repeat(ye.length):""):S.repeat(ce.length):Ce==="."?d.repeat(ce.length):Ce==="*"?H?H+Ce+(ye?Y:""):Y:H?I:`\\${I}`);return $===!0&&(t.unescape===!0?ae=ae.replace(/\\/g,""):ae=ae.replace(/\\+/g,I=>I.length%2==0?"\\\\":I?"\\":"")),ae===r&&t.contains===!0?(_.output=r,_):(_.output=Me.wrapOutput(ae,_,e),_)}for(;!he();){if(C=Ee(),C==="\0")continue;if(C==="\\"){let I=V();if(I==="/"&&t.bash!==!0||I==="."||I===";")continue;if(!I){C+="\\",W({type:"text",value:C});continue}let H=/^\\+/.exec(Ie()),ce=0;if(H&&H[0].length>2&&(ce=H[0].length,_.index+=ce,ce%2!=0&&(C+="\\")),t.unescape===!0?C=Ee():C+=Ee(),_.brackets===0){W({type:"text",value:C});continue}}if(_.brackets>0&&(C!=="]"||A.value==="["||A.value==="[^")){if(t.posix!==!1&&C===":"){let I=A.value.slice(1);if(I.includes("[")&&(A.posix=!0,I.includes(":"))){let H=A.value.lastIndexOf("["),ce=A.value.slice(0,H),Ce=A.value.slice(H+2),ye=r2[Ce];if(ye){A.value=ce+ye,_.backtrack=!0,Ee(),!s.output&&a.indexOf(A)===1&&(s.output=b);continue}}}(C==="["&&V()!==":"||C==="-"&&V()==="]")&&(C=`\\${C}`),C==="]"&&(A.value==="["||A.value==="[^")&&(C=`\\${C}`),t.posix===!0&&C==="!"&&A.value==="["&&(C="^"),A.value+=C,ji({value:C});continue}if(_.quotes===1&&C!=='"'){C=Me.escapeRegex(C),A.value+=C,ji({value:C});continue}if(C==='"'){_.quotes=_.quotes===1?0:1,t.keepQuotes===!0&&W({type:"text",value:C});continue}if(C==="("){zi("parens"),W({type:"paren",value:C});continue}if(C===")"){if(_.parens===0&&t.strictBrackets===!0)throw new SyntaxError(gr("opening","("));let I=Q[Q.length-1];if(I&&_.parens===I.parens+1){Dv(Q.pop());continue}W({type:"paren",value:C,output:_.parens?")":"\\)"}),Ft("parens");continue}if(C==="["){if(t.nobracket===!0||!Ie().includes("]")){if(t.nobracket!==!0&&t.strictBrackets===!0)throw new SyntaxError(gr("closing","]"));C=`\\${C}`}else zi("brackets");W({type:"bracket",value:C});continue}if(C==="]"){if(t.nobracket===!0||A&&A.type==="bracket"&&A.value.length===1){W({type:"text",value:C,output:`\\${C}`});continue}if(_.brackets===0){if(t.strictBrackets===!0)throw new SyntaxError(gr("opening","["));W({type:"text",value:C,output:`\\${C}`});continue}Ft("brackets");let I=A.value.slice(1);if(A.posix!==!0&&I[0]==="^"&&!I.includes("/")&&(C=`/${C}`),A.value+=C,ji({value:C}),t.literalBrackets===!1||Me.hasRegexChars(I))continue;let H=Me.escapeRegex(A.value);if(_.output=_.output.slice(0,-A.value.length),t.literalBrackets===!0){_.output+=H,A.value=H;continue}A.value=`(${o}${H}|${A.value})`,_.output+=A.value;continue}if(C==="{"&&t.nobrace!==!0){zi("braces");let I={type:"brace",value:C,output:"(",outputIndex:_.output.length,tokensIndex:_.tokens.length};U.push(I),W(I);continue}if(C==="}"){let I=U[U.length-1];if(t.nobrace===!0||!I){W({type:"text",value:C,output:C});continue}let H=")";if(I.dots===!0){let ce=a.slice(),Ce=[];for(let ye=ce.length-1;ye>=0&&(a.pop(),ce[ye].type!=="brace");ye--)ce[ye].type!=="dots"&&Ce.unshift(ce[ye].value);H=s2(Ce,t),_.backtrack=!0}if(I.comma!==!0&&I.dots!==!0){let ce=_.output.slice(0,I.outputIndex),Ce=_.tokens.slice(I.tokensIndex);I.value=I.output="\\{",C=H="\\}",_.output=ce;for(let ye of Ce)_.output+=ye.output||ye.value}W({type:"brace",value:C,output:H}),Ft("braces"),U.pop();continue}if(C==="|"){Q.length>0&&Q[Q.length-1].conditions++,W({type:"text",value:C});continue}if(C===","){let I=C,H=U[U.length-1];H&&le[le.length-1]==="braces"&&(H.comma=!0,I="|"),W({type:"comma",value:C,output:I});continue}if(C==="/"){if(A.type==="dot"&&_.index===_.start+1){_.start=_.index+1,_.consumed="",_.output="",a.pop(),A=s;continue}W({type:"slash",value:C,output:h});continue}if(C==="."){if(_.braces>0&&A.type==="dot"){A.value==="."&&(A.output=d);let I=U[U.length-1];A.type="dots",A.output+=C,A.value+=C,I.dots=!0;continue}if(_.braces+_.parens===0&&A.type!=="bos"&&A.type!=="slash"){W({type:"text",value:C,output:d});continue}W({type:"dot",value:C,output:d});continue}if(C==="?"){if(!(A&&A.value==="(")&&t.noextglob!==!0&&V()==="("&&V(2)!=="?"){Ui("qmark",C);continue}if(A&&A.type==="paren"){let H=V(),ce=C;if(H==="<"&&!Me.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(A.value==="("&&!/[!=<:]/.test(H)||H==="<"&&!/<([!=]|\w+>)/.test(Ie()))&&(ce=`\\${C}`),W({type:"text",value:C,output:ce});continue}if(t.dot!==!0&&(A.type==="slash"||A.type==="bos")){W({type:"qmark",value:C,output:E});continue}W({type:"qmark",value:C,output:S});continue}if(C==="!"){if(t.noextglob!==!0&&V()==="("&&(V(2)!=="?"||!/[!=<:]/.test(V(3)))){Ui("negate",C);continue}if(t.nonegate!==!0&&_.index===0){Iv();continue}}if(C==="+"){if(t.noextglob!==!0&&V()==="("&&V(2)!=="?"){Ui("plus",C);continue}if(A&&A.value==="("||t.regex===!1){W({type:"plus",value:C,output:p});continue}if(A&&(A.type==="bracket"||A.type==="paren"||A.type==="brace")||_.parens>0){W({type:"plus",value:C});continue}W({type:"plus",value:p});continue}if(C==="@"){if(t.noextglob!==!0&&V()==="("&&V(2)!=="?"){W({type:"at",extglob:!0,value:C,output:""});continue}W({type:"text",value:C});continue}if(C!=="*"){(C==="$"||C==="^")&&(C=`\\${C}`);let I=i2.exec(Ie());I&&(C+=I[0],_.index+=I[0].length),W({type:"text",value:C});continue}if(A&&(A.type==="globstar"||A.star===!0)){A.type="star",A.star=!0,A.value+=C,A.output=Y,_.backtrack=!0,_.globstar=!0,De(C);continue}let $=Ie();if(t.noextglob!==!0&&/^\([^?]/.test($)){Ui("star",C);continue}if(A.type==="star"){if(t.noglobstar===!0){De(C);continue}let I=A.prev,H=I.prev,ce=I.type==="slash"||I.type==="bos",Ce=H&&(H.type==="star"||H.type==="globstar");if(t.bash===!0&&(!ce||$[0]&&$[0]!=="/")){W({type:"star",value:C,output:""});continue}let ye=_.braces>0&&(I.type==="comma"||I.type==="brace"),Bs=Q.length&&(I.type==="pipe"||I.type==="paren");if(!ce&&I.type!=="paren"&&!ye&&!Bs){W({type:"star",value:C,output:""});continue}for(;$.slice(0,3)==="/**";){let Vi=r[_.index+4];if(Vi&&Vi!=="/")break;$=$.slice(3),De("/**",3)}if(I.type==="bos"&&he()){A.type="globstar",A.value+=C,A.output=N(t),_.output=A.output,_.globstar=!0,De(C);continue}if(I.type==="slash"&&I.prev.type!=="bos"&&!Ce&&he()){_.output=_.output.slice(0,-(I.output+A.output).length),I.output=`(?:${I.output}`,A.type="globstar",A.output=N(t)+(t.strictSlashes?")":"|$)"),A.value+=C,_.globstar=!0,_.output+=I.output+A.output,De(C);continue}if(I.type==="slash"&&I.prev.type!=="bos"&&$[0]==="/"){let Vi=$[1]!==void 0?"|$":"";_.output=_.output.slice(0,-(I.output+A.output).length),I.output=`(?:${I.output}`,A.type="globstar",A.output=`${N(t)}${h}|${h}${Vi})`,A.value+=C,_.output+=I.output+A.output,_.globstar=!0,De(C+Ee()),W({type:"slash",value:"/",output:""});continue}if(I.type==="bos"&&$[0]==="/"){A.type="globstar",A.value+=C,A.output=`(?:^|${h}|${N(t)}${h})`,_.output=A.output,_.globstar=!0,De(C+Ee()),W({type:"slash",value:"/",output:""});continue}_.output=_.output.slice(0,-A.output.length),A.type="globstar",A.output=N(t),A.value+=C,_.output+=A.output,_.globstar=!0,De(C);continue}let ae={type:"star",value:C,output:Y};if(t.bash===!0){ae.output=".*?",(A.type==="bos"||A.type==="slash")&&(ae.output=R+ae.output),W(ae);continue}if(A&&(A.type==="bracket"||A.type==="paren")&&t.regex===!0){ae.output=C,W(ae);continue}(_.index===_.start||A.type==="slash"||A.type==="dot")&&(A.type==="dot"?(_.output+=w,A.output+=w):t.dot===!0?(_.output+=k,A.output+=k):(_.output+=R,A.output+=R),V()!=="*"&&(_.output+=b,A.output+=b)),W(ae)}for(;_.brackets>0;){if(t.strictBrackets===!0)throw new SyntaxError(gr("closing","]"));_.output=Me.escapeLast(_.output,"["),Ft("brackets")}for(;_.parens>0;){if(t.strictBrackets===!0)throw new SyntaxError(gr("closing",")"));_.output=Me.escapeLast(_.output,"("),Ft("parens")}for(;_.braces>0;){if(t.strictBrackets===!0)throw new SyntaxError(gr("closing","}"));_.output=Me.escapeLast(_.output,"{"),Ft("braces")}if(t.strictSlashes!==!0&&(A.type==="star"||A.type==="bracket")&&W({type:"maybe_slash",value:"",output:`${h}?`}),_.backtrack===!0){_.output="";for(let $ of _.tokens)_.output+=$.output!=null?$.output:$.value,$.suffix&&(_.output+=$.suffix)}return _};xl.fastpaths=(r,e)=>{let t={...e},i=typeof t.maxLength=="number"?Math.min(ws,t.maxLength):ws,n=r.length;if(n>i)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${i}`);r=tg[r]||r;let s=Me.isWindows(e),{DOT_LITERAL:a,SLASH_LITERAL:o,ONE_CHAR:l,DOTS_SLASH:c,NO_DOT:f,NO_DOTS:d,NO_DOTS_SLASH:p,STAR:h,START_ANCHOR:b}=bs.globChars(s),v=t.dot?d:f,y=t.dot?p:f,w=t.capture?"":"?:",k={negated:!1,prefix:""},S=t.bash===!0?".*?":h;t.capture&&(S=`(${S})`);let E=R=>R.noglobstar===!0?S:`(${w}(?:(?!${b}${R.dot?c:a}).)*?)`,T=R=>{switch(R){case"*":return`${v}${l}${S}`;case".*":return`${a}${l}${S}`;case"*.*":return`${v}${S}${a}${l}${S}`;case"*/*":return`${v}${S}${o}${l}${y}${S}`;case"**":return v+E(t);case"**/*":return`(?:${v}${E(t)}${o})?${y}${l}${S}`;case"**/*.*":return`(?:${v}${E(t)}${o})?${y}${S}${a}${l}${S}`;case"**/.*":return`(?:${v}${E(t)}${o})?${a}${l}${S}`;default:{let F=/^(.*?)\.(\w+)$/.exec(R);if(!F)return;let Y=T(F[1]);return Y?Y+a+F[2]:void 0}}},B=Me.removePrefix(r,k),N=T(B);return N&&t.strictSlashes!==!0&&(N+=`${o}?`),N};rg.exports=xl});var sg=x((c6,ng)=>{u();"use strict";var a2=(et(),Ur),o2=eg(),kl=ig(),Sl=qi(),l2=Di(),u2=r=>r&&typeof r=="object"&&!Array.isArray(r),de=(r,e,t=!1)=>{if(Array.isArray(r)){let f=r.map(p=>de(p,e,t));return p=>{for(let h of f){let b=h(p);if(b)return b}return!1}}let i=u2(r)&&r.tokens&&r.input;if(r===""||typeof r!="string"&&!i)throw new TypeError("Expected pattern to be a non-empty string");let n=e||{},s=Sl.isWindows(e),a=i?de.compileRe(r,e):de.makeRe(r,e,!1,!0),o=a.state;delete a.state;let l=()=>!1;if(n.ignore){let f={...e,ignore:null,onMatch:null,onResult:null};l=de(n.ignore,f,t)}let c=(f,d=!1)=>{let{isMatch:p,match:h,output:b}=de.test(f,a,e,{glob:r,posix:s}),v={glob:r,state:o,regex:a,posix:s,input:f,output:b,match:h,isMatch:p};return typeof n.onResult=="function"&&n.onResult(v),p===!1?(v.isMatch=!1,d?v:!1):l(f)?(typeof n.onIgnore=="function"&&n.onIgnore(v),v.isMatch=!1,d?v:!1):(typeof n.onMatch=="function"&&n.onMatch(v),d?v:!0)};return t&&(c.state=o),c};de.test=(r,e,t,{glob:i,posix:n}={})=>{if(typeof r!="string")throw new TypeError("Expected input to be a string");if(r==="")return{isMatch:!1,output:""};let s=t||{},a=s.format||(n?Sl.toPosixSlashes:null),o=r===i,l=o&&a?a(r):r;return o===!1&&(l=a?a(r):r,o=l===i),(o===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?o=de.matchBase(r,e,t,n):o=e.exec(l)),{isMatch:Boolean(o),match:o,output:l}};de.matchBase=(r,e,t,i=Sl.isWindows(t))=>(e instanceof RegExp?e:de.makeRe(e,t)).test(a2.basename(r));de.isMatch=(r,e,t)=>de(e,t)(r);de.parse=(r,e)=>Array.isArray(r)?r.map(t=>de.parse(t,e)):kl(r,{...e,fastpaths:!1});de.scan=(r,e)=>o2(r,e);de.compileRe=(r,e,t=!1,i=!1)=>{if(t===!0)return r.output;let n=e||{},s=n.contains?"":"^",a=n.contains?"":"$",o=`${s}(?:${r.output})${a}`;r&&r.negated===!0&&(o=`^(?!${o}).*$`);let l=de.toRegex(o,e);return i===!0&&(l.state=r),l};de.makeRe=(r,e={},t=!1,i=!1)=>{if(!r||typeof r!="string")throw new TypeError("Expected a non-empty string");let n={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(r[0]==="."||r[0]==="*")&&(n.output=kl.fastpaths(r,e)),n.output||(n=kl(r,e)),de.compileRe(n,e,t,i)};de.toRegex=(r,e)=>{try{let t=e||{};return new RegExp(r,t.flags||(t.nocase?"i":""))}catch(t){if(e&&e.debug===!0)throw t;return/$^/}};de.constants=l2;ng.exports=de});var og=x((p6,ag)=>{u();"use strict";ag.exports=sg()});var dg=x((d6,pg)=>{u();"use strict";var lg=(Fn(),Bn),ug=jm(),ot=og(),Al=qi(),fg=r=>r===""||r==="./",cg=r=>{let e=r.indexOf("{");return e>-1&&r.indexOf("}",e)>-1},oe=(r,e,t)=>{e=[].concat(e),r=[].concat(r);let i=new Set,n=new Set,s=new Set,a=0,o=f=>{s.add(f.output),t&&t.onResult&&t.onResult(f)};for(let f=0;f<e.length;f++){let d=ot(String(e[f]),{...t,onResult:o},!0),p=d.state.negated||d.state.negatedExtglob;p&&a++;for(let h of r){let b=d(h,!0);!(p?!b.isMatch:b.isMatch)||(p?i.add(b.output):(i.delete(b.output),n.add(b.output)))}}let c=(a===e.length?[...s]:[...n]).filter(f=>!i.has(f));if(t&&c.length===0){if(t.failglob===!0)throw new Error(`No matches found for "${e.join(", ")}"`);if(t.nonull===!0||t.nullglob===!0)return t.unescape?e.map(f=>f.replace(/\\/g,"")):e}return c};oe.match=oe;oe.matcher=(r,e)=>ot(r,e);oe.isMatch=(r,e,t)=>ot(e,t)(r);oe.any=oe.isMatch;oe.not=(r,e,t={})=>{e=[].concat(e).map(String);let i=new Set,n=[],s=o=>{t.onResult&&t.onResult(o),n.push(o.output)},a=new Set(oe(r,e,{...t,onResult:s}));for(let o of n)a.has(o)||i.add(o);return[...i]};oe.contains=(r,e,t)=>{if(typeof r!="string")throw new TypeError(`Expected a string: "${lg.inspect(r)}"`);if(Array.isArray(e))return e.some(i=>oe.contains(r,i,t));if(typeof e=="string"){if(fg(r)||fg(e))return!1;if(r.includes(e)||r.startsWith("./")&&r.slice(2).includes(e))return!0}return oe.isMatch(r,e,{...t,contains:!0})};oe.matchKeys=(r,e,t)=>{if(!Al.isObject(r))throw new TypeError("Expected the first argument to be an object");let i=oe(Object.keys(r),e,t),n={};for(let s of i)n[s]=r[s];return n};oe.some=(r,e,t)=>{let i=[].concat(r);for(let n of[].concat(e)){let s=ot(String(n),t);if(i.some(a=>s(a)))return!0}return!1};oe.every=(r,e,t)=>{let i=[].concat(r);for(let n of[].concat(e)){let s=ot(String(n),t);if(!i.every(a=>s(a)))return!1}return!0};oe.all=(r,e,t)=>{if(typeof r!="string")throw new TypeError(`Expected a string: "${lg.inspect(r)}"`);return[].concat(e).every(i=>ot(i,t)(r))};oe.capture=(r,e,t)=>{let i=Al.isWindows(t),s=ot.makeRe(String(r),{...t,capture:!0}).exec(i?Al.toPosixSlashes(e):e);if(s)return s.slice(1).map(a=>a===void 0?"":a)};oe.makeRe=(...r)=>ot.makeRe(...r);oe.scan=(...r)=>ot.scan(...r);oe.parse=(r,e)=>{let t=[];for(let i of[].concat(r||[]))for(let n of ug(String(i),e))t.push(ot.parse(n,e));return t};oe.braces=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a string");return e&&e.nobrace===!0||!cg(r)?[r]:ug(r,e)};oe.braceExpand=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a string");return oe.braces(r,{...e,expand:!0})};oe.hasBraces=cg;pg.exports=oe});function mg(r,e){let t=e.content.files;t=t.filter(o=>typeof o=="string"),t=t.map(ll);let i=ps.generateTasks(t),n=[],s=[];for(let o of i)n.push(...o.positive.map(l=>gg(l,!1))),s.push(...o.negative.map(l=>gg(l,!0)));let a=[...n,...s];return a=c2(r,a),a=a.flatMap(p2),a=a.map(f2),a}function gg(r,e){let t={original:r,base:r,ignore:e,pattern:r,glob:null};return Zh(r)&&Object.assign(t,nm(r)),t}function f2(r){let e=ll(r.base);return e=ps.escapePath(e),r.pattern=r.glob?`${e}/${r.glob}`:e,r.pattern=r.ignore?`!${r.pattern}`:r.pattern,r}function c2(r,e){let t=[];return r.userConfigPath&&r.tailwindConfig.content.relative&&(t=[me.dirname(r.userConfigPath)]),e.map(i=>(i.base=me.resolve(...t,i.base),i))}function p2(r){let e=[r];try{let t=be.realpathSync(r.base);t!==r.base&&e.push({...r,base:t})}catch{}return e}function yg(r,e,t){let i=r.tailwindConfig.content.files.filter(a=>typeof a.raw=="string").map(({raw:a,extension:o="html"})=>({content:a,extension:o})),[n,s]=h2(e,t);for(let a of n){let o=me.extname(a).slice(1);i.push({file:a,extension:o})}return[i,s]}function d2(r){if(!r.some(s=>s.includes("**")&&!wg.test(s)))return()=>{};let t=[],i=[];for(let s of r){let a=hg.default.matcher(s);wg.test(s)&&i.push(a),t.push(a)}let n=!1;return s=>{if(n||i.some(f=>f(s)))return;let a=t.findIndex(f=>f(s));if(a===-1)return;let o=r[a],l=me.relative(m.cwd(),o);l[0]!=="."&&(l=`./${l}`);let c=bg.find(f=>s.includes(f));c&&(n=!0,G.warn("broad-content-glob-pattern",[`Your \`content\` configuration includes a pattern which looks like it's accidentally matching all of \`${c}\` and can cause serious performance issues.`,`Pattern: \`${l}\``,"See our documentation for recommendations:","https://tailwindcss.com/docs/content-configuration#pattern-recommendations"]))}}function h2(r,e){let t=r.map(o=>o.pattern),i=new Map,n=d2(t),s=new Set;Ze.DEBUG&&console.time("Finding changed files");let a=ps.sync(t,{absolute:!0});for(let o of a){n(o);let l=e.get(o)||-1/0,c=be.statSync(o).mtimeMs;c>l&&(s.add(o),i.set(o,c))}return Ze.DEBUG&&console.timeEnd("Finding changed files"),[s,i]}var hg,bg,wg,vg=P(()=>{u();ft();et();Jh();em();tm();sm();It();Be();hg=pe(dg());bg=["node_modules"],wg=new RegExp(`(${bg.map(r=>String.raw`\b${r}\b`).join("|")})`)});function xg(){}var kg=P(()=>{u()});function b2(r,e){for(let t of e){let i=`${r}${t}`;if(be.existsSync(i)&&be.statSync(i).isFile())return i}for(let t of e){let i=`${r}/index${t}`;if(be.existsSync(i))return i}return null}function*Sg(r,e,t,i=me.extname(r)){let n=b2(me.resolve(e,r),m2.includes(i)?g2:y2);if(n===null||t.has(n))return;t.add(n),yield n,e=me.dirname(n),i=me.extname(n);let s=be.readFileSync(n,"utf-8");for(let a of[...s.matchAll(/import[\s\S]*?['"](.{3,}?)['"]/gi),...s.matchAll(/import[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi),...s.matchAll(/require\(['"`](.+)['"`]\)/gi)])!a[1].startsWith(".")||(yield*Sg(a[1],e,t,i))}function Cl(r){return r===null?new Set:new Set(Sg(r,me.dirname(r),new Set))}var m2,g2,y2,Ag=P(()=>{u();ft();et();m2=[".js",".cjs",".mjs"],g2=["",".js",".cjs",".mjs",".ts",".cts",".mts",".jsx",".tsx"],y2=["",".ts",".cts",".mts",".tsx",".js",".cjs",".mjs",".jsx"]});function w2(r,e){if(_l.has(r))return _l.get(r);let t=mg(r,e);return _l.set(r,t).get(r)}function v2(r){let e=aa(r);if(e!==null){let[i,n,s,a]=_g.get(e)||[],o=Cl(e),l=!1,c=new Map;for(let p of o){let h=be.statSync(p).mtimeMs;c.set(p,h),(!a||!a.has(p)||h>a.get(p))&&(l=!0)}if(!l)return[i,e,n,s];for(let p of o)delete hf.cache[p];let f=ol(zr(xg(e))),d=Wi(f);return _g.set(e,[f,d,o,c]),[f,e,d,o]}let t=zr(r?.config??r??{});return t=ol(t),[t,null,Wi(t),[]]}function El(r){return({tailwindDirectives:e,registerDependency:t})=>(i,n)=>{let[s,a,o,l]=v2(r),c=new Set(l);if(e.size>0){c.add(n.opts.from);for(let b of n.messages)b.type==="dependency"&&c.add(b.file)}let[f,,d]=Vh(i,n,s,a,o,c),p=cs(f),h=w2(f,s);if(e.size>0){for(let y of h)for(let w of nl(y))t(w);let[b,v]=yg(f,h,p);for(let y of b)f.changedContent.push(y);for(let[y,w]of v.entries())d.set(y,w)}for(let b of l)t({type:"dependency",file:b});for(let[b,v]of d.entries())p.set(b,v);return f}}var Cg,_g,_l,Eg=P(()=>{u();ft();Cg=pe(Fs());wf();sa();oc();Oi();Hh();Xh();vg();kg();Ag();_g=new Cg.default({maxSize:100}),_l=new WeakMap});function Ol(r){let e=new Set,t=new Set,i=new Set;if(r.walkAtRules(n=>{n.name==="apply"&&i.add(n),n.name==="import"&&(n.params==='"tailwindcss/base"'||n.params==="'tailwindcss/base'"?(n.name="tailwind",n.params="base"):n.params==='"tailwindcss/components"'||n.params==="'tailwindcss/components'"?(n.name="tailwind",n.params="components"):n.params==='"tailwindcss/utilities"'||n.params==="'tailwindcss/utilities'"?(n.name="tailwind",n.params="utilities"):(n.params==='"tailwindcss/screens"'||n.params==="'tailwindcss/screens'"||n.params==='"tailwindcss/variants"'||n.params==="'tailwindcss/variants'")&&(n.name="tailwind",n.params="variants")),n.name==="tailwind"&&(n.params==="screens"&&(n.params="variants"),e.add(n.params)),["layer","responsive","variants"].includes(n.name)&&(["responsive","variants"].includes(n.name)&&G.warn(`${n.name}-at-rule-deprecated`,[`The \`@${n.name}\` directive has been deprecated in Tailwind CSS v3.0.`,"Use `@layer utilities` or `@layer components` instead.","https://tailwindcss.com/docs/upgrade-guide#replace-variants-with-layer"]),t.add(n))}),!e.has("base")||!e.has("components")||!e.has("utilities")){for(let n of t)if(n.name==="layer"&&["base","components","utilities"].includes(n.params)){if(!e.has(n.params))throw n.error(`\`@layer ${n.params}\` is used but no matching \`@tailwind ${n.params}\` directive is present.`)}else if(n.name==="responsive"){if(!e.has("utilities"))throw n.error("`@responsive` is used but `@tailwind utilities` is missing.")}else if(n.name==="variants"&&!e.has("utilities"))throw n.error("`@variants` is used but `@tailwind utilities` is missing.")}return{tailwindDirectives:e,applyDirectives:i}}var Og=P(()=>{u();Be()});function Qt(r,e=void 0,t=void 0){return r.map(i=>{let n=i.clone();return t!==void 0&&(n.raws.tailwind={...n.raws.tailwind,...t}),e!==void 0&&Tg(n,s=>{if(s.raws.tailwind?.preserveSource===!0&&s.source)return!1;s.source=e}),n})}function Tg(r,e){e(r)!==!1&&r.each?.(t=>Tg(t,e))}var Rg=P(()=>{u()});function Tl(r){return r=Array.isArray(r)?r:[r],r=r.map(e=>e instanceof RegExp?e.source:e),r.join("")}function Ne(r){return new RegExp(Tl(r),"g")}function qt(r){return`(?:${r.map(Tl).join("|")})`}function Rl(r){return`(?:${Tl(r)})?`}function Ig(r){return r&&x2.test(r)?r.replace(Pg,"\\$&"):r||""}var Pg,x2,Dg=P(()=>{u();Pg=/[\\^$.*+?()[\]{}|]/g,x2=RegExp(Pg.source)});function qg(r){let e=Array.from(k2(r));return t=>{let i=[];for(let n of e)for(let s of t.match(n)??[])i.push(C2(s));for(let n of i.slice()){let s=ve(n,".");for(let a=0;a<s.length;a++){let o=s[a];if(a>=s.length-1){i.push(o);continue}let l=Number(s[a+1]);isNaN(l)?i.push(o):a++}}return i}}function*k2(r){let e=r.tailwindConfig.separator,t=r.tailwindConfig.prefix!==""?Rl(Ne([/-?/,Ig(r.tailwindConfig.prefix)])):"",i=qt([/\[[^\s:'"`]+:[^\s\[\]]+\]/,/\[[^\s:'"`\]]+:[^\s]+?\[[^\s]+\][^\s]+?\]/,Ne([qt([/-?(?:\w+)/,/@(?:\w+)/]),Rl(qt([Ne([qt([/-(?:\w+-)*\['[^\s]+'\]/,/-(?:\w+-)*\["[^\s]+"\]/,/-(?:\w+-)*\[`[^\s]+`\]/,/-(?:\w+-)*\[(?:[^\s\[\]]+\[[^\s\[\]]+\])*[^\s:\[\]]+\]/]),/(?![{([]])/,/(?:\/[^\s'"`\\><$]*)?/]),Ne([qt([/-(?:\w+-)*\['[^\s]+'\]/,/-(?:\w+-)*\["[^\s]+"\]/,/-(?:\w+-)*\[`[^\s]+`\]/,/-(?:\w+-)*\[(?:[^\s\[\]]+\[[^\s\[\]]+\])*[^\s\[\]]+\]/]),/(?![{([]])/,/(?:\/[^\s'"`\\$]*)?/]),/[-\/][^\s'"`\\$={><]*/]))])]),n=[qt([Ne([/@\[[^\s"'`]+\](\/[^\s"'`]+)?/,e]),Ne([/([^\s"'`\[\\]+-)?\[[^\s"'`]+\]\/[\w_-]+/,e]),Ne([/([^\s"'`\[\\]+-)?\[[^\s"'`]+\]/,e]),Ne([/[^\s"'`\[\\]+/,e])]),qt([Ne([/([^\s"'`\[\\]+-)?\[[^\s`]+\]\/[\w_-]+/,e]),Ne([/([^\s"'`\[\\]+-)?\[[^\s`]+\]/,e]),Ne([/[^\s`\[\\]+/,e])])];for(let s of n)yield Ne(["((?=((",s,")+))\\2)?",/!?/,t,i]);yield/[^<>"'`\s.(){}[\]#=%$][^<>"'`\s(){}[\]#=%$]*[^<>"'`\s.(){}[\]#=%:$]/g}function C2(r){if(!r.includes("-["))return r;let e=0,t=[],i=r.matchAll(S2);i=Array.from(i).flatMap(n=>{let[,...s]=n;return s.map((a,o)=>Object.assign([],n,{index:n.index+o,0:a}))});for(let n of i){let s=n[0],a=t[t.length-1];if(s===a?t.pop():(s==="'"||s==='"'||s==="`")&&t.push(s),!a){if(s==="["){e++;continue}else if(s==="]"){e--;continue}if(e<0)return r.substring(0,n.index-1);if(e===0&&!A2.test(s))return r.substring(0,n.index)}}return r}var S2,A2,$g=P(()=>{u();Dg();zt();S2=/([\[\]'"`])([^\[\]'"`])?/g,A2=/[^"'`\s<>\]]+/});function _2(r,e){let t=r.tailwindConfig.content.extract;return t[e]||t.DEFAULT||Mg[e]||Mg.DEFAULT(r)}function E2(r,e){let t=r.content.transform;return t[e]||t.DEFAULT||Ng[e]||Ng.DEFAULT}function O2(r,e,t,i){Li.has(e)||Li.set(e,new Lg.default({maxSize:25e3}));for(let n of r.split(`-`))if(n=n.trim(),!i.has(n))if(i.add(n),Li.get(e).has(n))for(let s of Li.get(e).get(n))t.add(s);else{let s=e(n).filter(o=>o!=="!*"),a=new Set(s);for(let o of a)t.add(o);Li.get(e).set(n,a)}}function T2(r,e){let t=e.offsets.sort(r),i={base:new Set,defaults:new Set,components:new Set,utilities:new Set,variants:new Set};for(let[n,s]of t)i[n.layer].add(s);return i}function Pl(r){return async e=>{let t={base:null,components:null,utilities:null,variants:null};if(e.walkAtRules(y=>{y.name==="tailwind"&&Object.keys(t).includes(y.params)&&(t[y.params]=y)}),Object.values(t).every(y=>y===null))return e;let i=new Set([...r.candidates??[],gt]),n=new Set;bt.DEBUG&&console.time("Reading changed files");let s=[];for(let y of r.changedContent){let w=E2(r.tailwindConfig,y.extension),k=_2(r,y.extension);s.push([y,{transformer:w,extractor:k}])}let a=500;for(let y=0;y<s.length;y+=a){let w=s.slice(y,y+a);await Promise.all(w.map(async([{file:k,content:S},{transformer:E,extractor:T}])=>{S=k?await be.promises.readFile(k,"utf8"):S,O2(E(S),T,i,n)}))}bt.DEBUG&&console.timeEnd("Reading changed files");let o=r.classCache.size;bt.DEBUG&&console.time("Generate rules"),bt.DEBUG&&console.time("Sorting candidates");let l=new Set([...i].sort((y,w)=>y===w?0:y<w?-1:1));bt.DEBUG&&console.timeEnd("Sorting candidates"),as(l,r),bt.DEBUG&&console.timeEnd("Generate rules"),bt.DEBUG&&console.time("Build stylesheet"),(r.stylesheetCache===null||r.classCache.size!==o)&&(r.stylesheetCache=T2([...r.ruleCache],r)),bt.DEBUG&&console.timeEnd("Build stylesheet");let{defaults:c,base:f,components:d,utilities:p,variants:h}=r.stylesheetCache;t.base&&(t.base.before(Qt([...c,...f],t.base.source,{layer:"base"})),t.base.remove()),t.components&&(t.components.before(Qt([...d],t.components.source,{layer:"components"})),t.components.remove()),t.utilities&&(t.utilities.before(Qt([...p],t.utilities.source,{layer:"utilities"})),t.utilities.remove());let b=Array.from(h).filter(y=>{let w=y.raws.tailwind?.parentLayer;return w==="components"?t.components!==null:w==="utilities"?t.utilities!==null:!0});t.variants?(t.variants.before(Qt(b,t.variants.source,{layer:"variants"})),t.variants.remove()):b.length>0&&e.append(Qt(b,e.source,{layer:"variants"})),e.source.end=e.source.end??e.source.start;let v=b.some(y=>y.raws.tailwind?.parentLayer==="utilities");t.utilities&&p.size===0&&!v&&G.warn("content-problems",["No utility classes were detected in your source files. If this is unexpected, double-check the `content` option in your Tailwind CSS configuration.","https://tailwindcss.com/docs/content-configuration"]),bt.DEBUG&&(console.log("Potential classes: ",i.size),console.log("Active contexts: ",es.size)),r.changedContent=[],e.walkAtRules("layer",y=>{Object.keys(t).includes(y.params)&&y.remove()})}}var Lg,bt,Mg,Ng,Li,Bg=P(()=>{u();ft();Lg=pe(Fs());It();os();Be();Rg();$g();bt=Ze,Mg={DEFAULT:qg},Ng={DEFAULT:r=>r,svelte:r=>r.replace(/(?:^|\s)class:/g," ")};Li=new WeakMap});function xs(r){let e=new Map;ee.root({nodes:[r.clone()]}).walkRules(s=>{(0,vs.default)(a=>{a.walkClasses(o=>{let l=o.parent.toString(),c=e.get(l);c||e.set(l,c=new Set),c.add(o.value)})}).processSync(s.selector)});let i=Array.from(e.values(),s=>Array.from(s)),n=i.flat();return Object.assign(n,{groups:i})}function Il(r){return R2.astSync(r)}function Fg(r,e){let t=new Set;for(let i of r)t.add(i.split(e).pop());return Array.from(t)}function jg(r,e){let t=r.tailwindConfig.prefix;return typeof t=="function"?t(e):t+e}function*zg(r){for(yield r;r.parent;)yield r.parent,r=r.parent}function P2(r,e={}){let t=r.nodes;r.nodes=[];let i=r.clone(e);return r.nodes=t,i}function I2(r){for(let e of zg(r))if(r!==e){if(e.type==="root")break;r=P2(e,{nodes:[r]})}return r}function D2(r,e){let t=new Map;return r.walkRules(i=>{for(let a of zg(i))if(a.raws.tailwind?.layer!==void 0)return;let n=I2(i),s=e.offsets.create("user");for(let a of xs(i)){let o=t.get(a)||[];t.set(a,o),o.push([{layer:"user",sort:s,important:!1},n])}}),t}function q2(r,e){for(let t of r){if(e.notClassCache.has(t)||e.applyClassCache.has(t))continue;if(e.classCache.has(t)){e.applyClassCache.set(t,e.classCache.get(t).map(([n,s])=>[n,s.clone()]));continue}let i=Array.from(Yo(t,e));if(i.length===0){e.notClassCache.add(t);continue}e.applyClassCache.set(t,i)}return e.applyClassCache}function $2(r){let e=null;return{get:t=>(e=e||r(),e.get(t)),has:t=>(e=e||r(),e.has(t))}}function L2(r){return{get:e=>r.flatMap(t=>t.get(e)||[]),has:e=>r.some(t=>t.has(e))}}function Ug(r){let e=r.split(/[\s\t\n]+/g);return e[e.length-1]==="!important"?[e.slice(0,-1),!0]:[e,!1]}function Vg(r,e,t){let i=new Set,n=[];if(r.walkAtRules("apply",l=>{let[c]=Ug(l.params);for(let f of c)i.add(f);n.push(l)}),n.length===0)return;let s=L2([t,q2(i,e)]);function a(l,c,f){let d=Il(l),p=Il(c),b=Il(`.${Te(f)}`).nodes[0].nodes[0];return d.each(v=>{let y=new Set;p.each(w=>{let k=!1;w=w.clone(),w.walkClasses(S=>{S.value===b.value&&(k||(S.replaceWith(...v.nodes.map(E=>E.clone())),y.add(w),k=!0))})});for(let w of y){let k=[[]];for(let S of w.nodes)S.type==="combinator"?(k.push(S),k.push([])):k[k.length-1].push(S);w.nodes=[];for(let S of k)Array.isArray(S)&&S.sort((E,T)=>E.type==="tag"&&T.type==="class"?-1:E.type==="class"&&T.type==="tag"?1:E.type==="class"&&T.type==="pseudo"&&T.value.startsWith("::")?-1:E.type==="pseudo"&&E.value.startsWith("::")&&T.type==="class"?1:0),w.nodes=w.nodes.concat(S)}v.replaceWith(...y)}),d.toString()}let o=new Map;for(let l of n){let[c]=o.get(l.parent)||[[],l.source];o.set(l.parent,[c,l.source]);let[f,d]=Ug(l.params);if(l.parent.type==="atrule"){if(l.parent.name==="screen"){let p=l.parent.params;throw l.error(`@apply is not supported within nested at-rules like @screen. We suggest you write this as @apply ${f.map(h=>`${p}:${h}`).join(" ")} instead.`)}throw l.error(`@apply is not supported within nested at-rules like @${l.parent.name}. You can fix this by un-nesting @${l.parent.name}.`)}for(let p of f){if([jg(e,"group"),jg(e,"peer")].includes(p))throw l.error(`@apply should not be used with the '${p}' utility`);if(!s.has(p))throw l.error(`The \`${p}\` class does not exist. If \`${p}\` is a custom class, make sure it is defined within a \`@layer\` directive.`);let h=s.get(p);for(let[,b]of h)b.type!=="atrule"&&b.walkRules(()=>{throw l.error([`The \`${p}\` class cannot be used with \`@apply\` because \`@apply\` does not currently support nested CSS.`,"Rewrite the selector without nesting or configure the `tailwindcss/nesting` plugin:","https://tailwindcss.com/docs/using-with-preprocessors#nesting"].join(`-`))});c.push([p,d,h])}}for(let[l,[c,f]]of o){let d=[];for(let[h,b,v]of c){let y=[h,...Fg([h],e.tailwindConfig.separator)];for(let[w,k]of v){let S=xs(l),E=xs(k);if(E=E.groups.filter(R=>R.some(F=>y.includes(F))).flat(),E=E.concat(Fg(E,e.tailwindConfig.separator)),S.some(R=>E.includes(R)))throw k.error(`You cannot \`@apply\` the \`${h}\` utility here because it creates a circular dependency.`);let B=ee.root({nodes:[k.clone()]});B.walk(R=>{R.source=f}),(k.type!=="atrule"||k.type==="atrule"&&k.name!=="keyframes")&&B.walkRules(R=>{if(!xs(R).some(U=>U===h)){R.remove();return}let F=typeof e.tailwindConfig.important=="string"?e.tailwindConfig.important:null,_=l.raws.tailwind!==void 0&&F&&l.selector.indexOf(F)===0?l.selector.slice(F.length):l.selector;_===""&&(_=l.selector),R.selector=a(_,R.selector,h),F&&_!==l.selector&&(R.selector=is(R.selector,F)),R.walkDecls(U=>{U.important=w.important||b});let Q=(0,vs.default)().astSync(R.selector);Q.each(U=>pr(U)),R.selector=Q.toString()}),!!B.nodes[0]&&d.push([w.sort,B.nodes[0]])}}let p=e.offsets.sort(d).map(h=>h[1]);l.after(p)}for(let l of n)l.parent.nodes.length>1?l.remove():l.parent.remove();Vg(r,e,t)}function Dl(r){return e=>{let t=$2(()=>D2(e,r));Vg(e,r,t)}}var vs,R2,Hg=P(()=>{u();Ot();vs=pe(it());os();fr();Wo();ts();R2=(0,vs.default)()});var Wg=x((nq,ks)=>{u();(function(){"use strict";function r(i,n,s){if(!i)return null;r.caseSensitive||(i=i.toLowerCase());var a=r.threshold===null?null:r.threshold*i.length,o=r.thresholdAbsolute,l;a!==null&&o!==null?l=Math.min(a,o):a!==null?l=a:o!==null?l=o:l=null;var c,f,d,p,h,b=n.length;for(h=0;h<b;h++)if(f=n[h],s&&(f=f[s]),!!f&&(r.caseSensitive?d=f:d=f.toLowerCase(),p=t(i,d,l),(l===null||p<l)&&(l=p,s&&r.returnWinningObject?c=n[h]:c=f,r.returnFirstMatch)))return c;return c||r.nullResultValue}r.threshold=.4,r.thresholdAbsolute=20,r.caseSensitive=!1,r.nullResultValue=null,r.returnWinningObject=null,r.returnFirstMatch=!1,typeof ks!="undefined"&&ks.exports?ks.exports=r:window.didYouMean=r;var e=Math.pow(2,32)-1;function t(i,n,s){s=s||s===0?s:e;var a=i.length,o=n.length;if(a===0)return Math.min(s+1,o);if(o===0)return Math.min(s+1,a);if(Math.abs(a-o)>s)return s+1;var l=[],c,f,d,p,h;for(c=0;c<=o;c++)l[c]=[c];for(f=0;f<=a;f++)l[0][f]=f;for(c=1;c<=o;c++){for(d=e,p=1,c>s&&(p=c-s),h=o+1,h>s+c&&(h=s+c),f=1;f<=a;f++)f<p||f>h?l[c][f]=s+1:n.charAt(c-1)===i.charAt(f-1)?l[c][f]=l[c-1][f-1]:l[c][f]=Math.min(l[c-1][f-1]+1,Math.min(l[c][f-1]+1,l[c-1][f]+1)),l[c][f]<d&&(d=l[c][f]);if(d>s)return s+1}return l[o][a]}})()});var Qg=x((sq,Gg)=>{u();var ql="(".charCodeAt(0),$l=")".charCodeAt(0),Ss="'".charCodeAt(0),Ll='"'.charCodeAt(0),Ml="\\".charCodeAt(0),yr="/".charCodeAt(0),Nl=",".charCodeAt(0),Bl=":".charCodeAt(0),As="*".charCodeAt(0),M2="u".charCodeAt(0),N2="U".charCodeAt(0),B2="+".charCodeAt(0),F2=/^[a-f0-9?-]+$/i;Gg.exports=function(r){for(var e=[],t=r,i,n,s,a,o,l,c,f,d=0,p=t.charCodeAt(d),h=t.length,b=[{nodes:e}],v=0,y,w="",k="",S="";d<h;)if(p<=32){i=d;do i+=1,p=t.charCodeAt(i);while(p<=32);a=t.slice(d,i),s=e[e.length-1],p===$l&&v?S=a:s&&s.type==="div"?(s.after=a,s.sourceEndIndex+=a.length):p===Nl||p===Bl||p===yr&&t.charCodeAt(i+1)!==As&&(!y||y&&y.type==="function"&&!1)?k=a:e.push({type:"space",sourceIndex:d,sourceEndIndex:i,value:a}),d=i}else if(p===Ss||p===Ll){i=d,n=p===Ss?"'":'"',a={type:"string",sourceIndex:d,quote:n};do if(o=!1,i=t.indexOf(n,i+1),~i)for(l=i;t.charCodeAt(l-1)===Ml;)l-=1,o=!o;else t+=n,i=t.length-1,a.unclosed=!0;while(o);a.value=t.slice(d+1,i),a.sourceEndIndex=a.unclosed?i:i+1,e.push(a),d=i+1,p=t.charCodeAt(d)}else if(p===yr&&t.charCodeAt(d+1)===As)i=t.indexOf("*/",d),a={type:"comment",sourceIndex:d,sourceEndIndex:i+2},i===-1&&(a.unclosed=!0,i=t.length,a.sourceEndIndex=i),a.value=t.slice(d+2,i),e.push(a),d=i+2,p=t.charCodeAt(d);else if((p===yr||p===As)&&y&&y.type==="function")a=t[d],e.push({type:"word",sourceIndex:d-k.length,sourceEndIndex:d+a.length,value:a}),d+=1,p=t.charCodeAt(d);else if(p===yr||p===Nl||p===Bl)a=t[d],e.push({type:"div",sourceIndex:d-k.length,sourceEndIndex:d+a.length,value:a,before:k,after:""}),k="",d+=1,p=t.charCodeAt(d);else if(ql===p){i=d;do i+=1,p=t.charCodeAt(i);while(p<=32);if(f=d,a={type:"function",sourceIndex:d-w.length,value:w,before:t.slice(f+1,i)},d=i,w==="url"&&p!==Ss&&p!==Ll){i-=1;do if(o=!1,i=t.indexOf(")",i+1),~i)for(l=i;t.charCodeAt(l-1)===Ml;)l-=1,o=!o;else t+=")",i=t.length-1,a.unclosed=!0;while(o);c=i;do c-=1,p=t.charCodeAt(c);while(p<=32);f<c?(d!==c+1?a.nodes=[{type:"word",sourceIndex:d,sourceEndIndex:c+1,value:t.slice(d,c+1)}]:a.nodes=[],a.unclosed&&c+1!==i?(a.after="",a.nodes.push({type:"space",sourceIndex:c+1,sourceEndIndex:i,value:t.slice(c+1,i)})):(a.after=t.slice(c+1,i),a.sourceEndIndex=i)):(a.after="",a.nodes=[]),d=i+1,a.sourceEndIndex=a.unclosed?i:d,p=t.charCodeAt(d),e.push(a)}else v+=1,a.after="",a.sourceEndIndex=d+1,e.push(a),b.push(a),e=a.nodes=[],y=a;w=""}else if($l===p&&v)d+=1,p=t.charCodeAt(d),y.after=S,y.sourceEndIndex+=S.length,S="",v-=1,b[b.length-1].sourceEndIndex=d,b.pop(),y=b[v],e=y.nodes;else{i=d;do p===Ml&&(i+=1),i+=1,p=t.charCodeAt(i);while(i<h&&!(p<=32||p===Ss||p===Ll||p===Nl||p===Bl||p===yr||p===ql||p===As&&y&&y.type==="function"&&!0||p===yr&&y.type==="function"&&!0||p===$l&&v));a=t.slice(d,i),ql===p?w=a:(M2===a.charCodeAt(0)||N2===a.charCodeAt(0))&&B2===a.charCodeAt(1)&&F2.test(a.slice(2))?e.push({type:"unicode-range",sourceIndex:d,sourceEndIndex:i,value:a}):e.push({type:"word",sourceIndex:d,sourceEndIndex:i,value:a}),d=i}for(d=b.length-1;d;d-=1)b[d].unclosed=!0,b[d].sourceEndIndex=t.length;return b[0].nodes}});var Kg=x((aq,Yg)=>{u();Yg.exports=function r(e,t,i){var n,s,a,o;for(n=0,s=e.length;n<s;n+=1)a=e[n],i||(o=t(a,n,e)),o!==!1&&a.type==="function"&&Array.isArray(a.nodes)&&r(a.nodes,t,i),i&&t(a,n,e)}});var ey=x((oq,Jg)=>{u();function Xg(r,e){var t=r.type,i=r.value,n,s;return e&&(s=e(r))!==void 0?s:t==="word"||t==="space"?i:t==="string"?(n=r.quote||"",n+i+(r.unclosed?"":n)):t==="comment"?"/*"+i+(r.unclosed?"":"*/"):t==="div"?(r.before||"")+i+(r.after||""):Array.isArray(r.nodes)?(n=Zg(r.nodes,e),t!=="function"?n:i+"("+(r.before||"")+n+(r.after||"")+(r.unclosed?"":")")):i}function Zg(r,e){var t,i;if(Array.isArray(r)){for(t="",i=r.length-1;~i;i-=1)t=Xg(r[i],e)+t;return t}return Xg(r,e)}Jg.exports=Zg});var ry=x((lq,ty)=>{u();var Cs="-".charCodeAt(0),_s="+".charCodeAt(0),Fl=".".charCodeAt(0),j2="e".charCodeAt(0),z2="E".charCodeAt(0);function U2(r){var e=r.charCodeAt(0),t;if(e===_s||e===Cs){if(t=r.charCodeAt(1),t>=48&&t<=57)return!0;var i=r.charCodeAt(2);return t===Fl&&i>=48&&i<=57}return e===Fl?(t=r.charCodeAt(1),t>=48&&t<=57):e>=48&&e<=57}ty.exports=function(r){var e=0,t=r.length,i,n,s;if(t===0||!U2(r))return!1;for(i=r.charCodeAt(e),(i===_s||i===Cs)&&e++;e<t&&(i=r.charCodeAt(e),!(i<48||i>57));)e+=1;if(i=r.charCodeAt(e),n=r.charCodeAt(e+1),i===Fl&&n>=48&&n<=57)for(e+=2;e<t&&(i=r.charCodeAt(e),!(i<48||i>57));)e+=1;if(i=r.charCodeAt(e),n=r.charCodeAt(e+1),s=r.charCodeAt(e+2),(i===j2||i===z2)&&(n>=48&&n<=57||(n===_s||n===Cs)&&s>=48&&s<=57))for(e+=n===_s||n===Cs?3:2;e<t&&(i=r.charCodeAt(e),!(i<48||i>57));)e+=1;return{number:r.slice(0,e),unit:r.slice(e)}}});var ay=x((uq,sy)=>{u();var V2=Qg(),iy=Kg(),ny=ey();function $t(r){return this instanceof $t?(this.nodes=V2(r),this):new $t(r)}$t.prototype.toString=function(){return Array.isArray(this.nodes)?ny(this.nodes):""};$t.prototype.walk=function(r,e){return iy(this.nodes,r,e),this};$t.unit=ry();$t.walk=iy;$t.stringify=ny;sy.exports=$t});function zl(r){return typeof r=="object"&&r!==null}function H2(r,e){let t=kt(e);do if(t.pop(),(0,Mi.default)(r,t)!==void 0)break;while(t.length);return t.length?t:void 0}function br(r){return typeof r=="string"?r:r.reduce((e,t,i)=>t.includes(".")?`${e}[${t}]`:i===0?t:`${e}.${t}`,"")}function ly(r){return r.map(e=>`'${e}'`).join(", ")}function uy(r){return ly(Object.keys(r))}function Ul(r,e,t,i={}){let n=Array.isArray(e)?br(e):e.replace(/^['"]+|['"]+$/g,""),s=Array.isArray(e)?e:kt(n),a=(0,Mi.default)(r.theme,s,t);if(a===void 0){let l=`'${n}' does not exist in your theme config.`,c=s.slice(0,-1),f=(0,Mi.default)(r.theme,c);if(zl(f)){let d=Object.keys(f).filter(h=>Ul(r,[...c,h]).isValid),p=(0,oy.default)(s[s.length-1],d);p?l+=` Did you mean '${br([...c,p])}'?`:d.length>0&&(l+=` '${br(c)}' has the following valid keys: ${ly(d)}`)}else{let d=H2(r.theme,n);if(d){let p=(0,Mi.default)(r.theme,d);zl(p)?l+=` '${br(d)}' has the following keys: ${uy(p)}`:l+=` '${br(d)}' is not an object.`}else l+=` Your theme has the following top-level keys: ${uy(r.theme)}`}return{isValid:!1,error:l}}if(!(typeof a=="string"||typeof a=="number"||typeof a=="function"||a instanceof String||a instanceof Number||Array.isArray(a))){let l=`'${n}' was found but does not resolve to a string.`;if(zl(a)){let c=Object.keys(a).filter(f=>Ul(r,[...s,f]).isValid);c.length&&(l+=` Did you mean something like '${br([...s,c[0]])}'?`)}return{isValid:!1,error:l}}let[o]=s;return{isValid:!0,value:mt(o)(a,i)}}function W2(r,e,t){e=e.map(n=>fy(r,n,t));let i=[""];for(let n of e)n.type==="div"&&n.value===","?i.push(""):i[i.length-1]+=jl.default.stringify(n);return i}function fy(r,e,t){if(e.type==="function"&&t[e.value]!==void 0){let i=W2(r,e.nodes,t);e.type="word",e.value=t[e.value](r,...i)}return e}function G2(r,e,t){return Object.keys(t).some(n=>e.includes(`${n}(`))?(0,jl.default)(e).walk(n=>{fy(r,n,t)}).toString():e}function*Y2(r){r=r.replace(/^['"]+|['"]+$/g,"");let e=r.match(/^([^\s]+)(?![^\[]*\])(?:\s*\/\s*([^\/\s]+))$/),t;yield[r,void 0],e&&(r=e[1],t=e[2],yield[r,t])}function K2(r,e,t){let i=Array.from(Y2(e)).map(([n,s])=>Object.assign(Ul(r,n,t,{opacityValue:s}),{resolvedPath:n,alpha:s}));return i.find(n=>n.isValid)??i[0]}function cy(r){let e=r.tailwindConfig,t={theme:(i,n,...s)=>{let{isValid:a,value:o,error:l,alpha:c}=K2(e,n,s.length?s:void 0);if(!a){let p=i.parent,h=p?.raws.tailwind?.candidate;if(p&&h!==void 0){r.markInvalidUtilityNode(p),p.remove(),G.warn("invalid-theme-key-in-class",[`The utility \`${h}\` contains an invalid theme value and was not generated.`]);return}throw i.error(l)}let f=Xt(o),d=f!==void 0&&typeof f=="function";return(c!==void 0||d)&&(c===void 0&&(c=1),o=Je(f,c,f)),o},screen:(i,n)=>{n=n.replace(/^['"]+/g,"").replace(/['"]+$/g,"");let a=Rt(e.theme.screens).find(({name:o})=>o===n);if(!a)throw i.error(`The '${n}' screen does not exist in your theme.`);return Tt(a)}};return i=>{i.walk(n=>{let s=Q2[n.type];s!==void 0&&(n[s]=G2(n,n[s],t))})}}var Mi,oy,jl,Q2,py=P(()=>{u();Mi=pe(Ra()),oy=pe(Wg());Ci();jl=pe(ay());Zn();Yn();Yi();Lr();Fr();Be();Q2={atrule:"params",decl:"value"}});function dy({tailwindConfig:{theme:r}}){return function(e){e.walkAtRules("screen",t=>{let i=t.params,s=Rt(r.screens).find(({name:a})=>a===i);if(!s)throw t.error(`No \`${i}\` screen found.`);t.name="media",t.params=Tt(s)})}}var hy=P(()=>{u();Zn();Yn()});function X2(r){let e=r.filter(o=>o.type!=="pseudo"||o.nodes.length>0?!0:o.value.startsWith("::")||[":before",":after",":first-line",":first-letter"].includes(o.value)).reverse(),t=new Set(["tag","class","id","attribute"]),i=e.findIndex(o=>t.has(o.type));if(i===-1)return e.reverse().join("").trim();let n=e[i],s=my[n.type]?my[n.type](n):n;e=e.slice(0,i);let a=e.findIndex(o=>o.type==="combinator"&&o.value===">");return a!==-1&&(e.splice(0,a),e.unshift(Es.default.universal())),[s,...e.reverse()].join("").trim()}function J2(r){return Vl.has(r)||Vl.set(r,Z2.transformSync(r)),Vl.get(r)}function Hl({tailwindConfig:r}){return e=>{let t=new Map,i=new Set;if(e.walkAtRules("defaults",n=>{if(n.nodes&&n.nodes.length>0){i.add(n);return}let s=n.params;t.has(s)||t.set(s,new Set),t.get(s).add(n.parent),n.remove()}),we(r,"optimizeUniversalDefaults"))for(let n of i){let s=new Map,a=t.get(n.params)??[];for(let o of a)for(let l of J2(o.selector)){let c=l.includes(":-")||l.includes("::-")||l.includes(":has")?l:"__DEFAULT__",f=s.get(c)??new Set;s.set(c,f),f.add(l)}if(s.size===0){n.remove();continue}for(let[,o]of s){let l=ee.rule({source:n.source});l.selectors=[...o],l.append(n.nodes.map(c=>c.clone())),n.before(l)}n.remove()}else if(i.size){let n=ee.rule({selectors:["*","::before","::after"]});for(let a of i)n.append(a.nodes),n.parent||a.before(n),n.source||(n.source=a.source),a.remove();let s=n.clone({selectors:["::backdrop"]});n.after(s)}}}var Es,my,Z2,Vl,gy=P(()=>{u();Ot();Es=pe(it());ct();my={id(r){return Es.default.attribute({attribute:"id",operator:"=",value:r.value,quoteMark:'"'})}};Z2=(0,Es.default)(r=>r.map(e=>{let t=e.split(i=>i.type==="combinator"&&i.value===" ").pop();return X2(t)})),Vl=new Map});function Wl(){function r(e){let t=null;e.each(i=>{if(!eO.has(i.type)){t=null;return}if(t===null){t=i;return}let n=yy[i.type];i.type==="atrule"&&i.name==="font-face"?t=i:n.every(s=>(i[s]??"").replace(/\s+/g," ")===(t[s]??"").replace(/\s+/g," "))?(i.nodes&&t.append(i.nodes),i.remove()):t=i}),e.each(i=>{i.type==="atrule"&&r(i)})}return e=>{r(e)}}var yy,eO,by=P(()=>{u();yy={atrule:["name","params"],rule:["selector"]},eO=new Set(Object.keys(yy))});function Gl(){return r=>{r.walkRules(e=>{let t=new Map,i=new Set([]),n=new Map;e.walkDecls(s=>{if(s.parent===e){if(t.has(s.prop)){if(t.get(s.prop).value===s.value){i.add(t.get(s.prop)),t.set(s.prop,s);return}n.has(s.prop)||n.set(s.prop,new Set),n.get(s.prop).add(t.get(s.prop)),n.get(s.prop).add(s)}t.set(s.prop,s)}});for(let s of i)s.remove();for(let s of n.values()){let a=new Map;for(let o of s){let l=rO(o.value);l!==null&&(a.has(l)||a.set(l,new Set),a.get(l).add(o))}for(let o of a.values()){let l=Array.from(o).slice(0,-1);for(let c of l)c.remove()}}})}}function rO(r){let e=/^-?\d*.?\d+([\w%]+)?$/g.exec(r);return e?e[1]??tO:null}var tO,wy=P(()=>{u();tO=Symbol("unitless-number")});function iO(r){if(!r.walkAtRules)return;let e=new Set;if(r.walkAtRules("apply",t=>{e.add(t.parent)}),e.size!==0)for(let t of e){let i=[],n=[];for(let s of t.nodes)s.type==="atrule"&&s.name==="apply"?(n.length>0&&(i.push(n),n=[]),i.push([s])):n.push(s);if(n.length>0&&i.push(n),i.length!==1){for(let s of[...i].reverse()){let a=t.clone({nodes:[]});a.append(s),t.after(a)}t.remove()}}}function Os(){return r=>{iO(r)}}var vy=P(()=>{u()});function Ts(r){return async function(e,t){let{tailwindDirectives:i,applyDirectives:n}=Ol(e);Os()(e,t);let s=r({tailwindDirectives:i,applyDirectives:n,registerDependency(a){t.messages.push({plugin:"tailwindcss",parent:t.opts.from,...a})},createContext(a,o){return il(a,o,e)}})(e,t);if(s.tailwindConfig.separator==="-")throw new Error("The '-' character cannot be used as a custom separator in JIT mode due to parsing ambiguity. Please use another character like '_' instead.");Rf(s.tailwindConfig),await Pl(s)(e,t),Os()(e,t),Dl(s)(e,t),cy(s)(e,t),dy(s)(e,t),Hl(s)(e,t),Wl(s)(e,t),Gl(s)(e,t)}}var xy=P(()=>{u();Og();Bg();Hg();py();hy();gy();by();wy();vy();Oi();ct()});function ky(r,e){let t=null,i=null;return r.walkAtRules("config",n=>{if(i=n.source?.input.file??e.opts.from??null,i===null)throw n.error("The `@config` directive cannot be used without setting `from` in your PostCSS config.");if(t)throw n.error("Only one `@config` directive is allowed per file.");let s=n.params.match(/(['"])(.*?)\1/);if(!s)throw n.error("A path is required when using the `@config` directive.");let a=s[2];if(me.isAbsolute(a))throw n.error("The `@config` directive cannot be used with an absolute path.");if(t=me.resolve(me.dirname(i),a),!be.existsSync(t))throw n.error(`The config file at "${a}" does not exist. Make sure the path is correct and the file exists.`);n.remove()}),t||null}var Sy=P(()=>{u();ft();et()});var Ay=x((Wq,Ql)=>{u();Eg();xy();It();Sy();Ql.exports=function(e){return{postcssPlugin:"tailwindcss",plugins:[Ze.DEBUG&&function(t){return console.log(`-`),console.time("JIT TOTAL"),t},async function(t,i){e=ky(t,i)??e;let n=El(e);if(t.type==="document"){let s=t.nodes.filter(a=>a.type==="root");for(let a of s)a.type==="root"&&await Ts(n)(a,i);return}await Ts(n)(t,i)},Ze.DEBUG&&function(t){return console.timeEnd("JIT TOTAL"),console.log(`-`),t}].filter(Boolean)}};Ql.exports.postcss=!0});var _y=x((Gq,Cy)=>{u();Cy.exports=Ay()});var Yl=x((Qq,Ey)=>{u();Ey.exports=()=>["and_chr 114","and_uc 15.5","chrome 114","chrome 113","chrome 109","edge 114","firefox 114","ios_saf 16.5","ios_saf 16.4","ios_saf 16.3","ios_saf 16.1","opera 99","safari 16.5","samsung 21"]});var Rs={};Ge(Rs,{agents:()=>nO,feature:()=>sO});function sO(){return{status:"cr",title:"CSS Feature Queries",stats:{ie:{"6":"n","7":"n","8":"n","9":"n","10":"n","11":"n","5.5":"n"},edge:{"12":"y","13":"y","14":"y","15":"y","16":"y","17":"y","18":"y","79":"y","80":"y","81":"y","83":"y","84":"y","85":"y","86":"y","87":"y","88":"y","89":"y","90":"y","91":"y","92":"y","93":"y","94":"y","95":"y","96":"y","97":"y","98":"y","99":"y","100":"y","101":"y","102":"y","103":"y","104":"y","105":"y","106":"y","107":"y","108":"y","109":"y","110":"y","111":"y","112":"y","113":"y","114":"y"},firefox:{"2":"n","3":"n","4":"n","5":"n","6":"n","7":"n","8":"n","9":"n","10":"n","11":"n","12":"n","13":"n","14":"n","15":"n","16":"n","17":"n","18":"n","19":"n","20":"n","21":"n","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y","30":"y","31":"y","32":"y","33":"y","34":"y","35":"y","36":"y","37":"y","38":"y","39":"y","40":"y","41":"y","42":"y","43":"y","44":"y","45":"y","46":"y","47":"y","48":"y","49":"y","50":"y","51":"y","52":"y","53":"y","54":"y","55":"y","56":"y","57":"y","58":"y","59":"y","60":"y","61":"y","62":"y","63":"y","64":"y","65":"y","66":"y","67":"y","68":"y","69":"y","70":"y","71":"y","72":"y","73":"y","74":"y","75":"y","76":"y","77":"y","78":"y","79":"y","80":"y","81":"y","82":"y","83":"y","84":"y","85":"y","86":"y","87":"y","88":"y","89":"y","90":"y","91":"y","92":"y","93":"y","94":"y","95":"y","96":"y","97":"y","98":"y","99":"y","100":"y","101":"y","102":"y","103":"y","104":"y","105":"y","106":"y","107":"y","108":"y","109":"y","110":"y","111":"y","112":"y","113":"y","114":"y","115":"y","116":"y","117":"y","3.5":"n","3.6":"n"},chrome:{"4":"n","5":"n","6":"n","7":"n","8":"n","9":"n","10":"n","11":"n","12":"n","13":"n","14":"n","15":"n","16":"n","17":"n","18":"n","19":"n","20":"n","21":"n","22":"n","23":"n","24":"n","25":"n","26":"n","27":"n","28":"y","29":"y","30":"y","31":"y","32":"y","33":"y","34":"y","35":"y","36":"y","37":"y","38":"y","39":"y","40":"y","41":"y","42":"y","43":"y","44":"y","45":"y","46":"y","47":"y","48":"y","49":"y","50":"y","51":"y","52":"y","53":"y","54":"y","55":"y","56":"y","57":"y","58":"y","59":"y","60":"y","61":"y","62":"y","63":"y","64":"y","65":"y","66":"y","67":"y","68":"y","69":"y","70":"y","71":"y","72":"y","73":"y","74":"y","75":"y","76":"y","77":"y","78":"y","79":"y","80":"y","81":"y","83":"y","84":"y","85":"y","86":"y","87":"y","88":"y","89":"y","90":"y","91":"y","92":"y","93":"y","94":"y","95":"y","96":"y","97":"y","98":"y","99":"y","100":"y","101":"y","102":"y","103":"y","104":"y","105":"y","106":"y","107":"y","108":"y","109":"y","110":"y","111":"y","112":"y","113":"y","114":"y","115":"y","116":"y","117":"y"},safari:{"4":"n","5":"n","6":"n","7":"n","8":"n","9":"y","10":"y","11":"y","12":"y","13":"y","14":"y","15":"y","17":"y","9.1":"y","10.1":"y","11.1":"y","12.1":"y","13.1":"y","14.1":"y","15.1":"y","15.2-15.3":"y","15.4":"y","15.5":"y","15.6":"y","16.0":"y","16.1":"y","16.2":"y","16.3":"y","16.4":"y","16.5":"y","16.6":"y",TP:"y","3.1":"n","3.2":"n","5.1":"n","6.1":"n","7.1":"n"},opera:{"9":"n","11":"n","12":"n","15":"y","16":"y","17":"y","18":"y","19":"y","20":"y","21":"y","22":"y","23":"y","24":"y","25":"y","26":"y","27":"y","28":"y","29":"y","30":"y","31":"y","32":"y","33":"y","34":"y","35":"y","36":"y","37":"y","38":"y","39":"y","40":"y","41":"y","42":"y","43":"y","44":"y","45":"y","46":"y","47":"y","48":"y","49":"y","50":"y","51":"y","52":"y","53":"y","54":"y","55":"y","56":"y","57":"y","58":"y","60":"y","62":"y","63":"y","64":"y","65":"y","66":"y","67":"y","68":"y","69":"y","70":"y","71":"y","72":"y","73":"y","74":"y","75":"y","76":"y","77":"y","78":"y","79":"y","80":"y","81":"y","82":"y","83":"y","84":"y","85":"y","86":"y","87":"y","88":"y","89":"y","90":"y","91":"y","92":"y","93":"y","94":"y","95":"y","96":"y","97":"y","98":"y","99":"y","100":"y","12.1":"y","9.5-9.6":"n","10.0-10.1":"n","10.5":"n","10.6":"n","11.1":"n","11.5":"n","11.6":"n"},ios_saf:{"8":"n","17":"y","9.0-9.2":"y","9.3":"y","10.0-10.2":"y","10.3":"y","11.0-11.2":"y","11.3-11.4":"y","12.0-12.1":"y","12.2-12.5":"y","13.0-13.1":"y","13.2":"y","13.3":"y","13.4-13.7":"y","14.0-14.4":"y","14.5-14.8":"y","15.0-15.1":"y","15.2-15.3":"y","15.4":"y","15.5":"y","15.6":"y","16.0":"y","16.1":"y","16.2":"y","16.3":"y","16.4":"y","16.5":"y","16.6":"y","3.2":"n","4.0-4.1":"n","4.2-4.3":"n","5.0-5.1":"n","6.0-6.1":"n","7.0-7.1":"n","8.1-8.4":"n"},op_mini:{all:"y"},android:{"3":"n","4":"n","114":"y","4.4":"y","4.4.3-4.4.4":"y","2.1":"n","2.2":"n","2.3":"n","4.1":"n","4.2-4.3":"n"},bb:{"7":"n","10":"n"},op_mob:{"10":"n","11":"n","12":"n","73":"y","11.1":"n","11.5":"n","12.1":"n"},and_chr:{"114":"y"},and_ff:{"115":"y"},ie_mob:{"10":"n","11":"n"},and_uc:{"15.5":"y"},samsung:{"4":"y","20":"y","21":"y","5.0-5.4":"y","6.2-6.4":"y","7.2-7.4":"y","8.2":"y","9.2":"y","10.1":"y","11.1-11.2":"y","12.0":"y","13.0":"y","14.0":"y","15.0":"y","16.0":"y","17.0":"y","18.0":"y","19.0":"y"},and_qq:{"13.1":"y"},baidu:{"13.18":"y"},kaios:{"2.5":"y","3.0-3.1":"y"}}}}var nO,Ps=P(()=>{u();nO={ie:{prefix:"ms"},edge:{prefix:"webkit",prefix_exceptions:{"12":"ms","13":"ms","14":"ms","15":"ms","16":"ms","17":"ms","18":"ms"}},firefox:{prefix:"moz"},chrome:{prefix:"webkit"},safari:{prefix:"webkit"},opera:{prefix:"webkit",prefix_exceptions:{"9":"o","11":"o","12":"o","9.5-9.6":"o","10.0-10.1":"o","10.5":"o","10.6":"o","11.1":"o","11.5":"o","11.6":"o","12.1":"o"}},ios_saf:{prefix:"webkit"},op_mini:{prefix:"o"},android:{prefix:"webkit"},bb:{prefix:"webkit"},op_mob:{prefix:"o",prefix_exceptions:{"73":"webkit"}},and_chr:{prefix:"webkit"},and_ff:{prefix:"moz"},ie_mob:{prefix:"ms"},and_uc:{prefix:"webkit",prefix_exceptions:{"15.5":"webkit"}},samsung:{prefix:"webkit"},and_qq:{prefix:"webkit"},baidu:{prefix:"webkit"},kaios:{prefix:"moz"}}});var Oy=x(()=>{u()});var _e=x((Xq,Lt)=>{u();var{list:Kl}=$e();Lt.exports.error=function(r){let e=new Error(r);throw e.autoprefixer=!0,e};Lt.exports.uniq=function(r){return[...new Set(r)]};Lt.exports.removeNote=function(r){return r.includes(" ")?r.split(" ")[0]:r};Lt.exports.escapeRegexp=function(r){return r.replace(/[$()*+-.?[\\\]^{|}]/g,"\\$&")};Lt.exports.regexp=function(r,e=!0){return e&&(r=this.escapeRegexp(r)),new RegExp(`(^|[\\s,(])(${r}($|[\\s(,]))`,"gi")};Lt.exports.editList=function(r,e){let t=Kl.comma(r),i=e(t,[]);if(t===i)return r;let n=r.match(/,\s*/);return n=n?n[0]:", ",i.join(n)};Lt.exports.splitSelector=function(r){return Kl.comma(r).map(e=>Kl.space(e).map(t=>t.split(/(?=\.|#)/g)))}});var Mt=x((Zq,Py)=>{u();var aO=Yl(),Ty=(Ps(),Rs).agents,oO=_e(),Ry=class{static prefixes(){if(this.prefixesCache)return this.prefixesCache;this.prefixesCache=[];for(let e in Ty)this.prefixesCache.push(`-${Ty[e].prefix}-`);return this.prefixesCache=oO.uniq(this.prefixesCache).sort((e,t)=>t.length-e.length),this.prefixesCache}static withPrefix(e){return this.prefixesRegexp||(this.prefixesRegexp=new RegExp(this.prefixes().join("|"))),this.prefixesRegexp.test(e)}constructor(e,t,i,n){this.data=e,this.options=i||{},this.browserslistOpts=n||{},this.selected=this.parse(t)}parse(e){let t={};for(let i in this.browserslistOpts)t[i]=this.browserslistOpts[i];return t.path=this.options.from,aO(e,t)}prefix(e){let[t,i]=e.split(" "),n=this.data[t],s=n.prefix_exceptions&&n.prefix_exceptions[i];return s||(s=n.prefix),`-${s}-`}isSelected(e){return this.selected.includes(e)}};Py.exports=Ry});var Ni=x((Jq,Iy)=>{u();Iy.exports={prefix(r){let e=r.match(/^(-\w+-)/);return e?e[0]:""},unprefixed(r){return r.replace(/^-\w+-/,"")}}});var wr=x((e$,qy)=>{u();var lO=Mt(),Dy=Ni(),uO=_e();function Xl(r,e){let t=new r.constructor;for(let i of Object.keys(r||{})){let n=r[i];i==="parent"&&typeof n=="object"?e&&(t[i]=e):i==="source"||i===null?t[i]=n:Array.isArray(n)?t[i]=n.map(s=>Xl(s,t)):i!=="_autoprefixerPrefix"&&i!=="_autoprefixerValues"&&i!=="proxyCache"&&(typeof n=="object"&&n!==null&&(n=Xl(n,t)),t[i]=n)}return t}var Is=class{static hack(e){return this.hacks||(this.hacks={}),e.names.map(t=>(this.hacks[t]=e,this.hacks[t]))}static load(e,t,i){let n=this.hacks&&this.hacks[e];return n?new n(e,t,i):new this(e,t,i)}static clone(e,t){let i=Xl(e);for(let n in t)i[n]=t[n];return i}constructor(e,t,i){this.prefixes=t,this.name=e,this.all=i}parentPrefix(e){let t;return typeof e._autoprefixerPrefix!="undefined"?t=e._autoprefixerPrefix:e.type==="decl"&&e.prop[0]==="-"?t=Dy.prefix(e.prop):e.type==="root"?t=!1:e.type==="rule"&&e.selector.includes(":-")&&/:(-\w+-)/.test(e.selector)?t=e.selector.match(/:(-\w+-)/)[1]:e.type==="atrule"&&e.name[0]==="-"?t=Dy.prefix(e.name):t=this.parentPrefix(e.parent),lO.prefixes().includes(t)||(t=!1),e._autoprefixerPrefix=t,e._autoprefixerPrefix}process(e,t){if(!this.check(e))return;let i=this.parentPrefix(e),n=this.prefixes.filter(a=>!i||i===uO.removeNote(a)),s=[];for(let a of n)this.add(e,a,s.concat([a]),t)&&s.push(a);return s}clone(e,t){return Is.clone(e,t)}};qy.exports=Is});var j=x((t$,My)=>{u();var fO=wr(),cO=Mt(),$y=_e(),Ly=class extends fO{check(){return!0}prefixed(e,t){return t+e}normalize(e){return e}otherPrefixes(e,t){for(let i of cO.prefixes())if(i!==t&&e.includes(i))return!0;return!1}set(e,t){return e.prop=this.prefixed(e.prop,t),e}needCascade(e){return e._autoprefixerCascade||(e._autoprefixerCascade=this.all.options.cascade!==!1&&e.raw("before").includes(`-`)),e._autoprefixerCascade}maxPrefixed(e,t){if(t._autoprefixerMax)return t._autoprefixerMax;let i=0;for(let n of e)n=$y.removeNote(n),n.length>i&&(i=n.length);return t._autoprefixerMax=i,t._autoprefixerMax}calcBefore(e,t,i=""){let s=this.maxPrefixed(e,t)-$y.removeNote(i).length,a=t.raw("before");return s>0&&(a+=Array(s).fill(" ").join("")),a}restoreBefore(e){let t=e.raw("before").split(`-`),i=t[t.length-1];this.all.group(e).up(n=>{let s=n.raw("before").split(`-`),a=s[s.length-1];a.length<i.length&&(i=a)}),t[t.length-1]=i,e.raws.before=t.join(`-`)}insert(e,t,i){let n=this.set(this.clone(e),t);if(!(!n||e.parent.some(a=>a.prop===n.prop&&a.value===n.value)))return this.needCascade(e)&&(n.raws.before=this.calcBefore(i,e,t)),e.parent.insertBefore(e,n)}isAlready(e,t){let i=this.all.group(e).up(n=>n.prop===t);return i||(i=this.all.group(e).down(n=>n.prop===t)),i}add(e,t,i,n){let s=this.prefixed(e.prop,t);if(!(this.isAlready(e,s)||this.otherPrefixes(e.value,t)))return this.insert(e,t,i,n)}process(e,t){if(!this.needCascade(e)){super.process(e,t);return}let i=super.process(e,t);!i||!i.length||(this.restoreBefore(e),e.raws.before=this.calcBefore(i,e))}old(e,t){return[this.prefixed(e,t)]}};My.exports=Ly});var By=x((r$,Ny)=>{u();Ny.exports=function r(e){return{mul:t=>new r(e*t),div:t=>new r(e/t),simplify:()=>new r(e),toString:()=>e.toString()}}});var zy=x((i$,jy)=>{u();var pO=By(),dO=wr(),Zl=_e(),hO=/(min|max)-resolution\s*:\s*\d*\.?\d+(dppx|dpcm|dpi|x)/gi,mO=/(min|max)-resolution(\s*:\s*)(\d*\.?\d+)(dppx|dpcm|dpi|x)/i,Fy=class extends dO{prefixName(e,t){return e==="-moz-"?t+"--moz-device-pixel-ratio":e+t+"-device-pixel-ratio"}prefixQuery(e,t,i,n,s){return n=new pO(n),s==="dpi"?n=n.div(96):s==="dpcm"&&(n=n.mul(2.54).div(96)),n=n.simplify(),e==="-o-"&&(n=n.n+"/"+n.d),this.prefixName(e,t)+i+n}clean(e){if(!this.bad){this.bad=[];for(let t of this.prefixes)this.bad.push(this.prefixName(t,"min")),this.bad.push(this.prefixName(t,"max"))}e.params=Zl.editList(e.params,t=>t.filter(i=>this.bad.every(n=>!i.includes(n))))}process(e){let t=this.parentPrefix(e),i=t?[t]:this.prefixes;e.params=Zl.editList(e.params,(n,s)=>{for(let a of n){if(!a.includes("min-resolution")&&!a.includes("max-resolution")){s.push(a);continue}for(let o of i){let l=a.replace(hO,c=>{let f=c.match(mO);return this.prefixQuery(o,f[1],f[2],f[3],f[4])});s.push(l)}s.push(a)}return Zl.uniq(s)})}};jy.exports=Fy});var Vy=x((n$,Uy)=>{u();var Jl="(".charCodeAt(0),eu=")".charCodeAt(0),Ds="'".charCodeAt(0),tu='"'.charCodeAt(0),ru="\\".charCodeAt(0),vr="/".charCodeAt(0),iu=",".charCodeAt(0),nu=":".charCodeAt(0),qs="*".charCodeAt(0),gO="u".charCodeAt(0),yO="U".charCodeAt(0),bO="+".charCodeAt(0),wO=/^[a-f0-9?-]+$/i;Uy.exports=function(r){for(var e=[],t=r,i,n,s,a,o,l,c,f,d=0,p=t.charCodeAt(d),h=t.length,b=[{nodes:e}],v=0,y,w="",k="",S="";d<h;)if(p<=32){i=d;do i+=1,p=t.charCodeAt(i);while(p<=32);a=t.slice(d,i),s=e[e.length-1],p===eu&&v?S=a:s&&s.type==="div"?(s.after=a,s.sourceEndIndex+=a.length):p===iu||p===nu||p===vr&&t.charCodeAt(i+1)!==qs&&(!y||y&&y.type==="function"&&y.value!=="calc")?k=a:e.push({type:"space",sourceIndex:d,sourceEndIndex:i,value:a}),d=i}else if(p===Ds||p===tu){i=d,n=p===Ds?"'":'"',a={type:"string",sourceIndex:d,quote:n};do if(o=!1,i=t.indexOf(n,i+1),~i)for(l=i;t.charCodeAt(l-1)===ru;)l-=1,o=!o;else t+=n,i=t.length-1,a.unclosed=!0;while(o);a.value=t.slice(d+1,i),a.sourceEndIndex=a.unclosed?i:i+1,e.push(a),d=i+1,p=t.charCodeAt(d)}else if(p===vr&&t.charCodeAt(d+1)===qs)i=t.indexOf("*/",d),a={type:"comment",sourceIndex:d,sourceEndIndex:i+2},i===-1&&(a.unclosed=!0,i=t.length,a.sourceEndIndex=i),a.value=t.slice(d+2,i),e.push(a),d=i+2,p=t.charCodeAt(d);else if((p===vr||p===qs)&&y&&y.type==="function"&&y.value==="calc")a=t[d],e.push({type:"word",sourceIndex:d-k.length,sourceEndIndex:d+a.length,value:a}),d+=1,p=t.charCodeAt(d);else if(p===vr||p===iu||p===nu)a=t[d],e.push({type:"div",sourceIndex:d-k.length,sourceEndIndex:d+a.length,value:a,before:k,after:""}),k="",d+=1,p=t.charCodeAt(d);else if(Jl===p){i=d;do i+=1,p=t.charCodeAt(i);while(p<=32);if(f=d,a={type:"function",sourceIndex:d-w.length,value:w,before:t.slice(f+1,i)},d=i,w==="url"&&p!==Ds&&p!==tu){i-=1;do if(o=!1,i=t.indexOf(")",i+1),~i)for(l=i;t.charCodeAt(l-1)===ru;)l-=1,o=!o;else t+=")",i=t.length-1,a.unclosed=!0;while(o);c=i;do c-=1,p=t.charCodeAt(c);while(p<=32);f<c?(d!==c+1?a.nodes=[{type:"word",sourceIndex:d,sourceEndIndex:c+1,value:t.slice(d,c+1)}]:a.nodes=[],a.unclosed&&c+1!==i?(a.after="",a.nodes.push({type:"space",sourceIndex:c+1,sourceEndIndex:i,value:t.slice(c+1,i)})):(a.after=t.slice(c+1,i),a.sourceEndIndex=i)):(a.after="",a.nodes=[]),d=i+1,a.sourceEndIndex=a.unclosed?i:d,p=t.charCodeAt(d),e.push(a)}else v+=1,a.after="",a.sourceEndIndex=d+1,e.push(a),b.push(a),e=a.nodes=[],y=a;w=""}else if(eu===p&&v)d+=1,p=t.charCodeAt(d),y.after=S,y.sourceEndIndex+=S.length,S="",v-=1,b[b.length-1].sourceEndIndex=d,b.pop(),y=b[v],e=y.nodes;else{i=d;do p===ru&&(i+=1),i+=1,p=t.charCodeAt(i);while(i<h&&!(p<=32||p===Ds||p===tu||p===iu||p===nu||p===vr||p===Jl||p===qs&&y&&y.type==="function"&&y.value==="calc"||p===vr&&y.type==="function"&&y.value==="calc"||p===eu&&v));a=t.slice(d,i),Jl===p?w=a:(gO===a.charCodeAt(0)||yO===a.charCodeAt(0))&&bO===a.charCodeAt(1)&&wO.test(a.slice(2))?e.push({type:"unicode-range",sourceIndex:d,sourceEndIndex:i,value:a}):e.push({type:"word",sourceIndex:d,sourceEndIndex:i,value:a}),d=i}for(d=b.length-1;d;d-=1)b[d].unclosed=!0,b[d].sourceEndIndex=t.length;return b[0].nodes}});var Wy=x((s$,Hy)=>{u();Hy.exports=function r(e,t,i){var n,s,a,o;for(n=0,s=e.length;n<s;n+=1)a=e[n],i||(o=t(a,n,e)),o!==!1&&a.type==="function"&&Array.isArray(a.nodes)&&r(a.nodes,t,i),i&&t(a,n,e)}});var Ky=x((a$,Yy)=>{u();function Gy(r,e){var t=r.type,i=r.value,n,s;return e&&(s=e(r))!==void 0?s:t==="word"||t==="space"?i:t==="string"?(n=r.quote||"",n+i+(r.unclosed?"":n)):t==="comment"?"/*"+i+(r.unclosed?"":"*/"):t==="div"?(r.before||"")+i+(r.after||""):Array.isArray(r.nodes)?(n=Qy(r.nodes,e),t!=="function"?n:i+"("+(r.before||"")+n+(r.after||"")+(r.unclosed?"":")")):i}function Qy(r,e){var t,i;if(Array.isArray(r)){for(t="",i=r.length-1;~i;i-=1)t=Gy(r[i],e)+t;return t}return Gy(r,e)}Yy.exports=Qy});var Zy=x((o$,Xy)=>{u();var $s="-".charCodeAt(0),Ls="+".charCodeAt(0),su=".".charCodeAt(0),vO="e".charCodeAt(0),xO="E".charCodeAt(0);function kO(r){var e=r.charCodeAt(0),t;if(e===Ls||e===$s){if(t=r.charCodeAt(1),t>=48&&t<=57)return!0;var i=r.charCodeAt(2);return t===su&&i>=48&&i<=57}return e===su?(t=r.charCodeAt(1),t>=48&&t<=57):e>=48&&e<=57}Xy.exports=function(r){var e=0,t=r.length,i,n,s;if(t===0||!kO(r))return!1;for(i=r.charCodeAt(e),(i===Ls||i===$s)&&e++;e<t&&(i=r.charCodeAt(e),!(i<48||i>57));)e+=1;if(i=r.charCodeAt(e),n=r.charCodeAt(e+1),i===su&&n>=48&&n<=57)for(e+=2;e<t&&(i=r.charCodeAt(e),!(i<48||i>57));)e+=1;if(i=r.charCodeAt(e),n=r.charCodeAt(e+1),s=r.charCodeAt(e+2),(i===vO||i===xO)&&(n>=48&&n<=57||(n===Ls||n===$s)&&s>=48&&s<=57))for(e+=n===Ls||n===$s?3:2;e<t&&(i=r.charCodeAt(e),!(i<48||i>57));)e+=1;return{number:r.slice(0,e),unit:r.slice(e)}}});var Ms=x((l$,tb)=>{u();var SO=Vy(),Jy=Wy(),eb=Ky();function Nt(r){return this instanceof Nt?(this.nodes=SO(r),this):new Nt(r)}Nt.prototype.toString=function(){return Array.isArray(this.nodes)?eb(this.nodes):""};Nt.prototype.walk=function(r,e){return Jy(this.nodes,r,e),this};Nt.unit=Zy();Nt.walk=Jy;Nt.stringify=eb;tb.exports=Nt});var ab=x((u$,sb)=>{u();var{list:AO}=$e(),rb=Ms(),CO=Mt(),ib=Ni(),nb=class{constructor(e){this.props=["transition","transition-property"],this.prefixes=e}add(e,t){let i,n,s=this.prefixes.add[e.prop],a=this.ruleVendorPrefixes(e),o=a||s&&s.prefixes||[],l=this.parse(e.value),c=l.map(h=>this.findProp(h)),f=[];if(c.some(h=>h[0]==="-"))return;for(let h of l){if(n=this.findProp(h),n[0]==="-")continue;let b=this.prefixes.add[n];if(!(!b||!b.prefixes))for(i of b.prefixes){if(a&&!a.some(y=>i.includes(y)))continue;let v=this.prefixes.prefixed(n,i);v!=="-ms-transform"&&!c.includes(v)&&(this.disabled(n,i)||f.push(this.clone(n,v,h)))}}l=l.concat(f);let d=this.stringify(l),p=this.stringify(this.cleanFromUnprefixed(l,"-webkit-"));if(o.includes("-webkit-")&&this.cloneBefore(e,`-webkit-${e.prop}`,p),this.cloneBefore(e,e.prop,p),o.includes("-o-")){let h=this.stringify(this.cleanFromUnprefixed(l,"-o-"));this.cloneBefore(e,`-o-${e.prop}`,h)}for(i of o)if(i!=="-webkit-"&&i!=="-o-"){let h=this.stringify(this.cleanOtherPrefixes(l,i));this.cloneBefore(e,i+e.prop,h)}d!==e.value&&!this.already(e,e.prop,d)&&(this.checkForWarning(t,e),e.cloneBefore(),e.value=d)}findProp(e){let t=e[0].value;if(/^\d/.test(t)){for(let[i,n]of e.entries())if(i!==0&&n.type==="word")return n.value}return t}already(e,t,i){return e.parent.some(n=>n.prop===t&&n.value===i)}cloneBefore(e,t,i){this.already(e,t,i)||e.cloneBefore({prop:t,value:i})}checkForWarning(e,t){if(t.prop!=="transition-property")return;let i=!1,n=!1;t.parent.each(s=>{if(s.type!=="decl"||s.prop.indexOf("transition-")!==0)return;let a=AO.comma(s.value);if(s.prop==="transition-property"){a.forEach(o=>{let l=this.prefixes.add[o];l&&l.prefixes&&l.prefixes.length>0&&(i=!0)});return}return n=n||a.length>1,!1}),i&&n&&t.warn(e,"Replace transition-property to transition, because Autoprefixer could not support any cases of transition-property and other transition-*")}remove(e){let t=this.parse(e.value);t=t.filter(a=>{let o=this.prefixes.remove[this.findProp(a)];return!o||!o.remove});let i=this.stringify(t);if(e.value===i)return;if(t.length===0){e.remove();return}let n=e.parent.some(a=>a.prop===e.prop&&a.value===i),s=e.parent.some(a=>a!==e&&a.prop===e.prop&&a.value.length>i.length);if(n||s){e.remove();return}e.value=i}parse(e){let t=rb(e),i=[],n=[];for(let s of t.nodes)n.push(s),s.type==="div"&&s.value===","&&(i.push(n),n=[]);return i.push(n),i.filter(s=>s.length>0)}stringify(e){if(e.length===0)return"";let t=[];for(let i of e)i[i.length-1].type!=="div"&&i.push(this.div(e)),t=t.concat(i);return t[0].type==="div"&&(t=t.slice(1)),t[t.length-1].type==="div"&&(t=t.slice(0,-2+1||void 0)),rb.stringify({nodes:t})}clone(e,t,i){let n=[],s=!1;for(let a of i)!s&&a.type==="word"&&a.value===e?(n.push({type:"word",value:t}),s=!0):n.push(a);return n}div(e){for(let t of e)for(let i of t)if(i.type==="div"&&i.value===",")return i;return{type:"div",value:",",after:" "}}cleanOtherPrefixes(e,t){return e.filter(i=>{let n=ib.prefix(this.findProp(i));return n===""||n===t})}cleanFromUnprefixed(e,t){let i=e.map(s=>this.findProp(s)).filter(s=>s.slice(0,t.length)===t).map(s=>this.prefixes.unprefixed(s)),n=[];for(let s of e){let a=this.findProp(s),o=ib.prefix(a);!i.includes(a)&&(o===t||o==="")&&n.push(s)}return n}disabled(e,t){let i=["order","justify-content","align-self","align-content"];if(e.includes("flex")||i.includes(e)){if(this.prefixes.options.flexbox===!1)return!0;if(this.prefixes.options.flexbox==="no-2009")return t.includes("2009")}}ruleVendorPrefixes(e){let{parent:t}=e;if(t.type!=="rule")return!1;if(!t.selector.includes(":-"))return!1;let i=CO.prefixes().filter(n=>t.selector.includes(":"+n));return i.length>0?i:!1}};sb.exports=nb});var xr=x((f$,lb)=>{u();var _O=_e(),ob=class{constructor(e,t,i,n){this.unprefixed=e,this.prefixed=t,this.string=i||t,this.regexp=n||_O.regexp(t)}check(e){return e.includes(this.string)?!!e.match(this.regexp):!1}};lb.exports=ob});var He=x((c$,fb)=>{u();var EO=wr(),OO=xr(),TO=Ni(),RO=_e(),ub=class extends EO{static save(e,t){let i=t.prop,n=[];for(let s in t._autoprefixerValues){let a=t._autoprefixerValues[s];if(a===t.value)continue;let o,l=TO.prefix(i);if(l==="-pie-")continue;if(l===s){o=t.value=a,n.push(o);continue}let c=e.prefixed(i,s),f=t.parent;if(!f.every(b=>b.prop!==c)){n.push(o);continue}let d=a.replace(/\s+/," ");if(f.some(b=>b.prop===t.prop&&b.value.replace(/\s+/," ")===d)){n.push(o);continue}let h=this.clone(t,{value:a});o=t.parent.insertBefore(t,h),n.push(o)}return n}check(e){let t=e.value;return t.includes(this.name)?!!t.match(this.regexp()):!1}regexp(){return this.regexpCache||(this.regexpCache=RO.regexp(this.name))}replace(e,t){return e.replace(this.regexp(),`$1${t}$2`)}value(e){return e.raws.value&&e.raws.value.value===e.value?e.raws.value.raw:e.value}add(e,t){e._autoprefixerValues||(e._autoprefixerValues={});let i=e._autoprefixerValues[t]||this.value(e),n;do if(n=i,i=this.replace(i,t),i===!1)return;while(i!==n);e._autoprefixerValues[t]=i}old(e){return new OO(this.name,e+this.name)}};fb.exports=ub});var Bt=x((p$,cb)=>{u();cb.exports={}});var ou=x((d$,hb)=>{u();var pb=Ms(),PO=He(),IO=Bt().insertAreas,DO=/(^|[^-])linear-gradient\(\s*(top|left|right|bottom)/i,qO=/(^|[^-])radial-gradient\(\s*\d+(\w*|%)\s+\d+(\w*|%)\s*,/i,$O=/(!\s*)?autoprefixer:\s*ignore\s+next/i,LO=/(!\s*)?autoprefixer\s*grid:\s*(on|off|(no-)?autoplace)/i,MO=["width","height","min-width","max-width","min-height","max-height","inline-size","min-inline-size","max-inline-size","block-size","min-block-size","max-block-size"];function au(r){return r.parent.some(e=>e.prop==="grid-template"||e.prop==="grid-template-areas")}function NO(r){let e=r.parent.some(i=>i.prop==="grid-template-rows"),t=r.parent.some(i=>i.prop==="grid-template-columns");return e&&t}var db=class{constructor(e){this.prefixes=e}add(e,t){let i=this.prefixes.add["@resolution"],n=this.prefixes.add["@keyframes"],s=this.prefixes.add["@viewport"],a=this.prefixes.add["@supports"];e.walkAtRules(f=>{if(f.name==="keyframes"){if(!this.disabled(f,t))return n&&n.process(f)}else if(f.name==="viewport"){if(!this.disabled(f,t))return s&&s.process(f)}else if(f.name==="supports"){if(this.prefixes.options.supports!==!1&&!this.disabled(f,t))return a.process(f)}else if(f.name==="media"&&f.params.includes("-resolution")&&!this.disabled(f,t))return i&&i.process(f)}),e.walkRules(f=>{if(!this.disabled(f,t))return this.prefixes.add.selectors.map(d=>d.process(f,t))});function o(f){return f.parent.nodes.some(d=>{if(d.type!=="decl")return!1;let p=d.prop==="display"&&/(inline-)?grid/.test(d.value),h=d.prop.startsWith("grid-template"),b=/^grid-([A-z]+-)?gap/.test(d.prop);return p||h||b})}function l(f){return f.parent.some(d=>d.prop==="display"&&/(inline-)?flex/.test(d.value))}let c=this.gridStatus(e,t)&&this.prefixes.add["grid-area"]&&this.prefixes.add["grid-area"].prefixes;return e.walkDecls(f=>{if(this.disabledDecl(f,t))return;let d=f.parent,p=f.prop,h=f.value;if(p==="grid-row-span"){t.warn("grid-row-span is not part of final Grid Layout. Use grid-row.",{node:f});return}else if(p==="grid-column-span"){t.warn("grid-column-span is not part of final Grid Layout. Use grid-column.",{node:f});return}else if(p==="display"&&h==="box"){t.warn("You should write display: flex by final spec instead of display: box",{node:f});return}else if(p==="text-emphasis-position")(h==="under"||h==="over")&&t.warn("You should use 2 values for text-emphasis-position For example, `under left` instead of just `under`.",{node:f});else if(/^(align|justify|place)-(items|content)$/.test(p)&&l(f))(h==="start"||h==="end")&&t.warn(`${h} value has mixed support, consider using flex-${h} instead`,{node:f});else if(p==="text-decoration-skip"&&h==="ink")t.warn("Replace text-decoration-skip: ink to text-decoration-skip-ink: auto, because spec had been changed",{node:f});else{if(c&&this.gridStatus(f,t))if(f.value==="subgrid"&&t.warn("IE does not support subgrid",{node:f}),/^(align|justify|place)-items$/.test(p)&&o(f)){let v=p.replace("-items","-self");t.warn(`IE does not support ${p} on grid containers. Try using ${v} on child elements instead: ${f.parent.selector} > * { ${v}: ${f.value} }`,{node:f})}else if(/^(align|justify|place)-content$/.test(p)&&o(f))t.warn(`IE does not support ${f.prop} on grid containers`,{node:f});else if(p==="display"&&f.value==="contents"){t.warn("Please do not use display: contents; if you have grid setting enabled",{node:f});return}else if(f.prop==="grid-gap"){let v=this.gridStatus(f,t);v==="autoplace"&&!NO(f)&&!au(f)?t.warn("grid-gap only works if grid-template(-areas) is being used or both rows and columns have been declared and cells have not been manually placed inside the explicit grid",{node:f}):(v===!0||v==="no-autoplace")&&!au(f)&&t.warn("grid-gap only works if grid-template(-areas) is being used",{node:f})}else if(p==="grid-auto-columns"){t.warn("grid-auto-columns is not supported by IE",{node:f});return}else if(p==="grid-auto-rows"){t.warn("grid-auto-rows is not supported by IE",{node:f});return}else if(p==="grid-auto-flow"){let v=d.some(w=>w.prop==="grid-template-rows"),y=d.some(w=>w.prop==="grid-template-columns");au(f)?t.warn("grid-auto-flow is not supported by IE",{node:f}):h.includes("dense")?t.warn("grid-auto-flow: dense is not supported by IE",{node:f}):!v&&!y&&t.warn("grid-auto-flow works only if grid-template-rows and grid-template-columns are present in the same rule",{node:f});return}else if(h.includes("auto-fit")){t.warn("auto-fit value is not supported by IE",{node:f,word:"auto-fit"});return}else if(h.includes("auto-fill")){t.warn("auto-fill value is not supported by IE",{node:f,word:"auto-fill"});return}else p.startsWith("grid-template")&&h.includes("[")&&t.warn("Autoprefixer currently does not support line names. Try using grid-template-areas instead.",{node:f,word:"["});if(h.includes("radial-gradient"))if(qO.test(f.value))t.warn("Gradient has outdated direction syntax. New syntax is like `closest-side at 0 0` instead of `0 0, closest-side`.",{node:f});else{let v=pb(h);for(let y of v.nodes)if(y.type==="function"&&y.value==="radial-gradient")for(let w of y.nodes)w.type==="word"&&(w.value==="cover"?t.warn("Gradient has outdated direction syntax. Replace `cover` to `farthest-corner`.",{node:f}):w.value==="contain"&&t.warn("Gradient has outdated direction syntax. Replace `contain` to `closest-side`.",{node:f}))}h.includes("linear-gradient")&&DO.test(h)&&t.warn("Gradient has outdated direction syntax. New syntax is like `to left` instead of `right`.",{node:f})}MO.includes(f.prop)&&(f.value.includes("-fill-available")||(f.value.includes("fill-available")?t.warn("Replace fill-available to stretch, because spec had been changed",{node:f}):f.value.includes("fill")&&pb(h).nodes.some(y=>y.type==="word"&&y.value==="fill")&&t.warn("Replace fill to stretch, because spec had been changed",{node:f})));let b;if(f.prop==="transition"||f.prop==="transition-property")return this.prefixes.transition.add(f,t);if(f.prop==="align-self"){if(this.displayType(f)!=="grid"&&this.prefixes.options.flexbox!==!1&&(b=this.prefixes.add["align-self"],b&&b.prefixes&&b.process(f)),this.gridStatus(f,t)!==!1&&(b=this.prefixes.add["grid-row-align"],b&&b.prefixes))return b.process(f,t)}else if(f.prop==="justify-self"){if(this.gridStatus(f,t)!==!1&&(b=this.prefixes.add["grid-column-align"],b&&b.prefixes))return b.process(f,t)}else if(f.prop==="place-self"){if(b=this.prefixes.add["place-self"],b&&b.prefixes&&this.gridStatus(f,t)!==!1)return b.process(f,t)}else if(b=this.prefixes.add[f.prop],b&&b.prefixes)return b.process(f,t)}),this.gridStatus(e,t)&&IO(e,this.disabled),e.walkDecls(f=>{if(this.disabledValue(f,t))return;let d=this.prefixes.unprefixed(f.prop),p=this.prefixes.values("add",d);if(Array.isArray(p))for(let h of p)h.process&&h.process(f,t);PO.save(this.prefixes,f)})}remove(e,t){let i=this.prefixes.remove["@resolution"];e.walkAtRules((n,s)=>{this.prefixes.remove[`@${n.name}`]?this.disabled(n,t)||n.parent.removeChild(s):n.name==="media"&&n.params.includes("-resolution")&&i&&i.clean(n)});for(let n of this.prefixes.remove.selectors)e.walkRules((s,a)=>{n.check(s)&&(this.disabled(s,t)||s.parent.removeChild(a))});return e.walkDecls((n,s)=>{if(this.disabled(n,t))return;let a=n.parent,o=this.prefixes.unprefixed(n.prop);if((n.prop==="transition"||n.prop==="transition-property")&&this.prefixes.transition.remove(n),this.prefixes.remove[n.prop]&&this.prefixes.remove[n.prop].remove){let l=this.prefixes.group(n).down(c=>this.prefixes.normalize(c.prop)===o);if(o==="flex-flow"&&(l=!0),n.prop==="-webkit-box-orient"){let c={"flex-direction":!0,"flex-flow":!0};if(!n.parent.some(f=>c[f.prop]))return}if(l&&!this.withHackValue(n)){n.raw("before").includes(`-`)&&this.reduceSpaces(n),a.removeChild(s);return}}for(let l of this.prefixes.values("remove",o)){if(!l.check||!l.check(n.value))continue;if(o=l.unprefixed,this.prefixes.group(n).down(f=>f.value.includes(o))){a.removeChild(s);return}}})}withHackValue(e){return e.prop==="-webkit-background-clip"&&e.value==="text"}disabledValue(e,t){return this.gridStatus(e,t)===!1&&e.type==="decl"&&e.prop==="display"&&e.value.includes("grid")||this.prefixes.options.flexbox===!1&&e.type==="decl"&&e.prop==="display"&&e.value.includes("flex")||e.type==="decl"&&e.prop==="content"?!0:this.disabled(e,t)}disabledDecl(e,t){if(this.gridStatus(e,t)===!1&&e.type==="decl"&&(e.prop.includes("grid")||e.prop==="justify-items"))return!0;if(this.prefixes.options.flexbox===!1&&e.type==="decl"){let i=["order","justify-content","align-items","align-content"];if(e.prop.includes("flex")||i.includes(e.prop))return!0}return this.disabled(e,t)}disabled(e,t){if(!e)return!1;if(e._autoprefixerDisabled!==void 0)return e._autoprefixerDisabled;if(e.parent){let n=e.prev();if(n&&n.type==="comment"&&$O.test(n.text))return e._autoprefixerDisabled=!0,e._autoprefixerSelfDisabled=!0,!0}let i=null;if(e.nodes){let n;e.each(s=>{s.type==="comment"&&/(!\s*)?autoprefixer:\s*(off|on)/i.test(s.text)&&(typeof n!="undefined"?t.warn("Second Autoprefixer control comment was ignored. Autoprefixer applies control comment to whole block, not to next rules.",{node:s}):n=/on/i.test(s.text))}),n!==void 0&&(i=!n)}if(!e.nodes||i===null)if(e.parent){let n=this.disabled(e.parent,t);e.parent._autoprefixerSelfDisabled===!0?i=!1:i=n}else i=!1;return e._autoprefixerDisabled=i,i}reduceSpaces(e){let t=!1;if(this.prefixes.group(e).up(()=>(t=!0,!0)),t)return;let i=e.raw("before").split(`-`),n=i[i.length-1].length,s=!1;this.prefixes.group(e).down(a=>{i=a.raw("before").split(`-`);let o=i.length-1;i[o].length>n&&(s===!1&&(s=i[o].length-n),i[o]=i[o].slice(0,-s),a.raws.before=i.join(`-`))})}displayType(e){for(let t of e.parent.nodes)if(t.prop==="display"){if(t.value.includes("flex"))return"flex";if(t.value.includes("grid"))return"grid"}return!1}gridStatus(e,t){if(!e)return!1;if(e._autoprefixerGridStatus!==void 0)return e._autoprefixerGridStatus;let i=null;if(e.nodes){let n;e.each(s=>{if(s.type==="comment"&&LO.test(s.text)){let a=/:\s*autoplace/i.test(s.text),o=/no-autoplace/i.test(s.text);typeof n!="undefined"?t.warn("Second Autoprefixer grid control comment was ignored. Autoprefixer applies control comments to the whole block, not to the next rules.",{node:s}):a?n="autoplace":o?n=!0:n=/on/i.test(s.text)}}),n!==void 0&&(i=n)}if(e.type==="atrule"&&e.name==="supports"){let n=e.params;n.includes("grid")&&n.includes("auto")&&(i=!1)}if(!e.nodes||i===null)if(e.parent){let n=this.gridStatus(e.parent,t);e.parent._autoprefixerSelfDisabled===!0?i=!1:i=n}else typeof this.prefixes.options.grid!="undefined"?i=this.prefixes.options.grid:typeof m.env.AUTOPREFIXER_GRID!="undefined"?m.env.AUTOPREFIXER_GRID==="autoplace"?i="autoplace":i=!0:i=!1;return e._autoprefixerGridStatus=i,i}};hb.exports=db});var gb=x((h$,mb)=>{u();mb.exports={A:{A:{"2":"K E F G A B JC"},B:{"1":"C L M H N D O P Q R S T U V W X Y Z a b c d e f g h i j n o p q r s t u v w x y z I"},C:{"1":"2 3 4 5 6 7 8 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB 0B dB 1B eB fB gB hB iB jB kB lB mB nB oB m pB qB rB sB tB P Q R 2B S T U V W X Y Z a b c d e f g h i j n o p q r s t u v w x y z I uB 3B 4B","2":"0 1 KC zB J K E F G A B C L M H N D O k l LC MC"},D:{"1":"8 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB 0B dB 1B eB fB gB hB iB jB kB lB mB nB oB m pB qB rB sB tB P Q R S T U V W X Y Z a b c d e f g h i j n o p q r s t u v w x y z I uB 3B 4B","2":"0 1 2 3 4 5 6 7 J K E F G A B C L M H N D O k l"},E:{"1":"G A B C L M H D RC 6B vB wB 7B SC TC 8B 9B xB AC yB BC CC DC EC FC GC UC","2":"0 J K E F NC 5B OC PC QC"},F:{"1":"1 2 3 4 5 6 7 8 9 H N D O k l AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB m pB qB rB sB tB P Q R 2B S T U V W X Y Z a b c d e f g h i j wB","2":"G B C VC WC XC YC vB HC ZC"},G:{"1":"D fC gC hC iC jC kC lC mC nC oC pC qC rC sC tC 8B 9B xB AC yB BC CC DC EC FC GC","2":"F 5B aC IC bC cC dC eC"},H:{"1":"uC"},I:{"1":"I zC 0C","2":"zB J vC wC xC yC IC"},J:{"2":"E A"},K:{"1":"m","2":"A B C vB HC wB"},L:{"1":"I"},M:{"1":"uB"},N:{"2":"A B"},O:{"1":"xB"},P:{"1":"J k l 1C 2C 3C 4C 5C 6B 6C 7C 8C 9C AD yB BD CD DD"},Q:{"1":"7B"},R:{"1":"ED"},S:{"1":"FD GD"}},B:4,C:"CSS Feature Queries"}});var vb=x((m$,wb)=>{u();function yb(r){return r[r.length-1]}var bb={parse(r){let e=[""],t=[e];for(let i of r){if(i==="("){e=[""],yb(t).push(e),t.push(e);continue}if(i===")"){t.pop(),e=yb(t),e.push("");continue}e[e.length-1]+=i}return t[0]},stringify(r){let e="";for(let t of r){if(typeof t=="object"){e+=`(${bb.stringify(t)})`;continue}e+=t}return e}};wb.exports=bb});var Cb=x((g$,Ab)=>{u();var BO=gb(),{feature:FO}=(Ps(),Rs),{parse:jO}=$e(),zO=Mt(),lu=vb(),UO=He(),VO=_e(),xb=FO(BO),kb=[];for(let r in xb.stats){let e=xb.stats[r];for(let t in e){let i=e[t];/y/.test(i)&&kb.push(r+" "+t)}}var Sb=class{constructor(e,t){this.Prefixes=e,this.all=t}prefixer(){if(this.prefixerCache)return this.prefixerCache;let e=this.all.browsers.selected.filter(i=>kb.includes(i)),t=new zO(this.all.browsers.data,e,this.all.options);return this.prefixerCache=new this.Prefixes(this.all.data,t,this.all.options),this.prefixerCache}parse(e){let t=e.split(":"),i=t[0],n=t[1];return n||(n=""),[i.trim(),n.trim()]}virtual(e){let[t,i]=this.parse(e),n=jO("a{}").first;return n.append({prop:t,value:i,raws:{before:""}}),n}prefixed(e){let t=this.virtual(e);if(this.disabled(t.first))return t.nodes;let i={warn:()=>null},n=this.prefixer().add[t.first.prop];n&&n.process&&n.process(t.first,i);for(let s of t.nodes){for(let a of this.prefixer().values("add",t.first.prop))a.process(s);UO.save(this.all,s)}return t.nodes}isNot(e){return typeof e=="string"&&/not\s*/i.test(e)}isOr(e){return typeof e=="string"&&/\s*or\s*/i.test(e)}isProp(e){return typeof e=="object"&&e.length===1&&typeof e[0]=="string"}isHack(e,t){return!new RegExp(`(\\(|\\s)${VO.escapeRegexp(t)}:`).test(e)}toRemove(e,t){let[i,n]=this.parse(e),s=this.all.unprefixed(i),a=this.all.cleaner();if(a.remove[i]&&a.remove[i].remove&&!this.isHack(t,s))return!0;for(let o of a.values("remove",s))if(o.check(n))return!0;return!1}remove(e,t){let i=0;for(;i<e.length;){if(!this.isNot(e[i-1])&&this.isProp(e[i])&&this.isOr(e[i+1])){if(this.toRemove(e[i][0],t)){e.splice(i,2);continue}i+=2;continue}typeof e[i]=="object"&&(e[i]=this.remove(e[i],t)),i+=1}return e}cleanBrackets(e){return e.map(t=>typeof t!="object"?t:t.length===1&&typeof t[0]=="object"?this.cleanBrackets(t[0]):this.cleanBrackets(t))}convert(e){let t=[""];for(let i of e)t.push([`${i.prop}: ${i.value}`]),t.push(" or ");return t[t.length-1]="",t}normalize(e){if(typeof e!="object")return e;if(e=e.filter(t=>t!==""),typeof e[0]=="string"){let t=e[0].trim();if(t.includes(":")||t==="selector"||t==="not selector")return[lu.stringify(e)]}return e.map(t=>this.normalize(t))}add(e,t){return e.map(i=>{if(this.isProp(i)){let n=this.prefixed(i[0]);return n.length>1?this.convert(n):i}return typeof i=="object"?this.add(i,t):i})}process(e){let t=lu.parse(e.params);t=this.normalize(t),t=this.remove(t,e.params),t=this.add(t,e.params),t=this.cleanBrackets(t),e.params=lu.stringify(t)}disabled(e){if(!this.all.options.grid&&(e.prop==="display"&&e.value.includes("grid")||e.prop.includes("grid")||e.prop==="justify-items"))return!0;if(this.all.options.flexbox===!1){if(e.prop==="display"&&e.value.includes("flex"))return!0;let t=["order","justify-content","align-items","align-content"];if(e.prop.includes("flex")||t.includes(e.prop))return!0}return!1}};Ab.exports=Sb});var Ob=x((y$,Eb)=>{u();var _b=class{constructor(e,t){this.prefix=t,this.prefixed=e.prefixed(this.prefix),this.regexp=e.regexp(this.prefix),this.prefixeds=e.possible().map(i=>[e.prefixed(i),e.regexp(i)]),this.unprefixed=e.name,this.nameRegexp=e.regexp()}isHack(e){let t=e.parent.index(e)+1,i=e.parent.nodes;for(;t<i.length;){let n=i[t].selector;if(!n)return!0;if(n.includes(this.unprefixed)&&n.match(this.nameRegexp))return!1;let s=!1;for(let[a,o]of this.prefixeds)if(n.includes(a)&&n.match(o)){s=!0;break}if(!s)return!0;t+=1}return!0}check(e){return!(!e.selector.includes(this.prefixed)||!e.selector.match(this.regexp)||this.isHack(e))}};Eb.exports=_b});var kr=x((b$,Rb)=>{u();var{list:HO}=$e(),WO=Ob(),GO=wr(),QO=Mt(),YO=_e(),Tb=class extends GO{constructor(e,t,i){super(e,t,i);this.regexpCache=new Map}check(e){return e.selector.includes(this.name)?!!e.selector.match(this.regexp()):!1}prefixed(e){return this.name.replace(/^(\W*)/,`$1${e}`)}regexp(e){if(!this.regexpCache.has(e)){let t=e?this.prefixed(e):this.name;this.regexpCache.set(e,new RegExp(`(^|[^:"'=])${YO.escapeRegexp(t)}`,"gi"))}return this.regexpCache.get(e)}possible(){return QO.prefixes()}prefixeds(e){if(e._autoprefixerPrefixeds){if(e._autoprefixerPrefixeds[this.name])return e._autoprefixerPrefixeds}else e._autoprefixerPrefixeds={};let t={};if(e.selector.includes(",")){let n=HO.comma(e.selector).filter(s=>s.includes(this.name));for(let s of this.possible())t[s]=n.map(a=>this.replace(a,s)).join(", ")}else for(let i of this.possible())t[i]=this.replace(e.selector,i);return e._autoprefixerPrefixeds[this.name]=t,e._autoprefixerPrefixeds}already(e,t,i){let n=e.parent.index(e)-1;for(;n>=0;){let s=e.parent.nodes[n];if(s.type!=="rule")return!1;let a=!1;for(let o in t[this.name]){let l=t[this.name][o];if(s.selector===l){if(i===o)return!0;a=!0;break}}if(!a)return!1;n-=1}return!1}replace(e,t){return e.replace(this.regexp(),`$1${this.prefixed(t)}`)}add(e,t){let i=this.prefixeds(e);if(this.already(e,i,t))return;let n=this.clone(e,{selector:i[this.name][t]});e.parent.insertBefore(e,n)}old(e){return new WO(this,e)}};Rb.exports=Tb});var Db=x((w$,Ib)=>{u();var KO=wr(),Pb=class extends KO{add(e,t){let i=t+e.name;if(e.parent.some(a=>a.name===i&&a.params===e.params))return;let s=this.clone(e,{name:i});return e.parent.insertBefore(e,s)}process(e){let t=this.parentPrefix(e);for(let i of this.prefixes)(!t||t===i)&&this.add(e,i)}};Ib.exports=Pb});var $b=x((v$,qb)=>{u();var XO=kr(),uu=class extends XO{prefixed(e){return e==="-webkit-"?":-webkit-full-screen":e==="-moz-"?":-moz-full-screen":`:${e}fullscreen`}};uu.names=[":fullscreen"];qb.exports=uu});var Mb=x((x$,Lb)=>{u();var ZO=kr(),fu=class extends ZO{possible(){return super.possible().concat(["-moz- old","-ms- old"])}prefixed(e){return e==="-webkit-"?"::-webkit-input-placeholder":e==="-ms-"?"::-ms-input-placeholder":e==="-ms- old"?":-ms-input-placeholder":e==="-moz- old"?":-moz-placeholder":`::${e}placeholder`}};fu.names=["::placeholder"];Lb.exports=fu});var Bb=x((k$,Nb)=>{u();var JO=kr(),cu=class extends JO{prefixed(e){return e==="-ms-"?":-ms-input-placeholder":`:${e}placeholder-shown`}};cu.names=[":placeholder-shown"];Nb.exports=cu});var jb=x((S$,Fb)=>{u();var eT=kr(),tT=_e(),pu=class extends eT{constructor(e,t,i){super(e,t,i);this.prefixes&&(this.prefixes=tT.uniq(this.prefixes.map(n=>"-webkit-")))}prefixed(e){return e==="-webkit-"?"::-webkit-file-upload-button":`::${e}file-selector-button`}};pu.names=["::file-selector-button"];Fb.exports=pu});var Pe=x((A$,zb)=>{u();zb.exports=function(r){let e;return r==="-webkit- 2009"||r==="-moz-"?e=2009:r==="-ms-"?e=2012:r==="-webkit-"&&(e="final"),r==="-webkit- 2009"&&(r="-webkit-"),[e,r]}});var Wb=x((C$,Hb)=>{u();var Ub=$e().list,Vb=Pe(),rT=j(),Sr=class extends rT{prefixed(e,t){let i;return[i,t]=Vb(t),i===2009?t+"box-flex":super.prefixed(e,t)}normalize(){return"flex"}set(e,t){let i=Vb(t)[0];if(i===2009)return e.value=Ub.space(e.value)[0],e.value=Sr.oldValues[e.value]||e.value,super.set(e,t);if(i===2012){let n=Ub.space(e.value);n.length===3&&n[2]==="0"&&(e.value=n.slice(0,2).concat("0px").join(" "))}return super.set(e,t)}};Sr.names=["flex","box-flex"];Sr.oldValues={auto:"1",none:"0"};Hb.exports=Sr});var Yb=x((_$,Qb)=>{u();var Gb=Pe(),iT=j(),du=class extends iT{prefixed(e,t){let i;return[i,t]=Gb(t),i===2009?t+"box-ordinal-group":i===2012?t+"flex-order":super.prefixed(e,t)}normalize(){return"order"}set(e,t){return Gb(t)[0]===2009&&/\d/.test(e.value)?(e.value=(parseInt(e.value)+1).toString(),super.set(e,t)):super.set(e,t)}};du.names=["order","flex-order","box-ordinal-group"];Qb.exports=du});var Xb=x((E$,Kb)=>{u();var nT=j(),hu=class extends nT{check(e){let t=e.value;return!t.toLowerCase().includes("alpha(")&&!t.includes("DXImageTransform.Microsoft")&&!t.includes("data:image/svg+xml")}};hu.names=["filter"];Kb.exports=hu});var Jb=x((O$,Zb)=>{u();var sT=j(),mu=class extends sT{insert(e,t,i,n){if(t!=="-ms-")return super.insert(e,t,i);let s=this.clone(e),a=e.prop.replace(/end$/,"start"),o=t+e.prop.replace(/end$/,"span");if(!e.parent.some(l=>l.prop===o)){if(s.prop=o,e.value.includes("span"))s.value=e.value.replace(/span\s/i,"");else{let l;if(e.parent.walkDecls(a,c=>{l=c}),l){let c=Number(e.value)-Number(l.value)+"";s.value=c}else e.warn(n,`Can not prefix ${e.prop} (${a} is not found)`)}e.cloneBefore(s)}}};mu.names=["grid-row-end","grid-column-end"];Zb.exports=mu});var tw=x((T$,ew)=>{u();var aT=j(),gu=class extends aT{check(e){return!e.value.split(/\s+/).some(t=>{let i=t.toLowerCase();return i==="reverse"||i==="alternate-reverse"})}};gu.names=["animation","animation-direction"];ew.exports=gu});var iw=x((R$,rw)=>{u();var oT=Pe(),lT=j(),yu=class extends lT{insert(e,t,i){let n;if([n,t]=oT(t),n!==2009)return super.insert(e,t,i);let s=e.value.split(/\s+/).filter(d=>d!=="wrap"&&d!=="nowrap"&&"wrap-reverse");if(s.length===0||e.parent.some(d=>d.prop===t+"box-orient"||d.prop===t+"box-direction"))return;let o=s[0],l=o.includes("row")?"horizontal":"vertical",c=o.includes("reverse")?"reverse":"normal",f=this.clone(e);return f.prop=t+"box-orient",f.value=l,this.needCascade(e)&&(f.raws.before=this.calcBefore(i,e,t)),e.parent.insertBefore(e,f),f=this.clone(e),f.prop=t+"box-direction",f.value=c,this.needCascade(e)&&(f.raws.before=this.calcBefore(i,e,t)),e.parent.insertBefore(e,f)}};yu.names=["flex-flow","box-direction","box-orient"];rw.exports=yu});var sw=x((P$,nw)=>{u();var uT=Pe(),fT=j(),bu=class extends fT{normalize(){return"flex"}prefixed(e,t){let i;return[i,t]=uT(t),i===2009?t+"box-flex":i===2012?t+"flex-positive":super.prefixed(e,t)}};bu.names=["flex-grow","flex-positive"];nw.exports=bu});var ow=x((I$,aw)=>{u();var cT=Pe(),pT=j(),wu=class extends pT{set(e,t){if(cT(t)[0]!==2009)return super.set(e,t)}};wu.names=["flex-wrap"];aw.exports=wu});var uw=x((D$,lw)=>{u();var dT=j(),Ar=Bt(),vu=class extends dT{insert(e,t,i,n){if(t!=="-ms-")return super.insert(e,t,i);let s=Ar.parse(e),[a,o]=Ar.translate(s,0,2),[l,c]=Ar.translate(s,1,3);[["grid-row",a],["grid-row-span",o],["grid-column",l],["grid-column-span",c]].forEach(([f,d])=>{Ar.insertDecl(e,f,d)}),Ar.warnTemplateSelectorNotFound(e,n),Ar.warnIfGridRowColumnExists(e,n)}};vu.names=["grid-area"];lw.exports=vu});var cw=x((q$,fw)=>{u();var hT=j(),Bi=Bt(),xu=class extends hT{insert(e,t,i){if(t!=="-ms-")return super.insert(e,t,i);if(e.parent.some(a=>a.prop==="-ms-grid-row-align"))return;let[[n,s]]=Bi.parse(e);s?(Bi.insertDecl(e,"grid-row-align",n),Bi.insertDecl(e,"grid-column-align",s)):(Bi.insertDecl(e,"grid-row-align",n),Bi.insertDecl(e,"grid-column-align",n))}};xu.names=["place-self"];fw.exports=xu});var dw=x(($$,pw)=>{u();var mT=j(),ku=class extends mT{check(e){let t=e.value;return!t.includes("/")||t.includes("span")}normalize(e){return e.replace("-start","")}prefixed(e,t){let i=super.prefixed(e,t);return t==="-ms-"&&(i=i.replace("-start","")),i}};ku.names=["grid-row-start","grid-column-start"];pw.exports=ku});var gw=x((L$,mw)=>{u();var hw=Pe(),gT=j(),Cr=class extends gT{check(e){return e.parent&&!e.parent.some(t=>t.prop&&t.prop.startsWith("grid-"))}prefixed(e,t){let i;return[i,t]=hw(t),i===2012?t+"flex-item-align":super.prefixed(e,t)}normalize(){return"align-self"}set(e,t){let i=hw(t)[0];if(i===2012)return e.value=Cr.oldValues[e.value]||e.value,super.set(e,t);if(i==="final")return super.set(e,t)}};Cr.names=["align-self","flex-item-align"];Cr.oldValues={"flex-end":"end","flex-start":"start"};mw.exports=Cr});var bw=x((M$,yw)=>{u();var yT=j(),bT=_e(),Su=class extends yT{constructor(e,t,i){super(e,t,i);this.prefixes&&(this.prefixes=bT.uniq(this.prefixes.map(n=>n==="-ms-"?"-webkit-":n)))}};Su.names=["appearance"];yw.exports=Su});var xw=x((N$,vw)=>{u();var ww=Pe(),wT=j(),Au=class extends wT{normalize(){return"flex-basis"}prefixed(e,t){let i;return[i,t]=ww(t),i===2012?t+"flex-preferred-size":super.prefixed(e,t)}set(e,t){let i;if([i,t]=ww(t),i===2012||i==="final")return super.set(e,t)}};Au.names=["flex-basis","flex-preferred-size"];vw.exports=Au});var Sw=x((B$,kw)=>{u();var vT=j(),Cu=class extends vT{normalize(){return this.name.replace("box-image","border")}prefixed(e,t){let i=super.prefixed(e,t);return t==="-webkit-"&&(i=i.replace("border","box-image")),i}};Cu.names=["mask-border","mask-border-source","mask-border-slice","mask-border-width","mask-border-outset","mask-border-repeat","mask-box-image","mask-box-image-source","mask-box-image-slice","mask-box-image-width","mask-box-image-outset","mask-box-image-repeat"];kw.exports=Cu});var Cw=x((F$,Aw)=>{u();var xT=j(),lt=class extends xT{insert(e,t,i){let n=e.prop==="mask-composite",s;n?s=e.value.split(","):s=e.value.match(lt.regexp)||[],s=s.map(c=>c.trim()).filter(c=>c);let a=s.length,o;if(a&&(o=this.clone(e),o.value=s.map(c=>lt.oldValues[c]||c).join(", "),s.includes("intersect")&&(o.value+=", xor"),o.prop=t+"mask-composite"),n)return a?(this.needCascade(e)&&(o.raws.before=this.calcBefore(i,e,t)),e.parent.insertBefore(e,o)):void 0;let l=this.clone(e);return l.prop=t+l.prop,a&&(l.value=l.value.replace(lt.regexp,"")),this.needCascade(e)&&(l.raws.before=this.calcBefore(i,e,t)),e.parent.insertBefore(e,l),a?(this.needCascade(e)&&(o.raws.before=this.calcBefore(i,e,t)),e.parent.insertBefore(e,o)):e}};lt.names=["mask","mask-composite"];lt.oldValues={add:"source-over",subtract:"source-out",intersect:"source-in",exclude:"xor"};lt.regexp=new RegExp(`\\s+(${Object.keys(lt.oldValues).join("|")})\\b(?!\\))\\s*(?=[,])`,"ig");Aw.exports=lt});var Ow=x((j$,Ew)=>{u();var _w=Pe(),kT=j(),_r=class extends kT{prefixed(e,t){let i;return[i,t]=_w(t),i===2009?t+"box-align":i===2012?t+"flex-align":super.prefixed(e,t)}normalize(){return"align-items"}set(e,t){let i=_w(t)[0];return(i===2009||i===2012)&&(e.value=_r.oldValues[e.value]||e.value),super.set(e,t)}};_r.names=["align-items","flex-align","box-align"];_r.oldValues={"flex-end":"end","flex-start":"start"};Ew.exports=_r});var Rw=x((z$,Tw)=>{u();var ST=j(),_u=class extends ST{set(e,t){return t==="-ms-"&&e.value==="contain"&&(e.value="element"),super.set(e,t)}insert(e,t,i){if(!(e.value==="all"&&t==="-ms-"))return super.insert(e,t,i)}};_u.names=["user-select"];Tw.exports=_u});var Dw=x((U$,Iw)=>{u();var Pw=Pe(),AT=j(),Eu=class extends AT{normalize(){return"flex-shrink"}prefixed(e,t){let i;return[i,t]=Pw(t),i===2012?t+"flex-negative":super.prefixed(e,t)}set(e,t){let i;if([i,t]=Pw(t),i===2012||i==="final")return super.set(e,t)}};Eu.names=["flex-shrink","flex-negative"];Iw.exports=Eu});var $w=x((V$,qw)=>{u();var CT=j(),Ou=class extends CT{prefixed(e,t){return`${t}column-${e}`}normalize(e){return e.includes("inside")?"break-inside":e.includes("before")?"break-before":"break-after"}set(e,t){return(e.prop==="break-inside"&&e.value==="avoid-column"||e.value==="avoid-page")&&(e.value="avoid"),super.set(e,t)}insert(e,t,i){if(e.prop!=="break-inside")return super.insert(e,t,i);if(!(/region/i.test(e.value)||/page/i.test(e.value)))return super.insert(e,t,i)}};Ou.names=["break-inside","page-break-inside","column-break-inside","break-before","page-break-before","column-break-before","break-after","page-break-after","column-break-after"];qw.exports=Ou});var Mw=x((H$,Lw)=>{u();var _T=j(),Tu=class extends _T{prefixed(e,t){return t+"print-color-adjust"}normalize(){return"color-adjust"}};Tu.names=["color-adjust","print-color-adjust"];Lw.exports=Tu});var Bw=x((W$,Nw)=>{u();var ET=j(),Er=class extends ET{insert(e,t,i){if(t==="-ms-"){let n=this.set(this.clone(e),t);this.needCascade(e)&&(n.raws.before=this.calcBefore(i,e,t));let s="ltr";return e.parent.nodes.forEach(a=>{a.prop==="direction"&&(a.value==="rtl"||a.value==="ltr")&&(s=a.value)}),n.value=Er.msValues[s][e.value]||e.value,e.parent.insertBefore(e,n)}return super.insert(e,t,i)}};Er.names=["writing-mode"];Er.msValues={ltr:{"horizontal-tb":"lr-tb","vertical-rl":"tb-rl","vertical-lr":"tb-lr"},rtl:{"horizontal-tb":"rl-tb","vertical-rl":"bt-rl","vertical-lr":"bt-lr"}};Nw.exports=Er});var jw=x((G$,Fw)=>{u();var OT=j(),Ru=class extends OT{set(e,t){return e.value=e.value.replace(/\s+fill(\s)/,"$1"),super.set(e,t)}};Ru.names=["border-image"];Fw.exports=Ru});var Vw=x((Q$,Uw)=>{u();var zw=Pe(),TT=j(),Or=class extends TT{prefixed(e,t){let i;return[i,t]=zw(t),i===2012?t+"flex-line-pack":super.prefixed(e,t)}normalize(){return"align-content"}set(e,t){let i=zw(t)[0];if(i===2012)return e.value=Or.oldValues[e.value]||e.value,super.set(e,t);if(i==="final")return super.set(e,t)}};Or.names=["align-content","flex-line-pack"];Or.oldValues={"flex-end":"end","flex-start":"start","space-between":"justify","space-around":"distribute"};Uw.exports=Or});var Ww=x((Y$,Hw)=>{u();var RT=j(),We=class extends RT{prefixed(e,t){return t==="-moz-"?t+(We.toMozilla[e]||e):super.prefixed(e,t)}normalize(e){return We.toNormal[e]||e}};We.names=["border-radius"];We.toMozilla={};We.toNormal={};for(let r of["top","bottom"])for(let e of["left","right"]){let t=`border-${r}-${e}-radius`,i=`border-radius-${r}${e}`;We.names.push(t),We.names.push(i),We.toMozilla[t]=i,We.toNormal[i]=t}Hw.exports=We});var Qw=x((K$,Gw)=>{u();var PT=j(),Pu=class extends PT{prefixed(e,t){return e.includes("-start")?t+e.replace("-block-start","-before"):t+e.replace("-block-end","-after")}normalize(e){return e.includes("-before")?e.replace("-before","-block-start"):e.replace("-after","-block-end")}};Pu.names=["border-block-start","border-block-end","margin-block-start","margin-block-end","padding-block-start","padding-block-end","border-before","border-after","margin-before","margin-after","padding-before","padding-after"];Gw.exports=Pu});var Kw=x((X$,Yw)=>{u();var IT=j(),{parseTemplate:DT,warnMissedAreas:qT,getGridGap:$T,warnGridGap:LT,inheritGridGap:MT}=Bt(),Iu=class extends IT{insert(e,t,i,n){if(t!=="-ms-")return super.insert(e,t,i);if(e.parent.some(h=>h.prop==="-ms-grid-rows"))return;let s=$T(e),a=MT(e,s),{rows:o,columns:l,areas:c}=DT({decl:e,gap:a||s}),f=Object.keys(c).length>0,d=Boolean(o),p=Boolean(l);return LT({gap:s,hasColumns:p,decl:e,result:n}),qT(c,e,n),(d&&p||f)&&e.cloneBefore({prop:"-ms-grid-rows",value:o,raws:{}}),p&&e.cloneBefore({prop:"-ms-grid-columns",value:l,raws:{}}),e}};Iu.names=["grid-template"];Yw.exports=Iu});var Zw=x((Z$,Xw)=>{u();var NT=j(),Du=class extends NT{prefixed(e,t){return t+e.replace("-inline","")}normalize(e){return e.replace(/(margin|padding|border)-(start|end)/,"$1-inline-$2")}};Du.names=["border-inline-start","border-inline-end","margin-inline-start","margin-inline-end","padding-inline-start","padding-inline-end","border-start","border-end","margin-start","margin-end","padding-start","padding-end"];Xw.exports=Du});var e0=x((J$,Jw)=>{u();var BT=j(),qu=class extends BT{check(e){return!e.value.includes("flex-")&&e.value!=="baseline"}prefixed(e,t){return t+"grid-row-align"}normalize(){return"align-self"}};qu.names=["grid-row-align"];Jw.exports=qu});var r0=x((eL,t0)=>{u();var FT=j(),Tr=class extends FT{keyframeParents(e){let{parent:t}=e;for(;t;){if(t.type==="atrule"&&t.name==="keyframes")return!0;({parent:t}=t)}return!1}contain3d(e){if(e.prop==="transform-origin")return!1;for(let t of Tr.functions3d)if(e.value.includes(`${t}(`))return!0;return!1}set(e,t){return e=super.set(e,t),t==="-ms-"&&(e.value=e.value.replace(/rotatez/gi,"rotate")),e}insert(e,t,i){if(t==="-ms-"){if(!this.contain3d(e)&&!this.keyframeParents(e))return super.insert(e,t,i)}else if(t==="-o-"){if(!this.contain3d(e))return super.insert(e,t,i)}else return super.insert(e,t,i)}};Tr.names=["transform","transform-origin"];Tr.functions3d=["matrix3d","translate3d","translateZ","scale3d","scaleZ","rotate3d","rotateX","rotateY","perspective"];t0.exports=Tr});var s0=x((tL,n0)=>{u();var i0=Pe(),jT=j(),$u=class extends jT{normalize(){return"flex-direction"}insert(e,t,i){let n;if([n,t]=i0(t),n!==2009)return super.insert(e,t,i);if(e.parent.some(f=>f.prop===t+"box-orient"||f.prop===t+"box-direction"))return;let a=e.value,o,l;a==="inherit"||a==="initial"||a==="unset"?(o=a,l=a):(o=a.includes("row")?"horizontal":"vertical",l=a.includes("reverse")?"reverse":"normal");let c=this.clone(e);return c.prop=t+"box-orient",c.value=o,this.needCascade(e)&&(c.raws.before=this.calcBefore(i,e,t)),e.parent.insertBefore(e,c),c=this.clone(e),c.prop=t+"box-direction",c.value=l,this.needCascade(e)&&(c.raws.before=this.calcBefore(i,e,t)),e.parent.insertBefore(e,c)}old(e,t){let i;return[i,t]=i0(t),i===2009?[t+"box-orient",t+"box-direction"]:super.old(e,t)}};$u.names=["flex-direction","box-direction","box-orient"];n0.exports=$u});var o0=x((rL,a0)=>{u();var zT=j(),Lu=class extends zT{check(e){return e.value==="pixelated"}prefixed(e,t){return t==="-ms-"?"-ms-interpolation-mode":super.prefixed(e,t)}set(e,t){return t!=="-ms-"?super.set(e,t):(e.prop="-ms-interpolation-mode",e.value="nearest-neighbor",e)}normalize(){return"image-rendering"}process(e,t){return super.process(e,t)}};Lu.names=["image-rendering","interpolation-mode"];a0.exports=Lu});var u0=x((iL,l0)=>{u();var UT=j(),VT=_e(),Mu=class extends UT{constructor(e,t,i){super(e,t,i);this.prefixes&&(this.prefixes=VT.uniq(this.prefixes.map(n=>n==="-ms-"?"-webkit-":n)))}};Mu.names=["backdrop-filter"];l0.exports=Mu});var c0=x((nL,f0)=>{u();var HT=j(),WT=_e(),Nu=class extends HT{constructor(e,t,i){super(e,t,i);this.prefixes&&(this.prefixes=WT.uniq(this.prefixes.map(n=>n==="-ms-"?"-webkit-":n)))}check(e){return e.value.toLowerCase()==="text"}};Nu.names=["background-clip"];f0.exports=Nu});var d0=x((sL,p0)=>{u();var GT=j(),QT=["none","underline","overline","line-through","blink","inherit","initial","unset"],Bu=class extends GT{check(e){return e.value.split(/\s+/).some(t=>!QT.includes(t))}};Bu.names=["text-decoration"];p0.exports=Bu});var g0=x((aL,m0)=>{u();var h0=Pe(),YT=j(),Rr=class extends YT{prefixed(e,t){let i;return[i,t]=h0(t),i===2009?t+"box-pack":i===2012?t+"flex-pack":super.prefixed(e,t)}normalize(){return"justify-content"}set(e,t){let i=h0(t)[0];if(i===2009||i===2012){let n=Rr.oldValues[e.value]||e.value;if(e.value=n,i!==2009||n!=="distribute")return super.set(e,t)}else if(i==="final")return super.set(e,t)}};Rr.names=["justify-content","flex-pack","box-pack"];Rr.oldValues={"flex-end":"end","flex-start":"start","space-between":"justify","space-around":"distribute"};m0.exports=Rr});var b0=x((oL,y0)=>{u();var KT=j(),Fu=class extends KT{set(e,t){let i=e.value.toLowerCase();return t==="-webkit-"&&!i.includes(" ")&&i!=="contain"&&i!=="cover"&&(e.value=e.value+" "+e.value),super.set(e,t)}};Fu.names=["background-size"];y0.exports=Fu});var v0=x((lL,w0)=>{u();var XT=j(),ju=Bt(),zu=class extends XT{insert(e,t,i){if(t!=="-ms-")return super.insert(e,t,i);let n=ju.parse(e),[s,a]=ju.translate(n,0,1);n[0]&&n[0].includes("span")&&(a=n[0].join("").replace(/\D/g,"")),[[e.prop,s],[`${e.prop}-span`,a]].forEach(([l,c])=>{ju.insertDecl(e,l,c)})}};zu.names=["grid-row","grid-column"];w0.exports=zu});var S0=x((uL,k0)=>{u();var ZT=j(),{prefixTrackProp:x0,prefixTrackValue:JT,autoplaceGridItems:eR,getGridGap:tR,inheritGridGap:rR}=Bt(),iR=ou(),Uu=class extends ZT{prefixed(e,t){return t==="-ms-"?x0({prop:e,prefix:t}):super.prefixed(e,t)}normalize(e){return e.replace(/^grid-(rows|columns)/,"grid-template-$1")}insert(e,t,i,n){if(t!=="-ms-")return super.insert(e,t,i);let{parent:s,prop:a,value:o}=e,l=a.includes("rows"),c=a.includes("columns"),f=s.some(k=>k.prop==="grid-template"||k.prop==="grid-template-areas");if(f&&l)return!1;let d=new iR({options:{}}),p=d.gridStatus(s,n),h=tR(e);h=rR(e,h)||h;let b=l?h.row:h.column;(p==="no-autoplace"||p===!0)&&!f&&(b=null);let v=JT({value:o,gap:b});e.cloneBefore({prop:x0({prop:a,prefix:t}),value:v});let y=s.nodes.find(k=>k.prop==="grid-auto-flow"),w="row";if(y&&!d.disabled(y,n)&&(w=y.value.trim()),p==="autoplace"){let k=s.nodes.find(E=>E.prop==="grid-template-rows");if(!k&&f)return;if(!k&&!f){e.warn(n,"Autoplacement does not work without grid-template-rows property");return}!s.nodes.find(E=>E.prop==="grid-template-columns")&&!f&&e.warn(n,"Autoplacement does not work without grid-template-columns property"),c&&!f&&eR(e,n,h,w)}}};Uu.names=["grid-template-rows","grid-template-columns","grid-rows","grid-columns"];k0.exports=Uu});var C0=x((fL,A0)=>{u();var nR=j(),Vu=class extends nR{check(e){return!e.value.includes("flex-")&&e.value!=="baseline"}prefixed(e,t){return t+"grid-column-align"}normalize(){return"justify-self"}};Vu.names=["grid-column-align"];A0.exports=Vu});var E0=x((cL,_0)=>{u();var sR=j(),Hu=class extends sR{prefixed(e,t){return t+"scroll-chaining"}normalize(){return"overscroll-behavior"}set(e,t){return e.value==="auto"?e.value="chained":(e.value==="none"||e.value==="contain")&&(e.value="none"),super.set(e,t)}};Hu.names=["overscroll-behavior","scroll-chaining"];_0.exports=Hu});var R0=x((pL,T0)=>{u();var aR=j(),{parseGridAreas:oR,warnMissedAreas:lR,prefixTrackProp:uR,prefixTrackValue:O0,getGridGap:fR,warnGridGap:cR,inheritGridGap:pR}=Bt();function dR(r){return r.trim().slice(1,-1).split(/["']\s*["']?/g)}var Wu=class extends aR{insert(e,t,i,n){if(t!=="-ms-")return super.insert(e,t,i);let s=!1,a=!1,o=e.parent,l=fR(e);l=pR(e,l)||l,o.walkDecls(/-ms-grid-rows/,d=>d.remove()),o.walkDecls(/grid-template-(rows|columns)/,d=>{if(d.prop==="grid-template-rows"){a=!0;let{prop:p,value:h}=d;d.cloneBefore({prop:uR({prop:p,prefix:t}),value:O0({value:h,gap:l.row})})}else s=!0});let c=dR(e.value);s&&!a&&l.row&&c.length>1&&e.cloneBefore({prop:"-ms-grid-rows",value:O0({value:`repeat(${c.length}, auto)`,gap:l.row}),raws:{}}),cR({gap:l,hasColumns:s,decl:e,result:n});let f=oR({rows:c,gap:l});return lR(f,e,n),e}};Wu.names=["grid-template-areas"];T0.exports=Wu});var I0=x((dL,P0)=>{u();var hR=j(),Gu=class extends hR{set(e,t){return t==="-webkit-"&&(e.value=e.value.replace(/\s*(right|left)\s*/i,"")),super.set(e,t)}};Gu.names=["text-emphasis-position"];P0.exports=Gu});var q0=x((hL,D0)=>{u();var mR=j(),Qu=class extends mR{set(e,t){return e.prop==="text-decoration-skip-ink"&&e.value==="auto"?(e.prop=t+"text-decoration-skip",e.value="ink",e):super.set(e,t)}};Qu.names=["text-decoration-skip-ink","text-decoration-skip"];D0.exports=Qu});var F0=x((mL,B0)=>{u();"use strict";B0.exports={wrap:$0,limit:L0,validate:M0,test:Yu,curry:gR,name:N0};function $0(r,e,t){var i=e-r;return((t-r)%i+i)%i+r}function L0(r,e,t){return Math.max(r,Math.min(e,t))}function M0(r,e,t,i,n){if(!Yu(r,e,t,i,n))throw new Error(t+" is outside of range ["+r+","+e+")");return t}function Yu(r,e,t,i,n){return!(t<r||t>e||n&&t===e||i&&t===r)}function N0(r,e,t,i){return(t?"(":"[")+r+","+e+(i?")":"]")}function gR(r,e,t,i){var n=N0.bind(null,r,e,t,i);return{wrap:$0.bind(null,r,e),limit:L0.bind(null,r,e),validate:function(s){return M0(r,e,s,t,i)},test:function(s){return Yu(r,e,s,t,i)},toString:n,name:n}}});var U0=x((gL,z0)=>{u();var Ku=Ms(),yR=F0(),bR=xr(),wR=He(),vR=_e(),j0=/top|left|right|bottom/gi,wt=class extends wR{replace(e,t){let i=Ku(e);for(let n of i.nodes)if(n.type==="function"&&n.value===this.name)if(n.nodes=this.newDirection(n.nodes),n.nodes=this.normalize(n.nodes),t==="-webkit- old"){if(!this.oldWebkit(n))return!1}else n.nodes=this.convertDirection(n.nodes),n.value=t+n.value;return i.toString()}replaceFirst(e,...t){return t.map(n=>n===" "?{type:"space",value:n}:{type:"word",value:n}).concat(e.slice(1))}normalizeUnit(e,t){return`${parseFloat(e)/t*360}deg`}normalize(e){if(!e[0])return e;if(/-?\d+(.\d+)?grad/.test(e[0].value))e[0].value=this.normalizeUnit(e[0].value,400);else if(/-?\d+(.\d+)?rad/.test(e[0].value))e[0].value=this.normalizeUnit(e[0].value,2*Math.PI);else if(/-?\d+(.\d+)?turn/.test(e[0].value))e[0].value=this.normalizeUnit(e[0].value,1);else if(e[0].value.includes("deg")){let t=parseFloat(e[0].value);t=yR.wrap(0,360,t),e[0].value=`${t}deg`}return e[0].value==="0deg"?e=this.replaceFirst(e,"to"," ","top"):e[0].value==="90deg"?e=this.replaceFirst(e,"to"," ","right"):e[0].value==="180deg"?e=this.replaceFirst(e,"to"," ","bottom"):e[0].value==="270deg"&&(e=this.replaceFirst(e,"to"," ","left")),e}newDirection(e){if(e[0].value==="to"||(j0.lastIndex=0,!j0.test(e[0].value)))return e;e.unshift({type:"word",value:"to"},{type:"space",value:" "});for(let t=2;t<e.length&&e[t].type!=="div";t++)e[t].type==="word"&&(e[t].value=this.revertDirection(e[t].value));return e}isRadial(e){let t="before";for(let i of e)if(t==="before"&&i.type==="space")t="at";else if(t==="at"&&i.value==="at")t="after";else{if(t==="after"&&i.type==="space")return!0;if(i.type==="div")break;t="before"}return!1}convertDirection(e){return e.length>0&&(e[0].value==="to"?this.fixDirection(e):e[0].value.includes("deg")?this.fixAngle(e):this.isRadial(e)&&this.fixRadial(e)),e}fixDirection(e){e.splice(0,2);for(let t of e){if(t.type==="div")break;t.type==="word"&&(t.value=this.revertDirection(t.value))}}fixAngle(e){let t=e[0].value;t=parseFloat(t),t=Math.abs(450-t)%360,t=this.roundFloat(t,3),e[0].value=`${t}deg`}fixRadial(e){let t=[],i=[],n,s,a,o,l;for(o=0;o<e.length-2;o++)if(n=e[o],s=e[o+1],a=e[o+2],n.type==="space"&&s.value==="at"&&a.type==="space"){l=o+3;break}else t.push(n);let c;for(o=l;o<e.length;o++)if(e[o].type==="div"){c=e[o];break}else i.push(e[o]);e.splice(0,o,...i,c,...t)}revertDirection(e){return wt.directions[e.toLowerCase()]||e}roundFloat(e,t){return parseFloat(e.toFixed(t))}oldWebkit(e){let{nodes:t}=e,i=Ku.stringify(e.nodes);if(this.name!=="linear-gradient"||t[0]&&t[0].value.includes("deg")||i.includes("px")||i.includes("-corner")||i.includes("-side"))return!1;let n=[[]];for(let s of t)n[n.length-1].push(s),s.type==="div"&&s.value===","&&n.push([]);this.oldDirection(n),this.colorStops(n),e.nodes=[];for(let s of n)e.nodes=e.nodes.concat(s);return e.nodes.unshift({type:"word",value:"linear"},this.cloneDiv(e.nodes)),e.value="-webkit-gradient",!0}oldDirection(e){let t=this.cloneDiv(e[0]);if(e[0][0].value!=="to")return e.unshift([{type:"word",value:wt.oldDirections.bottom},t]);{let i=[];for(let s of e[0].slice(2))s.type==="word"&&i.push(s.value.toLowerCase());i=i.join(" ");let n=wt.oldDirections[i]||i;return e[0]=[{type:"word",value:n},t],e[0]}}cloneDiv(e){for(let t of e)if(t.type==="div"&&t.value===",")return t;return{type:"div",value:",",after:" "}}colorStops(e){let t=[];for(let i=0;i<e.length;i++){let n,s=e[i],a;if(i===0)continue;let o=Ku.stringify(s[0]);s[1]&&s[1].type==="word"?n=s[1].value:s[2]&&s[2].type==="word"&&(n=s[2].value);let l;i===1&&(!n||n==="0%")?l=`from(${o})`:i===e.length-1&&(!n||n==="100%")?l=`to(${o})`:n?l=`color-stop(${n}, ${o})`:l=`color-stop(${o})`;let c=s[s.length-1];e[i]=[{type:"word",value:l}],c.type==="div"&&c.value===","&&(a=e[i].push(c)),t.push(a)}return t}old(e){if(e==="-webkit-"){let t=this.name==="linear-gradient"?"linear":"radial",i="-gradient",n=vR.regexp(`-webkit-(${t}-gradient|gradient\\(\\s*${t})`,!1);return new bR(this.name,e+this.name,i,n)}else return super.old(e)}add(e,t){let i=e.prop;if(i.includes("mask")){if(t==="-webkit-"||t==="-webkit- old")return super.add(e,t)}else if(i==="list-style"||i==="list-style-image"||i==="content"){if(t==="-webkit-"||t==="-webkit- old")return super.add(e,t)}else return super.add(e,t)}};wt.names=["linear-gradient","repeating-linear-gradient","radial-gradient","repeating-radial-gradient"];wt.directions={top:"bottom",left:"right",bottom:"top",right:"left"};wt.oldDirections={top:"left bottom, left top",left:"right top, left top",bottom:"left top, left bottom",right:"left top, right top","top right":"left bottom, right top","top left":"right bottom, left top","right top":"left bottom, right top","right bottom":"left top, right bottom","bottom right":"left top, right bottom","bottom left":"right top, left bottom","left top":"right bottom, left top","left bottom":"right top, left bottom"};z0.exports=wt});var W0=x((yL,H0)=>{u();var xR=xr(),kR=He();function V0(r){return new RegExp(`(^|[\\s,(])(${r}($|[\\s),]))`,"gi")}var Xu=class extends kR{regexp(){return this.regexpCache||(this.regexpCache=V0(this.name)),this.regexpCache}isStretch(){return this.name==="stretch"||this.name==="fill"||this.name==="fill-available"}replace(e,t){return t==="-moz-"&&this.isStretch()?e.replace(this.regexp(),"$1-moz-available$3"):t==="-webkit-"&&this.isStretch()?e.replace(this.regexp(),"$1-webkit-fill-available$3"):super.replace(e,t)}old(e){let t=e+this.name;return this.isStretch()&&(e==="-moz-"?t="-moz-available":e==="-webkit-"&&(t="-webkit-fill-available")),new xR(this.name,t,t,V0(t))}add(e,t){if(!(e.prop.includes("grid")&&t!=="-webkit-"))return super.add(e,t)}};Xu.names=["max-content","min-content","fit-content","fill","fill-available","stretch"];H0.exports=Xu});var Y0=x((bL,Q0)=>{u();var G0=xr(),SR=He(),Zu=class extends SR{replace(e,t){return t==="-webkit-"?e.replace(this.regexp(),"$1-webkit-optimize-contrast"):t==="-moz-"?e.replace(this.regexp(),"$1-moz-crisp-edges"):super.replace(e,t)}old(e){return e==="-webkit-"?new G0(this.name,"-webkit-optimize-contrast"):e==="-moz-"?new G0(this.name,"-moz-crisp-edges"):super.old(e)}};Zu.names=["pixelated"];Q0.exports=Zu});var X0=x((wL,K0)=>{u();var AR=He(),Ju=class extends AR{replace(e,t){let i=super.replace(e,t);return t==="-webkit-"&&(i=i.replace(/("[^"]+"|'[^']+')(\s+\d+\w)/gi,"url($1)$2")),i}};Ju.names=["image-set"];K0.exports=Ju});var J0=x((vL,Z0)=>{u();var CR=$e().list,_R=He(),ef=class extends _R{replace(e,t){return CR.space(e).map(i=>{if(i.slice(0,+this.name.length+1)!==this.name+"(")return i;let n=i.lastIndexOf(")"),s=i.slice(n+1),a=i.slice(this.name.length+1,n);if(t==="-webkit-"){let o=a.match(/\d*.?\d+%?/);o?(a=a.slice(o[0].length).trim(),a+=`, ${o[0]}`):a+=", 0.5"}return t+this.name+"("+a+")"+s}).join(" ")}};ef.names=["cross-fade"];Z0.exports=ef});var tv=x((xL,ev)=>{u();var ER=Pe(),OR=xr(),TR=He(),tf=class extends TR{constructor(e,t){super(e,t);e==="display-flex"&&(this.name="flex")}check(e){return e.prop==="display"&&e.value===this.name}prefixed(e){let t,i;return[t,e]=ER(e),t===2009?this.name==="flex"?i="box":i="inline-box":t===2012?this.name==="flex"?i="flexbox":i="inline-flexbox":t==="final"&&(i=this.name),e+i}replace(e,t){return this.prefixed(t)}old(e){let t=this.prefixed(e);if(!!t)return new OR(this.name,t)}};tf.names=["display-flex","inline-flex"];ev.exports=tf});var iv=x((kL,rv)=>{u();var RR=He(),rf=class extends RR{constructor(e,t){super(e,t);e==="display-grid"&&(this.name="grid")}check(e){return e.prop==="display"&&e.value===this.name}};rf.names=["display-grid","inline-grid"];rv.exports=rf});var sv=x((SL,nv)=>{u();var PR=He(),nf=class extends PR{constructor(e,t){super(e,t);e==="filter-function"&&(this.name="filter")}};nf.names=["filter","filter-function"];nv.exports=nf});var uv=x((AL,lv)=>{u();var av=Ni(),z=j(),ov=zy(),IR=ab(),DR=ou(),qR=Cb(),sf=Mt(),Pr=kr(),$R=Db(),ut=He(),Ir=_e(),LR=$b(),MR=Mb(),NR=Bb(),BR=jb(),FR=Wb(),jR=Yb(),zR=Xb(),UR=Jb(),VR=tw(),HR=iw(),WR=sw(),GR=ow(),QR=uw(),YR=cw(),KR=dw(),XR=gw(),ZR=bw(),JR=xw(),e5=Sw(),t5=Cw(),r5=Ow(),i5=Rw(),n5=Dw(),s5=$w(),a5=Mw(),o5=Bw(),l5=jw(),u5=Vw(),f5=Ww(),c5=Qw(),p5=Kw(),d5=Zw(),h5=e0(),m5=r0(),g5=s0(),y5=o0(),b5=u0(),w5=c0(),v5=d0(),x5=g0(),k5=b0(),S5=v0(),A5=S0(),C5=C0(),_5=E0(),E5=R0(),O5=I0(),T5=q0(),R5=U0(),P5=W0(),I5=Y0(),D5=X0(),q5=J0(),$5=tv(),L5=iv(),M5=sv();Pr.hack(LR);Pr.hack(MR);Pr.hack(NR);Pr.hack(BR);z.hack(FR);z.hack(jR);z.hack(zR);z.hack(UR);z.hack(VR);z.hack(HR);z.hack(WR);z.hack(GR);z.hack(QR);z.hack(YR);z.hack(KR);z.hack(XR);z.hack(ZR);z.hack(JR);z.hack(e5);z.hack(t5);z.hack(r5);z.hack(i5);z.hack(n5);z.hack(s5);z.hack(a5);z.hack(o5);z.hack(l5);z.hack(u5);z.hack(f5);z.hack(c5);z.hack(p5);z.hack(d5);z.hack(h5);z.hack(m5);z.hack(g5);z.hack(y5);z.hack(b5);z.hack(w5);z.hack(v5);z.hack(x5);z.hack(k5);z.hack(S5);z.hack(A5);z.hack(C5);z.hack(_5);z.hack(E5);z.hack(O5);z.hack(T5);ut.hack(R5);ut.hack(P5);ut.hack(I5);ut.hack(D5);ut.hack(q5);ut.hack($5);ut.hack(L5);ut.hack(M5);var af=new Map,Fi=class{constructor(e,t,i={}){this.data=e,this.browsers=t,this.options=i,[this.add,this.remove]=this.preprocess(this.select(this.data)),this.transition=new IR(this),this.processor=new DR(this)}cleaner(){if(this.cleanerCache)return this.cleanerCache;if(this.browsers.selected.length){let e=new sf(this.browsers.data,[]);this.cleanerCache=new Fi(this.data,e,this.options)}else return this;return this.cleanerCache}select(e){let t={add:{},remove:{}};for(let i in e){let n=e[i],s=n.browsers.map(l=>{let c=l.split(" ");return{browser:`${c[0]} ${c[1]}`,note:c[2]}}),a=s.filter(l=>l.note).map(l=>`${this.browsers.prefix(l.browser)} ${l.note}`);a=Ir.uniq(a),s=s.filter(l=>this.browsers.isSelected(l.browser)).map(l=>{let c=this.browsers.prefix(l.browser);return l.note?`${c} ${l.note}`:c}),s=this.sort(Ir.uniq(s)),this.options.flexbox==="no-2009"&&(s=s.filter(l=>!l.includes("2009")));let o=n.browsers.map(l=>this.browsers.prefix(l));n.mistakes&&(o=o.concat(n.mistakes)),o=o.concat(a),o=Ir.uniq(o),s.length?(t.add[i]=s,s.length<o.length&&(t.remove[i]=o.filter(l=>!s.includes(l)))):t.remove[i]=o}return t}sort(e){return e.sort((t,i)=>{let n=Ir.removeNote(t).length,s=Ir.removeNote(i).length;return n===s?i.length-t.length:s-n})}preprocess(e){let t={selectors:[],"@supports":new qR(Fi,this)};for(let n in e.add){let s=e.add[n];if(n==="@keyframes"||n==="@viewport")t[n]=new $R(n,s,this);else if(n==="@resolution")t[n]=new ov(n,s,this);else if(this.data[n].selector)t.selectors.push(Pr.load(n,s,this));else{let a=this.data[n].props;if(a){let o=ut.load(n,s,this);for(let l of a)t[l]||(t[l]={values:[]}),t[l].values.push(o)}else{let o=t[n]&&t[n].values||[];t[n]=z.load(n,s,this),t[n].values=o}}}let i={selectors:[]};for(let n in e.remove){let s=e.remove[n];if(this.data[n].selector){let a=Pr.load(n,s);for(let o of s)i.selectors.push(a.old(o))}else if(n==="@keyframes"||n==="@viewport")for(let a of s){let o=`@${a}${n.slice(1)}`;i[o]={remove:!0}}else if(n==="@resolution")i[n]=new ov(n,s,this);else{let a=this.data[n].props;if(a){let o=ut.load(n,[],this);for(let l of s){let c=o.old(l);if(c)for(let f of a)i[f]||(i[f]={}),i[f].values||(i[f].values=[]),i[f].values.push(c)}}else for(let o of s){let l=this.decl(n).old(n,o);if(n==="align-self"){let c=t[n]&&t[n].prefixes;if(c){if(o==="-webkit- 2009"&&c.includes("-webkit-"))continue;if(o==="-webkit-"&&c.includes("-webkit- 2009"))continue}}for(let c of l)i[c]||(i[c]={}),i[c].remove=!0}}}return[t,i]}decl(e){return af.has(e)||af.set(e,z.load(e)),af.get(e)}unprefixed(e){let t=this.normalize(av.unprefixed(e));return t==="flex-direction"&&(t="flex-flow"),t}normalize(e){return this.decl(e).normalize(e)}prefixed(e,t){return e=av.unprefixed(e),this.decl(e).prefixed(e,t)}values(e,t){let i=this[e],n=i["*"]&&i["*"].values,s=i[t]&&i[t].values;return n&&s?Ir.uniq(n.concat(s)):n||s||[]}group(e){let t=e.parent,i=t.index(e),{length:n}=t.nodes,s=this.unprefixed(e.prop),a=(o,l)=>{for(i+=o;i>=0&&i<n;){let c=t.nodes[i];if(c.type==="decl"){if(o===-1&&c.prop===s&&!sf.withPrefix(c.value)||this.unprefixed(c.prop)!==s)break;if(l(c)===!0)return!0;if(o===1&&c.prop===s&&!sf.withPrefix(c.value))break}i+=o}return!1};return{up(o){return a(-1,o)},down(o){return a(1,o)}}}};lv.exports=Fi});var cv=x((CL,fv)=>{u();fv.exports={"backdrop-filter":{feature:"css-backdrop-filter",browsers:["ios_saf 16.1","ios_saf 16.3","ios_saf 16.4","ios_saf 16.5","safari 16.5"]},element:{props:["background","background-image","border-image","mask","list-style","list-style-image","content","mask-image"],feature:"css-element-function",browsers:["firefox 114"]},"user-select":{mistakes:["-khtml-"],feature:"user-select-none",browsers:["ios_saf 16.1","ios_saf 16.3","ios_saf 16.4","ios_saf 16.5","safari 16.5"]},"background-clip":{feature:"background-clip-text",browsers:["and_chr 114","and_uc 15.5","chrome 109","chrome 113","chrome 114","edge 114","opera 99","samsung 21"]},hyphens:{feature:"css-hyphens",browsers:["ios_saf 16.1","ios_saf 16.3","ios_saf 16.4","ios_saf 16.5","safari 16.5"]},fill:{props:["width","min-width","max-width","height","min-height","max-height","inline-size","min-inline-size","max-inline-size","block-size","min-block-size","max-block-size","grid","grid-template","grid-template-rows","grid-template-columns","grid-auto-columns","grid-auto-rows"],feature:"intrinsic-width",browsers:["and_chr 114","and_uc 15.5","chrome 109","chrome 113","chrome 114","edge 114","opera 99","samsung 21"]},"fill-available":{props:["width","min-width","max-width","height","min-height","max-height","inline-size","min-inline-size","max-inline-size","block-size","min-block-size","max-block-size","grid","grid-template","grid-template-rows","grid-template-columns","grid-auto-columns","grid-auto-rows"],feature:"intrinsic-width",browsers:["and_chr 114","and_uc 15.5","chrome 109","chrome 113","chrome 114","edge 114","opera 99","samsung 21"]},stretch:{props:["width","min-width","max-width","height","min-height","max-height","inline-size","min-inline-size","max-inline-size","block-size","min-block-size","max-block-size","grid","grid-template","grid-template-rows","grid-template-columns","grid-auto-columns","grid-auto-rows"],feature:"intrinsic-width",browsers:["firefox 114"]},"fit-content":{props:["width","min-width","max-width","height","min-height","max-height","inline-size","min-inline-size","max-inline-size","block-size","min-block-size","max-block-size","grid","grid-template","grid-template-rows","grid-template-columns","grid-auto-columns","grid-auto-rows"],feature:"intrinsic-width",browsers:["firefox 114"]},"text-decoration-style":{feature:"text-decoration",browsers:["ios_saf 16.1","ios_saf 16.3","ios_saf 16.4","ios_saf 16.5"]},"text-decoration-color":{feature:"text-decoration",browsers:["ios_saf 16.1","ios_saf 16.3","ios_saf 16.4","ios_saf 16.5"]},"text-decoration-line":{feature:"text-decoration",browsers:["ios_saf 16.1","ios_saf 16.3","ios_saf 16.4","ios_saf 16.5"]},"text-decoration":{feature:"text-decoration",browsers:["ios_saf 16.1","ios_saf 16.3","ios_saf 16.4","ios_saf 16.5"]},"text-decoration-skip":{feature:"text-decoration",browsers:["ios_saf 16.1","ios_saf 16.3","ios_saf 16.4","ios_saf 16.5"]},"text-decoration-skip-ink":{feature:"text-decoration",browsers:["ios_saf 16.1","ios_saf 16.3","ios_saf 16.4","ios_saf 16.5"]},"text-size-adjust":{feature:"text-size-adjust",browsers:["ios_saf 16.1","ios_saf 16.3","ios_saf 16.4","ios_saf 16.5"]},"mask-clip":{feature:"css-masks",browsers:["and_chr 114","and_uc 15.5","chrome 109","chrome 113","chrome 114","edge 114","opera 99","samsung 21"]},"mask-composite":{feature:"css-masks",browsers:["and_chr 114","and_uc 15.5","chrome 109","chrome 113","chrome 114","edge 114","opera 99","samsung 21"]},"mask-image":{feature:"css-masks",browsers:["and_chr 114","and_uc 15.5","chrome 109","chrome 113","chrome 114","edge 114","opera 99","samsung 21"]},"mask-origin":{feature:"css-masks",browsers:["and_chr 114","and_uc 15.5","chrome 109","chrome 113","chrome 114","edge 114","opera 99","samsung 21"]},"mask-repeat":{feature:"css-masks",browsers:["and_chr 114","and_uc 15.5","chrome 109","chrome 113","chrome 114","edge 114","opera 99","samsung 21"]},"mask-border-repeat":{feature:"css-masks",browsers:["and_chr 114","and_uc 15.5","chrome 109","chrome 113","chrome 114","edge 114","opera 99","samsung 21"]},"mask-border-source":{feature:"css-masks",browsers:["and_chr 114","and_uc 15.5","chrome 109","chrome 113","chrome 114","edge 114","opera 99","samsung 21"]},mask:{feature:"css-masks",browsers:["and_chr 114","and_uc 15.5","chrome 109","chrome 113","chrome 114","edge 114","opera 99","samsung 21"]},"mask-position":{feature:"css-masks",browsers:["and_chr 114","and_uc 15.5","chrome 109","chrome 113","chrome 114","edge 114","opera 99","samsung 21"]},"mask-size":{feature:"css-masks",browsers:["and_chr 114","and_uc 15.5","chrome 109","chrome 113","chrome 114","edge 114","opera 99","samsung 21"]},"mask-border":{feature:"css-masks",browsers:["and_chr 114","and_uc 15.5","chrome 109","chrome 113","chrome 114","edge 114","opera 99","samsung 21"]},"mask-border-outset":{feature:"css-masks",browsers:["and_chr 114","and_uc 15.5","chrome 109","chrome 113","chrome 114","edge 114","opera 99","samsung 21"]},"mask-border-width":{feature:"css-masks",browsers:["and_chr 114","and_uc 15.5","chrome 109","chrome 113","chrome 114","edge 114","opera 99","samsung 21"]},"mask-border-slice":{feature:"css-masks",browsers:["and_chr 114","and_uc 15.5","chrome 109","chrome 113","chrome 114","edge 114","opera 99","samsung 21"]},"clip-path":{feature:"css-clip-path",browsers:["samsung 21"]},"box-decoration-break":{feature:"css-boxdecorationbreak",browsers:["and_chr 114","and_uc 15.5","chrome 109","chrome 113","chrome 114","edge 114","ios_saf 16.1","ios_saf 16.3","ios_saf 16.4","ios_saf 16.5","opera 99","safari 16.5","samsung 21"]},appearance:{feature:"css-appearance",browsers:["samsung 21"]},"image-set":{props:["background","background-image","border-image","cursor","mask","mask-image","list-style","list-style-image","content"],feature:"css-image-set",browsers:["and_uc 15.5","chrome 109","samsung 21"]},"cross-fade":{props:["background","background-image","border-image","mask","list-style","list-style-image","content","mask-image"],feature:"css-cross-fade",browsers:["and_chr 114","and_uc 15.5","chrome 109","chrome 113","chrome 114","edge 114","opera 99","samsung 21"]},isolate:{props:["unicode-bidi"],feature:"css-unicode-bidi",browsers:["ios_saf 16.1","ios_saf 16.3","ios_saf 16.4","ios_saf 16.5","safari 16.5"]},"color-adjust":{feature:"css-color-adjust",browsers:["chrome 109","chrome 113","chrome 114","edge 114","opera 99"]}}});var dv=x((_L,pv)=>{u();pv.exports={}});var yv=x((EL,gv)=>{u();var N5=Yl(),{agents:B5}=(Ps(),Rs),of=Oy(),F5=Mt(),j5=uv(),z5=cv(),U5=dv(),hv={browsers:B5,prefixes:z5},mv=`- Replace Autoprefixer \`browsers\` option to Browserslist config.- Use \`browserslist\` key in \`package.json\` or \`.browserslistrc\` file.-- Using \`browsers\` option can cause errors. Browserslist config can- be used for Babel, Autoprefixer, postcss-normalize and other tools.-- If you really need to use option, rename it to \`overrideBrowserslist\`.-- Learn more at:- https://github.com/browserslist/browserslist#readme- https://twitter.com/browserslist--`;function V5(r){return Object.prototype.toString.apply(r)==="[object Object]"}var lf=new Map;function H5(r,e){e.browsers.selected.length!==0&&(e.add.selectors.length>0||Object.keys(e.add).length>2||r.warn(`Autoprefixer target browsers do not need any prefixes.You do not need Autoprefixer anymore.-Check your Browserslist config to be sure that your targets are set up correctly.-- Learn more at:- https://github.com/postcss/autoprefixer#readme- https://github.com/browserslist/browserslist#readme--`))}gv.exports=Dr;function Dr(...r){let e;if(r.length===1&&V5(r[0])?(e=r[0],r=void 0):r.length===0||r.length===1&&!r[0]?r=void 0:r.length<=2&&(Array.isArray(r[0])||!r[0])?(e=r[1],r=r[0]):typeof r[r.length-1]=="object"&&(e=r.pop()),e||(e={}),e.browser)throw new Error("Change `browser` option to `overrideBrowserslist` in Autoprefixer");if(e.browserslist)throw new Error("Change `browserslist` option to `overrideBrowserslist` in Autoprefixer");e.overrideBrowserslist?r=e.overrideBrowserslist:e.browsers&&(typeof console!="undefined"&&console.warn&&(of.red?console.warn(of.red(mv.replace(/`[^`]+`/g,n=>of.yellow(n.slice(1,-1))))):console.warn(mv)),r=e.browsers);let t={ignoreUnknownVersions:e.ignoreUnknownVersions,stats:e.stats,env:e.env};function i(n){let s=hv,a=new F5(s.browsers,r,n,t),o=a.selected.join(", ")+JSON.stringify(e);return lf.has(o)||lf.set(o,new j5(s.prefixes,a,e)),lf.get(o)}return{postcssPlugin:"autoprefixer",prepare(n){let s=i({from:n.opts.from,env:e.env});return{OnceExit(a){H5(n,s),e.remove!==!1&&s.processor.remove(a,n),e.add!==!1&&s.processor.add(a,n)}}},info(n){return n=n||{},n.from=n.from||m.cwd(),U5(i(n))},options:e,browsers:r}}Dr.postcss=!0;Dr.data=hv;Dr.defaults=N5.defaults;Dr.info=()=>Dr().info()});var bv={};Ge(bv,{default:()=>W5});var W5,wv=P(()=>{u();W5=[]});var xv={};Ge(xv,{default:()=>G5});var vv,G5,kv=P(()=>{u();Xi();vv=pe(rn()),G5=St(vv.default.theme)});var Av={};Ge(Av,{default:()=>Q5});var Sv,Q5,Cv=P(()=>{u();Xi();Sv=pe(rn()),Q5=St(Sv.default)});u();"use strict";var Y5=vt(_y()),K5=vt($e()),X5=vt(yv()),Z5=vt((wv(),bv)),J5=vt((kv(),xv)),eP=vt((Cv(),Av)),tP=vt((Vs(),_f)),rP=vt((al(),sl)),iP=vt((sa(),sc));function vt(r){return r&&r.__esModule?r:{default:r}}console.warn("cdn.tailwindcss.com should not be used in production. To use Tailwind CSS in production, install it as a PostCSS plugin or use the Tailwind CLI: https://tailwindcss.com/docs/installation");var Ns="tailwind",uf="text/tailwindcss",_v="/template.html",Yt,Ev=!0,Ov=0,ff=new Set,cf,Tv="",Rv=(r=!1)=>({get(e,t){return(!r||t==="config")&&typeof e[t]=="object"&&e[t]!==null?new Proxy(e[t],Rv()):e[t]},set(e,t,i){return e[t]=i,(!r||t==="config")&&pf(!0),!0}});window[Ns]=new Proxy({config:{},defaultTheme:J5.default,defaultConfig:eP.default,colors:tP.default,plugin:rP.default,resolveConfig:iP.default},Rv(!0));function Pv(r){cf.observe(r,{attributes:!0,attributeFilter:["type"],characterData:!0,subtree:!0,childList:!0})}new MutationObserver(async r=>{let e=!1;if(!cf){cf=new MutationObserver(async()=>await pf(!0));for(let t of document.querySelectorAll(`style[type="${uf}"]`))Pv(t)}for(let t of r)for(let i of t.addedNodes)i.nodeType===1&&i.tagName==="STYLE"&&i.getAttribute("type")===uf&&(Pv(i),e=!0);await pf(e)}).observe(document.documentElement,{attributes:!0,attributeFilter:["class"],childList:!0,subtree:!0});async function pf(r=!1){r&&(Ov++,ff.clear());let e="";for(let i of document.querySelectorAll(`style[type="${uf}"]`))e+=i.textContent;let t=new Set;for(let i of document.querySelectorAll("[class]"))for(let n of i.classList)ff.has(n)||t.add(n);if(document.body&&(Ev||t.size>0||e!==Tv||!Yt||!Yt.isConnected)){for(let n of t)ff.add(n);Ev=!1,Tv=e,self[_v]=Array.from(t).join(" ");let{css:i}=await(0,K5.default)([(0,Y5.default)({...window[Ns].config,_hash:Ov,content:{files:[_v],extract:{html:n=>n.split(" ")}},plugins:[...Z5.default,...Array.isArray(window[Ns].config.plugins)?window[Ns].config.plugins:[]]}),(0,X5.default)({remove:!1})]).process(`@tailwind base;@tailwind components;@tailwind utilities;${e}`);(!Yt||!Yt.isConnected)&&(Yt=document.createElement("style"),document.head.append(Yt)),Yt.textContent=i}}})();-/*!- * fill-range <https://github.com/jonschlinkert/fill-range>- *- * Copyright (c) 2014-present, Jon Schlinkert.- * Licensed under the MIT License.- */-/*!- * is-number <https://github.com/jonschlinkert/is-number>- *- * Copyright (c) 2014-present, Jon Schlinkert.- * Released under the MIT License.- */-/*!- * to-regex-range <https://github.com/micromatch/to-regex-range>- *- * Copyright (c) 2015-present, Jon Schlinkert.- * Released under the MIT License.- */-/*! https://mths.be/cssesc v3.0.0 by @mathias */diff --git a/manifest.json b/manifest.jsondeleted file mode 100644index 78dab21..0000000--- a/manifest.json+++ /dev/null@@ -1,18 +0,0 @@-{- "name": "LibreTV",- "short_name": "LibreTV",- "description": "免费在线视频搜索与观看平台",- "start_url": ".",- "display": "standalone",- "background_color": "#0f1622",- "theme_color": "#000000",- "apple-mobile-web-app-capable": "yes",- "apple-mobile-web-app-status-bar-style": "black",- "icons": [- {- "src": "image/logo-black.png",- "sizes": "512x512",- "type": "image/png"- }- ]- }diff --git a/libretv-next/next-env.d.ts b/next-env.d.tssimilarity index 100%rename from libretv-next/next-env.d.tsrename to next-env.d.tsdiff --git a/libretv-next/next.config.ts b/next.config.tssimilarity index 100%rename from libretv-next/next.config.tsrename to next.config.tsdiff --git a/nodemon.json b/nodemon.jsondeleted file mode 100644index d694a3c..0000000--- a/nodemon.json+++ /dev/null@@ -1,21 +0,0 @@-{- "watch": [- "server.mjs",- "*.html",- ".env"- ],- "ext": "js,mjs,json,html,css",- "ignore": [- "node_modules/**/*",- ".git/**/*"- ],- "delay": "500",- "env": {- "NODE_ENV": "development"- },- "execMap": {- "mjs": "node"- },- "verbose": true,- "restartable": "rs"-}diff --git a/package-lock.json b/package-lock.jsonindex c41fa51..4dcce44 100644--- a/package-lock.json+++ b/package-lock.json@@ -1,1312 +1,3574 @@-{- "name": "libretv",- "version": "1.1.0",- "lockfileVersion": 3,- "requires": true,- "packages": {- "": {- "name": "libretv",- "version": "1.1.0",- "license": "Apache-2.0",- "dependencies": {- "axios": "^1.9.0",- "cors": "^2.8.5",- "dotenv": "^16.5.0",- "express": "^5.1.0",- "node-fetch": "^3.3.2"- },- "devDependencies": {- "nodemon": "^3.1.10"- }- },- "node_modules/accepts": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz",- "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==",- "dependencies": {- "mime-types": "^3.0.0",- "negotiator": "^1.0.0"- },- "engines": {- "node": ">= 0.6"- }- },- "node_modules/anymatch": {- "version": "3.1.3",- "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",- "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",- "dev": true,- "dependencies": {- "normalize-path": "^3.0.0",- "picomatch": "^2.0.4"- },- "engines": {- "node": ">= 8"- }- },- "node_modules/asynckit": {- "version": "0.4.0",- "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",- "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="- },- "node_modules/axios": {- "version": "1.9.0",- "resolved": "https://registry.npmjs.org/axios/-/axios-1.9.0.tgz",- "integrity": "sha512-re4CqKTJaURpzbLHtIi6XpDv20/CnpXOtjRY5/CU32L8gU8ek9UIivcfvSWvmKEngmVbrUtPpdDwWDWL7DNHvg==",- "dependencies": {- "follow-redirects": "^1.15.6",- "form-data": "^4.0.0",- "proxy-from-env": "^1.1.0"- }- },- "node_modules/balanced-match": {- "version": "1.0.2",- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",- "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",- "dev": true- },- "node_modules/binary-extensions": {- "version": "2.3.0",- "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",- "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",- "dev": true,- "engines": {- "node": ">=8"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },- "node_modules/body-parser": {- "version": "2.2.0",- "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.0.tgz",- "integrity": "sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg==",- "dependencies": {- "bytes": "^3.1.2",- "content-type": "^1.0.5",- "debug": "^4.4.0",- "http-errors": "^2.0.0",- "iconv-lite": "^0.6.3",- "on-finished": "^2.4.1",- "qs": "^6.14.0",- "raw-body": "^3.0.0",- "type-is": "^2.0.0"- },- "engines": {- "node": ">=18"- }- },- "node_modules/brace-expansion": {- "version": "1.1.11",- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",- "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",- "dev": true,- "dependencies": {- "balanced-match": "^1.0.0",- "concat-map": "0.0.1"- }- },- "node_modules/braces": {- "version": "3.0.3",- "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",- "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",- "dev": true,- "dependencies": {- "fill-range": "^7.1.1"- },- "engines": {- "node": ">=8"- }- },- "node_modules/bytes": {- "version": "3.1.2",- "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",- "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",- "engines": {- "node": ">= 0.8"- }- },- "node_modules/call-bind-apply-helpers": {- "version": "1.0.2",- "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",- "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",- "dependencies": {- "es-errors": "^1.3.0",- "function-bind": "^1.1.2"- },- "engines": {- "node": ">= 0.4"- }- },- "node_modules/call-bound": {- "version": "1.0.4",- "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",- "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",- "dependencies": {- "call-bind-apply-helpers": "^1.0.2",- "get-intrinsic": "^1.3.0"- },- "engines": {- "node": ">= 0.4"- },- "funding": {- "url": "https://github.com/sponsors/ljharb"- }- },- "node_modules/chokidar": {- "version": "3.6.0",- "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",- "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",- "dev": true,- "dependencies": {- "anymatch": "~3.1.2",- "braces": "~3.0.2",- "glob-parent": "~5.1.2",- "is-binary-path": "~2.1.0",- "is-glob": "~4.0.1",- "normalize-path": "~3.0.0",- "readdirp": "~3.6.0"- },- "engines": {- "node": ">= 8.10.0"- },- "funding": {- "url": "https://paulmillr.com/funding/"- },- "optionalDependencies": {- "fsevents": "~2.3.2"- }- },- "node_modules/combined-stream": {- "version": "1.0.8",- "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",- "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",- "dependencies": {- "delayed-stream": "~1.0.0"- },- "engines": {- "node": ">= 0.8"- }- },- "node_modules/concat-map": {- "version": "0.0.1",- "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",- "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",- "dev": true- },- "node_modules/content-disposition": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.0.tgz",- "integrity": "sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg==",- "dependencies": {- "safe-buffer": "5.2.1"- },- "engines": {- "node": ">= 0.6"- }- },- "node_modules/content-type": {- "version": "1.0.5",- "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",- "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",- "engines": {- "node": ">= 0.6"- }- },- "node_modules/cookie": {- "version": "0.7.2",- "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",- "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",- "engines": {- "node": ">= 0.6"- }- },- "node_modules/cookie-signature": {- "version": "1.2.2",- "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz",- "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==",- "engines": {- "node": ">=6.6.0"- }- },- "node_modules/cors": {- "version": "2.8.5",- "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",- "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",- "dependencies": {- "object-assign": "^4",- "vary": "^1"- },- "engines": {- "node": ">= 0.10"- }- },- "node_modules/data-uri-to-buffer": {- "version": "4.0.1",- "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",- "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==",- "engines": {- "node": ">= 12"- }- },- "node_modules/debug": {- "version": "4.4.1",- "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz",- "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==",- "dependencies": {- "ms": "^2.1.3"- },- "engines": {- "node": ">=6.0"- },- "peerDependenciesMeta": {- "supports-color": {- "optional": true- }- }- },- "node_modules/delayed-stream": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",- "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",- "engines": {- "node": ">=0.4.0"- }- },- "node_modules/depd": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",- "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",- "engines": {- "node": ">= 0.8"- }- },- "node_modules/dotenv": {- "version": "16.5.0",- "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.5.0.tgz",- "integrity": "sha512-m/C+AwOAr9/W1UOIZUo232ejMNnJAJtYQjUbHoNTBNTJSvqzzDh7vnrei3o3r3m9blf6ZoDkvcw0VmozNRFJxg==",- "engines": {- "node": ">=12"- },- "funding": {- "url": "https://dotenvx.com"- }- },- "node_modules/dunder-proto": {- "version": "1.0.1",- "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",- "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",- "dependencies": {- "call-bind-apply-helpers": "^1.0.1",- "es-errors": "^1.3.0",- "gopd": "^1.2.0"- },- "engines": {- "node": ">= 0.4"- }- },- "node_modules/ee-first": {- "version": "1.1.1",- "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",- "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="- },- "node_modules/encodeurl": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",- "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",- "engines": {- "node": ">= 0.8"- }- },- "node_modules/es-define-property": {- "version": "1.0.1",- "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",- "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",- "engines": {- "node": ">= 0.4"- }- },- "node_modules/es-errors": {- "version": "1.3.0",- "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",- "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",- "engines": {- "node": ">= 0.4"- }- },- "node_modules/es-object-atoms": {- "version": "1.1.1",- "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",- "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",- "dependencies": {- "es-errors": "^1.3.0"- },- "engines": {- "node": ">= 0.4"- }- },- "node_modules/es-set-tostringtag": {- "version": "2.1.0",- "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",- "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",- "dependencies": {- "es-errors": "^1.3.0",- "get-intrinsic": "^1.2.6",- "has-tostringtag": "^1.0.2",- "hasown": "^2.0.2"- },- "engines": {- "node": ">= 0.4"- }- },- "node_modules/escape-html": {- "version": "1.0.3",- "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",- "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="- },- "node_modules/etag": {- "version": "1.8.1",- "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",- "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",- "engines": {- "node": ">= 0.6"- }- },- "node_modules/express": {- "version": "5.1.0",- "resolved": "https://registry.npmjs.org/express/-/express-5.1.0.tgz",- "integrity": "sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA==",- "dependencies": {- "accepts": "^2.0.0",- "body-parser": "^2.2.0",- "content-disposition": "^1.0.0",- "content-type": "^1.0.5",- "cookie": "^0.7.1",- "cookie-signature": "^1.2.1",- "debug": "^4.4.0",- "encodeurl": "^2.0.0",- "escape-html": "^1.0.3",- "etag": "^1.8.1",- "finalhandler": "^2.1.0",- "fresh": "^2.0.0",- "http-errors": "^2.0.0",- "merge-descriptors": "^2.0.0",- "mime-types": "^3.0.0",- "on-finished": "^2.4.1",- "once": "^1.4.0",- "parseurl": "^1.3.3",- "proxy-addr": "^2.0.7",- "qs": "^6.14.0",- "range-parser": "^1.2.1",- "router": "^2.2.0",- "send": "^1.1.0",- "serve-static": "^2.2.0",- "statuses": "^2.0.1",- "type-is": "^2.0.1",- "vary": "^1.1.2"- },- "engines": {- "node": ">= 18"- },- "funding": {- "type": "opencollective",- "url": "https://opencollective.com/express"- }- },- "node_modules/fetch-blob": {- "version": "3.2.0",- "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz",- "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",- "funding": [- {- "type": "github",- "url": "https://github.com/sponsors/jimmywarting"- },- {- "type": "paypal",- "url": "https://paypal.me/jimmywarting"- }- ],- "dependencies": {- "node-domexception": "^1.0.0",- "web-streams-polyfill": "^3.0.3"- },- "engines": {- "node": "^12.20 || >= 14.13"- }- },- "node_modules/fill-range": {- "version": "7.1.1",- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",- "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",- "dev": true,- "dependencies": {- "to-regex-range": "^5.0.1"- },- "engines": {- "node": ">=8"- }- },- "node_modules/finalhandler": {- "version": "2.1.0",- "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.0.tgz",- "integrity": "sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q==",- "dependencies": {- "debug": "^4.4.0",- "encodeurl": "^2.0.0",- "escape-html": "^1.0.3",- "on-finished": "^2.4.1",- "parseurl": "^1.3.3",- "statuses": "^2.0.1"- },- "engines": {- "node": ">= 0.8"- }- },- "node_modules/follow-redirects": {- "version": "1.15.9",- "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz",- "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==",- "funding": [- {- "type": "individual",- "url": "https://github.com/sponsors/RubenVerborgh"- }- ],- "engines": {- "node": ">=4.0"- },- "peerDependenciesMeta": {- "debug": {- "optional": true- }- }- },- "node_modules/form-data": {- "version": "4.0.2",- "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz",- "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==",- "dependencies": {- "asynckit": "^0.4.0",- "combined-stream": "^1.0.8",- "es-set-tostringtag": "^2.1.0",- "mime-types": "^2.1.12"- },- "engines": {- "node": ">= 6"- }- },- "node_modules/form-data/node_modules/mime-db": {- "version": "1.52.0",- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",- "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",- "engines": {- "node": ">= 0.6"- }- },- "node_modules/form-data/node_modules/mime-types": {- "version": "2.1.35",- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",- "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",- "dependencies": {- "mime-db": "1.52.0"- },- "engines": {- "node": ">= 0.6"- }- },- "node_modules/formdata-polyfill": {- "version": "4.0.10",- "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz",- "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",- "dependencies": {- "fetch-blob": "^3.1.2"- },- "engines": {- "node": ">=12.20.0"- }- },- "node_modules/forwarded": {- "version": "0.2.0",- "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",- "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",- "engines": {- "node": ">= 0.6"- }- },- "node_modules/fresh": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz",- "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==",- "engines": {- "node": ">= 0.8"- }- },- "node_modules/fsevents": {- "version": "2.3.3",- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",- "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",- "dev": true,- "hasInstallScript": true,- "optional": true,- "os": [- "darwin"- ],- "engines": {- "node": "^8.16.0 || ^10.6.0 || >=11.0.0"- }- },- "node_modules/function-bind": {- "version": "1.1.2",- "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",- "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",- "funding": {- "url": "https://github.com/sponsors/ljharb"- }- },- "node_modules/get-intrinsic": {- "version": "1.3.0",- "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",- "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",- "dependencies": {- "call-bind-apply-helpers": "^1.0.2",- "es-define-property": "^1.0.1",- "es-errors": "^1.3.0",- "es-object-atoms": "^1.1.1",- "function-bind": "^1.1.2",- "get-proto": "^1.0.1",- "gopd": "^1.2.0",- "has-symbols": "^1.1.0",- "hasown": "^2.0.2",- "math-intrinsics": "^1.1.0"- },- "engines": {- "node": ">= 0.4"- },- "funding": {- "url": "https://github.com/sponsors/ljharb"- }- },- "node_modules/get-proto": {- "version": "1.0.1",- "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",- "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",- "dependencies": {- "dunder-proto": "^1.0.1",- "es-object-atoms": "^1.0.0"- },- "engines": {- "node": ">= 0.4"- }- },- "node_modules/glob-parent": {- "version": "5.1.2",- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",- "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",- "dev": true,- "dependencies": {- "is-glob": "^4.0.1"- },- "engines": {- "node": ">= 6"- }- },- "node_modules/gopd": {- "version": "1.2.0",- "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",- "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",- "engines": {- "node": ">= 0.4"- },- "funding": {- "url": "https://github.com/sponsors/ljharb"- }- },- "node_modules/has-flag": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",- "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",- "dev": true,- "engines": {- "node": ">=4"- }- },- "node_modules/has-symbols": {- "version": "1.1.0",- "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",- "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",- "engines": {- "node": ">= 0.4"- },- "funding": {- "url": "https://github.com/sponsors/ljharb"- }- },- "node_modules/has-tostringtag": {- "version": "1.0.2",- "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz",- "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",- "dependencies": {- "has-symbols": "^1.0.3"- },- "engines": {- "node": ">= 0.4"- },- "funding": {- "url": "https://github.com/sponsors/ljharb"- }- },- "node_modules/hasown": {- "version": "2.0.2",- "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",- "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",- "dependencies": {- "function-bind": "^1.1.2"- },- "engines": {- "node": ">= 0.4"- }- },- "node_modules/http-errors": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",- "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",- "dependencies": {- "depd": "2.0.0",- "inherits": "2.0.4",- "setprototypeof": "1.2.0",- "statuses": "2.0.1",- "toidentifier": "1.0.1"- },- "engines": {- "node": ">= 0.8"- }- },- "node_modules/iconv-lite": {- "version": "0.6.3",- "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",- "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",- "dependencies": {- "safer-buffer": ">= 2.1.2 < 3.0.0"- },- "engines": {- "node": ">=0.10.0"- }- },- "node_modules/ignore-by-default": {- "version": "1.0.1",- "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz",- "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==",- "dev": true- },- "node_modules/inherits": {- "version": "2.0.4",- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",- "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="- },- "node_modules/ipaddr.js": {- "version": "1.9.1",- "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",- "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",- "engines": {- "node": ">= 0.10"- }- },- "node_modules/is-binary-path": {- "version": "2.1.0",- "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",- "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",- "dev": true,- "dependencies": {- "binary-extensions": "^2.0.0"- },- "engines": {- "node": ">=8"- }- },- "node_modules/is-extglob": {- "version": "2.1.1",- "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",- "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",- "dev": true,- "engines": {- "node": ">=0.10.0"- }- },- "node_modules/is-glob": {- "version": "4.0.3",- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",- "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",- "dev": true,- "dependencies": {- "is-extglob": "^2.1.1"- },- "engines": {- "node": ">=0.10.0"- }- },- "node_modules/is-number": {- "version": "7.0.0",- "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",- "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",- "dev": true,- "engines": {- "node": ">=0.12.0"- }- },- "node_modules/is-promise": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz",- "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ=="- },- "node_modules/math-intrinsics": {- "version": "1.1.0",- "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",- "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",- "engines": {- "node": ">= 0.4"- }- },- "node_modules/media-typer": {- "version": "1.1.0",- "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz",- "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==",- "engines": {- "node": ">= 0.8"- }- },- "node_modules/merge-descriptors": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz",- "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==",- "engines": {- "node": ">=18"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },- "node_modules/mime-db": {- "version": "1.54.0",- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz",- "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==",- "engines": {- "node": ">= 0.6"- }- },- "node_modules/mime-types": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz",- "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==",- "dependencies": {- "mime-db": "^1.54.0"- },- "engines": {- "node": ">= 0.6"- }- },- "node_modules/minimatch": {- "version": "3.1.2",- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",- "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",- "dev": true,- "dependencies": {- "brace-expansion": "^1.1.7"- },- "engines": {- "node": "*"- }- },- "node_modules/ms": {- "version": "2.1.3",- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",- "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="- },- "node_modules/negotiator": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz",- "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==",- "engines": {- "node": ">= 0.6"- }- },- "node_modules/node-domexception": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",- "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==",- "deprecated": "Use your platform's native DOMException instead",- "funding": [- {- "type": "github",- "url": "https://github.com/sponsors/jimmywarting"- },- {- "type": "github",- "url": "https://paypal.me/jimmywarting"- }- ],- "engines": {- "node": ">=10.5.0"- }- },- "node_modules/node-fetch": {- "version": "3.3.2",- "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz",- "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==",- "dependencies": {- "data-uri-to-buffer": "^4.0.0",- "fetch-blob": "^3.1.4",- "formdata-polyfill": "^4.0.10"- },- "engines": {- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"- },- "funding": {- "type": "opencollective",- "url": "https://opencollective.com/node-fetch"- }- },- "node_modules/nodemon": {- "version": "3.1.10",- "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.10.tgz",- "integrity": "sha512-WDjw3pJ0/0jMFmyNDp3gvY2YizjLmmOUQo6DEBY+JgdvW/yQ9mEeSw6H5ythl5Ny2ytb7f9C2nIbjSxMNzbJXw==",- "dev": true,- "dependencies": {- "chokidar": "^3.5.2",- "debug": "^4",- "ignore-by-default": "^1.0.1",- "minimatch": "^3.1.2",- "pstree.remy": "^1.1.8",- "semver": "^7.5.3",- "simple-update-notifier": "^2.0.0",- "supports-color": "^5.5.0",- "touch": "^3.1.0",- "undefsafe": "^2.0.5"- },- "bin": {- "nodemon": "bin/nodemon.js"- },- "engines": {- "node": ">=10"- },- "funding": {- "type": "opencollective",- "url": "https://opencollective.com/nodemon"- }- },- "node_modules/normalize-path": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",- "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",- "dev": true,- "engines": {- "node": ">=0.10.0"- }- },- "node_modules/object-assign": {- "version": "4.1.1",- "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",- "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",- "engines": {- "node": ">=0.10.0"- }- },- "node_modules/object-inspect": {- "version": "1.13.4",- "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",- "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",- "engines": {- "node": ">= 0.4"- },- "funding": {- "url": "https://github.com/sponsors/ljharb"- }- },- "node_modules/on-finished": {- "version": "2.4.1",- "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",- "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",- "dependencies": {- "ee-first": "1.1.1"- },- "engines": {- "node": ">= 0.8"- }- },- "node_modules/once": {- "version": "1.4.0",- "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",- "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",- "dependencies": {- "wrappy": "1"- }- },- "node_modules/parseurl": {- "version": "1.3.3",- "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",- "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",- "engines": {- "node": ">= 0.8"- }- },- "node_modules/path-to-regexp": {- "version": "8.2.0",- "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.2.0.tgz",- "integrity": "sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==",- "engines": {- "node": ">=16"- }- },- "node_modules/picomatch": {- "version": "2.3.1",- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",- "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",- "dev": true,- "engines": {- "node": ">=8.6"- },- "funding": {- "url": "https://github.com/sponsors/jonschlinkert"- }- },- "node_modules/proxy-addr": {- "version": "2.0.7",- "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",- "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",- "dependencies": {- "forwarded": "0.2.0",- "ipaddr.js": "1.9.1"- },- "engines": {- "node": ">= 0.10"- }- },- "node_modules/proxy-from-env": {- "version": "1.1.0",- "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",- "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="- },- "node_modules/pstree.remy": {- "version": "1.1.8",- "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz",- "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==",- "dev": true- },- "node_modules/qs": {- "version": "6.14.0",- "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz",- "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==",- "dependencies": {- "side-channel": "^1.1.0"- },- "engines": {- "node": ">=0.6"- },- "funding": {- "url": "https://github.com/sponsors/ljharb"- }- },- "node_modules/range-parser": {- "version": "1.2.1",- "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",- "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",- "engines": {- "node": ">= 0.6"- }- },- "node_modules/raw-body": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.0.tgz",- "integrity": "sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==",- "dependencies": {- "bytes": "3.1.2",- "http-errors": "2.0.0",- "iconv-lite": "0.6.3",- "unpipe": "1.0.0"- },- "engines": {- "node": ">= 0.8"- }- },- "node_modules/readdirp": {- "version": "3.6.0",- "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",- "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",- "dev": true,- "dependencies": {- "picomatch": "^2.2.1"- },- "engines": {- "node": ">=8.10.0"- }- },- "node_modules/router": {- "version": "2.2.0",- "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz",- "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==",- "dependencies": {- "debug": "^4.4.0",- "depd": "^2.0.0",- "is-promise": "^4.0.0",- "parseurl": "^1.3.3",- "path-to-regexp": "^8.0.0"- },- "engines": {- "node": ">= 18"- }- },- "node_modules/safe-buffer": {- "version": "5.2.1",- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",- "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",- "funding": [- {- "type": "github",- "url": "https://github.com/sponsors/feross"- },- {- "type": "patreon",- "url": "https://www.patreon.com/feross"- },- {- "type": "consulting",- "url": "https://feross.org/support"- }- ]- },- "node_modules/safer-buffer": {- "version": "2.1.2",- "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",- "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="- },- "node_modules/semver": {- "version": "7.7.2",- "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",- "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",- "dev": true,- "bin": {- "semver": "bin/semver.js"- },- "engines": {- "node": ">=10"- }- },- "node_modules/send": {- "version": "1.2.0",- "resolved": "https://registry.npmjs.org/send/-/send-1.2.0.tgz",- "integrity": "sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==",- "dependencies": {- "debug": "^4.3.5",- "encodeurl": "^2.0.0",- "escape-html": "^1.0.3",- "etag": "^1.8.1",- "fresh": "^2.0.0",- "http-errors": "^2.0.0",- "mime-types": "^3.0.1",- "ms": "^2.1.3",- "on-finished": "^2.4.1",- "range-parser": "^1.2.1",- "statuses": "^2.0.1"- },- "engines": {- "node": ">= 18"- }- },- "node_modules/serve-static": {- "version": "2.2.0",- "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.0.tgz",- "integrity": "sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ==",- "dependencies": {- "encodeurl": "^2.0.0",- "escape-html": "^1.0.3",- "parseurl": "^1.3.3",- "send": "^1.2.0"- },- "engines": {- "node": ">= 18"- }- },- "node_modules/setprototypeof": {- "version": "1.2.0",- "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",- "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="- },- "node_modules/side-channel": {- "version": "1.1.0",- "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",- "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",- "dependencies": {- "es-errors": "^1.3.0",- "object-inspect": "^1.13.3",- "side-channel-list": "^1.0.0",- "side-channel-map": "^1.0.1",- "side-channel-weakmap": "^1.0.2"- },- "engines": {- "node": ">= 0.4"- },- "funding": {- "url": "https://github.com/sponsors/ljharb"- }- },- "node_modules/side-channel-list": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz",- "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",- "dependencies": {- "es-errors": "^1.3.0",- "object-inspect": "^1.13.3"- },- "engines": {- "node": ">= 0.4"- },- "funding": {- "url": "https://github.com/sponsors/ljharb"- }- },- "node_modules/side-channel-map": {- "version": "1.0.1",- "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",- "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",- "dependencies": {- "call-bound": "^1.0.2",- "es-errors": "^1.3.0",- "get-intrinsic": "^1.2.5",- "object-inspect": "^1.13.3"- },- "engines": {- "node": ">= 0.4"- },- "funding": {- "url": "https://github.com/sponsors/ljharb"- }- },- "node_modules/side-channel-weakmap": {- "version": "1.0.2",- "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",- "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",- "dependencies": {- "call-bound": "^1.0.2",- "es-errors": "^1.3.0",- "get-intrinsic": "^1.2.5",- "object-inspect": "^1.13.3",- "side-channel-map": "^1.0.1"- },- "engines": {- "node": ">= 0.4"- },- "funding": {- "url": "https://github.com/sponsors/ljharb"- }- },- "node_modules/simple-update-notifier": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz",- "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==",- "dev": true,- "dependencies": {- "semver": "^7.5.3"- },- "engines": {- "node": ">=10"- }- },- "node_modules/statuses": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",- "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",- "engines": {- "node": ">= 0.8"- }- },- "node_modules/supports-color": {- "version": "5.5.0",- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",- "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",- "dev": true,- "dependencies": {- "has-flag": "^3.0.0"- },- "engines": {- "node": ">=4"- }- },- "node_modules/to-regex-range": {- "version": "5.0.1",- "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",- "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",- "dev": true,- "dependencies": {- "is-number": "^7.0.0"- },- "engines": {- "node": ">=8.0"- }- },- "node_modules/toidentifier": {- "version": "1.0.1",- "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",- "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",- "engines": {- "node": ">=0.6"- }- },- "node_modules/touch": {- "version": "3.1.1",- "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz",- "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==",- "dev": true,- "bin": {- "nodetouch": "bin/nodetouch.js"- }- },- "node_modules/type-is": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz",- "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==",- "dependencies": {- "content-type": "^1.0.5",- "media-typer": "^1.1.0",- "mime-types": "^3.0.0"- },- "engines": {- "node": ">= 0.6"- }- },- "node_modules/undefsafe": {- "version": "2.0.5",- "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz",- "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==",- "dev": true- },- "node_modules/unpipe": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",- "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",- "engines": {- "node": ">= 0.8"- }- },- "node_modules/vary": {- "version": "1.1.2",- "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",- "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",- "engines": {- "node": ">= 0.8"- }- },- "node_modules/web-streams-polyfill": {- "version": "3.3.3",- "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz",- "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==",- "engines": {- "node": ">= 8"- }- },- "node_modules/wrappy": {- "version": "1.0.2",- "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",- "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="- }- }-}+{+ "name": "libretv-next",+ "version": "2.0.0",+ "lockfileVersion": 3,+ "requires": true,+ "packages": {+ "": {+ "name": "libretv-next",+ "version": "2.0.0",+ "license": "Apache-2.0",+ "dependencies": {+ "@tanstack/react-query": "^5.59.0",+ "artplayer": "^5.2.3",+ "dexie": "^4.0.8",+ "dexie-react-hooks": "^1.1.7",+ "hls.js": "^1.5.17",+ "next": "^15.1.0",+ "react": "^19.0.0",+ "react-dom": "^19.0.0",+ "zustand": "^5.0.2"+ },+ "devDependencies": {+ "@types/node": "^22.10.0",+ "@types/react": "^19.0.0",+ "@types/react-dom": "^19.0.0",+ "autoprefixer": "^10.4.20",+ "postcss": "^8.4.49",+ "tailwindcss": "^3.4.15",+ "typescript": "^5.7.2",+ "vitest": "^2.1.8"+ }+ },+ "node_modules/@alloc/quick-lru": {+ "version": "5.3.0",+ "resolved": "https://registry.npmmirror.com/@alloc/quick-lru/-/quick-lru-5.3.0.tgz",+ "integrity": "sha512-U4+70Pc5ZS9osnCBCE5Jha/ciHM+Yp+CNMNC/7HvYbNRk1Ldd+f7qO65W5qfhu/TCv+/ozljlXXe9Nj8419DMA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=10"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/@emnapi/runtime": {+ "version": "1.11.3",+ "resolved": "https://registry.npmmirror.com/@emnapi/runtime/-/runtime-1.11.3.tgz",+ "integrity": "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==",+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "tslib": "^2.4.0"+ }+ },+ "node_modules/@esbuild/aix-ppc64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmmirror.com/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz",+ "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==",+ "cpu": [+ "ppc64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "aix"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/android-arm": {+ "version": "0.21.5",+ "resolved": "https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.21.5.tgz",+ "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==",+ "cpu": [+ "arm"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "android"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/android-arm64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmmirror.com/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz",+ "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "android"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/android-x64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmmirror.com/@esbuild/android-x64/-/android-x64-0.21.5.tgz",+ "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "android"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/darwin-arm64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmmirror.com/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz",+ "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/darwin-x64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmmirror.com/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz",+ "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/freebsd-arm64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz",+ "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "freebsd"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/freebsd-x64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz",+ "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "freebsd"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/linux-arm": {+ "version": "0.21.5",+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz",+ "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==",+ "cpu": [+ "arm"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/linux-arm64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz",+ "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/linux-ia32": {+ "version": "0.21.5",+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz",+ "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==",+ "cpu": [+ "ia32"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/linux-loong64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz",+ "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==",+ "cpu": [+ "loong64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/linux-mips64el": {+ "version": "0.21.5",+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz",+ "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==",+ "cpu": [+ "mips64el"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/linux-ppc64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz",+ "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==",+ "cpu": [+ "ppc64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/linux-riscv64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz",+ "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==",+ "cpu": [+ "riscv64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/linux-s390x": {+ "version": "0.21.5",+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz",+ "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==",+ "cpu": [+ "s390x"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/linux-x64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmmirror.com/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz",+ "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/netbsd-x64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz",+ "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "netbsd"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/openbsd-x64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz",+ "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "openbsd"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/sunos-x64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmmirror.com/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz",+ "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "sunos"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/win32-arm64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmmirror.com/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz",+ "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/win32-ia32": {+ "version": "0.21.5",+ "resolved": "https://registry.npmmirror.com/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz",+ "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==",+ "cpu": [+ "ia32"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@esbuild/win32-x64": {+ "version": "0.21.5",+ "resolved": "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz",+ "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/@img/colour": {+ "version": "1.1.0",+ "resolved": "https://registry.npmmirror.com/@img/colour/-/colour-1.1.0.tgz",+ "integrity": "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==",+ "license": "MIT",+ "optional": true,+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@img/sharp-darwin-arm64": {+ "version": "0.35.4",+ "resolved": "https://registry.npmmirror.com/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.35.4.tgz",+ "integrity": "sha512-Uhfl4V4lhP2nbUVF9+hyH1+luj86f1gUFeo8ALYxFoULoU+G87D43BfeMP8XHsk9boxAnCY/bf2EHwhA7MuGsA==",+ "cpu": [+ "arm64"+ ],+ "license": "Apache-2.0",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">=20.9.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ },+ "optionalDependencies": {+ "@img/sharp-libvips-darwin-arm64": "1.3.3"+ }+ },+ "node_modules/@img/sharp-darwin-x64": {+ "version": "0.35.4",+ "resolved": "https://registry.npmmirror.com/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.35.4.tgz",+ "integrity": "sha512-hWniXY3bG5qKpkKrAwPe4y+VTPmf086YQAnkxWh7uA1YrlRouWGa0M0Mxj3ZjnXFkv7/TD1bTy9lGUK26vRvWw==",+ "cpu": [+ "x64"+ ],+ "license": "Apache-2.0",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">=20.9.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ },+ "optionalDependencies": {+ "@img/sharp-libvips-darwin-x64": "1.3.3"+ }+ },+ "node_modules/@img/sharp-freebsd-wasm32": {+ "version": "0.35.4",+ "resolved": "https://registry.npmmirror.com/@img/sharp-freebsd-wasm32/-/sharp-freebsd-wasm32-0.35.4.tgz",+ "integrity": "sha512-lIsKw/BU+kjB4eZjxrYrZmwOJYi3Ajrv66iAlBmUPyKc3HpnloevB1g3wxGD9P/5BbQ1brBGl65VRRrCvQDEqA==",+ "license": "Apache-2.0",+ "optional": true,+ "os": [+ "freebsd"+ ],+ "dependencies": {+ "@img/sharp-wasm32": "0.35.4"+ },+ "engines": {+ "node": ">=20.9.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@img/sharp-libvips-darwin-arm64": {+ "version": "1.3.3",+ "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.3.3.tgz",+ "integrity": "sha512-suTBPTDGrI9WodccaDdwZItTSaBYASlBk1NSfElSHrUfzu3szG6lvIF58+WiFvnfzuK8ZBFS5zE00PxqxnRiPg==",+ "cpu": [+ "arm64"+ ],+ "license": "LGPL-3.0-or-later",+ "optional": true,+ "os": [+ "darwin"+ ],+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@img/sharp-libvips-darwin-x64": {+ "version": "1.3.3",+ "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.3.3.tgz",+ "integrity": "sha512-FVJZ5mITMobmXIz/hPDTw0EintTW5H3WfrxwLqEqjiIihlu+hVRyGrFQ60xl0Lxn7Bt3zdpevPaQi0HEzqz9fw==",+ "cpu": [+ "x64"+ ],+ "license": "LGPL-3.0-or-later",+ "optional": true,+ "os": [+ "darwin"+ ],+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@img/sharp-libvips-linux-arm": {+ "version": "1.3.3",+ "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.3.3.tgz",+ "integrity": "sha512-3rbU4vqXXc3hY/OiXdl52xZvT0F1yEngWfvqudtPJg/KkyiaQw2DRsFrNzpmLvfavbwOq3qXn36GP8obHRULQA==",+ "cpu": [+ "arm"+ ],+ "license": "LGPL-3.0-or-later",+ "optional": true,+ "os": [+ "linux"+ ],+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@img/sharp-libvips-linux-arm64": {+ "version": "1.3.3",+ "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.3.3.tgz",+ "integrity": "sha512-0DaL0A6Xu6sQSQFwe4iVCrKWU2cCTItnRsYsCdxAMm9NF6twAA9BKnoqy4hqz4+azQ0JHuA26qiUKsf1XJ/v5A==",+ "cpu": [+ "arm64"+ ],+ "license": "LGPL-3.0-or-later",+ "optional": true,+ "os": [+ "linux"+ ],+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@img/sharp-libvips-linux-ppc64": {+ "version": "1.3.3",+ "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.3.3.tgz",+ "integrity": "sha512-cdn1OvUBwsXhbC0zSzJnNzf5MZ/mTrobawDvNXBTxe8VtqKAm0sRuEY2Evzovb/w9JMk4TvRxqt1mekSuJz64w==",+ "cpu": [+ "ppc64"+ ],+ "license": "LGPL-3.0-or-later",+ "optional": true,+ "os": [+ "linux"+ ],+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@img/sharp-libvips-linux-riscv64": {+ "version": "1.3.3",+ "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linux-riscv64/-/sharp-libvips-linux-riscv64-1.3.3.tgz",+ "integrity": "sha512-HjPVx7yKz+0lqdhDlTw1tt90wamBoxhiXpvl1XZpJLiHH4RCJ5yDTqH+VlYPv2fwFs89JFw4c1IexYOcQUi4IQ==",+ "cpu": [+ "riscv64"+ ],+ "license": "LGPL-3.0-or-later",+ "optional": true,+ "os": [+ "linux"+ ],+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@img/sharp-libvips-linux-s390x": {+ "version": "1.3.3",+ "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.3.3.tgz",+ "integrity": "sha512-neWLh+3yCNThxnfy3c4BbVBeGgt9aftno+XbT56iK28RgeDs3UOFWviLWlUu0bArYVYJaFDK+RRohbicUNCm8Q==",+ "cpu": [+ "s390x"+ ],+ "license": "LGPL-3.0-or-later",+ "optional": true,+ "os": [+ "linux"+ ],+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@img/sharp-libvips-linux-x64": {+ "version": "1.3.3",+ "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.3.3.tgz",+ "integrity": "sha512-4vKmvAst9nrowcqquKFAyZJUDolUaIp8uRiN0mWFguJ1IplC9/pitXtlnnlU4aa/eJw3J7i67V+pwUL+wZGdsA==",+ "cpu": [+ "x64"+ ],+ "license": "LGPL-3.0-or-later",+ "optional": true,+ "os": [+ "linux"+ ],+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@img/sharp-libvips-linuxmusl-arm64": {+ "version": "1.3.3",+ "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.3.3.tgz",+ "integrity": "sha512-Y9kQaLMuNoB0bPYOOdcZMaseNrFpPodIWWMrx+CZyydf2xn68j9WYc6sWWRrDwNkzCQjKYfc68L7jKjGlHMibw==",+ "cpu": [+ "arm64"+ ],+ "license": "LGPL-3.0-or-later",+ "optional": true,+ "os": [+ "linux"+ ],+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@img/sharp-libvips-linuxmusl-x64": {+ "version": "1.3.3",+ "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.3.3.tgz",+ "integrity": "sha512-fj8Mv0HHfD1Rr+4I68+3agJynxDWtBFgicTbSOb9Bke6pIwzGcJ+RX/yHjmiEGFMCavY/dxvem7MyNaJF+wDiw==",+ "cpu": [+ "x64"+ ],+ "license": "LGPL-3.0-or-later",+ "optional": true,+ "os": [+ "linux"+ ],+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@img/sharp-linux-arm": {+ "version": "0.35.4",+ "resolved": "https://registry.npmmirror.com/@img/sharp-linux-arm/-/sharp-linux-arm-0.35.4.tgz",+ "integrity": "sha512-7OAS8gI0EReKGVN2HssHlM6umJgxF5VI3xN0p9FA91p/YO+ou5hiNghLdZ5BEHztwaaK5+bLKRf8x/o2L2nk9A==",+ "cpu": [+ "arm"+ ],+ "license": "Apache-2.0",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=20.9.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ },+ "optionalDependencies": {+ "@img/sharp-libvips-linux-arm": "1.3.3"+ }+ },+ "node_modules/@img/sharp-linux-arm64": {+ "version": "0.35.4",+ "resolved": "https://registry.npmmirror.com/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.35.4.tgz",+ "integrity": "sha512-De4jpEnAU8Hd5oT0j1G3uL4ZvTuipVMn7YC6vPaJhy6/7EwEae0SVAoBrUMYQbkLGDm85taVWwuPc1a44LTzCQ==",+ "cpu": [+ "arm64"+ ],+ "license": "Apache-2.0",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=20.9.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ },+ "optionalDependencies": {+ "@img/sharp-libvips-linux-arm64": "1.3.3"+ }+ },+ "node_modules/@img/sharp-linux-ppc64": {+ "version": "0.35.4",+ "resolved": "https://registry.npmmirror.com/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.35.4.tgz",+ "integrity": "sha512-2oYZJeIl4kCcMGk4ouZVjnkCtFrpQFlNEtJ6GbxzhHQchwH0NH/qEb9ykmOl29dqwMq+JhFdZn+1ak2FKhI9fQ==",+ "cpu": [+ "ppc64"+ ],+ "license": "Apache-2.0",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=20.9.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ },+ "optionalDependencies": {+ "@img/sharp-libvips-linux-ppc64": "1.3.3"+ }+ },+ "node_modules/@img/sharp-linux-riscv64": {+ "version": "0.35.4",+ "resolved": "https://registry.npmmirror.com/@img/sharp-linux-riscv64/-/sharp-linux-riscv64-0.35.4.tgz",+ "integrity": "sha512-cPbNChoRURAWdebDIHSenxRpgEdy7JkPydSnUxRm9VvKD7m0/xVaR/8Fzlu81pk5nHEvHH87UZUA7cTtwnbJSA==",+ "cpu": [+ "riscv64"+ ],+ "license": "Apache-2.0",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=20.9.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ },+ "optionalDependencies": {+ "@img/sharp-libvips-linux-riscv64": "1.3.3"+ }+ },+ "node_modules/@img/sharp-linux-s390x": {+ "version": "0.35.4",+ "resolved": "https://registry.npmmirror.com/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.35.4.tgz",+ "integrity": "sha512-RY0JFY8Fd6RonCBtHz+DvadaPkXDSI1AUn6yWL9TipqkZ1vY8w8evqdgyDFnkm4/K1ve1TvZiaePP5oSd4+WVQ==",+ "cpu": [+ "s390x"+ ],+ "license": "Apache-2.0",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=20.9.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ },+ "optionalDependencies": {+ "@img/sharp-libvips-linux-s390x": "1.3.3"+ }+ },+ "node_modules/@img/sharp-linux-x64": {+ "version": "0.35.4",+ "resolved": "https://registry.npmmirror.com/@img/sharp-linux-x64/-/sharp-linux-x64-0.35.4.tgz",+ "integrity": "sha512-9qvvEAuk8k89TfWUoX2htWjbAMX8p+NxCppjpcg5k6xMsjhBQPTsoIh36h9Qde4WRuGpJeYnOjdosDn/cnv+OA==",+ "cpu": [+ "x64"+ ],+ "license": "Apache-2.0",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=20.9.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ },+ "optionalDependencies": {+ "@img/sharp-libvips-linux-x64": "1.3.3"+ }+ },+ "node_modules/@img/sharp-linuxmusl-arm64": {+ "version": "0.35.4",+ "resolved": "https://registry.npmmirror.com/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.35.4.tgz",+ "integrity": "sha512-KB5jxpfWQTr0nc3xdHtWChdbifHrBGsd2SM62Eyxrl8afikm+f5qGBU75SJIZBT/S1MC8XyacdlXBMSWq6OURA==",+ "cpu": [+ "arm64"+ ],+ "license": "Apache-2.0",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=20.9.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ },+ "optionalDependencies": {+ "@img/sharp-libvips-linuxmusl-arm64": "1.3.3"+ }+ },+ "node_modules/@img/sharp-linuxmusl-x64": {+ "version": "0.35.4",+ "resolved": "https://registry.npmmirror.com/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.35.4.tgz",+ "integrity": "sha512-f+eZJZIQNEEd26RPSW+76chwOf1XtA2Y/O+5ocVyLliHkeih3e+jhLVBdNTd2rS3IbNXK8+ug93Vf5ZXtF5Lxg==",+ "cpu": [+ "x64"+ ],+ "license": "Apache-2.0",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=20.9.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ },+ "optionalDependencies": {+ "@img/sharp-libvips-linuxmusl-x64": "1.3.3"+ }+ },+ "node_modules/@img/sharp-wasm32": {+ "version": "0.35.4",+ "resolved": "https://registry.npmmirror.com/@img/sharp-wasm32/-/sharp-wasm32-0.35.4.tgz",+ "integrity": "sha512-zQnl4Kwp7Q6NHsENtU2T/00Zi+w3AQNwz3+UaTyVBy2FpXrzXzGjndpK61onhZjRtRpQXxCTeqw19bVyXOh7jA==",+ "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT",+ "optional": true,+ "dependencies": {+ "@emnapi/runtime": "^1.11.3"+ },+ "engines": {+ "node": ">=20.9.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@img/sharp-webcontainers-wasm32": {+ "version": "0.35.4",+ "resolved": "https://registry.npmmirror.com/@img/sharp-webcontainers-wasm32/-/sharp-webcontainers-wasm32-0.35.4.tgz",+ "integrity": "sha512-ESfNkywmCfPNyaZjxooddJQiQ+l/nTpGEOGthxiLnIHXC/CmcBixnfwUleX9mCz9ovrUUvKMap/pm8RYbzfwaA==",+ "cpu": [+ "wasm32"+ ],+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@img/sharp-wasm32": "0.35.4"+ },+ "engines": {+ "node": ">=20.9.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@img/sharp-win32-arm64": {+ "version": "0.35.4",+ "resolved": "https://registry.npmmirror.com/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.35.4.tgz",+ "integrity": "sha512-iNdlBX9gLVvqe2I3uIJSIKTq6wckP/DYxZtcqxm09x5Gi24DnFBmPAWZmr60ZyYMG0xlzo6goG3670ar+RXvRw==",+ "cpu": [+ "arm64"+ ],+ "license": "Apache-2.0 AND LGPL-3.0-or-later",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">=20.9.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@img/sharp-win32-ia32": {+ "version": "0.35.4",+ "resolved": "https://registry.npmmirror.com/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.35.4.tgz",+ "integrity": "sha512-kqRsbaa5CS6KHlpxnN7WhE6vAAugXyZButpRdvDWetlv6Qv4N9WTcrWzF7tXfB9T7MsoadqdI8hmwLq6UlLvtw==",+ "cpu": [+ "ia32"+ ],+ "license": "Apache-2.0 AND LGPL-3.0-or-later",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": "^20.9.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@img/sharp-win32-x64": {+ "version": "0.35.4",+ "resolved": "https://registry.npmmirror.com/@img/sharp-win32-x64/-/sharp-win32-x64-0.35.4.tgz",+ "integrity": "sha512-XtmnYhBcrORsJ4XJngyzr/EWP0hRZLAZRFaApdKuviyqF78+ylxh2y06ZmtULAMOnObJ3ucpN0AcwSWnMowTRg==",+ "cpu": [+ "x64"+ ],+ "license": "Apache-2.0 AND LGPL-3.0-or-later",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">=20.9.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ }+ },+ "node_modules/@jridgewell/gen-mapping": {+ "version": "0.3.13",+ "resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",+ "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@jridgewell/sourcemap-codec": "^1.5.0",+ "@jridgewell/trace-mapping": "^0.3.24"+ }+ },+ "node_modules/@jridgewell/resolve-uri": {+ "version": "3.1.2",+ "resolved": "https://registry.npmmirror.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",+ "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6.0.0"+ }+ },+ "node_modules/@jridgewell/sourcemap-codec": {+ "version": "1.6.0",+ "resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz",+ "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/@jridgewell/trace-mapping": {+ "version": "0.3.31",+ "resolved": "https://registry.npmmirror.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz",+ "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@jridgewell/resolve-uri": "^3.1.0",+ "@jridgewell/sourcemap-codec": "^1.4.14"+ }+ },+ "node_modules/@napi-rs/lzma-linux-x64-gnu": {+ "version": "1.5.1",+ "resolved": "https://registry.npmmirror.com/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz",+ "integrity": "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": "^22.20 || ^24.12 || >=25"+ }+ },+ "node_modules/@next/env": {+ "version": "15.5.25",+ "resolved": "https://registry.npmmirror.com/@next/env/-/env-15.5.25.tgz",+ "integrity": "sha512-42h1lLr07vl4gawALP1hsgRZjHB1xYa58JfUfHwr0f7jG/zhPakh5GHkADHXOC9ZxUvlQFOPIrp7s6qX4DezPQ==",+ "license": "MIT"+ },+ "node_modules/@next/swc-darwin-arm64": {+ "version": "15.5.25",+ "resolved": "https://registry.npmmirror.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.5.25.tgz",+ "integrity": "sha512-w+RR0v/QuApnWEjRGm1z6gcObKwGMb5YPA7V3bzBEVSBpMFUXprer0tS27UxjUcEnqbhL7Zuzohej79B6rYmBg==",+ "cpu": [+ "arm64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@next/swc-darwin-x64": {+ "version": "15.5.25",+ "resolved": "https://registry.npmmirror.com/@next/swc-darwin-x64/-/swc-darwin-x64-15.5.25.tgz",+ "integrity": "sha512-QiGGBUSakt8S1H4Lt9Ehsh6Ja87axiBnQQgysOObvCbI7iUfJnRGntF1P64S4/ijuHFnSB8KLsEddkY3nN26uw==",+ "cpu": [+ "x64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@next/swc-linux-arm64-gnu": {+ "version": "15.5.25",+ "resolved": "https://registry.npmmirror.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.5.25.tgz",+ "integrity": "sha512-ehLos/66zo0d/mJCU5u96a/VDcr01aaUrX0o/i16UdInxz8qPTCDSxGtjk/Lps1sIr1RJFdiX3hxc0fxJo+cPA==",+ "cpu": [+ "arm64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@next/swc-linux-arm64-musl": {+ "version": "15.5.25",+ "resolved": "https://registry.npmmirror.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.5.25.tgz",+ "integrity": "sha512-ZVMrqLiJ7DiChgmbkQwFtdhAnUkSH/4p7tB29QY+giATb0Q/XGHNRSKAb/B8XGDHRUaA67NepOW5W8u3ZRJBAA==",+ "cpu": [+ "arm64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@next/swc-linux-x64-gnu": {+ "version": "15.5.25",+ "resolved": "https://registry.npmmirror.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.5.25.tgz",+ "integrity": "sha512-UOewtDGkTMJTiODrEdeLZ50yGb59xCZSriNpXkfPMxRRgwDkGc7i8mLWqV5076wEdb+Ca/XN7MhJyM3CupyNyQ==",+ "cpu": [+ "x64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@next/swc-linux-x64-musl": {+ "version": "15.5.25",+ "resolved": "https://registry.npmmirror.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.5.25.tgz",+ "integrity": "sha512-UBHwA8AhkCZgtRfU1aJpunuAJe/6gZv6jDESQe4p5MjTb5V0YEeJBWCdNqx15Vj3x+5jmauRfeMJSjfQj9HGFQ==",+ "cpu": [+ "x64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@next/swc-win32-arm64-msvc": {+ "version": "15.5.25",+ "resolved": "https://registry.npmmirror.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.5.25.tgz",+ "integrity": "sha512-QcFcPRr16djk5IqK5+e8O80eZfgWzIvVBXfitIq0tQ/uc+eyfdoZ0NmKc0cnbIJyfVwREapKuG97YcxWA9gcpA==",+ "cpu": [+ "arm64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@next/swc-win32-x64-msvc": {+ "version": "15.5.25",+ "resolved": "https://registry.npmmirror.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.5.25.tgz",+ "integrity": "sha512-zREeykps3ndWr9egJgvJKqVkkDuaw6Zrrg23cYBos0ygydFkAWYU4+PaPVwXzP1eAYQJe53ShSK45iDM529BOg==",+ "cpu": [+ "x64"+ ],+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@nodelib/fs.scandir": {+ "version": "2.1.5",+ "resolved": "https://registry.npmmirror.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",+ "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@nodelib/fs.stat": "2.0.5",+ "run-parallel": "^1.1.9"+ },+ "engines": {+ "node": ">= 8"+ }+ },+ "node_modules/@nodelib/fs.stat": {+ "version": "2.0.5",+ "resolved": "https://registry.npmmirror.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",+ "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 8"+ }+ },+ "node_modules/@nodelib/fs.walk": {+ "version": "1.2.8",+ "resolved": "https://registry.npmmirror.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",+ "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@nodelib/fs.scandir": "2.1.5",+ "fastq": "^1.6.0"+ },+ "engines": {+ "node": ">= 8"+ }+ },+ "node_modules/@rollup/rollup-android-arm-eabi": {+ "version": "4.63.1",+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.63.1.tgz",+ "integrity": "sha512-UZ8sUxPTiHWYX9QNdJedb1kDZSpS1t/VPWBWGSgqHNi9w3Cu6IXvu2mzbhiTiPvtrqgTQJ+zqiAq2iPIPilpaQ==",+ "cpu": [+ "arm"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "android"+ ]+ },+ "node_modules/@rollup/rollup-android-arm64": {+ "version": "4.63.1",+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.63.1.tgz",+ "integrity": "sha512-cQ4nFQABN5cDvDpbvJ7bMStCpnaVxynZrRMfUJYgxcIk9Sh54FIO1vtfkg0B69REjER77ioZ/ov+eAApx/KmLQ==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "android"+ ]+ },+ "node_modules/@rollup/rollup-darwin-arm64": {+ "version": "4.63.1",+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.63.1.tgz",+ "integrity": "sha512-FQNqd1lRy/0QhDk3xeRIkSBiCpXCiDnZO3YLVdcDKN1UBiKToNftCzcXYNLshmPDUMlu2TdeS8tGcsU6f3YF1Q==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ]+ },+ "node_modules/@rollup/rollup-darwin-x64": {+ "version": "4.63.1",+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.63.1.tgz",+ "integrity": "sha512-pvD16V939D3CloK0+qikpGaxiPrDUXTe7Y5cWOMkMSy7m1cawa8EGy/kXYi/G/cKAC4HDAbSnzCIk1WmsoOKXg==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ]+ },+ "node_modules/@rollup/rollup-freebsd-arm64": {+ "version": "4.63.1",+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.63.1.tgz",+ "integrity": "sha512-pcFGeL2345VwdTnJhA6zLbew+YgWB0qBG2+dMtXjCicf6+rm6kO6cOoh5VnTe0ZMrMRgRyuHmCJxZWrIdzYuOw==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "freebsd"+ ]+ },+ "node_modules/@rollup/rollup-freebsd-x64": {+ "version": "4.63.1",+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.63.1.tgz",+ "integrity": "sha512-mRJlqSRulVzcKq/LKA6ICSIc3K/l4fzlVn/gePn2nXIHy8seRi5z/eeRE0d/XMBxcMldiXtQTSpRj0tkkC3g8Q==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "freebsd"+ ]+ },+ "node_modules/@rollup/rollup-linux-arm-gnueabihf": {+ "version": "4.63.1",+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.63.1.tgz",+ "integrity": "sha512-YDUNvVM85TI3g/1OpnqKP1h4NeW/j64DfWMf+G3M809xNk1bJSnpFp4sh83NpmVE5DXnkh8ULor4LTVZKoYLHw==",+ "cpu": [+ "arm"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-arm-musleabihf": {+ "version": "4.63.1",+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.63.1.tgz",+ "integrity": "sha512-7Mcn71p9ZuQFAj+h+dhQXy/yeLePRS2yKRnmW1DijA9thKO5qap0GNOIQK4yQ6iP3SU0Mrb/yWo8h8vgRba8lw==",+ "cpu": [+ "arm"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-arm64-gnu": {+ "version": "4.63.1",+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.63.1.tgz",+ "integrity": "sha512-4YiLQTX6U4CSl0L9cluep9A9W6UmTfqBDc2/CH6wlu54pl4E7Jn3cOD8oxzvBDEGk/JMKgJ47C8g+radF7mwvg==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-arm64-musl": {+ "version": "4.63.1",+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.63.1.tgz",+ "integrity": "sha512-2ra8F7w8OquwZN9z2/fKFnli69wa8PLwaVzRMIPGb13ByMJwC28Fbp8YcVGoUhlYMTt7j5j9bNgpysrN2UM+vw==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-loong64-gnu": {+ "version": "4.63.1",+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.63.1.tgz",+ "integrity": "sha512-Sy20ncyhjmBP0Ml+UvQbimjlk6VFgjW5uNP+qqwHB00mTE8Bl2C1TuHTlRwK2YoXeZbee5lP2XevBWVkAQAtSQ==",+ "cpu": [+ "loong64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-loong64-musl": {+ "version": "4.63.1",+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.63.1.tgz",+ "integrity": "sha512-noITLp8oNjYliPnGWmLyelIHwULGqbHloQHGw1rtxbWhTuWooRpnZarZQJ1y9EUC4szuCusCc+HEpUtxpIwYvA==",+ "cpu": [+ "loong64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-ppc64-gnu": {+ "version": "4.63.1",+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.63.1.tgz",+ "integrity": "sha512-hlxxXd+F1mWiAcaFR7Sv9ZQT6m6UfI8+Vy/kFJzztq2pDMU/0wZ9sish0iszNZvsQDo8Gc0i5yuFEOz5dDf6fA==",+ "cpu": [+ "ppc64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-ppc64-musl": {+ "version": "4.63.1",+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.63.1.tgz",+ "integrity": "sha512-EF7OpqQTQ/BvGqLzUi4rEHuagCV9MugAUXSHemwPW5vxZ75RR+jxO/2j95Ph2dalMpFHSVECjRoioHZgA9zOYA==",+ "cpu": [+ "ppc64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-riscv64-gnu": {+ "version": "4.63.1",+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.63.1.tgz",+ "integrity": "sha512-wQO3JesW9PRkwlabQ27y7sPfVOOTLRG73I4F2UYHG5PXun3J9U3y+b7ezVKSYbsvSKGQ1k1cq8Qlun4C9kLt3w==",+ "cpu": [+ "riscv64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-riscv64-musl": {+ "version": "4.63.1",+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.63.1.tgz",+ "integrity": "sha512-ouAGwhO6wHRXdnOVCOsB0tRFkA7nhNB2Nwax6oECXN0YiN8EYUTBAOudADOB1PI+yDL61TeNx/u7MVCzksNbkQ==",+ "cpu": [+ "riscv64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-s390x-gnu": {+ "version": "4.63.1",+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.63.1.tgz",+ "integrity": "sha512-q2R38Sn+1J8RxhfJ+T54wSWmyKXWec+9jgDfqO2AtArEqHO5R2aeayp5H5OYLr5UYDVGsVaZPEFUooMhYCdz5A==",+ "cpu": [+ "s390x"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-x64-gnu": {+ "version": "4.63.1",+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.63.1.tgz",+ "integrity": "sha512-gfI5T24WLLuFfSKw7Go/zDXjAAV0fny0swTaDv+WjK7vqcw4cRhFfdsyKL1n+ukI+ooBxn3bVQnyrn06WpI50w==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-x64-musl": {+ "version": "4.63.1",+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.63.1.tgz",+ "integrity": "sha512-4h6XqthmB4Hspji84wvgk+ElodTsGj+dbZqHJHHtKxj4mYq0ANSEEPX9ys3moJueqsRjwpaJYH7874Itwnj2ow==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-openbsd-x64": {+ "version": "4.63.1",+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.63.1.tgz",+ "integrity": "sha512-dlfCOa87o1VAYegLQ9EKilx2JCeRofiyPGhTCmqnuXZ6bMPiycO1rq1+sKoulAp7pGLIsTIw+1x5R+zgh5LhhA==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "openbsd"+ ]+ },+ "node_modules/@rollup/rollup-openharmony-arm64": {+ "version": "4.63.1",+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.63.1.tgz",+ "integrity": "sha512-cjkLbOlfcm3QGhMM1J5zaZjsw1GggbN6rw9UTSSRrPrR1KkcXnN7Uq9rPw34xImQ9VOY9GN+6u2Zj80B9ptkcw==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "openharmony"+ ]+ },+ "node_modules/@rollup/rollup-win32-arm64-msvc": {+ "version": "4.63.1",+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.63.1.tgz",+ "integrity": "sha512-Li1KdUnWGE4N3e1F/B4RTB1ms+nG4WBgjByO46pkeBVX/2UBsY53xf5vK9WygVmnH3RwncIST7lkSdLSY6P9lg==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ]+ },+ "node_modules/@rollup/rollup-win32-ia32-msvc": {+ "version": "4.63.1",+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.63.1.tgz",+ "integrity": "sha512-t4ZYOSoLTgwhuFMrmTMLx/+i1DQVK7HYqMc6kY46EApwi8X0nIVphzdNoThU3xt6n+N5urG1/gxBdCaKDLavfg==",+ "cpu": [+ "ia32"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ]+ },+ "node_modules/@rollup/rollup-win32-x64-gnu": {+ "version": "4.63.1",+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.63.1.tgz",+ "integrity": "sha512-RgroPfMmKlD1RzSDxvwgcPiy2HNQKoYV7OmwIXDsk73uKW5t6B/V8KIy27SMv/FNXFo/oSBtWc9J0X7t91ezZg==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ]+ },+ "node_modules/@rollup/rollup-win32-x64-msvc": {+ "version": "4.63.1",+ "resolved": "https://registry.npmmirror.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.63.1.tgz",+ "integrity": "sha512-at8QVep6S3h5Y6gSbdGU06bRY5WJkf6WUduM9YtvYMbYhB1MOFfUgc6kehitQXzOtMSaT70q7f9ydPhpqu821w==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ]+ },+ "node_modules/@swc/helpers": {+ "version": "0.5.15",+ "resolved": "https://registry.npmmirror.com/@swc/helpers/-/helpers-0.5.15.tgz",+ "integrity": "sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==",+ "license": "Apache-2.0",+ "dependencies": {+ "tslib": "^2.8.0"+ }+ },+ "node_modules/@tanstack/query-core": {+ "version": "5.102.8",+ "resolved": "https://registry.npmmirror.com/@tanstack/query-core/-/query-core-5.102.8.tgz",+ "integrity": "sha512-ZNjkJ33CqvPNec/6lZBnHqLc3EVGPZ9ySLhYahU9TcuRFdmwXewuj0c4hwSWcGHqEUwcSrKeZ+oGcvPBqXcQcg==",+ "license": "MIT",+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/tannerlinsley"+ }+ },+ "node_modules/@tanstack/react-query": {+ "version": "5.102.8",+ "resolved": "https://registry.npmmirror.com/@tanstack/react-query/-/react-query-5.102.8.tgz",+ "integrity": "sha512-TYBea4OuXWD7MhaSHq069TWbFe7rcwWN6kzT7JF0OKi1K6c1gTv2IzD6A6ExJsCMozdkqBWeuIUZmu4KQg0O5A==",+ "license": "MIT",+ "dependencies": {+ "@tanstack/query-core": "5.102.8"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/tannerlinsley"+ },+ "peerDependencies": {+ "react": "^18 || ^19"+ }+ },+ "node_modules/@types/estree": {+ "version": "1.0.9",+ "resolved": "https://registry.npmmirror.com/@types/estree/-/estree-1.0.9.tgz",+ "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/@types/node": {+ "version": "22.20.1",+ "resolved": "https://registry.npmmirror.com/@types/node/-/node-22.20.1.tgz",+ "integrity": "sha512-EANqOCF9QFyra+4pfxUcX9STKJpCLjMbObVzljIJomAWSnuSIEAvyzEU53GaajbXJEgdh0iEcPL+DGvpUd4k1Q==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "undici-types": "~6.21.0"+ }+ },+ "node_modules/@types/react": {+ "version": "19.2.18",+ "resolved": "https://registry.npmmirror.com/@types/react/-/react-19.2.18.tgz",+ "integrity": "sha512-AnzbBERsrLKtk2XSfTbYRLjQPdy116Sty4q+T+Bp3IC4l6jNBvreVPAHmpq9qhXQM7CXZPjLVmGMw9sy+hxQ3w==",+ "license": "MIT",+ "dependencies": {+ "csstype": "^3.2.2"+ }+ },+ "node_modules/@types/react-dom": {+ "version": "19.2.5",+ "resolved": "https://registry.npmmirror.com/@types/react-dom/-/react-dom-19.2.5.tgz",+ "integrity": "sha512-fMPwH9v7r/pp43yUd2/Mbiex5KouJwwR3dzHkhLREUC6764VyDsqxhAxv6OFEYR1RhjOyD1naqba8ECDBe7ZQg==",+ "dev": true,+ "license": "MIT",+ "peerDependencies": {+ "@types/react": "^19.2.0"+ }+ },+ "node_modules/@vitest/expect": {+ "version": "2.1.9",+ "resolved": "https://registry.npmmirror.com/@vitest/expect/-/expect-2.1.9.tgz",+ "integrity": "sha512-UJCIkTBenHeKT1TTlKMJWy1laZewsRIzYighyYiJKZreqtdxSos/S1t+ktRMQWu2CKqaarrkeszJx1cgC5tGZw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@vitest/spy": "2.1.9",+ "@vitest/utils": "2.1.9",+ "chai": "^5.1.2",+ "tinyrainbow": "^1.2.0"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ }+ },+ "node_modules/@vitest/mocker": {+ "version": "2.1.9",+ "resolved": "https://registry.npmmirror.com/@vitest/mocker/-/mocker-2.1.9.tgz",+ "integrity": "sha512-tVL6uJgoUdi6icpxmdrn5YNo3g3Dxv+IHJBr0GXHaEdTcw3F+cPKnsXFhli6nO+f/6SDKPHEK1UN+k+TQv0Ehg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@vitest/spy": "2.1.9",+ "estree-walker": "^3.0.3",+ "magic-string": "^0.30.12"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ },+ "peerDependencies": {+ "msw": "^2.4.9",+ "vite": "^5.0.0"+ },+ "peerDependenciesMeta": {+ "msw": {+ "optional": true+ },+ "vite": {+ "optional": true+ }+ }+ },+ "node_modules/@vitest/pretty-format": {+ "version": "2.1.9",+ "resolved": "https://registry.npmmirror.com/@vitest/pretty-format/-/pretty-format-2.1.9.tgz",+ "integrity": "sha512-KhRIdGV2U9HOUzxfiHmY8IFHTdqtOhIzCpd8WRdJiE7D/HUcZVD0EgQCVjm+Q9gkUXWgBvMmTtZgIG48wq7sOQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "tinyrainbow": "^1.2.0"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ }+ },+ "node_modules/@vitest/runner": {+ "version": "2.1.9",+ "resolved": "https://registry.npmmirror.com/@vitest/runner/-/runner-2.1.9.tgz",+ "integrity": "sha512-ZXSSqTFIrzduD63btIfEyOmNcBmQvgOVsPNPe0jYtESiXkhd8u2erDLnMxmGrDCwHCCHE7hxwRDCT3pt0esT4g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@vitest/utils": "2.1.9",+ "pathe": "^1.1.2"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ }+ },+ "node_modules/@vitest/snapshot": {+ "version": "2.1.9",+ "resolved": "https://registry.npmmirror.com/@vitest/snapshot/-/snapshot-2.1.9.tgz",+ "integrity": "sha512-oBO82rEjsxLNJincVhLhaxxZdEtV0EFHMK5Kmx5sJ6H9L183dHECjiefOAdnqpIgT5eZwT04PoggUnW88vOBNQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@vitest/pretty-format": "2.1.9",+ "magic-string": "^0.30.12",+ "pathe": "^1.1.2"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ }+ },+ "node_modules/@vitest/spy": {+ "version": "2.1.9",+ "resolved": "https://registry.npmmirror.com/@vitest/spy/-/spy-2.1.9.tgz",+ "integrity": "sha512-E1B35FwzXXTs9FHNK6bDszs7mtydNi5MIfUWpceJ8Xbfb1gBMscAnwLbEu+B44ed6W3XjL9/ehLPHR1fkf1KLQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "tinyspy": "^3.0.2"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ }+ },+ "node_modules/@vitest/utils": {+ "version": "2.1.9",+ "resolved": "https://registry.npmmirror.com/@vitest/utils/-/utils-2.1.9.tgz",+ "integrity": "sha512-v0psaMSkNJ3A2NMrUEHFRzJtDPFn+/VWZ5WxImB21T9fjucJRmS7xCS3ppEnARb9y11OAzaD+P2Ps+b+BGX5iQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@vitest/pretty-format": "2.1.9",+ "loupe": "^3.1.2",+ "tinyrainbow": "^1.2.0"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ }+ },+ "node_modules/any-promise": {+ "version": "1.3.0",+ "resolved": "https://registry.npmmirror.com/any-promise/-/any-promise-1.3.0.tgz",+ "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/anymatch": {+ "version": "3.1.3",+ "resolved": "https://registry.npmmirror.com/anymatch/-/anymatch-3.1.3.tgz",+ "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "normalize-path": "^3.0.0",+ "picomatch": "^2.0.4"+ },+ "engines": {+ "node": ">= 8"+ }+ },+ "node_modules/arg": {+ "version": "5.0.2",+ "resolved": "https://registry.npmmirror.com/arg/-/arg-5.0.2.tgz",+ "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/artplayer": {+ "version": "5.4.0",+ "resolved": "https://registry.npmmirror.com/artplayer/-/artplayer-5.4.0.tgz",+ "integrity": "sha512-2B+plbx8N2yNsjK4nJU3+EOG8TULm1LRZk/QPkWRAMEX2Ee/MSnZG/WJYz8kcoZxZuLKcQ3uXifqLuPxZOH29A==",+ "license": "MIT",+ "dependencies": {+ "option-validator": "^2.0.6"+ }+ },+ "node_modules/assertion-error": {+ "version": "2.0.1",+ "resolved": "https://registry.npmmirror.com/assertion-error/-/assertion-error-2.0.1.tgz",+ "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=12"+ }+ },+ "node_modules/autoprefixer": {+ "version": "10.5.4",+ "resolved": "https://registry.npmmirror.com/autoprefixer/-/autoprefixer-10.5.4.tgz",+ "integrity": "sha512-MaU0U/za7N3r6brxD4YB/l4NSrFzLPlANv6wEuQVaIPlD3L4W9rFcQPbL/EilY9BHhHvhfcz3gInDLrEtWT4EA==",+ "dev": true,+ "funding": [+ {+ "type": "opencollective",+ "url": "https://opencollective.com/postcss/"+ },+ {+ "type": "tidelift",+ "url": "https://tidelift.com/funding/github/npm/autoprefixer"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "MIT",+ "dependencies": {+ "browserslist": "^4.28.6",+ "caniuse-lite": "^1.0.30001806",+ "fraction.js": "^5.3.4",+ "picocolors": "^1.1.1",+ "postcss-value-parser": "^4.2.0"+ },+ "bin": {+ "autoprefixer": "bin/autoprefixer"+ },+ "engines": {+ "node": "^10 || ^12 || >=14"+ },+ "peerDependencies": {+ "postcss": "^8.1.0"+ }+ },+ "node_modules/baseline-browser-mapping": {+ "version": "2.11.20",+ "resolved": "https://registry.npmmirror.com/baseline-browser-mapping/-/baseline-browser-mapping-2.11.20.tgz",+ "integrity": "sha512-H0ulySigv6icDJ1F7SjtdCD6PrhTpdYCmP0CactWy1+ekh0AFd0o1Wn5T8b+hnTmdBx19u9yhL6wvCylXMY7zw==",+ "dev": true,+ "license": "Apache-2.0",+ "bin": {+ "baseline-browser-mapping": "dist/cli.cjs"+ },+ "engines": {+ "node": ">=6.0.0"+ }+ },+ "node_modules/binary-extensions": {+ "version": "2.3.0",+ "resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.3.0.tgz",+ "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/braces": {+ "version": "3.0.3",+ "resolved": "https://registry.npmmirror.com/braces/-/braces-3.0.3.tgz",+ "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "fill-range": "^7.1.1"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/browserslist": {+ "version": "4.28.8",+ "resolved": "https://registry.npmmirror.com/browserslist/-/browserslist-4.28.8.tgz",+ "integrity": "sha512-V2NpofLblG64mfOtSgDhOJESZEGogzDMBv/q+W6oc4LXWP/q75eOXoOaaOu1EOadB9U4Bwx/e0yzbvwKH8zalA==",+ "dev": true,+ "funding": [+ {+ "type": "opencollective",+ "url": "https://opencollective.com/browserslist"+ },+ {+ "type": "tidelift",+ "url": "https://tidelift.com/funding/github/npm/browserslist"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "MIT",+ "dependencies": {+ "baseline-browser-mapping": "^2.11.12",+ "caniuse-lite": "^1.0.30001809",+ "electron-to-chromium": "^1.5.402",+ "node-releases": "^2.0.53",+ "update-browserslist-db": "^1.3.0"+ },+ "bin": {+ "browserslist": "cli.js"+ },+ "engines": {+ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"+ }+ },+ "node_modules/cac": {+ "version": "6.7.14",+ "resolved": "https://registry.npmmirror.com/cac/-/cac-6.7.14.tgz",+ "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/camelcase-css": {+ "version": "2.0.1",+ "resolved": "https://registry.npmmirror.com/camelcase-css/-/camelcase-css-2.0.1.tgz",+ "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 6"+ }+ },+ "node_modules/caniuse-lite": {+ "version": "1.0.30001810",+ "resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001810.tgz",+ "integrity": "sha512-TITQPUkaz+aVk5GL6NhOdwk1aEaNTSDPsGFWrTuhKGtjTF70jL/Oht2W4c6rXUe5fu7Ie19VIahAXHIIiWWNeg==",+ "funding": [+ {+ "type": "opencollective",+ "url": "https://opencollective.com/browserslist"+ },+ {+ "type": "tidelift",+ "url": "https://tidelift.com/funding/github/npm/caniuse-lite"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "CC-BY-4.0"+ },+ "node_modules/chai": {+ "version": "5.3.3",+ "resolved": "https://registry.npmmirror.com/chai/-/chai-5.3.3.tgz",+ "integrity": "sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "assertion-error": "^2.0.1",+ "check-error": "^2.1.1",+ "deep-eql": "^5.0.1",+ "loupe": "^3.1.0",+ "pathval": "^2.0.0"+ },+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/check-error": {+ "version": "2.1.3",+ "resolved": "https://registry.npmmirror.com/check-error/-/check-error-2.1.3.tgz",+ "integrity": "sha512-PAJdDJusoxnwm1VwW07VWwUN1sl7smmC3OKggvndJFadxxDRyFJBX/ggnu/KE4kQAB7a3Dp8f/YXC1FlUprWmA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 16"+ }+ },+ "node_modules/chokidar": {+ "version": "3.6.0",+ "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.6.0.tgz",+ "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "anymatch": "~3.1.2",+ "braces": "~3.0.2",+ "glob-parent": "~5.1.2",+ "is-binary-path": "~2.1.0",+ "is-glob": "~4.0.1",+ "normalize-path": "~3.0.0",+ "readdirp": "~3.6.0"+ },+ "engines": {+ "node": ">= 8.10.0"+ },+ "funding": {+ "url": "https://paulmillr.com/funding/"+ },+ "optionalDependencies": {+ "fsevents": "~2.3.2"+ }+ },+ "node_modules/chokidar/node_modules/glob-parent": {+ "version": "5.1.2",+ "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz",+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "is-glob": "^4.0.1"+ },+ "engines": {+ "node": ">= 6"+ }+ },+ "node_modules/client-only": {+ "version": "0.0.1",+ "resolved": "https://registry.npmmirror.com/client-only/-/client-only-0.0.1.tgz",+ "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==",+ "license": "MIT"+ },+ "node_modules/commander": {+ "version": "4.1.1",+ "resolved": "https://registry.npmmirror.com/commander/-/commander-4.1.1.tgz",+ "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 6"+ }+ },+ "node_modules/cssesc": {+ "version": "3.0.0",+ "resolved": "https://registry.npmmirror.com/cssesc/-/cssesc-3.0.0.tgz",+ "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",+ "dev": true,+ "license": "MIT",+ "bin": {+ "cssesc": "bin/cssesc"+ },+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/csstype": {+ "version": "3.2.3",+ "resolved": "https://registry.npmmirror.com/csstype/-/csstype-3.2.3.tgz",+ "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==",+ "license": "MIT"+ },+ "node_modules/debug": {+ "version": "4.4.3",+ "resolved": "https://registry.npmmirror.com/debug/-/debug-4.4.3.tgz",+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "ms": "^2.1.3"+ },+ "engines": {+ "node": ">=6.0"+ },+ "peerDependenciesMeta": {+ "supports-color": {+ "optional": true+ }+ }+ },+ "node_modules/deep-eql": {+ "version": "5.0.2",+ "resolved": "https://registry.npmmirror.com/deep-eql/-/deep-eql-5.0.2.tgz",+ "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/detect-libc": {+ "version": "2.1.2",+ "resolved": "https://registry.npmmirror.com/detect-libc/-/detect-libc-2.1.2.tgz",+ "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",+ "license": "Apache-2.0",+ "optional": true,+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/dexie": {+ "version": "4.4.5",+ "resolved": "https://registry.npmmirror.com/dexie/-/dexie-4.4.5.tgz",+ "integrity": "sha512-wWCHdihT3dmlUSuNhn5mMZDWSpG0suxjAni7YjjiZdzabZcKmy3uNZGZ7AeYYXBoLbpSXX35fikPLkPC44Osiw==",+ "license": "Apache-2.0"+ },+ "node_modules/dexie-react-hooks": {+ "version": "1.1.7",+ "resolved": "https://registry.npmmirror.com/dexie-react-hooks/-/dexie-react-hooks-1.1.7.tgz",+ "integrity": "sha512-Lwv5W0Hk+uOW3kGnsU9GZoR1er1B7WQ5DSdonoNG+focTNeJbHW6vi6nBoX534VKI3/uwHebYzSw1fwY6a7mTw==",+ "license": "Apache-2.0",+ "peerDependencies": {+ "@types/react": ">=16",+ "dexie": "^3.2 || ^4.0.1-alpha",+ "react": ">=16"+ }+ },+ "node_modules/didyoumean": {+ "version": "1.2.2",+ "resolved": "https://registry.npmmirror.com/didyoumean/-/didyoumean-1.2.2.tgz",+ "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==",+ "dev": true,+ "license": "Apache-2.0"+ },+ "node_modules/dlv": {+ "version": "1.1.3",+ "resolved": "https://registry.npmmirror.com/dlv/-/dlv-1.1.3.tgz",+ "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/electron-to-chromium": {+ "version": "1.5.418",+ "resolved": "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.5.418.tgz",+ "integrity": "sha512-UzS26r3AEbG5wSoGVpJKqwHIU9zwQN7LHdVIThDrJpS0I5KdlXFMEb8543fhc9dVnIIAST6ar8rhwa00AL5MlA==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/es-errors": {+ "version": "1.3.0",+ "resolved": "https://registry.npmmirror.com/es-errors/-/es-errors-1.3.0.tgz",+ "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/es-module-lexer": {+ "version": "1.7.0",+ "resolved": "https://registry.npmmirror.com/es-module-lexer/-/es-module-lexer-1.7.0.tgz",+ "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/esbuild": {+ "version": "0.21.5",+ "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.21.5.tgz",+ "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==",+ "dev": true,+ "hasInstallScript": true,+ "license": "MIT",+ "bin": {+ "esbuild": "bin/esbuild"+ },+ "engines": {+ "node": ">=12"+ },+ "optionalDependencies": {+ "@esbuild/aix-ppc64": "0.21.5",+ "@esbuild/android-arm": "0.21.5",+ "@esbuild/android-arm64": "0.21.5",+ "@esbuild/android-x64": "0.21.5",+ "@esbuild/darwin-arm64": "0.21.5",+ "@esbuild/darwin-x64": "0.21.5",+ "@esbuild/freebsd-arm64": "0.21.5",+ "@esbuild/freebsd-x64": "0.21.5",+ "@esbuild/linux-arm": "0.21.5",+ "@esbuild/linux-arm64": "0.21.5",+ "@esbuild/linux-ia32": "0.21.5",+ "@esbuild/linux-loong64": "0.21.5",+ "@esbuild/linux-mips64el": "0.21.5",+ "@esbuild/linux-ppc64": "0.21.5",+ "@esbuild/linux-riscv64": "0.21.5",+ "@esbuild/linux-s390x": "0.21.5",+ "@esbuild/linux-x64": "0.21.5",+ "@esbuild/netbsd-x64": "0.21.5",+ "@esbuild/openbsd-x64": "0.21.5",+ "@esbuild/sunos-x64": "0.21.5",+ "@esbuild/win32-arm64": "0.21.5",+ "@esbuild/win32-ia32": "0.21.5",+ "@esbuild/win32-x64": "0.21.5"+ }+ },+ "node_modules/escalade": {+ "version": "3.2.0",+ "resolved": "https://registry.npmmirror.com/escalade/-/escalade-3.2.0.tgz",+ "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/estree-walker": {+ "version": "3.0.3",+ "resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-3.0.3.tgz",+ "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@types/estree": "^1.0.0"+ }+ },+ "node_modules/expect-type": {+ "version": "1.4.0",+ "resolved": "https://registry.npmmirror.com/expect-type/-/expect-type-1.4.0.tgz",+ "integrity": "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==",+ "dev": true,+ "license": "Apache-2.0",+ "engines": {+ "node": ">=12.0.0"+ }+ },+ "node_modules/fast-glob": {+ "version": "3.3.3",+ "resolved": "https://registry.npmmirror.com/fast-glob/-/fast-glob-3.3.3.tgz",+ "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@nodelib/fs.stat": "^2.0.2",+ "@nodelib/fs.walk": "^1.2.3",+ "glob-parent": "^5.1.2",+ "merge2": "^1.3.0",+ "micromatch": "^4.0.8"+ },+ "engines": {+ "node": ">=8.6.0"+ }+ },+ "node_modules/fast-glob/node_modules/glob-parent": {+ "version": "5.1.2",+ "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz",+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "is-glob": "^4.0.1"+ },+ "engines": {+ "node": ">= 6"+ }+ },+ "node_modules/fastq": {+ "version": "1.20.3",+ "resolved": "https://registry.npmmirror.com/fastq/-/fastq-1.20.3.tgz",+ "integrity": "sha512-XKv5nnLs6nLF71NgiKJLIZFLkPyIEuOselLG7ujZnGrRfQK8HpvY+WqKhAJUAdLomwVHErVS4LfxFlPq0/FTAw==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "reusify": "^1.0.4"+ }+ },+ "node_modules/fill-range": {+ "version": "7.1.1",+ "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.1.1.tgz",+ "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "to-regex-range": "^5.0.1"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/fraction.js": {+ "version": "5.3.4",+ "resolved": "https://registry.npmmirror.com/fraction.js/-/fraction.js-5.3.4.tgz",+ "integrity": "sha512-1X1NTtiJphryn/uLQz3whtY6jK3fTqoE3ohKs0tT+Ujr1W59oopxmoEh7Lu5p6vBaPbgoM0bzveAW4Qi5RyWDQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": "*"+ },+ "funding": {+ "type": "github",+ "url": "https://github.com/sponsors/rawify"+ }+ },+ "node_modules/fsevents": {+ "version": "2.3.3",+ "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz",+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",+ "dev": true,+ "hasInstallScript": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"+ }+ },+ "node_modules/function-bind": {+ "version": "1.1.2",+ "resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz",+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",+ "dev": true,+ "license": "MIT",+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/glob-parent": {+ "version": "6.0.2",+ "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-6.0.2.tgz",+ "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "is-glob": "^4.0.3"+ },+ "engines": {+ "node": ">=10.13.0"+ }+ },+ "node_modules/hasown": {+ "version": "2.0.4",+ "resolved": "https://registry.npmmirror.com/hasown/-/hasown-2.0.4.tgz",+ "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "function-bind": "^1.1.2"+ },+ "engines": {+ "node": ">= 0.4"+ }+ },+ "node_modules/hls.js": {+ "version": "1.7.1",+ "resolved": "https://registry.npmmirror.com/hls.js/-/hls.js-1.7.1.tgz",+ "integrity": "sha512-DlzIkeBAS9IIQ432k3BUf3HlwbsR0+trB1i2lDdN2gUkNkrehFurh0/48M5c1/EjlDkdGng1gwZIpwyPxvdZ/g==",+ "license": "Apache-2.0"+ },+ "node_modules/is-binary-path": {+ "version": "2.1.0",+ "resolved": "https://registry.npmmirror.com/is-binary-path/-/is-binary-path-2.1.0.tgz",+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "binary-extensions": "^2.0.0"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/is-core-module": {+ "version": "2.16.2",+ "resolved": "https://registry.npmmirror.com/is-core-module/-/is-core-module-2.16.2.tgz",+ "integrity": "sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "hasown": "^2.0.3"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/is-extglob": {+ "version": "2.1.1",+ "resolved": "https://registry.npmmirror.com/is-extglob/-/is-extglob-2.1.1.tgz",+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/is-glob": {+ "version": "4.0.3",+ "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz",+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "is-extglob": "^2.1.1"+ },+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/is-number": {+ "version": "7.0.0",+ "resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz",+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=0.12.0"+ }+ },+ "node_modules/jiti": {+ "version": "1.21.7",+ "resolved": "https://registry.npmmirror.com/jiti/-/jiti-1.21.7.tgz",+ "integrity": "sha512-/imKNG4EbWNrVjoNC/1H5/9GFy+tqjGBHCaSsN+P2RnPqjsLmv6UD3Ej+Kj8nBWaRAwyk7kK5ZUc+OEatnTR3A==",+ "dev": true,+ "license": "MIT",+ "bin": {+ "jiti": "bin/jiti.js"+ }+ },+ "node_modules/kind-of": {+ "version": "6.0.3",+ "resolved": "https://registry.npmmirror.com/kind-of/-/kind-of-6.0.3.tgz",+ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",+ "license": "MIT",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/lilconfig": {+ "version": "3.1.3",+ "resolved": "https://registry.npmmirror.com/lilconfig/-/lilconfig-3.1.3.tgz",+ "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=14"+ },+ "funding": {+ "url": "https://github.com/sponsors/antonk52"+ }+ },+ "node_modules/lines-and-columns": {+ "version": "1.2.4",+ "resolved": "https://registry.npmmirror.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz",+ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/loupe": {+ "version": "3.2.1",+ "resolved": "https://registry.npmmirror.com/loupe/-/loupe-3.2.1.tgz",+ "integrity": "sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/magic-string": {+ "version": "0.30.21",+ "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.21.tgz",+ "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@jridgewell/sourcemap-codec": "^1.5.5"+ }+ },+ "node_modules/merge2": {+ "version": "1.4.1",+ "resolved": "https://registry.npmmirror.com/merge2/-/merge2-1.4.1.tgz",+ "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 8"+ }+ },+ "node_modules/micromatch": {+ "version": "4.0.8",+ "resolved": "https://registry.npmmirror.com/micromatch/-/micromatch-4.0.8.tgz",+ "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "braces": "^3.0.3",+ "picomatch": "^2.3.1"+ },+ "engines": {+ "node": ">=8.6"+ }+ },+ "node_modules/ms": {+ "version": "2.1.3",+ "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz",+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/mz": {+ "version": "2.7.0",+ "resolved": "https://registry.npmmirror.com/mz/-/mz-2.7.0.tgz",+ "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "any-promise": "^1.0.0",+ "object-assign": "^4.0.1",+ "thenify-all": "^1.0.0"+ }+ },+ "node_modules/nanoid": {+ "version": "3.3.18",+ "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.18.tgz",+ "integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==",+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "MIT",+ "bin": {+ "nanoid": "bin/nanoid.cjs"+ },+ "engines": {+ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"+ }+ },+ "node_modules/next": {+ "version": "15.5.25",+ "resolved": "https://registry.npmmirror.com/next/-/next-15.5.25.tgz",+ "integrity": "sha512-OMWNulIIqKM2ykvC2qMjIt0IoavB4UB2SCs4iXJ6z6847FvyH8jBmBWcvrF5iuhTu8Przh20Fo/aoszIdqx4PA==",+ "license": "MIT",+ "dependencies": {+ "@next/env": "15.5.25",+ "@swc/helpers": "0.5.15",+ "caniuse-lite": "^1.0.30001579",+ "postcss": "8.4.31",+ "styled-jsx": "5.1.6"+ },+ "bin": {+ "next": "dist/bin/next"+ },+ "engines": {+ "node": "^18.18.0 || ^19.8.0 || >= 20.0.0"+ },+ "optionalDependencies": {+ "@next/swc-darwin-arm64": "15.5.25",+ "@next/swc-darwin-x64": "15.5.25",+ "@next/swc-linux-arm64-gnu": "15.5.25",+ "@next/swc-linux-arm64-musl": "15.5.25",+ "@next/swc-linux-x64-gnu": "15.5.25",+ "@next/swc-linux-x64-musl": "15.5.25",+ "@next/swc-win32-arm64-msvc": "15.5.25",+ "@next/swc-win32-x64-msvc": "15.5.25",+ "sharp": "^0.34.3 || ^0.35.4"+ },+ "peerDependencies": {+ "@opentelemetry/api": "^1.1.0",+ "@playwright/test": "^1.51.1",+ "babel-plugin-react-compiler": "*",+ "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0",+ "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0",+ "sass": "^1.3.0"+ },+ "peerDependenciesMeta": {+ "@opentelemetry/api": {+ "optional": true+ },+ "@playwright/test": {+ "optional": true+ },+ "babel-plugin-react-compiler": {+ "optional": true+ },+ "sass": {+ "optional": true+ }+ }+ },+ "node_modules/next/node_modules/postcss": {+ "version": "8.4.31",+ "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.31.tgz",+ "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",+ "funding": [+ {+ "type": "opencollective",+ "url": "https://opencollective.com/postcss/"+ },+ {+ "type": "tidelift",+ "url": "https://tidelift.com/funding/github/npm/postcss"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "MIT",+ "dependencies": {+ "nanoid": "^3.3.6",+ "picocolors": "^1.0.0",+ "source-map-js": "^1.0.2"+ },+ "engines": {+ "node": "^10 || ^12 || >=14"+ }+ },+ "node_modules/node-releases": {+ "version": "2.0.54",+ "resolved": "https://registry.npmmirror.com/node-releases/-/node-releases-2.0.54.tgz",+ "integrity": "sha512-YHs7BmmcsdAI5Ozuf8JZo6PT0mv2GIWC9vMfvUC3dp65M8hn7Ux8CPL+2oBI7juNuj9d0ndhTcznq2ODBps9cQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/normalize-path": {+ "version": "3.0.0",+ "resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz",+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/object-assign": {+ "version": "4.1.1",+ "resolved": "https://registry.npmmirror.com/object-assign/-/object-assign-4.1.1.tgz",+ "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/object-hash": {+ "version": "3.0.0",+ "resolved": "https://registry.npmmirror.com/object-hash/-/object-hash-3.0.0.tgz",+ "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 6"+ }+ },+ "node_modules/option-validator": {+ "version": "2.0.6",+ "resolved": "https://registry.npmmirror.com/option-validator/-/option-validator-2.0.6.tgz",+ "integrity": "sha512-tmZDan2LRIRQyhUGvkff68/O0R8UmF+Btmiiz0SmSw2ng3CfPZB9wJlIjHpe/MKUZqyIZkVIXCrwr1tIN+0Dzg==",+ "license": "MIT",+ "dependencies": {+ "kind-of": "^6.0.3"+ }+ },+ "node_modules/path-parse": {+ "version": "1.0.7",+ "resolved": "https://registry.npmmirror.com/path-parse/-/path-parse-1.0.7.tgz",+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/pathe": {+ "version": "1.1.2",+ "resolved": "https://registry.npmmirror.com/pathe/-/pathe-1.1.2.tgz",+ "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/pathval": {+ "version": "2.0.1",+ "resolved": "https://registry.npmmirror.com/pathval/-/pathval-2.0.1.tgz",+ "integrity": "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 14.16"+ }+ },+ "node_modules/picocolors": {+ "version": "1.1.1",+ "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.1.1.tgz",+ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",+ "license": "ISC"+ },+ "node_modules/picomatch": {+ "version": "2.3.2",+ "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.2.tgz",+ "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=8.6"+ },+ "funding": {+ "url": "https://github.com/sponsors/jonschlinkert"+ }+ },+ "node_modules/pirates": {+ "version": "4.0.7",+ "resolved": "https://registry.npmmirror.com/pirates/-/pirates-4.0.7.tgz",+ "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 6"+ }+ },+ "node_modules/postcss": {+ "version": "8.5.26",+ "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.5.26.tgz",+ "integrity": "sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==",+ "dev": true,+ "funding": [+ {+ "type": "opencollective",+ "url": "https://opencollective.com/postcss/"+ },+ {+ "type": "tidelift",+ "url": "https://tidelift.com/funding/github/npm/postcss"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "MIT",+ "dependencies": {+ "nanoid": "^3.3.17",+ "picocolors": "^1.1.1",+ "source-map-js": "^1.2.1"+ },+ "engines": {+ "node": "^10 || ^12 || >=14"+ }+ },+ "node_modules/postcss-import": {+ "version": "15.1.0",+ "resolved": "https://registry.npmmirror.com/postcss-import/-/postcss-import-15.1.0.tgz",+ "integrity": "sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "postcss-value-parser": "^4.0.0",+ "read-cache": "^1.0.0",+ "resolve": "^1.1.7"+ },+ "engines": {+ "node": ">=14.0.0"+ },+ "peerDependencies": {+ "postcss": "^8.0.0"+ }+ },+ "node_modules/postcss-js": {+ "version": "4.1.0",+ "resolved": "https://registry.npmmirror.com/postcss-js/-/postcss-js-4.1.0.tgz",+ "integrity": "sha512-oIAOTqgIo7q2EOwbhb8UalYePMvYoIeRY2YKntdpFQXNosSu3vLrniGgmH9OKs/qAkfoj5oB3le/7mINW1LCfw==",+ "dev": true,+ "funding": [+ {+ "type": "opencollective",+ "url": "https://opencollective.com/postcss/"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "MIT",+ "dependencies": {+ "camelcase-css": "^2.0.1"+ },+ "engines": {+ "node": "^12 || ^14 || >= 16"+ },+ "peerDependencies": {+ "postcss": "^8.4.21"+ }+ },+ "node_modules/postcss-load-config": {+ "version": "6.0.1",+ "resolved": "https://registry.npmmirror.com/postcss-load-config/-/postcss-load-config-6.0.1.tgz",+ "integrity": "sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==",+ "dev": true,+ "funding": [+ {+ "type": "opencollective",+ "url": "https://opencollective.com/postcss/"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "MIT",+ "dependencies": {+ "lilconfig": "^3.1.1"+ },+ "engines": {+ "node": ">= 18"+ },+ "peerDependencies": {+ "jiti": ">=1.21.0",+ "postcss": ">=8.0.9",+ "tsx": "^4.8.1",+ "yaml": "^2.4.2"+ },+ "peerDependenciesMeta": {+ "jiti": {+ "optional": true+ },+ "postcss": {+ "optional": true+ },+ "tsx": {+ "optional": true+ },+ "yaml": {+ "optional": true+ }+ }+ },+ "node_modules/postcss-nested": {+ "version": "6.2.0",+ "resolved": "https://registry.npmmirror.com/postcss-nested/-/postcss-nested-6.2.0.tgz",+ "integrity": "sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==",+ "dev": true,+ "funding": [+ {+ "type": "opencollective",+ "url": "https://opencollective.com/postcss/"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "MIT",+ "dependencies": {+ "postcss-selector-parser": "^6.1.1"+ },+ "engines": {+ "node": ">=12.0"+ },+ "peerDependencies": {+ "postcss": "^8.2.14"+ }+ },+ "node_modules/postcss-selector-parser": {+ "version": "6.1.4",+ "resolved": "https://registry.npmmirror.com/postcss-selector-parser/-/postcss-selector-parser-6.1.4.tgz",+ "integrity": "sha512-bIoJLOmjCO1S9XdY/DcnR5hJxvrDir1PbGChrzXG3vw0/FOliy/fA3dmdhQ441kah4gKv+TwckGzex6wNS5cnQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "cssesc": "^3.0.0",+ "util-deprecate": "^1.0.2"+ },+ "engines": {+ "node": ">=4"+ }+ },+ "node_modules/postcss-value-parser": {+ "version": "4.2.0",+ "resolved": "https://registry.npmmirror.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",+ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/queue-microtask": {+ "version": "1.2.3",+ "resolved": "https://registry.npmmirror.com/queue-microtask/-/queue-microtask-1.2.3.tgz",+ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",+ "dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/feross"+ },+ {+ "type": "patreon",+ "url": "https://www.patreon.com/feross"+ },+ {+ "type": "consulting",+ "url": "https://feross.org/support"+ }+ ],+ "license": "MIT"+ },+ "node_modules/react": {+ "version": "19.2.8",+ "resolved": "https://registry.npmmirror.com/react/-/react-19.2.8.tgz",+ "integrity": "sha512-PWaYA1L/q9u2u7xYQi+Y3L3Yfnie7XyLeaJICV1MGD6LprsBxcAqGjYyr0eY3p+QdsA+x/Irkt4Qif8D63+Sbw==",+ "license": "MIT",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/react-dom": {+ "version": "19.2.8",+ "resolved": "https://registry.npmmirror.com/react-dom/-/react-dom-19.2.8.tgz",+ "integrity": "sha512-rVprimfGBG3DR+Tq0IQG2DT5PxKth1WIGDmj5yPmlzr4YBe7uyE+Du4oVqTDXZSHGGGXRtTJEGSSePyQCMBglQ==",+ "license": "MIT",+ "dependencies": {+ "scheduler": "^0.27.0"+ },+ "peerDependencies": {+ "react": "^19.2.8"+ }+ },+ "node_modules/read-cache": {+ "version": "1.0.2",+ "resolved": "https://registry.npmmirror.com/read-cache/-/read-cache-1.0.2.tgz",+ "integrity": "sha512-/peqiBB/n07gQGLsWaHho3WfvUyRscw0gYTsEFMhrIe/nWLkYaf5SbKYjGYqtRV3aPwykJgF2VEMo1ac4bnsGA==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/readdirp": {+ "version": "3.6.0",+ "resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-3.6.0.tgz",+ "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "picomatch": "^2.2.1"+ },+ "engines": {+ "node": ">=8.10.0"+ }+ },+ "node_modules/resolve": {+ "version": "1.22.12",+ "resolved": "https://registry.npmmirror.com/resolve/-/resolve-1.22.12.tgz",+ "integrity": "sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "es-errors": "^1.3.0",+ "is-core-module": "^2.16.1",+ "path-parse": "^1.0.7",+ "supports-preserve-symlinks-flag": "^1.0.0"+ },+ "bin": {+ "resolve": "bin/resolve"+ },+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/reusify": {+ "version": "1.1.0",+ "resolved": "https://registry.npmmirror.com/reusify/-/reusify-1.1.0.tgz",+ "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "iojs": ">=1.0.0",+ "node": ">=0.10.0"+ }+ },+ "node_modules/rollup": {+ "version": "4.63.1",+ "resolved": "https://registry.npmmirror.com/rollup/-/rollup-4.63.1.tgz",+ "integrity": "sha512-3Df9jsstwhccuEfmAMi9l8XUh/GOkVObmFTU7CCVBysEbcOZLl84jCtaAZMcPiMz2EGKsATzQcU+Xr3n/wU6cg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@types/estree": "1.0.9"+ },+ "bin": {+ "rollup": "dist/bin/rollup"+ },+ "engines": {+ "node": ">=18.0.0",+ "npm": ">=8.0.0"+ },+ "optionalDependencies": {+ "@napi-rs/lzma-linux-x64-gnu": "1.5.1",+ "@rollup/rollup-android-arm-eabi": "4.63.1",+ "@rollup/rollup-android-arm64": "4.63.1",+ "@rollup/rollup-darwin-arm64": "4.63.1",+ "@rollup/rollup-darwin-x64": "4.63.1",+ "@rollup/rollup-freebsd-arm64": "4.63.1",+ "@rollup/rollup-freebsd-x64": "4.63.1",+ "@rollup/rollup-linux-arm-gnueabihf": "4.63.1",+ "@rollup/rollup-linux-arm-musleabihf": "4.63.1",+ "@rollup/rollup-linux-arm64-gnu": "4.63.1",+ "@rollup/rollup-linux-arm64-musl": "4.63.1",+ "@rollup/rollup-linux-loong64-gnu": "4.63.1",+ "@rollup/rollup-linux-loong64-musl": "4.63.1",+ "@rollup/rollup-linux-ppc64-gnu": "4.63.1",+ "@rollup/rollup-linux-ppc64-musl": "4.63.1",+ "@rollup/rollup-linux-riscv64-gnu": "4.63.1",+ "@rollup/rollup-linux-riscv64-musl": "4.63.1",+ "@rollup/rollup-linux-s390x-gnu": "4.63.1",+ "@rollup/rollup-linux-x64-gnu": "4.63.1",+ "@rollup/rollup-linux-x64-musl": "4.63.1",+ "@rollup/rollup-openbsd-x64": "4.63.1",+ "@rollup/rollup-openharmony-arm64": "4.63.1",+ "@rollup/rollup-win32-arm64-msvc": "4.63.1",+ "@rollup/rollup-win32-ia32-msvc": "4.63.1",+ "@rollup/rollup-win32-x64-gnu": "4.63.1",+ "@rollup/rollup-win32-x64-msvc": "4.63.1",+ "fsevents": "~2.3.2"+ }+ },+ "node_modules/run-parallel": {+ "version": "1.2.0",+ "resolved": "https://registry.npmmirror.com/run-parallel/-/run-parallel-1.2.0.tgz",+ "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",+ "dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/feross"+ },+ {+ "type": "patreon",+ "url": "https://www.patreon.com/feross"+ },+ {+ "type": "consulting",+ "url": "https://feross.org/support"+ }+ ],+ "license": "MIT",+ "dependencies": {+ "queue-microtask": "^1.2.2"+ }+ },+ "node_modules/scheduler": {+ "version": "0.27.0",+ "resolved": "https://registry.npmmirror.com/scheduler/-/scheduler-0.27.0.tgz",+ "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==",+ "license": "MIT"+ },+ "node_modules/semver": {+ "version": "7.8.5",+ "resolved": "https://registry.npmmirror.com/semver/-/semver-7.8.5.tgz",+ "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==",+ "license": "ISC",+ "optional": true,+ "bin": {+ "semver": "bin/semver.js"+ },+ "engines": {+ "node": ">=10"+ }+ },+ "node_modules/sharp": {+ "version": "0.35.4",+ "resolved": "https://registry.npmmirror.com/sharp/-/sharp-0.35.4.tgz",+ "integrity": "sha512-n++8XWcj+jCOr2IOl7h8LbKnGBDY4aPbmprMONBNFdn0ImXqpGVv5zliDs0V9HbmbCQLpbuo2ej9rAoOQTvMDA==",+ "license": "Apache-2.0",+ "optional": true,+ "dependencies": {+ "@img/colour": "^1.1.0",+ "detect-libc": "^2.1.2",+ "semver": "^7.8.5"+ },+ "engines": {+ "node": ">=20.9.0"+ },+ "funding": {+ "url": "https://opencollective.com/libvips"+ },+ "optionalDependencies": {+ "@img/sharp-darwin-arm64": "0.35.4",+ "@img/sharp-darwin-x64": "0.35.4",+ "@img/sharp-freebsd-wasm32": "0.35.4",+ "@img/sharp-libvips-darwin-arm64": "1.3.3",+ "@img/sharp-libvips-darwin-x64": "1.3.3",+ "@img/sharp-libvips-linux-arm": "1.3.3",+ "@img/sharp-libvips-linux-arm64": "1.3.3",+ "@img/sharp-libvips-linux-ppc64": "1.3.3",+ "@img/sharp-libvips-linux-riscv64": "1.3.3",+ "@img/sharp-libvips-linux-s390x": "1.3.3",+ "@img/sharp-libvips-linux-x64": "1.3.3",+ "@img/sharp-libvips-linuxmusl-arm64": "1.3.3",+ "@img/sharp-libvips-linuxmusl-x64": "1.3.3",+ "@img/sharp-linux-arm": "0.35.4",+ "@img/sharp-linux-arm64": "0.35.4",+ "@img/sharp-linux-ppc64": "0.35.4",+ "@img/sharp-linux-riscv64": "0.35.4",+ "@img/sharp-linux-s390x": "0.35.4",+ "@img/sharp-linux-x64": "0.35.4",+ "@img/sharp-linuxmusl-arm64": "0.35.4",+ "@img/sharp-linuxmusl-x64": "0.35.4",+ "@img/sharp-webcontainers-wasm32": "0.35.4",+ "@img/sharp-win32-arm64": "0.35.4",+ "@img/sharp-win32-ia32": "0.35.4",+ "@img/sharp-win32-x64": "0.35.4"+ },+ "peerDependenciesMeta": {+ "@types/node": {+ "optional": true+ }+ }+ },+ "node_modules/siginfo": {+ "version": "2.0.0",+ "resolved": "https://registry.npmmirror.com/siginfo/-/siginfo-2.0.0.tgz",+ "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/source-map-js": {+ "version": "1.2.1",+ "resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.1.tgz",+ "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",+ "license": "BSD-3-Clause",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/stackback": {+ "version": "0.0.2",+ "resolved": "https://registry.npmmirror.com/stackback/-/stackback-0.0.2.tgz",+ "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/std-env": {+ "version": "3.10.0",+ "resolved": "https://registry.npmmirror.com/std-env/-/std-env-3.10.0.tgz",+ "integrity": "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/styled-jsx": {+ "version": "5.1.6",+ "resolved": "https://registry.npmmirror.com/styled-jsx/-/styled-jsx-5.1.6.tgz",+ "integrity": "sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA==",+ "license": "MIT",+ "dependencies": {+ "client-only": "0.0.1"+ },+ "engines": {+ "node": ">= 12.0.0"+ },+ "peerDependencies": {+ "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0 || ^19.0.0-0"+ },+ "peerDependenciesMeta": {+ "@babel/core": {+ "optional": true+ },+ "babel-plugin-macros": {+ "optional": true+ }+ }+ },+ "node_modules/sucrase": {+ "version": "3.35.1",+ "resolved": "https://registry.npmmirror.com/sucrase/-/sucrase-3.35.1.tgz",+ "integrity": "sha512-DhuTmvZWux4H1UOnWMB3sk0sbaCVOoQZjv8u1rDoTV0HTdGem9hkAZtl4JZy8P2z4Bg0nT+YMeOFyVr4zcG5Tw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@jridgewell/gen-mapping": "^0.3.2",+ "commander": "^4.0.0",+ "lines-and-columns": "^1.1.6",+ "mz": "^2.7.0",+ "pirates": "^4.0.1",+ "tinyglobby": "^0.2.11",+ "ts-interface-checker": "^0.1.9"+ },+ "bin": {+ "sucrase": "bin/sucrase",+ "sucrase-node": "bin/sucrase-node"+ },+ "engines": {+ "node": ">=16 || 14 >=14.17"+ }+ },+ "node_modules/supports-preserve-symlinks-flag": {+ "version": "1.0.0",+ "resolved": "https://registry.npmmirror.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",+ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 0.4"+ },+ "funding": {+ "url": "https://github.com/sponsors/ljharb"+ }+ },+ "node_modules/tailwindcss": {+ "version": "3.4.19",+ "resolved": "https://registry.npmmirror.com/tailwindcss/-/tailwindcss-3.4.19.tgz",+ "integrity": "sha512-3ofp+LL8E+pK/JuPLPggVAIaEuhvIz4qNcf3nA1Xn2o/7fb7s/TYpHhwGDv1ZU3PkBluUVaF8PyCHcm48cKLWQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@alloc/quick-lru": "^5.2.0",+ "arg": "^5.0.2",+ "chokidar": "^3.6.0",+ "didyoumean": "^1.2.2",+ "dlv": "^1.1.3",+ "fast-glob": "^3.3.2",+ "glob-parent": "^6.0.2",+ "is-glob": "^4.0.3",+ "jiti": "^1.21.7",+ "lilconfig": "^3.1.3",+ "micromatch": "^4.0.8",+ "normalize-path": "^3.0.0",+ "object-hash": "^3.0.0",+ "picocolors": "^1.1.1",+ "postcss": "^8.4.47",+ "postcss-import": "^15.1.0",+ "postcss-js": "^4.0.1",+ "postcss-load-config": "^4.0.2 || ^5.0 || ^6.0",+ "postcss-nested": "^6.2.0",+ "postcss-selector-parser": "^6.1.2",+ "resolve": "^1.22.8",+ "sucrase": "^3.35.0"+ },+ "bin": {+ "tailwind": "lib/cli.js",+ "tailwindcss": "lib/cli.js"+ },+ "engines": {+ "node": ">=14.0.0"+ }+ },+ "node_modules/thenify": {+ "version": "3.3.1",+ "resolved": "https://registry.npmmirror.com/thenify/-/thenify-3.3.1.tgz",+ "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "any-promise": "^1.0.0"+ }+ },+ "node_modules/thenify-all": {+ "version": "1.6.0",+ "resolved": "https://registry.npmmirror.com/thenify-all/-/thenify-all-1.6.0.tgz",+ "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "thenify": ">= 3.1.0 < 4"+ },+ "engines": {+ "node": ">=0.8"+ }+ },+ "node_modules/tinybench": {+ "version": "2.9.0",+ "resolved": "https://registry.npmmirror.com/tinybench/-/tinybench-2.9.0.tgz",+ "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/tinyexec": {+ "version": "0.3.2",+ "resolved": "https://registry.npmmirror.com/tinyexec/-/tinyexec-0.3.2.tgz",+ "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/tinyglobby": {+ "version": "0.2.17",+ "resolved": "https://registry.npmmirror.com/tinyglobby/-/tinyglobby-0.2.17.tgz",+ "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "fdir": "^6.5.0",+ "picomatch": "^4.0.4"+ },+ "engines": {+ "node": ">=12.0.0"+ },+ "funding": {+ "url": "https://github.com/sponsors/SuperchupuDev"+ }+ },+ "node_modules/tinyglobby/node_modules/fdir": {+ "version": "6.5.0",+ "resolved": "https://registry.npmmirror.com/fdir/-/fdir-6.5.0.tgz",+ "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=12.0.0"+ },+ "peerDependencies": {+ "picomatch": "^3 || ^4"+ },+ "peerDependenciesMeta": {+ "picomatch": {+ "optional": true+ }+ }+ },+ "node_modules/tinyglobby/node_modules/picomatch": {+ "version": "4.0.7",+ "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-4.0.7.tgz",+ "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/jonschlinkert"+ }+ },+ "node_modules/tinypool": {+ "version": "1.1.1",+ "resolved": "https://registry.npmmirror.com/tinypool/-/tinypool-1.1.1.tgz",+ "integrity": "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": "^18.0.0 || >=20.0.0"+ }+ },+ "node_modules/tinyrainbow": {+ "version": "1.2.0",+ "resolved": "https://registry.npmmirror.com/tinyrainbow/-/tinyrainbow-1.2.0.tgz",+ "integrity": "sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=14.0.0"+ }+ },+ "node_modules/tinyspy": {+ "version": "3.0.2",+ "resolved": "https://registry.npmmirror.com/tinyspy/-/tinyspy-3.0.2.tgz",+ "integrity": "sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=14.0.0"+ }+ },+ "node_modules/to-regex-range": {+ "version": "5.0.1",+ "resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz",+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "is-number": "^7.0.0"+ },+ "engines": {+ "node": ">=8.0"+ }+ },+ "node_modules/ts-interface-checker": {+ "version": "0.1.13",+ "resolved": "https://registry.npmmirror.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz",+ "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==",+ "dev": true,+ "license": "Apache-2.0"+ },+ "node_modules/tslib": {+ "version": "2.8.1",+ "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.8.1.tgz",+ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",+ "license": "0BSD"+ },+ "node_modules/typescript": {+ "version": "5.9.3",+ "resolved": "https://registry.npmmirror.com/typescript/-/typescript-5.9.3.tgz",+ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",+ "dev": true,+ "license": "Apache-2.0",+ "bin": {+ "tsc": "bin/tsc",+ "tsserver": "bin/tsserver"+ },+ "engines": {+ "node": ">=14.17"+ }+ },+ "node_modules/undici-types": {+ "version": "6.21.0",+ "resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-6.21.0.tgz",+ "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/update-browserslist-db": {+ "version": "1.3.2",+ "resolved": "https://registry.npmmirror.com/update-browserslist-db/-/update-browserslist-db-1.3.2.tgz",+ "integrity": "sha512-UQ+MSxlhRm1bzjhU+DcuXfjFO1FzNtqhK5+9Yvlp90ItDLk5vT932A0rFu619nf7RVS+Y/VeaUW1jaRDqZ8VJw==",+ "dev": true,+ "funding": [+ {+ "type": "opencollective",+ "url": "https://opencollective.com/browserslist"+ },+ {+ "type": "tidelift",+ "url": "https://tidelift.com/funding/github/npm/browserslist"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "MIT",+ "dependencies": {+ "escalade": "^3.2.0",+ "picocolors": "^1.1.1"+ },+ "bin": {+ "update-browserslist-db": "cli.js"+ },+ "peerDependencies": {+ "browserslist": ">= 4.21.0"+ }+ },+ "node_modules/util-deprecate": {+ "version": "1.0.2",+ "resolved": "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz",+ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/vite": {+ "version": "5.4.21",+ "resolved": "https://registry.npmmirror.com/vite/-/vite-5.4.21.tgz",+ "integrity": "sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "esbuild": "^0.21.3",+ "postcss": "^8.4.43",+ "rollup": "^4.20.0"+ },+ "bin": {+ "vite": "bin/vite.js"+ },+ "engines": {+ "node": "^18.0.0 || >=20.0.0"+ },+ "funding": {+ "url": "https://github.com/vitejs/vite?sponsor=1"+ },+ "optionalDependencies": {+ "fsevents": "~2.3.3"+ },+ "peerDependencies": {+ "@types/node": "^18.0.0 || >=20.0.0",+ "less": "*",+ "lightningcss": "^1.21.0",+ "sass": "*",+ "sass-embedded": "*",+ "stylus": "*",+ "sugarss": "*",+ "terser": "^5.4.0"+ },+ "peerDependenciesMeta": {+ "@types/node": {+ "optional": true+ },+ "less": {+ "optional": true+ },+ "lightningcss": {+ "optional": true+ },+ "sass": {+ "optional": true+ },+ "sass-embedded": {+ "optional": true+ },+ "stylus": {+ "optional": true+ },+ "sugarss": {+ "optional": true+ },+ "terser": {+ "optional": true+ }+ }+ },+ "node_modules/vite-node": {+ "version": "2.1.9",+ "resolved": "https://registry.npmmirror.com/vite-node/-/vite-node-2.1.9.tgz",+ "integrity": "sha512-AM9aQ/IPrW/6ENLQg3AGY4K1N2TGZdR5e4gu/MmmR2xR3Ll1+dib+nook92g4TV3PXVyeyxdWwtaCAiUL0hMxA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "cac": "^6.7.14",+ "debug": "^4.3.7",+ "es-module-lexer": "^1.5.4",+ "pathe": "^1.1.2",+ "vite": "^5.0.0"+ },+ "bin": {+ "vite-node": "vite-node.mjs"+ },+ "engines": {+ "node": "^18.0.0 || >=20.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ }+ },+ "node_modules/vitest": {+ "version": "2.1.9",+ "resolved": "https://registry.npmmirror.com/vitest/-/vitest-2.1.9.tgz",+ "integrity": "sha512-MSmPM9REYqDGBI8439mA4mWhV5sKmDlBKWIYbA3lRb2PTHACE0mgKwA8yQ2xq9vxDTuk4iPrECBAEW2aoFXY0Q==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@vitest/expect": "2.1.9",+ "@vitest/mocker": "2.1.9",+ "@vitest/pretty-format": "^2.1.9",+ "@vitest/runner": "2.1.9",+ "@vitest/snapshot": "2.1.9",+ "@vitest/spy": "2.1.9",+ "@vitest/utils": "2.1.9",+ "chai": "^5.1.2",+ "debug": "^4.3.7",+ "expect-type": "^1.1.0",+ "magic-string": "^0.30.12",+ "pathe": "^1.1.2",+ "std-env": "^3.8.0",+ "tinybench": "^2.9.0",+ "tinyexec": "^0.3.1",+ "tinypool": "^1.0.1",+ "tinyrainbow": "^1.2.0",+ "vite": "^5.0.0",+ "vite-node": "2.1.9",+ "why-is-node-running": "^2.3.0"+ },+ "bin": {+ "vitest": "vitest.mjs"+ },+ "engines": {+ "node": "^18.0.0 || >=20.0.0"+ },+ "funding": {+ "url": "https://opencollective.com/vitest"+ },+ "peerDependencies": {+ "@edge-runtime/vm": "*",+ "@types/node": "^18.0.0 || >=20.0.0",+ "@vitest/browser": "2.1.9",+ "@vitest/ui": "2.1.9",+ "happy-dom": "*",+ "jsdom": "*"+ },+ "peerDependenciesMeta": {+ "@edge-runtime/vm": {+ "optional": true+ },+ "@types/node": {+ "optional": true+ },+ "@vitest/browser": {+ "optional": true+ },+ "@vitest/ui": {+ "optional": true+ },+ "happy-dom": {+ "optional": true+ },+ "jsdom": {+ "optional": true+ }+ }+ },+ "node_modules/why-is-node-running": {+ "version": "2.3.0",+ "resolved": "https://registry.npmmirror.com/why-is-node-running/-/why-is-node-running-2.3.0.tgz",+ "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "siginfo": "^2.0.0",+ "stackback": "0.0.2"+ },+ "bin": {+ "why-is-node-running": "cli.js"+ },+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/zustand": {+ "version": "5.0.15",+ "resolved": "https://registry.npmmirror.com/zustand/-/zustand-5.0.15.tgz",+ "integrity": "sha512-MpSEjRiBkA9crSYeOUH32rJC7SVqAbm0Fqcqge/bUi2PPoLcBWKOsG+C8mevmpr8TwXHBVkChbbJiyvkE+i/3A==",+ "license": "MIT",+ "engines": {+ "node": ">=12.20.0"+ },+ "peerDependencies": {+ "@types/react": ">=18.0.0",+ "immer": ">=9.0.6",+ "react": ">=18.0.0",+ "use-sync-external-store": ">=1.2.0"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "immer": {+ "optional": true+ },+ "react": {+ "optional": true+ },+ "use-sync-external-store": {+ "optional": true+ }+ }+ }+ }+}diff --git a/package.json b/package.jsonindex 60c8808..3bd5135 100644--- a/package.json+++ b/package.json@@ -1,23 +1,35 @@-{- "name": "libretv",- "type": "module",- "version": "1.1.0",- "private": true,- "description": "免费在线视频搜索与观看平台",- "author": "bestZwei",- "license": "Apache-2.0",- "scripts": {- "dev": "nodemon server.mjs",- "start": "node server.mjs"- },- "dependencies": {- "axios": "^1.9.0",- "cors": "^2.8.5",- "dotenv": "^16.5.0",- "express": "^5.1.0",- "node-fetch": "^3.3.2"- },- "devDependencies": {- "nodemon": "^3.1.10"- }-}+{+ "name": "libretv-next",+ "version": "2.0.0",+ "private": true,+ "description": "免费在线视频搜索与观看平台(Next.js 重构版)",+ "license": "Apache-2.0",+ "scripts": {+ "dev": "next dev -p 8080",+ "build": "next build",+ "start": "next start -p 8080",+ "typecheck": "tsc --noEmit",+ "test": "vitest run"+ },+ "dependencies": {+ "@tanstack/react-query": "^5.59.0",+ "artplayer": "^5.2.3",+ "dexie": "^4.0.8",+ "dexie-react-hooks": "^1.1.7",+ "hls.js": "^1.5.17",+ "next": "^15.1.0",+ "react": "^19.0.0",+ "react-dom": "^19.0.0",+ "zustand": "^5.0.2"+ },+ "devDependencies": {+ "@types/node": "^22.10.0",+ "@types/react": "^19.0.0",+ "@types/react-dom": "^19.0.0",+ "autoprefixer": "^10.4.20",+ "postcss": "^8.4.49",+ "tailwindcss": "^3.4.15",+ "typescript": "^5.7.2",+ "vitest": "^2.1.8"+ }+}diff --git a/player.html b/player.htmldeleted file mode 100644index affec47..0000000--- a/player.html+++ /dev/null@@ -1,283 +0,0 @@-<!DOCTYPE html>-<html lang="zh">-<head>- <meta charset="UTF-8">- <meta name="viewport" content="width=device-width, initial-scale=1.0">- <meta name="referrer" content="same-origin">- <title>LibreTV 播放器</title>-- <!-- Favicon -->- <link rel="icon" href="image/logo.png">- <link rel="apple-touch-icon" href="image/logo-black.png">- <link rel="manifest" href="manifest.json">-- <script src="libs/tailwindcss.min.js"></script>- <script src="js/version-check.js"></script>- <link rel="stylesheet" href="css/styles.css">- <link rel="stylesheet" href="css/player.css">-- <meta http-equiv="Cache-Control" content="no-store, must-revalidate">- <meta http-equiv="Pragma" content="no-cache">- <meta http-equiv="Expires" content="0">-</head>-<body>- <header class="player-header-fixed p-4 flex items-center border-b border-[#333] gap-2">- <div class="flex items-center min-w-0">- <button id="homeButton" type="button" class="flex items-center min-w-0 cursor-pointer home-button">- <svg class="w-8 h-8 mr-2 text-[#00ccff] logo-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"></path>- </svg>- <h1 class="text-xl font-bold gradient-text logo-text">LibreTV</h1>- </button>- </div>- <h2 id="videoTitle" class="text-xl font-semibold flex-1 text-center overflow-x-auto whitespace-nowrap truncate custom-title-scroll"></h2>- <a href="#" id="goBack" onclick="goBack(event)" class="px-4 py-2 bg-[#222] hover:bg-[#333] border border-[#333] rounded-lg transition-colors flex items-center min-w-0 home-btn">- <svg class="w-5 h-5 mr-1" viewBox="0 0 24 24" fill="#ffffff" xmlns="http://www.w3.org/2000/svg">- <path d="M5.25 11h15a1.5 1.5 0 1 1 0 3H5.25a1.5 1.5 0 0 1 0-3z"/>- <path d="M5.55 12 11.3 17.3a1.5 1.5 0 1 1-2.12 2.12L3 12l6.18-6.18a1.5 1.5 0 1 1 2.12 2.12L5.55 12z"/>- </svg>- <span class="home-btn-text">上一页</span>- </a>- </header>-- <!-- 密码验证弹窗 -->- <div id="passwordModal" class="fixed inset-0 bg-black/95 hidden items-center justify-center z-[65] transition-opacity duration-300">- <div class="bg-[#111] p-8 rounded-lg w-11/12 max-w-md border border-[#333] max-h-[90vh] flex flex-col">- <div class="flex justify-between items-center mb-6 flex-none">- <h2 class="text-2xl font-bold gradient-text">访问验证</h2>- </div>- <div class="mb-6">- <p class="text-gray-300 mb-4">请输入密码继续访问</p>- <form id="passwordForm" onsubmit="handlePasswordSubmit(); return false;">- <input type="text" name="username" id="username" autocomplete="username" style="display:none" tabindex="-1" aria-hidden="true">- <input type="password" id="passwordInput" class="w-full bg-[#111] border border-[#333] text-white px-4 py-3 rounded-lg focus:outline-none focus:border-white transition-colors" placeholder="密码..." autocomplete="new-password">- <button id="passwordSubmitBtn" type="submit" class="mt-4 w-full bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded">提交</button>- </form>- <p id="passwordError" class="text-red-500 mt-2 hidden">密码错误,请重试</p>- </div>- </div>- </div>-- <main class="container mx-auto px-4 py-4"> <!-- 视频播放区 -->- <div id="playerContainer" class="player-container mb-4">- <div class="relative">- <div id="player" class="player-placeholder">- <!-- Initial loading state before JavaScript loads -->- <div class="player-loading-overlay">- <div class="player-loading-spinner"></div>- <div class="player-loading-text" id="loading-title">正在加载视频...</div>- </div>- </div>- <div class="loading-container" id="player-loading" style="display: none;">- <div class="loading-spinner"></div>- <div>正在加载视频...</div>- </div>- <div class="error-container" id="error">- <div class="error-icon">⚠️</div>- <div id="error-message">视频加载失败</div>- <div class="error-message-sub">请尝试其他视频源或稍后重试</div>- </div>- </div>- </div>-- <!-- 源信息 -->- <div class="player-container flex justify-between py-2 px-4 mb-2 bg-gray-700" id="resourceInfoBarContainer">- <!-- 资源信息卡片、切换按钮、视频数将由JS动态渲染 -->- </div>-- <!-- 集数导航 -->- <div class="player-container">- <div class="flex justify-between items-center my-4">- <button onclick="playPreviousEpisode()" id="prevButton" class="px-4 py-2 bg-[#222] hover:bg-[#333] border border-[#333] rounded-lg transition-colors">- <svg class="w-5 h-5 inline-block" fill="none" stroke="currentColor" viewBox="0 0 24 24">- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"></path>- </svg>- 上一集- </button>- <span class="text-gray-400" id="episodeInfo">加载中...</span>- <button onclick="playNextEpisode()" id="nextButton" class="px-4 py-2 bg-[#222] hover:bg-[#333] border border-[#333] rounded-lg transition-colors">- 下一集- <svg class="w-5 h-5 inline-block" fill="none" stroke="currentColor" viewBox="0 0 24 24">- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path>- </svg>- </button>- </div>- </div>-- <!-- 添加自动播放开关和排序按钮 -->- <div class="player-container mb-2">- <div class="flex flex-wrap justify-end items-center gap-2">- <!-- 自动连播开关 - 分组到左边 -->- <div class="flex items-center gap-1 flex-shrink-0 mr-auto">- <span class="text-gray-400 text-sm whitespace-nowrap">自动连播</span>- <label class="switch">- <input type="checkbox" id="autoplayToggle">- <span class="slider"></span>- </label>- </div>-- <!-- 把各种功能按钮放在右侧 - 在小屏幕上各自占一行 -->- <div class="flex flex-wrap justify-end gap-2">- <!-- 倒序排列按钮 -->- <button onclick="toggleEpisodeOrder()" class="px-3 py-1 bg-[#222] hover:bg-[#333] border border-[#333] rounded-lg transition-colors flex items-center space-x-1 flex-shrink-0">- <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" id="orderIcon" viewBox="0 0 20 20" fill="currentColor">- <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm1-11a1 1 0 10-2 0v3.586L7.707 9.293a1 1 0 00-1.414 1.414l3 3a1 1 0 001.414 0l3-3a1 1 0 00-1.414-1.414L11 10.586V7z" clip-rule="evenodd" />- </svg>- <span id="orderText">倒序排列</span>- </button>-- <!-- 复制链接按钮 -->- <button title="复制播放链接" onclick="copyLinks()" class="px-2 py-1 bg-[#222] hover:bg-[#333] border border-[#333] text-white rounded-lg transition">- <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 012-2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3" />- </svg>- </button>-- <!-- 锁定控制按钮 - 始终显示在最右侧 -->- <button id="lockToggle" onclick="toggleControlsLock()" title="锁定控制"- class="px-2 py-1 bg-[#222] hover:bg-[#333] border border-[#333] text-white rounded-lg transition flex-shrink-0">- <svg id="lockIcon" class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">- <!-- 默认状态:未锁图标 -->- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"- d="M15 11V7a3 3 0 00-6 0v4m-3 4h12v6H6v-6z" />- </svg>- </button>- </div>- </div>- </div>-- <!-- 集数网格 -->- <div class="player-container">- <div class="episode-grid" id="episodesGrid">- <div class="grid grid-cols-2 sm:grid-cols-4 md:grid-cols-6 lg:grid-cols-8 gap-2" id="episodesList">- <!-- 集数将在这里动态加载 -->- <div class="col-span-full text-center text-gray-400 py-8">加载中...</div>- </div>- </div>- </div>- </main>-- <!-- 添加快捷键提示元素 -->- <div class="shortcut-hint" id="shortcutHint">- <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" id="shortcutIcon">- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7"></path>- </svg>- <span id="shortcutText"></span>- </div>-- <!-- 页脚区域 -->- <footer class="footer mt-2 py-6 border-t border-[#333] bg-[#0a0a0a]">- <div class="container mx-auto px-4">- <div class="flex flex-col md:flex-row justify-between items-center">- <div class="mb-4 md:mb-0">- <div class="flex items-center justify-center md:justify-start">- <svg class="w-6 h-6 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"></path>- </svg>- <span class="gradient-text font-bold">LibreTV</span>- </div>- <p class="text-gray-500 text-sm mt-2 text-center md:text-left">© 2025 LibreTV - 自由观影,畅享精彩</p>- </div>-- <div class="text-center md:text-right">- <p class="text-gray-500 text-sm max-w-md">- 免责声明:本站仅为视频搜索工具,不存储、上传或分发任何视频内容。- 所有视频均来自第三方API接口。如有侵权,请联系相关内容提供方。- </p>- <div class="mt-2 flex justify-center md:justify-end space-x-4">- <a href="about.html" class="text-gray-400 hover:text-white text-sm transition-colors">关于我们</a>- <a href="about.html" class="text-gray-400 hover:text-white text-sm transition-colors">隐私政策</a>- <a href="https://www.msf.hk/zh-hant/donate/general?type=one-off" target="_blank" rel="noopener" class="text-blue-400 hover:text-blue-300 text-sm transition-colors">捐赠</a>- </div>- </div>- </div>- </div>- </footer>-- <!-- 换源模态框 -->- <div id="modal" class="fixed inset-0 bg-black/60 hidden flex items-center justify-center transition-opacity duration-300 z-[10000]">- <div class="bg-[#111] p-8 rounded-lg w-11/12 max-w-4xl border border-[#333] max-h-[90vh] flex flex-col">- <div class="flex justify-between items-center mb-6 flex-none">- <h2 id="modalTitle" class="text-2xl font-bold gradient-text break-words pr-4 max-w-[80%]"></h2>- <button onclick="closeModal()" class="text-gray-400 hover:text-white text-2xl transition-colors flex-shrink-0">×</button>- </div>- <div id="modalContent" class="overflow-auto flex-1 min-h-0">- <div class="grid grid-cols-2 sm:grid-cols-4 md:grid-cols-6 lg:grid-cols-8 gap-2">- </div>- </div>- </div>- </div>-- <!-- 添加 loading 提示框 -->- <div id="loading" class="fixed inset-0 bg-black/80 hidden items-center justify-center z-[10001]">- <div class="bg-[#111] p-8 rounded-lg border border-[#333] flex items-center space-x-4">- <div class="w-8 h-8 border-4 border-white border-t-transparent rounded-full animate-spin"></div>- <p class="text-white text-lg">加载中...</p>- </div>- </div>-- <!-- 引入纯 JS sha256(HTTP 下依然可用) -->- <script src="libs/sha256.min.js"></script>- <script>- // 保存原始 js‑sha256 实现,避免被 password.js 覆盖- window._jsSha256 = window.sha256;- </script>-- <script src="libs/hls.min.js" crossorigin="anonymous"></script>- <script src="libs/artplayer.min.js" crossorigin="anonymous"></script>-- <script src="js/config.js"></script>- <script src="js/proxy-auth.js"></script>- <script src="js/customer_site.js"></script>- <script src="js/password.js"></script>- <script src="js/ui.js"></script>- <script src="js/api.js"></script>- <script src="js/search.js"></script>- <script src="js/player.js"></script>-- <script>- // 创建全局环境变量对象- window.__ENV__ = window.__ENV__ || {};-- // 注入服务器端环境变量 (将由服务器端替换)- // PASSWORD 变量将在这里被服务器端注入- window.__ENV__.PASSWORD = "{{PASSWORD}}";- window.__ENV__.PROXY_TOKEN_MODE = "{{PROXY_TOKEN_MODE}}";-- // 修复 home 跳转- document.addEventListener('DOMContentLoaded', function() {- // 使用事件委托处理首页按钮点击- document.body.addEventListener('click', function(event) {- const homeButton = event.target.closest('#homeButton');- if (homeButton) {- event.preventDefault();- event.stopPropagation();-- // 如果是在iframe中打开的,尝试关闭iframe- if (window.self !== window.top) {- try {- // 尝试调用父窗口的关闭播放器函数- window.parent.closeVideoPlayer && window.parent.closeVideoPlayer(true);- return;- } catch (e) {- console.error('调用父窗口closeVideoPlayer失败:', e);- }- }-- // 多重兜底跳转- try {- window.location.href = '/';- } catch (e) {- try {- window.location.replace('/');- } catch (e2) {- window.location.assign('/');- }- }- return false;- }- });- });- </script>-</body>-</html>diff --git a/libretv-next/postcss.config.mjs b/postcss.config.mjssimilarity index 100%rename from libretv-next/postcss.config.mjsrename to postcss.config.mjsdiff --git a/libretv-next/public/favicon.svg b/public/favicon.svgsimilarity index 100%rename from libretv-next/public/favicon.svgrename to public/favicon.svgdiff --git a/libretv-next/public/robots.txt b/public/robots.txtsimilarity index 100%rename from libretv-next/public/robots.txtrename to public/robots.txtdiff --git a/robots.txt b/robots.txtdeleted file mode 100644index 77470cb..0000000--- a/robots.txt+++ /dev/null@@ -1,2 +0,0 @@-User-agent: *-Disallow: /\ No newline at end of filediff --git a/server.err b/server.errdeleted file mode 100644index e69de29..0000000diff --git a/server.log b/server.lognew file mode 100644index 0000000..502afbe--- /dev/null+++ b/server.log@@ -0,0 +1,13 @@+ ▲ Next.js 15.5.25+ - Local: http://localhost:8081+ - Network: http://192.168.2.115:8081++ ✓ Starting...+ ⚠ Warning: Next.js inferred your workspace root, but it may not be correct.+ We detected multiple lockfiles and selected the directory of F:\git\bestzwei\LibreTV-Project\LibreTV\package-lock.json as the root directory.+ To silence this warning, set `outputFileTracingRoot` in your Next.js config, or consider removing one of the lockfiles if it's not needed.+ See https://nextjs.org/docs/app/api-reference/config/next-config-js/output#caveats for more information.+ Detected additional lockfiles:+ * F:\git\bestzwei\LibreTV-Project\LibreTV\libretv-next\package-lock.json++ ✓ Ready in 668msdiff --git a/server.mjs b/server.mjsdeleted file mode 100644index 087188d..0000000--- a/server.mjs+++ /dev/null@@ -1,394 +0,0 @@-import path from 'path';-import express from 'express';-import axios from 'axios';-import cors from 'cors';-import { fileURLToPath } from 'url';-import fs from 'fs';-import crypto from 'crypto';-import dotenv from 'dotenv';-import dns from 'node:dns';--dotenv.config();--const __filename = fileURLToPath(import.meta.url);-const __dirname = path.dirname(__filename);--const config = {- port: process.env.PORT || 8080,- password: process.env.PASSWORD || '',- corsOrigin: process.env.CORS_ORIGIN || '*',- timeout: parseInt(process.env.REQUEST_TIMEOUT || '5000'),- maxRetries: parseInt(process.env.MAX_RETRIES || '2'),- cacheMaxAge: process.env.CACHE_MAX_AGE || '1d',- userAgent: process.env.USER_AGENT || 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36',- debug: process.env.DEBUG === 'true'-};--const log = (...args) => {- if (config.debug) {- console.log('[DEBUG]', ...args);- }-};--const app = express();--app.use(cors({- origin: config.corsOrigin,- methods: ['GET', 'POST'],- allowedHeaders: ['Content-Type', 'Authorization']-}));--app.use((req, res, next) => {- res.setHeader('X-Content-Type-Options', 'nosniff');- res.setHeader('X-Frame-Options', 'SAMEORIGIN');- res.setHeader('X-XSS-Protection', '1; mode=block');- next();-});--function sha256Hash(input) {- return new Promise((resolve) => {- const hash = crypto.createHash('sha256');- hash.update(input);- resolve(hash.digest('hex'));- });-}--async function renderPage(filePath, password) {- let content = fs.readFileSync(filePath, 'utf8');- if (password !== '') {- const sha256 = await sha256Hash(password);- content = content.replace('{{PASSWORD}}', sha256);- } else {- content = content.replace('{{PASSWORD}}', '');- }- // 注入代理鉴权模式:配置了 PROXY_SECRET 即启用服务端签发的短时效 token(前端不再持有可伪造的静态哈希)- const tokenMode = process.env.PROXY_SECRET ? '1' : '';- content = content.replace('{{PROXY_TOKEN_MODE}}', tokenMode);- return content;-}--app.get(['/', '/index.html', '/player.html'], async (req, res) => {- try {- let filePath;- switch (req.path) {- case '/player.html':- filePath = path.join(__dirname, 'player.html');- break;- default: // '/' 和 '/index.html'- filePath = path.join(__dirname, 'index.html');- break;- }-- const content = await renderPage(filePath, config.password);- res.send(content);- } catch (error) {- console.error('页面渲染错误:', error);- res.status(500).send('读取静态页面失败');- }-});--app.get('/s=:keyword', async (req, res) => {- try {- const filePath = path.join(__dirname, 'index.html');- const content = await renderPage(filePath, config.password);- res.send(content);- } catch (error) {- console.error('搜索页面渲染错误:', error);- res.status(500).send('读取静态页面失败');- }-});--function isPrivateIP(ip) {- // 拒绝私有/回环/链路本地/保留地址,防止 SSRF- if (/^(127\.|0\.0\.0\.0$|::1$|fe80:|fc|fd)/i.test(ip)) return true;- if (ip.startsWith('10.')) return true;- if (ip.startsWith('192.168.')) return true;- if (/^172\.(1[6-9]|2\d|3[01])\./.test(ip)) return true;- if (ip.startsWith('169.254.')) return true; // 链路本地(含云元数据 169.254.169.254)- if (ip.startsWith('100.64.')) return true; // CGNAT- if (ip.startsWith('192.0.0.')) return true; // 协议分配块- return false;-}--function isValidUrl(urlString) {- try {- const parsed = new URL(urlString);- const allowedProtocols = ['http:', 'https:'];- if (!allowedProtocols.includes(parsed.protocol)) return false;-- // 从环境变量获取阻止的主机名列表- const blockedHostnames = (process.env.BLOCKED_HOSTS || 'localhost,127.0.0.1,0.0.0.0,::1').split(',');- if (blockedHostnames.includes(parsed.hostname)) return false;-- // 从环境变量获取阻止的 IP 前缀(保留原逻辑,作为字面量 IP 的快速拦截)- const blockedPrefixes = (process.env.BLOCKED_IP_PREFIXES || '192.168.,10.,172.').split(',');- for (const prefix of blockedPrefixes) {- if (parsed.hostname.startsWith(prefix)) return false;- }-- // 字面量 IP 直接判定- const host = parsed.hostname;- if (/^\d{1,3}(\.\d{1,3}){3}$/.test(host) || host.includes(':')) {- if (isPrivateIP(host)) return false;- }- return true;- } catch {- return false;- }-}--// 通过 DNS 解析目标主机名,拒绝解析到内网/保留地址的域名(SSRF 深度防护)-async function isBlockedByDNS(urlString) {- try {- const { hostname } = new URL(urlString);- if (/^\d{1,3}(\.\d{1,3}){3}$/.test(hostname) || hostname.includes(':')) {- return isPrivateIP(hostname);- }- const result = await dns.lookup(hostname, { all: true });- return result.some(r => isPrivateIP(r.address));- } catch {- return false; // 解析失败不阻断,交给后续请求处理- }-}--// 将 m3u8 中的绝对地址改写为经过本代理的地址(分片/key/map 同样改写),便于跨域播放-function makeAbsolute(url, base) {- try {- return new URL(url, base).href;- } catch {- return url;- }-}--function rewriteM3u8(content, baseUrl, depth = 0) {- if (depth > 5) return content;- const lines = content.split('\n');- const out = lines.map(line => {- // #EXT-X-KEY / #EXT-X-MAP 内的 URI="..."- if (line.startsWith('#EXT-X-KEY') || line.startsWith('#EXT-X-MAP')) {- return line.replace(/(URI=")([^"]+)(")/g, (m, p1, uri, p2) => {- if (uri.startsWith('/proxy/')) return m;- return p1 + '/proxy/' + encodeURIComponent(makeAbsolute(uri, baseUrl)) + p2;- });- }- if (line.startsWith('#') || line.trim() === '') return line;- if (line.startsWith('/proxy/')) return line;- return '/proxy/' + encodeURIComponent(makeAbsolute(line, baseUrl));- });- return out.join('\n');-}--// 代理鉴权密钥:优先使用服务端独享的 PROXY_SECRET;否则由访问密码派生(客户端仅持有 sha256(password),无法反推)-function getProxySecret() {- if (process.env.PROXY_SECRET) return process.env.PROXY_SECRET;- if (config.password) return crypto.createHash('sha256').update(config.password + ':libretv::proxy-salt').digest('hex');- return '';-}--// 签发/校验短时效 token:token = sha256(secret + ':' + t)-function signProxyToken(t) {- const secret = getProxySecret();- if (!secret) return '';- return crypto.createHash('sha256').update(secret + ':' + t).digest('hex');-}--function verifyProxyToken(token, t) {- if (!token || !t) return false;- const expected = signProxyToken(t);- const a = Buffer.from(token);- const b = Buffer.from(expected);- if (a.length !== b.length) return false;- if (!crypto.timingSafeEqual(a, b)) return false;- const now = Date.now();- const maxAge = 10 * 60 * 1000; // 10分钟- return Math.abs(now - parseInt(t, 10)) <= maxAge;-}--// 验证代理请求的鉴权-// 配置了 PROXY_SECRET 时:必须使用服务端签发的短时效 token,拒绝前端持有的静态哈希(修复可被伪造的鉴权)-// 未配置时:回退为静态哈希(兼容旧部署;该哈希暴露在页面中,安全性较弱)-function validateProxyAuth(req) {- const serverPassword = config.password;- if (!serverPassword) {- console.error('服务器未设置 PASSWORD 环境变量,代理访问被拒绝');- return false;- }- const token = req.query.token;- const t = req.query.t;- if (verifyProxyToken(token, t)) return true;-- if (!process.env.PROXY_SECRET) {- const authHash = req.query.auth;- const serverHash = crypto.createHash('sha256').update(serverPassword).digest('hex');- if (authHash && authHash === serverHash) {- if (t) {- const now = Date.now();- if (now - parseInt(t, 10) > 10 * 60 * 1000) return false;- }- return true;- }- }- return false;-}--app.get('/proxy/:encodedUrl', async (req, res) => {- try {- // 验证鉴权- if (!validateProxyAuth(req)) {- return res.status(401).json({- success: false,- error: '代理访问未授权:请先通过 /api/proxy-token 获取 token'- });- }-- const encodedUrl = req.params.encodedUrl;- const targetUrl = decodeURIComponent(encodedUrl);-- // 安全验证- if (!isValidUrl(targetUrl)) {- return res.status(400).send('无效的 URL');- }-- // SSRF 深度防护:解析域名后拦截内网/保留地址- if (await isBlockedByDNS(targetUrl)) {- return res.status(403).send('不允许访问私有/保留网络地址');- }-- log(`代理请求: ${targetUrl}`);-- // 添加请求超时和重试逻辑- const maxRetries = config.maxRetries;- let retries = 0;-- const makeRequest = async () => {- try {- // 针对豆瓣图片:强制豆瓣 Referer 以绕过 418 防盗链(对齐 LunaTV 的图片代理做法)- const reqHeaders = { 'User-Agent': config.userAgent };- try {- if (new URL(targetUrl).hostname.endsWith('doubanio.com')) {- reqHeaders['Referer'] = 'https://movie.douban.com/';- }- } catch (e) { /* 忽略非法 URL */ }- return await axios({- method: 'get',- url: targetUrl,- responseType: 'stream',- timeout: config.timeout,- headers: reqHeaders- });- } catch (error) {- if (retries < maxRetries) {- retries++;- log(`重试请求 (${retries}/${maxRetries}): ${targetUrl}`);- return makeRequest();- }- throw error;- }- };-- const response = await makeRequest();-- const contentType = response.headers['content-type'] || '';- const isM3u8 = contentType.includes('mpegurl') || contentType.includes('x-mpegurl') ||- targetUrl.toLowerCase().endsWith('.m3u8');-- // 转发响应头(过滤敏感头)- const headers = { ...response.headers };- const sensitiveHeaders = (- process.env.FILTERED_HEADERS ||- 'content-security-policy,cookie,set-cookie,x-frame-options,access-control-allow-origin'- ).split(',');- sensitiveHeaders.forEach(header => delete headers[header]);- // axios 已自动解压响应体(decompress:true),必须移除内容编码/长度相关头,- // 否则浏览器会按 Content-Encoding 二次解压,导致 JSON/文本乱码(如 "Unterminated string in JSON")- delete headers['content-encoding'];- delete headers['content-length'];- delete headers['transfer-encoding'];- res.set(headers);- res.set('Access-Control-Allow-Origin', '*');-- // m3u8 文本:重写内部绝对地址为 /proxy/...,使自托管后端行为一致(修复分片直连导致 CORS 失败)- if (isM3u8) {- const chunks = [];- for await (const chunk of response.data) chunks.push(chunk);- const text = Buffer.concat(chunks).toString('utf8');- res.set('Content-Type', 'application/vnd.apple.mpegurl');- res.send(rewriteM3u8(text, targetUrl));- return;- }-- // 其余(JSON / 分片 / key 等)直接透传- response.data.pipe(res);- } catch (error) {- console.error('代理请求错误:', error.message);- if (error.response) {- res.status(error.response.status || 500);- if (error.response.data && typeof error.response.data.pipe === 'function') {- error.response.data.pipe(res);- } else {- res.send(`请求失败: ${error.message}`);- }- } else {- res.status(500).send(`请求失败: ${error.message}`);- }- }-});--// 签发代理短时效 token:需提供访问密码(明文),校验通过后用服务端密钥签名-app.get('/api/proxy-token', (req, res) => {- const password = req.query.password || '';- const serverPassword = config.password;- if (!serverPassword) {- return res.status(401).json({ success: false, error: '服务器未设置 PASSWORD' });- }- const hash = crypto.createHash('sha256').update(password).digest('hex');- const serverHash = crypto.createHash('sha256').update(serverPassword).digest('hex');- if (hash !== serverHash) {- return res.status(401).json({ success: false, error: '密码错误' });- }- const t = Date.now();- const token = signProxyToken(t);- res.json({ success: true, token, t });-});--// 防止将服务端源码(server.mjs / 配置 / 函数目录等)当作静态文件暴露-app.use((req, res, next) => {- const p = req.path.split('?')[0];- if (/\/(server\.mjs|package\.json|package-lock\.json|Dockerfile|docker-compose\.yml|README\.md|LICENSE|node_modules|\.env|VERSION\.txt)/i.test(p)) {- return res.status(404).send('Not Found');- }- next();-});--app.use(express.static(path.join(__dirname), {- maxAge: config.cacheMaxAge,- setHeaders: (res, filePath) => {- // 前端脚本/样式/页面不缓存,改动后刷新即生效(避免旧 config.js 缓存导致设置不生效)- if (/\.(js|mjs|css|html)$/.test(filePath)) {- res.setHeader('Cache-Control', 'no-cache');- }- }-}));--app.use((err, req, res, next) => {- console.error('服务器错误:', err);- res.status(500).send('服务器内部错误');-});--app.use((req, res) => {- res.status(404).send('页面未找到');-});--// 启动服务器-app.listen(config.port, () => {- console.log(`服务器运行在 http://localhost:${config.port}`);- if (config.password !== '') {- console.log('用户登录密码已设置');- } else {- console.log('警告: 未设置 PASSWORD 环境变量,用户将被要求设置密码');- }- if (config.debug) {- console.log('调试模式已启用');- console.log('配置:', { ...config, password: config.password ? '******' : '' });- }-});diff --git a/server2.err b/server2.errdeleted file mode 100644index e69de29..0000000diff --git a/service-worker.js b/service-worker.jsdeleted file mode 100644index 440bbc2..0000000--- a/service-worker.js+++ /dev/null@@ -1,8 +0,0 @@-// 不使用缓存,直接通过网络获取资源-self.addEventListener('install', event => {- self.skipWaiting();-});--self.addEventListener('activate', event => {- event.waitUntil(self.clients.claim());-});diff --git a/libretv-next/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.json b/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.jsonsimilarity index 100%rename from libretv-next/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.jsonrename to src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.jsondiff --git a/libretv-next/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/06f49e3158547ee7b6e5ad074bcb5d474ecd3b8d7b1418c4ab1d89973e22c5ed.source b/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/06f49e3158547ee7b6e5ad074bcb5d474ecd3b8d7b1418c4ab1d89973e22c5ed.sourcesimilarity index 100%rename from libretv-next/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/06f49e3158547ee7b6e5ad074bcb5d474ecd3b8d7b1418c4ab1d89973e22c5ed.sourcerename to src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/06f49e3158547ee7b6e5ad074bcb5d474ecd3b8d7b1418c4ab1d89973e22c5ed.sourcediff --git a/libretv-next/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/2c2e07604ba8605b927025abca6058c51e6938561431132eb180f7b4f9b49252.source b/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/2c2e07604ba8605b927025abca6058c51e6938561431132eb180f7b4f9b49252.sourcesimilarity index 100%rename from libretv-next/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/2c2e07604ba8605b927025abca6058c51e6938561431132eb180f7b4f9b49252.sourcerename to src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/2c2e07604ba8605b927025abca6058c51e6938561431132eb180f7b4f9b49252.sourcediff --git a/libretv-next/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/3f66283da3f5e012a1a9d6276811bb4567dc296a737184ea09f42739b5970ddf.source b/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/3f66283da3f5e012a1a9d6276811bb4567dc296a737184ea09f42739b5970ddf.sourcesimilarity index 100%rename from libretv-next/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/3f66283da3f5e012a1a9d6276811bb4567dc296a737184ea09f42739b5970ddf.sourcerename to src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/3f66283da3f5e012a1a9d6276811bb4567dc296a737184ea09f42739b5970ddf.sourcediff --git a/libretv-next/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/4d11f641228247e8d951ce9207cdfb266a2b24ad259b7e448f835dbbb85fd409.source b/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/4d11f641228247e8d951ce9207cdfb266a2b24ad259b7e448f835dbbb85fd409.sourcesimilarity index 100%rename from libretv-next/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/4d11f641228247e8d951ce9207cdfb266a2b24ad259b7e448f835dbbb85fd409.sourcerename to src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/4d11f641228247e8d951ce9207cdfb266a2b24ad259b7e448f835dbbb85fd409.sourcediff --git a/libretv-next/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/56215c6f4e4447dc9e57a4b127ec12f1708efd0e3f6dae17a636041d99e29bab.source b/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/56215c6f4e4447dc9e57a4b127ec12f1708efd0e3f6dae17a636041d99e29bab.sourcesimilarity index 100%rename from libretv-next/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/56215c6f4e4447dc9e57a4b127ec12f1708efd0e3f6dae17a636041d99e29bab.sourcerename to src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/56215c6f4e4447dc9e57a4b127ec12f1708efd0e3f6dae17a636041d99e29bab.sourcediff --git a/libretv-next/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/6c3ef330762d14573273534ef2c143548a0a2735a3e816e55bf186167ec75d1f.source b/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/6c3ef330762d14573273534ef2c143548a0a2735a3e816e55bf186167ec75d1f.sourcesimilarity index 100%rename from libretv-next/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/6c3ef330762d14573273534ef2c143548a0a2735a3e816e55bf186167ec75d1f.sourcerename to src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/6c3ef330762d14573273534ef2c143548a0a2735a3e816e55bf186167ec75d1f.sourcediff --git a/libretv-next/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/6efdf509a785a0658b2e31a8c33d298de14321d9672179370e99cc76241c1eb0.source b/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/6efdf509a785a0658b2e31a8c33d298de14321d9672179370e99cc76241c1eb0.sourcesimilarity index 100%rename from libretv-next/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/6efdf509a785a0658b2e31a8c33d298de14321d9672179370e99cc76241c1eb0.sourcerename to src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/6efdf509a785a0658b2e31a8c33d298de14321d9672179370e99cc76241c1eb0.sourcediff --git a/libretv-next/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/91d91840c4d075907471114c7df24ba3d14f64a0347e7608d714ba0057d53f1c.source b/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/91d91840c4d075907471114c7df24ba3d14f64a0347e7608d714ba0057d53f1c.sourcesimilarity index 100%rename from libretv-next/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/91d91840c4d075907471114c7df24ba3d14f64a0347e7608d714ba0057d53f1c.sourcerename to src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/91d91840c4d075907471114c7df24ba3d14f64a0347e7608d714ba0057d53f1c.sourcediff --git a/libretv-next/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/b43fdff72d3f4851a308a7e25bfb25e5089cdff996639f04a08c39caae434cbd.source b/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/b43fdff72d3f4851a308a7e25bfb25e5089cdff996639f04a08c39caae434cbd.sourcesimilarity index 100%rename from libretv-next/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/b43fdff72d3f4851a308a7e25bfb25e5089cdff996639f04a08c39caae434cbd.sourcerename to src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/b43fdff72d3f4851a308a7e25bfb25e5089cdff996639f04a08c39caae434cbd.sourcediff --git a/libretv-next/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/c0edcbf68c2c69873fdf45e29857bc1b97ff875c49a34fb1ef82bcf9bfafdd6c.source b/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/c0edcbf68c2c69873fdf45e29857bc1b97ff875c49a34fb1ef82bcf9bfafdd6c.sourcesimilarity index 100%rename from libretv-next/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/c0edcbf68c2c69873fdf45e29857bc1b97ff875c49a34fb1ef82bcf9bfafdd6c.sourcerename to src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/c0edcbf68c2c69873fdf45e29857bc1b97ff875c49a34fb1ef82bcf9bfafdd6c.sourcediff --git a/libretv-next/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/cf7e29e4902dea0aa000da86f34225ba6d7a6d13c982343f255b15f827269199.source b/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/cf7e29e4902dea0aa000da86f34225ba6d7a6d13c982343f255b15f827269199.sourcesimilarity index 100%rename from libretv-next/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/cf7e29e4902dea0aa000da86f34225ba6d7a6d13c982343f255b15f827269199.sourcerename to src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/cf7e29e4902dea0aa000da86f34225ba6d7a6d13c982343f255b15f827269199.sourcediff --git a/libretv-next/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/d3cb66a01d282f3068e543d01cb615fb05fb9f322b80ca36b2aeece6d833da23.source b/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/d3cb66a01d282f3068e543d01cb615fb05fb9f322b80ca36b2aeece6d833da23.sourcesimilarity index 100%rename from libretv-next/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/d3cb66a01d282f3068e543d01cb615fb05fb9f322b80ca36b2aeece6d833da23.sourcerename to src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/d3cb66a01d282f3068e543d01cb615fb05fb9f322b80ca36b2aeece6d833da23.sourcediff --git a/libretv-next/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/e2bf0c29de09f20b0bcbf1781174fd635a68e6f9399827a6f2b9ea8ee734f34f.source b/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/e2bf0c29de09f20b0bcbf1781174fd635a68e6f9399827a6f2b9ea8ee734f34f.sourcesimilarity index 100%rename from libretv-next/src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/e2bf0c29de09f20b0bcbf1781174fd635a68e6f9399827a6f2b9ea8ee734f34f.sourcerename to src/.mimosa/hook-state/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0.mtiy5v8r-24984-7970f41ca4.baseline/e2bf0c29de09f20b0bcbf1781174fd635a68e6f9399827a6f2b9ea8ee734f34f.sourcediff --git a/libretv-next/src/.mimosa/hook-status/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0-aff7222d8e.json b/src/.mimosa/hook-status/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0-aff7222d8e.jsonsimilarity index 100%rename from libretv-next/src/.mimosa/hook-status/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0-aff7222d8e.jsonrename to src/.mimosa/hook-status/sess_f62c5a03-d4af-4158-a7cd-9931bdf90fd0-aff7222d8e.jsondiff --git a/libretv-next/src/app/about/page.tsx b/src/app/about/page.tsxsimilarity index 100%rename from libretv-next/src/app/about/page.tsxrename to src/app/about/page.tsxdiff --git a/libretv-next/src/app/api/auth/route.ts b/src/app/api/auth/route.tssimilarity index 100%rename from libretv-next/src/app/api/auth/route.tsrename to src/app/api/auth/route.tsdiff --git a/libretv-next/src/app/api/detail/route.ts b/src/app/api/detail/route.tssimilarity index 100%rename from libretv-next/src/app/api/detail/route.tsrename to src/app/api/detail/route.tsdiff --git a/libretv-next/src/app/api/douban/route.ts b/src/app/api/douban/route.tssimilarity index 100%rename from libretv-next/src/app/api/douban/route.tsrename to src/app/api/douban/route.tsdiff --git a/libretv-next/src/app/api/proxy/[url]/route.ts b/src/app/api/proxy/[url]/route.tssimilarity index 100%rename from libretv-next/src/app/api/proxy/[url]/route.tsrename to src/app/api/proxy/[url]/route.tsdiff --git a/libretv-next/src/app/api/search/route.ts b/src/app/api/search/route.tssimilarity index 100%rename from libretv-next/src/app/api/search/route.tsrename to src/app/api/search/route.tsdiff --git a/libretv-next/src/app/api/status/route.ts b/src/app/api/status/route.tssimilarity index 100%rename from libretv-next/src/app/api/status/route.tsrename to src/app/api/status/route.tsdiff --git a/libretv-next/src/app/globals.css b/src/app/globals.csssimilarity index 100%rename from libretv-next/src/app/globals.cssrename to src/app/globals.cssdiff --git a/libretv-next/src/app/layout.tsx b/src/app/layout.tsxsimilarity index 100%rename from libretv-next/src/app/layout.tsxrename to src/app/layout.tsxdiff --git a/libretv-next/src/app/manifest.ts b/src/app/manifest.tssimilarity index 100%rename from libretv-next/src/app/manifest.tsrename to src/app/manifest.tsdiff --git a/libretv-next/src/app/page.tsx b/src/app/page.tsxsimilarity index 100%rename from libretv-next/src/app/page.tsxrename to src/app/page.tsxdiff --git a/libretv-next/src/app/watch/page.tsx b/src/app/watch/page.tsxsimilarity index 100%rename from libretv-next/src/app/watch/page.tsxrename to src/app/watch/page.tsxdiff --git a/libretv-next/src/components/auth.tsx b/src/components/auth.tsxsimilarity index 100%rename from libretv-next/src/components/auth.tsxrename to src/components/auth.tsxdiff --git a/libretv-next/src/components/detail-modal.tsx b/src/components/detail-modal.tsxsimilarity index 100%rename from libretv-next/src/components/detail-modal.tsxrename to src/components/detail-modal.tsxdiff --git a/libretv-next/src/components/douban-section.tsx b/src/components/douban-section.tsxsimilarity index 100%rename from libretv-next/src/components/douban-section.tsxrename to src/components/douban-section.tsxdiff --git a/libretv-next/src/components/header.tsx b/src/components/header.tsxsimilarity index 100%rename from libretv-next/src/components/header.tsxrename to src/components/header.tsxdiff --git a/libretv-next/src/components/history-panel.tsx b/src/components/history-panel.tsxsimilarity index 100%rename from libretv-next/src/components/history-panel.tsxrename to src/components/history-panel.tsxdiff --git a/libretv-next/src/components/player-shell.tsx b/src/components/player-shell.tsxsimilarity index 100%rename from libretv-next/src/components/player-shell.tsxrename to src/components/player-shell.tsxdiff --git a/libretv-next/src/components/providers.tsx b/src/components/providers.tsxsimilarity index 100%rename from libretv-next/src/components/providers.tsxrename to src/components/providers.tsxdiff --git a/libretv-next/src/components/source-manager.tsx b/src/components/source-manager.tsxsimilarity index 100%rename from libretv-next/src/components/source-manager.tsxrename to src/components/source-manager.tsxdiff --git a/libretv-next/src/components/switch-source.tsx b/src/components/switch-source.tsxsimilarity index 100%rename from libretv-next/src/components/switch-source.tsxrename to src/components/switch-source.tsxdiff --git a/libretv-next/src/components/theme.tsx b/src/components/theme.tsxsimilarity index 100%rename from libretv-next/src/components/theme.tsxrename to src/components/theme.tsxdiff --git a/libretv-next/src/components/toast.tsx b/src/components/toast.tsxsimilarity index 100%rename from libretv-next/src/components/toast.tsxrename to src/components/toast.tsxdiff --git a/libretv-next/src/components/video-card.tsx b/src/components/video-card.tsxsimilarity index 100%rename from libretv-next/src/components/video-card.tsxrename to src/components/video-card.tsxdiff --git a/libretv-next/src/lib/api-guard.ts b/src/lib/api-guard.tssimilarity index 100%rename from libretv-next/src/lib/api-guard.tsrename to src/lib/api-guard.tsdiff --git a/libretv-next/src/lib/auth.ts b/src/lib/auth.tssimilarity index 100%rename from libretv-next/src/lib/auth.tsrename to src/lib/auth.tsdiff --git a/libretv-next/src/lib/client-api.ts b/src/lib/client-api.tssimilarity index 100%rename from libretv-next/src/lib/client-api.tsrename to src/lib/client-api.tsdiff --git a/libretv-next/src/lib/cms-parser.test.ts b/src/lib/cms-parser.test.tssimilarity index 100%rename from libretv-next/src/lib/cms-parser.test.tsrename to src/lib/cms-parser.test.tsdiff --git a/libretv-next/src/lib/cms-parser.ts b/src/lib/cms-parser.tssimilarity index 100%rename from libretv-next/src/lib/cms-parser.tsrename to src/lib/cms-parser.tsdiff --git a/libretv-next/src/lib/db.ts b/src/lib/db.tssimilarity index 100%rename from libretv-next/src/lib/db.tsrename to src/lib/db.tsdiff --git a/libretv-next/src/lib/douban.ts b/src/lib/douban.tssimilarity index 100%rename from libretv-next/src/lib/douban.tsrename to src/lib/douban.tsdiff --git a/libretv-next/src/lib/fetch-utils.ts b/src/lib/fetch-utils.tssimilarity index 100%rename from libretv-next/src/lib/fetch-utils.tsrename to src/lib/fetch-utils.tsdiff --git a/libretv-next/src/lib/m3u8.test.ts b/src/lib/m3u8.test.tssimilarity index 100%rename from libretv-next/src/lib/m3u8.test.tsrename to src/lib/m3u8.test.tsdiff --git a/libretv-next/src/lib/m3u8.ts b/src/lib/m3u8.tssimilarity index 100%rename from libretv-next/src/lib/m3u8.tsrename to src/lib/m3u8.tsdiff --git a/libretv-next/src/lib/ssrf.test.ts b/src/lib/ssrf.test.tssimilarity index 100%rename from libretv-next/src/lib/ssrf.test.tsrename to src/lib/ssrf.test.tsdiff --git a/libretv-next/src/lib/ssrf.ts b/src/lib/ssrf.tssimilarity index 100%rename from libretv-next/src/lib/ssrf.tsrename to src/lib/ssrf.tsdiff --git a/libretv-next/src/lib/store.ts b/src/lib/store.tssimilarity index 100%rename from libretv-next/src/lib/store.tsrename to src/lib/store.tsdiff --git a/libretv-next/src/lib/types.ts b/src/lib/types.tssimilarity index 100%rename from libretv-next/src/lib/types.tsrename to src/lib/types.tsdiff --git a/libretv-next/src/lib/utils.ts b/src/lib/utils.tssimilarity index 100%rename from libretv-next/src/lib/utils.tsrename to src/lib/utils.tsdiff --git a/libretv-next/tailwind.config.ts b/tailwind.config.tssimilarity index 100%rename from libretv-next/tailwind.config.tsrename to tailwind.config.tsdiff --git a/libretv-next/tsconfig.json b/tsconfig.jsonsimilarity index 100%rename from libretv-next/tsconfig.jsonrename to tsconfig.jsondiff --git a/libretv-next/vitest.config.ts b/vitest.config.tssimilarity index 100%rename from libretv-next/vitest.config.tsrename to vitest.config.tsdiff --git a/watch.html b/watch.htmldeleted file mode 100644index a9485d8..0000000--- a/watch.html+++ /dev/null@@ -1,26 +0,0 @@-<!DOCTYPE html>-<html lang="zh">-<head>- <meta charset="UTF-8">- <meta name="viewport" content="width=device-width, initial-scale=1.0">- <meta http-equiv="refresh" content="0; url=player.html">- <title>正在跳转到播放器...</title>- <link rel="manifest" href="manifest.json">- <link rel="stylesheet" href="css/watch.css">- <script src="js/watch.js"></script>-</head>-<body>- <div class="redirect-container">- <div class="logo-container">- <svg class="logo-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"></path>- </svg>- <h1 class="logo-text">LibreTV</h1>- </div>- <div class="loading-animation"></div>- <div class="redirect-message">正在加载播放器...</div>- <div id="redirect-status">准备视频数据中,请稍候...</div>- <p class="redirect-hint">如果页面没有自动跳转,请<a href="player.html" id="manual-redirect">点击这里</a></p>- </div>-</body>-</html>