Skip to content

armgit / peach

Public Imported from GitHub
0

Peach: Local-first video metadata scraper and media manager.

feat(downloads): 接入自配资源索引器并标注来源性质

longmeidao60393291a565
diff --git a/README.en.md b/README.en.md
index 6ff246ab9..59294e87d 100644
--- a/README.en.md
+++ b/README.en.md
@@ -66,6 +66,7 @@ Want to look around before installing? The [live demo](https://demo.peach.video)
- **New releases**: subscribe on a performer page or by name in follow management, including performers not yet in your library. Peach checks for new titles regularly. Follow creators across sites such as FANBOX, Patreon and Kemono; the same work on different sites appears as one card.
- **JAV intake**: mark a new-release card or followed post as wanted, or enter a video code. Work cards find and deduplicate links from JavDB's resource list and comments, showing attributes, size and date. Add magnets directly to 115 or PikPak, or copy other links. Files scanned into your library are marked as acquired; titles set aside can be searched again.
- **Cloud download**: paste a magnet link and hand it to 115 or PikPak for offline download; the finished file joins your library on its own. Video pages and followed items have the same entry.
+- **Find a release**: add your own Prowlarr or Jackett indexer under Media in local configuration, then search by release code in Activity's Cloud download section. Filter by size and prioritize resolution, Chinese subtitles, or uncensored editions; select a candidate and confirm submission.
- **Statistics**: which drive holds what, how much you have watched and which tags dominate, on one page.
- **Appearance**: light or dark, accent color and sidebar order are all yours to set.
- **Any screen**: works in the browser on desktop, tablet and phone.
diff --git a/README.md b/README.md
index 33952b796..616706f0f 100644
--- a/README.md
+++ b/README.md
@@ -66,6 +66,7 @@ https://github.com/user-attachments/assets/a5610874-e611-41bb-be22-7d99f0d64b62
- **追新作**:在女优页打开订阅,或在关注管理里按名字订阅,馆藏中尚未收录的女优也可订阅。Peach 会定期检查新作;创作者可跨 FANBOX、Patreon、Kemono 等站点关注,不同站点的同一作品合成一张卡。
- **JAV 入库**:在新作卡或关注内容上点「想要」,也可以直接输入番号。作品卡自动查找 JavDB 资源区与评论中的链接,合并重复资源,显示属性、大小和日期;磁链可以直接添加到 115 或 PikPak,其他链接可以复制。文件扫进馆藏后自动标为已入库,久找不到的老片可重新查找。
- **云下载**:贴一条磁力,交给 115 或 PikPak 离线下载,下载完自动入库;作品页和关注条目上也有入口。
+- **按番号找资源**:在本机配置页「媒体」里添加自己的 Prowlarr 或 Jackett 索引器,在活动页「云下载」按番号搜索。可按体积筛选,优先找高清、中字或无码;选中候选后确认提交。
- **统计**:片子存在哪块盘、看过多少、标签分布,一页看完。
- **外观**:深色浅色、主题色、侧栏顺序都能自己调。
- **多端**:电脑、平板、手机的浏览器都能用。
diff --git a/docs/PRODUCT_BACKLOG.md b/docs/PRODUCT_BACKLOG.md
index 96b9d6513..7377562cd 100644
--- a/docs/PRODUCT_BACKLOG.md
+++ b/docs/PRODUCT_BACKLOG.md
@@ -23,7 +23,7 @@
| --- | --- | --- |
| 开发流程 | 隔离工作树自动同步 Python 依赖,主检出只读核对;commit-msg 检查署名、已有 README 声明和分段 | `scripts/test_environment.py`、`scripts/test.ps1`、`scripts/test.sh`、`scripts/check_commit_message.py`、`scripts/githooks/` |
| 首次前端导入 | React 导入钩子各有 30 秒上限,普通用例沿用默认超时 | `frontend/test/islands.test.ts` |
-| 42、43、64 | 云下载与 JavDB 卡片资源查询已具备;本地下载器、Torznab/JavBus 与来源性质标注仍待接入 | `src/peach/downloads.py`、`src/peach/wants_magnets.py`、前端下载设置 |
+| 42、43、64 | 云下载、JavDB 卡片资源、自配 Torznab 搜索、体积和质量筛选及既有来源性质标注已具备;本地下载、JavBus、真实索引器验收与未来 App 通道仍待补 | `src/peach/resource_search.py`、`src/peach/wants_magnets.py`、活动页资源搜索与来源配置 |
| 21、26、46 | 已有数据库就绪检查;doctor、统一诊断页与周期挂载探测仍待实现 | `src/peach/health.py`、CLI 与路由登记 |
| 11、20 | CI 已有不检出源码的 wheel 消费冒烟;完整矩阵结果、minimal source 与 artifact-only 验收仍待补齐 | `.github/workflows/test.yml`、`scripts/smoke_wheel.py` |
| 14 | 自动检查与自动下载已实现,默认关闭,安装重启仍由用户确认;macOS 包、签名与局域网配对仍待做 | `src/peach/automatic_updates.py`、配置 API、`maintenance-settings.tsx`、对应后端与前端测试 |
@@ -141,6 +141,7 @@
42. **本地下载:走用户自己的 BT 客户端与直链**:BT 通过用户本机下载器的 Web API 提交,Peach 不实现 BT 协议:qBittorrent 用 `/api/v2/auth/login`、`torrents/add`(`urls`、`savepath`、`category`/`tags`)、`torrents/info?hashes=`、`torrents/delete`;Transmission 用 `torrent-add`、`torrent-get`、`torrent-remove`,首个请求回 409 后带 `X-Transmission-Session-Id` 重发。保存路径必须落在某个本地来源根之内,watchdog 才看得到。关注来源附件(FANBOX、Patreon、Gofile 等)的直链由 Peach 自己下载。写新文件、不碰已有文件;占本机流量与磁盘,复用 `jobs.py` 的计费来源与磁盘闸门,预算见「待执行的操作」第 12 条。长下载用第 57 条的续传与停滞看门狗。
- 复用云下载的任务表、状态机与九类失败分类(`src/peach/downloads.py`,ADR-0089),只有瞬时网络自动重试;qB `metaDL`/`stalledDL` 归「无源或停滞」,落地未见时定向触发 `ingest_path`。
43. **资源搜索与候选筛选**:Torznab 是协议不是平台,基于 Newznab 扩展(`https://torznab.github.io/spec-1.3-draft/`);Jackett、Prowlarr 是把它翻译成各站请求的代理,Sonarr/Radarr 是客户端。Peach 作客户端接用户自己配置的 Prowlarr/Jackett,不内置站点定义:先 `t=caps`,再 `t=search&q=<番号>&cat=6000`,解析 `item` 的 `title`、`size`、`pubDate` 与 `torznab:attr` 的 `seeders`、`peers`、`magneturl`、`infohash`;磁力可能在 `magneturl`、`link` 或 `guid` 任一处,按内容判断(SakuraMedia `src/service/transfers/downloads/clients/torznab.py`,FC2 番号只搜纯数字,部分索引器失败不算整体失败)。
+ - 自配 Torznab、凭据本机保存、候选筛选与最多五条结果、活动页填入云下载表单已实现。真实索引器验收、作品页来源与「寻找更好版本」目标自动带入仍待补齐;当前由用户选择搜索目标并逐条确认提交。
- Jackett 与 Prowlarr 都内置 `sukebeinyaasi`、`onejav`、`freejavtorrent`(公开)与 `clearjav-api`(私有,只收官方片商作品)的定义。sukebei 没有清晰度分类,Jackett 把它整站映射成 6000,4K 只能在 `q` 里加关键词,再从标题解析;索引器名单里没有专收 4K 的公开源。
- 作品页资源还需接 JavBus:从详情页脚本取 `gid`、`uc` 后请求 `ajax/uncledatoolsbyajax.php`(带 Referer),每行有名称、大小、日期与「高清」「字幕」标记(garage `garage_jav/javbus.go`、Atlas `services/jav-utils.ts` 的 `parseMagnets`)。
- 候选筛选取 SakuraMedia `auto_download_service.py` 的判据并加强:标题解析出的番号对不上就剔除、体积区间、做种数大于 0、infohash 黑名单、最多试 5 个;Peach 另从标题与标签解析分辨率(`4K`、`2160p`)、编码、中字与无码标记,按「寻找更好版本」的目标排序,不只按体积。
@@ -166,6 +167,7 @@
62. **智能列表与只读查询**:保存一组组合筛选,结果随馆藏自动更新;另给高级入口跑只读 SQL(只读连接,写不进去)。JAV_MovieManager 直接执行用户 SQL,读写不分,这一点不照搬。
63. **可选遥测,默认关闭**:开启后只上报版本号与平台,上报内容在设置页逐字列出、可随时关。SakuraMedia 默认开启并上报实例 ID、插件、CPU、内存、媒体数与总字节(`src/service/system/telemetry_service.py`),javm 写死上报地址,两者都不照搬。默认关闭时看 GitHub Releases 下载计数。
64. **来源开关旁写明来源性质**:设置页每个来源的开关旁标一类:用户自己的账号、公开页面、归档站(Kemono、Coomer 转载付费内容)、伪装客户端(第 29 条 JavDB App 通道)、用户自配索引器(第 43 条)。默认开关保持各来源现状,用户一眼看得出每一类拿的是什么。和第 29、42、43 条同批做。
+ - 现有追更、采集与索引器配置已显示渠道性质;第 29 条 App 通道尚未实现,它的「伪装客户端」标注随通道接入。来源身份可信度、优先级与启用状态分别保留。
65. **javinfo.dev 作可选来源**:用户自带 API key 才启用。`/movie` 每千次 0.80 美元,只收成功响应;前五家来自自建目录库、毫秒级(`docs/providers`);FC2 与无码只经 missav、sextb 两个流媒体源,没有 FC2 专门来源。接入前用新账号送的 0.02 美元(约 25 次 `/movie`)对一组已复核番号跑对照,比字段准确率与速度。归档的 legacy 仓库没有许可证,只借思路不借代码,且 r18 旧 API 已失效,没有 Peach 缺的解析器。
66. **小文件打包**(低):SakuraMedia v0.9.0 把影片图片与时间轴缩略图打进 `assets.zip`、`thumbnails.zip`(`ZIP_STORED`,`src/common/image_store.py` 包条目优先、单文件兜底),为的是文件数与备份速度,不影响扫描与采集速度。`peach-data` 下 `sources/` 约 9 万、`generated/` 约 6 万个文件;收益在 Syncthing 图片同步与备份。要求能解包回原样,和第 32 条一起设计。
67. **站点互联**(观察):AMMDS v1.6.80 让好友站点当只读数据源。单人自用时只对自己的几台机器有意义,Windows 写、Mac 读的复制已覆盖;出现第二个使用者再议。
diff --git a/docs/REUSE.md b/docs/REUSE.md
index da1d05f23..1842d75d9 100644
--- a/docs/REUSE.md
+++ b/docs/REUSE.md
@@ -1,5 +1,15 @@
# 复用清单
+## 资源索引器
+
+来源性质由 `follow_providers.ProviderSpec.nature`、`scraping_access.describe` 与索引器配置投影给页面,分别标账号、公开页面、归档站与自配索引器,不参与身份可信度、优先级或启用状态判定。新增客户端仿真来源须在自己的登记处声明性质。
+
+`resource_search.py` 使用 Torznab 0.2.1(MIT,Python ≥3.10,支持项目 Python 3.12–3.14)的 `parse_capabilities` 与 `parse_torznab`。源码固定标签 v0.2.1,项目仍标为 Alpha;离线 XML POC 已覆盖 caps、GUID 磁力、体积、做种、连接数和重复标签。PyPI 包新增一项直接依赖,requests 为已有传递依赖;实际索引器验收需要用户配置端点。
+
+请求复用 HTTPX 0.28.1。SDK 自带 requests 请求层没有响应大小上限,异常可能带完整 URL,故只使用其解析器。Peach 负责每源 caps 和 search 两次请求、响应上限 2 MiB、每轮最多四源、45 秒预算、禁用重定向、脱敏错误、XML 实体声明拒收,以及体积、做种、黑名单、质量排序和最多五个候选。标题番号复用 `feeds.scan_code`,身份与中字、无码版次复用 `catalog_rules`。凭据复用 `CredentialStore`,不登记跨机同步字段;换端点不会沿用已保存的 API key。
+
+已对照 [Torznab 1.3 规范](https://torznab.github.io/spec-1.3-draft/torznab/Specification-v1.3.html) 与 SakuraMedia `torznab.py`(GPL-3.0,revision `9c6a31915c9a364c9d6717798575daf9445916bd`)的 FC2 查询、磁力字段回退与部分失败边界。SakuraMedia 耦合其 ORM,不作为运行时依赖。候选由活动页填入现有云下载表单,经用户确认后走 `submit_offline_download`。
+
这是实现查找表:每项能力由哪个现成实现承担、Peach 自己只负责哪一段。新增、恢复或重写代码前,按 `.claude/skills/peach-reuse-first/SKILL.md` 先查本文件、当前树、Git 历史和成熟外部实现;旧文件名不存在不等于能力缺失,继任关系见「已删除旧实现与当前继任者」。
安装依赖的精确版本由 [Python 清单](../pyproject.toml)、[Python 锁文件](../uv.lock)、[前端清单](../frontend/package.json) 和 [静态依赖清单](../package.json) 维护。本页记录用途、许可证与取舍;取证版本和提交号只代表对应证据。
diff --git a/frontend/src/react/activity/downloads-panel.tsx b/frontend/src/react/activity/downloads-panel.tsx
index f687bb5ba..0e448175b 100644
--- a/frontend/src/react/activity/downloads-panel.tsx
+++ b/frontend/src/react/activity/downloads-panel.tsx
@@ -26,6 +26,7 @@ import { Progress } from '../components/progress';
import { ErrorText, FieldLabel, Footer, Help, Stack } from '../settings/section';
import { busyProps, useAction } from '../settings/use-action';
import { momentText } from './tasks';
+import { ResourceSearch } from './resource-search';
export const DOWNLOADS_URL = '/api/downloads';
export const DOWNLOADS_KEY = ['downloads'] as const;
@@ -120,6 +121,9 @@ function SubmitForm({ snapshot, prefill }: { snapshot: DownloadsSnapshot; prefil
<form aria-label="提交磁力" noValidate onSubmit={submit}>
<SettingsCard>
<Stack>
+ <ResourceSearch initialCode={prefill?.code ?? ''} choose={(uri, selectedCode) => {
+ setMagnet(uri); setCode(selectedCode); input.current?.focus();
+ }} />
{prefill?.title ? <Help>{`给「${prefill.title}」找来的资源,下载完由推送发现登记入库。`}</Help> : null}
<Input ref={input} label="磁力链接" placeholder="magnet:?xt=urn:btih:…" autoComplete="off" maxLength={4000}
value={magnet} onChange={setMagnet} />
diff --git a/frontend/src/react/activity/resource-search.tsx b/frontend/src/react/activity/resource-search.tsx
new file mode 100644
index 000000000..7a7198963
--- /dev/null
+++ b/frontend/src/react/activity/resource-search.tsx
@@ -0,0 +1,78 @@
+/* 搜索只选择候选;真正提交由云下载表单确认。 */
+import { useState } from 'react';
+import { spinnerHtml } from '@peach/legacy/ui';
+import { Button } from '@/components/base/buttons/button';
+import { Input } from '@/components/base/input/input';
+import { Select, SelectItem } from '@/components/base/select/select';
+import { apiGet } from '../../api';
+import { ErrorText, FieldLabel, Help } from '../settings/section';
+import { useAction } from '../settings/use-action';
+
+interface Candidate {
+ id: string; uri: string; name: string; size: number; seeders: number; origins: string[];
+ nature: string; resolution: number; codec: string; chinese: boolean; uncensored: boolean;
+}
+interface Result { state: string; items: Candidate[]; warnings: string[]; error: string }
+
+export function ResourceSearch({ initialCode, choose }: {
+ initialCode: string; choose(uri: string, code: string): void;
+}) {
+ const [code, setCode] = useState(initialCode);
+ const [goal, setGoal] = useState('quality');
+ const [min, setMin] = useState('');
+ const [max, setMax] = useState('');
+ const [result, setResult] = useState<Result | null>(null);
+ const [searched, setSearched] = useState('');
+ const [selected, setSelected] = useState('');
+ const action = useAction();
+ const search = () => {
+ if (!code.trim() || action.busy) return;
+ const query = new URLSearchParams({ code: code.trim(), goal });
+ if (min) query.set('min_size', String(Math.round(Number(min) * 1024 ** 3)));
+ if (max) query.set('max_size', String(Math.round(Number(max) * 1024 ** 3)));
+ setResult(null);
+ setSelected('');
+ const requested = code.trim();
+ void action.run('search', (signal) => apiGet<Result>(`/api/resources/search?${query}`, signal), (next) => {
+ setResult(next);
+ setSearched(requested);
+ });
+ };
+ return (
+ <section aria-label="资源搜索" aria-busy={Boolean(action.busy)} className="flex min-w-0 flex-col gap-4">
+ <Input label="搜索资源" value={code} maxLength={80} placeholder="输入番号,按回车搜索"
+ isDisabled={Boolean(action.busy)} onChange={setCode} onKeyDown={(event) => {
+ if (event.key === 'Enter' && !event.nativeEvent.isComposing) { event.preventDefault(); search() }
+ }} />
+ <div className="flex flex-col gap-1">
+ <FieldLabel>优先寻找</FieldLabel>
+ <Select aria-label="优先寻找" selectedKey={goal} isDisabled={Boolean(action.busy)}
+ onSelectionChange={(key) => { if (key !== null) setGoal(String(key)) }}>
+ <SelectItem id="quality">高清</SelectItem><SelectItem id="chinese">中字</SelectItem>
+ <SelectItem id="uncensored">无码</SelectItem>
+ </Select>
+ </div>
+ <div className="flex gap-3 max-sm:flex-col">
+ <Input label="最小体积(GiB)" inputMode="decimal" value={min} onChange={setMin} />
+ <Input label="最大体积(GiB)" inputMode="decimal" value={max} onChange={setMax} />
+ </div>
+ <Help>只查询已启用的自配索引器;最多显示 5 个有做种的候选。清晰度、字幕与无码标记取自来源标题。</Help>
+ {action.busy ? <span role="status" dangerouslySetInnerHTML={{ __html: spinnerHtml('正在搜索资源') }} /> : null}
+ {action.error ? <ErrorText>{action.error}</ErrorText> : null}
+ {result?.error ? <Help role="status">{result.error}</Help> : null}
+ {result?.state === 'ready' && !result.items.length ? <Help role="status">没有符合条件的资源。</Help> : null}
+ {result?.warnings.map((warning) => <Help key={warning}>{warning}</Help>)}
+ {result?.items.length ? <ul className="flex min-w-0 flex-col gap-4">
+ {result.items.map((item) => <li key={item.id} className="flex min-w-0 flex-col gap-2 border-t border-separator-border pt-4">
+ <p className="break-words text-body-2-medium text-text-primary">{item.name}</p>
+ <Help>{[`${(item.size / 1024 ** 3).toFixed(2)} GiB`, `${item.seeders} 个做种`,
+ item.resolution ? `${item.resolution}p` : '', item.codec, item.chinese ? '中字' : '',
+ item.uncensored ? '无码' : '', item.origins.join('、'), item.nature].filter(Boolean).join(' · ')}</Help>
+ <div><Button type="button" variant="secondary" onClick={() => {
+ choose(item.uri, searched); setSelected(item.id);
+ }}>{selected === item.id ? '已填入磁力' : '选用此资源'}</Button></div>
+ </li>)}
+ </ul> : null}
+ </section>
+ );
+}
diff --git a/frontend/src/react/follow-manage/credentials.tsx b/frontend/src/react/follow-manage/credentials.tsx
index 839f1b512..57625b187 100644
--- a/frontend/src/react/follow-manage/credentials.tsx
+++ b/frontend/src/react/follow-manage/credentials.tsx
@@ -118,6 +118,7 @@ function CredentialSection({ row, readOnly, toast }:
<SourceIcon provider={row.provider} />
</span>
<b className="text-body-medium text-text-primary">{row.provider_label}</b>
+ {row.nature ? <span className="text-caption-1-regular text-text-secondary">{row.nature}</span> : null}
<StateChip row={row} />
{row.missing.length
? <Chip variant="caption" color="rose">{`缺 ${row.missing.join('、')}`}</Chip>
diff --git a/frontend/src/react/follow-manage/follow-manage.ts b/frontend/src/react/follow-manage/follow-manage.ts
index 76c9fc615..7239da088 100644
--- a/frontend/src/react/follow-manage/follow-manage.ts
+++ b/frontend/src/react/follow-manage/follow-manage.ts
@@ -50,6 +50,7 @@ export const followSuggestKey = (term: string) => ['follow-manage', 'suggest', t
/** 一条关注来源。字段以 `_source_payload`(`src/peach/web_follow.py`)为准。 */
export interface FollowSource {
+ nature?: string;
id: number;
provider: string;
provider_label: string;
@@ -96,6 +97,7 @@ export interface FollowData {
/** 一个站点的凭据状态。只报存在性与去哪儿配,不回凭据值。 */
export interface CredentialRow {
+ nature?: string;
provider: string;
provider_label: string;
followable: boolean;
diff --git a/frontend/src/react/follow-manage/source-view.tsx b/frontend/src/react/follow-manage/source-view.tsx
index 1ae79f1fa..8675cf979 100644
--- a/frontend/src/react/follow-manage/source-view.tsx
+++ b/frontend/src/react/follow-manage/source-view.tsx
@@ -68,6 +68,7 @@ export function SourceLink({ source }: { source: FollowSource }) {
<a href={source.url} target="_blank" rel="noreferrer noopener" title="打开原来源"
className="min-w-0 text-body-medium break-words text-text-primary underline-offset-2 hover:underline">
{source.label}
+ {source.nature ? <small className="block text-caption-1-regular text-text-secondary">{source.nature}</small> : null}
</a>
);
}
diff --git a/frontend/src/react/scraping/scraping-page.tsx b/frontend/src/react/scraping/scraping-page.tsx
index f047d751e..1cccc8264 100644
--- a/frontend/src/react/scraping/scraping-page.tsx
+++ b/frontend/src/react/scraping/scraping-page.tsx
@@ -158,6 +158,7 @@ function SourceCard({ source, toast }: { source: Source } & ScrapingProps) {
</span>
}>
<Rows>
+ <SettingsRow label="来源性质">{source.nature || '公开页面'}</SettingsRow>
<SettingsRow label="连接方式">
<Select aria-label="连接方式" selectedKey={network}
onSelectionChange={(key) => { if (key !== null) setNetwork(String(key)) }}>
diff --git a/frontend/src/react/scraping/scraping.ts b/frontend/src/react/scraping/scraping.ts
index d9197708a..b85aafa24 100644
--- a/frontend/src/react/scraping/scraping.ts
+++ b/frontend/src/react/scraping/scraping.ts
@@ -24,6 +24,7 @@ export const AMANE_BRIDGE_KEY = ['scraping', 'amane-bridge'] as const;
/** 一个采集来源。字段以 `q_scraping`(`src/peach/web_scraping.py`)为准。 */
export interface Source {
+ nature?: string;
source: string;
label: string;
login: string;
diff --git a/frontend/src/react/settings/indexer-settings.tsx b/frontend/src/react/settings/indexer-settings.tsx
new file mode 100644
index 000000000..31538be31
--- /dev/null
+++ b/frontend/src/react/settings/indexer-settings.tsx
@@ -0,0 +1,72 @@
+/* 用户自配索引器;地址和 API key 分开保存,读取时只返回凭据是否存在。 */
+import { useState } from 'react';
+import type { FormEvent } from 'react';
+import { useQuery } from '@tanstack/react-query';
+import { Button } from '@/components/base/buttons/button';
+import { Checkbox } from '@/components/base/checkbox/checkbox';
+import { Input } from '@/components/base/input/input';
+import { apiGet, apiSend, errorMessage } from '../../api';
+import { ErrorText, Footer, Help, Section, Stack } from './section';
+import { busyProps, useAction } from './use-action';
+
+const URL = '/api/configuration/indexers';
+interface Indexer {
+ key: string; name: string; url: string; enabled: boolean; api_key_set: boolean;
+ api_key?: string; clear_api_key?: boolean;
+}
+interface State { indexers: Indexer[]; max_indexers: number }
+
+export function IndexerSettings({ receipt }: { receipt(message: string): void }) {
+ const query = useQuery({ queryKey: ['indexers'], queryFn: ({ signal }) => apiGet<State>(URL, signal) });
+ if (query.error) return <ErrorText>{errorMessage(query.error)}</ErrorText>;
+ return query.data ? <IndexerForm initial={query.data} receipt={receipt} /> : null;
+}
+
+function IndexerForm({ initial, receipt }: { initial: State; receipt(message: string): void }) {
+ const [rows, setRows] = useState(initial.indexers);
+ const action = useAction();
+ const update = (key: string, fields: Partial<Indexer>) =>
+ setRows((current) => current.map((row) => row.key === key ? { ...row, ...fields } : row));
+ const save = (event: FormEvent<HTMLFormElement>) => {
+ event.preventDefault();
+ void action.run('save', (signal) => apiSend<State>(URL, { indexers: rows }, 'POST', signal), (result) => {
+ setRows(result.indexers);
+ receipt('已保存索引器');
+ });
+ };
+ return (
+ <Section title="资源索引器" onSubmit={save}>
+ <Stack>
+ <Help>用户自配索引器。填写 Prowlarr 或 Jackett 提供的 Torznab API 地址,在活动页「云下载」中按番号搜索。</Help>
+ {rows.map((row, index) => (
+ <div key={row.key} className="flex min-w-0 flex-col gap-4 border-t border-separator-border pt-4">
+ <Input label={`索引器 ${index + 1} 名称`} value={row.name} maxLength={80}
+ isDisabled={Boolean(action.busy)} onChange={(name) => update(row.key, { name })} />
+ <Input label={`索引器 ${index + 1} API 地址`} value={row.url} type="url" autoComplete="off"
+ hint="不带 apikey 或其他查询参数。" isDisabled={Boolean(action.busy)}
+ onChange={(url) => update(row.key, { url })} />
+ <Input label={`索引器 ${index + 1} API key`} type="password" autoComplete="new-password"
+ value={row.api_key || ''} hint={row.api_key_set ? '已保存;地址不变时留空保留。' : '仅保存在这台电脑。'}
+ isDisabled={Boolean(action.busy)} onChange={(api_key) => update(row.key, { api_key })} />
+ <Checkbox isSelected={row.enabled} isDisabled={Boolean(action.busy)}
+ onChange={(enabled) => update(row.key, { enabled })}>启用 · 用户自配索引器</Checkbox>
+ {row.api_key_set ? <Checkbox isSelected={Boolean(row.clear_api_key)}
+ isDisabled={Boolean(action.busy)} onChange={(clear_api_key) => update(row.key, { clear_api_key })}>
+ 清除已保存的 API key
+ </Checkbox> : null}
+ <div><Button type="button" disabled={Boolean(action.busy)}
+ onClick={() => setRows(rows.filter((item) => item.key !== row.key))}>移除索引器 {index + 1}</Button></div>
+ </div>
+ ))}
+ {action.error ? <ErrorText>{action.error}</ErrorText> : null}
+ </Stack>
+ <Footer status="保存后生效;关闭或移除索引器会停止向它查询。">
+ <Button type="button" disabled={Boolean(action.busy) || rows.length >= initial.max_indexers}
+ onClick={() => setRows([...rows, { key: crypto.randomUUID(), name: '', url: '', enabled: false, api_key_set: false }])}>
+ 添加索引器
+ </Button>
+ <Button type="submit" {...busyProps(action.busy === 'save')}>保存配置</Button>
+ </Footer>
+ </Section>
+ );
+}
diff --git a/frontend/src/react/settings/media-settings.tsx b/frontend/src/react/settings/media-settings.tsx
index b8acc5acb..655eeecfe 100644
--- a/frontend/src/react/settings/media-settings.tsx
+++ b/frontend/src/react/settings/media-settings.tsx
@@ -24,6 +24,7 @@ import { queryClient } from '../query';
import { CloudDriveGuide } from './clouddrive-guide';
import { CONFIGURATION_KEY, fetchConfiguration } from './configuration';
import { DownloadSettings } from './download-settings';
+import { IndexerSettings } from './indexer-settings';
import { LibraryIconPicker } from './library-icon-picker';
import { PushDiscoveryForm } from './push-discovery-settings';
import {
@@ -80,6 +81,7 @@ export function MediaSettings({ data, receipt }: ConfigurationGroupProps) {
? <PushDiscoveryForm initial={data.push_discovery} receipt={receipt} />
: null}
{data.downloads ? <DownloadSettings initial={data.downloads} receipt={receipt} /> : null}
+ {data.downloads ? <IndexerSettings receipt={receipt} /> : null}
</div>
);
}
diff --git a/frontend/test/react/resource-search.test.tsx b/frontend/test/react/resource-search.test.tsx
new file mode 100644
index 000000000..2bac34c50
--- /dev/null
+++ b/frontend/test/react/resource-search.test.tsx
@@ -0,0 +1,60 @@
+import { act } from 'react';
+import { QueryClientProvider } from '@tanstack/react-query';
+import { afterEach, expect, it, vi } from 'vitest';
+import { ResourceSearch } from '../../src/react/activity/resource-search';
+import { IndexerSettings } from '../../src/react/settings/indexer-settings';
+import { SourceLink } from '../../src/react/follow-manage/source-view';
+import { queryClient } from '../../src/react/query';
+import { buttonNamed, click, mount, section, settle, submit, type } from './render';
+
+afterEach(() => queryClient.clear());
+
+it('来源名称旁显示渠道性质,链接仍指向该来源', async () => {
+ const host = await mount(<SourceLink source={{ id: 1, provider: 'kemono', provider_label: 'Kemono',
+ ref: 'fanbox/1', label: '演示作者', url: 'https://example.com/author', enabled: true, nature: '归档站' }} />);
+ expect(host.textContent).toContain('归档站');
+ expect(host.querySelector('a')?.href).toBe('https://example.com/author');
+});
+const field = (host: HTMLElement, label: string) => [...host.querySelectorAll('label')]
+ .find((node) => node.textContent?.trim() === label)?.closest('[data-input-size]')?.querySelector('input');
+
+it('回车按番号查询,选择候选只填表单', async () => {
+ const choose = vi.fn();
+ const fetch = vi.fn(async (_url: string) => ({ ok: true, json: async () => ({ state: 'ready', warnings: ['一处来源未响应'],
+ error: '', items: [{ id: 'a', uri: 'magnet:?xt=urn:btih:' + 'a'.repeat(40), name: 'ABC-123 4K',
+ size: 1024 ** 3, seeders: 2, origins: ['测试源'], nature: '用户自配索引器', resolution: 2160, codec: 'HEVC' }] }) }));
+ vi.stubGlobal('fetch', fetch);
+ const host = await mount(<ResourceSearch initialCode="ABC-123" choose={choose} />);
+ await act(async () => field(host, '搜索资源')!.dispatchEvent(new KeyboardEvent('keydown', { key: 'Enter', bubbles: true })));
+ await settle();
+ expect(fetch.mock.calls[0]?.[0]).toContain('/api/resources/search?code=ABC-123&goal=quality');
+ expect(host.textContent).toContain('一处来源未响应');
+ expect(host.textContent).toContain('用户自配索引器');
+ await click(buttonNamed('选用此资源', host));
+ expect(choose).toHaveBeenCalledWith('magnet:?xt=urn:btih:' + 'a'.repeat(40), 'ABC-123');
+ expect(fetch).toHaveBeenCalledTimes(1);
+ expect(host.textContent).toContain('已填入磁力');
+});
+
+it('设置保存后清空 API key,移除需再保存才生效', async () => {
+ const initial = { max_indexers: 4, indexers: [{ key: 'one', name: '测试源', url: 'http://indexer.test/api',
+ enabled: true, api_key_set: true }] };
+ const posts: unknown[] = [];
+ vi.stubGlobal('fetch', vi.fn(async (_url: string, init?: RequestInit) => {
+ if (init?.method === 'POST') posts.push(JSON.parse(String(init.body)));
+ return { ok: true, json: async () => initial };
+ }));
+ const host = await mount(<QueryClientProvider client={queryClient}><IndexerSettings receipt={vi.fn()} /></QueryClientProvider>);
+ await vi.waitFor(async () => { await settle(); expect(section(host, '资源索引器')).not.toBeNull() });
+ expect(host.textContent).toContain('启用 · 用户自配索引器');
+ expect(host.textContent).toContain('清除已保存的 API key');
+ await type(field(host, '索引器 1 API key'), 'private-test-key');
+ await submit(section(host, '资源索引器'));
+ await settle();
+ expect(posts).toHaveLength(1);
+ expect(field(host, '索引器 1 API key')?.value).toBe('');
+ await click(buttonNamed('移除索引器 1', host));
+ expect(posts).toHaveLength(1);
+ await submit(section(host, '资源索引器'));
+ expect(posts[1]).toEqual({ indexers: [] });
+});
diff --git a/pyproject.toml b/pyproject.toml
index faad798cb..dce674d03 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -47,6 +47,7 @@ dependencies = [
"resvg-py==0.5.0",
"socksio==1.0.0",
"starlette==1.6.0",
+ "torznab==0.2.1",
"uvicorn==0.53.0",
"watchdog==6.0.0",
"zeroconf==0.151.3",
diff --git a/src/peach/follow_providers.py b/src/peach/follow_providers.py
index 8de72b1a4..a4e0252de 100644
--- a/src/peach/follow_providers.py
+++ b/src/peach/follow_providers.py
@@ -50,6 +50,8 @@ class ProviderSpec:
#: 名字、解析到内网地址的主机仍然拒收。与 `hosts` 互斥——两个都写会让读者以为
#: 白名单还在起作用。
public_media_hosts: bool = False
+ #: 获取内容的渠道性质,与身份可信度、优先级和启用状态分别表达。
+ nature: str = "公开页面"
def __post_init__(self) -> None:
if self.semantics not in ("work", "release"):
@@ -71,22 +73,22 @@ PROVIDERS: dict[str, ProviderSpec] = {
# 给出的游标页清单,能稳定走完整个创作者,所以同样可回填。
ProviderSpec("fanbox", "FANBOX", source_url="https://{ref}.fanbox.cc/",
url_hosts=("fanbox.cc",), priority=1, official_identity=True,
- backfill=True),
+ backfill=True, nature="用户自己的账号"),
ProviderSpec("subscribestar", "SubscribeStar", source_url="https://{ref}",
url_hosts=("subscribestar.adult", "subscribestar.com"),
- priority=2, official_identity=True),
+ priority=2, official_identity=True, nature="用户自己的账号"),
ProviderSpec("patreon", "Patreon", source_url="https://www.patreon.com/cw/{ref}",
- url_hosts=("patreon.com",), priority=3, official_identity=True),
+ url_hosts=("patreon.com",), priority=3, official_identity=True, nature="用户自己的账号"),
# 归档站:同一套代码的姊妹站,支持真实历史分页所以可回填。
ProviderSpec("kemono", "Kemono", source_url="https://kemono.cr/{ref}",
hosts=("kemono.cr",), url_hosts=("kemono.cr",),
- priority=10, backfill=True),
+ priority=10, backfill=True, nature="归档站"),
ProviderSpec("pawchive", "Pawchive", source_url="https://pawchive.pw/{ref}",
hosts=("pawchive.pw",), url_hosts=("pawchive.pw",),
- priority=15, backfill=True),
+ priority=15, backfill=True, nature="归档站"),
ProviderSpec("coomer", "Coomer", source_url="https://coomer.st/{ref}",
hosts=("coomer.st",), url_hosts=("coomer.st",),
- priority=20, backfill=True),
+ priority=20, backfill=True, nature="归档站"),
# 标签/模特站。
# `excluded_external_ids` 是用户明确点名的那条,它没探过详情页、拿不到署名。
# 同类条目由连接器按详情页的画面作者数拦截;这一条只管让它从浏览面消失。
diff --git a/src/peach/resource_search.py b/src/peach/resource_search.py
new file mode 100644
index 000000000..7312739b5
--- /dev/null
+++ b/src/peach/resource_search.py
@@ -0,0 +1,257 @@
+"""用户自配 Torznab 索引器:有界请求、候选筛选与质量排序。
+
+XML 模型由 torznab 解析;请求、凭据与番号判据由 Peach 管理。搜索只返回候选,
+下载由用户逐条提交现有云下载入口。配置以一份本机凭据文件原子保存。
+"""
+from __future__ import annotations
+
+import json
+import re
+import threading
+import time
+from collections import OrderedDict
+from dataclasses import dataclass
+from urllib.parse import urlsplit
+from xml.etree.ElementTree import ParseError, fromstring
+
+import httpx
+from torznab.exceptions import TorznabAPIError
+from torznab.parser import parse_capabilities, parse_torznab
+
+from .catalog_rules import jav_edition_badges, normalise_code_key, release_code_from_text, same_release_code
+from .downloads import parse_magnet
+from .follow_secrets import CredentialError, CredentialStore
+from .feeds import scan_code
+
+CREDENTIAL = "resource-indexers"
+MAX_INDEXERS = 4
+MAX_BYTES = 2 * 1024 * 1024
+MAX_RESULTS = 5
+MAX_ITEMS = 100
+NATURE = "用户自配索引器"
+
+
+def endpoint(value: object) -> str:
+ """API 地址不携带查询参数或凭据;允许用户部署在回环和局域网。"""
+ text = str(value or "").strip()
+ try:
+ url = urlsplit(text)
+ port = url.port
+ except ValueError:
+ raise ValueError("索引器地址格式不正确") from None
+ if (len(text) > 2048 or url.scheme not in ("http", "https") or not url.hostname
+ or url.username is not None or url.password is not None or url.query or url.fragment
+ or any(char.isspace() for char in text) or port == 0):
+ raise ValueError("填写 HTTP 或 HTTPS API 地址;API key 单独填写,地址不带查询参数")
+ return text
+
+
+class Indexers:
+ def __init__(self, credentials: CredentialStore):
+ self.credentials = credentials
+
+ def load(self) -> list[dict]:
+ try:
+ credential = self.credentials.load(CREDENTIAL)
+ rows = json.loads(credential.values.get("indexers", "[]")) if credential else []
+ if not isinstance(rows, list) or len(rows) > MAX_INDEXERS:
+ raise ValueError
+ for row in rows:
+ if not isinstance(row, dict) or not isinstance(row.get("key"), str):
+ raise ValueError
+ if not isinstance(row.get("name"), str) or type(row.get("enabled")) is not bool:
+ raise ValueError
+ endpoint(row.get("url"))
+ return rows
+ except (CredentialError, ValueError, TypeError):
+ raise ValueError("索引器配置读不出来,请在本机下载设置中重新保存") from None
+
+ def public(self) -> dict:
+ return {"indexers": [
+ {name: row[name] for name in ("key", "name", "url", "enabled")}
+ | {"api_key_set": bool(row.get("api_key")), "nature": NATURE}
+ for row in self.load()], "max_indexers": MAX_INDEXERS}
+
+ def save(self, body: dict) -> dict:
+ rows = body.get("indexers") if isinstance(body, dict) else None
+ if not isinstance(rows, list) or len(rows) > MAX_INDEXERS:
+ raise ValueError(f"最多配置 {MAX_INDEXERS} 个索引器")
+ previous = {row["key"]: row for row in self.load()}
+ saved: list[dict] = []
+ keys: set[str] = set()
+ for row in rows:
+ if not isinstance(row, dict):
+ raise ValueError("索引器配置必须是对象")
+ key = str(row.get("key") or "")
+ name = str(row.get("name") or "").strip()
+ if not re.fullmatch(r"[a-zA-Z0-9_-]{1,48}", key) or key in keys:
+ raise ValueError("索引器编号为空或重复")
+ if not name or len(name) > 80:
+ raise ValueError("索引器名称须为 1 到 80 个字符")
+ address = endpoint(row.get("url"))
+ old = previous.get(key, {})
+ secret = str(row.get("api_key") or "").strip()
+ if not secret and not row.get("clear_api_key") and old.get("url") == address:
+ secret = old.get("api_key", "")
+ if len(secret) > 512 or any(char.isspace() for char in secret):
+ raise ValueError("API key 格式不正确")
+ saved.append(dict(key=key, name=name, url=address, api_key=secret,
+ enabled=row.get("enabled") is True))
+ keys.add(key)
+ self.credentials.save(CREDENTIAL, {"indexers": json.dumps(saved, ensure_ascii=False)})
+ return self.public()
+
+
+@dataclass(frozen=True)
+class Filters:
+ min_size: int = 0
+ max_size: int = 1024 ** 4
+ goal: str = "quality"
+
+ def __post_init__(self):
+ if not 0 <= self.min_size <= self.max_size <= 1024 ** 4:
+ raise ValueError("体积区间须在 0 到 1 TiB 之间,下限不能大于上限")
+ if self.goal not in ("quality", "chinese", "uncensored"):
+ raise ValueError("质量目标只能是高清、中字或无码")
+
+
+def qualities(title: str, tags: list[str], code: str) -> dict:
+ text = " ".join([title, *tags])
+ resolution = next((value for pattern, value in (
+ (r"(?i)(?<!\w)(?:4k|2160p)(?!\w)", 2160),
+ (r"(?i)(?<!\w)1080[pi](?!\w)", 1080),
+ (r"(?i)(?<!\w)720p(?!\w)", 720)) if re.search(pattern, text)), 0)
+ codec = next((value for pattern, value in (
+ (r"(?i)\b(?:h[ ._-]?265|x265|hevc)\b", "HEVC"),
+ (r"(?i)\b(?:h[ ._-]?264|x264|avc)\b", "AVC"),
+ (r"(?i)\bav1\b", "AV1")) if re.search(pattern, text)), "")
+ editions = jav_edition_badges(title, code, tags)
+ return {"resolution": resolution, "codec": codec, "chinese": "中字" in editions,
+ "uncensored": "无码" in editions or "无码破解" in editions}
+
+
+def candidate(item, indexer: dict, code: str, filters: Filters) -> dict | None:
+ title = str(item.title or "")[:500]
+ if not same_release_code(scan_code(title), code):
+ return None
+ if item.size is None or not filters.min_size <= item.size <= filters.max_size:
+ return None
+ if item.seeders is None or item.seeders <= 0:
+ return None
+ magnet = None
+ for raw in (item.magnet_url, item.link, item.guid, item.infohash):
+ if raw:
+ try:
+ magnet = parse_magnet(raw)
+ break
+ except ValueError:
+ continue
+ if magnet is None:
+ return None
+ # 候选只携带规范 hash,索引器返回的 tracker 与 URL 可能含私有 passkey。
+ quality = qualities(title, item.tags, code)
+ return {"id": magnet.info_hash, "info_hash": magnet.info_hash,
+ "uri": f"magnet:?xt=urn:btih:{magnet.info_hash}", "name": title,
+ "size": item.size, "seeders": item.seeders, "peers": item.peers,
+ "date": str(item.pub_date or "")[:100], "source": indexer["name"],
+ "origins": [indexer["name"]], "nature": NATURE, **quality}
+
+
+def _xml(client: httpx.Client, indexer: dict, params: dict, deadline: float) -> str:
+ params = {**params, "apikey": indexer.get("api_key", "")}
+ remaining = deadline - time.monotonic()
+ if remaining <= 0:
+ raise ValueError("索引器查询超时")
+ with client.stream("GET", indexer["url"], params=params, timeout=min(10, remaining)) as response:
+ if response.status_code != 200:
+ raise ValueError(f"索引器返回 HTTP {response.status_code}")
+ content = bytearray()
+ for chunk in response.iter_bytes(chunk_size=16384):
+ if time.monotonic() > deadline:
+ raise ValueError("索引器查询超时")
+ content.extend(chunk)
+ if len(content) > MAX_BYTES:
+ raise ValueError("索引器响应超过 2 MiB")
+ text = bytes(content).decode("utf-8-sig")
+ if "<!DOCTYPE" in text.upper() or "<!ENTITY" in text.upper():
+ raise ValueError("索引器 XML 含不支持的实体声明")
+ if fromstring(text).tag not in ("caps", "rss", "error"):
+ raise ValueError("索引器没有返回 Torznab XML")
+ return text
+
+
+class Search:
+ """一轮最多四个来源、每源两次请求;同一进程串行并缓存一分钟。"""
+ def __init__(self, *, transport=None, clock=time.monotonic):
+ self.transport = transport
+ self.clock = clock
+ self.lock = threading.Lock()
+ self.cache: OrderedDict[tuple, tuple[float, dict]] = OrderedDict()
+
+ def run(self, indexers: list[dict], code: str, filters: Filters, blocked=()) -> dict:
+ code = normalise_code_key(code)
+ if not code or len(code) > 80 or not same_release_code(release_code_from_text(code), code):
+ raise ValueError("请输入可识别的作品番号")
+ active = [row for row in indexers if row.get("enabled")]
+ if len(active) > MAX_INDEXERS:
+ raise ValueError("索引器数量超过上限")
+ if not active:
+ return {"ok": True, "state": "unavailable", "items": [], "warnings": [],
+ "error": "请在本机下载设置中添加并启用索引器"}
+ if not self.lock.acquire(blocking=False):
+ return {"ok": False, "state": "busy", "items": [], "warnings": [],
+ "error": "资源搜索正在进行,请稍后重试"}
+ try:
+ key = (json.dumps(active, sort_keys=True), code, filters)
+ cached = self.cache.get(key)
+ if cached and self.clock() - cached[0] < 60:
+ result = cached[1]
+ else:
+ result = self._search(active, code, filters)
+ self.cache[key] = (self.clock(), result)
+ self.cache.move_to_end(key)
+ while len(self.cache) > 128:
+ self.cache.popitem(last=False)
+ excluded = set(blocked)
+ return {**result, "items": [row for row in result["items"]
+ if row["info_hash"] not in excluded][:MAX_RESULTS]}
+ finally:
+ self.lock.release()
+
+ def _search(self, indexers: list[dict], code: str, filters: Filters) -> dict:
+ found: dict[str, dict] = {}
+ warnings = []
+ successful = 0
+ deadline = time.monotonic() + 45
+ query = code.split("-")[-1] if code.startswith("FC2-") else code
+ with httpx.Client(transport=self.transport, follow_redirects=False, trust_env=False) as client:
+ for indexer in indexers:
+ try:
+ caps = parse_capabilities(_xml(client, indexer, {"t": "caps"}, deadline))
+ search = caps.searching.search if caps.searching else None
+ if not search or not search.available or "q" not in search.supported_params:
+ raise ValueError("索引器没有声明番号搜索能力")
+ limit = min(MAX_ITEMS, max(1, caps.limits.max or MAX_ITEMS)) if caps.limits else MAX_ITEMS
+ items = parse_torznab(_xml(client, indexer, {
+ "t": "search", "q": query, "cat": "6000", "limit": str(limit)}, deadline))
+ successful += 1
+ for item in items[:MAX_ITEMS]:
+ row = candidate(item, indexer, code, filters)
+ if row is None:
+ continue
+ prior = found.get(row["info_hash"])
+ if prior:
+ prior["origins"] = sorted(set(prior["origins"] + row["origins"]))
+ prior["seeders"] = max(prior["seeders"], row["seeders"])
+ else:
+ found[row["info_hash"]] = row
+ except (httpx.HTTPError, UnicodeError, ParseError, TorznabAPIError):
+ warnings.append(f"{indexer['name']}:请求失败或响应格式不正确,请检查索引器")
+ except ValueError as error:
+ warnings.append(f"{indexer['name']}:{error}")
+ def rank(row):
+ target = row[filters.goal] if filters.goal in ("chinese", "uncensored") else row["resolution"]
+ return (-int(target), -row["resolution"], -row["seeders"], row["size"], row["info_hash"])
+ return {"ok": successful > 0, "state": "ready" if successful else "error",
+ "items": sorted(found.values(), key=rank), "warnings": warnings,
+ "error": "" if successful else "所有索引器都未能完成搜索"}
diff --git a/src/peach/routes_configuration.py b/src/peach/routes_configuration.py
index 4f41f7b92..6c76396b9 100644
--- a/src/peach/routes_configuration.py
+++ b/src/peach/routes_configuration.py
@@ -255,6 +255,29 @@ def _downloads(request: Request):
getattr(request.app.state.push_discovery, "declared_roots", {}))
[email protected]("/api/configuration/indexers")
+def get_indexers(request: Request, _args=Depends(require_auth)):
+ from .resource_search import Indexers
+ local_only(request)
+ try:
+ return Indexers(request.app.state.downloads.credentials).public()
+ except (ValueError, OSError):
+ raise HTTPException(400, "索引器配置读不出来") from None
+
+
[email protected]("/api/configuration/indexers")
+def save_indexers(request: Request, body: dict = Body(...), _args=Depends(require_auth)):
+ from .resource_search import Indexers
+ local_only(request)
+ same_origin(request)
+ try:
+ return Indexers(request.app.state.downloads.credentials).save(body)
+ except ValueError as error:
+ raise HTTPException(400, str(error)) from None
+ except OSError:
+ raise HTTPException(400, "索引器配置没有保存,请检查本机凭据目录权限") from None
+
+
@router.post("/api/configuration/downloads")
def save_downloads(request: Request, body: dict = Body(...), _args=Depends(require_auth)):
"""地址、目标目录、等待上限与 CloudDrive2 令牌。令牌只写本机凭据文件。
diff --git a/src/peach/scraping_access.py b/src/peach/scraping_access.py
index 0e0f1bdf8..ac0175f8a 100644
--- a/src/peach/scraping_access.py
+++ b/src/peach/scraping_access.py
@@ -293,6 +293,7 @@ def fix_to_browser(root: Path, source: str) -> None:
def describe(root: Path, source: str) -> dict:
values = values_for(root, source)
return {"source": source, "label": SOURCES[source]["label"],
+ "nature": SOURCES[source].get("nature", "公开页面"),
"login": SOURCES[source]["login"], "accepts_cookie": bool(SOURCES[source].get("cookie")),
"network": "direct" if values.get("network") == "direct" else "peach",
"cookie_saved": bool(values.get("cookie") or values.get("cookies_text")),
diff --git a/src/peach/web_follow.py b/src/peach/web_follow.py
index 5f4b875cb..41de523ed 100644
--- a/src/peach/web_follow.py
+++ b/src/peach/web_follow.py
@@ -1316,6 +1316,7 @@ def _source_payload(row, aliases: dict[str, str] | None = None) -> dict:
"avatar_url": _avatar_url(row["provider"], row["ref"]),
"url": row["url"],
"semantics": row["semantics"],
+ "nature": getattr(follow_providers.PROVIDERS.get(row["provider"]), "nature", "公开页面"),
"enabled": bool(row["enabled"]),
"entity_id": row["entity_id"],
"entity_name": row["entity_name"],
@@ -2619,6 +2620,8 @@ def q_follow_credentials(contract, _args) -> dict:
providers.append({
**described,
"provider_label": PROVIDER_LABELS.get(provider, provider),
+ "nature": (follow_providers.PROVIDERS[provider].nature
+ if provider in follow_providers.PROVIDERS else "用户自己的账号"),
"followable": provider in CONNECTORS,
"requirement": guide["requirement"],
"needs": fields,
diff --git a/src/peach/web_resource_search.py b/src/peach/web_resource_search.py
new file mode 100644
index 000000000..885ad3f9f
--- /dev/null
+++ b/src/peach/web_resource_search.py
@@ -0,0 +1,21 @@
+"""资源搜索的只读 Web 契约;下载仍由云下载写入口接收。"""
+from .resource_search import Filters, Indexers, Search
+
+_SEARCH = Search()
+
+
+def q_resource_search(contract, args) -> dict:
+ service = getattr(contract, "downloads", None)
+ if service is None:
+ raise ValueError("云下载服务没有启用")
+ try:
+ filters = Filters(min_size=int(args.get("min_size") or 0),
+ max_size=int(args.get("max_size") or 1024 ** 4),
+ goal=str(args.get("goal") or "quality"))
+ except (TypeError, OverflowError):
+ raise ValueError("体积区间必须是字节数") from None
+ with contract.database.read_connection() as connection:
+ blocked = [row[0] for row in connection.execute(
+ "SELECT info_hash FROM download_task WHERE blocked_at IS NOT NULL")]
+ return _SEARCH.run(Indexers(service.credentials).load(),
+ str(args.get("code") or ""), filters, blocked)
diff --git a/src/peach/web_router.py b/src/peach/web_router.py
index e8bbb5d50..248d34c3d 100644
--- a/src/peach/web_router.py
+++ b/src/peach/web_router.py
@@ -47,6 +47,7 @@ from .web_entity import (
w_entity_name,
)
from .web_downloads import q_downloads, w_download_cancel, w_download_submit
+from .web_resource_search import q_resource_search
from .web_feeds import (
q_feed_check,
q_feed_discoveries,
@@ -308,6 +309,7 @@ def _post_empty_trash(contract, _body):
GET_HANDLERS = {
"/api/tasks": q_tasks,
"/api/downloads": q_downloads,
+ "/api/resources/search": q_resource_search,
"/api/library-processing": q_library_processing,
"/api/library-processing/issues": q_library_processing_issues,
"/api/thumbnail-jobs": q_thumbnail_jobs,
diff --git a/tests/test_dependency_policy.py b/tests/test_dependency_policy.py
index 1f9b9ec42..789277006 100644
--- a/tests/test_dependency_policy.py
+++ b/tests/test_dependency_policy.py
@@ -79,6 +79,7 @@ class DependencyPolicyTests(unittest.TestCase):
"pystray": "pystray",
"resvg_py": "resvg-py",
"starlette": "starlette",
+ "torznab": "torznab",
"uvicorn": "uvicorn",
"watchdog": "watchdog",
"zeroconf": "zeroconf",
diff --git a/tests/test_downloads_resource_search.py b/tests/test_downloads_resource_search.py
new file mode 100644
index 000000000..5d4e48fa7
--- /dev/null
+++ b/tests/test_downloads_resource_search.py
@@ -0,0 +1,186 @@
+"""索引器搜索用合成 XML、假 HTTP 与临时凭据;不连接真实账号。"""
+import json
+import tempfile
+import unittest
+from pathlib import Path
+from xml.sax.saxutils import escape
+
+import httpx
+
+from peach.follow_secrets import CredentialStore
+from peach.resource_search import CREDENTIAL, MAX_BYTES, Filters, Indexers, Search, endpoint, qualities
+
+HASH = "c9e15763f722f23e98a29decdfae341b98d53056"
+CAPS = '<caps><limits max="25"/><searching><search available="yes" supportedParams="q"/></searching></caps>'
+ROW = {"key": "one", "name": "来源一", "url": "http://indexer.test/api",
+ "api_key": "private-test-key", "enabled": True}
+
+
+def item(title="ABC-123 4K HEVC 中字", info_hash=HASH, size=1024 ** 3, seeders=3,
+ magnet_field="magneturl"):
+ magnet = f"magnet:?xt=urn:btih:{info_hash}&tr=https://tracker.test/?passkey=secret"
+ link = (f'<torznab:attr name="magneturl" value="{escape(magnet, {chr(34): "&quot;"})}"/>'
+ if magnet_field == "magneturl" else f'<{magnet_field}>{escape(magnet)}</{magnet_field}>')
+ return (f'<item><title>{escape(title)}</title><size>{size}</size>{link}'
+ f'<torznab:attr name="seeders" value="{seeders}"/>'
+ '<torznab:attr name="peers" value="7"/></item>')
+
+
+def feed(*items):
+ return '<rss xmlns:torznab="http://torznab.com/schemas/2015/feed"><channel>' + ''.join(items) + '</channel></rss>'
+
+
+class SearchTests(unittest.TestCase):
+ def test_edition_badges_follow_the_catalog_suffix_rules(self):
+ self.assertTrue(qualities("ABC-123-CH", [], "ABC-123")["chinese"])
+ self.assertTrue(qualities("ABC-123-UC", [], "ABC-123")["uncensored"])
+ self.assertFalse(qualities("ABC-123", [], "ABC-123")["chinese"])
+
+ def search(self, content, *, rows=None, code="ABC-123", filters=None, blocked=()):
+ self.requests = []
+
+ def respond(request):
+ self.requests.append(request)
+ if callable(content):
+ return content(request)
+ return httpx.Response(200, text=CAPS if request.url.params["t"] == "caps" else content)
+
+ search = Search(transport=httpx.MockTransport(respond))
+ return search.run(rows or [ROW], code, filters or Filters(), blocked)
+
+ def test_caps_then_search_and_private_tracker_is_not_returned(self):
+ result = self.search(feed(item()))
+ self.assertTrue(result["ok"])
+ self.assertEqual([r.url.params["t"] for r in self.requests], ["caps", "search"])
+ params = self.requests[1].url.params
+ self.assertEqual((params["q"], params["cat"], params["limit"]), ("ABC-123", "6000", "25"))
+ row = result["items"][0]
+ self.assertEqual((row["info_hash"], row["resolution"], row["codec"], row["chinese"]),
+ (HASH, 2160, "HEVC", True))
+ self.assertNotIn("secret", json.dumps(result))
+ self.assertNotIn(ROW["api_key"], json.dumps(result))
+
+ def test_magnet_link_and_guid_are_accepted_by_content(self):
+ for field in ("magneturl", "link", "guid"):
+ with self.subTest(field=field):
+ self.assertEqual(self.search(feed(item(magnet_field=field)))["items"][0]["id"], HASH)
+
+ def test_fc2_query_uses_digits_and_keeps_exact_identity(self):
+ result = self.search(feed(item(title="FC2-PPV-1234567 1080p")), code="FC2-PPV-1234567")
+ self.assertEqual(self.requests[1].url.params["q"], "1234567")
+ self.assertEqual(len(result["items"]), 1)
+
+ def test_filters_reject_different_code_zero_seeders_size_and_blocked_hash(self):
+ result = self.search(feed(item(title="ABC-124"), item(seeders=0), item(size=1), item()),
+ filters=Filters(min_size=100), blocked=[HASH])
+ self.assertEqual(result["items"], [])
+
+ def test_quality_goal_precedes_size_and_only_five_candidates_are_returned(self):
+ rows = [item(title=f"ABC-123 1080p {'中字' if at == 6 else ''}",
+ info_hash=f"{at:040x}", size=(at + 1) * 1024 ** 3) for at in range(7)]
+ result = self.search(feed(*rows), filters=Filters(goal="chinese"))
+ self.assertEqual(len(result["items"]), 5)
+ self.assertEqual(result["items"][0]["id"], f"{6:040x}")
+
+ def test_partial_failure_preserves_results_and_hides_remote_error(self):
+ def respond(request):
+ if request.url.host == "bad.test":
+ raise httpx.ConnectError(str(request.url), request=request)
+ return httpx.Response(200, text=CAPS if request.url.params["t"] == "caps" else feed(item()))
+ result = self.search(respond, rows=[ROW, {**ROW, "key": "bad", "url": "http://bad.test/api"}])
+ self.assertTrue(result["ok"])
+ self.assertEqual(len(result["items"]), 1)
+ self.assertEqual(len(result["warnings"]), 1)
+ self.assertNotIn(ROW["api_key"], json.dumps(result))
+
+ def test_repeated_hash_merges_origins(self):
+ result = self.search(feed(item()), rows=[ROW, {**ROW, "key": "two", "name": "来源二"}])
+ self.assertEqual(len(result["items"]), 1)
+ self.assertEqual(set(result["items"][0]["origins"]), {"来源一", "来源二"})
+
+ def test_unavailable_search_does_not_send_search_request(self):
+ result = self.search(lambda request: httpx.Response(200, text='<caps><searching/></caps>'))
+ self.assertFalse(result["ok"])
+ self.assertEqual(len(self.requests), 1)
+
+ def test_bad_xml_entities_large_response_and_html_fail_without_results(self):
+ for content in ('<!DOCTYPE rss [<!ENTITY x "x">]><rss/>', '<html/>', '<rss>', 'x' * (MAX_BYTES + 1)):
+ with self.subTest(content=content[:30]):
+ result = self.search(content)
+ self.assertFalse(result["ok"])
+ self.assertEqual(result["items"], [])
+
+ def test_redirect_is_not_followed(self):
+ result = self.search(lambda request: httpx.Response(302, headers={"location": "http://other.test/"}))
+ self.assertFalse(result["ok"])
+ self.assertEqual(len(self.requests), 1)
+
+ def test_cache_rechecks_blacklist_and_expires(self):
+ calls = []
+ clock = [0]
+ def respond(request):
+ calls.append(request)
+ return httpx.Response(200, text=CAPS if request.url.params["t"] == "caps" else feed(item()))
+ search = Search(transport=httpx.MockTransport(respond), clock=lambda: clock[0])
+ self.assertEqual(len(search.run([ROW], "ABC-123", Filters())["items"]), 1)
+ self.assertEqual(search.run([ROW], "ABC-123", Filters(), [HASH])["items"], [])
+ self.assertEqual(len(calls), 2)
+ clock[0] = 61
+ search.run([ROW], "ABC-123", Filters())
+ self.assertEqual(len(calls), 4)
+
+ def test_disabled_and_busy_search_do_not_contact_indexer(self):
+ search = Search(transport=httpx.MockTransport(lambda request: self.fail("unexpected request")))
+ self.assertEqual(search.run([{**ROW, "enabled": False}], "ABC-123", Filters())["state"], "unavailable")
+ with search.lock:
+ self.assertEqual(search.run([ROW], "ABC-123", Filters())["state"], "busy")
+
+ def test_invalid_code_and_size_range_are_rejected(self):
+ for code in ("", "not-a-code", "x" * 90):
+ with self.assertRaises(ValueError):
+ Search().run([ROW], code, Filters())
+ for values in ({"min_size": -1}, {"min_size": 10, "max_size": 2}, {"goal": "unknown"}):
+ with self.assertRaises(ValueError):
+ Filters(**values)
+
+
+class SettingsTests(unittest.TestCase):
+ def setUp(self):
+ temporary = tempfile.TemporaryDirectory()
+ self.addCleanup(temporary.cleanup)
+ self.store = CredentialStore(Path(temporary.name))
+ self.settings = Indexers(self.store)
+
+ def test_save_preserve_clear_disable_and_remove_are_reversible(self):
+ public = self.settings.save({"indexers": [ROW]})
+ self.assertNotIn(ROW["api_key"], json.dumps(public))
+ self.assertTrue(public["indexers"][0]["api_key_set"])
+ row = {**ROW, "api_key": "", "enabled": False}
+ self.settings.save({"indexers": [row]})
+ self.assertEqual(self.settings.load()[0]["api_key"], ROW["api_key"])
+ self.assertFalse(self.settings.load()[0]["enabled"])
+ self.settings.save({"indexers": [{**row, "clear_api_key": True}]})
+ self.assertFalse(self.settings.public()["indexers"][0]["api_key_set"])
+ self.settings.save({"indexers": []})
+ self.assertEqual(self.settings.load(), [])
+
+ def test_changing_address_does_not_forward_stored_secret(self):
+ self.settings.save({"indexers": [ROW]})
+ self.settings.save({"indexers": [{**ROW, "url": "http://other.test/api", "api_key": ""}]})
+ self.assertEqual(self.settings.load()[0]["api_key"], "")
+
+ def test_validation_is_atomic_and_rejects_duplicate_ids_and_secret_urls(self):
+ self.settings.save({"indexers": [ROW]})
+ for rows in ([ROW, ROW], [{**ROW, "url": "http://indexer.test/api?apikey=secret"}], [ROW] * 5):
+ with self.assertRaises(ValueError):
+ self.settings.save({"indexers": rows})
+ self.assertEqual(self.settings.load(), [ROW])
+ for value in ("file:///tmp/x", "http://user:pass@host/api", "https://host/api#secret"):
+ with self.assertRaises(ValueError):
+ endpoint(value)
+
+ def test_corrupt_configuration_does_not_disclose_file_contents(self):
+ self.store.save(CREDENTIAL, {"indexers": 'private-test-key'})
+ with self.assertRaisesRegex(ValueError, "配置读不出来") as error:
+ self.settings.public()
+ self.assertNotIn(ROW["api_key"], str(error.exception))
diff --git a/tests/test_follow_providers.py b/tests/test_follow_providers.py
index c7e4af218..17d747856 100644
--- a/tests/test_follow_providers.py
+++ b/tests/test_follow_providers.py
@@ -16,6 +16,13 @@ from peach.web_follow import PROVIDER_LABELS, _BACKFILL_PROVIDERS
class ProviderRegistryTests(unittest.TestCase):
+ def test_source_nature_identifies_accounts_archives_and_public_pages(self):
+ for key in ("fanbox", "subscribestar", "patreon"):
+ self.assertEqual(follow_providers.PROVIDERS[key].nature, "用户自己的账号")
+ for key in ("kemono", "pawchive", "coomer"):
+ self.assertEqual(follow_providers.PROVIDERS[key].nature, "归档站")
+ self.assertEqual(follow_providers.PROVIDERS["rule34video"].nature, "公开页面")
+
def test_every_connector_is_registered_and_every_source_has_a_connector(self):
"""新增站点漏登记不会自己报错,只会在某个页面上少一行——所以这里挡住。
diff --git a/tests/test_follow_web.py b/tests/test_follow_web.py
index e687fec71..d6f90f3de 100644
--- a/tests/test_follow_web.py
+++ b/tests/test_follow_web.py
@@ -2845,6 +2845,7 @@ class LegacyHistoryEndPayloadTests(unittest.TestCase):
payload = web_follow._source_payload(_source_row(
backfill_page=3, last_status="error", last_error="kemono 返回 HTTP 400"))
self.assertTrue(payload["history_exhausted"])
+ self.assertEqual(payload["nature"], "归档站")
self.assertEqual(payload["last_status"], "not_modified")
self.assertIsNone(payload["last_error"])
diff --git a/tests/test_scraping_access.py b/tests/test_scraping_access.py
index c37a188c2..7f444fda7 100644
--- a/tests/test_scraping_access.py
+++ b/tests/test_scraping_access.py
@@ -32,6 +32,7 @@ class ScrapingAccessTests(unittest.TestCase):
peach_proxy.save(self.root, {"mode": "proxy", "proxy": "http://user:[email protected]:7890"})
save(self.root, "javdb", {"cookie": "session=private-cookie", "network": "peach"})
public = q_scraping(SimpleNamespace(follow_secrets_root=self.root), {})
+ self.assertTrue(all(row["nature"] == "公开页面" for row in public["sources"]))
self.assertEqual(next(item['label'] for item in public['sources'] if item['source'] == 'javdb'), 'JavDB')
self.assertNotIn("private-cookie", json.dumps(public))
self.assertNotIn("private-proxy", json.dumps(public))
diff --git a/tests/test_web_downloads.py b/tests/test_web_downloads.py
index cd61ce098..024eecaf1 100644
--- a/tests/test_web_downloads.py
+++ b/tests/test_web_downloads.py
@@ -336,5 +336,37 @@ class BrowserLoginRouteTests(_App):
self.assertEqual(self.login.started, 0)
+class ResourceIndexerRoutes(_App):
+ URL = "/api/configuration/indexers"
+
+ def setUp(self):
+ super().setUp()
+ self.local = TestClient(self.app, base_url="http://127.0.0.1", client=("127.0.0.1", 123))
+
+ def test_credentials_are_local_and_origin_guarded(self):
+ body = {"indexers": [{"key": "one", "name": "测试源", "url": "http://indexer.test/api",
+ "api_key": "private-test-key", "enabled": True}]}
+ self.assertEqual(self.client.post(self.URL, json=body).status_code, 403)
+ self.assertEqual(self.local.post(self.URL, json=body,
+ headers={"origin": "https://other.invalid"}).status_code, 403)
+ response = self.local.post(self.URL, json=body)
+ self.assertEqual(response.status_code, 200, response.text)
+ self.assertNotIn("private-test-key", response.text)
+ self.assertTrue(self.local.get(self.URL).json()["indexers"][0]["api_key_set"])
+ self.assertEqual(self.client.get(self.URL).status_code, 403)
+
+ def test_search_endpoint_passes_saved_config_and_returns_candidates(self):
+ from peach.resource_search import Indexers
+ Indexers(self.service.credentials).save({"indexers": [{
+ "key": "one", "name": "测试源", "url": "http://indexer.test/api", "enabled": True}]})
+ with mock.patch("peach.web_resource_search._SEARCH.run", return_value={
+ "ok": True, "state": "ready", "items": [], "warnings": [], "error": ""}) as search:
+ response = self.client.get("/api/resources/search?code=ABC-123&goal=chinese")
+ self.assertEqual(response.status_code, 200, response.text)
+ args = search.call_args.args
+ self.assertEqual((args[0][0]["key"], args[1], args[2].goal), ("one", "ABC-123", "chinese"))
+ self.assertEqual(self.client.get("/api/resources/search?code=ABC-123&min_size=-1").status_code, 400)
+
+
if __name__ == "__main__":
unittest.main()
diff --git a/uv.lock b/uv.lock
index e470bf9e0..9f3d59d84 100644
--- a/uv.lock
+++ b/uv.lock
@@ -1180,6 +1180,7 @@ dependencies = [
{ name = "socksio" },
{ name = "starlette" },
{ name = "tldextract" },
+ { name = "torznab" },
{ name = "uvicorn" },
{ name = "watchdog" },
{ name = "zeroconf" },
@@ -1236,6 +1237,7 @@ requires-dist = [
{ name = "socksio", specifier = "==1.0.0" },
{ name = "starlette", specifier = "==1.6.0" },
{ name = "tldextract", specifier = "==5.3.2" },
+ { name = "torznab", specifier = "==0.2.1" },
{ name = "uvicorn", specifier = "==0.53.0" },
{ name = "watchdog", specifier = "==6.0.0" },
{ name = "zeroconf", specifier = "==0.151.3" },
@@ -2247,6 +2249,18 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/4a/3b/930310b274dfe3b9a4fe64ef8b24e5faf376c9a6f94bba6fc6e438058598/tldextract-5.3.2-py3-none-any.whl", hash = "sha256:6c90d2a259f5c89f4fcf01f97af15708416a59ffedddff006d67222ab30d0fb0", size = 106415, upload-time = "2026-08-08T20:53:12.675Z" },
]
+[[package]]
+name = "torznab"
+version = "0.2.1"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+ { name = "requests" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/e5/5f/c129b48f02c766bfd09fdb612e0418cd55fdb997704569c744759b9243ec/torznab-0.2.1.tar.gz", hash = "sha256:acac787ca7460fceb7325be1e59a5da66c4d1ad24326b16ca308c4fd480a42d4", size = 57877, upload-time = "2026-09-16T16:37:43.758Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/a3/3b/e1cabd6eccc198273ba350eb35c6eb78848d5a8434b0eb0272e1d30df2d4/torznab-0.2.1-py3-none-any.whl", hash = "sha256:6f07a621e503a0afe209ed1d4ddc0455469203762dbf2ecd7f832945a1825399", size = 8288, upload-time = "2026-09-16T16:37:42.393Z" },
+]
+
[[package]]
name = "typing-extensions"
version = "4.16.0"
diff --git a/web/dist/peach-react.js b/web/dist/peach-react.js
index d98925d02..e6cbb81ee 100644
--- a/web/dist/peach-react.js
+++ b/web/dist/peach-react.js
@@ -19567,13 +19567,13 @@ function ig() {
}
//#endregion
//#region node_modules/react-aria-components/dist/private/Modal.mjs
-var aee = /*#__PURE__*/ (0, B.createContext)(null), ag = /*#__PURE__*/ (0, B.createContext)(null), og = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- if ((0, B.useContext)(ag)) return /*#__PURE__*/ B.createElement(cg, {
+var aee = /*#__PURE__*/ (0, B.createContext)(null), ag = /*#__PURE__*/ (0, B.createContext)(null), oee = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ if ((0, B.useContext)(ag)) return /*#__PURE__*/ B.createElement(sg, {
...e,
modalRef: t
}, e.children);
let { isDismissable: n, isKeyboardDismissDisabled: r, isOpen: i, defaultOpen: a, onOpenChange: o, children: s, isEntering: c, isExiting: l, UNSTABLE_portalContainer: u, shouldCloseOnInteractOutside: d, ...f } = e;
- return /*#__PURE__*/ B.createElement(sg, {
+ return /*#__PURE__*/ B.createElement(og, {
isDismissable: n,
isKeyboardDismissDisabled: r,
isOpen: i,
@@ -19583,15 +19583,15 @@ var aee = /*#__PURE__*/ (0, B.createContext)(null), ag = /*#__PURE__*/ (0, B.cre
isExiting: l,
UNSTABLE_portalContainer: u,
shouldCloseOnInteractOutside: d
- }, /*#__PURE__*/ B.createElement(cg, {
+ }, /*#__PURE__*/ B.createElement(sg, {
...f,
modalRef: t
}, s));
});
-function oee(e, t) {
+function see(e, t) {
[e, t] = ei(e, t, aee);
let n = (0, B.useContext)(ph), r = Xp(e), i = e.isOpen != null || e.defaultOpen != null || !n ? r : n, a = Yr(t), o = (0, B.useRef)(null), s = Qp(a, i.isOpen), c = Qp(o, i.isOpen), l = s || c || e.isExiting || !1, u = Ir();
- return !i.isOpen && !l || u ? null : /*#__PURE__*/ B.createElement(see, {
+ return !i.isOpen && !l || u ? null : /*#__PURE__*/ B.createElement(cee, {
...e,
state: i,
isExiting: l,
@@ -19599,8 +19599,8 @@ function oee(e, t) {
modalRef: o
});
}
-var sg = /*#__PURE__*/ (0, B.forwardRef)(oee);
-function see({ UNSTABLE_portalContainer: e, ...t }) {
+var og = /*#__PURE__*/ (0, B.forwardRef)(see);
+function cee({ UNSTABLE_portalContainer: e, ...t }) {
let n = t.modalRef, { state: r } = t, { modalProps: i, underlayProps: a } = ree(t, r, n), o = Zp(t.overlayRef) || t.isEntering || !1, s = Qr({
...t,
defaultClassName: "react-aria-ModalOverlay",
@@ -19638,7 +19638,7 @@ function see({ UNSTABLE_portalContainer: e, ...t }) {
isDismissable: t.isDismissable
}], [ph, r]] }, s.children)));
}
-function cg(e) {
+function sg(e) {
let { modalProps: t, modalRef: n, isExiting: r, isDismissable: i } = (0, B.useContext)(ag), a = (0, B.useContext)(ph), o = Yr((0, B.useMemo)(() => Gr(e.modalRef, n), [e.modalRef, n])), s = Zp(o), c = Qr({
...e,
defaultClassName: "react-aria-Modal",
@@ -19658,10 +19658,10 @@ function cg(e) {
}
//#endregion
//#region node_modules/react-aria/dist/private/radio/utils.mjs
-var lg = /* @__PURE__ */ new WeakMap();
+var cg = /* @__PURE__ */ new WeakMap();
//#endregion
//#region node_modules/react-aria/dist/private/radio/useRadio.mjs
-function cee(e, t, n) {
+function lee(e, t, n) {
let { value: r, children: i, "aria-label": a, "aria-labelledby": o, onPressStart: s, onPressEnd: c, onPressChange: l, onPress: u, onPressUp: d, onClick: f } = e, p = e.isDisabled || t.isDisabled, m = t.selectedValue === r, h = (e) => {
e.stopPropagation(), t.setSelectedValue(r);
}, { pressProps: g, isPressed: _ } = nc({
@@ -19684,7 +19684,7 @@ function cee(e, t, n) {
}
}), { focusableProps: b } = is(U(e, { onFocus: () => t.setLastFocusedValue(r) }), n), x = U(g, b), S = Bs(e, { labelable: !0 }), C = -1;
t.selectedValue == null ? (t.lastFocusedValue === r || t.lastFocusedValue == null) && (C = 0) : t.selectedValue === r && (C = 0), p && (C = void 0);
- let { name: w, form: T, descriptionId: E, errorMessageId: D, validationBehavior: O } = lg.get(t);
+ let { name: w, form: T, descriptionId: E, errorMessageId: D, validationBehavior: O } = cg.get(t);
ul(n, t.defaultSelectedValue, t.setSelectedValue), dl({ validationBehavior: O }, t, n);
let k = gl();
return {
@@ -19718,7 +19718,7 @@ function cee(e, t, n) {
}
//#endregion
//#region node_modules/react-aria/dist/private/radio/useRadioGroup.mjs
-function lee(e, t) {
+function uee(e, t) {
let { name: n, form: r, isReadOnly: i, isRequired: a, isDisabled: o, orientation: s = "vertical", validationBehavior: c = "aria" } = e, { direction: l } = no(), { isInvalid: u, validationErrors: d, validationDetails: f } = t.displayValidation, { labelProps: p, fieldProps: m, descriptionProps: h, errorMessageProps: g } = ll({
...e,
labelElementType: "span",
@@ -19747,7 +19747,7 @@ function lee(e, t) {
},
allowRepeats: !0
}), x = Hr(n);
- return lg.set(t, {
+ return cg.set(t, {
name: x,
form: r,
descriptionId: h.id,
@@ -19776,9 +19776,9 @@ function lee(e, t) {
}
//#endregion
//#region node_modules/react-stately/dist/private/radio/useRadioGroupState.mjs
-var uee = Math.round(Math.random() * 1e10), dee = 0;
-function fee(e) {
- let t = (0, B.useMemo)(() => e.name || `radio-group-${uee}-${++dee}`, [e.name]), [n, r] = yo(e.value, e.defaultValue ?? null, e.onChange), [i] = (0, B.useState)(n), [a, o] = (0, B.useState)(null), s = tl({
+var dee = Math.round(Math.random() * 1e10), fee = 0;
+function pee(e) {
+ let t = (0, B.useMemo)(() => e.name || `radio-group-${dee}-${++fee}`, [e.name]), [n, r] = yo(e.value, e.defaultValue ?? null, e.onChange), [i] = (0, B.useState)(n), [a, o] = (0, B.useState)(null), s = tl({
...e,
value: n
}), c = (t) => {
@@ -19801,12 +19801,12 @@ function fee(e) {
}
//#endregion
//#region node_modules/react-aria-components/dist/private/RadioGroup.mjs
-var pee = /*#__PURE__*/ (0, B.createContext)(null), mee = /*#__PURE__*/ (0, B.createContext)(null), ug = /*#__PURE__*/ (0, B.createContext)(null), dg = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- [e, t] = ei(e, t, pee);
- let { validationBehavior: n } = $r(sl) || {}, r = e.validationBehavior ?? n ?? "native", i = fee({
+var mee = /*#__PURE__*/ (0, B.createContext)(null), hee = /*#__PURE__*/ (0, B.createContext)(null), lg = /*#__PURE__*/ (0, B.createContext)(null), ug = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ [e, t] = ei(e, t, mee);
+ let { validationBehavior: n } = $r(sl) || {}, r = e.validationBehavior ?? n ?? "native", i = pee({
...e,
validationBehavior: r
- }), [a, o] = ti(!e["aria-label"] && !e["aria-labelledby"]), { radioGroupProps: s, labelProps: c, descriptionProps: l, errorMessageProps: u, ...d } = lee({
+ }), [a, o] = ti(!e["aria-label"] && !e["aria-labelledby"]), { radioGroupProps: s, labelProps: c, descriptionProps: l, errorMessageProps: u, ...d } = uee({
...e,
label: o,
validationBehavior: r
@@ -19832,7 +19832,7 @@ var pee = /*#__PURE__*/ (0, B.createContext)(null), mee = /*#__PURE__*/ (0, B.cr
"data-readonly": i.isReadOnly || void 0,
"data-required": i.isRequired || void 0
}, /*#__PURE__*/ B.createElement(Zr, { values: [
- [ug, i],
+ [lg, i],
[vc, {
...c,
ref: a,
@@ -19844,23 +19844,23 @@ var pee = /*#__PURE__*/ (0, B.createContext)(null), mee = /*#__PURE__*/ (0, B.cr
} }],
[Yc, d]
] }, /*#__PURE__*/ B.createElement(Su, null, f.children)));
-}), fg = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+}), dg = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
let { inputRef: n = null, ...r } = e;
- [e, t] = ei(r, t, mee);
- let i = B.useContext(ug), a = Yr((0, B.useMemo)(() => Gr(n, e.inputRef === void 0 ? null : e.inputRef), [n, e.inputRef])), o = cee({
+ [e, t] = ei(r, t, hee);
+ let i = B.useContext(lg), a = Yr((0, B.useMemo)(() => Gr(n, e.inputRef === void 0 ? null : e.inputRef), [n, e.inputRef])), o = lee({
...ni(e),
children: typeof e.children == "function" || e.children
}, i, a);
- return /*#__PURE__*/ B.createElement(pg.Provider, { value: {
+ return /*#__PURE__*/ B.createElement(fg.Provider, { value: {
...o,
inputRef: a,
defaultClassName: "react-aria-Radio"
- } }, /*#__PURE__*/ B.createElement(hee, {
+ } }, /*#__PURE__*/ B.createElement(pg, {
...e,
ref: t
}));
-}), pg = /*#__PURE__*/ (0, B.createContext)(null), hee = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- let { labelProps: n, inputProps: r, isSelected: i, isDisabled: a, isPressed: o, defaultClassName: s, inputRef: c } = (0, B.useContext)(pg), l = B.useContext(ug), { isFocused: u, isFocusVisible: d, focusProps: f } = dc(), p = a || l.isReadOnly, { hoverProps: m, isHovered: h } = _c({
+}), fg = /*#__PURE__*/ (0, B.createContext)(null), pg = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ let { labelProps: n, inputProps: r, isSelected: i, isDisabled: a, isPressed: o, defaultClassName: s, inputRef: c } = (0, B.useContext)(fg), l = B.useContext(lg), { isFocused: u, isFocusVisible: d, focusProps: f } = dc(), p = a || l.isReadOnly, { hoverProps: m, isHovered: h } = _c({
...e,
isDisabled: p
}), g = Qr({
@@ -21705,7 +21705,7 @@ d_ = {
};
//#endregion
//#region node_modules/react-aria/dist/private/table/TableKeyboardDelegate.mjs
-var Bee = class extends Tg {
+var f_ = class extends Tg {
isCell(e) {
return e.type === "cell" || e.type === "rowheader" || e.type === "column";
}
@@ -21783,14 +21783,14 @@ var Bee = class extends Tg {
};
//#endregion
//#region node_modules/react-aria/dist/private/table/useTable.mjs
-function Vee(e) {
+function p_(e) {
return e && e.__esModule ? e.default : e;
}
-function Hee(e, t, n) {
+function Bee(e, t, n) {
let { keyboardDelegate: r, isVirtualized: i, layoutDelegate: a, layout: o } = e, s = vd({
usage: "search",
sensitivity: "base"
- }), { direction: c } = no(), l = t.selectionManager.disabledBehavior, u = (0, B.useMemo)(() => r || new Bee({
+ }), { direction: c } = no(), l = t.selectionManager.disabledBehavior, u = (0, B.useMemo)(() => r || new f_({
collection: t.collection,
disabledKeys: t.disabledKeys,
disabledBehavior: l,
@@ -21817,7 +21817,7 @@ function Hee(e, t, n) {
keyboardDelegate: u
}, t, n);
i && (f["aria-rowcount"] = t.collection.size + t.collection.headerRows.length), t.treeColumn != null && (f.role = "treegrid");
- let { column: p, direction: m } = t.sortDescriptor || {}, h = _o(Vee(d_), "@react-aria/table"), g = (0, B.useMemo)(() => {
+ let { column: p, direction: m } = t.sortDescriptor || {}, h = _o(p_(d_), "@react-aria/table"), g = (0, B.useMemo)(() => {
let e = t.collection.columns.find((e) => e.key === p)?.textValue ?? "";
return m && p ? h.format(`${m}Sort`, { columnName: e }) : void 0;
}, [
@@ -21831,13 +21831,13 @@ function Hee(e, t, n) {
}
//#endregion
//#region node_modules/react-aria/dist/private/grid/useGridCell.mjs
-function f_(e, t, n) {
+function m_(e, t, n) {
let { node: r, isVirtualized: i, focusMode: a, allowsArrowNavigation: o, shouldSelectOnPressUp: s, onAction: c } = e, { direction: l } = no(), { keyboardDelegate: u, actions: { onCellAction: d }, keyboardNavigationBehavior: f } = Eg.get(t), p = a ?? (f === "tab" ? "cell" : "child"), m = (0, B.useRef)(null), h = () => {
if (n.current) {
let e = td(n.current);
if (p === "child") {
if (xi(n.current) && n.current !== yi(ci(n.current))) return;
- let r = t.selectionManager.childFocusStrategy === "last" ? p_(e) : e.firstChild();
+ let r = t.selectionManager.childFocusStrategy === "last" ? h_(e) : e.firstChild();
if (r) {
zo(r);
return;
@@ -21869,7 +21869,7 @@ function f_(e, t, n) {
n.current.parentElement?.dispatchEvent(new KeyboardEvent(e.nativeEvent.type, e.nativeEvent));
break;
}
- p === "cell" && l === "rtl" ? (zo(n.current), Hc(n.current, { containingElement: Rc(n.current) })) : (a.currentNode = n.current, t = l === "rtl" ? a.firstChild() : p_(a), t && (zo(t), Hc(t, { containingElement: Rc(n.current) })));
+ p === "cell" && l === "rtl" ? (zo(n.current), Hc(n.current, { containingElement: Rc(n.current) })) : (a.currentNode = n.current, t = l === "rtl" ? a.firstChild() : h_(a), t && (zo(t), Hc(t, { containingElement: Rc(n.current) })));
}
break;
}
@@ -21881,7 +21881,7 @@ function f_(e, t, n) {
n.current.parentElement?.dispatchEvent(new KeyboardEvent(e.nativeEvent.type, e.nativeEvent));
break;
}
- p === "cell" && l === "ltr" ? (zo(n.current), Hc(n.current, { containingElement: Rc(n.current) })) : (a.currentNode = n.current, t = l === "rtl" ? p_(a) : a.firstChild(), t && (zo(t), Hc(t, { containingElement: Rc(n.current) })));
+ p === "cell" && l === "ltr" ? (zo(n.current), Hc(n.current, { containingElement: Rc(n.current) })) : (a.currentNode = n.current, t = l === "rtl" ? h_(a) : a.firstChild(), t && (zo(t), Hc(t, { containingElement: Rc(n.current) })));
}
break;
}
@@ -21926,7 +21926,7 @@ function f_(e, t, n) {
isPressed: _
};
}
-function p_(e) {
+function h_(e) {
let t = null, n = null;
do
n = e.lastChild(), n && (t = n);
@@ -21935,11 +21935,11 @@ function p_(e) {
}
//#endregion
//#region node_modules/react-aria/dist/private/table/useTableColumnHeader.mjs
-function Uee(e) {
+function Vee(e) {
return e && e.__esModule ? e.default : e;
}
-function Wee(e, t, n) {
- let { node: r } = e, i = r.props.allowsSorting, { gridCellProps: a } = f_({
+function Hee(e, t, n) {
+ let { node: r } = e, i = r.props.allowsSorting, { gridCellProps: a } = m_({
focusMode: "child",
...e
}, t, n), o = r.props.isSelectionCell && t.selectionManager.selectionMode === "single", { pressProps: s, isPressed: c } = nc({
@@ -21950,7 +21950,7 @@ function Wee(e, t, n) {
ref: n
}), { focusableProps: l } = is({}, n), u, d = t.sortDescriptor?.column === r.key, f = t.sortDescriptor?.direction;
r.props.allowsSorting && !na() && (u = d ? f : "none");
- let p = _o(Uee(d_), "@react-aria/table"), m;
+ let p = _o(Vee(d_), "@react-aria/table"), m;
i && (m = `${p.format("sortable")}`, d && f && na() && (m = `${m}, ${p.format(f)}`));
let h = Gc(m), g = t.collection.size === 0;
return (0, B.useEffect)(() => {
@@ -21972,7 +21972,7 @@ function Wee(e, t, n) {
}
//#endregion
//#region node_modules/react-aria/dist/private/grid/useGridRow.mjs
-function Gee(e, t, n) {
+function Uee(e, t, n) {
let { node: r, isVirtualized: i, shouldSelectOnPressUp: a, onAction: o } = e, { actions: s, shouldSelectOnPressUp: c } = Eg.get(t), l = s.onRowAction ? () => s.onRowAction?.(r.key) : o, { itemProps: u, ...d } = Cd({
selectionManager: t.selectionManager,
key: r.key,
@@ -21994,10 +21994,10 @@ function Gee(e, t, n) {
}
//#endregion
//#region node_modules/react-aria/dist/private/table/useTableRow.mjs
-function Kee(e) {
+function Wee(e) {
return e && e.__esModule ? e.default : e;
}
-var m_ = {
+var g_ = {
expand: {
ltr: "ArrowRight",
rtl: "ArrowLeft"
@@ -22007,21 +22007,21 @@ var m_ = {
rtl: "ArrowRight"
}
};
-function qee(e, t, n) {
- let { node: r, isVirtualized: i } = e, { rowProps: a, ...o } = Gee(e, t, n), { direction: s } = no();
+function Gee(e, t, n) {
+ let { node: r, isVirtualized: i } = e, { rowProps: a, ...o } = Uee(e, t, n), { direction: s } = no();
i && t.treeColumn == null ? a["aria-rowindex"] = r.index + 1 + t.collection.headerRows.length : delete a["aria-rowindex"];
- let c = t.treeColumn != null && (t.expandedKeys === "all" || t.expandedKeys.has(r.key)), l = _o(Kee(d_), "@react-aria/table"), u = Ga({
+ let c = t.treeColumn != null && (t.expandedKeys === "all" || t.expandedKeys.has(r.key)), l = _o(Wee(d_), "@react-aria/table"), u = Ga({
"aria-label": c ? l.format("collapse") : l.format("expand"),
"aria-labelledby": Ag(t, r.key)
}), d = {}, f = {};
if (t.treeColumn != null) {
let e = t.collection.getItem(r.key);
if (e != null) {
- let n = h_(t.collection, r), i = e.props?.hasChildRows || e.props?.UNSTABLE_childItems || n?.type !== "cell", a = t.collection.getItem(r.parentKey), c = a.type === "tablebody" || a.type === "body", l = h_(t.collection, a);
+ let n = __(t.collection, r), i = e.props?.hasChildRows || e.props?.UNSTABLE_childItems || n?.type !== "cell", a = t.collection.getItem(r.parentKey), c = a.type === "tablebody" || a.type === "body", l = __(t.collection, a);
for (; l && l.type !== "item" && l.prevKey != null;) l = t.collection.getItem(l.prevKey);
d = {
onKeyDown: (n) => {
- n.key === m_.expand[s] && t.selectionManager.focusedKey === e.key && i && t.expandedKeys !== "all" && !t.expandedKeys.has(e.key) ? (t.toggleKey(e.key), n.stopPropagation()) : n.key === m_.collapse[s] && t.selectionManager.focusedKey === e.key && (t.expandedKeys === "all" ? t.expandedKeys === "all" && (t.toggleKey(e.key), n.stopPropagation()) : i && t.expandedKeys.has(e.key) ? (t.toggleKey(e.key), n.stopPropagation()) : !t.expandedKeys.has(e.key) && e.parentKey != null && e.level > 0 && (t.selectionManager.setFocusedKey(e.parentKey), n.stopPropagation()));
+ n.key === g_.expand[s] && t.selectionManager.focusedKey === e.key && i && t.expandedKeys !== "all" && !t.expandedKeys.has(e.key) ? (t.toggleKey(e.key), n.stopPropagation()) : n.key === g_.collapse[s] && t.selectionManager.focusedKey === e.key && (t.expandedKeys === "all" ? t.expandedKeys === "all" && (t.toggleKey(e.key), n.stopPropagation()) : i && t.expandedKeys.has(e.key) ? (t.toggleKey(e.key), n.stopPropagation()) : !t.expandedKeys.has(e.key) && e.parentKey != null && e.level > 0 && (t.selectionManager.setFocusedKey(e.parentKey), n.stopPropagation()));
},
"aria-expanded": i ? t.expandedKeys === "all" || t.expandedKeys.has(r.key) : void 0,
"aria-level": e.level + 1,
@@ -22049,19 +22049,19 @@ function qee(e, t, n) {
...o
};
}
-function h_(e, t) {
+function __(e, t) {
return "lastChildKey" in t ? t.lastChildKey == null ? null : e.getItem(t.lastChildKey) : Array.from(t.childNodes).findLast((e) => e.parentKey === t.key);
}
//#endregion
//#region node_modules/react-aria/dist/private/table/useTableHeaderRow.mjs
-function Jee(e, t, n) {
+function Kee(e, t, n) {
let { node: r, isVirtualized: i } = e, a = { role: "row" };
return i && t.treeColumn == null && (a["aria-rowindex"] = r.index + 1), { rowProps: a };
}
//#endregion
//#region node_modules/react-aria/dist/private/table/useTableCell.mjs
-function Yee(e, t, n) {
- let { gridCellProps: r, isPressed: i } = f_(e, t, n), a = e.node.column?.key;
+function qee(e, t, n) {
+ let { gridCellProps: r, isPressed: i } = m_(e, t, n), a = e.node.column?.key;
return a != null && t.collection.rowHeaderColumnKeys.has(a) && (r.role = "rowheader", r.id = kg(t, e.node.parentKey, a)), {
gridCellProps: r,
isPressed: i
@@ -22069,20 +22069,20 @@ function Yee(e, t, n) {
}
//#endregion
//#region node_modules/react-aria/dist/private/table/useTableSelectionCheckbox.mjs
-function Xee(e) {
+function Jee(e) {
return e && e.__esModule ? e.default : e;
}
-function g_(e, t) {
+function Yee(e, t) {
let { key: n } = e, { checkboxProps: r } = nee(e, t);
return { checkboxProps: {
...r,
"aria-labelledby": `${r.id} ${Ag(t, n)}`
} };
}
-function __(e) {
+function Xee(e) {
let { isEmpty: t, isSelectAll: n, selectionMode: r } = e.selectionManager;
return { checkboxProps: {
- "aria-label": _o(Xee(d_), "@react-aria/table").format(r === "single" ? "select" : "selectAll"),
+ "aria-label": _o(Jee(d_), "@react-aria/table").format(r === "single" ? "select" : "selectAll"),
isSelected: n,
isDisabled: r !== "multiple" || e.collection.size === 0 || e.collection.rows.length === 1 && e.collection.rows[0].type === "loader",
isIndeterminate: !t && !n,
@@ -22091,17 +22091,17 @@ function __(e) {
}
//#endregion
//#region node_modules/react-aria/dist/private/grid/useGridRowGroup.mjs
-function v_() {
+function Zee() {
return { rowGroupProps: { role: "rowgroup" } };
}
//#endregion
//#region node_modules/react-aria/dist/private/table/useTableRowGroup.mjs
-function y_() {
- return v_();
+function v_() {
+ return Zee();
}
//#endregion
//#region node_modules/react-aria-components/dist/private/Table.mjs
-var Zee = class extends Do {
+var Qee = class extends Do {
withExpandedKeys(e) {
let t = this.clone();
return t.expandedKeys = e, t.frozen = this.frozen, t.rows = Array.from(t.getRows()), t;
@@ -22116,7 +22116,7 @@ var Zee = class extends Do {
}
get body() {
for (let e of this) if (e.type === "tablebody") return e;
- return new E_(-2);
+ return new T_(-2);
}
commit(e, t, n = !1) {
this.updateColumns(n), this.firstKey = e, this.lastKey = t, this.rows = [];
@@ -22223,10 +22223,10 @@ var Zee = class extends Do {
return r.join(" ");
}
constructor(...e) {
- super(...e), this.headerRows = [], this.columns = [], this.rows = [], this.rowHeaderColumnKeys = /* @__PURE__ */ new Set(), this.head = new C_(-1), this.columnsDirty = !0, this.expandedKeys = /* @__PURE__ */ new Set();
+ super(...e), this.headerRows = [], this.columns = [], this.rows = [], this.rowHeaderColumnKeys = /* @__PURE__ */ new Set(), this.head = new S_(-1), this.columnsDirty = !0, this.expandedKeys = /* @__PURE__ */ new Set();
}
-}, Qee = /*#__PURE__*/ (0, B.createContext)(null), $ee = /*#__PURE__*/ (0, B.createContext)(null), b_ = /*#__PURE__*/ (0, B.createContext)(null), x_ = /*#__PURE__*/ (0, B.createContext)(null), ete = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- [e, t] = ei(e, t, $ee);
+}, $ee = /*#__PURE__*/ (0, B.createContext)(null), ete = /*#__PURE__*/ (0, B.createContext)(null), y_ = /*#__PURE__*/ (0, B.createContext)(null), b_ = /*#__PURE__*/ (0, B.createContext)(null), tte = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ [e, t] = ei(e, t, ete);
let n = Bd(e), { selectionBehavior: r, selectionMode: i, disallowEmptySelection: a } = n, o = !!e.dragAndDropHooks?.useDraggableCollectionState, s = (0, B.useMemo)(() => ({
selectionBehavior: i === "none" ? null : r,
selectionMode: i,
@@ -22237,17 +22237,17 @@ var Zee = class extends Do {
i,
a,
o
- ]), c = /*#__PURE__*/ B.createElement(rte.Provider, { value: s }, /*#__PURE__*/ B.createElement(Es, e));
+ ]), c = /*#__PURE__*/ B.createElement(ite.Provider, { value: s }, /*#__PURE__*/ B.createElement(Es, e));
return /*#__PURE__*/ B.createElement(ms, {
content: c,
- createCollection: () => new Zee()
- }, (r) => /*#__PURE__*/ B.createElement(nte, {
+ createCollection: () => new Qee()
+ }, (r) => /*#__PURE__*/ B.createElement(rte, {
props: e,
forwardedRef: t,
selectionState: n,
collection: r
}));
-}), tte = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+}), nte = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
let { isVirtualized: n } = (0, B.useContext)(Ms);
return n ? /*#__PURE__*/ B.createElement(ai.div, {
...e,
@@ -22256,7 +22256,7 @@ var Zee = class extends Do {
...e,
ref: t
});
-}), S_ = {
+}), x_ = {
expand: {
ltr: "ArrowRight",
rtl: "ArrowLeft"
@@ -22266,9 +22266,9 @@ var Zee = class extends Do {
rtl: "ArrowRight"
}
};
-function nte({ props: e, forwardedRef: t, selectionState: n, collection: r }) {
+function rte({ props: e, forwardedRef: t, selectionState: n, collection: r }) {
[e, t] = ei(e, t, bo);
- let { shouldUseVirtualFocus: i, disallowTypeAhead: a, filter: o, ...s } = e, c = (0, B.useContext)(Qee);
+ let { shouldUseVirtualFocus: i, disallowTypeAhead: a, filter: o, ...s } = e, c = (0, B.useContext)($ee);
t = Yr((0, B.useMemo)(() => Gr(t, c?.tableRef), [t, c?.tableRef]));
let [l, u] = yo(e.expandedKeys ? new Set(e.expandedKeys) : void 0, e.defaultExpandedKeys ? new Set(e.defaultExpandedKeys) : /* @__PURE__ */ new Set(), e.onExpandedChange);
r = (0, B.useMemo)(() => r.withExpandedKeys(l), [r, l]);
@@ -22279,7 +22279,7 @@ function nte({ props: e, forwardedRef: t, selectionState: n, collection: r }) {
UNSAFE_selectionState: n,
expandedKeys: l,
onExpandedChange: u
- }), f = Iee(d, o), { isVirtualized: p, layoutDelegate: m, dropTargetDelegate: h, CollectionRoot: g } = (0, B.useContext)(Ms), { dragAndDropHooks: _ } = e, { gridProps: v } = Hee({
+ }), f = Iee(d, o), { isVirtualized: p, layoutDelegate: m, dropTargetDelegate: h, CollectionRoot: g } = (0, B.useContext)(Ms), { dragAndDropHooks: _ } = e, { gridProps: v } = Bee({
...s,
layoutDelegate: m,
isVirtualized: p
@@ -22320,7 +22320,7 @@ function nte({ props: e, forwardedRef: t, selectionState: n, collection: r }) {
let t = C?.target;
if (t && t.type === "item" && t.dropPosition === "on") {
let n = d.collection.getItem(t.key);
- (e.key === S_.expand[O] && n?.hasChildNodes && !d.expandedKeys.has(t.key) || e.key === S_.collapse[O] && n?.hasChildNodes && d.expandedKeys.has(t.key)) && d.toggleKey(t.key);
+ (e.key === x_.expand[O] && n?.hasChildNodes && !d.expandedKeys.has(t.key) || e.key === x_.collapse[O] && n?.hasChildNodes && d.expandedKeys.has(t.key)) && d.toggleKey(t.key);
}
}
}, C, t), T = C.isDropTarget({ type: "root" });
@@ -22343,17 +22343,17 @@ function nte({ props: e, forwardedRef: t, selectionState: n, collection: r }) {
}));
let F = Bs(e, { global: !0 });
return /*#__PURE__*/ B.createElement(Zr, { values: [
- [b_, f],
- [x_, P],
+ [y_, f],
+ [b_, P],
[hu, {
dragAndDropHooks: _,
dragState: S,
dropState: C
}],
- [gu, { render: pte }],
+ [gu, { render: mte }],
[bo, null],
[xo, null]
- ] }, /*#__PURE__*/ B.createElement(Fu, null, /*#__PURE__*/ B.createElement(tte, {
+ ] }, /*#__PURE__*/ B.createElement(Fu, null, /*#__PURE__*/ B.createElement(nte, {
...U(F, N, v, A, w?.collectionProps),
style: te,
ref: t,
@@ -22369,11 +22369,11 @@ function nte({ props: e, forwardedRef: t, selectionState: n, collection: r }) {
persistedKeys: yu(y, _, C)
})))), E);
}
-var rte = /*#__PURE__*/ (0, B.createContext)(null), C_ = class extends So {
+var ite = /*#__PURE__*/ (0, B.createContext)(null), S_ = class extends So {
static {
this.type = "tableheader";
}
-}, ite = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+}, ate = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
let { isVirtualized: n } = (0, B.useContext)(Ms);
return n ? /*#__PURE__*/ B.createElement(ai.div, {
...e,
@@ -22382,16 +22382,16 @@ var rte = /*#__PURE__*/ (0, B.createContext)(null), C_ = class extends So {
...e,
ref: t
});
-}), w_ = /*#__PURE__*/ Cs(C_, (e, t) => {
- let n = (0, B.useContext)(b_).collection, r = Mo({
+}), C_ = /*#__PURE__*/ Cs(S_, (e, t) => {
+ let n = (0, B.useContext)(y_).collection, r = Mo({
items: n.headerRows,
children: (0, B.useCallback)((e) => {
switch (e.type) {
- case "headerrow": return /*#__PURE__*/ B.createElement(ote, { item: e });
+ case "headerrow": return /*#__PURE__*/ B.createElement(ste, { item: e });
default: throw Error("Unsupported node type in TableHeader: " + e.type);
}
}, [])
- }), { rowGroupProps: i } = y_(), { hoverProps: a, isHovered: o } = _c({
+ }), { rowGroupProps: i } = v_(), { hoverProps: a, isHovered: o } = _c({
onHoverStart: e.onHoverStart,
onHoverChange: e.onHoverChange,
onHoverEnd: e.onHoverEnd
@@ -22401,7 +22401,7 @@ var rte = /*#__PURE__*/ (0, B.createContext)(null), C_ = class extends So {
defaultClassName: "react-aria-TableHeader",
values: { isHovered: o }
});
- return /*#__PURE__*/ B.createElement(ite, {
+ return /*#__PURE__*/ B.createElement(ate, {
...U(Bs(e, { global: !0 }), i, a),
...s,
ref: t,
@@ -22410,7 +22410,7 @@ var rte = /*#__PURE__*/ (0, B.createContext)(null), C_ = class extends So {
}, (e) => /*#__PURE__*/ B.createElement(Es, {
dependencies: e.dependencies,
items: e.columns
-}, e.children)), ate = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+}, e.children)), ote = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
let { isVirtualized: n } = (0, B.useContext)(Ms);
return n ? /*#__PURE__*/ B.createElement("div", {
...e,
@@ -22420,12 +22420,12 @@ var rte = /*#__PURE__*/ (0, B.createContext)(null), C_ = class extends So {
ref: t
});
});
-function ote({ item: e }) {
- let t = (0, B.useRef)(null), n = (0, B.useContext)(b_), { isVirtualized: r, CollectionBranch: i } = (0, B.useContext)(Ms), { rowProps: a } = Jee({
+function ste({ item: e }) {
+ let t = (0, B.useRef)(null), n = (0, B.useContext)(y_), { isVirtualized: r, CollectionBranch: i } = (0, B.useContext)(Ms), { rowProps: a } = Kee({
node: e,
isVirtualized: r
- }, n, t), { checkboxProps: o } = __(n);
- return /*#__PURE__*/ B.createElement(ate, {
+ }, n, t), { checkboxProps: o } = Xee(n);
+ return /*#__PURE__*/ B.createElement(ote, {
...a,
ref: t
}, /*#__PURE__*/ B.createElement(Zr, { values: [[xl, { slots: { selection: o } }], [Sl, { slots: { selection: o } }]] }, /*#__PURE__*/ B.createElement(i, {
@@ -22433,11 +22433,11 @@ function ote({ item: e }) {
parent: e
})));
}
-var ste = class extends So {
+var cte = class extends So {
static {
this.type = "column";
}
-}, cte = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+}, lte = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
let { isVirtualized: n } = (0, B.useContext)(Ms);
return n ? /*#__PURE__*/ B.createElement(ai.div, {
...e,
@@ -22446,13 +22446,13 @@ var ste = class extends So {
...e,
ref: t
});
-}), T_ = /*#__PURE__*/ Ss(ste, (e, t, n) => {
- let r = Yr(t), i = (0, B.useContext)(b_), { isVirtualized: a } = (0, B.useContext)(Ms), { columnHeaderProps: o, isPressed: s } = Wee({
+}), w_ = /*#__PURE__*/ Ss(cte, (e, t, n) => {
+ let r = Yr(t), i = (0, B.useContext)(y_), { isVirtualized: a } = (0, B.useContext)(Ms), { columnHeaderProps: o, isPressed: s } = Hee({
node: n,
isVirtualized: a,
focusMode: e.focusMode,
allowsArrowNavigation: e.allowsArrowNavigation
- }, i, r), { isFocused: c, isFocusVisible: l, focusProps: u } = dc(), d = (0, B.useContext)(x_), f = !1;
+ }, i, r), { isFocused: c, isFocusVisible: l, focusProps: u } = dc(), d = (0, B.useContext)(b_), f = !1;
d && (f = d.resizingColumn === n.key);
let { hoverProps: p, isHovered: m } = _c({ isDisabled: !e.allowsSorting }), h = Qr({
...e,
@@ -22481,7 +22481,7 @@ var ste = class extends So {
width: d.getColumnWidth(n.key)
});
let _ = Bs(e, { global: !0 });
- return delete _.id, /*#__PURE__*/ B.createElement(cte, {
+ return delete _.id, /*#__PURE__*/ B.createElement(lte, {
...U(_, o, u, p),
...h,
style: g,
@@ -22493,15 +22493,15 @@ var ste = class extends So {
"data-resizing": f || void 0,
"data-allows-sorting": n.props.allowsSorting || void 0,
"data-sort-direction": i.sortDescriptor?.column === n.key ? i.sortDescriptor.direction : void 0
- }, /*#__PURE__*/ B.createElement(Zr, { values: [[lte, {
+ }, /*#__PURE__*/ B.createElement(Zr, { values: [[ute, {
column: n,
triggerRef: r
}], [Ms, ks]] }, h.children));
-}), lte = /*#__PURE__*/ (0, B.createContext)(null), E_ = class extends Co {
+}), ute = /*#__PURE__*/ (0, B.createContext)(null), T_ = class extends Co {
static {
this.type = "tablebody";
}
-}, ute = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+}, dte = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
let { isVirtualized: n } = (0, B.useContext)(Ms);
return n ? /*#__PURE__*/ B.createElement(ai.div, {
...e,
@@ -22510,8 +22510,8 @@ var ste = class extends So {
...e,
ref: t
});
-}), D_ = /*#__PURE__*/ Cs(E_, (e, t, n) => {
- let r = (0, B.useContext)(b_), { isVirtualized: i } = (0, B.useContext)(Ms), a = r.collection, { CollectionBranch: o } = (0, B.useContext)(Ms), { dragAndDropHooks: s, dropState: c } = (0, B.useContext)(hu), l = !!s?.useDroppableCollectionState && !c?.isDisabled, u = l && !!c && (c.isDropTarget({ type: "root" }) ?? !1), d = a.size === 0, f = {
+}), E_ = /*#__PURE__*/ Cs(T_, (e, t, n) => {
+ let r = (0, B.useContext)(y_), { isVirtualized: i } = (0, B.useContext)(Ms), a = r.collection, { CollectionBranch: o } = (0, B.useContext)(Ms), { dragAndDropHooks: s, dropState: c } = (0, B.useContext)(hu), l = !!s?.useDroppableCollectionState && !c?.isDisabled, u = l && !!c && (c.isDropTarget({ type: "root" }) ?? !1), d = a.size === 0, f = {
isDropTarget: u,
isEmpty: d
}, p = Qr({
@@ -22523,22 +22523,22 @@ var ste = class extends So {
}), m, h = a.columnCount;
if (d && e.renderEmptyState && r) {
let t = {}, n = {}, r = {};
- i ? (n["aria-colspan"] = h, r = { display: "contents" }) : n.colSpan = h, m = /*#__PURE__*/ B.createElement(k_, {
+ i ? (n["aria-colspan"] = h, r = { display: "contents" }) : n.colSpan = h, m = /*#__PURE__*/ B.createElement(O_, {
role: "row",
...t,
style: r
- }, /*#__PURE__*/ B.createElement(j_, {
+ }, /*#__PURE__*/ B.createElement(A_, {
role: "rowheader",
...n,
style: r
}, e.renderEmptyState(f)));
}
- let { rowGroupProps: g } = y_(), _ = Bs(e, { global: !0 });
- return /*#__PURE__*/ B.createElement(ute, {
+ let { rowGroupProps: g } = v_(), _ = Bs(e, { global: !0 });
+ return /*#__PURE__*/ B.createElement(dte, {
...U(_, p, g),
ref: t,
"data-empty": d || void 0
- }, l && /*#__PURE__*/ B.createElement(vte, null), /*#__PURE__*/ B.createElement(o, {
+ }, l && /*#__PURE__*/ B.createElement(yte, null), /*#__PURE__*/ B.createElement(o, {
collection: a,
parent: n,
renderDropIndicator: vu(s, c)
@@ -22549,7 +22549,7 @@ var ste = class extends So {
this.type = "tablefooter";
}
});
-var O_ = /*#__PURE__*/ (0, B.createContext)({ isFocusVisibleWithinRow: !1 }), dte = class extends So {
+var D_ = /*#__PURE__*/ (0, B.createContext)({ isFocusVisibleWithinRow: !1 }), fte = class extends So {
static {
this.type = "item";
}
@@ -22561,7 +22561,7 @@ var O_ = /*#__PURE__*/ (0, B.createContext)({ isFocusVisibleWithinRow: !1 }), dt
}
return null;
}
-}, k_ = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+}, O_ = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
let { isVirtualized: n } = (0, B.useContext)(Ms);
return n ? /*#__PURE__*/ B.createElement(ai.div, {
...e,
@@ -22570,8 +22570,8 @@ var O_ = /*#__PURE__*/ (0, B.createContext)({ isFocusVisibleWithinRow: !1 }), dt
...e,
ref: t
});
-}), A_ = /*#__PURE__*/ Cs(dte, (e, t, n) => {
- let r = Yr(t), i = (0, B.useContext)(b_), { dragAndDropHooks: a, dragState: o, dropState: s } = (0, B.useContext)(hu), { isVirtualized: c, CollectionBranch: l } = (0, B.useContext)(Ms), u = o && !(o.isDisabled || o.selectionManager.isDisabled(n.key)), { rowProps: d, expandButtonProps: f, ...p } = qee({
+}), k_ = /*#__PURE__*/ Cs(fte, (e, t, n) => {
+ let r = Yr(t), i = (0, B.useContext)(y_), { dragAndDropHooks: a, dragState: o, dropState: s } = (0, B.useContext)(hu), { isVirtualized: c, CollectionBranch: l } = (0, B.useContext)(Ms), u = o && !(o.isDisabled || o.selectionManager.isDisabled(n.key)), { rowProps: d, expandButtonProps: f, ...p } = Gee({
node: n,
shouldSelectOnPressUp: !!o,
isVirtualized: c
@@ -22580,7 +22580,7 @@ var O_ = /*#__PURE__*/ (0, B.createContext)({ isFocusVisibleWithinRow: !1 }), dt
onHoverStart: e.onHoverStart,
onHoverChange: e.onHoverChange,
onHoverEnd: e.onHoverEnd
- }), { checkboxProps: x } = g_({ key: n.key }, i), S;
+ }), { checkboxProps: x } = Yee({ key: n.key }, i), S;
o && a && (S = a.useDraggableItem({
key: n.key,
hasDragButton: !0
@@ -22617,10 +22617,10 @@ var O_ = /*#__PURE__*/ (0, B.createContext)({ isFocusVisibleWithinRow: !1 }), dt
level: n.level + 1
}
}), N = Bs(e, { global: !0 });
- return delete N.id, delete N.onClick, /*#__PURE__*/ B.createElement(B.Fragment, null, C && !C.isHidden && /*#__PURE__*/ B.createElement(k_, {
+ return delete N.id, delete N.onClick, /*#__PURE__*/ B.createElement(B.Fragment, null, C && !C.isHidden && /*#__PURE__*/ B.createElement(O_, {
role: "row",
style: { height: 0 }
- }, /*#__PURE__*/ B.createElement(j_, {
+ }, /*#__PURE__*/ B.createElement(A_, {
role: "gridcell",
colSpan: i.collection.columnCount,
style: { padding: 0 }
@@ -22629,7 +22629,7 @@ var O_ = /*#__PURE__*/ (0, B.createContext)({ isFocusVisibleWithinRow: !1 }), dt
...T,
...C.dropIndicatorProps,
ref: w
- }))), /*#__PURE__*/ B.createElement(k_, {
+ }))), /*#__PURE__*/ B.createElement(O_, {
...U(N, M, d, g, y, S?.dragProps, v),
ref: r,
"data-disabled": p.isDisabled || void 0,
@@ -22664,7 +22664,7 @@ var O_ = /*#__PURE__*/ (0, B.createContext)({ isFocusVisibleWithinRow: !1 }), dt
}
} }],
[Cu, { isSelected: p.isSelected }],
- [O_, { isFocusVisibleWithinRow: _ }]
+ [D_, { isFocusVisibleWithinRow: _ }]
] }, /*#__PURE__*/ B.createElement(l, {
collection: i.collection,
parent: n
@@ -22677,11 +22677,11 @@ var O_ = /*#__PURE__*/ (0, B.createContext)({ isFocusVisibleWithinRow: !1 }), dt
items: e.columns,
idScope: e.id
}, e.children);
-}), fte = class extends So {
+}), pte = class extends So {
static {
this.type = "cell";
}
-}, j_ = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+}, A_ = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
let { isVirtualized: n } = (0, B.useContext)(Ms);
return n ? /*#__PURE__*/ B.createElement(ai.div, {
...e,
@@ -22690,16 +22690,16 @@ var O_ = /*#__PURE__*/ (0, B.createContext)({ isFocusVisibleWithinRow: !1 }), dt
...e,
ref: t
});
-}), M_ = /*#__PURE__*/ Ss(fte, (e, t, n) => {
- let r = Yr(t), i = (0, B.useContext)(b_), { dragState: a } = (0, B.useContext)(hu), { isVirtualized: o } = (0, B.useContext)(Ms);
+}), j_ = /*#__PURE__*/ Ss(pte, (e, t, n) => {
+ let r = Yr(t), i = (0, B.useContext)(y_), { dragState: a } = (0, B.useContext)(hu), { isVirtualized: o } = (0, B.useContext)(Ms);
n.column = i.collection.columns[n.index];
- let { gridCellProps: s, isPressed: c } = Yee({
+ let { gridCellProps: s, isPressed: c } = qee({
node: n,
shouldSelectOnPressUp: !!a,
isVirtualized: o,
focusMode: e.focusMode,
allowsArrowNavigation: e.allowsArrowNavigation
- }, i, r), { isFocused: l, isFocusVisible: u, focusProps: d } = dc(), { hoverProps: f, isHovered: p } = _c({}), { isFocusVisibleWithinRow: m } = (0, B.useContext)(O_), h = n.parentKey != null && i.selectionManager.isSelected(n.parentKey), g = n.colIndex || n.index, _ = i.collection.getItem(n.parentKey), v = _.props.hasChildItems || i.collection.getItem(_.lastChildKey)?.type !== "cell", y = v && i.expandedKeys.has(n.parentKey), b = i.selectionManager.isDisabled(n.parentKey), x = Qr({
+ }, i, r), { isFocused: l, isFocusVisible: u, focusProps: d } = dc(), { hoverProps: f, isHovered: p } = _c({}), { isFocusVisibleWithinRow: m } = (0, B.useContext)(D_), h = n.parentKey != null && i.selectionManager.isSelected(n.parentKey), g = n.colIndex || n.index, _ = i.collection.getItem(n.parentKey), v = _.props.hasChildItems || i.collection.getItem(_.lastChildKey)?.type !== "cell", y = v && i.expandedKeys.has(n.parentKey), b = i.selectionManager.isDisabled(n.parentKey), x = Qr({
...e,
id: void 0,
defaultClassName: "react-aria-Cell",
@@ -22719,7 +22719,7 @@ var O_ = /*#__PURE__*/ (0, B.createContext)({ isFocusVisibleWithinRow: !1 }), dt
isTreeColumn: n.column.key === i.treeColumn
}
}), S = Bs(e, { global: !0 });
- return delete S.id, /*#__PURE__*/ B.createElement(j_, {
+ return delete S.id, /*#__PURE__*/ B.createElement(A_, {
...U(S, x, s, d, f),
ref: r,
"data-focused": l || void 0,
@@ -22735,12 +22735,12 @@ var O_ = /*#__PURE__*/ (0, B.createContext)({ isFocusVisibleWithinRow: !1 }), dt
"data-disabled": b || void 0
}, /*#__PURE__*/ B.createElement(Ms.Provider, { value: ks }, x.children));
});
-function pte(e, t) {
+function mte(e, t) {
t = Yr(t);
let { dragAndDropHooks: n, dropState: r } = (0, B.useContext)(hu), i = (0, B.useRef)(null), { dropIndicatorProps: a, isHidden: o, isDropTarget: s } = n.useDropIndicator(e, r, i);
if (o) return null;
let c = r && e.target.type === "item" ? (r.collection.getItem(e.target.key)?.level || 0) + 1 : 1;
- return /*#__PURE__*/ B.createElement(_te, {
+ return /*#__PURE__*/ B.createElement(vte, {
...e,
dropIndicatorProps: a,
isDropTarget: s,
@@ -22749,7 +22749,7 @@ function pte(e, t) {
ref: t
});
}
-var mte = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+var hte = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
let { isVirtualized: n } = (0, B.useContext)(Ms);
return n ? /*#__PURE__*/ B.createElement(ai.div, {
...e,
@@ -22758,7 +22758,7 @@ var mte = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
...e,
ref: t
});
-}), hte = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+}), gte = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
let { isVirtualized: n } = (0, B.useContext)(Ms);
return n ? /*#__PURE__*/ B.createElement(ai.div, {
...e,
@@ -22768,21 +22768,21 @@ var mte = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
ref: t
});
});
-function gte(e, t) {
- let { dropIndicatorProps: n, isDropTarget: r, buttonRef: i, level: a, ...o } = e, s = (0, B.useContext)(b_), { visuallyHiddenProps: c } = qc(), l = Qr({
+function _te(e, t) {
+ let { dropIndicatorProps: n, isDropTarget: r, buttonRef: i, level: a, ...o } = e, s = (0, B.useContext)(y_), { visuallyHiddenProps: c } = qc(), l = Qr({
...o,
defaultClassName: "react-aria-DropIndicator",
defaultStyle: { "--table-row-level": a + 1 },
values: { isDropTarget: r }
});
- return /*#__PURE__*/ B.createElement(mte, {
+ return /*#__PURE__*/ B.createElement(hte, {
...Bs(e, { global: !0 }),
...l,
role: "row",
ref: t,
"data-drop-target": r || void 0,
"aria-level": a
- }, /*#__PURE__*/ B.createElement(hte, {
+ }, /*#__PURE__*/ B.createElement(gte, {
role: "gridcell",
colSpan: s.collection.columnCount,
style: { padding: 0 }
@@ -22793,14 +22793,14 @@ function gte(e, t) {
ref: i
}), l.children));
}
-var _te = /*#__PURE__*/ (0, B.forwardRef)(gte);
-function vte() {
- let e = (0, B.useContext)(b_), { dragAndDropHooks: t, dropState: n } = (0, B.useContext)(hu), r = (0, B.useRef)(null), { dropIndicatorProps: i } = t.useDropIndicator({ target: { type: "root" } }, n, r), a = n.isDropTarget({ type: "root" }), { visuallyHiddenProps: o } = qc();
- return !a && i["aria-hidden"] ? null : /*#__PURE__*/ B.createElement(k_, {
+var vte = /*#__PURE__*/ (0, B.forwardRef)(_te);
+function yte() {
+ let e = (0, B.useContext)(y_), { dragAndDropHooks: t, dropState: n } = (0, B.useContext)(hu), r = (0, B.useRef)(null), { dropIndicatorProps: i } = t.useDropIndicator({ target: { type: "root" } }, n, r), a = n.isDropTarget({ type: "root" }), { visuallyHiddenProps: o } = qc();
+ return !a && i["aria-hidden"] ? null : /*#__PURE__*/ B.createElement(O_, {
role: "row",
"aria-hidden": i["aria-hidden"],
style: { height: 0 }
- }, /*#__PURE__*/ B.createElement(j_, {
+ }, /*#__PURE__*/ B.createElement(A_, {
role: "gridcell",
colSpan: e.collection.columnCount,
style: { padding: 0 }
@@ -22812,7 +22812,7 @@ function vte() {
})));
}
Ss(wo, function(e, t, n) {
- let r = (0, B.useContext)(b_), { isVirtualized: i } = (0, B.useContext)(Ms), { isLoading: a, onLoadMore: o, scrollOffset: s, ...c } = e, l = r.collection.columns.length, u = (0, B.useRef)(null);
+ let r = (0, B.useContext)(y_), { isVirtualized: i } = (0, B.useContext)(Ms), { isLoading: a, onLoadMore: o, scrollOffset: s, ...c } = e, l = r.collection.columns.length, u = (0, B.useRef)(null);
Zd((0, B.useMemo)(() => ({
onLoadMore: o,
collection: r?.collection,
@@ -22831,10 +22831,10 @@ Ss(wo, function(e, t, n) {
defaultStyle: { "--table-row-level": n.level + 1 },
values: void 0
}), f = {}, p = {}, m = {};
- return i ? (p["aria-colspan"] = l, m = { display: "contents" }) : p.colSpan = l, /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(k_, {
+ return i ? (p["aria-colspan"] = l, m = { display: "contents" }) : p.colSpan = l, /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(O_, {
style: { height: 0 },
inert: Id(!0)
- }, /*#__PURE__*/ B.createElement(j_, { style: {
+ }, /*#__PURE__*/ B.createElement(A_, { style: {
padding: 0,
border: 0
} }, /*#__PURE__*/ B.createElement("div", {
@@ -22845,14 +22845,14 @@ Ss(wo, function(e, t, n) {
height: 1,
width: 1
}
- }))), a && d.children && /*#__PURE__*/ B.createElement(k_, {
+ }))), a && d.children && /*#__PURE__*/ B.createElement(O_, {
...U(Bs(e, { global: !0 }), f),
...d,
role: "row",
ref: t,
"aria-level": n.level + 1,
"data-level": n.level + 1
- }, /*#__PURE__*/ B.createElement(j_, {
+ }, /*#__PURE__*/ B.createElement(A_, {
role: "rowheader",
...p,
style: m
@@ -22860,13 +22860,13 @@ Ss(wo, function(e, t, n) {
});
//#endregion
//#region node_modules/react-aria/dist/private/tabs/utils.mjs
-var N_ = /* @__PURE__ */ new WeakMap();
-function P_(e, t, n) {
- return e ? (typeof t == "string" && (t = t.replace(/\s+/g, "")), `${N_.get(e)}-${n}-${t}`) : "";
+var M_ = /* @__PURE__ */ new WeakMap();
+function N_(e, t, n) {
+ return e ? (typeof t == "string" && (t = t.replace(/\s+/g, "")), `${M_.get(e)}-${n}-${t}`) : "";
}
//#endregion
//#region node_modules/react-aria/dist/private/tabs/useTab.mjs
-function yte(e, t, n) {
+function bte(e, t, n) {
let { key: r, isDisabled: i, shouldSelectOnPressUp: a } = e, { selectionManager: o, selectedKey: s } = t, c = r === s, l = i || t.isDisabled || t.selectionManager.isDisabled(r), u = t.collection.getItem(r), { itemProps: d, isPressed: f } = Cd({
selectionManager: o,
key: r,
@@ -22874,7 +22874,7 @@ function yte(e, t, n) {
isDisabled: l,
shouldSelectOnPressUp: a ?? u?.props.href != null,
linkBehavior: "selection"
- }), p = P_(t, r, "tab"), m = P_(t, r, "tabpanel"), { tabIndex: h } = d, g = Bs(u?.props, { labelable: !0 });
+ }), p = N_(t, r, "tab"), m = N_(t, r, "tabpanel"), { tabIndex: h } = d, g = Bs(u?.props, { labelable: !0 });
delete g.id;
let _ = pa(u?.props), { focusableProps: v } = is({
...u?.props,
@@ -22896,12 +22896,12 @@ function yte(e, t, n) {
}
//#endregion
//#region node_modules/react-aria/dist/private/tabs/useTabPanel.mjs
-function bte(e, t, n) {
- let r = eg(n) ? void 0 : 0, i = P_(t, e.id ?? t?.selectedKey, "tabpanel");
+function xte(e, t, n) {
+ let r = eg(n) ? void 0 : 0, i = N_(t, e.id ?? t?.selectedKey, "tabpanel");
return { tabPanelProps: U(Ga({
...e,
id: i,
- "aria-labelledby": P_(t, t?.selectedKey, "tab")
+ "aria-labelledby": N_(t, t?.selectedKey, "tab")
}), {
tabIndex: r,
role: "tabpanel",
@@ -22911,7 +22911,7 @@ function bte(e, t, n) {
}
//#endregion
//#region node_modules/react-aria/dist/private/tabs/TabsKeyboardDelegate.mjs
-var xte = class {
+var Ste = class {
constructor(e, t, n, r = /* @__PURE__ */ new Set()) {
this.collection = e, this.flipDirection = t === "rtl", this.disabledKeys = r, this.tabDirection = n === "horizontal";
}
@@ -22955,11 +22955,11 @@ var xte = class {
};
//#endregion
//#region node_modules/react-aria/dist/private/tabs/useTabList.mjs
-function Ste(e, t, n) {
+function Cte(e, t, n) {
let { orientation: r = "horizontal", keyboardActivation: i = "automatic" } = e, { collection: a, selectionManager: o, disabledKeys: s } = t, { direction: c } = no(), { collectionProps: l } = md({
ref: n,
selectionManager: o,
- keyboardDelegate: (0, B.useMemo)(() => new xte(a, c, r, s), [
+ keyboardDelegate: (0, B.useMemo)(() => new Ste(a, c, r, s), [
a,
s,
r,
@@ -22970,7 +22970,7 @@ function Ste(e, t, n) {
scrollRef: n,
linkBehavior: "selection"
}), u = Hr();
- return N_.set(t, u), { tabListProps: {
+ return M_.set(t, u), { tabListProps: {
...U(l, Ga({
...e,
id: u
@@ -22982,7 +22982,7 @@ function Ste(e, t, n) {
}
//#endregion
//#region node_modules/react-stately/dist/private/list/useSingleSelectListState.mjs
-function Cte(e) {
+function wte(e) {
let [t, n] = yo(e.selectedKey, e.defaultSelectedKey ?? null, e.onSelectionChange), r = (0, B.useMemo)(() => t == null ? [] : [t], [t]), { collection: i, disabledKeys: a, selectionManager: o } = Jd({
...e,
selectionMode: "single",
@@ -23006,24 +23006,24 @@ function Cte(e) {
}
//#endregion
//#region node_modules/react-stately/dist/private/tabs/useTabListState.mjs
-function wte(e) {
- let t = Cte({
+function Tte(e) {
+ let t = wte({
...e,
onSelectionChange: e.onSelectionChange ? (t) => {
t != null && e.onSelectionChange?.(t);
} : void 0,
suppressTextValueWarning: !0,
- defaultSelectedKey: e.defaultSelectedKey ?? F_(e.collection, e.disabledKeys ? new Set(e.disabledKeys) : /* @__PURE__ */ new Set()) ?? void 0
+ defaultSelectedKey: e.defaultSelectedKey ?? P_(e.collection, e.disabledKeys ? new Set(e.disabledKeys) : /* @__PURE__ */ new Set()) ?? void 0
}), { selectionManager: n, collection: r, selectedKey: i } = t, a = (0, B.useRef)(i);
return (0, B.useEffect)(() => {
let o = i;
- e.selectedKey == null && (n.isEmpty || o == null || !r.getItem(o)) && (o = F_(r, t.disabledKeys), o != null && n.setSelectedKeys([o])), (o != null && n.focusedKey == null || !n.isFocused && o !== a.current) && n.setFocusedKey(o), a.current = o;
+ e.selectedKey == null && (n.isEmpty || o == null || !r.getItem(o)) && (o = P_(r, t.disabledKeys), o != null && n.setSelectedKeys([o])), (o != null && n.focusedKey == null || !n.isFocused && o !== a.current) && n.setFocusedKey(o), a.current = o;
}), {
...t,
isDisabled: e.isDisabled || !1
};
}
-function F_(e, t) {
+function P_(e, t) {
let n = null;
if (e) {
for (n = e.getFirstKey(); n != null && (t.has(n) || e.getItem(n)?.props?.isDisabled) && n !== e.getLastKey();) n = e.getKeyAfter(n);
@@ -23033,20 +23033,20 @@ function F_(e, t) {
}
//#endregion
//#region node_modules/react-aria-components/dist/private/Tabs.mjs
-var I_ = /*#__PURE__*/ (0, B.createContext)(null), L_ = /*#__PURE__*/ (0, B.createContext)(null), R_ = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- [e, t] = ei(e, t, I_);
+var F_ = /*#__PURE__*/ (0, B.createContext)(null), I_ = /*#__PURE__*/ (0, B.createContext)(null), L_ = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ [e, t] = ei(e, t, F_);
let { children: n, orientation: r = "horizontal" } = e;
return n = (0, B.useMemo)(() => typeof n == "function" ? n({
orientation: r,
defaultChildren: null
- }) : n, [n, r]), /*#__PURE__*/ B.createElement(ms, { content: n }, (n) => /*#__PURE__*/ B.createElement(Tte, {
+ }) : n, [n, r]), /*#__PURE__*/ B.createElement(ms, { content: n }, (n) => /*#__PURE__*/ B.createElement(Ete, {
props: e,
collection: n,
tabsRef: t
}));
});
-function Tte({ props: e, tabsRef: t, collection: n }) {
- let { orientation: r = "horizontal" } = e, i = wte({
+function Ete({ props: e, tabsRef: t, collection: n }) {
+ let { orientation: r = "horizontal" } = e, i = Tte({
...e,
collection: n,
children: void 0
@@ -23071,16 +23071,16 @@ function Tte({ props: e, tabsRef: t, collection: n }) {
"data-orientation": r,
"data-focus-visible": s || void 0,
"data-disabled": i.isDisabled || void 0
- }, /*#__PURE__*/ B.createElement(Zr, { values: [[I_, e], [L_, i]] }, l.children));
+ }, /*#__PURE__*/ B.createElement(Zr, { values: [[F_, e], [I_, i]] }, l.children));
}
-var z_ = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- return (0, B.useContext)(L_) ? /*#__PURE__*/ B.createElement(Ete, {
+var R_ = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
+ return (0, B.useContext)(I_) ? /*#__PURE__*/ B.createElement(Dte, {
props: e,
forwardedRef: t
}) : /*#__PURE__*/ B.createElement(Es, e);
});
-function Ete({ props: e, forwardedRef: t }) {
- let n = (0, B.useContext)(L_), { CollectionRoot: r } = (0, B.useContext)(Ms), { orientation: i = "horizontal", keyboardActivation: a = "automatic" } = $r(I_), o = Yr(t), { tabListProps: s } = Ste({
+function Dte({ props: e, forwardedRef: t }) {
+ let n = (0, B.useContext)(I_), { CollectionRoot: r } = (0, B.useContext)(Ms), { orientation: i = "horizontal", keyboardActivation: a = "automatic" } = $r(F_), o = Yr(t), { tabListProps: s } = Cte({
...e,
orientation: i,
keyboardActivation: a
@@ -23102,12 +23102,12 @@ function Ete({ props: e, forwardedRef: t }) {
persistedKeys: Ns(n.selectionManager.focusedKey)
})));
}
-var B_ = /*#__PURE__*/ Ss(class extends So {
+var z_ = /*#__PURE__*/ Ss(class extends So {
static {
this.type = "item";
}
}, (e, t, n) => {
- let r = (0, B.useContext)(L_), i = Yr(t), { tabProps: a, isSelected: o, isDisabled: s, isPressed: c } = yte({
+ let r = (0, B.useContext)(I_), i = Yr(t), { tabProps: a, isSelected: o, isDisabled: s, isPressed: c } = bte({
key: n.key,
...e
}, r, i), { focusProps: l, isFocused: u, isFocusVisible: d } = dc(), { hoverProps: f, isHovered: p } = _c({
@@ -23139,19 +23139,19 @@ var B_ = /*#__PURE__*/ Ss(class extends So {
"data-pressed": c || void 0,
"data-hovered": p || void 0
}, /*#__PURE__*/ B.createElement(Cu.Provider, { value: { isSelected: o } }, m.children));
-}), V_ = /*#__PURE__*/ ss(function(e, t) {
- let n = (0, B.useContext)(L_), r = Yr(t), i = n.selectedKey === e.id, [a, o] = (0, B.useState)(n.selectedKey == null ? null : i);
+}), B_ = /*#__PURE__*/ ss(function(e, t) {
+ let n = (0, B.useContext)(I_), r = Yr(t), i = n.selectedKey === e.id, [a, o] = (0, B.useState)(n.selectedKey == null ? null : i);
a == null && n.selectedKey != null ? o(i) : !i && a && o(!1);
let s = Qp(r, i);
- return !i && !e.shouldForceMount && !s ? null : /*#__PURE__*/ B.createElement(Dte, {
+ return !i && !e.shouldForceMount && !s ? null : /*#__PURE__*/ B.createElement(Ote, {
...e,
tabPanelRef: r,
isInitiallySelected: a || !1,
isExiting: s
});
});
-function Dte(e) {
- let t = (0, B.useContext)(L_), { id: n, tabPanelRef: r, isInitiallySelected: i, isExiting: a, ...o } = e, { tabPanelProps: s } = bte(e, t, r), { focusProps: c, isFocused: l, isFocusVisible: u } = dc(), d = t.selectedKey === e.id, f = Zp(r) && !i, p = Qr({
+function Ote(e) {
+ let t = (0, B.useContext)(I_), { id: n, tabPanelRef: r, isInitiallySelected: i, isExiting: a, ...o } = e, { tabPanelProps: s } = xte(e, t, r), { focusProps: c, isFocused: l, isFocusVisible: u } = dc(), d = t.selectedKey === e.id, f = Zp(r) && !i, p = Qr({
...e,
defaultClassName: "react-aria-TabPanel",
values: {
@@ -23174,12 +23174,12 @@ function Dte(e) {
"data-inert": d ? void 0 : "true",
"data-entering": f || void 0,
"data-exiting": a || void 0
- }, /*#__PURE__*/ B.createElement(Zr, { values: [[I_, null], [L_, null]] }, /*#__PURE__*/ B.createElement(Ms.Provider, { value: ks }, p.children)));
+ }, /*#__PURE__*/ B.createElement(Zr, { values: [[F_, null], [I_, null]] }, /*#__PURE__*/ B.createElement(Ms.Provider, { value: ks }, p.children)));
}
//#endregion
//#region node_modules/react-aria-components/dist/private/TextArea.mjs
-var Ote = /*#__PURE__*/ (0, B.createContext)({}), kte = /*#__PURE__*/ (0, B.createContext)(null), Ate = /*#__PURE__*/ ss(function(e, t) {
- [e, t] = ei(e, t, kte);
+var kte = /*#__PURE__*/ (0, B.createContext)({}), Ate = /*#__PURE__*/ (0, B.createContext)(null), jte = /*#__PURE__*/ ss(function(e, t) {
+ [e, t] = ei(e, t, Ate);
let { validationBehavior: n } = $r(sl) || {}, r = e.validationBehavior ?? n ?? "native", i = (0, B.useRef)(null);
[e, i] = ei(e, i, xo);
let [a, o] = ti(!e["aria-label"] && !e["aria-labelledby"]), [s, c] = (0, B.useState)("input"), { labelProps: l, inputProps: u, descriptionProps: d, errorMessageProps: f, ...p } = Nl({
@@ -23217,7 +23217,7 @@ var Ote = /*#__PURE__*/ (0, B.createContext)({}), kte = /*#__PURE__*/ (0, B.crea
...u,
ref: m
}],
- [Ote, {
+ [kte, {
...u,
ref: m
}],
@@ -23235,34 +23235,34 @@ var Ote = /*#__PURE__*/ (0, B.createContext)({}), kte = /*#__PURE__*/ (0, B.crea
});
//#endregion
//#region node_modules/motion-utils/dist/es/array.mjs
-function H_(e, t) {
+function V_(e, t) {
e.indexOf(t) === -1 && e.push(t);
}
-function U_(e, t) {
+function H_(e, t) {
let n = e.indexOf(t);
n > -1 && e.splice(n, 1);
}
//#endregion
//#region node_modules/motion-utils/dist/es/clamp.mjs
-var W_ = (e, t, n) => n > t ? t : n < e ? e : n, G_ = {}, K_ = (e) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e), q_ = (e) => typeof e == "object" && !!e, J_ = (e) => /^0[^.\s]+$/u.test(e);
+var U_ = (e, t, n) => n > t ? t : n < e ? e : n, W_ = {}, G_ = (e) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e), K_ = (e) => typeof e == "object" && !!e, q_ = (e) => /^0[^.\s]+$/u.test(e);
//#endregion
//#region node_modules/motion-utils/dist/es/memo.mjs
/*#__NO_SIDE_EFFECTS__*/
-function Y_(e) {
+function J_(e) {
let t;
return () => (t === void 0 && (t = e()), t);
}
//#endregion
//#region node_modules/motion-utils/dist/es/noop.mjs
-var X_ = /* @__NO_SIDE_EFFECTS__ */ (e) => e, Z_ = (...e) => e.reduce((e, t) => (n) => t(e(n))), Q_ = /* @__NO_SIDE_EFFECTS__ */ (e, t, n) => {
+var Y_ = /* @__NO_SIDE_EFFECTS__ */ (e) => e, X_ = (...e) => e.reduce((e, t) => (n) => t(e(n))), Z_ = /* @__NO_SIDE_EFFECTS__ */ (e, t, n) => {
let r = t - e;
return r ? (n - e) / r : 1;
-}, $_ = class {
+}, Q_ = class {
constructor() {
this.subscriptions = [];
}
add(e) {
- return H_(this.subscriptions, e), () => U_(this.subscriptions, e);
+ return V_(this.subscriptions, e), () => H_(this.subscriptions, e);
}
notify(e, t, n) {
let r = this.subscriptions.length;
@@ -23280,42 +23280,42 @@ var X_ = /* @__NO_SIDE_EFFECTS__ */ (e) => e, Z_ = (...e) => e.reduce((e, t) =>
clear() {
this.subscriptions.length = 0;
}
-}, ev = /* @__NO_SIDE_EFFECTS__ */ (e) => e * 1e3, tv = /* @__NO_SIDE_EFFECTS__ */ (e) => e / 1e3, nv = /* @__NO_SIDE_EFFECTS__ */ (e, t) => t ? 1e3 / t * e : 0, rv = (e, t, n) => (((1 - 3 * n + 3 * t) * e + (3 * n - 6 * t)) * e + 3 * t) * e, jte = 1e-7, Mte = 12;
-function Nte(e, t, n, r, i) {
+}, $_ = /* @__NO_SIDE_EFFECTS__ */ (e) => e * 1e3, ev = /* @__NO_SIDE_EFFECTS__ */ (e) => e / 1e3, tv = /* @__NO_SIDE_EFFECTS__ */ (e, t) => t ? 1e3 / t * e : 0, nv = (e, t, n) => (((1 - 3 * n + 3 * t) * e + (3 * n - 6 * t)) * e + 3 * t) * e, Mte = 1e-7, Nte = 12;
+function Pte(e, t, n, r, i) {
let a, o, s = 0;
do
- o = t + (n - t) / 2, a = rv(o, r, i) - e, a > 0 ? n = o : t = o;
- while (Math.abs(a) > jte && ++s < Mte);
+ o = t + (n - t) / 2, a = nv(o, r, i) - e, a > 0 ? n = o : t = o;
+ while (Math.abs(a) > Mte && ++s < Nte);
return o;
}
/*#__NO_SIDE_EFFECTS__*/
-function iv(e, t, n, r) {
- if (e === t && n === r) return X_;
- let i = (t) => Nte(t, 0, 1, e, n);
- return (e) => e === 0 || e === 1 ? e : rv(i(e), t, r);
+function rv(e, t, n, r) {
+ if (e === t && n === r) return Y_;
+ let i = (t) => Pte(t, 0, 1, e, n);
+ return (e) => e === 0 || e === 1 ? e : nv(i(e), t, r);
}
//#endregion
//#region node_modules/motion-utils/dist/es/easing/modifiers/mirror.mjs
-var av = /* @__NO_SIDE_EFFECTS__ */ (e) => (t) => t <= .5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, ov = /* @__NO_SIDE_EFFECTS__ */ (e) => (t) => 1 - e(1 - t), sv = /*@__PURE__*/ iv(.33, 1.53, .69, .99), cv = /*@__PURE__*/ ov(sv), lv = /*@__PURE__*/ av(cv), uv = (e) => e >= 1 ? 1 : (e *= 2) < 1 ? .5 * cv(e) : .5 * (2 - 2 ** (-10 * (e - 1))), dv = (e) => 1 - Math.sin(Math.acos(e)), fv = /* @__PURE__ */ ov(dv), pv = /* @__PURE__ */ av(dv), Pte = /*@__PURE__*/ iv(.42, 0, 1, 1), Fte = /*@__PURE__*/ iv(0, 0, .58, 1), mv = /*@__PURE__*/ iv(.42, 0, .58, 1), Ite = /* @__NO_SIDE_EFFECTS__ */ (e) => Array.isArray(e) && typeof e[0] != "number", hv = /* @__NO_SIDE_EFFECTS__ */ (e) => Array.isArray(e) && typeof e[0] == "number", gv = {
- linear: X_,
- easeIn: Pte,
- easeInOut: mv,
- easeOut: Fte,
- circIn: dv,
- circInOut: pv,
- circOut: fv,
- backIn: cv,
- backInOut: lv,
- backOut: sv,
- anticipate: uv
-}, Lte = (e) => typeof e == "string", _v = (e) => {
- if (/* @__PURE__ */ hv(e)) {
+var iv = /* @__NO_SIDE_EFFECTS__ */ (e) => (t) => t <= .5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, av = /* @__NO_SIDE_EFFECTS__ */ (e) => (t) => 1 - e(1 - t), ov = /*@__PURE__*/ rv(.33, 1.53, .69, .99), sv = /*@__PURE__*/ av(ov), cv = /*@__PURE__*/ iv(sv), lv = (e) => e >= 1 ? 1 : (e *= 2) < 1 ? .5 * sv(e) : .5 * (2 - 2 ** (-10 * (e - 1))), uv = (e) => 1 - Math.sin(Math.acos(e)), dv = /* @__PURE__ */ av(uv), fv = /* @__PURE__ */ iv(uv), Fte = /*@__PURE__*/ rv(.42, 0, 1, 1), Ite = /*@__PURE__*/ rv(0, 0, .58, 1), pv = /*@__PURE__*/ rv(.42, 0, .58, 1), Lte = /* @__NO_SIDE_EFFECTS__ */ (e) => Array.isArray(e) && typeof e[0] != "number", mv = /* @__NO_SIDE_EFFECTS__ */ (e) => Array.isArray(e) && typeof e[0] == "number", hv = {
+ linear: Y_,
+ easeIn: Fte,
+ easeInOut: pv,
+ easeOut: Ite,
+ circIn: uv,
+ circInOut: fv,
+ circOut: dv,
+ backIn: sv,
+ backInOut: cv,
+ backOut: ov,
+ anticipate: lv
+}, Rte = (e) => typeof e == "string", gv = (e) => {
+ if (/* @__PURE__ */ mv(e)) {
e.length;
let [t, n, r, i] = e;
- return /* @__PURE__ */ iv(t, n, r, i);
+ return /* @__PURE__ */ rv(t, n, r, i);
}
- return Lte(e) ? (gv[e], `${e}`, gv[e]) : e;
-}, vv = [
+ return Rte(e) ? (hv[e], `${e}`, hv[e]) : e;
+}, _v = [
"setup",
"read",
"resolveKeyframes",
@@ -23327,7 +23327,7 @@ var av = /* @__NO_SIDE_EFFECTS__ */ (e) => (t) => t <= .5 ? e(2 * t) / 2 : (2 -
];
//#endregion
//#region node_modules/motion-dom/dist/es/frameloop/render-step.mjs
-function yv(e) {
+function zte(e) {
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = !1, i = !1, a = /* @__PURE__ */ new WeakSet(), o = {
delta: 0,
timestamp: 0,
@@ -23358,25 +23358,25 @@ function yv(e) {
}
//#endregion
//#region node_modules/motion-dom/dist/es/frameloop/batcher.mjs
-var bv = 40;
-function xv(e, t) {
+var Bte = 40;
+function vv(e, t) {
let n = !1, r = !0, i = {
delta: 0,
timestamp: 0,
isProcessing: !1
- }, a = () => n = !0, o = vv.reduce((e, t) => (e[t] = yv(a), e), {}), { setup: s, read: c, resolveKeyframes: l, preUpdate: u, update: d, preRender: f, render: p, postRender: m } = o, h = () => {
- let a = G_.useManualTiming, o = a ? i.timestamp : performance.now();
- n = !1, a || (i.delta = r ? 1e3 / 60 : Math.max(Math.min(o - i.timestamp, bv), 1)), i.timestamp = o, i.isProcessing = !0, s.process(i), c.process(i), l.process(i), u.process(i), d.process(i), f.process(i), p.process(i), m.process(i), i.isProcessing = !1, n && t && (r = !1, e(h));
+ }, a = () => n = !0, o = _v.reduce((e, t) => (e[t] = zte(a), e), {}), { setup: s, read: c, resolveKeyframes: l, preUpdate: u, update: d, preRender: f, render: p, postRender: m } = o, h = () => {
+ let a = W_.useManualTiming, o = a ? i.timestamp : performance.now();
+ n = !1, a || (i.delta = r ? 1e3 / 60 : Math.max(Math.min(o - i.timestamp, Bte), 1)), i.timestamp = o, i.isProcessing = !0, s.process(i), c.process(i), l.process(i), u.process(i), d.process(i), f.process(i), p.process(i), m.process(i), i.isProcessing = !1, n && t && (r = !1, e(h));
}, g = () => {
n = !0, r = !0, i.isProcessing || e(h);
};
return {
- schedule: vv.reduce((e, t) => {
+ schedule: _v.reduce((e, t) => {
let r = o[t];
return e[t] = (e, t = !1, i = !1) => (n || g(), r.schedule(e, t, i)), e;
}, {}),
cancel: (e) => {
- for (let t = 0; t < vv.length; t++) o[vv[t]].cancel(e);
+ for (let t = 0; t < _v.length; t++) o[_v[t]].cancel(e);
},
state: i,
steps: o
@@ -23384,59 +23384,59 @@ function xv(e, t) {
}
//#endregion
//#region node_modules/motion-dom/dist/es/frameloop/frame.mjs
-var { schedule: Sv, cancel: Cv, state: wv, steps: Tv } = /* @__PURE__ */ xv(typeof requestAnimationFrame < "u" ? requestAnimationFrame : X_, !0), Ev;
-function Rte() {
- Ev = void 0;
+var { schedule: yv, cancel: bv, state: xv, steps: Sv } = /* @__PURE__ */ vv(typeof requestAnimationFrame < "u" ? requestAnimationFrame : Y_, !0), Cv;
+function Vte() {
+ Cv = void 0;
}
-var Dv = {
- now: () => (Ev === void 0 && Dv.set(wv.isProcessing || G_.useManualTiming ? wv.timestamp : performance.now()), Ev),
+var wv = {
+ now: () => (Cv === void 0 && wv.set(xv.isProcessing || W_.useManualTiming ? xv.timestamp : performance.now()), Cv),
set: (e) => {
- Ev = e, queueMicrotask(Rte);
+ Cv = e, queueMicrotask(Vte);
}
-}, Ov = (e) => (t) => typeof t == "string" && t.startsWith(e), kv = /*@__PURE__*/ Ov("--"), zte = /*@__PURE__*/ Ov("var(--"), Av = (e) => zte(e) ? Bte.test(e.split("/*")[0].trim()) : !1, Bte = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
-function jv(e) {
+}, Tv = (e) => (t) => typeof t == "string" && t.startsWith(e), Ev = /*@__PURE__*/ Tv("--"), Hte = /*@__PURE__*/ Tv("var(--"), Dv = (e) => Hte(e) ? Ute.test(e.split("/*")[0].trim()) : !1, Ute = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
+function Ov(e) {
return typeof e == "string" && e.split("/*")[0].includes("var(--");
}
//#endregion
//#region node_modules/motion-dom/dist/es/value/types/numbers/index.mjs
-var Mv = {
+var kv = {
test: (e) => typeof e == "number",
parse: parseFloat,
transform: (e) => e
-}, Nv = {
- ...Mv,
- transform: (e) => W_(0, 1, e)
-}, Pv = {
- ...Mv,
+}, Av = {
+ ...kv,
+ transform: (e) => U_(0, 1, e)
+}, jv = {
+ ...kv,
default: 1
-}, Fv = (e) => Math.round(e * 1e5) / 1e5, Iv = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
+}, Mv = (e) => Math.round(e * 1e5) / 1e5, Nv = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
//#endregion
//#region node_modules/motion-dom/dist/es/value/types/utils/is-nullish.mjs
-function Vte(e) {
+function Wte(e) {
return e == null;
}
//#endregion
//#region node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.mjs
-var Hte = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, Lv = (e, t) => (n) => !!(typeof n == "string" && Hte.test(n) && n.startsWith(e) || t && !Vte(n) && Object.prototype.hasOwnProperty.call(n, t)), Rv = (e, t, n) => (r) => {
+var Gte = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, Pv = (e, t) => (n) => !!(typeof n == "string" && Gte.test(n) && n.startsWith(e) || t && !Wte(n) && Object.prototype.hasOwnProperty.call(n, t)), Fv = (e, t, n) => (r) => {
if (typeof r != "string") return r;
- let [i, a, o, s] = r.match(Iv);
+ let [i, a, o, s] = r.match(Nv);
return {
[e]: parseFloat(i),
[t]: parseFloat(a),
[n]: parseFloat(o),
alpha: s === void 0 ? 1 : parseFloat(s)
};
-}, Ute = (e) => W_(0, 255, e), zv = {
- ...Mv,
- transform: (e) => Math.round(Ute(e))
-}, Bv = {
- test: /*@__PURE__*/ Lv("rgb", "red"),
- parse: /*@__PURE__*/ Rv("red", "green", "blue"),
- transform: ({ red: e, green: t, blue: n, alpha: r = 1 }) => "rgba(" + zv.transform(e) + ", " + zv.transform(t) + ", " + zv.transform(n) + ", " + Fv(Nv.transform(r)) + ")"
+}, Kte = (e) => U_(0, 255, e), Iv = {
+ ...kv,
+ transform: (e) => Math.round(Kte(e))
+}, Lv = {
+ test: /*@__PURE__*/ Pv("rgb", "red"),
+ parse: /*@__PURE__*/ Fv("red", "green", "blue"),
+ transform: ({ red: e, green: t, blue: n, alpha: r = 1 }) => "rgba(" + Iv.transform(e) + ", " + Iv.transform(t) + ", " + Iv.transform(n) + ", " + Mv(Av.transform(r)) + ")"
};
//#endregion
//#region node_modules/motion-dom/dist/es/value/types/color/hex.mjs
-function Wte(e) {
+function qte(e) {
let t = "", n = "", r = "", i = "";
return e.length > 5 ? (t = e.substring(1, 3), n = e.substring(3, 5), r = e.substring(5, 7), i = e.substring(7, 9)) : (t = e.substring(1, 2), n = e.substring(2, 3), r = e.substring(3, 4), i = e.substring(4, 5), t += t, n += n, r += r, i += i), {
red: parseInt(t, 16),
@@ -23445,38 +23445,38 @@ function Wte(e) {
alpha: i ? parseInt(i, 16) / 255 : 1
};
}
-var Vv = {
- test: /*@__PURE__*/ Lv("#"),
- parse: Wte,
- transform: Bv.transform
-}, Hv = /* @__NO_SIDE_EFFECTS__ */ (e) => ({
+var Rv = {
+ test: /*@__PURE__*/ Pv("#"),
+ parse: qte,
+ transform: Lv.transform
+}, zv = /* @__NO_SIDE_EFFECTS__ */ (e) => ({
test: (t) => typeof t == "string" && t.endsWith(e) && t.split(" ").length === 1,
parse: parseFloat,
transform: (t) => `${t}${e}`
-}), Uv = /*@__PURE__*/ Hv("deg"), Wv = /*@__PURE__*/ Hv("%"), Gv = /*@__PURE__*/ Hv("px"), Gte = /*@__PURE__*/ Hv("vh"), Kte = /*@__PURE__*/ Hv("vw"), Kv = {
- ...Wv,
- parse: (e) => Wv.parse(e) / 100,
- transform: (e) => Wv.transform(e * 100)
-}, qv = {
- test: /*@__PURE__*/ Lv("hsl", "hue"),
- parse: /*@__PURE__*/ Rv("hue", "saturation", "lightness"),
- transform: ({ hue: e, saturation: t, lightness: n, alpha: r = 1 }) => "hsla(" + Math.round(e) + ", " + Wv.transform(Fv(t)) + ", " + Wv.transform(Fv(n)) + ", " + Fv(Nv.transform(r)) + ")"
-}, Jv = {
- test: (e) => Bv.test(e) || Vv.test(e) || qv.test(e),
- parse: (e) => Bv.test(e) ? Bv.parse(e) : qv.test(e) ? qv.parse(e) : Vv.parse(e),
- transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ? Bv.transform(e) : qv.transform(e),
+}), Bv = /*@__PURE__*/ zv("deg"), Vv = /*@__PURE__*/ zv("%"), Hv = /*@__PURE__*/ zv("px"), Jte = /*@__PURE__*/ zv("vh"), Yte = /*@__PURE__*/ zv("vw"), Uv = {
+ ...Vv,
+ parse: (e) => Vv.parse(e) / 100,
+ transform: (e) => Vv.transform(e * 100)
+}, Wv = {
+ test: /*@__PURE__*/ Pv("hsl", "hue"),
+ parse: /*@__PURE__*/ Fv("hue", "saturation", "lightness"),
+ transform: ({ hue: e, saturation: t, lightness: n, alpha: r = 1 }) => "hsla(" + Math.round(e) + ", " + Vv.transform(Mv(t)) + ", " + Vv.transform(Mv(n)) + ", " + Mv(Av.transform(r)) + ")"
+}, Gv = {
+ test: (e) => Lv.test(e) || Rv.test(e) || Wv.test(e),
+ parse: (e) => Lv.test(e) ? Lv.parse(e) : Wv.test(e) ? Wv.parse(e) : Rv.parse(e),
+ transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ? Lv.transform(e) : Wv.transform(e),
getAnimatableNone: (e) => {
- let t = Jv.parse(e);
- return t.alpha = 0, Jv.transform(t);
+ let t = Gv.parse(e);
+ return t.alpha = 0, Gv.transform(t);
}
-}, qte = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
+}, Xte = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
//#endregion
//#region node_modules/motion-dom/dist/es/value/types/complex/index.mjs
-function Jte(e) {
- return isNaN(e) && typeof e == "string" && (e.match(Iv)?.length || 0) + (e.match(qte)?.length || 0) > 0;
+function Zte(e) {
+ return isNaN(e) && typeof e == "string" && (e.match(Nv)?.length || 0) + (e.match(Xte)?.length || 0) > 0;
}
-var Yv = "number", Xv = "color", Yte = "var", Xte = "var(", Zv = "${}", Zte = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
-function Qv(e) {
+var Kv = "number", qv = "color", Qte = "var", $te = "var(", Jv = "${}", ene = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
+function Yv(e) {
let t = e.toString(), n = [], r = {
color: [],
number: [],
@@ -23484,51 +23484,51 @@ function Qv(e) {
}, i = [], a = 0;
return {
values: n,
- split: t.replace(Zte, (e) => (Jv.test(e) ? (r.color.push(a), i.push(Xv), n.push(Jv.parse(e))) : e.startsWith(Xte) ? (r.var.push(a), i.push(Yte), n.push(e)) : (r.number.push(a), i.push(Yv), n.push(parseFloat(e))), ++a, Zv)).split(Zv),
+ split: t.replace(ene, (e) => (Gv.test(e) ? (r.color.push(a), i.push(qv), n.push(Gv.parse(e))) : e.startsWith($te) ? (r.var.push(a), i.push(Qte), n.push(e)) : (r.number.push(a), i.push(Kv), n.push(parseFloat(e))), ++a, Jv)).split(Jv),
indexes: r,
types: i
};
}
-function Qte(e) {
- return Qv(e).values;
+function tne(e) {
+ return Yv(e).values;
}
-function $v({ split: e, types: t }) {
+function Xv({ split: e, types: t }) {
let n = e.length;
return (r) => {
let i = "";
for (let a = 0; a < n; a++) if (i += e[a], r[a] !== void 0) {
let e = t[a];
- i += e === Yv ? Fv(r[a]) : e === Xv ? Jv.transform(r[a]) : r[a];
+ i += e === Kv ? Mv(r[a]) : e === qv ? Gv.transform(r[a]) : r[a];
}
return i;
};
}
-function $te(e) {
- return $v(Qv(e));
-}
-var ene = (e) => typeof e == "number" ? 0 : Jv.test(e) ? Jv.getAnimatableNone(e) : e, tne = (e, t) => typeof e == "number" ? t?.trim().endsWith("/") ? e : 0 : ene(e);
function nne(e) {
- let t = Qv(e);
- return $v(t)(t.values.map((e, n) => tne(e, t.split[n])));
-}
-var ey = {
- test: Jte,
- parse: Qte,
- createTransformer: $te,
- getAnimatableNone: nne
+ return Xv(Yv(e));
+}
+var rne = (e) => typeof e == "number" ? 0 : Gv.test(e) ? Gv.getAnimatableNone(e) : e, ine = (e, t) => typeof e == "number" ? t?.trim().endsWith("/") ? e : 0 : rne(e);
+function ane(e) {
+ let t = Yv(e);
+ return Xv(t)(t.values.map((e, n) => ine(e, t.split[n])));
+}
+var Zv = {
+ test: Zte,
+ parse: tne,
+ createTransformer: nne,
+ getAnimatableNone: ane
};
//#endregion
//#region node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs
-function ty(e, t, n) {
+function Qv(e, t, n) {
return n < 0 && (n += 1), n > 1 && --n, n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
}
-function rne({ hue: e, saturation: t, lightness: n, alpha: r }) {
+function one({ hue: e, saturation: t, lightness: n, alpha: r }) {
e /= 360, t /= 100, n /= 100;
let i = 0, a = 0, o = 0;
if (!t) i = a = o = n;
else {
let r = n < .5 ? n * (1 + t) : n + t - n * t, s = 2 * n - r;
- i = ty(s, r, e + 1 / 3), a = ty(s, r, e), o = ty(s, r, e - 1 / 3);
+ i = Qv(s, r, e + 1 / 3), a = Qv(s, r, e), o = Qv(s, r, e - 1 / 3);
}
return {
red: Math.round(i * 255),
@@ -23539,61 +23539,61 @@ function rne({ hue: e, saturation: t, lightness: n, alpha: r }) {
}
//#endregion
//#region node_modules/motion-dom/dist/es/utils/mix/immediate.mjs
-function ny(e, t) {
+function $v(e, t) {
return (n) => n > 0 ? t : e;
}
//#endregion
//#region node_modules/motion-dom/dist/es/utils/mix/number.mjs
-var ry = (e, t, n) => e + (t - e) * n, iy = (e, t, n) => {
+var ey = (e, t, n) => e + (t - e) * n, ty = (e, t, n) => {
let r = e * e, i = n * (t * t - r) + r;
return i < 0 ? 0 : Math.sqrt(i);
-}, ine = [
- Vv,
- Bv,
- qv
-], ane = (e) => ine.find((t) => t.test(e));
-function ay(e) {
- let t = ane(e);
+}, ny = [
+ Rv,
+ Lv,
+ Wv
+], sne = (e) => ny.find((t) => t.test(e));
+function ry(e) {
+ let t = sne(e);
if (`${e}`, !t) return !1;
let n = t.parse(e);
- return t === qv && (n = rne(n)), n;
+ return t === Wv && (n = one(n)), n;
}
-var oy = (e, t) => {
- let n = ay(e), r = ay(t);
- if (!n || !r) return ny(e, t);
+var iy = (e, t) => {
+ let n = ry(e), r = ry(t);
+ if (!n || !r) return $v(e, t);
let i = { ...n };
- return (e) => (i.red = iy(n.red, r.red, e), i.green = iy(n.green, r.green, e), i.blue = iy(n.blue, r.blue, e), i.alpha = ry(n.alpha, r.alpha, e), Bv.transform(i));
-}, sy = /* @__PURE__ */ new Set(["none", "hidden"]);
-function one(e, t) {
- return sy.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
+ return (e) => (i.red = ty(n.red, r.red, e), i.green = ty(n.green, r.green, e), i.blue = ty(n.blue, r.blue, e), i.alpha = ey(n.alpha, r.alpha, e), Lv.transform(i));
+}, ay = /* @__PURE__ */ new Set(["none", "hidden"]);
+function cne(e, t) {
+ return ay.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
}
//#endregion
//#region node_modules/motion-dom/dist/es/utils/mix/complex.mjs
-function sne(e, t) {
- return (n) => ry(e, t, n);
+function oy(e, t) {
+ return (n) => ey(e, t, n);
}
-function cy(e) {
- return typeof e == "number" ? sne : typeof e == "string" ? Av(e) ? ny : Jv.test(e) ? oy : une : Array.isArray(e) ? ly : typeof e == "object" ? Jv.test(e) ? oy : cne : ny;
+function sy(e) {
+ return typeof e == "number" ? oy : typeof e == "string" ? Dv(e) ? $v : Gv.test(e) ? iy : dne : Array.isArray(e) ? cy : typeof e == "object" ? Gv.test(e) ? iy : lne : $v;
}
-function ly(e, t) {
- let n = [...e], r = n.length, i = e.map((e, n) => cy(e)(e, t[n]));
+function cy(e, t) {
+ let n = [...e], r = n.length, i = e.map((e, n) => sy(e)(e, t[n]));
return (e) => {
for (let t = 0; t < r; t++) n[t] = i[t](e);
return n;
};
}
-function cne(e, t) {
+function lne(e, t) {
let n = {
...e,
...t
}, r = {};
- for (let i in n) e[i] !== void 0 && t[i] !== void 0 && (r[i] = cy(e[i])(e[i], t[i]));
+ for (let i in n) e[i] !== void 0 && t[i] !== void 0 && (r[i] = sy(e[i])(e[i], t[i]));
return (e) => {
for (let t in r) n[t] = r[t](e);
return n;
};
}
-function lne(e, t) {
+function une(e, t) {
let n = [], r = {
color: 0,
var: 0,
@@ -23605,50 +23605,50 @@ function lne(e, t) {
}
return n;
}
-var une = (e, t) => {
- let n = ey.createTransformer(t), r = Qv(e), i = Qv(t);
- return r.indexes.var.length === i.indexes.var.length && r.indexes.color.length === i.indexes.color.length && r.indexes.number.length >= i.indexes.number.length ? sy.has(e) && !i.values.length || sy.has(t) && !r.values.length ? one(e, t) : Z_(ly(lne(r, i), i.values), n) : (`${e}${t}`, ny(e, t));
+var dne = (e, t) => {
+ let n = Zv.createTransformer(t), r = Yv(e), i = Yv(t);
+ return r.indexes.var.length === i.indexes.var.length && r.indexes.color.length === i.indexes.color.length && r.indexes.number.length >= i.indexes.number.length ? ay.has(e) && !i.values.length || ay.has(t) && !r.values.length ? cne(e, t) : X_(cy(une(r, i), i.values), n) : (`${e}${t}`, $v(e, t));
};
//#endregion
//#region node_modules/motion-dom/dist/es/utils/mix/index.mjs
-function uy(e, t, n) {
- return typeof e == "number" && typeof t == "number" && typeof n == "number" ? ry(e, t, n) : cy(e)(e, t);
+function ly(e, t, n) {
+ return typeof e == "number" && typeof t == "number" && typeof n == "number" ? ey(e, t, n) : sy(e)(e, t);
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/drivers/frame.mjs
-var dne = (e) => {
+var fne = (e) => {
let t = ({ timestamp: t }) => e(t);
return {
- start: (e = !0) => Sv.update(t, e),
- stop: () => Cv(t),
- now: () => wv.isProcessing ? wv.timestamp : Dv.now()
+ start: (e = !0) => yv.update(t, e),
+ stop: () => bv(t),
+ now: () => xv.isProcessing ? xv.timestamp : wv.now()
};
-}, dy = (e, t, n = 10) => {
+}, uy = (e, t, n = 10) => {
let r = "", i = Math.max(Math.round(t / n), 2);
for (let t = 0; t < i; t++) r += Math.round(e(t / (i - 1)) * 1e4) / 1e4 + ", ";
return `linear(${r.substring(0, r.length - 2)})`;
-}, fy = 2e4;
-function py(e) {
+}, dy = 2e4;
+function fy(e) {
let t = 0, n = e.next(t);
for (; !n.done && t < 2e4;) t += 50, n = e.next(t);
return t >= 2e4 ? Infinity : t;
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs
-function fne(e, t = 100, n) {
+function pne(e, t = 100, n) {
let r = n({
...e,
keyframes: [0, t]
- }), i = Math.min(py(r), fy);
+ }), i = Math.min(fy(r), dy);
return {
type: "keyframes",
ease: (e) => r.next(i * e).value / t,
- duration: /* @__PURE__ */ tv(i)
+ duration: /* @__PURE__ */ ev(i)
};
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/generators/spring.mjs
-var my = {
+var py = {
stiffness: 100,
damping: 10,
mass: 1,
@@ -23669,31 +23669,31 @@ var my = {
minDamping: .05,
maxDamping: 1
};
-function hy(e, t) {
+function my(e, t) {
return e * Math.sqrt(1 - t * t);
}
-var pne = 12;
-function mne(e, t, n) {
+var mne = 12;
+function hne(e, t, n) {
let r = n;
- for (let n = 1; n < pne; n++) r -= e(r) / t(r);
+ for (let n = 1; n < mne; n++) r -= e(r) / t(r);
return r;
}
-var gy = .001;
-function hne({ duration: e = my.duration, bounce: t = my.bounce, velocity: n = my.velocity, mass: r = my.mass }) {
+var hy = .001;
+function gne({ duration: e = py.duration, bounce: t = py.bounce, velocity: n = py.velocity, mass: r = py.mass }) {
let i, a;
- my.maxDuration;
+ py.maxDuration;
let o = 1 - t;
- o = W_(my.minDamping, my.maxDamping, o), e = W_(my.minDuration, my.maxDuration, /* @__PURE__ */ tv(e)), o < 1 ? (i = (t) => {
- let r = t * o, i = r * e, a = r - n, s = hy(t, o), c = Math.exp(-i);
- return gy - a / s * c;
+ o = U_(py.minDamping, py.maxDamping, o), e = U_(py.minDuration, py.maxDuration, /* @__PURE__ */ ev(e)), o < 1 ? (i = (t) => {
+ let r = t * o, i = r * e, a = r - n, s = my(t, o), c = Math.exp(-i);
+ return hy - a / s * c;
}, a = (t) => {
- let r = t * o * e, a = r * n + n, s = o ** 2 * t ** 2 * e, c = Math.exp(-r), l = hy(t ** 2, o);
- return (-i(t) + gy > 0 ? -1 : 1) * ((a - s) * c) / l;
+ let r = t * o * e, a = r * n + n, s = o ** 2 * t ** 2 * e, c = Math.exp(-r), l = my(t ** 2, o);
+ return (-i(t) + hy > 0 ? -1 : 1) * ((a - s) * c) / l;
}) : (i = (t) => -.001 + Math.exp(-t * e) * ((t - n) * e + 1), a = (t) => Math.exp(-t * e) * ((n - t) * (e * e)));
- let s = 5 / e, c = mne(i, a, s);
- if (e = /* @__PURE__ */ ev(e), isNaN(c)) return {
- stiffness: my.stiffness,
- damping: my.damping,
+ let s = 5 / e, c = hne(i, a, s);
+ if (e = /* @__PURE__ */ $_(e), isNaN(c)) return {
+ stiffness: py.stiffness,
+ damping: py.damping,
duration: e
};
{
@@ -23705,47 +23705,47 @@ function hne({ duration: e = my.duration, bounce: t = my.bounce, velocity: n = m
};
}
}
-var gne = ["duration", "bounce"], _ne = [
+var _ne = ["duration", "bounce"], vne = [
"stiffness",
"damping",
"mass"
];
-function _y(e, t) {
+function gy(e, t) {
return t.some((t) => e[t] !== void 0);
}
-function vne(e) {
+function yne(e) {
let t = {
- velocity: my.velocity,
- stiffness: my.stiffness,
- damping: my.damping,
- mass: my.mass,
+ velocity: py.velocity,
+ stiffness: py.stiffness,
+ damping: py.damping,
+ mass: py.mass,
isResolvedFromDuration: !1,
...e
};
- if (!_y(e, _ne) && _y(e, gne)) {
+ if (!gy(e, vne) && gy(e, _ne)) {
if (t.velocity = 0, e.visualDuration) {
- let n = e.visualDuration, r = 2 * Math.PI / (n * 1.2), i = r * r, a = 2 * W_(.05, 1, 1 - (e.bounce || 0)) * Math.sqrt(i);
+ let n = e.visualDuration, r = 2 * Math.PI / (n * 1.2), i = r * r, a = 2 * U_(.05, 1, 1 - (e.bounce || 0)) * Math.sqrt(i);
t = {
...t,
- mass: my.mass,
+ mass: py.mass,
stiffness: i,
damping: a
};
} else {
- let n = hne({
+ let n = gne({
...e,
velocity: 0
});
t = {
...t,
...n,
- mass: my.mass
+ mass: py.mass
}, t.isResolvedFromDuration = !0;
}
}
return t;
}
-function vy(e = my.visualDuration, t = my.bounce) {
+function _y(e = py.visualDuration, t = py.bounce) {
let n = typeof e == "object" ? e : {
visualDuration: e,
keyframes: [0, 1],
@@ -23753,13 +23753,13 @@ function vy(e = my.visualDuration, t = my.bounce) {
}, { restSpeed: r, restDelta: i } = n, a = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], s = {
done: !1,
value: a
- }, { stiffness: c, damping: l, mass: u, duration: d, velocity: f, isResolvedFromDuration: p } = vne({
+ }, { stiffness: c, damping: l, mass: u, duration: d, velocity: f, isResolvedFromDuration: p } = yne({
...n,
- velocity: -/* @__PURE__ */ tv(n.velocity || 0)
- }), m = f || 0, h = l / (2 * Math.sqrt(c * u)), g = o - a, _ = /* @__PURE__ */ tv(Math.sqrt(c / u)), v = Math.abs(g) < 5;
- r ||= v ? my.restSpeed.granular : my.restSpeed.default, i ||= v ? my.restDelta.granular : my.restDelta.default;
+ velocity: -/* @__PURE__ */ ev(n.velocity || 0)
+ }), m = f || 0, h = l / (2 * Math.sqrt(c * u)), g = o - a, _ = /* @__PURE__ */ ev(Math.sqrt(c / u)), v = Math.abs(g) < 5;
+ r ||= v ? py.restSpeed.granular : py.restSpeed.default, i ||= v ? py.restDelta.granular : py.restDelta.default;
let y, b, x, S, C, w;
- if (h < 1) x = hy(_, h), S = (m + h * _ * g) / x, y = (e) => {
+ if (h < 1) x = my(_, h), S = (m + h * _ * g) / x, y = (e) => {
let t = Math.exp(-h * _ * e);
return o - t * (S * Math.sin(x * e) + g * Math.cos(x * e));
}, C = h * _ * S + g * x, w = h * _ * g - S * x, b = (e) => Math.exp(-h * _ * e) * (C * Math.sin(x * e) + w * Math.cos(x * e));
@@ -23781,42 +23781,42 @@ function vy(e = my.visualDuration, t = my.bounce) {
}
let T = {
calculatedDuration: p && d || null,
- velocity: (e) => /* @__PURE__ */ ev(b(e)),
+ velocity: (e) => /* @__PURE__ */ $_(b(e)),
next: (e) => {
if (!p && h < 1) {
- let t = Math.exp(-h * _ * e), n = Math.sin(x * e), a = Math.cos(x * e), c = o - t * (S * n + g * a), l = /* @__PURE__ */ ev(t * (C * n + w * a));
+ let t = Math.exp(-h * _ * e), n = Math.sin(x * e), a = Math.cos(x * e), c = o - t * (S * n + g * a), l = /* @__PURE__ */ $_(t * (C * n + w * a));
return s.done = Math.abs(l) <= r && Math.abs(o - c) <= i, s.value = s.done ? o : c, s;
}
let t = y(e);
if (p) s.done = e >= d;
else {
- let n = /* @__PURE__ */ ev(b(e));
+ let n = /* @__PURE__ */ $_(b(e));
s.done = Math.abs(n) <= r && Math.abs(o - t) <= i;
}
return s.value = s.done ? o : t, s;
},
toString: () => {
- let e = Math.min(py(T), fy), t = dy((t) => T.next(e * t).value, e, 30);
+ let e = Math.min(fy(T), dy), t = uy((t) => T.next(e * t).value, e, 30);
return e + "ms " + t;
},
toTransition: () => {}
};
return T;
}
-vy.applyToOptions = (e) => {
- let t = fne(e, 100, vy);
- return e.ease = t.ease, e.duration = /* @__PURE__ */ ev(t.duration), e.type = "keyframes", e;
+_y.applyToOptions = (e) => {
+ let t = pne(e, 100, _y);
+ return e.ease = t.ease, e.duration = /* @__PURE__ */ $_(t.duration), e.type = "keyframes", e;
};
//#endregion
//#region node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs
-var yne = 5;
-function yy(e, t, n) {
- let r = Math.max(t - yne, 0);
- return /* @__PURE__ */ nv(n - e(r), t - r);
+var bne = 5;
+function vy(e, t, n) {
+ let r = Math.max(t - bne, 0);
+ return /* @__PURE__ */ tv(n - e(r), t - r);
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/generators/inertia.mjs
-function by({ keyframes: e, velocity: t = 0, power: n = .8, timeConstant: r = 325, bounceDamping: i = 10, bounceStiffness: a = 500, modifyTarget: o, min: s, max: c, restDelta: l = .5, restSpeed: u }) {
+function yy({ keyframes: e, velocity: t = 0, power: n = .8, timeConstant: r = 325, bounceDamping: i = 10, bounceStiffness: a = 500, modifyTarget: o, min: s, max: c, restDelta: l = .5, restSpeed: u }) {
let d = e[0], f = {
done: !1,
value: d
@@ -23826,9 +23826,9 @@ function by({ keyframes: e, velocity: t = 0, power: n = .8, timeConstant: r = 32
let t = v(e), n = y(e);
f.done = Math.abs(t) <= l, f.value = f.done ? _ : n;
}, x, S, C = (e) => {
- p(f.value) && (x = e, S = vy({
+ p(f.value) && (x = e, S = _y({
keyframes: [f.value, m(f.value)],
- velocity: yy(y, e, f.value),
+ velocity: vy(y, e, f.value),
damping: i,
stiffness: a,
restDelta: l,
@@ -23845,59 +23845,59 @@ function by({ keyframes: e, velocity: t = 0, power: n = .8, timeConstant: r = 32
}
//#endregion
//#region node_modules/motion-dom/dist/es/utils/interpolate.mjs
-function bne(e, t, n) {
- let r = [], i = n || G_.mix || uy, a = e.length - 1;
+function xne(e, t, n) {
+ let r = [], i = n || W_.mix || ly, a = e.length - 1;
for (let n = 0; n < a; n++) {
let a = i(e[n], e[n + 1]);
- t && (a = Z_(Array.isArray(t) ? t[n] || X_ : t, a)), r.push(a);
+ t && (a = X_(Array.isArray(t) ? t[n] || Y_ : t, a)), r.push(a);
}
return r;
}
-function xy(e, t, { clamp: n = !0, ease: r, mixer: i } = {}) {
+function by(e, t, { clamp: n = !0, ease: r, mixer: i } = {}) {
let a = e.length;
if (t.length, a === 1) return () => t[0];
if (a === 2 && t[0] === t[1]) return () => t[1];
let o = e[0] === e[1];
e[0] > e[a - 1] && (e = [...e].reverse(), t = [...t].reverse());
- let s = bne(t, r, i), c = s.length, l = (n) => {
+ let s = xne(t, r, i), c = s.length, l = (n) => {
if (o && n < e[0]) return t[0];
let r = 0;
if (c > 1) for (; r < e.length - 2 && !(n < e[r + 1]); r++);
- let i = /* @__PURE__ */ Q_(e[r], e[r + 1], n);
+ let i = /* @__PURE__ */ Z_(e[r], e[r + 1], n);
return s[r](i);
};
- return n ? (t) => l(W_(e[0], e[a - 1], t)) : l;
+ return n ? (t) => l(U_(e[0], e[a - 1], t)) : l;
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.mjs
-function xne(e, t) {
+function Sne(e, t) {
let n = e[e.length - 1];
for (let r = 1; r <= t; r++) {
- let i = /* @__PURE__ */ Q_(0, t, r);
- e.push(ry(n, 1, i));
+ let i = /* @__PURE__ */ Z_(0, t, r);
+ e.push(ey(n, 1, i));
}
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.mjs
-function Sne(e) {
+function Cne(e) {
let t = [0];
- return xne(t, e.length - 1), t;
+ return Sne(t, e.length - 1), t;
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.mjs
-function Cne(e, t) {
+function wne(e, t) {
return e.map((e) => e * t);
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs
-function wne(e, t) {
- return e.map(() => t || mv).splice(0, e.length - 1);
+function Tne(e, t) {
+ return e.map(() => t || pv).splice(0, e.length - 1);
}
-function Sy({ duration: e = 300, keyframes: t, times: n, ease: r = "easeInOut" }) {
- let i = /* @__PURE__ */ Ite(r) ? r.map(_v) : _v(r), a = {
+function xy({ duration: e = 300, keyframes: t, times: n, ease: r = "easeInOut" }) {
+ let i = /* @__PURE__ */ Lte(r) ? r.map(gv) : gv(r), a = {
done: !1,
value: t[0]
- }, o = xy(Cne(n && n.length === t.length ? n : Sne(t), e), t, { ease: Array.isArray(i) ? i : wne(t, i) });
+ }, o = by(wne(n && n.length === t.length ? n : Cne(t), e), t, { ease: Array.isArray(i) ? i : Tne(t, i) });
return {
calculatedDuration: e,
next: (t) => (a.value = o(t), a.done = t >= e, a)
@@ -23905,26 +23905,26 @@ function Sy({ duration: e = 300, keyframes: t, times: n, ease: r = "easeInOut" }
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs
-var Tne = (e) => e !== null;
+var Sy = (e) => e !== null;
function Cy(e, { repeat: t, repeatType: n = "loop" }, r, i = 1) {
- let a = e.filter(Tne), o = i < 0 || t && n !== "loop" && t % 2 == 1 ? 0 : a.length - 1;
+ let a = e.filter(Sy), o = i < 0 || t && n !== "loop" && t % 2 == 1 ? 0 : a.length - 1;
return !o || r === void 0 ? a[o] : r;
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.mjs
-var Ene = {
- decay: by,
- inertia: by,
- tween: Sy,
- keyframes: Sy,
- spring: vy
+var wy = {
+ decay: yy,
+ inertia: yy,
+ tween: xy,
+ keyframes: xy,
+ spring: _y
};
-function wy(e) {
- typeof e.type == "string" && (e.type = Ene[e.type]);
+function Ty(e) {
+ typeof e.type == "string" && (e.type = wy[e.type]);
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs
-var Ty = class {
+var Ey = class {
constructor() {
this.updateFinished();
}
@@ -23942,21 +23942,21 @@ var Ty = class {
then(e, t) {
return this.finished.then(e, t);
}
-}, Dne = (e) => e / 100, Ey = class extends Ty {
+}, Ene = (e) => e / 100, Dy = class extends Ey {
constructor(e) {
super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.delayState = {
done: !1,
value: void 0
}, this.stop = () => {
let { motionValue: e } = this.options;
- e && e.updatedAt !== Dv.now() && this.tick(Dv.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), this.options.onStop?.());
+ e && e.updatedAt !== wv.now() && this.tick(wv.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), this.options.onStop?.());
}, this.options = e, this.initAnimation(), this.play(), e.autoplay === !1 && this.pause();
}
initAnimation() {
let { options: e } = this;
- wy(e);
- let { type: t = Sy, repeat: n = 0, repeatDelay: r = 0, repeatType: i, velocity: a = 0 } = e, { keyframes: o } = e, s = t || Sy;
- s !== Sy && typeof o[0] != "number" && (this.mixKeyframes = Z_(Dne, uy(o[0], o[1])), o = [0, 100]);
+ Ty(e);
+ let { type: t = xy, repeat: n = 0, repeatDelay: r = 0, repeatType: i, velocity: a = 0 } = e, { keyframes: o } = e, s = t || xy;
+ s !== xy && typeof o[0] != "number" && (this.mixKeyframes = X_(Ene, ly(o[0], o[1])), o = [0, 100]);
let c = s({
...e,
keyframes: o
@@ -23965,7 +23965,7 @@ var Ty = class {
...e,
keyframes: [...o].reverse(),
velocity: -a
- })), c.calculatedDuration === null && (c.calculatedDuration = py(c));
+ })), c.calculatedDuration === null && (c.calculatedDuration = fy(c));
let { calculatedDuration: l } = c;
this.calculatedDuration = l, this.resolvedDuration = l + r, this.totalDuration = this.resolvedDuration * (n + 1) - r, this.generator = c;
}
@@ -23983,54 +23983,54 @@ var Ty = class {
let v = this.currentTime, y = n;
if (u) {
let e = Math.min(this.currentTime, r) / o, t = Math.floor(e), n = e % 1;
- !n && e >= 1 && (n = 1), n === 1 && t--, t = Math.min(t, u + 1), t % 2 && (d === "reverse" ? (n = 1 - n, f && (n -= f / o)) : d === "mirror" && (y = a)), v = W_(0, 1, n) * o;
+ !n && e >= 1 && (n = 1), n === 1 && t--, t = Math.min(t, u + 1), t % 2 && (d === "reverse" ? (n = 1 - n, f && (n -= f / o)) : d === "mirror" && (y = a)), v = U_(0, 1, n) * o;
}
let b;
_ ? (this.delayState.value = l[0], b = this.delayState) : b = y.next(v), i && !_ && (b.value = i(b.value));
let { done: x } = b;
!_ && s !== null && (x = this.playbackSpeed >= 0 ? this.currentTime >= r : this.currentTime <= 0);
let S = this.holdTime === null && (this.state === "finished" || this.state === "running" && x);
- return S && p !== by && (b.value = Cy(l, this.options, h, this.speed)), m && m(b.value), S && this.finish(), b;
+ return S && p !== yy && (b.value = Cy(l, this.options, h, this.speed)), m && m(b.value), S && this.finish(), b;
}
then(e, t) {
return this.finished.then(e, t);
}
get duration() {
- return /* @__PURE__ */ tv(this.calculatedDuration);
+ return /* @__PURE__ */ ev(this.calculatedDuration);
}
get iterationDuration() {
let { delay: e = 0 } = this.options || {};
- return this.duration + /* @__PURE__ */ tv(e);
+ return this.duration + /* @__PURE__ */ ev(e);
}
get time() {
- return /* @__PURE__ */ tv(this.currentTime);
+ return /* @__PURE__ */ ev(this.currentTime);
}
set time(e) {
- e = /* @__PURE__ */ ev(e), this.currentTime = e, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = e : this.driver && (this.startTime = this.driver.now() - e / this.playbackSpeed), this.driver ? this.driver.start(!1) : (this.startTime = 0, this.state = "paused", this.holdTime = e, this.tick(e));
+ e = /* @__PURE__ */ $_(e), this.currentTime = e, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = e : this.driver && (this.startTime = this.driver.now() - e / this.playbackSpeed), this.driver ? this.driver.start(!1) : (this.startTime = 0, this.state = "paused", this.holdTime = e, this.tick(e));
}
getGeneratorVelocity() {
let e = this.currentTime;
if (e <= 0) return this.options.velocity || 0;
if (this.generator.velocity) return this.generator.velocity(e);
let t = this.generator.next(e).value;
- return yy((e) => this.generator.next(e).value, e, t);
+ return vy((e) => this.generator.next(e).value, e, t);
}
get speed() {
return this.playbackSpeed;
}
set speed(e) {
let t = this.playbackSpeed !== e;
- t && this.driver && this.updateTime(Dv.now()), this.playbackSpeed = e, t && this.driver && (this.time = /* @__PURE__ */ tv(this.currentTime));
+ t && this.driver && this.updateTime(wv.now()), this.playbackSpeed = e, t && this.driver && (this.time = /* @__PURE__ */ ev(this.currentTime));
}
play() {
if (this.isStopped) return;
- let { driver: e = dne, startTime: t } = this.options;
+ let { driver: e = fne, startTime: t } = this.options;
this.driver ||= e((e) => this.tick(e)), this.options.onPlay?.();
let n = this.driver.now();
this.state === "finished" ? (this.updateFinished(), this.startTime = n) : this.holdTime === null ? this.startTime ||= t ?? n : this.startTime = n - this.holdTime, this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
}
pause() {
- this.state = "paused", this.updateTime(Dv.now()), this.holdTime = this.currentTime;
+ this.state = "paused", this.updateTime(wv.now()), this.holdTime = this.currentTime;
}
complete() {
this.state !== "running" && this.play(), this.state = "finished", this.holdTime = null;
@@ -24056,12 +24056,12 @@ var Ty = class {
};
//#endregion
//#region node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.mjs
-function Dy(e) {
+function Oy(e) {
for (let t = 1; t < e.length; t++) e[t] ?? (e[t] = e[t - 1]);
}
//#endregion
//#region node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs
-var Oy = (e) => e * 180 / Math.PI, ky = (e) => Ay(Oy(Math.atan2(e[1], e[0]))), One = {
+var ky = (e) => e * 180 / Math.PI, Ay = (e) => jy(ky(Math.atan2(e[1], e[0]))), Dne = {
x: 4,
y: 5,
translateX: 4,
@@ -24069,54 +24069,54 @@ var Oy = (e) => e * 180 / Math.PI, ky = (e) => Ay(Oy(Math.atan2(e[1], e[0]))), O
scaleX: 0,
scaleY: 3,
scale: (e) => (Math.abs(e[0]) + Math.abs(e[3])) / 2,
- rotate: ky,
- rotateZ: ky,
- skewX: (e) => Oy(Math.atan(e[1])),
- skewY: (e) => Oy(Math.atan(e[2])),
+ rotate: Ay,
+ rotateZ: Ay,
+ skewX: (e) => ky(Math.atan(e[1])),
+ skewY: (e) => ky(Math.atan(e[2])),
skew: (e) => (Math.abs(e[1]) + Math.abs(e[2])) / 2
-}, Ay = (e) => (e %= 360, e < 0 && (e += 360), e), jy = ky, My = (e) => Math.sqrt(e[0] * e[0] + e[1] * e[1]), Ny = (e) => Math.sqrt(e[4] * e[4] + e[5] * e[5]), kne = {
+}, jy = (e) => (e %= 360, e < 0 && (e += 360), e), My = Ay, Ny = (e) => Math.sqrt(e[0] * e[0] + e[1] * e[1]), Py = (e) => Math.sqrt(e[4] * e[4] + e[5] * e[5]), One = {
x: 12,
y: 13,
z: 14,
translateX: 12,
translateY: 13,
translateZ: 14,
- scaleX: My,
- scaleY: Ny,
- scale: (e) => (My(e) + Ny(e)) / 2,
- rotateX: (e) => Ay(Oy(Math.atan2(e[6], e[5]))),
- rotateY: (e) => Ay(Oy(Math.atan2(-e[2], e[0]))),
- rotateZ: jy,
- rotate: jy,
- skewX: (e) => Oy(Math.atan(e[4])),
- skewY: (e) => Oy(Math.atan(e[1])),
+ scaleX: Ny,
+ scaleY: Py,
+ scale: (e) => (Ny(e) + Py(e)) / 2,
+ rotateX: (e) => jy(ky(Math.atan2(e[6], e[5]))),
+ rotateY: (e) => jy(ky(Math.atan2(-e[2], e[0]))),
+ rotateZ: My,
+ rotate: My,
+ skewX: (e) => ky(Math.atan(e[4])),
+ skewY: (e) => ky(Math.atan(e[1])),
skew: (e) => (Math.abs(e[1]) + Math.abs(e[4])) / 2
};
-function Py(e) {
+function Fy(e) {
return +!!e.includes("scale");
}
-function Fy(e, t) {
- if (!e || e === "none") return Py(t);
+function Iy(e, t) {
+ if (!e || e === "none") return Fy(t);
let n = e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u), r, i;
- if (n) r = kne, i = n;
+ if (n) r = One, i = n;
else {
let t = e.match(/^matrix\(([-\d.e\s,]+)\)$/u);
- r = One, i = t;
+ r = Dne, i = t;
}
- if (!i) return Py(t);
- let a = r[t], o = i[1].split(",").map(jne);
+ if (!i) return Fy(t);
+ let a = r[t], o = i[1].split(",").map(Ane);
return typeof a == "function" ? a(o) : o[a];
}
-var Ane = (e, t) => {
+var kne = (e, t) => {
let { transform: n = "none" } = getComputedStyle(e);
- return Fy(n, t);
+ return Iy(n, t);
};
-function jne(e) {
+function Ane(e) {
return parseFloat(e.trim());
}
//#endregion
//#region node_modules/motion-dom/dist/es/render/utils/keys-transform.mjs
-var Iy = [
+var Ly = [
"transformPerspective",
"x",
"y",
@@ -24134,19 +24134,19 @@ var Iy = [
"skew",
"skewX",
"skewY"
-], Ly = /* @__PURE__ */ new Set([...Iy, "pathRotation"]), Ry = (e) => e === Mv || e === Gv, Mne = /* @__PURE__ */ new Set([
+], Ry = /* @__PURE__ */ new Set([...Ly, "pathRotation"]), zy = (e) => e === kv || e === Hv, jne = /* @__PURE__ */ new Set([
"x",
"y",
"z"
-]), Nne = Iy.filter((e) => !Mne.has(e));
-function Pne(e) {
+]), Mne = Ly.filter((e) => !jne.has(e));
+function Nne(e) {
let t = [];
- return Nne.forEach((n) => {
+ return Mne.forEach((n) => {
let r = e.getValue(n);
r !== void 0 && (t.push([n, r.get()]), r.set(+!!n.startsWith("scale")));
}), t;
}
-var zy = {
+var By = {
width: ({ x: e }, { paddingLeft: t = "0", paddingRight: n = "0", boxSizing: r }) => {
let i = e.max - e.min;
return r === "border-box" ? i : i - parseFloat(t) - parseFloat(n);
@@ -24159,18 +24159,18 @@ var zy = {
left: (e, { left: t }) => parseFloat(t),
bottom: ({ y: e }, { top: t }) => parseFloat(t) + (e.max - e.min),
right: ({ x: e }, { left: t }) => parseFloat(t) + (e.max - e.min),
- x: (e, { transform: t }) => Fy(t, "x"),
- y: (e, { transform: t }) => Fy(t, "y")
+ x: (e, { transform: t }) => Iy(t, "x"),
+ y: (e, { transform: t }) => Iy(t, "y")
};
-zy.translateX = zy.x, zy.translateY = zy.y;
+By.translateX = By.x, By.translateY = By.y;
//#endregion
//#region node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs
-var By = /* @__PURE__ */ new Set(), Vy = !1, Hy = !1, Uy = !1;
-function Wy() {
- if (Hy) {
- let e = Array.from(By).filter((e) => e.needsMeasurement), t = new Set(e.map((e) => e.element)), n = /* @__PURE__ */ new Map();
+var Vy = /* @__PURE__ */ new Set(), Hy = !1, Uy = !1, Wy = !1;
+function Gy() {
+ if (Uy) {
+ let e = Array.from(Vy).filter((e) => e.needsMeasurement), t = new Set(e.map((e) => e.element)), n = /* @__PURE__ */ new Map();
t.forEach((e) => {
- let t = Pne(e);
+ let t = Nne(e);
t.length && (n.set(e, t), e.render());
}), e.forEach((e) => e.measureInitialState()), t.forEach((e) => {
e.render();
@@ -24182,22 +24182,22 @@ function Wy() {
e.suspendedScrollY !== void 0 && window.scrollTo(0, e.suspendedScrollY);
});
}
- Hy = !1, Vy = !1, By.forEach((e) => e.complete(Uy)), By.clear();
+ Uy = !1, Hy = !1, Vy.forEach((e) => e.complete(Wy)), Vy.clear();
}
-function Gy() {
- By.forEach((e) => {
- e.readKeyframes(), e.needsMeasurement && (Hy = !0);
+function Ky() {
+ Vy.forEach((e) => {
+ e.readKeyframes(), e.needsMeasurement && (Uy = !0);
});
}
-function Fne() {
- Uy = !0, Gy(), Wy(), Uy = !1;
+function Pne() {
+ Wy = !0, Ky(), Gy(), Wy = !1;
}
-var Ky = class {
+var qy = class {
constructor(e, t, n, r, i, a = !1) {
this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...e], this.onComplete = t, this.name = n, this.motionValue = r, this.element = i, this.isAsync = a;
}
scheduleResolve() {
- this.state = "scheduled", this.isAsync ? (By.add(this), Vy || (Vy = !0, Sv.read(Gy), Sv.resolveKeyframes(Wy))) : (this.readKeyframes(), this.complete());
+ this.state = "scheduled", this.isAsync ? (Vy.add(this), Hy || (Hy = !0, yv.read(Ky), yv.resolveKeyframes(Gy))) : (this.readKeyframes(), this.complete());
}
readKeyframes() {
let { unresolvedKeyframes: e, name: t, element: n, motionValue: r } = this;
@@ -24210,70 +24210,70 @@ var Ky = class {
}
e[0] === void 0 && (e[0] = a), r && i === void 0 && r.set(e[0]);
}
- Dy(e);
+ Oy(e);
}
setFinalKeyframe() {}
measureInitialState() {}
renderEndStyles() {}
measureEndState() {}
complete(e = !1) {
- this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, e), By.delete(this);
+ this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, e), Vy.delete(this);
}
cancel() {
- this.state === "scheduled" && (By.delete(this), this.state = "pending");
+ this.state === "scheduled" && (Vy.delete(this), this.state = "pending");
}
resume() {
this.state === "pending" && this.scheduleResolve();
}
-}, qy = (e) => e.startsWith("--");
+}, Jy = (e) => e.startsWith("--");
//#endregion
//#region node_modules/motion-dom/dist/es/render/dom/style-set.mjs
-function Jy(e, t, n) {
- qy(t) ? e.style.setProperty(t, n) : e.style[t] = n;
+function Yy(e, t, n) {
+ Jy(t) ? e.style.setProperty(t, n) : e.style[t] = n;
}
//#endregion
//#region node_modules/motion-dom/dist/es/utils/supports/flags.mjs
-var Ine = {};
+var Fne = {};
//#endregion
//#region node_modules/motion-dom/dist/es/utils/supports/memo.mjs
-function Yy(e, t) {
- let n = /* @__PURE__ */ Y_(e);
- return () => Ine[t] ?? n();
+function Xy(e, t) {
+ let n = /* @__PURE__ */ J_(e);
+ return () => Fne[t] ?? n();
}
//#endregion
//#region node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.mjs
-var Lne = /* @__PURE__ */ Yy(() => window.ScrollTimeline !== void 0, "scrollTimeline"), Xy = /*@__PURE__*/ Yy(() => {
+var Ine = /* @__PURE__ */ Xy(() => window.ScrollTimeline !== void 0, "scrollTimeline"), Zy = /*@__PURE__*/ Xy(() => {
try {
document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
} catch {
return !1;
}
return !0;
-}, "linearEasing"), Zy = ([e, t, n, r]) => `cubic-bezier(${e}, ${t}, ${n}, ${r})`, Qy = {
+}, "linearEasing"), Qy = ([e, t, n, r]) => `cubic-bezier(${e}, ${t}, ${n}, ${r})`, $y = {
linear: "linear",
ease: "ease",
easeIn: "ease-in",
easeOut: "ease-out",
easeInOut: "ease-in-out",
- circIn: /*@__PURE__*/ Zy([
+ circIn: /*@__PURE__*/ Qy([
0,
.65,
.55,
1
]),
- circOut: /*@__PURE__*/ Zy([
+ circOut: /*@__PURE__*/ Qy([
.55,
0,
1,
.45
]),
- backIn: /*@__PURE__*/ Zy([
+ backIn: /*@__PURE__*/ Qy([
.31,
.01,
.66,
-.59
]),
- backOut: /*@__PURE__*/ Zy([
+ backOut: /*@__PURE__*/ Qy([
.33,
1.53,
.69,
@@ -24282,15 +24282,15 @@ var Lne = /* @__PURE__ */ Yy(() => window.ScrollTimeline !== void 0, "scrollTime
};
//#endregion
//#region node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.mjs
-function $y(e, t) {
- if (e) return typeof e == "function" ? Xy() ? dy(e, t) : "ease-out" : /* @__PURE__ */ hv(e) ? Zy(e) : Array.isArray(e) ? e.map((e) => $y(e, t) || Qy.easeOut) : Qy[e];
+function eb(e, t) {
+ if (e) return typeof e == "function" ? Zy() ? uy(e, t) : "ease-out" : /* @__PURE__ */ mv(e) ? Qy(e) : Array.isArray(e) ? e.map((e) => eb(e, t) || $y.easeOut) : $y[e];
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs
-function Rne(e, t, n, { delay: r = 0, duration: i = 300, repeat: a = 0, repeatType: o = "loop", ease: s = "easeOut", times: c } = {}, l = void 0) {
+function Lne(e, t, n, { delay: r = 0, duration: i = 300, repeat: a = 0, repeatType: o = "loop", ease: s = "easeOut", times: c } = {}, l = void 0) {
let u = { [t]: n };
c && (u.offset = c);
- let d = $y(s, i);
+ let d = eb(s, i);
Array.isArray(d) && (u.easing = d);
let f = {
delay: r,
@@ -24304,26 +24304,26 @@ function Rne(e, t, n, { delay: r = 0, duration: i = 300, repeat: a = 0, repeatTy
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.mjs
-function eb(e) {
+function tb(e) {
return typeof e == "function" && "applyToOptions" in e;
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs
-function zne({ type: e, ...t }) {
- return eb(e) && Xy() ? e.applyToOptions(t) : (t.duration ??= 300, t.ease ??= "easeOut", t);
+function Rne({ type: e, ...t }) {
+ return tb(e) && Zy() ? e.applyToOptions(t) : (t.duration ??= 300, t.ease ??= "easeOut", t);
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs
-var tb = class extends Ty {
+var nb = class extends Ey {
constructor(e) {
if (super(), this.finishedTime = null, this.isStopped = !1, this.manualStartTime = null, !e) return;
let { element: t, name: n, keyframes: r, pseudoElement: i, allowFlatten: a = !1, finalKeyframe: o, onComplete: s } = e;
this.isPseudoElement = !!i, this.allowFlatten = a, this.options = e, e.type;
- let c = zne(e);
- this.animation = Rne(t, n, r, c, i), c.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
+ let c = Rne(e);
+ this.animation = Lne(t, n, r, c, i), c.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
if (this.finishedTime = this.time, !i) {
let e = Cy(r, this.options, o, this.speed);
- this.updateMotionValue && this.updateMotionValue(e), Jy(t, n, e), this.animation.cancel();
+ this.updateMotionValue && this.updateMotionValue(e), Yy(t, n, e), this.animation.cancel();
}
s?.(), this.notifyFinished();
};
@@ -24354,18 +24354,18 @@ var tb = class extends Ty {
}
get duration() {
let e = this.animation.effect?.getComputedTiming?.().duration || 0;
- return /* @__PURE__ */ tv(Number(e));
+ return /* @__PURE__ */ ev(Number(e));
}
get iterationDuration() {
let { delay: e = 0 } = this.options || {};
- return this.duration + /* @__PURE__ */ tv(e);
+ return this.duration + /* @__PURE__ */ ev(e);
}
get time() {
- return /* @__PURE__ */ tv(Number(this.animation.currentTime) || 0);
+ return /* @__PURE__ */ ev(Number(this.animation.currentTime) || 0);
}
set time(e) {
let t = this.finishedTime !== null;
- this.manualStartTime = null, this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ ev(e), t && this.animation.pause();
+ this.manualStartTime = null, this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ $_(e), t && this.animation.pause();
}
get speed() {
return this.animation.playbackRate;
@@ -24383,24 +24383,24 @@ var tb = class extends Ty {
this.manualStartTime = this.animation.startTime = e;
}
attachTimeline({ timeline: e, rangeStart: t, rangeEnd: n, observe: r }) {
- return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, e && Lne() ? (this.animation.timeline = e, t && (this.animation.rangeStart = t), n && (this.animation.rangeEnd = n), X_) : r(this);
+ return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, e && Ine() ? (this.animation.timeline = e, t && (this.animation.rangeStart = t), n && (this.animation.rangeEnd = n), Y_) : r(this);
}
-}, nb = {
- anticipate: uv,
- backInOut: lv,
- circInOut: pv
+}, rb = {
+ anticipate: lv,
+ backInOut: cv,
+ circInOut: fv
};
-function Bne(e) {
- return e in nb;
+function zne(e) {
+ return e in rb;
}
-function Vne(e) {
- typeof e.ease == "string" && Bne(e.ease) && (e.ease = nb[e.ease]);
+function Bne(e) {
+ typeof e.ease == "string" && zne(e.ease) && (e.ease = rb[e.ease]);
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs
-var rb = 10, Hne = class extends tb {
+var ib = 10, ab = class extends nb {
constructor(e) {
- Vne(e), wy(e), super(e), e.startTime !== void 0 && e.autoplay !== !1 && (this.startTime = e.startTime), this.options = e;
+ Bne(e), Ty(e), super(e), e.startTime !== void 0 && e.autoplay !== !1 && (this.startTime = e.startTime), this.options = e;
}
updateMotionValue(e) {
let { motionValue: t, onUpdate: n, onComplete: r, element: i, ...a } = this.options;
@@ -24409,48 +24409,48 @@ var rb = 10, Hne = class extends tb {
t.set(e);
return;
}
- let o = new Ey({
+ let o = new Dy({
...a,
autoplay: !1
- }), s = Math.max(rb, Dv.now() - this.startTime), c = W_(0, rb, s - rb), l = o.sample(s).value, { name: u } = this.options;
- i && u && Jy(i, u, l), t.setWithVelocity(o.sample(Math.max(0, s - c)).value, l, c), o.stop();
+ }), s = Math.max(ib, wv.now() - this.startTime), c = U_(0, ib, s - ib), l = o.sample(s).value, { name: u } = this.options;
+ i && u && Yy(i, u, l), t.setWithVelocity(o.sample(Math.max(0, s - c)).value, l, c), o.stop();
}
-}, ib = (e, t) => t !== "zIndex" && !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && (ey.test(e) || e === "0") && !e.startsWith("url("));
+}, ob = (e, t) => t !== "zIndex" && !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && (Zv.test(e) || e === "0") && !e.startsWith("url("));
//#endregion
//#region node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs
-function Une(e) {
+function sb(e) {
let t = e[0];
if (e.length === 1) return !0;
for (let n = 0; n < e.length; n++) if (e[n] !== t) return !0;
}
-function Wne(e, t, n, r) {
+function cb(e, t, n, r) {
let i = e[0];
if (i === null) return !1;
if (t === "display" || t === "visibility") return !0;
- let a = e[e.length - 1], o = ib(i, t), s = ib(a, t);
- return `${t}${i}${a}${o ? a : i}`, !o || !s ? !1 : Une(e) || (n === "spring" || eb(n)) && r;
+ let a = e[e.length - 1], o = ob(i, t), s = ob(a, t);
+ return `${t}${i}${a}${o ? a : i}`, !o || !s ? !1 : sb(e) || (n === "spring" || tb(n)) && r;
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.mjs
-function ab(e) {
+function lb(e) {
e.duration = 0, e.type = "keyframes";
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs
-var ob = /* @__PURE__ */ new Set([
+var ub = /* @__PURE__ */ new Set([
"opacity",
"clipPath",
"filter",
"transform",
"backgroundColor"
-]), Gne = /^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;
-function sb(e) {
- for (let t = 0; t < e.length; t++) if (typeof e[t] == "string" && Gne.test(e[t])) return !0;
+]), Vne = /^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;
+function Hne(e) {
+ for (let t = 0; t < e.length; t++) if (typeof e[t] == "string" && Vne.test(e[t])) return !0;
return !1;
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs
-var cb = /* @__PURE__ */ new Set([
+var Une = /* @__PURE__ */ new Set([
"color",
"backgroundColor",
"outlineColor",
@@ -24461,20 +24461,20 @@ var cb = /* @__PURE__ */ new Set([
"borderRightColor",
"borderBottomColor",
"borderLeftColor"
-]), lb = /*@__PURE__*/ Y_(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
-function ub(e) {
+]), Wne = /*@__PURE__*/ J_(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
+function Gne(e) {
let { motionValue: t, name: n, repeatDelay: r, repeatType: i, damping: a, type: o, keyframes: s } = e, c = t?.owner?.current;
if (!(c instanceof HTMLElement) && !(c instanceof SVGElement)) return !1;
let { onUpdate: l, transformTemplate: u } = t.owner.getProps();
- return lb() && n && (ob.has(n) || cb.has(n) && sb(s)) && (n !== "transform" || !u) && !l && !r && i !== "mirror" && a !== 0 && o !== "inertia";
+ return Wne() && n && (ub.has(n) || Une.has(n) && Hne(s)) && (n !== "transform" || !u) && !l && !r && i !== "mirror" && a !== 0 && o !== "inertia";
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs
-var db = 40, fb = class extends Ty {
+var Kne = 40, qne = class extends Ey {
constructor({ autoplay: e = !0, delay: t = 0, type: n = "keyframes", repeat: r = 0, repeatDelay: i = 0, repeatType: a = "loop", keyframes: o, name: s, motionValue: c, element: l, ...u }) {
super(), this.stop = () => {
this._animation && (this._animation.stop(), this.stopTimeline?.()), this.keyframeResolver?.cancel();
- }, this.createdAt = Dv.now();
+ }, this.createdAt = wv.now();
let d = {
autoplay: e,
delay: t,
@@ -24486,33 +24486,33 @@ var db = 40, fb = class extends Ty {
motionValue: c,
element: l,
...u
- }, f = l?.KeyframeResolver || Ky;
+ }, f = l?.KeyframeResolver || qy;
this.keyframeResolver = new f(o, (e, t, n) => this.onKeyframesResolved(e, t, d, !n), s, c, l), this.keyframeResolver?.scheduleResolve();
}
onKeyframesResolved(e, t, n, r) {
this.keyframeResolver = void 0;
let { name: i, type: a, velocity: o, delay: s, isHandoff: c, onUpdate: l } = n;
- this.resolvedAt = Dv.now();
+ this.resolvedAt = wv.now();
let u = !0;
- Wne(e, i, a, o) || (u = !1, (G_.instantAnimations || !s) && l?.(Cy(e, n, t)), e[0] = e[e.length - 1], ab(n), n.repeat = 0);
+ cb(e, i, a, o) || (u = !1, (W_.instantAnimations || !s) && l?.(Cy(e, n, t)), e[0] = e[e.length - 1], lb(n), n.repeat = 0);
let d = {
- startTime: r ? this.resolvedAt && this.resolvedAt - this.createdAt > db ? this.resolvedAt : this.createdAt : void 0,
+ startTime: r ? this.resolvedAt && this.resolvedAt - this.createdAt > Kne ? this.resolvedAt : this.createdAt : void 0,
finalKeyframe: t,
...n,
keyframes: e
- }, f = u && !c && ub(d), p = d.motionValue?.owner?.current, m;
+ }, f = u && !c && Gne(d), p = d.motionValue?.owner?.current, m;
if (f) try {
- m = new Hne({
+ m = new ab({
...d,
element: p
});
} catch {
- m = new Ey(d);
+ m = new Dy(d);
}
- else m = new Ey(d);
+ else m = new Dy(d);
m.finished.then(() => {
this.notifyFinished();
- }).catch(X_), this.pendingTimeline &&= (this.stopTimeline = m.attachTimeline(this.pendingTimeline), void 0), this._animation = m;
+ }).catch(Y_), this.pendingTimeline &&= (this.stopTimeline = m.attachTimeline(this.pendingTimeline), void 0), this._animation = m;
}
get finished() {
return this._animation ? this.animation.finished : this._finished;
@@ -24521,7 +24521,7 @@ var db = 40, fb = class extends Ty {
return this.finished.finally(e).then(() => {});
}
get animation() {
- return this._animation || (this.keyframeResolver?.resume(), Fne()), this._animation;
+ return this._animation || (this.keyframeResolver?.resume(), Pne()), this._animation;
}
get duration() {
return this.animation.duration;
@@ -24562,7 +24562,7 @@ var db = 40, fb = class extends Ty {
cancel() {
this._animation && this.animation.cancel(), this.keyframeResolver?.cancel();
}
-}, pb = class {
+}, Jne = class {
constructor(e) {
this.stop = () => this.runAll("stop"), this.animations = e.filter(Boolean);
}
@@ -24602,10 +24602,10 @@ var db = 40, fb = class extends Ty {
return this.getAll("startTime");
}
get duration() {
- return mb(this.animations, "duration");
+ return db(this.animations, "duration");
}
get iterationDuration() {
- return mb(this.animations, "iterationDuration");
+ return db(this.animations, "iterationDuration");
}
runAll(e) {
this.animations.forEach((t) => t[e]());
@@ -24623,7 +24623,7 @@ var db = 40, fb = class extends Ty {
this.runAll("complete");
}
};
-function mb(e, t) {
+function db(e, t) {
let n = 0;
for (let r = 0; r < e.length; r++) {
let i = e[r][t];
@@ -24633,32 +24633,32 @@ function mb(e, t) {
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/GroupAnimationWithThen.mjs
-var hb = class extends pb {
+var Yne = class extends Jne {
then(e, t) {
return this.finished.finally(e).then(() => {});
}
-}, gb = /* @__PURE__ */ new WeakMap(), _b = (e, t = "") => `${e}:${t}`;
-function vb(e) {
- let t = gb.get(e);
- return t || (t = /* @__PURE__ */ new Map(), gb.set(e, t)), t;
+}, fb = /* @__PURE__ */ new WeakMap(), Xne = (e, t = "") => `${e}:${t}`;
+function Zne(e) {
+ let t = fb.get(e);
+ return t || (t = /* @__PURE__ */ new Map(), fb.set(e, t)), t;
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.mjs
-function yb(e, t, n, r = 0, i = 1) {
+function pb(e, t, n, r = 0, i = 1) {
let a = Array.from(e).sort((e, t) => e.sortNodePosition(t)).indexOf(t), o = e.size, s = (o - 1) * r;
return typeof n == "function" ? n(a, o) : i === 1 ? a * r : s - a * r;
}
//#endregion
//#region node_modules/motion-dom/dist/es/value/index.mjs
-var bb = 30, xb = (e) => !isNaN(parseFloat(e)), Sb = { current: void 0 }, Cb = class {
+var mb = 30, Qne = (e) => !isNaN(parseFloat(e)), hb = { current: void 0 }, $ne = class {
constructor(e, t = {}) {
this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (e) => {
- let t = Dv.now();
+ let t = wv.now();
if (this.updatedAt !== t && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(e), this.current !== this.prev && (this.events.change?.notify(this.current), this.dependents)) for (let e of this.dependents) e.dirty();
}, this.hasAnimated = !1, this.setCurrent(e), this.owner = t.owner;
}
setCurrent(e) {
- this.current = e, this.updatedAt = Dv.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = xb(this.current));
+ this.current = e, this.updatedAt = wv.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = Qne(this.current));
}
setPrevFrameValue(e = this.current) {
this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt;
@@ -24667,10 +24667,10 @@ var bb = 30, xb = (e) => !isNaN(parseFloat(e)), Sb = { current: void 0 }, Cb = c
return this.on("change", e);
}
on(e, t) {
- this.events[e] || (this.events[e] = new $_());
+ this.events[e] || (this.events[e] = new Q_());
let n = this.events[e].add(t);
return e === "change" ? () => {
- n(), Sv.read(() => {
+ n(), yv.read(() => {
this.events.change.getSize() || this.stop();
});
} : n;
@@ -24700,16 +24700,16 @@ var bb = 30, xb = (e) => !isNaN(parseFloat(e)), Sb = { current: void 0 }, Cb = c
this.dependents && this.dependents.delete(e);
}
get() {
- return Sb.current && Sb.current.push(this), this.current;
+ return hb.current && hb.current.push(this), this.current;
}
getPrevious() {
return this.prev;
}
getVelocity() {
- let e = Dv.now();
- if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > bb) return 0;
- let t = Math.min(this.updatedAt - this.prevUpdatedAt, bb);
- return /* @__PURE__ */ nv(parseFloat(this.current) - parseFloat(this.prevFrameValue), t);
+ let e = wv.now();
+ if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > mb) return 0;
+ let t = Math.min(this.updatedAt - this.prevUpdatedAt, mb);
+ return /* @__PURE__ */ tv(parseFloat(this.current) - parseFloat(this.prevFrameValue), t);
}
start(e) {
return this.stop(), new Promise((t) => {
@@ -24731,12 +24731,12 @@ var bb = 30, xb = (e) => !isNaN(parseFloat(e)), Sb = { current: void 0 }, Cb = c
this.dependents?.clear(), this.events.destroy?.notify(), this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
}
};
-function wb(e, t) {
- return new Cb(e, t);
+function gb(e, t) {
+ return new $ne(e, t);
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/utils/resolve-transition.mjs
-function Tb(e, t) {
+function _b(e, t) {
if (e?.inherit && t) {
let { inherit: n, ...r } = e;
return {
@@ -24748,26 +24748,26 @@ function Tb(e, t) {
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/utils/get-value-transition.mjs
-function Eb(e, t) {
+function vb(e, t) {
let n = e?.[t] ?? e?.default ?? e;
- return n === e ? n : Tb(n, e);
+ return n === e ? n : _b(n, e);
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/utils/default-transitions.mjs
-var Kne = {
+var ere = {
type: "spring",
stiffness: 500,
damping: 25,
restSpeed: 10
-}, qne = (e) => ({
+}, tre = (e) => ({
type: "spring",
stiffness: 550,
damping: e === 0 ? 2 * Math.sqrt(550) : 30,
restSpeed: 10
-}), Jne = {
+}), nre = {
type: "keyframes",
duration: .8
-}, Yne = {
+}, rre = {
type: "keyframes",
ease: [
.25,
@@ -24776,7 +24776,7 @@ var Kne = {
1
],
duration: .3
-}, Xne = (e, { keyframes: t }) => t.length > 2 ? Jne : Ly.has(e) ? e.startsWith("scale") ? qne(t[1]) : Kne : Yne, Zne = /* @__PURE__ */ new Set([
+}, ire = (e, { keyframes: t }) => t.length > 2 ? nre : Ry.has(e) ? e.startsWith("scale") ? tre(t[1]) : ere : rre, are = /* @__PURE__ */ new Set([
"when",
"delay",
"delayChildren",
@@ -24788,15 +24788,15 @@ var Kne = {
"from",
"elapsed"
]);
-function Qne(e) {
- for (let t in e) if (!Zne.has(t)) return !0;
+function ore(e) {
+ for (let t in e) if (!are.has(t)) return !0;
return !1;
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs
-var Db = (e, t, n, r = {}, i, a) => (o) => {
- let s = Eb(r, e) || {}, c = s.delay || r.delay || 0, { elapsed: l = 0 } = r;
- l -= /* @__PURE__ */ ev(c);
+var yb = (e, t, n, r = {}, i, a) => (o) => {
+ let s = vb(r, e) || {}, c = s.delay || r.delay || 0, { elapsed: l = 0 } = r;
+ l -= /* @__PURE__ */ $_(c);
let u = {
keyframes: Array.isArray(n) ? n : [null, n],
ease: "easeOut",
@@ -24813,160 +24813,160 @@ var Db = (e, t, n, r = {}, i, a) => (o) => {
motionValue: t,
element: a ? void 0 : i
};
- Qne(s) || Object.assign(u, Xne(e, u)), u.duration &&= /* @__PURE__ */ ev(u.duration), u.repeatDelay &&= /* @__PURE__ */ ev(u.repeatDelay), u.from !== void 0 && (u.keyframes[0] = u.from);
+ ore(s) || Object.assign(u, ire(e, u)), u.duration &&= /* @__PURE__ */ $_(u.duration), u.repeatDelay &&= /* @__PURE__ */ $_(u.repeatDelay), u.from !== void 0 && (u.keyframes[0] = u.from);
let d = !1;
- if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && (ab(u), u.delay === 0 && (d = !0)), (G_.instantAnimations || G_.skipAnimations || i?.shouldSkipAnimations || s.skipAnimations) && (d = !0, ab(u), u.delay = 0), u.allowFlatten = !s.type && !s.ease, d && !a && t.get() !== void 0) {
+ if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && (lb(u), u.delay === 0 && (d = !0)), (W_.instantAnimations || W_.skipAnimations || i?.shouldSkipAnimations || s.skipAnimations) && (d = !0, lb(u), u.delay = 0), u.allowFlatten = !s.type && !s.ease, d && !a && t.get() !== void 0) {
let e = Cy(u.keyframes, s);
if (e !== void 0) {
- Sv.update(() => {
+ yv.update(() => {
u.onUpdate(e), u.onComplete();
});
return;
}
}
- return s.isSync ? new Ey(u) : new fb(u);
-}, $ne = /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;
-function ere(e) {
- let t = $ne.exec(e);
+ return s.isSync ? new Dy(u) : new qne(u);
+}, sre = /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;
+function cre(e) {
+ let t = sre.exec(e);
if (!t) return [,];
let [, n, r, i] = t;
return [`--${n ?? r}`, i];
}
-function Ob(e, t, n = 1) {
+function bb(e, t, n = 1) {
`${e}`;
- let [r, i] = ere(e);
+ let [r, i] = cre(e);
if (!r) return;
let a = window.getComputedStyle(t).getPropertyValue(r);
if (a) {
let e = a.trim();
- return K_(e) ? parseFloat(e) : e;
+ return G_(e) ? parseFloat(e) : e;
}
- return Av(i) ? Ob(i, t, n + 1) : i;
+ return Dv(i) ? bb(i, t, n + 1) : i;
}
//#endregion
//#region node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs
-function kb(e) {
+function xb(e) {
let t = [{}, {}];
return e?.values.forEach((e, n) => {
t[0][n] = e.get(), t[1][n] = e.getVelocity();
}), t;
}
-function Ab(e, t, n, r) {
+function Sb(e, t, n, r) {
if (typeof t == "function") {
- let [i, a] = kb(r);
+ let [i, a] = xb(r);
t = t(n === void 0 ? e.custom : n, i, a);
}
if (typeof t == "string" && (t = e.variants && e.variants[t]), typeof t == "function") {
- let [i, a] = kb(r);
+ let [i, a] = xb(r);
t = t(n === void 0 ? e.custom : n, i, a);
}
return t;
}
//#endregion
//#region node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs
-function jb(e, t, n) {
+function Cb(e, t, n) {
let r = e.getProps();
- return Ab(r, t, n === void 0 ? r.custom : n, e);
+ return Sb(r, t, n === void 0 ? r.custom : n, e);
}
//#endregion
//#region node_modules/motion-dom/dist/es/render/utils/keys-position.mjs
-var Mb = /* @__PURE__ */ new Set([
+var wb = /* @__PURE__ */ new Set([
"width",
"height",
"top",
"left",
"right",
"bottom",
- ...Iy
-]), Nb = (e) => Array.isArray(e);
+ ...Ly
+]), Tb = (e) => Array.isArray(e);
//#endregion
//#region node_modules/motion-dom/dist/es/render/utils/setters.mjs
-function tre(e, t, n) {
- e.hasValue(t) ? e.getValue(t).set(n) : e.addValue(t, wb(n));
+function lre(e, t, n) {
+ e.hasValue(t) ? e.getValue(t).set(n) : e.addValue(t, gb(n));
}
-function nre(e) {
- return Nb(e) ? e[e.length - 1] || 0 : e;
+function ure(e) {
+ return Tb(e) ? e[e.length - 1] || 0 : e;
}
-function rre(e, t) {
- let { transitionEnd: n = {}, transition: r = {}, ...i } = jb(e, t) || {};
+function dre(e, t) {
+ let { transitionEnd: n = {}, transition: r = {}, ...i } = Cb(e, t) || {};
i = {
...i,
...n
};
- for (let t in i) tre(e, t, nre(i[t]));
+ for (let t in i) lre(e, t, ure(i[t]));
}
//#endregion
//#region node_modules/motion-dom/dist/es/value/utils/is-motion-value.mjs
-var Pb = (e) => !!(e && e.getVelocity);
+var Eb = (e) => !!(e && e.getVelocity);
//#endregion
//#region node_modules/motion-dom/dist/es/value/will-change/is.mjs
-function ire(e) {
- return !!(Pb(e) && e.add);
+function fre(e) {
+ return !!(Eb(e) && e.add);
}
//#endregion
//#region node_modules/motion-dom/dist/es/value/will-change/add-will-change.mjs
-function Fb(e, t) {
+function Db(e, t) {
let n = e.getValue("willChange");
- if (ire(n)) return n.add(t);
- if (!n && G_.WillChange) {
- let n = new G_.WillChange("auto");
+ if (fre(n)) return n.add(t);
+ if (!n && W_.WillChange) {
+ let n = new W_.WillChange("auto");
e.addValue("willChange", n), n.add(t);
}
}
//#endregion
//#region node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.mjs
-function Ib(e) {
+function Ob(e) {
return e.replace(/([A-Z])/g, (e) => `-${e.toLowerCase()}`);
}
-var Lb = "data-" + Ib("framerAppearId");
+var kb = "data-" + Ob("framerAppearId");
//#endregion
//#region node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.mjs
-function Rb(e) {
- return e.props[Lb];
+function Ab(e) {
+ return e.props[kb];
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs
-function are({ protectedKeys: e, needsAnimating: t }, n) {
+function pre({ protectedKeys: e, needsAnimating: t }, n) {
let r = e.hasOwnProperty(n) && t[n] !== !0;
return t[n] = !1, r;
}
-function zb(e, t, { delay: n = 0, transitionOverride: r, type: i } = {}) {
+function jb(e, t, { delay: n = 0, transitionOverride: r, type: i } = {}) {
let { transition: a, transitionEnd: o, ...s } = t, c = e.getDefaultTransition();
- a = a ? Tb(a, c) : c;
+ a = a ? _b(a, c) : c;
let l = a?.reduceMotion, u = a?.skipAnimations;
r && (a = r);
let d = [], f = i && e.animationState && e.animationState.getState()[i], p = a?.path;
p && p.animateVisualElement(e, s, a, n, d);
for (let t in s) {
let r = e.getValue(t, e.latestValues[t] ?? null), i = s[t];
- if (i === void 0 || f && are(f, t)) continue;
+ if (i === void 0 || f && pre(f, t)) continue;
let o = {
delay: n,
- ...Eb(a || {}, t)
+ ...vb(a || {}, t)
};
u && (o.skipAnimations = !0);
let c = r.get();
if (c !== void 0 && !r.isAnimating() && !Array.isArray(i) && i === c && !o.velocity) {
- Sv.update(() => r.set(i));
+ yv.update(() => r.set(i));
continue;
}
let p = !1;
if (window.MotionHandoffAnimation) {
- let n = Rb(e);
+ let n = Ab(e);
if (n) {
- let e = window.MotionHandoffAnimation(n, t, Sv);
+ let e = window.MotionHandoffAnimation(n, t, yv);
e !== null && (o.startTime = e, p = !0);
}
}
- Fb(e, t);
+ Db(e, t);
let m = l ?? e.shouldReduceMotion;
- r.start(Db(t, r, i, m && Mb.has(t) ? { type: !1 } : o, e, p));
+ r.start(yb(t, r, i, m && wb.has(t) ? { type: !1 } : o, e, p));
let h = r.animation;
h && d.push(h);
}
if (o) {
- let t = () => Sv.update(() => {
- o && rre(e, o);
+ let t = () => yv.update(() => {
+ o && dre(e, o);
});
d.length ? Promise.all(d).then(t) : t();
}
@@ -24974,12 +24974,12 @@ function zb(e, t, { delay: n = 0, transitionOverride: r, type: i } = {}) {
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs
-function Bb(e, t, n = {}) {
- let r = jb(e, t, n.type === "exit" ? e.presenceContext?.custom : void 0), { transition: i = e.getDefaultTransition() || {} } = r || {};
+function Mb(e, t, n = {}) {
+ let r = Cb(e, t, n.type === "exit" ? e.presenceContext?.custom : void 0), { transition: i = e.getDefaultTransition() || {} } = r || {};
n.transitionOverride && (i = n.transitionOverride);
- let a = r ? () => Promise.all(zb(e, r, n)) : () => Promise.resolve(), o = e.variantChildren && e.variantChildren.size ? (r = 0) => {
+ let a = r ? () => Promise.all(jb(e, r, n)) : () => Promise.resolve(), o = e.variantChildren && e.variantChildren.size ? (r = 0) => {
let { delayChildren: a = 0, staggerChildren: o, staggerDirection: s } = i;
- return ore(e, t, r, a, o, s, n);
+ return mre(e, t, r, a, o, s, n);
} : () => Promise.resolve(), { when: s } = i;
if (s) {
let [e, t] = s === "beforeChildren" ? [a, o] : [o, a];
@@ -24987,26 +24987,26 @@ function Bb(e, t, n = {}) {
}
return Promise.all([a(), o(n.delay)]);
}
-function ore(e, t, n = 0, r = 0, i = 0, a = 1, o) {
+function mre(e, t, n = 0, r = 0, i = 0, a = 1, o) {
let s = [];
- for (let c of e.variantChildren) c.notify("AnimationStart", t), s.push(Bb(c, t, {
+ for (let c of e.variantChildren) c.notify("AnimationStart", t), s.push(Mb(c, t, {
...o,
- delay: n + (typeof r == "function" ? 0 : r) + yb(e.variantChildren, c, r, i, a)
+ delay: n + (typeof r == "function" ? 0 : r) + pb(e.variantChildren, c, r, i, a)
}).then(() => c.notify("AnimationComplete", t)));
return Promise.all(s);
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs
-function sre(e, t, n = {}) {
+function hre(e, t, n = {}) {
e.notify("AnimationStart", t);
let r;
if (Array.isArray(t)) {
- let i = t.map((t) => Bb(e, t, n));
+ let i = t.map((t) => Mb(e, t, n));
r = Promise.all(i);
- } else if (typeof t == "string") r = Bb(e, t, n);
+ } else if (typeof t == "string") r = Mb(e, t, n);
else {
- let i = typeof t == "function" ? jb(e, t, n.custom) : t;
- r = Promise.all(zb(e, i, n));
+ let i = typeof t == "function" ? Cb(e, t, n.custom) : t;
+ r = Promise.all(jb(e, i, n));
}
return r.then(() => {
e.notify("AnimationComplete", t);
@@ -25014,176 +25014,176 @@ function sre(e, t, n = {}) {
}
//#endregion
//#region node_modules/motion-dom/dist/es/value/types/auto.mjs
-var cre = {
+var gre = {
test: (e) => e === "auto",
parse: (e) => e
-}, Vb = (e) => (t) => t.test(e), Hb = [
- Mv,
- Gv,
- Wv,
- Uv,
- Kte,
- Gte,
- cre
-], Ub = (e) => Hb.find(Vb(e));
+}, Nb = (e) => (t) => t.test(e), Pb = [
+ kv,
+ Hv,
+ Vv,
+ Bv,
+ Yte,
+ Jte,
+ gre
+], Fb = (e) => Pb.find(Nb(e));
//#endregion
//#region node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.mjs
-function lre(e) {
- return typeof e == "number" ? e === 0 : e === null || e === "none" || e === "0" || J_(e);
+function _re(e) {
+ return typeof e == "number" ? e === 0 : e === null || e === "none" || e === "0" || q_(e);
}
//#endregion
//#region node_modules/motion-dom/dist/es/value/types/complex/filter.mjs
-var ure = /* @__PURE__ */ new Set([
+var vre = /* @__PURE__ */ new Set([
"brightness",
"contrast",
"saturate",
"opacity"
]);
-function dre(e) {
+function yre(e) {
let [t, n] = e.slice(0, -1).split("(");
if (t === "drop-shadow") return e;
- let [r] = n.match(Iv) || [];
+ let [r] = n.match(Nv) || [];
if (!r) return e;
- let i = n.replace(r, ""), a = +!!ure.has(t);
+ let i = n.replace(r, ""), a = +!!vre.has(t);
return r !== n && (a *= 100), t + "(" + a + i + ")";
}
-var fre = /\b([a-z-]*)\(.*?\)/gu, Wb = {
- ...ey,
+var bre = /\b([a-z-]*)\(.*?\)/gu, Ib = {
+ ...Zv,
getAnimatableNone: (e) => {
- let t = e.match(fre);
- return t ? t.map(dre).join(" ") : e;
+ let t = e.match(bre);
+ return t ? t.map(yre).join(" ") : e;
}
-}, Gb = {
- ...ey,
+}, Lb = {
+ ...Zv,
getAnimatableNone: (e) => {
- let t = ey.parse(e);
- return ey.createTransformer(e)(t.map((e) => typeof e == "number" ? 0 : typeof e == "object" ? {
+ let t = Zv.parse(e);
+ return Zv.createTransformer(e)(t.map((e) => typeof e == "number" ? 0 : typeof e == "object" ? {
...e,
alpha: 1
} : e));
}
-}, Kb = {
- ...Mv,
+}, Rb = {
+ ...kv,
transform: Math.round
-}, qb = {
- borderWidth: Gv,
- borderTopWidth: Gv,
- borderRightWidth: Gv,
- borderBottomWidth: Gv,
- borderLeftWidth: Gv,
- borderRadius: Gv,
- borderTopLeftRadius: Gv,
- borderTopRightRadius: Gv,
- borderBottomRightRadius: Gv,
- borderBottomLeftRadius: Gv,
- width: Gv,
- maxWidth: Gv,
- height: Gv,
- maxHeight: Gv,
- top: Gv,
- right: Gv,
- bottom: Gv,
- left: Gv,
- inset: Gv,
- insetBlock: Gv,
- insetBlockStart: Gv,
- insetBlockEnd: Gv,
- insetInline: Gv,
- insetInlineStart: Gv,
- insetInlineEnd: Gv,
- padding: Gv,
- paddingTop: Gv,
- paddingRight: Gv,
- paddingBottom: Gv,
- paddingLeft: Gv,
- paddingBlock: Gv,
- paddingBlockStart: Gv,
- paddingBlockEnd: Gv,
- paddingInline: Gv,
- paddingInlineStart: Gv,
- paddingInlineEnd: Gv,
- margin: Gv,
- marginTop: Gv,
- marginRight: Gv,
- marginBottom: Gv,
- marginLeft: Gv,
- marginBlock: Gv,
- marginBlockStart: Gv,
- marginBlockEnd: Gv,
- marginInline: Gv,
- marginInlineStart: Gv,
- marginInlineEnd: Gv,
- fontSize: Gv,
- backgroundPositionX: Gv,
- backgroundPositionY: Gv,
- rotate: Uv,
- pathRotation: Uv,
- rotateX: Uv,
- rotateY: Uv,
- rotateZ: Uv,
- scale: Pv,
- scaleX: Pv,
- scaleY: Pv,
- scaleZ: Pv,
- skew: Uv,
- skewX: Uv,
- skewY: Uv,
- distance: Gv,
- translateX: Gv,
- translateY: Gv,
- translateZ: Gv,
- x: Gv,
- y: Gv,
- z: Gv,
- perspective: Gv,
- transformPerspective: Gv,
- opacity: Nv,
- originX: Kv,
- originY: Kv,
- originZ: Gv,
- zIndex: Kb,
- fillOpacity: Nv,
- strokeOpacity: Nv,
- numOctaves: Kb
-}, pre = {
- ...qb,
- color: Jv,
- backgroundColor: Jv,
- outlineColor: Jv,
- fill: Jv,
- stroke: Jv,
- borderColor: Jv,
- borderTopColor: Jv,
- borderRightColor: Jv,
- borderBottomColor: Jv,
- borderLeftColor: Jv,
- filter: Wb,
- WebkitFilter: Wb,
- mask: Gb,
- WebkitMask: Gb
-}, Jb = (e) => pre[e], mre = /*@__PURE__*/ new Set([Wb, Gb]);
-function Yb(e, t) {
- let n = Jb(e);
- return mre.has(n) || (n = ey), n.getAnimatableNone ? n.getAnimatableNone(t) : void 0;
+}, zb = {
+ borderWidth: Hv,
+ borderTopWidth: Hv,
+ borderRightWidth: Hv,
+ borderBottomWidth: Hv,
+ borderLeftWidth: Hv,
+ borderRadius: Hv,
+ borderTopLeftRadius: Hv,
+ borderTopRightRadius: Hv,
+ borderBottomRightRadius: Hv,
+ borderBottomLeftRadius: Hv,
+ width: Hv,
+ maxWidth: Hv,
+ height: Hv,
+ maxHeight: Hv,
+ top: Hv,
+ right: Hv,
+ bottom: Hv,
+ left: Hv,
+ inset: Hv,
+ insetBlock: Hv,
+ insetBlockStart: Hv,
+ insetBlockEnd: Hv,
+ insetInline: Hv,
+ insetInlineStart: Hv,
+ insetInlineEnd: Hv,
+ padding: Hv,
+ paddingTop: Hv,
+ paddingRight: Hv,
+ paddingBottom: Hv,
+ paddingLeft: Hv,
+ paddingBlock: Hv,
+ paddingBlockStart: Hv,
+ paddingBlockEnd: Hv,
+ paddingInline: Hv,
+ paddingInlineStart: Hv,
+ paddingInlineEnd: Hv,
+ margin: Hv,
+ marginTop: Hv,
+ marginRight: Hv,
+ marginBottom: Hv,
+ marginLeft: Hv,
+ marginBlock: Hv,
+ marginBlockStart: Hv,
+ marginBlockEnd: Hv,
+ marginInline: Hv,
+ marginInlineStart: Hv,
+ marginInlineEnd: Hv,
+ fontSize: Hv,
+ backgroundPositionX: Hv,
+ backgroundPositionY: Hv,
+ rotate: Bv,
+ pathRotation: Bv,
+ rotateX: Bv,
+ rotateY: Bv,
+ rotateZ: Bv,
+ scale: jv,
+ scaleX: jv,
+ scaleY: jv,
+ scaleZ: jv,
+ skew: Bv,
+ skewX: Bv,
+ skewY: Bv,
+ distance: Hv,
+ translateX: Hv,
+ translateY: Hv,
+ translateZ: Hv,
+ x: Hv,
+ y: Hv,
+ z: Hv,
+ perspective: Hv,
+ transformPerspective: Hv,
+ opacity: Av,
+ originX: Uv,
+ originY: Uv,
+ originZ: Hv,
+ zIndex: Rb,
+ fillOpacity: Av,
+ strokeOpacity: Av,
+ numOctaves: Rb
+}, xre = {
+ ...zb,
+ color: Gv,
+ backgroundColor: Gv,
+ outlineColor: Gv,
+ fill: Gv,
+ stroke: Gv,
+ borderColor: Gv,
+ borderTopColor: Gv,
+ borderRightColor: Gv,
+ borderBottomColor: Gv,
+ borderLeftColor: Gv,
+ filter: Ib,
+ WebkitFilter: Ib,
+ mask: Lb,
+ WebkitMask: Lb
+}, Bb = (e) => xre[e], Sre = /*@__PURE__*/ new Set([Ib, Lb]);
+function Vb(e, t) {
+ let n = Bb(e);
+ return Sre.has(n) || (n = Zv), n.getAnimatableNone ? n.getAnimatableNone(t) : void 0;
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs
-var hre = /* @__PURE__ */ new Set([
+var Cre = /* @__PURE__ */ new Set([
"auto",
"none",
"0"
]);
-function gre(e, t, n) {
+function wre(e, t, n) {
let r = 0, i;
for (; r < e.length && !i;) {
let t = e[r];
- typeof t == "string" && !hre.has(t) && Qv(t).values.length && (i = e[r]), r++;
+ typeof t == "string" && !Cre.has(t) && Yv(t).values.length && (i = e[r]), r++;
}
- if (i && n) for (let r of t) e[r] = Yb(n, i);
+ if (i && n) for (let r of t) e[r] = Vb(n, i);
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs
-var _re = class extends Ky {
+var Tre = class extends qy {
constructor(e, t, n, r, i) {
super(e, t, n, r, i, !0);
}
@@ -25193,34 +25193,34 @@ var _re = class extends Ky {
super.readKeyframes();
for (let n = 0; n < e.length; n++) {
let r = e[n];
- if (typeof r == "string" && (r = r.trim(), Av(r))) {
- let i = Ob(r, t.current);
+ if (typeof r == "string" && (r = r.trim(), Dv(r))) {
+ let i = bb(r, t.current);
i !== void 0 && (e[n] = i), n === e.length - 1 && (this.finalKeyframe = r);
}
}
- if (this.resolveNoneKeyframes(), !Mb.has(n) || e.length !== 2) return;
- let [r, i] = e, a = Ub(r), o = Ub(i);
- if (jv(r) !== jv(i) && zy[n]) {
+ if (this.resolveNoneKeyframes(), !wb.has(n) || e.length !== 2) return;
+ let [r, i] = e, a = Fb(r), o = Fb(i);
+ if (Ov(r) !== Ov(i) && By[n]) {
this.needsMeasurement = !0;
return;
}
if (a !== o) {
- if (Ry(a) && Ry(o)) for (let t = 0; t < e.length; t++) {
+ if (zy(a) && zy(o)) for (let t = 0; t < e.length; t++) {
let n = e[t];
typeof n == "string" && (e[t] = parseFloat(n));
}
- else zy[n] && (this.needsMeasurement = !0);
+ else By[n] && (this.needsMeasurement = !0);
}
}
resolveNoneKeyframes() {
let { unresolvedKeyframes: e, name: t } = this, n = [];
- for (let t = 0; t < e.length; t++) (e[t] === null || lre(e[t])) && n.push(t);
- n.length && gre(e, n, t);
+ for (let t = 0; t < e.length; t++) (e[t] === null || _re(e[t])) && n.push(t);
+ n.length && wre(e, n, t);
}
measureInitialState() {
let { element: e, unresolvedKeyframes: t, name: n } = this;
if (!e || !e.current) return;
- n === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = zy[n](e.measureViewportBox(), window.getComputedStyle(e.current)), t[0] = this.measuredOrigin;
+ n === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = By[n](e.measureViewportBox(), window.getComputedStyle(e.current)), t[0] = this.measuredOrigin;
let r = t[t.length - 1];
r !== void 0 && e.getValue(n, r).jump(r, !1);
}
@@ -25230,23 +25230,23 @@ var _re = class extends Ky {
let r = e.getValue(t);
r && r.jump(this.measuredOrigin, !1);
let i = n.length - 1, a = n[i];
- n[i] = zy[t](e.measureViewportBox(), window.getComputedStyle(e.current)), a !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = a), this.removedTransforms?.length && this.removedTransforms.forEach(([t, n]) => {
+ n[i] = By[t](e.measureViewportBox(), window.getComputedStyle(e.current)), a !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = a), this.removedTransforms?.length && this.removedTransforms.forEach(([t, n]) => {
e.getValue(t).set(n);
}), this.resolveNoneKeyframes();
}
-}, Xb = [
+}, Hb = [
"borderTopLeftRadius",
"borderTopRightRadius",
"borderBottomRightRadius",
"borderBottomLeftRadius"
-], vre = /* @__PURE__ */ new Set([
+], Ere = /* @__PURE__ */ new Set([
"borderWidth",
"borderTopWidth",
"borderRightWidth",
"borderBottomWidth",
"borderLeftWidth",
"borderRadius",
- ...Xb,
+ ...Hb,
"width",
"maxWidth",
"height",
@@ -25290,12 +25290,12 @@ var _re = class extends Ky {
]);
//#endregion
//#region node_modules/motion-dom/dist/es/animation/keyframes/utils/apply-px-defaults.mjs
-function yre(e, t) {
- for (let n = 0; n < e.length; n++) typeof e[n] == "number" && vre.has(t) && (e[n] = e[n] + "px");
+function Dre(e, t) {
+ for (let n = 0; n < e.length; n++) typeof e[n] == "number" && Ere.has(t) && (e[n] = e[n] + "px");
}
//#endregion
//#region node_modules/motion-dom/dist/es/utils/resolve-elements.mjs
-function Zb(e, t, n) {
+function Ub(e, t, n) {
if (e == null) return [];
if (e instanceof EventTarget) return [e];
if (typeof e == "string") {
@@ -25308,34 +25308,34 @@ function Zb(e, t, n) {
}
//#endregion
//#region node_modules/motion-dom/dist/es/value/types/utils/get-as-type.mjs
-var Qb = (e, t) => t && typeof e == "number" ? t.transform(e) : e;
+var Wb = (e, t) => t && typeof e == "number" ? t.transform(e) : e;
//#endregion
//#region node_modules/motion-dom/dist/es/utils/is-html-element.mjs
-function $b(e) {
- return q_(e) && "offsetHeight" in e && !("ownerSVGElement" in e);
+function Gb(e) {
+ return K_(e) && "offsetHeight" in e && !("ownerSVGElement" in e);
}
//#endregion
//#region node_modules/motion-dom/dist/es/frameloop/microtask.mjs
-var { schedule: ex, cancel: bre } = /* @__PURE__ */ xv(queueMicrotask, !1), tx = {
+var { schedule: Kb, cancel: Ore } = /* @__PURE__ */ vv(queueMicrotask, !1), qb = {
x: !1,
y: !1
};
-function nx() {
- return tx.x || tx.y;
+function Jb() {
+ return qb.x || qb.y;
}
//#endregion
//#region node_modules/motion-dom/dist/es/gestures/drag/state/set-active.mjs
-function xre(e) {
- return e === "x" || e === "y" ? tx[e] ? null : (tx[e] = !0, () => {
- tx[e] = !1;
- }) : tx.x || tx.y ? null : (tx.x = tx.y = !0, () => {
- tx.x = tx.y = !1;
+function kre(e) {
+ return e === "x" || e === "y" ? qb[e] ? null : (qb[e] = !0, () => {
+ qb[e] = !1;
+ }) : qb.x || qb.y ? null : (qb.x = qb.y = !0, () => {
+ qb.x = qb.y = !1;
});
}
//#endregion
//#region node_modules/motion-dom/dist/es/gestures/utils/setup.mjs
-function rx(e, t) {
- let n = Zb(e), r = new AbortController();
+function Yb(e, t) {
+ let n = Ub(e), r = new AbortController();
return [
n,
{
@@ -25348,11 +25348,11 @@ function rx(e, t) {
}
//#endregion
//#region node_modules/motion-dom/dist/es/gestures/hover.mjs
-function Sre(e) {
- return !(e.pointerType === "touch" || nx());
+function Are(e) {
+ return !(e.pointerType === "touch" || Jb());
}
-function Cre(e, t, n = {}) {
- let [r, i, a] = rx(e, n);
+function jre(e, t, n = {}) {
+ let [r, i, a] = Yb(e, n);
return r.forEach((e) => {
let n = !1, r = !1, a, o = () => {
e.removeEventListener("pointerleave", u);
@@ -25372,7 +25372,7 @@ function Cre(e, t, n = {}) {
}
};
e.addEventListener("pointerenter", (n) => {
- if (!Sre(n)) return;
+ if (!Are(n)) return;
r = !1;
let o = t(e, n);
typeof o == "function" && (a = o, e.addEventListener("pointerleave", u, i));
@@ -25381,130 +25381,130 @@ function Cre(e, t, n = {}) {
}
//#endregion
//#region node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.mjs
-var ix = (e, t) => t ? e === t || ix(e, t.parentElement) : !1, ax = (e) => e.pointerType === "mouse" ? typeof e.button != "number" || e.button <= 0 : e.isPrimary !== !1, wre = /* @__PURE__ */ new Set([
+var Xb = (e, t) => t ? e === t || Xb(e, t.parentElement) : !1, Zb = (e) => e.pointerType === "mouse" ? typeof e.button != "number" || e.button <= 0 : e.isPrimary !== !1, Mre = /* @__PURE__ */ new Set([
"BUTTON",
"INPUT",
"SELECT",
"TEXTAREA",
"A"
]);
-function Tre(e) {
- return wre.has(e.tagName) || e.isContentEditable === !0;
+function Nre(e) {
+ return Mre.has(e.tagName) || e.isContentEditable === !0;
}
-var Ere = /* @__PURE__ */ new Set([
+var Pre = /* @__PURE__ */ new Set([
"INPUT",
"SELECT",
"TEXTAREA"
]);
-function Dre(e) {
- return Ere.has(e.tagName) || e.isContentEditable === !0;
+function Fre(e) {
+ return Pre.has(e.tagName) || e.isContentEditable === !0;
}
//#endregion
//#region node_modules/motion-dom/dist/es/gestures/press/utils/state.mjs
-var ox = /* @__PURE__ */ new WeakSet();
+var Qb = /* @__PURE__ */ new WeakSet();
//#endregion
//#region node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs
-function sx(e) {
+function $b(e) {
return (t) => {
t.key === "Enter" && e(t);
};
}
-function cx(e, t) {
+function ex(e, t) {
e.dispatchEvent(new PointerEvent("pointer" + t, {
isPrimary: !0,
bubbles: !0
}));
}
-var Ore = (e, t) => {
+var Ire = (e, t) => {
let n = e.currentTarget;
if (!n) return;
- let r = sx(() => {
- if (ox.has(n)) return;
- cx(n, "down");
- let e = sx(() => {
- cx(n, "up");
+ let r = $b(() => {
+ if (Qb.has(n)) return;
+ ex(n, "down");
+ let e = $b(() => {
+ ex(n, "up");
});
- n.addEventListener("keyup", e, t), n.addEventListener("blur", () => cx(n, "cancel"), t);
+ n.addEventListener("keyup", e, t), n.addEventListener("blur", () => ex(n, "cancel"), t);
});
n.addEventListener("keydown", r, t), n.addEventListener("blur", () => n.removeEventListener("keydown", r), t);
};
//#endregion
//#region node_modules/motion-dom/dist/es/gestures/press/index.mjs
-function lx(e) {
- return ax(e) && !nx();
+function tx(e) {
+ return Zb(e) && !Jb();
}
-var ux = /* @__PURE__ */ new WeakSet();
-function kre(e, t, n = {}) {
- let [r, i, a] = rx(e, n), o = (e) => {
+var nx = /* @__PURE__ */ new WeakSet();
+function Lre(e, t, n = {}) {
+ let [r, i, a] = Yb(e, n), o = (e) => {
let r = e.currentTarget;
- if (!lx(e) || ux.has(e)) return;
- ox.add(r), n.stopPropagation && ux.add(e);
+ if (!tx(e) || nx.has(e)) return;
+ Qb.add(r), n.stopPropagation && nx.add(e);
let a = t(r, e), o = {
...i,
capture: !0
}, s = (e, t) => {
- window.removeEventListener("pointerup", c, o), window.removeEventListener("pointercancel", l, o), ox.has(r) && ox.delete(r), lx(e) && typeof a == "function" && a(e, { success: t });
+ window.removeEventListener("pointerup", c, o), window.removeEventListener("pointercancel", l, o), Qb.has(r) && Qb.delete(r), tx(e) && typeof a == "function" && a(e, { success: t });
}, c = (e) => {
- s(e, r === window || r === document || n.useGlobalTarget || ix(r, e.target));
+ s(e, r === window || r === document || n.useGlobalTarget || Xb(r, e.target));
}, l = (e) => {
s(e, !1);
};
window.addEventListener("pointerup", c, o), window.addEventListener("pointercancel", l, o);
};
return r.forEach((e) => {
- (n.useGlobalTarget ? window : e).addEventListener("pointerdown", o, i), $b(e) && (e.addEventListener("focus", (e) => Ore(e, i)), !Tre(e) && !e.hasAttribute("tabindex") && (e.tabIndex = 0));
+ (n.useGlobalTarget ? window : e).addEventListener("pointerdown", o, i), Gb(e) && (e.addEventListener("focus", (e) => Ire(e, i)), !Nre(e) && !e.hasAttribute("tabindex") && (e.tabIndex = 0));
}), a;
}
//#endregion
//#region node_modules/motion-dom/dist/es/render/dom/style-computed.mjs
-function dx(e, t) {
+function rx(e, t) {
let n = window.getComputedStyle(e);
- return qy(t) ? n.getPropertyValue(t) : n[t];
+ return Jy(t) ? n.getPropertyValue(t) : n[t];
}
//#endregion
//#region node_modules/motion-dom/dist/es/utils/is-svg-element.mjs
-function fx(e) {
- return q_(e) && "ownerSVGElement" in e;
+function ix(e) {
+ return K_(e) && "ownerSVGElement" in e;
}
//#endregion
//#region node_modules/motion-dom/dist/es/resize/handle-element.mjs
-var px = /* @__PURE__ */ new WeakMap(), mx, hx = (e, t, n) => (r, i) => i && i[0] ? i[0][e + "Size"] : fx(r) && "getBBox" in r ? r.getBBox()[t] : r[n], Are = /*@__PURE__*/ hx("inline", "width", "offsetWidth"), jre = /*@__PURE__*/ hx("block", "height", "offsetHeight");
-function Mre({ target: e, borderBoxSize: t }) {
- px.get(e)?.forEach((n) => {
+var ax = /* @__PURE__ */ new WeakMap(), ox, sx = (e, t, n) => (r, i) => i && i[0] ? i[0][e + "Size"] : ix(r) && "getBBox" in r ? r.getBBox()[t] : r[n], Rre = /*@__PURE__*/ sx("inline", "width", "offsetWidth"), zre = /*@__PURE__*/ sx("block", "height", "offsetHeight");
+function Bre({ target: e, borderBoxSize: t }) {
+ ax.get(e)?.forEach((n) => {
n(e, {
get width() {
- return Are(e, t);
+ return Rre(e, t);
},
get height() {
- return jre(e, t);
+ return zre(e, t);
}
});
});
}
-function Nre(e) {
- e.forEach(Mre);
+function Vre(e) {
+ e.forEach(Bre);
}
-function Pre() {
- typeof ResizeObserver > "u" || (mx = new ResizeObserver(Nre));
+function Hre() {
+ typeof ResizeObserver > "u" || (ox = new ResizeObserver(Vre));
}
-function Fre(e, t) {
- mx || Pre();
- let n = Zb(e);
+function Ure(e, t) {
+ ox || Hre();
+ let n = Ub(e);
return n.forEach((e) => {
- let n = px.get(e);
- n || (n = /* @__PURE__ */ new Set(), px.set(e, n)), n.add(t), mx?.observe(e);
+ let n = ax.get(e);
+ n || (n = /* @__PURE__ */ new Set(), ax.set(e, n)), n.add(t), ox?.observe(e);
}), () => {
n.forEach((e) => {
- let n = px.get(e);
- n?.delete(t), n?.size || mx?.unobserve(e);
+ let n = ax.get(e);
+ n?.delete(t), n?.size || ox?.unobserve(e);
});
};
}
//#endregion
//#region node_modules/motion-dom/dist/es/resize/handle-window.mjs
-var gx = /* @__PURE__ */ new Set(), _x;
-function Ire() {
- _x = () => {
+var cx = /* @__PURE__ */ new Set(), lx;
+function Wre() {
+ lx = () => {
let e = {
get width() {
return window.innerWidth;
@@ -25513,49 +25513,49 @@ function Ire() {
return window.innerHeight;
}
};
- gx.forEach((t) => t(e));
- }, window.addEventListener("resize", _x);
+ cx.forEach((t) => t(e));
+ }, window.addEventListener("resize", lx);
}
-function Lre(e) {
- return gx.add(e), _x || Ire(), () => {
- gx.delete(e), !gx.size && typeof _x == "function" && (window.removeEventListener("resize", _x), _x = void 0);
+function Gre(e) {
+ return cx.add(e), lx || Wre(), () => {
+ cx.delete(e), !cx.size && typeof lx == "function" && (window.removeEventListener("resize", lx), lx = void 0);
};
}
//#endregion
//#region node_modules/motion-dom/dist/es/resize/index.mjs
-function vx(e, t) {
- return typeof e == "function" ? Lre(e) : Fre(e, t);
+function ux(e, t) {
+ return typeof e == "function" ? Gre(e) : Ure(e, t);
}
//#endregion
//#region node_modules/motion-dom/dist/es/stats/buffer.mjs
-var yx = {
+var dx = {
value: null,
addProjectionMetrics: null
};
//#endregion
//#region node_modules/motion-dom/dist/es/utils/is-svg-svg-element.mjs
-function Rre(e) {
- return fx(e) && e.tagName === "svg";
+function Kre(e) {
+ return ix(e) && e.tagName === "svg";
}
//#endregion
//#region node_modules/motion-dom/dist/es/utils/transform.mjs
-function zre(...e) {
- let t = !Array.isArray(e[0]), n = t ? 0 : -1, r = e[0 + n], i = e[1 + n], a = e[2 + n], o = e[3 + n], s = xy(i, a, o);
+function qre(...e) {
+ let t = !Array.isArray(e[0]), n = t ? 0 : -1, r = e[0 + n], i = e[1 + n], a = e[2 + n], o = e[3 + n], s = by(i, a, o);
return t ? s(r) : s;
}
//#endregion
//#region node_modules/motion-dom/dist/es/value/follow-value.mjs
-function Bre(e, t, n = {}) {
+function Jre(e, t, n = {}) {
let r = e.get(), i = null, a = r, o, s = typeof r == "string" ? r.replace(/[\d.-]/g, "") : void 0, c = () => {
i &&= (i.stop(), null), e.animation = void 0;
}, l = () => {
- let t = xx(e.get()), r = xx(a);
+ let t = px(e.get()), r = px(a);
if (t === r) {
c();
return;
}
let s = i ? i.getGeneratorVelocity() : e.getVelocity();
- c(), i = new Ey({
+ c(), i = new Dy({
keyframes: [t, r],
velocity: s,
type: "spring",
@@ -25570,10 +25570,10 @@ function Bre(e, t, n = {}) {
});
};
if (e.attach((e, t) => {
- a = e, o = (e) => t(bx(e, s)), Sv.postRender(u);
- }, c), Pb(t)) {
+ a = e, o = (e) => t(fx(e, s)), yv.postRender(u);
+ }, c), Eb(t)) {
let r = n.skipInitialAnimation === !0, i = t.on("change", (t) => {
- r ? (r = !1, e.jump(bx(t, s), !1)) : e.set(bx(t, s));
+ r ? (r = !1, e.jump(fx(t, s), !1)) : e.set(fx(t, s));
}), a = e.on("destroy", i);
return () => {
i(), a();
@@ -25581,46 +25581,46 @@ function Bre(e, t, n = {}) {
}
return c;
}
-function bx(e, t) {
+function fx(e, t) {
return t ? e + t : e;
}
-function xx(e) {
+function px(e) {
return typeof e == "number" ? e : parseFloat(e);
}
//#endregion
//#region node_modules/motion-dom/dist/es/value/types/utils/find.mjs
-var Vre = [
- ...Hb,
- Jv,
- ey
-], Hre = (e) => Vre.find(Vb(e)), Sx = () => ({
+var Yre = [
+ ...Pb,
+ Gv,
+ Zv
+], Xre = (e) => Yre.find(Nb(e)), mx = () => ({
translate: 0,
scale: 1,
origin: 0,
originPoint: 0
-}), Cx = () => ({
- x: Sx(),
- y: Sx()
-}), wx = () => ({
+}), hx = () => ({
+ x: mx(),
+ y: mx()
+}), gx = () => ({
min: 0,
max: 0
-}), Tx = () => ({
- x: wx(),
- y: wx()
-}), Ure = /* @__PURE__ */ new WeakMap();
+}), _x = () => ({
+ x: gx(),
+ y: gx()
+}), Zre = /* @__PURE__ */ new WeakMap();
//#endregion
//#region node_modules/motion-dom/dist/es/render/utils/is-animation-controls.mjs
-function Ex(e) {
+function vx(e) {
return typeof e == "object" && !!e && typeof e.start == "function";
}
//#endregion
//#region node_modules/motion-dom/dist/es/render/utils/is-variant-label.mjs
-function Dx(e) {
+function yx(e) {
return typeof e == "string" || Array.isArray(e);
}
//#endregion
//#region node_modules/motion-dom/dist/es/render/utils/variant-props.mjs
-var Ox = [
+var bx = [
"animate",
"whileInView",
"whileFocus",
@@ -25628,29 +25628,29 @@ var Ox = [
"whileTap",
"whileDrag",
"exit"
-], kx = ["initial", ...Ox];
+], xx = ["initial", ...bx];
//#endregion
//#region node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs
-function Ax(e) {
- return Ex(e.animate) || kx.some((t) => Dx(e[t]));
+function Sx(e) {
+ return vx(e.animate) || xx.some((t) => yx(e[t]));
}
-function jx(e) {
- return !!(Ax(e) || e.variants);
+function Cx(e) {
+ return !!(Sx(e) || e.variants);
}
//#endregion
//#region node_modules/motion-dom/dist/es/render/utils/motion-values.mjs
-function Wre(e, t, n) {
+function Qre(e, t, n) {
for (let r in t) {
let i = t[r], a = n[r];
- if (Pb(i)) e.addValue(r, i);
- else if (Pb(a)) e.addValue(r, wb(i, { owner: e }));
+ if (Eb(i)) e.addValue(r, i);
+ else if (Eb(a)) e.addValue(r, gb(i, { owner: e }));
else if (a !== i) {
if (e.hasValue(r)) {
let t = e.getValue(r);
t.liveStyle === !0 ? t.jump(i) : t.hasAnimated || t.set(i);
} else {
let t = e.getStaticValue(r);
- e.addValue(r, wb(t === void 0 ? i : t, { owner: e }));
+ e.addValue(r, gb(t === void 0 ? i : t, { owner: e }));
}
}
}
@@ -25659,18 +25659,18 @@ function Wre(e, t, n) {
}
//#endregion
//#region node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.mjs
-var Mx = { current: null }, Nx = { current: !1 }, Gre = typeof window < "u";
-function Px() {
- if (Nx.current = !0, Gre) {
+var wx = { current: null }, Tx = { current: !1 }, $re = typeof window < "u";
+function Ex() {
+ if (Tx.current = !0, $re) {
if (window.matchMedia) {
- let e = window.matchMedia("(prefers-reduced-motion)"), t = () => Mx.current = e.matches;
+ let e = window.matchMedia("(prefers-reduced-motion)"), t = () => wx.current = e.matches;
e.addEventListener("change", t), t();
- } else Mx.current = !1;
+ } else wx.current = !1;
}
}
//#endregion
//#region node_modules/motion-dom/dist/es/render/VisualElement.mjs
-var Fx = [
+var Dx = [
"AnimationStart",
"AnimationComplete",
"Update",
@@ -25678,38 +25678,38 @@ var Fx = [
"LayoutMeasure",
"LayoutAnimationStart",
"LayoutAnimationComplete"
-], Ix = {};
-function Lx(e) {
- Ix = e;
+], Ox = {};
+function kx(e) {
+ Ox = e;
}
-function Kre() {
- return Ix;
+function eie() {
+ return Ox;
}
-var qre = class {
+var tie = class {
scrapeMotionValuesFromProps(e, t, n) {
return {};
}
constructor({ parent: e, props: t, presenceContext: n, reducedMotionConfig: r, skipAnimations: i, blockInitialAnimation: a, visualState: o }, s = {}) {
- this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.shouldSkipAnimations = !1, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = Ky, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.hasBeenMounted = !1, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
+ this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.shouldSkipAnimations = !1, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = qy, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.hasBeenMounted = !1, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
- let e = Dv.now();
- this.renderScheduledAt < e && (this.renderScheduledAt = e, Sv.render(this.render, !1, !0));
+ let e = wv.now();
+ this.renderScheduledAt < e && (this.renderScheduledAt = e, yv.render(this.render, !1, !0));
};
let { latestValues: c, renderState: l } = o;
- this.latestValues = c, this.baseTarget = { ...c }, this.initialValues = t.initial ? { ...c } : {}, this.renderState = l, this.parent = e, this.props = t, this.presenceContext = n, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = r, this.skipAnimationsConfig = i, this.options = s, this.blockInitialAnimation = !!a, this.isControllingVariants = Ax(t), this.isVariantNode = jx(t), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
+ this.latestValues = c, this.baseTarget = { ...c }, this.initialValues = t.initial ? { ...c } : {}, this.renderState = l, this.parent = e, this.props = t, this.presenceContext = n, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = r, this.skipAnimationsConfig = i, this.options = s, this.blockInitialAnimation = !!a, this.isControllingVariants = Sx(t), this.isVariantNode = Cx(t), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
let { willChange: u, ...d } = this.scrapeMotionValuesFromProps(t, {}, this);
for (let e in d) {
let t = d[e];
- c[e] !== void 0 && Pb(t) && t.set(c[e]);
+ c[e] !== void 0 && Eb(t) && t.set(c[e]);
}
}
mount(e) {
if (this.hasBeenMounted) for (let e in this.initialValues) this.values.get(e)?.jump(this.initialValues[e]), this.latestValues[e] = this.initialValues[e];
- this.current = e, Ure.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((e, t) => this.bindToMotionValue(t, e)), this.reducedMotionConfig === "never" ? this.shouldReduceMotion = !1 : this.reducedMotionConfig === "always" ? this.shouldReduceMotion = !0 : (Nx.current || Px(), this.shouldReduceMotion = Mx.current), this.shouldSkipAnimations = this.skipAnimationsConfig ?? !1, this.parent?.addChild(this), this.update(this.props, this.presenceContext), this.hasBeenMounted = !0;
+ this.current = e, Zre.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((e, t) => this.bindToMotionValue(t, e)), this.reducedMotionConfig === "never" ? this.shouldReduceMotion = !1 : this.reducedMotionConfig === "always" ? this.shouldReduceMotion = !0 : (Tx.current || Ex(), this.shouldReduceMotion = wx.current), this.shouldSkipAnimations = this.skipAnimationsConfig ?? !1, this.parent?.addChild(this), this.update(this.props, this.presenceContext), this.hasBeenMounted = !0;
}
unmount() {
- this.projection && this.projection.unmount(), Cv(this.notifyUpdate), Cv(this.render), this.valueSubscriptions.forEach((e) => e()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent?.removeChild(this);
+ this.projection && this.projection.unmount(), bv(this.notifyUpdate), bv(this.render), this.valueSubscriptions.forEach((e) => e()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent?.removeChild(this);
for (let e in this.events) this.events[e].clear();
for (let e in this.features) {
let t = this.features[e];
@@ -25724,24 +25724,24 @@ var qre = class {
this.children.delete(e), this.enteringChildren && this.enteringChildren.delete(e);
}
bindToMotionValue(e, t) {
- if (this.valueSubscriptions.has(e) && this.valueSubscriptions.get(e)(), t.accelerate && ob.has(e) && this.current instanceof HTMLElement) {
- let { factory: n, keyframes: r, times: i, ease: a, duration: o } = t.accelerate, s = new tb({
+ if (this.valueSubscriptions.has(e) && this.valueSubscriptions.get(e)(), t.accelerate && ub.has(e) && this.current instanceof HTMLElement) {
+ let { factory: n, keyframes: r, times: i, ease: a, duration: o } = t.accelerate, s = new nb({
element: this.current,
name: e,
keyframes: r,
times: i,
ease: a,
- duration: /* @__PURE__ */ ev(o)
+ duration: /* @__PURE__ */ $_(o)
}), c = n(s);
this.valueSubscriptions.set(e, () => {
c(), s.cancel();
});
return;
}
- let n = Ly.has(e);
+ let n = Ry.has(e);
n && this.onBindTransform && this.onBindTransform();
let r = t.on("change", (t) => {
- this.latestValues[e] = t, this.props.onUpdate && Sv.preRender(this.notifyUpdate), n && this.projection && (this.projection.isTransformDirty = !0), this.scheduleRender();
+ this.latestValues[e] = t, this.props.onUpdate && yv.preRender(this.notifyUpdate), n && this.projection && (this.projection.isTransformDirty = !0), this.scheduleRender();
}), i;
typeof window < "u" && window.MotionCheckAppearSync && (i = window.MotionCheckAppearSync(this, e, t)), this.valueSubscriptions.set(e, () => {
r(), i && i();
@@ -25752,8 +25752,8 @@ var qre = class {
}
updateFeatures() {
let e = "animation";
- for (e in Ix) {
- let t = Ix[e];
+ for (e in Ox) {
+ let t = Ox[e];
if (!t) continue;
let { isEnabled: n, Feature: r } = t;
if (!this.features[e] && r && n(this.props) && (this.features[e] = new r(this)), this.features[e]) {
@@ -25766,7 +25766,7 @@ var qre = class {
this.build(this.renderState, this.latestValues, this.props);
}
measureViewportBox() {
- return this.current ? this.measureInstanceViewportBox(this.current, this.props) : Tx();
+ return this.current ? this.measureInstanceViewportBox(this.current, this.props) : _x();
}
getStaticValue(e) {
return this.latestValues[e];
@@ -25776,13 +25776,13 @@ var qre = class {
}
update(e, t) {
(e.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = e, this.prevPresenceContext = this.presenceContext, this.presenceContext = t;
- for (let t = 0; t < Fx.length; t++) {
- let n = Fx[t];
+ for (let t = 0; t < Dx.length; t++) {
+ let n = Dx[t];
this.propEventSubscriptions[n] && (this.propEventSubscriptions[n](), delete this.propEventSubscriptions[n]);
let r = e["on" + n];
r && (this.propEventSubscriptions[n] = this.on(n, r));
}
- this.prevMotionValues = Wre(this, this.scrapeMotionValuesFromProps(e, this.prevProps || {}, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
+ this.prevMotionValues = Qre(this, this.scrapeMotionValuesFromProps(e, this.prevProps || {}, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
}
getProps() {
return this.props;
@@ -25818,11 +25818,11 @@ var qre = class {
getValue(e, t) {
if (this.props.values && this.props.values[e]) return this.props.values[e];
let n = this.values.get(e);
- return n === void 0 && t !== void 0 && (n = wb(t === null ? void 0 : t, { owner: this }), this.addValue(e, n)), n;
+ return n === void 0 && t !== void 0 && (n = gb(t === null ? void 0 : t, { owner: this }), this.addValue(e, n)), n;
}
readValue(e, t) {
let n = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : this.getBaseTargetFromProps(this.props, e) ?? this.readValueFromInstance(this.current, e, this.options);
- return n != null && (typeof n == "string" && (K_(n) || J_(n)) ? n = parseFloat(n) : !Hre(n) && ey.test(t) && (n = Yb(e, t)), this.setBaseTarget(e, Pb(n) ? n.get() : n)), Pb(n) ? n.get() : n;
+ return n != null && (typeof n == "string" && (G_(n) || q_(n)) ? n = parseFloat(n) : !Xre(n) && Zv.test(t) && (n = Vb(e, t)), this.setBaseTarget(e, Eb(n) ? n.get() : n)), Eb(n) ? n.get() : n;
}
setBaseTarget(e, t) {
this.baseTarget[e] = t;
@@ -25830,25 +25830,25 @@ var qre = class {
getBaseTarget(e) {
let { initial: t } = this.props, n;
if (typeof t == "string" || typeof t == "object") {
- let r = Ab(this.props, t, this.presenceContext?.custom);
+ let r = Sb(this.props, t, this.presenceContext?.custom);
r && (n = r[e]);
}
if (t && n !== void 0) return n;
let r = this.getBaseTargetFromProps(this.props, e);
- return r !== void 0 && !Pb(r) ? r : this.initialValues[e] !== void 0 && n === void 0 ? void 0 : this.baseTarget[e];
+ return r !== void 0 && !Eb(r) ? r : this.initialValues[e] !== void 0 && n === void 0 ? void 0 : this.baseTarget[e];
}
on(e, t) {
- return this.events[e] || (this.events[e] = new $_()), this.events[e].add(t);
+ return this.events[e] || (this.events[e] = new Q_()), this.events[e].add(t);
}
notify(e, ...t) {
this.events[e] && this.events[e].notify(...t);
}
scheduleRenderMicrotask() {
- ex.render(this.render);
+ Kb.render(this.render);
}
-}, Rx = class extends qre {
+}, Ax = class extends tie {
constructor() {
- super(...arguments), this.KeyframeResolver = _re;
+ super(...arguments), this.KeyframeResolver = Tre;
}
sortInstanceNodePosition(e, t) {
return e.compareDocumentPosition(t) & 2 ? 1 : -1;
@@ -25863,11 +25863,11 @@ var qre = class {
handleChildMotionValue() {
this.childSubscription && (this.childSubscription(), delete this.childSubscription);
let { children: e } = this.props;
- Pb(e) && (this.childSubscription = e.on("change", (e) => {
+ Eb(e) && (this.childSubscription = e.on("change", (e) => {
this.current && (this.current.textContent = `${e}`);
}));
}
-}, zx = class {
+}, jx = class {
constructor(e) {
this.isMounted = !1, this.node = e;
}
@@ -25875,7 +25875,7 @@ var qre = class {
};
//#endregion
//#region node_modules/motion-dom/dist/es/projection/geometry/conversion.mjs
-function Bx({ top: e, left: t, right: n, bottom: r }) {
+function Mx({ top: e, left: t, right: n, bottom: r }) {
return {
x: {
min: t,
@@ -25887,7 +25887,7 @@ function Bx({ top: e, left: t, right: n, bottom: r }) {
}
};
}
-function Jre({ x: e, y: t }) {
+function nie({ x: e, y: t }) {
return {
top: t.min,
right: e.max,
@@ -25895,7 +25895,7 @@ function Jre({ x: e, y: t }) {
left: e.min
};
}
-function Yre(e, t) {
+function rie(e, t) {
if (!t) return e;
let n = t({
x: e.left,
@@ -25913,37 +25913,37 @@ function Yre(e, t) {
}
//#endregion
//#region node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs
-function Vx(e) {
+function Nx(e) {
return e === void 0 || e === 1;
}
-function Hx({ scale: e, scaleX: t, scaleY: n }) {
- return !Vx(e) || !Vx(t) || !Vx(n);
+function Px({ scale: e, scaleX: t, scaleY: n }) {
+ return !Nx(e) || !Nx(t) || !Nx(n);
}
-function Ux(e) {
- return Hx(e) || Wx(e) || e.z || e.rotate || e.rotateX || e.rotateY || e.skewX || e.skewY;
+function Fx(e) {
+ return Px(e) || Ix(e) || e.z || e.rotate || e.rotateX || e.rotateY || e.skewX || e.skewY;
}
-function Wx(e) {
- return Gx(e.x) || Gx(e.y);
+function Ix(e) {
+ return Lx(e.x) || Lx(e.y);
}
-function Gx(e) {
+function Lx(e) {
return e && e !== "0%";
}
//#endregion
//#region node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs
-function Kx(e, t, n) {
+function Rx(e, t, n) {
return n + t * (e - n);
}
-function qx(e, t, n, r, i) {
- return i !== void 0 && (e = Kx(e, i, r)), Kx(e, n, r) + t;
+function zx(e, t, n, r, i) {
+ return i !== void 0 && (e = Rx(e, i, r)), Rx(e, n, r) + t;
}
-function Jx(e, t = 0, n = 1, r, i) {
- e.min = qx(e.min, t, n, r, i), e.max = qx(e.max, t, n, r, i);
+function Bx(e, t = 0, n = 1, r, i) {
+ e.min = zx(e.min, t, n, r, i), e.max = zx(e.max, t, n, r, i);
}
-function Yx(e, { x: t, y: n }) {
- Jx(e.x, t.translate, t.scale, t.originPoint), Jx(e.y, n.translate, n.scale, n.originPoint);
+function Vx(e, { x: t, y: n }) {
+ Bx(e.x, t.translate, t.scale, t.originPoint), Bx(e.y, n.translate, n.scale, n.originPoint);
}
-var Xx = .999999999999, Zx = 1.0000000000001;
-function Xre(e, t, n, r = !1) {
+var Hx = .999999999999, Ux = 1.0000000000001;
+function iie(e, t, n, r = !1) {
let i = n.length;
if (!i) return;
t.x = t.y = 1;
@@ -25951,44 +25951,44 @@ function Xre(e, t, n, r = !1) {
for (let s = 0; s < i; s++) {
a = n[s], o = a.projectionDelta;
let { visualElement: i } = a.options;
- i && i.props.style && i.props.style.display === "contents" || (r && a.options.layoutScroll && a.scroll && a !== a.root && (Qx(e.x, -a.scroll.offset.x), Qx(e.y, -a.scroll.offset.y)), o && (t.x *= o.x.scale, t.y *= o.y.scale, Yx(e, o)), r && Ux(a.latestValues) && tS(e, a.latestValues, a.layout?.layoutBox));
+ i && i.props.style && i.props.style.display === "contents" || (r && a.options.layoutScroll && a.scroll && a !== a.root && (Wx(e.x, -a.scroll.offset.x), Wx(e.y, -a.scroll.offset.y)), o && (t.x *= o.x.scale, t.y *= o.y.scale, Vx(e, o)), r && Fx(a.latestValues) && qx(e, a.latestValues, a.layout?.layoutBox));
}
- t.x < Zx && t.x > Xx && (t.x = 1), t.y < Zx && t.y > Xx && (t.y = 1);
+ t.x < Ux && t.x > Hx && (t.x = 1), t.y < Ux && t.y > Hx && (t.y = 1);
}
-function Qx(e, t) {
+function Wx(e, t) {
e.min += t, e.max += t;
}
-function $x(e, t, n, r, i = .5) {
- Jx(e, t, n, ry(e.min, e.max, i), r);
+function Gx(e, t, n, r, i = .5) {
+ Bx(e, t, n, ey(e.min, e.max, i), r);
}
-function eS(e, t) {
+function Kx(e, t) {
return typeof e == "string" ? parseFloat(e) / 100 * (t.max - t.min) : e;
}
-function tS(e, t, n) {
+function qx(e, t, n) {
let r = n ?? e;
- $x(e.x, eS(t.x, r.x), t.scaleX, t.scale, t.originX), $x(e.y, eS(t.y, r.y), t.scaleY, t.scale, t.originY);
+ Gx(e.x, Kx(t.x, r.x), t.scaleX, t.scale, t.originX), Gx(e.y, Kx(t.y, r.y), t.scaleY, t.scale, t.originY);
}
//#endregion
//#region node_modules/motion-dom/dist/es/projection/utils/measure.mjs
-function nS(e, t) {
- return Bx(Yre(e.getBoundingClientRect(), t));
+function Jx(e, t) {
+ return Mx(rie(e.getBoundingClientRect(), t));
}
-function Zre(e, t, n) {
- let r = nS(e, n), { scroll: i } = t;
- return i && (Qx(r.x, i.offset.x), Qx(r.y, i.offset.y)), r;
+function aie(e, t, n) {
+ let r = Jx(e, n), { scroll: i } = t;
+ return i && (Wx(r.x, i.offset.x), Wx(r.y, i.offset.y)), r;
}
//#endregion
//#region node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs
-var Qre = {
+var oie = {
x: "translateX",
y: "translateY",
z: "translateZ",
transformPerspective: "perspective"
-}, $re = Iy.length;
-function eie(e, t, n) {
+}, sie = Ly.length;
+function cie(e, t, n) {
let r = "", i = !0;
- for (let a = 0; a < $re; a++) {
- let o = Iy[a], s = e[o];
+ for (let a = 0; a < sie; a++) {
+ let o = Ly[a], s = e[o];
if (s === void 0) continue;
let c = !0;
if (typeof s == "number") c = s === +!!o.startsWith("scale");
@@ -25997,154 +25997,154 @@ function eie(e, t, n) {
c = o.startsWith("scale") ? e === 1 : e === 0;
}
if (!c || n) {
- let e = Qb(s, qb[o]);
+ let e = Wb(s, zb[o]);
if (!c) {
i = !1;
- let t = Qre[o] || o;
+ let t = oie[o] || o;
r += `${t}(${e}) `;
}
n && (t[o] = e);
}
}
let a = e.pathRotation;
- return a && (i = !1, r += `rotate(${Qb(a, qb.pathRotation)}) `), r = r.trim(), n ? r = n(t, i ? "" : r) : i && (r = "none"), r;
+ return a && (i = !1, r += `rotate(${Wb(a, zb.pathRotation)}) `), r = r.trim(), n ? r = n(t, i ? "" : r) : i && (r = "none"), r;
}
//#endregion
//#region node_modules/motion-dom/dist/es/render/html/utils/build-styles.mjs
-function rS(e, t, n) {
+function Yx(e, t, n) {
let { style: r, vars: i, transformOrigin: a } = e, o = !1, s = !1;
for (let e in t) {
let n = t[e];
- if (Ly.has(e)) {
+ if (Ry.has(e)) {
o = !0;
continue;
}
- if (kv(e)) {
+ if (Ev(e)) {
i[e] = n;
continue;
}
{
- let t = Qb(n, qb[e]);
+ let t = Wb(n, zb[e]);
e.startsWith("origin") ? (s = !0, a[e] = t) : r[e] = t;
}
}
- if (t.transform || (o || n ? r.transform = eie(t, e.transform, n) : r.transform &&= "none"), s) {
+ if (t.transform || (o || n ? r.transform = cie(t, e.transform, n) : r.transform &&= "none"), s) {
let { originX: e = "50%", originY: t = "50%", originZ: n = 0 } = a;
r.transformOrigin = `${e} ${t} ${n}`;
}
}
//#endregion
//#region node_modules/motion-dom/dist/es/render/html/utils/render.mjs
-function iS(e, { style: t, vars: n }, r, i) {
+function Xx(e, { style: t, vars: n }, r, i) {
let a = e.style, o;
for (o in t) a[o] = t[o];
for (o in i?.applyProjectionStyles(a, r), n) a.setProperty(o, n[o]);
}
//#endregion
//#region node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.mjs
-function aS(e, t) {
+function Zx(e, t) {
return t.max === t.min ? 0 : e / (t.max - t.min) * 100;
}
-var oS = { correct: (e, t) => {
+var Qx = { correct: (e, t) => {
if (!t.target) return e;
if (typeof e == "string") {
- if (Gv.test(e)) e = parseFloat(e);
+ if (Hv.test(e)) e = parseFloat(e);
else return e;
}
- return `${aS(e, t.target.x)}% ${aS(e, t.target.y)}%`;
-} }, tie = { correct: (e, { treeScale: t, projectionDelta: n }) => {
- let r = e, i = ey.parse(e);
+ return `${Zx(e, t.target.x)}% ${Zx(e, t.target.y)}%`;
+} }, $x = { correct: (e, { treeScale: t, projectionDelta: n }) => {
+ let r = e, i = Zv.parse(e);
if (i.length > 5) return r;
- let a = ey.createTransformer(e), o = typeof i[0] == "number" ? 0 : 1, s = n.x.scale * t.x, c = n.y.scale * t.y;
+ let a = Zv.createTransformer(e), o = typeof i[0] == "number" ? 0 : 1, s = n.x.scale * t.x, c = n.y.scale * t.y;
i[0 + o] /= s, i[1 + o] /= c;
- let l = ry(s, c, .5);
+ let l = ey(s, c, .5);
return typeof i[2 + o] == "number" && (i[2 + o] /= l), typeof i[3 + o] == "number" && (i[3 + o] /= l), a(i);
-} }, sS = {
+} }, eS = {
borderRadius: {
- ...oS,
- applyTo: [...Xb]
+ ...Qx,
+ applyTo: [...Hb]
},
- borderTopLeftRadius: oS,
- borderTopRightRadius: oS,
- borderBottomLeftRadius: oS,
- borderBottomRightRadius: oS,
- boxShadow: tie
+ borderTopLeftRadius: Qx,
+ borderTopRightRadius: Qx,
+ borderBottomLeftRadius: Qx,
+ borderBottomRightRadius: Qx,
+ boxShadow: $x
};
//#endregion
//#region node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.mjs
-function cS(e, { layout: t, layoutId: n }) {
- return Ly.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!sS[e] || e === "opacity");
+function tS(e, { layout: t, layoutId: n }) {
+ return Ry.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!eS[e] || e === "opacity");
}
//#endregion
//#region node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.mjs
-function lS(e, t, n) {
+function nS(e, t, n) {
let r = e.style, i = t?.style, a = {};
if (!r) return a;
- for (let t in r) (Pb(r[t]) || i && Pb(i[t]) || cS(t, e) || n?.getValue(t)?.liveStyle !== void 0) && (a[t] = r[t]);
+ for (let t in r) (Eb(r[t]) || i && Eb(i[t]) || tS(t, e) || n?.getValue(t)?.liveStyle !== void 0) && (a[t] = r[t]);
return a;
}
//#endregion
//#region node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs
-function nie(e) {
+function rS(e) {
return window.getComputedStyle(e);
}
-var rie = class extends Rx {
+var iS = class extends Ax {
constructor() {
- super(...arguments), this.type = "html", this.renderInstance = iS;
+ super(...arguments), this.type = "html", this.renderInstance = Xx;
}
mount(e) {
e.style, super.mount(e);
}
readValueFromInstance(e, t) {
- if (Ly.has(t)) return this.projection?.isProjecting ? Py(t) : Ane(e, t);
+ if (Ry.has(t)) return this.projection?.isProjecting ? Fy(t) : kne(e, t);
{
- let n = nie(e), r = (kv(t) ? n.getPropertyValue(t) : n[t]) || 0;
+ let n = rS(e), r = (Ev(t) ? n.getPropertyValue(t) : n[t]) || 0;
return typeof r == "string" ? r.trim() : r;
}
}
measureInstanceViewportBox(e, { transformPagePoint: t }) {
- return nS(e, t);
+ return Jx(e, t);
}
build(e, t, n) {
- rS(e, t, n.transformTemplate);
+ Yx(e, t, n.transformTemplate);
}
scrapeMotionValuesFromProps(e, t, n) {
- return lS(e, t, n);
+ return nS(e, t, n);
}
-}, iie = {
+}, aS = {
offset: "stroke-dashoffset",
array: "stroke-dasharray"
-}, aie = {
+}, oS = {
offset: "strokeDashoffset",
array: "strokeDasharray"
};
-function oie(e, t, n = 1, r = 0, i = !0) {
+function sS(e, t, n = 1, r = 0, i = !0) {
e.pathLength = 1;
- let a = i ? iie : aie;
+ let a = i ? aS : oS;
e[a.offset] = `${-r}`, e[a.array] = `${t} ${n}`;
}
//#endregion
//#region node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs
-var sie = [
+var cS = [
"offsetDistance",
"offsetPath",
"offsetRotate",
"offsetAnchor"
];
-function uS(e, { attrX: t, attrY: n, attrScale: r, pathLength: i, pathSpacing: a = 1, pathOffset: o = 0, ...s }, c, l, u) {
- if (rS(e, s, l), c) {
+function lS(e, { attrX: t, attrY: n, attrScale: r, pathLength: i, pathSpacing: a = 1, pathOffset: o = 0, ...s }, c, l, u) {
+ if (Yx(e, s, l), c) {
e.style.viewBox && (e.attrs.viewBox = e.style.viewBox);
return;
}
e.attrs = e.style, e.style = {};
let { attrs: d, style: f } = e;
d.transform && (f.transform = d.transform, delete d.transform), (f.transform || d.transformOrigin) && (f.transformOrigin = d.transformOrigin ?? "50% 50%", delete d.transformOrigin), f.transform && (f.transformBox = u?.transformBox ?? "fill-box", delete d.transformBox);
- for (let e of sie) d[e] !== void 0 && (f[e] = d[e], delete d[e]);
- t !== void 0 && (d.x = t), n !== void 0 && (d.y = n), r !== void 0 && (d.scale = r), i !== void 0 && oie(d, i, a, o, !1);
+ for (let e of cS) d[e] !== void 0 && (f[e] = d[e], delete d[e]);
+ t !== void 0 && (d.x = t), n !== void 0 && (d.y = n), r !== void 0 && (d.scale = r), i !== void 0 && sS(d, i, a, o, !1);
}
//#endregion
//#region node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.mjs
-var dS = /* @__PURE__ */ new Set([
+var uS = /* @__PURE__ */ new Set([
"baseFrequency",
"diffuseConstant",
"kernelMatrix",
@@ -26168,68 +26168,68 @@ var dS = /* @__PURE__ */ new Set([
"startOffset",
"textLength",
"lengthAdjust"
-]), fS = (e) => typeof e == "string" && e.toLowerCase() === "svg";
+]), dS = (e) => typeof e == "string" && e.toLowerCase() === "svg";
//#endregion
//#region node_modules/motion-dom/dist/es/render/svg/utils/render.mjs
-function cie(e, t, n, r) {
- iS(e, t, void 0, r);
- for (let n in t.attrs) e.setAttribute(dS.has(n) ? n : Ib(n), t.attrs[n]);
+function fS(e, t, n, r) {
+ Xx(e, t, void 0, r);
+ for (let n in t.attrs) e.setAttribute(uS.has(n) ? n : Ob(n), t.attrs[n]);
}
//#endregion
//#region node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.mjs
function pS(e, t, n) {
- let r = lS(e, t, n);
- for (let n in e) if (Pb(e[n]) || Pb(t[n])) {
- let t = Iy.indexOf(n) === -1 ? n : "attr" + n.charAt(0).toUpperCase() + n.substring(1);
+ let r = nS(e, t, n);
+ for (let n in e) if (Eb(e[n]) || Eb(t[n])) {
+ let t = Ly.indexOf(n) === -1 ? n : "attr" + n.charAt(0).toUpperCase() + n.substring(1);
r[t] = e[n];
}
return r;
}
//#endregion
//#region node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.mjs
-var lie = class extends Rx {
+var mS = class extends Ax {
constructor() {
- super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = Tx;
+ super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = _x;
}
getBaseTargetFromProps(e, t) {
return e[t];
}
readValueFromInstance(e, t) {
- if (Ly.has(t)) {
- let e = Jb(t);
+ if (Ry.has(t)) {
+ let e = Bb(t);
return e && e.default || 0;
}
- return t = dS.has(t) ? t : Ib(t), e.getAttribute(t);
+ return t = uS.has(t) ? t : Ob(t), e.getAttribute(t);
}
scrapeMotionValuesFromProps(e, t, n) {
return pS(e, t, n);
}
build(e, t, n) {
- uS(e, t, this.isSVGTag, n.transformTemplate, n.style);
+ lS(e, t, this.isSVGTag, n.transformTemplate, n.style);
}
renderInstance(e, t, n, r) {
- cie(e, t, n, r);
+ fS(e, t, n, r);
}
mount(e) {
- this.isSVGTag = fS(e.tagName), super.mount(e);
+ this.isSVGTag = dS(e.tagName), super.mount(e);
}
-}, uie = kx.length;
-function mS(e) {
+}, hS = xx.length;
+function gS(e) {
if (!e) return;
if (!e.isControllingVariants) {
- let t = e.parent && mS(e.parent) || {};
+ let t = e.parent && gS(e.parent) || {};
return e.props.initial !== void 0 && (t.initial = e.props.initial), t;
}
let t = {};
- for (let n = 0; n < uie; n++) {
- let r = kx[n], i = e.props[r];
- (Dx(i) || i === !1) && (t[r] = i);
+ for (let n = 0; n < hS; n++) {
+ let r = xx[n], i = e.props[r];
+ (yx(i) || i === !1) && (t[r] = i);
}
return t;
}
//#endregion
//#region node_modules/motion-dom/dist/es/render/utils/shallow-compare.mjs
-function hS(e, t) {
+function _S(e, t) {
if (!Array.isArray(t)) return !1;
let n = t.length;
if (n !== e.length) return !1;
@@ -26238,13 +26238,13 @@ function hS(e, t) {
}
//#endregion
//#region node_modules/motion-dom/dist/es/render/utils/animation-state.mjs
-var die = [...Ox].reverse(), fie = Ox.length;
-function pie(e) {
- return (t) => Promise.all(t.map(({ animation: t, options: n }) => sre(e, t, n)));
+var vS = [...bx].reverse(), yS = bx.length;
+function bS(e) {
+ return (t) => Promise.all(t.map(({ animation: t, options: n }) => hre(e, t, n)));
}
-function mie(e) {
- let t = pie(e), n = _S(), r = !0, i = !1, a = (t) => (n, r) => {
- let i = jb(e, r, t === "exit" ? e.presenceContext?.custom : void 0);
+function xS(e) {
+ let t = bS(e), n = wS(), r = !0, i = !1, a = (t) => (n, r) => {
+ let i = Cb(e, r, t === "exit" ? e.presenceContext?.custom : void 0);
if (i) {
let { transition: e, transitionEnd: t, ...r } = i;
n = {
@@ -26259,12 +26259,12 @@ function mie(e) {
t = n(e);
}
function s(o) {
- let { props: s } = e, c = mS(e.parent) || {}, l = [], u = /* @__PURE__ */ new Set(), d = {}, f = Infinity;
- for (let t = 0; t < fie; t++) {
- let p = die[t], m = n[p], h = s[p] === void 0 ? c[p] : s[p], g = Dx(h), _ = p === o ? m.isActive : null;
+ let { props: s } = e, c = gS(e.parent) || {}, l = [], u = /* @__PURE__ */ new Set(), d = {}, f = Infinity;
+ for (let t = 0; t < yS; t++) {
+ let p = vS[t], m = n[p], h = s[p] === void 0 ? c[p] : s[p], g = yx(h), _ = p === o ? m.isActive : null;
_ === !1 && (f = t);
let v = h === c[p] && h !== s[p] && g;
- if (v && (r || i) && e.manuallyAnimateOnMount && (v = !1), m.protectedKeys = { ...d }, !m.isActive && _ === null || !h && !m.prevProp || Ex(h) || typeof h == "boolean") continue;
+ if (v && (r || i) && e.manuallyAnimateOnMount && (v = !1), m.protectedKeys = { ...d }, !m.isActive && _ === null || !h && !m.prevProp || vx(h) || typeof h == "boolean") continue;
if (p === "exit" && m.isActive && _ !== !0) {
m.prevResolvedValues && (d = {
...d,
@@ -26272,7 +26272,7 @@ function mie(e) {
});
continue;
}
- let y = hie(m.prevProp, h), b = y || p === o && m.isActive && !v && g || t > f && g, x = !1, S = Array.isArray(h) ? h : [h], C = S.reduce(a(p), {});
+ let y = SS(m.prevProp, h), b = y || p === o && m.isActive && !v && g || t > f && g, x = !1, S = Array.isArray(h) ? h : [h], C = S.reduce(a(p), {});
_ === !1 && (C = {});
let { prevResolvedValues: w = {} } = m, T = {
...w,
@@ -26286,7 +26286,7 @@ function mie(e) {
let t = C[e], n = w[e];
if (d.hasOwnProperty(e)) continue;
let r = !1;
- r = Nb(t) && Nb(n) ? !hS(t, n) || y : t !== n, r ? t == null ? u.add(e) : E(e) : t !== void 0 && u.has(e) ? E(e) : m.protectedKeys[e] = !0;
+ r = Tb(t) && Tb(n) ? !_S(t, n) || y : t !== n, r ? t == null ? u.add(e) : E(e) : t !== void 0 && u.has(e) ? E(e) : m.protectedKeys[e] = !0;
}
m.prevProp = h, m.prevResolvedValues = C, m.isActive && (d = {
...d,
@@ -26296,10 +26296,10 @@ function mie(e) {
b && (!D || x) && l.push(...S.map((t) => {
let n = { type: p };
if (typeof t == "string" && (r || i) && !D && e.manuallyAnimateOnMount && e.parent) {
- let { parent: r } = e, i = jb(r, t);
+ let { parent: r } = e, i = Cb(r, t);
if (r.enteringChildren && i) {
let { delayChildren: t } = i.transition || {};
- n.delay = yb(r.enteringChildren, e, t);
+ n.delay = pb(r.enteringChildren, e, t);
}
}
return {
@@ -26311,7 +26311,7 @@ function mie(e) {
if (u.size) {
let t = {};
if (typeof s.initial != "boolean") {
- let n = jb(e, Array.isArray(s.initial) ? s.initial[0] : s.initial);
+ let n = Cb(e, Array.isArray(s.initial) ? s.initial[0] : s.initial);
n && n.transition && (t.transition = n.transition);
}
u.forEach((n) => {
@@ -26335,14 +26335,14 @@ function mie(e) {
setAnimateFunction: o,
getState: () => n,
reset: () => {
- n = _S(), i = !0;
+ n = wS(), i = !0;
}
};
}
-function hie(e, t) {
- return typeof t == "string" ? t !== e : Array.isArray(t) ? !hS(t, e) : !1;
+function SS(e, t) {
+ return typeof t == "string" ? t !== e : Array.isArray(t) ? !_S(t, e) : !1;
}
-function gS(e = !1) {
+function CS(e = !1) {
return {
isActive: e,
protectedKeys: {},
@@ -26350,115 +26350,115 @@ function gS(e = !1) {
prevResolvedValues: {}
};
}
-function _S() {
+function wS() {
return {
- animate: gS(!0),
- whileInView: gS(),
- whileHover: gS(),
- whileTap: gS(),
- whileDrag: gS(),
- whileFocus: gS(),
- exit: gS()
+ animate: CS(!0),
+ whileInView: CS(),
+ whileHover: CS(),
+ whileTap: CS(),
+ whileDrag: CS(),
+ whileFocus: CS(),
+ exit: CS()
};
}
//#endregion
//#region node_modules/motion-dom/dist/es/projection/geometry/copy.mjs
-function vS(e, t) {
+function TS(e, t) {
e.min = t.min, e.max = t.max;
}
-function yS(e, t) {
- vS(e.x, t.x), vS(e.y, t.y);
+function ES(e, t) {
+ TS(e.x, t.x), TS(e.y, t.y);
}
-function bS(e, t) {
+function DS(e, t) {
e.translate = t.translate, e.scale = t.scale, e.originPoint = t.originPoint, e.origin = t.origin;
}
//#endregion
//#region node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs
-var gie = .9999, _ie = 1.0001, vie = -.01, yie = .01;
-function xS(e) {
+var OS = .9999, kS = 1.0001, AS = -.01, jS = .01;
+function MS(e) {
return e.max - e.min;
}
-function bie(e, t, n) {
+function NS(e, t, n) {
return Math.abs(e - t) <= n;
}
-function SS(e, t, n, r = .5) {
- e.origin = r, e.originPoint = ry(t.min, t.max, e.origin), e.scale = xS(n) / xS(t), e.translate = ry(n.min, n.max, e.origin) - e.originPoint, (e.scale >= gie && e.scale <= _ie || isNaN(e.scale)) && (e.scale = 1), (e.translate >= vie && e.translate <= yie || isNaN(e.translate)) && (e.translate = 0);
+function PS(e, t, n, r = .5) {
+ e.origin = r, e.originPoint = ey(t.min, t.max, e.origin), e.scale = MS(n) / MS(t), e.translate = ey(n.min, n.max, e.origin) - e.originPoint, (e.scale >= OS && e.scale <= kS || isNaN(e.scale)) && (e.scale = 1), (e.translate >= AS && e.translate <= jS || isNaN(e.translate)) && (e.translate = 0);
}
-function CS(e, t, n, r) {
- SS(e.x, t.x, n.x, r ? r.originX : void 0), SS(e.y, t.y, n.y, r ? r.originY : void 0);
+function FS(e, t, n, r) {
+ PS(e.x, t.x, n.x, r ? r.originX : void 0), PS(e.y, t.y, n.y, r ? r.originY : void 0);
}
-function wS(e, t, n, r = 0) {
- e.min = (r ? ry(n.min, n.max, r) : n.min) + t.min, e.max = e.min + xS(t);
+function IS(e, t, n, r = 0) {
+ e.min = (r ? ey(n.min, n.max, r) : n.min) + t.min, e.max = e.min + MS(t);
}
-function xie(e, t, n, r) {
- wS(e.x, t.x, n.x, r?.x), wS(e.y, t.y, n.y, r?.y);
+function LS(e, t, n, r) {
+ IS(e.x, t.x, n.x, r?.x), IS(e.y, t.y, n.y, r?.y);
}
-function TS(e, t, n, r = 0) {
- let i = r ? ry(n.min, n.max, r) : n.min;
- e.min = t.min - i, e.max = e.min + xS(t);
+function RS(e, t, n, r = 0) {
+ let i = r ? ey(n.min, n.max, r) : n.min;
+ e.min = t.min - i, e.max = e.min + MS(t);
}
-function ES(e, t, n, r) {
- TS(e.x, t.x, n.x, r?.x), TS(e.y, t.y, n.y, r?.y);
+function zS(e, t, n, r) {
+ RS(e.x, t.x, n.x, r?.x), RS(e.y, t.y, n.y, r?.y);
}
//#endregion
//#region node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs
-function DS(e, t, n, r, i) {
- return e -= t, e = Kx(e, 1 / n, r), i !== void 0 && (e = Kx(e, 1 / i, r)), e;
+function BS(e, t, n, r, i) {
+ return e -= t, e = Rx(e, 1 / n, r), i !== void 0 && (e = Rx(e, 1 / i, r)), e;
}
-function Sie(e, t = 0, n = 1, r = .5, i, a = e, o = e) {
- if (Wv.test(t) && (t = parseFloat(t), t = ry(o.min, o.max, t / 100) - o.min), typeof t != "number") return;
- let s = ry(a.min, a.max, r);
- e === a && (s -= t), e.min = DS(e.min, t, n, s, i), e.max = DS(e.max, t, n, s, i);
+function VS(e, t = 0, n = 1, r = .5, i, a = e, o = e) {
+ if (Vv.test(t) && (t = parseFloat(t), t = ey(o.min, o.max, t / 100) - o.min), typeof t != "number") return;
+ let s = ey(a.min, a.max, r);
+ e === a && (s -= t), e.min = BS(e.min, t, n, s, i), e.max = BS(e.max, t, n, s, i);
}
-function OS(e, t, [n, r, i], a, o) {
- Sie(e, t[n], t[r], t[i], t.scale, a, o);
+function HS(e, t, [n, r, i], a, o) {
+ VS(e, t[n], t[r], t[i], t.scale, a, o);
}
-var Cie = [
+var US = [
"x",
"scaleX",
"originX"
-], wie = [
+], WS = [
"y",
"scaleY",
"originY"
];
-function kS(e, t, n, r) {
- OS(e.x, t, Cie, n ? n.x : void 0, r ? r.x : void 0), OS(e.y, t, wie, n ? n.y : void 0, r ? r.y : void 0);
+function GS(e, t, n, r) {
+ HS(e.x, t, US, n ? n.x : void 0, r ? r.x : void 0), HS(e.y, t, WS, n ? n.y : void 0, r ? r.y : void 0);
}
//#endregion
//#region node_modules/motion-dom/dist/es/projection/geometry/utils.mjs
-function AS(e) {
+function KS(e) {
return e.translate === 0 && e.scale === 1;
}
-function jS(e) {
- return AS(e.x) && AS(e.y);
+function qS(e) {
+ return KS(e.x) && KS(e.y);
}
-function MS(e, t) {
+function JS(e, t) {
return e.min === t.min && e.max === t.max;
}
-function Tie(e, t) {
- return MS(e.x, t.x) && MS(e.y, t.y);
+function lie(e, t) {
+ return JS(e.x, t.x) && JS(e.y, t.y);
}
-function NS(e, t) {
+function YS(e, t) {
return Math.round(e.min) === Math.round(t.min) && Math.round(e.max) === Math.round(t.max);
}
-function PS(e, t) {
- return NS(e.x, t.x) && NS(e.y, t.y);
+function XS(e, t) {
+ return YS(e.x, t.x) && YS(e.y, t.y);
}
-function FS(e) {
- return xS(e.x) / xS(e.y);
+function ZS(e) {
+ return MS(e.x) / MS(e.y);
}
-function IS(e, t) {
+function QS(e, t) {
return e.translate === t.translate && e.scale === t.scale && e.originPoint === t.originPoint;
}
//#endregion
//#region node_modules/motion-dom/dist/es/projection/utils/each-axis.mjs
-function LS(e) {
+function $S(e) {
return [e("x"), e("y")];
}
//#endregion
//#region node_modules/motion-dom/dist/es/projection/styles/transform.mjs
-function Eie(e, t, n) {
+function uie(e, t, n) {
let r = "", i = e.x.translate / t.x, a = e.y.translate / t.y, o = n?.z || 0;
if ((i || a || o) && (r = `translate3d(${i}px, ${a}px, ${o}px) `), (t.x !== 1 || t.y !== 1) && (r += `scale(${1 / t.x}, ${1 / t.y}) `), n) {
let { transformPerspective: e, rotate: t, pathRotation: i, rotateX: a, rotateY: o, skewX: s, skewY: c } = n;
@@ -26469,81 +26469,81 @@ function Eie(e, t, n) {
}
//#endregion
//#region node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs
-var Die = Xb.length, RS = (e) => typeof e == "string" ? parseFloat(e) : e, zS = (e) => typeof e == "number" || Gv.test(e);
-function Oie(e, t, n, r, i, a) {
- i ? (e.opacity = ry(0, n.opacity ?? 1, kie(r)), e.opacityExit = ry(t.opacity ?? 1, 0, Aie(r))) : a && (e.opacity = ry(t.opacity ?? 1, n.opacity ?? 1, r));
- for (let i = 0; i < Die; i++) {
- let a = Xb[i], o = BS(t, a), s = BS(n, a);
- (o !== void 0 || s !== void 0) && (o ||= 0, s ||= 0, o === 0 || s === 0 || zS(o) === zS(s) ? (e[a] = Math.max(ry(RS(o), RS(s), r), 0), (Wv.test(s) || Wv.test(o)) && (e[a] += "%")) : e[a] = s);
+var die = Hb.length, eC = (e) => typeof e == "string" ? parseFloat(e) : e, tC = (e) => typeof e == "number" || Hv.test(e);
+function fie(e, t, n, r, i, a) {
+ i ? (e.opacity = ey(0, n.opacity ?? 1, pie(r)), e.opacityExit = ey(t.opacity ?? 1, 0, mie(r))) : a && (e.opacity = ey(t.opacity ?? 1, n.opacity ?? 1, r));
+ for (let i = 0; i < die; i++) {
+ let a = Hb[i], o = nC(t, a), s = nC(n, a);
+ (o !== void 0 || s !== void 0) && (o ||= 0, s ||= 0, o === 0 || s === 0 || tC(o) === tC(s) ? (e[a] = Math.max(ey(eC(o), eC(s), r), 0), (Vv.test(s) || Vv.test(o)) && (e[a] += "%")) : e[a] = s);
}
- (t.rotate || n.rotate) && (e.rotate = ry(t.rotate || 0, n.rotate || 0, r));
+ (t.rotate || n.rotate) && (e.rotate = ey(t.rotate || 0, n.rotate || 0, r));
}
-function BS(e, t) {
+function nC(e, t) {
return e[t] === void 0 ? e.borderRadius : e[t];
}
-var kie = /*@__PURE__*/ VS(0, .5, fv), Aie = /*@__PURE__*/ VS(.5, .95, X_);
-function VS(e, t, n) {
- return (r) => r < e ? 0 : r > t ? 1 : n(/* @__PURE__ */ Q_(e, t, r));
+var pie = /*@__PURE__*/ rC(0, .5, dv), mie = /*@__PURE__*/ rC(.5, .95, Y_);
+function rC(e, t, n) {
+ return (r) => r < e ? 0 : r > t ? 1 : n(/* @__PURE__ */ Z_(e, t, r));
}
//#endregion
//#region node_modules/motion-dom/dist/es/animation/animate/single-value.mjs
-function jie(e, t, n) {
- let r = Pb(e) ? e : wb(e);
- return r.start(Db("", r, t, n)), r.animation;
+function hie(e, t, n) {
+ let r = Eb(e) ? e : gb(e);
+ return r.start(yb("", r, t, n)), r.animation;
}
//#endregion
//#region node_modules/motion-dom/dist/es/events/add-dom-event.mjs
-function HS(e, t, n, r = { passive: !0 }) {
+function iC(e, t, n, r = { passive: !0 }) {
return e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r);
}
//#endregion
//#region node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.mjs
-var Mie = (e, t) => e.depth - t.depth, Nie = class {
+var gie = (e, t) => e.depth - t.depth, _ie = class {
constructor() {
this.children = [], this.isDirty = !1;
}
add(e) {
- H_(this.children, e), this.isDirty = !0;
+ V_(this.children, e), this.isDirty = !0;
}
remove(e) {
- U_(this.children, e), this.isDirty = !0;
+ H_(this.children, e), this.isDirty = !0;
}
forEach(e) {
- this.isDirty && this.children.sort(Mie), this.isDirty = !1, this.children.forEach(e);
+ this.isDirty && this.children.sort(gie), this.isDirty = !1, this.children.forEach(e);
}
};
//#endregion
//#region node_modules/motion-dom/dist/es/utils/delay.mjs
-function Pie(e, t) {
- let n = Dv.now(), r = ({ timestamp: i }) => {
+function vie(e, t) {
+ let n = wv.now(), r = ({ timestamp: i }) => {
let a = i - n;
- a >= t && (Cv(r), e(a - t));
+ a >= t && (bv(r), e(a - t));
};
- return Sv.setup(r, !0), () => Cv(r);
+ return yv.setup(r, !0), () => bv(r);
}
//#endregion
//#region node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.mjs
-function US(e) {
- return Pb(e) ? e.get() : e;
+function aC(e) {
+ return Eb(e) ? e.get() : e;
}
//#endregion
//#region node_modules/motion-dom/dist/es/projection/shared/stack.mjs
-var Fie = class {
+var yie = class {
constructor() {
this.members = [];
}
add(e) {
- H_(this.members, e);
+ V_(this.members, e);
for (let t = this.members.length - 1; t >= 0; t--) {
let n = this.members[t];
if (n === e || n === this.lead || n === this.prevLead) continue;
let r = n.instance;
- (!r || r.isConnected === !1) && !n.snapshot && (U_(this.members, n), n.unmount());
+ (!r || r.isConnected === !1) && !n.snapshot && (H_(this.members, n), n.unmount());
}
e.scheduleRender();
}
remove(e) {
- if (U_(this.members, e), e === this.prevLead && (this.prevLead = void 0), e === this.lead) {
+ if (H_(this.members, e), e === this.prevLead && (this.prevLead = void 0), e === this.lead) {
let e = this.members[this.members.length - 1];
e && this.promote(e);
}
@@ -26574,51 +26574,51 @@ var Fie = class {
removeLeadSnapshot() {
this.lead?.snapshot && (this.lead.snapshot = void 0);
}
-}, WS = {
+}, oC = {
hasAnimatedSinceResize: !0,
hasEverUpdated: !1
-}, GS = {
+}, sC = {
nodes: 0,
calculatedTargetDeltas: 0,
calculatedProjections: 0
-}, KS = [
+}, cC = [
"",
"X",
"Y",
"Z"
-], Iie = 1e3, Lie = 0;
-function qS(e, t, n, r) {
+], bie = 1e3, xie = 0;
+function lC(e, t, n, r) {
let { latestValues: i } = t;
i[e] && (n[e] = i[e], t.setStaticValue(e, 0), r && (r[e] = 0));
}
-function JS(e) {
+function uC(e) {
if (e.hasCheckedOptimisedAppear = !0, e.root === e) return;
let { visualElement: t } = e.options;
if (!t) return;
- let n = Rb(t);
+ let n = Ab(t);
if (window.MotionHasOptimisedAnimation(n, "transform")) {
let { layout: t, layoutId: r } = e.options;
- window.MotionCancelOptimisedAnimation(n, "transform", Sv, !(t || r));
+ window.MotionCancelOptimisedAnimation(n, "transform", yv, !(t || r));
}
let { parent: r } = e;
- r && !r.hasCheckedOptimisedAppear && JS(r);
+ r && !r.hasCheckedOptimisedAppear && uC(r);
}
-function YS({ attachResizeListener: e, defaultParent: t, measureScroll: n, checkIsScrollRoot: r, resetTransform: i }) {
+function dC({ attachResizeListener: e, defaultParent: t, measureScroll: n, checkIsScrollRoot: r, resetTransform: i }) {
return class {
constructor(e = {}, n = t?.()) {
- this.id = Lie++, this.animationId = 0, this.animationCommitId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.hasCheckedOptimisedAppear = !1, this.treeScale = {
+ this.id = xie++, this.animationId = 0, this.animationCommitId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.hasCheckedOptimisedAppear = !1, this.treeScale = {
x: 1,
y: 1
}, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.layoutVersion = 0, this.updateScheduled = !1, this.scheduleUpdate = () => this.update(), this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
}, this.updateProjection = () => {
- this.projectionUpdateScheduled = !1, yx.value && (GS.nodes = GS.calculatedTargetDeltas = GS.calculatedProjections = 0), this.nodes.forEach(Bie), this.nodes.forEach(Kie), this.nodes.forEach(qie), this.nodes.forEach(Vie), yx.addProjectionMetrics && yx.addProjectionMetrics(GS);
+ this.projectionUpdateScheduled = !1, dx.value && (sC.nodes = sC.calculatedTargetDeltas = sC.calculatedProjections = 0), this.nodes.forEach(wie), this.nodes.forEach(Aie), this.nodes.forEach(jie), this.nodes.forEach(Tie), dx.addProjectionMetrics && dx.addProjectionMetrics(sC);
}, this.resolvedRelativeTargetAt = 0, this.linkedParentVersion = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = e, this.root = n ? n.root || n : this, this.path = n ? [...n.path, n] : [], this.parent = n, this.depth = n ? n.depth + 1 : 0;
for (let e = 0; e < this.path.length; e++) this.path[e].shouldResetTransform = !0;
- this.root === this && (this.nodes = new Nie());
+ this.root === this && (this.nodes = new _ie());
}
addEventListener(e, t) {
- return this.eventHandlers.has(e) || this.eventHandlers.set(e, new $_()), this.eventHandlers.get(e).add(t);
+ return this.eventHandlers.has(e) || this.eventHandlers.set(e, new Q_()), this.eventHandlers.get(e).add(t);
}
notifyListeners(e, ...t) {
let n = this.eventHandlers.get(e);
@@ -26629,15 +26629,15 @@ function YS({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
}
mount(t) {
if (this.instance) return;
- this.isSVG = fx(t) && !Rre(t), this.instance = t;
+ this.isSVG = ix(t) && !Kre(t), this.instance = t;
let { layoutId: n, layout: r, visualElement: i } = this.options;
if (i && !i.current && i.mount(t), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (r || n) && (this.isLayoutDirty = !0), e) {
let n, r = 0, i = () => this.root.updateBlockedByResize = !1;
- Sv.read(() => {
+ yv.read(() => {
r = window.innerWidth;
}), e(t, () => {
let e = window.innerWidth;
- e !== r && (r = e, this.root.updateBlockedByResize = !0, n && n(), n = Pie(i, 250), WS.hasAnimatedSinceResize && (WS.hasAnimatedSinceResize = !1, this.nodes.forEach(QS)));
+ e !== r && (r = e, this.root.updateBlockedByResize = !0, n && n(), n = vie(i, 250), oC.hasAnimatedSinceResize && (oC.hasAnimatedSinceResize = !1, this.nodes.forEach(mC)));
});
}
n && this.root.registerSharedNode(n, this), this.options.animate !== !1 && i && (n || r) && this.addEventListener("didUpdate", ({ delta: e, hasLayoutChanged: t, hasRelativeLayoutChanged: n, layout: r }) => {
@@ -26645,23 +26645,23 @@ function YS({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
this.target = void 0, this.relativeTarget = void 0;
return;
}
- let a = this.options.transition || i.getDefaultTransition() || Qie, { onLayoutAnimationStart: o, onLayoutAnimationComplete: s } = i.getProps(), c = !this.targetLayout || !PS(this.targetLayout, r), l = !t && n;
+ let a = this.options.transition || i.getDefaultTransition() || Iie, { onLayoutAnimationStart: o, onLayoutAnimationComplete: s } = i.getProps(), c = !this.targetLayout || !XS(this.targetLayout, r), l = !t && n;
if (this.options.layoutRoot || this.resumeFrom || l || t && (c || !this.currentAnimation)) {
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0);
let t = {
- ...Eb(a, "layout"),
+ ...vb(a, "layout"),
onPlay: o,
onComplete: s
};
(i.shouldReduceMotion || this.options.layoutRoot) && (t.delay = 0, t.type = !1), this.startAnimation(t), this.setAnimationOrigin(e, l, t.path);
- } else t || QS(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
+ } else t || mC(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
this.targetLayout = r;
});
}
unmount() {
this.options.layoutId && this.willUpdate(), this.root.nodes.remove(this);
let e = this.getStack();
- e && e.remove(this), this.parent && this.parent.children.delete(this), this.instance = void 0, this.eventHandlers.clear(), Cv(this.updateProjection);
+ e && e.remove(this), this.parent && this.parent.children.delete(this), this.instance = void 0, this.eventHandlers.clear(), bv(this.updateProjection);
}
blockUpdate() {
this.updateManuallyBlocked = !0;
@@ -26676,7 +26676,7 @@ function YS({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
return this.isAnimationBlocked || this.parent && this.parent.isTreeAnimationBlocked() || !1;
}
startUpdate() {
- this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(Jie), this.animationId++);
+ this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(Mie), this.animationId++);
}
getTransformTemplate() {
let { visualElement: e } = this.options;
@@ -26687,7 +26687,7 @@ function YS({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
this.options.onExitComplete && this.options.onExitComplete();
return;
}
- if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear && JS(this), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty) return;
+ if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear && uC(this), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty) return;
this.isLayoutDirty = !0;
for (let e = 0; e < this.path.length; e++) {
let t = this.path[e];
@@ -26701,39 +26701,39 @@ function YS({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
update() {
if (this.updateScheduled = !1, this.isUpdateBlocked()) {
let e = this.updateBlockedByResize;
- this.unblockUpdate(), this.updateBlockedByResize = !1, this.clearAllSnapshots(), e && this.nodes.forEach(Uie), this.nodes.forEach(XS);
+ this.unblockUpdate(), this.updateBlockedByResize = !1, this.clearAllSnapshots(), e && this.nodes.forEach(Die), this.nodes.forEach(fC);
return;
}
if (this.animationId <= this.animationCommitId) {
- this.nodes.forEach(ZS);
+ this.nodes.forEach(pC);
return;
}
- this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(Wie), this.nodes.forEach(Gie), this.nodes.forEach(Rie), this.nodes.forEach(zie)) : this.nodes.forEach(ZS), this.clearAllSnapshots();
- let e = Dv.now();
- wv.delta = W_(0, 1e3 / 60, e - wv.timestamp), wv.timestamp = e, wv.isProcessing = !0, Tv.update.process(wv), Tv.preRender.process(wv), Tv.render.process(wv), wv.isProcessing = !1;
+ this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(Oie), this.nodes.forEach(kie), this.nodes.forEach(Sie), this.nodes.forEach(Cie)) : this.nodes.forEach(pC), this.clearAllSnapshots();
+ let e = wv.now();
+ xv.delta = U_(0, 1e3 / 60, e - xv.timestamp), xv.timestamp = e, xv.isProcessing = !0, Sv.update.process(xv), Sv.preRender.process(xv), Sv.render.process(xv), xv.isProcessing = !1;
}
didUpdate() {
- this.updateScheduled || (this.updateScheduled = !0, ex.read(this.scheduleUpdate));
+ this.updateScheduled || (this.updateScheduled = !0, Kb.read(this.scheduleUpdate));
}
clearAllSnapshots() {
- this.nodes.forEach(Hie), this.sharedNodes.forEach(Yie);
+ this.nodes.forEach(Eie), this.sharedNodes.forEach(Nie);
}
scheduleUpdateProjection() {
- this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, Sv.preRender(this.updateProjection, !1, !0));
+ this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, yv.preRender(this.updateProjection, !1, !0));
}
scheduleCheckAfterUnmount() {
- Sv.postRender(() => {
+ yv.postRender(() => {
this.isLayoutDirty ? this.root.didUpdate() : this.root.checkUpdateFailed();
});
}
updateSnapshot() {
- this.snapshot || !this.instance || (this.snapshot = this.measure(), this.snapshot && !xS(this.snapshot.measuredBox.x) && !xS(this.snapshot.measuredBox.y) && (this.snapshot = void 0));
+ this.snapshot || !this.instance || (this.snapshot = this.measure(), this.snapshot && !MS(this.snapshot.measuredBox.x) && !MS(this.snapshot.measuredBox.y) && (this.snapshot = void 0));
}
updateLayout() {
if (!this.instance || (this.updateScroll(), !(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty)) return;
if (this.resumeFrom && !this.resumeFrom.instance) for (let e = 0; e < this.path.length; e++) this.path[e].updateScroll();
let e = this.layout;
- this.layout = this.measure(!1), this.layoutVersion++, this.layoutCorrected ||= Tx(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
+ this.layout = this.measure(!1), this.layoutVersion++, this.layoutCorrected ||= _x(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
let { visualElement: t } = this.options;
t && t.notify("LayoutMeasure", this.layout.layoutBox, e ? e.layoutBox : void 0);
}
@@ -26752,12 +26752,12 @@ function YS({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
}
resetTransform() {
if (!i) return;
- let e = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, t = this.projectionDelta && !jS(this.projectionDelta), n = this.getTransformTemplate(), r = n ? n(this.latestValues, "") : void 0, a = r !== this.prevTransformTemplateValue;
- e && this.instance && (t || Ux(this.latestValues) || a) && (i(this.instance, r), this.shouldResetTransform = !1, this.scheduleRender());
+ let e = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, t = this.projectionDelta && !qS(this.projectionDelta), n = this.getTransformTemplate(), r = n ? n(this.latestValues, "") : void 0, a = r !== this.prevTransformTemplateValue;
+ e && this.instance && (t || Fx(this.latestValues) || a) && (i(this.instance, r), this.shouldResetTransform = !1, this.scheduleRender());
}
measure(e = !0) {
let t = this.measurePageBox(), n = this.removeElementScroll(t);
- return e && (n = this.removeTransform(n)), $ie(n), {
+ return e && (n = this.removeTransform(n)), Lie(n), {
animationId: this.root.animationId,
measuredBox: t,
layoutBox: n,
@@ -26767,42 +26767,42 @@ function YS({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
}
measurePageBox() {
let { visualElement: e } = this.options;
- if (!e) return Tx();
+ if (!e) return _x();
let t = e.measureViewportBox();
- if (!(this.scroll?.wasRoot || this.path.some(eae))) {
+ if (!(this.scroll?.wasRoot || this.path.some(Rie))) {
let { scroll: e } = this.root;
- e && (Qx(t.x, e.offset.x), Qx(t.y, e.offset.y));
+ e && (Wx(t.x, e.offset.x), Wx(t.y, e.offset.y));
}
return t;
}
removeElementScroll(e) {
- let t = Tx();
- if (yS(t, e), this.scroll?.wasRoot) return t;
+ let t = _x();
+ if (ES(t, e), this.scroll?.wasRoot) return t;
for (let n = 0; n < this.path.length; n++) {
let r = this.path[n], { scroll: i, options: a } = r;
- r !== this.root && i && a.layoutScroll && (i.wasRoot && yS(t, e), Qx(t.x, i.offset.x), Qx(t.y, i.offset.y));
+ r !== this.root && i && a.layoutScroll && (i.wasRoot && ES(t, e), Wx(t.x, i.offset.x), Wx(t.y, i.offset.y));
}
return t;
}
applyTransform(e, t = !1, n) {
- let r = n || Tx();
- yS(r, e);
+ let r = n || _x();
+ ES(r, e);
for (let e = 0; e < this.path.length; e++) {
let n = this.path[e];
- !t && n.options.layoutScroll && n.scroll && n !== n.root && (Qx(r.x, -n.scroll.offset.x), Qx(r.y, -n.scroll.offset.y)), Ux(n.latestValues) && tS(r, n.latestValues, n.layout?.layoutBox);
+ !t && n.options.layoutScroll && n.scroll && n !== n.root && (Wx(r.x, -n.scroll.offset.x), Wx(r.y, -n.scroll.offset.y)), Fx(n.latestValues) && qx(r, n.latestValues, n.layout?.layoutBox);
}
- return Ux(this.latestValues) && tS(r, this.latestValues, this.layout?.layoutBox), r;
+ return Fx(this.latestValues) && qx(r, this.latestValues, this.layout?.layoutBox), r;
}
removeTransform(e) {
- let t = Tx();
- yS(t, e);
+ let t = _x();
+ ES(t, e);
for (let e = 0; e < this.path.length; e++) {
let n = this.path[e];
- if (!Ux(n.latestValues)) continue;
+ if (!Fx(n.latestValues)) continue;
let r;
- n.instance && (Hx(n.latestValues) && n.updateSnapshot(), r = Tx(), yS(r, n.measurePageBox())), kS(t, n.latestValues, n.snapshot?.layoutBox, r);
+ n.instance && (Px(n.latestValues) && n.updateSnapshot(), r = _x(), ES(r, n.measurePageBox())), GS(t, n.latestValues, n.snapshot?.layoutBox, r);
}
- return Ux(this.latestValues) && kS(t, this.latestValues), t;
+ return Fx(this.latestValues) && GS(t, this.latestValues), t;
}
setTargetDelta(e) {
this.targetDelta = e, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
@@ -26818,7 +26818,7 @@ function YS({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
this.scroll = void 0, this.layout = void 0, this.snapshot = void 0, this.prevTransformTemplateValue = void 0, this.targetDelta = void 0, this.target = void 0, this.isLayoutDirty = !1;
}
forceRelativeParentToResolveTarget() {
- this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== wv.timestamp && this.relativeParent.resolveTargetDelta(!0);
+ this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== xv.timestamp && this.relativeParent.resolveTargetDelta(!0);
}
resolveTargetDelta(e = !1) {
let t = this.getLead();
@@ -26827,36 +26827,36 @@ function YS({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
if (!(e || n && this.isSharedProjectionDirty || this.isProjectionDirty || this.parent?.isProjectionDirty || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize)) return;
let { layout: r, layoutId: i } = this.options;
if (!this.layout || !(r || i)) return;
- this.resolvedRelativeTargetAt = wv.timestamp;
+ this.resolvedRelativeTargetAt = xv.timestamp;
let a = this.getClosestProjectingParent();
- a && this.linkedParentVersion !== a.layoutVersion && !a.options.layoutRoot && this.removeRelativeTarget(), !this.targetDelta && !this.relativeTarget && (this.options.layoutAnchor !== !1 && a && a.layout ? this.createRelativeTarget(a, this.layout.layoutBox, a.layout.layoutBox) : this.removeRelativeTarget()), !(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = Tx(), this.targetWithTransforms = Tx()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), xie(this.target, this.relativeTarget, this.relativeParent.target, this.options.layoutAnchor || void 0)) : this.targetDelta ? (this.resumingFrom ? this.applyTransform(this.layout.layoutBox, !1, this.target) : yS(this.target, this.layout.layoutBox), Yx(this.target, this.targetDelta)) : yS(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget && (this.attemptToResolveRelativeTarget = !1, this.options.layoutAnchor !== !1 && a && !!a.resumingFrom == !!this.resumingFrom && !a.options.layoutScroll && a.target && this.animationProgress !== 1 ? this.createRelativeTarget(a, this.target, a.target) : this.relativeParent = this.relativeTarget = void 0), yx.value && GS.calculatedTargetDeltas++);
+ a && this.linkedParentVersion !== a.layoutVersion && !a.options.layoutRoot && this.removeRelativeTarget(), !this.targetDelta && !this.relativeTarget && (this.options.layoutAnchor !== !1 && a && a.layout ? this.createRelativeTarget(a, this.layout.layoutBox, a.layout.layoutBox) : this.removeRelativeTarget()), !(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = _x(), this.targetWithTransforms = _x()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), LS(this.target, this.relativeTarget, this.relativeParent.target, this.options.layoutAnchor || void 0)) : this.targetDelta ? (this.resumingFrom ? this.applyTransform(this.layout.layoutBox, !1, this.target) : ES(this.target, this.layout.layoutBox), Vx(this.target, this.targetDelta)) : ES(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget && (this.attemptToResolveRelativeTarget = !1, this.options.layoutAnchor !== !1 && a && !!a.resumingFrom == !!this.resumingFrom && !a.options.layoutScroll && a.target && this.animationProgress !== 1 ? this.createRelativeTarget(a, this.target, a.target) : this.relativeParent = this.relativeTarget = void 0), dx.value && sC.calculatedTargetDeltas++);
}
getClosestProjectingParent() {
- if (!(!this.parent || Hx(this.parent.latestValues) || Wx(this.parent.latestValues))) return this.parent.isProjecting() ? this.parent : this.parent.getClosestProjectingParent();
+ if (!(!this.parent || Px(this.parent.latestValues) || Ix(this.parent.latestValues))) return this.parent.isProjecting() ? this.parent : this.parent.getClosestProjectingParent();
}
isProjecting() {
return !!((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout);
}
createRelativeTarget(e, t, n) {
- this.relativeParent = e, this.linkedParentVersion = e.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = Tx(), this.relativeTargetOrigin = Tx(), ES(this.relativeTargetOrigin, t, n, this.options.layoutAnchor || void 0), yS(this.relativeTarget, this.relativeTargetOrigin);
+ this.relativeParent = e, this.linkedParentVersion = e.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = _x(), this.relativeTargetOrigin = _x(), zS(this.relativeTargetOrigin, t, n, this.options.layoutAnchor || void 0), ES(this.relativeTarget, this.relativeTargetOrigin);
}
removeRelativeTarget() {
this.relativeParent = this.relativeTarget = void 0;
}
calcProjection() {
let e = this.getLead(), t = !!this.resumingFrom || this !== e, n = !0;
- if ((this.isProjectionDirty || this.parent?.isProjectionDirty) && (n = !1), t && (this.isSharedProjectionDirty || this.isTransformDirty) && (n = !1), this.resolvedRelativeTargetAt === wv.timestamp && (n = !1), n) return;
+ if ((this.isProjectionDirty || this.parent?.isProjectionDirty) && (n = !1), t && (this.isSharedProjectionDirty || this.isTransformDirty) && (n = !1), this.resolvedRelativeTargetAt === xv.timestamp && (n = !1), n) return;
let { layout: r, layoutId: i } = this.options;
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(r || i)) return;
- yS(this.layoutCorrected, this.layout.layoutBox);
+ ES(this.layoutCorrected, this.layout.layoutBox);
let a = this.treeScale.x, o = this.treeScale.y;
- Xre(this.layoutCorrected, this.treeScale, this.path, t), e.layout && !e.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (e.target = e.layout.layoutBox, e.targetWithTransforms = Tx());
+ iie(this.layoutCorrected, this.treeScale, this.path, t), e.layout && !e.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (e.target = e.layout.layoutBox, e.targetWithTransforms = _x());
let { target: s } = e;
if (!s) {
this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
return;
}
- !this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (bS(this.prevProjectionDelta.x, this.projectionDelta.x), bS(this.prevProjectionDelta.y, this.projectionDelta.y)), CS(this.projectionDelta, this.layoutCorrected, s, this.latestValues), (this.treeScale.x !== a || this.treeScale.y !== o || !IS(this.projectionDelta.x, this.prevProjectionDelta.x) || !IS(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", s)), yx.value && GS.calculatedProjections++;
+ !this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (DS(this.prevProjectionDelta.x, this.projectionDelta.x), DS(this.prevProjectionDelta.y, this.projectionDelta.y)), FS(this.projectionDelta, this.layoutCorrected, s, this.latestValues), (this.treeScale.x !== a || this.treeScale.y !== o || !QS(this.projectionDelta.x, this.prevProjectionDelta.x) || !QS(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", s)), dx.value && sC.calculatedProjections++;
}
hide() {
this.isVisible = !1;
@@ -26872,22 +26872,22 @@ function YS({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
this.resumingFrom && !this.resumingFrom.instance && (this.resumingFrom = void 0);
}
createProjectionDeltas() {
- this.prevProjectionDelta = Cx(), this.projectionDelta = Cx(), this.projectionDeltaWithTransform = Cx();
+ this.prevProjectionDelta = hx(), this.projectionDelta = hx(), this.projectionDeltaWithTransform = hx();
}
setAnimationOrigin(e, t = !1, n) {
- let r = this.snapshot, i = r ? r.latestValues : {}, a = { ...this.latestValues }, o = Cx();
+ let r = this.snapshot, i = r ? r.latestValues : {}, a = { ...this.latestValues }, o = hx();
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !t;
- let s = Tx(), c = (r ? r.source : void 0) !== (this.layout ? this.layout.source : void 0), l = this.getStack(), u = !l || l.members.length <= 1, d = !!(c && !u && this.options.crossfade === !0 && !this.path.some(Zie));
+ let s = _x(), c = (r ? r.source : void 0) !== (this.layout ? this.layout.source : void 0), l = this.getStack(), u = !l || l.members.length <= 1, d = !!(c && !u && this.options.crossfade === !0 && !this.path.some(Fie));
this.animationProgress = 0;
let f, p = n?.interpolateProjection(e);
this.mixTargetDelta = (t) => {
let n = t / 1e3, r = p?.(n);
- r ? (o.x.translate = r.x, o.x.scale = ry(e.x.scale, 1, n), o.x.origin = e.x.origin, o.x.originPoint = e.x.originPoint, o.y.translate = r.y, o.y.scale = ry(e.y.scale, 1, n), o.y.origin = e.y.origin, o.y.originPoint = e.y.originPoint) : ($S(o.x, e.x, n), $S(o.y, e.y, n)), this.setTargetDelta(o), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (ES(s, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || void 0), Xie(this.relativeTarget, this.relativeTargetOrigin, s, n), f && Tie(this.relativeTarget, f) && (this.isProjectionDirty = !1), f ||= Tx(), yS(f, this.relativeTarget)), c && (this.animationValues = a, Oie(a, i, this.latestValues, n, d, u)), r && r.rotate !== void 0 && (this.animationValues ||= a, this.animationValues.pathRotation = r.rotate), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = n;
+ r ? (o.x.translate = r.x, o.x.scale = ey(e.x.scale, 1, n), o.x.origin = e.x.origin, o.x.originPoint = e.x.originPoint, o.y.translate = r.y, o.y.scale = ey(e.y.scale, 1, n), o.y.origin = e.y.origin, o.y.originPoint = e.y.originPoint) : (hC(o.x, e.x, n), hC(o.y, e.y, n)), this.setTargetDelta(o), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (zS(s, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || void 0), Pie(this.relativeTarget, this.relativeTargetOrigin, s, n), f && lie(this.relativeTarget, f) && (this.isProjectionDirty = !1), f ||= _x(), ES(f, this.relativeTarget)), c && (this.animationValues = a, fie(a, i, this.latestValues, n, d, u)), r && r.rotate !== void 0 && (this.animationValues ||= a, this.animationValues.pathRotation = r.rotate), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = n;
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
}
startAnimation(e) {
- this.notifyListeners("animationStart"), this.currentAnimation?.stop(), this.resumingFrom?.currentAnimation?.stop(), this.pendingAnimation &&= (Cv(this.pendingAnimation), void 0), this.pendingAnimation = Sv.update(() => {
- WS.hasAnimatedSinceResize = !0, this.motionValue ||= wb(0), this.motionValue.jump(0, !1), this.currentAnimation = jie(this.motionValue, [0, 1e3], {
+ this.notifyListeners("animationStart"), this.currentAnimation?.stop(), this.resumingFrom?.currentAnimation?.stop(), this.pendingAnimation &&= (bv(this.pendingAnimation), void 0), this.pendingAnimation = yv.update(() => {
+ oC.hasAnimatedSinceResize = !0, this.motionValue ||= gb(0), this.motionValue.jump(0, !1), this.currentAnimation = hie(this.motionValue, [0, 1e3], {
...e,
velocity: 0,
isSync: !0,
@@ -26906,23 +26906,23 @@ function YS({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
e && e.exitAnimationComplete(), this.resumingFrom = this.currentAnimation = this.animationValues = void 0, this.notifyListeners("animationComplete");
}
finishAnimation() {
- this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(Iie), this.currentAnimation.stop()), this.completeAnimation();
+ this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(bie), this.currentAnimation.stop()), this.completeAnimation();
}
applyTransformsToTarget() {
let e = this.getLead(), { targetWithTransforms: t, target: n, layout: r, latestValues: i } = e;
if (!(!t || !n || !r)) {
- if (this !== e && this.layout && r && iC(this.options.animationType, this.layout.layoutBox, r.layoutBox)) {
- n = this.target || Tx();
- let t = xS(this.layout.layoutBox.x);
+ if (this !== e && this.layout && r && bC(this.options.animationType, this.layout.layoutBox, r.layoutBox)) {
+ n = this.target || _x();
+ let t = MS(this.layout.layoutBox.x);
n.x.min = e.target.x.min, n.x.max = n.x.min + t;
- let r = xS(this.layout.layoutBox.y);
+ let r = MS(this.layout.layoutBox.y);
n.y.min = e.target.y.min, n.y.max = n.y.min + r;
}
- yS(t, n), tS(t, i), CS(this.projectionDeltaWithTransform, this.layoutCorrected, t, i);
+ ES(t, n), qx(t, i), FS(this.projectionDeltaWithTransform, this.layoutCorrected, t, i);
}
}
registerSharedNode(e, t) {
- this.sharedNodes.has(e) || this.sharedNodes.set(e, new Fie()), this.sharedNodes.get(e).add(t);
+ this.sharedNodes.has(e) || this.sharedNodes.set(e, new yie()), this.sharedNodes.get(e).add(t);
let n = t.options.initialPromotionConfig;
t.promote({
transition: n ? n.transition : void 0,
@@ -26959,8 +26959,8 @@ function YS({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
let t = !1, { latestValues: n } = e;
if ((n.z || n.rotate || n.rotateX || n.rotateY || n.rotateZ || n.skewX || n.skewY) && (t = !0), !t) return;
let r = {};
- n.z && qS("z", e, r, this.animationValues);
- for (let t = 0; t < KS.length; t++) qS(`rotate${KS[t]}`, e, r, this.animationValues), qS(`skew${KS[t]}`, e, r, this.animationValues);
+ n.z && lC("z", e, r, this.animationValues);
+ for (let t = 0; t < cC.length; t++) lC(`rotate${cC[t]}`, e, r, this.animationValues), lC(`skew${cC[t]}`, e, r, this.animationValues);
e.render();
for (let t in r) e.setStaticValue(t, r[t]), this.animationValues && (this.animationValues[t] = r[t]);
e.scheduleRender();
@@ -26973,71 +26973,71 @@ function YS({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
}
let n = this.getTransformTemplate();
if (this.needsReset) {
- this.needsReset = !1, e.visibility = "", e.opacity = "", e.pointerEvents = US(t?.pointerEvents) || "", e.transform = n ? n(this.latestValues, "") : "none";
+ this.needsReset = !1, e.visibility = "", e.opacity = "", e.pointerEvents = aC(t?.pointerEvents) || "", e.transform = n ? n(this.latestValues, "") : "none";
return;
}
let r = this.getLead();
if (!this.projectionDelta || !this.layout || !r.target) {
- this.options.layoutId && (e.opacity = this.latestValues.opacity === void 0 ? 1 : this.latestValues.opacity, e.pointerEvents = US(t?.pointerEvents) || ""), this.hasProjected && !Ux(this.latestValues) && (e.transform = n ? n({}, "") : "none", this.hasProjected = !1);
+ this.options.layoutId && (e.opacity = this.latestValues.opacity === void 0 ? 1 : this.latestValues.opacity, e.pointerEvents = aC(t?.pointerEvents) || ""), this.hasProjected && !Fx(this.latestValues) && (e.transform = n ? n({}, "") : "none", this.hasProjected = !1);
return;
}
e.visibility = "";
let i = r.animationValues || r.latestValues;
this.applyTransformsToTarget();
- let a = Eie(this.projectionDeltaWithTransform, this.treeScale, i);
+ let a = uie(this.projectionDeltaWithTransform, this.treeScale, i);
n && (a = n(i, a)), e.transform = a;
let { x: o, y: s } = this.projectionDelta;
e.transformOrigin = `${o.origin * 100}% ${s.origin * 100}% 0`, e.opacity = r.animationValues ? r === this ? i.opacity ?? this.latestValues.opacity ?? 1 : this.preserveOpacity ? this.latestValues.opacity : i.opacityExit : r === this ? i.opacity === void 0 ? "" : i.opacity : i.opacityExit === void 0 ? 0 : i.opacityExit;
- for (let t in sS) {
+ for (let t in eS) {
if (i[t] === void 0) continue;
- let { correct: n, applyTo: o, isCSSVariable: s } = sS[t], c = a === "none" ? i[t] : n(i[t], r);
+ let { correct: n, applyTo: o, isCSSVariable: s } = eS[t], c = a === "none" ? i[t] : n(i[t], r);
if (o) {
let t = o.length;
for (let n = 0; n < t; n++) e[o[n]] = c;
} else s ? this.options.visualElement.renderState.vars[t] = c : e[t] = c;
}
- this.options.layoutId && (e.pointerEvents = r === this ? US(t?.pointerEvents) || "" : "none");
+ this.options.layoutId && (e.pointerEvents = r === this ? aC(t?.pointerEvents) || "" : "none");
}
clearSnapshot() {
this.resumeFrom = this.snapshot = void 0;
}
resetTree() {
- this.root.nodes.forEach((e) => e.currentAnimation?.stop()), this.root.nodes.forEach(XS), this.root.sharedNodes.clear();
+ this.root.nodes.forEach((e) => e.currentAnimation?.stop()), this.root.nodes.forEach(fC), this.root.sharedNodes.clear();
}
};
}
-function Rie(e) {
+function Sie(e) {
e.updateLayout();
}
-function zie(e) {
+function Cie(e) {
let t = e.resumeFrom?.snapshot || e.snapshot;
if (e.isLead() && e.layout && t && e.hasListeners("didUpdate")) {
let { layoutBox: n, measuredBox: r } = e.layout, { animationType: i } = e.options, a = t.source !== e.layout.source;
- if (i === "size") LS((e) => {
- let r = a ? t.measuredBox[e] : t.layoutBox[e], i = xS(r);
+ if (i === "size") $S((e) => {
+ let r = a ? t.measuredBox[e] : t.layoutBox[e], i = MS(r);
r.min = n[e].min, r.max = r.min + i;
});
else if (i === "x" || i === "y") {
let e = i === "x" ? "y" : "x";
- vS(a ? t.measuredBox[e] : t.layoutBox[e], n[e]);
- } else iC(i, t.layoutBox, n) && LS((r) => {
- let i = a ? t.measuredBox[r] : t.layoutBox[r], o = xS(n[r]);
+ TS(a ? t.measuredBox[e] : t.layoutBox[e], n[e]);
+ } else bC(i, t.layoutBox, n) && $S((r) => {
+ let i = a ? t.measuredBox[r] : t.layoutBox[r], o = MS(n[r]);
i.max = i.min + o, e.relativeTarget && !e.currentAnimation && (e.isProjectionDirty = !0, e.relativeTarget[r].max = e.relativeTarget[r].min + o);
});
- let o = Cx();
- CS(o, n, t.layoutBox);
- let s = Cx();
- a ? CS(s, e.applyTransform(r, !0), t.measuredBox) : CS(s, n, t.layoutBox);
- let c = !jS(o), l = !1;
+ let o = hx();
+ FS(o, n, t.layoutBox);
+ let s = hx();
+ a ? FS(s, e.applyTransform(r, !0), t.measuredBox) : FS(s, n, t.layoutBox);
+ let c = !qS(o), l = !1;
if (!e.resumeFrom) {
let r = e.getClosestProjectingParent();
if (r && !r.resumeFrom) {
let { snapshot: i, layout: a } = r;
if (i && a) {
- let o = e.options.layoutAnchor || void 0, s = Tx();
- ES(s, t.layoutBox, i.layoutBox, o);
- let c = Tx();
- ES(c, n, a.layoutBox, o), PS(s, c) || (l = !0), r.options.layoutRoot && (e.relativeTarget = c, e.relativeTargetOrigin = s, e.relativeParent = r);
+ let o = e.options.layoutAnchor || void 0, s = _x();
+ zS(s, t.layoutBox, i.layoutBox, o);
+ let c = _x();
+ zS(c, n, a.layoutBox, o), XS(s, c) || (l = !0), r.options.layoutRoot && (e.relativeTarget = c, e.relativeTargetOrigin = s, e.relativeParent = r);
}
}
}
@@ -27055,59 +27055,59 @@ function zie(e) {
}
e.options.transition = void 0;
}
-function Bie(e) {
- yx.value && GS.nodes++, e.parent && (e.isProjecting() || (e.isProjectionDirty = e.parent.isProjectionDirty), e.isSharedProjectionDirty ||= !!(e.isProjectionDirty || e.parent.isProjectionDirty || e.parent.isSharedProjectionDirty), e.isTransformDirty ||= e.parent.isTransformDirty);
+function wie(e) {
+ dx.value && sC.nodes++, e.parent && (e.isProjecting() || (e.isProjectionDirty = e.parent.isProjectionDirty), e.isSharedProjectionDirty ||= !!(e.isProjectionDirty || e.parent.isProjectionDirty || e.parent.isSharedProjectionDirty), e.isTransformDirty ||= e.parent.isTransformDirty);
}
-function Vie(e) {
+function Tie(e) {
e.isProjectionDirty = e.isSharedProjectionDirty = e.isTransformDirty = !1;
}
-function Hie(e) {
+function Eie(e) {
e.clearSnapshot();
}
-function XS(e) {
+function fC(e) {
e.clearMeasurements();
}
-function Uie(e) {
+function Die(e) {
e.isLayoutDirty = !0, e.updateLayout();
}
-function ZS(e) {
+function pC(e) {
e.isLayoutDirty = !1;
}
-function Wie(e) {
+function Oie(e) {
e.isAnimationBlocked && e.layout && !e.isLayoutDirty && (e.snapshot = e.layout, e.isLayoutDirty = !0);
}
-function Gie(e) {
+function kie(e) {
let { visualElement: t } = e.options;
t && t.getProps().onBeforeLayoutMeasure && t.notify("BeforeLayoutMeasure"), e.resetTransform();
}
-function QS(e) {
+function mC(e) {
e.finishAnimation(), e.targetDelta = e.relativeTarget = e.target = void 0, e.isProjectionDirty = !0;
}
-function Kie(e) {
+function Aie(e) {
e.resolveTargetDelta();
}
-function qie(e) {
+function jie(e) {
e.calcProjection();
}
-function Jie(e) {
+function Mie(e) {
e.resetSkewAndRotation();
}
-function Yie(e) {
+function Nie(e) {
e.removeLeadSnapshot();
}
-function $S(e, t, n) {
- e.translate = ry(t.translate, 0, n), e.scale = ry(t.scale, 1, n), e.origin = t.origin, e.originPoint = t.originPoint;
+function hC(e, t, n) {
+ e.translate = ey(t.translate, 0, n), e.scale = ey(t.scale, 1, n), e.origin = t.origin, e.originPoint = t.originPoint;
}
-function eC(e, t, n, r) {
- e.min = ry(t.min, n.min, r), e.max = ry(t.max, n.max, r);
+function gC(e, t, n, r) {
+ e.min = ey(t.min, n.min, r), e.max = ey(t.max, n.max, r);
}
-function Xie(e, t, n, r) {
- eC(e.x, t.x, n.x, r), eC(e.y, t.y, n.y, r);
+function Pie(e, t, n, r) {
+ gC(e.x, t.x, n.x, r), gC(e.y, t.y, n.y, r);
}
-function Zie(e) {
+function Fie(e) {
return e.animationValues && e.animationValues.opacityExit !== void 0;
}
-var Qie = {
+var Iie = {
duration: .45,
ease: [
.4,
@@ -27115,39 +27115,39 @@ var Qie = {
.1,
1
]
-}, tC = (e) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(e), nC = tC("applewebkit/") && !tC("chrome/") ? Math.round : X_;
-function rC(e) {
- e.min = nC(e.min), e.max = nC(e.max);
+}, _C = (e) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(e), vC = _C("applewebkit/") && !_C("chrome/") ? Math.round : Y_;
+function yC(e) {
+ e.min = vC(e.min), e.max = vC(e.max);
}
-function $ie(e) {
- rC(e.x), rC(e.y);
+function Lie(e) {
+ yC(e.x), yC(e.y);
}
-function iC(e, t, n) {
- return e === "position" || e === "preserve-aspect" && !bie(FS(t), FS(n), .2);
+function bC(e, t, n) {
+ return e === "position" || e === "preserve-aspect" && !NS(ZS(t), ZS(n), .2);
}
-function eae(e) {
+function Rie(e) {
return e !== e.root && e.scroll?.wasRoot;
}
//#endregion
//#region node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs
-var tae = YS({
- attachResizeListener: (e, t) => HS(e, "resize", t),
+var zie = dC({
+ attachResizeListener: (e, t) => iC(e, "resize", t),
measureScroll: () => ({
x: document.documentElement.scrollLeft || document.body?.scrollLeft || 0,
y: document.documentElement.scrollTop || document.body?.scrollTop || 0
}),
checkIsScrollRoot: () => !0
-}), aC = { current: void 0 }, oC = YS({
+}), xC = { current: void 0 }, SC = dC({
measureScroll: (e) => ({
x: e.scrollLeft,
y: e.scrollTop
}),
defaultParent: () => {
- if (!aC.current) {
- let e = new tae({});
- e.mount(window), e.setOptions({ layoutScroll: !0 }), aC.current = e;
+ if (!xC.current) {
+ let e = new zie({});
+ e.mount(window), e.setOptions({ layoutScroll: !0 }), xC.current = e;
}
- return aC.current;
+ return xC.current;
},
resetTransform: (e, t) => {
e.style.transform = t === void 0 ? "none" : t;
@@ -27156,18 +27156,18 @@ var tae = YS({
});
//#endregion
//#region node_modules/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs
-function nae(e, t, n, r) {
+function Bie(e, t, n, r) {
if (e == null) return [];
- let i = Zb(e, r), a = i.length, o = [];
+ let i = Ub(e, r), a = i.length, o = [];
for (let e = 0; e < a; e++) {
let r = i[e], s = { ...n };
typeof s.delay == "function" && (s.delay = s.delay(e, a));
for (let e in t) {
let n = t[e];
Array.isArray(n) || (n = [n]);
- let i = { ...Eb(s, e) };
- i.duration &&= /* @__PURE__ */ ev(i.duration), i.delay &&= /* @__PURE__ */ ev(i.delay);
- let a = vb(r), c = _b(e, i.pseudoElement || ""), l = a.get(c);
+ let i = { ...vb(s, e) };
+ i.duration &&= /* @__PURE__ */ $_(i.duration), i.delay &&= /* @__PURE__ */ $_(i.delay);
+ let a = Zne(r), c = Xne(e, i.pseudoElement || ""), l = a.get(c);
l && l.stop(), o.push({
map: a,
key: c,
@@ -27183,40 +27183,40 @@ function nae(e, t, n, r) {
}
for (let e = 0; e < o.length; e++) {
let { unresolvedKeyframes: t, options: n } = o[e], { element: r, name: i, pseudoElement: a } = n;
- !a && t[0] === null && (t[0] = dx(r, i)), Dy(t), yre(t, i), !a && t.length < 2 && t.unshift(dx(r, i)), n.keyframes = t;
+ !a && t[0] === null && (t[0] = rx(r, i)), Oy(t), Dre(t, i), !a && t.length < 2 && t.unshift(rx(r, i)), n.keyframes = t;
}
let s = [];
for (let e = 0; e < o.length; e++) {
- let { map: t, key: n, options: r } = o[e], i = new tb(r);
+ let { map: t, key: n, options: r } = o[e], i = new nb(r);
t.set(n, i), i.finished.finally(() => t.delete(n)), s.push(i);
}
return s;
}
-var rae = /*@__PURE__*/ ((e) => {
+var Vie = /*@__PURE__*/ ((e) => {
function t(t, n, r) {
- return new hb(nae(t, n, r, e));
+ return new Yne(Bie(t, n, r, e));
}
return t;
-})(), sC = (e, t) => Math.abs(e - t);
-function iae(e, t) {
- let n = sC(e.x, t.x), r = sC(e.y, t.y);
+})(), CC = (e, t) => Math.abs(e - t);
+function Hie(e, t) {
+ let n = CC(e.x, t.x), r = CC(e.y, t.y);
return Math.sqrt(n ** 2 + r ** 2);
}
//#endregion
//#region src/react/components/use-moving-surface.ts
-var aae = {
+var Uie = {
selection: {
- type: vy,
+ type: _y,
duration: .16,
bounce: 0
},
hover: {
- type: vy,
+ type: _y,
duration: .08,
bounce: 0
}
};
-function cC(e) {
+function wC(e) {
let [t, n] = (0, B.useState)(null);
return (0, B.useLayoutEffect)(() => {
if (!t) return;
@@ -27237,7 +27237,7 @@ function cC(e) {
let E = `translate(${b}px, ${x}px) scale(1, 1)`;
if (u && a && !r.matches && T && s !== h) {
let r = `translate(${(T.left - _.left) / v + t.scrollLeft - t.clientLeft}px, ${(T.top - _.top) / y + t.scrollTop - t.clientTop}px) scale(${T.width / v / S}, ${T.height / y / C})`;
- l = rae(n, { transform: [r, E] }, aae[e]);
+ l = Vie(n, { transform: [r, E] }, Uie[e]);
} else n.style.transform = E;
s = h, c = w, t.dataset.surfaceReady = "";
}, m = (t) => {
@@ -27274,25 +27274,25 @@ function cC(e) {
}
//#endregion
//#region src/react/components/segmented.tsx
-function lC(e) {
- let t = cC("selection");
- return /* @__PURE__ */ (0, H.jsx)(z_, {
+function TC(e) {
+ let t = wC("selection");
+ return /* @__PURE__ */ (0, H.jsx)(R_, {
...e,
ref: t
});
}
-function uC(e) {
- let t = cC("selection");
- return /* @__PURE__ */ (0, H.jsx)(dg, {
+function EC(e) {
+ let t = wC("selection");
+ return /* @__PURE__ */ (0, H.jsx)(ug, {
...e,
ref: t
});
}
-var dC = "inline-flex w-max max-w-full items-center gap-0.5 overflow-x-auto overscroll-x-contain rounded-2lg bg-background-tertiary-default p-1", fC = "flex min-h-7 flex-none cursor-pointer items-center gap-1.5 rounded-md px-2.5 py-1 text-body-medium whitespace-nowrap text-text-secondary outline-none transition-colors hover:text-text-primary focus-visible:ring-2 focus-visible:ring-border-focus-ring data-focus-visible:ring-2 data-focus-visible:ring-border-focus-ring data-selected:bg-background-primary-default data-selected:text-text-primary data-selected:shadow-card dark:data-selected:bg-background-primary-hover", oae = "flex size-7 flex-none cursor-pointer items-center justify-center rounded-md text-text-secondary outline-none transition-colors hover:text-text-primary focus-visible:ring-2 focus-visible:ring-border-focus-ring data-focus-visible:ring-2 data-focus-visible:ring-border-focus-ring data-selected:bg-background-primary-default data-selected:text-text-primary data-selected:shadow-card dark:data-selected:bg-background-primary-hover", pC = "inline-flex w-max max-w-full flex-none items-center gap-0.5 rounded-lg", mC = "flex size-7.5 flex-none cursor-pointer items-center justify-center rounded-lg text-(--glass-text)/62 outline-none transition-colors hover:text-(--glass-text) focus-visible:ring-2 focus-visible:ring-border-focus-ring data-selected:text-(--glass-text)", sae = { "text-aa": 1.435 }, hC = /* @__PURE__ */ new Map();
-function gC(e) {
- let t = hC.get(e);
+var DC = "inline-flex w-max max-w-full items-center gap-0.5 overflow-x-auto overscroll-x-contain rounded-2lg bg-background-tertiary-default p-1", OC = "flex min-h-7 flex-none cursor-pointer items-center gap-1.5 rounded-md px-2.5 py-1 text-body-medium whitespace-nowrap text-text-secondary outline-none transition-colors hover:text-text-primary focus-visible:ring-2 focus-visible:ring-border-focus-ring data-focus-visible:ring-2 data-focus-visible:ring-border-focus-ring data-selected:bg-background-primary-default data-selected:text-text-primary data-selected:shadow-card dark:data-selected:bg-background-primary-hover", Wie = "flex size-7 flex-none cursor-pointer items-center justify-center rounded-md text-text-secondary outline-none transition-colors hover:text-text-primary focus-visible:ring-2 focus-visible:ring-border-focus-ring data-focus-visible:ring-2 data-focus-visible:ring-border-focus-ring data-selected:bg-background-primary-default data-selected:text-text-primary data-selected:shadow-card dark:data-selected:bg-background-primary-hover", kC = "inline-flex w-max max-w-full flex-none items-center gap-0.5 rounded-lg", AC = "flex size-7.5 flex-none cursor-pointer items-center justify-center rounded-lg text-(--glass-text)/62 outline-none transition-colors hover:text-(--glass-text) focus-visible:ring-2 focus-visible:ring-border-focus-ring data-selected:text-(--glass-text)", Gie = { "text-aa": 1.435 }, jC = /* @__PURE__ */ new Map();
+function MC(e) {
+ let t = jC.get(e);
if (t) return t;
- let n = sae[e], r = n ? ({ className: t }) => /* @__PURE__ */ (0, H.jsx)("svg", {
+ let n = Gie[e], r = n ? ({ className: t }) => /* @__PURE__ */ (0, H.jsx)("svg", {
"aria-hidden": !0,
viewBox: `0 0 ${(24 * n).toFixed(2)} 24`,
className: `shrink-0 fill-current ${t ?? "h-4 w-auto"}`,
@@ -27306,19 +27306,19 @@ function gC(e) {
className: `shrink-0 stroke-current stroke-2 ${t ?? "size-4"}`,
children: /* @__PURE__ */ (0, H.jsx)("use", { href: `#i-${e}` })
});
- return r.displayName = `SpriteGlyph(${e})`, hC.set(e, r), r;
+ return r.displayName = `SpriteGlyph(${e})`, jC.set(e, r), r;
}
//#endregion
//#region src/react/entity-filter/entity-filter.ts
-var _C = (e) => e === "videos", vC = () => /* @__PURE__ */ (0, H.jsx)("span", {
+var Kie = (e) => e === "videos", NC = () => /* @__PURE__ */ (0, H.jsx)("span", {
"data-entity-sep": "",
"aria-hidden": "true"
});
-function yC(e) {
- let { view: t, views: n, state: r, states: i, tags: a, combo: o, actions: s, helpers: c } = e, l = _C(t), u = (0, B.useRef)(null), d = (0, B.useRef)(null), f = (0, B.useRef)(null), p = (0, B.useRef)(null), m = (0, B.useRef)(null), h = (0, B.useRef)(null), g = (0, B.useRef)(null), _ = Sr(u, f, "[data-entity-state][aria-pressed=\"true\"]", `${t}:${r}`), v = Sr(d, p, "[data-media-view][aria-pressed=\"true\"]", `${t}:${!!n}`);
+function qie(e) {
+ let { view: t, views: n, state: r, states: i, tags: a, combo: o, actions: s, helpers: c } = e, l = Kie(t), u = (0, B.useRef)(null), d = (0, B.useRef)(null), f = (0, B.useRef)(null), p = (0, B.useRef)(null), m = (0, B.useRef)(null), h = (0, B.useRef)(null), g = (0, B.useRef)(null), _ = Sr(u, f, "[data-entity-state][aria-pressed=\"true\"]", `${t}:${r}`), v = Sr(d, p, "[data-media-view][aria-pressed=\"true\"]", `${t}:${!!n}`);
return (0, B.useEffect)(() => {
c.wireDrag(h.current), c.wireScroller(m.current), c.wireDrag(g.current);
- }, [c]), /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(xC, {
+ }, [c]), /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(PC, {
items: o,
hidden: !l,
actions: s
@@ -27342,13 +27342,13 @@ function yC(e) {
"data-view-glide": "round",
"aria-hidden": "true"
})] }),
- top: /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [n ? /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(bC, {
+ top: /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [n ? /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(Jie, {
keys: n,
view: t,
row: p,
glide: v,
onView: s.setView
- }), l ? /* @__PURE__ */ (0, H.jsx)(vC, {}) : null] }) : null, /* @__PURE__ */ (0, H.jsxs)("div", {
+ }), l ? /* @__PURE__ */ (0, H.jsx)(NC, {}) : null] }) : null, /* @__PURE__ */ (0, H.jsxs)("div", {
ref: m,
"data-entity-scroll": "",
children: [/* @__PURE__ */ (0, H.jsxs)("div", {
@@ -27368,7 +27368,7 @@ function yC(e) {
r !== e.k && s.setState(e.k);
},
children: e.label
- }, e.k)), /* @__PURE__ */ (0, H.jsx)(vC, {})]
+ }, e.k)), /* @__PURE__ */ (0, H.jsx)(NC, {})]
}), /* @__PURE__ */ (0, H.jsx)("div", {
ref: h,
"data-entity-tags": "",
@@ -27384,10 +27384,10 @@ function yC(e) {
}, e.k)) : null
})]
})] }),
- bottom: /* @__PURE__ */ (0, H.jsx)(SC, { ...e })
+ bottom: /* @__PURE__ */ (0, H.jsx)(Yie, { ...e })
})] });
}
-function bC({ keys: e, view: t, row: n, glide: r, onView: i }) {
+function Jie({ keys: e, view: t, row: n, glide: r, onView: i }) {
let a = [];
return e.people && a.push({
value: "people",
@@ -27429,7 +27429,7 @@ function bC({ keys: e, view: t, row: n, glide: r, onView: i }) {
})
});
}
-function xC({ items: e, hidden: t, actions: n }) {
+function PC({ items: e, hidden: t, actions: n }) {
return /* @__PURE__ */ (0, H.jsx)("div", {
"data-entity-combo": "",
hidden: t,
@@ -27449,7 +27449,7 @@ function xC({ items: e, hidden: t, actions: n }) {
})] }) : null
});
}
-function SC(e) {
+function Yie(e) {
let { view: t, readout: n, busy: r, video: i, photo: a, actions: o, helpers: s } = e;
return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [
t === "photos" && a?.back ? /* @__PURE__ */ (0, H.jsxs)("button", {
@@ -27461,22 +27461,22 @@ function SC(e) {
dangerouslySetInnerHTML: { __html: L("chevron-left") }
}), /* @__PURE__ */ (0, H.jsx)("span", { children: "全部照片" })]
}) : null,
- /* @__PURE__ */ (0, H.jsx)(CC, {
+ /* @__PURE__ */ (0, H.jsx)(Xie, {
text: n,
busy: r
}),
- t === "videos" && i ? /* @__PURE__ */ (0, H.jsx)(EC, {
+ t === "videos" && i ? /* @__PURE__ */ (0, H.jsx)(Zie, {
head: i,
actions: o
}) : null,
- t === "photos" && a ? /* @__PURE__ */ (0, H.jsx)(OC, {
+ t === "photos" && a ? /* @__PURE__ */ (0, H.jsx)(Qie, {
head: a,
actions: o,
helpers: s
}) : null
] });
}
-function CC({ text: e, busy: t }) {
+function Xie({ text: e, busy: t }) {
return /* @__PURE__ */ (0, H.jsx)("h3", {
"data-entity-readout": "",
children: t ? /* @__PURE__ */ (0, H.jsx)("span", {
@@ -27486,22 +27486,22 @@ function CC({ text: e, busy: t }) {
}) : e
});
}
-function wC({ name: e, label: t, value: n, options: r, onChange: i }) {
- return /* @__PURE__ */ (0, H.jsx)(dg, {
+function FC({ name: e, label: t, value: n, options: r, onChange: i }) {
+ return /* @__PURE__ */ (0, H.jsx)(ug, {
name: e,
"aria-label": t,
orientation: "horizontal",
value: n,
onChange: i,
"data-entity-layout": "",
- className: pC,
+ className: kC,
children: r.map(([e, t, n]) => {
- let r = gC(n);
- return /* @__PURE__ */ (0, H.jsx)(fg, {
+ let r = MC(n);
+ return /* @__PURE__ */ (0, H.jsx)(dg, {
value: e,
"aria-label": t,
"data-glass-segment": "",
- className: mC,
+ className: AC,
children: /* @__PURE__ */ (0, H.jsx)("span", {
title: t,
className: "contents",
@@ -27511,7 +27511,7 @@ function wC({ name: e, label: t, value: n, options: r, onChange: i }) {
})
});
}
-function TC({ onPress: e, busy: t = !1 }) {
+function IC({ onPress: e, busy: t = !1 }) {
return /* @__PURE__ */ (0, H.jsx)("button", {
type: "button",
"data-entity-batch": "",
@@ -27525,27 +27525,27 @@ function TC({ onPress: e, busy: t = !1 }) {
dangerouslySetInnerHTML: { __html: t ? w("正在换一批") : L("shuffle") }
});
}
-function EC({ head: e, actions: t }) {
+function Zie({ head: e, actions: t }) {
return /* @__PURE__ */ (0, H.jsxs)("span", {
"data-entity-sorts": "",
children: [
- /* @__PURE__ */ (0, H.jsx)(TC, { onPress: () => void t.reshuffle() }),
- e.jav ? /* @__PURE__ */ (0, H.jsx)(wC, {
+ /* @__PURE__ */ (0, H.jsx)(IC, { onPress: () => void t.reshuffle() }),
+ e.jav ? /* @__PURE__ */ (0, H.jsx)(FC, {
label: "JAV 卡片版式",
value: e.jav.layout,
options: e.jav.options,
onChange: t.setJavLayout
}) : null,
- /* @__PURE__ */ (0, H.jsx)(DC, {
+ /* @__PURE__ */ (0, H.jsx)(LC, {
sorts: e.sorts,
onSort: t.setSort
})
]
});
}
-function DC({ sorts: e, onSort: t }) {
+function LC({ sorts: e, onSort: t }) {
return /* @__PURE__ */ (0, H.jsx)(H.Fragment, { children: e.map((e) => {
- let n = gC(e.dir === "asc" ? "arrow-up" : "arrow-down");
+ let n = MC(e.dir === "asc" ? "arrow-up" : "arrow-down");
return /* @__PURE__ */ (0, H.jsxs)("button", {
type: "button",
"data-entity-sort": e.key,
@@ -27557,20 +27557,20 @@ function DC({ sorts: e, onSort: t }) {
}, e.key);
}) });
}
-function OC({ head: e, actions: t, helpers: n }) {
+function Qie({ head: e, actions: t, helpers: n }) {
let [r, i] = (0, B.useState)(!1), a = (0, B.useRef)(null), o = e.back ? n.sourceToolsHtml(e.setId) : "";
return (0, B.useEffect)(() => {
a.current && o && n.wireSourceTools(a.current);
}, [n, o]), /* @__PURE__ */ (0, H.jsxs)("span", {
"data-entity-sorts": "",
children: [
- e.shuffle ? /* @__PURE__ */ (0, H.jsx)(TC, {
+ e.shuffle ? /* @__PURE__ */ (0, H.jsx)(IC, {
onPress: () => {
i(!0), t.reshuffle().finally(() => i(!1));
},
busy: r
}) : null,
- /* @__PURE__ */ (0, H.jsx)(wC, {
+ /* @__PURE__ */ (0, H.jsx)(FC, {
label: "图片布局",
value: e.layout,
options: e.layouts,
@@ -27586,31 +27586,31 @@ function OC({ head: e, actions: t, helpers: n }) {
}
//#endregion
//#region src/react/catalog-filter/catalog-filter-page.tsx
-var kC = "";
-function AC(e) {
- let t = !e.tiers, n = RC(e.comboHost);
+var RC = "";
+function $ie(e) {
+ let t = !e.tiers, n = oae(e.comboHost);
return /* @__PURE__ */ (0, H.jsxs)("div", {
"data-catalog-root": "",
"data-loading": t || void 0,
"data-refreshing": e.refreshing || void 0,
className: "contents",
children: [
- n ? (0, Dt.createPortal)(/* @__PURE__ */ (0, H.jsx)(xC, {
+ n ? (0, Dt.createPortal)(/* @__PURE__ */ (0, H.jsx)(PC, {
items: e.combo,
hidden: e.comboHidden,
actions: e.actions
}), n) : null,
- /* @__PURE__ */ (0, H.jsx)(NC, { ...e }),
- e.offscreen ? null : /* @__PURE__ */ (0, H.jsx)(jC, { ...e })
+ /* @__PURE__ */ (0, H.jsx)(nae, { ...e }),
+ e.offscreen ? null : /* @__PURE__ */ (0, H.jsx)(eae, { ...e })
]
});
}
-function jC(e) {
+function eae(e) {
let { actions: t, helpers: n } = e, r = (0, B.useRef)(null), i = (0, B.useRef)(null), a = (0, B.useRef)(null), o = (0, B.useRef)(null), s = (0, B.useRef)(null), c = Sr(r, i, "[data-catalog-view][aria-pressed=\"true\"]", e.state);
(0, B.useEffect)(() => {
n.wireDrag(o.current), n.wireScroller(a.current), n.wireDrag(s.current);
}, [n]);
- let l = !e.tiers, u = zC(o, e.tags, e.tiers?.key ?? "", e.tagFirst);
+ let l = !e.tiers, u = BC(o, e.tags, e.tiers?.key ?? "", e.tagFirst);
return (0, B.useLayoutEffect)(() => {
h(o.current, "tagbar");
}, [u]), /* @__PURE__ */ (0, H.jsx)(gr, {
@@ -27656,16 +27656,16 @@ function jC(e) {
}), /* @__PURE__ */ (0, H.jsxs)("div", {
ref: o,
"data-catalog-tags": "",
- children: [e.empty || l ? /* @__PURE__ */ (0, H.jsx)(FC, { kind: "tag" }) : null, u.map((e) => /* @__PURE__ */ (0, H.jsx)(MC, {
+ children: [e.empty || l ? /* @__PURE__ */ (0, H.jsx)(zC, { kind: "tag" }) : null, u.map((e) => /* @__PURE__ */ (0, H.jsx)(tae, {
tag: e,
onPress: t.toggleTag
}, e.k))]
})]
}),
- bottom: e.trash ? null : /* @__PURE__ */ (0, H.jsx)(IC, { ...e })
+ bottom: e.trash ? null : /* @__PURE__ */ (0, H.jsx)(iae, { ...e })
});
}
-function MC({ tag: e, onPress: t }) {
+function tae({ tag: e, onPress: t }) {
return /* @__PURE__ */ (0, H.jsxs)(vr, {
"data-catalog-tag": e.k,
"data-entity-press": "",
@@ -27677,12 +27677,12 @@ function MC({ tag: e, onPress: t }) {
})]
});
}
-function NC(e) {
+function nae(e) {
let { actions: t, helpers: n } = e, r = e.tiers ?? {
key: "",
performers: [],
studios: []
- }, i = e.empty || !e.tiers, a = (0, B.useRef)(null), o = (0, B.useRef)(null), s = (0, B.useCallback)((e) => () => t.moreTops(e), [t]), c = zC(a, r.performers, r.key, 24, i ? void 0 : s("performers")), l = zC(o, r.studios, r.key, 24, i ? void 0 : s("studios")), u = i || r.performers.length > 0, d = i || r.studios.length > 0;
+ }, i = e.empty || !e.tiers, a = (0, B.useRef)(null), o = (0, B.useRef)(null), s = (0, B.useCallback)((e) => () => t.moreTops(e), [t]), c = BC(a, r.performers, r.key, 24, i ? void 0 : s("performers")), l = BC(o, r.studios, r.key, 24, i ? void 0 : s("studios")), u = i || r.performers.length > 0, d = i || r.studios.length > 0;
return (0, B.useEffect)(() => {
n.wireDrag(a.current), n.wireDrag(o.current);
}, [
@@ -27695,7 +27695,7 @@ function NC(e) {
children: [u ? /* @__PURE__ */ (0, H.jsx)("div", {
ref: a,
"data-catalog-tier": "performers",
- children: i ? /* @__PURE__ */ (0, H.jsx)(FC, { kind: "performer" }) : c.map((e) => /* @__PURE__ */ (0, H.jsxs)("button", {
+ children: i ? /* @__PURE__ */ (0, H.jsx)(zC, { kind: "performer" }) : c.map((e) => /* @__PURE__ */ (0, H.jsxs)("button", {
type: "button",
"data-tier-performer": "",
"data-entity-kind": "performer",
@@ -27712,18 +27712,18 @@ function NC(e) {
}) : null, d ? /* @__PURE__ */ (0, H.jsx)("div", {
ref: o,
"data-catalog-tier": "studios",
- children: i ? /* @__PURE__ */ (0, H.jsx)(FC, { kind: "studio" }) : l.map((e) => /* @__PURE__ */ (0, H.jsxs)("button", {
+ children: i ? /* @__PURE__ */ (0, H.jsx)(zC, { kind: "studio" }) : l.map((e) => /* @__PURE__ */ (0, H.jsxs)("button", {
type: "button",
"data-tier-studio": "",
"data-entity-kind": "studio",
"data-entity-name": e.name,
onClick: () => t.openEntity("studio", e.name),
- children: [/* @__PURE__ */ (0, H.jsx)(PC, { studio: e }), e.name]
+ children: [/* @__PURE__ */ (0, H.jsx)(rae, { studio: e }), e.name]
}, e.name))
}) : null]
});
}
-function PC({ studio: e }) {
+function rae({ studio: e }) {
let [t, n] = (0, B.useState)(!1);
return /* @__PURE__ */ (0, H.jsx)("span", {
"data-tier-mark": "",
@@ -27737,7 +27737,7 @@ function PC({ studio: e }) {
}) : e.fallback
});
}
-function FC({ kind: e }) {
+function zC({ kind: e }) {
let t = Array.from({ length: 64 }, (e, t) => t);
return e === "tag" ? /* @__PURE__ */ (0, H.jsx)("span", {
"data-catalog-placeholder": "tag",
@@ -27753,32 +27753,32 @@ function FC({ kind: e }) {
children: [/* @__PURE__ */ (0, H.jsx)("span", {}), /* @__PURE__ */ (0, H.jsx)("span", { children: "\xA0" })]
}, t)) });
}
-function IC({ count: e, refreshing: t, layout: n, sorts: r, actions: i }) {
+function iae({ count: e, refreshing: t, layout: n, sorts: r, actions: i }) {
let [a, o] = (0, B.useState)(!1);
- return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(LC, { count: e }), /* @__PURE__ */ (0, H.jsxs)("span", {
+ return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(aae, { count: e }), /* @__PURE__ */ (0, H.jsxs)("span", {
"data-entity-sorts": "",
children: [
- /* @__PURE__ */ (0, H.jsx)(TC, {
+ /* @__PURE__ */ (0, H.jsx)(IC, {
onPress: () => {
o(!0), i.reshuffle().finally(() => o(!1));
},
busy: a || t
}),
- n ? /* @__PURE__ */ (0, H.jsx)(wC, {
+ n ? /* @__PURE__ */ (0, H.jsx)(FC, {
name: n.name,
label: n.label,
value: n.value,
options: n.options,
onChange: i.setLayout
}, n.name) : null,
- /* @__PURE__ */ (0, H.jsx)(DC, {
+ /* @__PURE__ */ (0, H.jsx)(LC, {
sorts: r,
onSort: i.setSort
})
]
})] });
}
-function LC({ count: e }) {
+function aae({ count: e }) {
let t = (0, B.useRef)(null), n = (0, B.useRef)(null), r = e ? `${e.total.toLocaleString()} 个符合 · 显示 ${e.shown}` : "";
return (0, B.useLayoutEffect)(() => {
if (!e) {
@@ -27786,7 +27786,7 @@ function LC({ count: e }) {
return;
}
let i = t.current;
- i && (kC && i.dataset.popCount === void 0 && (i.dataset.popCount = kC), kC = r, g(i, r));
+ i && (RC && i.dataset.popCount === void 0 && (i.dataset.popCount = RC), RC = r, g(i, r));
}, [e, r]), e ? /* @__PURE__ */ (0, H.jsx)("span", {
ref: t,
"data-catalog-readout": "",
@@ -27802,7 +27802,7 @@ function LC({ count: e }) {
})
}, "skeleton");
}
-function RC(e) {
+function oae(e) {
let [t, n] = (0, B.useState)(null);
return (0, B.useLayoutEffect)(() => {
if (!e) return;
@@ -27812,7 +27812,7 @@ function RC(e) {
};
}, [e]), t;
}
-function zC(e, t, n, r, i) {
+function BC(e, t, n, r, i) {
let a = () => ({
key: n,
limit: r,
@@ -27858,13 +27858,13 @@ function zC(e, t, n, r, i) {
}
//#endregion
//#region src/api.ts
-var BC = class extends Error {
+var VC = class extends Error {
status;
body;
constructor(e, t, n = null) {
super(ce(e, t)), this.name = "ApiError", this.status = t, this.body = n;
}
-}, VC = (e) => {
+}, HC = (e) => {
if (!e || typeof e != "object") return "";
let t = e;
for (let e of [
@@ -27886,7 +27886,7 @@ async function K(e, t) {
try {
r = await n.json();
} catch {}
- if (!n.ok) throw new BC(VC(r) || `请求失败(${n.status})`, n.status);
+ if (!n.ok) throw new VC(HC(r) || `请求失败(${n.status})`, n.status);
return r;
}
async function q(e, t, n = "POST", r) {
@@ -27903,19 +27903,19 @@ async function q(e, t, n = "POST", r) {
try {
a = await i.json();
} catch {}
- if (!i.ok) throw new BC(VC(a) || `请求失败(${i.status})`, i.status, a);
+ if (!i.ok) throw new VC(HC(a) || `请求失败(${i.status})`, i.status, a);
return a;
}
//#endregion
//#region src/react/components/board-tabs.tsx
-function HC({ value: e }) {
+function UC({ value: e }) {
return /* @__PURE__ */ (0, H.jsx)("span", {
"data-tab-count": "",
className: "ml-1.5 inline-block rounded-sm bg-text-primary/10 px-1 py-px text-caption-1-medium text-text-primary opacity-50",
children: e.toLocaleString()
});
}
-var UC = "relative z-1 flex flex-none cursor-pointer items-center whitespace-nowrap border-b-2 border-transparent px-3 py-2.5 text-body-regular text-text-secondary outline-none focus-visible:outline-2 focus-visible:-outline-offset-3 focus-visible:outline-border-focus-ring aria-selected:font-medium aria-selected:text-border-focus-ring max-board-narrow:px-2.25 max-board-narrow:text-body-2-regular";
+var sae = "relative z-1 flex flex-none cursor-pointer items-center whitespace-nowrap border-b-2 border-transparent px-3 py-2.5 text-body-regular text-text-secondary outline-none focus-visible:outline-2 focus-visible:-outline-offset-3 focus-visible:outline-border-focus-ring aria-selected:font-medium aria-selected:text-border-focus-ring max-board-narrow:px-2.25 max-board-narrow:text-body-2-regular";
function WC({ tabs: e, value: t, label: n, onChange: r }) {
let i = (0, B.useRef)(null), a = (0, B.useRef)(null);
return (0, B.useLayoutEffect)(() => {
@@ -27944,14 +27944,14 @@ function WC({ tabs: e, value: t, label: n, onChange: r }) {
},
className: "relative mb-5.5 flex flex-none gap-1 overflow-x-auto border-b border-border-button-default max-board-narrow:gap-0",
children: [e.map((e) => {
- let n = e.symbol ? gC(e.symbol) : null, i = e.value === t;
+ let n = e.symbol ? MC(e.symbol) : null, i = e.value === t;
return /* @__PURE__ */ (0, H.jsxs)("button", {
type: "button",
role: "tab",
"data-tab": e.value,
"aria-selected": i,
tabIndex: i ? 0 : -1,
- className: UC,
+ className: sae,
onClick: () => {
i || r(e.value);
},
@@ -27974,7 +27974,7 @@ var GC = /* @__PURE__ */ new Set([
"agency",
"series"
]), KC = /* @__PURE__ */ new Set(["asset"]), qC = (e) => String(e ?? "").normalize("NFKC").trim().toLocaleLowerCase();
-function JC({ query: e, history: t, picks: n, suggestFor: r, groups: i, tabs: a, kind: o }) {
+function cae({ query: e, history: t, picks: n, suggestFor: r, groups: i, tabs: a, kind: o }) {
let s = 0, c = [], l = (e) => {
let t = {
...e,
@@ -28028,7 +28028,7 @@ function JC({ query: e, history: t, picks: n, suggestFor: r, groups: i, tabs: a,
options: c
};
}
-function YC(e, t, n = Math.random) {
+function lae(e, t, n = Math.random) {
let r = [...e];
for (let e = r.length - 1; e > 0; --e) {
let t = Math.floor(n() * (e + 1));
@@ -28038,7 +28038,7 @@ function YC(e, t, n = Math.random) {
}
//#endregion
//#region src/react/search/search-page.tsx
-var cae = () => ({
+var uae = () => ({
history: [],
pool: [],
poolRequest: 0,
@@ -28053,7 +28053,7 @@ var cae = () => ({
active: -1,
reveal: !1,
rewind: !1
-}), XC = (e) => JC({
+}), JC = (e) => cae({
query: e.query,
history: e.history,
picks: e.picks,
@@ -28061,18 +28061,18 @@ var cae = () => ({
groups: e.groups,
tabs: e.tabs,
kind: e.kind
-}), lae = (e) => !!(e.tabs || e.recent || e.left.length || e.right.length), ZC = ({ name: e }) => /* @__PURE__ */ (0, H.jsx)("svg", {
+}), dae = (e) => !!(e.tabs || e.recent || e.left.length || e.right.length), YC = ({ name: e }) => /* @__PURE__ */ (0, H.jsx)("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
children: /* @__PURE__ */ (0, H.jsx)("use", { href: `#i-${e}` })
});
-function uae(e) {
+function fae(e) {
let t = (0, B.useRef)(e);
t.current = e;
let n = (0, B.useRef)(null);
- n.current ??= cae();
+ n.current ??= uae();
let r = n.current, i = (0, B.useRef)(null), [, a] = (0, B.useReducer)((e) => e + 1, 0), o = (0, B.useRef)(null);
- o.current ??= dae(() => t.current, r, () => i.current?.closest("[data-search-menu]") ?? null, a);
+ o.current ??= pae(() => t.current, r, () => i.current?.closest("[data-search-menu]") ?? null, a);
let s = o.current;
(0, B.useLayoutEffect)(() => {
let { input: e } = t.current, n = (e) => s.input(e), i = () => t.current.helpers.composing(), a = (e) => s.key(e), o = () => s.focus();
@@ -28085,7 +28085,7 @@ function uae(e) {
let e = i.current?.closest("[data-search-menu]");
r.rewind && e && (e.scrollTop = 0), r.rewind = !1, r.reveal && i.current?.querySelector("[data-search-option][data-active]")?.scrollIntoView({ block: "nearest" }), r.reveal = !1;
});
- let c = XC(r), l = e.historyLimit, u = (t) => /* @__PURE__ */ (0, H.jsx)(pae, {
+ let c = JC(r), l = e.historyLimit, u = (t) => /* @__PURE__ */ (0, H.jsx)(hae, {
entry: t,
active: t.index === r.active,
helpers: e.helpers,
@@ -28105,7 +28105,7 @@ function uae(e) {
"data-search-root": "",
"data-history-limit": l,
children: [
- c.tabs ? /* @__PURE__ */ (0, H.jsx)(fae, {
+ c.tabs ? /* @__PURE__ */ (0, H.jsx)(mae, {
tabs: c.tabs,
kind: r.kind,
onPick: s.pickKind,
@@ -28126,7 +28126,7 @@ function uae(e) {
]
});
}
-function dae(e, t, n, r) {
+function pae(e, t, n, r) {
let i = () => e().input, a = () => document.activeElement === i(), o = () => t.history.slice(0, e().historyLimit), s = (n) => {
t.history = n.slice(0, e().historyLimit);
}, c = async () => {
@@ -28173,9 +28173,9 @@ function dae(e, t, n, r) {
let i = n();
i && e().helpers.dismiss(i), t.active = -1, r();
}, m = () => {
- t.query = i().value.trim(), t.picks = t.query ? [] : YC(t.pool, o()), t.active = -1;
+ t.query = i().value.trim(), t.picks = t.query ? [] : lae(t.pool, o()), t.active = -1;
let a = n();
- a && (lae(XC(t)) ? e().helpers.present(a) : e().helpers.dismiss(a)), r();
+ a && (dae(JC(t)) ? e().helpers.present(a) : e().helpers.dismiss(a)), r();
}, h = () => {
t.active = -1, t.kind = "", clearTimeout(t.timer);
let e = i().value.trim();
@@ -28187,7 +28187,7 @@ function dae(e, t, n, r) {
!n || e === t.kind || (t.kind = e, clearTimeout(t.timer), m(), t.rewind = !0, d(n, e).then(() => {
a() && t.kind === e && m();
}));
- }, _ = () => f() ? XC(t).options : [], v = (e) => {
+ }, _ = () => f() ? JC(t).options : [], v = (e) => {
let n = _();
return n.length ? (t.active = (t.active + e + n.length) % n.length, t.reveal = !0, r(), !0) : !1;
}, y = (t, n) => {
@@ -28257,7 +28257,7 @@ function dae(e, t, n, r) {
pickKind: g
};
}
-function fae({ tabs: e, kind: t, onPick: n, wire: r }) {
+function mae({ tabs: e, kind: t, onPick: n, wire: r }) {
let i = (0, B.useRef)(null);
(0, B.useLayoutEffect)(() => {
r(i.current);
@@ -28269,7 +28269,7 @@ function fae({ tabs: e, kind: t, onPick: n, wire: r }) {
"aria-selected": t === e,
onMouseDown: (e) => e.preventDefault(),
onClick: () => n(e),
- children: [r, i ? /* @__PURE__ */ (0, H.jsx)(HC, { value: i }) : null]
+ children: [r, i ? /* @__PURE__ */ (0, H.jsx)(UC, { value: i }) : null]
}, e || "all");
return /* @__PURE__ */ (0, H.jsxs)("div", {
ref: i,
@@ -28279,8 +28279,8 @@ function fae({ tabs: e, kind: t, onPick: n, wire: r }) {
children: [a("", "全部"), e.map((e) => a(e.kind, e.label, e.total))]
});
}
-var QC = (e) => e.preventDefault();
-function pae({ entry: e, active: t, helpers: n, onPick: r, onPeek: i, onRemove: a }) {
+var XC = (e) => e.preventDefault();
+function hae({ entry: e, active: t, helpers: n, onPick: r, onPeek: i, onRemove: a }) {
let o = {
"data-search-value": e.value,
"data-active": t ? "" : void 0,
@@ -28292,17 +28292,17 @@ function pae({ entry: e, active: t, helpers: n, onPick: r, onPeek: i, onRemove:
"data-search-option": "",
...o,
children: [
- /* @__PURE__ */ (0, H.jsx)(ZC, { name: e.type === "history" ? "history" : "sparkles" }),
+ /* @__PURE__ */ (0, H.jsx)(YC, { name: e.type === "history" ? "history" : "sparkles" }),
/* @__PURE__ */ (0, H.jsx)("span", { children: e.value }),
e.type === "history" ? /* @__PURE__ */ (0, H.jsx)("button", {
type: "button",
"data-remove-history": e.value,
"aria-label": `删除历史 ${e.value}`,
- onMouseDown: QC,
+ onMouseDown: XC,
onClick: (t) => {
t.stopPropagation(), a(e.value);
},
- children: /* @__PURE__ */ (0, H.jsx)(ZC, { name: "x" })
+ children: /* @__PURE__ */ (0, H.jsx)(YC, { name: "x" })
}) : null
]
});
@@ -28313,7 +28313,7 @@ function pae({ entry: e, active: t, helpers: n, onPick: r, onPeek: i, onRemove:
"data-search-option": "work",
"data-open-item": s.id,
...o,
- children: [/* @__PURE__ */ (0, H.jsx)($C, {
+ children: [/* @__PURE__ */ (0, H.jsx)(ZC, {
card: s.card,
helpers: n
}), /* @__PURE__ */ (0, H.jsxs)("span", {
@@ -28339,7 +28339,7 @@ function pae({ entry: e, active: t, helpers: n, onPick: r, onPeek: i, onRemove:
"data-open-entity": l,
...o,
children: [
- /* @__PURE__ */ (0, H.jsx)(ew, {
+ /* @__PURE__ */ (0, H.jsx)(QC, {
item: s,
kind: c
}),
@@ -28359,11 +28359,11 @@ function pae({ entry: e, active: t, helpers: n, onPick: r, onPeek: i, onRemove:
type: "button",
"data-open-work": e.id,
"aria-label": `打开 ${e.code || s.value}`,
- onMouseDown: QC,
+ onMouseDown: XC,
onClick: (t) => {
t.stopPropagation(), i(e);
},
- children: /* @__PURE__ */ (0, H.jsx)($C, {
+ children: /* @__PURE__ */ (0, H.jsx)(ZC, {
card: e,
helpers: n
})
@@ -28377,7 +28377,7 @@ function pae({ entry: e, active: t, helpers: n, onPick: r, onPeek: i, onRemove:
"data-open-entity": l,
...o,
children: [
- c === "studio" || c === "agency" ? /* @__PURE__ */ (0, H.jsx)(ew, {
+ c === "studio" || c === "agency" ? /* @__PURE__ */ (0, H.jsx)(QC, {
item: s,
kind: c
}) : null,
@@ -28390,13 +28390,13 @@ function pae({ entry: e, active: t, helpers: n, onPick: r, onPeek: i, onRemove:
]
});
}
-function $C({ card: e, helpers: t }) {
+function ZC({ card: e, helpers: t }) {
return /* @__PURE__ */ (0, H.jsx)("span", {
"data-search-pic": "",
dangerouslySetInnerHTML: { __html: t.coverHtml(e) }
});
}
-function ew({ item: e, kind: t }) {
+function QC({ item: e, kind: t }) {
let n = {
id: e.entity_id,
has_image: e.has_image,
@@ -28411,8 +28411,8 @@ function ew({ item: e, kind: t }) {
}
//#endregion
//#region src/react/feed-new/feed-new.ts
-var tw = (e) => ["feed-new", e ?? "home"], mae = 8, hae = 1500;
-function gae(e, t, n) {
+var $C = (e) => ["feed-new", e ?? "home"], gae = 8, _ae = 1500;
+function vae(e, t, n) {
let r = document.createElement("template");
r.innerHTML = e;
let i = [...r.content.querySelectorAll("img[src]")].slice(0, t).map((e) => {
@@ -28423,43 +28423,43 @@ function gae(e, t, n) {
setTimeout(e, n);
})]);
}
-async function _ae(e, t, n) {
+async function yae(e, t, n) {
let r = new URLSearchParams({ limit: "12" });
e && r.set("entity", String(e));
let i = await N(`/api/feeds/discoveries?${r}`).catch(() => null), a = i && !i.error ? i : null, o = a?.items || [], s = t(a);
- return n && o.length && await gae(s, mae, hae), {
+ return n && o.length && await vae(s, gae, _ae), {
items: o,
html: s
};
}
-var nw = (e, t, n = !1) => ({
- queryKey: tw(e),
- queryFn: () => _ae(e, t, n),
+var ew = (e, t, n = !1) => ({
+ queryKey: $C(e),
+ queryFn: () => yae(e, t, n),
staleTime: Infinity
-}), rw = (e, t) => N("/api/feeds/discovery", {
+}), tw = (e, t) => N("/api/feeds/discovery", {
method: "POST",
body: JSON.stringify({
action: t,
ids: [e]
})
}).then(() => void 0, () => void 0);
-async function vae(e) {
- z.removeQueries({ queryKey: tw(null) }), await z.fetchQuery(nw(null, e.helpers.feedRowHtml, e.host.getAttribute("aria-busy") === "true"));
+async function bae(e) {
+ z.removeQueries({ queryKey: $C(null) }), await z.fetchQuery(ew(null, e.helpers.feedRowHtml, e.host.getAttribute("aria-busy") === "true"));
}
//#endregion
//#region node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js
-var iw = B.createContext(void 0), aw = (e) => {
- let t = B.useContext(iw);
+var nw = B.createContext(void 0), rw = (e) => {
+ let t = B.useContext(nw);
if (e) return e;
if (!t) throw Error("No QueryClient set, use QueryClientProvider to set one");
return t;
-}, ow = ({ client: e, children: t }) => (B.useEffect(() => (e.mount(), () => {
+}, iw = ({ client: e, children: t }) => (B.useEffect(() => (e.mount(), () => {
e.unmount();
-}), [e]), /* @__PURE__ */ (0, H.jsx)(iw.Provider, {
+}), [e]), /* @__PURE__ */ (0, H.jsx)(nw.Provider, {
value: e,
children: t
-})), yae = ({ children: e, options: t = {}, state: n, queryClient: r }) => {
- let i = aw(r), a = B.useRef(t);
+})), xae = ({ children: e, options: t = {}, state: n, queryClient: r }) => {
+ let i = rw(r), a = B.useRef(t);
B.useEffect(() => {
a.current = t;
});
@@ -28477,10 +28477,10 @@ var iw = B.createContext(void 0), aw = (e) => {
return B.useEffect(() => {
o && Pe(i, { queries: o }, a.current);
}, [i, o]), e;
-}, sw = B.createContext(!1), cw = () => B.useContext(sw), bae = sw.Provider;
+}, aw = B.createContext(!1), ow = () => B.useContext(aw), Sae = aw.Provider;
//#endregion
//#region node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js
-function lw() {
+function sw() {
let e = !1;
return {
clearReset: () => {
@@ -28492,31 +28492,31 @@ function lw() {
isReset: () => e
};
}
-var uw = B.createContext(lw()), dw = () => B.useContext(uw), xae = ({ children: e }) => {
- let [t] = B.useState(() => lw());
- return /* @__PURE__ */ (0, H.jsx)(uw.Provider, {
+var cw = B.createContext(sw()), lw = () => B.useContext(cw), Cae = ({ children: e }) => {
+ let [t] = B.useState(() => sw());
+ return /* @__PURE__ */ (0, H.jsx)(cw.Provider, {
value: t,
children: typeof e == "function" ? e(t) : e
});
-}, fw = (e, t, n) => {
+}, uw = (e, t, n) => {
let r = n?.state.error && typeof e.throwOnError == "function" ? Re(e.throwOnError, [n.state.error, n]) : e.throwOnError;
(e.suspense || r) && (t.isReset() || (e.retryOnMount = !1));
-}, pw = (e) => {
+}, dw = (e) => {
B.useEffect(() => {
e.clearReset();
}, [e]);
-}, mw = ({ result: e, errorResetBoundary: t, throwOnError: n, query: r, suspense: i }) => e.isError && !t.isReset() && !e.isFetching && r && (i && e.data === void 0 || Re(n, [e.error, r])), hw = (e, t) => t.state.data === void 0, gw = (e) => {
+}, fw = ({ result: e, errorResetBoundary: t, throwOnError: n, query: r, suspense: i }) => e.isError && !t.isReset() && !e.isFetching && r && (i && e.data === void 0 || Re(n, [e.error, r])), pw = (e, t) => t.state.data === void 0, mw = (e) => {
if (e.suspense) {
let t = 1e3, n = (e) => e === "static" ? e : Math.max(e ?? t, t), r = e.staleTime;
e.staleTime = typeof r == "function" ? (...e) => n(r(...e)) : n(r), typeof e.gcTime == "number" && (e.gcTime = Math.max(e.gcTime, t));
}
-}, _w = (e, t) => e?.suspense && t.isPending, vw = (e, t, n) => t.fetchOptimistic(e).catch(() => {
+}, hw = (e, t) => e?.suspense && t.isPending, gw = (e, t, n) => t.fetchOptimistic(e).catch(() => {
n.clearReset();
});
//#endregion
//#region node_modules/@tanstack/react-query/build/modern/useQueries.js
-function yw({ queries: e, ...t }, n) {
- let r = aw(n), i = cw(), a = dw(), o = t.subscribed !== !1, s = B.useMemo(() => e.map((e) => {
+function _w({ queries: e, ...t }, n) {
+ let r = rw(n), i = ow(), a = lw(), o = t.subscribed !== !1, s = B.useMemo(() => e.map((e) => {
let t = r.defaultQueryOptions(e);
return t._optimisticResults = i ? "isRestoring" : o ? "optimistic" : void 0, t;
}), [
@@ -28526,10 +28526,10 @@ function yw({ queries: e, ...t }, n) {
o
]);
s.forEach((e) => {
- gw(e);
+ mw(e);
let t = r.getQueryCache().get(e.queryHash);
- fw(e, a, t);
- }), pw(a);
+ uw(e, a, t);
+ }), dw(a);
let [c] = B.useState(() => new Me(r, s, t)), [l, u, d] = c.getOptimisticResult(s, t.combine), f = !i && o;
B.useSyncExternalStore(B.useCallback((e) => f ? c.subscribe(Ie.batchCalls(e)) : Fe, [c, f]), () => c.getCurrentResult(), () => c.getCurrentResult()), B.useEffect(() => {
c.setQueries(s, t);
@@ -28538,14 +28538,14 @@ function yw({ queries: e, ...t }, n) {
t,
c
]);
- let p = l.some((e, t) => _w(s[t], e)) ? l.flatMap((e, t) => {
+ let p = l.some((e, t) => hw(s[t], e)) ? l.flatMap((e, t) => {
let n = s[t];
- return n && _w(n, e) ? vw(n, new Ne(r, n), a) : [];
+ return n && hw(n, e) ? gw(n, new Ne(r, n), a) : [];
}) : [];
if (p.length > 0) throw Promise.all(p);
let m = l.find((e, t) => {
let n = s[t];
- return n && mw({
+ return n && fw({
result: e,
errorResetBoundary: a,
throwOnError: n.throwOnError,
@@ -28558,17 +28558,17 @@ function yw({ queries: e, ...t }, n) {
}
//#endregion
//#region node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
-function bw(e, t, n) {
- let r = cw(), i = dw(), a = aw(n), o = a.defaultQueryOptions(e), s = a.getQueryCache().get(o.queryHash), c = e.subscribed !== !1;
- o._optimisticResults = r ? "isRestoring" : c ? "optimistic" : void 0, gw(o), fw(o, i, s), pw(i);
+function vw(e, t, n) {
+ let r = ow(), i = lw(), a = rw(n), o = a.defaultQueryOptions(e), s = a.getQueryCache().get(o.queryHash), c = e.subscribed !== !1;
+ o._optimisticResults = r ? "isRestoring" : c ? "optimistic" : void 0, mw(o), uw(o, i, s), dw(i);
let [l] = B.useState(() => new t(a, o)), u = l.getOptimisticResult(o), d = !r && c;
if (B.useSyncExternalStore(B.useCallback((e) => {
let t = d ? l.subscribe(Ie.batchCalls(e)) : Fe;
return l.updateResult(), t;
}, [l, d]), () => l.getCurrentResult(), () => l.getCurrentResult()), B.useEffect(() => {
l.setOptions(o);
- }, [o, l]), _w(o, u)) throw vw(o, l, i);
- if (mw({
+ }, [o, l]), hw(o, u)) throw gw(o, l, i);
+ if (fw({
result: u,
errorResetBoundary: i,
throwOnError: o.throwOnError,
@@ -28579,40 +28579,40 @@ function bw(e, t, n) {
}
//#endregion
//#region node_modules/@tanstack/react-query/build/modern/useQuery.js
-function xw(e, t) {
- return bw(e, Ne, t);
+function yw(e, t) {
+ return vw(e, Ne, t);
}
//#endregion
//#region node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.js
-function Sae(e, t) {
- return bw({
+function wae(e, t) {
+ return vw({
...e,
enabled: !0,
suspense: !0,
- throwOnError: hw,
+ throwOnError: pw,
placeholderData: void 0
}, Ne, t);
}
//#endregion
//#region node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.js
-function Cae(e, t) {
- return bw({
+function Tae(e, t) {
+ return vw({
...e,
enabled: !0,
suspense: !0,
- throwOnError: hw,
+ throwOnError: pw,
placeholderData: void 0
}, Ae, t);
}
//#endregion
//#region node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.js
-function wae(e, t) {
- return yw({
+function Eae(e, t) {
+ return _w({
...e,
queries: e.queries.map((e) => ({
...e,
suspense: !0,
- throwOnError: hw,
+ throwOnError: pw,
enabled: !0,
placeholderData: void 0
}))
@@ -28620,57 +28620,57 @@ function wae(e, t) {
}
//#endregion
//#region node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.js
-function Tae(e, t) {
- let n = aw(t);
+function Dae(e, t) {
+ let n = rw(t);
n.getQueryState(e.queryKey) || n.query(e).catch(Fe);
}
//#endregion
//#region node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.js
-function Eae(e, t) {
- let n = aw(t);
+function Oae(e, t) {
+ let n = rw(t);
n.getQueryState(e.queryKey) || n.infiniteQuery(e).catch(Fe);
}
//#endregion
//#region node_modules/@tanstack/react-query/build/modern/queryOptions.js
-function Dae(e) {
+function kae(e) {
return e;
}
//#endregion
//#region node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.js
-function Oae(e) {
+function Aae(e) {
return e;
}
//#endregion
//#region node_modules/@tanstack/react-query/build/modern/useIsFetching.js
-function kae(e, t) {
- let n = aw(t), r = n.getQueryCache();
+function jae(e, t) {
+ let n = rw(t), r = n.getQueryCache();
return B.useSyncExternalStore(B.useCallback((e) => r.subscribe(Ie.batchCalls(e)), [r]), () => n.isFetching(e), () => n.isFetching(e));
}
//#endregion
//#region node_modules/@tanstack/react-query/build/modern/useMutationState.js
-function Aae(e, t) {
- let n = aw(t);
- return Cw({ filters: {
+function Mae(e, t) {
+ let n = rw(t);
+ return xw({ filters: {
...e,
status: "pending"
} }, n).length;
}
-function Sw(e, t) {
+function bw(e, t) {
return e.findAll(t.filters).map((e) => t.select ? t.select(e) : e.state);
}
-function Cw(e = {}, t) {
- let n = aw(t).getMutationCache(), r = B.useRef(e), i = B.useRef(null);
- return i.current === null && (i.current = Sw(n, e)), B.useEffect(() => {
+function xw(e = {}, t) {
+ let n = rw(t).getMutationCache(), r = B.useRef(e), i = B.useRef(null);
+ return i.current === null && (i.current = bw(n, e)), B.useEffect(() => {
r.current = e;
}), B.useSyncExternalStore(B.useCallback((e) => n.subscribe(() => {
- let t = Le(i.current, Sw(n, r.current));
+ let t = Le(i.current, bw(n, r.current));
i.current !== t && (i.current = t, Ie.schedule(e));
}), [n]), () => i.current, () => i.current);
}
//#endregion
//#region node_modules/@tanstack/react-query/build/modern/useMutation.js
-function ww(e, t) {
- let n = aw(t), [r] = B.useState(() => new je(n, e));
+function Sw(e, t) {
+ let n = rw(t), [r] = B.useState(() => new je(n, e));
B.useEffect(() => {
r.setOptions(e);
}, [r, e]);
@@ -28686,47 +28686,47 @@ function ww(e, t) {
}
//#endregion
//#region node_modules/@tanstack/react-query/build/modern/mutationOptions.js
-function jae(e) {
+function Nae(e) {
return e;
}
//#endregion
//#region node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.js
-function Tw(e, t) {
- return bw(e, Ae, t);
+function Cw(e, t) {
+ return vw(e, Ae, t);
}
//#endregion
//#region node_modules/@tanstack/react-query/build/modern/index.js
-var Ew = /* @__PURE__ */ ht({
- HydrationBoundary: () => yae,
- IsRestoringProvider: () => bae,
- QueryClientContext: () => iw,
- QueryClientProvider: () => ow,
- QueryErrorResetBoundary: () => xae,
- infiniteQueryOptions: () => Oae,
- mutationOptions: () => jae,
- queryOptions: () => Dae,
- useInfiniteQuery: () => Tw,
- useIsFetching: () => kae,
- useIsMutating: () => Aae,
- useIsRestoring: () => cw,
- useMutation: () => ww,
- useMutationState: () => Cw,
- usePrefetchInfiniteQuery: () => Eae,
- usePrefetchQuery: () => Tae,
- useQueries: () => yw,
- useQuery: () => xw,
- useQueryClient: () => aw,
- useQueryErrorResetBoundary: () => dw,
- useSuspenseInfiniteQuery: () => Cae,
- useSuspenseQueries: () => wae,
- useSuspenseQuery: () => Sae
+var ww = /* @__PURE__ */ ht({
+ HydrationBoundary: () => xae,
+ IsRestoringProvider: () => Sae,
+ QueryClientContext: () => nw,
+ QueryClientProvider: () => iw,
+ QueryErrorResetBoundary: () => Cae,
+ infiniteQueryOptions: () => Aae,
+ mutationOptions: () => Nae,
+ queryOptions: () => kae,
+ useInfiniteQuery: () => Cw,
+ useIsFetching: () => jae,
+ useIsMutating: () => Mae,
+ useIsRestoring: () => ow,
+ useMutation: () => Sw,
+ useMutationState: () => xw,
+ usePrefetchInfiniteQuery: () => Oae,
+ usePrefetchQuery: () => Dae,
+ useQueries: () => _w,
+ useQuery: () => yw,
+ useQueryClient: () => rw,
+ useQueryErrorResetBoundary: () => lw,
+ useSuspenseInfiniteQuery: () => Tae,
+ useSuspenseQueries: () => Eae,
+ useSuspenseQuery: () => wae
});
-import * as Mae from "/dist/peach-ui.js";
-_t(Ew, Mae);
+import * as Pae from "/dist/peach-ui.js";
+_t(ww, Pae);
/* istanbul ignore file */
//#endregion
//#region src/react/feed-new/feed-new-row.tsx
-function Dw({ feedNew: e, host: t, wire: n, act: r, settled: i }) {
+function Tw({ feedNew: e, host: t, wire: n, act: r, settled: i }) {
let a = (0, B.useRef)(null), o = e?.items.length ? e.html : "";
(0, B.useLayoutEffect)(() => {
t.removeAttribute("aria-busy"), t.hidden = !o, e && i?.(!!o);
@@ -28760,49 +28760,49 @@ function Dw({ feedNew: e, host: t, wire: n, act: r, settled: i }) {
}
//#endregion
//#region src/react/feed-new/feed-new-page.tsx
-function Nae({ host: e, revision: t, helpers: n, actions: r }) {
- let i = xw(nw(null, n.feedRowHtml)), a = (0, B.useRef)(t);
+function Fae({ host: e, revision: t, helpers: n, actions: r }) {
+ let i = yw(ew(null, n.feedRowHtml)), a = (0, B.useRef)(t);
return (0, B.useEffect)(() => {
- a.current !== t && (a.current = t, z.invalidateQueries({ queryKey: tw(null) }));
- }, [t]), (0, Dt.createPortal)(/* @__PURE__ */ (0, H.jsx)(Dw, {
+ a.current !== t && (a.current = t, z.invalidateQueries({ queryKey: $C(null) }));
+ }, [t]), (0, Dt.createPortal)(/* @__PURE__ */ (0, H.jsx)(Tw, {
feedNew: i.data ?? null,
host: e,
wire: n.wireFeedRow,
- act: rw,
+ act: tw,
settled: r.settled
}), e);
}
//#endregion
//#region src/react/library-processing/library-processing.ts
-var Ow = "/api/library-processing", kw = ["library-processing"], Aw = (e) => K(Ow, e);
-async function jw(e) {
+var Ew = "/api/library-processing", Dw = ["library-processing"], Ow = (e) => K(Ew, e);
+async function kw(e) {
await z.fetchQuery({
- queryKey: kw,
- queryFn: () => Aw(e)
+ queryKey: Dw,
+ queryFn: () => Ow(e)
});
}
-var Pae = 2e3, Fae = 1e4, Mw = "连接中断,正在重新读取处理进度";
-function Iae(e, t) {
- return e?.status === "running" ? Pae : t ? Fae : !1;
+var Iae = 2e3, Lae = 1e4, Aw = "连接中断,正在重新读取处理进度";
+function Rae(e, t) {
+ return e?.status === "running" ? Iae : t ? Lae : !1;
}
-var Lae = {
+var zae = {
reading_local: "读取本地资料",
querying_metadata: "查询外部资料",
fetching_cover: "采集缺失封面",
writing_candidates: "保存资料候选"
-}, Nw = {
+}, jw = {
querying_metadata: "没有资料",
fetching_cover: "没有封面"
};
-function Rae(e) {
- let t = Object.entries(e).filter(([e, t]) => Nw[e] && t > 0).map(([e, t]) => `${Nw[e]} ${t} 部`);
+function Bae(e) {
+ let t = Object.entries(e).filter(([e, t]) => jw[e] && t > 0).map(([e, t]) => `${jw[e]} ${t} 部`);
return t.length ? `外部来源${t.join("、")},7 天内不再问。` : "";
}
-function Pw(e) {
- let t = Lae[e.current_action || ""] || e.stage || "正在处理", n = e.waited_seconds ? ` · 已等待 ${e.waited_seconds} 秒` : "";
+function Mw(e) {
+ let t = zae[e.current_action || ""] || e.stage || "正在处理", n = e.waited_seconds ? ` · 已等待 ${e.waited_seconds} 秒` : "";
return e.current_asset_name ? `当前:${e.current_asset_name} · ${t}${n}` : t + n;
}
-function zae(e) {
+function Vae(e) {
let t = e.issue_preview || [];
return t.length ? {
label: e.issues_truncated ? `问题清单:共 ${e.issue_count || 0} 项,展开查看前 ${t.length} 项` : `问题清单:共 ${e.issue_count || 0} 项`,
@@ -28816,21 +28816,21 @@ function zae(e) {
log: e.issues_log || ""
} : null;
}
-var Fw = "peach.library-processing.announced", Bae = 120;
-function Vae(e, t, n) {
+var Nw = "peach.library-processing.announced", Hae = 120;
+function Uae(e, t, n) {
if (e.status !== "complete") return;
- let r = !!e.job_id && !!e.completed_at && Date.now() / 1e3 - e.completed_at < Bae;
+ let r = !!e.job_id && !!e.completed_at && Date.now() / 1e3 - e.completed_at < Hae;
if (!(!n && !r)) {
try {
- if (e.job_id && localStorage.getItem(Fw) === e.job_id) return;
- e.job_id && localStorage.setItem(Fw, e.job_id);
+ if (e.job_id && localStorage.getItem(Nw) === e.job_id) return;
+ e.job_id && localStorage.setItem(Nw, e.job_id);
} catch {}
t(`扫描与资料采集已完成:识别 ${e.identified || 0} 个番号,整理 ${e.candidates || 0} 组资料候选,自动落库 ${e.auto_applied || 0} 条`);
}
}
//#endregion
//#region node_modules/@remixicon/react/index.mjs
-var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+var Wae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -28838,7 +28838,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M11 11V5H13V11H19V13H13V19H11V13H5V11H11Z" })), Uae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M11 11V5H13V11H19V13H13V19H11V13H5V11H11Z" })), Gae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -28846,7 +28846,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M13.0001 16.1716L18.3641 10.8076L19.7783 12.2218L12.0001 20L4.22192 12.2218L5.63614 10.8076L11.0001 16.1716V4H13.0001V16.1716Z" })), Iw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M13.0001 16.1716L18.3641 10.8076L19.7783 12.2218L12.0001 20L4.22192 12.2218L5.63614 10.8076L11.0001 16.1716V4H13.0001V16.1716Z" })), Pw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -28854,7 +28854,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z" })), Lw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z" })), Fw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -28862,7 +28862,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M16.1716 10.9999L10.8076 5.63589L12.2218 4.22168L20 11.9999L12.2218 19.778L10.8076 18.3638L16.1716 12.9999H4V10.9999H16.1716Z" })), Rw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M16.1716 10.9999L10.8076 5.63589L12.2218 4.22168L20 11.9999L12.2218 19.778L10.8076 18.3638L16.1716 12.9999H4V10.9999H16.1716Z" })), Iw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -28870,7 +28870,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z" })), Wae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z" })), Kae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -28878,7 +28878,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M13.0001 7.82843V20H11.0001V7.82843L5.63614 13.1924L4.22192 11.7782L12.0001 4L19.7783 11.7782L18.3641 13.1924L13.0001 7.82843Z" })), zw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M13.0001 7.82843V20H11.0001V7.82843L5.63614 13.1924L4.22192 11.7782L12.0001 4L19.7783 11.7782L18.3641 13.1924L13.0001 7.82843Z" })), Lw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -28886,7 +28886,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M11.9999 10.8284L7.0502 15.7782L5.63599 14.364L11.9999 8L18.3639 14.364L16.9497 15.7782L11.9999 10.8284Z" })), Bw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M11.9999 10.8284L7.0502 15.7782L5.63599 14.364L11.9999 8L18.3639 14.364L16.9497 15.7782L11.9999 10.8284Z" })), Rw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -28894,7 +28894,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M11.602 13.7599L13.014 15.1719L21.4795 6.7063L22.8938 8.12051L13.014 18.0003L6.65 11.6363L8.06421 10.2221L10.189 12.3469L11.6025 13.7594L11.602 13.7599ZM11.6037 10.9322L16.5563 5.97949L17.9666 7.38977L13.014 12.3424L11.6037 10.9322ZM8.77698 16.5873L7.36396 18.0003L1 11.6363L2.41421 10.2221L3.82723 11.6352L3.82604 11.6363L8.77698 16.5873Z" })), Gae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M11.602 13.7599L13.014 15.1719L21.4795 6.7063L22.8938 8.12051L13.014 18.0003L6.65 11.6363L8.06421 10.2221L10.189 12.3469L11.6025 13.7594L11.602 13.7599ZM11.6037 10.9322L16.5563 5.97949L17.9666 7.38977L13.014 12.3424L11.6037 10.9322ZM8.77698 16.5873L7.36396 18.0003L1 11.6363L2.41421 10.2221L3.82723 11.6352L3.82604 11.6363L8.77698 16.5873Z" })), qae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -28902,7 +28902,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12ZM12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM17.4571 9.45711L16.0429 8.04289L11 13.0858L8.20711 10.2929L6.79289 11.7071L11 15.9142L17.4571 9.45711Z" })), Vw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12ZM12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM17.4571 9.45711L16.0429 8.04289L11 13.0858L8.20711 10.2929L6.79289 11.7071L11 15.9142L17.4571 9.45711Z" })), zw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -28910,7 +28910,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M11.9997 10.5865L16.9495 5.63672L18.3637 7.05093L13.4139 12.0007L18.3637 16.9504L16.9495 18.3646L11.9997 13.4149L7.04996 18.3646L5.63574 16.9504L10.5855 12.0007L5.63574 7.05093L7.04996 5.63672L11.9997 10.5865Z" })), Hw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M11.9997 10.5865L16.9495 5.63672L18.3637 7.05093L13.4139 12.0007L18.3637 16.9504L16.9495 18.3646L11.9997 13.4149L7.04996 18.3646L5.63574 16.9504L10.5855 12.0007L5.63574 7.05093L7.04996 5.63672L11.9997 10.5865Z" })), Bw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -28918,7 +28918,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM15.5 8.5L13.5 13.5L8.5 15.5L10.5 10.5L15.5 8.5Z" })), Uw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM15.5 8.5L13.5 13.5L8.5 15.5L10.5 10.5L15.5 8.5Z" })), Vw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -28926,7 +28926,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M5 12.5C5 12.8134 5.46101 13.3584 6.53047 13.8931C7.91405 14.5849 9.87677 15 12 15C14.1232 15 16.0859 14.5849 17.4695 13.8931C18.539 13.3584 19 12.8134 19 12.5V10.3287C17.35 11.3482 14.8273 12 12 12C9.17273 12 6.64996 11.3482 5 10.3287V12.5ZM19 15.3287C17.35 16.3482 14.8273 17 12 17C9.17273 17 6.64996 16.3482 5 15.3287V17.5C5 17.8134 5.46101 18.3584 6.53047 18.8931C7.91405 19.5849 9.87677 20 12 20C14.1232 20 16.0859 19.5849 17.4695 18.8931C18.539 18.3584 19 17.8134 19 17.5V15.3287ZM3 17.5V7.5C3 5.01472 7.02944 3 12 3C16.9706 3 21 5.01472 21 7.5V17.5C21 19.9853 16.9706 22 12 22C7.02944 22 3 19.9853 3 17.5ZM12 10C14.1232 10 16.0859 9.58492 17.4695 8.89313C18.539 8.3584 19 7.81342 19 7.5C19 7.18658 18.539 6.6416 17.4695 6.10687C16.0859 5.41508 14.1232 5 12 5C9.87677 5 7.91405 5.41508 6.53047 6.10687C5.46101 6.6416 5 7.18658 5 7.5C5 7.81342 5.46101 8.3584 6.53047 8.89313C7.91405 9.58492 9.87677 10 12 10Z" })), Ww = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M5 12.5C5 12.8134 5.46101 13.3584 6.53047 13.8931C7.91405 14.5849 9.87677 15 12 15C14.1232 15 16.0859 14.5849 17.4695 13.8931C18.539 13.3584 19 12.8134 19 12.5V10.3287C17.35 11.3482 14.8273 12 12 12C9.17273 12 6.64996 11.3482 5 10.3287V12.5ZM19 15.3287C17.35 16.3482 14.8273 17 12 17C9.17273 17 6.64996 16.3482 5 15.3287V17.5C5 17.8134 5.46101 18.3584 6.53047 18.8931C7.91405 19.5849 9.87677 20 12 20C14.1232 20 16.0859 19.5849 17.4695 18.8931C18.539 18.3584 19 17.8134 19 17.5V15.3287ZM3 17.5V7.5C3 5.01472 7.02944 3 12 3C16.9706 3 21 5.01472 21 7.5V17.5C21 19.9853 16.9706 22 12 22C7.02944 22 3 19.9853 3 17.5ZM12 10C14.1232 10 16.0859 9.58492 17.4695 8.89313C18.539 8.3584 19 7.81342 19 7.5C19 7.18658 18.539 6.6416 17.4695 6.10687C16.0859 5.41508 14.1232 5 12 5C9.87677 5 7.91405 5.41508 6.53047 6.10687C5.46101 6.6416 5 7.18658 5 7.5C5 7.81342 5.46101 8.3584 6.53047 8.89313C7.91405 9.58492 9.87677 10 12 10Z" })), Hw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -28934,7 +28934,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M17 6H22V8H20V21C20 21.5523 19.5523 22 19 22H5C4.44772 22 4 21.5523 4 21V8H2V6H7V3C7 2.44772 7.44772 2 8 2H16C16.5523 2 17 2.44772 17 3V6ZM18 8H6V20H18V8ZM9 11H11V17H9V11ZM13 11H15V17H13V11ZM9 4V6H15V4H9Z" })), Kae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M17 6H22V8H20V21C20 21.5523 19.5523 22 19 22H5C4.44772 22 4 21.5523 4 21V8H2V6H7V3C7 2.44772 7.44772 2 8 2H16C16.5523 2 17 2.44772 17 3V6ZM18 8H6V20H18V8ZM9 11H11V17H9V11ZM13 11H15V17H13V11ZM9 4V6H15V4H9Z" })), Jae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -28942,7 +28942,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 15H13V17H11V15ZM11 7H13V13H11V7Z" })), Gw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 15H13V17H11V15ZM11 7H13V13H11V7Z" })), Uw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -28950,7 +28950,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M10 6V8H5V19H16V14H18V20C18 20.5523 17.5523 21 17 21H4C3.44772 21 3 20.5523 3 20V7C3 6.44772 3.44772 6 4 6H10ZM21 3V11H19L18.9999 6.413L11.2071 14.2071L9.79289 12.7929L17.5849 5H13V3H21Z" })), Kw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M10 6V8H5V19H16V14H18V20C18 20.5523 17.5523 21 17 21H4C3.44772 21 3 20.5523 3 20V7C3 6.44772 3.44772 6 4 6H10ZM21 3V11H19L18.9999 6.413L11.2071 14.2071L9.79289 12.7929L17.5849 5H13V3H21Z" })), Ww = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -28958,7 +28958,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M12.0003 3C17.3924 3 21.8784 6.87976 22.8189 12C21.8784 17.1202 17.3924 21 12.0003 21C6.60812 21 2.12215 17.1202 1.18164 12C2.12215 6.87976 6.60812 3 12.0003 3ZM12.0003 19C16.2359 19 19.8603 16.052 20.7777 12C19.8603 7.94803 16.2359 5 12.0003 5C7.7646 5 4.14022 7.94803 3.22278 12C4.14022 16.052 7.7646 19 12.0003 19ZM12.0003 16.5C9.51498 16.5 7.50026 14.4853 7.50026 12C7.50026 9.51472 9.51498 7.5 12.0003 7.5C14.4855 7.5 16.5003 9.51472 16.5003 12C16.5003 14.4853 14.4855 16.5 12.0003 16.5ZM12.0003 14.5C13.381 14.5 14.5003 13.3807 14.5003 12C14.5003 10.6193 13.381 9.5 12.0003 9.5C10.6196 9.5 9.50026 10.6193 9.50026 12C9.50026 13.3807 10.6196 14.5 12.0003 14.5Z" })), qae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M12.0003 3C17.3924 3 21.8784 6.87976 22.8189 12C21.8784 17.1202 17.3924 21 12.0003 21C6.60812 21 2.12215 17.1202 1.18164 12C2.12215 6.87976 6.60812 3 12.0003 3ZM12.0003 19C16.2359 19 19.8603 16.052 20.7777 12C19.8603 7.94803 16.2359 5 12.0003 5C7.7646 5 4.14022 7.94803 3.22278 12C4.14022 16.052 7.7646 19 12.0003 19ZM12.0003 16.5C9.51498 16.5 7.50026 14.4853 7.50026 12C7.50026 9.51472 9.51498 7.5 12.0003 7.5C14.4855 7.5 16.5003 9.51472 16.5003 12C16.5003 14.4853 14.4855 16.5 12.0003 16.5ZM12.0003 14.5C13.381 14.5 14.5003 13.3807 14.5003 12C14.5003 10.6193 13.381 9.5 12.0003 9.5C10.6196 9.5 9.50026 10.6193 9.50026 12C9.50026 13.3807 10.6196 14.5 12.0003 14.5Z" })), Yae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -28966,7 +28966,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M10 18H14V16H10V18ZM3 6V8H21V6H3ZM6 13H18V11H6V13Z" })), Jae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M10 18H14V16H10V18ZM3 6V8H21V6H3ZM6 13H18V11H6V13Z" })), Xae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -28974,7 +28974,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM9.71002 19.6674C8.74743 17.6259 8.15732 15.3742 8.02731 13H4.06189C4.458 16.1765 6.71639 18.7747 9.71002 19.6674ZM10.0307 13C10.1811 15.4388 10.8778 17.7297 12 19.752C13.1222 17.7297 13.8189 15.4388 13.9693 13H10.0307ZM19.9381 13H15.9727C15.8427 15.3742 15.2526 17.6259 14.29 19.6674C17.2836 18.7747 19.542 16.1765 19.9381 13ZM4.06189 11H8.02731C8.15732 8.62577 8.74743 6.37407 9.71002 4.33256C6.71639 5.22533 4.458 7.8235 4.06189 11ZM10.0307 11H13.9693C13.8189 8.56122 13.1222 6.27025 12 4.24799C10.8778 6.27025 10.1811 8.56122 10.0307 11ZM14.29 4.33256C15.2526 6.37407 15.8427 8.62577 15.9727 11H19.9381C19.542 7.8235 17.2836 5.22533 14.29 4.33256Z" })), qw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM9.71002 19.6674C8.74743 17.6259 8.15732 15.3742 8.02731 13H4.06189C4.458 16.1765 6.71639 18.7747 9.71002 19.6674ZM10.0307 13C10.1811 15.4388 10.8778 17.7297 12 19.752C13.1222 17.7297 13.8189 15.4388 13.9693 13H10.0307ZM19.9381 13H15.9727C15.8427 15.3742 15.2526 17.6259 14.29 19.6674C17.2836 18.7747 19.542 16.1765 19.9381 13ZM4.06189 11H8.02731C8.15732 8.62577 8.74743 6.37407 9.71002 4.33256C6.71639 5.22533 4.458 7.8235 4.06189 11ZM10.0307 11H13.9693C13.8189 8.56122 13.1222 6.27025 12 4.24799C10.8778 6.27025 10.1811 8.56122 10.0307 11ZM14.29 4.33256C15.2526 6.37407 15.8427 8.62577 15.9727 11H19.9381C19.542 7.8235 17.2836 5.22533 14.29 4.33256Z" })), Gw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -28982,7 +28982,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M5 14H19V4H5V14ZM5 16V20H19V16H5ZM4 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22H4C3.44772 22 3 21.5523 3 21V3C3 2.44772 3.44772 2 4 2ZM15 17H17V19H15V17Z" })), Jw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M5 14H19V4H5V14ZM5 16V20H19V16H5ZM4 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22H4C3.44772 22 3 21.5523 3 21V3C3 2.44772 3.44772 2 4 2ZM15 17H17V19H15V17Z" })), Kw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -28990,7 +28990,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12H4C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C9.25022 4 6.82447 5.38734 5.38451 7.50024L8 7.5V9.5H2V3.5H4L3.99989 5.99918C5.82434 3.57075 8.72873 2 12 2ZM13 7L12.9998 11.585L16.2426 14.8284L14.8284 16.2426L10.9998 12.413L11 7H13Z" })), Yae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12H4C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C9.25022 4 6.82447 5.38734 5.38451 7.50024L8 7.5V9.5H2V3.5H4L3.99989 5.99918C5.82434 3.57075 8.72873 2 12 2ZM13 7L12.9998 11.585L16.2426 14.8284L14.8284 16.2426L10.9998 12.413L11 7H13Z" })), Zae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -28998,7 +28998,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M2.9918 21C2.44405 21 2 20.5551 2 20.0066V3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918ZM20 15V5H4V19L14 9L20 15ZM20 17.8284L14 11.8284L6.82843 19H20V17.8284ZM8 11C6.89543 11 6 10.1046 6 9C6 7.89543 6.89543 7 8 7C9.10457 7 10 7.89543 10 9C10 10.1046 9.10457 11 8 11Z" })), Xae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M2.9918 21C2.44405 21 2 20.5551 2 20.0066V3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918ZM20 15V5H4V19L14 9L20 15ZM20 17.8284L14 11.8284L6.82843 19H20V17.8284ZM8 11C6.89543 11 6 10.1046 6 9C6 7.89543 6.89543 7 8 7C9.10457 7 10 7.89543 10 9C10 10.1046 9.10457 11 8 11Z" })), Qae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -29006,7 +29006,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM11 11V17H13V11H11ZM11 7V9H13V7H11Z" })), Zae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM11 11V17H13V11H11ZM11 7V9H13V7H11Z" })), $ae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -29014,7 +29014,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 7H13V9H11V7ZM11 11H13V17H11V11Z" })), Qae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 7H13V9H11V7ZM11 11H13V17H11V11Z" })), eoe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -29022,7 +29022,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M10.7577 11.8281L18.6066 3.97919L20.0208 5.3934L18.6066 6.80761L21.0815 9.28249L19.6673 10.6967L17.1924 8.22183L15.7782 9.63604L17.8995 11.7574L16.4853 13.1716L14.364 11.0503L12.1719 13.2423C13.4581 15.1837 13.246 17.8251 11.5355 19.5355C9.58291 21.4882 6.41709 21.4882 4.46447 19.5355C2.51184 17.5829 2.51184 14.4171 4.46447 12.4645C6.17493 10.754 8.81633 10.5419 10.7577 11.8281ZM10.1213 18.1213C11.2929 16.9497 11.2929 15.0503 10.1213 13.8787C8.94975 12.7071 7.05025 12.7071 5.87868 13.8787C4.70711 15.0503 4.70711 16.9497 5.87868 18.1213C7.05025 19.2929 8.94975 19.2929 10.1213 18.1213Z" })), $ae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M10.7577 11.8281L18.6066 3.97919L20.0208 5.3934L18.6066 6.80761L21.0815 9.28249L19.6673 10.6967L17.1924 8.22183L15.7782 9.63604L17.8995 11.7574L16.4853 13.1716L14.364 11.0503L12.1719 13.2423C13.4581 15.1837 13.246 17.8251 11.5355 19.5355C9.58291 21.4882 6.41709 21.4882 4.46447 19.5355C2.51184 17.5829 2.51184 14.4171 4.46447 12.4645C6.17493 10.754 8.81633 10.5419 10.7577 11.8281ZM10.1213 18.1213C11.2929 16.9497 11.2929 15.0503 10.1213 13.8787C8.94975 12.7071 7.05025 12.7071 5.87868 13.8787C4.70711 15.0503 4.70711 16.9497 5.87868 18.1213C7.05025 19.2929 8.94975 19.2929 10.1213 18.1213Z" })), toe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -29030,7 +29030,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M21 3C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H21ZM11 13H4V19H11V13ZM20 13H13V19H20V13ZM11 5H4V11H11V5ZM20 5H13V11H20V5Z" })), eoe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M21 3C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H21ZM11 13H4V19H11V13ZM20 13H13V19H20V13ZM11 5H4V11H11V5ZM20 5H13V11H20V5Z" })), noe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -29038,7 +29038,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M16.3944 12.0001L10 7.7371V16.263L16.3944 12.0001ZM19.376 12.4161L8.77735 19.4818C8.54759 19.635 8.23715 19.5729 8.08397 19.3432C8.02922 19.261 8 19.1645 8 19.0658V4.93433C8 4.65818 8.22386 4.43433 8.5 4.43433C8.59871 4.43433 8.69522 4.46355 8.77735 4.5183L19.376 11.584C19.6057 11.7372 19.6678 12.0477 19.5146 12.2774C19.478 12.3323 19.4309 12.3795 19.376 12.4161Z" })), Yw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M16.3944 12.0001L10 7.7371V16.263L16.3944 12.0001ZM19.376 12.4161L8.77735 19.4818C8.54759 19.635 8.23715 19.5729 8.08397 19.3432C8.02922 19.261 8 19.1645 8 19.0658V4.93433C8 4.65818 8.22386 4.43433 8.5 4.43433C8.59871 4.43433 8.69522 4.46355 8.77735 4.5183L19.376 11.584C19.6057 11.7372 19.6678 12.0477 19.5146 12.2774C19.478 12.3323 19.4309 12.3795 19.376 12.4161Z" })), qw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -29046,7 +29046,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M10.9042 2.10025L20.8037 3.51446L22.2179 13.414L13.0255 22.6063C12.635 22.9969 12.0019 22.9969 11.6113 22.6063L1.71184 12.7069C1.32131 12.3163 1.32131 11.6832 1.71184 11.2926L10.9042 2.10025ZM11.6113 4.22157L3.83316 11.9997L12.3184 20.485L20.0966 12.7069L19.036 5.28223L11.6113 4.22157ZM13.7327 10.5855C12.9516 9.80448 12.9516 8.53815 13.7327 7.7571C14.5137 6.97606 15.78 6.97606 16.5611 7.7571C17.3421 8.53815 17.3421 9.80448 16.5611 10.5855C15.78 11.3666 14.5137 11.3666 13.7327 10.5855Z" })), Xw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M10.9042 2.10025L20.8037 3.51446L22.2179 13.414L13.0255 22.6063C12.635 22.9969 12.0019 22.9969 11.6113 22.6063L1.71184 12.7069C1.32131 12.3163 1.32131 11.6832 1.71184 11.2926L10.9042 2.10025ZM11.6113 4.22157L3.83316 11.9997L12.3184 20.485L20.0966 12.7069L19.036 5.28223L11.6113 4.22157ZM13.7327 10.5855C12.9516 9.80448 12.9516 8.53815 13.7327 7.7571C14.5137 6.97606 15.78 6.97606 16.5611 7.7571C17.3421 8.53815 17.3421 9.80448 16.5611 10.5855C15.78 11.3666 14.5137 11.3666 13.7327 10.5855Z" })), Jw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -29054,7 +29054,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M5.46257 4.43262C7.21556 2.91688 9.5007 2 12 2C17.5228 2 22 6.47715 22 12C22 14.1361 21.3302 16.1158 20.1892 17.7406L17 12H20C20 7.58172 16.4183 4 12 4C9.84982 4 7.89777 4.84827 6.46023 6.22842L5.46257 4.43262ZM18.5374 19.5674C16.7844 21.0831 14.4993 22 12 22C6.47715 22 2 17.5228 2 12C2 9.86386 2.66979 7.88416 3.8108 6.25944L7 12H4C4 16.4183 7.58172 20 12 20C14.1502 20 16.1022 19.1517 17.5398 17.7716L18.5374 19.5674Z" })), Zw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M5.46257 4.43262C7.21556 2.91688 9.5007 2 12 2C17.5228 2 22 6.47715 22 12C22 14.1361 21.3302 16.1158 20.1892 17.7406L17 12H20C20 7.58172 16.4183 4 12 4C9.84982 4 7.89777 4.84827 6.46023 6.22842L5.46257 4.43262ZM18.5374 19.5674C16.7844 21.0831 14.4993 22 12 22C6.47715 22 2 17.5228 2 12C2 9.86386 2.66979 7.88416 3.8108 6.25944L7 12H4C4 16.4183 7.58172 20 12 20C14.1502 20 16.1022 19.1517 17.5398 17.7716L18.5374 19.5674Z" })), Yw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -29062,7 +29062,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M3 17C5.20914 17 7 18.7909 7 21H3V17ZM3 10C9.07513 10 14 14.9249 14 21H12C12 16.0294 7.97056 12 3 12V10ZM3 3C12.9411 3 21 11.0589 21 21H19C19 12.1634 11.8366 5 3 5V3Z" })), Qw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M3 17C5.20914 17 7 18.7909 7 21H3V17ZM3 10C9.07513 10 14 14.9249 14 21H12C12 16.0294 7.97056 12 3 12V10ZM3 3C12.9411 3 21 11.0589 21 21H19C19 12.1634 11.8366 5 3 5V3Z" })), Xw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -29070,7 +29070,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M18.031 16.6168L22.3137 20.8995L20.8995 22.3137L16.6168 18.031C15.0769 19.263 13.124 20 11 20C6.032 20 2 15.968 2 11C2 6.032 6.032 2 11 2C15.968 2 20 6.032 20 11C20 13.124 19.263 15.0769 18.031 16.6168ZM16.0247 15.8748C17.2475 14.6146 18 12.8956 18 11C18 7.1325 14.8675 4 11 4C7.1325 4 4 7.1325 4 11C4 14.8675 7.1325 18 11 18C12.8956 18 14.6146 17.2475 15.8748 16.0247L16.0247 15.8748Z" })), toe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M18.031 16.6168L22.3137 20.8995L20.8995 22.3137L16.6168 18.031C15.0769 19.263 13.124 20 11 20C6.032 20 2 15.968 2 11C2 6.032 6.032 2 11 2C15.968 2 20 6.032 20 11C20 13.124 19.263 15.0769 18.031 16.6168ZM16.0247 15.8748C17.2475 14.6146 18 12.8956 18 11C18 7.1325 14.8675 4 11 4C7.1325 4 4 7.1325 4 11C4 14.8675 7.1325 18 11 18C12.8956 18 14.6146 17.2475 15.8748 16.0247L16.0247 15.8748Z" })), roe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -29078,7 +29078,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M12.0006 18.26L4.94715 22.2082L6.52248 14.2799L0.587891 8.7918L8.61493 7.84006L12.0006 0.5L15.3862 7.84006L23.4132 8.7918L17.4787 14.2799L19.054 22.2082L12.0006 18.26ZM12.0006 15.968L16.2473 18.3451L15.2988 13.5717L18.8719 10.2674L14.039 9.69434L12.0006 5.27502L9.96214 9.69434L5.12921 10.2674L8.70231 13.5717L7.75383 18.3451L12.0006 15.968Z" })), noe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M12.0006 18.26L4.94715 22.2082L6.52248 14.2799L0.587891 8.7918L8.61493 7.84006L12.0006 0.5L15.3862 7.84006L23.4132 8.7918L17.4787 14.2799L19.054 22.2082L12.0006 18.26ZM12.0006 15.968L16.2473 18.3451L15.2988 13.5717L18.8719 10.2674L14.039 9.69434L12.0006 5.27502L9.96214 9.69434L5.12921 10.2674L8.70231 13.5717L7.75383 18.3451L12.0006 15.968Z" })), ioe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -29086,7 +29086,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M4 8H20V5H4V8ZM14 19V10H10V19H14ZM16 19H20V10H16V19ZM8 19V10H4V19H8ZM3 3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3Z" })), roe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M4 8H20V5H4V8ZM14 19V10H10V19H14ZM16 19H20V10H16V19ZM8 19V10H4V19H8ZM3 3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3Z" })), aoe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -29094,7 +29094,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M9.40017 16H3C1.89543 16 1 15.1046 1 14V11.8957C1 11.6344 1.05118 11.3757 1.15064 11.1342L4.24501 3.61925C4.3993 3.24455 4.76447 3 5.16969 3H22C22.5523 3 23 3.44772 23 4V14C23 14.5523 22.5523 15 22 15H18.5182C18.1932 15 17.8886 15.1579 17.7012 15.4233L12.2478 23.149C12.1053 23.3508 11.8367 23.4184 11.6157 23.3078L9.80163 22.4008C8.74998 21.875 8.20687 20.6874 8.49694 19.548L9.40017 16ZM17 13.4125V5H5.83939L3 11.8957V14H9.40017C10.7049 14 11.6602 15.229 11.3384 16.4934L10.4351 20.0414C10.3771 20.2693 10.4857 20.5068 10.6961 20.612L11.3572 20.9425L16.0673 14.27C16.3172 13.9159 16.6366 13.6257 17 13.4125ZM19 13H21V5H19V13Z" })), ioe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M9.40017 16H3C1.89543 16 1 15.1046 1 14V11.8957C1 11.6344 1.05118 11.3757 1.15064 11.1342L4.24501 3.61925C4.3993 3.24455 4.76447 3 5.16969 3H22C22.5523 3 23 3.44772 23 4V14C23 14.5523 22.5523 15 22 15H18.5182C18.1932 15 17.8886 15.1579 17.7012 15.4233L12.2478 23.149C12.1053 23.3508 11.8367 23.4184 11.6157 23.3078L9.80163 22.4008C8.74998 21.875 8.20687 20.6874 8.49694 19.548L9.40017 16ZM17 13.4125V5H5.83939L3 11.8957V14H9.40017C10.7049 14 11.6602 15.229 11.3384 16.4934L10.4351 20.0414C10.3771 20.2693 10.4857 20.5068 10.6961 20.612L11.3572 20.9425L16.0673 14.27C16.3172 13.9159 16.6366 13.6257 17 13.4125ZM19 13H21V5H19V13Z" })), ooe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -29102,7 +29102,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M14.5998 8.00033H21C22.1046 8.00033 23 8.89576 23 10.0003V12.1047C23 12.3659 22.9488 12.6246 22.8494 12.8662L19.755 20.3811C19.6007 20.7558 19.2355 21.0003 18.8303 21.0003H2C1.44772 21.0003 1 20.5526 1 20.0003V10.0003C1 9.44804 1.44772 9.00033 2 9.00033H5.48184C5.80677 9.00033 6.11143 8.84246 6.29881 8.57701L11.7522 0.851355C11.8947 0.649486 12.1633 0.581978 12.3843 0.692483L14.1984 1.59951C15.25 2.12534 15.7931 3.31292 15.5031 4.45235L14.5998 8.00033ZM7 10.5878V19.0003H18.1606L21 12.1047V10.0003H14.5998C13.2951 10.0003 12.3398 8.77128 12.6616 7.50691L13.5649 3.95894C13.6229 3.73105 13.5143 3.49353 13.3039 3.38837L12.6428 3.0578L7.93275 9.73038C7.68285 10.0844 7.36341 10.3746 7 10.5878ZM5 11.0003H3V19.0003H5V11.0003Z" })), $w = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M14.5998 8.00033H21C22.1046 8.00033 23 8.89576 23 10.0003V12.1047C23 12.3659 22.9488 12.6246 22.8494 12.8662L19.755 20.3811C19.6007 20.7558 19.2355 21.0003 18.8303 21.0003H2C1.44772 21.0003 1 20.5526 1 20.0003V10.0003C1 9.44804 1.44772 9.00033 2 9.00033H5.48184C5.80677 9.00033 6.11143 8.84246 6.29881 8.57701L11.7522 0.851355C11.8947 0.649486 12.1633 0.581978 12.3843 0.692483L14.1984 1.59951C15.25 2.12534 15.7931 3.31292 15.5031 4.45235L14.5998 8.00033ZM7 10.5878V19.0003H18.1606L21 12.1047V10.0003H14.5998C13.2951 10.0003 12.3398 8.77128 12.6616 7.50691L13.5649 3.95894C13.6229 3.73105 13.5143 3.49353 13.3039 3.38837L12.6428 3.0578L7.93275 9.73038C7.68285 10.0844 7.36341 10.3746 7 10.5878ZM5 11.0003H3V19.0003H5V11.0003Z" })), Zw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -29110,7 +29110,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M3 19H21V21H3V19ZM13 5.82843V17H11V5.82843L4.92893 11.8995L3.51472 10.4853L12 2L20.4853 10.4853L19.0711 11.8995L13 5.82843Z" })), eT = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M3 19H21V21H3V19ZM13 5.82843V17H11V5.82843L4.92893 11.8995L3.51472 10.4853L12 2L20.4853 10.4853L19.0711 11.8995L13 5.82843Z" })), Qw = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -29118,7 +29118,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M4 22C4 17.5817 7.58172 14 12 14C16.4183 14 20 17.5817 20 22H18C18 18.6863 15.3137 16 12 16C8.68629 16 6 18.6863 6 22H4ZM12 13C8.685 13 6 10.315 6 7C6 3.685 8.685 1 12 1C15.315 1 18 3.685 18 7C18 10.315 15.315 13 12 13ZM12 11C14.21 11 16 9.21 16 7C16 4.79 14.21 3 12 3C9.79 3 8 4.79 8 7C8 9.21 9.79 11 12 11Z" })), aoe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M4 22C4 17.5817 7.58172 14 12 14C16.4183 14 20 17.5817 20 22H18C18 18.6863 15.3137 16 12 16C8.68629 16 6 18.6863 6 22H4ZM12 13C8.685 13 6 10.315 6 7C6 3.685 8.685 1 12 1C15.315 1 18 3.685 18 7C18 10.315 15.315 13 12 13ZM12 11C14.21 11 16 9.21 16 7C16 4.79 14.21 3 12 3C9.79 3 8 4.79 8 7C8 9.21 9.79 11 12 11Z" })), soe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -29126,7 +29126,7 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
fill: e,
...r,
className: "remixicon " + (n || "")
-}, B.createElement("path", { d: "M3 3.9934C3 3.44476 3.44495 3 3.9934 3H20.0066C20.5552 3 21 3.44495 21 3.9934V20.0066C21 20.5552 20.5551 21 20.0066 21H3.9934C3.44476 21 3 20.5551 3 20.0066V3.9934ZM5 5V19H19V5H5ZM10.6219 8.41459L15.5008 11.6672C15.6846 11.7897 15.7343 12.0381 15.6117 12.2219C15.5824 12.2658 15.5447 12.3035 15.5008 12.3328L10.6219 15.5854C10.4381 15.708 10.1897 15.6583 10.0672 15.4745C10.0234 15.4088 10 15.3316 10 15.2526V8.74741C10 8.52649 10.1791 8.34741 10.4 8.34741C10.479 8.34741 10.5562 8.37078 10.6219 8.41459Z" })), ooe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
+}, B.createElement("path", { d: "M3 3.9934C3 3.44476 3.44495 3 3.9934 3H20.0066C20.5552 3 21 3.44495 21 3.9934V20.0066C21 20.5552 20.5551 21 20.0066 21H3.9934C3.44476 21 3 20.5551 3 20.0066V3.9934ZM5 5V19H19V5H5ZM10.6219 8.41459L15.5008 11.6672C15.6846 11.7897 15.7343 12.0381 15.6117 12.2219C15.5824 12.2658 15.5447 12.3035 15.5008 12.3328L10.6219 15.5854C10.4381 15.708 10.1897 15.6583 10.0672 15.4745C10.0234 15.4088 10 15.3316 10 15.2526V8.74741C10 8.52649 10.1791 8.34741 10.4 8.34741C10.479 8.34741 10.5562 8.37078 10.6219 8.41459Z" })), coe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -29137,8 +29137,8 @@ var Hae = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => B
}, B.createElement("path", { d: "M14 4.4375C15.3462 4.4375 16.4375 3.34619 16.4375 2H17.5625C17.5625 3.34619 18.6538 4.4375 20 4.4375V5.5625C18.6538 5.5625 17.5625 6.65381 17.5625 8H16.4375C16.4375 6.65381 15.3462 5.5625 14 5.5625V4.4375ZM1 11C4.31371 11 7 8.31371 7 5H9C9 8.31371 11.6863 11 15 11V13C11.6863 13 9 15.6863 9 19H7C7 15.6863 4.31371 13 1 13V11ZM4.87601 12C6.18717 12.7276 7.27243 13.8128 8 15.124 8.72757 13.8128 9.81283 12.7276 11.124 12 9.81283 11.2724 8.72757 10.1872 8 8.87601 7.27243 10.1872 6.18717 11.2724 4.87601 12ZM17.25 14C17.25 15.7949 15.7949 17.25 14 17.25V18.75C15.7949 18.75 17.25 20.2051 17.25 22H18.75C18.75 20.2051 20.2051 18.75 22 18.75V17.25C20.2051 17.25 18.75 15.7949 18.75 14H17.25Z" }));
//#endregion
//#region src/react/components/menu-dialog.tsx
-function tT(e) {
- let t = cC("hover");
+function $w(e) {
+ let t = wC("hover");
return /* @__PURE__ */ (0, H.jsx)(mh, {
...e,
ref: t
@@ -29146,7 +29146,7 @@ function tT(e) {
}
//#endregion
//#region src/react/boardui/components/base/buttons/button.tsx
-var nT = fr({
+var eT = fr({
base: [
"inline-flex items-center justify-center gap-0.5 whitespace-nowrap overflow-hidden",
"font-sans select-none cursor-pointer",
@@ -29205,40 +29205,40 @@ function J({ variant: e = "primary", size: t = "medium", iconOnly: n = !1, leadi
return /* @__PURE__ */ (0, H.jsxs)("button", {
ref: c,
type: s,
- className: dr(nT.base, nT.size[t], nT.variant[e], n && nT.iconOnlySize[t], o),
+ className: dr(eT.base, eT.size[t], eT.variant[e], n && eT.iconOnlySize[t], o),
...l,
children: [
r ? /* @__PURE__ */ (0, H.jsx)(r, {
- className: nT.icon[t],
+ className: eT.icon[t],
"aria-hidden": !0
}) : null,
!n && a != null && /* @__PURE__ */ (0, H.jsx)("span", {
- className: nT.label[t],
+ className: eT.label[t],
children: a
}),
!n && i ? /* @__PURE__ */ (0, H.jsx)(i, {
- className: nT.icon[t],
+ className: eT.icon[t],
"aria-hidden": !0
}) : null
]
});
}
-function rT({ variant: e = "primary", size: t = "medium", iconOnly: n = !1, leadingIcon: r, trailingIcon: i, children: a, className: o, ref: s, ...c }) {
+function tT({ variant: e = "primary", size: t = "medium", iconOnly: n = !1, leadingIcon: r, trailingIcon: i, children: a, className: o, ref: s, ...c }) {
return /* @__PURE__ */ (0, H.jsxs)("a", {
ref: s,
- className: dr(nT.base, nT.size[t], nT.variant[e], n && nT.iconOnlySize[t], o),
+ className: dr(eT.base, eT.size[t], eT.variant[e], n && eT.iconOnlySize[t], o),
...c,
children: [
r ? /* @__PURE__ */ (0, H.jsx)(r, {
- className: nT.icon[t],
+ className: eT.icon[t],
"aria-hidden": !0
}) : null,
!n && a != null && /* @__PURE__ */ (0, H.jsx)("span", {
- className: nT.label[t],
+ className: eT.label[t],
children: a
}),
!n && i ? /* @__PURE__ */ (0, H.jsx)(i, {
- className: nT.icon[t],
+ className: eT.icon[t],
"aria-hidden": !0
}) : null
]
@@ -29246,7 +29246,7 @@ function rT({ variant: e = "primary", size: t = "medium", iconOnly: n = !1, lead
}
//#endregion
//#region src/react/boardui/components/base/buttons/link-button.tsx
-var iT = fr({
+var nT = fr({
base: [
"inline-flex items-center justify-center gap-1 whitespace-nowrap",
"font-sans select-none cursor-pointer rounded-sm",
@@ -29270,15 +29270,15 @@ var iT = fr({
secondary: ["text-text-secondary active:text-text-primary", "disabled:text-text-tertiary aria-disabled:text-text-tertiary"].join(" ")
}
});
-function aT({ variant: e = "primary", size: t = "medium", leadingIcon: n, trailingIcon: r, children: i, className: a, disabled: o = !1, ...s }) {
- let c = dr(iT.base, iT.size[t], iT.variant[e], a), l = /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [
+function rT({ variant: e = "primary", size: t = "medium", leadingIcon: n, trailingIcon: r, children: i, className: a, disabled: o = !1, ...s }) {
+ let c = dr(nT.base, nT.size[t], nT.variant[e], a), l = /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [
n ? /* @__PURE__ */ (0, H.jsx)(n, {
- className: iT.icon[t],
+ className: nT.icon[t],
"aria-hidden": !0
}) : null,
i != null && /* @__PURE__ */ (0, H.jsx)("span", { children: i }),
r ? /* @__PURE__ */ (0, H.jsx)(r, {
- className: iT.icon[t],
+ className: nT.icon[t],
"aria-hidden": !0
}) : null
] });
@@ -29305,7 +29305,7 @@ function aT({ variant: e = "primary", size: t = "medium", leadingIcon: n, traili
}
//#endregion
//#region src/react/boardui/components/base/dropdown/menu-styles.ts
-var oT = [
+var iT = [
"max-w-[calc(100vw-32px)] overflow-y-auto",
"rounded-2xl border border-border-button-default bg-background-primary-default p-2.5 shadow-dropdown",
"transition duration-150 ease-out",
@@ -29313,98 +29313,98 @@ var oT = [
"data-[exiting]:opacity-0 data-[exiting]:scale-95 data-[exiting]:blur-[2px]",
"data-[placement=bottom]:origin-top-left data-[placement=top]:origin-bottom-left",
"data-[placement=left]:origin-right data-[placement=right]:origin-left"
-].join(" "), soe = "w-[266px]", coe = "flex w-full flex-col gap-1 outline-none", sT = ["flex w-full cursor-pointer items-center gap-2 rounded-2lg p-2 text-left", "text-text-primary outline-none transition-colors"].join(" "), cT = "hover:bg-dropdown-item-hover-background focus-visible:bg-dropdown-item-hover-background";
+].join(" "), loe = "w-[266px]", uoe = "flex w-full flex-col gap-1 outline-none", aT = ["flex w-full cursor-pointer items-center gap-2 rounded-2lg p-2 text-left", "text-text-primary outline-none transition-colors"].join(" "), oT = "hover:bg-dropdown-item-hover-background focus-visible:bg-dropdown-item-hover-background";
({
medium: "h-9 rounded-2lg p-2 text-body-medium",
small: "h-8 rounded-lg px-2 py-1.5 text-body-medium"
}).medium;
//#endregion
//#region src/management.ts
-var loe = "扫描媒体文件夹,导入已有资料,采集缺失信息。两段也可以分开跑:新盘刚接上时先只扫描,几万个文件登记完就能用;采集被网络拖住时只重跑采集,不必再扫一遍磁盘。", uoe = "修缺时间戳表(播放卡顿)和缺索引(打不开)的 MP4。常看的片子先修。", doe = "min-w-0", foe = {
+var doe = "扫描媒体文件夹,导入已有资料,采集缺失信息。两段也可以分开跑:新盘刚接上时先只扫描,几万个文件登记完就能用;采集被网络拖住时只重跑采集,不必再扫一遍磁盘。", foe = "修缺时间戳表(播放卡顿)和缺索引(打不开)的 MP4。常看的片子先修。", poe = "min-w-0", moe = {
filled: "bg-background-secondary-default",
outlined: "border border-separator-border bg-background-primary-default",
raised: "bg-background-primary-default"
-}, poe = {
+}, hoe = {
default: "rounded-2xl shadow-card",
chart: "rounded-2-5xl",
surface: "rounded-surface",
plain: "rounded-2xl"
-}, moe = {
+}, goe = {
line: "border border-border-button-default",
soft: "border border-separator-border"
-}, hoe = {
+}, _oe = {
none: "",
default: "p-5"
-}, goe = "cursor-pointer outline-none not-data-selected:hover:bg-card-hover focus-visible:ring-2 focus-visible:ring-border-focus-ring focus-visible:ring-offset-3", _oe = "relative data-selected:bg-background-primary-default data-selected:shadow-none data-selected:after:pointer-events-none data-selected:after:absolute data-selected:after:inset-0 data-selected:after:z-1 data-selected:after:rounded-[inherit] data-selected:after:border-2 data-selected:after:border-border-focus-ring";
-function lT(e = {}) {
+}, voe = "cursor-pointer outline-none not-data-selected:hover:bg-card-hover focus-visible:ring-2 focus-visible:ring-border-focus-ring focus-visible:ring-offset-3", yoe = "relative data-selected:bg-background-primary-default data-selected:shadow-none data-selected:after:pointer-events-none data-selected:after:absolute data-selected:after:inset-0 data-selected:after:z-1 data-selected:after:rounded-[inherit] data-selected:after:border-2 data-selected:after:border-border-focus-ring";
+function sT(e = {}) {
let { variant: t = "filled", padding: n = "default", interactive: r, selectable: i, bordered: a, className: o } = e, s = e.radius ?? (t === "outlined" ? "surface" : "default");
return [
- doe,
- foe[t],
- poe[s],
- hoe[n],
- a ? moe[a] : "",
- r ? goe : "",
- i ? _oe : "",
+ poe,
+ moe[t],
+ hoe[s],
+ _oe[n],
+ a ? goe[a] : "",
+ r ? voe : "",
+ i ? yoe : "",
o ?? ""
].filter(Boolean).join(" ");
}
//#endregion
//#region src/react/components/fieldset.tsx
-var voe = lT({
+var boe = sT({
padding: "none",
bordered: "line",
className: "overflow-hidden"
-}), yoe = {
+}), xoe = {
split: "min-w-0 p-6",
stack: "flex min-h-30 min-w-0 flex-1 flex-col px-5 pt-5 pb-4 max-cleanup-tight:min-h-0 max-cleanup-tight:p-4.5"
-}, boe = {
+}, Soe = {
split: "flex flex-wrap items-center justify-end gap-2 self-stretch p-6 max-[1001px]:justify-start max-[1001px]:pt-0",
stack: "flex min-h-14 flex-wrap items-center justify-end gap-2 border-t border-border-button-default bg-card-footer px-5 py-3 max-cleanup-tight:px-4.5"
-}, xoe = "flex min-h-14 flex-wrap items-center justify-end gap-2 border-t px-5 py-3", Soe = {
+}, Coe = "flex min-h-14 flex-wrap items-center justify-end gap-2 border-t px-5 py-3", woe = {
neutral: "border-border-button-default bg-card-footer",
error: "border-border-error-default bg-background-tertiary-error"
-}, Coe = lT({
+}, Toe = sT({
padding: "none",
radius: "surface",
bordered: "line",
className: "overflow-hidden"
-}), uT = "border-t border-border-button-default p-4 first:border-t-0";
-function dT({ tone: e = "neutral", status: t, children: n }) {
+}), cT = "border-t border-border-button-default p-4 first:border-t-0";
+function lT({ tone: e = "neutral", status: t, children: n }) {
return /* @__PURE__ */ (0, H.jsxs)("div", {
- className: `${xoe} ${Soe[e]}`,
+ className: `${Coe} ${woe[e]}`,
children: [t ? /* @__PURE__ */ (0, H.jsx)("p", {
className: `mr-auto min-w-0 text-caption-1-regular ${e === "error" ? "text-text-error-primary" : "text-text-secondary"}`,
children: t
}) : null, n]
});
}
-function fT({ id: e, children: t }) {
+function uT({ id: e, children: t }) {
return /* @__PURE__ */ (0, H.jsx)("h2", {
id: e,
className: "text-title-2-medium! m-0! text-text-primary",
children: t
});
}
-function pT({ id: e, gap: t = "none", children: n }) {
+function dT({ id: e, gap: t = "none", children: n }) {
return /* @__PURE__ */ (0, H.jsx)("h3", {
id: e,
className: `text-title-2-medium text-text-primary ${t === "medium" ? "mb-3" : t === "small" ? "mb-2" : ""}`,
children: n
});
}
-function mT({ layout: e, label: t, labelledBy: n, id: r, footer: i, children: a, attributes: o }) {
+function fT({ layout: e, label: t, labelledBy: n, id: r, footer: i, children: a, attributes: o }) {
return /* @__PURE__ */ (0, H.jsxs)("section", {
id: r,
"aria-label": t,
"aria-labelledby": n,
...o,
- className: `${voe} ${e === "split" ? "fieldset-split" : "flex flex-col"}`,
+ className: `${boe} ${e === "split" ? "fieldset-split" : "flex flex-col"}`,
children: [/* @__PURE__ */ (0, H.jsx)("div", {
- className: yoe[e],
+ className: xoe[e],
children: a
}), i ? /* @__PURE__ */ (0, H.jsx)("footer", {
- className: boe[e],
+ className: Soe[e],
children: i
}) : null]
});
@@ -29455,7 +29455,7 @@ function Y({ tone: e, title: t, action: n, extra: r, children: i }) {
}
//#endregion
//#region src/react/components/overlay-scrollbar.ts
-function hT() {
+function pT() {
let e = (0, B.useRef)(null);
return (0, B.useEffect)(() => {
t(e.current);
@@ -29463,7 +29463,7 @@ function hT() {
}
//#endregion
//#region src/react/boardui/components/base/buttons/icon-button.tsx
-var gT = fr({
+var mT = fr({
base: [
"relative inline-flex shrink-0 items-center justify-center overflow-visible rounded-2lg",
"bg-background-primary-default text-foreground-icon-primary",
@@ -29484,21 +29484,21 @@ var gT = fr({
small: "size-4 shrink-0"
}
});
-function _T({ icon: e, size: t = "medium", className: n, type: r = "button", ref: i, ...a }) {
+function hT({ icon: e, size: t = "medium", className: n, type: r = "button", ref: i, ...a }) {
return /* @__PURE__ */ (0, H.jsx)("button", {
ref: i,
type: r,
- className: dr(gT.base, gT.size[t], n),
+ className: dr(mT.base, mT.size[t], n),
...a,
children: /* @__PURE__ */ (0, H.jsx)(e, {
- className: gT.icon[t],
+ className: mT.icon[t],
"aria-hidden": !0
})
});
}
//#endregion
//#region src/react/settings/use-action.ts
-function vT(e = "") {
+function gT(e = "") {
let t = (0, B.useRef)(null), [n, r] = (0, B.useState)(""), [i, a] = (0, B.useState)(e);
(0, B.useEffect)(() => () => t.current?.abort(), []);
async function o(e, n, i, o) {
@@ -29530,7 +29530,7 @@ function X(e) {
}
//#endregion
//#region src/react/components/path-line.tsx
-function woe({ className: e }) {
+function Eoe({ className: e }) {
return /* @__PURE__ */ (0, H.jsx)("svg", {
"aria-hidden": !0,
viewBox: "0 0 24 24",
@@ -29543,8 +29543,8 @@ function woe({ className: e }) {
children: /* @__PURE__ */ (0, H.jsx)("use", { href: "#i-folder-open" })
});
}
-var Toe = "打开文件管理器失败,请重试";
-function yT({ path: e, prefix: t, className: n, onRevealed: r }) {
+var Doe = "打开文件管理器失败,请重试";
+function _T({ path: e, prefix: t, className: n, onRevealed: r }) {
let [i, a] = (0, B.useState)(!1), [o, s] = (0, B.useState)(""), c = (0, B.useRef)(!0);
(0, B.useEffect)(() => () => {
c.current = !1;
@@ -29555,7 +29555,7 @@ function yT({ path: e, prefix: t, className: n, onRevealed: r }) {
try {
await q("/api/reveal", { path: e }), r?.("已在资源管理器中显示");
} catch (e) {
- c.current && s(e instanceof BC ? e.message : Toe);
+ c.current && s(e instanceof VC ? e.message : Doe);
} finally {
c.current && a(!1);
}
@@ -29568,8 +29568,8 @@ function yT({ path: e, prefix: t, className: n, onRevealed: r }) {
children: [/* @__PURE__ */ (0, H.jsxs)("p", {
className: dr("min-w-0 break-all", n),
children: [t, e]
- }), /* @__PURE__ */ (0, H.jsx)(_T, {
- icon: woe,
+ }), /* @__PURE__ */ (0, H.jsx)(hT, {
+ icon: Eoe,
size: "small",
className: "shrink-0",
"aria-label": "在资源管理器中显示",
@@ -29584,7 +29584,7 @@ function yT({ path: e, prefix: t, className: n, onRevealed: r }) {
}
//#endregion
//#region src/react/components/loading-dots.tsx
-function bT({ label: e, inline: t = !1 }) {
+function vT({ label: e, inline: t = !1 }) {
let n = /* @__PURE__ */ (0, H.jsxs)("span", {
"aria-hidden": !0,
className: "inline-flex items-center gap-1",
@@ -29606,21 +29606,21 @@ function bT({ label: e, inline: t = !1 }) {
}
//#endregion
//#region src/react/components/progress.tsx
-var xT = 100, Eoe = .4;
-function ST({ label: e, value: t, max: n = 100, stops: r = [] }) {
- let i = n > 0 ? n : 1, a = (e) => Math.min(Math.max(e, 0), i) / i * xT;
+var yT = 100, Ooe = .4;
+function bT({ label: e, value: t, max: n = 100, stops: r = [] }) {
+ let i = n > 0 ? n : 1, a = (e) => Math.min(Math.max(e, 0), i) / i * yT;
return /* @__PURE__ */ (0, H.jsxs)("svg", {
role: "progressbar",
"aria-label": e,
"aria-valuemin": 0,
"aria-valuemax": n,
"aria-valuenow": t,
- viewBox: `0 0 ${xT} 1`,
+ viewBox: `0 0 ${yT} 1`,
preserveAspectRatio: "none",
className: "h-1.5 w-full overflow-hidden rounded-full",
children: [
/* @__PURE__ */ (0, H.jsx)("rect", {
- width: xT,
+ width: yT,
height: 1,
className: "fill-background-tertiary-default"
}),
@@ -29631,7 +29631,7 @@ function ST({ label: e, value: t, max: n = 100, stops: r = [] }) {
}),
r.map((e) => /* @__PURE__ */ (0, H.jsx)("rect", {
x: a(e),
- width: Eoe,
+ width: Ooe,
height: 1,
className: "fill-background-secondary-default"
}, e))
@@ -29640,39 +29640,39 @@ function ST({ label: e, value: t, max: n = 100, stops: r = [] }) {
}
//#endregion
//#region src/react/components/task-progress.tsx
-function CT({ label: e, value: t = 0, total: n, embedded: r = !1 }) {
+function xT({ label: e, value: t = 0, total: n, embedded: r = !1 }) {
return /* @__PURE__ */ (0, H.jsx)("div", {
"data-task-progress": !0,
- className: r ? "flex flex-col gap-1.5" : lT({
+ className: r ? "flex flex-col gap-1.5" : sT({
variant: "outlined",
padding: "none",
className: "flex flex-col gap-1.5 px-4 py-3.5"
}),
- children: n && n > 0 ? /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(ST, {
+ children: n && n > 0 ? /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(bT, {
label: e,
value: t,
max: n
}), /* @__PURE__ */ (0, H.jsx)("p", {
className: "text-caption-1-regular text-text-secondary",
children: e
- })] }) : /* @__PURE__ */ (0, H.jsx)(bT, { label: e })
+ })] }) : /* @__PURE__ */ (0, H.jsx)(vT, { label: e })
});
}
//#endregion
//#region src/react/boardui/components/application/settings/settings-rows.tsx
-function wT({ className: e, children: t }) {
+function ST({ className: e, children: t }) {
return /* @__PURE__ */ (0, H.jsx)("div", {
className: dr("flex w-full flex-col rounded-2xl bg-background-secondary-default pl-3", e),
children: t
});
}
-function TT({ className: e, children: t }) {
+function CT({ className: e, children: t }) {
return /* @__PURE__ */ (0, H.jsx)("p", {
className: dr("w-full px-3 text-body-2-medium text-text-secondary", e),
children: t
});
}
-function ET({ label: e, description: t, children: n }) {
+function wT({ label: e, description: t, children: n }) {
return /* @__PURE__ */ (0, H.jsxs)("div", {
className: dr("flex min-h-[52px] w-full items-center justify-between gap-4 py-2.5 pr-2.5", "border-b border-separator-border last:border-b-0"),
children: [/* @__PURE__ */ (0, H.jsxs)("div", {
@@ -29689,14 +29689,14 @@ function ET({ label: e, description: t, children: n }) {
}
//#endregion
//#region src/react/settings/section.tsx
-function DT({ title: e, id: t, aside: n, onSubmit: r, children: i }) {
+function TT({ title: e, id: t, aside: n, onSubmit: r, children: i }) {
let a = /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [n ? /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex w-full flex-wrap items-center justify-between gap-2",
children: [/* @__PURE__ */ (0, H.jsx)("div", {
className: "min-w-0 flex-1",
- children: /* @__PURE__ */ (0, H.jsx)(TT, { children: e })
+ children: /* @__PURE__ */ (0, H.jsx)(CT, { children: e })
}), n]
- }) : /* @__PURE__ */ (0, H.jsx)(TT, { children: e }), /* @__PURE__ */ (0, H.jsx)(wT, { children: i })] });
+ }) : /* @__PURE__ */ (0, H.jsx)(CT, { children: e }), /* @__PURE__ */ (0, H.jsx)(ST, { children: i })] });
return r ? /* @__PURE__ */ (0, H.jsx)("form", {
id: t,
"aria-label": e,
@@ -29711,13 +29711,13 @@ function DT({ title: e, id: t, aside: n, onSubmit: r, children: i }) {
children: a
});
}
-function OT({ children: e }) {
+function ET({ children: e }) {
return /* @__PURE__ */ (0, H.jsx)("div", {
className: "flex flex-col",
children: e
});
}
-function kT({ divided: e = !1, children: t }) {
+function DT({ divided: e = !1, children: t }) {
return e ? /* @__PURE__ */ (0, H.jsx)("div", {
className: "flex flex-col gap-4 border-t border-separator-border py-4 pr-3",
children: t
@@ -29726,7 +29726,7 @@ function kT({ divided: e = !1, children: t }) {
children: t
});
}
-function AT({ status: e, children: t }) {
+function OT({ status: e, children: t }) {
return /* @__PURE__ */ (0, H.jsxs)("div", {
className: "-ml-3 flex flex-wrap items-center justify-end gap-3 rounded-b-2xl border-t border-separator-border bg-card-footer px-3 py-3",
children: [e ? /* @__PURE__ */ (0, H.jsx)("div", {
@@ -29735,34 +29735,34 @@ function AT({ status: e, children: t }) {
}) : null, t]
});
}
-function jT({ role: e, children: t }) {
+function kT({ role: e, children: t }) {
return /* @__PURE__ */ (0, H.jsx)("p", {
role: e,
className: "text-body-2-regular text-text-secondary",
children: t
});
}
-function MT({ children: e }) {
+function AT({ children: e }) {
return /* @__PURE__ */ (0, H.jsx)("p", {
role: "alert",
className: "text-body-2-regular text-text-error-primary",
children: e
});
}
-function NT({ children: e }) {
+function jT({ children: e }) {
return /* @__PURE__ */ (0, H.jsx)("p", {
className: "text-body-medium text-text-primary",
children: e
});
}
-function PT({ href: e, children: t, leadingIcon: n }) {
- return /* @__PURE__ */ (0, H.jsx)(aT, {
+function MT({ href: e, children: t, leadingIcon: n }) {
+ return /* @__PURE__ */ (0, H.jsx)(rT, {
href: e,
target: "_blank",
rel: "noopener noreferrer",
size: "small",
leadingIcon: n,
- trailingIcon: Gw,
+ trailingIcon: Uw,
className: "min-w-0 max-w-full",
children: /* @__PURE__ */ (0, H.jsx)("span", {
className: "min-w-0 whitespace-normal break-all",
@@ -29770,13 +29770,13 @@ function PT({ href: e, children: t, leadingIcon: n }) {
})
});
}
-function FT({ children: e }) {
+function NT({ children: e }) {
return /* @__PURE__ */ (0, H.jsx)("dl", {
className: "flex flex-col",
children: e
});
}
-function IT({ term: e, children: t }) {
+function PT({ term: e, children: t }) {
return /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex min-h-11 items-center justify-between gap-4 border-b border-separator-border py-2.5 pr-3 last:border-b-0",
children: [/* @__PURE__ */ (0, H.jsx)("dt", {
@@ -29788,7 +29788,7 @@ function IT({ term: e, children: t }) {
})]
});
}
-function LT({ summary: e, defaultOpen: t = !1, children: n }) {
+function FT({ summary: e, defaultOpen: t = !1, children: n }) {
let r = (0, B.useId)(), i = (0, B.useRef)(null), a = (0, B.useRef)(null), o = (0, B.useRef)(!1), [s, c] = (0, B.useState)(t);
return /* @__PURE__ */ (0, H.jsxs)("details", {
ref: (e) => {
@@ -29801,7 +29801,7 @@ function LT({ summary: e, defaultOpen: t = !1, children: n }) {
e.preventDefault(), !(!i.current || !a.current) && (S(i.current, a.current, !s), c(!s));
},
className: "flex w-fit cursor-pointer list-none items-center gap-1 rounded-sm text-body-2-medium text-text-secondary outline-none select-none hover:text-text-primary focus-visible:ring-2 focus-visible:ring-border-focus-ring",
- children: [/* @__PURE__ */ (0, H.jsx)(Rw, {
+ children: [/* @__PURE__ */ (0, H.jsx)(Iw, {
"aria-hidden": !0,
className: s ? "size-4 shrink-0 rotate-90 transition-transform" : "size-4 shrink-0 transition-transform"
}), e]
@@ -29816,7 +29816,7 @@ function LT({ summary: e, defaultOpen: t = !1, children: n }) {
})]
});
}
-function Doe({ name: e }) {
+function koe({ name: e }) {
return /* @__PURE__ */ (0, H.jsx)("svg", {
"aria-hidden": !0,
viewBox: "0 0 24 24",
@@ -29825,29 +29825,29 @@ function Doe({ name: e }) {
children: /* @__PURE__ */ (0, H.jsx)("use", { href: `#i-${e}` })
});
}
-function RT({ mark: e }) {
+function IT({ mark: e }) {
return e.startsWith("data:image/png;base64,") ? /* @__PURE__ */ (0, H.jsx)("img", {
src: e,
alt: "",
width: 16,
height: 16,
className: "size-4 shrink-0"
- }) : /* @__PURE__ */ (0, H.jsx)(Doe, { name: e });
+ }) : /* @__PURE__ */ (0, H.jsx)(koe, { name: e });
}
//#endregion
//#region src/react/library-processing/use-library-processing.ts
-function zT({ toast: e, mode: t, monitor: n }) {
- let r = t === "notice" || !!n, i = xw({
- queryKey: kw,
- queryFn: ({ signal: e }) => Aw(e),
- refetchInterval: (e) => Iae(e.state.data, r)
+function LT({ toast: e, mode: t, monitor: n }) {
+ let r = t === "notice" || !!n, i = yw({
+ queryKey: Dw,
+ queryFn: ({ signal: e }) => Ow(e),
+ refetchInterval: (e) => Rae(e.state.data, r)
}), [a, o] = (0, B.useState)(null), s = (0, B.useRef)(void 0), c = i.data;
return (0, B.useEffect)(() => {
if (!c) return;
let n = s.current;
s.current = c.status;
let r = n === "running" && c.status !== "running";
- r && o(c), (r || t === "notice") && Vae(c, e, r);
+ r && o(c), (r || t === "notice") && Uae(c, e, r);
}, [
c,
t,
@@ -29860,29 +29860,29 @@ function zT({ toast: e, mode: t, monitor: n }) {
}
//#endregion
//#region src/react/library-processing/library-processing-card.tsx
-var Ooe = [
+var Aoe = [
{
label: "扫描并补全资料",
- icon: Uw,
+ icon: Vw,
command: {}
},
{
label: "只扫描",
- icon: qw,
+ icon: Gw,
command: { stage: "scan" }
},
{
label: "只采集",
- icon: Jae,
+ icon: Xae,
command: { stage: "collect" }
}
-], koe = dr(sT, cT, "text-body-2-medium"), Aoe = "这一项耗时较长,暂时没有新进展。任务结束后可以重试未完成的部分。", joe = (e) => {
+], joe = dr(aT, oT, "text-body-2-medium"), Moe = "这一项耗时较长,暂时没有新进展。任务结束后可以重试未完成的部分。", Noe = (e) => {
let t = e.performer_aliases || 0, n = e.performer_avatars || 0, r = e.performer_profile_conflicts || 0, i = e.performer_profile_failed || 0;
if (!t && !n && !r && !i) return "";
let a = [`补齐女优资料:别名 ${t} 个,头像 ${n} 张`];
return r && a.push(`${r} 个同名冲突交回人工`), i && a.push(`${i} 张头像未取得`), `${a.join(",")}。`;
-}, Moe = (e) => `已扫描 ${e.scanned || 0} 个文件,识别 ${e.identified || 0} 个番号,整理 ${e.candidates || 0} 组资料候选,自动落库 ${e.auto_applied || 0} 条。` + joe(e);
-function Noe({ busy: e, onRun: t }) {
+}, Poe = (e) => `已扫描 ${e.scanned || 0} 个文件,识别 ${e.identified || 0} 个番号,整理 ${e.candidates || 0} 组资料候选,自动落库 ${e.auto_applied || 0} 条。` + Noe(e);
+function Foe({ busy: e, onRun: t }) {
let n = (0, B.useRef)(null), [r, i] = (0, B.useState)(!1), a = (n) => {
e || (i(!1), t(n));
};
@@ -29891,14 +29891,14 @@ function Noe({ busy: e, onRun: t }) {
"data-split-button": !0,
"data-variant": "primary",
children: [/* @__PURE__ */ (0, H.jsx)(J, {
- leadingIcon: Uw,
+ leadingIcon: Vw,
onClick: () => a({}),
...X(e),
children: "扫描并补全资料"
}), /* @__PURE__ */ (0, H.jsx)(J, {
ref: n,
iconOnly: !0,
- leadingIcon: Iw,
+ leadingIcon: Pw,
"aria-label": "更多扫描与采集方式",
"aria-haspopup": "dialog",
"aria-expanded": r,
@@ -29913,13 +29913,13 @@ function Noe({ busy: e, onRun: t }) {
onOpenChange: i,
placement: "bottom end",
offset: 4,
- className: oT,
- children: /* @__PURE__ */ (0, H.jsx)(tT, {
+ className: iT,
+ children: /* @__PURE__ */ (0, H.jsx)($w, {
"aria-label": "更多扫描与采集方式",
className: "flex w-52 flex-col gap-1 outline-none",
- children: Ooe.map(({ label: e, icon: t, command: n }) => /* @__PURE__ */ (0, H.jsxs)("button", {
+ children: Aoe.map(({ label: e, icon: t, command: n }) => /* @__PURE__ */ (0, H.jsxs)("button", {
type: "button",
- className: koe,
+ className: joe,
onClick: () => a(n),
children: [/* @__PURE__ */ (0, H.jsx)(t, {
"aria-hidden": !0,
@@ -29929,8 +29929,8 @@ function Noe({ busy: e, onRun: t }) {
})
})] });
}
-function Poe({ state: e, problem: t, settled: n, onRetry: r, toast: i }) {
- let a = zae(e), o = e.status === "failed" && !!e.retryable_asset_ids?.length, s = Rae(e.notes || {}), c = hT();
+function Ioe({ state: e, problem: t, settled: n, onRetry: r, toast: i }) {
+ let a = Vae(e), o = e.status === "failed" && !!e.retryable_asset_ids?.length, s = Bae(e.notes || {}), c = pT();
return /* @__PURE__ */ (0, H.jsxs)("div", {
"aria-live": "polite",
className: "flex flex-col gap-4 empty:hidden",
@@ -29938,7 +29938,7 @@ function Poe({ state: e, problem: t, settled: n, onRetry: r, toast: i }) {
e.status === "running" && e.stalled ? /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "warning",
title: "处理较慢",
- children: Aoe
+ children: Moe
}) : null,
t || e.status === "failed" ? /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "error",
@@ -29950,7 +29950,7 @@ function Poe({ state: e, problem: t, settled: n, onRetry: r, toast: i }) {
}) : null,
extra: a ? /* @__PURE__ */ (0, H.jsx)("div", {
className: "mt-1.5 border-t border-current/20 pt-1.5",
- children: /* @__PURE__ */ (0, H.jsxs)(LT, {
+ children: /* @__PURE__ */ (0, H.jsxs)(FT, {
summary: a.label,
children: [/* @__PURE__ */ (0, H.jsx)("div", {
className: "relative",
@@ -29981,7 +29981,7 @@ function Poe({ state: e, problem: t, settled: n, onRetry: r, toast: i }) {
})
}), a.log ? /* @__PURE__ */ (0, H.jsx)("div", {
className: "mt-2 border-t border-current/20 pt-2 text-text-secondary",
- children: /* @__PURE__ */ (0, H.jsx)(yT, {
+ children: /* @__PURE__ */ (0, H.jsx)(_T, {
path: a.log,
prefix: "完整记录:",
className: "text-caption-1-regular",
@@ -29995,13 +29995,13 @@ function Poe({ state: e, problem: t, settled: n, onRetry: r, toast: i }) {
n?.status === "complete" ? /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "success",
title: "处理完成",
- children: Moe(n)
+ children: Poe(n)
}) : null,
e.status !== "running" && s ? /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "neutral",
extra: e.issues_log ? /* @__PURE__ */ (0, H.jsx)("div", {
className: "mt-1.5 border-t border-current/20 pt-1.5 text-text-secondary",
- children: /* @__PURE__ */ (0, H.jsx)(yT, {
+ children: /* @__PURE__ */ (0, H.jsx)(_T, {
path: e.issues_log,
prefix: "完整记录:",
className: "text-caption-1-regular",
@@ -30013,38 +30013,38 @@ function Poe({ state: e, problem: t, settled: n, onRetry: r, toast: i }) {
]
});
}
-function BT(e) {
- let { toast: t, onComplete: n } = e, { job: r, settled: i, forget: a } = zT(e), o = ww({
- mutationFn: (e) => q(Ow, e),
+function RT(e) {
+ let { toast: t, onComplete: n } = e, { job: r, settled: i, forget: a } = LT(e), o = Sw({
+ mutationFn: (e) => q(Ew, e),
onSuccess: (e) => {
- a(), z.setQueryData(kw, e), z.invalidateQueries({ queryKey: kw });
+ a(), z.setQueryData(Dw, e), z.invalidateQueries({ queryKey: Dw });
}
});
(0, B.useEffect)(() => {
i && n?.();
}, [i, n]);
- let s = r.data ?? { status: "idle" }, c = o.error ? G(o.error) : r.isError ? r.data ? Mw : G(r.error) : "", l = o.isPending || s.status === "running", u = Pw(s), d = (e) => {
+ let s = r.data ?? { status: "idle" }, c = o.error ? G(o.error) : r.isError ? r.data ? Aw : G(r.error) : "", l = o.isPending || s.status === "running", u = Mw(s), d = (e) => {
l || (o.reset(), o.mutate(e));
};
return /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-col gap-4",
- children: [/* @__PURE__ */ (0, H.jsx)(mT, {
+ children: [/* @__PURE__ */ (0, H.jsx)(fT, {
layout: "stack",
label: "扫描与采集",
footer: /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [
- /* @__PURE__ */ (0, H.jsx)(aT, {
+ /* @__PURE__ */ (0, H.jsx)(rT, {
href: "/scraping",
size: "small",
- trailingIcon: Lw,
+ trailingIcon: Fw,
children: "来源和凭证"
}),
- s.candidates ? /* @__PURE__ */ (0, H.jsx)(aT, {
+ s.candidates ? /* @__PURE__ */ (0, H.jsx)(rT, {
href: "/review",
size: "small",
- trailingIcon: Lw,
+ trailingIcon: Fw,
children: "复核资料"
}) : null,
- /* @__PURE__ */ (0, H.jsx)(Noe, {
+ /* @__PURE__ */ (0, H.jsx)(Foe, {
busy: l,
onRun: d
})
@@ -30052,12 +30052,12 @@ function BT(e) {
children: /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-col gap-2",
children: [
- /* @__PURE__ */ (0, H.jsx)(pT, { children: "扫描与采集" }),
+ /* @__PURE__ */ (0, H.jsx)(dT, { children: "扫描与采集" }),
/* @__PURE__ */ (0, H.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
- children: loe
+ children: doe
}),
- s.status === "running" ? /* @__PURE__ */ (0, H.jsx)(CT, {
+ s.status === "running" ? /* @__PURE__ */ (0, H.jsx)(xT, {
embedded: !0,
label: u,
value: s.checked,
@@ -30065,7 +30065,7 @@ function BT(e) {
}) : null
]
})
- }), /* @__PURE__ */ (0, H.jsx)(Poe, {
+ }), /* @__PURE__ */ (0, H.jsx)(Ioe, {
state: s,
problem: c,
settled: i,
@@ -30081,12 +30081,12 @@ function BT(e) {
}
//#endregion
//#region src/react/library-processing/library-processing-notice.tsx
-var VT = "flex min-h-10 flex-wrap items-center justify-center gap-x-4 gap-y-2 border-y px-6 py-2 max-sm:justify-start", Foe = {
- gray: `${VT} border-separator-border bg-background-secondary-default text-text-secondary`,
- warning: `${VT} border-current/35 bg-status-yellow-background text-status-yellow-text`,
- error: `${VT} border-current/35 bg-background-tertiary-error text-text-error-primary`
+var zT = "flex min-h-10 flex-wrap items-center justify-center gap-x-4 gap-y-2 border-y px-6 py-2 max-sm:justify-start", Loe = {
+ gray: `${zT} border-separator-border bg-background-secondary-default text-text-secondary`,
+ warning: `${zT} border-current/35 bg-status-yellow-background text-status-yellow-text`,
+ error: `${zT} border-current/35 bg-background-tertiary-error text-text-error-primary`
};
-function Ioe({ value: e, max: t }) {
+function Roe({ value: e, max: t }) {
let n = Math.max(0, Math.min(100, e / t * 100));
return /* @__PURE__ */ (0, H.jsxs)("svg", {
role: "progressbar",
@@ -30114,16 +30114,16 @@ function Ioe({ value: e, max: t }) {
})]
});
}
-function Loe(e) {
- let { job: t } = zT(e), n = t.data, r = t.isError ? n ? Mw : G(t.error) : "", i = n?.status ?? "idle", a = i === "failed", o = i === "running";
+function zoe(e) {
+ let { job: t } = LT(e), n = t.data, r = t.isError ? n ? Aw : G(t.error) : "", i = n?.status ?? "idle", a = i === "failed", o = i === "running";
if (!r && !o && !a) return null;
- let s = a ? "error" : r || n?.stalled ? "warning" : "gray", c = n?.checked || 0, l = n?.total || 0, u = r || (a ? "扫描与资料采集未完成" : Pw(n) + (l ? ` · ${c} / ${l}` : "")), d = s === "gray" ? Zae : Kae;
+ let s = a ? "error" : r || n?.stalled ? "warning" : "gray", c = n?.checked || 0, l = n?.total || 0, u = r || (a ? "扫描与资料采集未完成" : Mw(n) + (l ? ` · ${c} / ${l}` : "")), d = s === "gray" ? $ae : Jae;
return /* @__PURE__ */ (0, H.jsxs)("aside", {
role: a ? "alert" : "status",
- className: Foe[s],
+ className: Loe[s],
children: [/* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex min-w-0 items-center gap-3",
- children: [o && l ? /* @__PURE__ */ (0, H.jsx)(Ioe, {
+ children: [o && l ? /* @__PURE__ */ (0, H.jsx)(Roe, {
value: c,
max: l
}) : /* @__PURE__ */ (0, H.jsx)(d, {
@@ -30133,60 +30133,60 @@ function Loe(e) {
className: "min-w-0 text-body-2-regular",
children: u
})]
- }), /* @__PURE__ */ (0, H.jsx)(aT, {
+ }), /* @__PURE__ */ (0, H.jsx)(rT, {
href: "/data-cleanup#libraryProcessing",
size: "small",
- trailingIcon: Lw,
+ trailingIcon: Fw,
children: r || a ? "查看并处理" : "查看进度"
})]
});
}
//#endregion
//#region node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs
-var HT = (0, B.createContext)({});
+var BT = (0, B.createContext)({});
//#endregion
//#region node_modules/framer-motion/dist/es/utils/use-constant.mjs
-function UT(e) {
+function VT(e) {
let t = (0, B.useRef)(null);
return t.current === null && (t.current = e()), t.current;
}
//#endregion
//#region node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs
-var WT = typeof window < "u" ? B.useLayoutEffect : B.useEffect, GT = /* @__PURE__ */ (0, B.createContext)(null), KT = (0, B.createContext)({
+var HT = typeof window < "u" ? B.useLayoutEffect : B.useEffect, UT = /* @__PURE__ */ (0, B.createContext)(null), WT = (0, B.createContext)({
transformPagePoint: (e) => e,
isStatic: !1,
reducedMotion: "never"
});
//#endregion
//#region node_modules/framer-motion/dist/es/utils/use-composed-ref.mjs
-function qT(e, t) {
+function GT(e, t) {
if (typeof e == "function") return e(t);
e != null && (e.current = t);
}
-function Roe(...e) {
+function Boe(...e) {
return (t) => {
let n = !1, r = e.map((e) => {
- let r = qT(e, t);
+ let r = GT(e, t);
return !n && typeof r == "function" && (n = !0), r;
});
if (n) return () => {
for (let t = 0; t < r.length; t++) {
let n = r[t];
- typeof n == "function" ? n() : qT(e[t], null);
+ typeof n == "function" ? n() : GT(e[t], null);
}
};
};
}
-function zoe(...e) {
- return B.useCallback(Roe(...e), e);
+function Voe(...e) {
+ return B.useCallback(Boe(...e), e);
}
//#endregion
//#region node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs
-var Boe = class extends B.Component {
+var Hoe = class extends B.Component {
getSnapshotBeforeUpdate(e) {
let t = this.props.childRef.current;
- if ($b(t) && e.isPresent && !this.props.isPresent && this.props.pop !== !1) {
- let e = t.offsetParent, n = $b(e) && e.offsetWidth || 0, r = $b(e) && e.offsetHeight || 0, i = getComputedStyle(t), a = this.props.sizeRef.current;
+ if (Gb(t) && e.isPresent && !this.props.isPresent && this.props.pop !== !1) {
+ let e = t.offsetParent, n = Gb(e) && e.offsetWidth || 0, r = Gb(e) && e.offsetHeight || 0, i = getComputedStyle(t), a = this.props.sizeRef.current;
a.height = parseFloat(i.height), a.width = parseFloat(i.width), a.top = t.offsetTop, a.left = t.offsetLeft, a.right = n - a.width - a.left, a.bottom = r - a.height - a.top, a.direction = i.direction;
}
return null;
@@ -30196,7 +30196,7 @@ var Boe = class extends B.Component {
return this.props.children;
}
};
-function Voe({ children: e, isPresent: t, anchorX: n, anchorY: r, root: i, pop: a }) {
+function Uoe({ children: e, isPresent: t, anchorX: n, anchorY: r, root: i, pop: a }) {
let o = (0, B.useId)(), s = (0, B.useRef)(null), c = (0, B.useRef)({
width: 0,
height: 0,
@@ -30205,7 +30205,7 @@ function Voe({ children: e, isPresent: t, anchorX: n, anchorY: r, root: i, pop:
right: 0,
bottom: 0,
direction: "ltr"
- }), { nonce: l } = (0, B.useContext)(KT), u = zoe(s, a === !1 ? void 0 : e.props?.ref ?? e?.ref);
+ }), { nonce: l } = (0, B.useContext)(WT), u = Voe(s, a === !1 ? void 0 : e.props?.ref ?? e?.ref);
return (0, B.useInsertionEffect)(() => {
let { width: e, height: u, top: d, left: f, right: p, bottom: m, direction: h } = c.current;
if (t || a === !1 || !s.current || !e || !u) return;
@@ -30225,7 +30225,7 @@ function Voe({ children: e, isPresent: t, anchorX: n, anchorY: r, root: i, pop:
`), () => {
s.current?.removeAttribute("data-motion-pop-id"), b.contains(y) && b.removeChild(y);
};
- }, [t]), (0, H.jsx)(Boe, {
+ }, [t]), (0, H.jsx)(Hoe, {
isPresent: t,
childRef: s,
sizeRef: c,
@@ -30235,9 +30235,9 @@ function Voe({ children: e, isPresent: t, anchorX: n, anchorY: r, root: i, pop:
}
//#endregion
//#region node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs
-var Hoe = ({ children: e, initial: t, isPresent: n, onExitComplete: r, custom: i, presenceAffectsLayout: a, mode: o, anchorX: s, anchorY: c, root: l }) => {
- let u = UT(Uoe), d = (0, B.useId)(), f = (0, B.useRef)(n), p = (0, B.useRef)(r);
- WT(() => {
+var Woe = ({ children: e, initial: t, isPresent: n, onExitComplete: r, custom: i, presenceAffectsLayout: a, mode: o, anchorX: s, anchorY: c, root: l }) => {
+ let u = VT(Goe), d = (0, B.useId)(), f = (0, B.useRef)(n), p = (0, B.useRef)(r);
+ HT(() => {
f.current = n, p.current = r;
});
let m = !0, h = (0, B.useMemo)(() => (m = !1, {
@@ -30262,25 +30262,25 @@ var Hoe = ({ children: e, initial: t, isPresent: n, onExitComplete: r, custom: i
u.forEach((e, t) => u.set(t, !1));
}, [n]), B.useEffect(() => {
!n && !u.size && r && r();
- }, [n]), e = (0, H.jsx)(Voe, {
+ }, [n]), e = (0, H.jsx)(Uoe, {
pop: o === "popLayout",
isPresent: n,
anchorX: s,
anchorY: c,
root: l,
children: e
- }), (0, H.jsx)(GT.Provider, {
+ }), (0, H.jsx)(UT.Provider, {
value: h,
children: e
});
};
-function Uoe() {
+function Goe() {
return /* @__PURE__ */ new Map();
}
//#endregion
//#region node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs
-function JT(e = !0) {
- let t = (0, B.useContext)(GT);
+function KT(e = !0) {
+ let t = (0, B.useContext)(UT);
if (t === null) return [!0, null];
let { isPresent: n, onExitComplete: r, register: i } = t, a = (0, B.useId)();
(0, B.useEffect)(() => {
@@ -30293,16 +30293,16 @@ function JT(e = !0) {
]);
return !n && r ? [!1, o] : [!0];
}
-function Woe() {
- return Goe((0, B.useContext)(GT));
+function Koe() {
+ return qoe((0, B.useContext)(UT));
}
-function Goe(e) {
+function qoe(e) {
return e === null || e.isPresent;
}
//#endregion
//#region node_modules/framer-motion/dist/es/components/AnimatePresence/utils.mjs
-var YT = (e) => e.key || "";
-function XT(e) {
+var qT = (e) => e.key || "";
+function JT(e) {
let t = [];
return B.Children.forEach(e, (e) => {
(0, B.isValidElement)(e) && t.push(e);
@@ -30310,12 +30310,12 @@ function XT(e) {
}
//#endregion
//#region node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs
-var Koe = ({ children: e, custom: t, initial: n = !0, onExitComplete: r, presenceAffectsLayout: i = !0, mode: a = "sync", propagate: o = !1, anchorX: s = "left", anchorY: c = "top", root: l }) => {
- let [u, d] = JT(o), f = (0, B.useMemo)(() => XT(e), [e]), p = o && !u ? [] : f.map(YT), m = (0, B.useRef)(!0), h = (0, B.useRef)(f), g = UT(() => /* @__PURE__ */ new Map()), _ = (0, B.useRef)(/* @__PURE__ */ new Set()), [v, y] = (0, B.useState)(f), [b, x] = (0, B.useState)(f);
- WT(() => {
+var Joe = ({ children: e, custom: t, initial: n = !0, onExitComplete: r, presenceAffectsLayout: i = !0, mode: a = "sync", propagate: o = !1, anchorX: s = "left", anchorY: c = "top", root: l }) => {
+ let [u, d] = KT(o), f = (0, B.useMemo)(() => JT(e), [e]), p = o && !u ? [] : f.map(qT), m = (0, B.useRef)(!0), h = (0, B.useRef)(f), g = VT(() => /* @__PURE__ */ new Map()), _ = (0, B.useRef)(/* @__PURE__ */ new Set()), [v, y] = (0, B.useState)(f), [b, x] = (0, B.useState)(f);
+ HT(() => {
m.current = !1, h.current = f;
for (let e = 0; e < b.length; e++) {
- let t = YT(b[e]);
+ let t = qT(b[e]);
p.includes(t) ? (g.delete(t), _.current.delete(t)) : g.get(t) !== !0 && g.set(t, !1);
}
}, [
@@ -30327,15 +30327,15 @@ var Koe = ({ children: e, custom: t, initial: n = !0, onExitComplete: r, presenc
if (f !== v) {
let e = [...f];
for (let t = 0; t < b.length; t++) {
- let n = b[t], r = YT(n);
+ let n = b[t], r = qT(n);
p.includes(r) || (e.splice(t, 0, n), S.push(n));
}
- return a === "wait" && S.length && (e = S), x(XT(e)), y(f), null;
+ return a === "wait" && S.length && (e = S), x(JT(e)), y(f), null;
}
- let { forceRender: C } = (0, B.useContext)(HT);
+ let { forceRender: C } = (0, B.useContext)(BT);
return (0, H.jsx)(H.Fragment, { children: b.map((e) => {
- let v = YT(e), y = o && !u ? !1 : f === b || p.includes(v);
- return (0, H.jsx)(Hoe, {
+ let v = qT(e), y = o && !u ? !1 : f === b || p.includes(v);
+ return (0, H.jsx)(Woe, {
isPresent: y,
initial: !m.current || n ? void 0 : !1,
custom: t,
@@ -30356,7 +30356,7 @@ var Koe = ({ children: e, custom: t, initial: n = !0, onExitComplete: r, presenc
children: e
}, v);
}) });
-}, ZT = (0, B.createContext)({ strict: !1 }), QT = {
+}, YT = (0, B.createContext)({ strict: !1 }), XT = {
animation: [
"animate",
"variants",
@@ -30393,98 +30393,98 @@ var Koe = ({ children: e, custom: t, initial: n = !0, onExitComplete: r, presenc
"onViewportLeave"
],
layout: ["layout", "layoutId"]
-}, $T = !1;
-function qoe() {
- if ($T) return;
+}, ZT = !1;
+function Yoe() {
+ if (ZT) return;
let e = {};
- for (let t in QT) e[t] = { isEnabled: (e) => QT[t].some((t) => !!e[t]) };
- Lx(e), $T = !0;
+ for (let t in XT) e[t] = { isEnabled: (e) => XT[t].some((t) => !!e[t]) };
+ kx(e), ZT = !0;
}
-function eE() {
- return qoe(), Kre();
+function QT() {
+ return Yoe(), eie();
}
//#endregion
//#region node_modules/framer-motion/dist/es/motion/features/load-features.mjs
-function Joe(e) {
- let t = eE();
+function Xoe(e) {
+ let t = QT();
for (let n in e) t[n] = {
...t[n],
...e[n]
};
- Lx(t);
+ kx(t);
}
//#endregion
//#region node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs
-var Yoe = /* @__PURE__ */ new Set(/* @__PURE__ */ "animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport".split("."));
-function tE(e) {
- return e.startsWith("while") || e.startsWith("drag") && e !== "draggable" || e.startsWith("layout") || e.startsWith("onTap") || e.startsWith("onPan") || e.startsWith("onLayout") || Yoe.has(e);
+var Zoe = /* @__PURE__ */ new Set(/* @__PURE__ */ "animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport".split("."));
+function $T(e) {
+ return e.startsWith("while") || e.startsWith("drag") && e !== "draggable" || e.startsWith("layout") || e.startsWith("onTap") || e.startsWith("onPan") || e.startsWith("onLayout") || Zoe.has(e);
}
//#endregion
//#region __vite-optional-peer-dep:@emotion/is-prop-valid:framer-motion
-var Xoe = /* @__PURE__ */ ht({ default: () => nE }), nE, Zoe = pt((() => {
- throw nE = {}, Error("Could not resolve \"@emotion/is-prop-valid\" imported by \"framer-motion\". Is it installed?");
-})), rE = (e) => !tE(e);
-function iE(e) {
- typeof e == "function" && (rE = (t) => t.startsWith("on") ? !tE(t) : e(t));
+var Qoe = /* @__PURE__ */ ht({ default: () => eE }), eE, $oe = pt((() => {
+ throw eE = {}, Error("Could not resolve \"@emotion/is-prop-valid\" imported by \"framer-motion\". Is it installed?");
+})), tE = (e) => !$T(e);
+function nE(e) {
+ typeof e == "function" && (tE = (t) => t.startsWith("on") ? !$T(t) : e(t));
}
try {
- iE((Zoe(), yt(Xoe)).default);
+ nE(($oe(), yt(Qoe)).default);
} catch {}
-function Qoe(e, t, n) {
+function ese(e, t, n) {
let r = {};
- for (let i in e) (i !== "values" || typeof e.values != "object") && (Pb(e[i]) || (rE(i) || n === !0 && tE(i) || !t && !tE(i) || e.draggable && i.startsWith("onDrag")) && (r[i] = e[i]));
+ for (let i in e) (i !== "values" || typeof e.values != "object") && (Eb(e[i]) || (tE(i) || n === !0 && $T(i) || !t && !$T(i) || e.draggable && i.startsWith("onDrag")) && (r[i] = e[i]));
return r;
}
//#endregion
//#region node_modules/framer-motion/dist/es/components/MotionConfig/index.mjs
-function $oe({ children: e, isValidProp: t, ...n }) {
- t && iE(t);
- let r = (0, B.useContext)(KT);
+function tse({ children: e, isValidProp: t, ...n }) {
+ t && nE(t);
+ let r = (0, B.useContext)(WT);
n = {
...r,
...n
- }, n.transition = Tb(n.transition, r.transition), n.isStatic = UT(() => n.isStatic);
+ }, n.transition = _b(n.transition, r.transition), n.isStatic = VT(() => n.isStatic);
let i = (0, B.useMemo)(() => n, [
JSON.stringify(n.transition),
n.transformPagePoint,
n.reducedMotion,
n.skipAnimations
]);
- return (0, H.jsx)(KT.Provider, {
+ return (0, H.jsx)(WT.Provider, {
value: i,
children: e
});
}
//#endregion
//#region node_modules/framer-motion/dist/es/context/MotionContext/index.mjs
-var aE = /* @__PURE__ */ (0, B.createContext)({});
+var rE = /* @__PURE__ */ (0, B.createContext)({});
//#endregion
//#region node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs
-function ese(e, t) {
- if (Ax(e)) {
+function nse(e, t) {
+ if (Sx(e)) {
let { initial: t, animate: n } = e;
return {
- initial: t === !1 || Dx(t) ? t : void 0,
- animate: Dx(n) ? n : void 0
+ initial: t === !1 || yx(t) ? t : void 0,
+ animate: yx(n) ? n : void 0
};
}
return e.inherit === !1 ? {} : t;
}
//#endregion
//#region node_modules/framer-motion/dist/es/context/MotionContext/create.mjs
-function tse(e) {
- let { initial: t, animate: n } = ese(e, (0, B.useContext)(aE));
+function rse(e) {
+ let { initial: t, animate: n } = nse(e, (0, B.useContext)(rE));
return (0, B.useMemo)(() => ({
initial: t,
animate: n
- }), [oE(t), oE(n)]);
+ }), [iE(t), iE(n)]);
}
-function oE(e) {
+function iE(e) {
return Array.isArray(e) ? e.join(" ") : e;
}
//#endregion
//#region node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs
-var sE = () => ({
+var aE = () => ({
style: {},
transform: {},
transformOrigin: {},
@@ -30492,42 +30492,42 @@ var sE = () => ({
});
//#endregion
//#region node_modules/framer-motion/dist/es/render/html/use-props.mjs
-function cE(e, t, n) {
- for (let r in t) !Pb(t[r]) && !cS(r, n) && (e[r] = t[r]);
+function oE(e, t, n) {
+ for (let r in t) !Eb(t[r]) && !tS(r, n) && (e[r] = t[r]);
}
-function nse({ transformTemplate: e }, t) {
+function ise({ transformTemplate: e }, t) {
return (0, B.useMemo)(() => {
- let n = sE();
- return rS(n, t, e), Object.assign({}, n.vars, n.style);
+ let n = aE();
+ return Yx(n, t, e), Object.assign({}, n.vars, n.style);
}, [t]);
}
-function rse(e, t) {
+function ase(e, t) {
let n = e.style || {}, r = {};
- return cE(r, n, e), Object.assign(r, nse(e, t)), r;
+ return oE(r, n, e), Object.assign(r, ise(e, t)), r;
}
-function ise(e, t) {
- let n = {}, r = rse(e, t);
+function ose(e, t) {
+ let n = {}, r = ase(e, t);
return e.drag && e.dragListener !== !1 && (n.draggable = !1, r.userSelect = r.WebkitUserSelect = r.WebkitTouchCallout = "none", r.touchAction = e.drag === !0 ? "none" : `pan-${e.drag === "x" ? "y" : "x"}`), e.tabIndex === void 0 && (e.onTap || e.onTapStart || e.whileTap) && (n.tabIndex = 0), n.style = r, n;
}
//#endregion
//#region node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs
-var lE = () => ({
- ...sE(),
+var sE = () => ({
+ ...aE(),
attrs: {}
});
//#endregion
//#region node_modules/framer-motion/dist/es/render/svg/use-props.mjs
-function ase(e, t, n, r) {
+function sse(e, t, n, r) {
let i = (0, B.useMemo)(() => {
- let n = lE();
- return uS(n, t, fS(r), e.transformTemplate, e.style), {
+ let n = sE();
+ return lS(n, t, dS(r), e.transformTemplate, e.style), {
...n.attrs,
style: { ...n.style }
};
}, [t]);
if (e.style) {
let t = {};
- cE(t, e.style, e), i.style = {
+ oE(t, e.style, e), i.style = {
...t,
...i.style
};
@@ -30536,7 +30536,7 @@ function ase(e, t, n, r) {
}
//#endregion
//#region node_modules/framer-motion/dist/es/render/svg/lowercase-elements.mjs
-var ose = [
+var cse = [
"animate",
"circle",
"defs",
@@ -30565,17 +30565,17 @@ var ose = [
];
//#endregion
//#region node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs
-function uE(e) {
- return typeof e != "string" || e.includes("-") ? !1 : !!(ose.indexOf(e) > -1 || /[A-Z]/u.test(e));
+function cE(e) {
+ return typeof e != "string" || e.includes("-") ? !1 : !!(cse.indexOf(e) > -1 || /[A-Z]/u.test(e));
}
//#endregion
//#region node_modules/framer-motion/dist/es/render/dom/use-render.mjs
-function sse(e, t, n, { latestValues: r }, i, a = !1, o) {
- let s = (o ?? uE(e) ? ase : ise)(t, r, i, e), c = Qoe(t, typeof e == "string", a), l = e === B.Fragment ? {} : {
+function lse(e, t, n, { latestValues: r }, i, a = !1, o) {
+ let s = (o ?? cE(e) ? sse : ose)(t, r, i, e), c = ese(t, typeof e == "string", a), l = e === B.Fragment ? {} : {
...c,
...s,
ref: n
- }, { children: u } = t, d = (0, B.useMemo)(() => Pb(u) ? u.get() : u, [u]);
+ }, { children: u } = t, d = (0, B.useMemo)(() => Eb(u) ? u.get() : u, [u]);
return (0, B.createElement)(e, {
...l,
children: d
@@ -30583,24 +30583,24 @@ function sse(e, t, n, { latestValues: r }, i, a = !1, o) {
}
//#endregion
//#region node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs
-function cse({ scrapeMotionValuesFromProps: e, createRenderState: t }, n, r, i) {
+function use({ scrapeMotionValuesFromProps: e, createRenderState: t }, n, r, i) {
return {
- latestValues: lse(n, r, i, e),
+ latestValues: dse(n, r, i, e),
renderState: t()
};
}
-function lse(e, t, n, r) {
+function dse(e, t, n, r) {
let i = {}, a = r(e, {});
- for (let e in a) i[e] = US(a[e]);
- let { initial: o, animate: s } = e, c = Ax(e), l = jx(e);
+ for (let e in a) i[e] = aC(a[e]);
+ let { initial: o, animate: s } = e, c = Sx(e), l = Cx(e);
t && l && !c && e.inherit !== !1 && (o === void 0 && (o = t.initial), s === void 0 && (s = t.animate));
let u = n ? n.initial === !1 : !1;
u ||= o === !1;
let d = u ? s : o;
- if (d && typeof d != "boolean" && !Ex(d)) {
+ if (d && typeof d != "boolean" && !vx(d)) {
let t = Array.isArray(d) ? d : [d];
for (let n = 0; n < t.length; n++) {
- let r = Ab(e, t[n]);
+ let r = Sb(e, t[n]);
if (r) {
let { transitionEnd: e, transition: t, ...n } = r;
for (let e in n) {
@@ -30617,19 +30617,19 @@ function lse(e, t, n, r) {
}
return i;
}
-var dE = (e) => (t, n) => {
- let r = (0, B.useContext)(aE), i = (0, B.useContext)(GT), a = () => cse(e, t, r, i);
- return n ? a() : UT(a);
-}, use = /*@__PURE__*/ dE({
- scrapeMotionValuesFromProps: lS,
- createRenderState: sE
-}), dse = /*@__PURE__*/ dE({
+var lE = (e) => (t, n) => {
+ let r = (0, B.useContext)(rE), i = (0, B.useContext)(UT), a = () => use(e, t, r, i);
+ return n ? a() : VT(a);
+}, fse = /*@__PURE__*/ lE({
+ scrapeMotionValuesFromProps: nS,
+ createRenderState: aE
+}), pse = /*@__PURE__*/ lE({
scrapeMotionValuesFromProps: pS,
- createRenderState: lE
-}), fse = Symbol.for("motionComponentSymbol");
+ createRenderState: sE
+}), mse = Symbol.for("motionComponentSymbol");
//#endregion
//#region node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs
-function pse(e, t, n) {
+function hse(e, t, n) {
let r = (0, B.useRef)(n);
(0, B.useInsertionEffect)(() => {
r.current = n;
@@ -30648,16 +30648,16 @@ function pse(e, t, n) {
}
//#endregion
//#region node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs
-var fE = (0, B.createContext)({});
+var uE = (0, B.createContext)({});
//#endregion
//#region node_modules/framer-motion/dist/es/utils/is-ref-object.mjs
-function pE(e) {
+function dE(e) {
return e && typeof e == "object" && Object.prototype.hasOwnProperty.call(e, "current");
}
//#endregion
//#region node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs
-function mse(e, t, n, r, i, a) {
- let { visualElement: o } = (0, B.useContext)(aE), s = (0, B.useContext)(ZT), c = (0, B.useContext)(GT), l = (0, B.useContext)(KT), u = l.reducedMotion, d = l.skipAnimations, f = (0, B.useRef)(null), p = (0, B.useRef)(!1);
+function gse(e, t, n, r, i, a) {
+ let { visualElement: o } = (0, B.useContext)(rE), s = (0, B.useContext)(YT), c = (0, B.useContext)(UT), l = (0, B.useContext)(WT), u = l.reducedMotion, d = l.skipAnimations, f = (0, B.useRef)(null), p = (0, B.useRef)(!1);
r ||= s.renderer, !f.current && r && (f.current = r(e, {
visualState: t,
parent: o,
@@ -30668,14 +30668,14 @@ function mse(e, t, n, r, i, a) {
skipAnimations: d,
isSVG: a
}), p.current && f.current && (f.current.manuallyAnimateOnMount = !0));
- let m = f.current, h = (0, B.useContext)(fE);
- m && !m.projection && i && (m.type === "html" || m.type === "svg") && hse(f.current, n, i, h);
+ let m = f.current, h = (0, B.useContext)(uE);
+ m && !m.projection && i && (m.type === "html" || m.type === "svg") && _se(f.current, n, i, h);
let g = (0, B.useRef)(!1);
(0, B.useInsertionEffect)(() => {
m && g.current && m.update(n, c);
});
- let _ = n[Lb], v = (0, B.useRef)(!!_ && typeof window < "u" && !window.MotionHandoffIsComplete?.(_) && window.MotionHasOptimisedAnimation?.(_));
- return WT(() => {
+ let _ = n[kb], v = (0, B.useRef)(!!_ && typeof window < "u" && !window.MotionHandoffIsComplete?.(_) && window.MotionHasOptimisedAnimation?.(_));
+ return HT(() => {
p.current = !0, m && (g.current = !0, window.MotionIsMounted = !0, m.updateFeatures(), m.scheduleRenderMicrotask(), v.current && m.animationState && m.animationState.animateChanges());
}), (0, B.useEffect)(() => {
m && (!v.current && m.animationState && m.animationState.animateChanges(), v.current &&= (queueMicrotask(() => {
@@ -30683,12 +30683,12 @@ function mse(e, t, n, r, i, a) {
}), !1), m.enteringChildren = void 0);
}), m;
}
-function hse(e, t, n, r) {
+function _se(e, t, n, r) {
let { layoutId: i, layout: a, drag: o, dragConstraints: s, layoutScroll: c, layoutRoot: l, layoutAnchor: u, layoutCrossfade: d } = t;
- e.projection = new n(e.latestValues, t["data-framer-portal-id"] ? void 0 : mE(e.parent)), e.projection.setOptions({
+ e.projection = new n(e.latestValues, t["data-framer-portal-id"] ? void 0 : fE(e.parent)), e.projection.setOptions({
layoutId: i,
layout: a,
- alwaysMeasureLayout: !!o || s && pE(s),
+ alwaysMeasureLayout: !!o || s && dE(s),
visualElement: e,
animationType: typeof a == "string" ? a : "both",
initialPromotionConfig: r,
@@ -30698,46 +30698,46 @@ function hse(e, t, n, r) {
layoutAnchor: u
});
}
-function mE(e) {
- if (e) return e.options.allowProjection === !1 ? mE(e.parent) : e.projection;
+function fE(e) {
+ if (e) return e.options.allowProjection === !1 ? fE(e.parent) : e.projection;
}
//#endregion
//#region node_modules/framer-motion/dist/es/motion/index.mjs
-function hE(e, { forwardMotionProps: t = !1, type: n } = {}, r, i) {
- r && Joe(r);
- let a = n ? n === "svg" : uE(e), o = a ? dse : use;
+function pE(e, { forwardMotionProps: t = !1, type: n } = {}, r, i) {
+ r && Xoe(r);
+ let a = n ? n === "svg" : cE(e), o = a ? pse : fse;
function s(n, s) {
let c, l = {
- ...(0, B.useContext)(KT),
+ ...(0, B.useContext)(WT),
...n,
- layoutId: gse(n)
- }, { isStatic: u } = l, d = tse(n), f = o(n, u);
+ layoutId: vse(n)
+ }, { isStatic: u } = l, d = rse(n), f = o(n, u);
if (!u && typeof window < "u") {
- _se(l, r);
- let t = vse(l);
- c = t.MeasureLayout, d.visualElement = mse(e, f, l, i, t.ProjectionNode, a);
+ yse(l, r);
+ let t = bse(l);
+ c = t.MeasureLayout, d.visualElement = gse(e, f, l, i, t.ProjectionNode, a);
}
- return (0, H.jsxs)(aE.Provider, {
+ return (0, H.jsxs)(rE.Provider, {
value: d,
children: [c && d.visualElement ? (0, H.jsx)(c, {
visualElement: d.visualElement,
...l
- }) : null, sse(e, n, pse(f, d.visualElement, s), f, u, t, a)]
+ }) : null, lse(e, n, hse(f, d.visualElement, s), f, u, t, a)]
});
}
s.displayName = `motion.${typeof e == "string" ? e : `create(${e.displayName ?? e.name ?? ""})`}`;
let c = (0, B.forwardRef)(s);
- return c[fse] = e, c;
+ return c[mse] = e, c;
}
-function gse({ layoutId: e }) {
- let t = (0, B.useContext)(HT).id;
+function vse({ layoutId: e }) {
+ let t = (0, B.useContext)(BT).id;
return t && e !== void 0 ? t + "-" + e : e;
}
-function _se(e, t) {
- (0, B.useContext)(ZT).strict;
+function yse(e, t) {
+ (0, B.useContext)(YT).strict;
}
-function vse(e) {
- let { drag: t, layout: n } = eE();
+function bse(e) {
+ let { drag: t, layout: n } = QT();
if (!t && !n) return {};
let r = {
...t,
@@ -30750,20 +30750,20 @@ function vse(e) {
}
//#endregion
//#region node_modules/framer-motion/dist/es/render/components/create-proxy.mjs
-function yse(e, t) {
- if (typeof Proxy > "u") return hE;
- let n = /* @__PURE__ */ new Map(), r = (n, r) => hE(n, r, e, t);
- return new Proxy((e, t) => r(e, t), { get: (i, a) => a === "create" ? r : (n.has(a) || n.set(a, hE(a, void 0, e, t)), n.get(a)) });
+function xse(e, t) {
+ if (typeof Proxy > "u") return pE;
+ let n = /* @__PURE__ */ new Map(), r = (n, r) => pE(n, r, e, t);
+ return new Proxy((e, t) => r(e, t), { get: (i, a) => a === "create" ? r : (n.has(a) || n.set(a, pE(a, void 0, e, t)), n.get(a)) });
}
//#endregion
//#region node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs
-var bse = (e, t) => t.isSVG ?? uE(e) ? new lie(t) : new rie(t, { allowProjection: e !== B.Fragment }), xse = class extends zx {
+var Sse = (e, t) => t.isSVG ?? cE(e) ? new mS(t) : new iS(t, { allowProjection: e !== B.Fragment }), Cse = class extends jx {
constructor(e) {
- super(e), e.animationState ||= mie(e);
+ super(e), e.animationState ||= xS(e);
}
updateAnimationControlsSubscription() {
let { animate: e } = this.node.getProps();
- Ex(e) && (this.unmountControls = e.subscribe(this.node));
+ vx(e) && (this.unmountControls = e.subscribe(this.node));
}
mount() {
this.updateAnimationControlsSubscription();
@@ -30775,11 +30775,11 @@ var bse = (e, t) => t.isSVG ?? uE(e) ? new lie(t) : new rie(t, { allowProjection
unmount() {
this.node.animationState.reset(), this.unmountControls?.();
}
-}, Sse = 0, Cse = {
- animation: { Feature: xse },
- exit: { Feature: class extends zx {
+}, wse = 0, Tse = {
+ animation: { Feature: Cse },
+ exit: { Feature: class extends jx {
constructor() {
- super(...arguments), this.id = Sse++, this.isExitComplete = !1;
+ super(...arguments), this.id = wse++, this.isExitComplete = !1;
}
update() {
if (!this.node.presenceContext) return;
@@ -30789,7 +30789,7 @@ var bse = (e, t) => t.isSVG ?? uE(e) ? new lie(t) : new rie(t, { allowProjection
if (this.isExitComplete) {
let { initial: e, custom: t } = this.node.getProps();
if (typeof e == "string" || typeof e == "object" && e && !Array.isArray(e)) {
- let n = jb(this.node, e, t);
+ let n = Cb(this.node, e, t);
if (n) {
let { transition: e, transitionEnd: t, ...r } = n;
for (let e in r) this.node.getValue(e)?.jump(r[e]);
@@ -30814,21 +30814,21 @@ var bse = (e, t) => t.isSVG ?? uE(e) ? new lie(t) : new rie(t, { allowProjection
};
//#endregion
//#region node_modules/framer-motion/dist/es/events/event-info.mjs
-function gE(e) {
+function mE(e) {
return { point: {
x: e.pageX,
y: e.pageY
} };
}
-var wse = (e) => (t) => ax(t) && e(t, gE(t));
+var Ese = (e) => (t) => Zb(t) && e(t, mE(t));
//#endregion
//#region node_modules/framer-motion/dist/es/events/add-pointer-event.mjs
-function _E(e, t, n, r) {
- return HS(e, t, wse(n), r);
+function hE(e, t, n, r) {
+ return iC(e, t, Ese(n), r);
}
//#endregion
//#region node_modules/framer-motion/dist/es/utils/get-context-window.mjs
-var vE = ({ current: e }) => e ? e.ownerDocument.defaultView : null, yE = /*#__PURE__*/ new Set(["auto", "scroll"]), bE = class {
+var gE = ({ current: e }) => e ? e.ownerDocument.defaultView : null, _E = /*#__PURE__*/ new Set(["auto", "scroll"]), vE = class {
constructor(e, t, { transformPagePoint: n, contextWindow: r = window, dragSnapToOrigin: i = !1, distanceThreshold: a = 3, element: o } = {}) {
if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.lastRawMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.scrollPositions = /* @__PURE__ */ new Map(), this.removeScrollListeners = null, this.onElementScroll = (e) => {
this.handleScroll(e.target);
@@ -30836,13 +30836,13 @@ var vE = ({ current: e }) => e ? e.ownerDocument.defaultView : null, yE = /*#__P
this.handleScroll(window);
}, this.updatePoint = () => {
if (!(this.lastMoveEvent && this.lastMoveEventInfo)) return;
- this.lastRawMoveEventInfo && (this.lastMoveEventInfo = xE(this.lastRawMoveEventInfo, this.transformPagePoint));
- let e = CE(this.lastMoveEventInfo, this.history), t = this.startEvent !== null, n = iae(e.offset, {
+ this.lastRawMoveEventInfo && (this.lastMoveEventInfo = yE(this.lastRawMoveEventInfo, this.transformPagePoint));
+ let e = xE(this.lastMoveEventInfo, this.history), t = this.startEvent !== null, n = Hie(e.offset, {
x: 0,
y: 0
}) >= this.distanceThreshold;
if (!t && !n) return;
- let { point: r } = e, { timestamp: i } = wv;
+ let { point: r } = e, { timestamp: i } = xv;
this.history.push({
...r,
timestamp: i
@@ -30850,33 +30850,33 @@ var vE = ({ current: e }) => e ? e.ownerDocument.defaultView : null, yE = /*#__P
let { onStart: a, onMove: o } = this.handlers;
t || (a && a(this.lastMoveEvent, e), this.startEvent = this.lastMoveEvent), o && o(this.lastMoveEvent, e);
}, this.handlePointerMove = (e, t) => {
- this.lastMoveEvent = e, this.lastRawMoveEventInfo = t, this.lastMoveEventInfo = xE(t, this.transformPagePoint), Sv.update(this.updatePoint, !0);
+ this.lastMoveEvent = e, this.lastRawMoveEventInfo = t, this.lastMoveEventInfo = yE(t, this.transformPagePoint), yv.update(this.updatePoint, !0);
}, this.handlePointerUp = (e, t) => {
this.end();
let { onEnd: n, onSessionEnd: r, resumeAnimation: i } = this.handlers;
if ((this.dragSnapToOrigin || !this.startEvent) && i && i(), !(this.lastMoveEvent && this.lastMoveEventInfo)) return;
- let a = CE(e.type === "pointercancel" ? this.lastMoveEventInfo : xE(t, this.transformPagePoint), this.history);
+ let a = xE(e.type === "pointercancel" ? this.lastMoveEventInfo : yE(t, this.transformPagePoint), this.history);
this.startEvent && n && n(e, a), r && r(e, a);
- }, !ax(e)) return;
+ }, !Zb(e)) return;
this.dragSnapToOrigin = i, this.handlers = t, this.transformPagePoint = n, this.distanceThreshold = a, this.contextWindow = r || window;
- let s = xE(gE(e), this.transformPagePoint), { point: c } = s, { timestamp: l } = wv;
+ let s = yE(mE(e), this.transformPagePoint), { point: c } = s, { timestamp: l } = xv;
this.history = [{
...c,
timestamp: l
}];
let { onSessionStart: u } = t;
- u && u(e, CE(s, this.history));
+ u && u(e, xE(s, this.history));
let d = {
passive: !0,
capture: !0
};
- this.removeListeners = Z_(_E(this.contextWindow, "pointermove", this.handlePointerMove, d), _E(this.contextWindow, "pointerup", this.handlePointerUp, d), _E(this.contextWindow, "pointercancel", this.handlePointerUp, d)), o && this.startScrollTracking(o);
+ this.removeListeners = X_(hE(this.contextWindow, "pointermove", this.handlePointerMove, d), hE(this.contextWindow, "pointerup", this.handlePointerUp, d), hE(this.contextWindow, "pointercancel", this.handlePointerUp, d)), o && this.startScrollTracking(o);
}
startScrollTracking(e) {
let t = e.parentElement;
for (; t;) {
let e = getComputedStyle(t);
- (yE.has(e.overflowX) || yE.has(e.overflowY)) && this.scrollPositions.set(t, {
+ (_E.has(e.overflowX) || _E.has(e.overflowY)) && this.scrollPositions.set(t, {
x: t.scrollLeft,
y: t.scrollTop
}), t = t.parentElement;
@@ -30901,51 +30901,51 @@ var vE = ({ current: e }) => e ? e.ownerDocument.defaultView : null, yE = /*#__P
x: r.x - t.x,
y: r.y - t.y
};
- (i.x !== 0 || i.y !== 0) && (n ? this.lastMoveEventInfo && (this.lastMoveEventInfo.point.x += i.x, this.lastMoveEventInfo.point.y += i.y) : this.history.length > 0 && (this.history[0].x -= i.x, this.history[0].y -= i.y), this.scrollPositions.set(e, r), Sv.update(this.updatePoint, !0));
+ (i.x !== 0 || i.y !== 0) && (n ? this.lastMoveEventInfo && (this.lastMoveEventInfo.point.x += i.x, this.lastMoveEventInfo.point.y += i.y) : this.history.length > 0 && (this.history[0].x -= i.x, this.history[0].y -= i.y), this.scrollPositions.set(e, r), yv.update(this.updatePoint, !0));
}
updateHandlers(e) {
this.handlers = e;
}
end() {
- this.removeListeners && this.removeListeners(), this.removeScrollListeners && this.removeScrollListeners(), this.scrollPositions.clear(), Cv(this.updatePoint);
+ this.removeListeners && this.removeListeners(), this.removeScrollListeners && this.removeScrollListeners(), this.scrollPositions.clear(), bv(this.updatePoint);
}
};
-function xE(e, t) {
+function yE(e, t) {
return t ? { point: t(e.point) } : e;
}
-function SE(e, t) {
+function bE(e, t) {
return {
x: e.x - t.x,
y: e.y - t.y
};
}
-function CE({ point: e }, t) {
+function xE({ point: e }, t) {
return {
point: e,
- delta: SE(e, wE(t)),
- offset: SE(e, Tse(t)),
- velocity: Ese(t, .1)
+ delta: bE(e, SE(t)),
+ offset: bE(e, Dse(t)),
+ velocity: Ose(t, .1)
};
}
-function Tse(e) {
+function Dse(e) {
return e[0];
}
-function wE(e) {
+function SE(e) {
return e[e.length - 1];
}
-function Ese(e, t) {
+function Ose(e, t) {
if (e.length < 2) return {
x: 0,
y: 0
};
- let n = e.length - 1, r = null, i = wE(e);
- for (; n >= 0 && (r = e[n], !(i.timestamp - r.timestamp > /* @__PURE__ */ ev(t)));) n--;
+ let n = e.length - 1, r = null, i = SE(e);
+ for (; n >= 0 && (r = e[n], !(i.timestamp - r.timestamp > /* @__PURE__ */ $_(t)));) n--;
if (!r) return {
x: 0,
y: 0
};
- r === e[0] && e.length > 2 && i.timestamp - r.timestamp > /* @__PURE__ */ ev(t) * 2 && (r = e[1]);
- let a = /* @__PURE__ */ tv(i.timestamp - r.timestamp);
+ r === e[0] && e.length > 2 && i.timestamp - r.timestamp > /* @__PURE__ */ $_(t) * 2 && (r = e[1]);
+ let a = /* @__PURE__ */ ev(i.timestamp - r.timestamp);
if (a === 0) return {
x: 0,
y: 0
@@ -30958,86 +30958,86 @@ function Ese(e, t) {
}
//#endregion
//#region node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs
-function Dse(e, { min: t, max: n }, r) {
- return t !== void 0 && e < t ? e = r ? ry(t, e, r.min) : Math.max(e, t) : n !== void 0 && e > n && (e = r ? ry(n, e, r.max) : Math.min(e, n)), e;
+function kse(e, { min: t, max: n }, r) {
+ return t !== void 0 && e < t ? e = r ? ey(t, e, r.min) : Math.max(e, t) : n !== void 0 && e > n && (e = r ? ey(n, e, r.max) : Math.min(e, n)), e;
}
-function TE(e, t, n) {
+function CE(e, t, n) {
return {
min: t === void 0 ? void 0 : e.min + t,
max: n === void 0 ? void 0 : e.max + n - (e.max - e.min)
};
}
-function Ose(e, { top: t, left: n, bottom: r, right: i }) {
+function Ase(e, { top: t, left: n, bottom: r, right: i }) {
return {
- x: TE(e.x, n, i),
- y: TE(e.y, t, r)
+ x: CE(e.x, n, i),
+ y: CE(e.y, t, r)
};
}
-function EE(e, t) {
+function wE(e, t) {
let n = t.min - e.min, r = t.max - e.max;
return t.max - t.min < e.max - e.min && ([n, r] = [r, n]), {
min: n,
max: r
};
}
-function kse(e, t) {
+function jse(e, t) {
return {
- x: EE(e.x, t.x),
- y: EE(e.y, t.y)
+ x: wE(e.x, t.x),
+ y: wE(e.y, t.y)
};
}
-function Ase(e, t) {
- let n = .5, r = xS(e), i = xS(t);
- return i > r ? n = /* @__PURE__ */ Q_(t.min, t.max - r, e.min) : r > i && (n = /* @__PURE__ */ Q_(e.min, e.max - i, t.min)), W_(0, 1, n);
+function Mse(e, t) {
+ let n = .5, r = MS(e), i = MS(t);
+ return i > r ? n = /* @__PURE__ */ Z_(t.min, t.max - r, e.min) : r > i && (n = /* @__PURE__ */ Z_(e.min, e.max - i, t.min)), U_(0, 1, n);
}
-function jse(e, t) {
+function Nse(e, t) {
let n = {};
return t.min !== void 0 && (n.min = t.min - e.min), t.max !== void 0 && (n.max = t.max - e.min), n;
}
-var DE = .35;
-function Mse(e = DE) {
- return e === !1 ? e = 0 : e === !0 && (e = DE), {
- x: OE(e, "left", "right"),
- y: OE(e, "top", "bottom")
+var TE = .35;
+function Pse(e = TE) {
+ return e === !1 ? e = 0 : e === !0 && (e = TE), {
+ x: EE(e, "left", "right"),
+ y: EE(e, "top", "bottom")
};
}
-function OE(e, t, n) {
+function EE(e, t, n) {
return {
- min: kE(e, t),
- max: kE(e, n)
+ min: DE(e, t),
+ max: DE(e, n)
};
}
-function kE(e, t) {
+function DE(e, t) {
return typeof e == "number" ? e : e[t] || 0;
}
//#endregion
//#region node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs
-var Nse = /* @__PURE__ */ new WeakMap(), Pse = class {
+var Fse = /* @__PURE__ */ new WeakMap(), Ise = class {
constructor(e) {
this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = {
x: 0,
y: 0
- }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = Tx(), this.latestPointerEvent = null, this.latestPanInfo = null, this.visualElement = e;
+ }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = _x(), this.latestPointerEvent = null, this.latestPanInfo = null, this.visualElement = e;
}
start(e, { snapToCursor: t = !1, distanceThreshold: n } = {}) {
let { presenceContext: r } = this.visualElement;
if (r && r.isPresent === !1) return;
let i = (e) => {
- t && this.snapToCursor(gE(e).point), this.stopAnimation();
+ t && this.snapToCursor(mE(e).point), this.stopAnimation();
}, a = (e, t) => {
let { drag: n, dragPropagation: r, onDragStart: i } = this.getProps();
- if (n && !r && (this.openDragLock && this.openDragLock(), this.openDragLock = xre(n), !this.openDragLock)) return;
- this.latestPointerEvent = e, this.latestPanInfo = t, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), LS((e) => {
+ if (n && !r && (this.openDragLock && this.openDragLock(), this.openDragLock = kre(n), !this.openDragLock)) return;
+ this.latestPointerEvent = e, this.latestPanInfo = t, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), $S((e) => {
let t = this.getAxisMotionValue(e).get() || 0;
- if (Wv.test(t)) {
+ if (Vv.test(t)) {
let { projection: n } = this.visualElement;
if (n && n.layout) {
let r = n.layout.layoutBox[e];
- r && (t = xS(r) * (parseFloat(t) / 100));
+ r && (t = MS(r) * (parseFloat(t) / 100));
}
}
this.originPoint[e] = t;
- }), i && Sv.update(() => i(e, t), !1, !0), Fb(this.visualElement, "transform");
+ }), i && yv.update(() => i(e, t), !1, !0), Db(this.visualElement, "transform");
let { animationState: a } = this.visualElement;
a && a.setActive("whileDrag", !0);
}, o = (e, t) => {
@@ -31046,10 +31046,10 @@ var Nse = /* @__PURE__ */ new WeakMap(), Pse = class {
if (!n && !this.openDragLock) return;
let { offset: o } = t;
if (r && this.currentDirection === null) {
- this.currentDirection = Ise(o), this.currentDirection !== null && i && i(this.currentDirection);
+ this.currentDirection = Rse(o), this.currentDirection !== null && i && i(this.currentDirection);
return;
}
- this.updateAxis("x", t.point, o), this.updateAxis("y", t.point, o), this.visualElement.render(), a && Sv.update(() => a(e, t), !1, !0);
+ this.updateAxis("x", t.point, o), this.updateAxis("y", t.point, o), this.visualElement.render(), a && yv.update(() => a(e, t), !1, !0);
}, s = (e, t) => {
this.latestPointerEvent = e, this.latestPanInfo = t, this.stop(e, t), this.latestPointerEvent = null, this.latestPanInfo = null;
}, c = () => {
@@ -31059,7 +31059,7 @@ var Nse = /* @__PURE__ */ new WeakMap(), Pse = class {
y: 0
});
}, { dragSnapToOrigin: l } = this.getProps();
- this.panSession = new bE(e, {
+ this.panSession = new vE(e, {
onSessionStart: i,
onStart: a,
onMove: o,
@@ -31069,7 +31069,7 @@ var Nse = /* @__PURE__ */ new WeakMap(), Pse = class {
transformPagePoint: this.visualElement.getTransformPagePoint(),
dragSnapToOrigin: l,
distanceThreshold: n,
- contextWindow: vE(this.visualElement),
+ contextWindow: gE(this.visualElement),
element: this.visualElement.current
});
}
@@ -31079,7 +31079,7 @@ var Nse = /* @__PURE__ */ new WeakMap(), Pse = class {
let { velocity: a } = r;
this.startAnimation(a);
let { onDragEnd: o } = this.getProps();
- o && Sv.postRender(() => o(n, r));
+ o && yv.postRender(() => o(n, r));
}
cancel() {
this.isDragging = !1;
@@ -31093,32 +31093,32 @@ var Nse = /* @__PURE__ */ new WeakMap(), Pse = class {
}
updateAxis(e, t, n) {
let { drag: r } = this.getProps();
- if (!n || !jE(e, r, this.currentDirection)) return;
+ if (!n || !kE(e, r, this.currentDirection)) return;
let i = this.getAxisMotionValue(e), a = this.originPoint[e] + n[e];
- this.constraints && this.constraints[e] && (a = Dse(a, this.constraints[e], this.elastic[e])), i.set(a);
+ this.constraints && this.constraints[e] && (a = kse(a, this.constraints[e], this.elastic[e])), i.set(a);
}
resolveConstraints() {
let { dragConstraints: e, dragElastic: t } = this.getProps(), n = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : this.visualElement.projection?.layout, r = this.constraints;
- e && pE(e) ? this.constraints ||= this.resolveRefConstraints() : this.constraints = e && n ? Ose(n.layoutBox, e) : !1, this.elastic = Mse(t), r !== this.constraints && !pE(e) && n && this.constraints && !this.hasMutatedConstraints && LS((e) => {
- this.constraints !== !1 && this.getAxisMotionValue(e) && (this.constraints[e] = jse(n.layoutBox[e], this.constraints[e]));
+ e && dE(e) ? this.constraints ||= this.resolveRefConstraints() : this.constraints = e && n ? Ase(n.layoutBox, e) : !1, this.elastic = Pse(t), r !== this.constraints && !dE(e) && n && this.constraints && !this.hasMutatedConstraints && $S((e) => {
+ this.constraints !== !1 && this.getAxisMotionValue(e) && (this.constraints[e] = Nse(n.layoutBox[e], this.constraints[e]));
});
}
resolveRefConstraints() {
let { dragConstraints: e, onMeasureDragConstraints: t } = this.getProps();
- if (!e || !pE(e)) return !1;
+ if (!e || !dE(e)) return !1;
let n = e.current, { projection: r } = this.visualElement;
if (!r || !r.layout) return !1;
r.root && (r.root.scroll = void 0, r.root.updateScroll());
- let i = Zre(n, r.root, this.visualElement.getTransformPagePoint()), a = kse(r.layout.layoutBox, i);
+ let i = aie(n, r.root, this.visualElement.getTransformPagePoint()), a = jse(r.layout.layoutBox, i);
if (t) {
- let e = t(Jre(a));
- this.hasMutatedConstraints = !!e, e && (a = Bx(e));
+ let e = t(nie(a));
+ this.hasMutatedConstraints = !!e, e && (a = Mx(e));
}
return a;
}
startAnimation(e) {
- let { drag: t, dragMomentum: n, dragElastic: r, dragTransition: i, dragSnapToOrigin: a, onDragTransitionEnd: o } = this.getProps(), s = this.constraints || {}, c = LS((o) => {
- if (!jE(o, t, this.currentDirection)) return;
+ let { drag: t, dragMomentum: n, dragElastic: r, dragTransition: i, dragSnapToOrigin: a, onDragTransitionEnd: o } = this.getProps(), s = this.constraints || {}, c = $S((o) => {
+ if (!kE(o, t, this.currentDirection)) return;
let c = s && s[o] || {};
(a === !0 || a === o) && (c = {
min: 0,
@@ -31141,65 +31141,65 @@ var Nse = /* @__PURE__ */ new WeakMap(), Pse = class {
}
startAxisValueAnimation(e, t) {
let n = this.getAxisMotionValue(e);
- return Fb(this.visualElement, e), n.start(Db(e, n, 0, t, this.visualElement, !1));
+ return Db(this.visualElement, e), n.start(yb(e, n, 0, t, this.visualElement, !1));
}
stopAnimation() {
- LS((e) => this.getAxisMotionValue(e).stop());
+ $S((e) => this.getAxisMotionValue(e).stop());
}
getAxisMotionValue(e) {
let t = `_drag${e.toUpperCase()}`;
return this.visualElement.getProps()[t] || this.visualElement.getValue(e, this.visualElement.latestValues[e] ?? 0);
}
snapToCursor(e) {
- LS((t) => {
+ $S((t) => {
let { drag: n } = this.getProps();
- if (!jE(t, n, this.currentDirection)) return;
+ if (!kE(t, n, this.currentDirection)) return;
let { projection: r } = this.visualElement, i = this.getAxisMotionValue(t);
if (r && r.layout) {
let { min: n, max: a } = r.layout.layoutBox[t], o = i.get() || 0;
- i.set(e[t] - ry(n, a, .5) + o);
+ i.set(e[t] - ey(n, a, .5) + o);
}
});
}
scalePositionWithinConstraints() {
if (!this.visualElement.current) return;
let { drag: e, dragConstraints: t } = this.getProps(), { projection: n } = this.visualElement;
- if (!pE(t) || !n || !this.constraints) return;
+ if (!dE(t) || !n || !this.constraints) return;
this.stopAnimation();
let r = {
x: 0,
y: 0
};
- LS((e) => {
+ $S((e) => {
let t = this.getAxisMotionValue(e);
if (t && this.constraints !== !1) {
let n = t.get();
- r[e] = Ase({
+ r[e] = Mse({
min: n,
max: n
}, this.constraints[e]);
}
});
let { transformTemplate: i } = this.visualElement.getProps();
- this.visualElement.current.style.transform = i ? i({}, "") : "none", n.root && n.root.updateScroll(), n.updateLayout(), this.constraints = !1, this.resolveConstraints(), LS((t) => {
- if (!jE(t, e, null)) return;
+ this.visualElement.current.style.transform = i ? i({}, "") : "none", n.root && n.root.updateScroll(), n.updateLayout(), this.constraints = !1, this.resolveConstraints(), $S((t) => {
+ if (!kE(t, e, null)) return;
let n = this.getAxisMotionValue(t), { min: i, max: a } = this.constraints[t];
- n.set(ry(i, a, r[t]));
+ n.set(ey(i, a, r[t]));
}), this.visualElement.render();
}
addListeners() {
if (!this.visualElement.current) return;
- Nse.set(this.visualElement, this);
- let e = this.visualElement.current, t = _E(e, "pointerdown", (t) => {
- let { drag: n, dragListener: r = !0 } = this.getProps(), i = t.target, a = i !== e && Dre(i);
+ Fse.set(this.visualElement, this);
+ let e = this.visualElement.current, t = hE(e, "pointerdown", (t) => {
+ let { drag: n, dragListener: r = !0 } = this.getProps(), i = t.target, a = i !== e && Fre(i);
n && r && !a && this.start(t);
}), n, r = () => {
let { dragConstraints: t } = this.getProps();
- pE(t) && t.current && (this.constraints = this.resolveRefConstraints(), n ||= Fse(e, t.current, () => this.scalePositionWithinConstraints()));
+ dE(t) && t.current && (this.constraints = this.resolveRefConstraints(), n ||= Lse(e, t.current, () => this.scalePositionWithinConstraints()));
}, { projection: i } = this.visualElement, a = i.addEventListener("measure", r);
- i && !i.layout && (i.root && i.root.updateScroll(), i.updateLayout()), Sv.read(r);
- let o = HS(window, "resize", () => this.scalePositionWithinConstraints()), s = i.addEventListener("didUpdate", (({ delta: e, hasLayoutChanged: t }) => {
- this.isDragging && t && (LS((t) => {
+ i && !i.layout && (i.root && i.root.updateScroll(), i.updateLayout()), yv.read(r);
+ let o = iC(window, "resize", () => this.scalePositionWithinConstraints()), s = i.addEventListener("didUpdate", (({ delta: e, hasLayoutChanged: t }) => {
+ this.isDragging && t && ($S((t) => {
let n = this.getAxisMotionValue(t);
n && (this.originPoint[t] += e[t].translate, n.set(n.get() + e[t].translate));
}), this.visualElement.render());
@@ -31209,7 +31209,7 @@ var Nse = /* @__PURE__ */ new WeakMap(), Pse = class {
};
}
getProps() {
- let e = this.visualElement.getProps(), { drag: t = !1, dragDirectionLock: n = !1, dragPropagation: r = !1, dragConstraints: i = !1, dragElastic: a = DE, dragMomentum: o = !0 } = e;
+ let e = this.visualElement.getProps(), { drag: t = !1, dragDirectionLock: n = !1, dragPropagation: r = !1, dragConstraints: i = !1, dragElastic: a = TE, dragMomentum: o = !0 } = e;
return {
...e,
drag: t,
@@ -31221,7 +31221,7 @@ var Nse = /* @__PURE__ */ new WeakMap(), Pse = class {
};
}
};
-function AE(e) {
+function OE(e) {
let t = !0;
return () => {
if (t) {
@@ -31231,28 +31231,28 @@ function AE(e) {
e();
};
}
-function Fse(e, t, n) {
- let r = vx(e, AE(n)), i = vx(t, AE(n));
+function Lse(e, t, n) {
+ let r = ux(e, OE(n)), i = ux(t, OE(n));
return () => {
r(), i();
};
}
-function jE(e, t, n) {
+function kE(e, t, n) {
return (t === !0 || t === e) && (n === null || n === e);
}
-function Ise(e, t = 10) {
+function Rse(e, t = 10) {
let n = null;
return Math.abs(e.y) > t ? n = "y" : Math.abs(e.x) > t && (n = "x"), n;
}
//#endregion
//#region node_modules/framer-motion/dist/es/gestures/drag/index.mjs
-var Lse = class extends zx {
+var zse = class extends jx {
constructor(e) {
- super(e), this.removeGroupControls = X_, this.removeListeners = X_, this.controls = new Pse(e);
+ super(e), this.removeGroupControls = Y_, this.removeListeners = Y_, this.controls = new Ise(e);
}
mount() {
let { dragControls: e } = this.node.getProps();
- e && (this.removeGroupControls = e.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() || X_;
+ e && (this.removeGroupControls = e.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() || Y_;
}
update() {
let { dragControls: e } = this.node.getProps(), { dragControls: t } = this.node.prevProps || {};
@@ -31261,31 +31261,31 @@ var Lse = class extends zx {
unmount() {
this.removeGroupControls(), this.removeListeners(), this.controls.isDragging || this.controls.endPanSession();
}
-}, ME = (e) => (t, n) => {
- e && Sv.update(() => e(t, n), !1, !0);
-}, Rse = class extends zx {
+}, AE = (e) => (t, n) => {
+ e && yv.update(() => e(t, n), !1, !0);
+}, Bse = class extends jx {
constructor() {
- super(...arguments), this.removePointerDownListener = X_;
+ super(...arguments), this.removePointerDownListener = Y_;
}
onPointerDown(e) {
- this.session = new bE(e, this.createPanHandlers(), {
+ this.session = new vE(e, this.createPanHandlers(), {
transformPagePoint: this.node.getTransformPagePoint(),
- contextWindow: vE(this.node)
+ contextWindow: gE(this.node)
});
}
createPanHandlers() {
let { onPanSessionStart: e, onPanStart: t, onPan: n, onPanEnd: r } = this.node.getProps();
return {
- onSessionStart: ME(e),
- onStart: ME(t),
- onMove: ME(n),
+ onSessionStart: AE(e),
+ onStart: AE(t),
+ onMove: AE(n),
onEnd: (e, t) => {
- delete this.session, r && Sv.postRender(() => r(e, t));
+ delete this.session, r && yv.postRender(() => r(e, t));
}
};
}
mount() {
- this.removePointerDownListener = _E(this.node.current, "pointerdown", (e) => this.onPointerDown(e));
+ this.removePointerDownListener = hE(this.node.current, "pointerdown", (e) => this.onPointerDown(e));
}
update() {
this.session && this.session.updateHandlers(this.createPanHandlers());
@@ -31293,36 +31293,36 @@ var Lse = class extends zx {
unmount() {
this.removePointerDownListener(), this.session && this.session.end();
}
-}, NE = !1, zse = class extends B.Component {
+}, jE = !1, Vse = class extends B.Component {
componentDidMount() {
let { visualElement: e, layoutGroup: t, switchLayoutGroup: n, layoutId: r } = this.props, { projection: i } = e;
- i && (t.group && t.group.add(i), n && n.register && r && n.register(i), NE && i.root.didUpdate(), i.addEventListener("animationComplete", () => {
+ i && (t.group && t.group.add(i), n && n.register && r && n.register(i), jE && i.root.didUpdate(), i.addEventListener("animationComplete", () => {
this.safeToRemove();
}), i.setOptions({
...i.options,
layoutDependency: this.props.layoutDependency,
onExitComplete: () => this.safeToRemove()
- })), WS.hasEverUpdated = !0;
+ })), oC.hasEverUpdated = !0;
}
getSnapshotBeforeUpdate(e) {
let { layoutDependency: t, visualElement: n, drag: r, isPresent: i } = this.props, { projection: a } = n;
return a ? (a.isPresent = i, e.layoutDependency !== t && a.setOptions({
...a.options,
layoutDependency: t
- }), NE = !0, r || e.layoutDependency !== t || t === void 0 || e.isPresent !== i ? a.willUpdate() : this.safeToRemove(), e.isPresent !== i && (i ? a.promote() : a.relegate() || Sv.postRender(() => {
+ }), jE = !0, r || e.layoutDependency !== t || t === void 0 || e.isPresent !== i ? a.willUpdate() : this.safeToRemove(), e.isPresent !== i && (i ? a.promote() : a.relegate() || yv.postRender(() => {
let e = a.getStack();
(!e || !e.members.length) && this.safeToRemove();
})), null) : null;
}
componentDidUpdate() {
let { visualElement: e, layoutAnchor: t } = this.props, { projection: n } = e;
- n && (n.options.layoutAnchor = t, n.root.didUpdate(), ex.postRender(() => {
+ n && (n.options.layoutAnchor = t, n.root.didUpdate(), Kb.postRender(() => {
!n.currentAnimation && n.isLead() && this.safeToRemove();
}));
}
componentWillUnmount() {
let { visualElement: e, layoutGroup: t, switchLayoutGroup: n } = this.props, { projection: r } = e;
- NE = !0, r && (r.scheduleCheckAfterUnmount(), t && t.group && t.group.remove(r), n && n.deregister && n.deregister(r));
+ jE = !0, r && (r.scheduleCheckAfterUnmount(), t && t.group && t.group.remove(r), n && n.deregister && n.deregister(r));
}
safeToRemove() {
let { safeToRemove: e } = this.props;
@@ -31332,41 +31332,41 @@ var Lse = class extends zx {
return null;
}
};
-function PE(e) {
- let [t, n] = JT(), r = (0, B.useContext)(HT);
- return (0, H.jsx)(zse, {
+function ME(e) {
+ let [t, n] = KT(), r = (0, B.useContext)(BT);
+ return (0, H.jsx)(Vse, {
...e,
layoutGroup: r,
- switchLayoutGroup: (0, B.useContext)(fE),
+ switchLayoutGroup: (0, B.useContext)(uE),
isPresent: t,
safeToRemove: n
});
}
//#endregion
//#region node_modules/framer-motion/dist/es/motion/features/drag.mjs
-var Bse = {
- pan: { Feature: Rse },
+var Hse = {
+ pan: { Feature: Bse },
drag: {
- Feature: Lse,
- ProjectionNode: oC,
- MeasureLayout: PE
+ Feature: zse,
+ ProjectionNode: SC,
+ MeasureLayout: ME
}
};
//#endregion
//#region node_modules/framer-motion/dist/es/gestures/hover.mjs
-function FE(e, t, n) {
+function NE(e, t, n) {
let { props: r } = e;
e.animationState && r.whileHover && e.animationState.setActive("whileHover", n === "Start");
let i = r["onHover" + n];
- i && Sv.postRender(() => i(t, gE(t)));
+ i && yv.postRender(() => i(t, mE(t)));
}
-var Vse = class extends zx {
+var Use = class extends jx {
mount() {
let { current: e } = this.node;
- e && (this.unmount = Cre(e, (e, t) => (FE(this.node, t, "Start"), (e) => FE(this.node, e, "End"))));
+ e && (this.unmount = jre(e, (e, t) => (NE(this.node, t, "Start"), (e) => NE(this.node, e, "End"))));
}
unmount() {}
-}, Hse = class extends zx {
+}, Wse = class extends jx {
constructor() {
super(...arguments), this.isActive = !1;
}
@@ -31383,57 +31383,57 @@ var Vse = class extends zx {
!this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
}
mount() {
- this.unmount = Z_(HS(this.node.current, "focus", () => this.onFocus()), HS(this.node.current, "blur", () => this.onBlur()));
+ this.unmount = X_(iC(this.node.current, "focus", () => this.onFocus()), iC(this.node.current, "blur", () => this.onBlur()));
}
unmount() {}
};
//#endregion
//#region node_modules/framer-motion/dist/es/gestures/press.mjs
-function IE(e, t, n) {
+function PE(e, t, n) {
let { props: r } = e;
if (e.current instanceof HTMLButtonElement && e.current.disabled) return;
e.animationState && r.whileTap && e.animationState.setActive("whileTap", n === "Start");
let i = r["onTap" + (n === "End" ? "" : n)];
- i && Sv.postRender(() => i(t, gE(t)));
+ i && yv.postRender(() => i(t, mE(t)));
}
-var Use = class extends zx {
+var Gse = class extends jx {
mount() {
let { current: e } = this.node;
if (!e) return;
let { globalTapTarget: t, propagate: n } = this.node.props;
- this.unmount = kre(e, (e, t) => (IE(this.node, t, "Start"), (e, { success: t }) => IE(this.node, e, t ? "End" : "Cancel")), {
+ this.unmount = Lre(e, (e, t) => (PE(this.node, t, "Start"), (e, { success: t }) => PE(this.node, e, t ? "End" : "Cancel")), {
useGlobalTarget: t,
stopPropagation: n?.tap === !1
});
}
unmount() {}
-}, LE = /* @__PURE__ */ new WeakMap(), RE = /* @__PURE__ */ new WeakMap(), Wse = (e) => {
- let t = LE.get(e.target);
+}, FE = /* @__PURE__ */ new WeakMap(), IE = /* @__PURE__ */ new WeakMap(), Kse = (e) => {
+ let t = FE.get(e.target);
t && t(e);
-}, Gse = (e) => {
- e.forEach(Wse);
+}, qse = (e) => {
+ e.forEach(Kse);
};
-function Kse({ root: e, ...t }) {
+function Jse({ root: e, ...t }) {
let n = e || document;
- RE.has(n) || RE.set(n, {});
- let r = RE.get(n), i = JSON.stringify(t);
- return r[i] || (r[i] = new IntersectionObserver(Gse, {
+ IE.has(n) || IE.set(n, {});
+ let r = IE.get(n), i = JSON.stringify(t);
+ return r[i] || (r[i] = new IntersectionObserver(qse, {
root: e,
...t
})), r[i];
}
-function qse(e, t, n) {
- let r = Kse(t);
- return LE.set(e, n), r.observe(e), () => {
- LE.delete(e), r.unobserve(e);
+function Yse(e, t, n) {
+ let r = Jse(t);
+ return FE.set(e, n), r.observe(e), () => {
+ FE.delete(e), r.unobserve(e);
};
}
//#endregion
//#region node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs
-var Jse = {
+var Xse = {
some: 0,
all: 1
-}, Yse = class extends zx {
+}, Zse = class extends jx {
constructor() {
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
}
@@ -31442,7 +31442,7 @@ var Jse = {
let { viewport: e = {} } = this.node.getProps(), { root: t, margin: n, amount: r = "some", once: i } = e, a = {
root: t ? t.current : void 0,
rootMargin: n,
- threshold: typeof r == "number" ? r : Jse[r]
+ threshold: typeof r == "number" ? r : Xse[r]
}, o = (e) => {
let { isIntersecting: t } = e;
if (this.isInView === t || (this.isInView = t, i && !t && this.hasEnteredView)) return;
@@ -31450,7 +31450,7 @@ var Jse = {
let { onViewportEnter: n, onViewportLeave: r } = this.node.getProps(), a = t ? n : r;
a && a(e);
};
- this.stopObserver = qse(this.node.current, a, o);
+ this.stopObserver = Yse(this.node.current, a, o);
}
mount() {
this.startObserver();
@@ -31462,34 +31462,34 @@ var Jse = {
"amount",
"margin",
"root"
- ].some(Xse(e, t)) && this.startObserver();
+ ].some(Qse(e, t)) && this.startObserver();
}
unmount() {
this.stopObserver?.(), this.hasEnteredView = !1, this.isInView = !1;
}
};
-function Xse({ viewport: e = {} }, { viewport: t = {} } = {}) {
+function Qse({ viewport: e = {} }, { viewport: t = {} } = {}) {
return (n) => e[n] !== t[n];
}
//#endregion
//#region node_modules/framer-motion/dist/es/motion/features/gestures.mjs
-var Zse = {
- inView: { Feature: Yse },
- tap: { Feature: Use },
- focus: { Feature: Hse },
- hover: { Feature: Vse }
-}, Qse = { layout: {
- ProjectionNode: oC,
- MeasureLayout: PE
-} }, $se = /*@__PURE__*/ yse({
- ...Cse,
- ...Zse,
- ...Bse,
- ...Qse
-}, bse);
+var $se = {
+ inView: { Feature: Zse },
+ tap: { Feature: Gse },
+ focus: { Feature: Wse },
+ hover: { Feature: Use }
+}, ece = { layout: {
+ ProjectionNode: SC,
+ MeasureLayout: ME
+} }, tce = /*@__PURE__*/ xse({
+ ...Tse,
+ ...$se,
+ ...Hse,
+ ...ece
+}, Sse);
//#endregion
//#region node_modules/framer-motion/dist/es/utils/use-motion-value-event.mjs
-function zE(e, t, n) {
+function LE(e, t, n) {
(0, B.useInsertionEffect)(() => e.on(t, n), [
e,
t,
@@ -31498,8 +31498,8 @@ function zE(e, t, n) {
}
//#endregion
//#region node_modules/framer-motion/dist/es/value/use-motion-value.mjs
-function BE(e) {
- let t = UT(() => wb(e)), { isStatic: n } = (0, B.useContext)(KT);
+function RE(e) {
+ let t = VT(() => gb(e)), { isStatic: n } = (0, B.useContext)(WT);
if (n) {
let [, n] = (0, B.useState)(e);
(0, B.useEffect)(() => t.on("change", n), []);
@@ -31508,28 +31508,28 @@ function BE(e) {
}
//#endregion
//#region node_modules/framer-motion/dist/es/value/use-combine-values.mjs
-function VE(e, t) {
- let n = BE(t()), r = () => n.set(t());
- return r(), WT(() => {
- let t = () => Sv.preRender(r, !1, !0), n = e.map((e) => e.on("change", t));
+function zE(e, t) {
+ let n = RE(t()), r = () => n.set(t());
+ return r(), HT(() => {
+ let t = () => yv.preRender(r, !1, !0), n = e.map((e) => e.on("change", t));
return () => {
- n.forEach((e) => e()), Cv(r);
+ n.forEach((e) => e()), bv(r);
};
}), n;
}
//#endregion
//#region node_modules/framer-motion/dist/es/value/use-computed.mjs
-function ece(e) {
- Sb.current = [], e();
- let t = VE(Sb.current, e);
- return Sb.current = void 0, t;
+function nce(e) {
+ hb.current = [], e();
+ let t = zE(hb.current, e);
+ return hb.current = void 0, t;
}
//#endregion
//#region node_modules/framer-motion/dist/es/value/use-transform.mjs
-function HE(e, t, n, r) {
- if (typeof e == "function") return ece(e);
- if (n !== void 0 && !Array.isArray(n) && typeof t != "function") return tce(e, t, n, r);
- let i = typeof t == "function" ? t : zre(t, n, r), a = Array.isArray(e) ? UE(e, i) : UE([e], ([e]) => i(e)), o = Array.isArray(e) ? void 0 : e.accelerate;
+function BE(e, t, n, r) {
+ if (typeof e == "function") return nce(e);
+ if (n !== void 0 && !Array.isArray(n) && typeof t != "function") return rce(e, t, n, r);
+ let i = typeof t == "function" ? t : qre(t, n, r), a = Array.isArray(e) ? VE(e, i) : VE([e], ([e]) => i(e)), o = Array.isArray(e) ? void 0 : e.accelerate;
return o && !o.isTransformed && typeof t != "function" && Array.isArray(n) && r?.clamp !== !1 && (a.accelerate = {
...o,
times: t,
@@ -31538,56 +31538,56 @@ function HE(e, t, n, r) {
...r?.ease ? { ease: r.ease } : {}
}), a;
}
-function UE(e, t) {
- let n = UT(() => []);
- return VE(e, () => {
+function VE(e, t) {
+ let n = VT(() => []);
+ return zE(e, () => {
n.length = 0;
let r = e.length;
for (let t = 0; t < r; t++) n[t] = e[t].get();
return t(n);
});
}
-function tce(e, t, n, r) {
- let i = UT(() => Object.keys(n)), a = UT(() => ({}));
- for (let o of i) a[o] = HE(e, t, n[o], r);
+function rce(e, t, n, r) {
+ let i = VT(() => Object.keys(n)), a = VT(() => ({}));
+ for (let o of i) a[o] = BE(e, t, n[o], r);
return a;
}
//#endregion
//#region node_modules/framer-motion/dist/es/value/use-follow-value.mjs
-function nce(e, t = {}) {
- let { isStatic: n } = (0, B.useContext)(KT), r = () => Pb(e) ? e.get() : e;
- if (n) return HE(r);
- let i = BE(r());
- return (0, B.useInsertionEffect)(() => Bre(i, e, t), [i, JSON.stringify(t)]), i;
+function ice(e, t = {}) {
+ let { isStatic: n } = (0, B.useContext)(WT), r = () => Eb(e) ? e.get() : e;
+ if (n) return BE(r);
+ let i = RE(r());
+ return (0, B.useInsertionEffect)(() => Jre(i, e, t), [i, JSON.stringify(t)]), i;
}
//#endregion
//#region node_modules/framer-motion/dist/es/value/use-spring.mjs
-function WE(e, t = {}) {
- return nce(e, {
+function HE(e, t = {}) {
+ return ice(e, {
type: "spring",
...t
});
}
//#endregion
//#region node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.mjs
-function rce() {
- !Nx.current && Px();
- let [e] = (0, B.useState)(Mx.current);
+function ace() {
+ !Tx.current && Ex();
+ let [e] = (0, B.useState)(wx.current);
return e;
}
//#endregion
//#region node_modules/motion/dist/es/react.mjs
-var GE = $se, KE = null;
-function ice() {
- return KE?.isConnected || (KE = document.createElement("div"), KE.className = "peach-react", KE.dataset.reactOverlays = "", document.body.append(KE)), KE;
+var UE = tce, WE = null;
+function oce() {
+ return WE?.isConnected || (WE = document.createElement("div"), WE.className = "peach-react", WE.dataset.reactOverlays = "", document.body.append(WE)), WE;
}
-function qE({ children: e }) {
- return /* @__PURE__ */ (0, H.jsx)(ow, {
+function GE({ children: e }) {
+ return /* @__PURE__ */ (0, H.jsx)(iw, {
client: z,
- children: /* @__PURE__ */ (0, H.jsx)($oe, {
+ children: /* @__PURE__ */ (0, H.jsx)(tse, {
reducedMotion: "user",
children: /* @__PURE__ */ (0, H.jsx)(Gp, {
- getContainer: ice,
+ getContainer: oce,
children: e
})
})
@@ -31595,16 +31595,16 @@ function qE({ children: e }) {
}
//#endregion
//#region src/react/components/selection-dock.tsx
-var JE = "(prefers-reduced-motion: reduce)", ace = () => matchMedia(JE).matches, oce = (e) => {
- let t = matchMedia(JE);
+var KE = "(prefers-reduced-motion: reduce)", sce = () => matchMedia(KE).matches, cce = (e) => {
+ let t = matchMedia(KE);
return t.addEventListener("change", e), () => t.removeEventListener("change", e);
};
-function sce({ children: e, count: t, label: n }) {
- let r = Woe(), i = (0, B.useSyncExternalStore)(oce, ace, () => !1), { isFocusVisible: a } = La(), o = i || a, s = {
+function lce({ children: e, count: t, label: n }) {
+ let r = Koe(), i = (0, B.useSyncExternalStore)(cce, sce, () => !1), { isFocusVisible: a } = La(), o = i || a, s = {
opacity: 0,
transform: "translate(-50%, 8px)"
};
- return /* @__PURE__ */ (0, H.jsxs)(GE.div, {
+ return /* @__PURE__ */ (0, H.jsxs)(UE.div, {
role: "group",
"aria-label": n,
"data-selection-dock": !0,
@@ -31636,18 +31636,18 @@ function sce({ children: e, count: t, label: n }) {
}), e]
});
}
-function YE({ visible: e, ...t }) {
- return /* @__PURE__ */ (0, H.jsx)(Koe, { children: e ? /* @__PURE__ */ (0, H.jsx)(sce, { ...t }, "selection") : null });
+function qE({ visible: e, ...t }) {
+ return /* @__PURE__ */ (0, H.jsx)(Joe, { children: e ? /* @__PURE__ */ (0, H.jsx)(lce, { ...t }, "selection") : null });
}
//#endregion
//#region src/react/batch-dock/batch-dock-api.ts
-var XE = {
+var JE = {
group: "clear",
operation: "clear",
label: "取消",
glyph: "x"
};
-function cce(e, t = !1) {
+function uce(e, t = !1) {
switch (e) {
case "trash": return [
{
@@ -31663,7 +31663,7 @@ function cce(e, t = !1) {
glyph: "trash",
danger: !0
},
- XE
+ JE
];
case "junk": return [
t ? {
@@ -31684,7 +31684,7 @@ function cce(e, t = !1) {
glyph: "trash",
danger: !0
},
- XE
+ JE
];
case "follow": return [
{
@@ -31705,7 +31705,7 @@ function cce(e, t = !1) {
label: "忽略",
glyph: "eye-off"
},
- XE
+ JE
];
default: return [
{
@@ -31739,42 +31739,42 @@ function cce(e, t = !1) {
glyph: "trash",
danger: !0
},
- XE
+ JE
];
}
}
//#endregion
//#region src/react/batch-dock/batch-dock-island.tsx
-var ZE = null, QE = null, $E = {
+var YE = null, XE = null, ZE = {
count: 0,
context: "catalog",
junkDismissed: !1
};
-function eD() {
- let e = ZE;
- if (!e || !QE) return;
- let t = $E;
- (0, Dt.flushSync)(() => QE.render(/* @__PURE__ */ (0, H.jsx)(qE, { children: /* @__PURE__ */ (0, H.jsx)(dce, {
+function QE() {
+ let e = YE;
+ if (!e || !XE) return;
+ let t = ZE;
+ (0, Dt.flushSync)(() => XE.render(/* @__PURE__ */ (0, H.jsx)(GE, { children: /* @__PURE__ */ (0, H.jsx)(pce, {
host: e,
props: t
}) })));
}
-var lce = { render(e) {
- $E = e, eD();
+var dce = { render(e) {
+ ZE = e, QE();
} };
-function uce(e) {
- return ZE = e, QE = (0, Ot.createRoot)(e.root), eD(), lce;
+function fce(e) {
+ return YE = e, XE = (0, Ot.createRoot)(e.root), QE(), dce;
}
-function dce({ host: e, props: t }) {
+function pce({ host: e, props: t }) {
return /* @__PURE__ */ (0, H.jsx)("div", {
className: "peach-react",
"data-batch-scope": "",
"data-context": t.context,
- children: /* @__PURE__ */ (0, H.jsx)(YE, {
+ children: /* @__PURE__ */ (0, H.jsx)(qE, {
label: "所选项目操作",
visible: t.count > 0,
count: `已选 ${t.count} 项`,
- children: cce(t.context, t.junkDismissed).map((t) => /* @__PURE__ */ (0, H.jsxs)("button", {
+ children: uce(t.context, t.junkDismissed).map((t) => /* @__PURE__ */ (0, H.jsxs)("button", {
type: "button",
"data-batch-group": t.group,
"data-batch-action": t.operation,
@@ -31791,7 +31791,7 @@ function dce({ host: e, props: t }) {
}
//#endregion
//#region src/react/components/glow-preset-grid.tsx
-function tD({ store: e, label: t, hidden: n }) {
+function $E({ store: e, label: t, hidden: n }) {
let r = e.value.homeGlow;
return /* @__PURE__ */ (0, H.jsx)("div", {
"data-glow-grid": "",
@@ -31817,11 +31817,11 @@ function tD({ store: e, label: t, hidden: n }) {
}
//#endregion
//#region src/react/glow-picker/glow-picker-island.tsx
-function fce(e) {
+function mce(e) {
let t = (0, Ot.createRoot)(e.root);
- (0, Dt.flushSync)(() => t.render(/* @__PURE__ */ (0, H.jsx)(pce, { host: e })));
+ (0, Dt.flushSync)(() => t.render(/* @__PURE__ */ (0, H.jsx)(hce, { host: e })));
}
-function pce({ host: e }) {
+function hce({ host: e }) {
let { store: t } = e;
(0, B.useSyncExternalStore)(t.subscribe, t.version);
let { homeGlow: n, accent: r } = t.value;
@@ -31837,7 +31837,7 @@ function pce({ host: e }) {
children: "重置"
})]
}),
- /* @__PURE__ */ (0, H.jsx)(tD, {
+ /* @__PURE__ */ (0, H.jsx)($E, {
store: t,
label: "光晕",
hidden: !n.on
@@ -31877,32 +31877,32 @@ function pce({ host: e }) {
}
//#endregion
//#region src/player/host.ts
-var nD = null;
-function mce(e) {
- nD = e;
+var eD = null;
+function gce(e) {
+ eD = e;
}
-function rD() {
- if (!nD) throw Error("播放器还没有接上宿主(configurePlayer)");
- return nD;
+function tD() {
+ if (!eD) throw Error("播放器还没有接上宿主(configurePlayer)");
+ return eD;
}
//#endregion
//#region src/player/menu.ts
-var iD = null;
-function hce(e) {
- iD = e;
+var nD = null;
+function _ce(e) {
+ nD = e;
}
-function gce() {
+function vce() {
let e = document.getElementById("playerMenu");
return e || (e = document.createElement("div"), e.className = "popmenu", e.setAttribute("data-player-context-menu", ""), e.id = "playerMenu", e.setAttribute("role", "menu"), e.setAttribute("aria-label", "播放器菜单"), e.hidden = !0, document.body.append(e)), e;
}
-var aD = null, oD = (e, t) => t ? e.replace("<svg", `<svg ${t}=""`) : e;
-function sD() {
+var rD = null, iD = (e, t) => t ? e.replace("<svg", `<svg ${t}=""`) : e;
+function aD() {
let e = document.getElementById("playerMenu");
e?.matches(":popover-open") && e.hidePopover(), e && e.parentElement !== document.body && document.body.append(e), e && a(e, () => {
e.innerHTML = "";
- }), aD &&= (aD(), null);
+ }), rD &&= (rD(), null);
}
-async function _ce(e) {
+async function yce(e) {
try {
return await navigator.clipboard.writeText(e), !0;
} catch {
@@ -31915,12 +31915,12 @@ async function _ce(e) {
return t.remove(), n;
}
}
-function vce(e) {
- let t = !!iD?.inMiniplayer(e), n = e.peachItem, r = iD?.kind(e) ?? "item", i = (t) => {
+function bce(e) {
+ let t = !!nD?.inMiniplayer(e), n = e.peachItem, r = nD?.kind(e) ?? "item", i = (t) => {
let i = new URL(r === "follow" ? `/follow/item/${n?.id}` : `/item/${n?.id}`, location.origin);
return t && i.searchParams.set("t", String(Math.floor(e.currentTime() || 0))), i.href;
}, a = (e, t) => {
- _ce(i(e)).then((e) => rD().toast(e ? t : "复制失败,请手动复制地址栏", {
+ yce(i(e)).then((e) => tD().toast(e ? t : "复制失败,请手动复制地址栏", {
timeout: 4e3,
warn: !e
}));
@@ -31932,11 +31932,11 @@ function vce(e) {
}, t ? {
icon: "maximize-2",
label: "展开",
- run: () => iD?.expand()
+ run: () => nD?.expand()
} : {
icon: "picture-in-picture-2",
label: "迷你播放器",
- run: () => iD?.toMiniplayer()
+ run: () => nD?.toMiniplayer()
}];
document.pictureInPictureEnabled && o.push({
icon: "player-pip",
@@ -31959,29 +31959,29 @@ function vce(e) {
run: () => s.click()
}), o;
}
-function yce(e, t, n) {
- let r = gce();
- sD();
- let i = rD().stage();
+function xce(e, t, n) {
+ let r = vce();
+ aD();
+ let i = tD().stage();
i instanceof HTMLDialogElement && i.open && i.append(r), r.setAttribute("popover", "manual");
- let a = vce(e);
+ let a = bce(e);
r.innerHTML = a.map((e, t) => {
let n = e.checked !== void 0;
- return `<button type="button" role="${n ? "menuitemcheckbox" : "menuitem"}"${n ? ` aria-checked="${e.checked}"` : ""} data-player-menu="${t}">${oD(L(e.icon), e.fill ? "data-player-menu-fill" : "")}<span>${P(e.label)}</span>${n ? oD(L("check"), "data-player-menu-check") : ""}</button>`;
+ return `<button type="button" role="${n ? "menuitemcheckbox" : "menuitem"}"${n ? ` aria-checked="${e.checked}"` : ""} data-player-menu="${t}">${iD(L(e.icon), e.fill ? "data-player-menu-fill" : "")}<span>${P(e.label)}</span>${n ? iD(L("check"), "data-player-menu-check") : ""}</button>`;
}).join(""), _(r), r.showPopover(), r.style.left = `${Math.max(8, Math.min(t, innerWidth - r.offsetWidth - 8))}px`, r.style.top = `${Math.max(8, Math.min(n, innerHeight - r.offsetHeight - 8))}px`;
let o = [...r.querySelectorAll("[data-player-menu]")];
o.forEach((e) => {
e.onclick = (t) => {
t.stopPropagation();
let n = a[Number(e.dataset.playerMenu)];
- sD(), n?.run();
+ aD(), n?.run();
};
});
let s = (e) => {
- r.contains(e.target) || sD();
+ r.contains(e.target) || aD();
}, c = (e) => {
if (e.key === "Escape") {
- e.preventDefault(), e.stopPropagation(), sD();
+ e.preventDefault(), e.stopPropagation(), aD();
return;
}
if (e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
@@ -31989,51 +31989,51 @@ function yce(e, t, n) {
let t = o.indexOf(document.activeElement);
o[(t + (e.key === "ArrowDown" ? 1 : -1) + o.length) % o.length]?.focus();
}, l = (t) => {
- y(t, e.el()) && sD();
+ y(t, e.el()) && aD();
};
setTimeout(() => {
document.addEventListener("pointerdown", s, !0), document.addEventListener("keydown", c, !0), window.addEventListener("scroll", l, {
capture: !0,
passive: !0
});
- }, 0), aD = () => {
+ }, 0), rD = () => {
document.removeEventListener("pointerdown", s, !0), document.removeEventListener("keydown", c, !0), window.removeEventListener("scroll", l, !0);
}, o[0]?.focus();
}
-function bce(e) {
+function Sce(e) {
e.el().addEventListener("contextmenu", (t) => {
- t.target.closest(".vjs-peach-settings-menu") || (t.preventDefault(), yce(e, t.clientX, t.clientY));
- }), e.on("dispose", sD);
+ t.target.closest(".vjs-peach-settings-menu") || (t.preventDefault(), xce(e, t.clientX, t.clientY));
+ }), e.on("dispose", aD);
}
//#endregion
//#region src/player/registry.ts
-var cD = null, lD = () => cD;
-function uD(e) {
- cD = e;
+var oD = null, sD = () => oD;
+function cD(e) {
+ oD = e;
}
-function dD(e) {
+function lD(e) {
!e || e.isDisposed() || requestAnimationFrame(() => {
e.isDisposed() || e.trigger("resize");
});
}
//#endregion
//#region src/player/stats.ts
-function fD(e) {
+function uD(e) {
let t = e.currentTime || 0;
for (let n = 0; n < e.buffered.length; n++) if (e.buffered.start(n) <= t && e.buffered.end(n) >= t) return Math.max(0, e.buffered.end(n) - t);
return 0;
}
-function xce(e) {
+function Cce(e) {
let t = e.currentTime || 0;
for (let n = 0; n < e.buffered.length; n++) if (e.buffered.start(n) <= t + .25 && e.buffered.end(n) >= t) return e.buffered.end(n);
return e.buffered.length ? e.buffered.end(e.buffered.length - 1) : 0;
}
-var pD = 3e3;
-function mD(e, t) {
+var dD = 3e3;
+function fD(e, t) {
let n = Number(e) || 0, r = se(t) || 0;
return n > 0 && r > 0 ? n * 8 / r : 0;
}
-function Sce(e) {
+function wce(e) {
let t = [], n = null, r = 0, i = 0;
return {
bitrate: Number(e) || 0,
@@ -32048,10 +32048,10 @@ function Sce(e) {
},
sample(e) {
if (!e) return i;
- let a = performance.now(), o = xce(e), s = e.currentTime || 0;
+ let a = performance.now(), o = Cce(e), s = e.currentTime || 0;
if (n) {
let e = (a - n.at) / 1e3, i = Math.abs(s - n.ct) > e * 4 + 1, c = o - n.frontier;
- !i && c > 0 && (r += c), e * 1e3 > pD * 2 && (t.length = 0);
+ !i && c > 0 && (r += c), e * 1e3 > dD * 2 && (t.length = 0);
}
for (n = {
at: a,
@@ -32060,56 +32060,56 @@ function Sce(e) {
}, t.push({
at: a,
advanced: r
- }); t.length > 2 && a - t[0].at > pD;) t.shift();
+ }); t.length > 2 && a - t[0].at > dD;) t.shift();
let c = t[0], l = (a - c.at) / 1e3, u = r - c.advanced;
return l >= .5 && u > 0 && this.bitrate > 0 && (i = u * this.bitrate / l), i;
}
};
}
-var hD = 24;
-function gD(e, t) {
- e.push(Number.isFinite(t) && t > 0 ? t : 0), e.length > hD && e.splice(0, e.length - hD);
+var pD = 24;
+function mD(e, t) {
+ e.push(Number.isFinite(t) && t > 0 ? t : 0), e.length > pD && e.splice(0, e.length - pD);
}
-var _D = "peach-player-panel";
-function vD(e, t, n, r) {
- let i = [...Array(Math.max(0, hD - e.length)).fill(null), ...e], a = Math.max(1, n || 0), o = i.map((e) => {
+var hD = "peach-player-panel";
+function gD(e, t, n, r) {
+ let i = [...Array(Math.max(0, pD - e.length)).fill(null), ...e], a = Math.max(1, n || 0), o = i.map((e) => {
if (e === null) return "<i aria-hidden=\"true\"></i>";
let n = e <= 0 ? 0 : Math.max(.08, Math.min(1, e / a));
return `<i data-bar="${t === "buffer" ? e < 5 ? "low" : e < 15 ? "mid" : "good" : "on"}" style="height:${(n * 100).toFixed(1)}%" aria-hidden="true"></i>`;
}).join("");
return `<span data-player-stats-plot="${t}" role="img" aria-label="${P(r)}">${o}</span>`;
}
-function Cce() {
+function Tce() {
return `<button data-player-stats-button="" id="playerStatsBtn" aria-label="播放统计" title="播放统计" aria-pressed="false" hidden>${L("chart")}</button>
<div data-player-net="" id="playerNet" role="status" aria-live="polite" hidden></div>
<div data-player-stats="" id="playerStats" role="status" hidden></div>`;
}
-function yD(e, t = "") {
+function _D(e, t = "") {
let n = t ? encodeURIComponent(t) : "";
return performance.getEntriesByType("resource").filter((t) => t.name.includes("/stream") && (t.name.includes(`/stream?id=${e}`) || t.name.includes(`/stream/hls/${e}/`)) && (!n || t.name.includes(`session=${n}`)));
}
-function bD(e, t = "") {
- let n = yD(e, t), r = n.reduce((e, t) => e + (t.transferSize || t.encodedBodySize || 0), 0), i = n.reduce((e, t) => e + (t.duration || 0), 0) / 1e3;
+function vD(e, t = "") {
+ let n = _D(e, t), r = n.reduce((e, t) => e + (t.transferSize || t.encodedBodySize || 0), 0), i = n.reduce((e, t) => e + (t.duration || 0), 0) / 1e3;
return r > 0 && i > 0 ? r * 8 / i : 0;
}
-function xD(e, t, n = "", r = null) {
+function yD(e, t, n = "", r = null) {
let i = 0;
try {
i = Number(e?.tech({ IWillNotUseThisInPlugins: !0 })?.vhs?.stats?.bandwidth) || 0;
} catch {}
- return i > 0 ? i : r ? Number(r.bits) || 0 : bD(t, n);
+ return i > 0 ? i : r ? Number(r.bits) || 0 : vD(t, n);
}
-function SD(e) {
+function bD(e) {
if (!Number.isFinite(e) || e <= 0) return "加载中…";
let t = e / 8;
return t >= 1048576 ? `${(t / 1048576).toFixed(1)} MB/s` : `${Math.max(1, Math.round(t / 1024))} KB/s`;
}
-function wce(e, t) {
- return e > 0 ? SD(e) : t > 0 ? `已缓冲 ${Math.round(t)} 秒` : SD(0);
+function Ece(e, t) {
+ return e > 0 ? bD(e) : t > 0 ? `已缓冲 ${Math.round(t)} 秒` : bD(0);
}
//#endregion
//#region src/player/controls.ts
-function CD(e, t, n = "") {
+function xD(e, t, n = "") {
if (!e) return () => {};
let r = e.querySelector(":scope>.vjs-peach-tooltip");
r || (r = document.createElement("span"), r.className = "vjs-peach-tooltip", r.setAttribute("role", "tooltip"), r.innerHTML = "<span class=\"vjs-peach-tooltip-text\"></span><kbd hidden></kbd>", e.append(r));
@@ -32120,24 +32120,24 @@ function CD(e, t, n = "") {
};
return o(), o;
}
-function Tce(e, t = !0) {
- let n = rD(), r = n.settings();
+function Dce(e, t = !0) {
+ let n = tD(), r = n.settings();
r.ambientMode = !!e, t && n.saveSettings(), n.stage()?.toggleAttribute("data-ambient", r.ambientMode), document.dispatchEvent(new CustomEvent("peachambientchange", { detail: { enabled: r.ambientMode } }));
}
-var wD = /* @__PURE__ */ new WeakMap();
-function TD(e) {
+var SD = /* @__PURE__ */ new WeakMap();
+function CD(e) {
if (!e) return;
- let t = rD().settings().theaterMode;
- e.setAttribute("aria-pressed", String(t)), e.querySelector("use")?.setAttribute("href", t ? "#i-theater-exit" : "#i-theater-enter"), wD.get(e)?.(t ? "默认视图" : "影院模式");
+ let t = tD().settings().theaterMode;
+ e.setAttribute("aria-pressed", String(t)), e.querySelector("use")?.setAttribute("href", t ? "#i-theater-exit" : "#i-theater-enter"), SD.get(e)?.(t ? "默认视图" : "影院模式");
}
-function ED(e, t = !0) {
- let n = rD(), r = n.settings();
+function wD(e, t = !0) {
+ let n = tD(), r = n.settings();
r.theaterMode = !!e, t && n.saveSettings();
let i = n.stage();
- i?.toggleAttribute("data-theater", r.theaterMode), TD(i?.querySelector("[data-player-theater]")), dD(lD());
+ i?.toggleAttribute("data-theater", r.theaterMode), CD(i?.querySelector("[data-player-theater]")), lD(sD());
}
-function Ece(e) {
- let t = rD().stage(), n = t?.querySelector("[data-ambient-canvas]");
+function Oce(e) {
+ let t = tD().stage(), n = t?.querySelector("[data-ambient-canvas]");
if (!t || !n) return () => {};
let r = n.getContext("2d", { alpha: !1 });
if (!r) return () => {};
@@ -32154,14 +32154,14 @@ function Ece(e) {
e.requestVideoFrameCallback ? e.requestVideoFrameCallback((e) => u(t, e)) : requestAnimationFrame((e) => u(t, e));
}, u = (t, n) => {
if (!(i || t !== o)) {
- if (!rD().settings().ambientMode) {
+ if (!tD().settings().ambientMode) {
s();
return;
}
e.paused || (!document.hidden && n - a > 480 && (a = n, c()), l(t));
}
}, d = () => {
- i || !rD().settings().ambientMode || (c(), e.paused || l(++o));
+ i || !tD().settings().ambientMode || (c(), e.paused || l(++o));
}, f = (e) => {
let n = !!e.detail.enabled;
t.toggleAttribute("data-ambient", n), n ? d() : (o++, s());
@@ -32170,7 +32170,7 @@ function Ece(e) {
i = !0, o++, document.removeEventListener("peachambientchange", f), e.removeEventListener("play", d), e.removeEventListener("loadeddata", d), s();
};
}
-function Dce(e, t, n = 0, r = null) {
+function kce(e, t, n = 0, r = null) {
let i = e.getChild("controlBar")?.el();
if (!i || i.querySelector("[data-player-quality]")) return;
let a = document.createElement("div");
@@ -32180,7 +32180,7 @@ function Dce(e, t, n = 0, r = null) {
let o = i.querySelector(".vjs-fullscreen-control");
i.insertBefore(a, o || null);
let s = a.querySelector("button"), c = a.querySelector("[data-player-quality-badge]");
- CD(s, "设置");
+ xD(s, "设置");
let l = a.querySelector(".vjs-peach-settings-menu"), u = typeof e.qualityLevels == "function" ? e.qualityLevels() : null, d = r, f = "auto", p = (e, t) => {
let n = [Number(e), Number(t)].filter((e) => e > 0);
return n.length ? Math.min(...n) : 0;
@@ -32222,11 +32222,11 @@ function Dce(e, t, n = 0, r = null) {
active: t
};
}, g = () => l.getAttribute("aria-hidden") !== "true", _ = (e) => {
- l.setAttribute("aria-hidden", String(!e)), s.setAttribute("aria-expanded", String(e)), e && document.dispatchEvent(new CustomEvent(_D, { detail: "settings" }));
+ l.setAttribute("aria-hidden", String(!e)), s.setAttribute("aria-expanded", String(e)), e && document.dispatchEvent(new CustomEvent(hD, { detail: "settings" }));
}, v = () => _(!1), y = (e) => {
e.detail !== "settings" && v();
};
- document.addEventListener(_D, y);
+ document.addEventListener(hD, y);
let b = null, x = (e, t) => {
let n = l.querySelector(".vjs-peach-panel"), r = document.createElement("div");
if (r.className = "vjs-peach-panel", r.innerHTML = e, !n || !t || !g()) return l.replaceChildren(r), l.style.height = "", r;
@@ -32240,12 +32240,12 @@ function Dce(e, t, n = 0, r = null) {
}, 250);
}), r;
}, S = (e, t) => e.querySelector(t), C = (t = 0) => {
- let { active: n } = h(), r = Number(e.playbackRate()) || 1, i = x(`<div class="vjs-peach-panel-menu"><button type="button" class="vjs-peach-menu-row" role="menuitemcheckbox" data-player-ambient aria-checked="${rD().settings().ambientMode}">
+ let { active: n } = h(), r = Number(e.playbackRate()) || 1, i = x(`<div class="vjs-peach-panel-menu"><button type="button" class="vjs-peach-menu-row" role="menuitemcheckbox" data-player-ambient aria-checked="${tD().settings().ambientMode}">
${L("player-ambient")}<span>氛围模式</span><i class="vjs-peach-switch" aria-hidden="true"></i></button>
<button type="button" class="vjs-peach-menu-row" role="menuitem" data-player-speed>${L("player-speed")}<span>播放速度</span><b>${r === 1 ? "正常" : `${r}×`}</b>${L("player-menu-next")}</button>
<button type="button" class="vjs-peach-menu-row" role="menuitem" data-player-quality-view>${L("player-quality")}<span>清晰度</span><b>${P(n.label)}</b>${L("player-menu-next")}</button></div>`, t);
S(i, "[data-player-ambient]").onclick = () => {
- Tce(!rD().settings().ambientMode), C();
+ Dce(!tD().settings().ambientMode), C();
}, S(i, "[data-player-speed]").onclick = () => D(), S(i, "[data-player-quality-view]").onclick = () => O();
}, w = .05, T = [
1,
@@ -32302,22 +32302,22 @@ function Dce(e, t, n = 0, r = null) {
}), u?.on?.(["addqualitylevel", "removequalitylevel"], () => {
g() ? C() : h();
}), e.on("dispose", () => {
- document.removeEventListener("pointerdown", k), document.removeEventListener(_D, y), b && clearTimeout(b);
- }), h(), Oce(e, a), kce(e), (e) => {
+ document.removeEventListener("pointerdown", k), document.removeEventListener(hD, y), b && clearTimeout(b);
+ }), h(), Ace(e, a), jce(e), (e) => {
d = e?.length ? e : null, g() ? C() : h();
};
}
-function Oce(e, t) {
+function Ace(e, t) {
let n = e.getChild("controlBar")?.el();
if (!n || n.querySelector("[data-player-theater]")) return;
- let r = rD().settings().theaterMode, i = document.createElement("div");
+ let r = tD().settings().theaterMode, i = document.createElement("div");
i.className = "vjs-peach-theater vjs-control", i.innerHTML = `<button type="button" data-player-theater aria-pressed="${r}">${L(r ? "theater-exit" : "theater-enter")}</button>`, n.insertBefore(i, t.nextSibling);
let a = i.querySelector("button");
- wD.set(a, CD(a, "影院模式", "T")), TD(a), a.onclick = (e) => {
- e.stopPropagation(), ED(!rD().settings().theaterMode);
+ SD.set(a, xD(a, "影院模式", "T")), CD(a), a.onclick = (e) => {
+ e.stopPropagation(), wD(!tD().settings().theaterMode);
};
}
-function kce(e) {
+function jce(e) {
let t = e.getChild("controlBar")?.el();
if (!t || t.querySelector(".vjs-peach-right-controls")) return;
let n = t.querySelector(":scope>.vjs-play-control");
@@ -32329,7 +32329,7 @@ function kce(e) {
e.dataset.peachExplicitIcon = "";
let r = document.createElementNS("http://www.w3.org/2000/svg", "svg");
return r.setAttribute("viewBox", n.getAttribute("viewBox") || ""), r.setAttribute("aria-hidden", "true"), r.setAttribute("class", "vjs-peach-control-icon vjs-peach-morph-icon"), r.innerHTML = n.innerHTML, e.append(r), r;
- }, a = (e) => [...document.getElementById(`i-${e}`)?.querySelectorAll("path") || []], o = i(n, "player-play")?.querySelector("path"), s = a("player-play")[0]?.getAttribute("d") || "", c = a("player-pause")[0]?.getAttribute("d") || "", l = CD(n, "播放", "K"), u = CSS.supports("d", "path(\"M0 0\")"), d = () => {
+ }, a = (e) => [...document.getElementById(`i-${e}`)?.querySelectorAll("path") || []], o = i(n, "player-play")?.querySelector("path"), s = a("player-play")[0]?.getAttribute("d") || "", c = a("player-pause")[0]?.getAttribute("d") || "", l = xD(n, "播放", "K"), u = CSS.supports("d", "path(\"M0 0\")"), d = () => {
let t = e.paused() || e.ended(), n = t ? s : c;
o && (u ? o.style.setProperty("d", `path("${n}")`) : o.setAttribute("d", n)), l(t ? "播放" : "暂停");
};
@@ -32340,7 +32340,7 @@ function kce(e) {
], d), d();
let f = t.querySelector(":scope>.vjs-volume-panel"), p = f?.querySelector(":scope>.vjs-mute-control"), m = i(p, "player-volume");
m && a("player-volume-muted").forEach((e) => m.append(e.cloneNode(!0)));
- let h = CD(p, "静音", "M"), g = () => {
+ let h = xD(p, "静音", "M"), g = () => {
let t = e.muted() || e.volume() === 0;
m && (m.dataset.silent = String(t), m.dataset.loud = String(!t && e.volume() > .5)), h(t ? "取消静音" : "静音");
};
@@ -32366,7 +32366,7 @@ function kce(e) {
});
let x = document.createElement("button"), S = !1;
x.type = "button", x.className = "vjs-peach-time vjs-control", x.dataset.playerTime = "", x.innerHTML = "<span class=\"vjs-peach-time-text\"></span>";
- let C = x.querySelector(".vjs-peach-time-text"), w = CD(x, "显示剩余时间"), T = () => {
+ let C = x.querySelector(".vjs-peach-time-text"), w = xD(x, "显示剩余时间"), T = () => {
let t = Math.max(0, Number(e.currentTime()) || 0), n = Math.max(0, Number(e.duration()) || 0), r = F(Math.max(0, n - t));
C.textContent = `${S ? `-${r}` : F(t)} / ${F(n)}`, x.dataset.remaining = String(S), w(S ? "显示已播放时间" : "显示剩余时间", S ? `剩余 ${r},总时长 ${F(n)};点击显示已播放时间` : `已播放 ${F(t)},总时长 ${F(n)};点击显示剩余时间`);
};
@@ -32379,11 +32379,11 @@ function kce(e) {
], T), T(), f ? f.insertAdjacentElement("afterend", x) : t.append(x);
let E = t.querySelector(":scope>.vjs-picture-in-picture-control");
r(E, "player-pip");
- let D = CD(E, "画中画");
+ let D = xD(E, "画中画");
e.on(["enterpictureinpicture", "leavepictureinpicture"], () => D(document.pictureInPictureElement ? "退出画中画" : "画中画"));
- let O = t.querySelector(":scope>.vjs-fullscreen-control"), k = r(O, "player-fullscreen-enter"), A = CD(O, "全屏", "F"), j = () => {
+ let O = t.querySelector(":scope>.vjs-fullscreen-control"), k = r(O, "player-fullscreen-enter"), A = xD(O, "全屏", "F"), j = () => {
let t = !!e.isFullscreen();
- e.el().toggleAttribute("data-peach-fullscreen", t), k?.setAttribute("href", t ? "#i-player-fullscreen-exit" : "#i-player-fullscreen-enter"), A(t ? "退出全屏" : "全屏"), dD(e);
+ e.el().toggleAttribute("data-peach-fullscreen", t), k?.setAttribute("href", t ? "#i-player-fullscreen-exit" : "#i-player-fullscreen-enter"), A(t ? "退出全屏" : "全屏"), lD(e);
};
e.on([
"fullscreenchange",
@@ -32403,7 +32403,7 @@ function kce(e) {
});
let ee = document.createElement("div");
ee.className = "vjs-peach-expand vjs-control", ee.innerHTML = `<button type="button" data-player-expand aria-expanded="false">${L("player-expand")}</button><span class="vjs-peach-hover" aria-hidden="true"></span>`, N.prepend(ee);
- let te = ee.querySelector("button"), P = CD(te, "展开控件"), ne = (t) => {
+ let te = ee.querySelector("button"), P = xD(te, "展开控件"), ne = (t) => {
e.el().classList.toggle("vjs-peach-right-expanded", t), te.setAttribute("aria-expanded", String(t)), P(t ? "收起控件" : "展开控件");
};
te.onclick = (t) => {
@@ -32415,7 +32415,7 @@ function kce(e) {
}, re = new ResizeObserver(I);
re.observe(e.el()), e.on("dispose", () => re.disconnect()), ne(!1), I();
}
-function Ace(e, t, n = {}) {
+function Mce(e, t, n = {}) {
let r = e.getChild("controlBar")?.el()?.querySelector(".vjs-progress-control");
if (!r || r.querySelector("[data-player-seek-preview]")) return;
let i = n.thumbnail !== !1, a = document.createElement("div");
@@ -32448,13 +32448,13 @@ function Ace(e, t, n = {}) {
r.removeEventListener("pointermove", p), r.removeEventListener("pointerleave", m);
});
}
-function jce(e, t) {
+function Nce(e, t) {
let n = navigator.mediaSession;
if (!n || typeof n.setActionHandler != "function") return;
let r = () => se(e.duration()) || se(t.duration) || 0, i = (t) => {
let n = r();
e.currentTime(Math.max(0, n ? Math.min(n, t) : t));
- }, a = () => Math.max(1, Number(rD().settings().seekSeconds) || 10), o = [
+ }, a = () => Math.max(1, Number(tD().settings().seekSeconds) || 10), o = [
["play", () => {
e.play();
}],
@@ -32495,11 +32495,11 @@ function jce(e, t) {
} catch {}
});
}
-function Mce(e) {
+function Pce(e) {
let t = e.el().querySelector(".vjs-loading-spinner");
!t || t.querySelector(".vjs-peach-spinner-container") || (t.innerHTML = "<span class=\"vjs-peach-spinner-container\"><span class=\"vjs-peach-spinner-rotator\"><span class=\"vjs-peach-spinner-left\"><span class=\"vjs-peach-spinner-circle\"></span></span><span class=\"vjs-peach-spinner-right\"><span class=\"vjs-peach-spinner-circle\"></span></span></span></span>");
}
-function Nce(e, t) {
+function Fce(e, t) {
N(`/api/assets/${t}/subtitles`).then((t) => {
!e || e.isDisposed() || (t?.subtitles || []).filter((e) => e.playable).forEach((t) => {
e.addRemoteTextTrack({
@@ -32514,7 +32514,7 @@ function Nce(e, t) {
}
//#endregion
//#region src/player/dispose.ts
-function DD(e) {
+function TD(e) {
if (!e || e.isDisposed()) return;
let t = e.el()?.querySelector("video");
try {
@@ -32532,23 +32532,23 @@ function DD(e) {
}
//#endregion
//#region src/player/stream.ts
-function OD() {
+function ED() {
return globalThis.crypto?.randomUUID?.() || `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
}
-function kD(e, t) {
+function DD(e, t) {
return {
src: `/stream?id=${e.id}&session=${encodeURIComponent(t)}`,
type: String(e.name || "").toLowerCase().endsWith(".webm") ? "video/webm" : "video/mp4"
};
}
-function Pce(e) {
+function Ice(e) {
return e.location === "online" && e.follow_item_id ? {
src: `/follow-stream?id=${e.follow_item_id}`,
type: "video/mp4"
} : null;
}
-async function AD(e, t) {
- let n = Pce(e);
+async function OD(e, t) {
+ let n = Ice(e);
if (n) return n;
try {
let n = await N(`/api/stream-plan?id=${e.id}&session=${encodeURIComponent(t)}`);
@@ -32557,9 +32557,9 @@ async function AD(e, t) {
type: n.mime_type || "application/vnd.apple.mpegurl"
};
} catch {}
- return kD(e, t);
+ return DD(e, t);
}
-function jD(e) {
+function kD(e) {
e && fetch(`/api/stream-cancel?session=${encodeURIComponent(e)}`, {
method: "POST",
credentials: "same-origin",
@@ -32568,21 +32568,21 @@ function jD(e) {
document.documentElement.dataset.peachStreamCancel = JSON.stringify(e);
}).catch(() => {});
}
-var MD = "";
-function ND() {
- return MD;
+var AD = "";
+function jD() {
+ return AD;
}
-function PD() {
- return MD ||= OD(), MD;
+function MD() {
+ return AD ||= ED(), AD;
}
-var Fce = (e) => kD(e, PD()), Ice = (e) => AD(e, PD());
-function FD() {
- let e = MD;
- e && (MD = "", jD(e));
+var Lce = (e) => DD(e, MD()), Rce = (e) => OD(e, MD());
+function ND() {
+ let e = AD;
+ e && (AD = "", kD(e));
}
//#endregion
//#region src/player/telemetry.ts
-function ID(e, t, n = {}) {
+function PD(e, t, n = {}) {
if (!t) return;
let r = 0, i = 0, a = 0, o = null;
t.addEventListener("seeking", () => {
@@ -32630,7 +32630,7 @@ function ID(e, t, n = {}) {
u(), l(!1);
}, { once: !0 }), c();
}
-function Lce(e, t) {
+function zce(e, t) {
let n = 0, r = 0, i = !1, a = null, o = (n) => {
let i = se(e.duration) || se(t.duration);
!r && !n || (N("/api/follow/activity", {
@@ -32666,7 +32666,7 @@ function Lce(e, t) {
}
//#endregion
//#region src/player/videojs.ts
-var LD = "/vendor/videojs/8.24.1/", RD = (e) => new Promise((t, n) => {
+var FD = "/vendor/videojs/8.24.1/", ID = (e) => new Promise((t, n) => {
let r = document.head.querySelector(`script[src="${e}"]`);
if (r?.dataset.loaded) {
t();
@@ -32678,20 +32678,20 @@ var LD = "/vendor/videojs/8.24.1/", RD = (e) => new Promise((t, n) => {
}, { once: !0 }), i.addEventListener("error", () => {
i.remove(), n(/* @__PURE__ */ Error(`script unavailable: ${e}`));
}, { once: !0 }), r || (i.src = e, document.head.appendChild(i));
-}), zD = () => globalThis.videojs, BD = null;
-function VD() {
- let e = zD();
- return e ? Promise.resolve(e) : (BD ??= RD(`${LD}video.min.js`).then(() => RD(`${LD}lang/zh-CN.js`)).then(() => {
- let e = zD();
+}), LD = () => globalThis.videojs, RD = null;
+function zD() {
+ let e = LD();
+ return e ? Promise.resolve(e) : (RD ??= ID(`${FD}video.min.js`).then(() => ID(`${FD}lang/zh-CN.js`)).then(() => {
+ let e = LD();
if (!e) throw Error("videojs unavailable");
return e;
}).catch((e) => {
- throw BD = null, e;
- }), BD);
+ throw RD = null, e;
+ }), RD);
}
//#endregion
//#region src/player/immerse-player.ts
-var Rce = {
+var Bce = {
controls: !1,
preload: "auto",
posterImage: !1,
@@ -32703,37 +32703,37 @@ var Rce = {
errorDisplay: !1,
textTrackSettings: !1
};
-function zce(e, t) {
+function Vce(e, t) {
let { item: n, session: r } = t, i = null, a = !1;
- return Promise.all([AD(n, r), VD().catch(() => null)]).then(([o, s]) => {
+ return Promise.all([OD(n, r), zD().catch(() => null)]).then(([o, s]) => {
if (a) return;
- let c = kD(n, r), l = String(o.type || "").includes("mpegurl");
+ let c = DD(n, r), l = String(o.type || "").includes("mpegurl");
if (!s) e.src = (l ? c : o).src;
else {
- let t = s(e, Rce);
+ let t = s(e, Bce);
i = t, l && t.one("error", () => {
a || t.src(c);
}), t.src(o);
}
- ID(n, e, t.onEnded ? { onEnded: t.onEnded } : {}), t.onLoaded?.();
+ PD(n, e, t.onEnded ? { onEnded: t.onEnded } : {}), t.onLoaded?.();
}), () => {
- a || (a = !0, jD(r), i ? DD(i) : (e.pause(), e.removeAttribute("src"), e.load()));
+ a || (a = !0, kD(r), i ? TD(i) : (e.pause(), e.removeAttribute("src"), e.load()));
};
}
//#endregion
//#region src/player/detail-player.ts
-var HD = /* @__PURE__ */ new WeakMap(), UD = null, WD = null, GD = null;
-function KD() {
- UD &&= (clearInterval(UD), null), WD &&= (clearInterval(WD), null), GD &&= (clearTimeout(GD), null);
+var BD = /* @__PURE__ */ new WeakMap(), VD = null, HD = null, UD = null;
+function WD() {
+ VD &&= (clearInterval(VD), null), HD &&= (clearInterval(HD), null), UD &&= (clearTimeout(UD), null);
}
-async function Bce(e, t, n, r = {}) {
- let i = lD();
+async function Hce(e, t, n, r = {}) {
+ let i = sD();
if (i && !i.isDisposed()) return i;
- let a = rD(), o = r.resume ?? null;
+ let a = tD(), o = r.resume ?? null;
o?.autoplay && (n = !0);
- let s = () => r.source ? Promise.resolve(r.source) : Ice(e), c;
+ let s = () => r.source ? Promise.resolve(r.source) : Rce(e), c;
try {
- c = await VD();
+ c = await zD();
} catch {
return t.controls = !0, s().then((e) => {
t.src = e.src, n && t.play().catch(() => {});
@@ -32753,7 +32753,7 @@ async function Bce(e, t, n, r = {}) {
remainingTimeDisplay: !1
}
});
- uD(l), l.peachItem = e, bce(l), l.on("loadedmetadata", () => {
+ cD(l), l.peachItem = e, Sce(l), l.on("loadedmetadata", () => {
let e = l.el()?.querySelector("video");
e?.videoWidth && e.videoHeight && l.el().style.setProperty("--peach-video-ratio", `${e.videoWidth}/${e.videoHeight}`);
});
@@ -32761,7 +32761,7 @@ async function Bce(e, t, n, r = {}) {
speed: [],
activity: [],
buffer: []
- }, f = Number(r.size ?? e.size) || 0, p = Sce(mD(f, e.duration)), m = 0, h = !1, g = () => lD() === l && !l.isDisposed(), _ = () => {
+ }, f = Number(r.size ?? e.size) || 0, p = wce(fD(f, e.duration)), m = 0, h = !1, g = () => sD() === l && !l.isDisposed(), _ = () => {
if (!u || h || !g()) return;
let e = Number(l.duration());
(!Number.isFinite(e) || Math.abs(e - u) > Math.max(2, u * .001)) && (h = !0, l.duration(u), queueMicrotask(() => {
@@ -32772,15 +32772,15 @@ async function Bce(e, t, n, r = {}) {
ready: !1,
updateStats: () => {}
};
- HD.set(l, y), y.updateStats = () => {
+ BD.set(l, y), y.updateStats = () => {
let n = y.chrome?.statsPanel;
if (!n || n.hidden || !g()) return;
- let i = t.getVideoPlaybackQuality ? t.getVideoPlaybackQuality() : null, a = t.getBoundingClientRect(), o = `${t.videoWidth || e.width || "?"}×${t.videoHeight || e.height || "?"}`, s = v(), c = ND(), h = s ? yD(e.id, c) : [], _ = h.reduce((e, t) => e + (t.transferSize || t.encodedBodySize || 0), 0), b = h.reduce((e, t) => e + (t.duration || 0), 0) / 1e3;
+ let i = t.getVideoPlaybackQuality ? t.getVideoPlaybackQuality() : null, a = t.getBoundingClientRect(), o = `${t.videoWidth || e.width || "?"}×${t.videoHeight || e.height || "?"}`, s = v(), c = jD(), h = s ? _D(e.id, c) : [], _ = h.reduce((e, t) => e + (t.transferSize || t.encodedBodySize || 0), 0), b = h.reduce((e, t) => e + (t.duration || 0), 0) / 1e3;
p.sample(t);
- let x = xD(l, e.id, c, s ? null : p) || (b > 0 ? _ * 8 / b : 0), S = s ? _ : p.bitrate > 0 ? p.bytes() : p.seconds, C = Math.max(0, S - m);
+ let x = yD(l, e.id, c, s ? null : p) || (b > 0 ? _ * 8 / b : 0), S = s ? _ : p.bitrate > 0 ? p.bytes() : p.seconds, C = Math.max(0, S - m);
m = S;
- let w = fD(t);
- gD(d.speed, x), gD(d.activity, C), gD(d.buffer, w);
+ let w = uD(t);
+ mD(d.speed, x), mD(d.activity, C), mD(d.buffer, w);
let T = String(e.name || ""), E = (T.includes(".") ? T.split(".").pop() || "" : s ? "" : String(l.currentSource()?.type || "").split("/").pop() || "").toUpperCase() || "—", D = x ? `${(x / 1e6).toFixed(1)} Mbps` : "—", O = s || p.bitrate > 0, k = s ? [
"网络活动",
`${_ ? I(_) : "—"} · ${h.length} 请求`,
@@ -32798,17 +32798,17 @@ async function Bce(e, t, n, r = {}) {
[
"连接速度",
D,
- vD(d.speed, "speed", Math.max(1e7, ...d.speed), `连接速度 ${D === "—" ? "暂无数据" : D}`)
+ gD(d.speed, "speed", Math.max(1e7, ...d.speed), `连接速度 ${D === "—" ? "暂无数据" : D}`)
],
[
k[0],
k[1],
- vD(d.activity, "activity", Math.max(1, ...d.activity), k[2])
+ gD(d.activity, "activity", Math.max(1, ...d.activity), k[2])
],
[
"缓冲健康",
`${w.toFixed(1)} 秒`,
- vD(d.buffer, "buffer", 30, `当前可连续播放 ${w.toFixed(1)} 秒`)
+ gD(d.buffer, "buffer", 30, `当前可连续播放 ${w.toFixed(1)} 秒`)
],
["播放时间", `${F(t.currentTime)} / ${F(u || l.duration())}`],
["日期", (/* @__PURE__ */ new Date()).toLocaleString()]
@@ -32824,15 +32824,15 @@ async function Bce(e, t, n, r = {}) {
if (!n || l.isDisposed()) return;
let r = v();
r || p.sample(t);
- let i = xD(l, e.id, ND(), r ? null : p), a = r ? SD(i) : wce(i, fD(t));
+ let i = yD(l, e.id, jD(), r ? null : p), a = r ? bD(i) : Ece(i, uD(t));
n.innerHTML = `${L("gauge")}<span class="sr-only">加载速度</span><span>${P(a)}</span>`;
}, C = () => {
let e = y.chrome?.netBadge;
- !e || !e.isConnected || (e.hidden = !1, S(), WD && clearInterval(WD), WD = setInterval(S, 500));
+ !e || !e.isConnected || (e.hidden = !1, S(), HD && clearInterval(HD), HD = setInterval(S, 500));
}, w = () => {
let e = y.chrome?.netBadge;
- e && (GD && clearTimeout(GD), GD = setTimeout(() => {
- e.hidden = !0, WD &&= (clearInterval(WD), null);
+ e && (UD && clearTimeout(UD), UD = setTimeout(() => {
+ e.hidden = !0, HD &&= (clearInterval(HD), null);
}, 1400));
};
return l.on([
@@ -32844,7 +32844,7 @@ async function Bce(e, t, n, r = {}) {
S(), w();
}), l.on("error", () => {
if (b && !x && !l.isDisposed()) {
- x = !0, b = !1, l.src(Fce(e)), n && l.play()?.catch(() => {});
+ x = !0, b = !1, l.src(Lce(e)), n && l.play()?.catch(() => {});
return;
}
r.checkSourceStatus !== !1 && a.loadSourceStatus().then((t) => {
@@ -32855,27 +32855,27 @@ async function Bce(e, t, n, r = {}) {
});
}), l.ready(() => {
_();
- let n = Dce(l, t, e.height, r.qualities ?? null);
+ let n = kce(l, t, e.height, r.qualities ?? null);
r.mediaPromise?.then((t) => {
if (!g()) return;
n?.(t?.qualities?.length ? t.qualities : null);
let r = Number(t?.size) || 0;
- r > 0 && !f && (f = r, p.bitrate = mD(r, e.duration));
- }).catch(() => {}), Ace(l, e, { thumbnail: !r.source }), jce(l, e), Mce(l), r.source || Nce(l, e.id), y.ready = !0, y.chrome?.statsButton && (y.chrome.statsButton.hidden = !1);
+ r > 0 && !f && (f = r, p.bitrate = fD(r, e.duration));
+ }).catch(() => {}), Mce(l, e, { thumbnail: !r.source }), Nce(l, e), Pce(l), r.source || Fce(l, e.id), y.ready = !0, y.chrome?.statsButton && (y.chrome.statsButton.hidden = !1);
}), s().then((e) => {
g() && (b = String(e.type || "").includes("mpegurl"), l.src(e), _(), setTimeout(_, 0), setTimeout(_, 250), o && o.time > 0 && l.one("loadedmetadata", () => {
l.isDisposed() || l.currentTime(o.time);
}), n && l.play()?.catch(() => {}));
}).catch(() => {}), l;
}
-var Vce = "<canvas data-ambient-canvas=\"\" width=\"32\" height=\"18\"></canvas>";
-function qD(e, t = null) {
- if (e.querySelector(":scope > [data-ambient-canvas]") || e.insertAdjacentHTML("afterbegin", Vce), e.querySelector(":scope > #playerStatsBtn")) return;
+var Uce = "<canvas data-ambient-canvas=\"\" width=\"32\" height=\"18\"></canvas>";
+function GD(e, t = null) {
+ if (e.querySelector(":scope > [data-ambient-canvas]") || e.insertAdjacentHTML("afterbegin", Uce), e.querySelector(":scope > #playerStatsBtn")) return;
let n = document.createElement("template");
- n.innerHTML = Cce(), e.insertBefore(n.content, t);
+ n.innerHTML = Tce(), e.insertBefore(n.content, t);
}
-function JD(e, t) {
- let n = HD.get(e);
+function KD(e, t) {
+ let n = BD.get(e);
if (!n || e.isDisposed()) return () => {};
let r = (e) => t.querySelector(`:scope > #${e}`), i = {
statsButton: r("playerStatsBtn"),
@@ -32887,29 +32887,29 @@ function JD(e, t) {
if (a && o) {
a.hidden = !n.ready;
let e = () => {
- o.hidden || (o.hidden = !0, a.setAttribute("aria-pressed", "false"), UD &&= (clearInterval(UD), null));
+ o.hidden || (o.hidden = !0, a.setAttribute("aria-pressed", "false"), VD &&= (clearInterval(VD), null));
};
a.onclick = () => {
if (!o.hidden) {
e();
return;
}
- document.dispatchEvent(new CustomEvent(_D, { detail: "stats" })), o.hidden = !1, a.setAttribute("aria-pressed", "true"), n.updateStats(), UD && clearInterval(UD), UD = setInterval(n.updateStats, 1e3);
+ document.dispatchEvent(new CustomEvent(hD, { detail: "stats" })), o.hidden = !1, a.setAttribute("aria-pressed", "true"), n.updateStats(), VD && clearInterval(VD), VD = setInterval(n.updateStats, 1e3);
};
let t = (t) => {
t.detail !== "stats" && e();
};
- document.addEventListener(_D, t), s = () => document.removeEventListener(_D, t);
+ document.addEventListener(hD, t), s = () => document.removeEventListener(hD, t);
}
- let c = e.el().querySelector("video"), l = c ? Ece(c) : () => {}, u = !0, d = () => {
- u && (u = !1, s(), l(), n.chrome === i && (n.chrome = null, KD()));
+ let c = e.el().querySelector("video"), l = c ? Oce(c) : () => {}, u = !0, d = () => {
+ u && (u = !1, s(), l(), n.chrome === i && (n.chrome = null, WD()));
};
return e.one("dispose", d), d;
}
-function YD(e, t) {
- if (t.kind === "immerse") return zce(e, t);
- let { kind: n, item: r, media: i = null, handedOff: a, onPlayer: o } = t, s = rD(), c = t.chrome === !1 ? null : e.parentElement;
- c && qD(c, e);
+function qD(e, t) {
+ if (t.kind === "immerse") return Vce(e, t);
+ let { kind: n, item: r, media: i = null, handedOff: a, onPlayer: o } = t, s = tD(), c = t.chrome === !1 ? null : e.parentElement;
+ c && GD(c, e);
let l = { resume: t.resume ?? null };
if (n === "follow") l = {
...l,
@@ -32929,16 +32929,16 @@ function YD(e, t) {
method: "POST",
body: JSON.stringify({ id: r.id })
}).catch(() => {});
- }, { once: !0 }), ID(r, e, {
+ }, { once: !0 }), PD(r, e, {
watched: "#watched",
mark: "#mark",
ratio: "#ratioTxt"
});
}
let u = null, d = !1, f = () => {}, p = () => {
- f(), !(!u || a?.(u)) && (lD() === u && (uD(null), KD()), DD(u));
+ f(), !(!u || a?.(u)) && (sD() === u && (cD(null), WD()), TD(u));
};
- return Bce(r, e, t.autoplay ?? s.settings().detailAutoplay, l).then((t) => {
+ return Hce(r, e, t.autoplay ?? s.settings().detailAutoplay, l).then((t) => {
if (u = t, d) {
p();
return;
@@ -32947,45 +32947,45 @@ function YD(e, t) {
o?.(null);
return;
}
- c && (f = JD(t, c)), n === "follow" && Lce(r, e), o?.(t);
+ c && (f = KD(t, c)), n === "follow" && zce(r, e), o?.(t);
}), () => {
d = !0, p();
};
}
//#endregion
//#region src/player/playback.ts
-function XD(e) {
+function JD(e) {
e && (e.paused ? e.play()?.catch(() => {}) : e.pause());
}
-function Hce(e, t) {
+function Wce(e, t) {
let n = e.duration, r = (e.currentTime || 0) + t;
e.currentTime = Number.isFinite(n) ? Math.max(0, Math.min(n, r)) : Math.max(0, r);
}
//#endregion
//#region src/jav-artwork.ts
-function ZD(e) {
+function YD(e) {
return e === "thumbnail" ? "thumbnail" : "cover";
}
-function Uce(e, t) {
- return e.is_jav && e.code && e.has_cover && (ZD(t) === "cover" || !e.has_thumb) ? "cover" : e.has_thumb ? "thumbnail" : "";
+function Gce(e, t) {
+ return e.is_jav && e.code && e.has_cover && (YD(t) === "cover" || !e.has_thumb) ? "cover" : e.has_thumb ? "thumbnail" : "";
}
-var QD = .704;
-function $D(e, t) {
+var XD = .704;
+function ZD(e, t) {
let n = new URLSearchParams(Object.entries(e).filter(([, e]) => e));
return t && n.set("exclude_vertical", "1"), n.toString();
}
-var Wce = (e, t) => [
+var Kce = (e, t) => [
"catalog-grid",
"catalog",
e,
t
-], Gce = (e, t) => [
+], qce = (e, t) => [
"catalog-grid",
"entity",
e,
t
];
-async function Kce(e, t, n, r, i) {
+async function Jce(e, t, n, r, i) {
let a = new URLSearchParams(e);
a.set("limit", String(n)), a.set("offset", String(t)), t && a.set("count", "0");
let o = await K(`/api/items?${a}`, i), s = {
@@ -32995,22 +32995,22 @@ async function Kce(e, t, n, r, i) {
};
return !t && !s.items.length && !r && (s.libraryEmpty = (await K("/api/items?limit=1&thumb=0", i)).total === 0), s;
}
-var qce = (e) => (t) => (t.offset === 0 ? t.items.length < (t.total || 0) : t.has_more) ? t.offset + e : void 0, Jce = (e, t) => {
+var Yce = (e) => (t) => (t.offset === 0 ? t.items.length < (t.total || 0) : t.has_more) ? t.offset + e : void 0, Xce = (e, t) => {
let n = t.reduce((e, t) => e + t.items.length, 0);
return (e.has_more == null ? n < (e.total || 0) : e.has_more) ? n : void 0;
};
-function eO(e) {
- let t = $D(e.filters || {}, !!e.excludeVertical), n = e.batchSize || 60, r = e.filters?.state === "trash";
+function QD(e) {
+ let t = ZD(e.filters || {}, !!e.excludeVertical), n = e.batchSize || 60, r = e.filters?.state === "trash";
return {
- queryKey: Wce(t, e.revision || 0),
- queryFn: ({ pageParam: e, signal: i }) => Kce(t, e, n, r, i),
+ queryKey: Kce(t, e.revision || 0),
+ queryFn: ({ pageParam: e, signal: i }) => Jce(t, e, n, r, i),
initialPageParam: 0,
- getNextPageParam: qce(n)
+ getNextPageParam: Yce(n)
};
}
-function Yce(e) {
+function Zce(e) {
return {
- queryKey: Gce(e.entityKey || "", e.revision || 0),
+ queryKey: qce(e.entityKey || "", e.revision || 0),
queryFn: async ({ pageParam: t, signal: n }) => {
if (!e.fetchPage) return {
items: [],
@@ -33025,12 +33025,12 @@ function Yce(e) {
};
},
initialPageParam: 0,
- getNextPageParam: Jce
+ getNextPageParam: Xce
};
}
-async function Xce(e, t) {
+async function Qce(e, t) {
if (e.mode !== "catalog") return;
- let n = eO(e);
+ let n = QD(e);
await z.fetchInfiniteQuery({
...n,
queryFn: ({ pageParam: e }) => n.queryFn({
@@ -33039,7 +33039,7 @@ async function Xce(e, t) {
})
});
}
-function Zce(e, t, n) {
+function $ce(e, t, n) {
return n ? e.filter((e) => {
let n = e.part_group?.key;
if (n) {
@@ -33054,24 +33054,24 @@ function Zce(e, t, n) {
return !0;
}) : [...e];
}
-var tO = (e, t) => !!e && !!Uce(e, t);
-function Qce(e, t) {
- let n = (e) => tO(e, t) && !!(e.creator || (e.performers || []).length || e.studio);
- return e.slice(15).find(n) || e.slice(8).find(n) || e.slice(8).find((e) => tO(e, t)) || e[e.length - 1];
+var $D = (e, t) => !!e && !!Gce(e, t);
+function ele(e, t) {
+ let n = (e) => $D(e, t) && !!(e.creator || (e.performers || []).length || e.studio);
+ return e.slice(15).find(n) || e.slice(8).find(n) || e.slice(8).find((e) => $D(e, t)) || e[e.length - 1];
}
-function $ce(e, { collapse: t, mix: n, javImage: r }) {
+function tle(e, { collapse: t, mix: n, javImage: r }) {
let i = {
parts: /* @__PURE__ */ new Set(),
editions: /* @__PURE__ */ new Set()
}, a = /* @__PURE__ */ new Set(), o = [], s = [];
for (let c of e) {
s.push(o.length);
- let e = Zce(c.items.filter((e) => !a.has(e.id) && !!a.add(e.id)), i, t), l = e.map((e) => ({
+ let e = $ce(c.items.filter((e) => !a.has(e.id) && !!a.add(e.id)), i, t), l = e.map((e) => ({
kind: "card",
item: e
}));
if (n && e.length >= 8) {
- let t = Qce(e, r);
+ let t = ele(e, r);
t && l.splice(7, 0, {
kind: "mix",
seed: t
@@ -33084,16 +33084,16 @@ function $ce(e, { collapse: t, mix: n, javImage: r }) {
pageStarts: s
};
}
-function ele(e, t, n) {
+function nle(e, t, n) {
let r = Math.max(1, n), i = [];
for (let n = Math.max(r, Math.ceil(Math.max(0, t) / r) * r); n < e; n += r) i.push(n);
return i;
}
-function tle(e, t) {
+function rle(e, t) {
let n = new URLSearchParams(Object.entries(e).filter(([, e]) => e));
return n.set("orient", "竖屏"), n.set("limit", "18"), n.set("offset", String(t)), n.toString();
}
-function nle(e, t) {
+function ile(e, t) {
let n = [...t].sort((e, t) => e.at - t.at), r = [], i = 0;
for (let t of n) r.push({
start: i,
@@ -33106,10 +33106,10 @@ function nle(e, t) {
strip: null
}), r;
}
-function nO(e, t) {
- rO((t) => t.id === e, t);
+function eO(e, t) {
+ tO((t) => t.id === e, t);
}
-function rO(e, t) {
+function tO(e, t) {
z.setQueriesData({
queryKey: ["catalog-grid"],
predicate: (e) => Array.isArray(e.state.data?.pages)
@@ -33126,31 +33126,31 @@ function rO(e, t) {
}
//#endregion
//#region src/react/item-detail/item-detail.ts
-var iO = (e) => ["item", e], aO = (e) => [
+var nO = (e) => ["item", e], rO = (e) => [
"item-queue",
e.kind,
e.kind === "playlist" ? e.playlistId : e.seedId
-], rle = (e, t) => [
+], ale = (e, t) => [
"item-related",
e,
t
-], ile = (e) => `/api/item?id=${e}`, ale = (e, t) => `/api/related?id=${e}&limit=${t}`, oO = "/api/playlist", sO = "/api/feedback", cO = "/api/item-tag", lO = "/api/watch-later", uO = "/api/quality-goal", dO = "/api/preference", fO = class extends Error {};
-async function pO(e, t) {
- let n = await K(ile(e), t);
- if (n.error) throw new fO(n.error);
+], ole = (e) => `/api/item?id=${e}`, sle = (e, t) => `/api/related?id=${e}&limit=${t}`, iO = "/api/playlist", aO = "/api/feedback", oO = "/api/item-tag", sO = "/api/watch-later", cO = "/api/quality-goal", lO = "/api/preference", uO = class extends Error {};
+async function dO(e, t) {
+ let n = await K(ole(e), t);
+ if (n.error) throw new uO(n.error);
return n;
}
-async function mO(e, t, n) {
+async function fO(e, t, n) {
if (e.kind === "mix") {
- let r = e.seedId, [i, a] = await Promise.all([pO(r, n), t.mixRelated(r)]);
- return z.setQueryData(iO(i.id), i), {
+ let r = e.seedId, [i, a] = await Promise.all([dO(r, n), t.mixRelated(r)]);
+ return z.setQueryData(nO(i.id), i), {
kind: "mix",
seedId: r,
title: `Mix · ${be(i, t.tagLabel)}`,
items: [i, ...a.filter((e) => e.id !== i.id)]
};
}
- if (e.kind === "playlist") return hO(await K(`${oO}?id=${e.playlistId}`, n));
+ if (e.kind === "playlist") return pO(await K(`${iO}?id=${e.playlistId}`, n));
let r = await K(`/api/${e.kind}?id=${e.seedId}`, n);
if (r.error || !r.items?.length) throw Error(r.error || "这一组已不存在");
return {
@@ -33160,19 +33160,19 @@ async function mO(e, t, n) {
items: r.items
};
}
-var hO = (e) => ({
+var pO = (e) => ({
kind: "playlist",
playlistId: e.id,
title: e.name,
items: e.items || [],
currentAssetId: e.current_asset_id
-}), gO = (e) => e.disposal === "vanished";
-function _O(e, t) {
+}), mO = (e) => e.disposal === "vanished";
+function hO(e, t) {
if (e.kind === "mix") return t;
- let n = e.kind === "playlist" ? e.items.filter((e) => !gO(e)) : e.items;
+ let n = e.kind === "playlist" ? e.items.filter((e) => !mO(e)) : e.items;
return n.length ? t != null && n.some((e) => e.id === t) ? t : e.kind === "playlist" && n.some((t) => t.id === e.currentAssetId) ? e.currentAssetId : n[0].id : null;
}
-function ole(e, t) {
+function cle(e, t) {
if (t?.kind !== "parts") return e;
let n = t.items.find((t) => t.id === e.id)?.part_label || "";
return e.part_label === n ? e : {
@@ -33180,15 +33180,15 @@ function ole(e, t) {
part_label: n
};
}
-async function sle(e, t) {
+async function lle(e, t) {
let { queue: n, actions: r } = e, i = null, a = !1;
if (n) {
- let o = aO(n);
+ let o = rO(n);
try {
let r = n.fresh ? void 0 : z.getQueryData(o);
a = !r && n.kind === "mix", i = r || await z.fetchQuery({
queryKey: o,
- queryFn: () => mO(n, e.helpers, t),
+ queryFn: () => fO(n, e.helpers, t),
staleTime: 0
});
} catch (n) {
@@ -33200,20 +33200,20 @@ async function sle(e, t) {
return;
}
}
- let o = i ? _O(i, e.id) : e.id;
+ let o = i ? hO(i, e.id) : e.id;
if (o == null) {
r.redirect(i?.kind === "playlist" ? { kind: "playlists" } : { kind: "gone" });
return;
}
- let s, c = a && o === i?.seedId ? z.getQueryData(iO(o)) : void 0;
+ let s, c = a && o === i?.seedId ? z.getQueryData(nO(o)) : void 0;
try {
s = c || await z.fetchQuery({
- queryKey: iO(o),
- queryFn: () => pO(o, t),
+ queryKey: nO(o),
+ queryFn: () => dO(o, t),
staleTime: 0
});
} catch (e) {
- if (e instanceof fO) {
+ if (e instanceof uO) {
r.redirect({ kind: "gone" });
return;
}
@@ -33224,7 +33224,7 @@ async function sle(e, t) {
id: Number(s.follow_item_id)
});
}
-function cle(e) {
+function ule(e) {
let t = e.entity_refs || {}, n = /* @__PURE__ */ new Set(), r = (e) => {
let t = re(e.name);
return !e.name || n.has(t) ? !1 : (n.add(t), !0);
@@ -33246,42 +33246,42 @@ function cle(e) {
unowned: !i.length && !c.length && !String(e.creator || "").trim()
};
}
-var vO = (e) => Math.min(Math.max(e || 0, 0), 100), yO = (e) => Math.round(vO(e) / 20), lle = (e) => {
- let t = yO(e);
+var gO = (e) => Math.min(Math.max(e || 0, 0), 100), _O = (e) => Math.round(gO(e) / 20), dle = (e) => {
+ let t = _O(e);
return t ? `${t} 星` : "未评分";
-}, ule = (e, t) => {
+}, fle = (e, t) => {
let n = t * 20;
return n === (e || 0) ? 0 : n;
};
-function dle(e, t) {
+function ple(e, t) {
let n = /* @__PURE__ */ new Map();
return (e.tags || []).filter((e) => !t.isDurationTag(e.k)).forEach((e) => {
let r = re(t.tagLabel(e.k)), i = n.get(r);
(!i || re(e.k) === r && re(i.k) !== r) && n.set(r, e);
}), [...n.values()].slice(0, 40);
}
-var bO = (e, t) => (e.tags || []).some((e) => re(e.k) === re(t)), xO = (e, t) => ({
+var vO = (e, t) => (e.tags || []).some((e) => re(e.k) === re(t)), yO = (e, t) => ({
...e,
tags: (e.tags || []).filter((e) => re(e.k) !== re(t))
-}), SO = (e, t) => bO(e, t.k) ? e : {
+}), bO = (e, t) => vO(e, t.k) ? e : {
...e,
tags: [...e.tags || [], t]
-}, CO = "peach.recentTags";
-function wO() {
+}, xO = "peach.recentTags";
+function SO() {
try {
- let e = JSON.parse(localStorage.getItem(CO) || "[]");
+ let e = JSON.parse(localStorage.getItem(xO) || "[]");
return Array.isArray(e) ? e.map(String) : [];
} catch {
return [];
}
}
-function fle(e) {
+function mle(e) {
try {
- let t = wO().filter((t) => re(t) !== re(e));
- localStorage.setItem(CO, JSON.stringify([e, ...t].slice(0, 12)));
+ let t = SO().filter((t) => re(t) !== re(e));
+ localStorage.setItem(xO, JSON.stringify([e, ...t].slice(0, 12)));
} catch {}
}
-function ple(e, t, n) {
+function hle(e, t, n) {
let r = re(e), i = new Map(t.map((e) => [re(e.k), e])), a = t.filter((e) => !r || re(e.k).includes(r)).slice(0, 120), o = r ? [] : n.map((e) => i.get(re(e)) || {
k: e,
n: 0
@@ -33292,73 +33292,73 @@ function ple(e, t, n) {
create: r && !s ? e.trim() : ""
};
}
-var mle = {
+var gle = {
中字: "subtitle",
无码: "uncensored",
无码破解: "cracked",
有码: "censored"
-}, hle = {
+}, _le = {
mix: "Mix",
parts: "分卷",
editions: "版本",
playlist: "播放列表"
};
-function gle(e) {
+function vle(e) {
let t = e.items.length, n = e.kind === "parts" ? `${t} 卷` : e.kind === "editions" ? `${t} 个版本` : `${t} 个视频`;
return {
- title: hle[e.kind],
+ title: _le[e.kind],
summary: e.kind === "editions" ? n : `${e.title} · ${n}`
};
}
-var TO = (e = "") => /^(?:\d+|[a-h])$/i.test(e) ? `第 ${e} 卷` : e, _le = (e, t) => t?.kind === "parts" && e.part_label ? `<small class="javedition partlabel">${P(TO(e.part_label))}</small>` : "";
-function vle(e, t, n, r) {
+var CO = (e = "") => /^(?:\d+|[a-h])$/i.test(e) ? `第 ${e} 卷` : e, yle = (e, t) => t?.kind === "parts" && e.part_label ? `<small class="javedition partlabel">${P(CO(e.part_label))}</small>` : "";
+function ble(e, t, n, r) {
let i = e.filter((e) => e !== t), a = i.indexOf(n);
return i.splice(a + +!!r, 0, t), i;
}
-var yle = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]);
-function ble(e, t) {
+var xle = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]);
+function Sle(e, t) {
return t ? "offline" : e.location === "online" && !e.follow_item_id ? "online" : e.cost === "metered" && e.location !== "online" ? "metered" : "";
}
-function xle(e) {
+function Cle(e) {
let t = Number(e.duration) > 0 ? Number(e.duration) : 0;
return !e.play_seconds || !t ? null : Math.min(Number(e.play_seconds) / t, 1) * 100;
}
-function EO(e, t) {
+function wO(e, t) {
return e === "dislike" ? t.feedback === "dislike" ? "已标记不合口味" : "已取消不合口味" : e === "seen" ? t.feedback === "seen" ? "已标记看过" : "已取消看过" : e === "dispose" ? t.disposal === "trash" ? "已移入回收站" : "已移出回收站" : "已记录一次高潮";
}
//#endregion
//#region src/react/immerse/immerse.ts
-var Sle = (e, t, n) => [
+var wle = (e, t, n) => [
"immerse-list",
e,
t,
n
];
-function Cle(e) {
+function Tle(e) {
let t = new URLSearchParams();
for (let [n, r] of Object.entries(e)) r && t.set(n, String(r));
return t.delete("orient"), t.set("sort", "rand"), t.set("limit", "60"), t.set("offset", "0"), t.set("thumb", ""), t.toString();
}
-var wle = (e, t) => e.cost !== "metered" && !!e.duration && !t(String(e.location ?? ""));
-function Tle(e, t = Math.random) {
+var Ele = (e, t) => e.cost !== "metered" && !!e.duration && !t(String(e.location ?? ""));
+function Dle(e, t = Math.random) {
for (let n = e.length - 1; n > 0; n--) {
let r = Math.floor(t() * (n + 1));
[e[n], e[r]] = [e[r], e[n]];
}
return e;
}
-async function Ele(e, t) {
- return Tle(((await K(`/api/items?${e}`)).items || []).filter((e) => wle(e, t)));
+async function Ole(e, t) {
+ return Dle(((await K(`/api/items?${e}`)).items || []).filter((e) => Ele(e, t)));
}
-var DO = (e) => z.ensureQueryData({
- queryKey: iO(e),
- queryFn: ({ signal: t }) => pO(e, t)
+var TO = (e) => z.ensureQueryData({
+ queryKey: nO(e),
+ queryFn: ({ signal: t }) => dO(e, t)
});
-function Dle(e, t) {
+function kle(e, t) {
let n = new Set(e.map((e) => e.id));
return e.concat(t.filter((e) => !n.has(e.id)));
}
-function Ole(e) {
+function Ale(e) {
let t = e.performers || [], n = t.length ? t.slice(0, 3).join("、") + (t.length > 3 ? ` 等 ${t.length} 人` : "") : e.creator || "未归属", r = t.length ? "performer" : e.creator ? "creator" : "";
return {
who: n,
@@ -33367,314 +33367,314 @@ function Ole(e) {
ref: r && e.entity_refs?.[r]?.[0] || null
};
}
-function kle(e, t, n) {
+function jle(e, t, n) {
if (!e || !t || !n || !Number.isFinite(n)) return null;
let r = e / t;
return (r > n ? r / n : n / r) > 1.05 ? "contain" : "cover";
}
-function Ale(e, t) {
+function Mle(e, t) {
return e.videoWidth && e.videoHeight ? e.videoWidth >= e.videoHeight : !!(t.width && t.height && t.width > 0 && t.height > 0 && t.width >= t.height);
}
-var jle = 15e3, OO = {
+var Nle = 15e3, EO = {
open: !1,
idle: !1,
wide: !1,
loading: null,
shown: null
-}, kO = null, AO = null, jO = null, MO = null, NO = OO, PO = 0, FO = 0, IO = 0, LO = "", RO = [], zO = 0, BO = !1, VO = !1, HO = null, UO = /* @__PURE__ */ new Set(), WO = "", GO = null, KO = 0, qO = null, JO = !1;
-function YO() {
- if (!kO) throw Error("沉浸岛还没有接上宿主(configureImmerse)");
- return kO;
+}, DO = null, OO = null, kO = null, AO = null, jO = EO, MO = 0, NO = 0, PO = 0, FO = "", IO = [], LO = 0, RO = !1, zO = !1, BO = null, VO = /* @__PURE__ */ new Set(), HO = "", UO = null, WO = 0, GO = null, KO = !1;
+function qO() {
+ if (!DO) throw Error("沉浸岛还没有接上宿主(configureImmerse)");
+ return DO;
}
-function Mle() {
- return (!AO || !jO?.isConnected) && (AO?.unmount(), jO = document.createElement("div"), jO.dataset.immerseHost = "", document.body.append(jO), AO = (0, Ot.createRoot)(jO)), AO;
+function Ple() {
+ return (!OO || !kO?.isConnected) && (OO?.unmount(), kO = document.createElement("div"), kO.dataset.immerseHost = "", document.body.append(kO), OO = (0, Ot.createRoot)(kO)), OO;
}
-function XO() {
- let e = Mle();
- (0, Dt.flushSync)(() => e.render(/* @__PURE__ */ (0, H.jsx)(qE, { children: /* @__PURE__ */ (0, H.jsx)(zk, { view: NO }) })));
+function JO() {
+ let e = Ple();
+ (0, Dt.flushSync)(() => e.render(/* @__PURE__ */ (0, H.jsx)(GE, { children: /* @__PURE__ */ (0, H.jsx)(Yle, { view: jO }) })));
}
-function ZO() {
- let e = GO ? bD(GO.id) : 0;
- return e ? `${WO} · ${SD(e)}` : WO;
+function YO() {
+ let e = UO ? vD(UO.id) : 0;
+ return e ? `${HO} · ${bD(e)}` : HO;
}
-function QO(e, t = null) {
- if (clearInterval(KO), KO = 0, e === null) {
- NO = {
- ...NO,
+function XO(e, t = null) {
+ if (clearInterval(WO), WO = 0, e === null) {
+ jO = {
+ ...jO,
loading: null
- }, XO();
+ }, JO();
return;
}
- WO = e, GO = t, NO = {
- ...NO,
- loading: ZO()
- }, XO(), KO = window.setInterval(() => {
- GO = RO[zO] ?? null, NO = {
- ...NO,
- loading: ZO()
- }, XO();
+ HO = e, UO = t, jO = {
+ ...jO,
+ loading: YO()
+ }, JO(), WO = window.setInterval(() => {
+ UO = IO[LO] ?? null, jO = {
+ ...jO,
+ loading: YO()
+ }, JO();
}, 500);
}
-function Nle(e) {
+function Fle(e) {
let t = document.createElement("div");
t.dataset.immerseSlide = "", e && (t.style.transform = `translateY(${e}%)`);
let n = document.createElement("video");
- n.className = "video-js", n.playsInline = !0, n.preload = "auto", t.append(n), MO.track.append(t);
- let r = OD(), i = () => {}, a = {
+ n.className = "video-js", n.playsInline = !0, n.preload = "auto", t.append(n), AO.track.append(t);
+ let r = ED(), i = () => {}, a = {
el: t,
video: n,
session: r,
- release: () => jD(r),
+ release: () => kD(r),
disposed: !1,
gone: new Promise((e) => {
i = e;
}),
leave: i
};
- return UO.add(a), a;
+ return VO.add(a), a;
}
-function Ple(e, t) {
+function Ile(e, t) {
return new Promise((n) => {
- e.release = YD(e.video, {
+ e.release = qD(e.video, {
kind: "immerse",
item: t,
session: e.session,
onLoaded: n,
onEnded: () => {
- NO.open && lk(1);
+ jO.open && ik(1);
}
}), e.gone.then(n);
});
}
-function $O(e) {
- !e || e.disposed || (e.disposed = !0, UO.delete(e), e.leave(), e.release(), e.el.remove(), HO === e && (HO = null));
+function ZO(e) {
+ !e || e.disposed || (e.disposed = !0, VO.delete(e), e.leave(), e.release(), e.el.remove(), BO === e && (BO = null));
}
-var ek = [
+var QO = [
"loadeddata",
"canplay",
"error"
];
-function tk(e) {
+function Lle(e) {
let { video: t } = e;
return t.readyState >= 3 ? Promise.resolve() : new Promise((n) => {
let r = !1, i = () => {
- r || (r = !0, clearTimeout(a), ek.forEach((e) => t.removeEventListener(e, i)), n());
+ r || (r = !0, clearTimeout(a), QO.forEach((e) => t.removeEventListener(e, i)), n());
};
- ek.forEach((e) => t.addEventListener(e, i, { once: !0 }));
- let a = setTimeout(i, jle);
+ QO.forEach((e) => t.addEventListener(e, i, { once: !0 }));
+ let a = setTimeout(i, Nle);
e.gone.then(i);
});
}
-function nk(e) {
- let t = e.closest("[data-immerse-track]"), n = t && t.clientWidth && t.clientHeight ? t.clientWidth / t.clientHeight : window.innerWidth / window.innerHeight, r = kle(e.videoWidth, e.videoHeight, n);
+function $O(e) {
+ let t = e.closest("[data-immerse-track]"), n = t && t.clientWidth && t.clientHeight ? t.clientWidth / t.clientHeight : window.innerWidth / window.innerHeight, r = jle(e.videoWidth, e.videoHeight, n);
r === "contain" ? e.dataset.fit = "contain" : r && delete e.dataset.fit;
}
-var rk = () => MO?.track.querySelectorAll("video").forEach(nk);
-function ik(e) {
- delete e.dataset.fit, e.readyState >= 1 ? nk(e) : e.addEventListener("loadedmetadata", () => nk(e), { once: !0 });
+var ek = () => AO?.track.querySelectorAll("video").forEach($O);
+function tk(e) {
+ delete e.dataset.fit, e.readyState >= 1 ? $O(e) : e.addEventListener("loadedmetadata", () => $O(e), { once: !0 });
}
-function ak(e) {
- NO = {
- ...NO,
+function Rle(e) {
+ jO = {
+ ...jO,
wide: e
- }, XO(), rk();
+ }, JO(), ek();
}
-var ok = () => {
- let e = LO;
+var nk = () => {
+ let e = FO;
return z.fetchQuery({
- queryKey: Sle(e, FO, IO),
- queryFn: () => Ele(e, YO().sourceOffline),
+ queryKey: wle(e, NO, PO),
+ queryFn: () => Ole(e, qO().sourceOffline),
staleTime: Infinity
});
};
-function sk(e, t) {
+function zle(e, t) {
let n = () => se(e.duration) || se(t.duration);
e.addEventListener("timeupdate", () => {
let t = n();
- t && MO && (MO.progress.style.width = `${(e.currentTime / t * 100).toFixed(2)}%`);
- }), qO = {
+ t && AO && (AO.progress.style.width = `${(e.currentTime / t * 100).toFixed(2)}%`);
+ }), GO = {
video: e,
duration: n
};
}
-async function ck(e = 0) {
- let t = RO[zO];
- if (!t || BO) return;
- let n = PO;
- YO().route(t.id), BO = !0, QO(e ? "切换中…" : "加载中…", t);
+async function rk(e = 0) {
+ let t = IO[LO];
+ if (!t || RO) return;
+ let n = MO;
+ qO().route(t.id), RO = !0, XO(e ? "切换中…" : "加载中…", t);
let r = null;
try {
- if (await DO(t.id).catch((e) => {
- if (!(e instanceof fO)) throw e;
- }), n !== PO) return;
- let i = HO, a = !!(e && i);
- a || $O(i);
- let o = Nle(a ? e > 0 ? 100 : -100 : 0);
- if (r = o, ik(o.video), await Ple(o, t), await tk(o), o.disposed || (ak(Ale(o.video, t)), a && i && (requestAnimationFrame(() => requestAnimationFrame(() => {
+ if (await TO(t.id).catch((e) => {
+ if (!(e instanceof uO)) throw e;
+ }), n !== MO) return;
+ let i = BO, a = !!(e && i);
+ a || ZO(i);
+ let o = Fle(a ? e > 0 ? 100 : -100 : 0);
+ if (r = o, tk(o.video), await Ile(o, t), await Lle(o), o.disposed || (Rle(Mle(o.video, t)), a && i && (requestAnimationFrame(() => requestAnimationFrame(() => {
i.el.style.transform = `translateY(${e > 0 ? -100 : 100}%)`, o.el.style.transform = "";
- })), await new Promise((e) => setTimeout(e, 210)), $O(i), o.el.style.transform = ""), o.disposed)) return;
- HO = o, r = null, o.video.play()?.catch(() => {}), NO = {
- ...NO,
+ })), await new Promise((e) => setTimeout(e, 210)), ZO(i), o.el.style.transform = ""), o.disposed)) return;
+ BO = o, r = null, o.video.play()?.catch(() => {}), jO = {
+ ...jO,
idle: !1,
shown: {
item: t,
- index: zO,
- length: RO.length
+ index: LO,
+ length: IO.length
}
- }, sk(o.video, t), q("/api/play", { id: t.id }).catch(() => {}), QO(null);
+ }, zle(o.video, t), q("/api/play", { id: t.id }).catch(() => {}), XO(null);
} catch {
- $O(r), n === PO && QO(null);
+ ZO(r), n === MO && XO(null);
} finally {
- n === PO && (BO = !1);
+ n === MO && (RO = !1);
}
}
-async function lk(e) {
- if (BO || !NO.open) return;
- let t = PO;
- if (zO += e, QO("切换中…", RO[zO] ?? null), zO >= RO.length - 3 && !VO) {
- VO = !0;
+async function ik(e) {
+ if (RO || !jO.open) return;
+ let t = MO;
+ if (LO += e, XO("切换中…", IO[LO] ?? null), LO >= IO.length - 3 && !zO) {
+ zO = !0;
try {
- IO += 1;
- let e = await ok();
- t === PO && (RO = Dle(RO, e));
+ PO += 1;
+ let e = await nk();
+ t === MO && (IO = kle(IO, e));
} catch {} finally {
- VO = !1;
+ zO = !1;
}
}
- t === PO && (zO >= RO.length && (zO = 0), zO < 0 && (zO = RO.length - 1), await ck(e));
+ t === MO && (LO >= IO.length && (LO = 0), LO < 0 && (LO = IO.length - 1), await rk(e));
}
-async function uk(e) {
- let t = ++PO;
- dk(), FO += 1, IO = 0, LO = Cle(YO().filters()), z.removeQueries({ queryKey: ["immerse-list"] }), NO = {
- ...NO,
+async function Ble(e) {
+ let t = ++MO;
+ ak(), NO += 1, PO = 0, FO = Tle(qO().filters()), z.removeQueries({ queryKey: ["immerse-list"] }), jO = {
+ ...jO,
open: !0,
idle: !0,
shown: null
- }, document.body.setAttribute("data-immerse-open", ""), QO("加载内容…");
+ }, document.body.setAttribute("data-immerse-open", ""), XO("加载内容…");
try {
- let n = await ok();
+ let n = await nk();
if (e && !n.some((t) => t.id === e)) {
- let t = await DO(e).catch((e) => {
- if (e instanceof fO) return null;
+ let t = await TO(e).catch((e) => {
+ if (e instanceof uO) return null;
throw e;
});
t?.id && (n = [t, ...n.filter((t) => t.id !== e)]);
}
- if (t !== PO) return;
- if (RO = n, !RO.length) {
- fk(), YO().warn("当前筛选下没有可直接播放的内容");
+ if (t !== MO) return;
+ if (IO = n, !IO.length) {
+ ok(), qO().warn("当前筛选下没有可直接播放的内容");
return;
}
- zO = Math.max(0, RO.findIndex((t) => t.id === e)), await ck();
+ LO = Math.max(0, IO.findIndex((t) => t.id === e)), await rk();
} catch {
- if (t !== PO) return;
- QO(null), fk();
+ if (t !== MO) return;
+ XO(null), ok();
}
}
-function dk() {
- clearInterval(KO), KO = 0, vk(), gk = null, qO = null, JO = !1, [...UO].forEach($O), BO = !1;
+function ak() {
+ clearInterval(WO), WO = 0, fk(), uk = null, GO = null, KO = !1, [...VO].forEach(ZO), RO = !1;
}
-function fk() {
- NO.open && (PO++, dk(), NO = OO, document.body.removeAttribute("data-immerse-open"), XO(), YO().closed());
+function ok() {
+ jO.open && (MO++, ak(), jO = EO, document.body.removeAttribute("data-immerse-open"), JO(), qO().closed());
}
-var pk = 0, mk = null, hk = 0, gk = null, _k = 0;
-function vk() {
- clearTimeout(pk), pk = 0, mk = null;
+var sk = 0, ck = null, lk = 0, uk = null, dk = 0;
+function fk() {
+ clearTimeout(sk), sk = 0, ck = null;
}
-function yk(e) {
- let t = HO?.video;
+function Vle(e) {
+ let t = BO?.video;
if (!t) return;
let n = e < window.innerWidth / 2 ? -1 : 1, r = Date.now();
- if (mk && mk.side === n && r - mk.at <= 280) {
- vk(), Hce(t, YO().seekSeconds() * n);
+ if (ck && ck.side === n && r - ck.at <= 280) {
+ fk(), Wce(t, qO().seekSeconds() * n);
return;
}
- pk && (clearTimeout(pk), pk = 0, XD(t)), mk = {
+ sk && (clearTimeout(sk), sk = 0, JD(t)), ck = {
side: n,
at: r
- }, pk = window.setTimeout(() => {
- pk = 0, mk = null, NO.open && XD(HO?.video);
+ }, sk = window.setTimeout(() => {
+ sk = 0, ck = null, jO.open && JD(BO?.video);
}, 280);
}
-function bk() {
- Date.now() < hk || XD(HO?.video);
+function Hle() {
+ Date.now() < lk || JD(BO?.video);
}
-var xk = (e) => MO?.bar.toggleAttribute("data-scrubbing", e);
-function Sk(e) {
- MO && (MO.progress.style.width = `${(e * 100).toFixed(2)}%`);
+var pk = (e) => AO?.bar.toggleAttribute("data-scrubbing", e);
+function mk(e) {
+ AO && (AO.progress.style.width = `${(e * 100).toFixed(2)}%`);
}
-function Ck(e) {
+function hk(e) {
let t = e.target;
if (e.touches.length !== 1 || !t?.closest("[data-immerse-track]")) {
- gk = null;
+ uk = null;
return;
}
- let n = HO?.video;
- gk = {
+ let n = BO?.video;
+ uk = {
x: e.touches[0].clientX,
y: e.touches[0].clientY,
axis: "",
from: n && n.currentTime || 0
};
}
-function wk(e) {
- if (!gk || e.touches.length !== 1) return;
- let t = e.touches[0].clientX - gk.x, n = e.touches[0].clientY - gk.y;
- if (!gk.axis) {
+function gk(e) {
+ if (!uk || e.touches.length !== 1) return;
+ let t = e.touches[0].clientX - uk.x, n = e.touches[0].clientY - uk.y;
+ if (!uk.axis) {
if (Math.abs(t) < 12 && Math.abs(n) < 12) return;
- gk.axis = Math.abs(t) > Math.abs(n) ? "x" : "y", gk.axis === "x" && xk(!0);
+ uk.axis = Math.abs(t) > Math.abs(n) ? "x" : "y", uk.axis === "x" && pk(!0);
}
- if (gk.axis !== "x") return;
- let r = HO?.video, i = r && r.duration || 0;
- i && (e.preventDefault(), gk.to = Math.min(i, Math.max(0, gk.from + t / window.innerWidth * i)), Sk(gk.to / i));
+ if (uk.axis !== "x") return;
+ let r = BO?.video, i = r && r.duration || 0;
+ i && (e.preventDefault(), uk.to = Math.min(i, Math.max(0, uk.from + t / window.innerWidth * i)), mk(uk.to / i));
}
-function Tk(e) {
- if (!gk) return;
- let t = gk;
- if (gk = null, hk = Date.now() + 700, xk(!1), t.axis === "x") {
- let e = HO?.video;
+function _k(e) {
+ if (!uk) return;
+ let t = uk;
+ if (uk = null, lk = Date.now() + 700, pk(!1), t.axis === "x") {
+ let e = BO?.video;
e && t.to != null && (e.currentTime = t.to);
return;
}
let n = e.changedTouches[0], r = n.clientX - t.x, i = t.y - n.clientY;
if (Math.abs(i) > 60) {
- vk(), lk(i > 0 ? 1 : -1);
+ fk(), ik(i > 0 ? 1 : -1);
return;
}
- Math.abs(r) <= 14 && Math.abs(i) <= 14 && (e.preventDefault(), yk(n.clientX));
+ Math.abs(r) <= 14 && Math.abs(i) <= 14 && (e.preventDefault(), Vle(n.clientX));
}
-function Ek() {
- gk = null, xk(!1);
+function vk() {
+ uk = null, pk(!1);
}
-function Dk(e) {
+function yk(e) {
let t = Date.now();
- t - _k < 260 || (_k = t, lk(e.deltaY > 0 ? 1 : -1));
+ t - dk < 260 || (dk = t, ik(e.deltaY > 0 ? 1 : -1));
}
-function Ok(e) {
- let t = MO.bar.getBoundingClientRect();
+function bk(e) {
+ let t = AO.bar.getBoundingClientRect();
return Math.min(1, Math.max(0, (e.clientX - t.left) / t.width));
}
-function kk(e) {
- qO?.duration() && (JO = !0, xk(!0), e.currentTarget.setPointerCapture(e.pointerId), Sk(Ok(e)), e.preventDefault());
+function xk(e) {
+ GO?.duration() && (KO = !0, pk(!0), e.currentTarget.setPointerCapture(e.pointerId), mk(bk(e)), e.preventDefault());
}
-function Ak(e) {
- JO && Sk(Ok(e));
+function Sk(e) {
+ KO && mk(bk(e));
}
-function jk(e) {
- if (!JO) return;
- JO = !1, xk(!1);
- let t = qO?.duration();
- qO && t && (qO.video.currentTime = t * Ok(e));
+function Ule(e) {
+ if (!KO) return;
+ KO = !1, pk(!1);
+ let t = GO?.duration();
+ GO && t && (GO.video.currentTime = t * bk(e));
}
-function Mk() {
- JO = !1, xk(!1);
+function Wle() {
+ KO = !1, pk(!1);
}
-async function Nk(e, t) {
- let n = await q(sO, {
+async function Ck(e, t) {
+ let n = await q(aO, {
id: e,
kind: t
- }), r = z.getQueryData(iO(e));
- if (!r) return nO(e, {
+ }), r = z.getQueryData(nO(e));
+ if (!r) return eO(e, {
feedback: n.feedback ?? void 0,
o_count: n.o_count
}), n;
@@ -33683,7 +33683,7 @@ async function Nk(e, t) {
feedback: n.feedback ?? void 0,
o_count: n.o_count
};
- return z.setQueryData(iO(e), i), nO(e, {
+ return z.setQueryData(nO(e), i), eO(e, {
feedback: i.feedback,
disposal: i.disposal,
watch_later: i.watch_later,
@@ -33691,7 +33691,7 @@ async function Nk(e, t) {
o_count: i.o_count
}), n;
}
-var Pk = [
+var Gle = [
{
kind: "dislike",
glyph: "thumbs-down",
@@ -33708,31 +33708,31 @@ var Pk = [
label: "记一次高潮"
}
];
-function Fk(e) {
- return xw({
- queryKey: iO(e ?? 0),
- queryFn: ({ signal: t }) => pO(e, t),
+function wk(e) {
+ return yw({
+ queryKey: nO(e ?? 0),
+ queryFn: ({ signal: t }) => dO(e, t),
enabled: e != null,
staleTime: Infinity
}).data;
}
-function Ik({ kind: e, glyph: t, label: n, id: r }) {
- let i = Fk(r), a = ww({
+function Kle({ kind: e, glyph: t, label: n, id: r }) {
+ let i = wk(r), a = Sw({
mutationFn: async (t) => {
- let n = z.getQueryData(iO(t))?.feedback || null;
+ let n = z.getQueryData(nO(t))?.feedback || null;
return {
- result: await Nk(t, e),
+ result: await Ck(t, e),
before: n
};
},
onSuccess: ({ result: t, before: n }, r) => {
- YO().toast(EO(e, t), { undo: async () => {
- e === "o" ? await Nk(r, "o-undo") : (t.feedback && await Nk(r, t.feedback), n && await Nk(r, n));
+ qO().toast(wO(e, t), { undo: async () => {
+ e === "o" ? await Ck(r, "o-undo") : (t.feedback && await Ck(r, t.feedback), n && await Ck(r, n));
} }), e === "dislike" && t.feedback === "dislike" && setTimeout(() => {
- lk(1);
+ ik(1);
}, 260);
},
- onError: (e) => YO().failure("更新反馈", e)
+ onError: (e) => qO().failure("更新反馈", e)
}), o = a.isPending, s = e !== "o" && i ? i.feedback === e ? "true" : "false" : void 0;
return /* @__PURE__ */ (0, H.jsxs)("div", {
"data-immerse-action": "",
@@ -33763,11 +33763,11 @@ function Ik({ kind: e, glyph: t, label: n, id: r }) {
})]
});
}
-function Lk({ shown: e }) {
- let t = e?.item ?? null, n = Fk(t?.id ?? null), r = n ? Ole(n) : null, i = YO(), a = (e) => {
- e.preventDefault(), n && (fk(), n.performers?.[0] ? i.openEntity("performer", n.performers[0]) : n.creator ? i.openEntity("creator", n.creator) : i.openUnowned());
+function qle({ shown: e }) {
+ let t = e?.item ?? null, n = wk(t?.id ?? null), r = n ? Ale(n) : null, i = qO(), a = (e) => {
+ e.preventDefault(), n && (ok(), n.performers?.[0] ? i.openEntity("performer", n.performers[0]) : n.creator ? i.openEntity("creator", n.creator) : i.openUnowned());
}, o = () => {
- t && (fk(), i.openItem(t.id));
+ t && (ok(), i.openItem(t.id));
}, s = r ? ue(r.name, r.ref, Oe(r.name), r.kind || "performer") : "";
return /* @__PURE__ */ (0, H.jsxs)("div", {
"data-immerse-ui": "",
@@ -33796,18 +33796,18 @@ function Lk({ shown: e }) {
})]
});
}
-var Rk = { __html: w("媒体加载中") };
-function zk({ view: e }) {
+var Jle = { __html: w("媒体加载中") };
+function Yle({ view: e }) {
let t = (0, B.useRef)(null), n = (0, B.useRef)(null), r = (0, B.useRef)(null), i = (0, B.useRef)(null);
(0, B.useLayoutEffect)(() => {
let e = t.current;
- return MO = {
+ return AO = {
root: e,
track: n.current,
bar: r.current,
progress: i.current
- }, e.addEventListener("touchstart", Ck, { passive: !0 }), e.addEventListener("touchmove", wk, { passive: !1 }), e.addEventListener("touchend", Tk, { passive: !1 }), e.addEventListener("touchcancel", Ek, { passive: !0 }), e.addEventListener("wheel", Dk, { passive: !0 }), () => {
- e.removeEventListener("touchstart", Ck), e.removeEventListener("touchmove", wk), e.removeEventListener("touchend", Tk), e.removeEventListener("touchcancel", Ek), e.removeEventListener("wheel", Dk), MO = null;
+ }, e.addEventListener("touchstart", hk, { passive: !0 }), e.addEventListener("touchmove", gk, { passive: !1 }), e.addEventListener("touchend", _k, { passive: !1 }), e.addEventListener("touchcancel", vk, { passive: !0 }), e.addEventListener("wheel", yk, { passive: !0 }), () => {
+ e.removeEventListener("touchstart", hk), e.removeEventListener("touchmove", gk), e.removeEventListener("touchend", _k), e.removeEventListener("touchcancel", vk), e.removeEventListener("wheel", yk), AO = null;
};
}, []);
let a = e.shown?.item.id ?? null, o = (e) => e ? "" : void 0;
@@ -33824,10 +33824,10 @@ function zk({ view: e }) {
children: [/* @__PURE__ */ (0, H.jsx)("div", {
ref: n,
"data-immerse-track": "",
- onClick: bk
+ onClick: Hle
}), /* @__PURE__ */ (0, H.jsx)("div", {
"data-immerse-actions": "",
- children: Pk.map((e) => /* @__PURE__ */ (0, H.jsx)(Ik, {
+ children: Gle.map((e) => /* @__PURE__ */ (0, H.jsx)(Kle, {
...e,
id: a
}, e.kind))
@@ -33840,7 +33840,7 @@ function zk({ view: e }) {
hidden: e.loading === null,
children: [/* @__PURE__ */ (0, H.jsx)("span", {
"data-immerse-spinner": "",
- dangerouslySetInnerHTML: Rk
+ dangerouslySetInnerHTML: Jle
}), /* @__PURE__ */ (0, H.jsx)("span", { children: e.loading ?? "" })]
}),
/* @__PURE__ */ (0, H.jsx)("button", {
@@ -33848,7 +33848,7 @@ function zk({ view: e }) {
"data-immerse-close": "",
title: "关闭",
"aria-label": "关闭",
- onClick: fk,
+ onClick: ok,
children: /* @__PURE__ */ (0, H.jsx)("svg", {
viewBox: "0 0 24 24",
children: /* @__PURE__ */ (0, H.jsx)("use", { href: "#i-x" })
@@ -33857,71 +33857,71 @@ function zk({ view: e }) {
/* @__PURE__ */ (0, H.jsx)("div", {
ref: r,
"data-immerse-bar": "",
- onPointerDown: kk,
- onPointerMove: Ak,
- onPointerUp: jk,
- onPointerCancel: Mk,
+ onPointerDown: xk,
+ onPointerMove: Sk,
+ onPointerUp: Ule,
+ onPointerCancel: Wle,
children: /* @__PURE__ */ (0, H.jsx)("i", { ref: i })
}),
- /* @__PURE__ */ (0, H.jsx)(Lk, { shown: e.shown })
+ /* @__PURE__ */ (0, H.jsx)(qle, { shown: e.shown })
]
});
}
-var Bk = {
- open: uk,
- close: fk,
- isOpen: () => NO.open,
- activeVideo: () => NO.open ? HO?.video ?? null : null
+var Xle = {
+ open: Ble,
+ close: ok,
+ isOpen: () => jO.open,
+ activeVideo: () => jO.open ? BO?.video ?? null : null
};
-function Vk(e) {
- if (!NO.open) return;
+function Zle(e) {
+ if (!jO.open) return;
let t = e.target;
- t && (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.isContentEditable) || e.ctrlKey || e.metaKey || e.altKey || (e.key === "ArrowDown" && lk(1), e.key === "ArrowUp" && lk(-1));
+ t && (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.isContentEditable) || e.ctrlKey || e.metaKey || e.altKey || (e.key === "ArrowDown" && ik(1), e.key === "ArrowUp" && ik(-1));
}
-function Hk(e) {
- let t = !kO;
- return kO = e, XO(), t && (document.addEventListener("keydown", Vk), addEventListener("resize", () => {
- NO.open && rk();
+function Qle(e) {
+ let t = !DO;
+ return DO = e, JO(), t && (document.addEventListener("keydown", Zle), addEventListener("resize", () => {
+ jO.open && ek();
}), addEventListener("pagehide", () => {
- UO.forEach((e) => jD(e.session));
- })), Bk;
+ VO.forEach((e) => kD(e.session));
+ })), Xle;
}
//#endregion
//#region src/manage-header.ts
-var Uk = {
+var $le = {
"/junk-files": "垃圾文件",
"/duplicates": "重复文件",
"/review": "人工复核",
"/trash": "回收站",
"/quality-goals": "高清版",
"/scraping": "来源和凭证"
-}, Wk = /* @__PURE__ */ new Set(["/data-cleanup", "/scraping"]), Gk = ({ total: e, shown: t }) => `${e.toLocaleString()} 个符合 · 显示 ${t}`;
-function Kk(e) {
+}, eue = /* @__PURE__ */ new Set(["/data-cleanup", "/scraping"]), tue = ({ total: e, shown: t }) => `${e.toLocaleString()} 个符合 · 显示 ${t}`;
+function nue(e) {
let t = e.sections.find(([t]) => t === e.section);
if (!t) return null;
- let n = Uk[e.path] ?? "";
+ let n = $le[e.path] ?? "";
return {
title: e.section === "cleanup" && n || t[1],
crumb: n,
- compact: Wk.has(e.path) || e.section === "configuration",
+ compact: eue.has(e.path) || e.section === "configuration",
lede: e.section === "trash" ? e.trash ? {
kind: "count",
- text: Gk(e.trash),
+ text: tue(e.trash),
total: e.trash.total
} : { kind: "skeleton" } : { kind: "none" }
};
}
-var qk = "<span class=\"skeleton\" data-trash-lede-skeleton=\"text\" aria-hidden=\"true\"></span><span class=\"skeleton\" data-trash-lede-skeleton=\"action\" aria-hidden=\"true\"></span>";
+var rue = "<span class=\"skeleton\" data-trash-lede-skeleton=\"text\" aria-hidden=\"true\"></span><span class=\"skeleton\" data-trash-lede-skeleton=\"action\" aria-hidden=\"true\"></span>";
//#endregion
//#region src/react/settings-panel/icon.tsx
-function Jk({ name: e }) {
+function Tk({ name: e }) {
return /* @__PURE__ */ (0, H.jsx)("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
children: /* @__PURE__ */ (0, H.jsx)("use", { href: `#i-${e}` })
});
}
-function Yk({ name: e }) {
+function iue({ name: e }) {
return /* @__PURE__ */ (0, H.jsx)("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
@@ -33930,29 +33930,29 @@ function Yk({ name: e }) {
}
//#endregion
//#region src/react/manage-header/manage-header-island.tsx
-var Xk = null, Zk = null, Qk = null;
-function $k() {
- let e = Xk, t = Qk;
- !e || !Zk || !t || (0, Dt.flushSync)(() => Zk.render(/* @__PURE__ */ (0, H.jsx)(nA, {
+var Ek = null, Dk = null, Ok = null;
+function aue() {
+ let e = Ek, t = Ok;
+ !e || !Dk || !t || (0, Dt.flushSync)(() => Dk.render(/* @__PURE__ */ (0, H.jsx)(cue, {
host: e,
props: t
})));
}
-var eA = { render(e) {
- Qk = e, $k();
+var oue = { render(e) {
+ Ok = e, aue();
} };
-function tA(e) {
- return Xk = e, Qk = null, e.root.replaceChildren(), Zk = (0, Ot.createRoot)(e.root), eA;
+function sue(e) {
+ return Ek = e, Ok = null, e.root.replaceChildren(), Dk = (0, Ot.createRoot)(e.root), oue;
}
-function nA({ host: e, props: t }) {
- let n = Kk(t);
+function cue({ host: e, props: t }) {
+ let n = nue(t);
return n ? /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [
- /* @__PURE__ */ (0, H.jsx)(aA, {
+ /* @__PURE__ */ (0, H.jsx)(lue, {
host: e,
section: t.section,
menu: t.menu
}),
- n.crumb ? /* @__PURE__ */ (0, H.jsx)(oA, {
+ n.crumb ? /* @__PURE__ */ (0, H.jsx)(uue, {
host: e,
label: n.crumb
}) : null,
@@ -33961,29 +33961,29 @@ function nA({ host: e, props: t }) {
"data-compact": n.compact ? "" : void 0,
children: n.title
}),
- n.lede.kind === "none" ? null : /* @__PURE__ */ (0, H.jsx)(sA, {
+ n.lede.kind === "none" ? null : /* @__PURE__ */ (0, H.jsx)(due, {
host: e,
lede: n.lede
})
] }) : null;
}
-var rA = null;
-function iA(e, t, n) {
+var kk = null;
+function Ak(e, t, n) {
e.style.setProperty("--tab-x", `${t}px`), e.style.setProperty("--tab-width", `${n}px`);
}
-function aA({ host: e, section: t, menu: n }) {
+function lue({ host: e, section: t, menu: n }) {
let r = (0, B.useRef)(null), i = (0, B.useRef)(null), a = () => {
let e = r.current, t = i.current;
if (!e || !t) return;
let n = e.querySelector("button[aria-pressed=\"true\"]");
- n && !n.offsetWidth || (iA(t, n?.offsetLeft ?? 0, n?.offsetWidth ?? 0), n && (rA = {
+ n && !n.offsetWidth || (Ak(t, n?.offsetLeft ?? 0, n?.offsetWidth ?? 0), n && (kk = {
x: n.offsetLeft,
width: n.offsetWidth
}));
};
return (0, B.useLayoutEffect)(() => {
let e = r.current, t = i.current;
- rA ? iA(t, rA.x, rA.width) : a();
+ kk ? Ak(t, kk.x, kk.width) : a();
let n = 0, o = requestAnimationFrame(() => {
t.setAttribute("data-ready", ""), n = requestAnimationFrame(a);
}), s = new ResizeObserver(a);
@@ -34006,7 +34006,7 @@ function aA({ host: e, section: t, menu: n }) {
"aria-pressed": a,
"aria-current": a ? "page" : void 0,
onClick: () => e.openManage(n),
- children: [/* @__PURE__ */ (0, H.jsx)(Jk, { name: i }), /* @__PURE__ */ (0, H.jsx)("span", { children: r })]
+ children: [/* @__PURE__ */ (0, H.jsx)(Tk, { name: i }), /* @__PURE__ */ (0, H.jsx)("span", { children: r })]
}, n);
}), /* @__PURE__ */ (0, H.jsx)("span", {
ref: i,
@@ -34016,7 +34016,7 @@ function aA({ host: e, section: t, menu: n }) {
})
});
}
-function oA({ host: e, label: t }) {
+function uue({ host: e, label: t }) {
return /* @__PURE__ */ (0, H.jsx)("nav", {
"data-manage-crumb": "",
"aria-label": "Breadcrumb",
@@ -34026,20 +34026,20 @@ function oA({ host: e, label: t }) {
t.metaKey || t.ctrlKey || t.shiftKey || t.altKey || t.button || (t.preventDefault(), e.openDataCleanup());
},
children: "数据管理"
- }), /* @__PURE__ */ (0, H.jsx)(Jk, { name: "chevron-right" })] }), /* @__PURE__ */ (0, H.jsx)("li", {
+ }), /* @__PURE__ */ (0, H.jsx)(Tk, { name: "chevron-right" })] }), /* @__PURE__ */ (0, H.jsx)("li", {
"aria-current": "true",
children: /* @__PURE__ */ (0, H.jsx)("span", { children: t })
})] })
});
}
-function sA({ host: e, lede: t }) {
+function due({ host: e, lede: t }) {
return /* @__PURE__ */ (0, H.jsx)("p", {
className: "mono",
"data-manage-lede": "",
children: t.kind === "skeleton" ? /* @__PURE__ */ (0, H.jsx)("span", {
"data-trash-lede-skeletons": "",
- dangerouslySetInnerHTML: { __html: qk }
- }) : /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(cA, { text: t.text }), t.total ? /* @__PURE__ */ (0, H.jsx)("button", {
+ dangerouslySetInnerHTML: { __html: rue }
+ }) : /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(fue, { text: t.text }), t.total ? /* @__PURE__ */ (0, H.jsx)("button", {
type: "button",
"data-empty-trash": "",
"data-danger": "",
@@ -34049,7 +34049,7 @@ function sA({ host: e, lede: t }) {
}) : null] })
});
}
-function cA({ text: e }) {
+function fue({ text: e }) {
let t = (0, B.useRef)(null);
return (0, B.useLayoutEffect)(() => {
T(t.current, e);
@@ -34060,7 +34060,7 @@ function cA({ text: e }) {
}
//#endregion
//#region src/react/boardui/components/base/badges/chip.tsx
-var lA = fr({
+var jk = fr({
base: "inline-flex items-center justify-center rounded-md px-1.5 whitespace-nowrap transition-[padding,font-size] duration-200 ease",
variant: {
bold: "py-0.5 text-body-medium",
@@ -34079,25 +34079,25 @@ var lA = fr({
soft: "bg-background-secondary-default text-text-secondary"
}
});
-function uA({ variant: e = "bold", color: t = "neutral", className: n, ref: r, ...i }) {
+function Mk({ variant: e = "bold", color: t = "neutral", className: n, ref: r, ...i }) {
return /* @__PURE__ */ (0, H.jsx)("span", {
ref: r,
- className: dr(lA.base, lA.variant[e], lA.color[t], n),
+ className: dr(jk.base, jk.variant[e], jk.color[t], n),
...i
});
}
//#endregion
//#region src/react/components/empty-state.tsx
-var dA = {
+var pue = {
page: "min-h-80 justify-center rounded-floating border border-separator-border bg-background-secondary-default px-6 py-12",
plain: "px-6 py-12",
inset: "min-h-40 justify-center rounded-xl bg-background-secondary-default px-4 py-4"
};
-function fA({ icon: e, title: t, actions: n, children: r, shell: i = "page" }) {
+function Nk({ icon: e, title: t, actions: n, children: r, shell: i = "page" }) {
let a = i === "page";
return /* @__PURE__ */ (0, H.jsxs)("div", {
"data-empty-state": "",
- className: `flex flex-col items-center gap-2 text-center ${dA[i]}`,
+ className: `flex flex-col items-center gap-2 text-center ${pue[i]}`,
children: [
a ? /* @__PURE__ */ (0, H.jsx)("span", {
"aria-hidden": !0,
@@ -34127,7 +34127,7 @@ function fA({ icon: e, title: t, actions: n, children: r, shell: i = "page" }) {
}
//#endregion
//#region src/react/components/page.tsx
-function pA({ children: e }) {
+function Pk({ children: e }) {
return /* @__PURE__ */ (0, H.jsx)("div", {
className: "mx-auto flex w-full max-w-board flex-col gap-8",
children: e
@@ -34135,7 +34135,7 @@ function pA({ children: e }) {
}
//#endregion
//#region src/react/boardui/components/base/input/label.tsx
-function mA({ isRequired: e = !1, isInvalid: t, tooltip: n, className: r, children: i, ...a }) {
+function mue({ isRequired: e = !1, isInvalid: t, tooltip: n, className: r, children: i, ...a }) {
return /* @__PURE__ */ (0, H.jsxs)(yc, {
"data-label": "true",
...a,
@@ -34147,7 +34147,7 @@ function mA({ isRequired: e = !1, isInvalid: t, tooltip: n, className: r, childr
className: "text-body-medium text-text-error-primary",
children: "*"
}),
- n && /* @__PURE__ */ (0, H.jsx)(Xae, {
+ n && /* @__PURE__ */ (0, H.jsx)(Qae, {
className: "size-4 shrink-0 text-foreground-icon-quaternary",
"aria-hidden": !0
})
@@ -34156,7 +34156,7 @@ function mA({ isRequired: e = !1, isInvalid: t, tooltip: n, className: r, childr
}
//#endregion
//#region src/react/boardui/components/base/input/hint-text.tsx
-function hA({ isInvalid: e = !1, className: t, ...n }) {
+function hue({ isInvalid: e = !1, className: t, ...n }) {
return /* @__PURE__ */ (0, H.jsx)(Fc, {
slot: e ? "errorMessage" : "description",
...n,
@@ -34165,15 +34165,15 @@ function hA({ isInvalid: e = !1, className: t, ...n }) {
}
//#endregion
//#region src/react/boardui/components/base/input/input.tsx
-var gA = (0, B.createContext)({});
-function _A({ size: e = "medium", fieldClassName: t, inputClassName: n, className: r, children: i, ...a }) {
- return /* @__PURE__ */ (0, H.jsx)(gA.Provider, {
+var Fk = (0, B.createContext)({});
+function Ik({ size: e = "medium", fieldClassName: t, inputClassName: n, className: r, children: i, ...a }) {
+ return /* @__PURE__ */ (0, H.jsx)(Fk.Provider, {
value: {
size: e,
fieldClassName: t,
inputClassName: n
},
- children: /* @__PURE__ */ (0, H.jsx)(Ate, {
+ children: /* @__PURE__ */ (0, H.jsx)(jte, {
...a,
"data-input-size": e,
className: dr("group flex h-max w-full flex-col items-start gap-1", r),
@@ -34181,8 +34181,8 @@ function _A({ size: e = "medium", fieldClassName: t, inputClassName: n, classNam
})
});
}
-_A.displayName = "TextField";
-var vA = fr({
+Ik.displayName = "TextField";
+var Lk = fr({
field: [
"relative flex w-full items-center",
"rounded-2lg",
@@ -34211,44 +34211,44 @@ var vA = fr({
].join(" "),
icon: "size-5 shrink-0"
});
-function yA({ size: e, leadingIcon: t, trailingIcon: n, leadingAddon: r, fieldClassName: i, className: a, ref: o, groupRef: s, ...c }) {
- let l = (0, B.useContext)(gA), u = e ?? l.size ?? "medium", d = r != null;
+function Rk({ size: e, leadingIcon: t, trailingIcon: n, leadingAddon: r, fieldClassName: i, className: a, ref: o, groupRef: s, ...c }) {
+ let l = (0, B.useContext)(Fk), u = e ?? l.size ?? "medium", d = r != null;
return /* @__PURE__ */ (0, H.jsx)(kl, {
ref: s,
- className: ({ isFocusWithin: e, isHovered: t, isDisabled: n, isInvalid: r }) => dr(vA.field, d ? vA.fieldWithAddonSize[u] : vA.fieldSize[u], t && !e && !n && !r && "ring-border-button-hover", e && !n && !r && "ring-border-button-active", n && "bg-input-disabled-background text-input-disabled-foreground", r && "bg-background-tertiary-error text-foreground-icon-error", l.fieldClassName, i),
+ className: ({ isFocusWithin: e, isHovered: t, isDisabled: n, isInvalid: r }) => dr(Lk.field, d ? Lk.fieldWithAddonSize[u] : Lk.fieldSize[u], t && !e && !n && !r && "ring-border-button-hover", e && !n && !r && "ring-border-button-active", n && "bg-input-disabled-background text-input-disabled-foreground", r && "bg-background-tertiary-error text-foreground-icon-error", l.fieldClassName, i),
children: /* @__PURE__ */ (0, H.jsxs)("div", {
- className: vA.content,
+ className: Lk.content,
children: [/* @__PURE__ */ (0, H.jsxs)("div", {
- className: vA.leftSection,
+ className: Lk.leftSection,
children: [d ? r : t ? /* @__PURE__ */ (0, H.jsx)(t, {
- className: vA.icon,
+ className: Lk.icon,
"aria-hidden": !0
}) : null, /* @__PURE__ */ (0, H.jsx)(Ml, {
ref: o,
...c,
- className: dr(vA.input, l.inputClassName, a)
+ className: dr(Lk.input, l.inputClassName, a)
})]
}), n ? /* @__PURE__ */ (0, H.jsx)(n, {
- className: vA.icon,
+ className: Lk.icon,
"aria-hidden": !0
}) : null]
})
});
}
-yA.displayName = "InputBase";
-function bA({ label: e, hint: t, tooltip: n, placeholder: r, leadingIcon: i, trailingIcon: a, leadingAddon: o, fieldClassName: s, ref: c, groupRef: l, className: u, ...d }) {
- return /* @__PURE__ */ (0, H.jsx)(_A, {
+Rk.displayName = "InputBase";
+function zk({ label: e, hint: t, tooltip: n, placeholder: r, leadingIcon: i, trailingIcon: a, leadingAddon: o, fieldClassName: s, ref: c, groupRef: l, className: u, ...d }) {
+ return /* @__PURE__ */ (0, H.jsx)(Ik, {
...d,
className: u,
"aria-label": d["aria-label"] ?? (!e && typeof r == "string" ? r : void 0),
children: ({ isRequired: u, isInvalid: d }) => /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [
- e && /* @__PURE__ */ (0, H.jsx)(mA, {
+ e && /* @__PURE__ */ (0, H.jsx)(mue, {
isRequired: u,
isInvalid: d,
tooltip: n,
children: e
}),
- /* @__PURE__ */ (0, H.jsx)(yA, {
+ /* @__PURE__ */ (0, H.jsx)(Rk, {
ref: c,
groupRef: l,
placeholder: r,
@@ -34257,17 +34257,17 @@ function bA({ label: e, hint: t, tooltip: n, placeholder: r, leadingIcon: i, tra
leadingAddon: o,
fieldClassName: s
}),
- t && /* @__PURE__ */ (0, H.jsx)(hA, {
+ t && /* @__PURE__ */ (0, H.jsx)(hue, {
isInvalid: d,
children: t
})
] })
});
}
-bA.displayName = "Input";
+zk.displayName = "Input";
//#endregion
//#region src/react/boardui/components/foundations/icons/chevrons.tsx
-function Fle(e) {
+function gue(e) {
return /* @__PURE__ */ (0, H.jsx)("svg", {
viewBox: "0 0 16 16",
fill: "none",
@@ -34281,7 +34281,7 @@ function Fle(e) {
})
});
}
-function Ile(e) {
+function _ue(e) {
return /* @__PURE__ */ (0, H.jsx)("svg", {
viewBox: "0 0 24 24",
fill: "none",
@@ -34295,7 +34295,7 @@ function Ile(e) {
}
//#endregion
//#region src/react/boardui/utils/use-dismiss-on-outside-press.ts
-function Lle(e, t, n) {
+function vue(e, t, n) {
(0, B.useEffect)(() => {
if (!e) return;
let r = (e) => {
@@ -34309,7 +34309,7 @@ function Lle(e, t, n) {
n
]);
}
-function Rle(e, t) {
+function yue(e, t) {
let n = (0, B.useRef)(!1);
return (0, B.useEffect)(() => {
if (!e) return;
@@ -34323,11 +34323,11 @@ function Rle(e, t) {
}
//#endregion
//#region src/react/boardui/components/base/select/select.tsx
-var xA = (0, B.createContext)("md");
-function SA({ className: e, triggerClassName: t, popoverClassName: n, size: r = "md", children: i, items: a, renderValue: o, ref: s, ...c }) {
+var Bk = (0, B.createContext)("md");
+function Vk({ className: e, triggerClassName: t, popoverClassName: n, size: r = "md", children: i, items: a, renderValue: o, ref: s, ...c }) {
let l = (0, B.useRef)(null), u = (0, B.useRef)(null), [d, f] = (0, B.useState)(!1);
- Lle(d, () => f(!1), [l, u]);
- let p = Rle(d, l);
+ vue(d, () => f(!1), [l, u]);
+ let p = yue(d, l);
return /* @__PURE__ */ (0, H.jsx)(See, {
ref: s,
...c,
@@ -34340,16 +34340,16 @@ function SA({ className: e, triggerClassName: t, popoverClassName: n, size: r =
children: [/* @__PURE__ */ (0, H.jsx)(Tee, {
className: dr("flex min-w-0 items-center truncate", r === "sm" ? "gap-1" : "gap-[5px]"),
children: o
- }), /* @__PURE__ */ (0, H.jsx)(Fle, { className: dr("shrink-0 text-text-secondary transition-transform duration-200 ease", r === "sm" ? "size-3.5" : "size-4", e && "rotate-180") })]
+ }), /* @__PURE__ */ (0, H.jsx)(gue, { className: dr("shrink-0 text-text-secondary transition-transform duration-200 ease", r === "sm" ? "size-3.5" : "size-4", e && "rotate-180") })]
}), /* @__PURE__ */ (0, H.jsx)(nm, {
ref: u,
isNonModal: !0,
offset: 4,
- className: dr(soe, oT, "p-2", n),
+ className: dr(loe, iT, "p-2", n),
children: /* @__PURE__ */ (0, H.jsx)(ef, {
items: a,
- className: dr(coe, "max-h-[240px] overflow-auto"),
- children: /* @__PURE__ */ (0, H.jsx)(xA.Provider, {
+ className: dr(uoe, "max-h-[240px] overflow-auto"),
+ children: /* @__PURE__ */ (0, H.jsx)(Bk.Provider, {
value: r,
children: i
})
@@ -34357,21 +34357,21 @@ function SA({ className: e, triggerClassName: t, popoverClassName: n, size: r =
})] })
});
}
-function CA({ className: e, children: t, ...n }) {
- let r = (0, B.useContext)(xA);
+function Hk({ className: e, children: t, ...n }) {
+ let r = (0, B.useContext)(Bk);
return /* @__PURE__ */ (0, H.jsx)(af, {
...n,
- className: (t) => dr(sT, r === "sm" ? "px-2 py-1.5 text-body-2-medium" : "text-body-medium", (t.isFocused || t.isSelected) && "bg-dropdown-item-hover-background", t.isDisabled && "cursor-not-allowed text-text-disabled", typeof e == "function" ? e(t) : e),
+ className: (t) => dr(aT, r === "sm" ? "px-2 py-1.5 text-body-2-medium" : "text-body-medium", (t.isFocused || t.isSelected) && "bg-dropdown-item-hover-background", t.isDisabled && "cursor-not-allowed text-text-disabled", typeof e == "function" ? e(t) : e),
children: t
});
}
//#endregion
//#region src/react/activity/tasks.ts
-var wA = "/api/tasks", TA = ["tasks"], zle = (e, t) => K(`${wA}?${new URLSearchParams({
+var Uk = "/api/tasks", Wk = ["tasks"], bue = (e, t) => K(`${Uk}?${new URLSearchParams({
before_finished_at: e.finished_at || "",
before_id: String(e.id)
})}`, t);
-function EA(...e) {
+function Gk(...e) {
let t = /* @__PURE__ */ new Map();
for (let n of e) for (let e of n) t.has(e.id) || t.set(e.id, e);
return [...t.values()].sort((e, t) => {
@@ -34379,26 +34379,26 @@ function EA(...e) {
return n === r ? t.id - e.id : n < r ? 1 : -1;
});
}
-var Ble = 2e3, Vle = 1e4, Hle = (e) => e?.running.length ? Ble : Vle, DA = (e) => K(wA, e);
-async function Ule(e) {
+var xue = 2e3, Sue = 1e4, Cue = (e) => e?.running.length ? xue : Sue, Kk = (e) => K(Uk, e);
+async function wue(e) {
await z.fetchQuery({
- queryKey: TA,
- queryFn: () => DA(e)
+ queryKey: Wk,
+ queryFn: () => Kk(e)
});
}
-var OA = {
+var qk = {
manual: "手动",
scheduled: "定时",
startup: "启动",
cli: "命令行"
-}, Wle = {
+}, Tue = {
pending: "排队中",
running: "进行中",
succeeded: "已完成",
failed: "失败",
cancelled: "已取消",
interrupted: "被打断"
-}, Gle = (e) => Wle[e] || e, Kle = {
+}, Eue = (e) => Tue[e] || e, Due = {
checked: "已检查",
total: "总数",
scanned: "已扫描",
@@ -34428,7 +34428,7 @@ var OA = {
source: "来源",
cover_network: "封面连不上图片主机"
};
-function qle(e) {
+function Oue(e) {
let t = /* @__PURE__ */ new Map();
for (let n of e) {
if (!n.followup_key || n.parent_run_id == null) continue;
@@ -34437,7 +34437,7 @@ function qle(e) {
}
return t;
}
-function Jle(e, t) {
+function kue(e, t) {
let n = [], r = /* @__PURE__ */ new Map();
for (let i of e) {
if (!t(i)) {
@@ -34459,19 +34459,19 @@ function Jle(e, t) {
}
return n;
}
-var Yle = (e) => e.trigger === "scheduled" && e.status === "succeeded" && !e.error && !(Number(e.result_summary?.added) > 0) && !(Number(e.result_summary?.followups) > 0), kA = (e) => e.status === "pending" || e.status === "running";
-function Xle(e) {
+var Aue = (e) => e.trigger === "scheduled" && e.status === "succeeded" && !e.error && !(Number(e.result_summary?.added) > 0) && !(Number(e.result_summary?.followups) > 0), Jk = (e) => e.status === "pending" || e.status === "running";
+function jue(e) {
let t = `${e.task_label}:`, n = e.progress_label || "", r = n.startsWith(t) ? n.slice(t.length) : n === e.task_label ? "" : n, i = e.progress_total || 0;
- return [r, e.error || MA(e.result_summary) || (kA(e) && i > 0 ? `${e.progress_current || 0} / ${i} 项` : "")].filter(Boolean).join(" · ");
+ return [r, e.error || Zk(e.result_summary) || (Jk(e) && i > 0 ? `${e.progress_current || 0} / ${i} 项` : "")].filter(Boolean).join(" · ");
}
-function AA(e) {
+function Yk(e) {
if (typeof e != "number" || !Number.isFinite(e) || e < 0) return "";
let t = Math.floor(e);
if (t < 60) return `${t} 秒`;
let n = Math.floor(t / 60);
return n < 60 ? `${n} 分 ${t % 60} 秒` : `${Math.floor(n / 60)} 小时 ${n % 60} 分`;
}
-function jA(e) {
+function Xk(e) {
if (!e) return "";
let t = new Date(e);
return Number.isNaN(t.getTime()) ? "" : t.toLocaleString(void 0, {
@@ -34481,7 +34481,7 @@ function jA(e) {
minute: "2-digit"
});
}
-var Zle = /* @__PURE__ */ new Set([
+var Mue = /* @__PURE__ */ new Set([
"blocked_by",
"status",
"run_id",
@@ -34490,28 +34490,146 @@ var Zle = /* @__PURE__ */ new Set([
"completed_at",
"finished_at"
]);
-function MA(e) {
- return Object.entries(e || {}).filter(([e, t]) => !Zle.has(e) && (typeof t == "number" || typeof t == "string") && String(t) !== "").map(([e, t]) => `${Kle[e] || e} ${t}`).join(" · ");
+function Zk(e) {
+ return Object.entries(e || {}).filter(([e, t]) => !Mue.has(e) && (typeof t == "number" || typeof t == "string") && String(t) !== "").map(([e, t]) => `${Due[e] || e} ${t}`).join(" · ");
+}
+//#endregion
+//#region src/react/activity/resource-search.tsx
+function Nue({ initialCode: e, choose: t }) {
+ let [n, r] = (0, B.useState)(e), [i, a] = (0, B.useState)("quality"), [o, s] = (0, B.useState)(""), [c, l] = (0, B.useState)(""), [u, d] = (0, B.useState)(null), [f, p] = (0, B.useState)(""), [m, h] = (0, B.useState)(""), g = gT(), _ = () => {
+ if (!n.trim() || g.busy) return;
+ let e = new URLSearchParams({
+ code: n.trim(),
+ goal: i
+ });
+ o && e.set("min_size", String(Math.round(Number(o) * 1024 ** 3))), c && e.set("max_size", String(Math.round(Number(c) * 1024 ** 3))), d(null), h("");
+ let t = n.trim();
+ g.run("search", (t) => K(`/api/resources/search?${e}`, t), (e) => {
+ d(e), p(t);
+ });
+ };
+ return /* @__PURE__ */ (0, H.jsxs)("section", {
+ "aria-label": "资源搜索",
+ "aria-busy": !!g.busy,
+ className: "flex min-w-0 flex-col gap-4",
+ children: [
+ /* @__PURE__ */ (0, H.jsx)(zk, {
+ label: "搜索资源",
+ value: n,
+ maxLength: 80,
+ placeholder: "输入番号,按回车搜索",
+ isDisabled: !!g.busy,
+ onChange: r,
+ onKeyDown: (e) => {
+ e.key === "Enter" && !e.nativeEvent.isComposing && (e.preventDefault(), _());
+ }
+ }),
+ /* @__PURE__ */ (0, H.jsxs)("div", {
+ className: "flex flex-col gap-1",
+ children: [/* @__PURE__ */ (0, H.jsx)(jT, { children: "优先寻找" }), /* @__PURE__ */ (0, H.jsxs)(Vk, {
+ "aria-label": "优先寻找",
+ selectedKey: i,
+ isDisabled: !!g.busy,
+ onSelectionChange: (e) => {
+ e !== null && a(String(e));
+ },
+ children: [
+ /* @__PURE__ */ (0, H.jsx)(Hk, {
+ id: "quality",
+ children: "高清"
+ }),
+ /* @__PURE__ */ (0, H.jsx)(Hk, {
+ id: "chinese",
+ children: "中字"
+ }),
+ /* @__PURE__ */ (0, H.jsx)(Hk, {
+ id: "uncensored",
+ children: "无码"
+ })
+ ]
+ })]
+ }),
+ /* @__PURE__ */ (0, H.jsxs)("div", {
+ className: "flex gap-3 max-sm:flex-col",
+ children: [/* @__PURE__ */ (0, H.jsx)(zk, {
+ label: "最小体积(GiB)",
+ inputMode: "decimal",
+ value: o,
+ onChange: s
+ }), /* @__PURE__ */ (0, H.jsx)(zk, {
+ label: "最大体积(GiB)",
+ inputMode: "decimal",
+ value: c,
+ onChange: l
+ })]
+ }),
+ /* @__PURE__ */ (0, H.jsx)(kT, { children: "只查询已启用的自配索引器;最多显示 5 个有做种的候选。清晰度、字幕与无码标记取自来源标题。" }),
+ g.busy ? /* @__PURE__ */ (0, H.jsx)("span", {
+ role: "status",
+ dangerouslySetInnerHTML: { __html: w("正在搜索资源") }
+ }) : null,
+ g.error ? /* @__PURE__ */ (0, H.jsx)(AT, { children: g.error }) : null,
+ u?.error ? /* @__PURE__ */ (0, H.jsx)(kT, {
+ role: "status",
+ children: u.error
+ }) : null,
+ u?.state === "ready" && !u.items.length ? /* @__PURE__ */ (0, H.jsx)(kT, {
+ role: "status",
+ children: "没有符合条件的资源。"
+ }) : null,
+ u?.warnings.map((e) => /* @__PURE__ */ (0, H.jsx)(kT, { children: e }, e)),
+ u?.items.length ? /* @__PURE__ */ (0, H.jsx)("ul", {
+ className: "flex min-w-0 flex-col gap-4",
+ children: u.items.map((e) => /* @__PURE__ */ (0, H.jsxs)("li", {
+ className: "flex min-w-0 flex-col gap-2 border-t border-separator-border pt-4",
+ children: [
+ /* @__PURE__ */ (0, H.jsx)("p", {
+ className: "break-words text-body-2-medium text-text-primary",
+ children: e.name
+ }),
+ /* @__PURE__ */ (0, H.jsx)(kT, { children: [
+ `${(e.size / 1024 ** 3).toFixed(2)} GiB`,
+ `${e.seeders} 个做种`,
+ e.resolution ? `${e.resolution}p` : "",
+ e.codec,
+ e.chinese ? "中字" : "",
+ e.uncensored ? "无码" : "",
+ e.origins.join("、"),
+ e.nature
+ ].filter(Boolean).join(" · ") }),
+ /* @__PURE__ */ (0, H.jsx)("div", { children: /* @__PURE__ */ (0, H.jsx)(J, {
+ type: "button",
+ variant: "secondary",
+ onClick: () => {
+ t(e.uri, f), h(e.id);
+ },
+ children: m === e.id ? "已填入磁力" : "选用此资源"
+ }) })
+ ]
+ }, e.id))
+ }) : null
+ ]
+ });
}
//#endregion
//#region src/react/activity/downloads-panel.tsx
-var NA = "/api/downloads", PA = ["downloads"], Qle = "/api/downloads/cancel", $le = (e) => e?.tasks.some((e) => e.cancellable) ? 5e3 : 3e4, eue = {
+var Qk = "/api/downloads", $k = ["downloads"], Pue = "/api/downloads/cancel", Fue = (e) => e?.tasks.some((e) => e.cancellable) ? 5e3 : 3e4, Iue = {
ingested: "lime",
failed: "rose",
cancelled: "yellow",
stalled: "yellow"
-}, tue = {
+}, Lue = {
submitted: "已提交,远端开始下载后这里会显示进度。",
adopted: "这个磁力已经有任务了,接着跟进那一条,没有重复提交。",
adopted_remote: "远端已经有同一个任务,已接管,没有再扣配额。",
refused: "这个资源被判为违规,不再提交。",
failed: "提交没有成功。"
-}, nue = (e) => e.title || e.display_name || e.remote_name || e.code || `磁力 ${e.info_hash?.slice(0, 8) ?? e.id}`, FA = (e) => e.failure_label ? [e.failure_label, e.failure_detail].filter(Boolean).join(":") : "";
-function rue({ prefill: e }) {
- let t = xw({
- queryKey: PA,
- queryFn: ({ signal: e }) => K(`${NA}?limit=50`, e),
- refetchInterval: (e) => $le(e.state.data)
+}, Rue = (e) => e.title || e.display_name || e.remote_name || e.code || `磁力 ${e.info_hash?.slice(0, 8) ?? e.id}`, eA = (e) => e.failure_label ? [e.failure_label, e.failure_detail].filter(Boolean).join(":") : "";
+function zue({ prefill: e }) {
+ let t = yw({
+ queryKey: $k,
+ queryFn: ({ signal: e }) => K(`${Qk}?limit=50`, e),
+ refetchInterval: (e) => Fue(e.state.data)
}), n = t.data;
if (!n) return t.error ? /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "error",
@@ -34523,7 +34641,7 @@ function rue({ prefill: e }) {
tone: "error",
children: G(t.error)
}) : null,
- n.available ? r.length ? /* @__PURE__ */ (0, H.jsx)(iue, {
+ n.available ? r.length ? /* @__PURE__ */ (0, H.jsx)(Bue, {
snapshot: n,
prefill: e
}) : /* @__PURE__ */ (0, H.jsx)(Y, {
@@ -34536,15 +34654,15 @@ function rue({ prefill: e }) {
n.tasks.length ? /* @__PURE__ */ (0, H.jsx)("ul", {
"aria-live": "polite",
className: "flex min-w-0 flex-col gap-3",
- children: n.tasks.map((e) => /* @__PURE__ */ (0, H.jsx)(oue, {
+ children: n.tasks.map((e) => /* @__PURE__ */ (0, H.jsx)(Hue, {
task: e,
writable: n.available
}, e.id))
}) : null
] });
}
-function iue({ snapshot: e, prefill: t }) {
- let n = aw(), r = e.providers.filter((e) => e.configured), [i, a] = (0, B.useState)(r[0].key), [o, s] = (0, B.useState)(""), [c, l] = (0, B.useState)(t?.code ?? ""), [u, d] = (0, B.useState)(r[0].target), [f, p] = (0, B.useState)(null), m = vT(), h = (0, B.useRef)(null);
+function Bue({ snapshot: e, prefill: t }) {
+ let n = rw(), r = e.providers.filter((e) => e.configured), [i, a] = (0, B.useState)(r[0].key), [o, s] = (0, B.useState)(""), [c, l] = (0, B.useState)(t?.code ?? ""), [u, d] = (0, B.useState)(r[0].target), [f, p] = (0, B.useState)(null), m = gT(), h = (0, B.useRef)(null);
(0, B.useEffect)(() => {
t && h.current?.focus();
}, [t]);
@@ -34564,14 +34682,20 @@ function iue({ snapshot: e, prefill: t }) {
title: t?.title,
origin: t?.origin
};
- p(null), m.run("submit", (e) => q(NA, r, "POST", e), (e) => {
- p(e), e.ok && s(""), n.invalidateQueries({ queryKey: PA });
+ p(null), m.run("submit", (e) => q(Qk, r, "POST", e), (e) => {
+ p(e), e.ok && s(""), n.invalidateQueries({ queryKey: $k });
});
},
- children: /* @__PURE__ */ (0, H.jsxs)(wT, { children: [
- /* @__PURE__ */ (0, H.jsxs)(kT, { children: [
- t?.title ? /* @__PURE__ */ (0, H.jsx)(jT, { children: `给「${t.title}」找来的资源,下载完由推送发现登记入库。` }) : null,
- /* @__PURE__ */ (0, H.jsx)(bA, {
+ children: /* @__PURE__ */ (0, H.jsxs)(ST, { children: [
+ /* @__PURE__ */ (0, H.jsxs)(DT, { children: [
+ /* @__PURE__ */ (0, H.jsx)(Nue, {
+ initialCode: t?.code ?? "",
+ choose: (e, t) => {
+ s(e), l(t), h.current?.focus();
+ }
+ }),
+ t?.title ? /* @__PURE__ */ (0, H.jsx)(kT, { children: `给「${t.title}」找来的资源,下载完由推送发现登记入库。` }) : null,
+ /* @__PURE__ */ (0, H.jsx)(zk, {
ref: h,
label: "磁力链接",
placeholder: "magnet:?xt=urn:btih:…",
@@ -34582,19 +34706,19 @@ function iue({ snapshot: e, prefill: t }) {
}),
/* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-col gap-1",
- children: [/* @__PURE__ */ (0, H.jsx)(NT, { children: "下载到" }), /* @__PURE__ */ (0, H.jsx)(SA, {
+ children: [/* @__PURE__ */ (0, H.jsx)(jT, { children: "下载到" }), /* @__PURE__ */ (0, H.jsx)(Vk, {
"aria-label": "下载到",
selectedKey: i,
onSelectionChange: (e) => {
e !== null && _(String(e));
},
- children: r.map((e) => /* @__PURE__ */ (0, H.jsx)(CA, {
+ children: r.map((e) => /* @__PURE__ */ (0, H.jsx)(Hk, {
id: e.key,
children: e.label
}, e.key))
})]
}),
- /* @__PURE__ */ (0, H.jsx)(bA, {
+ /* @__PURE__ */ (0, H.jsx)(zk, {
label: "目标目录",
placeholder: g.target || "/云下载",
autoComplete: "off",
@@ -34603,7 +34727,7 @@ function iue({ snapshot: e, prefill: t }) {
value: u,
onChange: d
}),
- /* @__PURE__ */ (0, H.jsx)(bA, {
+ /* @__PURE__ */ (0, H.jsx)(zk, {
label: "番号",
placeholder: "可不填",
autoComplete: "off",
@@ -34612,15 +34736,15 @@ function iue({ snapshot: e, prefill: t }) {
onChange: l
})
] }),
- f ? /* @__PURE__ */ (0, H.jsx)(kT, {
+ f ? /* @__PURE__ */ (0, H.jsx)(DT, {
divided: !0,
- children: /* @__PURE__ */ (0, H.jsx)(aue, { result: f })
+ children: /* @__PURE__ */ (0, H.jsx)(Vue, { result: f })
}) : null,
- m.error ? /* @__PURE__ */ (0, H.jsx)(kT, {
+ m.error ? /* @__PURE__ */ (0, H.jsx)(DT, {
divided: !0,
- children: /* @__PURE__ */ (0, H.jsx)(MT, { children: m.error })
+ children: /* @__PURE__ */ (0, H.jsx)(AT, { children: m.error })
}) : null,
- /* @__PURE__ */ (0, H.jsx)(AT, {
+ /* @__PURE__ */ (0, H.jsx)(OT, {
status: i === "115" ? "115 每提交一次扣一条离线配额,重新提交也算。" : void 0,
children: /* @__PURE__ */ (0, H.jsx)(J, {
type: "submit",
@@ -34632,23 +34756,23 @@ function iue({ snapshot: e, prefill: t }) {
] })
});
}
-function aue({ result: e }) {
- let t = FA(e.task), n = tue[e.outcome];
- return e.outcome === "failed" ? /* @__PURE__ */ (0, H.jsx)(MT, { children: t ? `${n}${t}` : n }) : e.outcome === "refused" ? /* @__PURE__ */ (0, H.jsx)(MT, { children: n }) : /* @__PURE__ */ (0, H.jsx)(jT, {
+function Vue({ result: e }) {
+ let t = eA(e.task), n = Lue[e.outcome];
+ return e.outcome === "failed" ? /* @__PURE__ */ (0, H.jsx)(AT, { children: t ? `${n}${t}` : n }) : e.outcome === "refused" ? /* @__PURE__ */ (0, H.jsx)(AT, { children: n }) : /* @__PURE__ */ (0, H.jsx)(kT, {
role: "status",
children: n
});
}
-function oue({ task: e, writable: t }) {
- let n = aw(), r = vT(), [i, a] = (0, B.useState)(!1), o = FA(e), s = e.state === "failed", c = [
+function Hue({ task: e, writable: t }) {
+ let n = rw(), r = gT(), [i, a] = (0, B.useState)(!1), o = eA(e), s = e.state === "failed", c = [
e.provider_label,
e.code,
e.target,
- jA(e.submitted_at)
+ Xk(e.submitted_at)
].filter(Boolean).join(" · "), l = () => {
- n.invalidateQueries({ queryKey: PA });
+ n.invalidateQueries({ queryKey: $k });
}, u = () => {
- r.run("cancel", (t) => q(Qle, { id: e.id }, "POST", t), l);
+ r.run("cancel", (t) => q(Pue, { id: e.id }, "POST", t), l);
}, d = () => {
let t = {
magnet: e.source_uri,
@@ -34658,14 +34782,14 @@ function oue({ task: e, writable: t }) {
title: e.title,
origin: e.origin
};
- r.run("resubmit", (e) => q(NA, t, "POST", e), l);
+ r.run("resubmit", (e) => q(Qk, t, "POST", e), l);
}, f = () => {
navigator.clipboard.writeText(e.source_uri).then(() => a(!0), () => a(!1));
};
return /* @__PURE__ */ (0, H.jsxs)("li", {
"data-download-state": e.state,
"data-download-id": e.id,
- className: lT({
+ className: sT({
padding: "none",
bordered: "line",
className: s ? "flex flex-col border-border-error-default" : "flex flex-col"
@@ -34677,9 +34801,9 @@ function oue({ task: e, writable: t }) {
className: "flex flex-wrap items-center gap-2",
children: [/* @__PURE__ */ (0, H.jsx)("strong", {
className: "min-w-0 break-words text-title-1-medium text-text-primary",
- children: nue(e)
- }), /* @__PURE__ */ (0, H.jsx)(uA, {
- color: eue[e.state] ?? "neutral",
+ children: Rue(e)
+ }), /* @__PURE__ */ (0, H.jsx)(Mk, {
+ color: Iue[e.state] ?? "neutral",
children: e.state_label
})]
}),
@@ -34687,7 +34811,7 @@ function oue({ task: e, writable: t }) {
className: "min-w-0 break-words text-caption-1-regular text-text-secondary",
children: c
}),
- e.state === "remote_running" && e.progress != null ? /* @__PURE__ */ (0, H.jsx)(ST, {
+ e.state === "remote_running" && e.progress != null ? /* @__PURE__ */ (0, H.jsx)(bT, {
label: "远端下载进度",
value: Math.round(e.progress * 100),
max: 100
@@ -34696,7 +34820,7 @@ function oue({ task: e, writable: t }) {
className: "min-w-0 break-all text-caption-1-regular text-text-secondary",
children: e.ledger_path
}) : null,
- r.error ? /* @__PURE__ */ (0, H.jsx)(MT, { children: r.error }) : null,
+ r.error ? /* @__PURE__ */ (0, H.jsx)(AT, { children: r.error }) : null,
/* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-wrap items-center gap-2 pt-1",
children: [
@@ -34734,23 +34858,23 @@ function oue({ task: e, writable: t }) {
}
//#endregion
//#region src/react/activity/activity-page.tsx
-var sue = {
+var Uue = {
succeeded: "lime",
failed: "rose",
cancelled: "yellow",
interrupted: "yellow"
};
-function IA({ status: e }) {
- return /* @__PURE__ */ (0, H.jsx)(uA, {
- color: sue[e] ?? "neutral",
- children: Gle(e)
+function tA({ status: e }) {
+ return /* @__PURE__ */ (0, H.jsx)(Mk, {
+ color: Uue[e] ?? "neutral",
+ children: Eue(e)
});
}
-function cue({ rows: e }) {
+function Wue({ rows: e }) {
return /* @__PURE__ */ (0, H.jsx)("ul", {
className: "flex min-w-0 flex-col",
children: e.map((e) => {
- let t = Xle(e);
+ let t = jue(e);
return /* @__PURE__ */ (0, H.jsxs)("li", {
"data-status": e.status,
"data-followup-key": e.followup_key,
@@ -34760,7 +34884,7 @@ function cue({ rows: e }) {
className: "min-w-0 break-words text-caption-1-regular text-text-primary",
children: e.task_label
}),
- /* @__PURE__ */ (0, H.jsx)(IA, { status: e.status }),
+ /* @__PURE__ */ (0, H.jsx)(tA, { status: e.status }),
t ? /* @__PURE__ */ (0, H.jsx)("span", {
className: "min-w-0 break-words text-caption-1-regular text-text-secondary",
children: t
@@ -34770,12 +34894,12 @@ function cue({ rows: e }) {
})
});
}
-function LA({ run: e, meta: t, children: n, footer: r, followups: i }) {
+function nA({ run: e, meta: t, children: n, footer: r, followups: i }) {
return /* @__PURE__ */ (0, H.jsxs)("li", {
"data-status": e.status,
"data-task-key": e.task_key,
"data-run-id": e.id,
- className: lT({
+ className: sT({
padding: "none",
bordered: "line",
className: e.status === "failed" ? "flex flex-col border-border-error-default" : "flex flex-col"
@@ -34789,7 +34913,7 @@ function LA({ run: e, meta: t, children: n, footer: r, followups: i }) {
children: [/* @__PURE__ */ (0, H.jsx)("strong", {
className: "min-w-0 break-words text-title-1-medium text-text-primary",
children: e.task_label
- }), /* @__PURE__ */ (0, H.jsx)(IA, { status: e.status })]
+ }), /* @__PURE__ */ (0, H.jsx)(tA, { status: e.status })]
}),
/* @__PURE__ */ (0, H.jsx)("p", {
className: "text-caption-1-regular text-text-secondary",
@@ -34798,7 +34922,7 @@ function LA({ run: e, meta: t, children: n, footer: r, followups: i }) {
n
]
}),
- i?.length ? /* @__PURE__ */ (0, H.jsx)(cue, { rows: i }) : null,
+ i?.length ? /* @__PURE__ */ (0, H.jsx)(Wue, { rows: i }) : null,
r ? /* @__PURE__ */ (0, H.jsx)("div", {
className: "flex min-h-14 flex-col justify-center rounded-b-2xl border-t border-separator-border bg-card-footer px-5 py-3",
children: /* @__PURE__ */ (0, H.jsx)("p", {
@@ -34809,15 +34933,15 @@ function LA({ run: e, meta: t, children: n, footer: r, followups: i }) {
]
});
}
-function lue({ run: e, followups: t }) {
- let n = e.progress_total || 0, r = e.progress_current || 0, i = e.progress_label || "正在进行", a = AA(e.elapsed_seconds), o = [OA[e.trigger] || e.trigger, a && `已跑 ${a}`].filter(Boolean).join(" · ");
- return /* @__PURE__ */ (0, H.jsx)(LA, {
+function Gue({ run: e, followups: t }) {
+ let n = e.progress_total || 0, r = e.progress_current || 0, i = e.progress_label || "正在进行", a = Yk(e.elapsed_seconds), o = [qk[e.trigger] || e.trigger, a && `已跑 ${a}`].filter(Boolean).join(" · ");
+ return /* @__PURE__ */ (0, H.jsx)(nA, {
run: e,
meta: o,
followups: t,
children: n > 0 ? /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-col gap-1.5",
- children: [/* @__PURE__ */ (0, H.jsx)(ST, {
+ children: [/* @__PURE__ */ (0, H.jsx)(bT, {
label: i,
value: r,
max: n
@@ -34832,20 +34956,20 @@ function lue({ run: e, followups: t }) {
" 项"
]
})]
- }) : /* @__PURE__ */ (0, H.jsx)(bT, { label: i })
+ }) : /* @__PURE__ */ (0, H.jsx)(vT, { label: i })
});
}
-function RA({ run: e, followups: t, runs: n }) {
- let r = MA(e.result_summary), i = AA(e.elapsed_seconds), a = n && n.length > 1 ? n[n.length - 1] : void 0, o = (a ? [
- OA[e.trigger] || e.trigger,
+function rA({ run: e, followups: t, runs: n }) {
+ let r = Zk(e.result_summary), i = Yk(e.elapsed_seconds), a = n && n.length > 1 ? n[n.length - 1] : void 0, o = (a ? [
+ qk[e.trigger] || e.trigger,
`近 ${n.length} 轮`,
- `${jA(a.finished_at)} – ${jA(e.finished_at)}`
+ `${Xk(a.finished_at)} – ${Xk(e.finished_at)}`
] : [
- OA[e.trigger] || e.trigger,
- jA(e.finished_at),
+ qk[e.trigger] || e.trigger,
+ Xk(e.finished_at),
i && `用时 ${i}`
]).filter(Boolean).join(" · ");
- return /* @__PURE__ */ (0, H.jsx)(LA, {
+ return /* @__PURE__ */ (0, H.jsx)(nA, {
run: e,
meta: o,
footer: e.error,
@@ -34856,7 +34980,7 @@ function RA({ run: e, followups: t, runs: n }) {
}) : null
});
}
-function zA({ title: e, children: t }) {
+function iA({ title: e, children: t }) {
let n = (0, B.useId)();
return /* @__PURE__ */ (0, H.jsxs)("section", {
"aria-labelledby": n,
@@ -34868,41 +34992,41 @@ function zA({ title: e, children: t }) {
}), t]
});
}
-function BA({ live: e = !1, children: t }) {
+function aA({ live: e = !1, children: t }) {
return /* @__PURE__ */ (0, H.jsx)("ul", {
"aria-live": e ? "polite" : void 0,
className: "flex min-w-0 flex-col gap-3",
children: t
});
}
-function uue({ prefill: e }) {
- let t = xw({
- queryKey: TA,
- queryFn: ({ signal: e }) => DA(e),
- refetchInterval: (e) => Hle(e.state.data)
+function oA({ prefill: e }) {
+ let t = yw({
+ queryKey: Wk,
+ queryFn: ({ signal: e }) => Kk(e),
+ refetchInterval: (e) => Cue(e.state.data)
}), n = t.data, r = n?.finished, [i, a] = (0, B.useState)([]), [o, s] = (0, B.useState)(!1), [c, l] = (0, B.useState)(r);
- r !== c && (l(r), i.length && c && a(EA(i, c)));
- let u = ww({
- mutationFn: ({ oldest: e }) => zle(e),
+ r !== c && (l(r), i.length && c && a(Gk(i, c)));
+ let u = Sw({
+ mutationFn: ({ oldest: e }) => bue(e),
onSuccess: (e, { shown: t }) => {
- a((n) => EA(n, t, e.finished || [])), s(!!e.finished_has_more);
+ a((n) => Gk(n, t, e.finished || [])), s(!!e.finished_has_more);
}
}), d = t.error ? G(t.error) : "";
- if (!n) return /* @__PURE__ */ (0, H.jsx)(pA, { children: /* @__PURE__ */ (0, H.jsx)(Y, {
+ if (!n) return /* @__PURE__ */ (0, H.jsx)(Pk, { children: /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "error",
children: d || "读取任务中心失败"
}) });
- let f = EA(n.finished || [], i), p = [
+ let f = Gk(n.finished || [], i), p = [
...n.running || [],
...n.skipped || [],
...f
- ], m = qle(p), h = new Set(p.map((e) => e.id)), g = (e) => e.filter((e) => !(e.followup_key && e.parent_run_id != null && h.has(e.parent_run_id))), _ = g(f), v = _[_.length - 1], y = !!v && (i.length ? o : !!n.finished_has_more), b = () => {
+ ], m = Oue(p), h = new Set(p.map((e) => e.id)), g = (e) => e.filter((e) => !(e.followup_key && e.parent_run_id != null && h.has(e.parent_run_id))), _ = g(f), v = _[_.length - 1], y = !!v && (i.length ? o : !!n.finished_has_more), b = () => {
!u.isPending && v && u.mutate({
oldest: v,
shown: f
});
- }, x = _.filter((e) => m.get(e.id)?.some(kA)), S = g(n.running || []), C = g(n.skipped || []), w = _.filter((e) => !x.includes(e) && !C.some((t) => t.id === e.id)), T = Jle(w, (e) => Yle(e) && !m.get(e.id)?.length), E = !S.length && !x.length && !C.length && !w.length;
- return /* @__PURE__ */ (0, H.jsxs)(pA, { children: [
+ }, x = _.filter((e) => m.get(e.id)?.some(Jk)), S = g(n.running || []), C = g(n.skipped || []), w = _.filter((e) => !x.includes(e) && !C.some((t) => t.id === e.id)), T = kue(w, (e) => Aue(e) && !m.get(e.id)?.length), E = !S.length && !x.length && !C.length && !w.length;
+ return /* @__PURE__ */ (0, H.jsxs)(Pk, { children: [
d ? /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "error",
children: d
@@ -34911,20 +35035,20 @@ function uue({ prefill: e }) {
tone: "warning",
children: n.message || "账本上还没有任务中心的表"
}) : null,
- E ? /* @__PURE__ */ (0, H.jsx)(fA, {
+ E ? /* @__PURE__ */ (0, H.jsx)(Nk, {
shell: "plain",
- icon: Jw,
+ icon: Kw,
title: "还没有任务记录",
children: "扫描、追更检查、批量操作和命令行批处理跑起来之后,这里会显示它们的进度与结果。"
}) : /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [
- /* @__PURE__ */ (0, H.jsx)(zA, {
+ /* @__PURE__ */ (0, H.jsx)(iA, {
title: "正在进行",
- children: S.length || x.length ? /* @__PURE__ */ (0, H.jsxs)(BA, {
+ children: S.length || x.length ? /* @__PURE__ */ (0, H.jsxs)(aA, {
live: !0,
- children: [S.map((e) => /* @__PURE__ */ (0, H.jsx)(lue, {
+ children: [S.map((e) => /* @__PURE__ */ (0, H.jsx)(Gue, {
run: e,
followups: m.get(e.id)
- }, e.id)), x.map((e) => /* @__PURE__ */ (0, H.jsx)(RA, {
+ }, e.id)), x.map((e) => /* @__PURE__ */ (0, H.jsx)(rA, {
run: e,
followups: m.get(e.id)
}, e.id))]
@@ -34933,17 +35057,17 @@ function uue({ prefill: e }) {
children: "没有任务在跑。"
})
}),
- C.length ? /* @__PURE__ */ (0, H.jsx)(zA, {
+ C.length ? /* @__PURE__ */ (0, H.jsx)(iA, {
title: "被挡下的",
- children: /* @__PURE__ */ (0, H.jsx)(BA, { children: C.map((e) => /* @__PURE__ */ (0, H.jsx)(RA, {
+ children: /* @__PURE__ */ (0, H.jsx)(aA, { children: C.map((e) => /* @__PURE__ */ (0, H.jsx)(rA, {
run: e,
followups: m.get(e.id)
}, e.id)) })
}) : null,
- w.length || y ? /* @__PURE__ */ (0, H.jsxs)(zA, {
+ w.length || y ? /* @__PURE__ */ (0, H.jsxs)(iA, {
title: "最近完成",
children: [
- w.length ? /* @__PURE__ */ (0, H.jsx)(BA, { children: T.map(({ run: e, runs: t }) => /* @__PURE__ */ (0, H.jsx)(RA, {
+ w.length ? /* @__PURE__ */ (0, H.jsx)(aA, { children: T.map(({ run: e, runs: t }) => /* @__PURE__ */ (0, H.jsx)(rA, {
run: e,
runs: t,
followups: m.get(e.id)
@@ -34955,7 +35079,7 @@ function uue({ prefill: e }) {
y ? /* @__PURE__ */ (0, H.jsx)(J, {
variant: "secondary",
size: "small",
- leadingIcon: Iw,
+ leadingIcon: Pw,
className: "self-start",
...X(u.isPending),
onClick: b,
@@ -34964,15 +35088,15 @@ function uue({ prefill: e }) {
]
}) : null
] }),
- /* @__PURE__ */ (0, H.jsx)(zA, {
+ /* @__PURE__ */ (0, H.jsx)(iA, {
title: "云下载",
- children: /* @__PURE__ */ (0, H.jsx)(rue, { prefill: e })
+ children: /* @__PURE__ */ (0, H.jsx)(zue, { prefill: e })
})
] });
}
//#endregion
//#region src/react/components/grid-reveal.tsx
-function VA(e, t) {
+function sA(e, t) {
let [n, r] = (0, B.useState)(e ? "skeleton" : "none"), [i] = (0, B.useState)(() => e ? t() : ""), a = (0, B.useRef)(null);
return (0, B.useLayoutEffect)(() => {
a.current && s(a.current);
@@ -34998,7 +35122,7 @@ function VA(e, t) {
fading: n === "fade"
};
}
-function HA({ message: e, onRetry: t }) {
+function cA({ message: e, onRetry: t }) {
return /* @__PURE__ */ (0, H.jsx)("div", {
"data-media-error": "",
onClick: (e) => {
@@ -35012,7 +35136,7 @@ function HA({ message: e, onRetry: t }) {
}
//#endregion
//#region src/react/components/art-slot.tsx
-function UA({ artwork: e, identity: t = e.html, relayout: n }) {
+function lA({ artwork: e, identity: t = e.html, relayout: n }) {
let [r, i] = (0, B.useState)({
identity: t,
artwork: e
@@ -35032,24 +35156,24 @@ function UA({ artwork: e, identity: t = e.html, relayout: n }) {
}
//#endregion
//#region src/react/components/media-card.tsx
-var due = 9 / 16;
-function WA({ name: e }) {
+var uA = 9 / 16;
+function dA({ name: e }) {
return /* @__PURE__ */ (0, H.jsx)("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
children: /* @__PURE__ */ (0, H.jsx)("use", { href: `#i-${e}` })
});
}
-var fue = {
+var fA = {
image: "图片",
audio: "音频",
archive: "压缩包",
other: "其它文件"
};
-function GA(e, t, n) {
- return t === "short" ? due : Ve(n);
+function pA(e, t, n) {
+ return t === "short" ? uA : Ve(n);
}
-function pue(e) {
+function mA(e) {
let { kind: t, name: n, coStarred: r, performers: i, refs: a, total: o } = fe(e), s = i[0] || "", c = xe(e);
return {
avatar: r ? /* @__PURE__ */ (0, H.jsx)("div", {
@@ -35096,7 +35220,7 @@ function pue(e) {
})
};
}
-function mue() {
+function hA() {
return /* @__PURE__ */ (0, H.jsxs)("button", {
type: "button",
"data-media-preview": "",
@@ -35115,7 +35239,7 @@ function mue() {
})]
});
}
-function hue({ item: e, actions: t }) {
+function gA({ item: e, actions: t }) {
let [n, r] = (0, B.useState)(null), [i, a] = (0, B.useState)(!1), o = n?.id === e.id ? n.on : !!e.watch_later;
return /* @__PURE__ */ (0, H.jsx)("div", {
"data-media-later": "",
@@ -35133,21 +35257,21 @@ function hue({ item: e, actions: t }) {
},
"aria-busy": i || void 0,
"aria-disabled": i || void 0,
- children: /* @__PURE__ */ (0, H.jsx)(WA, { name: o ? "check" : "bookmark-plus" })
+ children: /* @__PURE__ */ (0, H.jsx)(dA, { name: o ? "check" : "bookmark-plus" })
})
});
}
-function KA(e, t) {
+function _A(e, t) {
let n = e?.querySelector("video.hv");
!n || !Number.isFinite(n.duration) || (n._hop &&= (clearInterval(n._hop), null), n.currentTime = Math.max(0, Math.min(n.duration, n.currentTime + t)));
}
-function gue({ item: e, variant: t, layout: n, selected: r, selectMode: i, seekSeconds: a, helpers: o, actions: s, onOpen: c }) {
+function vA({ item: e, variant: t, layout: n, selected: r, selectMode: i, seekSeconds: a, helpers: o, actions: s, onOpen: c }) {
let l = (0, B.useRef)(null), u = (0, B.useRef)(e);
u.current = e;
let d = (0, B.useCallback)((e) => {
let t = u.current;
l.current && l.current !== e && Ee(l.current), l.current = e, e && (!t.medium || t.medium === "video") && ke(e, t);
- }, []), f = e.part_group || null, p = e.edition_group || null, m = !!(f || p), h = n.active && e.is_jav ? n.size : "small", g = de(e, h, !1, n.javImage), _ = h === "small" ? g.html : de(e, "small", !1, n.javImage).html, v = f?.title || e.name || "", y = o.displayName(e, v), b = f?.total_size ?? e.size, x = f?.total_duration ?? e.duration, S = !f && Number(e.play_seconds) > 0 && Number(e.duration) > 0 ? Math.min(Number(e.play_seconds) / Number(e.duration), 1) : 0, { avatar: C, who: w } = pue(e), T = (e.follow_tags || e.tags || []).slice(0, 3), E = [
+ }, []), f = e.part_group || null, p = e.edition_group || null, m = !!(f || p), h = n.active && e.is_jav ? n.size : "small", g = de(e, h, !1, n.javImage), _ = h === "small" ? g.html : de(e, "small", !1, n.javImage).html, v = f?.title || e.name || "", y = o.displayName(e, v), b = f?.total_size ?? e.size, x = f?.total_duration ?? e.duration, S = !f && Number(e.play_seconds) > 0 && Number(e.duration) > 0 ? Math.min(Number(e.play_seconds) / Number(e.duration), 1) : 0, { avatar: C, who: w } = mA(e), T = (e.follow_tags || e.tags || []).slice(0, 3), E = [
e.feedback === "dislike" && "dislike",
e.feedback === "seen" && "seen",
e.disposal === "trash" && "dispose",
@@ -35181,9 +35305,9 @@ function gue({ item: e, variant: t, layout: n, selected: r, selectMode: i, seekS
c(e, r);
}, O = /* @__PURE__ */ (0, H.jsxs)("div", {
"data-media-pic": "",
- style: { "--card-ratio": String(GA(e, t, n)) },
+ style: { "--card-ratio": String(pA(e, t, n)) },
children: [
- g.html ? /* @__PURE__ */ (0, H.jsx)(UA, {
+ g.html ? /* @__PURE__ */ (0, H.jsx)(lA, {
artwork: g,
identity: _,
relayout: (e) => Te(e, h)
@@ -35197,11 +35321,11 @@ function gue({ item: e, variant: t, layout: n, selected: r, selectMode: i, seekS
}),
/* @__PURE__ */ (0, H.jsx)("span", {
"data-media-check": "",
- children: /* @__PURE__ */ (0, H.jsx)(WA, { name: "check" })
+ children: /* @__PURE__ */ (0, H.jsx)(dA, { name: "check" })
}),
/* @__PURE__ */ (0, H.jsxs)("span", {
"data-media-trash-mark": "",
- children: [/* @__PURE__ */ (0, H.jsx)(WA, { name: "trash" }), /* @__PURE__ */ (0, H.jsx)("b", { children: "回收站" })]
+ children: [/* @__PURE__ */ (0, H.jsx)(dA, { name: "trash" }), /* @__PURE__ */ (0, H.jsx)("b", { children: "回收站" })]
}),
f ? /* @__PURE__ */ (0, H.jsx)("span", {
"data-media-group": "",
@@ -35228,8 +35352,8 @@ function gue({ item: e, variant: t, layout: n, selected: r, selectMode: i, seekS
"data-media-scrub": "",
children: /* @__PURE__ */ (0, H.jsx)("i", { style: { "--media-fill": `${Math.round(e.leave_ratio * 100)}%` } })
}),
- /* @__PURE__ */ (0, H.jsx)(mue, {}),
- /* @__PURE__ */ (0, H.jsx)(hue, {
+ /* @__PURE__ */ (0, H.jsx)(hA, {}),
+ /* @__PURE__ */ (0, H.jsx)(gA, {
item: e,
actions: s
}),
@@ -35239,27 +35363,27 @@ function gue({ item: e, variant: t, layout: n, selected: r, selectMode: i, seekS
/* @__PURE__ */ (0, H.jsx)("button", {
type: "button",
onClick: (e) => {
- e.stopPropagation(), KA(l.current, -a);
+ e.stopPropagation(), _A(l.current, -a);
},
title: `后退 ${a} 秒`,
"aria-label": `后退 ${a} 秒`,
- children: /* @__PURE__ */ (0, H.jsx)(WA, { name: "rotate-ccw" })
+ children: /* @__PURE__ */ (0, H.jsx)(dA, { name: "rotate-ccw" })
}),
/* @__PURE__ */ (0, H.jsx)("button", {
type: "button",
onClick: (e) => {
- e.stopPropagation(), KA(l.current, a);
+ e.stopPropagation(), _A(l.current, a);
},
title: `前进 ${a} 秒`,
"aria-label": `前进 ${a} 秒`,
- children: /* @__PURE__ */ (0, H.jsx)(WA, { name: "rotate-cw" })
+ children: /* @__PURE__ */ (0, H.jsx)(dA, { name: "rotate-cw" })
}),
/* @__PURE__ */ (0, H.jsx)("button", {
type: "button",
"data-open": "",
title: "打开详情",
"aria-label": "打开详情",
- children: /* @__PURE__ */ (0, H.jsx)(WA, { name: "expand" })
+ children: /* @__PURE__ */ (0, H.jsx)(dA, { name: "expand" })
})
]
})
@@ -35335,8 +35459,8 @@ function gue({ item: e, variant: t, layout: n, selected: r, selectMode: i, seekS
]
});
}
-function _ue({ item: e, selected: t, selectMode: n, helpers: r, actions: i, onOpen: a }) {
- let o = (0, B.useRef)(null), [s, c] = (0, B.useState)(!1), l = e.medium === "image" && e.location !== "online", u = String(e.name || ""), d = u.toLowerCase().endsWith(".url") ? "网址快捷方式" : fue[e.medium || ""] || "其它文件", f = l ? "pics" : d === "网址快捷方式" ? "globe" : "hard-drive", p = e.disposal === "trash" ? "restore" : "dispose", m = p === "restore" ? "还原" : "移入回收站", h = (t) => {
+function yA({ item: e, selected: t, selectMode: n, helpers: r, actions: i, onOpen: a }) {
+ let o = (0, B.useRef)(null), [s, c] = (0, B.useState)(!1), l = e.medium === "image" && e.location !== "online", u = String(e.name || ""), d = u.toLowerCase().endsWith(".url") ? "网址快捷方式" : fA[e.medium || ""] || "其它文件", f = l ? "pics" : d === "网址快捷方式" ? "globe" : "hard-drive", p = e.disposal === "trash" ? "restore" : "dispose", m = p === "restore" ? "还原" : "移入回收站", h = (t) => {
t.preventDefault(), t.stopPropagation(), !s && (c(!0), i.resourceOperation(e, p).catch(() => {}).finally(() => c(!1)));
}, g = (t) => {
if (o.current) {
@@ -35362,7 +35486,7 @@ function _ue({ item: e, selected: t, selectMode: n, helpers: r, actions: i, onOp
children: [
/* @__PURE__ */ (0, H.jsxs)("span", {
"data-media-glyph": "",
- children: [/* @__PURE__ */ (0, H.jsx)(WA, { name: f }), /* @__PURE__ */ (0, H.jsx)("b", { children: d })]
+ children: [/* @__PURE__ */ (0, H.jsx)(dA, { name: f }), /* @__PURE__ */ (0, H.jsx)("b", { children: d })]
}),
l ? /* @__PURE__ */ (0, H.jsx)("span", {
"data-media-art": "thumb",
@@ -35374,11 +35498,11 @@ function _ue({ item: e, selected: t, selectMode: n, helpers: r, actions: i, onOp
}),
/* @__PURE__ */ (0, H.jsx)("span", {
"data-media-check": "",
- children: /* @__PURE__ */ (0, H.jsx)(WA, { name: "check" })
+ children: /* @__PURE__ */ (0, H.jsx)(dA, { name: "check" })
}),
/* @__PURE__ */ (0, H.jsxs)("span", {
"data-media-trash-mark": "",
- children: [/* @__PURE__ */ (0, H.jsx)(WA, { name: "trash" }), /* @__PURE__ */ (0, H.jsx)("b", { children: "回收站" })]
+ children: [/* @__PURE__ */ (0, H.jsx)(dA, { name: "trash" }), /* @__PURE__ */ (0, H.jsx)("b", { children: "回收站" })]
}),
/* @__PURE__ */ (0, H.jsx)("button", {
type: "button",
@@ -35388,7 +35512,7 @@ function _ue({ item: e, selected: t, selectMode: n, helpers: r, actions: i, onOp
onClick: h,
"aria-busy": s || void 0,
"aria-disabled": s || void 0,
- children: s ? /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)("span", { dangerouslySetInnerHTML: { __html: w(p === "restore" ? "正在还原" : "正在移入回收站") } }), /* @__PURE__ */ (0, H.jsx)("span", { children: _ })] }) : /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(WA, { name: p === "restore" ? "rotate-ccw" : "trash" }), /* @__PURE__ */ (0, H.jsx)("span", { children: m })] })
+ children: s ? /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)("span", { dangerouslySetInnerHTML: { __html: w(p === "restore" ? "正在还原" : "正在移入回收站") } }), /* @__PURE__ */ (0, H.jsx)("span", { children: _ })] }) : /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(dA, { name: p === "restore" ? "rotate-ccw" : "trash" }), /* @__PURE__ */ (0, H.jsx)("span", { children: m })] })
})
]
}), /* @__PURE__ */ (0, H.jsxs)("div", {
@@ -35397,7 +35521,7 @@ function _ue({ item: e, selected: t, selectMode: n, helpers: r, actions: i, onOp
"data-media-avatar": "",
"data-media-kind-glyph": "",
"aria-hidden": "true",
- children: /* @__PURE__ */ (0, H.jsx)(WA, { name: f })
+ children: /* @__PURE__ */ (0, H.jsx)(dA, { name: f })
}), /* @__PURE__ */ (0, H.jsxs)("div", {
"data-media-text": "",
children: [/* @__PURE__ */ (0, H.jsx)("span", {
@@ -35426,17 +35550,17 @@ function _ue({ item: e, selected: t, selectMode: n, helpers: r, actions: i, onOp
})]
});
}
-function vue(e) {
- return e.variant === "resource" ? /* @__PURE__ */ (0, H.jsx)(_ue, { ...e }) : /* @__PURE__ */ (0, H.jsx)(gue, { ...e });
+function bA(e) {
+ return e.variant === "resource" ? /* @__PURE__ */ (0, H.jsx)(yA, { ...e }) : /* @__PURE__ */ (0, H.jsx)(vA, { ...e });
}
-var qA = (0, B.memo)(vue), yue = 1100, bue = 340, xue = 5e3;
-function Sue(e, t, n) {
+var xA = (0, B.memo)(bA), SA = 1100, CA = 340, Kue = 5e3;
+function que(e, t, n) {
return new Promise((r) => {
let i = new Image();
n && (i.referrerPolicy = n);
let a = !1, o = (e) => {
a || (a = !0, clearTimeout(c), i.onload = null, i.onerror = null, t.cancels.delete(s), r(e));
- }, s = () => o(!1), c = setTimeout(s, xue);
+ }, s = () => o(!1), c = setTimeout(s, Kue);
t.cancels.add(s), i.onerror = s, i.onload = () => {
if (!i.naturalWidth) {
o(!1);
@@ -35446,7 +35570,7 @@ function Sue(e, t, n) {
}, i.src = e;
});
}
-function JA({ load: e, canFlip: t, referrerPolicy: n }) {
+function wA({ load: e, canFlip: t, referrerPolicy: n }) {
let [r, i] = (0, B.useState)([]), [a, o] = (0, B.useState)(0), [s, c] = (0, B.useState)(null), l = (0, B.useRef)({
live: !1,
generation: 0,
@@ -35488,11 +35612,11 @@ function JA({ load: e, canFlip: t, referrerPolicy: n }) {
return;
}
if (!r() || !u.current.canFlip() || a.length < 2) return;
- let s = await Promise.all(a.map((t) => Sue(t, e, n)));
+ let s = await Promise.all(a.map((t) => que(t, e, n)));
if (!r() || !u.current.canFlip()) return;
let d = a.filter((e, t) => s[t]);
d.length < 2 || (e.count = d.length, e.at = 0, i(d), o(0), c(null), f(420, () => {
- p(), e.cycle = setInterval(p, yue);
+ p(), e.cycle = setInterval(p, SA);
}));
};
return (0, B.useEffect)(() => d, [d]), {
@@ -35501,7 +35625,7 @@ function JA({ load: e, canFlip: t, referrerPolicy: n }) {
leaving: s,
onPointerEnter: () => {
let e = l.current;
- e.armed !== null && (clearTimeout(e.armed), e.timers.delete(e.armed)), e.armed = f(bue, () => {
+ e.armed !== null && (clearTimeout(e.armed), e.timers.delete(e.armed)), e.armed = f(CA, () => {
e.armed = null, m();
});
},
@@ -35512,8 +35636,8 @@ function JA({ load: e, canFlip: t, referrerPolicy: n }) {
}
//#endregion
//#region src/react/components/mix-card.tsx
-var YA = gC("play");
-function Cue({ src: e }) {
+var TA = MC("play");
+function Jue({ src: e }) {
let [t, n] = (0, B.useState)(!1);
return t ? null : /* @__PURE__ */ (0, H.jsx)("img", {
"data-mix-poster": "",
@@ -35524,8 +35648,8 @@ function Cue({ src: e }) {
className: "absolute inset-0 block size-full object-contain"
});
}
-var XA = "relative inline-grid size-9.5 flex-none place-items-center overflow-hidden rounded-full bg-background-secondary-default text-body-2-regular text-text-secondary [&_img]:absolute [&_img]:inset-0 [&_img]:block [&_img]:size-full [&_img]:object-cover";
-function wue({ faces: e, fallback: t, onOpenEntity: n }) {
+var EA = "relative inline-grid size-9.5 flex-none place-items-center overflow-hidden rounded-full bg-background-secondary-default text-body-2-regular text-text-secondary [&_img]:absolute [&_img]:inset-0 [&_img]:block [&_img]:size-full [&_img]:object-cover";
+function Yue({ faces: e, fallback: t, onOpenEntity: n }) {
return e.length ? /* @__PURE__ */ (0, H.jsx)("div", {
"data-mix-avatars": "",
children: e.slice(0, 5).map((e) => /* @__PURE__ */ (0, H.jsx)("button", {
@@ -35533,18 +35657,18 @@ function wue({ faces: e, fallback: t, onOpenEntity: n }) {
title: `打开资料页:${e.name}`,
"aria-label": `打开资料页:${e.name}`,
onClick: () => n(e.kind, e.name),
- className: `${XA} cursor-pointer outline-none`,
+ className: `${EA} cursor-pointer outline-none`,
dangerouslySetInnerHTML: { __html: ue(e.name, e, Oe(e.name), e.kind) }
}, `${e.kind}:${e.id}`))
}) : /* @__PURE__ */ (0, H.jsx)("span", {
"data-mix-initial": "",
"aria-hidden": !0,
- className: `${XA} mt-0.5`,
+ className: `${EA} mt-0.5`,
children: t
});
}
-function ZA({ name: e, caption: t, count: n, poster: r, flipImages: i, canFlip: a, faces: o, onOpenEntity: s, onOpen: c, openLabel: l, menu: u, ratio: d, artwork: f, artworkIdentity: p, relayoutArt: m, faceHtml: h, badge: g, glyph: _, wholeCard: v, ...y }) {
- let b = JA({
+function DA({ name: e, caption: t, count: n, poster: r, flipImages: i, canFlip: a, faces: o, onOpenEntity: s, onOpen: c, openLabel: l, menu: u, ratio: d, artwork: f, artworkIdentity: p, relayoutArt: m, faceHtml: h, badge: g, glyph: _, wholeCard: v, ...y }) {
+ let b = wA({
load: i,
canFlip: a
}), x = (0, B.useRef)(b.onPointerLeave);
@@ -35571,11 +35695,11 @@ function ZA({ name: e, caption: t, count: n, poster: r, flipImages: i, canFlip:
style: d === void 0 ? void 0 : { "--card-ratio": String(d) },
className: "relative z-1 flex aspect-video items-center justify-center overflow-hidden rounded-surface",
children: [
- f?.html ? /* @__PURE__ */ (0, H.jsx)(UA, {
+ f?.html ? /* @__PURE__ */ (0, H.jsx)(lA, {
artwork: f,
identity: p,
relayout: m
- }) : r ? /* @__PURE__ */ (0, H.jsx)(Cue, { src: r }, r) : /* @__PURE__ */ (0, H.jsx)("span", {
+ }) : r ? /* @__PURE__ */ (0, H.jsx)(Jue, { src: r }, r) : /* @__PURE__ */ (0, H.jsx)("span", {
className: "text-caption-1-regular tracking-caps text-text-secondary uppercase",
children: "无预览"
}),
@@ -35605,7 +35729,7 @@ function ZA({ name: e, caption: t, count: n, poster: r, flipImages: i, canFlip:
/* @__PURE__ */ (0, H.jsxs)("span", {
"data-mix-badge": "",
className: "absolute right-2.25 bottom-2.25 z-6 flex min-h-7 items-center gap-1.5 rounded-2lg px-2.25 py-1 text-caption-1-semibold text-text-white",
- children: [/* @__PURE__ */ (0, H.jsx)(YA, {
+ children: [/* @__PURE__ */ (0, H.jsx)(TA, {
"aria-hidden": !0,
className: "size-3.75"
}), g ?? `${n} 个视频`]
@@ -35618,8 +35742,8 @@ function ZA({ name: e, caption: t, count: n, poster: r, flipImages: i, canFlip:
_ ? /* @__PURE__ */ (0, H.jsx)("span", {
"data-mix-glyph": "",
"aria-hidden": !0,
- children: /* @__PURE__ */ (0, H.jsx)(YA, {})
- }) : /* @__PURE__ */ (0, H.jsx)(wue, {
+ children: /* @__PURE__ */ (0, H.jsx)(TA, {})
+ }) : /* @__PURE__ */ (0, H.jsx)(Yue, {
faces: o,
fallback: e.slice(0, 1),
onOpenEntity: s
@@ -35643,20 +35767,20 @@ function ZA({ name: e, caption: t, count: n, poster: r, flipImages: i, canFlip:
}
//#endregion
//#region src/react/catalog-grid/catalog-grid-page.tsx
-function QA(e) {
- if (e.mode === "items") return /* @__PURE__ */ (0, H.jsx)(Eue, { ...e });
- let t = e.mode === "entity" ? `entity:${e.entityKey || ""}:${e.revision}` : `catalog:${$D(e.filters || {}, !!e.excludeVertical)}:${e.batchSize || 60}:${e.revision}`;
- return /* @__PURE__ */ (0, H.jsx)(Due, { ...e }, t);
+function OA(e) {
+ if (e.mode === "items") return /* @__PURE__ */ (0, H.jsx)(Zue, { ...e });
+ let t = e.mode === "entity" ? `entity:${e.entityKey || ""}:${e.revision}` : `catalog:${ZD(e.filters || {}, !!e.excludeVertical)}:${e.batchSize || 60}:${e.revision}`;
+ return /* @__PURE__ */ (0, H.jsx)(Que, { ...e }, t);
}
-function Tue({ name: e }) {
+function Xue({ name: e }) {
return /* @__PURE__ */ (0, H.jsx)("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
children: /* @__PURE__ */ (0, H.jsx)("use", { href: `#i-${e}` })
});
}
-function Eue(e) {
- let { actions: t } = e, n = (0, B.useCallback)((e, n) => t.open(e, n), [t]), r = e.variant === "next" ? "next" : "grid", i = (e.items || []).map((i) => /* @__PURE__ */ (0, H.jsx)(qA, {
+function Zue(e) {
+ let { actions: t } = e, n = (0, B.useCallback)((e, n) => t.open(e, n), [t]), r = e.variant === "next" ? "next" : "grid", i = (e.items || []).map((i) => /* @__PURE__ */ (0, H.jsx)(xA, {
item: i,
variant: r,
layout: e.layout,
@@ -35676,15 +35800,15 @@ function Eue(e) {
children: i
});
}
-function Due(e) {
- let { helpers: t, actions: n, layout: r } = e, i = e.mode === "entity", a = !i && e.filters?.state === "trash", o = i ? Yce(e) : eO(e), s = i && e.initial ? {
+function Que(e) {
+ let { helpers: t, actions: n, layout: r } = e, i = e.mode === "entity", a = !i && e.filters?.state === "trash", o = i ? Zce(e) : QD(e), s = i && e.initial ? {
pages: [{
...e.initial,
items: e.initial.items || [],
offset: 0
}],
pageParams: [0]
- } : void 0, c = Tw({
+ } : void 0, c = Cw({
queryKey: o.queryKey,
queryFn: ({ pageParam: e, signal: t }) => o.queryFn({
pageParam: e,
@@ -35697,7 +35821,7 @@ function Due(e) {
(0, B.useEffect)(() => {
c.isPending || l.current || (l.current = !0, e.settled?.(e.revision));
}, [c.isPending]);
- let { tiles: u, pageStarts: d } = (0, B.useMemo)(() => $ce(c.data?.pages || [], {
+ let { tiles: u, pageStarts: d } = (0, B.useMemo)(() => tle(c.data?.pages || [], {
collapse: e.groupCollapse !== !1,
mix: !!e.mix && !a,
javImage: r.javImage
@@ -35707,7 +35831,7 @@ function Due(e) {
e.mix,
a,
r.javImage
- ]), f = u.reduce((e, t) => e + +(t.kind === "card"), 0), p = Number(c.data?.pages[0]?.total || 0), m = VA(c.isPending, e.skeletonHtml), h = (0, B.useRef)(null), g = Oue(e, c.data, u, d, h);
+ ]), f = u.reduce((e, t) => e + +(t.kind === "card"), 0), p = Number(c.data?.pages[0]?.total || 0), m = sA(c.isPending, e.skeletonHtml), h = (0, B.useRef)(null), g = $ue(e, c.data, u, d, h);
(0, B.useLayoutEffect)(() => {
c.data && e.onCount?.(p, f);
}, [
@@ -35718,12 +35842,12 @@ function Due(e) {
let _ = (0, B.useCallback)((e, t) => n.open(e, t), [n]), v = (0, B.useCallback)((e, t) => n.openResource(e, t), [n]), y = (0, B.useCallback)((e) => n.openShort(e), [n]), b = (0, B.useCallback)(async () => {
let e = await c.fetchNextPage({ cancelRefetch: !1 });
if (e.isFetchNextPageError) throw e.error;
- }, [c.fetchNextPage]), x = (i) => i.kind === "mix" ? /* @__PURE__ */ (0, H.jsx)(Aue, {
+ }, [c.fetchNextPage]), x = (i) => i.kind === "mix" ? /* @__PURE__ */ (0, H.jsx)(tde, {
seed: i.seed,
layout: r,
helpers: t,
actions: n
- }, `mix:${i.seed.id}`) : /* @__PURE__ */ (0, H.jsx)(qA, {
+ }, `mix:${i.seed.id}`) : /* @__PURE__ */ (0, H.jsx)(xA, {
item: i.item,
variant: a && i.item.medium && i.item.medium !== "video" ? "resource" : "grid",
layout: r,
@@ -35740,7 +35864,7 @@ function Due(e) {
"data-grid-reveal": m.fading ? "" : void 0,
children: [m.layer, (() => {
if (c.isPending) return null;
- if (!c.data) return /* @__PURE__ */ (0, H.jsx)(HA, {
+ if (!c.data) return /* @__PURE__ */ (0, H.jsx)(cA, {
message: ce(c.error),
onRetry: () => void c.refetch()
});
@@ -35757,15 +35881,15 @@ function Due(e) {
return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)("div", {
"data-media-sections": "",
"data-select-mode": e.selectMode ? "" : void 0,
- children: nle(u, g).map((t) => /* @__PURE__ */ (0, H.jsxs)(B.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)("div", {
+ children: ile(u, g).map((t) => /* @__PURE__ */ (0, H.jsxs)(B.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)("div", {
"data-media-grid": "",
children: t.tiles.map(x)
- }), t.strip ? /* @__PURE__ */ (0, H.jsx)(kue, {
+ }), t.strip ? /* @__PURE__ */ (0, H.jsx)(ede, {
cut: t.strip,
props: e,
onOpen: y
}) : null] }, t.start))
- }), c.hasNextPage ? /* @__PURE__ */ (0, H.jsx)($A, {
+ }), c.hasNextPage ? /* @__PURE__ */ (0, H.jsx)(kA, {
entity: i,
load: b,
enabled: () => e.canLoadMore?.() !== !1
@@ -35773,7 +35897,7 @@ function Due(e) {
})()]
});
}
-function $A({ entity: e, load: t, enabled: n, children: r }) {
+function kA({ entity: e, load: t, enabled: n, children: r }) {
let i = (0, B.useRef)(null), a = (0, B.useRef)(!1), o = (0, B.useRef)(!1), [s, c] = (0, B.useState)({
busy: !1,
error: ""
@@ -35834,12 +35958,12 @@ function $A({ entity: e, load: t, enabled: n, children: r }) {
...p,
onClick: () => void u(!0),
dangerouslySetInnerHTML: { __html: f("继续载入中…") }
- }), s.error ? /* @__PURE__ */ (0, H.jsx)(HA, {
+ }), s.error ? /* @__PURE__ */ (0, H.jsx)(cA, {
message: s.error,
onRetry: () => void u(!0)
}) : null] });
}
-function Oue(e, t, n, r, i) {
+function $ue(e, t, n, r, i) {
let [a, o] = (0, B.useState)([]), [s, c] = (0, B.useState)(null), l = (0, B.useRef)(0), u = (0, B.useRef)(0), d = (0, B.useRef)([]);
return (0, B.useEffect)(() => () => d.current.forEach((e) => e.abort()), []), (0, B.useEffect)(() => {
let n = t?.pages.length || 0;
@@ -35848,7 +35972,7 @@ function Oue(e, t, n, r, i) {
let r = new AbortController();
d.current.push(r);
let i = n - 1;
- K(`/api/items?${tle(e.filters || {}, l.current)}`, r.signal).then((e) => {
+ K(`/api/items?${rle(e.filters || {}, l.current)}`, r.signal).then((e) => {
let t = e.items || [];
if (!t.length) {
l.current = 0;
@@ -35864,7 +35988,7 @@ function Oue(e, t, n, r, i) {
}, [t]), (0, B.useLayoutEffect)(() => {
if (!s) return;
c(null);
- let e = a.reduce((e, t) => Math.max(e, t.at), 0), t = i.current?.querySelectorAll("[data-media-sections] > [data-media-grid]"), u = t?.[t.length - 1], d = u ? Math.max(1, getComputedStyle(u).gridTemplateColumns.split(" ").length) : 1, f = Math.max(0, (r[s.page] ?? 0) - e), p = ele(n.length - e, f, d);
+ let e = a.reduce((e, t) => Math.max(e, t.at), 0), t = i.current?.querySelectorAll("[data-media-sections] > [data-media-grid]"), u = t?.[t.length - 1], d = u ? Math.max(1, getComputedStyle(u).gridTemplateColumns.split(" ").length) : 1, f = Math.max(0, (r[s.page] ?? 0) - e), p = nle(n.length - e, f, d);
if (!p.length) return;
let m = e + (p[Math.floor(Math.random() * p.length)] ?? 0);
l.current = s.more ? l.current + 18 : 0, o((e) => [...e, {
@@ -35874,7 +35998,7 @@ function Oue(e, t, n, r, i) {
}]);
}, [s]), a;
}
-function kue({ cut: e, props: t, onOpen: n }) {
+function ede({ cut: e, props: t, onOpen: n }) {
let r = (0, B.useRef)(null), { wireDrag: i } = t;
return (0, B.useEffect)(() => {
r.current && i(r.current);
@@ -35890,12 +36014,12 @@ function kue({ cut: e, props: t, onOpen: n }) {
type: "button",
"data-shorts-enter": "",
onClick: () => t.actions.openShorts(),
- children: [/* @__PURE__ */ (0, H.jsx)(Tue, { name: "gallery-vertical-end" }), /* @__PURE__ */ (0, H.jsx)("span", { children: "进入沉浸模式" })]
+ children: [/* @__PURE__ */ (0, H.jsx)(Xue, { name: "gallery-vertical-end" }), /* @__PURE__ */ (0, H.jsx)("span", { children: "进入沉浸模式" })]
})
] }), /* @__PURE__ */ (0, H.jsx)("div", {
ref: r,
"data-shorts-row": "",
- children: e.items.map((e) => /* @__PURE__ */ (0, H.jsx)(qA, {
+ children: e.items.map((e) => /* @__PURE__ */ (0, H.jsx)(xA, {
item: e,
variant: "short",
layout: t.layout,
@@ -35909,17 +36033,17 @@ function kue({ cut: e, props: t, onOpen: n }) {
})]
});
}
-function ej(e, t, n) {
+function AA(e, t, n) {
return ye(e, t.active && e.is_jav ? t.size : "small", n, t.javImage);
}
-function Aue({ seed: e, layout: t, helpers: n, actions: r }) {
+function tde({ seed: e, layout: t, helpers: n, actions: r }) {
let i = (0, B.useRef)(/* @__PURE__ */ new Map()), a = (0, B.useRef)(t);
a.current = t;
let o = be(e, n.tagLabel), s = (0, B.useCallback)(async () => {
- let t = a.current, n = [e, ...await r.mixRelated(e.id)].filter((e) => tO(e, t.javImage)).slice(0, 9);
- return i.current = new Map(n.map((e) => [String(e.id), ej(e, t, !0).html])), n.map((e) => String(e.id));
- }, [e, r]), c = t.active && e.is_jav ? t.size : "small", l = ej(e, t, !1);
- return /* @__PURE__ */ (0, H.jsx)(ZA, {
+ let t = a.current, n = [e, ...await r.mixRelated(e.id)].filter((e) => $D(e, t.javImage)).slice(0, 9);
+ return i.current = new Map(n.map((e) => [String(e.id), AA(e, t, !0).html])), n.map((e) => String(e.id));
+ }, [e, r]), c = t.active && e.is_jav ? t.size : "small", l = AA(e, t, !1);
+ return /* @__PURE__ */ (0, H.jsx)(DA, {
"data-mix-seed": String(e.id),
name: `Mix · ${o}`,
caption: `${n.displayName(e, e.name || "")}及相似作品`,
@@ -35929,12 +36053,12 @@ function Aue({ seed: e, layout: t, helpers: n, actions: r }) {
wholeCard: !0,
poster: null,
artwork: l,
- artworkIdentity: c === "small" ? l.html : ej(e, {
+ artworkIdentity: c === "small" ? l.html : AA(e, {
...t,
size: "small"
}, !1).html,
relayoutArt: (e) => Te(e, c),
- ratio: GA(e, "grid", t),
+ ratio: pA(e, "grid", t),
flipImages: s,
faceHtml: (e) => i.current.get(e) || "",
canFlip: r.canFlip,
@@ -35946,32 +36070,32 @@ function Aue({ seed: e, layout: t, helpers: n, actions: r }) {
}
//#endregion
//#region src/react/media-sources.ts
-var jue = "/api/sources", tj = ["media-sources"], nj = (e) => K(jue, e);
-async function rj(e) {
+var nde = "/api/sources", jA = ["media-sources"], MA = (e) => K(nde, e);
+async function NA(e) {
await z.fetchQuery({
- queryKey: tj,
- queryFn: () => nj(e)
+ queryKey: jA,
+ queryFn: () => MA(e)
});
}
-var Mue = [
+var rde = [
"local",
"115",
"pikpak"
-], Nue = (e) => (e?.sources ?? []).filter((e) => ["115", "pikpak"].includes(e.location) && (e.roots === void 0 || e.roots.length > 0)).map((e) => e.location), Pue = "/api/duplicates?limit=120", ij = ["duplicates"], aj = "/api/batch", oj = (e) => K(Pue, e);
-async function Fue(e) {
+], ide = (e) => (e?.sources ?? []).filter((e) => ["115", "pikpak"].includes(e.location) && (e.roots === void 0 || e.roots.length > 0)).map((e) => e.location), ade = "/api/duplicates?limit=120", PA = ["duplicates"], FA = "/api/batch", IA = (e) => K(ade, e);
+async function ode(e) {
await Promise.all([z.fetchQuery({
- queryKey: ij,
- queryFn: () => oj(e)
- }), rj(e)]);
+ queryKey: PA,
+ queryFn: () => IA(e)
+ }), NA(e)]);
}
-var sj = {
+var LA = {
largest: "最大的一个",
longest: "最长的一个",
115: "115(没有则留最大)",
pikpak: "PikPak(没有则留最大)",
all: "零个文件"
-}, Iue = (e, t) => t.filter((t) => e.some((e) => e.location === t)), cj = (e, t) => Iue(e, t).filter((t) => e.some((e) => e.location !== t)), Lue = (e, t) => t.filter((t) => e.some((e) => cj(e.files, [t]).length));
-function Rue(e, t) {
+}, sde = (e, t) => t.filter((t) => e.some((e) => e.location === t)), RA = (e, t) => sde(e, t).filter((t) => e.some((e) => e.location !== t)), cde = (e, t) => t.filter((t) => e.some((e) => RA(e.files, [t]).length));
+function lde(e, t) {
let n = [];
for (let r of e) {
if (t === "all") {
@@ -35990,19 +36114,19 @@ function Rue(e, t) {
}
return n;
}
-function zue(e, t) {
+function ude(e, t) {
let n = new Set(t);
return e.reduce((e, t) => e + t.files.reduce((e, t) => e + (n.has(t.id) && t.size || 0), 0), 0);
}
-async function lj(e, t) {
- for (let n = 0; n < e.length; n += 200) await q(aj, {
+async function zA(e, t) {
+ for (let n = 0; n < e.length; n += 200) await q(FA, {
ids: e.slice(n, n + 200),
operation: t
});
}
//#endregion
//#region src/react/media-repair/media-repair.ts
-var uj = "/api/media-repair", dj = ["media-repair"], fj = ["media-repair", "libraries"], Bue = {
+var BA = "/api/media-repair", VA = ["media-repair"], HA = ["media-repair", "libraries"], dde = {
status: "idle",
library: "",
stage: "",
@@ -36014,33 +36138,33 @@ var uj = "/api/media-repair", dj = ["media-repair"], fj = ["media-repair", "libr
missing_tool: 0,
skipped: 0,
message: ""
-}, pj = (e) => K(uj, e), mj = async (e) => (await K("/api/libraries", e)).libraries || [];
-async function Vue(e) {
+}, UA = (e) => K(BA, e), WA = async (e) => (await K("/api/libraries", e)).libraries || [];
+async function fde(e) {
await Promise.all([z.fetchQuery({
- queryKey: dj,
- queryFn: () => pj(e)
+ queryKey: VA,
+ queryFn: () => UA(e)
}), z.fetchQuery({
- queryKey: fj,
- queryFn: () => mj(e)
+ queryKey: HA,
+ queryFn: () => WA(e)
})]);
}
-var hj = (e) => Number(e).toLocaleString();
-function Hue(e) {
+var GA = (e) => Number(e).toLocaleString();
+function pde(e) {
if (e.status === "running") {
- let t = e.total ? `${hj(e.checked)} / ${hj(e.total)}` : "准备中";
+ let t = e.total ? `${GA(e.checked)} / ${GA(e.total)}` : "准备中";
return e.stage === "修复" && e.message ? `修复 ${t} · ${e.message}` : `${e.stage || "扫描"} ${t}`;
}
- return e.status === "complete" && (e.repaired || e.failed) ? e.failed ? `修好 ${hj(e.repaired)} 部,${hj(e.failed)} 部修不了` : `修好 ${hj(e.repaired)} 部` : "";
+ return e.status === "complete" && (e.repaired || e.failed) ? e.failed ? `修好 ${GA(e.repaired)} 部,${GA(e.failed)} 部修不了` : `修好 ${GA(e.repaired)} 部` : "";
}
-var Uue = (e) => `${hj(e.missing_tool)} 部缺索引的片子要装上 untrunc 才修得了,下载入口在配置页的「运行信息」里。`, Wue = "/api/quality-goals?limit=200", gj = ["quality-goals"], _j = (e) => K(Wue, e);
-async function Gue(e) {
+var mde = (e) => `${GA(e.missing_tool)} 部缺索引的片子要装上 untrunc 才修得了,下载入口在配置页的「运行信息」里。`, hde = "/api/quality-goals?limit=200", KA = ["quality-goals"], qA = (e) => K(hde, e);
+async function gde(e) {
await z.fetchQuery({
- queryKey: gj,
- queryFn: () => _j(e)
+ queryKey: KA,
+ queryFn: () => qA(e)
});
}
-var Kue = (e) => e.has_cover ? pe(e) : `/poster?id=${e.id}&c=4`;
-function vj(e, t, n = 1) {
+var _de = (e) => e.has_cover ? pe(e) : `/poster?id=${e.id}&c=4`;
+function JA(e, t, n = 1) {
let r = (e, t) => Array.from({ length: t - e + 1 }, (t, n) => e + n);
if (n * 2 + 5 >= t) return r(1, t);
let i = Math.max(e - n, 1), a = Math.min(e + n, t), o = i > 2, s = a < t - 2;
@@ -36060,21 +36184,21 @@ function vj(e, t, n = 1) {
t
];
}
-function yj(e, t) {
+function YA(e, t) {
return Math.max(1, Math.ceil(e / t));
}
-function bj(e, t) {
+function XA(e, t) {
return Math.min(Math.max(1, Math.floor(e) || 1), t);
}
//#endregion
//#region src/selection.ts
-function que(e, t, n, r, i, a = i || !e.has(r)) {
+function vde(e, t, n, r, i, a = i || !e.has(r)) {
let o = n === null ? -1 : t.indexOf(n), s = t.indexOf(r);
return i && o >= 0 && s >= 0 ? t.slice(Math.min(o, s), Math.max(o, s) + 1).forEach((t) => e.add(t)) : a ? e.add(r) : e.delete(r), r;
}
//#endregion
//#region src/react/time.ts
-function xj(e) {
+function ZA(e) {
if (!e) return "";
let t = /[Zz]|[+-]\d\d:?\d\d$/.test(e) ? e : `${e}Z`, n = new Date(t);
if (Number.isNaN(n.getTime())) return String(e).replace("T", " ").slice(0, 16);
@@ -36083,7 +36207,7 @@ function xj(e) {
}
//#endregion
//#region src/react/review/review.ts
-var Jue = "/api/review", Yue = "/api/review/decision", Xue = "/api/review/genre", Sj = ["review"], Cj = {
+var yde = "/api/review", bde = "/api/review/decision", xde = "/api/review/genre", QA = ["review"], $A = {
metadata_fields: "元数据字段",
creator_tags: "创作者标签",
studio_logos: "厂牌 Logo",
@@ -36093,15 +36217,15 @@ var Jue = "/api/review", Yue = "/api/review/decision", Xue = "/api/review/genre"
fc2_markings: "FC2 评论标记",
fc2_similarity: "FC2 跨号相似",
video_endcards: "片尾/出处证据"
-}, Zue = Object.keys(Cj), Que = "metadata_fields", wj = (e) => typeof e == "string" && Object.hasOwn(Cj, e), $ue = {
+}, Sde = Object.keys($A), Cde = "metadata_fields", ej = (e) => typeof e == "string" && Object.hasOwn($A, e), wde = {
creator_tags: "creator",
western_identity: "creator"
};
-function ede(e, t) {
+function Tde(e, t) {
let n = [["candidates", t ? "按候选数量" : "全部待复核"]];
return e.some((e) => e.source || e.candidates?.some((e) => e.source)) && n.push(["source", "按来源"]), e.some((e) => e.field) && n.push(["field", "按字段"]), n;
}
-function Tj(e, t) {
+function tj(e, t) {
let n = /* @__PURE__ */ new Map();
for (let r of e) {
let e, i;
@@ -36118,43 +36242,43 @@ function Tj(e, t) {
}
return [...n.values()];
}
-function tde(e, t, n) {
- return n && Tj(e, t).find((e) => e.key === n)?.rows || e;
+function Ede(e, t, n) {
+ return n && tj(e, t).find((e) => e.key === n)?.rows || e;
}
-function nde(e, t) {
- let n = yj(e.length, 20), r = bj(t, n);
+function Dde(e, t) {
+ let n = YA(e.length, 20), r = XA(t, n);
return {
page: r,
pages: n,
rows: e.slice((r - 1) * 20, r * 20)
};
}
-function rde(e) {
+function Ode(e) {
return e.length ? [...new Set(e.flatMap((e) => e.candidates?.map((e) => e.source || "") || []))].filter((t) => t && e.every((e) => e.candidates?.filter((e) => e.source === t).length === 1)) : [];
}
-function ide(e, t, n, r, i, a) {
- return que(e, t, n, r, i, a);
+function kde(e, t, n, r, i, a) {
+ return vde(e, t, n, r, i, a);
}
-function Ej(e, t) {
+function nj(e, t) {
return e === "metadata_fields" ? (t.candidates?.length || 0) > 0 : e !== "creator_tags" || String(t.status || "").trim() === "candidate";
}
-function Dj(e, t) {
+function rj(e, t) {
return String(e === "metadata_fields" ? t.query || t.code || "" : t.creator || t.studio || t.current_name || t.name || t.item_key);
}
-var Oj = (e, t) => e === "metadata_fields" ? String(t.field_label || t.field || "").trim() : "";
-function ade(e, t) {
- let n = Dj(e, t), r = Oj(e, t);
+var ij = (e, t) => e === "metadata_fields" ? String(t.field_label || t.field || "").trim() : "";
+function Ade(e, t) {
+ let n = rj(e, t), r = ij(e, t);
return r ? `${n} · ${r}` : n;
}
-var ode = (e) => e.reason || e.evidence || e.note || e.decision_note || "", sde = (e) => String(e.tags || "").split("|").filter(Boolean), cde = (e) => [...new Set((e.candidates || []).flatMap((e) => e.unmapped_genres || []))];
-function lde(e) {
+var jde = (e) => e.reason || e.evidence || e.note || e.decision_note || "", Mde = (e) => String(e.tags || "").split("|").filter(Boolean), Nde = (e) => [...new Set((e.candidates || []).flatMap((e) => e.unmapped_genres || []))];
+function Pde(e) {
let t = e.candidates || [];
return {
candidateKey: t.length === 1 ? t[0].candidate_key : "",
assets: (e.preview_assets || []).map((e) => e.id)
};
}
-function kj(e, t, n, r) {
+function aj(e, t, n, r) {
let i = !!t.asset_path && t.asset_mutation_revision != null;
return {
category: e,
@@ -36170,19 +36294,19 @@ function kj(e, t, n, r) {
...i ? { expected_revision: t.asset_mutation_revision } : {}
};
}
-var ude = (e) => e === "approved" ? "已通过候选" : e === "rejected" ? "已拒绝候选" : "已跳过候选", Aj = (e) => K(Jue, e), jj = (e) => q(Yue, e), dde = (e, t) => q(Xue, {
+var Fde = (e) => e === "approved" ? "已通过候选" : e === "rejected" ? "已拒绝候选" : "已跳过候选", oj = (e) => K(yde, e), sj = (e) => q(bde, e), Ide = (e, t) => q(xde, {
genre: e,
tag: t
});
-async function fde(e) {
+async function Lde(e) {
await z.fetchQuery({
- queryKey: Sj,
- queryFn: () => Aj(e)
+ queryKey: QA,
+ queryFn: () => oj(e)
});
}
-function Mj(e, t) {
+function cj(e, t) {
let n = new Set(t);
- n.size && z.setQueryData(Sj, (t) => {
+ n.size && z.setQueryData(QA, (t) => {
if (!t) return t;
let r = t.sections[e] || [], i = r.filter((e) => !n.has(String(e.item_key)));
return i.length === r.length ? t : {
@@ -36198,207 +36322,207 @@ function Mj(e, t) {
};
});
}
-var pde = () => z.invalidateQueries({
- queryKey: Sj,
+var Rde = () => z.invalidateQueries({
+ queryKey: QA,
exact: !0
});
-function mde(e, t) {
- return e?.state === "live" ? "正在显示写入端的实时复核队列" : e?.state === "cached" ? `写入端暂时不可达,显示 ${xj(e.fetched_at)} 的缓存` : e?.error || t;
+function zde(e, t) {
+ return e?.state === "live" ? "正在显示写入端的实时复核队列" : e?.state === "cached" ? `写入端暂时不可达,显示 ${ZA(e.fetched_at)} 的缓存` : e?.error || t;
}
//#endregion
//#region src/react/data-cleanup/links.ts
-var hde = "/api/links", Nj = "/api/links/check", Pj = "/api/links/prune", Fj = ["links"], Ij = ["links", "check"], Lj = ["links", "prune"], Rj = {
+var Bde = "/api/links", lj = "/api/links/check", uj = "/api/links/prune", dj = ["links"], fj = ["links", "check"], pj = ["links", "prune"], mj = {
official: "官网/事务所",
social: "社交账号",
catalog: "作品资料站",
source_reference: "资料出处"
};
-async function zj(e) {
+async function hj(e) {
let t = await e;
if (t.ok === !1) throw Error(t.error || "操作未完成,请重试");
return t;
}
-var Bj = (e) => K(hde, e), Vj = (e) => q(Nj, { status_only: !0 }, "POST", e), gde = ({ retry: e, checkId: t }) => zj(q(Nj, e ? {
+var gj = (e) => K(Bde, e), _j = (e) => q(lj, { status_only: !0 }, "POST", e), Vde = ({ retry: e, checkId: t }) => hj(q(lj, e ? {
retry: e,
check_id: t
-} : { restart: !0 })), Hj = (e) => K(Pj, e), _de = (e) => zj(q(Pj, {
+} : { restart: !0 })), vj = (e) => K(uj, e), Hde = (e) => hj(q(uj, {
confirm: !0,
check_id: e,
background: !0
-})), Uj = (e) => Number(e || 0).toLocaleString(), vde = (e) => `已删除 ${Uj(e.removed)} 条;${e.marked ? `已隐退女优的 ${Uj(e.marked)} 条留作不可点的记录;` : ""}保留 ${Uj(e.recovered)} 条未确认失效的链接。`;
-function yde(e) {
+})), yj = (e) => Number(e || 0).toLocaleString(), Ude = (e) => `已删除 ${yj(e.removed)} 条;${e.marked ? `已隐退女优的 ${yj(e.marked)} 条留作不可点的记录;` : ""}保留 ${yj(e.recovered)} 条未确认失效的链接。`;
+function Wde(e) {
let t = e.scope === "retry";
- return e.total ? `${t ? "已重验" : "已检查"} ${Uj(e.checked)} / ${Uj(e.total)} 条链接` : t ? "正在重验链接" : "正在检查链接";
+ return e.total ? `${t ? "已重验" : "已检查"} ${yj(e.checked)} / ${yj(e.total)} 条链接` : t ? "正在重验链接" : "正在检查链接";
}
//#endregion
//#region src/react/settings-panel/settings-data.ts
-var Wj = "/api/settings", Gj = "/api/follow/schedule", Kj = "/api/thumbnail-jobs", qj = ["settings"], Jj = ["follow-schedule"], Yj = ["thumbnail-jobs"], bde = (e) => K(Wj, e), Xj = (e) => K(Gj, e), Zj = (e) => K(Kj, e);
-function xde(e = z) {
+var bj = "/api/settings", xj = "/api/follow/schedule", Sj = "/api/thumbnail-jobs", Cj = ["settings"], wj = ["follow-schedule"], Tj = ["thumbnail-jobs"], Gde = (e) => K(bj, e), Ej = (e) => K(xj, e), Dj = (e) => K(Sj, e);
+function Kde(e = z) {
return e.fetchQuery({
- queryKey: Jj,
- queryFn: ({ signal: e }) => Xj(e),
+ queryKey: wj,
+ queryFn: ({ signal: e }) => Ej(e),
staleTime: 0
}).catch(() => null), e.fetchQuery({
- queryKey: Yj,
- queryFn: ({ signal: e }) => Zj(e),
+ queryKey: Tj,
+ queryFn: ({ signal: e }) => Dj(e),
staleTime: 0
}).catch(() => null), e.fetchQuery({
- queryKey: qj,
- queryFn: ({ signal: e }) => bde(e),
+ queryKey: Cj,
+ queryFn: ({ signal: e }) => Gde(e),
staleTime: 0
}).catch(() => null);
}
-function Qj() {
- return ww({
- mutationFn: (e) => q(Wj, e),
- onSuccess: (e) => z.setQueryData(qj, e)
+function Oj() {
+ return Sw({
+ mutationFn: (e) => q(bj, e),
+ onSuccess: (e) => z.setQueryData(Cj, e)
});
}
-function Sde() {
- return ww({
- mutationFn: (e) => q(Gj, {
+function qde() {
+ return Sw({
+ mutationFn: (e) => q(xj, {
enabled: e > 0,
interval_minutes: e || 60
}),
- onSuccess: (e) => z.setQueryData(Jj, e)
+ onSuccess: (e) => z.setQueryData(wj, e)
});
}
-function Cde() {
- return ww({
- mutationFn: (e) => q(Kj, { mode: e }),
- onSuccess: (e) => z.setQueryData(Yj, e)
+function Jde() {
+ return Sw({
+ mutationFn: (e) => q(Sj, { mode: e }),
+ onSuccess: (e) => z.setQueryData(Tj, e)
});
}
-function wde(e) {
- return e.available ? e.running ? "正在检查全部来源…" : e.last_error ? `上次失败:${e.last_error}` : e.last_finished_at ? `上次完成 ${xj(e.last_finished_at)} · 新增 ${e.last_added || 0}` : e.next_run_at ? `下次 ${xj(e.next_run_at)}` : e.enabled ? "等待首次运行" : "已关闭" : "只在账本写入端运行";
+function Yde(e) {
+ return e.available ? e.running ? "正在检查全部来源…" : e.last_error ? `上次失败:${e.last_error}` : e.last_finished_at ? `上次完成 ${ZA(e.last_finished_at)} · 新增 ${e.last_added || 0}` : e.next_run_at ? `下次 ${ZA(e.next_run_at)}` : e.enabled ? "等待首次运行" : "已关闭" : "只在账本写入端运行";
}
-function Tde(e) {
+function Xde(e) {
return e.status === "running" ? "正在采集,进度在活动页查看。" : e.status === "failed" ? `上一轮采集停下了:${e.stopped || "原因未取得"}` : e.status === "complete" ? e.stopped ? "上一轮采集已按停。" : "上一轮采集已完成。" : e.mode === "off" ? "关闭时不采集;已经生成的图留在盘上,清理走数据管理页。" : "选定档位后从最近看过的片子开始采集。";
}
//#endregion
//#region src/react/data-cleanup/organize.ts
-var Ede = "/api/organize", Dde = "/api/organize/preview", Ode = "/api/organize/apply", kde = "/api/organize/rollback", $j = ["organize"], eM = (e) => K(Ede, e);
-async function Ade(e) {
+var Zde = "/api/organize", Qde = "/api/organize/preview", $de = "/api/organize/apply", efe = "/api/organize/rollback", kj = ["organize"], Aj = (e) => K(Zde, e);
+async function tfe(e) {
await z.fetchQuery({
- queryKey: $j,
- queryFn: () => eM(e)
+ queryKey: kj,
+ queryFn: () => Aj(e)
});
}
-var jde = (e) => q(Dde, e), Mde = (e) => e.kind === "apply" ? q(Ode, {
+var nfe = (e) => q(Qde, e), rfe = (e) => e.kind === "apply" ? q($de, {
...e.request,
confirm: !0
-}) : q(kde, { confirm: !0 });
-async function Nde(e) {
- z.setQueryData($j, (t) => t && {
+}) : q(efe, { confirm: !0 });
+async function ife(e) {
+ z.setQueryData(kj, (t) => t && {
...t,
templates: e
});
try {
- await q(Wj, { organizeTemplates: e });
+ await q(bj, { organizeTemplates: e });
} catch {}
}
-var Pde = (e, t) => e && {
+var afe = (e, t) => e && {
...e,
...t
-}, Fde = /目录模板|分隔符|盘符|`\.`/;
-function tM(e) {
+}, ofe = /目录模板|分隔符|盘符|`\.`/;
+function jj(e) {
let t = String(e || "");
return t.slice(Math.max(t.lastIndexOf("\\"), t.lastIndexOf("/")) + 1);
}
-var nM = (e) => Number(e || 0).toLocaleString();
-function Ide(e) {
- let t = Object.entries(e.reasons || {}).sort((e, t) => t[1] - e[1]).map(([e, t]) => `${e} ${nM(t)}`).join(" · ");
- return Number(e.counts?.change || 0) ? `${nM(e.counts.change)} 个文件会改名或移动,${nM(e.counts.unchanged)} 个已经就是目标名字${t ? `;跳过 ${t}` : ""}。` : `没有要改的文件。${t ? `跳过:${t}。` : ""}`;
+var Mj = (e) => Number(e || 0).toLocaleString();
+function sfe(e) {
+ let t = Object.entries(e.reasons || {}).sort((e, t) => t[1] - e[1]).map(([e, t]) => `${e} ${Mj(t)}`).join(" · ");
+ return Number(e.counts?.change || 0) ? `${Mj(e.counts.change)} 个文件会改名或移动,${Mj(e.counts.unchanged)} 个已经就是目标名字${t ? `;跳过 ${t}` : ""}。` : `没有要改的文件。${t ? `跳过:${t}。` : ""}`;
}
-function rM(e) {
+function Nj(e) {
let t = e.restored !== void 0, n = Number(e.failed || 0), r = Number(t ? e.restored : e.moved || 0);
return {
- text: t ? `已退回 ${nM(r)} 个文件${n ? `,${nM(n)} 行未能退回` : ""}。` : `已整理 ${nM(r)} 个文件${n ? `,${nM(n)} 行未能处理` : ""}。`,
+ text: t ? `已退回 ${Mj(r)} 个文件${n ? `,${Mj(n)} 行未能退回` : ""}。` : `已整理 ${Mj(r)} 个文件${n ? `,${Mj(n)} 行未能处理` : ""}。`,
failed: n,
rollback: t
};
}
//#endregion
//#region src/react/data-cleanup/resource-sync.ts
-var iM = "/api/resource-sync/scan", aM = "/api/resource-sync/apply", oM = ["resource-sync", "scan"], sM = ["resource-sync", "apply"], cM = (e) => q(iM, {
+var Pj = "/api/resource-sync/scan", Fj = "/api/resource-sync/apply", Ij = ["resource-sync", "scan"], Lj = ["resource-sync", "apply"], Rj = (e) => q(Pj, {
background: !0,
status_only: !0
-}, "POST", e), Lde = () => q(iM, {
+}, "POST", e), cfe = () => q(Pj, {
background: !0,
restart: !0
-}), lM = (e) => K(aM, e), Rde = (e) => q(aM, {
+}), zj = (e) => K(Fj, e), lfe = (e) => q(Fj, {
confirm: !0,
clean_cache: !0,
scan_id: e,
background: !0
-}), uM = (e) => (e?.sources ?? []).some((e) => Mue.includes(e.location) && Array.isArray(e.roots) && e.roots.length > 0);
-async function zde(e) {
- uM(z.getQueryData(tj)) && await Promise.all([z.fetchQuery({
- queryKey: oM,
- queryFn: () => cM(e)
+}), Bj = (e) => (e?.sources ?? []).some((e) => rde.includes(e.location) && Array.isArray(e.roots) && e.roots.length > 0);
+async function ufe(e) {
+ Bj(z.getQueryData(jA)) && await Promise.all([z.fetchQuery({
+ queryKey: Ij,
+ queryFn: () => Rj(e)
}), z.fetchQuery({
- queryKey: sM,
- queryFn: () => lM(e)
+ queryKey: Lj,
+ queryFn: () => zj(e)
})]);
}
-var Bde = (e) => !!(e?.missing || e?.empty || e?.cache?.files), Vde = {
+var dfe = (e) => !!(e?.missing || e?.empty || e?.cache?.files), ffe = {
local: "本地磁盘",
115: "115",
pikpak: "PikPak"
-}, dM = (e) => Number(e || 0).toLocaleString(), Hde = (e) => e.total_sources ? `已扫描 ${e.completed_sources || 0}/${e.total_sources} 个来源` : "正在扫描来源", fM = (e) => e.purge ?? Number(e.missing || 0) - Number(e.vanish || 0), pM = (e) => e.vanish ? `${dM(e.vanish)} 条带个人记录的标为已消失,记录留着,可在孤儿记录里接到新文件或彻底删除。` : "", mM = (e) => e.vanish ? "这几样不可撤销。" : "这一步不可撤销。", Ude = (e) => `将永久删除文件已不在盘上的 ${dM(fM(e))} 条记录和 ${dM(e.empty)} 个空文件夹,并清理 ${dM(e.cache?.files)} 个闲置缓存。${mM(e)}${pM(e)}`, Wde = (e) => `将永久删除文件已不在盘上的 ${dM(fM(e))} 条记录(含回收站里的)、${dM(e.empty)} 个空文件夹,并清理 ${dM(e.cache?.files)} 个闲置缓存。来源根目录保留。${mM(e)}${pM(e)}`, Gde = (e) => e.online ? [
- `找不到文件 · 共 ${dM(e.total)} 项`,
- e.vanish ? `${dM(e.vanish)} 项带个人记录` : "",
- e.empty ? `空文件夹 ${dM(e.empty)} 个` : "",
- e.unreadable ? `${dM(e.unreadable)} 个目录读取失败,已跳过` : ""
-].filter(Boolean).join(" · ") : `馆藏中有 ${dM(e.total)} 项`;
-function hM(e) {
+}, Vj = (e) => Number(e || 0).toLocaleString(), pfe = (e) => e.total_sources ? `已扫描 ${e.completed_sources || 0}/${e.total_sources} 个来源` : "正在扫描来源", Hj = (e) => e.purge ?? Number(e.missing || 0) - Number(e.vanish || 0), Uj = (e) => e.vanish ? `${Vj(e.vanish)} 条带个人记录的标为已消失,记录留着,可在孤儿记录里接到新文件或彻底删除。` : "", Wj = (e) => e.vanish ? "这几样不可撤销。" : "这一步不可撤销。", mfe = (e) => `将永久删除文件已不在盘上的 ${Vj(Hj(e))} 条记录和 ${Vj(e.empty)} 个空文件夹,并清理 ${Vj(e.cache?.files)} 个闲置缓存。${Wj(e)}${Uj(e)}`, hfe = (e) => `将永久删除文件已不在盘上的 ${Vj(Hj(e))} 条记录(含回收站里的)、${Vj(e.empty)} 个空文件夹,并清理 ${Vj(e.cache?.files)} 个闲置缓存。来源根目录保留。${Wj(e)}${Uj(e)}`, gfe = (e) => e.online ? [
+ `找不到文件 · 共 ${Vj(e.total)} 项`,
+ e.vanish ? `${Vj(e.vanish)} 项带个人记录` : "",
+ e.empty ? `空文件夹 ${Vj(e.empty)} 个` : "",
+ e.unreadable ? `${Vj(e.unreadable)} 个目录读取失败,已跳过` : ""
+].filter(Boolean).join(" · ") : `馆藏中有 ${Vj(e.total)} 项`;
+function Gj(e) {
let t = e.blocked ?? [], n = Number(e.dir_errors || 0), r = e.cache_blocked ?? [], i = Number(e.purged || 0) + Number(e.vanished || 0) + Number(e.reattached || 0) + Number(e.dirs_removed || 0) + Number(e.cache_removed || 0), a = t.length + n + r.length, o = t.slice(0, 3).map((e) => `「${e.name}」`).join("、") + (t.length > 3 ? " 等" : "");
return {
done: i,
left: a,
rest: [
- t.length ? `${dM(t.length)} 条记录没有删除(${o})` : "",
- n ? `${dM(n)} 个文件夹没有删除` : "",
- r.length ? `${dM(r.length)} 个缓存没有清理` : ""
+ t.length ? `${Vj(t.length)} 条记录没有删除(${o})` : "",
+ n ? `${Vj(n)} 个文件夹没有删除` : "",
+ r.length ? `${Vj(r.length)} 个缓存没有清理` : ""
].filter(Boolean).join(",")
};
}
-var Kde = (e, t) => {
- let { rest: n } = hM(e), r = `已永久删除 ${dM(e.purged)} 条失效记录和 ${dM(e.dirs_removed)} 个空文件夹,清理 ${dM(e.cache_removed)} 个缓存,释放 ${t(e.bytes_reclaimed || 0)}。` + (e.vanished ? `${dM(e.vanished)} 条带个人记录的已标为已消失,可在孤儿记录里处理。` : "") + (e.reattached ? `${dM(e.reattached)} 条的记录已接到库里的另一个版本。` : "");
+var _fe = (e, t) => {
+ let { rest: n } = Gj(e), r = `已永久删除 ${Vj(e.purged)} 条失效记录和 ${Vj(e.dirs_removed)} 个空文件夹,清理 ${Vj(e.cache_removed)} 个缓存,释放 ${t(e.bytes_reclaimed || 0)}。` + (e.vanished ? `${Vj(e.vanished)} 条带个人记录的已标为已消失,可在孤儿记录里处理。` : "") + (e.reattached ? `${Vj(e.reattached)} 条的记录已接到库里的另一个版本。` : "");
return n ? `${r}${n},重新检查后可再试。` : r;
-}, qde = "/api/review?counts=1", gM = ["review", "counts"], Jde = "/api/ads?limit=1", _M = ["junk-summary"], vM = "/api/items?state=trash&limit=1", yM = ["trash-summary"], Yde = [
+}, vfe = "/api/review?counts=1", Kj = ["review", "counts"], yfe = "/api/ads?limit=1", qj = ["junk-summary"], Jj = "/api/items?state=trash&limit=1", Yj = ["trash-summary"], bfe = [
["video", "视频"],
["image", "图片"],
["archive", "压缩包"],
["audio", "音频"],
["url", "网址"],
["other", "其它"]
-], bM = (e) => K(qde, e), xM = (e) => K(Jde, e), SM = (e) => {
+], Xj = (e) => K(vfe, e), Zj = (e) => K(yfe, e), Qj = (e) => {
let t = sessionStorage.getItem("peach.library");
- return K(t ? `${vM}&library=${encodeURIComponent(t)}` : vM, e);
-}, CM = (e) => Number(e || 0).toLocaleString();
-function Xde(e) {
- let t = Cj, n = Object.entries(e?.counts ?? {}).map(([e, n]) => [t[e] || e, Number(n) || 0]).filter(([, e]) => e > 0).sort((e, t) => t[1] - e[1]), r = n.reduce((e, [, t]) => e + t, 0), i = n.slice(0, 3).map(([e, t]) => `${e} ${t.toLocaleString()}`), a = n.slice(3).reduce((e, [, t]) => e + t, 0);
+ return K(t ? `${Jj}&library=${encodeURIComponent(t)}` : Jj, e);
+}, $j = (e) => Number(e || 0).toLocaleString();
+function xfe(e) {
+ let t = $A, n = Object.entries(e?.counts ?? {}).map(([e, n]) => [t[e] || e, Number(n) || 0]).filter(([, e]) => e > 0).sort((e, t) => t[1] - e[1]), r = n.reduce((e, [, t]) => e + t, 0), i = n.slice(0, 3).map(([e, t]) => `${e} ${t.toLocaleString()}`), a = n.slice(3).reduce((e, [, t]) => e + t, 0);
return a && i.push(`其余 ${a.toLocaleString()}`), {
figure: `${r.toLocaleString()} 条待复核`,
meta: i.join(" · ")
};
}
-function Zde(e) {
+function Sfe(e) {
if (!e) return "";
- let t = Yde.filter(([t]) => Number(e.counts?.[t]) > 0).map(([t, n]) => `${n} ${CM(e.counts[t])}`);
- return Number(e.dismissed_total) > 0 && t.push(`已忽略 ${CM(e.dismissed_total)}`), t.join(" · ");
-}
-var Qde = [
- [gM, ({ signal: e }) => bM(e)],
- [gj, ({ signal: e }) => _j(e)],
- [yM, ({ signal: e }) => SM(e)],
- [Fj, ({ signal: e }) => Bj(e)],
- [Ij, ({ signal: e }) => Vj(e)],
- [Lj, ({ signal: e }) => Hj(e)]
+ let t = bfe.filter(([t]) => Number(e.counts?.[t]) > 0).map(([t, n]) => `${n} ${$j(e.counts[t])}`);
+ return Number(e.dismissed_total) > 0 && t.push(`已忽略 ${$j(e.dismissed_total)}`), t.join(" · ");
+}
+var Cfe = [
+ [Kj, ({ signal: e }) => Xj(e)],
+ [KA, ({ signal: e }) => qA(e)],
+ [Yj, ({ signal: e }) => Qj(e)],
+ [dj, ({ signal: e }) => gj(e)],
+ [fj, ({ signal: e }) => _j(e)],
+ [pj, ({ signal: e }) => vj(e)]
];
-async function $de(e) {
- let t = location.hash === "#resource-sync", n = Qde.map(([n, r]) => {
+async function wfe(e) {
+ let t = location.hash === "#resource-sync", n = Cfe.map(([n, r]) => {
if (t) return z.fetchQuery({
queryKey: n,
queryFn: () => r({ signal: e })
@@ -36411,49 +36535,49 @@ async function $de(e) {
await Promise.all([
...n,
z.fetchQuery({
- queryKey: _M,
- queryFn: () => xM(e)
+ queryKey: qj,
+ queryFn: () => Zj(e)
}),
z.fetchQuery({
- queryKey: ij,
- queryFn: () => oj(e)
+ queryKey: PA,
+ queryFn: () => IA(e)
}),
- rj(e).then(() => zde(e)),
- jw(e),
- Vue(e),
- Ade(e)
+ NA(e).then(() => ufe(e)),
+ kw(e),
+ fde(e),
+ tfe(e)
]);
}
//#endregion
//#region src/react/components/stat-card.tsx
-var efe = [
+var Tfe = [
"text-chart-6",
"text-chart-5",
"text-chart-7",
"text-chart-8"
-], tfe = [
+], Efe = [
"bg-chart-6/10",
"bg-chart-5/10",
"bg-chart-7/10",
"bg-chart-8/10"
];
-function wM(e = {}) {
- return `${lT({
+function eM(e = {}) {
+ return `${sT({
...e,
padding: "none"
})} flex flex-col overflow-hidden pt-4 text-left`;
}
-var TM = "inline-grid w-full grid-cols-2 gap-3 sm:gap-4 lg:grid-cols-4", nfe = "inline-grid w-full grid-cols-2 gap-3 sm:grid-cols-3 sm:gap-4 xl:grid-cols-6";
-function EM({ interactive: e = !1 } = {}) {
- return lT({
+var tM = "inline-grid w-full grid-cols-2 gap-3 sm:gap-4 lg:grid-cols-4", Dfe = "inline-grid w-full grid-cols-2 gap-3 sm:grid-cols-3 sm:gap-4 xl:grid-cols-6";
+function nM({ interactive: e = !1 } = {}) {
+ return sT({
padding: "none",
radius: "plain",
interactive: e,
className: "flex min-h-33 flex-col gap-2 p-4 text-left"
});
}
-var rfe = "inline-grid w-full grid-cols-5 gap-4 max-plain-stat-pair:grid-cols-2 max-plain-stat-single:grid-cols-1";
-function DM({ label: e, icon: t, mark: n, aside: r, figure: i, meta: a, wrapMeta: o = !1 }) {
+var Ofe = "inline-grid w-full grid-cols-5 gap-4 max-plain-stat-pair:grid-cols-2 max-plain-stat-single:grid-cols-1";
+function rM({ label: e, icon: t, mark: n, aside: r, figure: i, meta: a, wrapMeta: o = !1 }) {
return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [
/* @__PURE__ */ (0, H.jsxs)("span", {
className: "flex min-w-0 items-center gap-2 text-body-medium text-text-secondary",
@@ -36486,13 +36610,13 @@ function DM({ label: e, icon: t, mark: n, aside: r, figure: i, meta: a, wrapMeta
})
] });
}
-function OM({ label: e, icon: t, accent: n = 0, figure: r, footer: i }) {
+function iM({ label: e, icon: t, accent: n = 0, figure: r, footer: i }) {
return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [
/* @__PURE__ */ (0, H.jsxs)("span", {
className: "flex min-w-0 items-center gap-2 px-4 text-body-regular text-text-secondary max-sm:gap-1.5 max-sm:px-3",
children: [t ? /* @__PURE__ */ (0, H.jsx)("i", {
"aria-hidden": !0,
- className: `flex size-7 shrink-0 items-center justify-center rounded-lg max-sm:size-6 ${efe[n % 4]} ${tfe[n % 4]}`,
+ className: `flex size-7 shrink-0 items-center justify-center rounded-lg max-sm:size-6 ${Tfe[n % 4]} ${Efe[n % 4]}`,
children: /* @__PURE__ */ (0, H.jsx)(t, {
"aria-hidden": !0,
className: "size-4"
@@ -36514,20 +36638,20 @@ function OM({ label: e, icon: t, accent: n = 0, figure: r, footer: i }) {
}
//#endregion
//#region src/react/background-job.ts
-var kM = 2e3, ife = (e) => e, afe = (e, t) => t;
-function AM(e) {
- let { queryKey: t, jobOf: n = ife, withJob: r = afe, idlePollMs: i } = e, [a, o] = (0, B.useState)(!1), [s, c] = (0, B.useState)(null), l = (0, B.useRef)(e);
+var aM = 2e3, kfe = (e) => e, Afe = (e, t) => t;
+function oM(e) {
+ let { queryKey: t, jobOf: n = kfe, withJob: r = Afe, idlePollMs: i } = e, [a, o] = (0, B.useState)(!1), [s, c] = (0, B.useState)(null), l = (0, B.useRef)(e);
(0, B.useEffect)(() => {
l.current = e;
});
- let u = xw({
+ let u = yw({
queryKey: t,
queryFn: ({ signal: e }) => l.current.queryFn({ signal: e }),
refetchInterval: (e) => {
let t = e.state.data;
- return t !== void 0 && n(t)?.status === "running" ? kM : i ?? !1;
+ return t !== void 0 && n(t)?.status === "running" ? aM : i ?? !1;
}
- }), d = ww({
+ }), d = Sw({
mutationFn: (e) => l.current.start(e),
onSuccess: (e) => {
o(!0), c(null), l.current.onStarted?.(e), z.setQueryData(t, (t) => r(t, e)), z.invalidateQueries({
@@ -36556,32 +36680,32 @@ function AM(e) {
}
//#endregion
//#region src/react/media-repair/media-repair-card.tsx
-var ofe = (t) => e[t] || t, jM = (e) => z.setQueryData(dj, e);
-function sfe() {
- let e = xw({
- queryKey: dj,
- queryFn: ({ signal: e }) => pj(e),
- refetchInterval: (e) => e.state.data?.status === "running" && kM
- }), t = xw({
- queryKey: fj,
- queryFn: ({ signal: e }) => mj(e)
- }), [n, i] = (0, B.useState)(""), a = vT(), o = e.data ?? Bue, s = t.data ?? [], c = o.status === "running", l = s.find((e) => e.id === (c ? o.library : n)) ?? s.find((e) => e.id === o.library) ?? s[0], u = () => {
+var jfe = (t) => e[t] || t, sM = (e) => z.setQueryData(VA, e);
+function Mfe() {
+ let e = yw({
+ queryKey: VA,
+ queryFn: ({ signal: e }) => UA(e),
+ refetchInterval: (e) => e.state.data?.status === "running" && aM
+ }), t = yw({
+ queryKey: HA,
+ queryFn: ({ signal: e }) => WA(e)
+ }), [n, i] = (0, B.useState)(""), a = gT(), o = e.data ?? dde, s = t.data ?? [], c = o.status === "running", l = s.find((e) => e.id === (c ? o.library : n)) ?? s.find((e) => e.id === o.library) ?? s[0], u = () => {
l && r({
title: `修复媒体库「${l.name}」`,
body: "缺时间戳表的片子另存一份修好的头,原文件不动;缺索引的片子重建后替换原文件,坏原件改名成同目录的隐藏文件(.文件名.peach-original)留着。" + (l.metered ? "这个库在计费来源上,每修一部都要把片子完整拉一遍。" : ""),
confirmLabel: "修复媒体库",
- onConfirm: async () => jM(await q(uj, {
+ onConfirm: async () => sM(await q(BA, {
library: l.id,
restart: !0
}))
});
- }, d = () => void a.run("stop", (e) => q(uj, { stop: !0 }, "POST", e), jM), f = Hue(o), p = o.status === "complete", m = a.error || o.error || (e.error ? "读不到媒体修复的状态" : "");
+ }, d = () => void a.run("stop", (e) => q(BA, { stop: !0 }, "POST", e), sM), f = pde(o), p = o.status === "complete", m = a.error || o.error || (e.error ? "读不到媒体修复的状态" : "");
return /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-col gap-4",
- children: [/* @__PURE__ */ (0, H.jsx)(mT, {
+ children: [/* @__PURE__ */ (0, H.jsx)(fT, {
layout: "split",
label: "媒体修复",
- footer: /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(SA, {
+ footer: /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(Vk, {
"aria-label": "媒体库",
className: "w-48",
selectedKey: l?.id ?? null,
@@ -36589,10 +36713,10 @@ function sfe() {
onSelectionChange: (e) => {
e !== null && i(String(e));
},
- children: s.map((e) => /* @__PURE__ */ (0, H.jsxs)(CA, {
+ children: s.map((e) => /* @__PURE__ */ (0, H.jsxs)(Hk, {
id: e.id,
textValue: e.name,
- children: [/* @__PURE__ */ (0, H.jsx)(RT, { mark: ofe(e.icon) }), e.name]
+ children: [/* @__PURE__ */ (0, H.jsx)(IT, { mark: jfe(e.icon) }), e.name]
}, e.id))
}), c ? /* @__PURE__ */ (0, H.jsx)(J, {
onClick: d,
@@ -36606,12 +36730,12 @@ function sfe() {
children: /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-col gap-2",
children: [
- /* @__PURE__ */ (0, H.jsx)(pT, { children: "媒体修复" }),
+ /* @__PURE__ */ (0, H.jsx)(dT, { children: "媒体修复" }),
/* @__PURE__ */ (0, H.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
- children: uoe
+ children: foe
}),
- c && o.total ? /* @__PURE__ */ (0, H.jsx)(ST, {
+ c && o.total ? /* @__PURE__ */ (0, H.jsx)(bT, {
label: "修复进度",
value: o.checked,
max: o.total
@@ -36635,7 +36759,7 @@ function sfe() {
p && o.missing_tool ? /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "warning",
title: "缺少 untrunc",
- children: Uue(o)
+ children: mde(o)
}) : null,
m ? /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "error",
@@ -36647,7 +36771,7 @@ function sfe() {
}
//#endregion
//#region src/react/boardui/components/base/checkbox/checkbox-glyph.tsx
-var MM = {
+var cM = {
md: {
box: "size-4",
glyph: "size-4",
@@ -36661,8 +36785,8 @@ var MM = {
gap: "gap-1.5"
}
};
-function NM({ state: e, size: t = "md" }) {
- let { isSelected: n, isIndeterminate: r, isFocusVisible: i, isDisabled: a, isHovered: o } = e, s = MM[t], c = n || r, l = o && !a;
+function lM({ state: e, size: t = "md" }) {
+ let { isSelected: n, isIndeterminate: r, isFocusVisible: i, isDisabled: a, isHovered: o } = e, s = cM[t], c = n || r, l = o && !a;
return /* @__PURE__ */ (0, H.jsx)("span", {
"aria-hidden": !0,
className: dr("flex shrink-0 items-center justify-center rounded-sm", "transition-[background-color,border-color,box-shadow] duration-150 ease", s.box, c ? dr("bg-linear-to-b shadow-checkbox-selected", l ? "from-accent-400 to-accent-500" : "from-accent-500 to-accent-600") : dr("border bg-background-primary-default shadow-xs", l ? "border-border-checkbox-hover" : "border-border-checkbox-default"), a && "opacity-50", i && "ring-2 ring-border-focus-ring ring-offset-2"),
@@ -36689,13 +36813,13 @@ function NM({ state: e, size: t = "md" }) {
}
//#endregion
//#region src/react/boardui/components/base/checkbox/checkbox.tsx
-function PM({ className: e, children: t, size: n = "md", ref: r, ...i }) {
- let a = MM[n];
+function uM({ className: e, children: t, size: n = "md", ref: r, ...i }) {
+ let a = cM[n];
return /* @__PURE__ */ (0, H.jsx)(El, {
ref: r,
...i,
className: (t) => dr("group inline-flex items-center select-none", a.gap, t.isDisabled ? "cursor-not-allowed" : "cursor-pointer", typeof e == "function" ? e(t) : e),
- children: (e) => /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(NM, {
+ children: (e) => /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(lM, {
state: e,
size: n
}), t != null && /* @__PURE__ */ (0, H.jsx)("span", {
@@ -36706,10 +36830,10 @@ function PM({ className: e, children: t, size: n = "md", ref: r, ...i }) {
}
//#endregion
//#region src/react/boardui/components/base/table/table.tsx
-function FM({ size: e = "md", className: t, containerClassName: n, ref: r, ...i }) {
+function dM({ size: e = "md", className: t, containerClassName: n, ref: r, ...i }) {
return /* @__PURE__ */ (0, H.jsx)("div", {
className: dr("w-full overflow-x-auto", n),
- children: /* @__PURE__ */ (0, H.jsx)(ete, {
+ children: /* @__PURE__ */ (0, H.jsx)(tte, {
ref: r,
...i,
className: dr("bui-table", e === "sm" && "bui-table-sm", t)
@@ -36718,7 +36842,7 @@ function FM({ size: e = "md", className: t, containerClassName: n, ref: r, ...i
}
//#endregion
//#region src/react/components/row-click.ts
-var cfe = [
+var Nfe = [
"a",
"button",
"input",
@@ -36731,15 +36855,15 @@ var cfe = [
"[role=\"link\"]",
"[role=\"menu\"]"
].join(",");
-function IM(e, t) {
+function fM(e, t) {
let n = e.target;
if (!(n instanceof Element) || !t.contains(n)) return !1;
- let r = n.closest(cfe);
+ let r = n.closest(Nfe);
return !r || !t.contains(r) || r === t;
}
//#endregion
//#region src/react/components/data-table-frame.tsx
-function LM({ children: e, follow: t = !1, onRowClick: n }) {
+function pM({ children: e, follow: t = !1, onRowClick: n }) {
return /* @__PURE__ */ (0, H.jsx)("div", {
"data-board-data-table": !0,
"data-follow-table": t || void 0,
@@ -36747,15 +36871,15 @@ function LM({ children: e, follow: t = !1, onRowClick: n }) {
let t = e.target;
if (!(t instanceof Element)) return;
let r = t.closest("[role=\"row\"][data-key]");
- r && IM(e, r) && n(r.dataset.key);
+ r && fM(e, r) && n(r.dataset.key);
} : void 0,
children: e
});
}
//#endregion
//#region src/react/data-cleanup/link-manager.tsx
-var lfe = gC("unlink"), RM = gC("rotate-cw"), ufe = "站点返回 404 或 410,确认这个地址不存在。", dfe = "站点拒绝程序访问或一次临时故障都会落在这里。链接保留,可勾选后单独重试。", ffe = "删除前会逐条重验一次;此操作不可撤销。", pfe = "暂时无法读取进度,正在重新连接…", zM = (e) => Number(e || 0).toLocaleString();
-function BM({ label: e, value: t, note: n }) {
+var Pfe = MC("unlink"), mM = MC("rotate-cw"), Ffe = "站点返回 404 或 410,确认这个地址不存在。", Ife = "站点拒绝程序访问或一次临时故障都会落在这里。链接保留,可勾选后单独重试。", Lfe = "删除前会逐条重验一次;此操作不可撤销。", Rfe = "暂时无法读取进度,正在重新连接…", hM = (e) => Number(e || 0).toLocaleString();
+function gM({ label: e, value: t, note: n }) {
return /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex min-w-0 flex-col gap-0.5",
children: [
@@ -36774,11 +36898,11 @@ function BM({ label: e, value: t, note: n }) {
]
});
}
-function VM({ title: e, items: t, hint: n, picked: r, onPick: i, children: a }) {
+function _M({ title: e, items: t, hint: n, picked: r, onPick: i, children: a }) {
if (!t.length) return null;
let o = r ?? [], s = o.length > 0 && o.length === t.length;
return /* @__PURE__ */ (0, H.jsxs)("div", {
- className: uT,
+ className: cT,
children: [
/* @__PURE__ */ (0, H.jsxs)("h4", {
className: "mb-1 text-body-semibold text-text-primary",
@@ -36791,13 +36915,13 @@ function VM({ title: e, items: t, hint: n, picked: r, onPick: i, children: a })
className: "mb-3 text-caption-1-regular text-text-secondary",
children: n
}),
- /* @__PURE__ */ (0, H.jsx)(LM, { children: /* @__PURE__ */ (0, H.jsxs)(FM, {
+ /* @__PURE__ */ (0, H.jsx)(pM, { children: /* @__PURE__ */ (0, H.jsxs)(dM, {
"aria-label": e,
size: "sm",
- children: [/* @__PURE__ */ (0, H.jsxs)(w_, { children: [
- i ? /* @__PURE__ */ (0, H.jsx)(T_, {
+ children: [/* @__PURE__ */ (0, H.jsxs)(C_, { children: [
+ i ? /* @__PURE__ */ (0, H.jsx)(w_, {
id: "pick",
- children: /* @__PURE__ */ (0, H.jsx)(PM, {
+ children: /* @__PURE__ */ (0, H.jsx)(uM, {
slot: null,
"aria-label": "全选本次未访问成功的链接",
isSelected: s,
@@ -36805,44 +36929,44 @@ function VM({ title: e, items: t, hint: n, picked: r, onPick: i, children: a })
onChange: (e) => i(e ? t.map((e) => e.id) : [])
})
}) : null,
- /* @__PURE__ */ (0, H.jsx)(T_, {
+ /* @__PURE__ */ (0, H.jsx)(w_, {
id: "entity",
isRowHeader: !0,
children: "所属"
}),
- /* @__PURE__ */ (0, H.jsx)(T_, {
+ /* @__PURE__ */ (0, H.jsx)(w_, {
id: "kind",
children: "类型"
}),
- /* @__PURE__ */ (0, H.jsx)(T_, {
+ /* @__PURE__ */ (0, H.jsx)(w_, {
id: "label",
children: "标签"
}),
- /* @__PURE__ */ (0, H.jsx)(T_, {
+ /* @__PURE__ */ (0, H.jsx)(w_, {
id: "note",
children: "结果"
}),
- /* @__PURE__ */ (0, H.jsx)(T_, {
+ /* @__PURE__ */ (0, H.jsx)(w_, {
id: "url",
children: "地址"
})
- ] }), /* @__PURE__ */ (0, H.jsx)(D_, { children: t.map((e) => /* @__PURE__ */ (0, H.jsxs)(A_, {
+ ] }), /* @__PURE__ */ (0, H.jsx)(E_, { children: t.map((e) => /* @__PURE__ */ (0, H.jsxs)(k_, {
id: e.id,
children: [
- i ? /* @__PURE__ */ (0, H.jsx)(M_, { children: /* @__PURE__ */ (0, H.jsx)(PM, {
+ i ? /* @__PURE__ */ (0, H.jsx)(j_, { children: /* @__PURE__ */ (0, H.jsx)(uM, {
slot: null,
"aria-label": `选择 ${e.entity} 的${e.label || e.url}`,
isSelected: o.includes(e.id),
onChange: (t) => i(t ? [...o, e.id] : o.filter((t) => t !== e.id))
}) }) : null,
- /* @__PURE__ */ (0, H.jsx)(M_, { children: e.entity }),
- /* @__PURE__ */ (0, H.jsx)(M_, { children: Rj[e.link_kind] || e.link_kind }),
- /* @__PURE__ */ (0, H.jsx)(M_, { children: e.label || "" }),
- /* @__PURE__ */ (0, H.jsx)(M_, { children: /* @__PURE__ */ (0, H.jsx)("span", {
+ /* @__PURE__ */ (0, H.jsx)(j_, { children: e.entity }),
+ /* @__PURE__ */ (0, H.jsx)(j_, { children: mj[e.link_kind] || e.link_kind }),
+ /* @__PURE__ */ (0, H.jsx)(j_, { children: e.label || "" }),
+ /* @__PURE__ */ (0, H.jsx)(j_, { children: /* @__PURE__ */ (0, H.jsx)("span", {
className: "tabular-nums text-text-error-primary",
children: e.note
}) }),
- /* @__PURE__ */ (0, H.jsx)(M_, { children: /* @__PURE__ */ (0, H.jsxs)("a", {
+ /* @__PURE__ */ (0, H.jsx)(j_, { children: /* @__PURE__ */ (0, H.jsxs)("a", {
href: e.url,
target: "_blank",
rel: "noreferrer",
@@ -36852,7 +36976,7 @@ function VM({ title: e, items: t, hint: n, picked: r, onPick: i, children: a })
"data-middle-truncate": !0,
className: "min-w-0 truncate",
children: e.url
- }), /* @__PURE__ */ (0, H.jsx)(Gw, {
+ }), /* @__PURE__ */ (0, H.jsx)(Uw, {
"aria-hidden": !0,
className: "size-3.5 shrink-0"
})]
@@ -36864,27 +36988,27 @@ function VM({ title: e, items: t, hint: n, picked: r, onPick: i, children: a })
]
});
}
-function mfe() {
- let e = xw({
- queryKey: Fj,
- queryFn: ({ signal: e }) => Bj(e)
- }), [t, n] = (0, B.useState)([]), i = AM({
- queryKey: Lj,
- queryFn: ({ signal: e }) => Hj(e),
- start: _de,
+function zfe() {
+ let e = yw({
+ queryKey: dj,
+ queryFn: ({ signal: e }) => gj(e)
+ }), [t, n] = (0, B.useState)([]), i = oM({
+ queryKey: pj,
+ queryFn: ({ signal: e }) => vj(e),
+ start: Hde,
onFinish: () => {
z.invalidateQueries({
- queryKey: Fj,
+ queryKey: dj,
exact: !0
}), z.invalidateQueries({
- queryKey: Ij,
+ queryKey: fj,
exact: !0
});
}
- }), a = AM({
- queryKey: Ij,
- queryFn: ({ signal: e }) => Vj(e),
- start: gde,
+ }), a = oM({
+ queryKey: fj,
+ queryFn: ({ signal: e }) => _j(e),
+ start: Vde,
onStarted: () => {
i.dismiss(), n([]);
}
@@ -36914,7 +37038,7 @@ function mfe() {
else if (v) x = /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "success",
title: "完成",
- children: vde(v)
+ children: Ude(v)
});
else if (y) x = /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "error",
@@ -36924,7 +37048,7 @@ function mfe() {
else if (a.query.isError && o) x = /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "neutral",
title: "任务状态",
- children: pfe
+ children: Rfe
});
else if (o?.status === "failed") x = /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "error",
@@ -36932,12 +37056,12 @@ function mfe() {
children: o.error || "检查失败"
});
else if (o && o.status !== "idle") {
- b = /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [o.status === "running" ? /* @__PURE__ */ (0, H.jsx)(CT, {
+ b = /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [o.status === "running" ? /* @__PURE__ */ (0, H.jsx)(xT, {
embedded: !0,
- label: yde(o),
+ label: Wde(o),
value: o.checked,
total: o.total
- }) : null, l ? /* @__PURE__ */ (0, H.jsx)(CT, {
+ }) : null, l ? /* @__PURE__ */ (0, H.jsx)(xT, {
embedded: !0,
label: i.job?.message || "正在重验并删除失效链接…",
value: i.job?.checked,
@@ -36945,38 +37069,38 @@ function mfe() {
}) : null] });
let e = t.length ? `重试选中的 ${t.length} 条` : "重试选中的链接";
x = u || d.length || f.length ? /* @__PURE__ */ (0, H.jsxs)("div", {
- className: Coe,
+ className: Toe,
children: [
- /* @__PURE__ */ (0, H.jsx)(VM, {
+ /* @__PURE__ */ (0, H.jsx)(_M, {
title: "地址已失效",
items: d,
- hint: ufe
+ hint: Ffe
}),
- /* @__PURE__ */ (0, H.jsx)(VM, {
+ /* @__PURE__ */ (0, H.jsx)(_M, {
title: "本次未访问成功",
items: f,
- hint: dfe,
+ hint: Ife,
picked: p.length ? t : void 0,
onPick: p.length ? n : void 0,
children: p.length ? /* @__PURE__ */ (0, H.jsx)("div", {
className: "-mx-4 mt-3 -mb-4",
- children: /* @__PURE__ */ (0, H.jsxs)(dT, { children: [/* @__PURE__ */ (0, H.jsx)(J, {
- leadingIcon: RM,
+ children: /* @__PURE__ */ (0, H.jsxs)(lT, { children: [/* @__PURE__ */ (0, H.jsx)(J, {
+ leadingIcon: mM,
disabled: !t.length,
...X(c),
onClick: () => g(t),
children: e
}), /* @__PURE__ */ (0, H.jsx)(J, {
- leadingIcon: RM,
+ leadingIcon: mM,
...X(c),
onClick: () => g(p.map((e) => e.id)),
children: `全部重试(${p.length})`
})] })
}) : null
}),
- u && d.length ? /* @__PURE__ */ (0, H.jsx)(dT, {
+ u && d.length ? /* @__PURE__ */ (0, H.jsx)(lT, {
tone: "error",
- status: ffe,
+ status: Lfe,
children: /* @__PURE__ */ (0, H.jsx)(J, {
variant: "danger",
...X(l),
@@ -36985,7 +37109,7 @@ function mfe() {
})
}) : null,
u && !d.length && !f.length ? /* @__PURE__ */ (0, H.jsx)("p", {
- className: `${uT} text-body-regular text-notification-success-foreground`,
+ className: `${cT} text-body-regular text-notification-success-foreground`,
children: "全部链接均可访问。"
}) : null
]
@@ -36996,21 +37120,21 @@ function mfe() {
"aria-labelledby": "link-manager-title",
className: "flex scroll-mt-20 flex-col gap-4",
children: [
- /* @__PURE__ */ (0, H.jsx)(fT, {
+ /* @__PURE__ */ (0, H.jsx)(uT, {
id: "link-manager-title",
children: "链接管理"
}),
- /* @__PURE__ */ (0, H.jsxs)(mT, {
+ /* @__PURE__ */ (0, H.jsxs)(fT, {
layout: "stack",
labelledBy: "link-manager-box",
footer: /* @__PURE__ */ (0, H.jsx)(J, {
- leadingIcon: lfe,
+ leadingIcon: Pfe,
...X(c),
onClick: () => g(),
children: c ? "检查中" : u ? "重新检查" : "检查死链"
}),
children: [
- /* @__PURE__ */ (0, H.jsx)(pT, {
+ /* @__PURE__ */ (0, H.jsx)(dT, {
id: "link-manager-box",
gap: "small",
children: "站外链接"
@@ -37021,13 +37145,13 @@ function mfe() {
children: G(e.error)
}) : m ? /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsxs)("div", {
className: "link-stat-grid mt-4 gap-x-8 gap-y-3",
- children: [/* @__PURE__ */ (0, H.jsx)(BM, {
+ children: [/* @__PURE__ */ (0, H.jsx)(gM, {
label: "链接总数",
- value: zM(m.total),
- note: `分布在 ${zM(m.entities)} 个女优、厂牌与系列`
- }), Object.entries(m.by_kind ?? {}).map(([e, t]) => /* @__PURE__ */ (0, H.jsx)(BM, {
- label: Rj[e] || e,
- value: zM(t)
+ value: hM(m.total),
+ note: `分布在 ${hM(m.entities)} 个女优、厂牌与系列`
+ }), Object.entries(m.by_kind ?? {}).map(([e, t]) => /* @__PURE__ */ (0, H.jsx)(gM, {
+ label: mj[e] || e,
+ value: hM(t)
}, e))]
}), h ? /* @__PURE__ */ (0, H.jsxs)("div", {
className: "mt-4 flex min-w-0 flex-col gap-0.5",
@@ -37056,18 +37180,18 @@ function mfe() {
}
//#endregion
//#region src/react/data-cleanup/organize-card.tsx
-var hfe = (e) => `将按这两份模板改动「${e}」上的文件名与目录,目标已存在的行会整行跳过。这一批可以从「回滚上一批」整批退回。`, gfe = "将把上一批整理动过的文件退回整理前的名字与位置,账本路径跟着退回。退回后这一批不再出现在这里。", _fe = 8;
-function vfe({ plan: e }) {
+var Bfe = (e) => `将按这两份模板改动「${e}」上的文件名与目录,目标已存在的行会整行跳过。这一批可以从「回滚上一批」整批退回。`, Vfe = "将把上一批整理动过的文件退回整理前的名字与位置,账本路径跟着退回。退回后这一批不再出现在这里。", Hfe = 8;
+function Ufe({ plan: e }) {
return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)("ol", {
className: "mt-2 flex min-w-0 flex-col gap-1",
- children: e.rows.slice(0, _fe).map((e) => /* @__PURE__ */ (0, H.jsxs)("li", {
+ children: e.rows.slice(0, Hfe).map((e) => /* @__PURE__ */ (0, H.jsxs)("li", {
className: "flex min-w-0 items-center gap-2 text-caption-1-regular text-text-secondary",
children: [
/* @__PURE__ */ (0, H.jsx)("span", {
"data-middle-truncate": !0,
title: e.current_path,
className: "min-w-0 truncate",
- children: tM(e.current_path)
+ children: jj(e.current_path)
}),
/* @__PURE__ */ (0, H.jsx)("span", {
"aria-hidden": !0,
@@ -37077,7 +37201,7 @@ function vfe({ plan: e }) {
"data-middle-truncate": !0,
title: e.target_path,
className: "min-w-0 truncate text-text-primary",
- children: tM(e.target_path)
+ children: jj(e.target_path)
})
]
}, e.current_path))
@@ -37086,10 +37210,10 @@ function vfe({ plan: e }) {
children: "只列出前 8 行,完整计划在计划 CSV 里。"
}) : null] });
}
-function yfe({ toast: t, failure: n }) {
- let i = xw({
- queryKey: $j,
- queryFn: ({ signal: e }) => eM(e)
+function Wfe({ toast: t, failure: n }) {
+ let i = yw({
+ queryKey: kj,
+ queryFn: ({ signal: e }) => Aj(e)
}), a = i.data, o = a?.locations ?? [], [s, c] = (0, B.useState)(""), l = o.some((e) => e.location === s) ? s : o[0]?.location ?? "", u = a?.templates?.[l], [d, f] = (0, B.useState)(null), p = d?.location === l ? d : {
location: l,
file: u?.file ?? "",
@@ -37101,9 +37225,9 @@ function yfe({ toast: t, failure: n }) {
location: l,
file_template: p.file.trim(),
dir_template: p.dir.trim()
- }), b = ww({
- mutationFn: jde,
- onSuccess: (e, t) => void Nde({
+ }), b = Sw({
+ mutationFn: nfe,
+ onSuccess: (e, t) => void ife({
...a?.templates ?? {},
[t.location]: {
file: t.file_template,
@@ -37111,29 +37235,29 @@ function yfe({ toast: t, failure: n }) {
}
}),
onError: (e) => {
- let t = Fde.test(G(e)) ? "dir" : "file";
+ let t = ofe.test(G(e)) ? "dir" : "file";
g(t), (t === "dir" ? v : _).current?.focus();
}
- }), x = AM({
- queryKey: $j,
- queryFn: ({ signal: e }) => eM(e),
- start: Mde,
+ }), x = oM({
+ queryKey: kj,
+ queryFn: ({ signal: e }) => Aj(e),
+ start: rfe,
jobOf: (e) => e,
- withJob: Pde,
+ withJob: afe,
onStarted: () => b.reset(),
onFinish: (e) => {
if (z.invalidateQueries({
- queryKey: $j,
+ queryKey: kj,
exact: !0
}), e.status !== "complete") return;
- let { text: r, failed: i } = rM(e);
+ let { text: r, failed: i } = Nj(e);
i ? n("按模板整理", /* @__PURE__ */ Error(`${i} 行未能处理`)) : t(r.replace(/。$/, ""));
}
}), S = x.running || x.start.isPending, C = b.data, w = Number(C?.counts?.change || 0), T = M[l] || l, E = (a?.placeholders ?? []).map((e) => `{${e.key}} ${e.label}`).join(" · "), D = () => {
b.isPending || !l || (g(null), b.mutate(y()));
}, O = () => void r({
title: "按模板整理文件",
- body: hfe(T),
+ body: Bfe(T),
confirmLabel: "整理文件",
onConfirm: () => x.start.mutateAsync({
kind: "apply",
@@ -37141,13 +37265,13 @@ function yfe({ toast: t, failure: n }) {
})
}), k = () => void r({
title: "回滚上一批整理",
- body: gfe,
+ body: Vfe,
confirmLabel: "回滚整理",
onConfirm: () => x.start.mutateAsync({ kind: "rollback" })
}), A = null, j = x.job, N = x.outcome;
if (j?.status === "running") {
let e = j.message || j.stage || "正在整理文件…";
- A = /* @__PURE__ */ (0, H.jsx)(CT, {
+ A = /* @__PURE__ */ (0, H.jsx)(xT, {
embedded: !0,
label: e,
value: j.checked,
@@ -37159,7 +37283,7 @@ function yfe({ toast: t, failure: n }) {
children: N.error || "请查看任务记录,核对已处理的文件。"
});
else if (N) {
- let { text: e, failed: t } = rM(N);
+ let { text: e, failed: t } = Nj(N);
A = /* @__PURE__ */ (0, H.jsx)(Y, {
tone: t ? "warning" : "success",
title: t ? "部分完成" : "整理结果",
@@ -37169,7 +37293,7 @@ function yfe({ toast: t, failure: n }) {
tone: "error",
title: "整理失败",
children: G(x.start.error)
- }) : b.isPending ? A = /* @__PURE__ */ (0, H.jsx)(CT, {
+ }) : b.isPending ? A = /* @__PURE__ */ (0, H.jsx)(xT, {
embedded: !0,
label: "正在按模板算计划…"
}) : b.isError ? A = /* @__PURE__ */ (0, H.jsx)(Y, {
@@ -37179,9 +37303,9 @@ function yfe({ toast: t, failure: n }) {
}) : C && (A = /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(Y, {
tone: "neutral",
title: "预览结果",
- children: Ide(C)
- }), w ? /* @__PURE__ */ (0, H.jsx)(vfe, { plan: C }) : null] }));
- return /* @__PURE__ */ (0, H.jsxs)(mT, {
+ children: sfe(C)
+ }), w ? /* @__PURE__ */ (0, H.jsx)(Ufe, { plan: C }) : null] }));
+ return /* @__PURE__ */ (0, H.jsxs)(fT, {
layout: "stack",
id: "organize",
labelledBy: "cleanup-organize-title",
@@ -37205,7 +37329,7 @@ function yfe({ toast: t, failure: n }) {
}) : null
] }),
children: [
- /* @__PURE__ */ (0, H.jsx)(pT, {
+ /* @__PURE__ */ (0, H.jsx)(dT, {
id: "cleanup-organize-title",
gap: "medium",
children: "整理"
@@ -37225,20 +37349,20 @@ function yfe({ toast: t, failure: n }) {
/* @__PURE__ */ (0, H.jsxs)("div", {
className: "mt-3 flex flex-col gap-3",
children: [
- o.length ? /* @__PURE__ */ (0, H.jsx)(SA, {
+ o.length ? /* @__PURE__ */ (0, H.jsx)(Vk, {
"aria-label": "整理哪个来源",
className: "w-fit min-w-25",
selectedKey: l || null,
onSelectionChange: (e) => {
e !== null && (c(String(e)), g(null), b.reset());
},
- children: o.map((t) => /* @__PURE__ */ (0, H.jsxs)(CA, {
+ children: o.map((t) => /* @__PURE__ */ (0, H.jsxs)(Hk, {
id: t.location,
textValue: M[t.location] || t.location,
- children: [/* @__PURE__ */ (0, H.jsx)(RT, { mark: e[t.location] || "database" }), M[t.location] || t.location]
+ children: [/* @__PURE__ */ (0, H.jsx)(IT, { mark: e[t.location] || "database" }), M[t.location] || t.location]
}, t.location))
}) : null,
- /* @__PURE__ */ (0, H.jsx)(bA, {
+ /* @__PURE__ */ (0, H.jsx)(zk, {
label: "文件名模板",
placeholder: "{number}[ {title}]",
value: p.file,
@@ -37249,7 +37373,7 @@ function yfe({ toast: t, failure: n }) {
m({ file: e }), g(null);
}
}),
- /* @__PURE__ */ (0, H.jsx)(bA, {
+ /* @__PURE__ */ (0, H.jsx)(zk, {
label: "目录模板",
placeholder: "留空表示原地改名",
value: p.dir,
@@ -37289,56 +37413,56 @@ function yfe({ toast: t, failure: n }) {
}
//#endregion
//#region src/react/data-cleanup/orphan-records.ts
-var bfe = "/api/orphan-records", xfe = "/api/orphan-records/attach", HM = ["orphan-records"], Sfe = [
+var Gfe = "/api/orphan-records", Kfe = "/api/orphan-records/attach", vM = ["orphan-records"], qfe = [
["asset_preference", "喜欢与理由"],
["watch_queue", "稍后看"],
["playlist_item", "播放列表"],
["asset_quality_goal", "寻找更好版本"],
["activity_event", "观看历史"],
["asset_tag_preference", "隐藏标签"]
-], Cfe = (e) => K(bfe, e), wfe = (e, t) => q(xfe, {
+], Jfe = (e) => K(Gfe, e), Yfe = (e, t) => q(Kfe, {
id: e,
target: t
-}), Tfe = (e) => q(aj, {
+}), Xfe = (e) => q(FA, {
ids: [e],
operation: "delete"
-}), Efe = (e) => [
+}), Zfe = (e) => [
e.rating ? `评分 ${e.rating}` : "",
e.play_count ? `播放 ${Number(e.play_count).toLocaleString()} 次` : e.last_played ? "播放过" : "",
e.o_count ? `高潮 ${Number(e.o_count).toLocaleString()} 次` : ""
-], UM = (e) => [...Sfe.filter(([t]) => e[t]).map(([t, n]) => `${n} ${Number(e[t]).toLocaleString()}`), ...Efe(e)].filter(Boolean).join(" · "), Dfe = (e) => e ? `${Math.round(e / 60)} 分钟` : "", WM = (e) => [e.name, Dfe(e.duration)].filter(Boolean).join(" · "), Ofe = gC("play"), GM = () => z.invalidateQueries({
- queryKey: HM,
+], yM = (e) => [...qfe.filter(([t]) => e[t]).map(([t, n]) => `${n} ${Number(e[t]).toLocaleString()}`), ...Zfe(e)].filter(Boolean).join(" · "), Qfe = (e) => e ? `${Math.round(e / 60)} 分钟` : "", bM = (e) => [e.name, Qfe(e.duration)].filter(Boolean).join(" · "), $fe = MC("play"), xM = () => z.invalidateQueries({
+ queryKey: vM,
exact: !0
});
-function kfe({ item: e, toast: t }) {
- let [n, i] = (0, B.useState)(e.candidates[0]?.id ?? null), a = ww({
- mutationFn: () => wfe(e.id, Number(n)),
+function epe({ item: e, toast: t }) {
+ let [n, i] = (0, B.useState)(e.candidates[0]?.id ?? null), a = Sw({
+ mutationFn: () => Yfe(e.id, Number(n)),
onSuccess: (e) => {
- t(`记录已接到新文件,批次 ${e.batch}`), GM();
+ t(`记录已接到新文件,批次 ${e.batch}`), xM();
},
onError: (e) => t(G(e))
- }), o = ww({
- mutationFn: () => Tfe(e.id),
+ }), o = Sw({
+ mutationFn: () => Xfe(e.id),
onSuccess: (n) => {
- t(n.blocked.length ? `${e.name} 的文件又回到盘上,没有删除;下一次扫描会把它接回在库` : `已彻底删除 ${e.name}`), GM();
+ t(n.blocked.length ? `${e.name} 的文件又回到盘上,没有删除;下一次扫描会把它接回在库` : `已彻底删除 ${e.name}`), xM();
}
}), s = () => {
r({
title: "彻底删除",
- body: `将删除「${e.name}」这一条和它带的记录(${UM(e.records)})。此操作不可撤销。`,
+ body: `将删除「${e.name}」这一条和它带的记录(${yM(e.records)})。此操作不可撤销。`,
confirmLabel: "彻底删除",
danger: !0,
onConfirm: () => o.mutateAsync()
});
}, c = a.isPending || o.isPending;
- return /* @__PURE__ */ (0, H.jsxs)(A_, {
+ return /* @__PURE__ */ (0, H.jsxs)(k_, {
id: e.id,
children: [
- /* @__PURE__ */ (0, H.jsx)(M_, { children: /* @__PURE__ */ (0, H.jsxs)("span", {
+ /* @__PURE__ */ (0, H.jsx)(j_, { children: /* @__PURE__ */ (0, H.jsxs)("span", {
className: "flex min-w-0 items-center gap-3",
children: [/* @__PURE__ */ (0, H.jsxs)("span", {
className: "relative inline-grid aspect-16/10 w-24 flex-none place-items-center max-cleanup-tight:hidden overflow-hidden rounded-lg border border-separator-border bg-background-tertiary-default text-text-tertiary",
- children: [/* @__PURE__ */ (0, H.jsx)(Ofe, {
+ children: [/* @__PURE__ */ (0, H.jsx)($fe, {
"aria-hidden": !0,
className: "size-5"
}), e.has_thumb ? /* @__PURE__ */ (0, H.jsx)("img", {
@@ -37360,27 +37484,27 @@ function kfe({ item: e, toast: t }) {
})]
})]
}) }),
- /* @__PURE__ */ (0, H.jsx)(M_, { children: /* @__PURE__ */ (0, H.jsx)("span", {
+ /* @__PURE__ */ (0, H.jsx)(j_, { children: /* @__PURE__ */ (0, H.jsx)("span", {
className: "block min-w-44",
- children: UM(e.records)
+ children: yM(e.records)
}) }),
- /* @__PURE__ */ (0, H.jsx)(M_, { children: e.candidates.length ? /* @__PURE__ */ (0, H.jsx)(SA, {
+ /* @__PURE__ */ (0, H.jsx)(j_, { children: e.candidates.length ? /* @__PURE__ */ (0, H.jsx)(Vk, {
"aria-label": `把 ${e.name} 的记录接到哪个文件`,
className: "w-64",
selectedKey: n,
onSelectionChange: (e) => {
e !== null && i(Number(e));
},
- children: e.candidates.map((e) => /* @__PURE__ */ (0, H.jsx)(CA, {
+ children: e.candidates.map((e) => /* @__PURE__ */ (0, H.jsx)(Hk, {
id: e.id,
- textValue: WM(e),
- children: WM(e)
+ textValue: bM(e),
+ children: bM(e)
}, e.id))
}) : /* @__PURE__ */ (0, H.jsx)("span", {
className: "text-text-secondary",
children: "没有番号或文件名对得上的文件"
}) }),
- /* @__PURE__ */ (0, H.jsx)(M_, { children: /* @__PURE__ */ (0, H.jsxs)("span", {
+ /* @__PURE__ */ (0, H.jsx)(j_, { children: /* @__PURE__ */ (0, H.jsxs)("span", {
className: "flex flex-wrap gap-2",
children: [e.candidates.length ? /* @__PURE__ */ (0, H.jsx)(J, {
size: "small",
@@ -37400,23 +37524,23 @@ function kfe({ item: e, toast: t }) {
]
});
}
-function Afe({ toast: e }) {
- let t = xw({
- queryKey: HM,
- queryFn: ({ signal: e }) => Cfe(e)
+function tpe({ toast: e }) {
+ let t = yw({
+ queryKey: vM,
+ queryFn: ({ signal: e }) => Jfe(e)
}), n = t.data?.items ?? [];
return !t.isError && !n.length ? null : /* @__PURE__ */ (0, H.jsxs)("section", {
id: "orphan-records",
"aria-labelledby": "orphan-records-title",
className: "flex scroll-mt-20 flex-col gap-4",
- children: [/* @__PURE__ */ (0, H.jsx)(fT, {
+ children: [/* @__PURE__ */ (0, H.jsx)(uT, {
id: "orphan-records-title",
children: "孤儿记录"
- }), /* @__PURE__ */ (0, H.jsxs)(mT, {
+ }), /* @__PURE__ */ (0, H.jsxs)(fT, {
layout: "stack",
labelledBy: "orphan-records-box",
children: [
- /* @__PURE__ */ (0, H.jsx)(pT, {
+ /* @__PURE__ */ (0, H.jsx)(dT, {
id: "orphan-records-box",
gap: "small",
children: "文件已消失的作品"
@@ -37429,28 +37553,28 @@ function Afe({ toast: e }) {
tone: "error",
title: "孤儿记录读取失败",
children: G(t.error)
- }) : /* @__PURE__ */ (0, H.jsx)(LM, { children: /* @__PURE__ */ (0, H.jsxs)(FM, {
+ }) : /* @__PURE__ */ (0, H.jsx)(pM, { children: /* @__PURE__ */ (0, H.jsxs)(dM, {
"aria-label": "文件已消失的作品",
size: "sm",
- children: [/* @__PURE__ */ (0, H.jsxs)(w_, { children: [
- /* @__PURE__ */ (0, H.jsx)(T_, {
+ children: [/* @__PURE__ */ (0, H.jsxs)(C_, { children: [
+ /* @__PURE__ */ (0, H.jsx)(w_, {
id: "item",
isRowHeader: !0,
children: "作品"
}),
- /* @__PURE__ */ (0, H.jsx)(T_, {
+ /* @__PURE__ */ (0, H.jsx)(w_, {
id: "records",
children: "带的记录"
}),
- /* @__PURE__ */ (0, H.jsx)(T_, {
+ /* @__PURE__ */ (0, H.jsx)(w_, {
id: "target",
children: "接到"
}),
- /* @__PURE__ */ (0, H.jsx)(T_, {
+ /* @__PURE__ */ (0, H.jsx)(w_, {
id: "actions",
children: "操作"
})
- ] }), /* @__PURE__ */ (0, H.jsx)(D_, { children: n.map((t) => /* @__PURE__ */ (0, H.jsx)(kfe, {
+ ] }), /* @__PURE__ */ (0, H.jsx)(E_, { children: n.map((t) => /* @__PURE__ */ (0, H.jsx)(epe, {
item: t,
toast: e
}, t.id)) })]
@@ -37461,99 +37585,99 @@ function Afe({ toast: e }) {
}
//#endregion
//#region src/react/data-cleanup/resource-sync-card.tsx
-var jfe = gC("git-compare"), Mfe = gC("rotate-cw"), Nfe = "暂时无法读取进度,正在重新连接…", KM = "清理失效条目", qM = "inline-grid w-full grid-flow-col auto-cols-fr gap-4 max-plain-stat-pair:grid-flow-row max-plain-stat-pair:grid-cols-2 max-plain-stat-single:grid-cols-1", JM = (e) => Number(e || 0).toLocaleString();
-function Pfe({ scan: t }) {
+var npe = MC("git-compare"), rpe = MC("rotate-cw"), ipe = "暂时无法读取进度,正在重新连接…", SM = "清理失效条目", CM = "inline-grid w-full grid-flow-col auto-cols-fr gap-4 max-plain-stat-pair:grid-flow-row max-plain-stat-pair:grid-cols-2 max-plain-stat-single:grid-cols-1", wM = (e) => Number(e || 0).toLocaleString();
+function ape({ scan: t }) {
let n = t.cache ?? {
files: 0,
bytes: 0
};
return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)("div", {
- className: qM,
+ className: CM,
children: (t.sources ?? []).map((t) => /* @__PURE__ */ (0, H.jsx)("article", {
- className: EM(),
- children: /* @__PURE__ */ (0, H.jsx)(DM, {
- label: Vde[t.location] || "媒体来源",
- mark: /* @__PURE__ */ (0, H.jsx)(RT, { mark: e[t.location] ?? "database" }),
+ className: nM(),
+ children: /* @__PURE__ */ (0, H.jsx)(rM, {
+ label: ffe[t.location] || "媒体来源",
+ mark: /* @__PURE__ */ (0, H.jsx)(IT, { mark: e[t.location] ?? "database" }),
aside: /* @__PURE__ */ (0, H.jsx)("span", {
className: t.online ? "text-notification-success-foreground" : "text-text-error-primary",
children: t.online ? "可访问" : "离线,已跳过"
}),
- figure: t.online ? `${JM(t.missing)} 项` : "—",
- meta: Gde(t),
+ figure: t.online ? `${wM(t.missing)} 项` : "—",
+ meta: gfe(t),
wrapMeta: !0
})
}, t.location))
}), /* @__PURE__ */ (0, H.jsxs)("div", {
- className: qM,
+ className: CM,
children: [
/* @__PURE__ */ (0, H.jsx)("article", {
- className: EM(),
- children: /* @__PURE__ */ (0, H.jsx)(DM, {
+ className: nM(),
+ children: /* @__PURE__ */ (0, H.jsx)(rM, {
label: "待永久删除",
- figure: `${JM(fM(t))} 项`,
+ figure: `${wM(Hj(t))} 项`,
meta: "文件已不在盘上,含回收站"
})
}),
/* @__PURE__ */ (0, H.jsx)("article", {
- className: EM(),
- children: /* @__PURE__ */ (0, H.jsx)(DM, {
+ className: nM(),
+ children: /* @__PURE__ */ (0, H.jsx)(rM, {
label: "将标为已消失",
- figure: `${JM(t.vanish)} 项`,
+ figure: `${wM(t.vanish)} 项`,
meta: "带个人记录,记录留着"
})
}),
/* @__PURE__ */ (0, H.jsx)("article", {
- className: EM(),
- children: /* @__PURE__ */ (0, H.jsx)(DM, {
+ className: nM(),
+ children: /* @__PURE__ */ (0, H.jsx)(rM, {
label: "空文件夹",
- figure: `${JM(t.empty)} 个`,
+ figure: `${wM(t.empty)} 个`,
meta: "保留来源根目录"
})
}),
/* @__PURE__ */ (0, H.jsx)("article", {
- className: EM(),
- children: /* @__PURE__ */ (0, H.jsx)(DM, {
+ className: nM(),
+ children: /* @__PURE__ */ (0, H.jsx)(rM, {
label: "可清理的缓存",
- figure: `${JM(n.files)} 个`,
+ figure: `${wM(n.files)} 个`,
meta: n.files ? I(n.bytes) : ""
})
})
]
})] });
}
-function Ffe({ toast: e }) {
- let t = AM({
- queryKey: sM,
- queryFn: ({ signal: e }) => lM(e),
- start: Rde,
+function ope({ toast: e }) {
+ let t = oM({
+ queryKey: Lj,
+ queryFn: ({ signal: e }) => zj(e),
+ start: lfe,
onFinish: (t) => {
if (z.invalidateQueries({
- queryKey: yM,
+ queryKey: Yj,
exact: !0
}), z.invalidateQueries({
- queryKey: oM,
+ queryKey: Ij,
exact: !0
}), t.status !== "complete") return;
- let { done: n, left: r } = hM(t);
- r ? e(`已完成 ${JM(n)} 项,${JM(r)} 项没有处理`, { warning: !0 }) : e("已清理失效条目");
+ let { done: n, left: r } = Gj(t);
+ r ? e(`已完成 ${wM(n)} 项,${wM(r)} 项没有处理`, { warning: !0 }) : e("已清理失效条目");
}
- }), n = AM({
- queryKey: oM,
- queryFn: ({ signal: e }) => cM(e),
- start: Lde,
+ }), n = oM({
+ queryKey: Ij,
+ queryFn: ({ signal: e }) => Rj(e),
+ start: cfe,
onStarted: () => t.dismiss()
}), i = n.job, a = n.running || n.start.isPending, o = t.running || t.start.isPending, s = i?.status === "complete" || i?.status === "failed", c = a ? "扫描中" : s ? "重新扫描" : "检查文件", l = (e) => void r({
- title: KM,
- body: Wde(e),
- confirmLabel: KM,
+ title: SM,
+ body: hfe(e),
+ confirmLabel: SM,
danger: !0,
onConfirm: () => t.start.mutateAsync(e.scan_id || "")
}), u = t.outcome, d = (e) => {
- let t = hM(e).left > 0;
+ let t = Gj(e).left > 0;
return /* @__PURE__ */ (0, H.jsx)(Y, {
tone: t ? "warning" : "success",
title: t ? "部分完成" : "清理结果",
- children: Kde(e, I)
+ children: _fe(e, I)
});
}, f = null, p = null;
if (u?.status === "failed") p = /* @__PURE__ */ (0, H.jsx)(Y, {
@@ -37562,7 +37686,7 @@ function Ffe({ toast: e }) {
children: u.error || "请查看任务记录,核对已处理的文件。"
});
else if (u) p = d(u);
- else if (t.running) f = /* @__PURE__ */ (0, H.jsx)(CT, {
+ else if (t.running) f = /* @__PURE__ */ (0, H.jsx)(xT, {
embedded: !0,
label: t.job?.message || "正在复核并清理失效条目…"
});
@@ -37574,11 +37698,11 @@ function Ffe({ toast: e }) {
else if (n.query.isError && i) p = /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "neutral",
title: "任务状态",
- children: Nfe
+ children: ipe
});
else if (i?.status === "running") {
- let e = Hde(i);
- f = /* @__PURE__ */ (0, H.jsx)(CT, {
+ let e = pfe(i);
+ f = /* @__PURE__ */ (0, H.jsx)(xT, {
embedded: !0,
label: e,
value: i.completed_sources,
@@ -37595,13 +37719,13 @@ function Ffe({ toast: e }) {
children: "这次检查的结果已经清理,重新扫描可再核对。"
});
else if (i?.status === "complete") {
- let e = Bde(i);
+ let e = dfe(i);
p = /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [
- /* @__PURE__ */ (0, H.jsx)(Pfe, { scan: i }),
+ /* @__PURE__ */ (0, H.jsx)(ape, { scan: i }),
e ? /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "neutral",
title: "清理内容",
- children: Ude(i)
+ children: mfe(i)
}) : null,
/* @__PURE__ */ (0, H.jsx)("div", {
className: "flex flex-wrap items-center justify-end gap-2",
@@ -37609,7 +37733,7 @@ function Ffe({ toast: e }) {
variant: "danger",
...X(o),
onClick: () => l(i),
- children: o ? "正在复核并清理…" : KM
+ children: o ? "正在复核并清理…" : SM
}) : /* @__PURE__ */ (0, H.jsx)("p", {
className: "mr-auto text-body-regular text-notification-success-foreground",
children: "已检查可访问的来源,没有待清理的记录、空文件夹或缓存。"
@@ -37626,16 +37750,16 @@ function Ffe({ toast: e }) {
"aria-labelledby": "resource-sync-title",
className: "flex scroll-mt-20 flex-col gap-4",
children: [
- /* @__PURE__ */ (0, H.jsx)(fT, {
+ /* @__PURE__ */ (0, H.jsx)(uT, {
id: "resource-sync-title",
children: "资源同步"
}),
- /* @__PURE__ */ (0, H.jsxs)(mT, {
+ /* @__PURE__ */ (0, H.jsxs)(fT, {
layout: "split",
labelledBy: "resource-sync-box",
footer: /* @__PURE__ */ (0, H.jsx)(J, {
"data-resource-scan": !0,
- leadingIcon: s && !a ? Mfe : jfe,
+ leadingIcon: s && !a ? rpe : npe,
...X(a),
onClick: () => {
a || n.start.mutate();
@@ -37643,7 +37767,7 @@ function Ffe({ toast: e }) {
children: c
}),
children: [
- /* @__PURE__ */ (0, H.jsx)(pT, {
+ /* @__PURE__ */ (0, H.jsx)(dT, {
id: "resource-sync-box",
gap: "small",
children: "文件与记录核对"
@@ -37669,16 +37793,16 @@ function Ffe({ toast: e }) {
}
//#endregion
//#region src/react/data-cleanup/data-cleanup-page.tsx
-function YM(e, t) {
+function TM(e, t) {
return e.data === void 0 ? { figure: e.isError ? "读取失败" : "—" } : t(e.data);
}
-function XM({ section: e, label: t, icon: n, value: r, open: i }) {
+function EM({ section: e, label: t, icon: n, value: r, open: i }) {
return /* @__PURE__ */ (0, H.jsx)("button", {
type: "button",
- className: EM({ interactive: !0 }),
+ className: nM({ interactive: !0 }),
"data-cleanup-go": e,
onClick: () => i(e),
- children: /* @__PURE__ */ (0, H.jsx)(DM, {
+ children: /* @__PURE__ */ (0, H.jsx)(rM, {
label: t,
icon: n,
figure: r.figure,
@@ -37686,80 +37810,80 @@ function XM({ section: e, label: t, icon: n, value: r, open: i }) {
})
});
}
-var Ife = gC("square-check-big"), Lfe = gC("sparkles"), Rfe = gC("file-stack"), zfe = gC("file-archive"), Bfe = gC("trash"), Vfe = [
- gM,
- gj,
- ij
-], Hfe = () => {
- for (let e of Vfe) z.invalidateQueries({
+var spe = MC("square-check-big"), cpe = MC("sparkles"), lpe = MC("file-stack"), upe = MC("file-archive"), dpe = MC("trash"), fpe = [
+ Kj,
+ KA,
+ PA
+], ppe = () => {
+ for (let e of fpe) z.invalidateQueries({
queryKey: e,
exact: !0
});
};
-function Ufe({ toast: e, failure: t, open: n }) {
- let r = xw({
- queryKey: gM,
- queryFn: ({ signal: e }) => bM(e)
- }), i = xw({
- queryKey: gj,
- queryFn: ({ signal: e }) => _j(e)
- }), a = xw({
- queryKey: ij,
- queryFn: ({ signal: e }) => oj(e)
- }), o = xw({
- queryKey: _M,
- queryFn: ({ signal: e }) => xM(e)
- }), s = xw({
- queryKey: yM,
- queryFn: ({ signal: e }) => SM(e)
- }), c = xw({
- queryKey: tj,
- queryFn: ({ signal: e }) => nj(e)
+function mpe({ toast: e, failure: t, open: n }) {
+ let r = yw({
+ queryKey: Kj,
+ queryFn: ({ signal: e }) => Xj(e)
+ }), i = yw({
+ queryKey: KA,
+ queryFn: ({ signal: e }) => qA(e)
+ }), a = yw({
+ queryKey: PA,
+ queryFn: ({ signal: e }) => IA(e)
+ }), o = yw({
+ queryKey: qj,
+ queryFn: ({ signal: e }) => Zj(e)
+ }), s = yw({
+ queryKey: Yj,
+ queryFn: ({ signal: e }) => Qj(e)
+ }), c = yw({
+ queryKey: jA,
+ queryFn: ({ signal: e }) => MA(e)
}), l = (t) => e(t);
- return /* @__PURE__ */ (0, H.jsxs)(pA, { children: [
+ return /* @__PURE__ */ (0, H.jsxs)(Pk, { children: [
/* @__PURE__ */ (0, H.jsxs)("div", {
- className: rfe,
+ className: Ofe,
children: [
- /* @__PURE__ */ (0, H.jsx)(XM, {
+ /* @__PURE__ */ (0, H.jsx)(EM, {
section: "review",
label: "人工复核",
- icon: Ife,
+ icon: spe,
open: n,
- value: YM(r, Xde)
+ value: TM(r, xfe)
}),
- /* @__PURE__ */ (0, H.jsx)(XM, {
+ /* @__PURE__ */ (0, H.jsx)(EM, {
section: "quality",
label: "高清版",
- icon: Lfe,
+ icon: cpe,
open: n,
- value: YM(i, (e) => ({ figure: `${Number(e.total || 0).toLocaleString()} 个待升级` }))
+ value: TM(i, (e) => ({ figure: `${Number(e.total || 0).toLocaleString()} 个待升级` }))
}),
- /* @__PURE__ */ (0, H.jsx)(XM, {
+ /* @__PURE__ */ (0, H.jsx)(EM, {
section: "duplicates",
label: "重复文件",
- icon: Rfe,
+ icon: lpe,
open: n,
- value: YM(a, (e) => Number(e.total || 0) ? {
+ value: TM(a, (e) => Number(e.total || 0) ? {
figure: `${Number(e.total).toLocaleString()} 组 · ${Number(e.files || 0).toLocaleString()} 个文件`,
meta: `可回收 ${I(e.reclaimable || 0)}`
} : { figure: "没有重复内容" })
}),
- /* @__PURE__ */ (0, H.jsx)(XM, {
+ /* @__PURE__ */ (0, H.jsx)(EM, {
section: "ads",
label: "垃圾文件",
- icon: zfe,
+ icon: upe,
open: n,
- value: YM(o, (e) => ({
+ value: TM(o, (e) => ({
figure: `${Number(e.pending_total || 0).toLocaleString()} 个待判断`,
- meta: Zde(e)
+ meta: Sfe(e)
}))
}),
- /* @__PURE__ */ (0, H.jsx)(XM, {
+ /* @__PURE__ */ (0, H.jsx)(EM, {
section: "trash",
label: "回收站",
- icon: Bfe,
+ icon: dpe,
open: n,
- value: YM(s, (e) => ({
+ value: TM(s, (e) => ({
figure: `${Number(e.total || 0).toLocaleString()} 项在回收站`,
meta: e.total ? `占用 ${I(e.bytes || 0)}` : ""
}))
@@ -37772,30 +37896,30 @@ function Ufe({ toast: e, failure: t, open: n }) {
/* @__PURE__ */ (0, H.jsx)("div", {
id: "libraryProcessing",
className: "scroll-mt-20",
- children: /* @__PURE__ */ (0, H.jsx)(BT, {
+ children: /* @__PURE__ */ (0, H.jsx)(RT, {
toast: l,
monitor: !0,
- onComplete: Hfe
+ onComplete: ppe
})
}),
/* @__PURE__ */ (0, H.jsx)("div", {
id: "mediaRepair",
- children: /* @__PURE__ */ (0, H.jsx)(sfe, {})
+ children: /* @__PURE__ */ (0, H.jsx)(Mfe, {})
}),
- /* @__PURE__ */ (0, H.jsx)(yfe, {
+ /* @__PURE__ */ (0, H.jsx)(Wfe, {
toast: l,
failure: t
})
]
}),
- /* @__PURE__ */ (0, H.jsx)(mfe, {}),
- /* @__PURE__ */ (0, H.jsx)(Afe, { toast: l }),
- uM(c.data) ? /* @__PURE__ */ (0, H.jsx)(Ffe, { toast: e }) : null
+ /* @__PURE__ */ (0, H.jsx)(zfe, {}),
+ /* @__PURE__ */ (0, H.jsx)(tpe, { toast: l }),
+ Bj(c.data) ? /* @__PURE__ */ (0, H.jsx)(ope, { toast: e }) : null
] });
}
//#endregion
//#region src/react/entity-page/entity-page.ts
-var Wfe = [
+var hpe = [
"loc",
"creator",
"tag",
@@ -37805,51 +37929,51 @@ var Wfe = [
"orient",
"sort",
"dir"
-], ZM = {
+], DM = {
media: "videos",
set: 0
-}, QM = (e, t) => [
+}, OM = (e, t) => [
"entity",
e,
t
-], Gfe = (e, t, n, r) => [
+], gpe = (e, t, n, r) => [
"entity-items",
e,
t,
n,
r
-], $M = (e, t, n, r) => [
+], kM = (e, t, n, r) => [
"entity-photos",
e,
t,
n,
r
-], eN = (e) => String(e || "").split(",").filter(Boolean), Kfe = (e, t) => eN(e).includes(t);
-function tN(e, t, n, r, i = 0) {
+], AM = (e) => String(e || "").split(",").filter(Boolean), _pe = (e, t) => AM(e).includes(t);
+function jM(e, t, n, r, i = 0) {
let a = new URLSearchParams();
a.set(e, t), a.set("limit", "48"), a.set("offset", String(i)), a.set("sort", n.sort || "new"), n.dir && a.set("dir", n.dir), n.sort === "seed" && a.set("seed", r.seed), i && a.set("count", "0");
- for (let t of Wfe) n[t] && t !== e && t !== "sort" && a.set(t, n[t]);
+ for (let t of hpe) n[t] && t !== e && t !== "sort" && a.set(t, n[t]);
return r.jav && a.set("jav", "1"), a;
}
-async function nN(e, t, n, r, i, a) {
- return await N(`/api/items?${tN(e, t, n, r, i)}`, a ? { signal: a } : {});
+async function MM(e, t, n, r, i, a) {
+ return await N(`/api/items?${jM(e, t, n, r, i)}`, a ? { signal: a } : {});
}
-var rN = (e) => {
+var NM = (e) => {
let t = {
jav: e.jav,
seed: e.seed
- }, n = tN(e.kind, e.name, e.filters, t).toString();
+ }, n = jM(e.kind, e.name, e.filters, t).toString();
return {
- queryKey: Gfe(e.kind, e.name, n, e.revision),
- queryFn: ({ signal: n }) => nN(e.kind, e.name, e.filters, t, 0, n),
+ queryKey: gpe(e.kind, e.name, n, e.revision),
+ queryFn: ({ signal: n }) => MM(e.kind, e.name, e.filters, t, 0, n),
staleTime: Infinity
};
-}, iN = (e, t) => ({
- queryKey: QM(e, t),
+}, PM = (e, t) => ({
+ queryKey: OM(e, t),
queryFn: ({ signal: n }) => N(`/api/entity?kind=${encodeURIComponent(e)}&name=${encodeURIComponent(t)}`, { signal: n }),
staleTime: Infinity
});
-function qfe(e, t, n, r, i, a) {
+function vpe(e, t, n, r, i, a) {
let o = `kind=${encodeURIComponent(e)}&name=${encodeURIComponent(t)}`;
if (i) {
let e = `&limit=120&offset=${i}${a ? `&seed=${encodeURIComponent(a)}` : ""}`;
@@ -37858,10 +37982,10 @@ function qfe(e, t, n, r, i, a) {
let s = r ? `&seed=${encodeURIComponent(r)}` : "";
return n ? `/api/photo-set?id=${n}&limit=120${s}` : r ? `/api/photos?${o}&limit=120${s}` : `/api/photos?${o}`;
}
-var aN = (e, t, n, r) => ({
- queryKey: $M(e, t, n, r),
+var FM = (e, t, n, r) => ({
+ queryKey: kM(e, t, n, r),
queryFn: async ({ pageParam: i }) => {
- let a = await N(qfe(e, t, n, r, i?.offset || 0, i?.seed || "")).catch((e) => {
+ let a = await N(vpe(e, t, n, r, i?.offset || 0, i?.seed || "")).catch((e) => {
if (i) throw e;
return { error: String(e) };
});
@@ -37874,8 +37998,8 @@ var aN = (e, t, n, r) => ({
seed: t[0]?.seed || ""
} : void 0,
staleTime: Infinity
-}), oN = (e) => e && !e.error ? (e.sets || []).filter((e) => e.kind === "code") : [];
-async function Jfe(e) {
+}), IM = (e) => e && !e.error ? (e.sets || []).filter((e) => e.kind === "code") : [];
+async function ype(e) {
let { kind: t, name: n } = e;
for (let e of [
"entity",
@@ -37887,51 +38011,51 @@ async function Jfe(e) {
n
] });
await Promise.all([
- z.fetchQuery(iN(t, n)).then((t) => !t || t.error || !t.id ? null : (z.removeQueries({ queryKey: tw(Number(t.id)) }), z.fetchQuery(nw(Number(t.id), e.helpers.feedRowHtml, !0)))),
- z.fetchQuery(rN(e)),
- z.fetchInfiniteQuery(aN(t, n, 0, "")),
- e.media.media === "photos" && e.media.set ? z.fetchInfiniteQuery(aN(t, n, e.media.set, "")) : null
+ z.fetchQuery(PM(t, n)).then((t) => !t || t.error || !t.id ? null : (z.removeQueries({ queryKey: $C(Number(t.id)) }), z.fetchQuery(ew(Number(t.id), e.helpers.feedRowHtml, !0)))),
+ z.fetchQuery(NM(e)),
+ z.fetchInfiniteQuery(FM(t, n, 0, "")),
+ e.media.media === "photos" && e.media.set ? z.fetchInfiniteQuery(FM(t, n, e.media.set, "")) : null
]);
}
//#endregion
//#region src/react/follow/online-vocab.ts
-var Yfe = "/api/follow/authors", Xfe = "/api/follow/tags", Zfe = (e) => [
+var bpe = "/api/follow/authors", xpe = "/api/follow/tags", Spe = (e) => [
"follow",
"authors",
e
-], Qfe = (e, t) => [
+], LM = (e, t) => [
"follow",
"tags",
e,
t
];
-function $fe(e, t, n) {
+function RM(e, t, n) {
let r = new URLSearchParams({
limit: String(t),
offset: String(n)
});
- return e && r.set("q", e), `${Yfe}?${r}`;
+ return e && r.set("q", e), `${bpe}?${r}`;
}
-function epe(e, t, n, r) {
+function zM(e, t, n, r) {
let i = new URLSearchParams({
types: "all",
limit: String(n),
offset: String(r)
});
- return t && t !== "all" && i.set("type", t), e && i.set("q", e), `${Xfe}?${i}`;
+ return t && t !== "all" && i.set("type", t), e && i.set("q", e), `${xpe}?${i}`;
}
-var tpe = (e, t, n, r) => K($fe(e, t, n), r), npe = (e, t, n, r, i) => K(epe(e, t, n, r), i), rpe = "/api/index", sN = {
+var BM = (e, t, n, r) => K(RM(e, t, n), r), VM = (e, t, n, r, i) => K(zM(e, t, n, r), i), HM = "/api/index", UM = {
performers: "艺人",
creators: "创作者",
studios: "厂牌",
agencies: "事务所",
tags: "标签"
-}, ipe = {
+}, WM = {
performers: "performer",
creators: "creator",
studios: "studio",
agencies: "agency"
-}, cN = [
+}, GM = [
["all", "全部"],
["meta", "影片属性"],
["relationship", "人物关系"],
@@ -37941,26 +38065,26 @@ var tpe = (e, t, n, r) => K($fe(e, t, n), r), npe = (e, t, n, r, i) => K(epe(e,
["story", "故事剧情"],
["position", "性交体位"],
["general", "其他内容"]
-], lN = [
+], KM = [
["all", "全部"],
["general", "通用"],
["artist", "创作者"],
["character", "角色"],
["copyright", "作品"],
["metadata", "元数据"]
-], uN = {
+], qM = {
people: 120,
tags: 180
-}, dN = (e) => e !== "tags", fN = (e) => e === "studios" || e === "agencies";
-function pN(e) {
- let t = e.kind === "tags" || e.kind === "performers" ? e.scope : "local", n = (t === "online" ? lN : cN).some(([t]) => t === e.category);
+}, JM = (e) => e !== "tags", YM = (e) => e === "studios" || e === "agencies";
+function XM(e) {
+ let t = e.kind === "tags" || e.kind === "performers" ? e.scope : "local", n = (t === "online" ? KM : GM).some(([t]) => t === e.category);
return {
...e,
scope: t,
category: e.kind === "tags" && n ? e.category : "all"
};
}
-function mN(e) {
+function ZM(e) {
let { kind: t, q: n, scope: r, category: i } = e;
return t === "tags" ? r === "online" ? {
what: "online-tags",
@@ -37979,50 +38103,50 @@ function mN(e) {
q: n
};
}
-var hN = (e, t, n = "all") => [
+var QM = (e, t, n = "all") => [
"index",
e,
t,
...e === "tags" ? [n] : []
];
-function gN(e, t, n, r, i) {
+function $M(e, t, n, r, i) {
let a = new URLSearchParams({
kind: e,
limit: String(r),
offset: String(i)
});
- return t && a.set("q", t), e === "tags" && n !== "all" && a.set("category", n), `${rpe}?${a}`;
+ return t && a.set("q", t), e === "tags" && n !== "all" && a.set("category", n), `${HM}?${a}`;
}
-function _N(e) {
- let t = e.what === "people" || e.what === "online-authors" ? uN.people : uN.tags, n = {
+function eN(e) {
+ let t = e.what === "people" || e.what === "online-authors" ? qM.people : qM.tags, n = {
initialPageParam: 0,
getNextPageParam: (e, t) => e.has_more ? t.reduce((e, t) => e + t.items.length, 0) : void 0
};
switch (e.what) {
case "people": return {
...n,
- queryKey: hN(e.kind, e.q),
- queryFn: ({ pageParam: n, signal: r }) => K(gN(e.kind, e.q, "all", t, n), r)
+ queryKey: QM(e.kind, e.q),
+ queryFn: ({ pageParam: n, signal: r }) => K($M(e.kind, e.q, "all", t, n), r)
};
case "tags": return {
...n,
- queryKey: hN("tags", e.q, e.category),
- queryFn: ({ pageParam: n, signal: r }) => K(gN("tags", e.q, e.category, t, n), r)
+ queryKey: QM("tags", e.q, e.category),
+ queryFn: ({ pageParam: n, signal: r }) => K($M("tags", e.q, e.category, t, n), r)
};
case "online-authors": return {
...n,
- queryKey: Zfe(e.q),
- queryFn: ({ pageParam: n, signal: r }) => tpe(e.q, t, n, r)
+ queryKey: Spe(e.q),
+ queryFn: ({ pageParam: n, signal: r }) => BM(e.q, t, n, r)
};
case "online-tags": return {
...n,
- queryKey: Qfe(e.q, e.category),
- queryFn: ({ pageParam: n, signal: r }) => npe(e.q, e.category, t, n, r)
+ queryKey: LM(e.q, e.category),
+ queryFn: ({ pageParam: n, signal: r }) => VM(e.q, e.category, t, n, r)
};
}
}
-async function ape(e, t) {
- let n = _N(mN(pN(e)));
+async function tN(e, t) {
+ let n = eN(ZM(XM(e)));
z.removeQueries({
queryKey: n.queryKey,
exact: !0
@@ -38036,13 +38160,13 @@ async function ape(e, t) {
getNextPageParam: n.getNextPageParam
});
}
-var ope = (e) => e ? e.pages.flatMap((e) => e.items) : [], spe = (e, t) => `${e}${t ? "+" : ""} 项`, vN = (e, t) => e ? `r34-${t || "unknown"}` : t || "general", cpe = (e, t) => e === "agencies" ? `${(t.members || 0).toLocaleString()} 人` : t.n.toLocaleString(), lpe = {
+var nN = (e) => e ? e.pages.flatMap((e) => e.items) : [], rN = (e, t) => `${e}${t ? "+" : ""} 项`, iN = (e, t) => e ? `r34-${t || "unknown"}` : t || "general", aN = (e, t) => e === "agencies" ? `${(t.members || 0).toLocaleString()} 人` : t.n.toLocaleString(), oN = {
numeric: !0,
sensitivity: "base"
};
-function upe(e, t) {
+function sN(e, t) {
let n = /* @__PURE__ */ new Map();
- for (let r of [...e].sort((e, t) => e.k.localeCompare(t.k, "zh-CN", lpe))) {
+ for (let r of [...e].sort((e, t) => e.k.localeCompare(t.k, "zh-CN", oN))) {
let e = t(r.k).normalize("NFKC").trim().charAt(0).toUpperCase(), i = /[A-Z]/.test(e) ? e : /[0-9]/.test(e) ? "#" : /[㐀-鿿]/.test(e) ? "中文" : "其他", a = n.get(i);
a ? a.push(r) : n.set(i, [r]);
}
@@ -38050,7 +38174,7 @@ function upe(e, t) {
}
//#endregion
//#region src/react/index/index-people.tsx
-function yN({ html: e, face: t, company: n, big: r }) {
+function cN({ html: e, face: t, company: n, big: r }) {
let i = (0, B.useRef)(null);
return (0, B.useLayoutEffect)(() => {
t ? i.current?.style.setProperty("--face", t) : i.current?.style.removeProperty("--face");
@@ -38062,18 +38186,18 @@ function yN({ html: e, face: t, company: n, big: r }) {
dangerouslySetInnerHTML: { __html: e }
});
}
-var dpe = "flex cursor-pointer flex-col gap-2 p-3 text-inherit";
-function bN({ name: e, readout: t, big: n, children: r, onPress: i, ...a }) {
+var lN = "flex cursor-pointer flex-col gap-2 p-3 text-inherit";
+function uN({ name: e, readout: t, big: n, children: r, onPress: i, ...a }) {
return /* @__PURE__ */ (0, H.jsxs)("button", {
type: "button",
...a,
"data-index-cell": "",
onClick: i,
- className: lT({
+ className: sT({
radius: "plain",
padding: "none",
interactive: !0,
- className: `${dpe} ${n ? "items-stretch text-left" : "items-center text-center"}`
+ className: `${lN} ${n ? "items-stretch text-left" : "items-center text-center"}`
}),
children: [
r,
@@ -38090,8 +38214,8 @@ function bN({ name: e, readout: t, big: n, children: r, onPress: i, ...a }) {
]
});
}
-function xN({ kind: e, items: t, layout: n, props: r }) {
- let i = ipe[e], a = fN(e), o = n === "big";
+function dN({ kind: e, items: t, layout: n, props: r }) {
+ let i = WM[e], a = YM(e), o = n === "big";
return /* @__PURE__ */ (0, H.jsx)("div", {
"data-index-grid": "",
"data-layout": n,
@@ -38099,14 +38223,14 @@ function xN({ kind: e, items: t, layout: n, props: r }) {
className: `${a ? "index-grid-company" : "index-grid-person"} gap-3`,
children: t.map((t) => {
let n = r.personAvatar(t, i, o);
- return /* @__PURE__ */ (0, H.jsx)(bN, {
+ return /* @__PURE__ */ (0, H.jsx)(uN, {
"data-k": t.k,
"data-kind": i,
name: t.k,
- readout: cpe(e, t),
+ readout: aN(e, t),
big: o,
onPress: () => r.openEntity(i, t.k),
- children: /* @__PURE__ */ (0, H.jsx)(yN, {
+ children: /* @__PURE__ */ (0, H.jsx)(cN, {
html: n.html,
face: n.face,
company: a,
@@ -38116,21 +38240,21 @@ function xN({ kind: e, items: t, layout: n, props: r }) {
})
});
}
-function fpe({ items: e, layout: t, props: n }) {
+function fN({ items: e, layout: t, props: n }) {
let r = t === "big";
return /* @__PURE__ */ (0, H.jsx)("div", {
"data-index-grid": "",
"data-layout": t,
"data-cells": "people",
className: "index-grid-person gap-3",
- children: e.map((e) => /* @__PURE__ */ (0, H.jsx)(bN, {
+ children: e.map((e) => /* @__PURE__ */ (0, H.jsx)(uN, {
"data-follow-author": e.key,
"data-kind": "performer",
name: e.k,
readout: `${e.n.toLocaleString()} 项更新`,
big: r,
onPress: () => n.openFollowAuthor(e.key),
- children: /* @__PURE__ */ (0, H.jsx)(yN, {
+ children: /* @__PURE__ */ (0, H.jsx)(cN, {
html: n.authorAvatar(e),
company: !1,
big: r
@@ -38140,14 +38264,14 @@ function fpe({ items: e, layout: t, props: n }) {
}
//#endregion
//#region src/board-controls.ts
-function ppe(e) {
+function pN(e) {
let t = Number(e.min) || 0, n = Number(e.max) || 100, r = Number(e.value), i = n > t ? Math.max(0, Math.min(100, (r - t) / (n - t) * 100)) : 0;
e.style.setProperty("--board-range-value", `${i}%`);
}
//#endregion
//#region src/react/photo-lightbox/photo-lightbox.ts
-var SN = "/vendor/swiper/14.2.0/", CN = null, mpe = () => CN ??= Promise.all([new Promise((e, t) => {
- let n = `${SN}swiper-bundle.min.css`, r = document.querySelector(`link[href="${n}"]`);
+var mN = "/vendor/swiper/14.2.0/", hN = null, gN = () => hN ??= Promise.all([new Promise((e, t) => {
+ let n = `${mN}swiper-bundle.min.css`, r = document.querySelector(`link[href="${n}"]`);
if (r?.sheet) {
e();
return;
@@ -38161,11 +38285,11 @@ var SN = "/vendor/swiper/14.2.0/", CN = null, mpe = () => CN ??= Promise.all([ne
return;
}
let r = document.createElement("script");
- r.src = `${SN}swiper-bundle.min.js`, r.onload = () => e(window.Swiper), r.onerror = () => t(/* @__PURE__ */ Error("swiper unavailable")), document.head.append(r);
+ r.src = `${mN}swiper-bundle.min.js`, r.onload = () => e(window.Swiper), r.onerror = () => t(/* @__PURE__ */ Error("swiper unavailable")), document.head.append(r);
})]).then(([, e]) => e).catch((e) => {
- throw CN = null, e;
+ throw hN = null, e;
});
-function hpe(e, t, n) {
+function _N(e, t, n) {
let r = "fit", i = () => t.slides?.[t.activeIndex]?.querySelector("img"), a = () => {
let e = i();
return !e?.naturalWidth || !e.naturalHeight ? 100 : Math.min(100, e.offsetWidth / e.naturalWidth * 100, e.offsetHeight / e.naturalHeight * 100);
@@ -38186,48 +38310,48 @@ function hpe(e, t, n) {
}
};
}
-var wN = (e) => {
+var vN = (e) => {
let t = Number(e) || 0;
return t ? (t < 1048576 ? `${Math.max(1, Math.round(t / 1024))} KB` : I(t)).replace(" ", "\xA0") : "大小未知";
-}, gpe = (e) => e.asset?.name || e.name || "未命名图片";
-function _pe(e, t) {
+}, yN = (e) => e.asset?.name || e.name || "未命名图片";
+function bN(e, t) {
let n = e.asset;
- if (n) return [M[n.location ?? ""] || n.location || "来源未知", wN(n.size)].join(" · ");
+ if (n) return [M[n.location ?? ""] || n.location || "来源未知", vN(n.size)].join(" · ");
let r = (e.total ?? 0) > 1 ? `第 ${e.position} / ${e.total} 张` : "", i = t?.[0] && t[1] ? `${t[0]} × ${t[1]}` : "";
return [
e.source || "在线图片",
r,
i,
- e.size ? wN(e.size) : ""
+ e.size ? vN(e.size) : ""
].filter(Boolean).join(" · ");
}
//#endregion
//#region src/react/photo-lightbox/photo-lightbox-dialog.tsx
-var TN = null, EN = null, vpe = 0;
-function ype() {
- return (!EN || !TN?.isConnected) && (EN?.unmount(), TN = document.createElement("div"), TN.className = "peach-react", TN.dataset.photoLightboxHost = "", document.body.append(TN), EN = (0, Ot.createRoot)(TN)), EN;
+var xN = null, SN = null, CN = 0;
+function wN() {
+ return (!SN || !xN?.isConnected) && (SN?.unmount(), xN = document.createElement("div"), xN.className = "peach-react", xN.dataset.photoLightboxHost = "", document.body.append(xN), SN = (0, Ot.createRoot)(xN)), SN;
}
-async function DN(e, t, n) {
+async function TN(e, t, n) {
if (!t.length || e < 0 || e >= t.length) return;
let r;
try {
- r = await mpe();
+ r = await gN();
} catch {
window.open(t[e].src, "_blank", "noopener");
return;
}
- let i = ype();
- (0, Dt.flushSync)(() => i.render(/* @__PURE__ */ (0, H.jsx)(bpe, {
+ let i = wN();
+ (0, Dt.flushSync)(() => i.render(/* @__PURE__ */ (0, H.jsx)(Cpe, {
slides: t,
index: e,
Swiper: r,
host: n ?? null
- }, ++vpe)));
+ }, ++CN)));
}
-function ON() {
- EN && (0, Dt.flushSync)(() => EN.render(null));
+function EN() {
+ SN && (0, Dt.flushSync)(() => SN.render(null));
}
-function bpe({ slides: e, index: t, Swiper: n, host: r }) {
+function Cpe({ slides: e, index: t, Swiper: n, host: r }) {
let i = e.length > 1, a = (0, B.useId)(), o = (0, B.useRef)(null), s = (0, B.useRef)(null), c = (0, B.useRef)(null), l = (0, B.useRef)(null), u = (0, B.useRef)(null), d = (0, B.useRef)(null), f = (0, B.useRef)(null), p = (0, B.useRef)(null), m = (0, B.useRef)(null), h = (0, B.useRef)(null), g = (0, B.useRef)(null), [_, v] = (0, B.useState)(t), [y, b] = (0, B.useState)(100), [S, C] = (0, B.useState)({}), [T, E] = (0, B.useState)(() => /* @__PURE__ */ new Set()), [O, k] = (0, B.useState)(!1), [A, j] = (0, B.useState)({
at: t,
text: ""
@@ -38270,7 +38394,7 @@ function bpe({ slides: e, index: t, Swiper: n, host: r }) {
v(this.activeIndex), i(this.activeIndex);
} }
});
- i(t, 0), h.current = hpe(e, a, b);
+ i(t, 0), h.current = _N(e, a, b);
let m = D(e, f.current, p.current), _ = (e = !1) => {
m.hide(), f.current?.setAttribute("aria-expanded", "false"), e && f.current && document.contains(f.current) && f.current.focus();
};
@@ -38287,13 +38411,13 @@ function bpe({ slides: e, index: t, Swiper: n, host: r }) {
});
y.observe(e);
let x = (e) => {
- e.key === "Escape" && (e.preventDefault(), e.stopImmediatePropagation(), g.current?.isOpen() ? g.current.dismiss(!0) : ON());
+ e.key === "Escape" && (e.preventDefault(), e.stopImmediatePropagation(), g.current?.isOpen() ? g.current.dismiss(!0) : EN());
};
return document.addEventListener("keydown", x, !0), () => {
document.removeEventListener("keydown", x, !0), _(), y.disconnect(), a.destroy(!0, !0), r.destroy(!0, !0), h.current = null, g.current = null, e.close(), document.body.classList.remove("photolight-open");
};
}, []), (0, B.useLayoutEffect)(() => {
- m.current && ppe(m.current);
+ m.current && pN(m.current);
}, [y]);
let M = e[_], N = M.asset ?? null, ee = async (e) => {
if (!N || !r || e.getAttribute("aria-busy") === "true") return;
@@ -38324,18 +38448,18 @@ function bpe({ slides: e, index: t, Swiper: n, host: r }) {
"data-photo-lightbox": "",
"data-has-strip": i ? "" : void 0,
onCancel: (e) => {
- e.preventDefault(), ON();
+ e.preventDefault(), EN();
},
onClick: (e) => {
let t = e.target;
- g.current?.dismissOutside(t) || (t === o.current || t.classList.contains("swiper-zoom-container")) && ON();
+ g.current?.dismissOutside(t) || (t === o.current || t.classList.contains("swiper-zoom-container")) && EN();
},
children: [
/* @__PURE__ */ (0, H.jsx)("button", {
type: "button",
"data-photo-close": "",
"aria-label": "关闭",
- onClick: ON,
+ onClick: EN,
dangerouslySetInnerHTML: { __html: L("x") }
}),
/* @__PURE__ */ (0, H.jsxs)("div", {
@@ -38468,10 +38592,10 @@ function bpe({ slides: e, index: t, Swiper: n, host: r }) {
id: `${a}-title`,
"data-middle-truncate": "",
tabIndex: -1,
- children: gpe(M)
+ children: yN(M)
}, _), /* @__PURE__ */ (0, H.jsx)("span", {
"data-photo-detail-meta": "",
- children: _pe(M, S[_])
+ children: bN(M, S[_])
})]
}),
/* @__PURE__ */ (0, H.jsx)("button", {
@@ -38510,33 +38634,33 @@ function bpe({ slides: e, index: t, Swiper: n, host: r }) {
}
//#endregion
//#region src/react/entity-body/entity-body-page.tsx
-function xpe(e) {
- return e.view === "people" && e.roster ? /* @__PURE__ */ (0, H.jsx)(Spe, {
+function wpe(e) {
+ return e.view === "people" && e.roster ? /* @__PURE__ */ (0, H.jsx)(Tpe, {
roster: e.roster,
props: e
- }) : e.view === "videos" ? /* @__PURE__ */ (0, H.jsx)(Cpe, { ...e }, e.revision) : e.view === "photos" && e.photos ? /* @__PURE__ */ (0, H.jsx)(Epe, {
+ }) : e.view === "videos" ? /* @__PURE__ */ (0, H.jsx)(Epe, { ...e }, e.revision) : e.view === "photos" && e.photos ? /* @__PURE__ */ (0, H.jsx)(kpe, {
photos: e.photos,
props: e
}, e.photos.revision) : null;
}
-function Spe({ roster: e, props: t }) {
+function Tpe({ roster: e, props: t }) {
let { helpers: n, actions: r } = t, i = (0, B.useMemo)(() => ({
personAvatar: n.personAvatar,
openEntity: r.openEntity
}), [n, r]);
- return /* @__PURE__ */ (0, H.jsx)(xN, {
+ return /* @__PURE__ */ (0, H.jsx)(dN, {
kind: e.kind,
items: e.people,
layout: e.layout,
props: i
});
}
-function Cpe(e) {
- let t = VA(!e.items, e.skeletonHtml);
+function Epe(e) {
+ let t = sA(!e.items, e.skeletonHtml);
return /* @__PURE__ */ (0, H.jsxs)("div", {
"data-entity-grid": "",
"data-grid-reveal": t.fading ? "" : void 0,
- children: [t.layer, e.items ? /* @__PURE__ */ (0, H.jsx)(QA, {
+ children: [t.layer, e.items ? /* @__PURE__ */ (0, H.jsx)(OA, {
mode: "entity",
entityKey: `${e.kind}:${e.name}`,
revision: e.revision,
@@ -38555,16 +38679,16 @@ function Cpe(e) {
}) : null]
});
}
-var wpe = (e) => Array.from({ length: e.n }, (t, n) => ({
+var Dpe = (e) => Array.from({ length: e.n }, (t, n) => ({
sample: !0,
code: e.code,
position: n + 1,
total: e.n,
name: `${e.code} 样张 ${n + 1}`,
source: e.site_label || "官方样张"
-})), kN = (e) => e.sample === !0, AN = (e) => `code=${encodeURIComponent(e.code)}&n=${e.position}`, jN = (e) => kN(e) ? `/sample-thumb?${AN(e)}` : `/photo-thumb?id=${e.id}`, Tpe = (e) => kN(e) ? {
- src: `/sample-image?${AN(e)}`,
- thumb: jN(e),
+})), DN = (e) => e.sample === !0, ON = (e) => `code=${encodeURIComponent(e.code)}&n=${e.position}`, kN = (e) => DN(e) ? `/sample-thumb?${ON(e)}` : `/photo-thumb?id=${e.id}`, Ope = (e) => DN(e) ? {
+ src: `/sample-image?${ON(e)}`,
+ thumb: kN(e),
name: e.name,
asset: null,
source: e.source,
@@ -38572,18 +38696,18 @@ var wpe = (e) => Array.from({ length: e.n }, (t, n) => ({
total: e.total
} : {
src: `/photo?id=${e.id}`,
- thumb: jN(e),
+ thumb: kN(e),
name: e.name || "",
asset: e
};
-function Epe({ photos: e, props: t }) {
- let { photoSize: n, photoLayout: r, actions: i, canLoadMore: a } = t, o = (0, B.useMemo)(() => [...e.codeSets.flatMap(wpe), ...e.items], [e]), [s, c] = (0, B.useState)(() => /* @__PURE__ */ new Set()), l = (0, B.useCallback)((e) => c((t) => {
+function kpe({ photos: e, props: t }) {
+ let { photoSize: n, photoLayout: r, actions: i, canLoadMore: a } = t, o = (0, B.useMemo)(() => [...e.codeSets.flatMap(Dpe), ...e.items], [e]), [s, c] = (0, B.useState)(() => /* @__PURE__ */ new Set()), l = (0, B.useCallback)((e) => c((t) => {
if (t.has(e)) return t;
let n = new Set(t);
return n.add(e), n;
}), []), u = (0, B.useCallback)((e) => {
- DN(e, o.map(Tpe), { revealSource: i.revealSource });
- }, [i, o]), d = (e, t) => /* @__PURE__ */ (0, H.jsx)(Dpe, {
+ TN(e, o.map(Ope), { revealSource: i.revealSource });
+ }, [i, o]), d = (e, t) => /* @__PURE__ */ (0, H.jsx)(Ape, {
item: e,
index: t,
lost: s.has(t),
@@ -38601,7 +38725,7 @@ function Epe({ photos: e, props: t }) {
};
}), h = p;
return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [
- m.map(({ set: e, from: t }) => /* @__PURE__ */ (0, H.jsxs)(B.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(MN, {
+ m.map(({ set: e, from: t }) => /* @__PURE__ */ (0, H.jsxs)(B.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(AN, {
label: e.code,
title: e.name,
meta: [
@@ -38613,7 +38737,7 @@ function Epe({ photos: e, props: t }) {
...f,
children: o.slice(t, t + e.n).map((e, n) => d(e, t + n))
})] }, e.code)),
- m.length && e.total ? /* @__PURE__ */ (0, H.jsx)(MN, {
+ m.length && e.total ? /* @__PURE__ */ (0, H.jsx)(AN, {
label: "本地图片",
meta: `${e.total.toLocaleString()} 张`
}) : null,
@@ -38622,14 +38746,14 @@ function Epe({ photos: e, props: t }) {
"data-local-wall": "",
children: e.items.map((e, t) => s.has(h + t) ? null : d(e, h + t))
}),
- e.hasMore ? /* @__PURE__ */ (0, H.jsx)($A, {
+ e.hasMore ? /* @__PURE__ */ (0, H.jsx)(kA, {
entity: !0,
load: i.loadMorePhotos,
enabled: () => a?.() !== !1
}, e.items.length) : null
] });
}
-function MN({ label: e, title: t, meta: n }) {
+function AN({ label: e, title: t, meta: n }) {
return /* @__PURE__ */ (0, H.jsxs)("div", {
"data-photo-group": "",
children: [
@@ -38646,7 +38770,7 @@ function MN({ label: e, title: t, meta: n }) {
]
});
}
-function Dpe({ item: e, index: t, lost: n, onLose: r, onOpen: i }) {
+function Ape({ item: e, index: t, lost: n, onLose: r, onOpen: i }) {
let a = e.name ?? "";
return /* @__PURE__ */ (0, H.jsx)("button", {
type: "button",
@@ -38655,7 +38779,7 @@ function Dpe({ item: e, index: t, lost: n, onLose: r, onOpen: i }) {
title: a,
onClick: () => i(t),
children: n ? null : /* @__PURE__ */ (0, H.jsx)("img", {
- src: jN(e),
+ src: kN(e),
alt: a,
loading: "lazy",
decoding: "async",
@@ -38664,7 +38788,7 @@ function Dpe({ item: e, index: t, lost: n, onLose: r, onOpen: i }) {
})
});
}
-function NN(e) {
+function jN(e) {
return {
x0: 0,
y0: 0,
@@ -38672,7 +38796,7 @@ function NN(e) {
y1: e.height
};
}
-function PN(e) {
+function MN(e) {
return {
x0: Math.round(e.x0),
y0: Math.round(e.y0),
@@ -38680,40 +38804,40 @@ function PN(e) {
y1: Math.round(e.y1)
};
}
-function FN(e) {
+function NN(e) {
return !!e && Number.isFinite(e.width) && Number.isFinite(e.height) && e.width > 0 && e.height > 0;
}
-function IN(e, t) {
- if (!FN(e)) return {
+function PN(e, t) {
+ if (!NN(e)) return {
x0: 0,
y0: 0,
x1: 0,
y1: 0
};
- if (t == null || !(t > 0)) return NN(e);
+ if (t == null || !(t > 0)) return jN(e);
let n = e.width, r = n / t;
r > e.height && (r = e.height, n = r * t);
let i = (e.width - n) / 2, a = (e.height - r) / 2;
- return PN({
+ return MN({
x0: i,
y0: a,
x1: i + n,
y1: a + r
});
}
-function Ope(e, t) {
- if (!FN(e) || !(t > 0)) return NN(e);
+function jpe(e, t) {
+ if (!NN(e) || !(t > 0)) return jN(e);
let n = Math.min(e.width, e.height * t);
- return PN({
+ return MN({
x0: e.width - n,
y0: 0,
x1: e.width,
y1: e.height
});
}
-function kpe(e, t, n) {
- if (!FN(t) || !(n > 0)) return NN(t);
- let r = LN(e, t), i = IN({
+function Mpe(e, t, n) {
+ if (!NN(t) || !(n > 0)) return jN(t);
+ let r = FN(e, t), i = PN({
width: r.x1 - r.x0,
height: r.y1 - r.y0
}, n);
@@ -38724,8 +38848,8 @@ function kpe(e, t, n) {
y1: r.y0 + i.y1
};
}
-function LN(e, t, n = null, r = "width") {
- if (!FN(t)) return {
+function FN(e, t, n = null, r = "width") {
+ if (!NN(t)) return {
x0: 0,
y0: 0,
x1: 0,
@@ -38734,43 +38858,43 @@ function LN(e, t, n = null, r = "width") {
let i = Math.min(16, t.width, t.height), a = Math.max(i, Math.min(e.x1 - e.x0, t.width)), o = Math.max(i, Math.min(e.y1 - e.y0, t.height));
n != null && n > 0 && (r === "width" ? (o = a / n, o > t.height && (o = t.height, a = o * n)) : (a = o * n, a > t.width && (a = t.width, o = a / n)), a > t.width && (a = t.width, o = a / n));
let s = Math.max(0, Math.min(e.x0, t.width - a)), c = Math.max(0, Math.min(e.y0, t.height - o));
- return PN({
+ return MN({
x0: s,
y0: c,
x1: s + a,
y1: c + o
});
}
-function RN(e, t, n, r) {
+function IN(e, t, n, r) {
let i = e.x1 - e.x0, a = e.y1 - e.y0, o = Math.max(0, Math.min(e.x0 + t, r.width - i)), s = Math.max(0, Math.min(e.y0 + n, r.height - a));
- return PN({
+ return MN({
x0: o,
y0: s,
x1: o + i,
y1: s + a
});
}
-function zN(e, t, n, r = null) {
- if (!FN(n) || !(t > 0)) return e;
+function LN(e, t, n, r = null) {
+ if (!NN(n) || !(t > 0)) return e;
let i = (e.x0 + e.x1) / 2, a = (e.y0 + e.y1) / 2, o = (e.x1 - e.x0) * t, s = (e.y1 - e.y0) * t;
- return LN({
+ return FN({
x0: i - o / 2,
y0: a - s / 2,
x1: i + o / 2,
y1: a + s / 2
}, n, r);
}
-function Ape(e, t, n, r, i = null) {
+function Npe(e, t, n, r, i = null) {
let a = {
x0: e.x0,
y0: e.y0,
x1: Math.max(e.x0 + 1, t),
y1: Math.max(e.y0 + 1, n)
};
- return LN(a, r, i, (a.x1 - a.x0) / Math.max(1, a.y1 - a.y0) > (i ?? 1) ? "height" : "width");
+ return FN(a, r, i, (a.x1 - a.x0) / Math.max(1, a.y1 - a.y0) > (i ?? 1) ? "height" : "width");
}
-function jpe(e, t) {
- return FN(t) ? {
+function Ppe(e, t) {
+ return NN(t) ? {
left: e.x0 / t.width * 100,
top: e.y0 / t.height * 100,
width: (e.x1 - e.x0) / t.width * 100,
@@ -38782,8 +38906,8 @@ function jpe(e, t) {
height: 0
};
}
-function Mpe(e, t) {
- if (!FN(t)) return {
+function Fpe(e, t) {
+ if (!NN(t)) return {
size: "cover",
position: "50% 50%"
};
@@ -38793,7 +38917,7 @@ function Mpe(e, t) {
position: `${i(e.x0, t.width, n)}% ${i(e.y0, t.height, r)}%`
};
}
-function Npe(e, t) {
+function Ipe(e, t) {
let n = Math.max(1, e.x1 - e.x0), r = Math.max(1, e.y1 - e.y0);
return {
left: `${-e.x0 / n * 100}%`,
@@ -38802,28 +38926,28 @@ function Npe(e, t) {
height: `${t.height / r * 100}%`
};
}
-function BN(e, t, n) {
+function RN(e, t, n) {
return t > 0 ? e * n / t : 0;
}
//#endregion
//#region src/react/components/modal-frame.tsx
-var Ppe = {
+var Lpe = {
"avatar-picker": "max-w-avatar-picker",
"cover-crop": "max-w-cover-crop",
form: "max-w-form-modal"
};
-function VN({ isOpen: e, onOpenChange: t, width: n, label: r, children: i }) {
+function zN({ isOpen: e, onOpenChange: t, width: n, label: r, children: i }) {
let { isFocusVisible: a } = La();
- return /* @__PURE__ */ (0, H.jsx)(sg, {
+ return /* @__PURE__ */ (0, H.jsx)(og, {
isOpen: e,
onOpenChange: t,
isDismissable: !0,
"data-modal-motion": "",
"data-motion-instant": a || void 0,
className: "fixed inset-0 z-dialog flex items-center justify-center bg-scrim p-4",
- children: /* @__PURE__ */ (0, H.jsx)(og, {
+ children: /* @__PURE__ */ (0, H.jsx)(oee, {
"data-modal-surface": "",
- className: `flex max-h-full w-full ${Ppe[n]} flex-col overflow-hidden rounded-2-5xl border border-separator-border bg-background-full shadow-dropdown`,
+ className: `flex max-h-full w-full ${Lpe[n]} flex-col overflow-hidden rounded-2-5xl border border-separator-border bg-background-full shadow-dropdown`,
children: /* @__PURE__ */ (0, H.jsx)(mh, {
"aria-label": r,
className: "flex min-h-0 flex-col outline-none",
@@ -38832,7 +38956,7 @@ function VN({ isOpen: e, onOpenChange: t, width: n, label: r, children: i }) {
})
});
}
-function HN({ children: e }) {
+function BN({ children: e }) {
return /* @__PURE__ */ (0, H.jsx)("span", {
"aria-hidden": !0,
className: "flex size-14 shrink-0 items-center justify-center rounded-2xl border border-separator-border bg-background-secondary-default text-foreground-icon-secondary",
@@ -38841,8 +38965,8 @@ function HN({ children: e }) {
}
//#endregion
//#region src/react/crop/crop-frame.tsx
-var Fpe = .02, UN = 1.08;
-function WN({ src: e, aspect: t, box: n, size: r, onBox: i, onSize: a, label: o }) {
+var Rpe = .02, VN = 1.08;
+function HN({ src: e, aspect: t, box: n, size: r, onBox: i, onSize: a, label: o }) {
let s = (0, B.useRef)(null), c = (0, B.useRef)(null), [l, u] = (0, B.useState)(!1);
(0, B.useEffect)(() => {
u(!1);
@@ -38853,8 +38977,8 @@ function WN({ src: e, aspect: t, box: n, size: r, onBox: i, onSize: a, label: o
dx: 0,
dy: 0
} : {
- dx: BN(e, n.clientWidth, r.width),
- dy: BN(t, n.clientHeight, r.height)
+ dx: RN(e, n.clientWidth, r.width),
+ dy: RN(t, n.clientHeight, r.height)
};
}, [r]);
function f(e) {
@@ -38872,29 +38996,29 @@ function WN({ src: e, aspect: t, box: n, size: r, onBox: i, onSize: a, label: o
if (!n || !a || !r) return;
let o = d(e.clientX - n.x, e.clientY - n.y);
if (n.mode === "move") {
- i(RN(n.box, o.dx, o.dy, r));
+ i(IN(n.box, o.dx, o.dy, r));
return;
}
- i(Ape(n.box, n.box.x0 + (n.box.x1 - n.box.x0) + o.dx, n.box.y0 + (n.box.y1 - n.box.y0) + o.dy, r, t));
+ i(Npe(n.box, n.box.x0 + (n.box.x1 - n.box.x0) + o.dx, n.box.y0 + (n.box.y1 - n.box.y0) + o.dy, r, t));
}
function m(e) {
c.current && (c.current = null, e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId));
}
function h(e) {
if (!n || !r) return;
- let a = Math.max(1, (n.x1 - n.x0) * Fpe), o = {
+ let a = Math.max(1, (n.x1 - n.x0) * Rpe), o = {
ArrowLeft: [-a, 0],
ArrowRight: [a, 0],
ArrowUp: [0, -a],
ArrowDown: [0, a]
};
if (o[e.key]) {
- e.preventDefault(), i(RN(n, o[e.key][0], o[e.key][1], r));
+ e.preventDefault(), i(IN(n, o[e.key][0], o[e.key][1], r));
return;
}
- (e.key === "+" || e.key === "=" || e.key === "-") && (e.preventDefault(), i(zN(n, e.key === "-" ? 1 / UN : UN, r, t)));
+ (e.key === "+" || e.key === "=" || e.key === "-") && (e.preventDefault(), i(LN(n, e.key === "-" ? 1 / VN : VN, r, t)));
}
- let g = n && r ? jpe(LN(n, r, t), r) : null, _ = g ? {
+ let g = n && r ? Ppe(FN(n, r, t), r) : null, _ = g ? {
"--crop-l": `${g.left}%`,
"--crop-t": `${g.top}%`,
"--crop-w": `${g.width}%`,
@@ -38913,7 +39037,7 @@ function WN({ src: e, aspect: t, box: n, size: r, onBox: i, onSize: a, label: o
draggable: !1,
onLoad: (e) => {
let t = e.currentTarget;
- FN({
+ NN({
width: t.naturalWidth,
height: t.naturalHeight
}) && a({
@@ -38952,7 +39076,7 @@ function WN({ src: e, aspect: t, box: n, size: r, onBox: i, onSize: a, label: o
onPointerCancel: m,
onKeyDown: h,
onWheel: (e) => {
- !n || !r || i(zN(n, e.deltaY > 0 ? UN : 1 / UN, r, t));
+ !n || !r || i(LN(n, e.deltaY > 0 ? VN : 1 / VN, r, t));
},
className: "absolute left-(--crop-l) top-(--crop-t) h-(--crop-h) w-(--crop-w) cursor-move touch-none outline-none ring-2 ring-border-focus-ring ring-inset focus-visible:ring-4",
children: /* @__PURE__ */ (0, H.jsx)("span", {
@@ -38974,61 +39098,61 @@ function WN({ src: e, aspect: t, box: n, size: r, onBox: i, onSize: a, label: o
}
//#endregion
//#region src/react/avatar-picker/avatar-picker.ts
-var Ipe = "/api/avatar-choices", GN = "/api/avatar-pick", Lpe = "/api/avatar-code-cover", Rpe = "/avatar-choice", KN = (e, t) => [
+var zpe = "/api/avatar-choices", UN = "/api/avatar-pick", Bpe = "/api/avatar-code-cover", Vpe = "/avatar-choice", WN = (e, t) => [
"avatar-choices",
e,
t
-], qN = (e, t) => `?kind=${encodeURIComponent(e)}&id=${t}`, JN = (e, t, n, r = "") => `${Rpe}${qN(e, t)}&ref=${encodeURIComponent(n)}` + (r ? `&v=${encodeURIComponent(r)}` : ""), YN = (e, t) => t.startsWith("cover:") || t.endsWith(":cover") ? e.version : "", zpe = (e, t, n) => K(Ipe + qN(e, t), n), Bpe = (e) => q(Lpe, { code: e });
-function XN(e, t, n) {
+], GN = (e, t) => `?kind=${encodeURIComponent(e)}&id=${t}`, KN = (e, t, n, r = "") => `${Vpe}${GN(e, t)}&ref=${encodeURIComponent(n)}` + (r ? `&v=${encodeURIComponent(r)}` : ""), qN = (e, t) => t.startsWith("cover:") || t.endsWith(":cover") ? e.version : "", Hpe = (e, t, n) => K(zpe + GN(e, t), n), Upe = (e) => q(Bpe, { code: e });
+function JN(e, t, n) {
let r = t.width === e.width && t.height === e.height;
- return e.focus && r ? kpe(e.focus, t, n) : IN(t, n);
+ return e.focus && r ? Mpe(e.focus, t, n) : PN(t, n);
}
-var Vpe = (e) => e.crop && FN({
+var Wpe = (e) => e.crop && NN({
width: e.width,
height: e.height
});
-async function Hpe(e, t, n) {
+async function Gpe(e, t, n) {
if (!("file" in n)) {
- await q(GN, {
+ await q(UN, {
kind: e,
id: t,
...n
});
return;
}
- let r = n.file, i = await fetch(`${GN}${qN(e, t)}&name=${encodeURIComponent(r.name)}`, {
+ let r = n.file, i = await fetch(`${UN}${GN(e, t)}&name=${encodeURIComponent(r.name)}`, {
method: "POST",
credentials: "same-origin",
body: r
});
if (i.ok) return;
let a = await i.json().catch(() => null);
- throw new BC(a?.error || `请求失败(${i.status})`, i.status, a);
+ throw new VC(a?.error || `请求失败(${i.status})`, i.status, a);
}
-function Upe(e, t) {
+function Kpe(e, t) {
if (!t) return e;
let n = t.matched_names.filter((t) => t !== e);
return n.length ? `${e}:图库里按「${n.join("」「")}」找到的。` : t.choices.length ? `${e}:换上的那张留在本机,随时能换回来。` : `${e}:图库里没有这个名字,用下面两种方式换。`;
}
-var Wpe = (e) => e < 48 ? `${Math.max(1, Math.round(e))} 小时` : `${Math.floor(e / 24)} 天`;
-function Gpe(e) {
- return !e || !e.index_stale || e.choices.some((e) => e.source === "gfriends") ? "" : e.index_age_hours === null ? "图库索引还没取过,只能从用过的图里选。" : `图库索引 ${Wpe(e.index_age_hours)}没更新,新收的人像这里还查不到。`;
+var qpe = (e) => e < 48 ? `${Math.max(1, Math.round(e))} 小时` : `${Math.floor(e / 24)} 天`;
+function Jpe(e) {
+ return !e || !e.index_stale || e.choices.some((e) => e.source === "gfriends") ? "" : e.index_age_hours === null ? "图库索引还没取过,只能从用过的图里选。" : `图库索引 ${qpe(e.index_age_hours)}没更新,新收的人像这里还查不到。`;
}
-var ZN = (e) => e.cast > 1, Kpe = (e) => ZN(e) ? `${e.label}:${e.cast} 人合演,先找到她自己的脸,再拖动方框选一块。` : `${e.label}:拖动方框选一块,滚轮或角上那枚方块改大小。`, qpe = {
+var YN = (e) => e.cast > 1, Ype = (e) => YN(e) ? `${e.label}:${e.cast} 人合演,先找到她自己的脸,再拖动方框选一块。` : `${e.label}:拖动方框选一块,滚轮或角上那枚方块改大小。`, Xpe = {
gfriends: "图库",
history: "用过的",
asset: "作品画面",
code: "番号封面"
};
-function Jpe(e) {
+function Zpe(e) {
if (e.startsWith("cover:")) return "封面";
let t = e.split(":")[2] || "";
if (t === "cover") return "封面";
let n = Number(t.replace("cell", ""));
return Number.isFinite(n) ? `第 ${n + 1} 格` : t;
}
-var Ype = (e) => `${qpe[e.source] || e.source} · ${e.label}` + (e.width ? ` · ${e.width}×${e.height}` : "") + (ZN(e) ? ` · ${e.cast} 人合演` : "") + (e.found_by ? ` · 按「${e.found_by}」找到` : ""), Xpe = 8, Zpe = 3 / 4;
-function Qpe({ kind: e, entityId: t, name: n, onPicked: r }) {
+var Qpe = (e) => `${Xpe[e.source] || e.source} · ${e.label}` + (e.width ? ` · ${e.width}×${e.height}` : "") + (YN(e) ? ` · ${e.cast} 人合演` : "") + (e.found_by ? ` · 按「${e.found_by}」找到` : ""), $pe = 8, eme = 3 / 4;
+function tme({ kind: e, entityId: t, name: n, onPicked: r }) {
let [i, a] = (0, B.useState)(!1);
return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)("span", {
className: "absolute right-1 bottom-1 z-10",
@@ -39038,17 +39162,17 @@ function Qpe({ kind: e, entityId: t, name: n, onPicked: r }) {
"aria-label": `更换${n}的头像`,
onClick: () => a(!0),
className: "flex size-7 cursor-pointer items-center justify-center rounded-full border border-border-button-default bg-background-primary-default text-foreground-icon-primary shadow-xs outline-none ring-2 ring-background-full transition-colors hover:border-border-button-hover hover:bg-background-primary-hover/60 dark:hover:bg-background-primary-hover focus-visible:ring-border-focus-ring active:bg-background-primary-active",
- children: /* @__PURE__ */ (0, H.jsx)(Hae, {
+ children: /* @__PURE__ */ (0, H.jsx)(Wae, {
"aria-hidden": !0,
className: "size-4"
})
})
- }), /* @__PURE__ */ (0, H.jsx)(VN, {
+ }), /* @__PURE__ */ (0, H.jsx)(zN, {
isOpen: i,
onOpenChange: a,
width: "avatar-picker",
label: "更换头像",
- children: /* @__PURE__ */ (0, H.jsx)($pe, {
+ children: /* @__PURE__ */ (0, H.jsx)(nme, {
kind: e,
entityId: t,
name: n,
@@ -39057,33 +39181,33 @@ function Qpe({ kind: e, entityId: t, name: n, onPicked: r }) {
})
})] });
}
-function $pe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
- let a = (0, B.useRef)(null), o = hT(), [s, c] = (0, B.useState)(""), [l, u] = (0, B.useState)(""), [d, f] = (0, B.useState)(""), [p, m] = (0, B.useState)(null), h = KN(e, t), g = (0, B.useRef)(!1), _ = xw({
+function nme({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
+ let a = (0, B.useRef)(null), o = pT(), [s, c] = (0, B.useState)(""), [l, u] = (0, B.useState)(""), [d, f] = (0, B.useState)(""), [p, m] = (0, B.useState)(null), h = WN(e, t), g = (0, B.useRef)(!1), _ = yw({
queryKey: h,
- queryFn: ({ signal: n }) => zpe(e, t, n),
+ queryFn: ({ signal: n }) => Hpe(e, t, n),
retryOnMount: !0
});
(0, B.useEffect)(() => () => {
- g.current && z.removeQueries({ queryKey: KN(e, t) });
+ g.current && z.removeQueries({ queryKey: WN(e, t) });
}, [e, t]);
- let v = ww({
- mutationFn: (n) => Hpe(e, t, n),
+ let v = Sw({
+ mutationFn: (n) => Gpe(e, t, n),
onSuccess: () => {
g.current = !0, i(), r();
}
- }), y = ww({
- mutationFn: (e) => Bpe(e),
+ }), y = Sw({
+ mutationFn: (e) => Upe(e),
onSuccess: (e) => m(e)
});
function b(e) {
let t = e.currentTarget, n = t.files?.[0];
t.value = "", f(""), n && v.mutate({ file: n });
}
- let x = _.data, S = x?.choices ?? [], C = d || (v.error ? G(v.error) : "") || (!p && y.error ? G(y.error) : "") || (_.error ? G(_.error) : ""), w = v.isPending || y.isPending, T = p ? "" : Gpe(x);
+ let x = _.data, S = x?.choices ?? [], C = d || (v.error ? G(v.error) : "") || (!p && y.error ? G(y.error) : "") || (_.error ? G(_.error) : ""), w = v.isPending || y.isPending, T = p ? "" : Jpe(x);
return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex shrink-0 items-start gap-4 p-5",
children: [
- /* @__PURE__ */ (0, H.jsx)(HN, { children: /* @__PURE__ */ (0, H.jsx)(eT, { className: "size-6" }) }),
+ /* @__PURE__ */ (0, H.jsx)(BN, { children: /* @__PURE__ */ (0, H.jsx)(Qw, { className: "size-6" }) }),
/* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex min-w-0 flex-1 flex-col gap-2",
children: [
@@ -39093,14 +39217,14 @@ function $pe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
slot: "title",
className: "text-title-3-semibold text-text-primary",
children: p ? "框出头像那一块" : "更换头像"
- }), !p && S.length ? /* @__PURE__ */ (0, H.jsxs)(uA, {
+ }), !p && S.length ? /* @__PURE__ */ (0, H.jsxs)(Mk, {
color: "soft",
children: [S.length, " 张可选"]
}) : null]
}),
/* @__PURE__ */ (0, H.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
- children: p ? Kpe(p) : Upe(n, x)
+ children: p ? Ype(p) : Kpe(n, x)
}),
T ? /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "neutral",
@@ -39112,14 +39236,14 @@ function $pe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
}) : null
]
}),
- /* @__PURE__ */ (0, H.jsx)(_T, {
- icon: Vw,
+ /* @__PURE__ */ (0, H.jsx)(hT, {
+ icon: zw,
size: "small",
"aria-label": "关闭",
onClick: i
})
]
- }), p ? /* @__PURE__ */ (0, H.jsx)(tme, {
+ }), p ? /* @__PURE__ */ (0, H.jsx)(ime, {
kind: e,
entityId: t,
choice: p,
@@ -39143,7 +39267,7 @@ function $pe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
"aria-busy": _.isPending || void 0,
"data-skeleton": _.isPending ? "avatar-choices" : void 0,
className: "inline-grid grid-cols-3 content-start gap-2 sm:grid-cols-4",
- children: _.isPending ? Array.from({ length: Xpe }, (e, t) => /* @__PURE__ */ (0, H.jsxs)("span", {
+ children: _.isPending ? Array.from({ length: $pe }, (e, t) => /* @__PURE__ */ (0, H.jsxs)("span", {
"aria-hidden": !0,
"data-avatar-skeleton": !0,
className: "flex flex-col gap-1 overflow-hidden rounded-2lg border border-separator-border bg-background-secondary-default pb-1 text-caption-1-regular",
@@ -39156,15 +39280,15 @@ function $pe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
role: "option",
"data-avatar-choice": !0,
"aria-selected": n.current,
- title: Ype(n),
+ title: Qpe(n),
...X(w),
onClick: () => {
w || (n.crop ? m(n) : v.mutate({ ref: n.ref }));
},
className: "relative flex cursor-pointer flex-col gap-1 overflow-hidden rounded-2lg border border-separator-border bg-background-secondary-default pb-1 text-center text-caption-1-regular text-text-secondary outline-none hover:border-border-button-hover hover:text-text-primary focus-visible:ring-2 focus-visible:ring-border-focus-ring aria-selected:border-border-focus-ring aria-selected:bg-background-tertiary-default aria-selected:text-text-primary aria-disabled:cursor-progress aria-disabled:opacity-60",
children: [
- /* @__PURE__ */ (0, H.jsx)(eme, {
- src: JN(e, t, n.ref, YN(n, n.ref)),
+ /* @__PURE__ */ (0, H.jsx)(rme, {
+ src: KN(e, t, n.ref, qN(n, n.ref)),
choice: n
}),
/* @__PURE__ */ (0, H.jsx)("span", {
@@ -39173,15 +39297,15 @@ function $pe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
}),
n.current ? /* @__PURE__ */ (0, H.jsx)("span", {
className: "absolute top-1 left-1",
- children: /* @__PURE__ */ (0, H.jsx)(uA, {
+ children: /* @__PURE__ */ (0, H.jsx)(Mk, {
variant: "caption",
color: "gray",
children: "在用"
})
}) : null,
- ZN(n) ? /* @__PURE__ */ (0, H.jsx)("span", {
+ YN(n) ? /* @__PURE__ */ (0, H.jsx)("span", {
className: "absolute top-1 right-1",
- children: /* @__PURE__ */ (0, H.jsxs)(uA, {
+ children: /* @__PURE__ */ (0, H.jsxs)(Mk, {
variant: "caption",
color: "gray",
children: [n.cast, " 人"]
@@ -39200,7 +39324,7 @@ function $pe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
},
children: [/* @__PURE__ */ (0, H.jsx)("div", {
className: "min-w-0 flex-1",
- children: /* @__PURE__ */ (0, H.jsx)(bA, {
+ children: /* @__PURE__ */ (0, H.jsx)(zk, {
"aria-label": "番号",
placeholder: "番号,如 ABW-232",
value: l,
@@ -39235,7 +39359,7 @@ function $pe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
className: "flex min-w-0 flex-1 items-center gap-2",
children: [/* @__PURE__ */ (0, H.jsx)("div", {
className: "min-w-0 flex-1",
- children: /* @__PURE__ */ (0, H.jsx)(bA, {
+ children: /* @__PURE__ */ (0, H.jsx)(zk, {
type: "url",
"aria-label": "图片地址",
placeholder: "https://…",
@@ -39255,7 +39379,7 @@ function $pe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
})]
})] })] });
}
-function eme({ src: e, choice: t }) {
+function rme({ src: e, choice: t }) {
let n = (0, B.useRef)(null), [r, i] = (0, B.useState)(!1);
(0, B.useEffect)(() => {
n.current?.complete && n.current.naturalWidth && i(!0);
@@ -39263,7 +39387,7 @@ function eme({ src: e, choice: t }) {
let a = {
width: t.width,
height: t.height
- }, o = Vpe(t) ? Npe(XN(t, a, Zpe), a) : null, s = r ? !0 : void 0;
+ }, o = Wpe(t) ? Ipe(JN(t, a, eme), a) : null, s = r ? !0 : void 0;
return /* @__PURE__ */ (0, H.jsxs)("span", {
className: "relative block w-full aspect-avatar-choice overflow-hidden",
children: [/* @__PURE__ */ (0, H.jsx)("img", {
@@ -39288,23 +39412,23 @@ function eme({ src: e, choice: t }) {
})]
});
}
-function tme({ kind: e, entityId: t, choice: n, busy: r, back: i, confirm: a }) {
- let o = n.bases.length ? n.bases : [n.ref], [s, c] = (0, B.useState)(o[0]), [l, u] = (0, B.useState)(null), [d, f] = (0, B.useState)(null), p = YN(n, s), m = JN(e, t, s, p), h = hT();
+function ime({ kind: e, entityId: t, choice: n, busy: r, back: i, confirm: a }) {
+ let o = n.bases.length ? n.bases : [n.ref], [s, c] = (0, B.useState)(o[0]), [l, u] = (0, B.useState)(null), [d, f] = (0, B.useState)(null), p = qN(n, s), m = KN(e, t, s, p), h = pT();
function g(e) {
c(e), u(null), f(null);
}
- let _ = d && l ? Mpe(d, l) : null;
+ let _ = d && l ? Fpe(d, l) : null;
return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsxs)("div", {
ref: h,
className: "flex min-h-0 flex-1 flex-col items-center gap-4 overflow-y-auto border-t border-separator-border px-5 py-4",
- children: [/* @__PURE__ */ (0, H.jsx)(WN, {
+ children: [/* @__PURE__ */ (0, H.jsx)(HN, {
src: m,
aspect: 1,
box: d,
size: l,
label: `${n.label} 的头像取景框`,
onSize: (e) => {
- u(e), FN(e) && f(s === n.ref ? XN(n, e, 1) : IN(e, 1));
+ u(e), NN(e) && f(s === n.ref ? JN(n, e, 1) : PN(e, 1));
},
onBox: f
}), o.length > 1 ? /* @__PURE__ */ (0, H.jsx)("div", {
@@ -39318,7 +39442,7 @@ function tme({ kind: e, entityId: t, choice: n, busy: r, back: i, confirm: a })
"data-crop-base": !0,
onClick: () => g(e),
className: "cursor-pointer rounded-lg px-2 py-1 text-caption-1-regular text-text-secondary outline-none hover:text-text-primary focus-visible:ring-2 focus-visible:ring-border-focus-ring aria-checked:bg-background-tertiary-default aria-checked:text-text-primary",
- children: Jpe(e)
+ children: Zpe(e)
}, e))
}) : null]
}), /* @__PURE__ */ (0, H.jsxs)("div", {
@@ -39352,12 +39476,12 @@ function tme({ kind: e, entityId: t, choice: n, busy: r, back: i, confirm: a })
}
//#endregion
//#region src/react/entity-hero/glyph.tsx
-var nme = {
+var ame = {
"text-aa": 1.435,
"mark-javdb": 326 / 111
};
-function QN({ name: e }) {
- let t = nme[e];
+function XN({ name: e }) {
+ let t = ame[e];
return /* @__PURE__ */ (0, H.jsx)("svg", {
viewBox: t ? `0 0 ${(24 * t).toFixed(2)} 24` : "0 0 24 24",
"aria-hidden": "true",
@@ -39367,19 +39491,19 @@ function QN({ name: e }) {
}
//#endregion
//#region src/react/entity-hero/hero-pop.tsx
-function $N(e, t) {
+function ZN(e, t) {
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect();
t.style.left = `${Math.max(8, Math.min(innerWidth - r.width - 8, n.left))}px`;
let i = n.bottom + 8;
t.style.top = `${i + r.height <= innerHeight - 8 ? i : Math.max(8, n.top - r.height - 8)}px`;
}
-var eP = (e) => !!e?.isConnected && e.matches(":popover-open");
-function tP(e, t, n, r) {
+var QN = (e) => !!e?.isConnected && e.matches(":popover-open");
+function $N(e, t, n, r) {
let i = (0, B.useRef)(r);
i.current = r, (0, B.useEffect)(() => {
if (!e) return;
let r = () => {
- t.current && eP(n.current) ? $N(t.current, n.current) : i.current();
+ t.current && QN(n.current) ? ZN(t.current, n.current) : i.current();
};
return addEventListener("scroll", r, {
capture: !0,
@@ -39393,17 +39517,17 @@ function tP(e, t, n, r) {
n
]);
}
-function nP({ id: e, rest: t, label: n, heading: r, hook: i, children: a }) {
+function eP({ id: e, rest: t, label: n, heading: r, hook: i, children: a }) {
let o = (0, B.useRef)(null), s = (0, B.useRef)(null), [c, l] = (0, B.useState)(!1), u = (0, B.useRef)(!1), d = (0, B.useRef)(0), f = () => {
- clearTimeout(d.current), u.current = !1, eP(s.current) && s.current.hidePopover(), l(!1);
+ clearTimeout(d.current), u.current = !1, QN(s.current) && s.current.hidePopover(), l(!1);
}, p = () => {
- clearTimeout(d.current), !(!s.current || !o.current || eP(s.current)) && (s.current.showPopover(), $N(o.current, s.current), l(!0));
+ clearTimeout(d.current), !(!s.current || !o.current || QN(s.current)) && (s.current.showPopover(), ZN(o.current, s.current), l(!0));
}, m = () => {
clearTimeout(d.current), d.current = window.setTimeout(() => {
!u.current && !o.current?.matches(":hover,:focus-visible") && !s.current?.matches(":hover") && f();
}, 150);
};
- return tP(c, o, s, f), (0, B.useEffect)(() => {
+ return $N(c, o, s, f), (0, B.useEffect)(() => {
if (!c) return;
let e = (e) => {
let t = e.target;
@@ -39429,7 +39553,7 @@ function nP({ id: e, rest: t, label: n, heading: r, hook: i, children: a }) {
u.current ? f() : (p(), u.current = !0);
},
onKeyDown: (e) => {
- e.key === "Escape" && eP(s.current) && (e.preventDefault(), f());
+ e.key === "Escape" && QN(s.current) && (e.preventDefault(), f());
},
children: ["+", t]
}), /* @__PURE__ */ (0, H.jsxs)("div", {
@@ -39447,16 +39571,16 @@ function nP({ id: e, rest: t, label: n, heading: r, hook: i, children: a }) {
}), a]
})] });
}
-function rme({ following: e, busy: t, onToggle: n, tip: r }) {
+function ome({ following: e, busy: t, onToggle: n, tip: r }) {
let i = (0, B.useRef)(null), a = (0, B.useRef)(null), o = (0, B.useRef)(null), [s, c] = (0, B.useState)(!1), l = (0, B.useRef)(!1), u = () => {
- eP(o.current) && o.current.hidePopover(), c(!1);
+ QN(o.current) && o.current.hidePopover(), c(!1);
}, d = () => {
- l.current || !o.current || !i.current || eP(o.current) || (o.current.showPopover(), $N(i.current, o.current), c(!0));
+ l.current || !o.current || !i.current || QN(o.current) || (o.current.showPopover(), ZN(i.current, o.current), c(!0));
}, f = () => {
l.current = !1, u();
};
- return tP(s, i, o, () => c(!1)), (0, B.useEffect)(() => {
- i.current && eP(o.current) && $N(i.current, o.current);
+ return $N(s, i, o, () => c(!1)), (0, B.useEffect)(() => {
+ i.current && QN(o.current) && ZN(i.current, o.current);
}, [r]), /* @__PURE__ */ (0, H.jsxs)("label", {
ref: i,
"data-entry-feed": "",
@@ -39465,7 +39589,7 @@ function rme({ following: e, busy: t, onToggle: n, tip: r }) {
a.current?.matches(":focus-visible") || f();
},
children: [
- /* @__PURE__ */ (0, H.jsx)(QN, { name: "rss" }),
+ /* @__PURE__ */ (0, H.jsx)(XN, { name: "rss" }),
/* @__PURE__ */ (0, H.jsx)("input", {
ref: a,
type: "checkbox",
@@ -39500,7 +39624,7 @@ function rme({ following: e, busy: t, onToggle: n, tip: r }) {
}
//#endregion
//#region src/react/entity-hero/name-picker.tsx
-function ime({ current: e, choices: t, onChoose: n, onAddAlias: r }) {
+function sme({ current: e, choices: t, onChoose: n, onAddAlias: r }) {
let [i, a] = (0, B.useState)(!1), o = (0, B.useRef)(null);
return (0, B.useEffect)(() => {
o.current?.setAttribute("title", "名字与别名");
@@ -39511,12 +39635,12 @@ function ime({ current: e, choices: t, onChoose: n, onAddAlias: r }) {
ref: o,
"data-namepick-toggle": "",
"aria-label": "名字与别名",
- children: /* @__PURE__ */ (0, H.jsx)(QN, { name: "chevron-down" })
+ children: /* @__PURE__ */ (0, H.jsx)(XN, { name: "chevron-down" })
}), /* @__PURE__ */ (0, H.jsx)(nm, {
placement: "bottom start",
offset: 8,
containerPadding: 8,
- className: oT,
+ className: iT,
"data-namepick-menu": "",
children: /* @__PURE__ */ (0, H.jsxs)(ih, {
"aria-label": "名字与别名",
@@ -39534,7 +39658,7 @@ function ime({ current: e, choices: t, onChoose: n, onAddAlias: r }) {
id: e,
textValue: e,
"data-namepick-name": e,
- children: [/* @__PURE__ */ (0, H.jsx)(QN, { name: "check" }), /* @__PURE__ */ (0, H.jsx)("span", { children: e })]
+ children: [/* @__PURE__ */ (0, H.jsx)(XN, { name: "check" }), /* @__PURE__ */ (0, H.jsx)("span", { children: e })]
}, e))
}),
/* @__PURE__ */ (0, H.jsx)(Eu, { "data-namepick-rule": "" }),
@@ -39543,18 +39667,18 @@ function ime({ current: e, choices: t, onChoose: n, onAddAlias: r }) {
textValue: "添加别名",
"data-namepick-alias": "",
onAction: r,
- children: [/* @__PURE__ */ (0, H.jsx)(QN, { name: "plus" }), /* @__PURE__ */ (0, H.jsx)("span", { children: "添加别名…" })]
+ children: [/* @__PURE__ */ (0, H.jsx)(XN, { name: "plus" }), /* @__PURE__ */ (0, H.jsx)("span", { children: "添加别名…" })]
}) })
]
})
})]
});
}
-var ame = (e) => e === "studio" || e === "agency", ome = (e) => e === "performer" || e === "creator", sme = (e) => e ? "已订阅新作:库里还没有的新片排在资料卡下面。再点一下取消订阅。" : "订阅新作:定时去 JavDB 查这位有没有出新片,库里还没有的排在资料卡下面。";
-function cme(e) {
+var cme = (e) => e === "studio" || e === "agency", lme = (e) => e === "performer" || e === "creator", ume = (e) => e ? "已订阅新作:库里还没有的新片排在资料卡下面。再点一下取消订阅。" : "订阅新作:定时去 JavDB 查这位有没有出新片,库里还没有的排在资料卡下面。";
+function dme(e) {
return [e.canonical_name, ...e.aliases || []].filter((e, t, n) => e && n.indexOf(e) === t);
}
-function rP(e) {
+function tP(e) {
if (e.agency) return {
name: e.agency.canonical_name,
linked: !0
@@ -39565,13 +39689,13 @@ function rP(e) {
linked: !1
} : null;
}
-function iP(e, t) {
+function nP(e, t) {
let n = oe(e, "performer"), r = re(t);
return r && [e.label, n].map(re).some((e) => e && (r.includes(e) || e.includes(r))) ? `${t} 官方资料` : n || e.label || "";
}
-var aP = (e) => ({ site: ie(e) });
-function lme(e, t) {
- let n = rP(e)?.name || "", r = (e.entry_links || []).filter((e) => e.slot === "pill").map((e) => ({
+var rP = (e) => ({ site: ie(e) });
+function fme(e, t) {
+ let n = tP(e)?.name || "", r = (e.entry_links || []).filter((e) => e.slot === "pill").map((e) => ({
type: "icon",
url: e.url,
title: e.label,
@@ -39581,7 +39705,7 @@ function lme(e, t) {
let t = e.retired_year ? `已于 ${e.retired_year} 年隐退` : "链接已失效";
return {
type: "gone",
- title: `${iP(e, n)} · ${t}`
+ title: `${nP(e, n)} · ${t}`
};
}
let r = e.url || "";
@@ -39592,8 +39716,8 @@ function lme(e, t) {
if (t === "performer" && e.link_kind !== "social") return {
type: "icon",
url: r,
- title: iP(e, n),
- mark: aP(e)
+ title: nP(e, n),
+ mark: rP(e)
};
if (e.link_kind === "social") {
let t = ee(r);
@@ -39601,7 +39725,7 @@ function lme(e, t) {
type: "icon",
url: r,
title: e.label || "",
- mark: t ? { brand: t } : aP(e)
+ mark: t ? { brand: t } : rP(e)
};
}
return {
@@ -39609,13 +39733,13 @@ function lme(e, t) {
url: r,
title: e.label || "",
text: oe(e, t, i),
- mark: aP(e)
+ mark: rP(e)
};
});
return [...r, ...a];
}
-var oP = (e) => (e.entry_links || []).filter((e) => e.slot === "mark");
-function ume(e) {
+var iP = (e) => (e.entry_links || []).filter((e) => e.slot === "mark");
+function pme(e) {
if (!e) return [];
let t = [];
e.birth_date && t.push({
@@ -39672,14 +39796,14 @@ function ume(e) {
tags: e.tags
}), t;
}
-function dme(e) {
+function mme(e) {
let t = e.length > 5 ? 4 : e.length;
return {
shown: e.slice(0, t),
rest: e.length - t
};
}
-function fme(e) {
+function hme(e) {
if (!e) return null;
let t = e.shown || [], n = [e.reading || "", ...t].filter(Boolean), r = (e.total || 0) - t.length;
return n.length || r > 0 ? {
@@ -39690,7 +39814,7 @@ function fme(e) {
}
//#endregion
//#region src/react/entity-hero/entity-hero-page.tsx
-function pme(e) {
+function gme(e) {
return ge({
id: e.id,
hasImage: e.has_image,
@@ -39700,8 +39824,8 @@ function pme(e) {
focus: e.avatar_focus
});
}
-function mme({ kind: e, name: t, entity: n, feedNew: r, feedHost: i, actions: a, helpers: o }) {
- let s = ome(e), c = ame(e), l = e === "performer" ? ume(n.profile) : [], u = lme(n, e), d = oP(n), f = e === "agency" ? [] : n.related_performers || [], p = (0, B.useRef)(null), m = (0, B.useRef)(null);
+function _me({ kind: e, name: t, entity: n, feedNew: r, feedHost: i, actions: a, helpers: o }) {
+ let s = lme(e), c = cme(e), l = e === "performer" ? pme(n.profile) : [], u = fme(n, e), d = iP(n), f = e === "agency" ? [] : n.related_performers || [], p = (0, B.useRef)(null), m = (0, B.useRef)(null);
return (0, B.useEffect)(() => {
o.wireScroller(p.current);
}, [o, u.length]), (0, B.useEffect)(() => {
@@ -39714,7 +39838,7 @@ function mme({ kind: e, name: t, entity: n, feedNew: r, feedHost: i, actions: a,
children: [
/* @__PURE__ */ (0, H.jsxs)("div", {
"data-entity-portrait-wrap": "",
- children: [/* @__PURE__ */ (0, H.jsx)(hme, {
+ children: [/* @__PURE__ */ (0, H.jsx)(vme, {
kind: e,
name: t,
helpers: o,
@@ -39722,7 +39846,7 @@ function mme({ kind: e, name: t, entity: n, feedNew: r, feedHost: i, actions: a,
company: c
}), s && n.id ? /* @__PURE__ */ (0, H.jsx)("span", {
"data-avatar-picker": "",
- children: /* @__PURE__ */ (0, H.jsx)(Qpe, {
+ children: /* @__PURE__ */ (0, H.jsx)(tme, {
kind: e,
entityId: Number(n.id),
name: n.canonical_name || t,
@@ -39735,14 +39859,14 @@ function mme({ kind: e, name: t, entity: n, feedNew: r, feedHost: i, actions: a,
children: [
/* @__PURE__ */ (0, H.jsxs)("div", {
"data-entity-title": "",
- children: [/* @__PURE__ */ (0, H.jsx)("h2", { children: n.canonical_name }), /* @__PURE__ */ (0, H.jsx)(ime, {
+ children: [/* @__PURE__ */ (0, H.jsx)("h2", { children: n.canonical_name }), /* @__PURE__ */ (0, H.jsx)(sme, {
current: n.canonical_name,
- choices: cme(n),
+ choices: dme(n),
onChoose: a.chooseName,
onAddAlias: a.addAlias
})]
}),
- /* @__PURE__ */ (0, H.jsx)(gme, {
+ /* @__PURE__ */ (0, H.jsx)(yme, {
kind: e,
entity: n,
actions: a
@@ -39750,9 +39874,9 @@ function mme({ kind: e, name: t, entity: n, feedNew: r, feedHost: i, actions: a,
u.length ? /* @__PURE__ */ (0, H.jsx)("div", {
ref: p,
"data-entity-links": "",
- children: u.map((e, t) => /* @__PURE__ */ (0, H.jsx)(bme, { link: e }, t))
+ children: u.map((e, t) => /* @__PURE__ */ (0, H.jsx)(Cme, { link: e }, t))
}) : null,
- d.length || n.feed ? /* @__PURE__ */ (0, H.jsx)(xme, {
+ d.length || n.feed ? /* @__PURE__ */ (0, H.jsx)(wme, {
entity: n,
actions: a,
helpers: o
@@ -39761,11 +39885,11 @@ function mme({ kind: e, name: t, entity: n, feedNew: r, feedHost: i, actions: a,
}),
l.length ? /* @__PURE__ */ (0, H.jsx)("dl", {
"data-entity-facts": "",
- children: l.map((e) => /* @__PURE__ */ (0, H.jsx)(vme, {
+ children: l.map((e) => /* @__PURE__ */ (0, H.jsx)(xme, {
glyph: e.glyph,
label: e.label,
clip: e.clip,
- children: e.tags ? /* @__PURE__ */ (0, H.jsx)(yme, { tags: e.tags }) : e.parts.map((e, t) => /* @__PURE__ */ (0, H.jsxs)("span", {
+ children: e.tags ? /* @__PURE__ */ (0, H.jsx)(Sme, { tags: e.tags }) : e.parts.map((e, t) => /* @__PURE__ */ (0, H.jsxs)("span", {
"data-fact-tone": e.tone === "plain" ? void 0 : e.tone,
children: [t ? " " : "", e.text]
}, t))
@@ -39784,7 +39908,7 @@ function mme({ kind: e, name: t, entity: n, feedNew: r, feedHost: i, actions: a,
onClick: () => a.openEntity("performer", e.k),
children: [/* @__PURE__ */ (0, H.jsx)("span", {
"data-hero-ring": "",
- dangerouslySetInnerHTML: { __html: `<span>${P(e.k.slice(0, 1))}</span>${pme(e)}` }
+ dangerouslySetInnerHTML: { __html: `<span>${P(e.k.slice(0, 1))}</span>${gme(e)}` }
}), /* @__PURE__ */ (0, H.jsx)("span", {
"data-hero-costar-name": "",
children: e.k
@@ -39792,14 +39916,14 @@ function mme({ kind: e, name: t, entity: n, feedNew: r, feedHost: i, actions: a,
}, e.k))
})
}) : null]
- }), i ? (0, Dt.createPortal)(/* @__PURE__ */ (0, H.jsx)(Dw, {
+ }), i ? (0, Dt.createPortal)(/* @__PURE__ */ (0, H.jsx)(Tw, {
feedNew: r,
host: i,
wire: o.wireFeedRow,
act: (e, t) => a.feedAction(e, t)
}), i) : null] });
}
-function hme({ kind: e, name: t, helpers: n, people: r, company: i }) {
+function vme({ kind: e, name: t, helpers: n, people: r, company: i }) {
let [a] = (0, B.useState)(() => `${n.portraitImg()}<span>${P(t.slice(0, 1))}</span>`);
return /* @__PURE__ */ (0, H.jsx)("div", {
"data-entity-portrait": r ? "round" : "square",
@@ -39808,8 +39932,8 @@ function hme({ kind: e, name: t, helpers: n, people: r, company: i }) {
dangerouslySetInnerHTML: { __html: a }
});
}
-function gme({ kind: e, entity: t, actions: n }) {
- let r = rP(t), i = (e, t) => (r) => {
+function yme({ kind: e, entity: t, actions: n }) {
+ let r = tP(t), i = (e, t) => (r) => {
r.preventDefault(), n.openEntity(e, t);
}, a = r ? r.linked ? /* @__PURE__ */ (0, H.jsx)("a", {
href: te("agency", r.name),
@@ -39818,36 +39942,36 @@ function gme({ kind: e, entity: t, actions: n }) {
children: r.name
}) : r.name : null, o = /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)("b", { children: t.asset_count.toLocaleString() }), " 个视频"] });
if (e === "performer") {
- let e = fme(t.name_groups);
+ let e = hme(t.name_groups);
return /* @__PURE__ */ (0, H.jsxs)("div", {
"data-entity-alias": "meta",
children: [
/* @__PURE__ */ (0, H.jsxs)("span", {
"data-meta-item": "",
title: "视频",
- children: [/* @__PURE__ */ (0, H.jsx)(QN, { name: "film" }), /* @__PURE__ */ (0, H.jsx)("span", { children: o })]
+ children: [/* @__PURE__ */ (0, H.jsx)(XN, { name: "film" }), /* @__PURE__ */ (0, H.jsx)("span", { children: o })]
}),
a ? /* @__PURE__ */ (0, H.jsxs)("span", {
"data-meta-item": "",
title: "事务所",
- children: [/* @__PURE__ */ (0, H.jsx)(QN, { name: "briefcase" }), /* @__PURE__ */ (0, H.jsx)("span", { children: a })]
+ children: [/* @__PURE__ */ (0, H.jsx)(XN, { name: "briefcase" }), /* @__PURE__ */ (0, H.jsx)("span", { children: a })]
}) : null,
e ? /* @__PURE__ */ (0, H.jsxs)("div", {
"data-meta-item": "names",
children: [
- /* @__PURE__ */ (0, H.jsx)(QN, { name: "id-card" }),
+ /* @__PURE__ */ (0, H.jsx)(XN, { name: "id-card" }),
/* @__PURE__ */ (0, H.jsx)("span", {
"data-alias-names": "",
title: "别名",
children: e.names.map((e, t) => /* @__PURE__ */ (0, H.jsx)("span", { children: e }, t))
}),
- e.rest > 0 ? /* @__PURE__ */ (0, H.jsx)(nP, {
+ e.rest > 0 ? /* @__PURE__ */ (0, H.jsx)(eP, {
id: "entityAliasPop",
hook: "alias",
rest: e.rest,
label: `另外 ${e.rest} 个别名`,
heading: `${e.total} 个别名`,
- children: /* @__PURE__ */ (0, H.jsx)("dl", { children: (t.name_groups?.groups || []).map((e, t) => /* @__PURE__ */ (0, H.jsx)(_me, {
+ children: /* @__PURE__ */ (0, H.jsx)("dl", { children: (t.name_groups?.groups || []).map((e, t) => /* @__PURE__ */ (0, H.jsx)(bme, {
label: e.label,
names: e.names
}, t)) })
@@ -39882,25 +40006,25 @@ function gme({ kind: e, entity: t, actions: n }) {
]
});
}
-function _me({ label: e, names: t }) {
+function bme({ label: e, names: t }) {
return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [e ? /* @__PURE__ */ (0, H.jsx)("dt", { children: e }) : null, /* @__PURE__ */ (0, H.jsx)("dd", {
"data-wide": e ? void 0 : "",
children: t.map((e, t) => /* @__PURE__ */ (0, H.jsxs)("span", { children: [e.name, e.reading ? /* @__PURE__ */ (0, H.jsx)("small", { children: e.reading }) : null] }, t))
})] });
}
-function vme({ glyph: e, label: t, clip: n, children: r }) {
- return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsxs)("dt", { children: [/* @__PURE__ */ (0, H.jsx)(QN, { name: e }), t] }), /* @__PURE__ */ (0, H.jsx)("dd", {
+function xme({ glyph: e, label: t, clip: n, children: r }) {
+ return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsxs)("dt", { children: [/* @__PURE__ */ (0, H.jsx)(XN, { name: e }), t] }), /* @__PURE__ */ (0, H.jsx)("dd", {
"data-fact": e === "tags" ? "tags" : n ? "clip" : e === "calendar-range" ? "num" : void 0,
title: n,
children: r
})] });
}
-function yme({ tags: e }) {
- let { shown: t, rest: n } = dme(e);
+function Sme({ tags: e }) {
+ let { shown: t, rest: n } = mme(e);
return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [t.map((e) => /* @__PURE__ */ (0, H.jsx)("span", {
"data-fact-tag": "",
children: e
- }, e)), n ? /* @__PURE__ */ (0, H.jsx)(nP, {
+ }, e)), n ? /* @__PURE__ */ (0, H.jsx)(eP, {
id: "entityTagPop",
hook: "fact",
rest: n,
@@ -39915,10 +40039,10 @@ function yme({ tags: e }) {
})
}) : null] });
}
-function sP({ mark: e }) {
+function aP({ mark: e }) {
if ("brand" in e) return /* @__PURE__ */ (0, H.jsx)("span", {
"data-link-icon": "brand",
- children: /* @__PURE__ */ (0, H.jsx)(QN, { name: e.brand })
+ children: /* @__PURE__ */ (0, H.jsx)(XN, { name: e.brand })
});
let t = L("globe") + ("site" in e ? `<img src="${P(e.site)}" alt="" loading="lazy" referrerpolicy="no-referrer" data-drop="self">` : "");
return /* @__PURE__ */ (0, H.jsx)("span", {
@@ -39926,7 +40050,7 @@ function sP({ mark: e }) {
dangerouslySetInnerHTML: { __html: t }
});
}
-function bme({ link: e }) {
+function Cme({ link: e }) {
switch (e.type) {
case "icon": return /* @__PURE__ */ (0, H.jsx)("a", {
"data-link": "icon",
@@ -39935,19 +40059,19 @@ function bme({ link: e }) {
rel: "noreferrer",
title: e.title,
"aria-label": e.title,
- children: /* @__PURE__ */ (0, H.jsx)(sP, { mark: e.mark })
+ children: /* @__PURE__ */ (0, H.jsx)(aP, { mark: e.mark })
});
case "gone": return /* @__PURE__ */ (0, H.jsx)("span", {
"data-link": "gone",
tabIndex: 0,
title: e.title,
"aria-label": e.title,
- children: /* @__PURE__ */ (0, H.jsx)(sP, { mark: { globe: !0 } })
+ children: /* @__PURE__ */ (0, H.jsx)(aP, { mark: { globe: !0 } })
});
case "private": return /* @__PURE__ */ (0, H.jsxs)("span", {
"data-link": "private",
title: "私人馆藏来源记录,不直接打开下载页",
- children: [/* @__PURE__ */ (0, H.jsx)(sP, { mark: { globe: !0 } }), /* @__PURE__ */ (0, H.jsxs)("span", {
+ children: [/* @__PURE__ */ (0, H.jsx)(aP, { mark: { globe: !0 } }), /* @__PURE__ */ (0, H.jsxs)("span", {
"data-link-label": "",
children: ["来源 · ", e.label]
})]
@@ -39958,14 +40082,14 @@ function bme({ link: e }) {
target: "_blank",
rel: "noreferrer",
title: e.title,
- children: [/* @__PURE__ */ (0, H.jsx)(sP, { mark: e.mark }), /* @__PURE__ */ (0, H.jsx)("span", {
+ children: [/* @__PURE__ */ (0, H.jsx)(aP, { mark: e.mark }), /* @__PURE__ */ (0, H.jsx)("span", {
"data-link-label": "",
children: e.text
})]
});
}
}
-function xme({ entity: e, actions: t, helpers: n }) {
+function wme({ entity: e, actions: t, helpers: n }) {
let [r, i] = (0, B.useState)(!!e.feed?.following), [a, o] = (0, B.useState)(!1), s = (0, B.useRef)(!1), c = async (e) => {
if (s.current) return !1;
s.current = !0, o(!0);
@@ -39983,47 +40107,47 @@ function xme({ entity: e, actions: t, helpers: n }) {
};
return /* @__PURE__ */ (0, H.jsxs)("div", {
"data-entry-marks": "",
- children: [oP(e).map((e, t) => /* @__PURE__ */ (0, H.jsxs)("a", {
+ children: [iP(e).map((e, t) => /* @__PURE__ */ (0, H.jsxs)("a", {
"data-entry-mark": "",
href: e.url,
target: "_blank",
rel: "noreferrer",
title: e.label,
"aria-label": e.label,
- children: [e.mark ? /* @__PURE__ */ (0, H.jsx)(QN, { name: e.mark }) : /* @__PURE__ */ (0, H.jsxs)("span", {
+ children: [e.mark ? /* @__PURE__ */ (0, H.jsx)(XN, { name: e.mark }) : /* @__PURE__ */ (0, H.jsxs)("span", {
"data-missav-mark": "",
children: [/* @__PURE__ */ (0, H.jsx)("span", { children: "MISS" }), /* @__PURE__ */ (0, H.jsx)("span", { children: "AV" })]
}), e.ordinal ? /* @__PURE__ */ (0, H.jsx)("span", {
"data-entry-ordinal": "",
children: e.ordinal
}) : null]
- }, t)), e.feed ? /* @__PURE__ */ (0, H.jsx)(rme, {
+ }, t)), e.feed ? /* @__PURE__ */ (0, H.jsx)(ome, {
following: r,
busy: a,
onToggle: (e) => {
l(e);
},
- tip: sme(r)
+ tip: ume(r)
}) : null]
});
}
//#endregion
//#region src/react/entity-page/entity-page-view.tsx
-function Sme(e) {
- let { kind: t, name: n } = e, r = xw(iN(t, n)), i = !!r.data?.error, { actions: a } = e;
+function Tme(e) {
+ let { kind: t, name: n } = e, r = yw(PM(t, n)), i = !!r.data?.error, { actions: a } = e;
return (0, B.useLayoutEffect)(() => {
i && a.missing();
- }, [a, i]), r.isError ? /* @__PURE__ */ (0, H.jsx)(HA, {
+ }, [a, i]), r.isError ? /* @__PURE__ */ (0, H.jsx)(cA, {
message: G(r.error),
onRetry: () => {
r.refetch();
}
- }) : !r.data || i ? null : /* @__PURE__ */ (0, H.jsx)(Tme, {
+ }) : !r.data || i ? null : /* @__PURE__ */ (0, H.jsx)(Ome, {
...e,
entity: r.data
});
}
-function cP(e) {
+function oP(e) {
let [t, n] = (0, B.useState)({
key: e,
n: 1
@@ -40035,14 +40159,14 @@ function cP(e) {
};
return n(r), r.n;
}
-var Cme = () => String(((Date.now() ^ (Math.random() * 1e9 | 0)) >>> 0) % 99991);
-function wme(e, t) {
+var Eme = () => String(((Date.now() ^ (Math.random() * 1e9 | 0)) >>> 0) % 99991);
+function Dme(e, t) {
return `照片 · ${[e.total || !t ? `${(e.total || 0).toLocaleString()} 张` : "", t ? `样张 ${(e.sample_total || 0).toLocaleString()} 张 · ${t} 部作品` : ""].filter(Boolean).join(" · ")}`;
}
-function Tme(e) {
- let { kind: t, name: n, entity: i, filters: a, media: o, helpers: s, actions: c, hosts: l } = e, u = t === "agency" || t === "studio", d = t === "agency" ? i.related_performers || [] : t === "studio" && i.labels || [], f = Number(i.id) || 0, p = Tw(aN(t, n, 0, "")).data?.pages[0], m = p && !p.error ? p : null, h = m ? (m.total || 0) + (m.sample_total || 0) : 0, g = (m?.total || 0) > 0 || oN(m).length > 0, _ = o.media === "photos" && g ? o : ZM, [v, y] = (0, B.useState)("people"), b = new URLSearchParams(Object.entries(a).filter(([, e]) => e)).toString(), [x, S] = (0, B.useState)(b);
+function Ome(e) {
+ let { kind: t, name: n, entity: i, filters: a, media: o, helpers: s, actions: c, hosts: l } = e, u = t === "agency" || t === "studio", d = t === "agency" ? i.related_performers || [] : t === "studio" && i.labels || [], f = Number(i.id) || 0, p = Cw(FM(t, n, 0, "")).data?.pages[0], m = p && !p.error ? p : null, h = m ? (m.total || 0) + (m.sample_total || 0) : 0, g = (m?.total || 0) > 0 || IM(m).length > 0, _ = o.media === "photos" && g ? o : DM, [v, y] = (0, B.useState)("people"), b = new URLSearchParams(Object.entries(a).filter(([, e]) => e)).toString(), [x, S] = (0, B.useState)(b);
x !== b && (S(b), y("videos"));
- let C = u && v === "people" && d.length ? "people" : _.media, [w, T] = (0, B.useState)(0), E = rN(e), D = xw(E), O = cP(JSON.stringify([E.queryKey, w])), [k] = (0, B.useState)(() => (t === "performer" || t === "studio") && (e.jav || (D.data?.items || []).some((e) => e.is_jav)));
+ let C = u && v === "people" && d.length ? "people" : _.media, [w, T] = (0, B.useState)(0), E = NM(e), D = yw(E), O = oP(JSON.stringify([E.queryKey, w])), [k] = (0, B.useState)(() => (t === "performer" || t === "studio") && (e.jav || (D.data?.items || []).some((e) => e.is_jav)));
(0, B.useLayoutEffect)(() => {
c.javContext(k);
}, [c, k]);
@@ -40052,26 +40176,26 @@ function Tme(e) {
}, [e.layout, k]), j = {
jav: e.jav,
seed: e.seed
- }, M = (0, B.useCallback)((e, r) => nN(t, n, a, j, e, r), [O]), [ee, te] = (0, B.useState)({}), P = _.set, F = ee[P] || "", ne = Tw({
- ...aN(t, n, P, F),
+ }, M = (0, B.useCallback)((e, r) => MM(t, n, a, j, e, r), [O]), [ee, te] = (0, B.useState)({}), P = _.set, F = ee[P] || "", ne = Cw({
+ ...FM(t, n, P, F),
enabled: C === "photos"
- }), I = ne.data?.pages[0], re = cP(JSON.stringify($M(t, n, P, F))), L = (0, B.useMemo)(() => {
+ }), I = ne.data?.pages[0], re = oP(JSON.stringify(kM(t, n, P, F))), L = (0, B.useMemo)(() => {
let e = ne.data?.pages;
if (!e?.[0] || e[0].error) return null;
let t = e[0];
return {
revision: re,
- codeSets: t.id ? [] : oN(t),
+ codeSets: t.id ? [] : IM(t),
items: e.flatMap((e) => e.items || []),
total: t.total || 0,
hasMore: !!e[e.length - 1]?.has_more
};
- }, [ne.data, re]), ie = ne.refetch, ae = ne.fetchNextPage, oe = xw({
- ...nw(f, s.feedRowHtml),
+ }, [ne.data, re]), ie = ne.refetch, ae = ne.fetchNextPage, oe = yw({
+ ...ew(f, s.feedRowHtml),
enabled: !!f
}), se = (0, B.useRef)(e.feedRevision);
(0, B.useEffect)(() => {
- se.current !== e.feedRevision && (se.current = e.feedRevision, z.invalidateQueries({ queryKey: tw(f) }));
+ se.current !== e.feedRevision && (se.current = e.feedRevision, z.invalidateQueries({ queryKey: $C(f) }));
}, [f, e.feedRevision]);
let ce = !!D.data;
(0, B.useEffect)(() => {
@@ -40088,12 +40212,12 @@ function Tme(e) {
le.current = !1;
}, []);
let R = (0, B.useCallback)(async () => {
- await z.invalidateQueries({ queryKey: QM(t, n) }), await z.invalidateQueries({ queryKey: [
+ await z.invalidateQueries({ queryKey: OM(t, n) }), await z.invalidateQueries({ queryKey: [
"entity-items",
t,
n
] });
- }, [t, n]), ue = ww({
+ }, [t, n]), ue = Sw({
mutationFn: (e) => N("/api/entity-alias", {
method: "POST",
body: JSON.stringify({
@@ -40103,14 +40227,14 @@ function Tme(e) {
})
}),
onSuccess: () => R()
- }), de = ww({ mutationFn: ({ from: e, to: n }) => N("/api/entity-name", {
+ }), de = Sw({ mutationFn: ({ from: e, to: n }) => N("/api/entity-name", {
method: "POST",
body: JSON.stringify({
kind: t,
name: e,
canonical: n
})
- }) }), fe = ww({
+ }) }), fe = Sw({
mutationFn: (e) => N("/api/feeds/source", {
method: "POST",
body: JSON.stringify({
@@ -40119,7 +40243,7 @@ function Tme(e) {
enabled: e
})
}),
- onSuccess: (e, r) => z.setQueryData(QM(t, n), (e) => e && {
+ onSuccess: (e, r) => z.setQueryData(OM(t, n), (e) => e && {
...e,
feed: {
...e.feed,
@@ -40167,10 +40291,10 @@ function Tme(e) {
let e = await N("/api/feeds/check").catch(() => null);
if (!e || e.status !== "running") break;
}
- le.current && await z.invalidateQueries({ queryKey: tw(f) });
+ le.current && await z.invalidateQueries({ queryKey: $C(f) });
})();
},
- feedAction: rw,
+ feedAction: tw,
avatarPicked: () => {
c.avatarChanged(), R().then(() => {
le.current && T((e) => e + 1);
@@ -40201,19 +40325,19 @@ function Tme(e) {
e === C && !_.set || (y(e === "people" ? "people" : "videos"), c.route(a, e === "photos" ? {
media: "photos",
set: 0
- } : ZM));
+ } : DM));
},
setState: (e) => c.route({
...a,
state: e
- }, ZM),
+ }, DM),
toggleTag: c.toggleTag,
clearFilter: c.clearFilter,
clearAll: c.clearAll,
setSort: c.setSort,
reshuffle: async () => {
if (C !== "photos") {
- let r = c.reshuffleVideos(), i = rN({
+ let r = c.reshuffleVideos(), i = NM({
kind: t,
name: n,
filters: {
@@ -40227,7 +40351,7 @@ function Tme(e) {
await z.fetchQuery(i).catch(() => null);
return;
}
- let r = Cme(), i = await z.fetchInfiniteQuery(aN(t, n, P, r)).catch(() => null);
+ let r = Eme(), i = await z.fetchInfiniteQuery(FM(t, n, P, r)).catch(() => null);
!le.current || !i?.pages[0] || i.pages[0].error || te((e) => ({
...e,
[P]: r
@@ -40260,7 +40384,7 @@ function Tme(e) {
k: e.k,
label: Je(e.k),
n: e.n,
- selected: Kfe(a.tag, e.k)
+ selected: _pe(a.tag, e.k)
})), ve = h || d.length ? {
label: d.length ? "页面视图" : "媒体类型",
people: d.length ? {
@@ -40286,9 +40410,9 @@ function Tme(e) {
if (C === "people") Se = `${t === "studio" ? "厂牌" : "艺人"} · ${d.length.toLocaleString()}`;
else if (C === "videos") {
Ce = !D.data;
- let e = eN(a.tag).map((e) => Je(e));
+ let e = AM(a.tag).map((e) => Je(e));
Se = `视频 · ${(D.data?.total || 0).toLocaleString()}${e.length ? ` · ${e.join(" · ")}` : ""}`;
- } else I && !I.error ? Se = be ? `${I.title} · ${(I.total || 0).toLocaleString()} 张` : wme(I, oN(I).length) : Ce = ne.isPending;
+ } else I && !I.error ? Se = be ? `${I.title} · ${(I.total || 0).toLocaleString()} 张` : Dme(I, IM(I).length) : Ce = ne.isPending;
let we = (0, B.useMemo)(() => ({
...e.card.actions,
loadMorePhotos: async () => {
@@ -40305,7 +40429,7 @@ function Tme(e) {
d
]);
return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [
- /* @__PURE__ */ (0, H.jsx)(mme, {
+ /* @__PURE__ */ (0, H.jsx)(_me, {
kind: t,
name: n,
entity: i,
@@ -40315,7 +40439,7 @@ function Tme(e) {
actions: pe,
helpers: me
}, w),
- (0, Dt.createPortal)(/* @__PURE__ */ (0, H.jsx)(yC, {
+ (0, Dt.createPortal)(/* @__PURE__ */ (0, H.jsx)(qie, {
kind: t,
name: n,
view: C,
@@ -40331,12 +40455,12 @@ function Tme(e) {
actions: he,
helpers: ge
}), l.filter),
- (0, Dt.createPortal)(C === "videos" && D.isError ? /* @__PURE__ */ (0, H.jsx)(HA, {
+ (0, Dt.createPortal)(C === "videos" && D.isError ? /* @__PURE__ */ (0, H.jsx)(cA, {
message: G(D.error),
onRetry: () => {
D.refetch();
}
- }) : /* @__PURE__ */ (0, H.jsx)(xpe, {
+ }) : /* @__PURE__ */ (0, H.jsx)(wpe, {
kind: t,
name: n,
view: C,
@@ -40362,7 +40486,7 @@ function Tme(e) {
}
//#endregion
//#region src/react/components/collection-summary.tsx
-function lP({ label: e, figure: t, detail: n = "", pending: r = !1, flush: i = !1 }) {
+function sP({ label: e, figure: t, detail: n = "", pending: r = !1, flush: i = !1 }) {
return /* @__PURE__ */ (0, H.jsxs)("div", {
"data-collection-summary": "",
className: `${i ? "" : "mb-5 "}flex items-end justify-between gap-4 rounded-surface bg-background-secondary-default px-6 py-5
@@ -40389,29 +40513,29 @@ function lP({ label: e, figure: t, detail: n = "", pending: r = !1, flush: i = !
}
//#endregion
//#region src/react/duplicates/duplicates-page.tsx
-var Eme = gC("play"), Dme = gC("file-stack"), Ome = lT({
+var kme = MC("play"), Ame = MC("file-stack"), jme = sT({
padding: "none",
radius: "surface",
className: "mb-6 overflow-hidden dark:bg-background-primary-default"
-}), uP = "rounded-sm px-1.5 py-px text-caption-1-regular leading-5", dP = "rounded-sm px-2 py-0.5 text-caption-1-regular leading-5", fP = "font-mono text-caption-1-regular leading-5 text-text-secondary", pP = () => {
+}), cP = "rounded-sm px-1.5 py-px text-caption-1-regular leading-5", lP = "rounded-sm px-2 py-0.5 text-caption-1-regular leading-5", uP = "font-mono text-caption-1-regular leading-5 text-text-secondary", dP = () => {
z.invalidateQueries({
- queryKey: ij,
+ queryKey: PA,
exact: !0
}), z.invalidateQueries({
- queryKey: yM,
+ queryKey: Yj,
exact: !0
});
};
-function kme(e) {
+function Mme(e) {
return e.identical ? /* @__PURE__ */ (0, H.jsx)("span", {
- className: `${dP} text-(--keep)`,
+ className: `${lP} text-(--keep)`,
children: "sha1 一致"
}) : /* @__PURE__ */ (0, H.jsx)("span", {
- className: `${dP} text-text-secondary`,
+ className: `${lP} text-text-secondary`,
children: e.evidence === "same_code_short_copy" ? "同番号短版本" : "时长推断"
});
}
-function Ame({ file: t, openItem: n }) {
+function Nme({ file: t, openItem: n }) {
let r = () => n(t.id);
return /* @__PURE__ */ (0, H.jsxs)("div", {
className: "duplicate-row items-center gap-3 border-t border-separator-border px-5 py-4 max-compact:p-4",
@@ -40421,7 +40545,7 @@ function Ame({ file: t, openItem: n }) {
onClick: r,
"aria-label": `预览 ${t.name}`,
className: "relative row-span-2 inline-grid aspect-16/10 w-full cursor-pointer place-items-center overflow-hidden rounded-2lg bg-background-tertiary-default text-text-secondary",
- children: [/* @__PURE__ */ (0, H.jsx)(Eme, {
+ children: [/* @__PURE__ */ (0, H.jsx)(kme, {
"aria-hidden": !0,
className: "size-6"
}), /* @__PURE__ */ (0, H.jsx)("img", {
@@ -40445,55 +40569,55 @@ function Ame({ file: t, openItem: n }) {
}), t.is_largest || t.is_longest ? /* @__PURE__ */ (0, H.jsxs)("span", {
className: "flex flex-none gap-1",
children: [t.is_largest ? /* @__PURE__ */ (0, H.jsx)("i", {
- className: `${uP} not-italic bg-background-primary-hover text-text-secondary`,
+ className: `${cP} not-italic bg-background-primary-hover text-text-secondary`,
children: "最大"
}) : null, t.is_longest ? /* @__PURE__ */ (0, H.jsx)("i", {
- className: `${uP} not-italic bg-(--keep)/22 text-(--keep)`,
+ className: `${cP} not-italic bg-(--keep)/22 text-(--keep)`,
children: "最长"
}) : null]
}) : null]
}),
/* @__PURE__ */ (0, H.jsxs)("span", {
- className: `${fP} flex min-w-0 items-center gap-1.5`,
- children: [/* @__PURE__ */ (0, H.jsx)(RT, { mark: e[t.location] || "database" }), /* @__PURE__ */ (0, H.jsx)("span", {
+ className: `${uP} flex min-w-0 items-center gap-1.5`,
+ children: [/* @__PURE__ */ (0, H.jsx)(IT, { mark: e[t.location] || "database" }), /* @__PURE__ */ (0, H.jsx)("span", {
className: "whitespace-nowrap",
children: M[t.location] || t.location || t.drive
})]
}),
/* @__PURE__ */ (0, H.jsx)("span", {
- className: fP,
+ className: uP,
children: I(t.size || 0)
}),
/* @__PURE__ */ (0, H.jsx)("span", {
- className: fP,
+ className: uP,
children: ne(t.duration)
}),
/* @__PURE__ */ (0, H.jsx)("span", {
"data-middle-truncate": !0,
title: t.path ?? "",
- className: `${fP} col-start-2 -col-end-1 min-w-0 truncate pt-0.5 max-duplicate-narrow:col-span-full`,
+ className: `${uP} col-start-2 -col-end-1 min-w-0 truncate pt-0.5 max-duplicate-narrow:col-span-full`,
children: t.path ?? ""
})
]
});
}
-function jme({ openItem: e, toast: t, failure: n }) {
- let i = xw({
- queryKey: ij,
- queryFn: ({ signal: e }) => oj(e)
- }), a = xw({
- queryKey: tj,
- queryFn: ({ signal: e }) => nj(e)
- }), [o, s] = (0, B.useState)(""), c = ww({
- mutationFn: (e) => lj(e, "dispose"),
+function Pme({ openItem: e, toast: t, failure: n }) {
+ let i = yw({
+ queryKey: PA,
+ queryFn: ({ signal: e }) => IA(e)
+ }), a = yw({
+ queryKey: jA,
+ queryFn: ({ signal: e }) => MA(e)
+ }), [o, s] = (0, B.useState)(""), c = Sw({
+ mutationFn: (e) => zA(e, "dispose"),
onSuccess: (e, r) => {
- pP(), t(`已把 ${r.length} 项移入回收站`, { undo: async () => {
+ dP(), t(`已把 ${r.length} 项移入回收站`, { undo: async () => {
try {
- await lj(r, "restore");
+ await zA(r, "restore");
} catch (e) {
n("撤销移入回收站", e);
} finally {
- pP();
+ dP();
}
} });
},
@@ -40507,12 +40631,12 @@ function jme({ openItem: e, toast: t, failure: n }) {
children: i.error ? G(i.error) : "未取得重复文件列表,请刷新页面重试。"
})
});
- let u = l.groups ?? [], d = Nue(a.data), f = ({ groups: e, keep: t, key: n }) => {
+ let u = l.groups ?? [], d = ide(a.data), f = ({ groups: e, keep: t, key: n }) => {
if (c.isPending) return;
- let i = Rue(e, t);
+ let i = lde(e, t);
i.length && r({
title: "移入回收站",
- body: `将把 ${i.length} 个重复文件的馆藏记录移入回收站,每组保留${sj[t] ?? sj.largest}。文件共 ${I(zue(e, i))},记录可从回收站还原。`,
+ body: `将把 ${i.length} 个重复文件的馆藏记录移入回收站,每组保留${LA[t] ?? LA.largest}。文件共 ${I(ude(e, i))},记录可从回收站还原。`,
confirmLabel: "移入回收站",
onConfirm: () => (s(n), c.mutateAsync(i))
});
@@ -40520,7 +40644,7 @@ function jme({ openItem: e, toast: t, failure: n }) {
return /* @__PURE__ */ (0, H.jsxs)("div", {
className: "mx-auto w-full max-w-board pb-10.5",
children: [
- /* @__PURE__ */ (0, H.jsx)(lP, {
+ /* @__PURE__ */ (0, H.jsx)(sP, {
label: "重复内容",
figure: `${Number(l.total || 0).toLocaleString()} 组`,
detail: `${l.files} 个文件 · 可回收 ${I(l.reclaimable)}`
@@ -40546,7 +40670,7 @@ function jme({ openItem: e, toast: t, failure: n }) {
}),
children: "全部保留最长"
}),
- Lue(u, d).map((e) => /* @__PURE__ */ (0, H.jsx)(br, {
+ cde(u, d).map((e) => /* @__PURE__ */ (0, H.jsx)(br, {
busy: o === `all:${e}`,
onPress: () => f({
groups: u,
@@ -40569,7 +40693,7 @@ function jme({ openItem: e, toast: t, failure: n }) {
let r = [t], i = (e) => `${n}:${e}`;
return /* @__PURE__ */ (0, H.jsxs)("section", {
"aria-label": t.code,
- className: Ome,
+ className: jme,
children: [/* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-wrap items-center gap-3 bg-background-tertiary-default p-5 max-compact:p-4 dark:bg-background-secondary-default",
children: [
@@ -40581,9 +40705,9 @@ function jme({ openItem: e, toast: t, failure: n }) {
className: "font-mono text-caption-1-regular leading-5 text-text-primary",
children: `${t.count} 个 · 可回收 ${I(t.reclaimable)}`
}),
- kme(t),
+ Mme(t),
t.cross_drive ? /* @__PURE__ */ (0, H.jsx)("span", {
- className: `${dP} text-text-secondary`,
+ className: `${lP} text-text-secondary`,
children: `跨盘 ${t.drives.join(" ")}`
}) : null,
/* @__PURE__ */ (0, H.jsxs)("span", {
@@ -40611,7 +40735,7 @@ function jme({ openItem: e, toast: t, failure: n }) {
}),
children: "留最长"
}),
- cj(t.files, d).map((e) => /* @__PURE__ */ (0, H.jsx)(J, {
+ RA(t.files, d).map((e) => /* @__PURE__ */ (0, H.jsx)(J, {
variant: "secondary",
size: "small",
...p(i(e)),
@@ -40636,13 +40760,13 @@ function jme({ openItem: e, toast: t, failure: n }) {
]
})
]
- }), /* @__PURE__ */ (0, H.jsx)("div", { children: t.files.map((t) => /* @__PURE__ */ (0, H.jsx)(Ame, {
+ }), /* @__PURE__ */ (0, H.jsx)("div", { children: t.files.map((t) => /* @__PURE__ */ (0, H.jsx)(Nme, {
file: t,
openItem: e
}, t.id)) })]
}, `${t.code}-${n}`);
- }) : /* @__PURE__ */ (0, H.jsx)(fA, {
- icon: Dme,
+ }) : /* @__PURE__ */ (0, H.jsx)(Nk, {
+ icon: Ame,
title: "没有找到重复文件",
children: "所有来源之间没有检测到内容相同的文件。扫描新来源后,这里会自动更新。"
})
@@ -40651,7 +40775,7 @@ function jme({ openItem: e, toast: t, failure: n }) {
}
//#endregion
//#region src/follow-sort.ts
-var mP = [
+var fP = [
["checked", "检查时间"],
["added", "添加时间"],
["name", "创作者名称"],
@@ -40659,7 +40783,7 @@ var mP = [
["source", "来源名称"],
["provider", "站点"],
["status", "状态"]
-], Mme = "checked", hP = {
+], Fme = "checked", pP = {
checked: "desc",
added: "desc",
name: "asc",
@@ -40667,32 +40791,32 @@ var mP = [
source: "asc",
provider: "asc",
status: "asc"
-}, Nme = (e) => mP.some(([t]) => t === e);
-function gP(e, t) {
- let n = Nme(e) ? e : Mme;
+}, Ime = (e) => fP.some(([t]) => t === e);
+function mP(e, t) {
+ let n = Ime(e) ? e : Fme;
return {
sort: n,
- dir: t === "asc" || t === "desc" ? t : hP[n]
+ dir: t === "asc" || t === "desc" ? t : pP[n]
};
}
//#endregion
//#region src/react/follow-manage/follow-manage.ts
-var _P = "/api/follow", vP = "/api/follow/credentials", yP = "/api/follow/check", bP = "/api/follow/source", xP = "/api/follow/resolve", Pme = "/api/follow/suggest", SP = "/api/follow/author-alias", Fme = "/api/follow/credential", CP = "/api/follow/status", Ime = "/api/feeds", wP = "/api/feeds/source", Lme = "/api/feeds/check", Rme = "/api/feeds/lookup", TP = ["follow-manage"], EP = ["follow-manage", "credentials"], zme = ["follow-manage", "check"], Bme = ["follow-manage", "resolve"], DP = ["follow-manage", "feeds"], Vme = (e) => [
+var hP = "/api/follow", gP = "/api/follow/credentials", _P = "/api/follow/check", vP = "/api/follow/source", yP = "/api/follow/resolve", Lme = "/api/follow/suggest", bP = "/api/follow/author-alias", Rme = "/api/follow/credential", xP = "/api/follow/status", zme = "/api/feeds", SP = "/api/feeds/source", Bme = "/api/feeds/check", Vme = "/api/feeds/lookup", CP = ["follow-manage"], wP = ["follow-manage", "credentials"], Hme = ["follow-manage", "check"], Ume = ["follow-manage", "resolve"], TP = ["follow-manage", "feeds"], Wme = (e) => [
"follow-manage",
"suggest",
e
-], OP = [["default", "默认视图"], ["table", "表格视图"]], kP = [
+], EP = [["default", "默认视图"], ["table", "表格视图"]], DP = [
10,
20,
50,
100
-], Hme = Object.fromEntries(mP), AP = {
+], Gme = Object.fromEntries(fP), OP = {
author: "name",
source: "source",
provider: "provider",
status: "status",
checked: "checked"
-}, Ume = (e) => OP.some(([t]) => t === e), Wme = (e) => kP.includes(Number(e)) ? Number(e) : 20, Gme = {
+}, Kme = (e) => EP.some(([t]) => t === e), qme = (e) => DP.includes(Number(e)) ? Number(e) : 20, Jme = {
checked: ["从近到远", "从远到近"],
added: ["从近到远", "从远到近"],
name: ["倒序", "正序"],
@@ -40700,25 +40824,25 @@ var _P = "/api/follow", vP = "/api/follow/credentials", yP = "/api/follow/check"
source: ["倒序", "正序"],
provider: ["倒序", "正序"],
status: ["倒序", "正序"]
-}, Kme = (e, t) => `按${Hme[e]}${Gme[e][t === "asc" ? 0 : 1]}排序`;
-function jP(e) {
+}, Yme = (e, t) => `按${Gme[e]}${Jme[e][t === "asc" ? 0 : 1]}排序`;
+function kP(e) {
let t = e.last_status;
return t === "error" || t === "unauthorized" ? 0 : e.enabled ? t === "ok" ? 3 : 2 : 1;
}
-function qme(e) {
+function Xme(e) {
return e.history_exhausted ? "没有更多" : e.enabled ? e.last_status === "ok" ? "正常" : e.last_status === "error" || e.last_status === "unauthorized" ? "检查失败" : "未检查" : "已暂停";
}
-var MP = (e) => e.last_status === "error" || e.last_status === "unauthorized", NP = (e, t) => String(e.label || "").localeCompare(String(t.label || ""), "zh-CN", { numeric: !0 }), PP = {
- source: NP,
- provider: (e, t) => String(e.provider_label || "").localeCompare(String(t.provider_label || ""), "zh-CN") || NP(e, t),
- status: (e, t) => jP(e) - jP(t) || NP(e, t)
-}, FP = (e) => Date.parse(e || "") || 0, IP = (e) => String(e || "").replace(/\s*[·|]\s*[A-Za-z0-9_-]+\s*$/, "").replace(/\s+collections?\s*$/i, "").trim();
-function LP(e, t = []) {
+var AP = (e) => e.last_status === "error" || e.last_status === "unauthorized", jP = (e, t) => String(e.label || "").localeCompare(String(t.label || ""), "zh-CN", { numeric: !0 }), MP = {
+ source: jP,
+ provider: (e, t) => String(e.provider_label || "").localeCompare(String(t.provider_label || ""), "zh-CN") || jP(e, t),
+ status: (e, t) => kP(e) - kP(t) || jP(e, t)
+}, NP = (e) => Date.parse(e || "") || 0, PP = (e) => String(e || "").replace(/\s*[·|]\s*[A-Za-z0-9_-]+\s*$/, "").replace(/\s+collections?\s*$/i, "").trim();
+function FP(e, t = []) {
if (!e.length) return "";
- let n = (e) => String(e.author_name || "").trim() || IP(e.label), r = e.find((e) => e.entity_name);
+ let n = (e) => String(e.author_name || "").trim() || PP(e.label), r = e.find((e) => e.entity_name);
if (r) return r.entity_name;
let i = t.find((t) => `name:${t.canonical_key}` === e[0]?.author_key);
- if (i) return IP(i.canonical_name);
+ if (i) return PP(i.canonical_name);
let a = e.find((e) => e.official_avatar_url);
if (a && n(a)) return n(a);
let o = e.map(n).filter(Boolean);
@@ -40726,18 +40850,18 @@ function LP(e, t = []) {
let s = (e) => (e.match(/[A-Z]/g) || []).length;
return o.reduce((e, t) => s(t) > s(e) ? t : e, o[0]);
}
-function RP(e) {
+function IP(e) {
let t = e.trim().match(/[A-Za-z0-9]/);
return (t ? t[0] : Array.from(e.trim())[0] || "?").toUpperCase();
}
-function zP(e) {
+function LP(e) {
let t = e.find((e) => e.official_avatar_url), n = e.find((e) => e.avatar_url), r = t?.official_avatar_url || n?.avatar_url || "";
return {
src: r,
fallback: t && n && n.avatar_url !== r && n.avatar_url || ""
};
}
-function BP(e) {
+function RP(e) {
let t = [], n = /* @__PURE__ */ new Map();
for (let r of e) {
let e = r.author_key || `source:${r.id}`;
@@ -40745,32 +40869,32 @@ function BP(e) {
}
return t.map((e) => n.get(e));
}
-function Jme(e, t, n, r = []) {
- let i = BP(e), a = n === hP[t] ? 1 : -1, o = (e) => LP(e, r), s = (e, t) => o(e).localeCompare(o(t), "zh-CN", { numeric: !0 }), c = PP[t];
+function Zme(e, t, n, r = []) {
+ let i = RP(e), a = n === pP[t] ? 1 : -1, o = (e) => FP(e, r), s = (e, t) => o(e).localeCompare(o(t), "zh-CN", { numeric: !0 }), c = MP[t];
if (c) {
for (let e of i) e.sort((e, t) => a * c(e, t));
return i.sort((e, t) => a * c(e[0], t[0]) || s(e, t));
}
- let l = (e) => Math.max(...e.map((e) => FP(e.last_checked_at))), u = (e) => Math.max(...e.map((e) => FP(e.created_at)));
+ let l = (e) => Math.max(...e.map((e) => NP(e.last_checked_at))), u = (e) => Math.max(...e.map((e) => NP(e.created_at)));
return i.sort((e, n) => t === "name" ? a * s(e, n) : t === "sources" ? a * (n.length - e.length) || s(e, n) : t === "added" ? a * (u(n) - u(e)) || s(e, n) : a * (l(n) - l(e)) || s(e, n));
}
-function Yme(e, t, n, r = []) {
+function Qme(e, t, n, r = []) {
let i = e.flatMap((e) => {
- let t = LP(e, r);
+ let t = FP(e, r);
return e.map((n) => ({
source: n,
group: e,
author: t
}));
- }), a = PP[t];
+ }), a = MP[t];
if (a) {
- let e = n === hP[t] ? 1 : -1;
+ let e = n === pP[t] ? 1 : -1;
i.sort((t, n) => e * a(t.source, n.source));
}
return i;
}
-function VP(e, t, n) {
- let r = yj(e, t), i = bj(n, r), a = (i - 1) * t;
+function zP(e, t, n) {
+ let r = YA(e, t), i = XA(n, r), a = (i - 1) * t;
return {
page: i,
pages: r,
@@ -40779,91 +40903,91 @@ function VP(e, t, n) {
end: Math.min(a + t, e)
};
}
-function Xme(e, t) {
+function $me(e, t) {
let n = new Set(t.map((e) => e.id));
return new Set([...e].filter((e) => n.has(e)));
}
-function HP(e, t) {
+function BP(e, t) {
let n = t.filter((t) => e.has(t)).length;
return {
all: t.length > 0 && n === t.length,
some: n > 0 && n < t.length
};
}
-function UP(e, t, n) {
+function VP(e, t, n) {
let r = new Set(e);
for (let e of t) n ? r.add(e) : r.delete(e);
return r;
}
-var WP = (e) => K(`${_P}?summary=1`, e), GP = (e) => K(vP, e), Zme = (e) => K(yP, e), Qme = (e) => K(xP, e), $me = (e, t) => K(`${Pme}?q=${encodeURIComponent(e)}`, t), KP = (e) => q(yP, {
+var HP = (e) => K(`${hP}?summary=1`, e), UP = (e) => K(gP, e), ehe = (e) => K(_P, e), the = (e) => K(yP, e), nhe = (e, t) => K(`${Lme}?q=${encodeURIComponent(e)}`, t), WP = (e) => q(_P, {
...e?.length ? { sources: e } : {},
background: !0
-}), ehe = (e) => q(xP, {
+}), rhe = (e) => q(yP, {
lines: e,
background: !0
-}), qP = (e, t) => q(bP, {
+}), GP = (e, t) => q(vP, {
action: "enabled",
id: e,
enabled: t
-}), JP = (e) => q(bP, {
+}), KP = (e) => q(vP, {
action: "remove",
id: e
-}), the = (e) => q(bP, {
+}), ihe = (e) => q(vP, {
action: "add",
url: e.url,
label: e.label,
author: e.author || "",
aliases: e.aliases || [],
defer_check: !0
-}), YP = (e, t) => q(SP, {
+}), qP = (e, t) => q(bP, {
action: "add",
canonical: e,
alias: t
-}), nhe = (e) => q(SP, {
+}), ahe = (e) => q(bP, {
action: "remove",
alias: e
-}), rhe = (e, t) => q(Fme, {
+}), ohe = (e, t) => q(Rme, {
provider: e,
values: t
-}), ihe = (e, t) => q(CP, {
+}), she = (e, t) => q(xP, {
item: e,
to: t
-}), ahe = () => K(`${_P}?status=new&limit=1000`);
-async function XP(e) {
- let t = await K(Ime, e);
+}), che = () => K(`${hP}?status=new&limit=1000`);
+async function JP(e) {
+ let t = await K(zme, e);
if (!Array.isArray(t?.sources)) throw Error("没有读到订阅源");
return t;
}
-var ZP = (e, t, n) => q(wP, {
+var YP = (e, t, n) => q(SP, {
action: "enabled",
id: e,
enabled: t
-}, "POST", n), QP = (e, t) => q(wP, {
+}, "POST", n), XP = (e, t) => q(SP, {
action: "remove",
id: e
-}, "POST", t), $P = (e, t) => q(Lme, t?.length ? { sources: t } : { all: !0 }, "POST", e), ohe = (e, t) => K(`${Rme}?q=${encodeURIComponent(e)}`, t), she = (e, t, n) => q(wP, {
+}, "POST", t), ZP = (e, t) => q(Bme, t?.length ? { sources: t } : { all: !0 }, "POST", e), lhe = (e, t) => K(`${Vme}?q=${encodeURIComponent(e)}`, t), uhe = (e, t, n) => q(SP, {
action: "follow-name",
name: e,
ids: t
}, "POST", n);
-async function che(e, t = "") {
+async function dhe(e, t = "") {
await Promise.all([
z.fetchQuery({
- queryKey: TP,
- queryFn: () => WP(e)
+ queryKey: CP,
+ queryFn: () => HP(e)
}),
z.fetchQuery({
- queryKey: EP,
- queryFn: () => GP(e)
+ queryKey: wP,
+ queryFn: () => UP(e)
}),
t === "feeds" ? z.fetchQuery({
- queryKey: DP,
- queryFn: () => XP(e)
+ queryKey: TP,
+ queryFn: () => JP(e)
}) : null
]);
}
-function eF(e, t) {
- z.setQueryData(TP, (n) => n && {
+function QP(e, t) {
+ z.setQueryData(CP, (n) => n && {
...n,
sources: n.sources.map((n) => n.id === e ? {
...n,
@@ -40871,24 +40995,24 @@ function eF(e, t) {
} : n)
});
}
-function tF(e) {
+function $P(e) {
let t = new Set(e);
- z.setQueryData(TP, (e) => e && {
+ z.setQueryData(CP, (e) => e && {
...e,
sources: e.sources.filter((e) => !t.has(e.id))
});
}
-var nF = () => z.invalidateQueries({
- queryKey: TP,
+var eF = () => z.invalidateQueries({
+ queryKey: CP,
exact: !0
});
-function lhe(e) {
+function fhe(e) {
let t = e.results || [], n = (e) => t.reduce((t, n) => t + (e(n) || 0), 0), r = n((e) => e.added), i = n((e) => e.updated), a = n((e) => e.skipped_compilations), o = n((e) => e.skipped) - a, s = n((e) => e.history_skipped), c = n((e) => e.probed), l = t.filter((e) => e.ok && !e.added && !e.updated).length, u = t.filter((e) => !e.ok).length, d = [];
r && d.push(`新增 ${r} 条`), i && d.push(`更新 ${i} 条`), o && d.push(`跳过 ${o} 条无资源`), a && d.push(`排除 ${a} 个超大合集`), s && d.push(`跳过 ${s} 条超出首次采集范围的历史内容`), c && d.push(`回查 ${c} 条`), l && d.push(`${l} 个来源没有更新`), d.length || d.push("没有任何更新");
let f = t.filter((e) => e.exhausted).length;
return f && d.push(`${f} 个没有更多内容`), u && d.push(`${u} 个失败`), `检查了 ${t.length} 个来源:${d.join(" · ")}`;
}
-var uhe = (e) => (e?.results || []).filter((e) => !e.ok), dhe = (e) => (e?.results || []).find((e) => e.evidence_error)?.evidence_error || "", rF = (e) => e.last_checked_at ? xj(e.last_checked_at) : "未检查", fhe = /* @__PURE__ */ new Set([
+var phe = (e) => (e?.results || []).filter((e) => !e.ok), mhe = (e) => (e?.results || []).find((e) => e.evidence_error)?.evidence_error || "", tF = (e) => e.last_checked_at ? ZA(e.last_checked_at) : "未检查", hhe = /* @__PURE__ */ new Set([
"fanbox",
"patreon",
"subscribestar",
@@ -40901,50 +41025,50 @@ var uhe = (e) => (e?.results || []).filter((e) => !e.ok), dhe = (e) => (e?.resul
"gofile",
"f95zone",
"simpcity"
-]), iF = (e) => fhe.has(e) ? `/source-icon?provider=${encodeURIComponent(e)}` : "", phe = {
+]), nF = (e) => hhe.has(e) ? `/source-icon?provider=${encodeURIComponent(e)}` : "", ghe = {
required: "需要",
optional: "可选",
none: "不需要",
blocked: "接不进来"
-}, aF = (e) => !!e.present && !e.missing.length, mhe = [
+}, rF = (e) => !!e.present && !e.missing.length, _he = [
["", "全部"],
["new", "未看"],
["saved", "已保存"],
["ignored", "已忽略"]
-], hhe = [
+], vhe = [
["new", "更新时间"],
["hot", "热度"],
["dur", "时长"]
-], oF = {
+], iF = {
new: ["从新到旧", "从旧到新"],
hot: ["从高到低", "从低到高"],
dur: ["从长到短", "从短到长"]
};
-function sF(e, t) {
+function aF(e, t) {
let n = (e) => encodeURIComponent(e.join(","));
return `/api/follow?limit=300&offset=${t}` + (e.status ? `&status=${e.status}` : "") + (e.author ? `&author=${n([e.author])}` : "") + (e.provider ? `&provider=${n([e.provider])}` : "") + (e.tags.length ? `&tag=${n(e.tags)}` : "") + (e.work ? `&work=${n([e.work])}` : "") + (e.sort === "new" ? "" : `&sort=${e.sort}`) + (e.sort === "rand" ? `&seed=${e.seed}` : "") + (e.dir === "desc" ? "" : `&dir=${e.dir}`);
}
-function cF(e, t) {
+function oF(e, t) {
return {
queryKey: [
"follow-feed",
- sF(e, 0),
+ aF(e, 0),
t
],
- queryFn: ({ pageParam: t, signal: n }) => K(sF(e, t), n),
+ queryFn: ({ pageParam: t, signal: n }) => K(aF(e, t), n),
initialPageParam: 0,
getNextPageParam: (e) => e.has_more ? (e.offset || 0) + 300 : void 0,
- placeholderData: Ew.keepPreviousData
+ placeholderData: ww.keepPreviousData
};
}
-var lF = ["follow-feed", "credentials"], uF = (e) => K(vP, e).catch(() => ({ providers: [] }));
-async function ghe(e, t) {
- let n = cF(e.view, e.revision);
+var sF = ["follow-feed", "credentials"], cF = (e) => K(gP, e).catch(() => ({ providers: [] }));
+async function yhe(e, t) {
+ let n = oF(e.view, e.revision);
z.removeQueries({
queryKey: n.queryKey,
exact: !0
}), z.removeQueries({
- queryKey: lF,
+ queryKey: sF,
exact: !0
}), await Promise.all([z.fetchInfiniteQuery({
queryKey: n.queryKey,
@@ -40955,11 +41079,11 @@ async function ghe(e, t) {
initialPageParam: 0,
getNextPageParam: n.getNextPageParam
}), z.fetchQuery({
- queryKey: lF,
- queryFn: () => uF(t)
+ queryKey: sF,
+ queryFn: () => cF(t)
})]);
}
-function dF(e) {
+function lF(e) {
if (!e?.pages.length) return null;
let t = e.pages, n = t[t.length - 1];
return {
@@ -40968,10 +41092,10 @@ function dF(e) {
groups: t.flatMap((e) => e.groups || [])
};
}
-function fF(e, t, n) {
+function uF(e, t, n) {
return [...e].sort((e, r) => le(n, t(e)) - le(n, t(r)) || String(t(e)).localeCompare(String(t(r))));
}
-function pF(e) {
+function dF(e) {
let t = /* @__PURE__ */ new Set();
return [
e.primary,
@@ -40979,14 +41103,14 @@ function pF(e) {
...e.duplicates
].filter((e) => !e || t.has(e.id) ? !1 : (t.add(e.id), !0));
}
-function _he(e) {
+function bhe(e) {
let t = z.getQueryCache().findAll({ queryKey: ["follow-feed"] }).sort((e, t) => t.state.dataUpdatedAt - e.state.dataUpdatedAt);
for (let n of t) {
let t = n.state.data;
if (!Array.isArray(t?.pages) || !t.pages.length) continue;
let r = t.pages[t.pages.length - 1];
for (let n of t.pages) for (let t of n.groups || []) {
- let n = pF(t).find((t) => t.id === e);
+ let n = dF(t).find((t) => t.id === e);
if (n) return {
item: n,
group: t,
@@ -40997,7 +41121,7 @@ function _he(e) {
}
return null;
}
-function vhe(e) {
+function xhe(e) {
z.setQueriesData({
queryKey: ["follow-feed"],
predicate: (e) => Array.isArray(e.state.data?.pages)
@@ -41007,7 +41131,7 @@ function vhe(e) {
...t,
groups: (t.groups || []).map((t) => {
let n = (t) => t.id === e.id ? e : t;
- return pF(t).some((t) => t.id === e.id) ? {
+ return dF(t).some((t) => t.id === e.id) ? {
...t,
primary: n(t.primary),
variants: t.variants.map(n),
@@ -41017,39 +41141,39 @@ function vhe(e) {
}))
});
}
-function yhe(e, t) {
+function She(e, t) {
z.setQueriesData({
queryKey: ["follow-feed"],
predicate: (e) => Array.isArray(e.state.data?.pages)
- }, (n) => n && xF(n, null, e, t));
+ }, (n) => n && yF(n, null, e, t));
}
-function mF(e) {
- return pF(e).sort((e, t) => (Date.parse(t.published_at || "") || 0) - (Date.parse(e.published_at || "") || 0) || (+t.id || 0) - (+e.id || 0));
+function fF(e) {
+ return dF(e).sort((e, t) => (Date.parse(t.published_at || "") || 0) - (Date.parse(e.published_at || "") || 0) || (+t.id || 0) - (+e.id || 0));
}
-function hF(e) {
+function pF(e) {
let t = /* @__PURE__ */ new Set(), n = e.media_items || [];
return n.length ? n.forEach((e) => {
(e.media_kind === "image" || e.media_kind === "video") && t.add(e.media_kind);
}) : (e.media_kind === "image" || e.media_kind === "video") && t.add(e.media_kind), t;
}
-function gF(e) {
+function mF(e) {
let t = /* @__PURE__ */ new Set();
- return pF(e).forEach((e) => hF(e).forEach((e) => t.add(e))), t;
+ return dF(e).forEach((e) => pF(e).forEach((e) => t.add(e))), t;
}
-function _F(e, t) {
+function hF(e, t) {
let n = t === "images" ? "image" : "video";
- return mF(e).find((e) => hF(e).has(n)) || e.primary;
+ return fF(e).find((e) => pF(e).has(n)) || e.primary;
}
-function vF(e) {
- return mF(e).filter((e) => e.playable && e.media_kind === "video");
+function gF(e) {
+ return fF(e).filter((e) => e.playable && e.media_kind === "video");
}
-var yF = {
+var _F = {
video: "个视频",
image: "张图片",
mixed: "个媒体"
};
-function bhe({ cover: e = "", coverFace: t = null, stack: n = null, imageView: r = !1, limit: i = 9 } = {}) {
- let a = n?.media || 0, o = n?.copies || 0, s = n?.kind || "", c = a > 1 ? `${a} ${yF[s] || yF.mixed}` : o > 1 ? `${o} 个来源` : "", l = s === "image" || s !== "video" && r ? "pics" : "play", u = /* @__PURE__ */ new Set([t ?? e]), d = e ? [e] : [];
+function Che({ cover: e = "", coverFace: t = null, stack: n = null, imageView: r = !1, limit: i = 9 } = {}) {
+ let a = n?.media || 0, o = n?.copies || 0, s = n?.kind || "", c = a > 1 ? `${a} ${_F[s] || _F.mixed}` : o > 1 ? `${o} 个来源` : "", l = s === "image" || s !== "video" && r ? "pics" : "play", u = /* @__PURE__ */ new Set([t ?? e]), d = e ? [e] : [];
for (let t of n?.faces || []) r && t.media_kind !== "image" || !t.thumb_url || t.thumb_url === e || u.has(t.face) || (u.add(t.face), d.push(t.thumb_url));
return {
isMix: !!c,
@@ -41058,14 +41182,14 @@ function bhe({ cover: e = "", coverFace: t = null, stack: n = null, imageView: r
faces: d.length > 1 ? d.slice(0, i) : []
};
}
-function xhe(e) {
+function whe(e) {
let t = e.filter((e) => e.can_backfill).map((e) => (e.backfill_page || 0) + 1);
if (!t.length) return "";
let n = Math.max(...t), r = Math.min(...t);
return n <= 1 ? "每个来源都只抓了第 1 页" : r === n ? `每个来源都抓到第 ${n} 页` : `已抓到第 ${r}–${n} 页`;
}
-function bF(e, t, n) {
- return e === t ? oF[e] ? {
+function vF(e, t, n) {
+ return e === t ? iF[e] ? {
sort: e,
dir: n === "asc" ? "desc" : "asc"
} : null : {
@@ -41073,13 +41197,13 @@ function bF(e, t, n) {
dir: "desc"
};
}
-function She(e, t, n, r) {
- let i = bF(e, n, r);
+function The(e, t, n, r) {
+ let i = vF(e, n, r);
if (!i) return "";
- let a = oF[i.sort];
+ let a = iF[i.sort];
return `按${t}${a ? a[+(i.dir === "asc")] : ""}排序`;
}
-function xF(e, t, n, r) {
+function yF(e, t, n, r) {
let i = "", a = e.pages.map((e) => ({
...e,
groups: (e.groups || []).flatMap((e) => {
@@ -41109,7 +41233,7 @@ function xF(e, t, n, r) {
})
};
}
-function Che(e, t) {
+function Ehe(e, t) {
let n = [];
return e.author && n.push({
kind: "创作者",
@@ -41129,7 +41253,7 @@ function Che(e, t) {
label: e
})), n;
}
-function whe(e, t) {
+function Dhe(e, t) {
return t.kind === "创作者" ? {
...e,
author: ""
@@ -41144,7 +41268,7 @@ function whe(e, t) {
tags: e.tags.filter((e) => e !== t.key)
};
}
-function The(e, t) {
+function Ohe(e, t) {
for (let n of e) {
let e = n.primary?.tag_types?.[t];
if (e) return e;
@@ -41153,7 +41277,7 @@ function The(e, t) {
}
//#endregion
//#region src/sidebar.ts
-var Ehe = [
+var khe = [
"",
"follow",
"jav",
@@ -41162,7 +41286,7 @@ var Ehe = [
"studios",
"flagged",
"manage"
-], Dhe = [
+], Ahe = [
"playlists",
"immerse",
"stats",
@@ -41172,77 +41296,77 @@ var Ehe = [
"follow-manage",
"quality"
];
-[...Ehe, ...Dhe];
-function Ohe(e) {
+[...khe, ...Ahe];
+function jhe(e) {
let t = /* @__PURE__ */ new Map();
for (let n of e) for (let e of new Set(n.tags || [])) t.set(e, (t.get(e) || 0) + 1);
return [...t].sort((e, t) => t[1] - e[1]).slice(0, 30);
}
//#endregion
//#region src/react/follow-feed/follow-marks.ts
-var SF = (e) => typeof e == "string" ? e : "", CF = (e) => e.aliases;
-function wF(e, t = "") {
- let n = iF(e);
+var bF = (e) => typeof e == "string" ? e : "", xF = (e) => e.aliases;
+function SF(e, t = "") {
+ let n = nF(e);
return n ? `<img data-follow-site-icon="" src="${n}" alt="${P(t)}"${t ? ` title="${P(t)}"` : ""} loading="lazy" data-drop="self">` : "";
}
-var TF = (e, t) => LP(e, CF(t));
-function EF(e, t) {
- let { src: n, fallback: r } = zP(e), i = RP(t);
+var CF = (e, t) => FP(e, xF(t));
+function wF(e, t) {
+ let { src: n, fallback: r } = LP(e), i = IP(t);
if (!n) return `<span class="favatar none" title="没有可用头像">${P(i)}</span>`;
let a = r ? ` data-fallbacks="${P(r)}"` : "";
return `<img class="favatar" src="${P(n)}" alt="" loading="lazy" referrerpolicy="no-referrer" data-drop="initial"${a} data-initial="${P(i)}" data-drop-class="favatar none">`;
}
-function DF(e, t, n) {
- let r = CF(n), i = e.credit, a = i?.poster;
+function TF(e, t, n) {
+ let r = xF(n), i = e.credit, a = i?.poster;
if (!a) {
- let n = LP(t, r);
+ let n = FP(t, r);
return {
- author: n || SF(e.author) || SF(e.source_label) || "创作者未取得",
- avatar: EF(t, n),
+ author: n || bF(e.author) || bF(e.source_label) || "创作者未取得",
+ avatar: wF(t, n),
credited: ""
};
}
- let o = (e) => String(e || "").toLowerCase().replace(/[^a-z0-9]/g, ""), s = n.sources.find((e) => o(e.ref) === o(a)), c = s?.author_key ? n.sources.filter((e) => e.author_key === s.author_key) : s ? [s] : [], l = c.length && LP(c, r) || a;
+ let o = (e) => String(e || "").toLowerCase().replace(/[^a-z0-9]/g, ""), s = n.sources.find((e) => o(e.ref) === o(a)), c = s?.author_key ? n.sources.filter((e) => e.author_key === s.author_key) : s ? [s] : [], l = c.length && FP(c, r) || a;
return {
author: l,
- avatar: EF(c, l),
+ avatar: wF(c, l),
credited: i.credited || ""
};
}
-function OF(e, t = e.primary) {
+function EF(e, t = e.primary) {
let n = [], r = (e, t) => `<small class="javedition" data-follow-edition="${e}">${t}</small>`;
e.primary.variant_kind === "wip" ? n.push(r("wip", "WIP")) : e.has_wip && n.push(r("has-wip", "含 WIP"));
- let i = SF(e.primary.version);
+ let i = bF(e.primary.version);
i && n.push(r("version", P(i)));
- let a = SF(t.audio), o = a === "voiced" ? "配音版" : a === "silent" ? "无声版" : "";
+ let a = bF(t.audio), o = a === "voiced" ? "配音版" : a === "silent" ? "无声版" : "";
return o && n.push(r(a, o)), n.join("");
}
-function kF(e, t = e.primary) {
+function DF(e, t = e.primary) {
let n = new Map([
e.primary,
...e.variants,
...e.duplicates
].filter((e) => e.provider !== t.provider).map((e) => [e.provider, e.provider_label || e.provider]));
if (!n.size) return "";
- let r = [...n].map(([e, t]) => wF(e, t) || `<span>${P(t)}</span>`).join("");
+ let r = [...n].map(([e, t]) => SF(e, t) || `<span>${P(t)}</span>`).join("");
return `<span data-follow-seealso="" title="另见 ${P([...n.values()].join("、"))}">另见 ${r}</span>`;
}
-function AF(e, t) {
- let n = SF(e.media_error);
+function OF(e, t) {
+ let n = bF(e.media_error);
return n ? `媒体未取得:${n}` : e.media_needs_credential && !t.credentials.has(e.provider) ? e.playable ? "部分媒体未取得:需要 F95 登录会话解析" : "媒体未取得:需要 F95 登录会话解析" : "";
}
-var jF = (e) => e.published_at ? xj(e.published_at) : "时间未取得", MF = /* @__PURE__ */ new Set(), NF = [], PF = null;
-function FF() {
- if (PF = null, !NF.length) return;
- let e = NF.splice(0, 200);
+var kF = (e) => e.published_at ? ZA(e.published_at) : "时间未取得", AF = /* @__PURE__ */ new Set(), jF = [], MF = null;
+function NF() {
+ if (MF = null, !jF.length) return;
+ let e = jF.splice(0, 200);
N("/api/follow/image-dims", {
method: "POST",
body: JSON.stringify({ entries: e })
- }).catch(() => {}), NF.length && (PF = setTimeout(FF, 800));
+ }).catch(() => {}), jF.length && (MF = setTimeout(NF, 800));
}
-function khe(e, t, n, r) {
+function Mhe(e, t, n, r) {
let i = `${e}:${t ?? ""}`;
- MF.has(i) || (MF.add(i), NF.push(t === null ? {
+ AF.has(i) || (AF.add(i), jF.push(t === null ? {
item: e,
width: n,
height: r
@@ -41251,15 +41375,15 @@ function khe(e, t, n, r) {
width: n,
height: r,
media: t
- }), PF ||= setTimeout(FF, 800));
+ }), MF ||= setTimeout(NF, 800));
}
//#endregion
//#region src/react/follow-feed/follow-card.tsx
-var Ahe = (e) => Number(e) > 0;
-function jhe(e) {
+var Nhe = (e) => Number(e) > 0;
+function Phe(e) {
return /^\d{4}-/.test(e) ? e.startsWith(String((/* @__PURE__ */ new Date()).getFullYear())) ? e.slice(5, 10) : e.slice(0, 10) : e;
}
-function Mhe({ src: e, width: t, height: n, onLearn: r }) {
+function Fhe({ src: e, width: t, height: n, onLearn: r }) {
let [i, a] = (0, B.useState)(!1);
return i ? null : /* @__PURE__ */ (0, H.jsx)("img", {
src: e,
@@ -41275,8 +41399,8 @@ function Mhe({ src: e, width: t, height: n, onLearn: r }) {
} : void 0
});
}
-function Nhe(e) {
- let { group: t, authorSources: n, media: r, context: i, selected: a, selectMode: o, busy: s, failure: c, actions: l } = e, u = _F(t, r), d = r === "images", f = d ? (u.media_items || []).find((e) => e.media_kind === "image") : void 0, p = f?.thumb_url || u.thumb_url || "", m = f && f.thumb_url === p ? f : null, h = !m || p === u.thumb_url, g = d ? [m, h ? u : null].find((e) => Number(e?.width) > 0 && Number(e?.height) > 0) : null, _ = d && !g && p ? (e, t) => khe(u.id, m ? m.index : null, e, t) : void 0, v = r === "videos" ? vF(t) : [], y = (u.media_items || []).length > 1 ? u.id : v[0]?.id || u.id, b = bhe({
+function Ihe(e) {
+ let { group: t, authorSources: n, media: r, context: i, selected: a, selectMode: o, busy: s, failure: c, actions: l } = e, u = hF(t, r), d = r === "images", f = d ? (u.media_items || []).find((e) => e.media_kind === "image") : void 0, p = f?.thumb_url || u.thumb_url || "", m = f && f.thumb_url === p ? f : null, h = !m || p === u.thumb_url, g = d ? [m, h ? u : null].find((e) => Number(e?.width) > 0 && Number(e?.height) > 0) : null, _ = d && !g && p ? (e, t) => Mhe(u.id, m ? m.index : null, e, t) : void 0, v = r === "videos" ? gF(t) : [], y = (u.media_items || []).length > 1 ? u.id : v[0]?.id || u.id, b = Che({
cover: p,
coverFace: (f?.thumb_url ? f : u).face,
stack: t.stack,
@@ -41284,7 +41408,7 @@ function Nhe(e) {
limit: 9
}), x = (0, B.useRef)(b.faces);
x.current = b.faces;
- let S = JA({
+ let S = wA({
load: async () => x.current,
canFlip: () => x.current.length > 1 && l.canFlip(),
referrerPolicy: "no-referrer"
@@ -41292,7 +41416,7 @@ function Nhe(e) {
C.current = S.onPointerLeave;
let w = (0, B.useCallback)((e) => {
e && (e._stopHover = () => C.current());
- }, []), T = DF(u, n, i), E = jF(u), D = (u.tags || []).slice(0, 3), O = AF(u, i), k = kF(t, u), A = u.status === "saved", j = (e) => {
+ }, []), T = TF(u, n, i), E = kF(u), D = (u.tags || []).slice(0, 3), O = OF(u, i), k = DF(t, u), A = u.status === "saved", j = (e) => {
if (!e.target.closest("[data-media-tag]")) {
if (o || e.shiftKey || e.ctrlKey || e.metaKey) {
e.preventDefault(), l.toggleSelection(u.id, e.shiftKey);
@@ -41326,14 +41450,14 @@ function Nhe(e) {
"data-follow-open": "",
"aria-label": `打开 ${u.title} 详情`
}),
- p ? /* @__PURE__ */ (0, H.jsx)(Mhe, {
+ p ? /* @__PURE__ */ (0, H.jsx)(Fhe, {
src: p,
width: g?.width,
height: g?.height,
onLearn: _
}, p) : /* @__PURE__ */ (0, H.jsx)("span", {
"data-follow-nothumb": "",
- dangerouslySetInnerHTML: { __html: wF(u.resource_provider || u.provider) }
+ dangerouslySetInnerHTML: { __html: SF(u.resource_provider || u.provider) }
}),
b.faces.length > 1 ? /* @__PURE__ */ (0, H.jsx)("div", {
"data-mix-faces": "",
@@ -41352,7 +41476,7 @@ function Nhe(e) {
"data-media-badge": "",
title: u.provider_label,
"aria-label": `来源:${u.provider_label || ""}`,
- dangerouslySetInnerHTML: { __html: wF(u.provider) }
+ dangerouslySetInnerHTML: { __html: SF(u.provider) }
}),
/* @__PURE__ */ (0, H.jsx)("span", {
"data-media-check": "",
@@ -41361,7 +41485,7 @@ function Nhe(e) {
},
dangerouslySetInnerHTML: { __html: L("check") }
}),
- Ahe(u.duration) ? /* @__PURE__ */ (0, H.jsx)("span", {
+ Nhe(u.duration) ? /* @__PURE__ */ (0, H.jsx)("span", {
"data-media-duration": "",
children: ne(u.duration)
}) : null,
@@ -41443,7 +41567,7 @@ function Nhe(e) {
/* @__PURE__ */ (0, H.jsx)("button", {
type: "button",
"data-media-title": "",
- dangerouslySetInnerHTML: { __html: OF(t, u) + P(u.title) }
+ dangerouslySetInnerHTML: { __html: EF(t, u) + P(u.title) }
}),
/* @__PURE__ */ (0, H.jsxs)("div", {
"data-follow-byline": "",
@@ -41454,7 +41578,7 @@ function Nhe(e) {
}), /* @__PURE__ */ (0, H.jsx)("time", {
dateTime: u.published_at || "",
title: E,
- children: jhe(E)
+ children: Phe(E)
})]
}),
T.credited ? /* @__PURE__ */ (0, H.jsx)("div", {
@@ -41490,10 +41614,10 @@ function Nhe(e) {
]
});
}
-var Phe = (0, B.memo)(Nhe), IF = () => /* @__PURE__ */ (0, H.jsx)("span", {
+var Lhe = (0, B.memo)(Ihe), PF = () => /* @__PURE__ */ (0, H.jsx)("span", {
"data-entity-sep": "",
"aria-hidden": "true"
-}), Fhe = gC("settings"), Ihe = gC("chevron-down"), Lhe = gC("history"), Rhe = [[
+}), Rhe = MC("settings"), zhe = MC("chevron-down"), Bhe = MC("history"), Vhe = [[
"fixed",
"固定比例",
"layout-grid"
@@ -41502,19 +41626,19 @@ var Phe = (0, B.memo)(Nhe), IF = () => /* @__PURE__ */ (0, H.jsx)("span", {
"瀑布流",
"columns-2"
]];
-function zhe(e, t, n) {
+function Hhe(e, t, n) {
return (0, B.useMemo)(() => {
let r = e?.groups || [], i = e?.counts || {}, a = e?.sources || [], o = e?.facets || {}, s = new Set(o.authors || []), c = new Map(a.map((e) => [e.provider, e.provider_label || e.provider])), l = new Map((o.providers || []).map((e) => [e, c.get(e) || e])), u = new Map(o.tags || []), d = /* @__PURE__ */ new Map();
a.forEach((e) => {
e.author_key && (d.has(e.author_key) || d.set(e.author_key, []), d.get(e.author_key).push(e));
});
- let f = fF([...d.keys()].filter((e) => s.has(e)), (e) => e, n), p = fF(o.works || [], (e) => e[0], n).slice(0, 24);
+ let f = uF([...d.keys()].filter((e) => s.has(e)), (e) => e, n), p = uF(o.works || [], (e) => e[0], n).slice(0, 24);
t.work && !p.some((e) => e[0] === t.work) && p.push([
t.work,
t.work,
0
]);
- let m = Object.values(i).reduce((e, t) => e + (Number(t) || 0), 0), h = fF([...u], (e) => e[0], n).slice(0, 20);
+ let m = Object.values(i).reduce((e, t) => e + (Number(t) || 0), 0), h = uF([...u], (e) => e[0], n).slice(0, 20);
t.tags.forEach((e) => {
h.some(([t]) => t === e) || h.push([e, u.get(e) || m]);
});
@@ -41522,7 +41646,7 @@ function zhe(e, t, n) {
videos: 0,
images: 0
};
- r.forEach((e) => gF(e).forEach((e) => {
+ r.forEach((e) => mF(e).forEach((e) => {
g[e === "image" ? "images" : "videos"] += 1;
}));
let _ = t.media === "images" ? "image" : "video";
@@ -41537,7 +41661,7 @@ function zhe(e, t, n) {
workRows: p,
allCount: m,
mediaCounts: g,
- visible: r.filter((e) => gF(e).has(_)),
+ visible: r.filter((e) => mF(e).has(_)),
author: d.has(t.author) && s.has(t.author) ? t.author : "",
provider: l.has(t.provider) ? t.provider : "",
workNames: new Map((o.works || []).map((e) => [e[0], e[1]])),
@@ -41550,15 +41674,15 @@ function zhe(e, t, n) {
n
]);
}
-function Bhe(e) {
- let { view: t, seed: n, revision: r, actions: i } = e, a = cF(t, r), o = Tw(a), s = xw({
- queryKey: lF,
- queryFn: ({ signal: e }) => uF(e)
- }), c = (0, B.useMemo)(() => dF(o.data), [o.data]), l = (0, B.useMemo)(() => new Set((s.data?.providers || []).filter((e) => e.present).map((e) => e.provider)), [s.data]), u = (0, B.useMemo)(() => ({
+function Uhe(e) {
+ let { view: t, seed: n, revision: r, actions: i } = e, a = oF(t, r), o = Cw(a), s = yw({
+ queryKey: sF,
+ queryFn: ({ signal: e }) => cF(e)
+ }), c = (0, B.useMemo)(() => lF(o.data), [o.data]), l = (0, B.useMemo)(() => new Set((s.data?.providers || []).filter((e) => e.present).map((e) => e.provider)), [s.data]), u = (0, B.useMemo)(() => ({
sources: c?.sources || [],
aliases: c?.author_aliases || [],
credentials: l
- }), [c, l]), d = zhe(c, t, n), f = o.isPending || o.isPlaceholderData, p = !f && !!c, m = (0, B.useMemo)(() => Ohe(d.visible.flatMap(pF).map((e) => ({ tags: e.tags || [] }))), [d.visible]);
+ }), [c, l]), d = Hhe(c, t, n), f = o.isPending || o.isPlaceholderData, p = !f && !!c, m = (0, B.useMemo)(() => jhe(d.visible.flatMap(dF).map((e) => ({ tags: e.tags || [] }))), [d.visible]);
(0, B.useEffect)(() => {
p && i.loaded(m);
}, [
@@ -41566,20 +41690,20 @@ function Bhe(e) {
m,
i
]);
- let h = Vhe(e, !!c);
- if (!c) return o.isError ? /* @__PURE__ */ (0, H.jsx)(HA, {
+ let h = Whe(e, !!c);
+ if (!c) return o.isError ? /* @__PURE__ */ (0, H.jsx)(cA, {
message: ce(o.error),
onRetry: () => void o.refetch()
}) : null;
let g = (e) => i.route({
...t,
...e
- }), _ = Che({
+ }), _ = Ehe({
...t,
author: d.author,
provider: d.provider
}, {
- authors: new Map([...d.authorSources].map(([e, t]) => [e, TF(t, u)])),
+ authors: new Map([...d.authorSources].map(([e, t]) => [e, CF(t, u)])),
providers: d.providers,
works: d.workNames
}), v = t.status ? d.counts[t.status] || 0 : d.allCount, y = d.sources.some((e) => e.can_backfill);
@@ -41599,7 +41723,7 @@ function Bhe(e) {
"data-follow-head-actions": "",
children: [/* @__PURE__ */ (0, H.jsx)(J, {
variant: "secondary",
- leadingIcon: Fhe,
+ leadingIcon: Rhe,
"data-follow-manage": "",
onClick: i.openManage,
children: "管理关注"
@@ -41616,20 +41740,20 @@ function Bhe(e) {
}) : null]
})]
}),
- /* @__PURE__ */ (0, H.jsx)(Hhe, {
+ /* @__PURE__ */ (0, H.jsx)(Ghe, {
facets: d,
pressed: d.author,
context: u,
props: e,
onPick: (e) => g({ author: d.author === e ? "" : e })
}),
- /* @__PURE__ */ (0, H.jsx)(Uhe, {
+ /* @__PURE__ */ (0, H.jsx)(Khe, {
rows: d.workRows,
pressed: t.work,
props: e,
onPick: (e) => g({ work: t.work === e ? "" : e })
}),
- /* @__PURE__ */ (0, H.jsx)(Whe, {
+ /* @__PURE__ */ (0, H.jsx)(qhe, {
facets: d,
view: t,
total: v,
@@ -41637,9 +41761,9 @@ function Bhe(e) {
props: e,
route: g
}),
- /* @__PURE__ */ (0, H.jsx)(Ghe, {
+ /* @__PURE__ */ (0, H.jsx)(Jhe, {
conditions: _,
- onDrop: (e) => i.route(whe(t, e)),
+ onDrop: (e) => i.route(Dhe(t, e)),
onClear: () => g({
author: "",
provider: "",
@@ -41647,11 +41771,11 @@ function Bhe(e) {
tags: []
})
}),
- d.broken.length ? /* @__PURE__ */ (0, H.jsx)(Khe, {
+ d.broken.length ? /* @__PURE__ */ (0, H.jsx)(Yhe, {
count: d.broken.length,
onManage: i.openManage
}) : null,
- /* @__PURE__ */ (0, H.jsx)(qhe, {
+ /* @__PURE__ */ (0, H.jsx)(Xhe, {
pending: f,
facets: d,
data: c,
@@ -41662,19 +41786,19 @@ function Bhe(e) {
"data-follow-pagination": "",
children: [c.has_more ? /* @__PURE__ */ (0, H.jsx)("span", {
"data-follow-page-action": "",
- children: /* @__PURE__ */ (0, H.jsxs)($A, {
+ children: /* @__PURE__ */ (0, H.jsxs)(kA, {
entity: !0,
enabled: () => !h.busyRef.current,
load: async () => {
await o.fetchNextPage({ throwOnError: !0 });
},
- children: [/* @__PURE__ */ (0, H.jsx)(Ihe, { className: "size-3.5" }), "加载更多"]
+ children: [/* @__PURE__ */ (0, H.jsx)(zhe, { className: "size-3.5" }), "加载更多"]
}, o.data?.pages.length)
}) : null, y ? /* @__PURE__ */ (0, H.jsxs)("span", {
"data-follow-page-action": "",
children: [/* @__PURE__ */ (0, H.jsx)(J, {
variant: "secondary",
- leadingIcon: h.olderBusy ? void 0 : Lhe,
+ leadingIcon: h.olderBusy ? void 0 : Bhe,
"data-follow-older": "",
"aria-busy": h.busy || void 0,
onClick: () => void h.start(!0),
@@ -41684,14 +41808,14 @@ function Bhe(e) {
}), /* @__PURE__ */ (0, H.jsx)("span", { children: "抓取中…" })] }) : "抓更早的一页"
}), /* @__PURE__ */ (0, H.jsx)("span", {
"data-follow-backfill": "",
- children: xhe(d.sources)
+ children: whe(d.sources)
})]
}) : null]
}) : null
]
})] });
}
-function Vhe(e, t) {
+function Whe(e, t) {
let { helpers: n, actions: r } = e, [i, a] = (0, B.useState)(0), [o, s] = (0, B.useState)(!1), [c, l] = (0, B.useState)(""), [u, d] = (0, B.useState)(!1), f = (0, B.useRef)(!1), p = (0, B.useRef)(null), m = (0, B.useRef)({
helpers: n,
actions: r
@@ -41706,7 +41830,7 @@ function Vhe(e, t) {
return m.current.helpers.jobProgress({
host: e,
active: () => t,
- read: (e) => K(yP, e),
+ read: (e) => K(_P, e),
busy: (e) => {
t && (f.current = e, s(e));
},
@@ -41731,7 +41855,7 @@ function Vhe(e, t) {
f.current = !0, l(e ? "older" : "check");
let t = !1;
try {
- let n = await q(yP, e ? {
+ let n = await q(_P, e ? {
older: !0,
background: !0
} : { background: !0 });
@@ -41749,7 +41873,7 @@ function Vhe(e, t) {
olderBusy: c === "older" || u && o
};
}
-function Hhe({ facets: e, pressed: t, context: n, props: r, onPick: i }) {
+function Ghe({ facets: e, pressed: t, context: n, props: r, onPick: i }) {
let a = (0, B.useRef)(null);
return (0, B.useEffect)(() => {
r.helpers.wireDrag(a.current);
@@ -41766,16 +41890,16 @@ function Hhe({ facets: e, pressed: t, context: n, props: r, onPick: i }) {
onClick: () => i(r),
children: [/* @__PURE__ */ (0, H.jsx)("span", {
"data-follow-ring": "",
- dangerouslySetInnerHTML: { __html: EF(a, TF(a, n)) }
+ dangerouslySetInnerHTML: { __html: wF(a, CF(a, n)) }
}), /* @__PURE__ */ (0, H.jsx)("span", {
"data-follow-name": "",
- children: TF(a, n)
+ children: CF(a, n)
})]
}, r);
})
}) : null;
}
-function Uhe({ rows: e, pressed: t, props: n, onPick: r }) {
+function Khe({ rows: e, pressed: t, props: n, onPick: r }) {
let i = (0, B.useRef)(null);
return (0, B.useEffect)(() => {
n.helpers.wireDrag(i.current);
@@ -41796,7 +41920,7 @@ function Uhe({ rows: e, pressed: t, props: n, onPick: r }) {
}, e[0]))
}) : null;
}
-function Whe({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
+function qhe({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
let { helpers: o, actions: s } = i, c = (0, B.useRef)(null), l = (0, B.useRef)(null), u = (0, B.useRef)(null), d = (0, B.useRef)(null), f = (0, B.useRef)(null), p = (0, B.useRef)(null), m = !!e.mediaCounts.images || t.media === "images", h = Sr(c, u, "[data-follow-filter][aria-pressed=\"true\"]", t.status), g = Sr(l, d, "[data-media-view][aria-pressed=\"true\"]", `${t.media}:${m}`);
(0, B.useEffect)(() => {
o.wireDrag(f.current), o.wireDrag(p.current), o.wireScroller(p.current);
@@ -41854,7 +41978,7 @@ function Whe({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
dangerouslySetInnerHTML: { __html: L(i) }
}, e);
})
- }), /* @__PURE__ */ (0, H.jsx)(IF, {})] }) : null, /* @__PURE__ */ (0, H.jsxs)("div", {
+ }), /* @__PURE__ */ (0, H.jsx)(PF, {})] }) : null, /* @__PURE__ */ (0, H.jsxs)("div", {
ref: f,
"data-entity-scroll": "",
children: [/* @__PURE__ */ (0, H.jsxs)("div", {
@@ -41863,7 +41987,7 @@ function Whe({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
"aria-label": "状态",
"data-entity-states": "",
onPointerLeave: h.leave,
- children: [mhe.map(([e, n]) => /* @__PURE__ */ (0, H.jsx)("button", {
+ children: [_he.map(([e, n]) => /* @__PURE__ */ (0, H.jsx)("button", {
type: "button",
"data-entity-state": e,
"data-follow-filter": e,
@@ -41874,7 +41998,7 @@ function Whe({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
t.status !== e && a({ status: e });
},
children: n
- }, e)), v ? /* @__PURE__ */ (0, H.jsx)(IF, {}) : null]
+ }, e)), v ? /* @__PURE__ */ (0, H.jsx)(PF, {}) : null]
}), /* @__PURE__ */ (0, H.jsxs)("div", {
ref: p,
"data-entity-tags": "",
@@ -41887,13 +42011,13 @@ function Whe({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
title: n,
"aria-label": `来源:${n}`,
onClick: () => a({ provider: e.provider === t ? "" : t }),
- dangerouslySetInnerHTML: { __html: wF(t) }
+ dangerouslySetInnerHTML: { __html: SF(t) }
}, t)),
- _.length && e.tagRows.length ? /* @__PURE__ */ (0, H.jsx)(IF, {}) : null,
+ _.length && e.tagRows.length ? /* @__PURE__ */ (0, H.jsx)(PF, {}) : null,
e.tagRows.map(([n, r]) => /* @__PURE__ */ (0, H.jsxs)(vr, {
"data-follow-tag": n,
"data-entity-press": "",
- "data-tag-cat": `r34-${The(e.groups, n)}`,
+ "data-tag-cat": `r34-${Ohe(e.groups, n)}`,
pressed: t.tags.includes(n),
onPress: () => a({ tags: t.tags.includes(n) ? t.tags.filter((e) => e !== n) : [...t.tags, n] }),
children: [Je(n), r ? /* @__PURE__ */ (0, H.jsx)("span", {
@@ -41911,11 +42035,11 @@ function Whe({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
}), /* @__PURE__ */ (0, H.jsxs)("span", {
"data-entity-sorts": "",
children: [
- /* @__PURE__ */ (0, H.jsx)(TC, { onPress: s.shuffle }),
- y ? /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(wC, {
+ /* @__PURE__ */ (0, H.jsx)(IC, { onPress: s.shuffle }),
+ y ? /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(FC, {
label: "图片布局",
value: i.photoLayout,
- options: Rhe,
+ options: Vhe,
onChange: (e) => s.setPhotoLayout(e === "fixed" ? "fixed" : "masonry")
}), /* @__PURE__ */ (0, H.jsxs)("button", {
type: "button",
@@ -41932,17 +42056,17 @@ function Whe({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
dangerouslySetInnerHTML: { __html: L("captions-off") }
})]
})] }) : null,
- hhe.map(([e, n]) => {
- let r = t.sort === e, i = gC(t.dir === "asc" ? "arrow-up" : "arrow-down");
+ vhe.map(([e, n]) => {
+ let r = t.sort === e, i = MC(t.dir === "asc" ? "arrow-up" : "arrow-down");
return /* @__PURE__ */ (0, H.jsxs)("button", {
type: "button",
"data-entity-sort": e,
"data-follow-sort": e,
"data-entity-press": "",
"aria-pressed": r,
- "aria-label": She(e, n, t.sort, t.dir) || void 0,
+ "aria-label": The(e, n, t.sort, t.dir) || void 0,
onClick: () => {
- let n = bF(e, t.sort, t.dir);
+ let n = vF(e, t.sort, t.dir);
n && a(n);
},
children: [n, r ? /* @__PURE__ */ (0, H.jsx)(i, { className: "size-3.5" }) : null]
@@ -41952,7 +42076,7 @@ function Whe({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
})] })
});
}
-function Ghe({ conditions: e, onDrop: t, onClear: n }) {
+function Jhe({ conditions: e, onDrop: t, onClear: n }) {
return /* @__PURE__ */ (0, H.jsx)("div", {
"data-entity-combo": "",
"data-follow-combo": "",
@@ -41977,7 +42101,7 @@ function Ghe({ conditions: e, onDrop: t, onClear: n }) {
})] }) : null
});
}
-function Khe({ count: e, onManage: t }) {
+function Yhe({ count: e, onManage: t }) {
return /* @__PURE__ */ (0, H.jsx)("div", {
"data-follow-broken": "",
onClick: (e) => {
@@ -41986,12 +42110,12 @@ function Khe({ count: e, onManage: t }) {
dangerouslySetInnerHTML: { __html: `<div class="geist-note geist-note-error fwarn" role="alert">${L("alert")}<span>${e} 个来源上次检查失败,去<button type="button" class="flink" data-follow-manage>管理关注</button>看原因。</span></div>` }
});
}
-function qhe({ pending: e, facets: t, data: n, context: r, props: i }) {
- let { view: a, helpers: o } = i, s = a.media === "images", c = VA(e, () => o.listSkeletonHtml(a.media));
+function Xhe({ pending: e, facets: t, data: n, context: r, props: i }) {
+ let { view: a, helpers: o } = i, s = a.media === "images", c = sA(e, () => o.listSkeletonHtml(a.media));
return /* @__PURE__ */ (0, H.jsxs)("div", {
"data-follow-list-body": "",
"data-grid-reveal": c.fading ? "" : void 0,
- children: [c.layer, e ? null : /* @__PURE__ */ (0, H.jsx)(Jhe, {
+ children: [c.layer, e ? null : /* @__PURE__ */ (0, H.jsx)(Zhe, {
facets: t,
data: n,
context: r,
@@ -42000,38 +42124,38 @@ function qhe({ pending: e, facets: t, data: n, context: r, props: i }) {
})]
});
}
-function Jhe({ facets: e, data: t, context: n, props: r, images: i }) {
- let { view: a, actions: o } = r, s = Zhe(r), c = i ? {
+function Zhe({ facets: e, data: t, context: n, props: r, images: i }) {
+ let { view: a, actions: o } = r, s = ege(r), c = i ? {
"data-size": r.photoSize,
"data-layout": r.photoLayout,
"data-images-only": String(r.imagesOnly)
} : {}, l;
return l = e.visible.length ? e.visible.map((t) => {
let i = e.byId.get(t.primary?.source_id), c = i?.author_key && e.authorSources.get(i.author_key) || [], l = t.primary.id;
- return /* @__PURE__ */ (0, H.jsx)(Phe, {
+ return /* @__PURE__ */ (0, H.jsx)(Lhe, {
group: t,
authorSources: c,
media: a.media,
context: n,
- selected: r.selected.has(LF(t, a)),
+ selected: r.selected.has(FF(t, a)),
selectMode: r.selectMode,
- busy: s.busy.get(LF(t, a)) || "",
- failure: s.failures.get(LF(t, a)) || "",
+ busy: s.busy.get(FF(t, a)) || "",
+ failure: s.failures.get(FF(t, a)) || "",
actions: o,
onStatus: s.status,
onSave: s.save
}, `${l}:${a.media}`);
- }) : /* @__PURE__ */ (0, H.jsx)(Yhe, { data: t }), /* @__PURE__ */ (0, H.jsx)("div", {
+ }) : /* @__PURE__ */ (0, H.jsx)(Qhe, { data: t }), /* @__PURE__ */ (0, H.jsx)("div", {
"data-follow-list": "",
"data-follow-wall": i ? "" : void 0,
...c,
children: l
});
}
-function LF(e, t) {
- return _F(e, t.media).id;
+function FF(e, t) {
+ return hF(e, t.media).id;
}
-function Yhe({ data: e }) {
+function Qhe({ data: e }) {
let t = (e.groups || []).length ? o("search-x", "当前筛选下没有更新", "切换媒体类型、创作者、来源或标签后再试。") : (e.sources || []).length ? o("rss", "没有符合条件的更新", "切换状态或来源筛选后再试。") : o("rss", "还没有关注任何来源", "添加创作者或订阅来源后,更新会集中显示在这里。", { actions: "<a class=\"geist-button primary\" href=\"/follow-manage?tab=add\">添加关注</a>" });
return /* @__PURE__ */ (0, H.jsx)("div", {
"data-follow-empty": "",
@@ -42039,36 +42163,36 @@ function Yhe({ data: e }) {
dangerouslySetInnerHTML: { __html: t }
});
}
-var Xhe = {
+var $he = {
new: "已恢复未看",
seen: "已标记已看",
ignored: "已忽略"
};
-function Zhe(e) {
- let { view: t, revision: n, actions: r } = e, [i, a] = (0, B.useState)(() => /* @__PURE__ */ new Map()), [o, s] = (0, B.useState)(() => /* @__PURE__ */ new Map()), c = cF(t, n).queryKey, l = (e, t, n) => n((n) => {
+function ege(e) {
+ let { view: t, revision: n, actions: r } = e, [i, a] = (0, B.useState)(() => /* @__PURE__ */ new Map()), [o, s] = (0, B.useState)(() => /* @__PURE__ */ new Map()), c = oF(t, n).queryKey, l = (e, t, n) => n((n) => {
let r = new Map(n);
return t ? r.set(e, t) : r.delete(e), r;
}), u = (e, n) => {
- z.setQueryData(c, (r) => r && xF(r, t, e, n));
+ z.setQueryData(c, (r) => r && yF(r, t, e, n));
}, d = () => void z.invalidateQueries({
queryKey: c,
exact: !0
}), f = (e) => {
- let t = dF(z.getQueryData(c));
+ let t = lF(z.getQueryData(c));
for (let n of t?.groups || []) for (let t of [
n.primary,
...n.variants,
...n.duplicates
]) if (t.id === e) return t.status;
return "new";
- }, p = ww({
- mutationFn: ({ id: e, to: t }) => q(CP, {
+ }, p = Sw({
+ mutationFn: ({ id: e, to: t }) => q(xP, {
item: e,
to: t
}),
onSuccess: (e, { id: t, to: n, was: i }) => {
- u(t, n), d(), r.toast(Xhe[n] || "已更新关注状态", { undo: i === "saved" ? void 0 : async () => {
- await q(CP, {
+ u(t, n), d(), r.toast($he[n] || "已更新关注状态", { undo: i === "saved" ? void 0 : async () => {
+ await q(xP, {
item: t,
to: i
}), u(t, i), d();
@@ -42078,7 +42202,7 @@ function Zhe(e) {
l(t, ce(e), s), r.failure("更新关注状态", e);
},
onSettled: (e, t, { id: n }) => l(n, "", a)
- }), m = ww({
+ }), m = Sw({
mutationFn: (e) => q("/api/follow/save", { item: e }),
onSuccess: (e, t) => {
u(t, "saved"), d(), r.toast("已保存到账本");
@@ -42113,8 +42237,8 @@ function Zhe(e) {
}
//#endregion
//#region src/react/follow-manage/source-view.tsx
-function RF({ provider: e, label: t }) {
- let n = iF(e), [r, i] = (0, B.useState)(!1);
+function IF({ provider: e, label: t }) {
+ let n = nF(e), [r, i] = (0, B.useState)(!1);
return !n || r ? t ? /* @__PURE__ */ (0, H.jsx)(H.Fragment, { children: t }) : null : /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)("img", {
src: n,
alt: "",
@@ -42125,8 +42249,8 @@ function RF({ provider: e, label: t }) {
className: "size-3.5 shrink-0 rounded-sm object-contain"
}), t ? /* @__PURE__ */ (0, H.jsx)(Jc, { children: t }) : null] });
}
-function zF({ group: e, name: t }) {
- let { src: n, fallback: r } = zP(e), [i, a] = (0, B.useState)(0), o = [n, r].filter(Boolean)[i];
+function LF({ group: e, name: t }) {
+ let { src: n, fallback: r } = LP(e), [i, a] = (0, B.useState)(0), o = [n, r].filter(Boolean)[i];
return o ? /* @__PURE__ */ (0, H.jsx)("img", {
src: o,
alt: "",
@@ -42139,31 +42263,34 @@ function zF({ group: e, name: t }) {
}) : /* @__PURE__ */ (0, H.jsx)("span", {
title: "没有可用头像",
className: "inline-grid size-8 shrink-0 place-items-center rounded-full bg-background-tertiary-default text-caption-1-semibold text-text-secondary",
- children: RP(t)
+ children: IP(t)
});
}
-function BF({ source: e }) {
- let t = MP(e) ? "rose" : e.enabled && e.last_status === "ok" ? "lime" : e.enabled ? "yellow" : "neutral";
- return /* @__PURE__ */ (0, H.jsx)(uA, {
+function RF({ source: e }) {
+ let t = AP(e) ? "rose" : e.enabled && e.last_status === "ok" ? "lime" : e.enabled ? "yellow" : "neutral";
+ return /* @__PURE__ */ (0, H.jsx)(Mk, {
variant: "caption",
color: t,
- children: qme(e)
+ children: Xme(e)
});
}
-function VF({ source: e }) {
- return /* @__PURE__ */ (0, H.jsx)("a", {
+function zF({ source: e }) {
+ return /* @__PURE__ */ (0, H.jsxs)("a", {
href: e.url,
target: "_blank",
rel: "noreferrer noopener",
title: "打开原来源",
className: "min-w-0 text-body-medium break-words text-text-primary underline-offset-2 hover:underline",
- children: e.label
+ children: [e.label, e.nature ? /* @__PURE__ */ (0, H.jsx)("small", {
+ className: "block text-caption-1-regular text-text-secondary",
+ children: e.nature
+ }) : null]
});
}
//#endregion
//#region src/react/follow-manage/add-source.tsx
-var HF = dr(sT, cT, "text-body-2-medium"), Qhe = "粘贴来源链接,或输入创作者名、id…", $he = "查找中…(首次按名字查要下载创作者索引,可能几十秒)", ege = "识别中…", tge = "站内没有查到来源", UF = (e, t) => `${e}:${t.url}`;
-function nge({ field: e, menu: t, options: n, active: r, busy: i, onPick: a, onClose: o }) {
+var BF = dr(aT, oT, "text-body-2-medium"), tge = "粘贴来源链接,或输入创作者名、id…", nge = "查找中…(首次按名字查要下载创作者索引,可能几十秒)", rge = "识别中…", ige = "站内没有查到来源", VF = (e, t) => `${e}:${t.url}`;
+function age({ field: e, menu: t, options: n, active: r, busy: i, onPick: a, onClose: o }) {
return (0, B.useEffect)(() => {
t.current?.querySelector("[aria-current=\"true\"]")?.scrollIntoView({ block: "nearest" });
}, [t, r]), /* @__PURE__ */ (0, H.jsxs)(nm, {
@@ -42178,17 +42305,17 @@ function nge({ field: e, menu: t, options: n, active: r, busy: i, onPick: a, onC
placement: "bottom start",
offset: 4,
"aria-label": "来源建议",
- className: dr(oT, "flex w-(--trigger-width) flex-col gap-1 overscroll-contain"),
+ className: dr(iT, "flex w-(--trigger-width) flex-col gap-1 overscroll-contain"),
children: [i && !n.length ? /* @__PURE__ */ (0, H.jsx)("div", {
className: "px-2 py-1.5",
- children: /* @__PURE__ */ (0, H.jsx)(bT, { label: "正在查找建议" })
+ children: /* @__PURE__ */ (0, H.jsx)(vT, { label: "正在查找建议" })
}) : null, n.map((e, t) => /* @__PURE__ */ (0, H.jsxs)(B.Fragment, { children: [e.group === n[t - 1]?.group ? null : /* @__PURE__ */ (0, H.jsx)("div", {
className: "px-2 pt-1 text-caption-1-regular text-text-tertiary",
children: e.group
}), /* @__PURE__ */ (0, H.jsxs)("button", {
type: "button",
"aria-current": t === r ? "true" : void 0,
- className: t === r ? dr(HF, "bg-background-secondary-default") : HF,
+ className: t === r ? dr(BF, "bg-background-secondary-default") : BF,
onMouseDown: (e) => e.preventDefault(),
onClick: () => a(e.value),
children: [
@@ -42208,7 +42335,7 @@ function nge({ field: e, menu: t, options: n, active: r, busy: i, onPick: a, onC
})] }, `${e.group}-${e.value}`))]
});
}
-function rge({ credentials: e, hidden: t, onHidden: n, openCredentials: r }) {
+function oge({ credentials: e, hidden: t, onHidden: n, openCredentials: r }) {
let i = (0, B.useRef)(null), [a, o] = (0, B.useState)(!1), s = (e.providers || []).filter((e) => e.followable), c = s.filter((e) => !t.has(e.provider_label)).length, l = c === s.length ? "全部来源" : `${c}/${s.length} 个来源`, u = (e, r) => {
let i = new Set(t);
r ? i.delete(e) : i.add(e), n(i);
@@ -42216,7 +42343,7 @@ function rge({ credentials: e, hidden: t, onHidden: n, openCredentials: r }) {
return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(J, {
ref: i,
variant: "secondary",
- leadingIcon: qae,
+ leadingIcon: Yae,
"aria-haspopup": "dialog",
"aria-expanded": a,
"aria-label": l,
@@ -42228,7 +42355,7 @@ function rge({ credentials: e, hidden: t, onHidden: n, openCredentials: r }) {
onOpenChange: o,
placement: "bottom end",
offset: 4,
- className: oT,
+ className: iT,
children: /* @__PURE__ */ (0, H.jsxs)(mh, {
"aria-label": "来源筛选",
className: "flex w-64 flex-col gap-1 outline-none",
@@ -42245,16 +42372,16 @@ function rge({ credentials: e, hidden: t, onHidden: n, openCredentials: r }) {
onClick: () => n(new Set(s.map((e) => e.provider_label))),
children: "全不选"
})]
- }) : /* @__PURE__ */ (0, H.jsx)(jT, { children: "暂无可用来源" }), s.map((e) => {
+ }) : /* @__PURE__ */ (0, H.jsx)(kT, { children: "暂无可用来源" }), s.map((e) => {
let n = e.requirement === "required" && (!e.present || (e.missing || []).length > 0);
return /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex items-center gap-2",
- children: [/* @__PURE__ */ (0, H.jsx)(PM, {
+ children: [/* @__PURE__ */ (0, H.jsx)(uM, {
isSelected: !t.has(e.provider_label),
onChange: (t) => u(e.provider_label, t),
children: /* @__PURE__ */ (0, H.jsxs)("span", {
className: "flex min-w-0 items-center gap-1.5",
- children: [/* @__PURE__ */ (0, H.jsx)(RF, { provider: e.provider }), e.provider_label]
+ children: [/* @__PURE__ */ (0, H.jsx)(IF, { provider: e.provider }), e.provider_label]
})
}), n ? /* @__PURE__ */ (0, H.jsx)(J, {
variant: "ghost",
@@ -42270,7 +42397,7 @@ function rge({ credentials: e, hidden: t, onHidden: n, openCredentials: r }) {
})
})] });
}
-function ige({ row: e, at: t, hidden: n, unpicked: r, onPick: i }) {
+function sge({ row: e, at: t, hidden: n, unpicked: r, onPick: i }) {
if (e.kind === "error") return /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "error",
title: e.line,
@@ -42278,7 +42405,7 @@ function ige({ row: e, at: t, hidden: n, unpicked: r, onPick: i }) {
});
let a = (e.candidates || []).filter((e) => !n.has(e.provider_label || "")), o = Object.entries(e.failures || {});
return /* @__PURE__ */ (0, H.jsxs)("div", {
- className: lT({
+ className: sT({
variant: "outlined",
padding: "none",
className: "flex flex-col gap-2 p-4"
@@ -42289,15 +42416,15 @@ function ige({ row: e, at: t, hidden: n, unpicked: r, onPick: i }) {
children: e.line
}),
a.length ? a.map((e) => {
- let n = UF(t, e);
- return /* @__PURE__ */ (0, H.jsx)(PM, {
+ let n = VF(t, e);
+ return /* @__PURE__ */ (0, H.jsx)(uM, {
isSelected: !e.known && !r.has(n),
isDisabled: e.known,
onChange: (e) => i(n, e),
children: /* @__PURE__ */ (0, H.jsxs)("span", {
className: "flex min-w-0 flex-wrap items-center gap-1.5",
children: [
- /* @__PURE__ */ (0, H.jsx)(RF, { provider: e.provider }),
+ /* @__PURE__ */ (0, H.jsx)(IF, { provider: e.provider }),
/* @__PURE__ */ (0, H.jsx)("b", {
className: "text-body-medium",
children: e.provider_label
@@ -42313,22 +42440,22 @@ function ige({ row: e, at: t, hidden: n, unpicked: r, onPick: i }) {
]
})
}, n);
- }) : /* @__PURE__ */ (0, H.jsx)(jT, { children: tge }),
+ }) : /* @__PURE__ */ (0, H.jsx)(kT, { children: ige }),
(e.external_searches || []).map((e) => /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-wrap items-center gap-2",
children: [/* @__PURE__ */ (0, H.jsx)("small", {
className: "text-caption-1-regular text-text-secondary",
children: e.evidence
- }), /* @__PURE__ */ (0, H.jsx)(PT, {
+ }), /* @__PURE__ */ (0, H.jsx)(MT, {
href: e.url,
children: `${e.label}:${e.query}`
})]
}, e.url)),
- o.length ? /* @__PURE__ */ (0, H.jsx)(jT, { children: o.map(([e, t]) => `${e}:${t}`).join(";") }) : null
+ o.length ? /* @__PURE__ */ (0, H.jsx)(kT, { children: o.map(([e, t]) => `${e}:${t}`).join(";") }) : null
]
});
}
-function age({ data: e, credentials: t, readOnly: n, toast: r, openCredentials: i }) {
+function cge({ data: e, credentials: t, readOnly: n, toast: r, openCredentials: i }) {
let [a, o] = (0, B.useState)(""), [s, c] = (0, B.useState)(""), [l, u] = (0, B.useState)(""), [d, f] = (0, B.useState)(!1), [p, m] = (0, B.useState)(null), [h, g] = (0, B.useState)(-1), _ = (0, B.useRef)(null), v = (0, B.useRef)(null), [y, b] = (0, B.useState)(/* @__PURE__ */ new Set()), [x, S] = (0, B.useState)(/* @__PURE__ */ new Set()), [C, w] = (0, B.useState)(""), [T, E] = (0, B.useState)(0);
(0, B.useEffect)(() => {
let e = a.trim();
@@ -42339,19 +42466,19 @@ function age({ data: e, credentials: t, readOnly: n, toast: r, openCredentials:
let t = setTimeout(() => u(e), 250);
return () => clearTimeout(t);
}, [a]);
- let D = xw({
- queryKey: Vme(l),
- queryFn: ({ signal: e }) => $me(l, e),
+ let D = yw({
+ queryKey: Wme(l),
+ queryFn: ({ signal: e }) => nhe(l, e),
enabled: l.length > 0 && d
}), O = (0, B.useMemo)(() => (D.data?.groups || []).flatMap((e) => e.items.map((t) => ({
value: t.value,
matched: t.matched || "",
n: t.n || 0,
group: e.label
- }))), [D.data]), { job: k, running: A, outcome: j, start: M, dismiss: N } = AM({
- queryKey: Bme,
- queryFn: ({ signal: e }) => Qme(e),
- start: (e) => ehe([e]),
+ }))), [D.data]), { job: k, running: A, outcome: j, start: M, dismiss: N } = oM({
+ queryKey: Ume,
+ queryFn: ({ signal: e }) => the(e),
+ start: (e) => rhe([e]),
onStarted: () => S(/* @__PURE__ */ new Set()),
onError: (e) => w(G(e)),
onFinish: (e) => {
@@ -42385,14 +42512,14 @@ function age({ data: e, credentials: t, readOnly: n, toast: r, openCredentials:
}
}, I = j?.results || [], re = I.flatMap((e, t) => (e.candidates || []).filter((e) => !e.known && !y.has(e.provider_label || "")).map((e) => ({
candidate: e,
- key: UF(t, e)
- })).filter((e) => !x.has(e.key))), L = ww({
+ key: VF(t, e)
+ })).filter((e) => !x.has(e.key))), L = Sw({
mutationFn: async (e) => {
let t = [], n = [];
E(0);
for (let r of e) {
try {
- let e = await the(r.candidate);
+ let e = await ihe(r.candidate);
n.push(e.source);
} catch (e) {
t.push(`${r.candidate.label}:${G(e)}`);
@@ -42400,7 +42527,7 @@ function age({ data: e, credentials: t, readOnly: n, toast: r, openCredentials:
E((e) => e + 1);
}
if (n.length) try {
- await KP(n);
+ await WP(n);
} catch (e) {
t.push(G(e));
}
@@ -42410,7 +42537,7 @@ function age({ data: e, credentials: t, readOnly: n, toast: r, openCredentials:
};
},
onSuccess: (e) => {
- if (nF(), e.failures.length) {
+ if (eF(), e.failures.length) {
w(e.failures.join(";"));
return;
}
@@ -42419,7 +42546,7 @@ function age({ data: e, credentials: t, readOnly: n, toast: r, openCredentials:
onError: (e) => w(G(e))
}), ie = e.suggestions || [], ae = !s.includes("/");
return /* @__PURE__ */ (0, H.jsxs)("div", {
- className: lT({
+ className: sT({
padding: "none",
className: "flex flex-col gap-4 px-6 py-5 max-sm:px-4"
}),
@@ -42439,15 +42566,15 @@ function age({ data: e, credentials: t, readOnly: n, toast: r, openCredentials:
let t = e.relatedTarget;
!e.currentTarget.contains(t) && !v.current?.contains(t) && f(!1);
},
- children: [/* @__PURE__ */ (0, H.jsx)(bA, {
+ children: [/* @__PURE__ */ (0, H.jsx)(zk, {
"aria-label": "来源链接、名字或 id",
- placeholder: Qhe,
+ placeholder: tge,
value: a,
- leadingIcon: Qw,
+ leadingIcon: Xw,
isDisabled: n,
onChange: o,
onKeyDown: ne
- }), P ? /* @__PURE__ */ (0, H.jsx)(nge, {
+ }), P ? /* @__PURE__ */ (0, H.jsx)(age, {
field: _,
menu: v,
options: O,
@@ -42457,7 +42584,7 @@ function age({ data: e, credentials: t, readOnly: n, toast: r, openCredentials:
onClose: F
}) : null]
}),
- /* @__PURE__ */ (0, H.jsx)(rge, {
+ /* @__PURE__ */ (0, H.jsx)(oge, {
credentials: t,
hidden: y,
onHidden: b,
@@ -42475,9 +42602,9 @@ function age({ data: e, credentials: t, readOnly: n, toast: r, openCredentials:
/* @__PURE__ */ (0, H.jsxs)("div", {
"aria-live": "polite",
className: "flex flex-col gap-3 empty:hidden",
- children: [A || M.isPending ? /* @__PURE__ */ (0, H.jsx)(CT, {
+ children: [A || M.isPending ? /* @__PURE__ */ (0, H.jsx)(xT, {
embedded: !0,
- label: k?.message || (k?.total ? `查找中:${k.checked || 0}/${k.total}` : ae ? $he : ege),
+ label: k?.message || (k?.total ? `查找中:${k.checked || 0}/${k.total}` : ae ? nge : rge),
value: k?.checked,
total: k?.total
}) : null, C ? /* @__PURE__ */ (0, H.jsx)(Y, {
@@ -42489,8 +42616,8 @@ function age({ data: e, credentials: t, readOnly: n, toast: r, openCredentials:
I.length ? /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-col gap-3",
children: [
- /* @__PURE__ */ (0, H.jsx)(NT, { children: "查找结果" }),
- I.map((e, t) => /* @__PURE__ */ (0, H.jsx)(ige, {
+ /* @__PURE__ */ (0, H.jsx)(jT, { children: "查找结果" }),
+ I.map((e, t) => /* @__PURE__ */ (0, H.jsx)(sge, {
row: e,
at: t,
hidden: y,
@@ -42545,16 +42672,16 @@ function age({ data: e, credentials: t, readOnly: n, toast: r, openCredentials:
}
//#endregion
//#region src/react/follow-manage/alias-manager.tsx
-var oge = (e) => `将移除别名「${e}」,对应来源恢复为独立创作者组。`, WF = (e) => e.alias;
-function sge(e, t, n) {
+var lge = (e) => `将移除别名「${e}」,对应来源恢复为独立创作者组。`, HF = (e) => e.alias;
+function uge(e, t, n) {
let r = n ? `name:${n}` : "", i = r ? e.find((e) => e.author_key === r) : e.find((e) => e.author_name === t || e.entity_name === t);
return i ? e.filter((e) => e.author_key === i.author_key) : [];
}
-function GF({ sources: e, name: t, canonicalKey: n }) {
+function UF({ sources: e, name: t, canonicalKey: n }) {
return /* @__PURE__ */ (0, H.jsxs)("span", {
className: "flex items-center gap-2",
- children: [/* @__PURE__ */ (0, H.jsx)(zF, {
- group: sge(e, t, n),
+ children: [/* @__PURE__ */ (0, H.jsx)(LF, {
+ group: uge(e, t, n),
name: t
}), /* @__PURE__ */ (0, H.jsx)("b", {
className: "text-body-medium",
@@ -42562,15 +42689,15 @@ function GF({ sources: e, name: t, canonicalKey: n }) {
})]
});
}
-function cge({ groups: e, suggestions: t, sources: n = [], readOnly: i, toast: a }) {
- let [o, s] = (0, B.useState)(/* @__PURE__ */ new Set()), [c, l] = (0, B.useState)(""), [u, d] = (0, B.useState)(""), [f, p] = (0, B.useState)(""), m = ww({
+function dge({ groups: e, suggestions: t, sources: n = [], readOnly: i, toast: a }) {
+ let [o, s] = (0, B.useState)(/* @__PURE__ */ new Set()), [c, l] = (0, B.useState)(""), [u, d] = (0, B.useState)(""), [f, p] = (0, B.useState)(""), m = Sw({
mutationFn: async (e) => {
let t = 0;
for (let n of e) {
try {
- await YP(n.canonical, n.alias);
+ await qP(n.canonical, n.alias);
} catch (n) {
- throw t && nF(), Error(`${G(n)}(还有 ${e.length - t} 组没有合并)`);
+ throw t && eF(), Error(`${G(n)}(还有 ${e.length - t} 组没有合并)`);
}
t += 1;
}
@@ -42580,19 +42707,19 @@ function cge({ groups: e, suggestions: t, sources: n = [], readOnly: i, toast: a
};
},
onSuccess: (e) => {
- l(""), s(/* @__PURE__ */ new Set()), nF(), a(`已合并 ${e.done} 组创作者别名`);
+ l(""), s(/* @__PURE__ */ new Set()), eF(), a(`已合并 ${e.done} 组创作者别名`);
},
onError: (e) => l(G(e))
- }), h = ww({
- mutationFn: (e) => YP(e.canonical, e.alias),
+ }), h = Sw({
+ mutationFn: (e) => qP(e.canonical, e.alias),
onSuccess: () => {
- l(""), d(""), p(""), nF(), a("已保存创作者别名");
+ l(""), d(""), p(""), eF(), a("已保存创作者别名");
},
onError: (e) => l(G(e))
- }), g = ww({
- mutationFn: (e) => nhe(e),
+ }), g = Sw({
+ mutationFn: (e) => ahe(e),
onSuccess: () => {
- l(""), nF(), a("已移除创作者别名");
+ l(""), eF(), a("已移除创作者别名");
},
onError: (e) => l(G(e))
}), _ = (e, t) => {
@@ -42602,9 +42729,9 @@ function cge({ groups: e, suggestions: t, sources: n = [], readOnly: i, toast: a
confirmLabel: t ? "合并全部别名" : "合并所选别名",
onConfirm: () => m.mutateAsync(e)
});
- }, v = t.filter((e) => o.has(WF(e))), y = t.length > 0 && v.length === t.length, b = X(m.isPending);
+ }, v = t.filter((e) => o.has(HF(e))), y = t.length > 0 && v.length === t.length, b = X(m.isPending);
return /* @__PURE__ */ (0, H.jsxs)("div", {
- className: lT({
+ className: sT({
padding: "none",
className: "flex flex-col gap-4 px-6 py-5 max-sm:px-4"
}),
@@ -42615,10 +42742,10 @@ function cge({ groups: e, suggestions: t, sources: n = [], readOnly: i, toast: a
}),
/* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-col gap-2",
- children: [/* @__PURE__ */ (0, H.jsx)(NT, { children: "手动添加别名" }), /* @__PURE__ */ (0, H.jsxs)("div", {
+ children: [/* @__PURE__ */ (0, H.jsx)(jT, { children: "手动添加别名" }), /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-wrap items-end gap-2",
children: [
- /* @__PURE__ */ (0, H.jsx)(bA, {
+ /* @__PURE__ */ (0, H.jsx)(zk, {
"aria-label": "规范创作者名",
placeholder: "规范创作者名",
value: u,
@@ -42626,7 +42753,7 @@ function cge({ groups: e, suggestions: t, sources: n = [], readOnly: i, toast: a
isDisabled: i,
className: "w-56"
}),
- /* @__PURE__ */ (0, H.jsx)(bA, {
+ /* @__PURE__ */ (0, H.jsx)(zk, {
"aria-label": "平台别名",
placeholder: "平台别名",
value: f,
@@ -42647,13 +42774,13 @@ function cge({ groups: e, suggestions: t, sources: n = [], readOnly: i, toast: a
]
})]
}),
- c ? /* @__PURE__ */ (0, H.jsx)(MT, { children: c }) : null,
+ c ? /* @__PURE__ */ (0, H.jsx)(AT, { children: c }) : null,
t.length ? /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-col gap-2",
children: [/* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-wrap items-center gap-2",
children: [
- /* @__PURE__ */ (0, H.jsx)(NT, { children: "待合并" }),
+ /* @__PURE__ */ (0, H.jsx)(jT, { children: "待合并" }),
/* @__PURE__ */ (0, H.jsx)("span", {
className: "mr-auto text-body-2-regular text-text-secondary",
children: `${t.length} 组`
@@ -42675,44 +42802,44 @@ function cge({ groups: e, suggestions: t, sources: n = [], readOnly: i, toast: a
children: `全部合并(${t.length})`
})
]
- }), /* @__PURE__ */ (0, H.jsx)(LM, { children: /* @__PURE__ */ (0, H.jsxs)(FM, {
+ }), /* @__PURE__ */ (0, H.jsx)(pM, { children: /* @__PURE__ */ (0, H.jsxs)(dM, {
"aria-label": "待合并创作者别名",
size: "sm",
- children: [/* @__PURE__ */ (0, H.jsxs)(w_, { children: [
- /* @__PURE__ */ (0, H.jsx)(T_, {
+ children: [/* @__PURE__ */ (0, H.jsxs)(C_, { children: [
+ /* @__PURE__ */ (0, H.jsx)(w_, {
id: "select",
- children: /* @__PURE__ */ (0, H.jsx)(PM, {
+ children: /* @__PURE__ */ (0, H.jsx)(uM, {
slot: null,
isSelected: y,
isIndeterminate: v.length > 0 && !y,
"aria-label": "全选待合并别名",
- onChange: (e) => s(e ? new Set(t.map(WF)) : /* @__PURE__ */ new Set())
+ onChange: (e) => s(e ? new Set(t.map(HF)) : /* @__PURE__ */ new Set())
})
}),
- /* @__PURE__ */ (0, H.jsx)(T_, {
+ /* @__PURE__ */ (0, H.jsx)(w_, {
id: "canonical",
children: "规范创作者"
}),
- /* @__PURE__ */ (0, H.jsx)(T_, {
+ /* @__PURE__ */ (0, H.jsx)(w_, {
id: "alias",
isRowHeader: !0,
children: "平台别名"
}),
- /* @__PURE__ */ (0, H.jsx)(T_, {
+ /* @__PURE__ */ (0, H.jsx)(w_, {
id: "evidence",
children: "依据"
}),
- /* @__PURE__ */ (0, H.jsx)(T_, {
+ /* @__PURE__ */ (0, H.jsx)(w_, {
id: "actions",
children: "操作"
})
- ] }), /* @__PURE__ */ (0, H.jsx)(D_, { children: t.map((e) => {
- let t = WF(e);
- return /* @__PURE__ */ (0, H.jsxs)(A_, {
+ ] }), /* @__PURE__ */ (0, H.jsx)(E_, { children: t.map((e) => {
+ let t = HF(e);
+ return /* @__PURE__ */ (0, H.jsxs)(k_, {
id: t,
"data-board-selected": o.has(t) || void 0,
children: [
- /* @__PURE__ */ (0, H.jsx)(M_, { children: /* @__PURE__ */ (0, H.jsx)(PM, {
+ /* @__PURE__ */ (0, H.jsx)(j_, { children: /* @__PURE__ */ (0, H.jsx)(uM, {
slot: null,
isSelected: o.has(t),
"aria-label": `选择别名 ${e.alias},归入 ${e.canonical}`,
@@ -42721,16 +42848,16 @@ function cge({ groups: e, suggestions: t, sources: n = [], readOnly: i, toast: a
e ? n.add(t) : n.delete(t), s(n);
}
}) }),
- /* @__PURE__ */ (0, H.jsx)(M_, { children: /* @__PURE__ */ (0, H.jsx)(GF, {
+ /* @__PURE__ */ (0, H.jsx)(j_, { children: /* @__PURE__ */ (0, H.jsx)(UF, {
sources: n,
name: e.canonical
}) }),
- /* @__PURE__ */ (0, H.jsx)(M_, { children: e.alias }),
- /* @__PURE__ */ (0, H.jsx)(M_, { children: /* @__PURE__ */ (0, H.jsx)("span", {
+ /* @__PURE__ */ (0, H.jsx)(j_, { children: e.alias }),
+ /* @__PURE__ */ (0, H.jsx)(j_, { children: /* @__PURE__ */ (0, H.jsx)("span", {
className: "text-body-2-regular text-text-secondary",
children: e.evidence
}) }),
- /* @__PURE__ */ (0, H.jsx)(M_, { children: /* @__PURE__ */ (0, H.jsx)(J, {
+ /* @__PURE__ */ (0, H.jsx)(j_, { children: /* @__PURE__ */ (0, H.jsx)(J, {
variant: "secondary",
size: "small",
disabled: i,
@@ -42747,27 +42874,27 @@ function cge({ groups: e, suggestions: t, sources: n = [], readOnly: i, toast: a
className: "flex flex-col gap-2",
children: [/* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-wrap items-center gap-2",
- children: [/* @__PURE__ */ (0, H.jsx)(NT, { children: "已保存别名" }), /* @__PURE__ */ (0, H.jsx)("span", {
+ children: [/* @__PURE__ */ (0, H.jsx)(jT, { children: "已保存别名" }), /* @__PURE__ */ (0, H.jsx)("span", {
className: "text-body-2-regular text-text-secondary",
children: `${e.length} 组`
})]
- }), e.length ? /* @__PURE__ */ (0, H.jsx)(LM, { children: /* @__PURE__ */ (0, H.jsxs)(FM, {
+ }), e.length ? /* @__PURE__ */ (0, H.jsx)(pM, { children: /* @__PURE__ */ (0, H.jsxs)(dM, {
"aria-label": "已保存创作者别名",
size: "sm",
- children: [/* @__PURE__ */ (0, H.jsxs)(w_, { children: [/* @__PURE__ */ (0, H.jsx)(T_, {
+ children: [/* @__PURE__ */ (0, H.jsxs)(C_, { children: [/* @__PURE__ */ (0, H.jsx)(w_, {
id: "canonical",
isRowHeader: !0,
children: "规范创作者"
- }), /* @__PURE__ */ (0, H.jsx)(T_, {
+ }), /* @__PURE__ */ (0, H.jsx)(w_, {
id: "aliases",
children: "平台别名"
- })] }), /* @__PURE__ */ (0, H.jsx)(D_, { children: e.map((e) => /* @__PURE__ */ (0, H.jsxs)(A_, {
+ })] }), /* @__PURE__ */ (0, H.jsx)(E_, { children: e.map((e) => /* @__PURE__ */ (0, H.jsxs)(k_, {
id: e.canonical_key,
- children: [/* @__PURE__ */ (0, H.jsx)(M_, { children: /* @__PURE__ */ (0, H.jsx)(GF, {
+ children: [/* @__PURE__ */ (0, H.jsx)(j_, { children: /* @__PURE__ */ (0, H.jsx)(UF, {
sources: n,
name: e.canonical_name,
canonicalKey: e.canonical_key
- }) }), /* @__PURE__ */ (0, H.jsx)(M_, { children: /* @__PURE__ */ (0, H.jsx)("span", {
+ }) }), /* @__PURE__ */ (0, H.jsx)(j_, { children: /* @__PURE__ */ (0, H.jsx)("span", {
className: "flex flex-wrap items-center gap-1.5",
children: e.aliases.map((e) => /* @__PURE__ */ (0, H.jsxs)("span", {
className: "inline-flex items-center gap-1 rounded-md bg-background-secondary-default px-1.5 py-1 text-caption-1-medium text-text-secondary",
@@ -42775,13 +42902,13 @@ function cge({ groups: e, suggestions: t, sources: n = [], readOnly: i, toast: a
variant: "ghost",
size: "xs",
iconOnly: !0,
- leadingIcon: Vw,
+ leadingIcon: zw,
"aria-label": `移除别名 ${e.name}`,
disabled: i,
...X(g.isPending),
onClick: () => void r({
title: "移除创作者别名",
- body: oge(e.name),
+ body: lge(e.name),
confirmLabel: "移除创作者别名",
onConfirm: () => g.mutateAsync(e.name)
})
@@ -42789,9 +42916,9 @@ function cge({ groups: e, suggestions: t, sources: n = [], readOnly: i, toast: a
}, e.key))
}) })]
}, e.canonical_key)) })]
- }) }) : /* @__PURE__ */ (0, H.jsx)(fA, {
+ }) }) : /* @__PURE__ */ (0, H.jsx)(Nk, {
shell: "plain",
- icon: eT,
+ icon: Qw,
title: "还没有保存创作者别名",
children: "填写规范创作者名和平台别名以添加。"
})]
@@ -42801,33 +42928,33 @@ function cge({ groups: e, suggestions: t, sources: n = [], readOnly: i, toast: a
}
//#endregion
//#region src/react/follow-manage/credentials.tsx
-var lge = "这些账号信息存在哪里", uge = "存成运行 Peach 那台电脑上的一个文件。在 Windows 上它不额外加锁,能登录那台电脑的人都能打开。", dge = "将清除这个来源在本机和共享副本中的登录凭据。", fge = "文件权限过宽。在运行 Peach 的 POSIX 主机上收紧为 0600。";
-function pge(e, t) {
+var fge = "这些账号信息存在哪里", pge = "存成运行 Peach 那台电脑上的一个文件。在 Windows 上它不额外加锁,能登录那台电脑的人都能打开。", mge = "将清除这个来源在本机和共享副本中的登录凭据。", hge = "文件权限过宽。在运行 Peach 的 POSIX 主机上收紧为 0600。";
+function gge(e, t) {
return (e.shared_fields || []).includes(t) ? "来自共享,留空表示不改" : e.fields.includes(t) ? "已保存,留空表示不改" : "未填写";
}
-function mge({ row: e }) {
- if (aF(e)) return /* @__PURE__ */ (0, H.jsx)(uA, {
+function _ge({ row: e }) {
+ if (rF(e)) return /* @__PURE__ */ (0, H.jsx)(Mk, {
variant: "caption",
color: "lime",
children: "已配置"
});
let t = e.requirement === "required" ? "yellow" : e.requirement === "blocked" ? "rose" : "neutral";
- return /* @__PURE__ */ (0, H.jsx)(uA, {
+ return /* @__PURE__ */ (0, H.jsx)(Mk, {
variant: "caption",
color: t,
- children: phe[e.requirement] || ""
+ children: ghe[e.requirement] || ""
});
}
-function hge({ row: e, readOnly: t, toast: n }) {
- let [i, a] = (0, B.useState)({}), [o, s] = (0, B.useState)(""), c = aF(e), l = ww({
- mutationFn: (t) => rhe(e.provider, t),
+function vge({ row: e, readOnly: t, toast: n }) {
+ let [i, a] = (0, B.useState)({}), [o, s] = (0, B.useState)(""), c = rF(e), l = Sw({
+ mutationFn: (t) => ohe(e.provider, t),
onSuccess: (e, t) => {
if (e.note) {
s(e.note);
return;
}
s(""), a({}), z.invalidateQueries({
- queryKey: EP,
+ queryKey: wP,
exact: !0
}), n(Object.keys(t).length ? "已保存来源凭据" : "已清除来源凭据");
},
@@ -42843,17 +42970,17 @@ function hge({ row: e, readOnly: t, toast: n }) {
return /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-col gap-3",
children: [
- /* @__PURE__ */ (0, H.jsxs)(jT, { children: [e.why, e.where ? /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [" ", /* @__PURE__ */ (0, H.jsx)(PT, {
+ /* @__PURE__ */ (0, H.jsxs)(kT, { children: [e.why, e.where ? /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [" ", /* @__PURE__ */ (0, H.jsx)(MT, {
href: e.where,
children: "去取"
})] }) : null] }),
- e.howto ? /* @__PURE__ */ (0, H.jsx)(jT, { children: e.howto }) : null,
+ e.howto ? /* @__PURE__ */ (0, H.jsx)(kT, { children: e.howto }) : null,
/* @__PURE__ */ (0, H.jsx)("div", {
className: "flex w-full flex-col gap-3",
- children: (e.needs || []).map((n) => /* @__PURE__ */ (0, H.jsx)(bA, {
+ children: (e.needs || []).map((n) => /* @__PURE__ */ (0, H.jsx)(zk, {
type: "password",
label: n,
- placeholder: pge(e, n),
+ placeholder: gge(e, n),
autoComplete: "off",
spellCheck: "false",
isDisabled: t,
@@ -42881,7 +43008,7 @@ function hge({ row: e, readOnly: t, toast: n }) {
...X(l.isPending),
onClick: () => void r({
title: "清除来源凭据",
- body: dge,
+ body: mge,
confirmLabel: "清除来源凭据",
danger: !0,
onConfirm: () => l.mutateAsync({})
@@ -42889,9 +43016,9 @@ function hge({ row: e, readOnly: t, toast: n }) {
children: "清除"
}) : null]
}),
- o ? /* @__PURE__ */ (0, H.jsx)(MT, { children: o }) : null,
- (e.shared_fields || []).length ? /* @__PURE__ */ (0, H.jsx)(jT, { children: `${e.shared_fields.join("、")} 是从共享副本回填的,本机没有单独存。清除会把两边一起删。` }) : null,
- e.path ? /* @__PURE__ */ (0, H.jsx)(yT, {
+ o ? /* @__PURE__ */ (0, H.jsx)(AT, { children: o }) : null,
+ (e.shared_fields || []).length ? /* @__PURE__ */ (0, H.jsx)(kT, { children: `${e.shared_fields.join("、")} 是从共享副本回填的,本机没有单独存。清除会把两边一起删。` }) : null,
+ e.path ? /* @__PURE__ */ (0, H.jsx)(_T, {
path: e.path,
className: "font-mono text-caption-1-regular text-text-tertiary",
onRevealed: n
@@ -42899,25 +43026,29 @@ function hge({ row: e, readOnly: t, toast: n }) {
e.world_readable ? /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "error",
title: "凭据文件权限过宽",
- children: fge
+ children: hge
}) : null
]
});
}
-function gge({ row: e, readOnly: t, toast: n }) {
+function yge({ row: e, readOnly: t, toast: n }) {
let r = /* @__PURE__ */ (0, H.jsxs)("span", {
className: "flex min-w-0 items-center gap-2",
children: [
/* @__PURE__ */ (0, H.jsx)("span", {
className: "inline-flex size-3.5 shrink-0 items-center justify-center",
- children: /* @__PURE__ */ (0, H.jsx)(RF, { provider: e.provider })
+ children: /* @__PURE__ */ (0, H.jsx)(IF, { provider: e.provider })
}),
/* @__PURE__ */ (0, H.jsx)("b", {
className: "text-body-medium text-text-primary",
children: e.provider_label
}),
- /* @__PURE__ */ (0, H.jsx)(mge, { row: e }),
- e.missing.length ? /* @__PURE__ */ (0, H.jsx)(uA, {
+ e.nature ? /* @__PURE__ */ (0, H.jsx)("span", {
+ className: "text-caption-1-regular text-text-secondary",
+ children: e.nature
+ }) : null,
+ /* @__PURE__ */ (0, H.jsx)(_ge, { row: e }),
+ e.missing.length ? /* @__PURE__ */ (0, H.jsx)(Mk, {
variant: "caption",
color: "rose",
children: `缺 ${e.missing.join("、")}`
@@ -42926,13 +43057,13 @@ function gge({ row: e, readOnly: t, toast: n }) {
});
return e.requirement === "none" || e.requirement === "blocked" ? /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-wrap items-center gap-3 border-b border-separator-border px-6 py-5 last:border-b-0 max-sm:px-4",
- children: [r, e.requirement === "blocked" ? /* @__PURE__ */ (0, H.jsx)(jT, { children: e.why }) : null]
+ children: [r, e.requirement === "blocked" ? /* @__PURE__ */ (0, H.jsx)(kT, { children: e.why }) : null]
}) : /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-col gap-2 border-b border-separator-border px-6 py-5 last:border-b-0 max-sm:px-4",
- children: [r, /* @__PURE__ */ (0, H.jsx)(LT, {
- summary: aF(e) ? "修改凭据" : "填写凭据",
- defaultOpen: e.requirement === "required" && !aF(e),
- children: /* @__PURE__ */ (0, H.jsx)(hge, {
+ children: [r, /* @__PURE__ */ (0, H.jsx)(FT, {
+ summary: rF(e) ? "修改凭据" : "填写凭据",
+ defaultOpen: e.requirement === "required" && !rF(e),
+ children: /* @__PURE__ */ (0, H.jsx)(vge, {
row: e,
readOnly: t,
toast: n
@@ -42940,10 +43071,10 @@ function gge({ row: e, readOnly: t, toast: n }) {
})]
});
}
-function _ge({ data: e, readOnly: t, toast: n }) {
- let r = e.providers || [], i = r.filter((e) => e.requirement === "required" && !aF(e));
+function bge({ data: e, readOnly: t, toast: n }) {
+ let r = e.providers || [], i = r.filter((e) => e.requirement === "required" && !rF(e));
return r.length ? /* @__PURE__ */ (0, H.jsxs)("div", {
- className: lT({
+ className: sT({
padding: "none",
className: "flex flex-col gap-4 px-6 py-5 max-sm:px-4"
}),
@@ -42978,12 +43109,12 @@ function _ge({ data: e, readOnly: t, toast: n }) {
className: "text-body-medium text-text-secondary",
children: e.title
}), /* @__PURE__ */ (0, H.jsx)("div", {
- className: lT({
+ className: sT({
variant: "outlined",
padding: "none",
className: "flex flex-col overflow-hidden"
}),
- children: e.rows.map((e) => /* @__PURE__ */ (0, H.jsx)(gge, {
+ children: e.rows.map((e) => /* @__PURE__ */ (0, H.jsx)(yge, {
row: e,
readOnly: t,
toast: n
@@ -42995,13 +43126,13 @@ function _ge({ data: e, readOnly: t, toast: n }) {
children: [
/* @__PURE__ */ (0, H.jsx)("b", {
className: "text-body-medium text-text-primary",
- children: lge
+ children: fge
}),
/* @__PURE__ */ (0, H.jsx)("span", {
className: "text-body-2-regular text-text-secondary",
- children: uge
+ children: pge
}),
- /* @__PURE__ */ (0, H.jsx)(yT, {
+ /* @__PURE__ */ (0, H.jsx)(_T, {
path: e.root,
prefix: "凭据文件在 ",
className: "text-body-2-regular text-text-secondary",
@@ -43010,16 +43141,16 @@ function _ge({ data: e, readOnly: t, toast: n }) {
]
})
]
- }) : /* @__PURE__ */ (0, H.jsx)(fA, {
+ }) : /* @__PURE__ */ (0, H.jsx)(Nk, {
shell: "plain",
- icon: Qae,
+ icon: eoe,
title: "没有可配置的来源",
children: "已接入的站点及其凭据状态会显示在这里。"
});
}
//#endregion
//#region node_modules/@tanstack/table-core/build/lib/index.mjs
-function KF() {
+function WF() {
return {
accessor: (e, t) => typeof e == "function" ? {
...t,
@@ -43032,24 +43163,24 @@ function KF() {
group: (e) => e
};
}
-function qF(e, t) {
+function GF(e, t) {
return typeof e == "function" ? e(t) : e;
}
-function JF(e, t) {
+function KF(e, t) {
return (n) => {
t.setState((t) => ({
...t,
- [e]: qF(n, t[e])
+ [e]: GF(n, t[e])
}));
};
}
-function YF(e) {
+function qF(e) {
return e instanceof Function;
}
-function vge(e) {
+function xge(e) {
return Array.isArray(e) && e.every((e) => typeof e == "number");
}
-function yge(e, t) {
+function Sge(e, t) {
let n = [], r = (e) => {
e.forEach((e) => {
n.push(e);
@@ -43059,7 +43190,7 @@ function yge(e, t) {
};
return r(e), n;
}
-function XF(e, t, n) {
+function JF(e, t, n) {
let r = [], i;
return (a) => {
let o;
@@ -43081,21 +43212,21 @@ function XF(e, t, n) {
return i;
};
}
-function ZF(e, t, n, r) {
+function YF(e, t, n, r) {
return {
debug: () => e?.debugAll ?? e[t],
key: !1,
onChange: r
};
}
-function bge(e, t, n, r) {
+function Cge(e, t, n, r) {
let i = {
id: `${t.id}_${n.id}`,
row: t,
column: n,
getValue: () => t.getValue(r),
renderValue: () => i.getValue() ?? e.options.renderFallbackValue,
- getContext: XF(() => [
+ getContext: JF(() => [
e,
n,
t,
@@ -43107,13 +43238,13 @@ function bge(e, t, n, r) {
cell: r,
getValue: r.getValue,
renderValue: r.renderValue
- }), ZF(e.options, "debugCells", "cell.getContext"))
+ }), YF(e.options, "debugCells", "cell.getContext"))
};
return e._features.forEach((r) => {
r.createCell == null || r.createCell(i, n, t, e);
}, {}), i;
}
-function xge(e, t, n, r) {
+function wge(e, t, n, r) {
let i = {
...e._getDefaultColumnDef(),
...t
@@ -43130,17 +43261,17 @@ function xge(e, t, n, r) {
depth: n,
columnDef: i,
columns: [],
- getFlatColumns: XF(() => [!0], () => [c, ...c.columns?.flatMap((e) => e.getFlatColumns())], ZF(e.options, "debugColumns", "column.getFlatColumns")),
- getLeafColumns: XF(() => [e._getOrderColumnsFn()], (e) => {
+ getFlatColumns: JF(() => [!0], () => [c, ...c.columns?.flatMap((e) => e.getFlatColumns())], YF(e.options, "debugColumns", "column.getFlatColumns")),
+ getLeafColumns: JF(() => [e._getOrderColumnsFn()], (e) => {
var t;
return (t = c.columns) != null && t.length ? e(c.columns.flatMap((e) => e.getLeafColumns())) : [c];
- }, ZF(e.options, "debugColumns", "column.getLeafColumns"))
+ }, YF(e.options, "debugColumns", "column.getLeafColumns"))
};
for (let t of e._features) t.createColumn == null || t.createColumn(c, e);
return c;
}
-var QF = "debugHeaders";
-function $F(e, t, n) {
+var XF = "debugHeaders";
+function ZF(e, t, n) {
let r = {
id: n.id ?? t.id,
column: t,
@@ -43168,42 +43299,42 @@ function $F(e, t, n) {
t.createHeader == null || t.createHeader(r, e);
}), r;
}
-var Sge = { createTable: (e) => {
- e.getHeaderGroups = XF(() => [
+var Tge = { createTable: (e) => {
+ e.getHeaderGroups = JF(() => [
e.getAllColumns(),
e.getVisibleLeafColumns(),
e.getState().columnPinning.left,
e.getState().columnPinning.right
], (t, n, r, i) => {
let a = r?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], o = i?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], s = n.filter((e) => !(r != null && r.includes(e.id)) && !(i != null && i.includes(e.id)));
- return eI(t, [
+ return QF(t, [
...a,
...s,
...o
], e);
- }, ZF(e.options, QF, "getHeaderGroups")), e.getCenterHeaderGroups = XF(() => [
+ }, YF(e.options, XF, "getHeaderGroups")), e.getCenterHeaderGroups = JF(() => [
e.getAllColumns(),
e.getVisibleLeafColumns(),
e.getState().columnPinning.left,
e.getState().columnPinning.right
- ], (t, n, r, i) => (n = n.filter((e) => !(r != null && r.includes(e.id)) && !(i != null && i.includes(e.id))), eI(t, n, e, "center")), ZF(e.options, QF, "getCenterHeaderGroups")), e.getLeftHeaderGroups = XF(() => [
+ ], (t, n, r, i) => (n = n.filter((e) => !(r != null && r.includes(e.id)) && !(i != null && i.includes(e.id))), QF(t, n, e, "center")), YF(e.options, XF, "getCenterHeaderGroups")), e.getLeftHeaderGroups = JF(() => [
e.getAllColumns(),
e.getVisibleLeafColumns(),
e.getState().columnPinning.left
- ], (t, n, r) => eI(t, r?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], e, "left"), ZF(e.options, QF, "getLeftHeaderGroups")), e.getRightHeaderGroups = XF(() => [
+ ], (t, n, r) => QF(t, r?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], e, "left"), YF(e.options, XF, "getLeftHeaderGroups")), e.getRightHeaderGroups = JF(() => [
e.getAllColumns(),
e.getVisibleLeafColumns(),
e.getState().columnPinning.right
- ], (t, n, r) => eI(t, r?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], e, "right"), ZF(e.options, QF, "getRightHeaderGroups")), e.getFooterGroups = XF(() => [e.getHeaderGroups()], (e) => [...e].reverse(), ZF(e.options, QF, "getFooterGroups")), e.getLeftFooterGroups = XF(() => [e.getLeftHeaderGroups()], (e) => [...e].reverse(), ZF(e.options, QF, "getLeftFooterGroups")), e.getCenterFooterGroups = XF(() => [e.getCenterHeaderGroups()], (e) => [...e].reverse(), ZF(e.options, QF, "getCenterFooterGroups")), e.getRightFooterGroups = XF(() => [e.getRightHeaderGroups()], (e) => [...e].reverse(), ZF(e.options, QF, "getRightFooterGroups")), e.getFlatHeaders = XF(() => [e.getHeaderGroups()], (e) => e.map((e) => e.headers).flat(), ZF(e.options, QF, "getFlatHeaders")), e.getLeftFlatHeaders = XF(() => [e.getLeftHeaderGroups()], (e) => e.map((e) => e.headers).flat(), ZF(e.options, QF, "getLeftFlatHeaders")), e.getCenterFlatHeaders = XF(() => [e.getCenterHeaderGroups()], (e) => e.map((e) => e.headers).flat(), ZF(e.options, QF, "getCenterFlatHeaders")), e.getRightFlatHeaders = XF(() => [e.getRightHeaderGroups()], (e) => e.map((e) => e.headers).flat(), ZF(e.options, QF, "getRightFlatHeaders")), e.getCenterLeafHeaders = XF(() => [e.getCenterFlatHeaders()], (e) => e.filter((e) => {
+ ], (t, n, r) => QF(t, r?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], e, "right"), YF(e.options, XF, "getRightHeaderGroups")), e.getFooterGroups = JF(() => [e.getHeaderGroups()], (e) => [...e].reverse(), YF(e.options, XF, "getFooterGroups")), e.getLeftFooterGroups = JF(() => [e.getLeftHeaderGroups()], (e) => [...e].reverse(), YF(e.options, XF, "getLeftFooterGroups")), e.getCenterFooterGroups = JF(() => [e.getCenterHeaderGroups()], (e) => [...e].reverse(), YF(e.options, XF, "getCenterFooterGroups")), e.getRightFooterGroups = JF(() => [e.getRightHeaderGroups()], (e) => [...e].reverse(), YF(e.options, XF, "getRightFooterGroups")), e.getFlatHeaders = JF(() => [e.getHeaderGroups()], (e) => e.map((e) => e.headers).flat(), YF(e.options, XF, "getFlatHeaders")), e.getLeftFlatHeaders = JF(() => [e.getLeftHeaderGroups()], (e) => e.map((e) => e.headers).flat(), YF(e.options, XF, "getLeftFlatHeaders")), e.getCenterFlatHeaders = JF(() => [e.getCenterHeaderGroups()], (e) => e.map((e) => e.headers).flat(), YF(e.options, XF, "getCenterFlatHeaders")), e.getRightFlatHeaders = JF(() => [e.getRightHeaderGroups()], (e) => e.map((e) => e.headers).flat(), YF(e.options, XF, "getRightFlatHeaders")), e.getCenterLeafHeaders = JF(() => [e.getCenterFlatHeaders()], (e) => e.filter((e) => {
var t;
return !((t = e.subHeaders) != null && t.length);
- }), ZF(e.options, QF, "getCenterLeafHeaders")), e.getLeftLeafHeaders = XF(() => [e.getLeftFlatHeaders()], (e) => e.filter((e) => {
+ }), YF(e.options, XF, "getCenterLeafHeaders")), e.getLeftLeafHeaders = JF(() => [e.getLeftFlatHeaders()], (e) => e.filter((e) => {
var t;
return !((t = e.subHeaders) != null && t.length);
- }), ZF(e.options, QF, "getLeftLeafHeaders")), e.getRightLeafHeaders = XF(() => [e.getRightFlatHeaders()], (e) => e.filter((e) => {
+ }), YF(e.options, XF, "getLeftLeafHeaders")), e.getRightLeafHeaders = JF(() => [e.getRightFlatHeaders()], (e) => e.filter((e) => {
var t;
return !((t = e.subHeaders) != null && t.length);
- }), ZF(e.options, QF, "getRightLeafHeaders")), e.getLeafHeaders = XF(() => [
+ }), YF(e.options, XF, "getRightLeafHeaders")), e.getLeafHeaders = JF(() => [
e.getLeftHeaderGroups(),
e.getCenterHeaderGroups(),
e.getRightHeaderGroups()
@@ -43211,9 +43342,9 @@ var Sge = { createTable: (e) => {
...e[0]?.headers ?? [],
...t[0]?.headers ?? [],
...n[0]?.headers ?? []
- ].map((e) => e.getLeafHeaders()).flat(), ZF(e.options, QF, "getLeafHeaders"));
+ ].map((e) => e.getLeafHeaders()).flat(), YF(e.options, XF, "getLeafHeaders"));
} };
-function eI(e, t, n, r) {
+function QF(e, t, n, r) {
let i = 0, a = function(e, t) {
t === void 0 && (t = 1), i = Math.max(i, t), e.filter((e) => e.getIsVisible()).forEach((e) => {
var n;
@@ -43231,7 +43362,7 @@ function eI(e, t, n, r) {
let o = [...a].reverse()[0], s = e.column.depth === i.depth, c, l = !1;
if (s && e.column.parent ? c = e.column.parent : (c = e.column, l = !0), o && o?.column === c) o.subHeaders.push(e);
else {
- let i = $F(n, c, {
+ let i = ZF(n, c, {
id: [
r,
t,
@@ -43248,7 +43379,7 @@ function eI(e, t, n, r) {
i.headers.push(e), e.headerGroup = i;
}), o.push(i), t > 0 && s(a, t - 1);
};
- s(t.map((e, t) => $F(n, e, {
+ s(t.map((e, t) => ZF(n, e, {
depth: i,
index: t
})), i - 1), o.reverse();
@@ -43266,7 +43397,7 @@ function eI(e, t, n, r) {
});
return c(o[0]?.headers ?? []), o;
}
-var Cge = (e, t, n, r, i, a, o) => {
+var Ege = (e, t, n, r, i, a, o) => {
let s = {
id: t,
index: r,
@@ -43287,7 +43418,7 @@ var Cge = (e, t, n, r, i, a, o) => {
},
renderValue: (t) => s.getValue(t) ?? e.options.renderFallbackValue,
subRows: a ?? [],
- getLeafRows: () => yge(s.subRows, (e) => e.subRows),
+ getLeafRows: () => Sge(s.subRows, (e) => e.subRows),
getParentRow: () => s.parentId ? e.getRow(s.parentId, !0) : void 0,
getParentRows: () => {
let e = [], t = s;
@@ -43298,95 +43429,95 @@ var Cge = (e, t, n, r, i, a, o) => {
}
return e.reverse();
},
- getAllCells: XF(() => [e.getAllLeafColumns()], (t) => t.map((t) => bge(e, s, t, t.id)), ZF(e.options, "debugRows", "getAllCells")),
- _getAllCellsByColumnId: XF(() => [s.getAllCells()], (e) => e.reduce((e, t) => (e[t.column.id] = t, e), {}), ZF(e.options, "debugRows", "getAllCellsByColumnId"))
+ getAllCells: JF(() => [e.getAllLeafColumns()], (t) => t.map((t) => Cge(e, s, t, t.id)), YF(e.options, "debugRows", "getAllCells")),
+ _getAllCellsByColumnId: JF(() => [s.getAllCells()], (e) => e.reduce((e, t) => (e[t.column.id] = t, e), {}), YF(e.options, "debugRows", "getAllCellsByColumnId"))
};
for (let t = 0; t < e._features.length; t++) {
let n = e._features[t];
n == null || n.createRow == null || n.createRow(s, e);
}
return s;
-}, wge = { createColumn: (e, t) => {
+}, Dge = { createColumn: (e, t) => {
e._getFacetedRowModel = t.options.getFacetedRowModel && t.options.getFacetedRowModel(t, e.id), e.getFacetedRowModel = () => e._getFacetedRowModel ? e._getFacetedRowModel() : t.getPreFilteredRowModel(), e._getFacetedUniqueValues = t.options.getFacetedUniqueValues && t.options.getFacetedUniqueValues(t, e.id), e.getFacetedUniqueValues = () => e._getFacetedUniqueValues ? e._getFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getFacetedMinMaxValues = t.options.getFacetedMinMaxValues && t.options.getFacetedMinMaxValues(t, e.id), e.getFacetedMinMaxValues = () => {
if (e._getFacetedMinMaxValues) return e._getFacetedMinMaxValues();
};
-} }, tI = (e, t, n) => {
+} }, $F = (e, t, n) => {
var r, i;
let a = n == null || (r = n.toString()) == null ? void 0 : r.toLowerCase();
return !!((i = e.getValue(t)) != null && (i = i.toString()) != null && (i = i.toLowerCase()) != null && i.includes(a));
};
-tI.autoRemove = (e) => dI(e);
-var nI = (e, t, n) => {
+$F.autoRemove = (e) => lI(e);
+var eI = (e, t, n) => {
var r;
return !!((r = e.getValue(t)) != null && (r = r.toString()) != null && r.includes(n));
};
-nI.autoRemove = (e) => dI(e);
-var rI = (e, t, n) => {
+eI.autoRemove = (e) => lI(e);
+var tI = (e, t, n) => {
var r;
return ((r = e.getValue(t)) == null || (r = r.toString()) == null ? void 0 : r.toLowerCase()) === n?.toLowerCase();
};
-rI.autoRemove = (e) => dI(e);
-var iI = (e, t, n) => e.getValue(t)?.includes(n);
-iI.autoRemove = (e) => dI(e);
-var aI = (e, t, n) => !n.some((n) => {
+tI.autoRemove = (e) => lI(e);
+var nI = (e, t, n) => e.getValue(t)?.includes(n);
+nI.autoRemove = (e) => lI(e);
+var rI = (e, t, n) => !n.some((n) => {
var r;
return !((r = e.getValue(t)) != null && r.includes(n));
});
-aI.autoRemove = (e) => dI(e) || !(e != null && e.length);
-var oI = (e, t, n) => n.some((n) => e.getValue(t)?.includes(n));
-oI.autoRemove = (e) => dI(e) || !(e != null && e.length);
-var sI = (e, t, n) => e.getValue(t) === n;
-sI.autoRemove = (e) => dI(e);
-var cI = (e, t, n) => e.getValue(t) == n;
-cI.autoRemove = (e) => dI(e);
-var lI = (e, t, n) => {
+rI.autoRemove = (e) => lI(e) || !(e != null && e.length);
+var iI = (e, t, n) => n.some((n) => e.getValue(t)?.includes(n));
+iI.autoRemove = (e) => lI(e) || !(e != null && e.length);
+var aI = (e, t, n) => e.getValue(t) === n;
+aI.autoRemove = (e) => lI(e);
+var oI = (e, t, n) => e.getValue(t) == n;
+oI.autoRemove = (e) => lI(e);
+var sI = (e, t, n) => {
let [r, i] = n, a = e.getValue(t);
return a >= r && a <= i;
};
-lI.resolveFilterValue = (e) => {
+sI.resolveFilterValue = (e) => {
let [t, n] = e, r = typeof t == "number" ? t : parseFloat(t), i = typeof n == "number" ? n : parseFloat(n), a = t === null || Number.isNaN(r) ? -Infinity : r, o = n === null || Number.isNaN(i) ? Infinity : i;
if (a > o) {
let e = a;
a = o, o = e;
}
return [a, o];
-}, lI.autoRemove = (e) => dI(e) || dI(e[0]) && dI(e[1]);
-var uI = {
- includesString: tI,
- includesStringSensitive: nI,
- equalsString: rI,
- arrIncludes: iI,
- arrIncludesAll: aI,
- arrIncludesSome: oI,
- equals: sI,
- weakEquals: cI,
- inNumberRange: lI
+}, sI.autoRemove = (e) => lI(e) || lI(e[0]) && lI(e[1]);
+var cI = {
+ includesString: $F,
+ includesStringSensitive: eI,
+ equalsString: tI,
+ arrIncludes: nI,
+ arrIncludesAll: rI,
+ arrIncludesSome: iI,
+ equals: aI,
+ weakEquals: oI,
+ inNumberRange: sI
};
-function dI(e) {
+function lI(e) {
return e == null || e === "";
}
-var Tge = {
+var Oge = {
getDefaultColumnDef: () => ({ filterFn: "auto" }),
getInitialState: (e) => ({
columnFilters: [],
...e
}),
getDefaultOptions: (e) => ({
- onColumnFiltersChange: JF("columnFilters", e),
+ onColumnFiltersChange: KF("columnFilters", e),
filterFromLeafRows: !1,
maxLeafRowFilterDepth: 100
}),
createColumn: (e, t) => {
e.getAutoFilterFn = () => {
let n = t.getCoreRowModel().flatRows[0]?.getValue(e.id);
- return typeof n == "string" ? uI.includesString : typeof n == "number" ? uI.inNumberRange : typeof n == "boolean" || typeof n == "object" && n ? uI.equals : Array.isArray(n) ? uI.arrIncludes : uI.weakEquals;
- }, e.getFilterFn = () => YF(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : t.options.filterFns?.[e.columnDef.filterFn] ?? uI[e.columnDef.filterFn], e.getCanFilter = () => (e.columnDef.enableColumnFilter ?? !0) && (t.options.enableColumnFilters ?? !0) && (t.options.enableFilters ?? !0) && !!e.accessorFn, e.getIsFiltered = () => e.getFilterIndex() > -1, e.getFilterValue = () => {
+ return typeof n == "string" ? cI.includesString : typeof n == "number" ? cI.inNumberRange : typeof n == "boolean" || typeof n == "object" && n ? cI.equals : Array.isArray(n) ? cI.arrIncludes : cI.weakEquals;
+ }, e.getFilterFn = () => qF(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : t.options.filterFns?.[e.columnDef.filterFn] ?? cI[e.columnDef.filterFn], e.getCanFilter = () => (e.columnDef.enableColumnFilter ?? !0) && (t.options.enableColumnFilters ?? !0) && (t.options.enableFilters ?? !0) && !!e.accessorFn, e.getIsFiltered = () => e.getFilterIndex() > -1, e.getFilterValue = () => {
var n;
return (n = t.getState().columnFilters) == null || (n = n.find((t) => t.id === e.id)) == null ? void 0 : n.value;
}, e.getFilterIndex = () => t.getState().columnFilters?.findIndex((t) => t.id === e.id) ?? -1, e.setFilterValue = (n) => {
t.setColumnFilters((t) => {
- let r = e.getFilterFn(), i = t?.find((t) => t.id === e.id), a = qF(n, i ? i.value : void 0);
- if (fI(r, a, e)) return t?.filter((t) => t.id !== e.id) ?? [];
+ let r = e.getFilterFn(), i = t?.find((t) => t.id === e.id), a = GF(n, i ? i.value : void 0);
+ if (uI(r, a, e)) return t?.filter((t) => t.id !== e.id) ?? [];
let o = {
id: e.id,
value: a
@@ -43401,19 +43532,19 @@ var Tge = {
createTable: (e) => {
e.setColumnFilters = (t) => {
let n = e.getAllLeafColumns();
- e.options.onColumnFiltersChange == null || e.options.onColumnFiltersChange((e) => qF(t, e)?.filter((e) => {
+ e.options.onColumnFiltersChange == null || e.options.onColumnFiltersChange((e) => GF(t, e)?.filter((e) => {
let t = n.find((t) => t.id === e.id);
- return !(t && fI(t.getFilterFn(), e.value, t));
+ return !(t && uI(t.getFilterFn(), e.value, t));
}));
}, e.resetColumnFilters = (t) => {
e.setColumnFilters(t ? [] : e.initialState?.columnFilters ?? []);
}, e.getPreFilteredRowModel = () => e.getCoreRowModel(), e.getFilteredRowModel = () => (!e._getFilteredRowModel && e.options.getFilteredRowModel && (e._getFilteredRowModel = e.options.getFilteredRowModel(e)), e.options.manualFiltering || !e._getFilteredRowModel ? e.getPreFilteredRowModel() : e._getFilteredRowModel());
}
};
-function fI(e, t, n) {
+function uI(e, t, n) {
return (e && e.autoRemove ? e.autoRemove(t, n) : !1) || t === void 0 || typeof t == "string" && !t;
}
-var pI = {
+var dI = {
sum: (e, t, n) => n.reduce((t, n) => {
let r = n.getValue(e);
return t + (typeof r == "number" ? r : 0);
@@ -43449,7 +43580,7 @@ var pI = {
median: (e, t) => {
if (!t.length) return;
let n = t.map((t) => t.getValue(e));
- if (!vge(n)) return;
+ if (!xge(n)) return;
if (n.length === 1) return n[0];
let r = Math.floor(n.length / 2), i = n.sort((e, t) => e - t);
return n.length % 2 == 0 ? (i[r - 1] + i[r]) / 2 : i[r];
@@ -43457,7 +43588,7 @@ var pI = {
unique: (e, t) => Array.from(new Set(t.map((t) => t.getValue(e))).values()),
uniqueCount: (e, t) => new Set(t.map((t) => t.getValue(e))).size,
count: (e, t) => t.length
-}, Ege = {
+}, kge = {
getDefaultColumnDef: () => ({
aggregatedCell: (e) => {
var t;
@@ -43470,7 +43601,7 @@ var pI = {
...e
}),
getDefaultOptions: (e) => ({
- onGroupingChange: JF("grouping", e),
+ onGroupingChange: KF("grouping", e),
groupedColumnMode: "reorder"
}),
createColumn: (e, t) => {
@@ -43483,11 +43614,11 @@ var pI = {
};
}, e.getAutoAggregationFn = () => {
let n = t.getCoreRowModel().flatRows[0]?.getValue(e.id);
- if (typeof n == "number") return pI.sum;
- if (Object.prototype.toString.call(n) === "[object Date]") return pI.extent;
+ if (typeof n == "number") return dI.sum;
+ if (Object.prototype.toString.call(n) === "[object Date]") return dI.extent;
}, e.getAggregationFn = () => {
if (!e) throw Error();
- return YF(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : t.options.aggregationFns?.[e.columnDef.aggregationFn] ?? pI[e.columnDef.aggregationFn];
+ return qF(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : t.options.aggregationFns?.[e.columnDef.aggregationFn] ?? dI[e.columnDef.aggregationFn];
};
},
createTable: (e) => {
@@ -43509,27 +43640,27 @@ var pI = {
};
}
};
-function Dge(e, t, n) {
+function Age(e, t, n) {
if (!(t != null && t.length) || !n) return e;
let r = e.filter((e) => !t.includes(e.id));
return n === "remove" ? r : [...t.map((t) => e.find((e) => e.id === t)).filter(Boolean), ...r];
}
-var Oge = {
+var jge = {
getInitialState: (e) => ({
columnOrder: [],
...e
}),
- getDefaultOptions: (e) => ({ onColumnOrderChange: JF("columnOrder", e) }),
+ getDefaultOptions: (e) => ({ onColumnOrderChange: KF("columnOrder", e) }),
createColumn: (e, t) => {
- e.getIndex = XF((e) => [yI(t, e)], (t) => t.findIndex((t) => t.id === e.id), ZF(t.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (n) => yI(t, n)[0]?.id === e.id, e.getIsLastColumn = (n) => {
- let r = yI(t, n);
+ e.getIndex = JF((e) => [_I(t, e)], (t) => t.findIndex((t) => t.id === e.id), YF(t.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (n) => _I(t, n)[0]?.id === e.id, e.getIsLastColumn = (n) => {
+ let r = _I(t, n);
return r[r.length - 1]?.id === e.id;
};
},
createTable: (e) => {
e.setColumnOrder = (t) => e.options.onColumnOrderChange == null ? void 0 : e.options.onColumnOrderChange(t), e.resetColumnOrder = (t) => {
e.setColumnOrder(t ? [] : e.initialState.columnOrder ?? []);
- }, e._getOrderColumnsFn = XF(() => [
+ }, e._getOrderColumnsFn = JF(() => [
e.getState().columnOrder,
e.getState().grouping,
e.options.groupedColumnMode
@@ -43544,18 +43675,18 @@ var Oge = {
}
i = [...i, ...n];
}
- return Dge(i, t, n);
- }, ZF(e.options, "debugTable", "_getOrderColumnsFn"));
+ return Age(i, t, n);
+ }, YF(e.options, "debugTable", "_getOrderColumnsFn"));
}
-}, mI = () => ({
+}, fI = () => ({
left: [],
right: []
-}), kge = {
+}), Mge = {
getInitialState: (e) => ({
- columnPinning: mI(),
+ columnPinning: fI(),
...e
}),
- getDefaultOptions: (e) => ({ onColumnPinningChange: JF("columnPinning", e) }),
+ getDefaultOptions: (e) => ({ onColumnPinningChange: KF("columnPinning", e) }),
createColumn: (e, t) => {
e.pin = (n) => {
let r = e.getLeafColumns().map((e) => e.id).filter(Boolean);
@@ -43579,75 +43710,75 @@ var Oge = {
};
},
createRow: (e, t) => {
- e.getCenterVisibleCells = XF(() => [
+ e.getCenterVisibleCells = JF(() => [
e._getAllVisibleCells(),
t.getState().columnPinning.left,
t.getState().columnPinning.right
], (e, t, n) => {
let r = [...t ?? [], ...n ?? []];
return e.filter((e) => !r.includes(e.column.id));
- }, ZF(t.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = XF(() => [e._getAllVisibleCells(), t.getState().columnPinning.left], (e, t) => (t ?? []).map((t) => e.find((e) => e.column.id === t)).filter(Boolean).map((e) => ({
+ }, YF(t.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = JF(() => [e._getAllVisibleCells(), t.getState().columnPinning.left], (e, t) => (t ?? []).map((t) => e.find((e) => e.column.id === t)).filter(Boolean).map((e) => ({
...e,
position: "left"
- })), ZF(t.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = XF(() => [e._getAllVisibleCells(), t.getState().columnPinning.right], (e, t) => (t ?? []).map((t) => e.find((e) => e.column.id === t)).filter(Boolean).map((e) => ({
+ })), YF(t.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = JF(() => [e._getAllVisibleCells(), t.getState().columnPinning.right], (e, t) => (t ?? []).map((t) => e.find((e) => e.column.id === t)).filter(Boolean).map((e) => ({
...e,
position: "right"
- })), ZF(t.options, "debugRows", "getRightVisibleCells"));
+ })), YF(t.options, "debugRows", "getRightVisibleCells"));
},
createTable: (e) => {
- e.setColumnPinning = (t) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(t), e.resetColumnPinning = (t) => e.setColumnPinning(t ? mI() : e.initialState?.columnPinning ?? mI()), e.getIsSomeColumnsPinned = (t) => {
+ e.setColumnPinning = (t) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(t), e.resetColumnPinning = (t) => e.setColumnPinning(t ? fI() : e.initialState?.columnPinning ?? fI()), e.getIsSomeColumnsPinned = (t) => {
let n = e.getState().columnPinning;
return t ? !!n[t]?.length : !!(n.left?.length || n.right?.length);
- }, e.getLeftLeafColumns = XF(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (e, t) => (t ?? []).map((t) => e.find((e) => e.id === t)).filter(Boolean), ZF(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = XF(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (e, t) => (t ?? []).map((t) => e.find((e) => e.id === t)).filter(Boolean), ZF(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = XF(() => [
+ }, e.getLeftLeafColumns = JF(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (e, t) => (t ?? []).map((t) => e.find((e) => e.id === t)).filter(Boolean), YF(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = JF(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (e, t) => (t ?? []).map((t) => e.find((e) => e.id === t)).filter(Boolean), YF(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = JF(() => [
e.getAllLeafColumns(),
e.getState().columnPinning.left,
e.getState().columnPinning.right
], (e, t, n) => {
let r = [...t ?? [], ...n ?? []];
return e.filter((e) => !r.includes(e.id));
- }, ZF(e.options, "debugColumns", "getCenterLeafColumns"));
+ }, YF(e.options, "debugColumns", "getCenterLeafColumns"));
}
};
-function Age(e) {
+function Nge(e) {
return e || (typeof document < "u" ? document : null);
}
-var hI = {
+var pI = {
size: 150,
minSize: 20,
maxSize: 2 ** 53 - 1
-}, gI = () => ({
+}, mI = () => ({
startOffset: null,
startSize: null,
deltaOffset: null,
deltaPercentage: null,
isResizingColumn: !1,
columnSizingStart: []
-}), jge = {
- getDefaultColumnDef: () => hI,
+}), Pge = {
+ getDefaultColumnDef: () => pI,
getInitialState: (e) => ({
columnSizing: {},
- columnSizingInfo: gI(),
+ columnSizingInfo: mI(),
...e
}),
getDefaultOptions: (e) => ({
columnResizeMode: "onEnd",
columnResizeDirection: "ltr",
- onColumnSizingChange: JF("columnSizing", e),
- onColumnSizingInfoChange: JF("columnSizingInfo", e)
+ onColumnSizingChange: KF("columnSizing", e),
+ onColumnSizingInfoChange: KF("columnSizingInfo", e)
}),
createColumn: (e, t) => {
e.getSize = () => {
let n = t.getState().columnSizing[e.id];
- return Math.min(Math.max(e.columnDef.minSize ?? hI.minSize, n ?? e.columnDef.size ?? hI.size), e.columnDef.maxSize ?? hI.maxSize);
- }, e.getStart = XF((e) => [
+ return Math.min(Math.max(e.columnDef.minSize ?? pI.minSize, n ?? e.columnDef.size ?? pI.size), e.columnDef.maxSize ?? pI.maxSize);
+ }, e.getStart = JF((e) => [
e,
- yI(t, e),
+ _I(t, e),
t.getState().columnSizing
- ], (t, n) => n.slice(0, e.getIndex(t)).reduce((e, t) => e + t.getSize(), 0), ZF(t.options, "debugColumns", "getStart")), e.getAfter = XF((e) => [
+ ], (t, n) => n.slice(0, e.getIndex(t)).reduce((e, t) => e + t.getSize(), 0), YF(t.options, "debugColumns", "getStart")), e.getAfter = JF((e) => [
e,
- yI(t, e),
+ _I(t, e),
t.getState().columnSizing
- ], (t, n) => n.slice(e.getIndex(t) + 1).reduce((e, t) => e + t.getSize(), 0), ZF(t.options, "debugColumns", "getAfter")), e.resetSize = () => {
+ ], (t, n) => n.slice(e.getIndex(t) + 1).reduce((e, t) => e + t.getSize(), 0), YF(t.options, "debugColumns", "getAfter")), e.resetSize = () => {
t.setColumnSizing((t) => {
let { [e.id]: n, ...r } = t;
return r;
@@ -43669,8 +43800,8 @@ var hI = {
}, e.getResizeHandler = (n) => {
let r = t.getColumn(e.column.id), i = r?.getCanResize();
return (a) => {
- if (!r || !i || (a.persist == null || a.persist(), vI(a) && a.touches && a.touches.length > 1)) return;
- let o = e.getSize(), s = e ? e.getLeafHeaders().map((e) => [e.column.id, e.column.getSize()]) : [[r.id, r.getSize()]], c = vI(a) ? Math.round(a.touches[0].clientX) : a.clientX, l = {}, u = (e, n) => {
+ if (!r || !i || (a.persist == null || a.persist(), gI(a) && a.touches && a.touches.length > 1)) return;
+ let o = e.getSize(), s = e ? e.getLeafHeaders().map((e) => [e.column.id, e.column.getSize()]) : [[r.id, r.getSize()]], c = gI(a) ? Math.round(a.touches[0].clientX) : a.clientX, l = {}, u = (e, n) => {
typeof n == "number" && (t.setColumnSizingInfo((e) => {
let r = t.options.columnResizeDirection === "rtl" ? -1 : 1, i = (n - (e?.startOffset ?? 0)) * r, a = Math.max(i / (e?.startSize ?? 0), -.999999);
return e.columnSizingStart.forEach((e) => {
@@ -43695,7 +43826,7 @@ var hI = {
deltaPercentage: null,
columnSizingStart: []
}));
- }, p = Age(n), m = {
+ }, p = Nge(n), m = {
moveHandler: (e) => d(e.clientX),
upHandler: (e) => {
p?.removeEventListener("mousemove", m.moveHandler), p?.removeEventListener("mouseup", m.upHandler), f(e.clientX);
@@ -43705,8 +43836,8 @@ var hI = {
upHandler: (e) => {
p?.removeEventListener("touchmove", h.moveHandler), p?.removeEventListener("touchend", h.upHandler), e.cancelable && (e.preventDefault(), e.stopPropagation()), f(e.touches[0]?.clientX);
}
- }, g = Mge() ? { passive: !1 } : !1;
- vI(a) ? (p?.addEventListener("touchmove", h.moveHandler, g), p?.addEventListener("touchend", h.upHandler, g)) : (p?.addEventListener("mousemove", m.moveHandler, g), p?.addEventListener("mouseup", m.upHandler, g)), t.setColumnSizingInfo((e) => ({
+ }, g = Fge() ? { passive: !1 } : !1;
+ gI(a) ? (p?.addEventListener("touchmove", h.moveHandler, g), p?.addEventListener("touchend", h.upHandler, g)) : (p?.addEventListener("mousemove", m.moveHandler, g), p?.addEventListener("mouseup", m.upHandler, g)), t.setColumnSizingInfo((e) => ({
...e,
startOffset: c,
startSize: o,
@@ -43722,12 +43853,12 @@ var hI = {
e.setColumnSizing = (t) => e.options.onColumnSizingChange == null ? void 0 : e.options.onColumnSizingChange(t), e.setColumnSizingInfo = (t) => e.options.onColumnSizingInfoChange == null ? void 0 : e.options.onColumnSizingInfoChange(t), e.resetColumnSizing = (t) => {
e.setColumnSizing(t ? {} : e.initialState.columnSizing ?? {});
}, e.resetHeaderSizeInfo = (t) => {
- e.setColumnSizingInfo(t ? gI() : e.initialState.columnSizingInfo ?? gI());
+ e.setColumnSizingInfo(t ? mI() : e.initialState.columnSizingInfo ?? mI());
}, e.getTotalSize = () => e.getHeaderGroups()[0]?.headers.reduce((e, t) => e + t.getSize(), 0) ?? 0, e.getLeftTotalSize = () => e.getLeftHeaderGroups()[0]?.headers.reduce((e, t) => e + t.getSize(), 0) ?? 0, e.getCenterTotalSize = () => e.getCenterHeaderGroups()[0]?.headers.reduce((e, t) => e + t.getSize(), 0) ?? 0, e.getRightTotalSize = () => e.getRightHeaderGroups()[0]?.headers.reduce((e, t) => e + t.getSize(), 0) ?? 0;
}
-}, _I = null;
-function Mge() {
- if (typeof _I == "boolean") return _I;
+}, hI = null;
+function Fge() {
+ if (typeof hI == "boolean") return hI;
let e = !1;
try {
let t = { get passive() {
@@ -43737,17 +43868,17 @@ function Mge() {
} catch {
e = !1;
}
- return _I = e, _I;
+ return hI = e, hI;
}
-function vI(e) {
+function gI(e) {
return e.type === "touchstart";
}
-var Nge = {
+var Ige = {
getInitialState: (e) => ({
columnVisibility: {},
...e
}),
- getDefaultOptions: (e) => ({ onColumnVisibilityChange: JF("columnVisibility", e) }),
+ getDefaultOptions: (e) => ({ onColumnVisibilityChange: KF("columnVisibility", e) }),
createColumn: (e, t) => {
e.toggleVisibility = (n) => {
e.getCanHide() && t.setColumnVisibility((t) => ({
@@ -43762,7 +43893,7 @@ var Nge = {
};
},
createRow: (e, t) => {
- e._getAllVisibleCells = XF(() => [e.getAllCells(), t.getState().columnVisibility], (e) => e.filter((e) => e.column.getIsVisible()), ZF(t.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = XF(() => [
+ e._getAllVisibleCells = JF(() => [e.getAllCells(), t.getState().columnVisibility], (e) => e.filter((e) => e.column.getIsVisible()), YF(t.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = JF(() => [
e.getLeftVisibleCells(),
e.getCenterVisibleCells(),
e.getRightVisibleCells()
@@ -43770,10 +43901,10 @@ var Nge = {
...e,
...t,
...n
- ], ZF(t.options, "debugRows", "getVisibleCells"));
+ ], YF(t.options, "debugRows", "getVisibleCells"));
},
createTable: (e) => {
- let t = (t, n) => XF(() => [n(), n().filter((e) => e.getIsVisible()).map((e) => e.id).join("_")], (e) => e.filter((e) => e.getIsVisible == null ? void 0 : e.getIsVisible()), ZF(e.options, "debugColumns", t));
+ let t = (t, n) => JF(() => [n(), n().filter((e) => e.getIsVisible()).map((e) => e.id).join("_")], (e) => e.filter((e) => e.getIsVisible == null ? void 0 : e.getIsVisible()), YF(e.options, "debugColumns", t));
e.getVisibleFlatColumns = t("getVisibleFlatColumns", () => e.getAllFlatColumns()), e.getVisibleLeafColumns = t("getVisibleLeafColumns", () => e.getAllLeafColumns()), e.getLeftVisibleLeafColumns = t("getLeftVisibleLeafColumns", () => e.getLeftLeafColumns()), e.getRightVisibleLeafColumns = t("getRightVisibleLeafColumns", () => e.getRightLeafColumns()), e.getCenterVisibleLeafColumns = t("getCenterVisibleLeafColumns", () => e.getCenterLeafColumns()), e.setColumnVisibility = (t) => e.options.onColumnVisibilityChange == null ? void 0 : e.options.onColumnVisibilityChange(t), e.resetColumnVisibility = (t) => {
e.setColumnVisibility(t ? {} : e.initialState.columnVisibility ?? {});
}, e.toggleAllColumnsVisible = (t) => {
@@ -43786,20 +43917,20 @@ var Nge = {
};
}
};
-function yI(e, t) {
+function _I(e, t) {
return t ? t === "center" ? e.getCenterVisibleLeafColumns() : t === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
}
-var Pge = { createTable: (e) => {
+var Lge = { createTable: (e) => {
e._getGlobalFacetedRowModel = e.options.getFacetedRowModel && e.options.getFacetedRowModel(e, "__global__"), e.getGlobalFacetedRowModel = () => e.options.manualFiltering || !e._getGlobalFacetedRowModel ? e.getPreFilteredRowModel() : e._getGlobalFacetedRowModel(), e._getGlobalFacetedUniqueValues = e.options.getFacetedUniqueValues && e.options.getFacetedUniqueValues(e, "__global__"), e.getGlobalFacetedUniqueValues = () => e._getGlobalFacetedUniqueValues ? e._getGlobalFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getGlobalFacetedMinMaxValues = e.options.getFacetedMinMaxValues && e.options.getFacetedMinMaxValues(e, "__global__"), e.getGlobalFacetedMinMaxValues = () => {
if (e._getGlobalFacetedMinMaxValues) return e._getGlobalFacetedMinMaxValues();
};
-} }, Fge = {
+} }, Rge = {
getInitialState: (e) => ({
globalFilter: void 0,
...e
}),
getDefaultOptions: (e) => ({
- onGlobalFilterChange: JF("globalFilter", e),
+ onGlobalFilterChange: KF("globalFilter", e),
globalFilterFn: "auto",
getColumnCanGlobalFilter: (t) => {
var n;
@@ -43811,22 +43942,22 @@ var Pge = { createTable: (e) => {
e.getCanGlobalFilter = () => (e.columnDef.enableGlobalFilter ?? !0) && (t.options.enableGlobalFilter ?? !0) && (t.options.enableFilters ?? !0) && ((t.options.getColumnCanGlobalFilter == null ? void 0 : t.options.getColumnCanGlobalFilter(e)) ?? !0) && !!e.accessorFn;
},
createTable: (e) => {
- e.getGlobalAutoFilterFn = () => uI.includesString, e.getGlobalFilterFn = () => {
+ e.getGlobalAutoFilterFn = () => cI.includesString, e.getGlobalFilterFn = () => {
let { globalFilterFn: t } = e.options;
- return YF(t) ? t : t === "auto" ? e.getGlobalAutoFilterFn() : e.options.filterFns?.[t] ?? uI[t];
+ return qF(t) ? t : t === "auto" ? e.getGlobalAutoFilterFn() : e.options.filterFns?.[t] ?? cI[t];
}, e.setGlobalFilter = (t) => {
e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(t);
}, e.resetGlobalFilter = (t) => {
e.setGlobalFilter(t ? void 0 : e.initialState.globalFilter);
};
}
-}, Ige = {
+}, zge = {
getInitialState: (e) => ({
expanded: {},
...e
}),
getDefaultOptions: (e) => ({
- onExpandedChange: JF("expanded", e),
+ onExpandedChange: KF("expanded", e),
paginateExpandedRows: !0
}),
createTable: (e) => {
@@ -43897,18 +44028,18 @@ var Pge = { createTable: (e) => {
};
};
}
-}, bI = 0, xI = 10, SI = () => ({
- pageIndex: bI,
- pageSize: xI
-}), Lge = {
+}, vI = 0, yI = 10, bI = () => ({
+ pageIndex: vI,
+ pageSize: yI
+}), Bge = {
getInitialState: (e) => ({
...e,
pagination: {
- ...SI(),
+ ...bI(),
...e?.pagination
}
}),
- getDefaultOptions: (e) => ({ onPaginationChange: JF("pagination", e) }),
+ getDefaultOptions: (e) => ({ onPaginationChange: KF("pagination", e) }),
createTable: (e) => {
let t = !1, n = !1;
e._autoResetPageIndex = () => {
@@ -43924,11 +44055,11 @@ var Pge = { createTable: (e) => {
e.resetPageIndex(), n = !1;
});
}
- }, e.setPagination = (t) => e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange((e) => qF(t, e)), e.resetPagination = (t) => {
- e.setPagination(t ? SI() : e.initialState.pagination ?? SI());
+ }, e.setPagination = (t) => e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange((e) => GF(t, e)), e.resetPagination = (t) => {
+ e.setPagination(t ? bI() : e.initialState.pagination ?? bI());
}, e.setPageIndex = (t) => {
e.setPagination((n) => {
- let r = qF(t, n.pageIndex), i = e.options.pageCount === void 0 || e.options.pageCount === -1 ? 2 ** 53 - 1 : e.options.pageCount - 1;
+ let r = GF(t, n.pageIndex), i = e.options.pageCount === void 0 || e.options.pageCount === -1 ? 2 ** 53 - 1 : e.options.pageCount - 1;
return r = Math.max(0, Math.min(r, i)), {
...n,
pageIndex: r
@@ -43936,13 +44067,13 @@ var Pge = { createTable: (e) => {
});
}, e.resetPageIndex = (t) => {
var n;
- e.setPageIndex(t ? bI : ((n = e.initialState) == null || (n = n.pagination) == null ? void 0 : n.pageIndex) ?? bI);
+ e.setPageIndex(t ? vI : ((n = e.initialState) == null || (n = n.pagination) == null ? void 0 : n.pageIndex) ?? vI);
}, e.resetPageSize = (t) => {
var n;
- e.setPageSize(t ? xI : ((n = e.initialState) == null || (n = n.pagination) == null ? void 0 : n.pageSize) ?? xI);
+ e.setPageSize(t ? yI : ((n = e.initialState) == null || (n = n.pagination) == null ? void 0 : n.pageSize) ?? yI);
}, e.setPageSize = (t) => {
e.setPagination((e) => {
- let n = Math.max(1, qF(t, e.pageSize)), r = e.pageSize * e.pageIndex, i = Math.floor(r / n);
+ let n = Math.max(1, GF(t, e.pageSize)), r = e.pageSize * e.pageIndex, i = Math.floor(r / n);
return {
...e,
pageIndex: i,
@@ -43950,28 +44081,28 @@ var Pge = { createTable: (e) => {
};
});
}, e.setPageCount = (t) => e.setPagination((n) => {
- let r = qF(t, e.options.pageCount ?? -1);
+ let r = GF(t, e.options.pageCount ?? -1);
return typeof r == "number" && (r = Math.max(-1, r)), {
...n,
pageCount: r
};
- }), e.getPageOptions = XF(() => [e.getPageCount()], (e) => {
+ }), e.getPageOptions = JF(() => [e.getPageCount()], (e) => {
let t = [];
return e && e > 0 && (t = [...Array(e)].fill(null).map((e, t) => t)), t;
- }, ZF(e.options, "debugTable", "getPageOptions")), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
+ }, YF(e.options, "debugTable", "getPageOptions")), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
let { pageIndex: t } = e.getState().pagination, n = e.getPageCount();
return n === -1 || n !== 0 && t < n - 1;
}, e.previousPage = () => e.setPageIndex((e) => e - 1), e.nextPage = () => e.setPageIndex((e) => e + 1), e.firstPage = () => e.setPageIndex(0), e.lastPage = () => e.setPageIndex(e.getPageCount() - 1), e.getPrePaginationRowModel = () => e.getExpandedRowModel(), e.getPaginationRowModel = () => (!e._getPaginationRowModel && e.options.getPaginationRowModel && (e._getPaginationRowModel = e.options.getPaginationRowModel(e)), e.options.manualPagination || !e._getPaginationRowModel ? e.getPrePaginationRowModel() : e._getPaginationRowModel()), e.getPageCount = () => e.options.pageCount ?? Math.ceil(e.getRowCount() / e.getState().pagination.pageSize), e.getRowCount = () => e.options.rowCount ?? e.getPrePaginationRowModel().rows.length;
}
-}, CI = () => ({
+}, xI = () => ({
top: [],
bottom: []
-}), Rge = {
+}), Vge = {
getInitialState: (e) => ({
- rowPinning: CI(),
+ rowPinning: xI(),
...e
}),
- getDefaultOptions: (e) => ({ onRowPinningChange: JF("rowPinning", e) }),
+ getDefaultOptions: (e) => ({ onRowPinningChange: KF("rowPinning", e) }),
createRow: (e, t) => {
e.pin = (n, r, i) => {
let a = r ? e.getLeafRows().map((e) => {
@@ -44010,7 +44141,7 @@ var Pge = { createTable: (e) => {
};
},
createTable: (e) => {
- e.setRowPinning = (t) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(t), e.resetRowPinning = (t) => e.setRowPinning(t ? CI() : e.initialState?.rowPinning ?? CI()), e.getIsSomeRowsPinned = (t) => {
+ e.setRowPinning = (t) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(t), e.resetRowPinning = (t) => e.setRowPinning(t ? xI() : e.initialState?.rowPinning ?? xI()), e.getIsSomeRowsPinned = (t) => {
let n = e.getState().rowPinning;
return t ? !!n[t]?.length : !!(n.top?.length || n.bottom?.length);
}, e._getPinnedRows = (t, n, r) => (e.options.keepPinnedRows ?? !0 ? (n ?? []).map((t) => {
@@ -44019,22 +44150,22 @@ var Pge = { createTable: (e) => {
}) : (n ?? []).map((e) => t.find((t) => t.id === e))).filter(Boolean).map((e) => ({
...e,
position: r
- })), e.getTopRows = XF(() => [e.getRowModel().rows, e.getState().rowPinning.top], (t, n) => e._getPinnedRows(t, n, "top"), ZF(e.options, "debugRows", "getTopRows")), e.getBottomRows = XF(() => [e.getRowModel().rows, e.getState().rowPinning.bottom], (t, n) => e._getPinnedRows(t, n, "bottom"), ZF(e.options, "debugRows", "getBottomRows")), e.getCenterRows = XF(() => [
+ })), e.getTopRows = JF(() => [e.getRowModel().rows, e.getState().rowPinning.top], (t, n) => e._getPinnedRows(t, n, "top"), YF(e.options, "debugRows", "getTopRows")), e.getBottomRows = JF(() => [e.getRowModel().rows, e.getState().rowPinning.bottom], (t, n) => e._getPinnedRows(t, n, "bottom"), YF(e.options, "debugRows", "getBottomRows")), e.getCenterRows = JF(() => [
e.getRowModel().rows,
e.getState().rowPinning.top,
e.getState().rowPinning.bottom
], (e, t, n) => {
let r = /* @__PURE__ */ new Set([...t ?? [], ...n ?? []]);
return e.filter((e) => !r.has(e.id));
- }, ZF(e.options, "debugRows", "getCenterRows"));
+ }, YF(e.options, "debugRows", "getCenterRows"));
}
-}, zge = {
+}, Hge = {
getInitialState: (e) => ({
rowSelection: {},
...e
}),
getDefaultOptions: (e) => ({
- onRowSelectionChange: JF("rowSelection", e),
+ onRowSelectionChange: KF("rowSelection", e),
enableRowSelection: !0,
enableMultiRowSelection: !0,
enableSubRowSelection: !0
@@ -44053,21 +44184,21 @@ var Pge = { createTable: (e) => {
}, e.toggleAllPageRowsSelected = (t) => e.setRowSelection((n) => {
let r = t === void 0 ? !e.getIsAllPageRowsSelected() : t, i = { ...n };
return e.getRowModel().rows.forEach((t) => {
- wI(i, t.id, r, !0, e);
+ SI(i, t.id, r, !0, e);
}), i;
- }), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = XF(() => [e.getState().rowSelection, e.getCoreRowModel()], (t, n) => Object.keys(t).length ? TI(e, n) : {
+ }), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = JF(() => [e.getState().rowSelection, e.getCoreRowModel()], (t, n) => Object.keys(t).length ? CI(e, n) : {
rows: [],
flatRows: [],
rowsById: {}
- }, ZF(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = XF(() => [e.getState().rowSelection, e.getFilteredRowModel()], (t, n) => Object.keys(t).length ? TI(e, n) : {
+ }, YF(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = JF(() => [e.getState().rowSelection, e.getFilteredRowModel()], (t, n) => Object.keys(t).length ? CI(e, n) : {
rows: [],
flatRows: [],
rowsById: {}
- }, ZF(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = XF(() => [e.getState().rowSelection, e.getSortedRowModel()], (t, n) => Object.keys(t).length ? TI(e, n) : {
+ }, YF(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = JF(() => [e.getState().rowSelection, e.getSortedRowModel()], (t, n) => Object.keys(t).length ? CI(e, n) : {
rows: [],
flatRows: [],
rowsById: {}
- }, ZF(e.options, "debugTable", "getGroupedSelectedRowModel")), e.getIsAllRowsSelected = () => {
+ }, YF(e.options, "debugTable", "getGroupedSelectedRowModel")), e.getIsAllRowsSelected = () => {
let t = e.getFilteredRowModel().flatRows, { rowSelection: n } = e.getState(), r = !!(t.length && Object.keys(n).length);
return r && t.some((e) => e.getCanSelect() && !n[e.id]) && (r = !1), r;
}, e.getIsAllPageRowsSelected = () => {
@@ -44091,17 +44222,17 @@ var Pge = { createTable: (e) => {
t.setRowSelection((a) => {
if (n = n === void 0 ? !i : n, e.getCanSelect() && i === n) return a;
let o = { ...a };
- return wI(o, e.id, n, r?.selectChildren ?? !0, t), o;
+ return SI(o, e.id, n, r?.selectChildren ?? !0, t), o;
});
}, e.getIsSelected = () => {
let { rowSelection: n } = t.getState();
- return EI(e, n);
+ return wI(e, n);
}, e.getIsSomeSelected = () => {
let { rowSelection: n } = t.getState();
- return DI(e, n) === "some";
+ return TI(e, n) === "some";
}, e.getIsAllSubRowsSelected = () => {
let { rowSelection: n } = t.getState();
- return DI(e, n) === "all";
+ return TI(e, n) === "all";
}, e.getCanSelect = () => typeof t.options.enableRowSelection == "function" ? t.options.enableRowSelection(e) : t.options.enableRowSelection ?? !0, e.getCanSelectSubRows = () => typeof t.options.enableSubRowSelection == "function" ? t.options.enableSubRowSelection(e) : t.options.enableSubRowSelection ?? !0, e.getCanMultiSelect = () => typeof t.options.enableMultiRowSelection == "function" ? t.options.enableMultiRowSelection(e) : t.options.enableMultiRowSelection ?? !0, e.getToggleSelectedHandler = () => {
let t = e.getCanSelect();
return (n) => {
@@ -44109,16 +44240,16 @@ var Pge = { createTable: (e) => {
};
};
}
-}, wI = (e, t, n, r, i) => {
+}, SI = (e, t, n, r, i) => {
var a;
let o = i.getRow(t, !0);
- n ? (o.getCanMultiSelect() || Object.keys(e).forEach((t) => delete e[t]), o.getCanSelect() && (e[t] = !0)) : delete e[t], r && (a = o.subRows) != null && a.length && o.getCanSelectSubRows() && o.subRows.forEach((t) => wI(e, t.id, n, r, i));
+ n ? (o.getCanMultiSelect() || Object.keys(e).forEach((t) => delete e[t]), o.getCanSelect() && (e[t] = !0)) : delete e[t], r && (a = o.subRows) != null && a.length && o.getCanSelectSubRows() && o.subRows.forEach((t) => SI(e, t.id, n, r, i));
};
-function TI(e, t) {
+function CI(e, t) {
let n = e.getState().rowSelection, r = [], i = {}, a = function(e, t) {
return e.map((e) => {
var t;
- let o = EI(e, n);
+ let o = wI(e, n);
if (o && (r.push(e), i[e.id] = e), (t = e.subRows) != null && t.length && (e = {
...e,
subRows: a(e.subRows)
@@ -44131,32 +44262,32 @@ function TI(e, t) {
rowsById: i
};
}
-function EI(e, t) {
+function wI(e, t) {
return t[e.id] ?? !1;
}
-function DI(e, t, n) {
+function TI(e, t, n) {
var r;
if (!((r = e.subRows) != null && r.length)) return !1;
let i = !0, a = !1;
return e.subRows.forEach((e) => {
- if (!(a && !i) && (e.getCanSelect() && (EI(e, t) ? a = !0 : i = !1), e.subRows && e.subRows.length)) {
- let n = DI(e, t);
+ if (!(a && !i) && (e.getCanSelect() && (wI(e, t) ? a = !0 : i = !1), e.subRows && e.subRows.length)) {
+ let n = TI(e, t);
n === "all" ? a = !0 : (n === "some" && (a = !0), i = !1);
}
}), i ? "all" : a ? "some" : !1;
}
-var OI = /([0-9]+)/gm, Bge = (e, t, n) => jI(AI(e.getValue(n)).toLowerCase(), AI(t.getValue(n)).toLowerCase()), Vge = (e, t, n) => jI(AI(e.getValue(n)), AI(t.getValue(n))), Hge = (e, t, n) => kI(AI(e.getValue(n)).toLowerCase(), AI(t.getValue(n)).toLowerCase()), Uge = (e, t, n) => kI(AI(e.getValue(n)), AI(t.getValue(n))), Wge = (e, t, n) => {
+var EI = /([0-9]+)/gm, Uge = (e, t, n) => kI(OI(e.getValue(n)).toLowerCase(), OI(t.getValue(n)).toLowerCase()), Wge = (e, t, n) => kI(OI(e.getValue(n)), OI(t.getValue(n))), Gge = (e, t, n) => DI(OI(e.getValue(n)).toLowerCase(), OI(t.getValue(n)).toLowerCase()), Kge = (e, t, n) => DI(OI(e.getValue(n)), OI(t.getValue(n))), qge = (e, t, n) => {
let r = e.getValue(n), i = t.getValue(n);
return r > i ? 1 : r < i ? -1 : 0;
-}, Gge = (e, t, n) => kI(e.getValue(n), t.getValue(n));
-function kI(e, t) {
+}, Jge = (e, t, n) => DI(e.getValue(n), t.getValue(n));
+function DI(e, t) {
return e === t ? 0 : e > t ? 1 : -1;
}
-function AI(e) {
+function OI(e) {
return typeof e == "number" ? isNaN(e) || e === Infinity || e === -Infinity ? "" : String(e) : typeof e == "string" ? e : "";
}
-function jI(e, t) {
- let n = e.split(OI).filter(Boolean), r = t.split(OI).filter(Boolean);
+function kI(e, t) {
+ let n = e.split(EI).filter(Boolean), r = t.split(EI).filter(Boolean);
for (; n.length && r.length;) {
let e = n.shift(), t = r.shift(), i = parseInt(e, 10), a = parseInt(t, 10), o = [i, a].sort();
if (isNaN(o[0])) {
@@ -44170,22 +44301,22 @@ function jI(e, t) {
}
return n.length - r.length;
}
-var MI = {
- alphanumeric: Bge,
- alphanumericCaseSensitive: Vge,
- text: Hge,
- textCaseSensitive: Uge,
- datetime: Wge,
- basic: Gge
-}, Kge = [
- Sge,
- Nge,
- Oge,
- kge,
- wge,
+var AI = {
+ alphanumeric: Uge,
+ alphanumericCaseSensitive: Wge,
+ text: Gge,
+ textCaseSensitive: Kge,
+ datetime: qge,
+ basic: Jge
+}, Yge = [
Tge,
- Pge,
- Fge,
+ Ige,
+ jge,
+ Mge,
+ Dge,
+ Oge,
+ Lge,
+ Rge,
{
getInitialState: (e) => ({
sorting: [],
@@ -44196,7 +44327,7 @@ var MI = {
sortUndefined: 1
}),
getDefaultOptions: (e) => ({
- onSortingChange: JF("sorting", e),
+ onSortingChange: KF("sorting", e),
isMultiSortEvent: (e) => e.shiftKey
}),
createColumn: (e, t) => {
@@ -44204,13 +44335,13 @@ var MI = {
let n = t.getFilteredRowModel().flatRows.slice(10), r = !1;
for (let t of n) {
let n = t?.getValue(e.id);
- if (Object.prototype.toString.call(n) === "[object Date]") return MI.datetime;
- if (typeof n == "string" && (r = !0, n.split(OI).length > 1)) return MI.alphanumeric;
+ if (Object.prototype.toString.call(n) === "[object Date]") return AI.datetime;
+ if (typeof n == "string" && (r = !0, n.split(EI).length > 1)) return AI.alphanumeric;
}
- return r ? MI.text : MI.basic;
+ return r ? AI.text : AI.basic;
}, e.getAutoSortDir = () => typeof t.getFilteredRowModel().flatRows[0]?.getValue(e.id) == "string" ? "asc" : "desc", e.getSortingFn = () => {
if (!e) throw Error();
- return YF(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : t.options.sortingFns?.[e.columnDef.sortingFn] ?? MI[e.columnDef.sortingFn];
+ return qF(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : t.options.sortingFns?.[e.columnDef.sortingFn] ?? AI[e.columnDef.sortingFn];
}, e.toggleSorting = (n, r) => {
let i = e.getNextSortingOrder(), a = n != null;
t.setSorting((o) => {
@@ -44247,15 +44378,15 @@ var MI = {
}, e.getPreSortedRowModel = () => e.getGroupedRowModel(), e.getSortedRowModel = () => (!e._getSortedRowModel && e.options.getSortedRowModel && (e._getSortedRowModel = e.options.getSortedRowModel(e)), e.options.manualSorting || !e._getSortedRowModel ? e.getPreSortedRowModel() : e._getSortedRowModel());
}
},
- Ege,
- Ige,
- Lge,
- Rge,
+ kge,
zge,
- jge
+ Bge,
+ Vge,
+ Hge,
+ Pge
];
-function qge(e) {
- let t = [...Kge, ...e._features ?? []], n = { _features: t }, r = n._features.reduce((e, t) => Object.assign(e, t.getDefaultOptions == null ? void 0 : t.getDefaultOptions(n)), {}), i = (e) => n.options.mergeOptions ? n.options.mergeOptions(r, e) : {
+function Xge(e) {
+ let t = [...Yge, ...e._features ?? []], n = { _features: t }, r = n._features.reduce((e, t) => Object.assign(e, t.getDefaultOptions == null ? void 0 : t.getDefaultOptions(n)), {}), i = (e) => n.options.mergeOptions ? n.options.mergeOptions(r, e) : {
...r,
...e
}, a = { ...e.initialState ?? {} };
@@ -44281,7 +44412,7 @@ function qge(e) {
n.setState(n.initialState);
},
setOptions: (e) => {
- let t = qF(e, n.options);
+ let t = GF(e, n.options);
n.options = i(t);
},
getState: () => n.options.state,
@@ -44296,7 +44427,7 @@ function qge(e) {
if (!r && (r = n.getCoreRowModel().rowsById[e], !r)) throw Error();
return r;
},
- _getDefaultColumnDef: XF(() => [n.options.defaultColumn], (e) => (e ??= {}, {
+ _getDefaultColumnDef: JF(() => [n.options.defaultColumn], (e) => (e ??= {}, {
header: (e) => {
let t = e.header.column.columnDef;
return t.accessorKey ? t.accessorKey : t.accessorFn ? t.id : null;
@@ -44307,20 +44438,20 @@ function qge(e) {
},
...n._features.reduce((e, t) => Object.assign(e, t.getDefaultColumnDef == null ? void 0 : t.getDefaultColumnDef()), {}),
...e
- }), ZF(e, "debugColumns", "_getDefaultColumnDef")),
+ }), YF(e, "debugColumns", "_getDefaultColumnDef")),
_getColumnDefs: () => n.options.columns,
- getAllColumns: XF(() => [n._getColumnDefs()], (e) => {
+ getAllColumns: JF(() => [n._getColumnDefs()], (e) => {
let t = function(e, r, i) {
return i === void 0 && (i = 0), e.map((e) => {
- let a = xge(n, e, i, r), o = e;
+ let a = wge(n, e, i, r), o = e;
return a.columns = o.columns ? t(o.columns, a, i + 1) : [], a;
});
};
return t(e);
- }, ZF(e, "debugColumns", "getAllColumns")),
- getAllFlatColumns: XF(() => [n.getAllColumns()], (e) => e.flatMap((e) => e.getFlatColumns()), ZF(e, "debugColumns", "getAllFlatColumns")),
- _getAllFlatColumnsById: XF(() => [n.getAllFlatColumns()], (e) => e.reduce((e, t) => (e[t.id] = t, e), {}), ZF(e, "debugColumns", "getAllFlatColumnsById")),
- getAllLeafColumns: XF(() => [n.getAllColumns(), n._getOrderColumnsFn()], (e, t) => t(e.flatMap((e) => e.getLeafColumns())), ZF(e, "debugColumns", "getAllLeafColumns")),
+ }, YF(e, "debugColumns", "getAllColumns")),
+ getAllFlatColumns: JF(() => [n.getAllColumns()], (e) => e.flatMap((e) => e.getFlatColumns()), YF(e, "debugColumns", "getAllFlatColumns")),
+ _getAllFlatColumnsById: JF(() => [n.getAllFlatColumns()], (e) => e.reduce((e, t) => (e[t.id] = t, e), {}), YF(e, "debugColumns", "getAllFlatColumnsById")),
+ getAllLeafColumns: JF(() => [n.getAllColumns(), n._getOrderColumnsFn()], (e, t) => t(e.flatMap((e) => e.getLeafColumns())), YF(e, "debugColumns", "getAllLeafColumns")),
getColumn: (e) => n._getAllFlatColumnsById()[e]
};
Object.assign(n, c);
@@ -44330,8 +44461,8 @@ function qge(e) {
}
return n;
}
-function NI() {
- return (e) => XF(() => [e.options.data], (t) => {
+function jI() {
+ return (e) => JF(() => [e.options.data], (t) => {
let n = {
rows: [],
flatRows: [],
@@ -44340,7 +44471,7 @@ function NI() {
i === void 0 && (i = 0);
let o = [];
for (let c = 0; c < t.length; c++) {
- let l = Cge(e, e._getRowId(t[c], c, a), t[c], c, i, void 0, a?.id);
+ let l = Ege(e, e._getRowId(t[c], c, a), t[c], c, i, void 0, a?.id);
if (n.flatRows.push(l), n.rowsById[l.id] = l, o.push(l), e.options.getSubRows) {
var s;
l.originalSubRows = e.options.getSubRows(t[c], c), (s = l.originalSubRows) != null && s.length && (l.subRows = r(l.originalSubRows, i + 1, l));
@@ -44349,9 +44480,9 @@ function NI() {
return o;
};
return n.rows = r(t), n;
- }, ZF(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
+ }, YF(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
}
-function Jge(e) {
+function Zge(e) {
let t = [], n = (e) => {
var r;
t.push(e), (r = e.subRows) != null && r.length && e.getIsExpanded() && e.subRows.forEach(n);
@@ -44362,8 +44493,8 @@ function Jge(e) {
rowsById: e.rowsById
};
}
-function PI(e) {
- return (e) => XF(() => [
+function MI(e) {
+ return (e) => JF(() => [
e.getState().pagination,
e.getPrePaginationRowModel(),
e.options.paginateExpandedRows ? void 0 : e.getState().expanded
@@ -44376,7 +44507,7 @@ function PI(e) {
rows: a,
flatRows: o,
rowsById: s
- } : Jge({
+ } : Zge({
rows: a,
flatRows: o,
rowsById: s
@@ -44385,32 +44516,32 @@ function PI(e) {
u.flatRows.push(e), e.subRows.length && e.subRows.forEach(d);
};
return u.rows.forEach(d), u;
- }, ZF(e.options, "debugTable", "getPaginationRowModel"));
+ }, YF(e.options, "debugTable", "getPaginationRowModel"));
}
//#endregion
//#region node_modules/@tanstack/react-table/build/lib/index.mjs
-function FI(e, t) {
- return e ? Yge(e) ? /*#__PURE__*/ B.createElement(e, t) : e : null;
+function NI(e, t) {
+ return e ? Qge(e) ? /*#__PURE__*/ B.createElement(e, t) : e : null;
}
-function Yge(e) {
- return Xge(e) || typeof e == "function" || Zge(e);
+function Qge(e) {
+ return $ge(e) || typeof e == "function" || e_e(e);
}
-function Xge(e) {
+function $ge(e) {
return typeof e == "function" && (() => {
let t = Object.getPrototypeOf(e);
return t.prototype && t.prototype.isReactComponent;
})();
}
-function Zge(e) {
+function e_e(e) {
return typeof e == "object" && typeof e.$$typeof == "symbol" && ["react.memo", "react.forward_ref"].includes(e.$$typeof.description);
}
-function II(e) {
+function PI(e) {
let t = {
state: {},
onStateChange: () => {},
renderFallbackValue: null,
...e
- }, [n] = B.useState(() => ({ current: qge(t) })), [r, i] = B.useState(() => n.current.initialState);
+ }, [n] = B.useState(() => ({ current: Xge(t) })), [r, i] = B.useState(() => n.current.initialState);
return n.current.setOptions((t) => ({
...t,
...e,
@@ -44425,7 +44556,7 @@ function II(e) {
}
//#endregion
//#region src/react/boardui/components/base/switch/switch.tsx
-var Qge = fr({
+var t_e = fr({
sm: {
track: "h-4 w-7",
trackRadius: {
@@ -44487,8 +44618,8 @@ var Qge = fr({
}
}
});
-function $ge({ state: e, size: t = "md", shape: n = "pill" }) {
- let r = Qge[t];
+function n_e({ state: e, size: t = "md", shape: n = "pill" }) {
+ let r = t_e[t];
return /* @__PURE__ */ (0, H.jsx)("span", {
"aria-hidden": !0,
className: dr("relative shrink-0 transition-colors duration-200 ease", r.track, r.trackRadius[n], e.isSelected ? dr("bg-linear-to-b from-accent-500 to-accent-600", r.onShadow) : "bg-background-tertiary-default", e.isDisabled && "opacity-50", e.isFocusVisible && "ring-2 ring-border-focus-ring ring-offset-2"),
@@ -44498,12 +44629,12 @@ function $ge({ state: e, size: t = "md", shape: n = "pill" }) {
})
});
}
-function LI({ className: e, children: t, size: n = "md", shape: r = "pill", ref: i, ...a }) {
+function FI({ className: e, children: t, size: n = "md", shape: r = "pill", ref: i, ...a }) {
return /* @__PURE__ */ (0, H.jsx)(Oee, {
ref: i,
...a,
className: (t) => dr("group inline-flex items-center gap-2 select-none", t.isDisabled ? "cursor-not-allowed" : "cursor-pointer", typeof e == "function" ? e(t) : e),
- children: (e) => /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)($ge, {
+ children: (e) => /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(n_e, {
state: e,
size: n,
shape: r
@@ -44515,8 +44646,8 @@ function LI({ className: e, children: t, size: n = "md", shape: r = "pill", ref:
}
//#endregion
//#region src/react/components/legacy-avatar.ts
-var RI = "[&_img]:absolute [&_img]:inset-0 [&_img]:size-full [&_img]:max-w-none [&_img]:max-h-none [&_img]:object-cover", e_e = "输入女优名,到 JavDB 找她的演员页";
-function t_e(e, t) {
+var II = "[&_img]:absolute [&_img]:inset-0 [&_img]:size-full [&_img]:max-w-none [&_img]:max-h-none [&_img]:object-cover", r_e = "输入女优名,到 JavDB 找她的演员页";
+function i_e(e, t) {
let n = /* @__PURE__ */ new Map();
for (let r of e.candidates) t.has(r.id) && r.held_by && n.set(r.held_by.id, r.held_by.name);
if (n.size > 1) return {
@@ -44535,10 +44666,10 @@ function t_e(e, t) {
blocked: !1
};
}
-function n_e({ card: e, picked: t, onPick: n }) {
+function a_e({ card: e, picked: t, onPick: n }) {
return /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-wrap items-center gap-2",
- children: [/* @__PURE__ */ (0, H.jsx)(PM, {
+ children: [/* @__PURE__ */ (0, H.jsx)(uM, {
isSelected: t,
onChange: n,
children: /* @__PURE__ */ (0, H.jsxs)("span", {
@@ -44548,7 +44679,7 @@ function n_e({ card: e, picked: t, onPick: n }) {
className: "min-w-0 break-words",
children: e.names.join("、")
}),
- e.record ? /* @__PURE__ */ (0, H.jsx)(uA, {
+ e.record ? /* @__PURE__ */ (0, H.jsx)(Mk, {
variant: "caption",
color: "neutral",
children: e.record
@@ -44559,16 +44690,16 @@ function n_e({ card: e, picked: t, onPick: n }) {
}) : null
]
})
- }), /* @__PURE__ */ (0, H.jsx)(PT, {
+ }), /* @__PURE__ */ (0, H.jsx)(MT, {
href: e.url,
children: e.id
})]
});
}
-function r_e({ readOnly: e, toast: t, onAdded: n }) {
- let [r, i] = (0, B.useState)(""), [a, o] = (0, B.useState)(null), [s, c] = (0, B.useState)(/* @__PURE__ */ new Set()), l = vT(), u = () => {
+function o_e({ readOnly: e, toast: t, onAdded: n }) {
+ let [r, i] = (0, B.useState)(""), [a, o] = (0, B.useState)(null), [s, c] = (0, B.useState)(/* @__PURE__ */ new Set()), l = gT(), u = () => {
let t = r.trim();
- !t || e || l.run("lookup", (e) => ohe(t, e), (e) => {
+ !t || e || l.run("lookup", (e) => lhe(t, e), (e) => {
o(e), c(new Set(e.suggested));
});
}, d = (e) => {
@@ -44576,12 +44707,12 @@ function r_e({ readOnly: e, toast: t, onAdded: n }) {
}, f = () => {
o(null), c(/* @__PURE__ */ new Set()), l.setError("");
}, p = () => {
- a && l.run("follow", (e) => she(a.q, [...s], e), (e) => {
+ a && l.run("follow", (e) => uhe(a.q, [...s], e), (e) => {
t(e.created ? `已新建「${e.entity_name}」并订阅她的新作` : `已订阅「${e.entity_name}」的新作`), i(""), f(), n();
});
- }, m = a ? t_e(a, s) : null;
+ }, m = a ? i_e(a, s) : null;
return /* @__PURE__ */ (0, H.jsxs)("div", {
- className: lT({
+ className: sT({
padding: "none",
className: "flex flex-col gap-4 px-6 py-5 max-sm:px-4"
}),
@@ -44594,11 +44725,11 @@ function r_e({ readOnly: e, toast: t, onAdded: n }) {
className: "flex flex-wrap items-end gap-2",
children: [/* @__PURE__ */ (0, H.jsx)("div", {
className: "min-w-64 grow",
- children: /* @__PURE__ */ (0, H.jsx)(bA, {
+ children: /* @__PURE__ */ (0, H.jsx)(zk, {
"aria-label": "女优名",
- placeholder: e_e,
+ placeholder: r_e,
value: r,
- leadingIcon: Qw,
+ leadingIcon: Xw,
isDisabled: e,
onChange: i,
onKeyDown: d
@@ -44619,16 +44750,16 @@ function r_e({ readOnly: e, toast: t, onAdded: n }) {
a ? /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-col gap-3",
children: [
- /* @__PURE__ */ (0, H.jsx)(NT, { children: "JavDB 上的演员卡" }),
- a.candidates.length ? a.candidates.map((e) => /* @__PURE__ */ (0, H.jsx)(n_e, {
+ /* @__PURE__ */ (0, H.jsx)(jT, { children: "JavDB 上的演员卡" }),
+ a.candidates.length ? a.candidates.map((e) => /* @__PURE__ */ (0, H.jsx)(a_e, {
card: e,
picked: s.has(e.id),
onPick: (t) => c((n) => {
let r = new Set(n);
return t ? r.add(e.id) : r.delete(e.id), r;
})
- }, e.id)) : /* @__PURE__ */ (0, H.jsx)(jT, { children: "JavDB 上没有搜到这个名字。" }),
- a.candidates.length ? /* @__PURE__ */ (0, H.jsx)(jT, {
+ }, e.id)) : /* @__PURE__ */ (0, H.jsx)(kT, { children: "JavDB 上没有搜到这个名字。" }),
+ a.candidates.length ? /* @__PURE__ */ (0, H.jsx)(kT, {
role: "status",
children: s.size ? m.text : "勾选她的演员卡;有碼与無碼两条记录都是她的话,两张都勾。"
}) : null,
@@ -44655,19 +44786,19 @@ function r_e({ readOnly: e, toast: t, onAdded: n }) {
}
//#endregion
//#region src/react/follow-manage/source-list.tsx
-var i_e = Object.fromEntries(Object.entries(AP).map(([e, t]) => [t, e])), zI = 740;
-function a_e() {
+var s_e = Object.fromEntries(Object.entries(OP).map(([e, t]) => [t, e])), LI = 740;
+function c_e() {
let [e, t] = (0, B.useState)(!1), n = (0, B.useRef)(null), r = (0, B.useCallback)((e) => {
if (n.current?.disconnect(), !e) {
n.current = null;
return;
}
- let r = new ResizeObserver(() => t(e.clientWidth < zI));
- r.observe(e), n.current = r, t(e.clientWidth < zI);
+ let r = new ResizeObserver(() => t(e.clientWidth < LI));
+ r.observe(e), n.current = r, t(e.clientWidth < LI);
}, []);
return (0, B.useEffect)(() => () => n.current?.disconnect(), []), [r, e];
}
-var o_e = {
+var l_e = {
select: "选择",
author: "创作者",
source: "来源",
@@ -44676,7 +44807,7 @@ var o_e = {
checked: "上次检查",
actions: "操作"
};
-function BI({ page: e, pages: t, onPage: n, label: r = "关注列表分页" }) {
+function RI({ page: e, pages: t, onPage: n, label: r = "关注列表分页" }) {
return t <= 1 ? null : /* @__PURE__ */ (0, H.jsxs)("nav", {
"aria-label": r,
className: "flex flex-wrap items-center justify-center gap-2",
@@ -44690,7 +44821,7 @@ function BI({ page: e, pages: t, onPage: n, label: r = "关注列表分页" }) {
}),
/* @__PURE__ */ (0, H.jsx)("ul", {
className: "flex flex-wrap items-center gap-1",
- children: vj(e, t).map((t, r) => /* @__PURE__ */ (0, H.jsx)("li", { children: t === "…" ? /* @__PURE__ */ (0, H.jsx)("span", {
+ children: JA(e, t).map((t, r) => /* @__PURE__ */ (0, H.jsx)("li", { children: t === "…" ? /* @__PURE__ */ (0, H.jsx)("span", {
"aria-hidden": !0,
className: "px-1 text-body-2-regular text-text-tertiary",
children: "…"
@@ -44713,22 +44844,22 @@ function BI({ page: e, pages: t, onPage: n, label: r = "关注列表分页" }) {
]
});
}
-function s_e({ source: e, selected: t, onToggle: n, handlers: r }) {
+function u_e({ source: e, selected: t, onToggle: n, handlers: r }) {
return /* @__PURE__ */ (0, H.jsxs)("div", {
"data-selected": t || void 0,
className: "flex min-h-16 flex-wrap items-center gap-3 px-2 py-3",
onClick: (e) => {
- IM(e, e.currentTarget) && n(!t);
+ fM(e, e.currentTarget) && n(!t);
},
children: [
- /* @__PURE__ */ (0, H.jsx)(PM, {
+ /* @__PURE__ */ (0, H.jsx)(uM, {
isSelected: t,
onChange: n,
"aria-label": `选择 ${e.label}`
}),
/* @__PURE__ */ (0, H.jsxs)("span", {
className: "flex min-w-0 grow flex-col gap-0.5",
- children: [/* @__PURE__ */ (0, H.jsx)(VF, { source: e }), e.last_error ? /* @__PURE__ */ (0, H.jsx)("small", {
+ children: [/* @__PURE__ */ (0, H.jsx)(zF, { source: e }), e.last_error ? /* @__PURE__ */ (0, H.jsx)("small", {
className: "text-caption-1-regular text-text-error-primary",
children: e.last_error
}) : null]
@@ -44736,17 +44867,17 @@ function s_e({ source: e, selected: t, onToggle: n, handlers: r }) {
/* @__PURE__ */ (0, H.jsx)("span", {
className: "flex shrink-0 items-center gap-1.5 text-body-2-regular text-text-secondary",
title: e.provider_label,
- children: /* @__PURE__ */ (0, H.jsx)(RF, {
+ children: /* @__PURE__ */ (0, H.jsx)(IF, {
provider: e.provider,
label: e.provider_label
})
}),
- /* @__PURE__ */ (0, H.jsx)(BF, { source: e }),
+ /* @__PURE__ */ (0, H.jsx)(RF, { source: e }),
/* @__PURE__ */ (0, H.jsx)("span", {
className: "shrink-0 text-body-2-regular whitespace-nowrap text-text-secondary",
- children: rF(e)
+ children: tF(e)
}),
- /* @__PURE__ */ (0, H.jsx)(LI, {
+ /* @__PURE__ */ (0, H.jsx)(FI, {
"aria-label": `启用 ${e.label}`,
isSelected: e.enabled,
isDisabled: r.readOnly,
@@ -44758,7 +44889,7 @@ function s_e({ source: e, selected: t, onToggle: n, handlers: r }) {
variant: "secondary",
size: "small",
iconOnly: !0,
- leadingIcon: Xw,
+ leadingIcon: Jw,
"aria-label": `检查 ${e.label} 的更新`,
disabled: !e.enabled || r.readOnly,
...X(r.busy),
@@ -44767,7 +44898,7 @@ function s_e({ source: e, selected: t, onToggle: n, handlers: r }) {
variant: "secondary",
size: "small",
iconOnly: !0,
- leadingIcon: Ww,
+ leadingIcon: Hw,
"aria-label": `移除 ${e.label}`,
disabled: r.readOnly,
onClick: () => r.remove(e)
@@ -44776,11 +44907,11 @@ function s_e({ source: e, selected: t, onToggle: n, handlers: r }) {
]
});
}
-function c_e({ group: e, name: t, open: n, selected: r, handlers: i, onOpen: a, onToggleGroup: o, onToggle: s }) {
- let c = e.map((e) => e.id), l = e.filter((e) => e.enabled).map((e) => e.id), u = e.filter(MP).length, d = [...new Set(e.map((e) => e.provider_label || e.provider))].join("、"), f = `follow-author-${e[0].id}`, p = HP(r, c);
+function d_e({ group: e, name: t, open: n, selected: r, handlers: i, onOpen: a, onToggleGroup: o, onToggle: s }) {
+ let c = e.map((e) => e.id), l = e.filter((e) => e.enabled).map((e) => e.id), u = e.filter(AP).length, d = [...new Set(e.map((e) => e.provider_label || e.provider))].join("、"), f = `follow-author-${e[0].id}`, p = BP(r, c);
return /* @__PURE__ */ (0, H.jsxs)("section", {
"aria-label": `${t} 的关注来源`,
- className: lT({
+ className: sT({
variant: "raised",
padding: "none",
className: "flex flex-col overflow-hidden p-2"
@@ -44790,7 +44921,7 @@ function c_e({ group: e, name: t, open: n, selected: r, handlers: i, onOpen: a,
"data-open": n || void 0,
className: "flex flex-wrap items-center gap-3 px-2 py-2.5",
children: [
- /* @__PURE__ */ (0, H.jsx)(zF, {
+ /* @__PURE__ */ (0, H.jsx)(LF, {
group: e,
name: t
}),
@@ -44802,7 +44933,7 @@ function c_e({ group: e, name: t, open: n, selected: r, handlers: i, onOpen: a,
variant: "secondary",
size: "small",
iconOnly: !0,
- leadingIcon: Xw,
+ leadingIcon: Jw,
"aria-label": `检查 ${t} 的全部来源`,
disabled: !l.length || i.readOnly,
...X(i.busy),
@@ -44811,7 +44942,7 @@ function c_e({ group: e, name: t, open: n, selected: r, handlers: i, onOpen: a,
/* @__PURE__ */ (0, H.jsxs)("span", {
className: "flex shrink-0 items-center gap-1",
title: d,
- children: [e.map((e) => /* @__PURE__ */ (0, H.jsx)(RF, { provider: e.provider }, e.id)), /* @__PURE__ */ (0, H.jsx)(Jc, { children: `来源:${d}` })]
+ children: [e.map((e) => /* @__PURE__ */ (0, H.jsx)(IF, { provider: e.provider }, e.id)), /* @__PURE__ */ (0, H.jsx)(Jc, { children: `来源:${d}` })]
}),
u ? /* @__PURE__ */ (0, H.jsx)("span", {
className: "shrink-0 text-body-2-regular text-text-error-primary",
@@ -44820,7 +44951,7 @@ function c_e({ group: e, name: t, open: n, selected: r, handlers: i, onOpen: a,
/* @__PURE__ */ (0, H.jsx)(J, {
variant: "secondary",
size: "small",
- leadingIcon: Bw,
+ leadingIcon: Rw,
"aria-pressed": p.all ? "true" : p.some ? "mixed" : "false",
"aria-label": `${p.all ? "取消全选" : "全选"} ${t} 的来源`,
onClick: () => o(!p.all),
@@ -44831,7 +44962,7 @@ function c_e({ group: e, name: t, open: n, selected: r, handlers: i, onOpen: a,
size: "small",
"aria-expanded": n,
"aria-controls": f,
- leadingIcon: n ? zw : Iw,
+ leadingIcon: n ? Lw : Pw,
"aria-label": `${n ? "收起" : "展开"} ${t} 的来源`,
onClick: () => a(!n),
children: n ? "收起" : "展开"
@@ -44841,7 +44972,7 @@ function c_e({ group: e, name: t, open: n, selected: r, handlers: i, onOpen: a,
id: f,
hidden: !n,
"data-source-divider": !0,
- children: e.map((e) => /* @__PURE__ */ (0, H.jsx)(s_e, {
+ children: e.map((e) => /* @__PURE__ */ (0, H.jsx)(u_e, {
source: e,
handlers: i,
selected: r.has(e.id),
@@ -44850,37 +44981,37 @@ function c_e({ group: e, name: t, open: n, selected: r, handlers: i, onOpen: a,
})]
});
}
-function l_e(e) {
- let { data: t, sort: n, dir: i, page: a, layout: o, pageSize: s, selected: c, readOnly: l, onSort: u, onPage: d, onLayout: f, onPageSize: p, onSelected: m, toast: h, openFollow: g } = e, _ = t.sources, v = (0, B.useMemo)(() => t.author_aliases || [], [t.author_aliases]), y = t.counts || {}, [b, x] = (0, B.useState)(/* @__PURE__ */ new Set()), [S, C] = a_e(), [w, T] = (0, B.useState)(""), E = (0, B.useMemo)(() => Jme(_, n, i, v), [
+function f_e(e) {
+ let { data: t, sort: n, dir: i, page: a, layout: o, pageSize: s, selected: c, readOnly: l, onSort: u, onPage: d, onLayout: f, onPageSize: p, onSelected: m, toast: h, openFollow: g } = e, _ = t.sources, v = (0, B.useMemo)(() => t.author_aliases || [], [t.author_aliases]), y = t.counts || {}, [b, x] = (0, B.useState)(/* @__PURE__ */ new Set()), [S, C] = c_e(), [w, T] = (0, B.useState)(""), E = (0, B.useMemo)(() => Zme(_, n, i, v), [
_,
n,
i,
v
- ]), D = (0, B.useMemo)(() => Yme(E, n, i, v), [
+ ]), D = (0, B.useMemo)(() => Qme(E, n, i, v), [
E,
n,
i,
v
- ]), { job: O, running: k, outcome: A, start: j } = AM({
- queryKey: zme,
- queryFn: ({ signal: e }) => Zme(e),
- start: (e) => KP(e),
+ ]), { job: O, running: k, outcome: A, start: j } = oM({
+ queryKey: Hme,
+ queryFn: ({ signal: e }) => ehe(e),
+ start: (e) => WP(e),
onError: (e) => T(G(e)),
onFinish: (e) => {
- nF(), h(e.status === "failed" ? e.error || "检查失败" : lhe(e));
+ eF(), h(e.status === "failed" ? e.error || "检查失败" : fhe(e));
}
}), M = (e) => {
k || j.isPending || (T(""), j.mutate(e));
- }, N = (e, t) => m(UP(c, [e], t)), ee = (e, t) => m(UP(c, e, t)), te = ww({
- mutationFn: (e) => JP(e),
+ }, N = (e, t) => m(VP(c, [e], t)), ee = (e, t) => m(VP(c, e, t)), te = Sw({
+ mutationFn: (e) => KP(e),
onSuccess: (e, t) => {
- tF([t]), m(UP(c, [t], !1)), h("已取消关注来源");
+ $P([t]), m(VP(c, [t], !1)), h("已取消关注来源");
},
onError: (e) => T(G(e))
- }), P = ww({
- mutationFn: (e) => qP(e.id, e.enabled),
+ }), P = Sw({
+ mutationFn: (e) => GP(e.id, e.enabled),
onSuccess: (e, t) => {
- eF(t.id, { enabled: t.enabled }), T("");
+ QP(t.id, { enabled: t.enabled }), T("");
},
onError: (e) => T(G(e))
}), F = (e) => void r({
@@ -44889,10 +45020,10 @@ function l_e(e) {
confirmLabel: "取消关注来源",
danger: !0,
onConfirm: () => te.mutateAsync(e.id)
- }), ne = ww({
+ }), ne = Sw({
mutationFn: async (e) => {
let t = await ae(e.ids, 4, async (t) => {
- e.action === "remove" ? await JP(t) : await qP(t, e.action === "enabled");
+ e.action === "remove" ? await KP(t) : await GP(t, e.action === "enabled");
});
return {
...e,
@@ -44901,9 +45032,9 @@ function l_e(e) {
};
},
onSuccess: (e) => {
- if (e.action === "remove") tF(e.done);
- else for (let t of e.done) eF(t, { enabled: e.action === "enabled" });
- m(UP(c, e.done, !1));
+ if (e.action === "remove") $P(e.done);
+ else for (let t of e.done) QP(t, { enabled: e.action === "enabled" });
+ m(VP(c, e.done, !1));
let t = e.results.filter((e) => !e.ok);
if (t.length) {
T(`${t.length}/${e.ids.length} 个来源未更新:${G(t[0]?.error)}`);
@@ -44914,20 +45045,20 @@ function l_e(e) {
h(`已${n} ${e.done.length} 个关注来源`);
},
onError: (e) => T(G(e))
- }), I = ww({
+ }), I = Sw({
mutationFn: async (e) => {
- let t = ((await ahe()).groups || []).flatMap((e) => [
+ let t = ((await che()).groups || []).flatMap((e) => [
e.primary,
...e.variants,
...e.duplicates
]).filter((e) => e.status === "new").map((e) => e.id);
return {
ids: t,
- failed: (await ae(t, 6, (t) => ihe(t, e))).filter((e) => !e.ok)
+ failed: (await ae(t, 6, (t) => she(t, e))).filter((e) => !e.ok)
};
},
onSuccess: (e) => {
- if (nF(), e.failed.length) {
+ if (eF(), e.failed.length) {
T(`批量更新 ${e.failed.length}/${e.ids.length} 项未完成`);
return;
}
@@ -44952,12 +45083,12 @@ function l_e(e) {
readOnly: l
};
let ie = L.current, oe = (0, B.useMemo)(() => {
- let e = KF(), t = (e) => () => o_e[e] || e;
+ let e = WF(), t = (e) => () => l_e[e] || e;
return [
e.display({
id: "select",
header: t("select"),
- cell: (e) => /* @__PURE__ */ (0, H.jsx)(PM, {
+ cell: (e) => /* @__PURE__ */ (0, H.jsx)(uM, {
slot: null,
isSelected: e.row.getIsSelected(),
onChange: (t) => e.row.toggleSelected(t),
@@ -44969,7 +45100,7 @@ function l_e(e) {
header: t("author"),
cell: (e) => /* @__PURE__ */ (0, H.jsxs)("span", {
className: "flex min-w-0 items-center gap-2",
- children: [/* @__PURE__ */ (0, H.jsx)(zF, {
+ children: [/* @__PURE__ */ (0, H.jsx)(LF, {
group: e.row.original.group,
name: e.row.original.author
}), /* @__PURE__ */ (0, H.jsx)("span", {
@@ -44983,7 +45114,7 @@ function l_e(e) {
header: t("source"),
cell: (e) => /* @__PURE__ */ (0, H.jsxs)("span", {
className: "flex min-w-0 flex-col gap-0.5",
- children: [/* @__PURE__ */ (0, H.jsx)(VF, { source: e.row.original.source }), e.row.original.source.last_error ? /* @__PURE__ */ (0, H.jsx)("small", {
+ children: [/* @__PURE__ */ (0, H.jsx)(zF, { source: e.row.original.source }), e.row.original.source.last_error ? /* @__PURE__ */ (0, H.jsx)("small", {
className: "text-caption-1-regular text-text-error-primary",
children: e.row.original.source.last_error
}) : null]
@@ -44994,18 +45125,18 @@ function l_e(e) {
header: t("provider"),
cell: (e) => /* @__PURE__ */ (0, H.jsxs)("span", {
className: "flex items-center gap-1.5",
- children: [/* @__PURE__ */ (0, H.jsx)(RF, { provider: e.row.original.source.provider }), e.row.original.source.provider_label]
+ children: [/* @__PURE__ */ (0, H.jsx)(IF, { provider: e.row.original.source.provider }), e.row.original.source.provider_label]
})
}),
e.display({
id: "status",
header: t("status"),
- cell: (e) => /* @__PURE__ */ (0, H.jsx)(BF, { source: e.row.original.source })
+ cell: (e) => /* @__PURE__ */ (0, H.jsx)(RF, { source: e.row.original.source })
}),
e.accessor((e) => e.source.last_checked_at || "", {
id: "checked",
header: t("checked"),
- cell: (e) => rF(e.row.original.source)
+ cell: (e) => tF(e.row.original.source)
}),
e.display({
id: "actions",
@@ -45013,7 +45144,7 @@ function l_e(e) {
cell: (e) => /* @__PURE__ */ (0, H.jsxs)("span", {
className: "flex items-center gap-1",
children: [
- /* @__PURE__ */ (0, H.jsx)(LI, {
+ /* @__PURE__ */ (0, H.jsx)(FI, {
"aria-label": `启用 ${e.row.original.source.label}`,
isSelected: e.row.original.source.enabled,
isDisabled: ie.readOnly,
@@ -45023,7 +45154,7 @@ function l_e(e) {
variant: "secondary",
size: "small",
iconOnly: !0,
- leadingIcon: Xw,
+ leadingIcon: Jw,
"aria-label": `检查 ${e.row.original.source.label} 的更新`,
disabled: !e.row.original.source.enabled || ie.readOnly,
...X(ie.busy),
@@ -45033,7 +45164,7 @@ function l_e(e) {
variant: "secondary",
size: "small",
iconOnly: !0,
- leadingIcon: Ww,
+ leadingIcon: Hw,
"aria-label": `移除 ${e.row.original.source.label}`,
disabled: ie.readOnly,
onClick: () => L.current.remove(e.row.original.source)
@@ -45043,12 +45174,12 @@ function l_e(e) {
})
];
}, [ie]), se = (0, B.useMemo)(() => {
- let e = i_e[n];
+ let e = s_e[n];
return e ? [{
id: e,
desc: i === "desc"
}] : [];
- }, [n, i]), ce = (0, B.useMemo)(() => Object.fromEntries([...c].map((e) => [String(e), !0])), [c]), le = o === "table", R = VP(le ? D.length : E.length, s, a), ue = II({
+ }, [n, i]), ce = (0, B.useMemo)(() => Object.fromEntries([...c].map((e) => [String(e), !0])), [c]), le = o === "table", R = zP(le ? D.length : E.length, s, a), ue = PI({
data: D,
columns: oe,
getRowId: (e) => String(e.source.id),
@@ -45065,7 +45196,7 @@ function l_e(e) {
onSortingChange: (e) => {
let t = (typeof e == "function" ? e(se) : e)[0];
if (!t) return;
- let n = AP[t.id];
+ let n = OP[t.id];
n && u(n, t.desc ? "desc" : "asc");
},
onRowSelectionChange: (e) => {
@@ -45079,11 +45210,11 @@ function l_e(e) {
}, n = typeof e == "function" ? e(t) : e;
n.pageSize === s ? n.pageIndex !== t.pageIndex && d(n.pageIndex + 1) : p(n.pageSize);
},
- getCoreRowModel: NI(),
- getPaginationRowModel: PI()
- }), de = ue.getRowModel().rows, fe = le ? de.map((e) => e.original.source.id) : E.slice(R.start, R.end).flatMap((e) => e.map((e) => e.id)), pe = HP(c, fe), me = [...c], he = uhe(A), ge = dhe(A), _e = E.length > 0 && b.size >= E.length;
+ getCoreRowModel: jI(),
+ getPaginationRowModel: MI()
+ }), de = ue.getRowModel().rows, fe = le ? de.map((e) => e.original.source.id) : E.slice(R.start, R.end).flatMap((e) => e.map((e) => e.id)), pe = BP(c, fe), me = [...c], he = phe(A), ge = mhe(A), _e = E.length > 0 && b.size >= E.length;
return _.length ? /* @__PURE__ */ (0, H.jsxs)("div", {
- className: lT({
+ className: sT({
padding: "none",
className: "flex flex-col gap-4 px-6 py-5 max-sm:px-4"
}),
@@ -45102,7 +45233,7 @@ function l_e(e) {
}),
/* @__PURE__ */ (0, H.jsx)(J, {
variant: "primary",
- leadingIcon: Xw,
+ leadingIcon: Jw,
disabled: l,
"aria-label": "检查全部",
iconOnly: C,
@@ -45117,28 +45248,28 @@ function l_e(e) {
children: [/* @__PURE__ */ (0, H.jsx)(J, {
variant: "ghost",
iconOnly: !0,
- leadingIcon: $ae,
- "aria-label": OP[0][1],
+ leadingIcon: toe,
+ "aria-label": EP[0][1],
"aria-pressed": !le,
onClick: () => f("default")
}), /* @__PURE__ */ (0, H.jsx)(J, {
variant: "ghost",
iconOnly: !0,
- leadingIcon: noe,
- "aria-label": OP[1][1],
+ leadingIcon: ioe,
+ "aria-label": EP[1][1],
"aria-pressed": le,
onClick: () => f("table")
})]
}),
- /* @__PURE__ */ (0, H.jsx)(SA, {
+ /* @__PURE__ */ (0, H.jsx)(Vk, {
"aria-label": "关注列表排序",
selectedKey: n,
onSelectionChange: (e) => {
if (e === null) return;
let t = String(e);
- u(t, hP[t]);
+ u(t, pP[t]);
},
- children: mP.map(([e, t]) => /* @__PURE__ */ (0, H.jsx)(CA, {
+ children: fP.map(([e, t]) => /* @__PURE__ */ (0, H.jsx)(Hk, {
id: e,
children: t
}, e))
@@ -45146,14 +45277,14 @@ function l_e(e) {
/* @__PURE__ */ (0, H.jsx)(J, {
variant: "secondary",
iconOnly: !0,
- leadingIcon: i === "asc" ? Wae : Uae,
- "aria-label": Kme(n, i),
+ leadingIcon: i === "asc" ? Kae : Gae,
+ "aria-label": Yme(n, i),
onClick: () => u(n, i === "asc" ? "desc" : "asc")
}),
le ? null : /* @__PURE__ */ (0, H.jsx)(J, {
variant: "secondary",
iconOnly: C,
- leadingIcon: _e ? Iw : zw,
+ leadingIcon: _e ? Pw : Lw,
"aria-label": _e ? "全部展开" : "全部收起",
onClick: () => x(_e ? /* @__PURE__ */ new Set() : new Set(E.map((e) => String(e[0].author_key || e[0].id)))),
children: _e ? "全部展开" : "全部收起"
@@ -45164,7 +45295,7 @@ function l_e(e) {
"aria-live": "polite",
className: "flex flex-col gap-3 empty:hidden",
children: [
- k ? /* @__PURE__ */ (0, H.jsx)(CT, {
+ k ? /* @__PURE__ */ (0, H.jsx)(xT, {
embedded: !0,
label: O?.message || (O?.total ? `${O.older ? "抓取历史" : "检查更新"}:已完成 ${O.checked || 0}/${O.total} 个来源` : "正在准备检查任务"),
value: O?.checked,
@@ -45190,7 +45321,7 @@ function l_e(e) {
}) : null
]
}),
- /* @__PURE__ */ (0, H.jsxs)(YE, {
+ /* @__PURE__ */ (0, H.jsxs)(qE, {
label: "关注来源批量操作",
visible: me.length > 0,
count: `已选 ${me.length} 个来源`,
@@ -45250,10 +45381,10 @@ function l_e(e) {
})
]
}),
- le ? /* @__PURE__ */ (0, H.jsx)(LM, {
+ le ? /* @__PURE__ */ (0, H.jsx)(pM, {
follow: !0,
onRowClick: (e) => N(Number(e), !c.has(Number(e))),
- children: /* @__PURE__ */ (0, H.jsxs)(FM, {
+ children: /* @__PURE__ */ (0, H.jsxs)(dM, {
"aria-label": "关注来源",
size: "sm",
sortDescriptor: se[0] ? {
@@ -45264,9 +45395,9 @@ function l_e(e) {
id: String(e.column),
desc: e.direction === "descending"
}]),
- children: [/* @__PURE__ */ (0, H.jsx)(w_, { children: ue.getHeaderGroups()[0].headers.map((e) => {
- let t = e.column.id in AP, n = FI(e.column.columnDef.header, e.getContext());
- return /* @__PURE__ */ (0, H.jsx)(T_, {
+ children: [/* @__PURE__ */ (0, H.jsx)(C_, { children: ue.getHeaderGroups()[0].headers.map((e) => {
+ let t = e.column.id in OP, n = NI(e.column.columnDef.header, e.getContext());
+ return /* @__PURE__ */ (0, H.jsx)(w_, {
id: e.id,
allowsSorting: t,
isRowHeader: e.column.id === "source",
@@ -45275,20 +45406,20 @@ function l_e(e) {
children: [n, /* @__PURE__ */ (0, H.jsx)("span", {
"data-sort-indicator": !0,
"data-direction": e || void 0,
- children: /* @__PURE__ */ (0, H.jsx)(Ile, {})
+ children: /* @__PURE__ */ (0, H.jsx)(_ue, {})
})]
}) : /* @__PURE__ */ (0, H.jsx)(Jc, { children: n })
}, e.id);
- }) }), /* @__PURE__ */ (0, H.jsx)(D_, {
+ }) }), /* @__PURE__ */ (0, H.jsx)(E_, {
renderEmptyState: () => "这一页没有来源",
- children: de.map((e) => /* @__PURE__ */ (0, H.jsx)(A_, {
+ children: de.map((e) => /* @__PURE__ */ (0, H.jsx)(k_, {
id: e.id,
"data-follow-selected": e.getIsSelected() || void 0,
- children: e.getVisibleCells().map((e) => /* @__PURE__ */ (0, H.jsx)(M_, { children: FI(e.column.columnDef.cell, e.getContext()) }, e.id))
+ children: e.getVisibleCells().map((e) => /* @__PURE__ */ (0, H.jsx)(j_, { children: NI(e.column.columnDef.cell, e.getContext()) }, e.id))
}, e.id))
})]
})
- }) : /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(PM, {
+ }) : /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(uM, {
isSelected: pe.all,
isIndeterminate: pe.some,
onChange: (e) => ee(fe, e),
@@ -45298,9 +45429,9 @@ function l_e(e) {
className: "flex flex-col gap-3",
children: E.slice(R.start, R.end).map((e) => {
let t = String(e[0].author_key || e[0].id);
- return /* @__PURE__ */ (0, H.jsx)(c_e, {
+ return /* @__PURE__ */ (0, H.jsx)(d_e, {
group: e,
- name: LP(e, v),
+ name: FP(e, v),
handlers: ie,
selected: c,
open: !b.has(t),
@@ -45320,19 +45451,19 @@ function l_e(e) {
className: "text-body-2-regular text-text-secondary",
children: `${R.start + 1}–${R.end} / ${R.total} ${le ? "个来源" : "位创作者"}`
}),
- /* @__PURE__ */ (0, H.jsx)(SA, {
+ /* @__PURE__ */ (0, H.jsx)(Vk, {
"aria-label": "每页显示数量",
size: "sm",
selectedKey: String(s),
onSelectionChange: (e) => {
e !== null && ue.setPageSize(Number(e));
},
- children: kP.map((e) => /* @__PURE__ */ (0, H.jsx)(CA, {
+ children: DP.map((e) => /* @__PURE__ */ (0, H.jsx)(Hk, {
id: String(e),
children: `每页 ${e} ${le ? "条" : "位"}`
}, e))
}),
- /* @__PURE__ */ (0, H.jsx)(BI, {
+ /* @__PURE__ */ (0, H.jsx)(RI, {
page: R.page,
pages: R.pages,
onPage: (e) => ue.setPageIndex(e - 1)
@@ -45381,11 +45512,11 @@ function l_e(e) {
]
}) : null
]
- }) : /* @__PURE__ */ (0, H.jsx)(fA, {
+ }) : /* @__PURE__ */ (0, H.jsx)(Nk, {
shell: "plain",
- icon: Zw,
+ icon: Yw,
title: "还没有关注来源",
- actions: /* @__PURE__ */ (0, H.jsx)(rT, {
+ actions: /* @__PURE__ */ (0, H.jsx)(tT, {
variant: "primary",
size: "small",
href: "/follow-manage?tab=add",
@@ -45396,7 +45527,7 @@ function l_e(e) {
}
//#endregion
//#region src/react/follow-manage/feed-sources.tsx
-var u_e = {
+var p_e = {
select: "选择",
name: "名称",
kind: "类型",
@@ -45406,33 +45537,33 @@ var u_e = {
fetched: "上次拉取",
fresh: "上次新增",
actions: "操作"
-}, d_e = /* @__PURE__ */ new Set(["select", "actions"]), VI = () => z.invalidateQueries({
- queryKey: DP,
+}, m_e = /* @__PURE__ */ new Set(["select", "actions"]), zI = () => z.invalidateQueries({
+ queryKey: TP,
exact: !0
-}), HI = (e) => e.name || e.url, f_e = (e) => e >= 60 ? `每 ${Math.round(e / 60)} 小时` : `每 ${e} 分钟`;
-function p_e(e) {
+}), BI = (e) => e.name || e.url, h_e = (e) => e >= 60 ? `每 ${Math.round(e / 60)} 小时` : `每 ${e} 分钟`;
+function g_e(e) {
try {
return new URL(e).hostname.replace(/^www\./, "");
} catch {
return e;
}
}
-function m_e({ source: e }) {
- return e.last_error ? /* @__PURE__ */ (0, H.jsx)(uA, {
+function __e({ source: e }) {
+ return e.last_error ? /* @__PURE__ */ (0, H.jsx)(Mk, {
variant: "caption",
color: "rose",
children: "拉取失败"
- }) : e.enabled ? /* @__PURE__ */ (0, H.jsx)(uA, {
+ }) : e.enabled ? /* @__PURE__ */ (0, H.jsx)(Mk, {
variant: "caption",
color: "lime",
children: "正常"
- }) : /* @__PURE__ */ (0, H.jsx)(uA, {
+ }) : /* @__PURE__ */ (0, H.jsx)(Mk, {
variant: "caption",
color: "neutral",
children: "已暂停"
});
}
-function h_e({ source: e }) {
+function v_e({ source: e }) {
let t = e.entity_id ? {
id: e.entity_id,
has_image: !!e.has_image,
@@ -45441,31 +45572,31 @@ function h_e({ source: e }) {
} : null;
return /* @__PURE__ */ (0, H.jsx)("span", {
"aria-hidden": !0,
- className: `relative inline-grid size-8 shrink-0 place-items-center overflow-hidden rounded-full bg-background-tertiary-default text-caption-1-semibold text-text-secondary ${RI}`,
- dangerouslySetInnerHTML: { __html: ue(HI(e), t, null, "performer") }
+ className: `relative inline-grid size-8 shrink-0 place-items-center overflow-hidden rounded-full bg-background-tertiary-default text-caption-1-semibold text-text-secondary ${II}`,
+ dangerouslySetInnerHTML: { __html: ue(BI(e), t, null, "performer") }
});
}
-var g_e = (e, t) => e.entity_id !== null && t.has(e.entity_id) && e.page_name && e.page_name !== e.name ? e.page_name : "";
-function __e(e) {
+var y_e = (e, t) => e.entity_id !== null && t.has(e.entity_id) && e.page_name && e.page_name !== e.name ? e.page_name : "";
+function b_e(e) {
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
for (let { entity_id: r } of e) r !== null && (t.has(r) ? n.add(r) : t.add(r));
return n;
}
-function UI(e, t) {
+function VI(e, t) {
let n = e.length === 1 ? e[0] : null;
return r({
title: n ? "移除订阅源" : `移除 ${e.length} 条订阅源`,
- body: n ? `将移除订阅源「${HI(n)}」,之后不再拉取它的新作;已经拉到的新作保留。` : "将移除所选订阅源,之后不再拉取它们的新作;已经拉到的新作保留。",
+ body: n ? `将移除订阅源「${BI(n)}」,之后不再拉取它的新作;已经拉到的新作保留。` : "将移除所选订阅源,之后不再拉取它们的新作;已经拉到的新作保留。",
confirmLabel: n ? "移除订阅源" : "移除所选订阅源",
danger: !0,
onConfirm: t
});
}
-function v_e({ readOnly: e, toast: t }) {
- let n = xw({
- queryKey: DP,
- queryFn: ({ signal: e }) => XP(e)
- }), r = vT(), i = n.data, a = (0, B.useMemo)(() => i?.sources ?? [], [i]), [o, s] = (0, B.useState)(/* @__PURE__ */ new Set()), [c, l] = (0, B.useState)(1), [u, d] = (0, B.useState)(20), f = VP(a.length, u, c);
+function x_e({ readOnly: e, toast: t }) {
+ let n = yw({
+ queryKey: TP,
+ queryFn: ({ signal: e }) => JP(e)
+ }), r = gT(), i = n.data, a = (0, B.useMemo)(() => i?.sources ?? [], [i]), [o, s] = (0, B.useState)(/* @__PURE__ */ new Set()), [c, l] = (0, B.useState)(1), [u, d] = (0, B.useState)(20), f = zP(a.length, u, c);
(0, B.useEffect)(() => {
l((e) => Math.min(e, f.pages));
}, [f.pages]), (0, B.useEffect)(() => {
@@ -45474,10 +45605,10 @@ function v_e({ readOnly: e, toast: t }) {
return n.size === e.size ? e : n;
});
}, [a]);
- let p = ww({
+ let p = Sw({
mutationFn: async (e) => {
let t = await ae(e.ids, 4, async (t) => {
- e.action === "remove" ? await QP(t) : await ZP(t, e.action === "enabled");
+ e.action === "remove" ? await XP(t) : await YP(t, e.action === "enabled");
});
return {
...e,
@@ -45486,13 +45617,13 @@ function v_e({ readOnly: e, toast: t }) {
},
onSuccess: (e) => {
let n = e.results.filter((e) => !e.ok), i = e.ids.length - n.length;
- if (s(/* @__PURE__ */ new Set()), VI(), e.action === "remove" && i && t(`已移除 ${i} 条订阅源`), n.length) {
+ if (s(/* @__PURE__ */ new Set()), zI(), e.action === "remove" && i && t(`已移除 ${i} 条订阅源`), n.length) {
let e = n[0];
r.setError(`${n.length} 条没有写入:${e.ok ? "" : G(e.error)}`);
}
},
onError: (e) => r.setError(G(e))
- }), m = (0, B.useMemo)(() => __e(a), [a]), h = (0, B.useRef)({
+ }), m = (0, B.useMemo)(() => b_e(a), [a]), h = (0, B.useRef)({
readOnly: e,
shared: m,
busy: null,
@@ -45504,34 +45635,34 @@ function v_e({ readOnly: e, toast: t }) {
readOnly: e,
shared: m,
busy: r.busy,
- toggle: (e, t) => void r.run(`enabled-${e.id}`, (n) => ZP(e.id, t, n), () => void VI()),
- fetch: (e) => void r.run(`check-${e.id}`, (t) => $P(t, [e.id]), () => void VI()),
- remove: (e) => void UI([e], async () => {
- await QP(e.id), t(`已移除订阅源「${HI(e)}」`), VI();
+ toggle: (e, t) => void r.run(`enabled-${e.id}`, (n) => YP(e.id, t, n), () => void zI()),
+ fetch: (e) => void r.run(`check-${e.id}`, (t) => ZP(t, [e.id]), () => void zI()),
+ remove: (e) => void VI([e], async () => {
+ await XP(e.id), t(`已移除订阅源「${BI(e)}」`), zI();
})
};
let g = (0, B.useMemo)(() => {
- let e = KF(), t = (e) => () => u_e[e] || e;
+ let e = WF(), t = (e) => () => p_e[e] || e;
return [
e.display({
id: "select",
header: t("select"),
- cell: (e) => /* @__PURE__ */ (0, H.jsx)(PM, {
+ cell: (e) => /* @__PURE__ */ (0, H.jsx)(uM, {
slot: null,
isSelected: e.row.getIsSelected(),
onChange: (t) => e.row.toggleSelected(t),
- "aria-label": `选择 ${HI(e.row.original)}`
+ "aria-label": `选择 ${BI(e.row.original)}`
})
}),
- e.accessor(HI, {
+ e.accessor(BI, {
id: "name",
header: t("name"),
cell: (e) => {
- let t = g_e(e.row.original, h.current.shared);
+ let t = y_e(e.row.original, h.current.shared);
return /* @__PURE__ */ (0, H.jsxs)("span", {
className: "flex items-center gap-2 whitespace-nowrap text-body-medium text-text-primary",
children: [
- /* @__PURE__ */ (0, H.jsx)(h_e, { source: e.row.original }),
+ /* @__PURE__ */ (0, H.jsx)(v_e, { source: e.row.original }),
e.getValue(),
t ? /* @__PURE__ */ (0, H.jsx)("span", {
className: "text-body-2-regular text-text-secondary",
@@ -45559,15 +45690,15 @@ function v_e({ readOnly: e, toast: t }) {
rel: "noreferrer noopener",
title: "打开来源页面",
className: "text-text-primary underline-offset-2 hover:underline",
- children: p_e(e.getValue())
+ children: g_e(e.getValue())
})
}),
e.display({
id: "status",
header: t("status"),
- cell: (e) => /* @__PURE__ */ (0, H.jsx)(m_e, { source: e.row.original })
+ cell: (e) => /* @__PURE__ */ (0, H.jsx)(__e, { source: e.row.original })
}),
- e.accessor((e) => f_e(e.interval_minutes), {
+ e.accessor((e) => h_e(e.interval_minutes), {
id: "interval",
header: t("interval"),
cell: (e) => /* @__PURE__ */ (0, H.jsx)("span", {
@@ -45575,7 +45706,7 @@ function v_e({ readOnly: e, toast: t }) {
children: e.getValue()
})
}),
- e.accessor((e) => e.last_fetched_at ? xj(e.last_fetched_at) : "还没拉过", {
+ e.accessor((e) => e.last_fetched_at ? ZA(e.last_fetched_at) : "还没拉过", {
id: "fetched",
header: t("fetched"),
cell: (e) => /* @__PURE__ */ (0, H.jsx)("span", {
@@ -45597,8 +45728,8 @@ function v_e({ readOnly: e, toast: t }) {
cell: (e) => /* @__PURE__ */ (0, H.jsxs)("span", {
className: "flex items-center gap-1",
children: [
- /* @__PURE__ */ (0, H.jsx)(LI, {
- "aria-label": `启用 ${HI(e.row.original)}`,
+ /* @__PURE__ */ (0, H.jsx)(FI, {
+ "aria-label": `启用 ${BI(e.row.original)}`,
isSelected: e.row.original.enabled,
isDisabled: h.current.readOnly,
onChange: (t) => h.current.toggle(e.row.original, t)
@@ -45607,8 +45738,8 @@ function v_e({ readOnly: e, toast: t }) {
variant: "secondary",
size: "xs",
iconOnly: !0,
- leadingIcon: Xw,
- "aria-label": `拉取 ${HI(e.row.original)}`,
+ leadingIcon: Jw,
+ "aria-label": `拉取 ${BI(e.row.original)}`,
disabled: h.current.readOnly,
...X(h.current.busy === `check-${e.row.original.id}`),
onClick: () => h.current.fetch(e.row.original)
@@ -45617,8 +45748,8 @@ function v_e({ readOnly: e, toast: t }) {
variant: "secondary",
size: "xs",
iconOnly: !0,
- leadingIcon: Ww,
- "aria-label": `移除 ${HI(e.row.original)}`,
+ leadingIcon: Hw,
+ "aria-label": `移除 ${BI(e.row.original)}`,
disabled: h.current.readOnly,
onClick: () => h.current.remove(e.row.original)
})
@@ -45626,7 +45757,7 @@ function v_e({ readOnly: e, toast: t }) {
})
})
];
- }, []), _ = (0, B.useMemo)(() => Object.fromEntries([...o].map((e) => [String(e), !0])), [o]), v = II({
+ }, []), _ = (0, B.useMemo)(() => Object.fromEntries([...o].map((e) => [String(e), !0])), [o]), v = PI({
data: a,
columns: g,
getRowId: (e) => String(e.id),
@@ -45642,27 +45773,27 @@ function v_e({ readOnly: e, toast: t }) {
let t = typeof e == "function" ? e(_) : e;
s(new Set(Object.entries(t).filter(([, e]) => e).map(([e]) => Number(e))));
},
- getCoreRowModel: NI(),
- getPaginationRowModel: PI()
+ getCoreRowModel: jI(),
+ getPaginationRowModel: MI()
});
if (!i) return n.error ? /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "error",
title: "打不开订阅源",
children: G(n.error)
- }) : /* @__PURE__ */ (0, H.jsx)(jT, { children: "正在读订阅源。" });
- let y = () => void r.run("check", (e) => $P(e), () => void VI()), b = (e) => s((t) => {
+ }) : /* @__PURE__ */ (0, H.jsx)(kT, { children: "正在读订阅源。" });
+ let y = () => void r.run("check", (e) => ZP(e), () => void zI()), b = (e) => s((t) => {
let n = new Set(t);
return n.has(e) ? n.delete(e) : n.add(e), n;
}), x = a.filter((e) => o.has(e.id)), S = a.filter((e) => e.last_error);
return /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-col gap-3",
- children: [/* @__PURE__ */ (0, H.jsx)(r_e, {
+ children: [/* @__PURE__ */ (0, H.jsx)(o_e, {
readOnly: e,
toast: t,
- onAdded: () => void VI()
+ onAdded: () => void zI()
}), /* @__PURE__ */ (0, H.jsxs)("section", {
"aria-label": "JAV 订阅列表",
- className: lT({
+ className: sT({
padding: "none",
className: "flex flex-col gap-4 px-6 py-5 max-sm:px-4"
}),
@@ -45690,11 +45821,11 @@ function v_e({ readOnly: e, toast: t }) {
className: "flex flex-col gap-3",
children: [S.map((e) => /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "error",
- title: `${HI(e)} 拉取失败`,
+ title: `${BI(e)} 拉取失败`,
children: e.last_error
- }, e.id)), r.error ? /* @__PURE__ */ (0, H.jsx)(MT, { children: r.error }) : null]
+ }, e.id)), r.error ? /* @__PURE__ */ (0, H.jsx)(AT, { children: r.error }) : null]
}) : null,
- /* @__PURE__ */ (0, H.jsxs)(YE, {
+ /* @__PURE__ */ (0, H.jsxs)(qE, {
visible: x.length > 0,
label: "订阅源批量操作",
count: `已选 ${x.length} 条订阅源`,
@@ -45726,7 +45857,7 @@ function v_e({ readOnly: e, toast: t }) {
size: "small",
disabled: e,
...X(p.isPending),
- onClick: () => void UI(x, () => p.mutateAsync({
+ onClick: () => void VI(x, () => p.mutateAsync({
ids: x.map((e) => e.id),
action: "remove"
})),
@@ -45740,26 +45871,26 @@ function v_e({ readOnly: e, toast: t }) {
})
]
}),
- a.length ? /* @__PURE__ */ (0, H.jsx)(LM, {
+ a.length ? /* @__PURE__ */ (0, H.jsx)(pM, {
onRowClick: (e) => b(Number(e)),
- children: /* @__PURE__ */ (0, H.jsxs)(FM, {
+ children: /* @__PURE__ */ (0, H.jsxs)(dM, {
"aria-label": "JAV 订阅源",
size: "sm",
- children: [/* @__PURE__ */ (0, H.jsx)(w_, { children: v.getHeaderGroups()[0].headers.map((e) => {
- let t = FI(e.column.columnDef.header, e.getContext());
- return /* @__PURE__ */ (0, H.jsx)(T_, {
+ children: [/* @__PURE__ */ (0, H.jsx)(C_, { children: v.getHeaderGroups()[0].headers.map((e) => {
+ let t = NI(e.column.columnDef.header, e.getContext());
+ return /* @__PURE__ */ (0, H.jsx)(w_, {
id: e.id,
isRowHeader: e.column.id === "name",
- children: d_e.has(e.column.id) ? /* @__PURE__ */ (0, H.jsx)(Jc, { children: t }) : t
+ children: m_e.has(e.column.id) ? /* @__PURE__ */ (0, H.jsx)(Jc, { children: t }) : t
}, e.id);
- }) }), /* @__PURE__ */ (0, H.jsx)(D_, { children: v.getRowModel().rows.map((e) => /* @__PURE__ */ (0, H.jsx)(A_, {
+ }) }), /* @__PURE__ */ (0, H.jsx)(E_, { children: v.getRowModel().rows.map((e) => /* @__PURE__ */ (0, H.jsx)(k_, {
id: e.id,
"data-follow-selected": e.getIsSelected() || void 0,
- children: e.getVisibleCells().map((e) => /* @__PURE__ */ (0, H.jsx)(M_, { children: FI(e.column.columnDef.cell, e.getContext()) }, e.id))
+ children: e.getVisibleCells().map((e) => /* @__PURE__ */ (0, H.jsx)(j_, { children: NI(e.column.columnDef.cell, e.getContext()) }, e.id))
}, e.id)) })]
})
- }) : /* @__PURE__ */ (0, H.jsx)(fA, {
- icon: Zw,
+ }) : /* @__PURE__ */ (0, H.jsx)(Nk, {
+ icon: Yw,
title: "还没有订阅源",
shell: "plain",
children: "在上面按女优名添加,或在人物页点「订阅新作」。"
@@ -45771,19 +45902,19 @@ function v_e({ readOnly: e, toast: t }) {
className: "text-body-2-regular text-text-secondary",
children: `${f.start + 1}–${f.end} / ${f.total} 个订阅源`
}),
- /* @__PURE__ */ (0, H.jsx)(SA, {
+ /* @__PURE__ */ (0, H.jsx)(Vk, {
"aria-label": "每页显示数量",
size: "sm",
selectedKey: String(u),
onSelectionChange: (e) => {
e !== null && (d(Number(e)), l(1));
},
- children: kP.map((e) => /* @__PURE__ */ (0, H.jsx)(CA, {
+ children: DP.map((e) => /* @__PURE__ */ (0, H.jsx)(Hk, {
id: String(e),
children: `每页 ${e} 条`
}, e))
}),
- /* @__PURE__ */ (0, H.jsx)(BI, {
+ /* @__PURE__ */ (0, H.jsx)(RI, {
label: "JAV 订阅分页",
page: f.page,
pages: f.pages,
@@ -45805,8 +45936,8 @@ function v_e({ readOnly: e, toast: t }) {
}
//#endregion
//#region src/react/wants/want-magnets.tsx
-function y_e({ want: e, readOnly: t, downloads: n, provider: r, toast: i }) {
- let a = (0, B.useRef)(null), [o, s] = (0, B.useState)(typeof IntersectionObserver > "u"), [c, l] = (0, B.useState)([]), u = vT(), d = aw();
+function S_e({ want: e, readOnly: t, downloads: n, provider: r, toast: i }) {
+ let a = (0, B.useRef)(null), [o, s] = (0, B.useState)(typeof IntersectionObserver > "u"), [c, l] = (0, B.useState)([]), u = gT(), d = rw();
(0, B.useEffect)(() => {
if (!a.current || o) return;
let e = new IntersectionObserver((t) => {
@@ -45814,7 +45945,7 @@ function y_e({ want: e, readOnly: t, downloads: n, provider: r, toast: i }) {
}, { rootMargin: "100px" });
return e.observe(a.current), () => e.disconnect();
}, [o]);
- let f = xw({
+ let f = yw({
queryKey: [
"want-magnets",
e.id,
@@ -45828,7 +45959,7 @@ function y_e({ want: e, readOnly: t, downloads: n, provider: r, toast: i }) {
refetchInterval: (e) => e.state.data?.state === "busy" && 3e3
}), p = n?.providers.find((e) => e.key === r && e.configured), m = (r) => {
t || !n?.available || !p || r.protocol !== "magnet" || u.run(r.id, async (t) => {
- let n = await q(NA, {
+ let n = await q(Qk, {
magnet: r.uri,
provider: p.key,
target: p.target,
@@ -45839,7 +45970,7 @@ function y_e({ want: e, readOnly: t, downloads: n, provider: r, toast: i }) {
if (!n.ok) throw Error(n.task.failure_detail || n.task.failure_label || "添加下载失败");
return n;
}, (e) => {
- l((e) => [...e, r.id]), i(e.outcome === "submitted" ? `已添加下载:${r.name}` : `已关联现有下载:${r.name}`), d.invalidateQueries({ queryKey: PA });
+ l((e) => [...e, r.id]), i(e.outcome === "submitted" ? `已添加下载:${r.name}` : `已关联现有下载:${r.name}`), d.invalidateQueries({ queryKey: $k });
});
}, h = (e) => {
u.run(`copy:${e.id}`, () => navigator.clipboard.writeText(e.uri), () => i("已复制链接"));
@@ -45864,7 +45995,7 @@ function y_e({ want: e, readOnly: t, downloads: n, provider: r, toast: i }) {
children: "重新查询"
})]
}),
- g ? /* @__PURE__ */ (0, H.jsx)(bT, { label: "正在查找资源链接…" }) : null,
+ g ? /* @__PURE__ */ (0, H.jsx)(vT, { label: "正在查找资源链接…" }) : null,
_ ? /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "error",
title: "资源链接未取得",
@@ -45908,7 +46039,7 @@ function y_e({ want: e, readOnly: t, downloads: n, provider: r, toast: i }) {
}), /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex shrink-0 flex-wrap gap-2",
children: [
- /* @__PURE__ */ (0, H.jsx)(rT, {
+ /* @__PURE__ */ (0, H.jsx)(tT, {
"data-button-link": "",
variant: "secondary",
size: "small",
@@ -45942,41 +46073,41 @@ function y_e({ want: e, readOnly: t, downloads: n, provider: r, toast: i }) {
}
//#endregion
//#region src/react/wants/wants.ts
-var WI = "/api/wants", GI = ["wants"], b_e = (e) => [
+var HI = "/api/wants", UI = ["wants"], C_e = (e) => [
"wants",
"follow",
e
-], x_e = [
+], w_e = [
["searching", "待找"],
["unreleased", "未发售"],
["given_up", "暂时放弃"],
["acquired", "已入库"]
-], S_e = (e) => K(WI, e), C_e = (e, t) => K(`${WI}?follow=${encodeURIComponent(e)}`, t), KI = (e, t) => q(WI, {
+], T_e = (e) => K(HI, e), E_e = (e, t) => K(`${HI}?follow=${encodeURIComponent(e)}`, t), WI = (e, t) => q(HI, {
action: "add",
...e
-}, "POST", t), qI = (e, t) => q(WI, {
+}, "POST", t), GI = (e, t) => q(HI, {
action: "remove",
ids: e
-}, "POST", t), w_e = (e, t) => q(WI, {
+}, "POST", t), D_e = (e, t) => q(HI, {
action: "reset",
ids: e
-}, "POST", t), JI = () => z.invalidateQueries({ queryKey: GI }), YI = (e) => e.code || e.title || `关注条目 ${e.follow_item_id ?? e.id}`;
-function T_e(e) {
+}, "POST", t), KI = () => z.invalidateQueries({ queryKey: UI }), qI = (e) => e.code || e.title || `关注条目 ${e.follow_item_id ?? e.id}`;
+function O_e(e) {
return e.phase === "acquired" ? e.acquired_at ? `入库于 ${e.acquired_at.slice(0, 10)}` : "已入库" : e.phase === "unreleased" ? e.release_date ? `${e.release_date} 发售` : "还没发售" : e.phase === "given_up" ? `查过 ${e.search_count} 次都没找到` : e.fresh ? "新片:查不到也一直留在待找" : e.search_count ? `查过 ${e.search_count} 次` : "还没查过";
}
//#endregion
//#region src/react/wants/want-list.tsx
-var E_e = {
+var k_e = {
code: "手动添加",
feed: "Feed 新作",
follow: "关注"
-}, XI = (e) => [
+}, JI = (e) => [
e.release_date,
e.studio,
e.performers,
- E_e[e.origin]
+ k_e[e.origin]
].filter(Boolean).join(" · ");
-function D_e({ want: e }) {
+function A_e({ want: e }) {
return /* @__PURE__ */ (0, H.jsxs)("span", {
className: "relative inline-grid w-card-cover shrink-0 aspect-card-cover place-items-center overflow-hidden rounded-2lg bg-background-tertiary-default max-sm:w-24",
children: [/* @__PURE__ */ (0, H.jsx)("span", {
@@ -45992,36 +46123,36 @@ function D_e({ want: e }) {
}) : null]
});
}
-function O_e({ want: e, readOnly: t, busy: n, onReset: r, onRemove: i, onCloudDownload: a, downloads: o, provider: s, toast: c }) {
+function j_e({ want: e, readOnly: t, busy: n, onReset: r, onRemove: i, onCloudDownload: a, downloads: o, provider: s, toast: c }) {
return /* @__PURE__ */ (0, H.jsxs)("li", {
"data-want-id": e.id,
- className: lT({
+ className: sT({
bordered: "soft",
className: "flex flex-col gap-4 max-sm:p-4"
}),
children: [/* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex min-w-0 items-start gap-4 max-sm:gap-3",
- children: [/* @__PURE__ */ (0, H.jsx)(D_e, { want: e }), /* @__PURE__ */ (0, H.jsxs)("div", {
+ children: [/* @__PURE__ */ (0, H.jsx)(A_e, { want: e }), /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex min-w-0 flex-1 flex-col gap-1",
children: [
/* @__PURE__ */ (0, H.jsxs)("p", {
className: "flex min-w-0 flex-wrap items-baseline gap-x-2",
children: [/* @__PURE__ */ (0, H.jsx)("b", {
className: "text-headline-medium text-text-primary",
- children: YI(e)
+ children: qI(e)
}), e.code && e.title ? /* @__PURE__ */ (0, H.jsx)("span", {
className: "min-w-0 truncate text-body-2-regular text-text-secondary",
children: e.title
}) : null]
}),
- XI(e) ? /* @__PURE__ */ (0, H.jsx)("p", {
+ JI(e) ? /* @__PURE__ */ (0, H.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
- children: XI(e)
+ children: JI(e)
}) : null,
!e.code || e.phase === "unreleased" || e.phase === "acquired" ? /* @__PURE__ */ (0, H.jsx)("p", {
"data-want-note": "",
className: "text-caption-1-regular text-text-secondary",
- children: T_e(e)
+ children: O_e(e)
}) : null,
e.scrape_error ? /* @__PURE__ */ (0, H.jsxs)("p", {
className: "text-caption-1-regular text-text-secondary",
@@ -46030,7 +46161,7 @@ function O_e({ want: e, readOnly: t, busy: n, onReset: r, onRemove: i, onCloudDo
/* @__PURE__ */ (0, H.jsxs)("div", {
className: "mt-1 flex flex-wrap items-center gap-2",
children: [
- e.link ? /* @__PURE__ */ (0, H.jsx)(rT, {
+ e.link ? /* @__PURE__ */ (0, H.jsx)(tT, {
"data-button-link": "",
variant: "secondary",
size: "small",
@@ -46066,7 +46197,7 @@ function O_e({ want: e, readOnly: t, busy: n, onReset: r, onRemove: i, onCloudDo
})
]
})]
- }), e.code && (e.phase === "searching" || e.phase === "given_up") ? /* @__PURE__ */ (0, H.jsx)(y_e, {
+ }), e.code && (e.phase === "searching" || e.phase === "given_up") ? /* @__PURE__ */ (0, H.jsx)(S_e, {
want: e,
readOnly: t,
downloads: o,
@@ -46075,36 +46206,36 @@ function O_e({ want: e, readOnly: t, busy: n, onReset: r, onRemove: i, onCloudDo
}) : null]
});
}
-function k_e({ readOnly: e, toast: t, cloudDownload: n }) {
- let [r, i] = (0, B.useState)(""), [a, o] = (0, B.useState)(""), s = vT(), c = xw({
- queryKey: GI,
- queryFn: ({ signal: e }) => S_e(e),
+function M_e({ readOnly: e, toast: t, cloudDownload: n }) {
+ let [r, i] = (0, B.useState)(""), [a, o] = (0, B.useState)(""), s = gT(), c = yw({
+ queryKey: UI,
+ queryFn: ({ signal: e }) => T_e(e),
refetchInterval: (e) => e.state.data?.scraping ? 3e3 : !1
}), l = () => {
let n = r.trim();
- !n || e || s.run("add", (e) => KI({ code: n }, e), (e) => {
- t(e.created ? `已加入想要:${YI(e.want)}` : `${YI(e.want)} 已经在想要里`), i(""), JI();
+ !n || e || s.run("add", (e) => WI({ code: n }, e), (e) => {
+ t(e.created ? `已加入想要:${qI(e.want)}` : `${qI(e.want)} 已经在想要里`), i(""), KI();
});
}, u = (e) => {
e.key === "Enter" && !e.nativeEvent.isComposing && (e.preventDefault(), l());
}, d = (e) => {
- s.run(`remove:${e.id}`, (t) => qI([e.id], t), () => {
- t(`已移除:${YI(e)}`), JI();
+ s.run(`remove:${e.id}`, (t) => GI([e.id], t), () => {
+ t(`已移除:${qI(e)}`), KI();
});
}, f = (e) => {
- s.run(`reset:${e.id}`, (t) => w_e([e.id], t), () => {
- t(`${YI(e)} 回到待找`), JI();
+ s.run(`reset:${e.id}`, (t) => D_e([e.id], t), () => {
+ t(`${qI(e)} 回到待找`), KI();
});
- }, p = c.data, m = p?.items || [], h = xw({
- queryKey: PA,
- queryFn: ({ signal: e }) => K(`${NA}?limit=100`, e),
+ }, p = c.data, m = p?.items || [], h = yw({
+ queryKey: $k,
+ queryFn: ({ signal: e }) => K(`${Qk}?limit=100`, e),
enabled: m.some((e) => e.code && (e.phase === "searching" || e.phase === "given_up"))
}), g = h.data?.providers.filter((e) => e.configured) || [], _ = g.find((e) => e.key === a)?.key || g[0]?.key || "";
return /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-col gap-8",
children: [
/* @__PURE__ */ (0, H.jsxs)("div", {
- className: lT({
+ className: sT({
padding: "none",
className: "flex flex-col gap-4 px-6 py-5 max-sm:px-4"
}),
@@ -46117,7 +46248,7 @@ function k_e({ readOnly: e, toast: t, cloudDownload: n }) {
className: "flex flex-wrap items-end gap-2",
children: [/* @__PURE__ */ (0, H.jsx)("div", {
className: "min-w-64 grow max-sm:min-w-0",
- children: /* @__PURE__ */ (0, H.jsx)(bA, {
+ children: /* @__PURE__ */ (0, H.jsx)(zk, {
"aria-label": "番号",
placeholder: "输入番号,例如 SSIS-950",
value: r,
@@ -46133,7 +46264,7 @@ function k_e({ readOnly: e, toast: t, cloudDownload: n }) {
children: "添加"
})]
}),
- /* @__PURE__ */ (0, H.jsx)(jT, { children: "Feed 新作卡和关注详情上点「想要」也会加到这里。文件扫进库后自动挪到「已入库」。" }),
+ /* @__PURE__ */ (0, H.jsx)(kT, { children: "Feed 新作卡和关注详情上点「想要」也会加到这里。文件扫进库后自动挪到「已入库」。" }),
s.error ? /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "error",
title: "这一次没有完成",
@@ -46146,7 +46277,7 @@ function k_e({ readOnly: e, toast: t, cloudDownload: n }) {
title: "想要清单读取失败",
children: G(c.error)
}) : null,
- p?.scraping ? /* @__PURE__ */ (0, H.jsx)(jT, {
+ p?.scraping ? /* @__PURE__ */ (0, H.jsx)(kT, {
role: "status",
children: "正在给刚加入的番号取资料与封面。"
}) : null,
@@ -46157,16 +46288,16 @@ function k_e({ readOnly: e, toast: t, cloudDownload: n }) {
className: "text-body-medium text-text-primary",
children: "下载到"
}),
- /* @__PURE__ */ (0, H.jsx)(SA, {
+ /* @__PURE__ */ (0, H.jsx)(Vk, {
"aria-label": "下载到",
selectedKey: _,
onSelectionChange: (e) => o(String(e)),
- children: g.map((e) => /* @__PURE__ */ (0, H.jsx)(CA, {
+ children: g.map((e) => /* @__PURE__ */ (0, H.jsx)(Hk, {
id: e.key,
children: e.label
}, e.key))
}),
- /* @__PURE__ */ (0, H.jsx)(jT, { children: g.find((e) => e.key === _)?.target || "使用已配置的目标目录" })
+ /* @__PURE__ */ (0, H.jsx)(kT, { children: g.find((e) => e.key === _)?.target || "使用已配置的目标目录" })
]
}) : null,
h.error ? /* @__PURE__ */ (0, H.jsx)(Y, {
@@ -46182,13 +46313,13 @@ function k_e({ readOnly: e, toast: t, cloudDownload: n }) {
tone: "neutral",
children: "云下载只在账本写入端可用。"
}) : null,
- p && !m.length ? /* @__PURE__ */ (0, H.jsx)(fA, {
+ p && !m.length ? /* @__PURE__ */ (0, H.jsx)(Nk, {
shell: "plain",
- icon: toe,
+ icon: roe,
title: "还没有想要的作品",
children: "在上面输入番号,或在 Feed 新作卡、关注详情上点「想要」。"
}) : null,
- x_e.map(([r, i]) => {
+ w_e.map(([r, i]) => {
let a = m.filter((e) => e.phase === r);
return a.length ? /* @__PURE__ */ (0, H.jsxs)("section", {
"aria-label": i,
@@ -46202,7 +46333,7 @@ function k_e({ readOnly: e, toast: t, cloudDownload: n }) {
})]
}), /* @__PURE__ */ (0, H.jsx)("ul", {
className: "flex flex-col gap-4",
- children: a.map((r) => /* @__PURE__ */ (0, H.jsx)(O_e, {
+ children: a.map((r) => /* @__PURE__ */ (0, H.jsx)(j_e, {
want: r,
readOnly: e,
busy: s.busy,
@@ -46225,16 +46356,16 @@ function k_e({ readOnly: e, toast: t, cloudDownload: n }) {
}
//#endregion
//#region src/react/follow-manage/follow-manage-page.tsx
-var ZI = [
+var YI = [
["list", "关注列表"],
["add", "添加关注"],
["feeds", "JAV 订阅源"],
["wants", "JAV 入库"],
["source", "来源和凭证"]
-], QI = (e) => ZI.some(([t]) => t === e);
-function $I({ term: e, figure: t, unit: n }) {
+], XI = (e) => YI.some(([t]) => t === e);
+function ZI({ term: e, figure: t, unit: n }) {
return /* @__PURE__ */ (0, H.jsxs)("div", {
- className: lT({
+ className: sT({
padding: "none",
className: "flex flex-col gap-3 px-6 py-5 max-sm:gap-2 max-sm:p-4"
}),
@@ -46250,23 +46381,23 @@ function $I({ term: e, figure: t, unit: n }) {
})]
});
}
-function A_e(e) {
- let { route: t, savePreference: n, toast: r, openFollow: i, cloudDownload: a, readOnly: o, readOnlyMessage: s, writerUrl: c } = e, [l, u] = (0, B.useState)(QI(e.tab) ? e.tab : "list"), [d, f] = (0, B.useState)(Math.max(1, Math.floor(e.page) || 1)), [p, m] = (0, B.useState)(() => gP(e.sort, e.dir).sort), [h, g] = (0, B.useState)(() => gP(e.sort, e.dir).dir), [_, v] = (0, B.useState)(Ume(e.layout) ? e.layout : "default"), [y, b] = (0, B.useState)(Wme(e.pageSize)), [x, S] = (0, B.useState)(/* @__PURE__ */ new Set()), C = xw({
+function N_e(e) {
+ let { route: t, savePreference: n, toast: r, openFollow: i, cloudDownload: a, readOnly: o, readOnlyMessage: s, writerUrl: c } = e, [l, u] = (0, B.useState)(XI(e.tab) ? e.tab : "list"), [d, f] = (0, B.useState)(Math.max(1, Math.floor(e.page) || 1)), [p, m] = (0, B.useState)(() => mP(e.sort, e.dir).sort), [h, g] = (0, B.useState)(() => mP(e.sort, e.dir).dir), [_, v] = (0, B.useState)(Kme(e.layout) ? e.layout : "default"), [y, b] = (0, B.useState)(qme(e.pageSize)), [x, S] = (0, B.useState)(/* @__PURE__ */ new Set()), C = yw({
+ queryKey: CP,
+ queryFn: ({ signal: e }) => HP(e)
+ }), w = yw({
+ queryKey: wP,
+ queryFn: ({ signal: e }) => UP(e)
+ }), T = yw({
queryKey: TP,
- queryFn: ({ signal: e }) => WP(e)
- }), w = xw({
- queryKey: EP,
- queryFn: ({ signal: e }) => GP(e)
- }), T = xw({
- queryKey: DP,
- queryFn: ({ signal: e }) => XP(e)
+ queryFn: ({ signal: e }) => JP(e)
}), E = C.data || { sources: [] }, D = w.data || {
root: "",
providers: []
}, O = E.sources;
(0, B.useEffect)(() => {
S((e) => {
- let t = Xme(e, O);
+ let t = $me(e, O);
return t.size === e.size ? e : t;
});
}, [O]);
@@ -46276,10 +46407,10 @@ function A_e(e) {
tab: e.tab ?? l,
page: e.page ?? d,
sort: n === "checked" ? "" : n,
- dir: r === hP[n] ? "" : r
+ dir: r === pP[n] ? "" : r
});
- }, A = BP(O), j = O.filter(MP).length, M = O.filter((e) => e.enabled).length, N = (D.providers || []).filter((e) => e.requirement === "required" && !aF(e)).length, ee = new Set((T.data?.sources || []).map((e) => e.entity_id ?? `source-${e.id}`)).size;
- return /* @__PURE__ */ (0, H.jsxs)(pA, { children: [
+ }, A = RP(O), j = O.filter(AP).length, M = O.filter((e) => e.enabled).length, N = (D.providers || []).filter((e) => e.requirement === "required" && !rF(e)).length, ee = new Set((T.data?.sources || []).map((e) => e.entity_id ?? `source-${e.id}`)).size;
+ return /* @__PURE__ */ (0, H.jsxs)(Pk, { children: [
o ? /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "warning",
title: "本机只能浏览",
@@ -46294,64 +46425,64 @@ function A_e(e) {
children: s
}) : null,
/* @__PURE__ */ (0, H.jsxs)("div", {
- className: nfe,
+ className: Dfe,
"aria-label": "关注概览",
children: [
- /* @__PURE__ */ (0, H.jsx)($I, {
+ /* @__PURE__ */ (0, H.jsx)(ZI, {
term: "关注创作者",
figure: A.length,
unit: "位"
}),
- /* @__PURE__ */ (0, H.jsx)($I, {
+ /* @__PURE__ */ (0, H.jsx)(ZI, {
term: "启用来源",
figure: M,
unit: `/ ${O.length}`
}),
- /* @__PURE__ */ (0, H.jsx)($I, {
+ /* @__PURE__ */ (0, H.jsx)(ZI, {
term: "检查失败",
figure: j,
unit: "个来源"
}),
- /* @__PURE__ */ (0, H.jsx)($I, {
+ /* @__PURE__ */ (0, H.jsx)(ZI, {
term: "未看更新",
figure: E.counts?.new || 0,
unit: "条"
}),
- /* @__PURE__ */ (0, H.jsx)($I, {
+ /* @__PURE__ */ (0, H.jsx)(ZI, {
term: "JAV 订阅",
figure: ee,
unit: "位"
}),
- /* @__PURE__ */ (0, H.jsx)($I, {
+ /* @__PURE__ */ (0, H.jsx)(ZI, {
term: "未看新作",
figure: T.data?.unread || 0,
unit: "条"
})
]
}),
- /* @__PURE__ */ (0, H.jsxs)(R_, {
+ /* @__PURE__ */ (0, H.jsxs)(L_, {
selectedKey: l,
onSelectionChange: (e) => {
let t = String(e);
- QI(t) && (u(t), k({ tab: t }));
+ XI(t) && (u(t), k({ tab: t }));
},
className: "flex flex-col gap-6",
children: [
- /* @__PURE__ */ (0, H.jsx)(z_, {
+ /* @__PURE__ */ (0, H.jsx)(R_, {
"aria-label": "关注管理区域",
"data-section-nav": !0,
"data-section-items": !0,
className: "flex max-w-full flex-nowrap overflow-x-auto",
- children: ZI.map(([e, t]) => /* @__PURE__ */ (0, H.jsx)(B_, {
+ children: YI.map(([e, t]) => /* @__PURE__ */ (0, H.jsx)(z_, {
id: e,
className: "cursor-pointer whitespace-nowrap",
children: e === "source" && N ? `${t}(${N})` : t
}, e))
}),
- /* @__PURE__ */ (0, H.jsx)(V_, {
+ /* @__PURE__ */ (0, H.jsx)(B_, {
id: "list",
className: "flex flex-col gap-4",
- children: /* @__PURE__ */ (0, H.jsx)(l_e, {
+ children: /* @__PURE__ */ (0, H.jsx)(f_e, {
data: E,
sort: p,
dir: h,
@@ -46381,10 +46512,10 @@ function A_e(e) {
}
})
}),
- /* @__PURE__ */ (0, H.jsxs)(V_, {
+ /* @__PURE__ */ (0, H.jsxs)(B_, {
id: "add",
className: "flex flex-col gap-8",
- children: [/* @__PURE__ */ (0, H.jsx)(age, {
+ children: [/* @__PURE__ */ (0, H.jsx)(cge, {
data: E,
credentials: D,
readOnly: o,
@@ -46392,7 +46523,7 @@ function A_e(e) {
openCredentials: () => {
u("source"), k({ tab: "source" });
}
- }), /* @__PURE__ */ (0, H.jsx)(cge, {
+ }), /* @__PURE__ */ (0, H.jsx)(dge, {
groups: E.author_aliases || [],
readOnly: o,
toast: r,
@@ -46400,27 +46531,27 @@ function A_e(e) {
sources: E.sources
})]
}),
- /* @__PURE__ */ (0, H.jsx)(V_, {
+ /* @__PURE__ */ (0, H.jsx)(B_, {
id: "feeds",
className: "flex flex-col gap-4",
- children: /* @__PURE__ */ (0, H.jsx)(v_e, {
+ children: /* @__PURE__ */ (0, H.jsx)(x_e, {
readOnly: o,
toast: r
})
}),
- /* @__PURE__ */ (0, H.jsx)(V_, {
+ /* @__PURE__ */ (0, H.jsx)(B_, {
id: "wants",
className: "flex flex-col gap-4",
- children: /* @__PURE__ */ (0, H.jsx)(k_e, {
+ children: /* @__PURE__ */ (0, H.jsx)(M_e, {
readOnly: o,
toast: r,
cloudDownload: a
})
}),
- /* @__PURE__ */ (0, H.jsx)(V_, {
+ /* @__PURE__ */ (0, H.jsx)(B_, {
id: "source",
className: "flex flex-col gap-4",
- children: /* @__PURE__ */ (0, H.jsx)(_ge, {
+ children: /* @__PURE__ */ (0, H.jsx)(bge, {
data: D,
readOnly: o,
toast: r
@@ -46432,23 +46563,23 @@ function A_e(e) {
}
//#endregion
//#region src/react/index/index-tags.tsx
-var eL = () => /* @__PURE__ */ (0, H.jsx)("span", {
+var QI = () => /* @__PURE__ */ (0, H.jsx)("span", {
"aria-hidden": !0,
"data-tag-dot": "",
className: "size-1.75 flex-none rounded-full"
});
-function j_e({ tag: e, actions: t }) {
+function P_e({ tag: e, actions: t }) {
let n = t.picked.has(e.k);
return /* @__PURE__ */ (0, H.jsxs)("button", {
type: "button",
"data-alpha-tag": "",
"data-k": e.k,
- "data-tag-cat": vN(t.online, e.cat),
+ "data-tag-cat": iN(t.online, e.cat),
"aria-pressed": n,
onClick: () => t.press(e.k),
className: "flex h-9 min-w-0 cursor-pointer items-center gap-2.25 rounded-lg px-2.5 text-left text-body-regular text-text-secondary outline-none hover:text-text-primary focus-visible:ring-2 focus-visible:ring-border-focus-ring",
children: [
- /* @__PURE__ */ (0, H.jsx)(eL, {}),
+ /* @__PURE__ */ (0, H.jsx)(QI, {}),
/* @__PURE__ */ (0, H.jsx)("span", {
className: "min-w-0 flex-1 truncate",
children: e.label
@@ -46460,23 +46591,23 @@ function j_e({ tag: e, actions: t }) {
]
});
}
-function M_e({ groups: e, actions: t }) {
+function F_e({ groups: e, actions: t }) {
return /* @__PURE__ */ (0, H.jsx)("div", {
"data-alphabet": "",
className: "flex flex-col gap-4",
children: e.map(([e, n], r) => /* @__PURE__ */ (0, H.jsxs)("section", {
"data-alpha-group": r,
- className: lT({
+ className: sT({
radius: "plain",
padding: "none",
className: "px-5 pt-4 pb-3"
}),
children: [/* @__PURE__ */ (0, H.jsxs)("h3", {
className: "mb-2 flex items-center text-title-2-medium text-text-primary",
- children: [e, /* @__PURE__ */ (0, H.jsx)(HC, { value: n.length })]
+ children: [e, /* @__PURE__ */ (0, H.jsx)(UC, { value: n.length })]
}), /* @__PURE__ */ (0, H.jsx)("div", {
className: "index-tag-list gap-x-4 gap-y-0.5",
- children: n.map((e) => /* @__PURE__ */ (0, H.jsx)(j_e, {
+ children: n.map((e) => /* @__PURE__ */ (0, H.jsx)(P_e, {
tag: e,
actions: t
}, e.k))
@@ -46484,8 +46615,8 @@ function M_e({ groups: e, actions: t }) {
}, e))
});
}
-var N_e = "\xA0";
-function P_e({ tags: e, actions: t }) {
+var I_e = "\xA0";
+function L_e({ tags: e, actions: t }) {
return /* @__PURE__ */ (0, H.jsx)("div", {
"data-tag-cloud": "",
className: "flex flex-wrap gap-1.75",
@@ -46493,11 +46624,11 @@ function P_e({ tags: e, actions: t }) {
type: "button",
"data-tag-chip": "",
"data-k": e.k,
- "data-tag-cat": vN(t.online, e.cat),
+ "data-tag-cat": iN(t.online, e.cat),
"aria-pressed": t.picked.has(e.k),
onClick: () => t.press(e.k),
className: "inline-flex cursor-pointer items-center rounded-lg border px-3 py-1.25 text-body-2-regular text-text-secondary outline-none focus-visible:ring-2 focus-visible:ring-border-focus-ring",
- children: [e.label + N_e, /* @__PURE__ */ (0, H.jsx)("span", {
+ children: [e.label + I_e, /* @__PURE__ */ (0, H.jsx)("span", {
"data-tag-n": "",
className: "text-caption-1-regular opacity-60",
children: e.n.toLocaleString()
@@ -46505,7 +46636,7 @@ function P_e({ tags: e, actions: t }) {
}, e.k))
});
}
-var F_e = [[
+var R_e = [[
"cloud",
"标签云",
"tags"
@@ -46514,16 +46645,16 @@ var F_e = [[
"字母表",
"text-aa"
]];
-function I_e({ categories: e, category: t, online: n, readout: r, letters: i, view: a, onCategory: o, onJump: s, onView: c }) {
+function z_e({ categories: e, category: t, online: n, readout: r, letters: i, view: a, onCategory: o, onJump: s, onView: c }) {
return /* @__PURE__ */ (0, H.jsx)(gr, {
label: "标签筛选",
topLabel: "标签类型",
top: e.map(([e, r]) => /* @__PURE__ */ (0, H.jsxs)(vr, {
"data-tag-pill": "",
- "data-tag-cat": e === "all" ? "all" : vN(n, e),
+ "data-tag-cat": e === "all" ? "all" : iN(n, e),
pressed: t === e,
onPress: () => o(e),
- children: [/* @__PURE__ */ (0, H.jsx)(eL, {}), r]
+ children: [/* @__PURE__ */ (0, H.jsx)(QI, {}), r]
}, e)),
bottom: /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [
/* @__PURE__ */ (0, H.jsx)("span", {
@@ -46542,19 +46673,19 @@ function I_e({ categories: e, category: t, online: n, readout: r, letters: i, vi
children: e
}, e))
}) : null,
- /* @__PURE__ */ (0, H.jsx)(dg, {
+ /* @__PURE__ */ (0, H.jsx)(ug, {
"aria-label": "标签视图",
orientation: "horizontal",
value: a,
onChange: (e) => c(e),
- className: `ml-auto ${pC}`,
- children: F_e.map(([e, t, n]) => {
- let r = gC(n);
- return /* @__PURE__ */ (0, H.jsx)(fg, {
+ className: `ml-auto ${kC}`,
+ children: R_e.map(([e, t, n]) => {
+ let r = MC(n);
+ return /* @__PURE__ */ (0, H.jsx)(dg, {
value: e,
"aria-label": t,
"data-glass-segment": "",
- className: mC,
+ className: AC,
children: /* @__PURE__ */ (0, H.jsx)("span", {
title: t,
className: "contents",
@@ -46566,13 +46697,13 @@ function I_e({ categories: e, category: t, online: n, readout: r, letters: i, vi
] })
});
}
-function L_e({ count: e, match: t, onMatch: n, onClear: r, onApply: i }) {
- return /* @__PURE__ */ (0, H.jsxs)(YE, {
+function B_e({ count: e, match: t, onMatch: n, onClear: r, onApply: i }) {
+ return /* @__PURE__ */ (0, H.jsxs)(qE, {
visible: e > 0,
label: "所选标签操作",
count: `已选 ${e} 个标签`,
children: [
- /* @__PURE__ */ (0, H.jsx)(PM, {
+ /* @__PURE__ */ (0, H.jsx)(uM, {
isSelected: t === "any",
onChange: (e) => n(e ? "any" : "all"),
children: /* @__PURE__ */ (0, H.jsxs)("span", {
@@ -46604,7 +46735,7 @@ function L_e({ count: e, match: t, onMatch: n, onClear: r, onApply: i }) {
}
//#endregion
//#region src/react/index/index-page.tsx
-var R_e = [{
+var V_e = [{
value: "studios",
label: "厂牌",
symbol: "clapperboard"
@@ -46612,7 +46743,7 @@ var R_e = [{
value: "agencies",
label: "事务所",
symbol: "briefcase"
-}], tL = [{
+}], $I = [{
value: "local",
label: "本地",
symbol: "hard-drive"
@@ -46620,7 +46751,7 @@ var R_e = [{
value: "online",
label: "在线",
symbol: "rss"
-}], z_e = {
+}], H_e = {
people: [[
"big",
"大图 · 竖幅头像",
@@ -46640,20 +46771,20 @@ var R_e = [{
"layout-grid"
]]
};
-function B_e({ kind: e, layout: t, onChange: n }) {
- return /* @__PURE__ */ (0, H.jsx)(uC, {
- "aria-label": `${sN[e]}索引版式`,
+function U_e({ kind: e, layout: t, onChange: n }) {
+ return /* @__PURE__ */ (0, H.jsx)(EC, {
+ "aria-label": `${UM[e]}索引版式`,
orientation: "horizontal",
value: t,
onChange: (e) => n(e),
"data-index-layout": "",
- className: `flex-none max-board-narrow:order-3 ${dC}`,
- children: z_e[fN(e) ? "company" : "people"].map(([e, t, n]) => {
- let r = gC(n);
- return /* @__PURE__ */ (0, H.jsx)(fg, {
+ className: `flex-none max-board-narrow:order-3 ${DC}`,
+ children: H_e[YM(e) ? "company" : "people"].map(([e, t, n]) => {
+ let r = MC(n);
+ return /* @__PURE__ */ (0, H.jsx)(dg, {
value: e,
"aria-label": t,
- className: oae,
+ className: Wie,
children: /* @__PURE__ */ (0, H.jsx)("span", {
title: t,
className: "contents",
@@ -46663,8 +46794,8 @@ function B_e({ kind: e, layout: t, onChange: n }) {
})
});
}
-var V_e = gC("search");
-function H_e({ label: e, value: t, onQuery: n }) {
+var W_e = MC("search");
+function G_e({ label: e, value: t, onQuery: n }) {
let [r, i] = (0, B.useState)(t), a = (0, B.useRef)(!1), o = (0, B.useRef)(void 0);
(0, B.useEffect)(() => () => clearTimeout(o.current), []);
let s = (e) => {
@@ -46679,15 +46810,15 @@ function H_e({ label: e, value: t, onQuery: n }) {
onCompositionEnd: (e) => {
a.current = !1, s(e.target.value);
},
- children: /* @__PURE__ */ (0, H.jsx)(_A, {
+ children: /* @__PURE__ */ (0, H.jsx)(Ik, {
"aria-label": e,
value: r,
onChange: (e) => {
i(e), a.current || s(e);
},
- children: /* @__PURE__ */ (0, H.jsx)(yA, {
+ children: /* @__PURE__ */ (0, H.jsx)(Rk, {
type: "search",
- leadingIcon: V_e,
+ leadingIcon: W_e,
spellCheck: !1,
autoComplete: "off",
onKeyDown: (e) => {
@@ -46697,14 +46828,14 @@ function H_e({ label: e, value: t, onQuery: n }) {
})
});
}
-function U_e(e) {
- let [t, n] = (0, B.useState)(() => pN({
+function K_e(e) {
+ let [t, n] = (0, B.useState)(() => XM({
kind: e.kind,
q: e.q,
scope: e.scope,
view: e.view,
category: e.category
- })), [r, i] = (0, B.useState)(e.layout), [a, o] = (0, B.useState)(/* @__PURE__ */ new Set()), [s, c] = (0, B.useState)("any"), l = (0, B.useRef)(null), { kind: u, q: f, scope: p, view: m, category: h } = t, g = sN[u], _ = u === "tags" && p === "online", v = u === "performers" && p === "online";
+ })), [r, i] = (0, B.useState)(e.layout), [a, o] = (0, B.useState)(/* @__PURE__ */ new Set()), [s, c] = (0, B.useState)("any"), l = (0, B.useRef)(null), { kind: u, q: f, scope: p, view: m, category: h } = t, g = UM[u], _ = u === "tags" && p === "online", v = u === "performers" && p === "online";
(0, B.useEffect)(() => {
e.selectMode || o(/* @__PURE__ */ new Set());
}, [e.selectMode]);
@@ -46714,7 +46845,7 @@ function U_e(e) {
...r
};
b(Object.keys(r).every((e) => e === "q")), n(a), e.route(a, { replace: i });
- }, S = _N(mN(t)), C = Tw({
+ }, S = eN(ZM(t)), C = Cw({
queryKey: S.queryKey,
queryFn: ({ pageParam: e, signal: t }) => S.queryFn({
pageParam: e,
@@ -46722,22 +46853,22 @@ function U_e(e) {
}),
initialPageParam: 0,
getNextPageParam: S.getNextPageParam,
- placeholderData: y ? Ew.keepPreviousData : void 0
- }), w = ope(C.data), T = !!C.hasNextPage && !C.isPlaceholderData, E = spe(w.length, !!C.hasNextPage);
+ placeholderData: y ? ww.keepPreviousData : void 0
+ }), w = nN(C.data), T = !!C.hasNextPage && !C.isPlaceholderData, E = rN(w.length, !!C.hasNextPage);
(0, B.useLayoutEffect)(() => {
l.current && we(l.current);
}, [r]);
let D = (0, B.useMemo)(() => u === "tags" ? w.map((t) => ({
...t,
label: e.tagLabel(t.k)
- })) : [], [w, u]), O = (0, B.useMemo)(() => u === "tags" && m === "alphabet" ? upe(D, (t) => e.tagLabel(t)) : [], [
+ })) : [], [w, u]), O = (0, B.useMemo)(() => u === "tags" && m === "alphabet" ? sN(D, (t) => e.tagLabel(t)) : [], [
D,
m,
u
]), k = (t) => {
i(t), e.savePreference({ layout: t });
}, A = u === "tags" ? /* @__PURE__ */ (0, H.jsx)(WC, {
- tabs: tL,
+ tabs: $I,
value: p,
label: "词表",
onChange: (e) => {
@@ -46748,14 +46879,14 @@ function U_e(e) {
});
}
}) : u === "performers" ? /* @__PURE__ */ (0, H.jsx)(WC, {
- tabs: tL,
+ tabs: $I,
value: p,
label: "名册",
onChange: (t) => {
t === "online" && e.exitSelectMode(), x({ scope: t });
}
- }) : fN(u) ? /* @__PURE__ */ (0, H.jsx)(WC, {
- tabs: R_e,
+ }) : YM(u) ? /* @__PURE__ */ (0, H.jsx)(WC, {
+ tabs: V_e,
value: u,
label: "公司类型",
onChange: (e) => x({ kind: e })
@@ -46772,7 +46903,7 @@ function U_e(e) {
let n = new Set(e);
return n.delete(t) || n.add(t), n;
});
- }, M = (_ ? lN : cN).filter(([e]) => e === "all" || Number(C.data?.pages[0]?.categories?.[e] || 0) > 0);
+ }, M = (_ ? KM : GM).filter(([e]) => e === "all" || Number(C.data?.pages[0]?.categories?.[e] || 0) > 0);
return /* @__PURE__ */ (0, H.jsxs)("div", {
ref: l,
"data-index-page": u,
@@ -46787,12 +46918,12 @@ function U_e(e) {
className: "flex items-center text-display-4-medium whitespace-nowrap text-text-primary max-board-narrow:text-title-1-medium",
children: g
}),
- dN(u) ? /* @__PURE__ */ (0, H.jsx)("span", {
+ JM(u) ? /* @__PURE__ */ (0, H.jsx)("span", {
"data-index-count": "",
className: "text-caption-1-regular leading-5 whitespace-nowrap text-text-secondary tabular-nums",
children: C.isPending ? "" : E
}) : null,
- dN(u) ? /* @__PURE__ */ (0, H.jsx)(B_e, {
+ JM(u) ? /* @__PURE__ */ (0, H.jsx)(U_e, {
kind: u,
layout: r,
onChange: k
@@ -46801,7 +46932,7 @@ function U_e(e) {
"aria-hidden": !0,
className: "hidden h-0 basis-full max-board-narrow:order-2 max-board-narrow:block"
}),
- /* @__PURE__ */ (0, H.jsx)(H_e, {
+ /* @__PURE__ */ (0, H.jsx)(G_e, {
label: `过滤${g}`,
value: f,
onQuery: (e) => {
@@ -46811,7 +46942,7 @@ function U_e(e) {
]
}),
A,
- u === "tags" ? /* @__PURE__ */ (0, H.jsx)(I_e, {
+ u === "tags" ? /* @__PURE__ */ (0, H.jsx)(z_e, {
categories: M,
category: h,
online: _,
@@ -46836,8 +46967,8 @@ function U_e(e) {
mode: m
}) }
});
- if (C.isError) return /* @__PURE__ */ (0, H.jsx)(fA, {
- icon: gC("search"),
+ if (C.isError) return /* @__PURE__ */ (0, H.jsx)(Nk, {
+ icon: MC("search"),
title: `没能读取${g}`,
actions: /* @__PURE__ */ (0, H.jsx)(J, {
variant: "secondary",
@@ -46846,18 +46977,18 @@ function U_e(e) {
}),
children: ce(C.error)
});
- if (!w.length) return /* @__PURE__ */ (0, H.jsx)(G_e, {
+ if (!w.length) return /* @__PURE__ */ (0, H.jsx)(J_e, {
kind: u,
filtered: !!f || u === "tags" && h !== "all",
online: _ || v,
configurable: e.configurable
});
- if (v) return /* @__PURE__ */ (0, H.jsx)(fpe, {
+ if (v) return /* @__PURE__ */ (0, H.jsx)(fN, {
items: w,
layout: r,
props: e
});
- if (dN(u)) return /* @__PURE__ */ (0, H.jsx)(xN, {
+ if (JM(u)) return /* @__PURE__ */ (0, H.jsx)(dN, {
kind: u,
items: w,
layout: r,
@@ -46868,10 +46999,10 @@ function U_e(e) {
picked: a,
press: j
};
- return m === "alphabet" ? /* @__PURE__ */ (0, H.jsx)(M_e, {
+ return m === "alphabet" ? /* @__PURE__ */ (0, H.jsx)(F_e, {
groups: O,
actions: t
- }) : /* @__PURE__ */ (0, H.jsx)(P_e, {
+ }) : /* @__PURE__ */ (0, H.jsx)(L_e, {
tags: D,
actions: t
});
@@ -46886,13 +47017,13 @@ function U_e(e) {
disabled: C.isFetchingNextPage,
"aria-busy": C.isFetchingNextPage || void 0,
onClick: () => void C.fetchNextPage(),
- children: C.isFetchingNextPage ? /* @__PURE__ */ (0, H.jsx)(bT, {
+ children: C.isFetchingNextPage ? /* @__PURE__ */ (0, H.jsx)(vT, {
inline: !0,
label: "继续载入中…"
}) : "载入更多"
})
}) : null,
- u === "tags" && !_ && e.selectMode ? /* @__PURE__ */ (0, H.jsx)(L_e, {
+ u === "tags" && !_ && e.selectMode ? /* @__PURE__ */ (0, H.jsx)(B_e, {
count: a.size,
match: s,
onMatch: c,
@@ -46905,31 +47036,31 @@ function U_e(e) {
]
});
}
-var W_e = {
+var q_e = {
tags: "标签",
performers: "艺人",
creators: "创作者",
studios: "厂牌",
agencies: "事务所"
};
-function G_e({ kind: e, filtered: t, online: n, configurable: r }) {
- if (t) return /* @__PURE__ */ (0, H.jsx)(fA, {
- icon: gC("search"),
+function J_e({ kind: e, filtered: t, online: n, configurable: r }) {
+ if (t) return /* @__PURE__ */ (0, H.jsx)(Nk, {
+ icon: MC("search"),
title: "没有符合条件的内容",
- actions: /* @__PURE__ */ (0, H.jsx)(rT, {
+ actions: /* @__PURE__ */ (0, H.jsx)(tT, {
variant: "primary",
href: "/?loc=&thumb=0",
children: "查看全部内容"
}),
children: "清除筛选或搜索条件后查看全部内容。"
});
- let i = n && e === "performers" ? "创作者" : W_e[e], a = /* @__PURE__ */ (0, H.jsx)(rT, {
+ let i = n && e === "performers" ? "创作者" : q_e[e], a = /* @__PURE__ */ (0, H.jsx)(tT, {
variant: !r || n ? "primary" : "secondary",
href: "/follow-manage?tab=add",
children: "添加关注"
});
- return /* @__PURE__ */ (0, H.jsx)(fA, {
- icon: gC(e === "tags" ? "tags" : "user-round"),
+ return /* @__PURE__ */ (0, H.jsx)(Nk, {
+ icon: MC(e === "tags" ? "tags" : "user-round"),
title: `还没有${i}`,
actions: n ? a : /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [r ? /* @__PURE__ */ (0, H.jsx)(J, {
variant: "primary",
@@ -46939,15 +47070,15 @@ function G_e({ kind: e, filtered: t, online: n, configurable: r }) {
children: n ? `添加关注来源并获取内容后,这里会显示来源上的${i}。` : "添加内容并补充资料后,这里会显示对应信息。"
});
}
-var nL = {
+var eL = {
video: ["视频", "play"],
image: ["图片", "pics"],
archive: ["压缩包", "file-archive"],
audio: ["音频", "file-audio"],
url: ["网址快捷方式", "globe"],
other: ["其它文件", "hard-drive"]
-}, K_e = (e) => nL[e.junk_kind || "other"] || nL.other;
-function q_e(e) {
+}, Y_e = (e) => eL[e.junk_kind || "other"] || eL.other;
+function X_e(e) {
return e === "dismissed" ? {
operation: "reconsider-junk",
label: "重新判断",
@@ -46958,21 +47089,21 @@ function q_e(e) {
glyph: "check"
};
}
-var rL = (e, t) => Number((t ? e.counts?.[t] : e.all_total) || 0), J_e = (e, t) => [
+var tL = (e, t) => Number((t ? e.counts?.[t] : e.all_total) || 0), Z_e = (e, t) => [
"junk-queue",
e.view,
e.kind,
t
];
-function Y_e({ kind: e, view: t }) {
+function Q_e({ kind: e, view: t }) {
let n = new URLSearchParams({
limit: "200",
status: t
});
return e && n.set("kind", e), n.toString();
}
-async function X_e(e, t) {
- let n = await K(`/api/ads?${Y_e(e)}`, t);
+async function $_e(e, t) {
+ let n = await K(`/api/ads?${Q_e(e)}`, t);
return {
...n,
items: n.items || []
@@ -46980,19 +47111,19 @@ async function X_e(e, t) {
}
//#endregion
//#region src/react/junk-queue/junk-card.tsx
-function iL({ name: e }) {
+function nL({ name: e }) {
return /* @__PURE__ */ (0, H.jsx)("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
children: /* @__PURE__ */ (0, H.jsx)("use", { href: `#i-${e}` })
});
}
-var aL = (e, t) => e || t.shiftKey || t.ctrlKey || t.metaKey;
-function Z_e({ item: e, view: t, selected: n, selectMode: r, helpers: i, actions: a }) {
- let o = (0, B.useRef)(null), [s, c] = (0, B.useState)(""), [l, u] = (0, B.useState)(""), d = e.junk_kind || "other", [f, p] = K_e(e), m = String(e.name || ""), h = q_e(t), g = d === "video" ? `/thumb?id=${e.id}&c=4` : d === "image" ? `/photo-thumb?id=${e.id}` : "", _ = d === "video" || d === "image", v = (t) => {
- t.target.closest("[data-junk-actions]") || aL(r, t) && (t.preventDefault(), a.toggleSelection(e.id, t.shiftKey));
+var rL = (e, t) => e || t.shiftKey || t.ctrlKey || t.metaKey;
+function eve({ item: e, view: t, selected: n, selectMode: r, helpers: i, actions: a }) {
+ let o = (0, B.useRef)(null), [s, c] = (0, B.useState)(""), [l, u] = (0, B.useState)(""), d = e.junk_kind || "other", [f, p] = Y_e(e), m = String(e.name || ""), h = X_e(t), g = d === "video" ? `/thumb?id=${e.id}&c=4` : d === "image" ? `/photo-thumb?id=${e.id}` : "", _ = d === "video" || d === "image", v = (t) => {
+ t.target.closest("[data-junk-actions]") || rL(r, t) && (t.preventDefault(), a.toggleSelection(e.id, t.shiftKey));
}, y = (t) => {
- if (t.stopPropagation(), aL(r, t)) {
+ if (t.stopPropagation(), rL(r, t)) {
t.preventDefault(), a.toggleSelection(e.id, t.shiftKey);
return;
}
@@ -47034,7 +47165,7 @@ function Z_e({ item: e, view: t, selected: n, selectMode: r, helpers: i, actions
children: [
/* @__PURE__ */ (0, H.jsxs)("span", {
"data-media-glyph": "",
- children: [/* @__PURE__ */ (0, H.jsx)(iL, { name: p }), /* @__PURE__ */ (0, H.jsx)("b", { children: f })]
+ children: [/* @__PURE__ */ (0, H.jsx)(nL, { name: p }), /* @__PURE__ */ (0, H.jsx)("b", { children: f })]
}),
g ? /* @__PURE__ */ (0, H.jsx)("span", {
"data-media-art": "thumb",
@@ -47046,7 +47177,7 @@ function Z_e({ item: e, view: t, selected: n, selectMode: r, helpers: i, actions
}),
/* @__PURE__ */ (0, H.jsx)("span", {
"data-media-check": "",
- children: /* @__PURE__ */ (0, H.jsx)(iL, { name: "check" })
+ children: /* @__PURE__ */ (0, H.jsx)(nL, { name: "check" })
})
]
}),
@@ -47083,7 +47214,7 @@ function Z_e({ item: e, view: t, selected: n, selectMode: r, helpers: i, actions
children: [s === "reveal" ? /* @__PURE__ */ (0, H.jsx)("span", {
"data-junk-spinner": "",
dangerouslySetInnerHTML: { __html: w("正在定位") }
- }) : /* @__PURE__ */ (0, H.jsx)(iL, { name: "folder-open" }), /* @__PURE__ */ (0, H.jsx)("span", {
+ }) : /* @__PURE__ */ (0, H.jsx)(nL, { name: "folder-open" }), /* @__PURE__ */ (0, H.jsx)("span", {
"data-junk-label": "",
children: "打开位置"
})]
@@ -47095,7 +47226,7 @@ function Z_e({ item: e, view: t, selected: n, selectMode: r, helpers: i, actions
"aria-label": h.label,
...S(h.operation),
onClick: x(h.operation),
- children: [/* @__PURE__ */ (0, H.jsx)(iL, { name: h.glyph }), /* @__PURE__ */ (0, H.jsx)("span", {
+ children: [/* @__PURE__ */ (0, H.jsx)(nL, { name: h.glyph }), /* @__PURE__ */ (0, H.jsx)("span", {
"data-junk-label": "",
children: h.label
})]
@@ -47107,7 +47238,7 @@ function Z_e({ item: e, view: t, selected: n, selectMode: r, helpers: i, actions
"aria-label": "移入回收站",
...S("dispose"),
onClick: x("dispose"),
- children: [/* @__PURE__ */ (0, H.jsx)(iL, { name: "trash" }), /* @__PURE__ */ (0, H.jsx)("span", {
+ children: [/* @__PURE__ */ (0, H.jsx)(nL, { name: "trash" }), /* @__PURE__ */ (0, H.jsx)("span", {
"data-junk-label": "",
children: "移入回收站"
})]
@@ -47122,7 +47253,7 @@ function Z_e({ item: e, view: t, selected: n, selectMode: r, helpers: i, actions
]
});
}
-var Q_e = (0, B.memo)(Z_e), oL = [
+var tve = (0, B.memo)(eve), iL = [
[
"",
"全部",
@@ -47159,53 +47290,53 @@ var Q_e = (0, B.memo)(Z_e), oL = [
"hard-drive"
]
];
-function sL(e = "", t = "pending") {
+function aL(e = "", t = "pending") {
let n = new URLSearchParams();
e && n.set("type", e), t === "dismissed" && n.set("view", "dismissed");
let r = n.toString();
return `/junk-files${r ? `?${r}` : ""}`;
}
-function $_e(e) {
+function nve(e) {
return e === "dismissed" ? {
view: "pending",
label: "返回待判断",
glyph: "rotate-ccw",
- href: sL("", "pending")
+ href: aL("", "pending")
} : {
view: "dismissed",
label: "已排除",
glyph: "eye-off",
- href: sL("", "dismissed")
+ href: aL("", "dismissed")
};
}
-var eve = (e) => e === "dismissed" ? "已排除" : "待判断";
+var rve = (e) => e === "dismissed" ? "已排除" : "待判断";
//#endregion
//#region src/react/junk-queue/junk-count.tsx
-function cL({ name: e }) {
+function oL({ name: e }) {
return /* @__PURE__ */ (0, H.jsx)("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
children: /* @__PURE__ */ (0, H.jsx)("use", { href: `#i-${e}` })
});
}
-function lL({ scope: e, count: t }) {
+function sL({ scope: e, count: t }) {
return t ? /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [" ", /* @__PURE__ */ (0, H.jsx)("span", {
"data-count-badge": `junk:${e}`,
children: t.toLocaleString()
})] }) : null;
}
-function tve({ route: e, page: t, failed: n, onNavigate: r }) {
- let i = hT(), a = (0, B.useRef)(null), { kind: o, view: s } = e, c = Sr(a, i, "[data-junk-kind-link][aria-current=\"page\"]", `${s}:${o}:${t ? oL.map(([e]) => rL(t, e)).join(",") : ""}`), l = $_e(s), u = (e) => {
+function ive({ route: e, page: t, failed: n, onNavigate: r }) {
+ let i = pT(), a = (0, B.useRef)(null), { kind: o, view: s } = e, c = Sr(a, i, "[data-junk-kind-link][aria-current=\"page\"]", `${s}:${o}:${t ? iL.map(([e]) => tL(t, e)).join(",") : ""}`), l = nve(s), u = (e) => {
let t = e.target.closest("a");
- !t || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || (e.preventDefault(), r(t.getAttribute("href") || sL()));
+ !t || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || (e.preventDefault(), r(t.getAttribute("href") || aL()));
}, d = t ? `${Number(t.total || 0).toLocaleString()} 个` : n ? "—" : "";
return /* @__PURE__ */ (0, H.jsxs)("div", {
"data-junk-count": "",
children: [/* @__PURE__ */ (0, H.jsx)("div", {
"data-junk-summary": "",
"aria-live": "polite",
- children: /* @__PURE__ */ (0, H.jsx)(lP, {
- label: eve(s),
+ children: /* @__PURE__ */ (0, H.jsx)(sP, {
+ label: rve(s),
figure: d,
pending: !t && !n,
flush: !0
@@ -47225,17 +47356,17 @@ function tve({ route: e, page: t, failed: n, onNavigate: r }) {
onClick: u,
onPointerLeave: c.leave,
children: [
- oL.map(([e, n, r]) => /* @__PURE__ */ (0, H.jsxs)("a", {
- href: sL(e, s),
+ iL.map(([e, n, r]) => /* @__PURE__ */ (0, H.jsxs)("a", {
+ href: aL(e, s),
"data-junk-kind-link": e,
"aria-current": e === o ? "page" : void 0,
onPointerEnter: c.hover,
children: [
- /* @__PURE__ */ (0, H.jsx)(cL, { name: r }),
+ /* @__PURE__ */ (0, H.jsx)(oL, { name: r }),
n,
- /* @__PURE__ */ (0, H.jsx)(lL, {
+ /* @__PURE__ */ (0, H.jsx)(sL, {
scope: e,
- count: t ? rL(t, e) : 0
+ count: t ? tL(t, e) : 0
})
]
}, e || "all")),
@@ -47249,9 +47380,9 @@ function tve({ route: e, page: t, failed: n, onNavigate: r }) {
"aria-current": s === "dismissed" ? "page" : void 0,
onPointerEnter: s === "dismissed" ? void 0 : c.hover,
children: [
- /* @__PURE__ */ (0, H.jsx)(cL, { name: l.glyph }),
+ /* @__PURE__ */ (0, H.jsx)(oL, { name: l.glyph }),
l.label,
- /* @__PURE__ */ (0, H.jsx)(lL, {
+ /* @__PURE__ */ (0, H.jsx)(sL, {
scope: "dismissed",
count: Number(t?.dismissed_total || 0)
})
@@ -47264,33 +47395,33 @@ function tve({ route: e, page: t, failed: n, onNavigate: r }) {
}
//#endregion
//#region src/react/junk-queue/junk-queue-page.tsx
-var nve = gC("check"), rve = (e, t) => e[1] === t.view && e[2] === t.kind;
-function ive(e) {
+var ave = MC("check"), ove = (e, t) => e[1] === t.view && e[2] === t.kind;
+function sve(e) {
let t = {
kind: e.kind,
view: e.view
- }, n = xw({
- queryKey: J_e(t, e.revision),
- queryFn: ({ signal: e }) => X_e(t, e),
- placeholderData: (e, n) => n && rve(n.queryKey, t) ? e : void 0
+ }, n = yw({
+ queryKey: Z_e(t, e.revision),
+ queryFn: ({ signal: e }) => $_e(t, e),
+ placeholderData: (e, n) => n && ove(n.queryKey, t) ? e : void 0
});
(0, B.useEffect)(() => {
n.isFetching || e.settled?.(e.revision);
}, [n.isFetching, e.revision]);
- let r = ave(e.countRow), i = n.isPending;
+ let r = cve(e.countRow), i = n.isPending;
(0, B.useLayoutEffect)(() => {
let t = e.countRow;
t && (i ? t.setAttribute("aria-busy", "true") : t.removeAttribute("aria-busy"));
}, [e.countRow, i]), (0, B.useLayoutEffect)(() => {
r && n.data && h(r, "junk");
}, [r, n.data]);
- let { navigate: a } = e.actions, o = r ? (0, Dt.createPortal)(/* @__PURE__ */ (0, H.jsx)(tve, {
+ let { navigate: a } = e.actions, o = r ? (0, Dt.createPortal)(/* @__PURE__ */ (0, H.jsx)(ive, {
route: t,
page: n.data,
failed: n.isError && !n.data,
onNavigate: a
}), r) : null;
- return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [o, /* @__PURE__ */ (0, H.jsx)(ove, {
+ return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [o, /* @__PURE__ */ (0, H.jsx)(lve, {
props: e,
data: n.data,
pending: i,
@@ -47298,7 +47429,7 @@ function ive(e) {
retry: () => void n.refetch()
}, `${t.view}:${t.kind}`)] });
}
-function ave(e) {
+function cve(e) {
let [t, n] = (0, B.useState)(null);
return (0, B.useLayoutEffect)(() => {
if (!e) return;
@@ -47308,8 +47439,8 @@ function ave(e) {
};
}, [e]), t;
}
-function ove({ props: e, data: t, pending: n, error: r, retry: i }) {
- let a = VA(n, e.skeletonHtml), o = Math.max(1, e.batchSize || 60), [s, c] = (0, B.useState)(1), l = t?.items || [], u = l.slice(0, s * o), { canLoadMore: d } = e, f = (0, B.useCallback)(() => {
+function lve({ props: e, data: t, pending: n, error: r, retry: i }) {
+ let a = sA(n, e.skeletonHtml), o = Math.max(1, e.batchSize || 60), [s, c] = (0, B.useState)(1), l = t?.items || [], u = l.slice(0, s * o), { canLoadMore: d } = e, f = (0, B.useCallback)(() => {
d?.() !== !1 && c((e) => e + 1);
}, [d]);
return /* @__PURE__ */ (0, H.jsxs)("div", {
@@ -47317,14 +47448,14 @@ function ove({ props: e, data: t, pending: n, error: r, retry: i }) {
"data-grid-reveal": a.fading ? "" : void 0,
children: [a.layer, (() => {
if (n) return null;
- if (!t) return /* @__PURE__ */ (0, H.jsx)(HA, {
+ if (!t) return /* @__PURE__ */ (0, H.jsx)(cA, {
message: ce(r),
onRetry: i
});
if (!l.length) {
let t = e.view === "dismissed";
- return /* @__PURE__ */ (0, H.jsx)(fA, {
- icon: nve,
+ return /* @__PURE__ */ (0, H.jsx)(Nk, {
+ icon: ave,
title: t ? "没有已排除的文件" : "没有待判断的垃圾文件",
children: t ? "点“不是垃圾”的资源会保留在这里,可随时重新判断。" : "当前分类没有候选文件。"
});
@@ -47333,7 +47464,7 @@ function ove({ props: e, data: t, pending: n, error: r, retry: i }) {
"data-media-grid": "",
"data-junk-grid": "",
"data-select-mode": e.selectMode ? "" : void 0,
- children: u.map((t) => /* @__PURE__ */ (0, H.jsx)(Q_e, {
+ children: u.map((t) => /* @__PURE__ */ (0, H.jsx)(tve, {
item: t,
view: e.view,
selected: e.selected.has(t.id),
@@ -47341,11 +47472,11 @@ function ove({ props: e, data: t, pending: n, error: r, retry: i }) {
helpers: e.helpers,
actions: e.actions
}, t.id))
- }), u.length < l.length ? /* @__PURE__ */ (0, H.jsx)(sve, { onMore: f }, s) : null] });
+ }), u.length < l.length ? /* @__PURE__ */ (0, H.jsx)(uve, { onMore: f }, s) : null] });
})()]
});
}
-function sve({ onMore: e }) {
+function uve({ onMore: e }) {
let t = (0, B.useRef)(null);
return (0, B.useEffect)(() => {
let n = t.current;
@@ -47363,32 +47494,32 @@ function sve({ onMore: e }) {
}
//#endregion
//#region src/react/playlists/playlists.ts
-var cve = "/api/playlists", uL = "/api/playlist", dL = ["playlists"], fL = (e) => K(cve, e);
-async function lve(e) {
+var dve = "/api/playlists", cL = "/api/playlist", lL = ["playlists"], uL = (e) => K(dve, e);
+async function fve(e) {
await z.fetchQuery({
- queryKey: dL,
- queryFn: () => fL(e),
+ queryKey: lL,
+ queryFn: () => uL(e),
staleTime: 0
});
}
-var pL = () => z.invalidateQueries({
- queryKey: dL,
+var dL = () => z.invalidateQueries({
+ queryKey: lL,
exact: !0
-}), uve = (e) => e.current_asset_id || e.preview_asset_id || null, mL = (e) => `/poster?id=${e}&c=4`, dve = (e) => q(uL, {
+}), pve = (e) => e.current_asset_id || e.preview_asset_id || null, fL = (e) => `/poster?id=${e}&c=4`, mve = (e) => q(cL, {
action: "create",
name: e,
asset_ids: []
-}), hL = (e, t) => q(uL, {
+}), pL = (e, t) => q(cL, {
action: "rename",
id: e,
name: t
-}), gL = (e) => q(uL, {
+}), mL = (e) => q(cL, {
action: "delete",
id: e
-}), fve = (e) => K(`${uL}?id=${e}`).catch(() => null);
-function pve(e) {
+}), hve = (e) => K(`${cL}?id=${e}`).catch(() => null);
+function gve(e) {
let t = (e.items || []).map((e) => e.id), n = e.source_seed_asset_id;
- return q(uL, {
+ return q(cL, {
action: "create",
name: e.name,
asset_ids: t,
@@ -47398,18 +47529,18 @@ function pve(e) {
}
//#endregion
//#region src/react/playlists/playlists-page.tsx
-var mve = gC("ellipsis"), hve = gC("pencil"), gve = gC("trash"), _ve = gC("playlist"), _L = dr(sT, cT, "text-body-2-medium"), vL = "播放列表名称不能为空", yL = (e) => async () => {
+var _ve = MC("ellipsis"), vve = MC("pencil"), yve = MC("trash"), bve = MC("playlist"), hL = dr(aT, oT, "text-body-2-medium"), gL = "播放列表名称不能为空", _L = (e) => async () => {
try {
await e();
} finally {
- pL();
+ dL();
}
};
-function vve({ toast: e }) {
- let [t, n] = (0, B.useState)(""), [r, i] = (0, B.useState)(""), a = ww({
- mutationFn: (e) => dve(e),
+function xve({ toast: e }) {
+ let [t, n] = (0, B.useState)(""), [r, i] = (0, B.useState)(""), a = Sw({
+ mutationFn: (e) => mve(e),
onSuccess: (t) => {
- n(""), i(""), pL(), e("已新建播放列表", { undo: yL(() => gL(t.playlist.id)) });
+ n(""), i(""), dL(), e("已新建播放列表", { undo: _L(() => mL(t.playlist.id)) });
},
onError: (e) => i(G(e) || "新建失败")
});
@@ -47419,7 +47550,7 @@ function vve({ toast: e }) {
onSubmit: (e) => {
if (e.preventDefault(), !a.isPending) {
if (!t.trim()) {
- i(vL);
+ i(gL);
return;
}
a.mutate(t);
@@ -47428,7 +47559,7 @@ function vve({ toast: e }) {
className: "flex flex-wrap items-end gap-2",
children: [/* @__PURE__ */ (0, H.jsx)("div", {
className: "min-w-50 max-w-80 flex-1 basis-50 max-board-narrow:min-w-0 max-board-narrow:max-w-none",
- children: /* @__PURE__ */ (0, H.jsx)(bA, {
+ children: /* @__PURE__ */ (0, H.jsx)(zk, {
label: "新播放列表",
placeholder: "输入名称",
maxLength: 80,
@@ -47447,7 +47578,7 @@ function vve({ toast: e }) {
})]
});
}
-function yve({ target: e, close: t, toast: n }) {
+function Sve({ target: e, close: t, toast: n }) {
let [r, i] = (0, B.useState)(""), [a, o] = (0, B.useState)(""), s = (0, B.useRef)(null);
(0, B.useEffect)(() => {
if (!e) return;
@@ -47457,14 +47588,14 @@ function yve({ target: e, close: t, toast: n }) {
});
return () => cancelAnimationFrame(t);
}, [e]);
- let c = ww({
- mutationFn: ({ row: e, value: t }) => hL(e.id, t),
+ let c = Sw({
+ mutationFn: ({ row: e, value: t }) => pL(e.id, t),
onSuccess: (e, { row: r }) => {
- t(), pL(), n("已重命名播放列表", { undo: yL(() => hL(r.id, r.name)) });
+ t(), dL(), n("已重命名播放列表", { undo: _L(() => pL(r.id, r.name)) });
},
onError: (e) => o(G(e))
});
- return /* @__PURE__ */ (0, H.jsx)(VN, {
+ return /* @__PURE__ */ (0, H.jsx)(zN, {
isOpen: !!e,
onOpenChange: (e) => {
e || t();
@@ -47476,7 +47607,7 @@ function yve({ target: e, close: t, toast: n }) {
if (t.preventDefault(), !e || c.isPending) return;
let n = r.trim();
if (!n) {
- o(vL);
+ o(gL);
return;
}
c.mutate({
@@ -47491,7 +47622,7 @@ function yve({ target: e, close: t, toast: n }) {
slot: "title",
className: "text-title-2-semibold text-text-primary",
children: "编辑名称"
- }), /* @__PURE__ */ (0, H.jsx)(bA, {
+ }), /* @__PURE__ */ (0, H.jsx)(zk, {
ref: s,
label: "名称",
placeholder: "输入名称",
@@ -47519,7 +47650,7 @@ function yve({ target: e, close: t, toast: n }) {
})
});
}
-function bve({ name: e, onRename: t, onDelete: n }) {
+function Cve({ name: e, onRename: t, onDelete: n }) {
let r = (0, B.useRef)(null), [i, a] = (0, B.useState)(!1), o = (e) => {
a(!1), e();
};
@@ -47533,7 +47664,7 @@ function bve({ name: e, onRename: t, onDelete: n }) {
"data-playlist-menu": "",
onClick: () => a(!0),
className: "flex size-7.5 flex-none cursor-pointer items-center justify-center rounded-2lg text-foreground-icon-secondary outline-none transition-colors hover:bg-background-primary-hover hover:text-foreground-icon-primary aria-expanded:bg-background-primary-hover aria-expanded:text-foreground-icon-primary focus-visible:ring-2 focus-visible:ring-border-focus-ring",
- children: /* @__PURE__ */ (0, H.jsx)(mve, {
+ children: /* @__PURE__ */ (0, H.jsx)(_ve, {
"aria-hidden": !0,
className: "size-4.5"
})
@@ -47543,23 +47674,23 @@ function bve({ name: e, onRename: t, onDelete: n }) {
onOpenChange: a,
placement: "bottom end",
offset: 4,
- className: oT,
- children: /* @__PURE__ */ (0, H.jsxs)(tT, {
+ className: iT,
+ children: /* @__PURE__ */ (0, H.jsxs)($w, {
"aria-label": `播放列表操作:${e}`,
className: "flex w-37.5 flex-col gap-0.5 outline-none",
children: [/* @__PURE__ */ (0, H.jsxs)("button", {
type: "button",
- className: _L,
+ className: hL,
onClick: () => o(t),
- children: [/* @__PURE__ */ (0, H.jsx)(hve, {
+ children: [/* @__PURE__ */ (0, H.jsx)(vve, {
"aria-hidden": !0,
className: "size-4 shrink-0"
}), "编辑名称"]
}), /* @__PURE__ */ (0, H.jsxs)("button", {
type: "button",
- className: _L,
+ className: hL,
onClick: () => o(n),
- children: [/* @__PURE__ */ (0, H.jsx)(gve, {
+ children: [/* @__PURE__ */ (0, H.jsx)(yve, {
"aria-hidden": !0,
className: "size-4 shrink-0"
}), "删除播放列表"]
@@ -47567,13 +47698,13 @@ function bve({ name: e, onRename: t, onDelete: n }) {
})
})] });
}
-function xve({ openPlaylist: e, openEntity: t, canFlip: n, toast: i, revision: a }) {
- let o = xw({
- queryKey: dL,
- queryFn: ({ signal: e }) => fL(e)
+function wve({ openPlaylist: e, openEntity: t, canFlip: n, toast: i, revision: a }) {
+ let o = yw({
+ queryKey: lL,
+ queryFn: ({ signal: e }) => uL(e)
}), [s, c] = (0, B.useState)(null), l = (0, B.useRef)(a);
(0, B.useEffect)(() => {
- l.current !== a && (l.current = a, pL());
+ l.current !== a && (l.current = a, dL());
}, [a]);
let u = o.data;
if (!u) return /* @__PURE__ */ (0, H.jsx)("div", {
@@ -47591,8 +47722,8 @@ function xve({ openPlaylist: e, openEntity: t, canFlip: n, toast: i, revision: a
confirmLabel: "删除播放列表",
danger: !0,
onConfirm: async () => {
- let t = await fve(e.id);
- await gL(e.id), pL(), i("已删除播放列表", t ? { undo: yL(() => pve(t)) } : void 0);
+ let t = await hve(e.id);
+ await mL(e.id), dL(), i("已删除播放列表", t ? { undo: _L(() => gve(t)) } : void 0);
}
});
};
@@ -47607,38 +47738,38 @@ function xve({ openPlaylist: e, openEntity: t, canFlip: n, toast: i, revision: a
}), /* @__PURE__ */ (0, H.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
children: "保存 Mix,按自己的顺序继续播放。"
- })] }), /* @__PURE__ */ (0, H.jsx)(vve, { toast: i })]
+ })] }), /* @__PURE__ */ (0, H.jsx)(xve, { toast: i })]
}),
d.length ? /* @__PURE__ */ (0, H.jsx)("div", {
"data-playlist-grid": "",
className: "card-grid-cover gap-4.5",
children: d.map((r) => {
- let i = uve(r);
- return /* @__PURE__ */ (0, H.jsx)(ZA, {
+ let i = pve(r);
+ return /* @__PURE__ */ (0, H.jsx)(DA, {
"data-playlist-card": String(r.id),
name: r.name,
caption: r.source_kind === "mix" ? "由 Mix 保存" : "手动播放列表",
count: r.item_count,
- poster: r.preview_asset_id ? mL(r.preview_asset_id) : null,
- flipImages: async () => (r.preview_ids || []).map(mL),
+ poster: r.preview_asset_id ? fL(r.preview_asset_id) : null,
+ flipImages: async () => (r.preview_ids || []).map(fL),
canFlip: n,
faces: r.faces || [],
onOpenEntity: t,
...i ? { onOpen: () => e(r.id, i) } : {},
openLabel: `打开播放列表 ${r.name}`,
- menu: /* @__PURE__ */ (0, H.jsx)(bve, {
+ menu: /* @__PURE__ */ (0, H.jsx)(Cve, {
name: r.name,
onRename: () => c(r),
onDelete: () => f(r)
})
}, r.id);
})
- }) : /* @__PURE__ */ (0, H.jsx)(fA, {
- icon: _ve,
+ }) : /* @__PURE__ */ (0, H.jsx)(Nk, {
+ icon: bve,
title: "还没有播放列表",
children: "保存 Mix 或新建列表后,会在这里按自己的顺序继续播放。"
}),
- /* @__PURE__ */ (0, H.jsx)(yve, {
+ /* @__PURE__ */ (0, H.jsx)(Sve, {
target: s,
close: () => c(null),
toast: i
@@ -47648,11 +47779,11 @@ function xve({ openPlaylist: e, openEntity: t, canFlip: n, toast: i, revision: a
}
//#endregion
//#region src/react/quality-goals/quality-goals-page.tsx
-function Sve({ item: e, openItem: t, javTitleHtml: n, javDisplayName: r, srcBadge: i }) {
+function Tve({ item: e, openItem: t, javTitleHtml: n, javDisplayName: r, srcBadge: i }) {
let a = () => t(e.id);
return /* @__PURE__ */ (0, H.jsxs)("li", {
"data-goal-id": e.id,
- className: lT({
+ className: sT({
padding: "none",
bordered: "soft",
className: "flex flex-col gap-3 p-3"
@@ -47668,7 +47799,7 @@ function Sve({ item: e, openItem: t, javTitleHtml: n, javDisplayName: r, srcBadg
className: "text-caption-1-regular text-text-secondary",
children: "暂无预览"
}), /* @__PURE__ */ (0, H.jsx)("img", {
- src: Kue(e),
+ src: _de(e),
alt: "",
loading: "lazy",
onError: (e) => e.currentTarget.remove(),
@@ -47716,38 +47847,38 @@ function Sve({ item: e, openItem: t, javTitleHtml: n, javDisplayName: r, srcBadg
})]
});
}
-function Cve(e) {
- let t = xw({
- queryKey: gj,
- queryFn: ({ signal: e }) => _j(e)
+function Eve(e) {
+ let t = yw({
+ queryKey: KA,
+ queryFn: ({ signal: e }) => qA(e)
}), n = t.data;
- if (!n) return /* @__PURE__ */ (0, H.jsx)(pA, { children: /* @__PURE__ */ (0, H.jsx)(Y, {
+ if (!n) return /* @__PURE__ */ (0, H.jsx)(Pk, { children: /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "error",
title: "高清版目标读取失败",
children: t.error ? G(t.error) : "未取得高清版目标,请刷新页面重试。"
}) });
let r = n.items || [];
- return r.length ? /* @__PURE__ */ (0, H.jsxs)(pA, { children: [/* @__PURE__ */ (0, H.jsx)(lP, {
+ return r.length ? /* @__PURE__ */ (0, H.jsxs)(Pk, { children: [/* @__PURE__ */ (0, H.jsx)(sP, {
label: "待升级",
figure: `${n.total} 部作品`,
flush: !0
}), /* @__PURE__ */ (0, H.jsx)("ul", {
className: "card-grid-cover gap-5",
- children: r.map((t) => /* @__PURE__ */ (0, H.jsx)(Sve, {
+ children: r.map((t) => /* @__PURE__ */ (0, H.jsx)(Tve, {
item: t,
...e
}, t.id))
- })] }) : /* @__PURE__ */ (0, H.jsx)(pA, { children: /* @__PURE__ */ (0, H.jsx)(fA, {
+ })] }) : /* @__PURE__ */ (0, H.jsx)(Pk, { children: /* @__PURE__ */ (0, H.jsx)(Nk, {
shell: "plain",
- icon: ooe,
+ icon: coe,
title: "没有标记中的高清版目标",
children: "现有版本都已满足条件,或还没有加入追踪。"
}) });
}
//#endregion
//#region src/react/review/bulk-toolbar.tsx
-function wve(e) {
- let { groupOptions: t, groupBy: n, onGroupBy: r, groups: i, filter: a, onFilter: o, pageKeys: s, selected: c, onSelected: l, selectedRows: u, metadata: d, approvable: f, busy: p, feedback: m, onUnifySource: h, onRun: g } = e, _ = s.filter((e) => c.has(e)), v = _.length > 0 && _.length === s.length, y = rde(u), b = d && u.some((e) => (e.candidates?.length || 0) > 1), x = y.length ? "统一选择来源" : "所选项目无共同来源";
+function Dve(e) {
+ let { groupOptions: t, groupBy: n, onGroupBy: r, groups: i, filter: a, onFilter: o, pageKeys: s, selected: c, onSelected: l, selectedRows: u, metadata: d, approvable: f, busy: p, feedback: m, onUnifySource: h, onRun: g } = e, _ = s.filter((e) => c.has(e)), v = _.length > 0 && _.length === s.length, y = Ode(u), b = d && u.some((e) => (e.candidates?.length || 0) > 1), x = y.length ? "统一选择来源" : "所选项目无共同来源";
return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsxs)("div", {
role: "group",
"aria-label": "复核筛选",
@@ -47755,29 +47886,29 @@ function wve(e) {
"data-glass-pane": "",
className: "sticky top-topbar z-10 flex flex-wrap items-center gap-2 p-3",
children: [
- /* @__PURE__ */ (0, H.jsx)(SA, {
+ /* @__PURE__ */ (0, H.jsx)(Vk, {
"aria-label": "筛选分组方式",
size: "sm",
selectedKey: n,
onSelectionChange: (e) => {
e !== null && r(String(e));
},
- children: t.map(([e, t]) => /* @__PURE__ */ (0, H.jsx)(CA, {
+ children: t.map(([e, t]) => /* @__PURE__ */ (0, H.jsx)(Hk, {
id: e,
children: t
}, e))
}),
- i.length > 1 ? /* @__PURE__ */ (0, H.jsxs)(SA, {
+ i.length > 1 ? /* @__PURE__ */ (0, H.jsxs)(Vk, {
"aria-label": n === "field" ? "筛选字段分类" : "筛选当前分类",
size: "sm",
selectedKey: a || "*",
onSelectionChange: (e) => {
e !== null && o(String(e) === "*" ? "" : String(e));
},
- children: [/* @__PURE__ */ (0, H.jsx)(CA, {
+ children: [/* @__PURE__ */ (0, H.jsx)(Hk, {
id: "*",
children: "全部分类"
- }), i.map((e) => /* @__PURE__ */ (0, H.jsx)(CA, {
+ }), i.map((e) => /* @__PURE__ */ (0, H.jsx)(Hk, {
id: e.key,
children: `${e.title} · ${e.rows.length}`
}, e.key))]
@@ -47785,7 +47916,7 @@ function wve(e) {
/* @__PURE__ */ (0, H.jsx)(J, {
variant: "secondary",
size: "small",
- leadingIcon: Bw,
+ leadingIcon: Rw,
"aria-pressed": v,
disabled: p || !s.length,
onClick: () => {
@@ -47796,12 +47927,12 @@ function wve(e) {
children: v ? "清空当前选择" : a ? "全选当前分类" : "全选本页"
})
]
- }), /* @__PURE__ */ (0, H.jsxs)(YE, {
+ }), /* @__PURE__ */ (0, H.jsxs)(qE, {
label: "复核所选项目",
visible: c.size > 0,
count: `已选 ${c.size} 项`,
children: [
- b ? /* @__PURE__ */ (0, H.jsxs)(SA, {
+ b ? /* @__PURE__ */ (0, H.jsxs)(Vk, {
"aria-label": "统一选择来源",
size: "sm",
selectedKey: "",
@@ -47809,10 +47940,10 @@ function wve(e) {
onSelectionChange: (e) => {
e !== null && e !== "" && h(String(e));
},
- children: [/* @__PURE__ */ (0, H.jsx)(CA, {
+ children: [/* @__PURE__ */ (0, H.jsx)(Hk, {
id: "",
children: x
- }), y.map((e) => /* @__PURE__ */ (0, H.jsx)(CA, {
+ }), y.map((e) => /* @__PURE__ */ (0, H.jsx)(Hk, {
id: e,
children: e
}, e))]
@@ -47848,7 +47979,7 @@ function wve(e) {
}
//#endregion
//#region src/react/review/candidate-form.tsx
-var Tve = {
+var Ove = {
title: "标题",
original_title: "原标题",
runtime: "来源时长",
@@ -47858,14 +47989,14 @@ var Tve = {
cover_url: "封面",
screenshot_urls: "截图",
trailer_url: "预告片"
-}, bL = "reviewgenretags";
-function Eve({ tags: e }) {
+}, vL = "reviewgenretags";
+function kve({ tags: e }) {
return e.length ? /* @__PURE__ */ (0, H.jsx)("datalist", {
- id: bL,
+ id: vL,
children: e.map((e) => /* @__PURE__ */ (0, H.jsx)("option", { value: e }, e))
}) : null;
}
-function xL({ candidate: e, selectable: t = !1 }) {
+function yL({ candidate: e, selectable: t = !1 }) {
let n = Object.entries(e.catalog_evidence || {}).filter(([, e]) => e && e.display_value), r = e.content_id || e.provider_id;
return /* @__PURE__ */ (0, H.jsxs)("span", {
className: "flex min-w-0 flex-1 flex-col",
@@ -47902,7 +48033,7 @@ function xL({ candidate: e, selectable: t = !1 }) {
children: [
/* @__PURE__ */ (0, H.jsx)("dt", {
className: "text-body-2-regular text-text-secondary",
- children: Tve[e] || e
+ children: Ove[e] || e
}),
/* @__PURE__ */ (0, H.jsx)("dd", {
className: "min-w-0 text-body-2-regular break-words text-text-primary",
@@ -47917,36 +48048,36 @@ function xL({ candidate: e, selectable: t = !1 }) {
}) : null]
});
}
-function Dve({ row: e, fieldName: t, value: n, onChange: r, locked: i }) {
+function Ave({ row: e, fieldName: t, value: n, onChange: r, locked: i }) {
let a = e.candidates || [];
return a.length ? a.length === 1 ? /* @__PURE__ */ (0, H.jsx)("div", {
className: "flex overflow-hidden rounded-surface border border-separator-border bg-background-secondary-default",
- children: /* @__PURE__ */ (0, H.jsx)(xL, { candidate: a[0] })
- }) : /* @__PURE__ */ (0, H.jsx)(dg, {
+ children: /* @__PURE__ */ (0, H.jsx)(yL, { candidate: a[0] })
+ }) : /* @__PURE__ */ (0, H.jsx)(ug, {
"aria-label": `${t || "候选"}的来源`,
value: n,
isDisabled: i,
onChange: r,
className: "flex flex-col gap-2",
- children: a.map((e) => /* @__PURE__ */ (0, H.jsx)(fg, {
+ children: a.map((e) => /* @__PURE__ */ (0, H.jsx)(dg, {
value: e.candidate_key,
className: "group flex cursor-pointer items-center gap-2 overflow-hidden rounded-surface border border-separator-border bg-background-secondary-default outline-none focus-visible:ring-2 focus-visible:ring-border-focus-ring data-selected:border-border-button-active data-disabled:cursor-not-allowed",
- children: /* @__PURE__ */ (0, H.jsx)(xL, {
+ children: /* @__PURE__ */ (0, H.jsx)(yL, {
candidate: e,
selectable: !0
})
}, e.candidate_key))
}) : null;
}
-function Ove({ genre: e, tags: t, locked: n, toast: r }) {
- let [i, a] = (0, B.useState)(""), [o, s] = (0, B.useState)(""), c = ww({
- mutationFn: (t) => dde(e, t),
+function jve({ genre: e, tags: t, locked: n, toast: r }) {
+ let [i, a] = (0, B.useState)(""), [o, s] = (0, B.useState)(""), c = Sw({
+ mutationFn: (t) => Ide(e, t),
onSuccess: async (t, n) => {
if (!t.ok) {
s(t.error || "服务端拒绝了这次收录");
return;
}
- r(n ? `已把「${e}」收录为标签「${n}」` : `已把「${e}」判为非内容标签`), await pde();
+ r(n ? `已把「${e}」收录为标签「${n}」` : `已把「${e}」判为非内容标签`), await Rde();
},
onError: (e) => s(G(e))
}), l = () => {
@@ -47965,16 +48096,16 @@ function Ove({ genre: e, tags: t, locked: n, toast: r }) {
className: "text-body-medium text-text-primary",
children: e
}),
- /* @__PURE__ */ (0, H.jsx)(_A, {
+ /* @__PURE__ */ (0, H.jsx)(Ik, {
"aria-label": `「${e}」收录成的中文标签`,
value: i,
onChange: a,
maxLength: 40,
isDisabled: n || c.isPending,
className: "min-w-40 flex-1",
- children: /* @__PURE__ */ (0, H.jsx)(yA, {
+ children: /* @__PURE__ */ (0, H.jsx)(Rk, {
size: "small",
- list: t.length ? bL : void 0,
+ list: t.length ? vL : void 0,
autoComplete: "off",
placeholder: "中文标签",
onKeyDown: (e) => {
@@ -48006,8 +48137,8 @@ function Ove({ genre: e, tags: t, locked: n, toast: r }) {
]
});
}
-function kve({ row: e, tags: t, locked: n, toast: r }) {
- let i = cde(e);
+function Mve({ row: e, tags: t, locked: n, toast: r }) {
+ let i = Nde(e);
return i.length ? /* @__PURE__ */ (0, H.jsxs)("div", {
role: "group",
"aria-label": "未收录 genre",
@@ -48015,7 +48146,7 @@ function kve({ row: e, tags: t, locked: n, toast: r }) {
children: [/* @__PURE__ */ (0, H.jsx)("h5", {
className: "text-body-2-medium text-text-secondary",
children: `未收录 genre · ${i.length}`
- }), i.map((e) => /* @__PURE__ */ (0, H.jsx)(Ove, {
+ }), i.map((e) => /* @__PURE__ */ (0, H.jsx)(jve, {
genre: e,
tags: t,
locked: n,
@@ -48025,9 +48156,9 @@ function kve({ row: e, tags: t, locked: n, toast: r }) {
}
//#endregion
//#region src/react/review/review-evidence.tsx
-var SL = (e = "") => /^https?:\/\//i.test(e) ? e : "", Ave = (e = "") => SL(e) || (e.startsWith("/") && !e.startsWith("//") ? e : "");
-function CL({ url: e }) {
- let t = Ave(e || ""), [n, r] = (0, B.useState)(!1);
+var bL = (e = "") => /^https?:\/\//i.test(e) ? e : "", Nve = (e = "") => bL(e) || (e.startsWith("/") && !e.startsWith("//") ? e : "");
+function xL({ url: e }) {
+ let t = Nve(e || ""), [n, r] = (0, B.useState)(!1);
return /* @__PURE__ */ (0, H.jsx)("div", {
className: "flex h-review-image items-center justify-center overflow-hidden rounded-surface bg-background-secondary-default",
children: t && !n ? /* @__PURE__ */ (0, H.jsx)("img", {
@@ -48042,7 +48173,7 @@ function CL({ url: e }) {
})
});
}
-function wL({ asset: e, openItem: t }) {
+function SL({ asset: e, openItem: t }) {
let n = e.name || "";
return /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex min-w-0 items-center gap-2.5 rounded-surface bg-background-secondary-default p-2",
@@ -48068,21 +48199,21 @@ function wL({ asset: e, openItem: t }) {
}), /* @__PURE__ */ (0, H.jsx)(J, {
variant: "secondary",
size: "small",
- leadingIcon: eoe,
+ leadingIcon: noe,
onClick: () => t(e.id),
children: "打开原视频"
})]
})]
});
}
-function jve({ kind: e, name: t, works: n, avatar: r, openEntity: i }) {
+function Pve({ kind: e, name: t, works: n, avatar: r, openEntity: i }) {
return /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex min-w-0 items-center gap-3",
children: [/* @__PURE__ */ (0, H.jsx)("button", {
type: "button",
"aria-label": `打开创作者页:${t}`,
onClick: () => i(e, t),
- className: `relative inline-grid size-11 shrink-0 cursor-pointer place-items-center overflow-hidden rounded-full bg-background-secondary-default text-caption-1-medium text-text-secondary outline-none focus-visible:ring-2 focus-visible:ring-border-focus-ring ${RI}`,
+ className: `relative inline-grid size-11 shrink-0 cursor-pointer place-items-center overflow-hidden rounded-full bg-background-secondary-default text-caption-1-medium text-text-secondary outline-none focus-visible:ring-2 focus-visible:ring-border-focus-ring ${II}`,
dangerouslySetInnerHTML: { __html: r }
}), /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex min-w-0 flex-col items-start",
@@ -48098,8 +48229,8 @@ function jve({ kind: e, name: t, works: n, avatar: r, openEntity: i }) {
})]
});
}
-function Mve({ row: e, openItem: t, openEntity: n, onReveal: r, revealing: i, note: a }) {
- let o = SL(e.profile_url || ""), s = (e.preview_assets || []).slice(0, 6), c = Math.max(0, Number(e.video_count || e.videos || 0));
+function Fve({ row: e, openItem: t, openEntity: n, onReveal: r, revealing: i, note: a }) {
+ let o = bL(e.profile_url || ""), s = (e.preview_assets || []).slice(0, 6), c = Math.max(0, Number(e.video_count || e.videos || 0));
return /* @__PURE__ */ (0, H.jsxs)("section", {
className: "flex flex-col gap-3",
children: [
@@ -48109,10 +48240,10 @@ function Mve({ row: e, openItem: t, openEntity: n, onReveal: r, revealing: i, no
}),
/* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-wrap items-center gap-2",
- children: [o ? /* @__PURE__ */ (0, H.jsx)(rT, {
+ children: [o ? /* @__PURE__ */ (0, H.jsx)(tT, {
variant: "secondary",
size: "small",
- trailingIcon: Gw,
+ trailingIcon: Uw,
href: o,
target: "_blank",
rel: "noopener noreferrer",
@@ -48124,7 +48255,7 @@ function Mve({ row: e, openItem: t, openEntity: n, onReveal: r, revealing: i, no
children: `查看全部 ${c.toLocaleString()} 部作品`
})]
}),
- /* @__PURE__ */ (0, H.jsx)(CL, { url: e.preview_url }),
+ /* @__PURE__ */ (0, H.jsx)(xL, { url: e.preview_url }),
/* @__PURE__ */ (0, H.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
children: "通过后记录身份判断。"
@@ -48167,7 +48298,7 @@ function Mve({ row: e, openItem: t, openEntity: n, onReveal: r, revealing: i, no
]
});
}
-function Nve({ assets: e, picked: t, onPicked: n, locked: r }) {
+function Ive({ assets: e, picked: t, onPicked: n, locked: r }) {
let [i, a] = (0, B.useState)(null), o = new Set(t), s = (t, s) => {
if (r) return;
let c = new Set(o);
@@ -48223,7 +48354,7 @@ function Nve({ assets: e, picked: t, onPicked: n, locked: r }) {
}),
/* @__PURE__ */ (0, H.jsx)("span", {
className: "absolute top-1 right-1",
- children: /* @__PURE__ */ (0, H.jsx)(NM, {
+ children: /* @__PURE__ */ (0, H.jsx)(lM, {
size: "sm",
state: {
isSelected: n,
@@ -48243,19 +48374,19 @@ function Nve({ assets: e, picked: t, onPicked: n, locked: r }) {
}
//#endregion
//#region src/react/review/review-card.tsx
-var Pve = lT({
+var Lve = sT({
variant: "outlined",
padding: "none",
className: "flex flex-col gap-4 px-5 pt-4"
-}), TL = "flex min-h-6 min-w-0 items-center", Fve = (e) => e === "western_identity" ? "h-review-card-tall" : "h-review-card";
-function Ive(e) {
- let { category: t, row: n, choice: r, onChoice: i, selected: a, onSelect: o, locked: s, busy: c, problem: l, genreTags: u, onDecide: d, handlers: f } = e, p = (0, B.useRef)(!1), m = hT(), h = hT(), g = t === "metadata_fields", _ = $ue[t] || "", v = String(n.creator || "").trim(), y = !!_ && !!v, b = ade(t, n), x = Oj(t, n), S = Dj(t, n), C = ode(n), w = sde(n), T = Ej(t, n), E = n.comparison_assets || [], D = n.preview_assets || [], O = String(n.decision || "pending") !== "pending", k = E.length > 1 ? /* @__PURE__ */ (0, H.jsx)("div", {
+}), CL = "flex min-h-6 min-w-0 items-center", Rve = (e) => e === "western_identity" ? "h-review-card-tall" : "h-review-card";
+function zve(e) {
+ let { category: t, row: n, choice: r, onChoice: i, selected: a, onSelect: o, locked: s, busy: c, problem: l, genreTags: u, onDecide: d, handlers: f } = e, p = (0, B.useRef)(!1), m = pT(), h = pT(), g = t === "metadata_fields", _ = wde[t] || "", v = String(n.creator || "").trim(), y = !!_ && !!v, b = Ade(t, n), x = ij(t, n), S = rj(t, n), C = jde(n), w = Mde(n), T = nj(t, n), E = n.comparison_assets || [], D = n.preview_assets || [], O = String(n.decision || "pending") !== "pending", k = E.length > 1 ? /* @__PURE__ */ (0, H.jsx)("div", {
className: "flex flex-col gap-3",
- children: E.map((e) => /* @__PURE__ */ (0, H.jsx)(wL, {
+ children: E.map((e) => /* @__PURE__ */ (0, H.jsx)(SL, {
asset: e,
openItem: f.openItem
}, e.id))
- }) : y ? /* @__PURE__ */ (0, H.jsx)(jve, {
+ }) : y ? /* @__PURE__ */ (0, H.jsx)(Pve, {
kind: _,
name: v,
works: Number(n.video_count || n.videos || 0),
@@ -48266,14 +48397,14 @@ function Ive(e) {
image_version: n.image_version,
avatar_focus: n.avatar_focus
} : null, null, _)
- }) : n.asset_id ? /* @__PURE__ */ (0, H.jsx)(wL, {
+ }) : n.asset_id ? /* @__PURE__ */ (0, H.jsx)(SL, {
openItem: f.openItem,
asset: {
id: n.asset_id,
name: n.asset_name,
preview_url: n.asset_preview_url
}
- }) : null, A = g ? /* @__PURE__ */ (0, H.jsx)(Dve, {
+ }) : null, A = g ? /* @__PURE__ */ (0, H.jsx)(Ave, {
row: n,
fieldName: x,
value: r.candidateKey,
@@ -48282,7 +48413,7 @@ function Ive(e) {
candidateKey: e
}),
locked: s
- }) : t === "creator_tags" ? D.length ? /* @__PURE__ */ (0, H.jsx)(Nve, {
+ }) : t === "creator_tags" ? D.length ? /* @__PURE__ */ (0, H.jsx)(Ive, {
assets: D,
picked: r.assets,
locked: s,
@@ -48290,21 +48421,21 @@ function Ive(e) {
...r,
assets: e
})
- }) : /* @__PURE__ */ (0, H.jsx)(fA, {
+ }) : /* @__PURE__ */ (0, H.jsx)(Nk, {
shell: "inset",
- icon: Yae,
+ icon: Zae,
title: "这批作品尚未抽帧",
children: `${n.video_count || ""} 条作品还没有可用预览;批准后仍会按候选写入标签。`
- }) : t === "fc2_similarity" ? null : t === "western_identity" ? /* @__PURE__ */ (0, H.jsx)(Mve, {
+ }) : t === "fc2_similarity" ? null : t === "western_identity" ? /* @__PURE__ */ (0, H.jsx)(Fve, {
row: n,
openItem: f.openItem,
openEntity: f.openEntity,
onReveal: f.onReveal,
revealing: f.revealing,
note: f.revealNote
- }) : /* @__PURE__ */ (0, H.jsx)(CL, { url: n.preview_url }), j = y ? k : x ? /* @__PURE__ */ (0, H.jsxs)("h4", {
- className: `${TL} flex-wrap gap-2`,
- children: [/* @__PURE__ */ (0, H.jsx)(uA, {
+ }) : /* @__PURE__ */ (0, H.jsx)(xL, { url: n.preview_url }), j = y ? k : x ? /* @__PURE__ */ (0, H.jsxs)("h4", {
+ className: `${CL} flex-wrap gap-2`,
+ children: [/* @__PURE__ */ (0, H.jsx)(Mk, {
variant: "caption",
color: "blue",
children: x
@@ -48314,7 +48445,7 @@ function Ive(e) {
children: S
})]
}) : /* @__PURE__ */ (0, H.jsx)("h4", {
- className: TL,
+ className: CL,
children: /* @__PURE__ */ (0, H.jsx)("span", {
title: b,
className: "min-w-0 truncate text-body-medium text-text-primary",
@@ -48324,20 +48455,20 @@ function Ive(e) {
return /* @__PURE__ */ (0, H.jsxs)("section", {
"aria-label": b,
"data-review-key": n.item_key,
- className: `${Pve} ${Fve(t)} overflow-hidden`,
+ className: `${Lve} ${Rve(t)} overflow-hidden`,
children: [
/* @__PURE__ */ (0, H.jsxs)("header", {
className: "flex min-w-0 shrink-0 items-start gap-2",
children: [
s ? null : /* @__PURE__ */ (0, H.jsx)("span", {
- className: `${TL} shrink-0`,
+ className: `${CL} shrink-0`,
onPointerDownCapture: (e) => {
p.current = e.shiftKey;
},
onKeyDownCapture: (e) => {
p.current = e.shiftKey;
},
- children: /* @__PURE__ */ (0, H.jsx)(PM, {
+ children: /* @__PURE__ */ (0, H.jsx)(uM, {
isSelected: a,
"aria-label": `选择 ${b}`,
onChange: (e) => o(p.current, e)
@@ -48347,7 +48478,7 @@ function Ive(e) {
className: "min-w-0 flex-1",
children: j
}),
- O ? /* @__PURE__ */ (0, H.jsx)(uA, {
+ O ? /* @__PURE__ */ (0, H.jsx)(Mk, {
variant: "caption",
color: "neutral",
children: n.decision
@@ -48371,7 +48502,7 @@ function Ive(e) {
!y && k ? k : null,
w.length || t === "creator_tags" ? /* @__PURE__ */ (0, H.jsx)("div", {
className: "flex flex-wrap gap-1",
- children: w.length ? w.map((e) => /* @__PURE__ */ (0, H.jsx)(uA, {
+ children: w.length ? w.map((e) => /* @__PURE__ */ (0, H.jsx)(Mk, {
variant: "caption",
color: "soft",
children: e
@@ -48381,7 +48512,7 @@ function Ive(e) {
})
}) : null,
A,
- /* @__PURE__ */ (0, H.jsx)(kve, {
+ /* @__PURE__ */ (0, H.jsx)(Mve, {
row: n,
tags: u,
locked: s,
@@ -48443,8 +48574,8 @@ function Ive(e) {
}
//#endregion
//#region src/react/review/review-page.tsx
-var Lve = "flex cursor-pointer items-center justify-between gap-2";
-function Rve({ page: e, pages: t, onPage: n }) {
+var Bve = "flex cursor-pointer items-center justify-between gap-2";
+function Vve({ page: e, pages: t, onPage: n }) {
return t <= 1 ? null : /* @__PURE__ */ (0, H.jsxs)("nav", {
"aria-label": "复核分页",
className: "flex w-full flex-wrap items-center justify-between gap-2",
@@ -48458,7 +48589,7 @@ function Rve({ page: e, pages: t, onPage: n }) {
}),
/* @__PURE__ */ (0, H.jsx)("ul", {
className: "flex flex-wrap items-center gap-1",
- children: vj(e, t).map((t, r) => /* @__PURE__ */ (0, H.jsx)("li", { children: t === "…" ? /* @__PURE__ */ (0, H.jsx)("span", {
+ children: JA(e, t).map((t, r) => /* @__PURE__ */ (0, H.jsx)("li", { children: t === "…" ? /* @__PURE__ */ (0, H.jsx)("span", {
"aria-hidden": !0,
className: "px-1 text-body-2-regular text-text-tertiary",
children: "…"
@@ -48481,48 +48612,48 @@ function Rve({ page: e, pages: t, onPage: n }) {
]
});
}
-function zve(e) {
+function Hve(e) {
let [t, n] = (0, B.useState)(() => matchMedia("(max-width:900px)").matches);
(0, B.useEffect)(() => {
let e = matchMedia("(max-width:900px)"), t = () => n(e.matches);
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
}, []);
- let { route: r, openItem: i, openEntity: a, revealSource: o, toast: s, readOnly: c, readOnlyMessage: l, writerUrl: u } = e, [d, f] = (0, B.useState)(wj(e.category) ? e.category : Que), [p, m] = (0, B.useState)("candidates"), [h, g] = (0, B.useState)(""), [_, v] = (0, B.useState)(1), [y, b] = (0, B.useState)(/* @__PURE__ */ new Set()), [x, S] = (0, B.useState)(/* @__PURE__ */ new Map()), [C, w] = (0, B.useState)(/* @__PURE__ */ new Map()), [T, E] = (0, B.useState)(""), D = (0, B.useRef)(null), [O, k] = (0, B.useState)(0), [A, j] = (0, B.useState)(""), M = (0, B.useRef)(!0);
+ let { route: r, openItem: i, openEntity: a, revealSource: o, toast: s, readOnly: c, readOnlyMessage: l, writerUrl: u } = e, [d, f] = (0, B.useState)(ej(e.category) ? e.category : Cde), [p, m] = (0, B.useState)("candidates"), [h, g] = (0, B.useState)(""), [_, v] = (0, B.useState)(1), [y, b] = (0, B.useState)(/* @__PURE__ */ new Set()), [x, S] = (0, B.useState)(/* @__PURE__ */ new Map()), [C, w] = (0, B.useState)(/* @__PURE__ */ new Map()), [T, E] = (0, B.useState)(""), D = (0, B.useRef)(null), [O, k] = (0, B.useState)(0), [A, j] = (0, B.useState)(""), M = (0, B.useRef)(!0);
(0, B.useEffect)(() => () => {
M.current = !1;
}, []);
- let N = xw({
- queryKey: Sj,
- queryFn: ({ signal: e }) => Aj(e)
+ let N = yw({
+ queryKey: QA,
+ queryFn: ({ signal: e }) => oj(e)
}).data || {
sections: {},
counts: {}
- }, ee = N.sections[d] || [], te = d === "metadata_fields", P = c, F = ede(ee, te), ne = F.some(([e]) => e === p) ? p : "candidates", I = Tj(ee, ne), re = I.some((e) => e.key === h) ? h : "", L = nde(tde(ee, ne, re), _), ie = L.rows.map((e) => e.item_key), ae = new Set(ie), oe = I.map((e) => ({
+ }, ee = N.sections[d] || [], te = d === "metadata_fields", P = c, F = Tde(ee, te), ne = F.some(([e]) => e === p) ? p : "candidates", I = tj(ee, ne), re = I.some((e) => e.key === h) ? h : "", L = Dde(Ede(ee, ne, re), _), ie = L.rows.map((e) => e.item_key), ae = new Set(ie), oe = I.map((e) => ({
...e,
rows: e.rows.filter((e) => ae.has(e.item_key))
- })).filter((e) => e.rows.length), se = (e) => x.get(e.item_key) || lde(e), ce = ee.filter((e) => y.has(e.item_key)), le = (e) => {
+ })).filter((e) => e.rows.length), se = (e) => x.get(e.item_key) || Pde(e), ce = ee.filter((e) => y.has(e.item_key)), le = (e) => {
let t = new Set(e);
b((e) => new Set([...e].filter((e) => !t.has(e)))), S((e) => new Map([...e].filter(([e]) => !t.has(e)))), w((e) => new Map([...e].filter(([e]) => !t.has(e))));
}, R = (e, t) => w((n) => new Map(n).set(e, t)), ue = (e) => {
f(e), m("candidates"), g(""), v(1), b(/* @__PURE__ */ new Set()), S(/* @__PURE__ */ new Map()), w(/* @__PURE__ */ new Map()), E(""), D.current = null, r({ category: e === "metadata_fields" ? "" : e });
- }, de = ww({
- mutationFn: ({ row: e, status: t }) => jj(kj(d, e, t, se(e))),
+ }, de = Sw({
+ mutationFn: ({ row: e, status: t }) => sj(aj(d, e, t, se(e))),
onSuccess: (e, { row: t, status: n }) => {
if (!e.ok) {
R(t.item_key, e.error || "服务端拒绝了这次判定");
return;
}
- Mj(d, [t.item_key]), le([t.item_key]), s(ude(n));
+ cj(d, [t.item_key]), le([t.item_key]), s(Fde(n));
},
onError: (e, { row: t }) => R(t.item_key, G(e))
- }), fe = ww({
+ }), fe = Sw({
mutationFn: async (e) => {
let t = ce, n = [], r = [];
for (let [i, a] of t.entries()) {
if (!M.current) break;
E(`正在处理 ${i} / ${t.length}`);
try {
- let t = await jj(kj(d, a, e, se(a)));
+ let t = await sj(aj(d, a, e, se(a)));
if (!t.ok) throw Error(t.error || "服务端未采用该项");
n.push(a.item_key);
} catch (e) {
@@ -48536,7 +48667,7 @@ function zve(e) {
};
},
onSuccess: ({ status: e, done: t, failures: n }) => {
- Mj(d, t), le(t), n.forEach(([e, t]) => R(e, t)), E(""), s(`已${e === "approved" ? "通过" : "拒绝"} ${t.length} 项` + (n.length ? `,${n.length} 项未完成` : ""));
+ cj(d, t), le(t), n.forEach(([e, t]) => R(e, t)), E(""), s(`已${e === "approved" ? "通过" : "拒绝"} ${t.length} 项` + (n.length ? `,${n.length} 项未完成` : ""));
},
onError: (e) => {
E(G(e));
@@ -48566,7 +48697,7 @@ function zve(e) {
k(e), j("");
let t = await o(e);
M.current && (k(0), j(t));
- }, ge = mde(N.mirror, l), _e = N.genre_tags || [], ve = {
+ }, ge = zde(N.mirror, l), _e = N.genre_tags || [], ve = {
openItem: i,
openEntity: a,
onReveal: he,
@@ -48574,7 +48705,7 @@ function zve(e) {
revealNote: A,
toast: s
};
- return /* @__PURE__ */ (0, H.jsx)(pA, { children: /* @__PURE__ */ (0, H.jsxs)("div", {
+ return /* @__PURE__ */ (0, H.jsx)(Pk, { children: /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-col gap-5 pb-10",
children: [
P ? /* @__PURE__ */ (0, H.jsx)(Y, {
@@ -48590,13 +48721,13 @@ function zve(e) {
}) : void 0,
children: ge
}) : null,
- /* @__PURE__ */ (0, H.jsx)(Eve, { tags: _e }),
- /* @__PURE__ */ (0, H.jsxs)(R_, {
+ /* @__PURE__ */ (0, H.jsx)(kve, { tags: _e }),
+ /* @__PURE__ */ (0, H.jsxs)(L_, {
orientation: t ? "horizontal" : "vertical",
selectedKey: d,
onSelectionChange: (e) => {
let t = String(e);
- wj(t) && ue(t);
+ ej(t) && ue(t);
},
className: "flex flex-col gap-5 review-split:flex-row-reverse review-split:items-start review-split:gap-6",
children: [/* @__PURE__ */ (0, H.jsxs)("div", {
@@ -48605,27 +48736,27 @@ function zve(e) {
children: [/* @__PURE__ */ (0, H.jsx)("h2", {
id: "reviewcategories",
children: "复核分类"
- }), /* @__PURE__ */ (0, H.jsx)(z_, {
+ }), /* @__PURE__ */ (0, H.jsx)(R_, {
"aria-labelledby": "reviewcategories",
"data-section-items": !0,
className: "flex review-split:flex-col review-split:items-stretch",
- children: Zue.map((e) => {
+ children: Sde.map((e) => {
let t = Number(N.counts[e] || 0);
- return /* @__PURE__ */ (0, H.jsxs)(B_, {
+ return /* @__PURE__ */ (0, H.jsxs)(z_, {
id: e,
- className: Lve,
- children: [Cj[e], t ? /* @__PURE__ */ (0, H.jsx)("span", {
+ className: Bve,
+ children: [$A[e], t ? /* @__PURE__ */ (0, H.jsx)("span", {
className: "tabular-nums text-caption-1-medium text-text-secondary",
children: t.toLocaleString()
}) : null]
}, e);
})
})]
- }), /* @__PURE__ */ (0, H.jsxs)(V_, {
+ }), /* @__PURE__ */ (0, H.jsxs)(B_, {
id: d,
className: "flex min-w-0 flex-1 flex-col gap-5",
children: [
- ee.length && !P ? /* @__PURE__ */ (0, H.jsx)(wve, {
+ ee.length && !P ? /* @__PURE__ */ (0, H.jsx)(Dve, {
groupOptions: F,
groupBy: ne,
onGroupBy: (e) => {
@@ -48641,7 +48772,7 @@ function zve(e) {
onSelected: b,
selectedRows: ce,
metadata: te,
- approvable: ce.every((e) => Ej(d, e)),
+ approvable: ce.every((e) => nj(d, e)),
busy: fe.isPending,
feedback: T,
onUnifySource: me,
@@ -48666,7 +48797,7 @@ function zve(e) {
})]
}) : null, /* @__PURE__ */ (0, H.jsx)("div", {
className: "review-grid gap-5",
- children: e.rows.map((e) => /* @__PURE__ */ (0, H.jsx)(Ive, {
+ children: e.rows.map((e) => /* @__PURE__ */ (0, H.jsx)(zve, {
category: d,
row: e,
choice: se(e),
@@ -48674,7 +48805,7 @@ function zve(e) {
selected: y.has(e.item_key),
onSelect: (t, n) => b((r) => {
let i = new Set(r);
- return D.current = ide(i, ie, D.current, e.item_key, t, n), i;
+ return D.current = kde(i, ie, D.current, e.item_key, t, n), i;
}),
locked: P,
busy: de.isPending && de.variables?.row.item_key === e.item_key,
@@ -48689,12 +48820,12 @@ function zve(e) {
handlers: ve
}, e.item_key))
})]
- }, e.key)) : /* @__PURE__ */ (0, H.jsx)(fA, {
- icon: Gae,
+ }, e.key)) : /* @__PURE__ */ (0, H.jsx)(Nk, {
+ icon: qae,
title: "此分类没有待复核项目",
children: "可切换分类查看其他候选。"
}),
- /* @__PURE__ */ (0, H.jsx)(Rve, {
+ /* @__PURE__ */ (0, H.jsx)(Vve, {
page: L.page,
pages: L.pages,
onPage: v
@@ -48707,30 +48838,30 @@ function zve(e) {
}
//#endregion
//#region src/react/scraping/scraping.ts
-var Bve = "/api/scraping", Vve = "/api/scraping/settings", Hve = "/api/scraping/check", EL = "/api/scraping/cover", Uve = "/api/scraping/amane-bridge", Wve = "/api/scraping/amane-bridge/check", Gve = "/api/scraping/amane-bridge/rebuild", DL = ["scraping"], OL = ["scraping", "cover"], kL = ["scraping", "amane-bridge"], AL = (e) => K(Bve, e), jL = (e) => K(EL, e), ML = (e) => K(Uve, e);
-async function Kve(e) {
+var Uve = "/api/scraping", Wve = "/api/scraping/settings", Gve = "/api/scraping/check", wL = "/api/scraping/cover", Kve = "/api/scraping/amane-bridge", qve = "/api/scraping/amane-bridge/check", Jve = "/api/scraping/amane-bridge/rebuild", TL = ["scraping"], EL = ["scraping", "cover"], DL = ["scraping", "amane-bridge"], OL = (e) => K(Uve, e), kL = (e) => K(wL, e), AL = (e) => K(Kve, e);
+async function Yve(e) {
await Promise.all([
z.fetchQuery({
- queryKey: DL,
- queryFn: () => AL(e)
+ queryKey: TL,
+ queryFn: () => OL(e)
}),
z.fetchQuery({
- queryKey: OL,
- queryFn: () => jL(e)
+ queryKey: EL,
+ queryFn: () => kL(e)
}),
z.fetchQuery({
- queryKey: kL,
- queryFn: () => ML(e)
+ queryKey: DL,
+ queryFn: () => AL(e)
})
]);
}
-function qve(e, t) {
+function Xve(e, t) {
return `${t}${e.label === "来源页面" ? "" : " 高清图片"}:${e.ok ? "可连接" : "不能连接"}` + (e.width ? ` · ${e.width} × ${e.height}` : "") + (e.message ? `。${e.message}` : "");
}
//#endregion
//#region src/react/scraping/scraping-page.tsx
-var Jve = [["peach", "Peach 代理"], ["direct", "直接连接"]], NL = [["paste", "粘贴 Cookie"], ["file", "导入文件"]];
-function PL({ source: e }) {
+var Zve = [["peach", "Peach 代理"], ["direct", "直接连接"]], jL = [["paste", "粘贴 Cookie"], ["file", "导入文件"]];
+function ML({ source: e }) {
let t = [
"javten",
"fc2ppvdb",
@@ -48748,16 +48879,16 @@ function PL({ source: e }) {
className: "size-4 shrink-0 rounded-sm object-contain"
});
}
-function Yve() {
- return /* @__PURE__ */ (0, H.jsx)(PL, { source: "github" });
+function Qve() {
+ return /* @__PURE__ */ (0, H.jsx)(ML, { source: "github" });
}
-function Xve({ source: e, toast: t }) {
- let [n, r] = (0, B.useState)(e.network), [i, a] = (0, B.useState)(""), [o, s] = (0, B.useState)(""), [c, l] = (0, B.useState)(NL[0][0]), [u, d] = (0, B.useState)(""), [f, p] = (0, B.useState)(""), m = (0, B.useRef)(null);
+function $ve({ source: e, toast: t }) {
+ let [n, r] = (0, B.useState)(e.network), [i, a] = (0, B.useState)(""), [o, s] = (0, B.useState)(""), [c, l] = (0, B.useState)(jL[0][0]), [u, d] = (0, B.useState)(""), [f, p] = (0, B.useState)(""), m = (0, B.useRef)(null);
function h() {
a(""), s(""), d(""), p(""), m.current && (m.current.value = "");
}
- let g = ww({
- mutationFn: (t) => q(Vve, {
+ let g = Sw({
+ mutationFn: (t) => q(Wve, {
source: e.source,
network: n,
cookie: i,
@@ -48765,12 +48896,12 @@ function Xve({ source: e, toast: t }) {
revoke: t
}),
onSuccess: (e, n) => {
- z.setQueryData(DL, (t) => t && {
+ z.setQueryData(TL, (t) => t && {
...t,
sources: t.sources.map((t) => t.source === e.saved.source ? e.saved : t)
}), h(), t(n ? "Cookie 已撤销" : "来源设置已保存");
}
- }), _ = ww({ mutationFn: () => q(Hve, { source: e.source }) }), v = g.isPending || _.isPending, y = (e) => {
+ }), _ = Sw({ mutationFn: () => q(Gve, { source: e.source }) }), v = g.isPending || _.isPending, y = (e) => {
e.preventDefault(), !v && (_.reset(), g.mutate(!1));
}, b = () => {
v || (_.reset(), g.mutate(!0));
@@ -48795,40 +48926,43 @@ function Xve({ source: e, toast: t }) {
}
}
let C = f || (g.error ? G(g.error) : "") || (_.error ? G(_.error) : ""), w = _.data?.results ?? [], T = n === "peach" || e.accepts_cookie || e.browser || !!C || w.length > 0;
- return /* @__PURE__ */ (0, H.jsxs)(DT, {
+ return /* @__PURE__ */ (0, H.jsxs)(TT, {
title: e.label,
onSubmit: y,
aside: /* @__PURE__ */ (0, H.jsxs)("span", {
className: "flex min-w-0 items-center gap-1",
- children: [/* @__PURE__ */ (0, H.jsx)(PL, { source: e.source }), /* @__PURE__ */ (0, H.jsx)(PT, {
+ children: [/* @__PURE__ */ (0, H.jsx)(ML, { source: e.source }), /* @__PURE__ */ (0, H.jsx)(MT, {
href: e.login,
children: e.login
})]
}),
children: [
- /* @__PURE__ */ (0, H.jsx)(OT, { children: /* @__PURE__ */ (0, H.jsx)(ET, {
+ /* @__PURE__ */ (0, H.jsxs)(ET, { children: [/* @__PURE__ */ (0, H.jsx)(wT, {
+ label: "来源性质",
+ children: e.nature || "公开页面"
+ }), /* @__PURE__ */ (0, H.jsx)(wT, {
label: "连接方式",
- children: /* @__PURE__ */ (0, H.jsx)(SA, {
+ children: /* @__PURE__ */ (0, H.jsx)(Vk, {
"aria-label": "连接方式",
selectedKey: n,
onSelectionChange: (e) => {
e !== null && r(String(e));
},
- children: Jve.map(([e, t]) => /* @__PURE__ */ (0, H.jsx)(CA, {
+ children: Zve.map(([e, t]) => /* @__PURE__ */ (0, H.jsx)(Hk, {
id: e,
children: t
}, e))
})
- }) }),
- T ? /* @__PURE__ */ (0, H.jsxs)(kT, {
+ })] }),
+ T ? /* @__PURE__ */ (0, H.jsxs)(DT, {
divided: !0,
children: [
n === "peach" ? /* @__PURE__ */ (0, H.jsx)("span", {
className: "self-start",
- children: /* @__PURE__ */ (0, H.jsx)(aT, {
+ children: /* @__PURE__ */ (0, H.jsx)(rT, {
href: "/configuration#peachProxy",
size: "small",
- trailingIcon: Lw,
+ trailingIcon: Fw,
children: "配置 Peach 代理"
})
}) : null,
@@ -48841,20 +48975,20 @@ function Xve({ source: e, toast: t }) {
className: "text-body-2-regular text-text-secondary",
children: e.cookie_saved ? "Cookie 已保存;登录是否有效要到抓取时才知道。" : "需要登录时,任选一种方式提供 Cookie。"
}),
- /* @__PURE__ */ (0, H.jsx)(uC, {
+ /* @__PURE__ */ (0, H.jsx)(EC, {
"aria-label": "提供 Cookie 的方式(二选一)",
value: c,
onChange: (e) => {
l(e), h();
},
- className: dC,
- children: NL.map(([e, t]) => /* @__PURE__ */ (0, H.jsx)(fg, {
+ className: DC,
+ children: jL.map(([e, t]) => /* @__PURE__ */ (0, H.jsx)(dg, {
value: e,
- className: fC,
+ className: OC,
children: t
}, e))
}),
- c === "paste" ? /* @__PURE__ */ (0, H.jsx)(bA, {
+ c === "paste" ? /* @__PURE__ */ (0, H.jsx)(zk, {
type: "password",
label: "Cookie",
autoComplete: "off",
@@ -48863,7 +48997,7 @@ function Xve({ source: e, toast: t }) {
}) : /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-col gap-2",
children: [
- /* @__PURE__ */ (0, H.jsx)(NT, { children: "Netscape Cookie 文件(.txt)" }),
+ /* @__PURE__ */ (0, H.jsx)(jT, { children: "Netscape Cookie 文件(.txt)" }),
/* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-wrap items-center gap-3",
children: [/* @__PURE__ */ (0, H.jsx)(J, {
@@ -48889,14 +49023,14 @@ function Xve({ source: e, toast: t }) {
]
})
] }) : null,
- C ? /* @__PURE__ */ (0, H.jsx)(MT, { children: C }) : null,
+ C ? /* @__PURE__ */ (0, H.jsx)(AT, { children: C }) : null,
w.map((t) => /* @__PURE__ */ (0, H.jsx)(Y, {
tone: t.ok ? "success" : "error",
- children: qve(t, e.label)
+ children: Xve(t, e.label)
}, t.label))
]
}) : null,
- /* @__PURE__ */ (0, H.jsxs)(AT, { children: [
+ /* @__PURE__ */ (0, H.jsxs)(OT, { children: [
e.accepts_cookie && e.cookie_saved ? /* @__PURE__ */ (0, H.jsx)(J, {
variant: "secondary",
onClick: b,
@@ -48918,26 +49052,26 @@ function Xve({ source: e, toast: t }) {
]
});
}
-function Zve({ toast: e }) {
- let [t, n] = (0, B.useState)(""), { running: r, outcome: i, start: a } = AM({
- queryKey: OL,
- queryFn: ({ signal: e }) => jL(e),
- start: () => q(EL, { code: t }),
+function eye({ toast: e }) {
+ let [t, n] = (0, B.useState)(""), { running: r, outcome: i, start: a } = oM({
+ queryKey: EL,
+ queryFn: ({ signal: e }) => kL(e),
+ start: () => q(wL, { code: t }),
onFinish: (t) => {
t.status === "complete" && e(t.result || "封面采集完成");
}
}), o = (e) => {
e.preventDefault(), !(r || a.isPending || !t.trim()) && a.mutate();
}, s = a.error ? G(a.error) : i?.status === "failed" ? i.error || "采集未取得" : "";
- return /* @__PURE__ */ (0, H.jsx)(DT, {
+ return /* @__PURE__ */ (0, H.jsx)(TT, {
title: "高清封面",
onSubmit: o,
- children: /* @__PURE__ */ (0, H.jsxs)(kT, { children: [
+ children: /* @__PURE__ */ (0, H.jsxs)(DT, { children: [
/* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-wrap items-end gap-2",
children: [/* @__PURE__ */ (0, H.jsx)("div", {
className: "min-w-0 flex-1",
- children: /* @__PURE__ */ (0, H.jsx)(bA, {
+ children: /* @__PURE__ */ (0, H.jsx)(zk, {
"aria-label": "馆藏番号",
isRequired: !0,
isDisabled: r,
@@ -48952,7 +49086,7 @@ function Zve({ toast: e }) {
children: "抓取封面"
})]
}),
- r ? /* @__PURE__ */ (0, H.jsx)(bT, { label: "正在抓取封面" }) : null,
+ r ? /* @__PURE__ */ (0, H.jsx)(vT, { label: "正在抓取封面" }) : null,
s ? /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "error",
children: s
@@ -48964,11 +49098,11 @@ function Zve({ toast: e }) {
] })
});
}
-function Qve({ toast: e }) {
- let { query: t, running: n, outcome: r, start: i } = AM({
- queryKey: kL,
- queryFn: ({ signal: e }) => ML(e),
- start: () => q(Gve, {}),
+function tye({ toast: e }) {
+ let { query: t, running: n, outcome: r, start: i } = oM({
+ queryKey: DL,
+ queryFn: ({ signal: e }) => AL(e),
+ start: () => q(Jve, {}),
jobOf: (e) => e.job,
withJob: (e, t) => e && {
...e,
@@ -48977,45 +49111,45 @@ function Qve({ toast: e }) {
onFinish: (t) => {
t.status === "complete" && e(t.result || "amane 桥已重建");
}
- }), a = ww({ mutationFn: () => q(Wve, {}) }), o = t.data;
- if (!o) return t.error ? /* @__PURE__ */ (0, H.jsx)(DT, {
+ }), a = Sw({ mutationFn: () => q(qve, {}) }), o = t.data;
+ if (!o) return t.error ? /* @__PURE__ */ (0, H.jsx)(TT, {
title: "amane",
- children: /* @__PURE__ */ (0, H.jsx)(kT, { children: /* @__PURE__ */ (0, H.jsx)(Y, {
+ children: /* @__PURE__ */ (0, H.jsx)(DT, { children: /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "error",
children: G(t.error)
}) })
}) : null;
let s = n || i.isPending || a.isPending, c = i.error ? G(i.error) : a.error ? G(a.error) : r?.status === "failed" ? r.error || "重建未完成" : "";
- return /* @__PURE__ */ (0, H.jsxs)(DT, {
+ return /* @__PURE__ */ (0, H.jsxs)(TT, {
title: "amane",
- aside: /* @__PURE__ */ (0, H.jsx)(PT, {
+ aside: /* @__PURE__ */ (0, H.jsx)(MT, {
href: o.repository,
- leadingIcon: Yve,
+ leadingIcon: Qve,
children: o.repository
}),
children: [
- /* @__PURE__ */ (0, H.jsxs)(FT, { children: [
- /* @__PURE__ */ (0, H.jsx)(IT, {
+ /* @__PURE__ */ (0, H.jsxs)(NT, { children: [
+ /* @__PURE__ */ (0, H.jsx)(PT, {
term: "已安装版本",
children: o.installed_version || "未安装"
}),
- /* @__PURE__ */ (0, H.jsx)(IT, {
+ /* @__PURE__ */ (0, H.jsx)(PT, {
term: "上游最新版本",
children: a.data?.latest ?? "尚未检查"
}),
- /* @__PURE__ */ (0, H.jsx)(IT, {
+ /* @__PURE__ */ (0, H.jsx)(PT, {
term: "运行环境",
children: o.installed ? "已安装" : "未安装"
}),
- /* @__PURE__ */ (0, H.jsx)(IT, {
+ /* @__PURE__ */ (0, H.jsx)(PT, {
term: "内置站点",
children: o.sites.map((e) => e.label).join("、")
})
] }),
- /* @__PURE__ */ (0, H.jsxs)(kT, {
+ /* @__PURE__ */ (0, H.jsxs)(DT, {
divided: !0,
children: [
- /* @__PURE__ */ (0, H.jsxs)(jT, { children: [
+ /* @__PURE__ */ (0, H.jsxs)(kT, { children: [
"已安装版本:",
o.installed_version || "未安装",
"。amane(",
@@ -49024,7 +49158,7 @@ function Qve({ toast: e }) {
o.version,
" 版本,不随上游自动升级。"
] }),
- n ? /* @__PURE__ */ (0, H.jsx)(bT, { label: "正在重建运行环境" }) : null,
+ n ? /* @__PURE__ */ (0, H.jsx)(vT, { label: "正在重建运行环境" }) : null,
c ? /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "error",
children: c
@@ -49035,7 +49169,7 @@ function Qve({ toast: e }) {
}) : null
]
}),
- /* @__PURE__ */ (0, H.jsxs)(AT, { children: [/* @__PURE__ */ (0, H.jsx)(J, {
+ /* @__PURE__ */ (0, H.jsxs)(OT, { children: [/* @__PURE__ */ (0, H.jsx)(J, {
variant: "secondary",
onClick: () => {
s || a.mutate();
@@ -49052,23 +49186,23 @@ function Qve({ toast: e }) {
]
});
}
-function $ve({ toast: e }) {
- let t = xw({
- queryKey: DL,
- queryFn: ({ signal: e }) => AL(e)
+function nye({ toast: e }) {
+ let t = yw({
+ queryKey: TL,
+ queryFn: ({ signal: e }) => OL(e)
}), n = t.data;
- return n ? /* @__PURE__ */ (0, H.jsxs)(pA, { children: [
+ return n ? /* @__PURE__ */ (0, H.jsxs)(Pk, { children: [
/* @__PURE__ */ (0, H.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
children: "高清图片可能要经代理才能下载,先检查连接。"
}),
- /* @__PURE__ */ (0, H.jsx)(Zve, { toast: e }),
- (n.sources || []).map((t) => /* @__PURE__ */ (0, H.jsx)(Xve, {
+ /* @__PURE__ */ (0, H.jsx)(eye, { toast: e }),
+ (n.sources || []).map((t) => /* @__PURE__ */ (0, H.jsx)($ve, {
source: t,
toast: e
}, t.source)),
- /* @__PURE__ */ (0, H.jsx)(Qve, { toast: e })
- ] }) : /* @__PURE__ */ (0, H.jsx)(pA, { children: /* @__PURE__ */ (0, H.jsx)(Y, {
+ /* @__PURE__ */ (0, H.jsx)(tye, { toast: e })
+ ] }) : /* @__PURE__ */ (0, H.jsx)(Pk, { children: /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "error",
title: "采集来源读取失败",
children: t.error ? G(t.error) : "读取采集来源失败"
@@ -49076,24 +49210,24 @@ function $ve({ toast: e }) {
}
//#endregion
//#region src/configuration-endpoints.ts
-var FL = "/api/configuration", eye = "/api/pick-folder", IL = ["configuration"], LL = (e) => K(FL, e);
-async function RL(e) {
+var NL = "/api/configuration", rye = "/api/pick-folder", PL = ["configuration"], FL = (e) => K(NL, e);
+async function IL(e) {
await z.fetchQuery({
- queryKey: IL,
- queryFn: () => LL(e)
+ queryKey: PL,
+ queryFn: () => FL(e)
});
}
//#endregion
//#region src/configuration-copy.ts
-var tye = "JavDB 或 MISSAV 无法访问时,可填写能访问的镜像域名,Peach 会保留人物页路径。 资料页只显示已有站点身份记录的入口;JavDB 和 MISSAV 还要求有 JAV 目录站记录。 缺少这些记录的 FC2 创作者不会显示这两个入口。", nye = "仅填域名;留空使用默认地址";
+var iye = "JavDB 或 MISSAV 无法访问时,可填写能访问的镜像域名,Peach 会保留人物页路径。 资料页只显示已有站点身份记录的入口;JavDB 和 MISSAV 还要求有 JAV 目录站记录。 缺少这些记录的 FC2 创作者不会显示这两个入口。", aye = "仅填域名;留空使用默认地址";
//#endregion
//#region src/react/settings/entry-links-settings.tsx
-function rye({ initial: e, receipt: t }) {
- let [n, r] = (0, B.useState)(e.sites), i = vT(), a = (e, t) => r((n) => n.map((n) => n.key === e ? {
+function oye({ initial: e, receipt: t }) {
+ let [n, r] = (0, B.useState)(e.sites), i = gT(), a = (e, t) => r((n) => n.map((n) => n.key === e ? {
...n,
host: t
} : n));
- return /* @__PURE__ */ (0, H.jsxs)(DT, {
+ return /* @__PURE__ */ (0, H.jsxs)(TT, {
title: "外部入口",
onSubmit: (e) => {
e.preventDefault();
@@ -49102,9 +49236,9 @@ function rye({ initial: e, receipt: t }) {
r(e.sites), t("已保存配置");
});
},
- children: [/* @__PURE__ */ (0, H.jsxs)(kT, { children: [
- /* @__PURE__ */ (0, H.jsx)(jT, { children: tye }),
- n.map((e) => /* @__PURE__ */ (0, H.jsx)(bA, {
+ children: [/* @__PURE__ */ (0, H.jsxs)(DT, { children: [
+ /* @__PURE__ */ (0, H.jsx)(kT, { children: iye }),
+ n.map((e) => /* @__PURE__ */ (0, H.jsx)(zk, {
id: `entry-link-${e.key}`,
label: `${e.label} 地址`,
autoComplete: "off",
@@ -49113,10 +49247,10 @@ function rye({ initial: e, receipt: t }) {
placeholder: e.default_host,
onChange: (t) => a(e.key, t),
validationBehavior: "aria",
- hint: nye
+ hint: aye
}, e.key)),
- i.error ? /* @__PURE__ */ (0, H.jsx)(MT, { children: i.error }) : null
- ] }), /* @__PURE__ */ (0, H.jsx)(AT, { children: /* @__PURE__ */ (0, H.jsx)(J, {
+ i.error ? /* @__PURE__ */ (0, H.jsx)(AT, { children: i.error }) : null
+ ] }), /* @__PURE__ */ (0, H.jsx)(OT, { children: /* @__PURE__ */ (0, H.jsx)(J, {
type: "submit",
...X(i.busy === "save"),
children: "保存配置"
@@ -49125,21 +49259,21 @@ function rye({ initial: e, receipt: t }) {
}
//#endregion
//#region src/react/settings/general-settings.tsx
-function iye({ data: e, receipt: t }) {
+function sye({ data: e, receipt: t }) {
return /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-col gap-6",
- children: [e.startup ? /* @__PURE__ */ (0, H.jsx)(aye, {
+ children: [e.startup ? /* @__PURE__ */ (0, H.jsx)(cye, {
startup: e.startup,
receipt: t
- }) : null, e.entry_links ? /* @__PURE__ */ (0, H.jsx)(rye, {
+ }) : null, e.entry_links ? /* @__PURE__ */ (0, H.jsx)(oye, {
initial: e.entry_links,
receipt: t
}) : null]
});
}
-function aye({ startup: e, receipt: t }) {
- let [n, r] = (0, B.useState)(e.enabled), [i, a] = (0, B.useState)(e.silent), [o, s] = (0, B.useState)(e.desktop), c = vT(), l = e.available && !e.desktop_message;
- return /* @__PURE__ */ (0, H.jsxs)(DT, {
+function cye({ startup: e, receipt: t }) {
+ let [n, r] = (0, B.useState)(e.enabled), [i, a] = (0, B.useState)(e.silent), [o, s] = (0, B.useState)(e.desktop), c = gT(), l = e.available && !e.desktop_message;
+ return /* @__PURE__ */ (0, H.jsxs)(TT, {
title: "开机自启",
onSubmit: (r) => {
r.preventDefault(), e.available && c.run("save", (e) => q("/api/configuration/startup", {
@@ -49149,30 +49283,30 @@ function aye({ startup: e, receipt: t }) {
}, "POST", e), () => t("已保存配置"));
},
children: [
- /* @__PURE__ */ (0, H.jsxs)(OT, { children: [
- /* @__PURE__ */ (0, H.jsx)(ET, {
+ /* @__PURE__ */ (0, H.jsxs)(ET, { children: [
+ /* @__PURE__ */ (0, H.jsx)(wT, {
label: "开机后启动 Peach",
- children: /* @__PURE__ */ (0, H.jsx)(LI, {
+ children: /* @__PURE__ */ (0, H.jsx)(FI, {
"aria-label": "开机后启动 Peach",
isSelected: n,
isDisabled: !e.available,
onChange: r
})
}),
- /* @__PURE__ */ (0, H.jsx)(ET, {
+ /* @__PURE__ */ (0, H.jsx)(wT, {
label: "静默启动",
description: "开机后只显示托盘图标,不打开网页;「开机后启动 Peach」打开时生效。",
- children: /* @__PURE__ */ (0, H.jsx)(LI, {
+ children: /* @__PURE__ */ (0, H.jsx)(FI, {
"aria-label": "静默启动",
isSelected: i,
isDisabled: !e.available || !n,
onChange: a
})
}),
- /* @__PURE__ */ (0, H.jsx)(ET, {
+ /* @__PURE__ */ (0, H.jsx)(wT, {
label: "在桌面创建快捷方式",
description: e.desktop_message || "双击图标打开 Peach 网页;卸载时一并移除。",
- children: /* @__PURE__ */ (0, H.jsx)(LI, {
+ children: /* @__PURE__ */ (0, H.jsx)(FI, {
"aria-label": "在桌面创建快捷方式",
isSelected: o,
isDisabled: !l,
@@ -49180,11 +49314,11 @@ function aye({ startup: e, receipt: t }) {
})
})
] }),
- e.message || c.error ? /* @__PURE__ */ (0, H.jsxs)(kT, {
+ e.message || c.error ? /* @__PURE__ */ (0, H.jsxs)(DT, {
divided: !0,
- children: [e.message ? /* @__PURE__ */ (0, H.jsx)(jT, { children: e.message }) : null, c.error ? /* @__PURE__ */ (0, H.jsx)(MT, { children: c.error }) : null]
+ children: [e.message ? /* @__PURE__ */ (0, H.jsx)(kT, { children: e.message }) : null, c.error ? /* @__PURE__ */ (0, H.jsx)(AT, { children: c.error }) : null]
}) : null,
- /* @__PURE__ */ (0, H.jsx)(AT, { children: /* @__PURE__ */ (0, H.jsx)(J, {
+ /* @__PURE__ */ (0, H.jsx)(OT, { children: /* @__PURE__ */ (0, H.jsx)(J, {
type: "submit",
disabled: !e.available,
...X(c.busy === "save"),
@@ -49195,23 +49329,23 @@ function aye({ startup: e, receipt: t }) {
}
//#endregion
//#region src/react/settings/release-updates.tsx
-var zL = /* @__PURE__ */ new Set([
+var LL = /* @__PURE__ */ new Set([
"downloading",
"verifying",
"extracting",
"preparing",
"restarting",
"installing"
-]), oye = [
+]), lye = [
65,
67,
90
-], BL = 120;
-function sye({ initial: e, initialJob: t }) {
+], RL = 120;
+function uye({ initial: e, initialJob: t }) {
let [n, i] = (0, B.useState)(e), [a, o] = (0, B.useState)(t || {
state: "idle",
progress: 0
- }), [s, c] = (0, B.useState)(""), l = vT(), u = (0, B.useRef)(!1), d = (0, B.useRef)(!0), f = zL.has(a.state);
+ }), [s, c] = (0, B.useState)(""), l = gT(), u = (0, B.useRef)(!1), d = (0, B.useRef)(!0), f = LL.has(a.state);
(0, B.useEffect)(() => (d.current = !0, () => {
d.current = !1;
}), []);
@@ -49228,7 +49362,7 @@ function sye({ initial: e, initialJob: t }) {
(0, B.useEffect)(() => {
a.state !== "ready" || u.current || (u.current = !0, m());
}, [a.state]), (0, B.useEffect)(() => {
- let e = new AbortController(), t = zL.has(a.state) ? 1e3 : 3e4, n, r = 0, s = async () => {
+ let e = new AbortController(), t = LL.has(a.state) ? 1e3 : 3e4, n, r = 0, s = async () => {
try {
let t = await K("/api/configuration/update-status", e.signal);
if (e.signal.aborted) return;
@@ -49241,9 +49375,9 @@ function sye({ initial: e, initialJob: t }) {
let n = await K("/api/configuration/automatic-updates", e.signal);
!e.signal.aborted && n.result && i(n.result);
} catch {
- r += 1, r >= BL && !e.signal.aborted && c("尚未连接到 Peach,请检查托盘后刷新页面。");
+ r += 1, r >= RL && !e.signal.aborted && c("尚未连接到 Peach,请检查托盘后刷新页面。");
}
- !e.signal.aborted && r < BL && (n = setTimeout(s, t));
+ !e.signal.aborted && r < RL && (n = setTimeout(s, t));
};
return n = setTimeout(s, t), () => {
e.abort(), clearTimeout(n);
@@ -49257,57 +49391,57 @@ function sye({ initial: e, initialJob: t }) {
state: "error"
}), l.setError(G(t));
}), _ = l.error || s, v = a.state === "downloading" && a.total ? `${((a.downloaded || 0) / 1048576).toFixed(1)} / ${(a.total / 1048576).toFixed(1)} MB` : `${a.progress}%`;
- return /* @__PURE__ */ (0, H.jsxs)(DT, {
+ return /* @__PURE__ */ (0, H.jsxs)(TT, {
title: "检查更新",
children: [
- /* @__PURE__ */ (0, H.jsxs)(FT, { children: [
- /* @__PURE__ */ (0, H.jsx)(IT, {
+ /* @__PURE__ */ (0, H.jsxs)(NT, { children: [
+ /* @__PURE__ */ (0, H.jsx)(PT, {
term: "当前版本",
children: n.current_version
}),
- /* @__PURE__ */ (0, H.jsx)(IT, {
+ /* @__PURE__ */ (0, H.jsx)(PT, {
term: "安装方式",
children: n.installation
}),
- /* @__PURE__ */ (0, H.jsx)(IT, {
+ /* @__PURE__ */ (0, H.jsx)(PT, {
term: "更新通道",
children: n.channel
}),
- /* @__PURE__ */ (0, H.jsx)(IT, {
+ /* @__PURE__ */ (0, H.jsx)(PT, {
term: "最新版本",
children: n.latest_version || (n.state === "unchecked" ? "尚未检查" : "未取得")
})
] }),
- /* @__PURE__ */ (0, H.jsxs)(kT, {
+ /* @__PURE__ */ (0, H.jsxs)(DT, {
divided: !0,
children: [
- n.checked_at ? /* @__PURE__ */ (0, H.jsxs)(jT, { children: ["检查于 ", (/* @__PURE__ */ new Date(n.checked_at * 1e3)).toLocaleString()] }) : null,
+ n.checked_at ? /* @__PURE__ */ (0, H.jsxs)(kT, { children: ["检查于 ", (/* @__PURE__ */ new Date(n.checked_at * 1e3)).toLocaleString()] }) : null,
n.state === "available" && !_ ? /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "info",
title: "有可用更新",
children: n.message
- }) : _ || n.state === "error" ? /* @__PURE__ */ (0, H.jsx)(MT, { children: _ || n.message }) : /* @__PURE__ */ (0, H.jsx)(jT, {
+ }) : _ || n.state === "error" ? /* @__PURE__ */ (0, H.jsx)(AT, { children: _ || n.message }) : /* @__PURE__ */ (0, H.jsx)(kT, {
role: "status",
children: n.message
}),
- a.state === "error" ? /* @__PURE__ */ (0, H.jsx)(MT, { children: a.message }) : null,
+ a.state === "error" ? /* @__PURE__ */ (0, H.jsx)(AT, { children: a.message }) : null,
a.state !== "idle" && a.state !== "error" ? /* @__PURE__ */ (0, H.jsxs)("div", {
"aria-live": "polite",
className: "flex flex-col gap-2",
children: [
- /* @__PURE__ */ (0, H.jsx)(ST, {
+ /* @__PURE__ */ (0, H.jsx)(bT, {
label: "更新准备进度",
value: a.progress,
- stops: oye
+ stops: lye
}),
- /* @__PURE__ */ (0, H.jsxs)(jT, { children: ["下载 → 校验 → 解压 → 准备安装 · ", a.message] }),
- /* @__PURE__ */ (0, H.jsx)(jT, { children: v })
+ /* @__PURE__ */ (0, H.jsxs)(kT, { children: ["下载 → 校验 → 解压 → 准备安装 · ", a.message] }),
+ /* @__PURE__ */ (0, H.jsx)(kT, { children: v })
]
}) : null
]
}),
- /* @__PURE__ */ (0, H.jsxs)(AT, {
- status: /* @__PURE__ */ (0, H.jsx)(PT, {
+ /* @__PURE__ */ (0, H.jsxs)(OT, {
+ status: /* @__PURE__ */ (0, H.jsx)(MT, {
href: n.release_url,
children: "查看发布页"
}),
@@ -49334,98 +49468,98 @@ function sye({ initial: e, initialJob: t }) {
}
//#endregion
//#region src/react/settings/maintenance-settings.tsx
-var cye = [
+var dye = [
["6", "每 6 小时"],
["24", "每天"],
["168", "每周"]
];
-function lye({ data: e, receipt: t, reopenTutorial: n }) {
+function fye({ data: e, receipt: t, reopenTutorial: n }) {
return /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-col gap-6",
children: [
- e.automatic_updates ? /* @__PURE__ */ (0, H.jsx)(dye, {
+ e.automatic_updates ? /* @__PURE__ */ (0, H.jsx)(mye, {
initial: e.automatic_updates,
receipt: t
}) : null,
- e.updates ? /* @__PURE__ */ (0, H.jsx)(sye, {
+ e.updates ? /* @__PURE__ */ (0, H.jsx)(uye, {
initial: e.updates,
initialJob: e.update_job
}) : null,
- /* @__PURE__ */ (0, H.jsx)(fye, { facts: e.facts }),
- /* @__PURE__ */ (0, H.jsx)(uye, {
+ /* @__PURE__ */ (0, H.jsx)(hye, { facts: e.facts }),
+ /* @__PURE__ */ (0, H.jsx)(pye, {
receipt: t,
reopenTutorial: n
}),
- e.uninstall ? /* @__PURE__ */ (0, H.jsx)(pye, {
+ e.uninstall ? /* @__PURE__ */ (0, H.jsx)(gye, {
uninstall: e.uninstall,
receipt: t
}) : null
]
});
}
-function uye({ receipt: e, reopenTutorial: t }) {
- let n = vT();
- return /* @__PURE__ */ (0, H.jsxs)(DT, {
+function pye({ receipt: e, reopenTutorial: t }) {
+ let n = gT();
+ return /* @__PURE__ */ (0, H.jsxs)(TT, {
title: "安装教程",
- children: [/* @__PURE__ */ (0, H.jsxs)(kT, { children: [/* @__PURE__ */ (0, H.jsx)(jT, { children: "重新显示已关闭或跳过的安装步骤,保留已完成的记录。" }), n.error ? /* @__PURE__ */ (0, H.jsx)(MT, { children: n.error }) : null] }), /* @__PURE__ */ (0, H.jsx)(AT, { children: /* @__PURE__ */ (0, H.jsx)(J, {
+ children: [/* @__PURE__ */ (0, H.jsxs)(DT, { children: [/* @__PURE__ */ (0, H.jsx)(kT, { children: "重新显示已关闭或跳过的安装步骤,保留已完成的记录。" }), n.error ? /* @__PURE__ */ (0, H.jsx)(AT, { children: n.error }) : null] }), /* @__PURE__ */ (0, H.jsx)(OT, { children: /* @__PURE__ */ (0, H.jsx)(J, {
onClick: () => void n.run("reopen", () => t(), () => e("已重新打开安装教程")),
...X(n.busy === "reopen"),
children: "重新打开教程"
}) })]
});
}
-function dye({ initial: e, receipt: t }) {
- let [n, r] = (0, B.useState)(e.mode), [i, a] = (0, B.useState)(e.interval_hours), o = vT(e.error), s = (r) => {
+function mye({ initial: e, receipt: t }) {
+ let [n, r] = (0, B.useState)(e.mode), [i, a] = (0, B.useState)(e.interval_hours), o = gT(e.error), s = (r) => {
r.preventDefault(), e.available && o.run("save", (e) => q("/api/configuration/automatic-updates", {
mode: n,
interval_hours: i
}, "POST", e), () => t("已保存配置"));
}, c = e.available ? e.download_available ? "开启后一分钟内开始检查。下载完成后,在此确认重启安装。" : "开启后一分钟内开始检查。源码运行时在发布页获取新版本。" : "自动更新需要由托盘管理的服务。";
- return /* @__PURE__ */ (0, H.jsxs)(DT, {
+ return /* @__PURE__ */ (0, H.jsxs)(TT, {
title: "自动更新",
onSubmit: s,
children: [
- /* @__PURE__ */ (0, H.jsxs)(OT, { children: [
- /* @__PURE__ */ (0, H.jsx)(ET, {
+ /* @__PURE__ */ (0, H.jsxs)(ET, { children: [
+ /* @__PURE__ */ (0, H.jsx)(wT, {
label: "自动检查新版本",
- children: /* @__PURE__ */ (0, H.jsx)(LI, {
+ children: /* @__PURE__ */ (0, H.jsx)(FI, {
"aria-label": "自动检查新版本",
isSelected: n !== "off",
isDisabled: !e.available,
onChange: (e) => r(e ? "check" : "off")
})
}),
- /* @__PURE__ */ (0, H.jsx)(ET, {
+ /* @__PURE__ */ (0, H.jsx)(wT, {
label: "自动下载更新",
- children: /* @__PURE__ */ (0, H.jsx)(LI, {
+ children: /* @__PURE__ */ (0, H.jsx)(FI, {
"aria-label": "自动下载更新",
isSelected: n === "download",
isDisabled: !e.available || !e.download_available || n === "off",
onChange: (e) => r(e ? "download" : "check")
})
}),
- /* @__PURE__ */ (0, H.jsx)(ET, {
+ /* @__PURE__ */ (0, H.jsx)(wT, {
label: "检查频率",
description: c,
- children: /* @__PURE__ */ (0, H.jsx)(SA, {
+ children: /* @__PURE__ */ (0, H.jsx)(Vk, {
"aria-label": "检查频率",
selectedKey: String(i),
isDisabled: !e.available,
onSelectionChange: (e) => {
e !== null && a(Number(e));
},
- children: cye.map(([e, t]) => /* @__PURE__ */ (0, H.jsx)(CA, {
+ children: dye.map(([e, t]) => /* @__PURE__ */ (0, H.jsx)(Hk, {
id: e,
children: t
}, e))
})
})
] }),
- o.error ? /* @__PURE__ */ (0, H.jsx)(kT, {
+ o.error ? /* @__PURE__ */ (0, H.jsx)(DT, {
divided: !0,
- children: /* @__PURE__ */ (0, H.jsx)(MT, { children: o.error })
+ children: /* @__PURE__ */ (0, H.jsx)(AT, { children: o.error })
}) : null,
- /* @__PURE__ */ (0, H.jsx)(AT, { children: /* @__PURE__ */ (0, H.jsx)(J, {
+ /* @__PURE__ */ (0, H.jsx)(OT, { children: /* @__PURE__ */ (0, H.jsx)(J, {
type: "submit",
disabled: !e.available,
...X(o.busy === "save"),
@@ -49434,19 +49568,19 @@ function dye({ initial: e, receipt: t }) {
]
});
}
-function fye({ facts: e }) {
- return /* @__PURE__ */ (0, H.jsx)(DT, {
+function hye({ facts: e }) {
+ return /* @__PURE__ */ (0, H.jsx)(TT, {
title: "运行信息",
- children: /* @__PURE__ */ (0, H.jsx)(FT, { children: e.map((e) => /* @__PURE__ */ (0, H.jsxs)(IT, {
+ children: /* @__PURE__ */ (0, H.jsx)(NT, { children: e.map((e) => /* @__PURE__ */ (0, H.jsxs)(PT, {
term: e.term,
- children: [e.value, e.download_url ? /* @__PURE__ */ (0, H.jsx)(PT, {
+ children: [e.value, e.download_url ? /* @__PURE__ */ (0, H.jsx)(MT, {
href: e.download_url,
children: e.download_label
}) : null]
}, e.term)) })
});
}
-function pye({ uninstall: e, receipt: t }) {
+function gye({ uninstall: e, receipt: t }) {
let [n, i] = (0, B.useState)(!1), [a, o] = (0, B.useState)(""), s = () => void r({
title: "卸载 Peach",
danger: !0,
@@ -49460,26 +49594,26 @@ function pye({ uninstall: e, receipt: t }) {
o(e.message);
}
}), c = a || e.message, l = [.../* @__PURE__ */ new Set([e.data_root, ...e.directories])];
- return /* @__PURE__ */ (0, H.jsxs)(DT, {
+ return /* @__PURE__ */ (0, H.jsxs)(TT, {
id: "uninstallPeach",
title: "卸载 Peach",
- children: [/* @__PURE__ */ (0, H.jsxs)(kT, { children: [
- e.available ? /* @__PURE__ */ (0, H.jsx)(jT, { children: "卸载移除 Peach 程序本身,原始媒体文件保留。" }) : null,
- /* @__PURE__ */ (0, H.jsx)(PM, {
+ children: [/* @__PURE__ */ (0, H.jsxs)(DT, { children: [
+ e.available ? /* @__PURE__ */ (0, H.jsx)(kT, { children: "卸载移除 Peach 程序本身,原始媒体文件保留。" }) : null,
+ /* @__PURE__ */ (0, H.jsx)(uM, {
isSelected: n,
isDisabled: !e.full_available || !!a,
onChange: i,
children: "完全卸载:同时删除设置、本地数据库、观看记录、凭据和缓存"
}),
- /* @__PURE__ */ (0, H.jsx)(LT, {
+ /* @__PURE__ */ (0, H.jsx)(FT, {
summary: "数据目录",
- children: l.map((e) => /* @__PURE__ */ (0, H.jsx)(yT, {
+ children: l.map((e) => /* @__PURE__ */ (0, H.jsx)(_T, {
path: e,
className: "text-body-2-regular text-text-secondary",
onRevealed: t
}, e))
})
- ] }), /* @__PURE__ */ (0, H.jsx)(AT, {
+ ] }), /* @__PURE__ */ (0, H.jsx)(OT, {
status: c ? /* @__PURE__ */ (0, H.jsx)("p", {
role: a ? "status" : void 0,
children: c
@@ -49495,7 +49629,7 @@ function pye({ uninstall: e, receipt: t }) {
}
//#endregion
//#region src/react/settings/clouddrive-guide.tsx
-var mye = [
+var _ye = [
{
name: "机械硬盘,或内存 8 GB 以内",
cache: "10–20 GiB",
@@ -49514,32 +49648,32 @@ var mye = [
read: "256 / 128 KB",
task: "2 个起步"
}
-], hye = [
+], vye = [
["cache", "缓存上限"],
["read", "读取长度(默认 / 最小)"],
["task", "同时处理视频"]
];
-function gye() {
+function yye() {
return /* @__PURE__ */ (0, H.jsxs)("div", {
className: "@container flex flex-col gap-3",
- children: [/* @__PURE__ */ (0, H.jsxs)(jT, { children: ["先在 CloudDrive 登录网盘并挂载,开启「启动时自动挂载」。", /* @__PURE__ */ (0, H.jsx)(PT, {
+ children: [/* @__PURE__ */ (0, H.jsxs)(kT, { children: ["先在 CloudDrive 登录网盘并挂载,开启「启动时自动挂载」。", /* @__PURE__ */ (0, H.jsx)(MT, {
href: "https://www.clouddrive2.com/help.html",
children: "挂载帮助"
- })] }), /* @__PURE__ */ (0, H.jsxs)(LT, {
+ })] }), /* @__PURE__ */ (0, H.jsxs)(FT, {
summary: "CloudDrive 缓存建议",
children: [
- /* @__PURE__ */ (0, H.jsx)(jT, { children: "按缓存所在硬盘和可用内存选择起步值,再根据播放表现调整。" }),
+ /* @__PURE__ */ (0, H.jsx)(kT, { children: "按缓存所在硬盘和可用内存选择起步值,再根据播放表现调整。" }),
/* @__PURE__ */ (0, H.jsx)("ul", {
"aria-label": "按缓存所在硬盘分档",
className: "flex flex-col gap-2",
- children: mye.map((e) => /* @__PURE__ */ (0, H.jsxs)("li", {
+ children: _ye.map((e) => /* @__PURE__ */ (0, H.jsxs)("li", {
className: "flex flex-col gap-2 rounded-2lg border border-separator-border bg-background-primary-default p-3",
children: [/* @__PURE__ */ (0, H.jsx)("p", {
className: "text-body-medium text-text-primary",
children: e.name
}), /* @__PURE__ */ (0, H.jsx)("dl", {
className: "inline-grid grid-cols-1 gap-2 @md:grid-cols-3",
- children: hye.map(([t, n]) => /* @__PURE__ */ (0, H.jsxs)("div", {
+ children: vye.map(([t, n]) => /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-col",
children: [/* @__PURE__ */ (0, H.jsx)("dt", {
className: "text-caption-1-regular text-text-secondary",
@@ -49560,9 +49694,9 @@ function gye() {
/* @__PURE__ */ (0, H.jsx)("li", { children: "Buffer Cache 占内存,磁盘缓存和文件夹缓存占硬盘,改一个管不住另外两个。" })
]
}),
- /* @__PURE__ */ (0, H.jsxs)(jT, { children: [
+ /* @__PURE__ */ (0, H.jsxs)(kT, { children: [
"三处缓存的分工、往上调的方法和这些起步值的来源在",
- /* @__PURE__ */ (0, H.jsx)(PT, {
+ /* @__PURE__ */ (0, H.jsx)(MT, {
href: "https://github.com/longmeidao/peach/blob/master/docs/CLOUDDRIVE.md",
children: "CloudDrive 配置与调优"
}),
@@ -49574,15 +49708,15 @@ function gye() {
}
//#endregion
//#region src/react/settings/download-settings.tsx
-var _ye = "/api/configuration/downloads", VL = "/api/configuration/downloads/check", vye = "/api/configuration/downloads/folder", yye = "/api/configuration/downloads/pikpak/login", bye = "/api/configuration/downloads/pikpak/logout", HL = "/api/configuration/downloads/pikpak/browser-login", UL = 2e3;
-function xye({ initial: e, receipt: t }) {
+var bye = "/api/configuration/downloads", zL = "/api/configuration/downloads/check", xye = "/api/configuration/downloads/folder", Sye = "/api/configuration/downloads/pikpak/login", Cye = "/api/configuration/downloads/pikpak/logout", BL = "/api/configuration/downloads/pikpak/browser-login", VL = 2e3;
+function wye({ initial: e, receipt: t }) {
let [n, r] = (0, B.useState)(e), [i, a] = (0, B.useState)(""), o = n.pikpak.logged_in || !!i.trim();
- return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(Sye, {
+ return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(Tye, {
state: n,
settle: r,
receipt: t,
pikpakAccount: o
- }), /* @__PURE__ */ (0, H.jsx)(wye, {
+ }), /* @__PURE__ */ (0, H.jsx)(Dye, {
state: n,
settle: r,
receipt: t,
@@ -49590,8 +49724,8 @@ function xye({ initial: e, receipt: t }) {
setUsername: a
})] });
}
-function Sye({ state: e, settle: t, receipt: n, pikpakAccount: r }) {
- let [i, a] = (0, B.useState)(e.config), [o, s] = (0, B.useState)(""), [c, l] = (0, B.useState)(String(e.config.wait_hours)), [u, d] = (0, B.useState)(null), [f, p] = (0, B.useState)(""), [m, h] = (0, B.useState)(WL), [g, _] = (0, B.useState)(""), [v, y] = (0, B.useState)(!1), b = vT(), x = (e) => i.targets[e] ?? "", S = (e, t) => a({
+function Tye({ state: e, settle: t, receipt: n, pikpakAccount: r }) {
+ let [i, a] = (0, B.useState)(e.config), [o, s] = (0, B.useState)(""), [c, l] = (0, B.useState)(String(e.config.wait_hours)), [u, d] = (0, B.useState)(null), [f, p] = (0, B.useState)(""), [m, h] = (0, B.useState)(HL), [g, _] = (0, B.useState)(""), [v, y] = (0, B.useState)(!1), b = gT(), x = (e) => i.targets[e] ?? "", S = (e, t) => a({
...i,
targets: {
...i.targets,
@@ -49620,8 +49754,8 @@ function Sye({ state: e, settle: t, receipt: n, pikpakAccount: r }) {
target: !e.config.targets[115],
root: !e.config.pikpak_root
};
- b.run("auto", (e) => K(VL, e), (e) => w(e, t), (e) => _(G(e)));
- }, []), /* @__PURE__ */ (0, H.jsxs)(DT, {
+ b.run("auto", (e) => K(zL, e), (e) => w(e, t), (e) => _(G(e)));
+ }, []), /* @__PURE__ */ (0, H.jsxs)(TT, {
title: "云下载",
onSubmit: (e) => {
if (e.preventDefault(), C) {
@@ -49634,19 +49768,19 @@ function Sye({ state: e, settle: t, receipt: n, pikpakAccount: r }) {
token: o,
pikpak_account: r
};
- b.run("save", (e) => q(_ye, f, "POST", e), (e) => {
+ b.run("save", (e) => q(bye, f, "POST", e), (e) => {
let { report: r, ...i } = e;
t(i), a(i.config), l(String(i.config.wait_hours)), s(""), r ? w(r, {
address: !i.config.clouddrive_address,
target: u,
root: !i.config.pikpak_root
- }, i.config.targets[115] ?? "") : (d(null), p(""), h(WL), y(!1), _("")), n("已保存配置");
+ }, i.config.targets[115] ?? "") : (d(null), p(""), h(HL), y(!1), _("")), n("已保存配置");
}, (e) => _(G(e)));
},
children: [
- /* @__PURE__ */ (0, H.jsxs)(kT, { children: [
- /* @__PURE__ */ (0, H.jsx)(jT, { children: "把磁力交给 115 或 PikPak 离线下载,文件落在已挂载的网盘目录,再由推送发现登记入库,不经过这台电脑。 115 每个任务扣一条离线配额(年费会员每月 1500 条、月费 200 条),被判违规的资源不重试。" }),
- /* @__PURE__ */ (0, H.jsx)(bA, {
+ /* @__PURE__ */ (0, H.jsxs)(DT, { children: [
+ /* @__PURE__ */ (0, H.jsx)(kT, { children: "把磁力交给 115 或 PikPak 离线下载,文件落在已挂载的网盘目录,再由推送发现登记入库,不经过这台电脑。 115 每个任务扣一条离线配额(年费会员每月 1500 条、月费 200 条),被判违规的资源不重试。" }),
+ /* @__PURE__ */ (0, H.jsx)(zk, {
label: "CloudDrive2 地址",
placeholder: "留空自动探测本机 19798 / 29798",
autoComplete: "off",
@@ -49658,7 +49792,7 @@ function Sye({ state: e, settle: t, receipt: n, pikpakAccount: r }) {
clouddrive_address: e
})
}),
- /* @__PURE__ */ (0, H.jsx)(bA, {
+ /* @__PURE__ */ (0, H.jsx)(zk, {
label: "CloudDrive2 API 令牌",
type: "password",
autoComplete: "off",
@@ -49669,7 +49803,7 @@ function Sye({ state: e, settle: t, receipt: n, pikpakAccount: r }) {
isDisabled: !e.available,
onChange: s
}),
- /* @__PURE__ */ (0, H.jsx)(bA, {
+ /* @__PURE__ */ (0, H.jsx)(zk, {
label: "115 目标目录",
placeholder: "留空时按推送发现自动填写",
autoComplete: "off",
@@ -49681,7 +49815,7 @@ function Sye({ state: e, settle: t, receipt: n, pikpakAccount: r }) {
isDisabled: !e.available,
onChange: (e) => S("115", e)
}),
- /* @__PURE__ */ (0, H.jsx)(bA, {
+ /* @__PURE__ */ (0, H.jsx)(zk, {
label: "PikPak 目标目录",
placeholder: "以 / 开头的网盘路径",
autoComplete: "off",
@@ -49693,7 +49827,7 @@ function Sye({ state: e, settle: t, receipt: n, pikpakAccount: r }) {
}),
/* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-col gap-1",
- children: [/* @__PURE__ */ (0, H.jsx)(NT, { children: "PikPak 根目录对应的媒体文件夹" }), e.pikpak_roots.length ? /* @__PURE__ */ (0, H.jsx)(SA, {
+ children: [/* @__PURE__ */ (0, H.jsx)(jT, { children: "PikPak 根目录对应的媒体文件夹" }), e.pikpak_roots.length ? /* @__PURE__ */ (0, H.jsx)(Vk, {
"aria-label": "PikPak 根目录对应的媒体文件夹",
selectedKey: i.pikpak_root || null,
isDisabled: !e.available,
@@ -49702,13 +49836,13 @@ function Sye({ state: e, settle: t, receipt: n, pikpakAccount: r }) {
...i,
pikpak_root: e === null ? "" : String(e)
}),
- children: e.pikpak_roots.map((e) => /* @__PURE__ */ (0, H.jsx)(CA, {
+ children: e.pikpak_roots.map((e) => /* @__PURE__ */ (0, H.jsx)(Hk, {
id: e,
children: e
}, e))
- }) : /* @__PURE__ */ (0, H.jsx)(jT, { children: "媒体文件夹里还没有「CloudDrive · PikPak」来源。在上方添加 PikPak 的挂载目录后,这里才能选。" })]
+ }) : /* @__PURE__ */ (0, H.jsx)(kT, { children: "媒体文件夹里还没有「CloudDrive · PikPak」来源。在上方添加 PikPak 的挂载目录后,这里才能选。" })]
}),
- /* @__PURE__ */ (0, H.jsx)(bA, {
+ /* @__PURE__ */ (0, H.jsx)(zk, {
label: "等待上限(小时)",
type: "number",
inputMode: "numeric",
@@ -49719,11 +49853,11 @@ function Sye({ state: e, settle: t, receipt: n, pikpakAccount: r }) {
onChange: l
})
] }),
- b.busy === "auto" ? /* @__PURE__ */ (0, H.jsx)(kT, {
+ b.busy === "auto" ? /* @__PURE__ */ (0, H.jsx)(DT, {
divided: !0,
- children: /* @__PURE__ */ (0, H.jsx)(bT, { label: "正在检查 CloudDrive2" })
+ children: /* @__PURE__ */ (0, H.jsx)(vT, { label: "正在检查 CloudDrive2" })
}) : null,
- u ? /* @__PURE__ */ (0, H.jsx)(Cye, {
+ u ? /* @__PURE__ */ (0, H.jsx)(Eye, {
report: u,
detected: f,
suggested: m,
@@ -49735,7 +49869,7 @@ function Sye({ state: e, settle: t, receipt: n, pikpakAccount: r }) {
pikpak_root: i.pikpak_root,
pikpak_account: r
};
- b.run("folder", (e) => q(vye, t, "POST", e), (t) => {
+ b.run("folder", (e) => q(xye, t, "POST", e), (t) => {
d(t), h((t) => ({
...t,
target: {
@@ -49747,11 +49881,11 @@ function Sye({ state: e, settle: t, receipt: n, pikpakAccount: r }) {
} : void 0,
creating: b.busy === "folder"
}) : null,
- g || b.error ? /* @__PURE__ */ (0, H.jsx)(kT, {
+ g || b.error ? /* @__PURE__ */ (0, H.jsx)(DT, {
divided: !0,
- children: /* @__PURE__ */ (0, H.jsx)(MT, { children: g || b.error })
+ children: /* @__PURE__ */ (0, H.jsx)(AT, { children: g || b.error })
}) : null,
- /* @__PURE__ */ (0, H.jsxs)(AT, {
+ /* @__PURE__ */ (0, H.jsxs)(OT, {
status: e.available ? void 0 : "云下载只在账本写入端可用。",
children: [/* @__PURE__ */ (0, H.jsx)(J, {
onClick: () => {
@@ -49766,7 +49900,7 @@ function Sye({ state: e, settle: t, receipt: n, pikpakAccount: r }) {
pikpak_root: i.pikpak_root,
pikpak_account: r
};
- b.run("check", (e) => q(VL, t, "POST", e), (t) => w(t, e), (e) => _(G(e)));
+ b.run("check", (e) => q(zL, t, "POST", e), (t) => w(t, e), (e) => _(G(e)));
},
disabled: !e.available,
...X(b.busy === "check"),
@@ -49781,25 +49915,25 @@ function Sye({ state: e, settle: t, receipt: n, pikpakAccount: r }) {
]
});
}
-var WL = {
+var HL = {
target: null,
root: "",
saved: !1
};
-function Cye({ report: e, detected: t, suggested: n, create: r, creating: i }) {
+function Eye({ report: e, detected: t, suggested: n, create: r, creating: i }) {
let a = n.target;
- return /* @__PURE__ */ (0, H.jsxs)(kT, {
+ return /* @__PURE__ */ (0, H.jsxs)(DT, {
divided: !0,
- children: [/* @__PURE__ */ (0, H.jsxs)(FT, { children: [
- t ? /* @__PURE__ */ (0, H.jsx)(IT, {
+ children: [/* @__PURE__ */ (0, H.jsxs)(NT, { children: [
+ t ? /* @__PURE__ */ (0, H.jsx)(PT, {
term: "CloudDrive2 地址",
children: `探测到 ${t},保存配置后生效`
}) : null,
- a?.exists ? /* @__PURE__ */ (0, H.jsx)(IT, {
+ a?.exists ? /* @__PURE__ */ (0, H.jsx)(PT, {
term: "115 目标目录",
children: n.saved ? `已按推送发现填入 ${a.path}` : `按推送发现填入 ${a.path},保存配置后生效`
}) : null,
- a && !a.exists ? /* @__PURE__ */ (0, H.jsxs)(IT, {
+ a && !a.exists ? /* @__PURE__ */ (0, H.jsxs)(PT, {
term: "115 目标目录",
children: [`${a.path} 不存在`, r ? /* @__PURE__ */ (0, H.jsx)(J, {
size: "small",
@@ -49808,49 +49942,49 @@ function Cye({ report: e, detected: t, suggested: n, create: r, creating: i }) {
children: "新建这个目录"
}) : null]
}) : null,
- n.root ? /* @__PURE__ */ (0, H.jsx)(IT, {
+ n.root ? /* @__PURE__ */ (0, H.jsx)(PT, {
term: "PikPak 根目录",
children: `按推送发现填入 ${n.root},保存配置后生效`
}) : null,
- e.permissions.length ? /* @__PURE__ */ (0, H.jsx)(IT, {
+ e.permissions.length ? /* @__PURE__ */ (0, H.jsx)(PT, {
term: "离线权限",
children: e.missing.length ? `缺少:${e.missing.join("、")}` : "齐全"
}) : null,
- e.folder ? /* @__PURE__ */ (0, H.jsx)(IT, {
+ e.folder ? /* @__PURE__ */ (0, H.jsx)(PT, {
term: "目标目录",
children: e.folder.can_offline ? `${e.folder.path} 可以离线下载` : `${e.folder.path} 不支持离线下载`
}) : null,
- e.quota ? /* @__PURE__ */ (0, H.jsx)(IT, {
+ e.quota ? /* @__PURE__ */ (0, H.jsx)(PT, {
term: "115 离线配额",
children: `本月还剩 ${e.quota.left} 条,共 ${e.quota.total} 条`
}) : null
- ] }), e.problems.map((e) => /* @__PURE__ */ (0, H.jsx)(MT, { children: e }, e))]
+ ] }), e.problems.map((e) => /* @__PURE__ */ (0, H.jsx)(AT, { children: e }, e))]
});
}
-function wye({ state: e, settle: t, receipt: n, username: r, setUsername: i }) {
- let [a, o] = (0, B.useState)(""), [s, c] = (0, B.useState)(!1), [l, u] = (0, B.useState)(""), [d, f] = (0, B.useState)(""), [p, m] = (0, B.useState)(""), h = vT(), g = e.pikpak, _ = e.pikpak_browser, v = _.state === "waiting";
+function Dye({ state: e, settle: t, receipt: n, username: r, setUsername: i }) {
+ let [a, o] = (0, B.useState)(""), [s, c] = (0, B.useState)(!1), [l, u] = (0, B.useState)(""), [d, f] = (0, B.useState)(""), [p, m] = (0, B.useState)(""), h = gT(), g = e.pikpak, _ = e.pikpak_browser, v = _.state === "waiting";
(0, B.useEffect)(() => {
if (!v) return;
let e = new AbortController(), r, i = async () => {
try {
- let r = await K(HL, e.signal);
+ let r = await K(BL, e.signal);
if (e.signal.aborted || (t(r), r.pikpak_browser.state === "done" ? n("已登录 PikPak") : r.pikpak_browser.state !== "waiting" && m(r.pikpak_browser.message), r.pikpak_browser.state !== "waiting")) return;
} catch (t) {
if (e.signal.aborted) return;
f(G(t));
}
- r = setTimeout(i, UL);
+ r = setTimeout(i, VL);
};
- return r = setTimeout(i, UL), () => {
+ return r = setTimeout(i, VL), () => {
e.abort(), clearTimeout(r);
};
}, [v]);
let y = () => {
- m(""), h.run("browser", (e) => q(HL, {}, "POST", e), (e) => {
+ m(""), h.run("browser", (e) => q(BL, {}, "POST", e), (e) => {
t(e), f("");
}, (e) => f(G(e)));
}, b = () => {
- h.run("cancel", (e) => q(`${HL}/cancel`, {}, "POST", e), (e) => {
+ h.run("cancel", (e) => q(`${BL}/cancel`, {}, "POST", e), (e) => {
t(e), f(""), m(e.pikpak_browser.message);
}, (e) => f(G(e)));
}, x = (e) => {
@@ -49860,7 +49994,7 @@ function wye({ state: e, settle: t, receipt: n, username: r, setUsername: i }) {
password: a,
remember: s
};
- h.run("login", (e) => q(yye, i, "POST", e), (e) => {
+ h.run("login", (e) => q(Sye, i, "POST", e), (e) => {
if (t(e.settings), f(""), !e.ok) {
u(e.captcha_url ?? "");
return;
@@ -49868,11 +50002,11 @@ function wye({ state: e, settle: t, receipt: n, username: r, setUsername: i }) {
u(""), o(""), n("已登录 PikPak");
}, (e) => f(G(e)));
}, S = () => {
- h.run("logout", (e) => q(bye, {}, "POST", e), (e) => {
+ h.run("logout", (e) => q(Cye, {}, "POST", e), (e) => {
t(e), f(""), n("已登出 PikPak");
}, (e) => f(G(e)));
}, C = /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [
- /* @__PURE__ */ (0, H.jsx)(bA, {
+ /* @__PURE__ */ (0, H.jsx)(zk, {
label: "账号",
placeholder: "邮箱或手机号",
autoComplete: "username",
@@ -49881,7 +50015,7 @@ function wye({ state: e, settle: t, receipt: n, username: r, setUsername: i }) {
isDisabled: !e.available,
onChange: i
}),
- /* @__PURE__ */ (0, H.jsx)(bA, {
+ /* @__PURE__ */ (0, H.jsx)(zk, {
label: "密码",
type: "password",
autoComplete: "current-password",
@@ -49890,7 +50024,7 @@ function wye({ state: e, settle: t, receipt: n, username: r, setUsername: i }) {
isDisabled: !e.available,
onChange: o
}),
- /* @__PURE__ */ (0, H.jsx)(PM, {
+ /* @__PURE__ */ (0, H.jsx)(uM, {
isSelected: s,
isDisabled: !e.available,
onChange: c,
@@ -49901,7 +50035,7 @@ function wye({ state: e, settle: t, receipt: n, username: r, setUsername: i }) {
title: "需要人机验证",
extra: /* @__PURE__ */ (0, H.jsx)("div", {
className: "pt-2",
- children: /* @__PURE__ */ (0, H.jsx)(PT, {
+ children: /* @__PURE__ */ (0, H.jsx)(MT, {
href: l,
children: "打开 PikPak 验证页"
})
@@ -49914,32 +50048,32 @@ function wye({ state: e, settle: t, receipt: n, username: r, setUsername: i }) {
...X(h.busy === "login"),
children: "登录"
}), T = _.state === "timeout" || _.state === "failed";
- return /* @__PURE__ */ (0, H.jsxs)(DT, {
+ return /* @__PURE__ */ (0, H.jsxs)(TT, {
title: "PikPak 账号",
onSubmit: x,
children: [
- g.logged_in ? /* @__PURE__ */ (0, H.jsxs)(FT, { children: [/* @__PURE__ */ (0, H.jsx)(IT, {
+ g.logged_in ? /* @__PURE__ */ (0, H.jsxs)(NT, { children: [/* @__PURE__ */ (0, H.jsx)(PT, {
term: "账号",
children: g.username || "已登录"
- }), g.method === "browser" ? /* @__PURE__ */ (0, H.jsx)(IT, {
+ }), g.method === "browser" ? /* @__PURE__ */ (0, H.jsx)(PT, {
term: "登录方式",
children: "浏览器登录,由 Peach 续期"
- }) : /* @__PURE__ */ (0, H.jsx)(IT, {
+ }) : /* @__PURE__ */ (0, H.jsx)(PT, {
term: "密码",
children: g.remember ? "已保存,登录过期时自动重新登录" : "未保存,登录过期后需要回到这里重新登录"
- })] }) : _.available ? /* @__PURE__ */ (0, H.jsxs)(kT, { children: [
- /* @__PURE__ */ (0, H.jsx)(jT, { children: "「用浏览器登录」会打开一个 Peach 专用的浏览器窗口,在里面登录 PikPak。Peach 读到登录状态后关掉窗口,之后由 Peach 续期;续期失败时回到这里重新登录。" }),
- /* @__PURE__ */ (0, H.jsx)(jT, { children: "PikPak 没有开放接口,Peach 照 PikPak 网页端的协议直连,接口变了就会报错,那时可以先复制磁力手动添加。" }),
- p ? T ? /* @__PURE__ */ (0, H.jsx)(MT, { children: p }) : /* @__PURE__ */ (0, H.jsx)(jT, {
+ })] }) : _.available ? /* @__PURE__ */ (0, H.jsxs)(DT, { children: [
+ /* @__PURE__ */ (0, H.jsx)(kT, { children: "「用浏览器登录」会打开一个 Peach 专用的浏览器窗口,在里面登录 PikPak。Peach 读到登录状态后关掉窗口,之后由 Peach 续期;续期失败时回到这里重新登录。" }),
+ /* @__PURE__ */ (0, H.jsx)(kT, { children: "PikPak 没有开放接口,Peach 照 PikPak 网页端的协议直连,接口变了就会报错,那时可以先复制磁力手动添加。" }),
+ p ? T ? /* @__PURE__ */ (0, H.jsx)(AT, { children: p }) : /* @__PURE__ */ (0, H.jsx)(kT, {
role: "status",
children: p
}) : null,
- /* @__PURE__ */ (0, H.jsx)(LT, {
+ /* @__PURE__ */ (0, H.jsx)(FT, {
summary: "用账号密码登录",
children: /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-col gap-4",
children: [
- /* @__PURE__ */ (0, H.jsx)(jT, { children: "账号密码只用来换登录令牌,令牌存在这台电脑上。" }),
+ /* @__PURE__ */ (0, H.jsx)(kT, { children: "账号密码只用来换登录令牌,令牌存在这台电脑上。" }),
C,
/* @__PURE__ */ (0, H.jsx)("div", {
className: "flex justify-end",
@@ -49948,13 +50082,13 @@ function wye({ state: e, settle: t, receipt: n, username: r, setUsername: i }) {
]
})
})
- ] }) : /* @__PURE__ */ (0, H.jsxs)(kT, { children: [/* @__PURE__ */ (0, H.jsx)(jT, { children: "PikPak 没有开放接口,Peach 照 PikPak 网页端的协议直连,接口变了就会报错,那时可以先复制磁力手动添加。账号密码只用来换登录令牌,令牌存在这台电脑上。" }), C] }),
- d || h.error ? /* @__PURE__ */ (0, H.jsx)(kT, {
+ ] }) : /* @__PURE__ */ (0, H.jsxs)(DT, { children: [/* @__PURE__ */ (0, H.jsx)(kT, { children: "PikPak 没有开放接口,Peach 照 PikPak 网页端的协议直连,接口变了就会报错,那时可以先复制磁力手动添加。账号密码只用来换登录令牌,令牌存在这台电脑上。" }), C] }),
+ d || h.error ? /* @__PURE__ */ (0, H.jsx)(DT, {
divided: !0,
- children: /* @__PURE__ */ (0, H.jsx)(MT, { children: d || h.error })
+ children: /* @__PURE__ */ (0, H.jsx)(AT, { children: d || h.error })
}) : null,
- /* @__PURE__ */ (0, H.jsx)(AT, {
- status: !g.logged_in && v ? /* @__PURE__ */ (0, H.jsx)(bT, { label: _.message || "等你在浏览器窗口里登录 PikPak" }) : null,
+ /* @__PURE__ */ (0, H.jsx)(OT, {
+ status: !g.logged_in && v ? /* @__PURE__ */ (0, H.jsx)(vT, { label: _.message || "等你在浏览器窗口里登录 PikPak" }) : null,
children: g.logged_in ? /* @__PURE__ */ (0, H.jsx)(J, {
onClick: S,
disabled: !e.available,
@@ -49977,8 +50111,105 @@ function wye({ state: e, settle: t, receipt: n, username: r, setUsername: i }) {
});
}
//#endregion
+//#region src/react/settings/indexer-settings.tsx
+var UL = "/api/configuration/indexers";
+function Oye({ receipt: e }) {
+ let t = yw({
+ queryKey: ["indexers"],
+ queryFn: ({ signal: e }) => K(UL, e)
+ });
+ return t.error ? /* @__PURE__ */ (0, H.jsx)(AT, { children: G(t.error) }) : t.data ? /* @__PURE__ */ (0, H.jsx)(kye, {
+ initial: t.data,
+ receipt: e
+ }) : null;
+}
+function kye({ initial: e, receipt: t }) {
+ let [n, r] = (0, B.useState)(e.indexers), i = gT(), a = (e, t) => r((n) => n.map((n) => n.key === e ? {
+ ...n,
+ ...t
+ } : n));
+ return /* @__PURE__ */ (0, H.jsxs)(TT, {
+ title: "资源索引器",
+ onSubmit: (e) => {
+ e.preventDefault(), i.run("save", (e) => q(UL, { indexers: n }, "POST", e), (e) => {
+ r(e.indexers), t("已保存索引器");
+ });
+ },
+ children: [/* @__PURE__ */ (0, H.jsxs)(DT, { children: [
+ /* @__PURE__ */ (0, H.jsx)(kT, { children: "用户自配索引器。填写 Prowlarr 或 Jackett 提供的 Torznab API 地址,在活动页「云下载」中按番号搜索。" }),
+ n.map((e, t) => /* @__PURE__ */ (0, H.jsxs)("div", {
+ className: "flex min-w-0 flex-col gap-4 border-t border-separator-border pt-4",
+ children: [
+ /* @__PURE__ */ (0, H.jsx)(zk, {
+ label: `索引器 ${t + 1} 名称`,
+ value: e.name,
+ maxLength: 80,
+ isDisabled: !!i.busy,
+ onChange: (t) => a(e.key, { name: t })
+ }),
+ /* @__PURE__ */ (0, H.jsx)(zk, {
+ label: `索引器 ${t + 1} API 地址`,
+ value: e.url,
+ type: "url",
+ autoComplete: "off",
+ hint: "不带 apikey 或其他查询参数。",
+ isDisabled: !!i.busy,
+ onChange: (t) => a(e.key, { url: t })
+ }),
+ /* @__PURE__ */ (0, H.jsx)(zk, {
+ label: `索引器 ${t + 1} API key`,
+ type: "password",
+ autoComplete: "new-password",
+ value: e.api_key || "",
+ hint: e.api_key_set ? "已保存;地址不变时留空保留。" : "仅保存在这台电脑。",
+ isDisabled: !!i.busy,
+ onChange: (t) => a(e.key, { api_key: t })
+ }),
+ /* @__PURE__ */ (0, H.jsx)(uM, {
+ isSelected: e.enabled,
+ isDisabled: !!i.busy,
+ onChange: (t) => a(e.key, { enabled: t }),
+ children: "启用 · 用户自配索引器"
+ }),
+ e.api_key_set ? /* @__PURE__ */ (0, H.jsx)(uM, {
+ isSelected: !!e.clear_api_key,
+ isDisabled: !!i.busy,
+ onChange: (t) => a(e.key, { clear_api_key: t }),
+ children: "清除已保存的 API key"
+ }) : null,
+ /* @__PURE__ */ (0, H.jsx)("div", { children: /* @__PURE__ */ (0, H.jsxs)(J, {
+ type: "button",
+ disabled: !!i.busy,
+ onClick: () => r(n.filter((t) => t.key !== e.key)),
+ children: ["移除索引器 ", t + 1]
+ }) })
+ ]
+ }, e.key)),
+ i.error ? /* @__PURE__ */ (0, H.jsx)(AT, { children: i.error }) : null
+ ] }), /* @__PURE__ */ (0, H.jsxs)(OT, {
+ status: "保存后生效;关闭或移除索引器会停止向它查询。",
+ children: [/* @__PURE__ */ (0, H.jsx)(J, {
+ type: "button",
+ disabled: !!i.busy || n.length >= e.max_indexers,
+ onClick: () => r([...n, {
+ key: crypto.randomUUID(),
+ name: "",
+ url: "",
+ enabled: !1,
+ api_key_set: !1
+ }]),
+ children: "添加索引器"
+ }), /* @__PURE__ */ (0, H.jsx)(J, {
+ type: "submit",
+ ...X(i.busy === "save"),
+ children: "保存配置"
+ })]
+ })]
+ });
+}
+//#endregion
//#region src/react/settings/library-icon-picker.tsx
-var GL = [
+var WL = [
["", "自动识别"],
["hard-drive", "磁盘"],
["database", "资料库"],
@@ -50022,13 +50253,13 @@ var GL = [
["star", "收藏"],
["tags", "主题"]
];
-function Tye(t) {
+function Aye(t) {
let n = t === "local" ? "" : e[t];
return n ? [n, "自动识别"] : ["hard-drive", "默认"];
}
-var KL = "auto";
-function Eye({ value: e, label: t, kind: n = "local", onChange: r }) {
- let i = (0, B.useRef)(null), [a, o] = (0, B.useState)(!1), [s, c] = (0, B.useState)(e), [l, u] = Tye(n);
+var GL = "auto";
+function jye({ value: e, label: t, kind: n = "local", onChange: r }) {
+ let i = (0, B.useRef)(null), [a, o] = (0, B.useState)(!1), [s, c] = (0, B.useState)(e), [l, u] = Aye(n);
return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(J, {
ref: i,
variant: "secondary",
@@ -50042,7 +50273,7 @@ function Eye({ value: e, label: t, kind: n = "local", onChange: r }) {
children: /* @__PURE__ */ (0, H.jsxs)("span", {
"data-icon-choice": !0,
className: "flex items-center gap-2",
- children: [/* @__PURE__ */ (0, H.jsx)(RT, { mark: e || l }), ((e) => e && GL.find(([t]) => t === e)?.[1] || u)(e)]
+ children: [/* @__PURE__ */ (0, H.jsx)(IT, { mark: e || l }), ((e) => e && WL.find(([t]) => t === e)?.[1] || u)(e)]
})
}), /* @__PURE__ */ (0, H.jsx)(nm, {
triggerRef: i,
@@ -50050,7 +50281,7 @@ function Eye({ value: e, label: t, kind: n = "local", onChange: r }) {
onOpenChange: o,
placement: "bottom start",
offset: 4,
- className: oT,
+ className: iT,
children: /* @__PURE__ */ (0, H.jsxs)(mh, {
"aria-label": `${t}候选`,
className: "flex w-72 flex-col gap-3 outline-none",
@@ -50060,17 +50291,17 @@ function Eye({ value: e, label: t, kind: n = "local", onChange: r }) {
className: "px-1 text-body-medium text-text-primary",
children: "选择媒体库图标"
}),
- /* @__PURE__ */ (0, H.jsx)(dg, {
+ /* @__PURE__ */ (0, H.jsx)(ug, {
"aria-label": "候选图标",
- value: s || KL,
- onChange: (e) => c(e === KL ? "" : e),
+ value: s || GL,
+ onChange: (e) => c(e === GL ? "" : e),
className: "inline-grid grid-cols-7 gap-1",
- children: GL.map(([e, t]) => /* @__PURE__ */ (0, H.jsx)(fg, {
- value: e || KL,
+ children: WL.map(([e, t]) => /* @__PURE__ */ (0, H.jsx)(dg, {
+ value: e || GL,
"aria-label": e ? t : u,
className: "flex h-10 cursor-pointer items-center justify-center rounded-lg text-foreground-icon-secondary outline-none hover:bg-dropdown-item-hover-background focus-visible:ring-2 focus-visible:ring-border-focus-ring data-selected:bg-dropdown-item-hover-background data-selected:text-text-primary",
- children: /* @__PURE__ */ (0, H.jsx)(RT, { mark: e || l })
- }, e || KL))
+ children: /* @__PURE__ */ (0, H.jsx)(IT, { mark: e || l })
+ }, e || GL))
}),
/* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex justify-end gap-2 border-t border-separator-border pt-2.5",
@@ -50092,15 +50323,15 @@ function Eye({ value: e, label: t, kind: n = "local", onChange: r }) {
}
//#endregion
//#region src/react/settings/push-discovery-settings.tsx
-var Dye = "/api/configuration/push-discovery", Oye = "/api/configuration/push-discovery/secret";
-function kye({ initial: e, receipt: t }) {
- let [n, r] = (0, B.useState)(e), [i, a] = (0, B.useState)(e.prefixes), [o, s] = (0, B.useState)(""), c = vT(), l = hT(), u = n.media_roots, [d, f] = (0, B.useState)(e), p = (e, n) => {
+var Mye = "/api/configuration/push-discovery", Nye = "/api/configuration/push-discovery/secret";
+function Pye({ initial: e, receipt: t }) {
+ let [n, r] = (0, B.useState)(e), [i, a] = (0, B.useState)(e.prefixes), [o, s] = (0, B.useState)(""), c = gT(), l = pT(), u = n.media_roots, [d, f] = (0, B.useState)(e), p = (e, n) => {
r(e), f(e), a(e.prefixes), s(""), t(n);
}, m = (e, t) => a((n) => n.map((n, r) => r === e ? {
...n,
...t
} : n));
- return /* @__PURE__ */ (0, H.jsxs)(DT, {
+ return /* @__PURE__ */ (0, H.jsxs)(TT, {
title: "推送发现",
onSubmit: (e) => {
e.preventDefault();
@@ -50110,14 +50341,14 @@ function kye({ initial: e, receipt: t }) {
cloud: n.cloud,
prefixes: i
};
- c.run("save", (e) => q(Dye, t, "POST", e), (e) => p(e, "已保存配置"), (e) => s(G(e)));
+ c.run("save", (e) => q(Mye, t, "POST", e), (e) => p(e, "已保存配置"), (e) => s(G(e)));
},
children: [
- /* @__PURE__ */ (0, H.jsxs)(OT, { children: [
- /* @__PURE__ */ (0, H.jsx)(ET, {
+ /* @__PURE__ */ (0, H.jsxs)(ET, { children: [
+ /* @__PURE__ */ (0, H.jsx)(wT, {
label: "新文件落地就入库",
description: "打开之后不必等下一轮扫描。定期全量扫描照常进行,漏掉的由它补上。",
- children: /* @__PURE__ */ (0, H.jsx)(LI, {
+ children: /* @__PURE__ */ (0, H.jsx)(FI, {
"aria-label": "新文件落地就入库",
isSelected: n.enabled,
isDisabled: !n.available,
@@ -50127,10 +50358,10 @@ function kye({ initial: e, receipt: t }) {
})
})
}),
- /* @__PURE__ */ (0, H.jsx)(ET, {
+ /* @__PURE__ */ (0, H.jsx)(wT, {
label: "监视本机文件夹",
description: "订阅本地来源的文件系统事件。网盘挂载不监视,因为遍历它就是走网络。",
- children: /* @__PURE__ */ (0, H.jsx)(LI, {
+ children: /* @__PURE__ */ (0, H.jsx)(FI, {
"aria-label": "监视本机文件夹",
isSelected: n.watch_local,
isDisabled: !n.available || !n.enabled,
@@ -50140,10 +50371,10 @@ function kye({ initial: e, receipt: t }) {
})
})
}),
- /* @__PURE__ */ (0, H.jsx)(ET, {
+ /* @__PURE__ */ (0, H.jsx)(wT, {
label: "接收 CloudDrive2 通知",
description: "由 CloudDrive2 把网盘里的新文件推给 Peach。只接受本机与局域网发来的请求。",
- children: /* @__PURE__ */ (0, H.jsx)(LI, {
+ children: /* @__PURE__ */ (0, H.jsx)(FI, {
"aria-label": "接收 CloudDrive2 通知",
isSelected: n.cloud,
isDisabled: !n.available || !n.enabled,
@@ -50154,30 +50385,30 @@ function kye({ initial: e, receipt: t }) {
})
})
] }),
- d.enabled ? /* @__PURE__ */ (0, H.jsx)(kT, {
+ d.enabled ? /* @__PURE__ */ (0, H.jsx)(DT, {
divided: !0,
- children: /* @__PURE__ */ (0, H.jsxs)(FT, { children: [d.watch_local ? /* @__PURE__ */ (0, H.jsx)(IT, {
+ children: /* @__PURE__ */ (0, H.jsxs)(NT, { children: [d.watch_local ? /* @__PURE__ */ (0, H.jsx)(PT, {
term: "本机文件夹监视",
children: d.local_running ? d.local_roots.join("、") : d.local_message || "没有运行"
- }) : null, /* @__PURE__ */ (0, H.jsx)(IT, {
+ }) : null, /* @__PURE__ */ (0, H.jsx)(PT, {
term: "已入库",
children: `${d.queue.ingested} 个文件,队列里还有 ${d.queue.pending} 条`
})] })
}) : null,
- d.enabled && d.cloud ? /* @__PURE__ */ (0, H.jsx)(kT, {
+ d.enabled && d.cloud ? /* @__PURE__ */ (0, H.jsx)(DT, {
divided: !0,
children: /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-col gap-3",
children: [
- /* @__PURE__ */ (0, H.jsx)(NT, { children: "CloudDrive2 配置内容" }),
- /* @__PURE__ */ (0, H.jsx)(jT, { children: "Webhook 需要 CloudDrive2 会员;非会员的配置即使显示有效,也不会发送通知。 在「设置 → Webhooks」中添加配置,粘贴下方内容并保存。地址和密钥已填好;更换密钥后需重新复制。 Windows 桌面版若因换行问题显示「无效」,将配置保存为 .toml 文件,放入 %LOCALAPPDATA%\\CloudDrive.WinUI\\webhooks\\ 目录。" }),
+ /* @__PURE__ */ (0, H.jsx)(jT, { children: "CloudDrive2 配置内容" }),
+ /* @__PURE__ */ (0, H.jsx)(kT, { children: "Webhook 需要 CloudDrive2 会员;非会员的配置即使显示有效,也不会发送通知。 在「设置 → Webhooks」中添加配置,粘贴下方内容并保存。地址和密钥已填好;更换密钥后需重新复制。 Windows 桌面版若因换行问题显示「无效」,将配置保存为 .toml 文件,放入 %LOCALAPPDATA%\\CloudDrive.WinUI\\webhooks\\ 目录。" }),
d.config_toml ? /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)("div", { children: /* @__PURE__ */ (0, H.jsx)(J, {
size: "small",
onClick: () => {
navigator.clipboard.writeText(d.config_toml).then(() => t("已复制 CloudDrive2 配置"), () => s("浏览器没让这一页写剪贴板,展开「查看这段配置」选中自己复制。"));
},
children: "复制配置"
- }) }), /* @__PURE__ */ (0, H.jsx)(LT, {
+ }) }), /* @__PURE__ */ (0, H.jsx)(FT, {
summary: "查看这段配置",
children: /* @__PURE__ */ (0, H.jsx)("div", {
className: "relative",
@@ -50188,17 +50419,17 @@ function kye({ initial: e, receipt: t }) {
children: d.config_toml
})
})
- })] }) : /* @__PURE__ */ (0, H.jsx)(jT, { children: d.origin ? "尚未生成共享密钥,请保存配置后复制。" : "请先配置 CloudDrive2 能访问的 HTTPS 地址,再生成通知配置。HTTP 地址不接受通知写入,也不会自动转发。" })
+ })] }) : /* @__PURE__ */ (0, H.jsx)(kT, { children: d.origin ? "尚未生成共享密钥,请保存配置后复制。" : "请先配置 CloudDrive2 能访问的 HTTPS 地址,再生成通知配置。HTTP 地址不接受通知写入,也不会自动转发。" })
]
})
}) : null,
- n.enabled && n.cloud ? /* @__PURE__ */ (0, H.jsx)(kT, {
+ n.enabled && n.cloud ? /* @__PURE__ */ (0, H.jsx)(DT, {
divided: !0,
children: /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-col gap-3",
children: [
- /* @__PURE__ */ (0, H.jsx)(NT, { children: "云端路径前缀" }),
- /* @__PURE__ */ (0, H.jsx)(jT, { children: "左侧填写 CloudDrive2 中的目录前缀,右侧选择对应的媒体文件夹。 Peach 按此对应关系定位通知中的文件。" }),
+ /* @__PURE__ */ (0, H.jsx)(jT, { children: "云端路径前缀" }),
+ /* @__PURE__ */ (0, H.jsx)(kT, { children: "左侧填写 CloudDrive2 中的目录前缀,右侧选择对应的媒体文件夹。 Peach 按此对应关系定位通知中的文件。" }),
/* @__PURE__ */ (0, H.jsx)("div", {
role: "group",
"aria-label": "云端路径前缀",
@@ -50206,7 +50437,7 @@ function kye({ initial: e, receipt: t }) {
children: i.map((e, t) => /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex items-start gap-2",
children: [
- /* @__PURE__ */ (0, H.jsx)(bA, {
+ /* @__PURE__ */ (0, H.jsx)(zk, {
className: "min-w-0 flex-1",
"aria-label": `云端路径前缀 ${t + 1}`,
placeholder: "/115",
@@ -50215,19 +50446,19 @@ function kye({ initial: e, receipt: t }) {
value: e.prefix,
onChange: (e) => m(t, { prefix: e })
}),
- /* @__PURE__ */ (0, H.jsx)(SA, {
+ /* @__PURE__ */ (0, H.jsx)(Vk, {
"aria-label": `前缀 ${t + 1} 对应的媒体根`,
selectedKey: e.root,
onSelectionChange: (e) => {
e !== null && m(t, { root: String(e) });
},
- children: u.map((e) => /* @__PURE__ */ (0, H.jsx)(CA, {
+ children: u.map((e) => /* @__PURE__ */ (0, H.jsx)(Hk, {
id: e,
children: e
}, e))
}),
- /* @__PURE__ */ (0, H.jsx)(_T, {
- icon: Vw,
+ /* @__PURE__ */ (0, H.jsx)(hT, {
+ icon: zw,
"aria-label": "移除这一条",
onClick: () => a((e) => e.filter((e, n) => n !== t))
})
@@ -50245,15 +50476,15 @@ function kye({ initial: e, receipt: t }) {
]
})
}) : null,
- o || c.error ? /* @__PURE__ */ (0, H.jsx)(kT, {
+ o || c.error ? /* @__PURE__ */ (0, H.jsx)(DT, {
divided: !0,
- children: /* @__PURE__ */ (0, H.jsx)(MT, { children: o || c.error })
+ children: /* @__PURE__ */ (0, H.jsx)(AT, { children: o || c.error })
}) : null,
- /* @__PURE__ */ (0, H.jsxs)(AT, {
+ /* @__PURE__ */ (0, H.jsxs)(OT, {
status: d.enabled && d.cloud ? "换过密钥之后,CloudDrive2 那一侧要重新贴一次配置,否则它推来的一律被拒。" : void 0,
children: [d.enabled && d.cloud ? /* @__PURE__ */ (0, H.jsx)(J, {
onClick: () => {
- c.run("secret", (e) => q(Oye, {}, "POST", e), (e) => p(e, "已更换共享密钥"), (e) => s(G(e)));
+ c.run("secret", (e) => q(Nye, {}, "POST", e), (e) => p(e, "已更换共享密钥"), (e) => s(G(e)));
},
disabled: !n.available,
...X(c.busy === "secret"),
@@ -50270,8 +50501,8 @@ function kye({ initial: e, receipt: t }) {
}
//#endregion
//#region src/react/settings/media-settings.tsx
-var Aye = 8e3;
-function jye({ className: e }) {
+var Fye = 8e3;
+function Iye({ className: e }) {
return /* @__PURE__ */ (0, H.jsx)("svg", {
"aria-hidden": !0,
viewBox: "0 0 24 24",
@@ -50284,33 +50515,33 @@ function jye({ className: e }) {
children: /* @__PURE__ */ (0, H.jsx)("use", { href: "#i-folder-search" })
});
}
-var qL = [
+var KL = [
["local", "本地磁盘"],
["115", "CloudDrive · 115"],
["pikpak", "CloudDrive · PikPak"]
-], Mye = (e) => qL.find(([t]) => t === e)?.[1] ?? e, JL = (t) => e[t] || "database", YL = (e = "") => ({
+], Lye = (e) => KL.find(([t]) => t === e)?.[1] ?? e, qL = (t) => e[t] || "database", JL = (e = "") => ({
path: e,
location: "local",
root: "",
library: "",
library_icon: ""
});
-function Nye(e) {
- let t = e.media_sources?.filter((e) => qL.some(([t]) => t === e.location));
+function Rye(e) {
+ let t = e.media_sources?.filter((e) => KL.some(([t]) => t === e.location));
return t?.length ? t.map((e) => ({
path: e.path,
location: e.location,
root: e.root,
library: e.library || "",
library_icon: e.library_icon || ""
- })) : (e.media_dirs.length ? e.media_dirs : [""]).map((e) => YL(e));
+ })) : (e.media_dirs.length ? e.media_dirs : [""]).map((e) => JL(e));
}
-var Pye = (e) => !(e instanceof BC) || e.status !== 400 ? null : e.body?.errors ?? null;
-function Fye({ data: e, receipt: t }) {
+var zye = (e) => !(e instanceof VC) || e.status !== 400 ? null : e.body?.errors ?? null;
+function Bye({ data: e, receipt: t }) {
return /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-col gap-6",
children: [
- e.editable ? /* @__PURE__ */ (0, H.jsx)(Iye, {
+ e.editable ? /* @__PURE__ */ (0, H.jsx)(Vye, {
data: e,
receipt: t
}) : /* @__PURE__ */ (0, H.jsx)(Y, {
@@ -50318,25 +50549,26 @@ function Fye({ data: e, receipt: t }) {
title: "只读",
children: e.notice
}),
- /* @__PURE__ */ (0, H.jsx)(Rye, { data: e }),
- e.push_discovery ? /* @__PURE__ */ (0, H.jsx)(kye, {
+ /* @__PURE__ */ (0, H.jsx)(Uye, { data: e }),
+ e.push_discovery ? /* @__PURE__ */ (0, H.jsx)(Pye, {
initial: e.push_discovery,
receipt: t
}) : null,
- e.downloads ? /* @__PURE__ */ (0, H.jsx)(xye, {
+ e.downloads ? /* @__PURE__ */ (0, H.jsx)(wye, {
initial: e.downloads,
receipt: t
- }) : null
+ }) : null,
+ e.downloads ? /* @__PURE__ */ (0, H.jsx)(Oye, { receipt: t }) : null
]
});
}
-function Iye({ data: e, receipt: t }) {
- let [n, r] = (0, B.useState)(() => Nye(e)), [i, a] = (0, B.useState)(String(e.port)), [o, s] = (0, B.useState)(!1), [c, l] = (0, B.useState)([]), [u, d] = (0, B.useState)(""), [f, p] = (0, B.useState)(""), [m, h] = (0, B.useState)(null), [g, _] = (0, B.useState)(null), [v, y] = (0, B.useState)(null), b = (0, B.useRef)(!1), x = (0, B.useRef)(e.revision), S = (0, B.useRef)([]), C = vT();
+function Vye({ data: e, receipt: t }) {
+ let [n, r] = (0, B.useState)(() => Rye(e)), [i, a] = (0, B.useState)(String(e.port)), [o, s] = (0, B.useState)(!1), [c, l] = (0, B.useState)([]), [u, d] = (0, B.useState)(""), [f, p] = (0, B.useState)(""), [m, h] = (0, B.useState)(null), [g, _] = (0, B.useState)(null), [v, y] = (0, B.useState)(null), b = (0, B.useRef)(!1), x = (0, B.useRef)(e.revision), S = (0, B.useRef)([]), C = gT();
(0, B.useLayoutEffect)(() => {
g !== null && (S.current[g]?.focus(), _(null));
}, [g]), (0, B.useEffect)(() => {
if (!m) return;
- let e = setTimeout(() => location.assign(m.url), Aye);
+ let e = setTimeout(() => location.assign(m.url), Fye);
return () => clearTimeout(e);
}, [m]);
let w = (e, t) => r((n) => n.map((n, r) => r === e ? {
@@ -50347,14 +50579,14 @@ function Iye({ data: e, receipt: t }) {
for (; r.length <= e;) r.push("");
return r[e] = t, r;
}), E = () => {
- _(n.length), r((e) => [...e, YL()]);
+ _(n.length), r((e) => [...e, JL()]);
}, D = (e) => {
r((t) => t.filter((t, n) => n !== e)), l((t) => t.filter((t, n) => n !== e));
}, O = async (e) => {
if (!b.current) {
b.current = !0, y(e);
try {
- let { path: t } = await q(eye, { initial: n[e]?.path ?? "" });
+ let { path: t } = await q(rye, { initial: n[e]?.path ?? "" });
t && (w(e, { path: t }), T(e, ""));
} catch (t) {
T(e, G(t));
@@ -50363,7 +50595,7 @@ function Iye({ data: e, receipt: t }) {
}
}
}, k = (r) => {
- r.preventDefault(), p(""), C.run("save", (t) => q(FL, {
+ r.preventDefault(), p(""), C.run("save", (t) => q(NL, {
revision: x.current,
media_dirs: n.map((e) => e.path),
...e.media_sources ? { media_sources: n } : {},
@@ -50372,18 +50604,18 @@ function Iye({ data: e, receipt: t }) {
}, "POST", t), (e) => {
x.current = e.revision, l([]), d(""), t("已保存配置"), h(e);
}, (e) => {
- let t = Pye(e);
+ let t = zye(e);
l(t?.media_dirs ?? []), d(t?.port ?? ""), t || p(G(e));
});
};
- if (m) return /* @__PURE__ */ (0, H.jsx)(DT, {
+ if (m) return /* @__PURE__ */ (0, H.jsx)(TT, {
title: "这台电脑",
- children: /* @__PURE__ */ (0, H.jsx)(kT, { children: /* @__PURE__ */ (0, H.jsxs)(Y, {
+ children: /* @__PURE__ */ (0, H.jsx)(DT, { children: /* @__PURE__ */ (0, H.jsxs)(Y, {
tone: "success",
title: "配置已保存",
children: [
"Peach 正在重新启动。稍后自动跳转,或点击",
- /* @__PURE__ */ (0, H.jsx)(aT, {
+ /* @__PURE__ */ (0, H.jsx)(rT, {
href: m.url,
size: "small",
children: "进入馆藏"
@@ -50393,14 +50625,14 @@ function Iye({ data: e, receipt: t }) {
}) })
});
let A = n.some((e) => e.location === "115" || e.location === "pikpak"), j = A ? (e.mount_dependencies ?? []).filter((e) => !e.available) : [];
- return /* @__PURE__ */ (0, H.jsxs)(DT, {
+ return /* @__PURE__ */ (0, H.jsxs)(TT, {
title: "这台电脑",
onSubmit: k,
- children: [/* @__PURE__ */ (0, H.jsxs)(kT, { children: [
+ children: [/* @__PURE__ */ (0, H.jsxs)(DT, { children: [
/* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-col gap-3",
children: [
- /* @__PURE__ */ (0, H.jsx)(NT, { children: "媒体文件夹" }),
+ /* @__PURE__ */ (0, H.jsx)(jT, { children: "媒体文件夹" }),
/* @__PURE__ */ (0, H.jsx)("div", {
role: "group",
"aria-label": "媒体文件夹",
@@ -50411,7 +50643,7 @@ function Iye({ data: e, receipt: t }) {
children: [/* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex items-start gap-2",
children: [
- /* @__PURE__ */ (0, H.jsx)(bA, {
+ /* @__PURE__ */ (0, H.jsx)(zk, {
className: "min-w-0 flex-1",
"aria-label": `媒体文件夹 ${r + 1}`,
placeholder: "本机文件夹路径",
@@ -50424,14 +50656,14 @@ function Iye({ data: e, receipt: t }) {
isInvalid: !!c[r],
hint: c[r] || void 0
}),
- /* @__PURE__ */ (0, H.jsx)(_T, {
- icon: jye,
+ /* @__PURE__ */ (0, H.jsx)(hT, {
+ icon: Iye,
"aria-label": "选择文件夹",
onClick: () => void O(r),
...X(v === r)
}),
- n.length > 1 ? /* @__PURE__ */ (0, H.jsx)(_T, {
- icon: Vw,
+ n.length > 1 ? /* @__PURE__ */ (0, H.jsx)(hT, {
+ icon: zw,
"aria-label": "移除这个文件夹",
onClick: () => D(r)
}) : null
@@ -50439,7 +50671,7 @@ function Iye({ data: e, receipt: t }) {
}), /* @__PURE__ */ (0, H.jsxs)("div", {
className: "inline-grid grid-cols-1 gap-3 @lg:grid-cols-2",
children: [
- /* @__PURE__ */ (0, H.jsx)(bA, {
+ /* @__PURE__ */ (0, H.jsx)(zk, {
label: "媒体库名称",
maxLength: 80,
placeholder: "同名文件夹归入同一个媒体库",
@@ -50448,7 +50680,7 @@ function Iye({ data: e, receipt: t }) {
}),
/* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-col gap-1.5",
- children: [/* @__PURE__ */ (0, H.jsx)(NT, { children: "媒体库图标" }), /* @__PURE__ */ (0, H.jsx)(Eye, {
+ children: [/* @__PURE__ */ (0, H.jsx)(jT, { children: "媒体库图标" }), /* @__PURE__ */ (0, H.jsx)(jye, {
label: `媒体库图标 ${r + 1}`,
value: t.library_icon,
kind: t.location,
@@ -50457,20 +50689,20 @@ function Iye({ data: e, receipt: t }) {
}),
/* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-col gap-1.5",
- children: [/* @__PURE__ */ (0, H.jsx)(NT, { children: "媒体来源" }), /* @__PURE__ */ (0, H.jsx)(SA, {
+ children: [/* @__PURE__ */ (0, H.jsx)(jT, { children: "媒体来源" }), /* @__PURE__ */ (0, H.jsx)(Vk, {
"aria-label": `媒体来源 ${r + 1}`,
selectedKey: t.location,
onSelectionChange: (e) => {
e !== null && w(r, { location: String(e) });
},
- children: qL.map(([e, t]) => /* @__PURE__ */ (0, H.jsxs)(CA, {
+ children: KL.map(([e, t]) => /* @__PURE__ */ (0, H.jsxs)(Hk, {
id: e,
textValue: t,
- children: [/* @__PURE__ */ (0, H.jsx)(RT, { mark: JL(e) }), t]
+ children: [/* @__PURE__ */ (0, H.jsx)(IT, { mark: qL(e) }), t]
}, e))
})]
}),
- e.windows === !1 ? /* @__PURE__ */ (0, H.jsx)(bA, {
+ e.windows === !1 ? /* @__PURE__ */ (0, H.jsx)(zk, {
label: "Windows 中的对应路径",
placeholder: "例如 B:\\",
value: t.root,
@@ -50487,18 +50719,18 @@ function Iye({ data: e, receipt: t }) {
})
]
}),
- A ? /* @__PURE__ */ (0, H.jsx)(gye, {}) : null,
- j.map((e) => /* @__PURE__ */ (0, H.jsxs)(jT, { children: [
+ A ? /* @__PURE__ */ (0, H.jsx)(yye, {}) : null,
+ j.map((e) => /* @__PURE__ */ (0, H.jsxs)(kT, { children: [
"未检测到 ",
e.name,
"。",
- /* @__PURE__ */ (0, H.jsxs)(PT, {
+ /* @__PURE__ */ (0, H.jsxs)(MT, {
href: e.download_url,
children: ["下载 ", e.name]
})
] }, e.name)),
- e.windows === !1 ? /* @__PURE__ */ (0, H.jsx)(jT, { children: "本机文件夹是这台电脑读取媒体的位置。Windows 中的对应路径用于匹配馆藏中已有的路径,例如 B:\\ 对应本机挂载文件夹。" }) : null,
- e.port_editable === !1 ? null : /* @__PURE__ */ (0, H.jsx)(bA, {
+ e.windows === !1 ? /* @__PURE__ */ (0, H.jsx)(kT, { children: "本机文件夹是这台电脑读取媒体的位置。Windows 中的对应路径用于匹配馆藏中已有的路径,例如 B:\\ 对应本机挂载文件夹。" }) : null,
+ e.port_editable === !1 ? null : /* @__PURE__ */ (0, H.jsx)(zk, {
id: "configPort",
label: "本机访问端口",
inputMode: "numeric",
@@ -50508,7 +50740,7 @@ function Iye({ data: e, receipt: t }) {
isInvalid: !!u,
hint: u || "浏览器地址里冒号后面的数字,一般不用改。"
}),
- /* @__PURE__ */ (0, H.jsx)(PM, {
+ /* @__PURE__ */ (0, H.jsx)(uM, {
isSelected: o,
onChange: s,
children: "保存后扫描并补全资料"
@@ -50518,7 +50750,7 @@ function Iye({ data: e, receipt: t }) {
title: "没有保存",
children: f
}) : null
- ] }), /* @__PURE__ */ (0, H.jsx)(AT, {
+ ] }), /* @__PURE__ */ (0, H.jsx)(OT, {
status: e.port_editable === !1 ? "保存后 Peach 会重新载入配置。" : "保存后 Peach 会重新启动,端口改了就用新地址打开。",
children: /* @__PURE__ */ (0, H.jsx)(J, {
type: "submit",
@@ -50528,7 +50760,7 @@ function Iye({ data: e, receipt: t }) {
})]
});
}
-function Lye({ online: e }) {
+function Hye({ online: e }) {
return e === !0 ? /* @__PURE__ */ (0, H.jsxs)("span", {
"data-mount": "online",
className: "inline-flex items-center gap-1.5 text-body-2-medium text-notification-success-foreground",
@@ -50552,21 +50784,21 @@ function Lye({ online: e }) {
}), "未检测"]
});
}
-function Rye({ data: e }) {
- let t = e.media_sources, n = vT();
- return t ? /* @__PURE__ */ (0, H.jsxs)(DT, {
+function Uye({ data: e }) {
+ let t = e.media_sources, n = gT();
+ return t ? /* @__PURE__ */ (0, H.jsxs)(TT, {
title: "挂载状态",
children: [
- /* @__PURE__ */ (0, H.jsx)(FT, { children: t.map((e, t) => /* @__PURE__ */ (0, H.jsxs)(IT, {
- term: /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(RT, { mark: JL(e.location) }), Mye(e.location)] }),
- children: [e.path || "未配置挂载点", /* @__PURE__ */ (0, H.jsx)(Lye, { online: e.online })]
+ /* @__PURE__ */ (0, H.jsx)(NT, { children: t.map((e, t) => /* @__PURE__ */ (0, H.jsxs)(PT, {
+ term: /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(IT, { mark: qL(e.location) }), Lye(e.location)] }),
+ children: [e.path || "未配置挂载点", /* @__PURE__ */ (0, H.jsx)(Hye, { online: e.online })]
}, t)) }),
- n.error ? /* @__PURE__ */ (0, H.jsx)(kT, {
+ n.error ? /* @__PURE__ */ (0, H.jsx)(DT, {
divided: !0,
- children: /* @__PURE__ */ (0, H.jsx)(MT, { children: n.error })
+ children: /* @__PURE__ */ (0, H.jsx)(AT, { children: n.error })
}) : null,
- /* @__PURE__ */ (0, H.jsx)(AT, { children: /* @__PURE__ */ (0, H.jsx)(J, {
- onClick: () => void n.run("refresh", (e) => LL(e), (e) => z.setQueryData(IL, e)),
+ /* @__PURE__ */ (0, H.jsx)(OT, { children: /* @__PURE__ */ (0, H.jsx)(J, {
+ onClick: () => void n.run("refresh", (e) => FL(e), (e) => z.setQueryData(PL, e)),
...X(n.busy === "refresh"),
children: "刷新挂载状态"
}) })
@@ -50575,13 +50807,13 @@ function Rye({ data: e }) {
}
//#endregion
//#region src/react/settings/access-settings.tsx
-var zye = {
+var Wye = {
legacy: "当前使用系统生成的访问口令。改设自己的密码,或关闭登录要求。",
locked: "访问设置无法读取,请在本机检查配置文件。",
password: "已设置密码。新设备需要登录,登录时勾选「保持登录」可保持 30 天。"
};
-function Bye({ initial: e, receipt: t }) {
- let [n, r] = (0, B.useState)(e), [i, a] = (0, B.useState)(""), [o, s] = (0, B.useState)(""), [c, l] = (0, B.useState)(""), [u, d] = (0, B.useState)(!1), [f, p] = (0, B.useState)({}), m = (0, B.useRef)(null), h = vT(), g = (e) => {
+function Gye({ initial: e, receipt: t }) {
+ let [n, r] = (0, B.useState)(e), [i, a] = (0, B.useState)(""), [o, s] = (0, B.useState)(""), [c, l] = (0, B.useState)(""), [u, d] = (0, B.useState)(!1), [f, p] = (0, B.useState)({}), m = (0, B.useRef)(null), h = gT(), g = (e) => {
e.preventDefault();
let f = {};
if (n.mode === "password" && !i && (f.current_password = "请输入当前访问密码"), u || ((o.length < 8 || o.length > 256) && (f.password = "访问密码需为 8–256 个字符"), o !== c && (f.confirmation = "两次输入的密码不一致")), p(f), Object.keys(f).length) {
@@ -50598,28 +50830,28 @@ function Bye({ initial: e, receipt: t }) {
}, "POST", e), (e) => {
r(e), a(""), s(""), l(""), d(!1), p({}), t(e.mode === "open" ? "已关闭访问密码" : "已保存配置");
}, (e) => {
- let t = e instanceof BC ? e.body : null, n = t?.errors || t?.detail?.errors;
+ let t = e instanceof VC ? e.body : null, n = t?.errors || t?.detail?.errors;
n ? p(n) : h.setError(G(e));
});
- }, _ = zye[n.mode], v = n.mode !== "locked";
- return /* @__PURE__ */ (0, H.jsxs)(DT, {
+ }, _ = Wye[n.mode], v = n.mode !== "locked";
+ return /* @__PURE__ */ (0, H.jsxs)(TT, {
title: "访问密码",
onSubmit: g,
children: [/* @__PURE__ */ (0, H.jsx)("div", {
ref: m,
- children: /* @__PURE__ */ (0, H.jsxs)(kT, { children: [
- _ ? /* @__PURE__ */ (0, H.jsx)(jT, { children: _ }) : null,
+ children: /* @__PURE__ */ (0, H.jsxs)(DT, { children: [
+ _ ? /* @__PURE__ */ (0, H.jsx)(kT, { children: _ }) : null,
n.mode === "open" ? /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "warning",
title: "未设置访问密码",
children: "能连接到 Peach 的设备打开地址就能看馆藏,不需要登录。"
}) : null,
- n.mode === "password" || n.mode === "legacy" ? /* @__PURE__ */ (0, H.jsx)(PM, {
+ n.mode === "password" || n.mode === "legacy" ? /* @__PURE__ */ (0, H.jsx)(uM, {
isSelected: u,
onChange: d,
children: "关闭访问密码"
}) : null,
- n.mode === "password" ? /* @__PURE__ */ (0, H.jsx)(bA, {
+ n.mode === "password" ? /* @__PURE__ */ (0, H.jsx)(zk, {
id: "access-current",
type: "password",
label: "当前访问密码",
@@ -50632,7 +50864,7 @@ function Bye({ initial: e, receipt: t }) {
isInvalid: !!f.current_password,
hint: f.current_password
}) : null,
- v ? /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(bA, {
+ v ? /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(zk, {
id: "access-password",
type: "password",
label: n.mode === "password" ? "新访问密码" : "设置访问密码",
@@ -50645,7 +50877,7 @@ function Bye({ initial: e, receipt: t }) {
validationBehavior: "aria",
isInvalid: !u && !!f.password,
hint: u ? "关闭访问密码时无需填写。" : f.password || "至少 8 个字符。保存后其他设备需要重新登录。"
- }), /* @__PURE__ */ (0, H.jsx)(bA, {
+ }), /* @__PURE__ */ (0, H.jsx)(zk, {
id: "access-confirm",
type: "password",
label: "确认访问密码",
@@ -50664,9 +50896,9 @@ function Bye({ initial: e, receipt: t }) {
title: "访问范围",
children: "保存后,能连接到 Peach 的设备将直接访问馆藏。"
}) : null,
- h.error ? /* @__PURE__ */ (0, H.jsx)(MT, { children: h.error }) : null
+ h.error ? /* @__PURE__ */ (0, H.jsx)(AT, { children: h.error }) : null
] })
- }), v ? /* @__PURE__ */ (0, H.jsx)(AT, {
+ }), v ? /* @__PURE__ */ (0, H.jsx)(OT, {
status: "保存后立即生效。",
children: /* @__PURE__ */ (0, H.jsx)(J, {
type: "submit",
@@ -50678,19 +50910,19 @@ function Bye({ initial: e, receipt: t }) {
}
//#endregion
//#region src/react/settings/tunnel-settings.tsx
-var Vye = 2e3, Hye = [["quick", "临时链接"], ["named", "命名隧道"]], Uye = {
+var Kye = 2e3, qye = [["quick", "临时链接"], ["named", "命名隧道"]], Jye = {
quick: "只用于临时预览;地址随机、重启后会变化。启动前必须设置访问密码。",
named: "地址是 Cloudflare 后台绑定的公开主机名,重启后不变。启动前必须设置访问密码,身份策略在 Cloudflare Access 里配置。"
};
-function Wye({ revision: e, initial: t, receipt: n }) {
- let [r, i] = (0, B.useState)(t), [a, o] = (0, B.useState)(e), [s, c] = (0, B.useState)(t.mode), [l, u] = (0, B.useState)(t.hostname), [d, f] = (0, B.useState)(""), [p, m] = (0, B.useState)({}), h = vT(), g = r.state === "starting" || r.state === "running", _ = r.named_available && s === "named";
+function Yye({ revision: e, initial: t, receipt: n }) {
+ let [r, i] = (0, B.useState)(t), [a, o] = (0, B.useState)(e), [s, c] = (0, B.useState)(t.mode), [l, u] = (0, B.useState)(t.hostname), [d, f] = (0, B.useState)(""), [p, m] = (0, B.useState)({}), h = gT(), g = r.state === "starting" || r.state === "running", _ = r.named_available && s === "named";
(0, B.useEffect)(() => {
if (r.state !== "starting") return;
let e = new AbortController(), t = window.setInterval(() => {
- LL(e.signal).then((t) => {
- e.signal.aborted || !t.tunnel || (z.setQueryData(IL, t), i(t.tunnel), o(t.revision));
+ FL(e.signal).then((t) => {
+ e.signal.aborted || !t.tunnel || (z.setQueryData(PL, t), i(t.tunnel), o(t.revision));
}).catch(() => void 0);
- }, Vye);
+ }, Kye);
return () => {
e.abort(), window.clearInterval(t);
};
@@ -50705,30 +50937,30 @@ function Wye({ revision: e, initial: t, receipt: n }) {
}, "POST", e), (e) => {
i(e), o(e.revision), c(e.mode), u(e.hostname), f(""), n(e);
}, (e) => {
- let t = e instanceof BC ? e.body : null, n = t?.errors || t?.detail?.errors;
+ let t = e instanceof VC ? e.body : null, n = t?.errors || t?.detail?.errors;
n ? m(n) : h.setError(G(e));
});
};
- return /* @__PURE__ */ (0, H.jsxs)(DT, {
+ return /* @__PURE__ */ (0, H.jsxs)(TT, {
title: "Cloudflare 公网入口",
onSubmit: (e) => {
e.preventDefault(), v("save", g, () => n("已保存配置"));
},
- children: [/* @__PURE__ */ (0, H.jsxs)(kT, { children: [
- r.named_available ? /* @__PURE__ */ (0, H.jsx)(uC, {
+ children: [/* @__PURE__ */ (0, H.jsxs)(DT, { children: [
+ r.named_available ? /* @__PURE__ */ (0, H.jsx)(EC, {
"aria-label": "公网入口的形态(二选一)",
value: s,
isDisabled: g,
onChange: (e) => c(e),
- className: dC,
- children: Hye.map(([e, t]) => /* @__PURE__ */ (0, H.jsx)(fg, {
+ className: DC,
+ children: qye.map(([e, t]) => /* @__PURE__ */ (0, H.jsx)(dg, {
value: e,
- className: fC,
+ className: OC,
children: t
}, e))
}) : null,
- /* @__PURE__ */ (0, H.jsx)(jT, { children: Uye[_ ? "named" : "quick"] }),
- _ ? /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(bA, {
+ /* @__PURE__ */ (0, H.jsx)(kT, { children: Jye[_ ? "named" : "quick"] }),
+ _ ? /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(zk, {
id: "tunnel-hostname",
label: "公开主机名",
autoComplete: "off",
@@ -50739,7 +50971,7 @@ function Wye({ revision: e, initial: t, receipt: n }) {
validationBehavior: "aria",
isInvalid: !!p.hostname,
hint: p.hostname || "在 Cloudflare Zero Trust 里指向本机 origin 的那个主机名。"
- }), /* @__PURE__ */ (0, H.jsx)(bA, {
+ }), /* @__PURE__ */ (0, H.jsx)(zk, {
id: "tunnel-token",
type: "password",
label: "隧道令牌",
@@ -50759,7 +50991,7 @@ function Wye({ revision: e, initial: t, receipt: n }) {
r.state === "running" && r.url ? /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "info",
title: "公网地址",
- children: /* @__PURE__ */ (0, H.jsx)(PT, {
+ children: /* @__PURE__ */ (0, H.jsx)(MT, {
href: r.url,
children: r.url
})
@@ -50769,9 +51001,9 @@ function Wye({ revision: e, initial: t, receipt: n }) {
title: "正在连接",
children: "正在等待 cloudflared 连上 Cloudflare 边缘。"
}) : null,
- r.error ? /* @__PURE__ */ (0, H.jsx)(MT, { children: r.error }) : null,
- h.error ? /* @__PURE__ */ (0, H.jsx)(MT, { children: h.error }) : null
- ] }), /* @__PURE__ */ (0, H.jsxs)(AT, {
+ r.error ? /* @__PURE__ */ (0, H.jsx)(AT, { children: r.error }) : null,
+ h.error ? /* @__PURE__ */ (0, H.jsx)(AT, { children: h.error }) : null
+ ] }), /* @__PURE__ */ (0, H.jsxs)(OT, {
status: r.enabled ? "服务重启时会按设置尝试恢复。" : "服务重启后保持关闭。",
children: [/* @__PURE__ */ (0, H.jsx)(J, {
onClick: () => v("toggle", !g, (e) => n(e.enabled ? "公网入口已启动" : "公网入口已停止")),
@@ -50787,24 +51019,24 @@ function Wye({ revision: e, initial: t, receipt: n }) {
}
//#endregion
//#region src/react/settings/network-settings.tsx
-var Gye = [
+var Xye = [
["environment", "系统代理"],
["direct", "直连"],
["proxy", "自定义"]
];
-function Kye({ data: e, receipt: t }) {
+function Zye({ data: e, receipt: t }) {
return /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-col gap-6",
children: [
- e.peach_proxy ? /* @__PURE__ */ (0, H.jsx)(qye, {
+ e.peach_proxy ? /* @__PURE__ */ (0, H.jsx)(Qye, {
initial: e.peach_proxy,
receipt: t
}) : null,
- e.access ? /* @__PURE__ */ (0, H.jsx)(Bye, {
+ e.access ? /* @__PURE__ */ (0, H.jsx)(Gye, {
initial: e.access,
receipt: t
}) : null,
- e.tunnel ? /* @__PURE__ */ (0, H.jsx)(Wye, {
+ e.tunnel ? /* @__PURE__ */ (0, H.jsx)(Yye, {
revision: e.revision,
initial: e.tunnel,
receipt: t
@@ -50812,9 +51044,9 @@ function Kye({ data: e, receipt: t }) {
]
});
}
-function qye({ initial: e, receipt: t }) {
- let [n, r] = (0, B.useState)(e), [i, a] = (0, B.useState)(e.mode), [o, s] = (0, B.useState)(""), c = vT();
- return /* @__PURE__ */ (0, H.jsxs)(DT, {
+function Qye({ initial: e, receipt: t }) {
+ let [n, r] = (0, B.useState)(e), [i, a] = (0, B.useState)(e.mode), [o, s] = (0, B.useState)(""), c = gT();
+ return /* @__PURE__ */ (0, H.jsxs)(TT, {
id: "peachProxy",
title: "Peach 代理",
onSubmit: (e) => {
@@ -50826,25 +51058,25 @@ function qye({ initial: e, receipt: t }) {
});
},
children: [
- /* @__PURE__ */ (0, H.jsx)(OT, { children: /* @__PURE__ */ (0, H.jsx)(ET, {
+ /* @__PURE__ */ (0, H.jsx)(ET, { children: /* @__PURE__ */ (0, H.jsx)(wT, {
label: "连接方式",
description: "采集来源选「Peach 代理」时共用这里的连接方式。",
- children: /* @__PURE__ */ (0, H.jsx)(SA, {
+ children: /* @__PURE__ */ (0, H.jsx)(Vk, {
"aria-label": "连接方式",
selectedKey: i,
onSelectionChange: (e) => {
e !== null && a(String(e));
},
- children: Gye.map(([e, t]) => /* @__PURE__ */ (0, H.jsx)(CA, {
+ children: Xye.map(([e, t]) => /* @__PURE__ */ (0, H.jsx)(Hk, {
id: e,
children: t
}, e))
})
}) }),
- i === "proxy" || n.needs_selection || c.error ? /* @__PURE__ */ (0, H.jsxs)(kT, {
+ i === "proxy" || n.needs_selection || c.error ? /* @__PURE__ */ (0, H.jsxs)(DT, {
divided: !0,
children: [
- i === "proxy" ? /* @__PURE__ */ (0, H.jsx)(bA, {
+ i === "proxy" ? /* @__PURE__ */ (0, H.jsx)(zk, {
id: "peachProxyAddress",
type: "password",
label: "代理地址",
@@ -50858,10 +51090,10 @@ function qye({ initial: e, receipt: t }) {
title: "需要选择连接方式",
children: "已有来源的代理地址不同,请选择公共连接方式。"
}) : null,
- c.error ? /* @__PURE__ */ (0, H.jsx)(MT, { children: c.error }) : null
+ c.error ? /* @__PURE__ */ (0, H.jsx)(AT, { children: c.error }) : null
]
}) : null,
- /* @__PURE__ */ (0, H.jsx)(AT, { children: /* @__PURE__ */ (0, H.jsx)(J, {
+ /* @__PURE__ */ (0, H.jsx)(OT, { children: /* @__PURE__ */ (0, H.jsx)(J, {
type: "submit",
...X(c.busy === "save"),
children: "保存配置"
@@ -50871,10 +51103,10 @@ function qye({ initial: e, receipt: t }) {
}
//#endregion
//#region src/react/settings/configuration-page.tsx
-function Jye({ receipt: e, reopenTutorial: t }) {
- let n = xw({
- queryKey: IL,
- queryFn: ({ signal: e }) => LL(e)
+function $ye({ receipt: e, reopenTutorial: t }) {
+ let n = yw({
+ queryKey: PL,
+ queryFn: ({ signal: e }) => FL(e)
}), r = n.data;
if (!r) return /* @__PURE__ */ (0, H.jsx)("div", {
className: "configpage",
@@ -50895,22 +51127,22 @@ function Jye({ receipt: e, reopenTutorial: t }) {
className: "configgroup",
children: "通用"
}) : null,
- a ? /* @__PURE__ */ (0, H.jsx)(iye, { ...i }) : null,
+ a ? /* @__PURE__ */ (0, H.jsx)(sye, { ...i }) : null,
/* @__PURE__ */ (0, H.jsx)("h2", {
className: "configgroup",
children: "媒体"
}),
- /* @__PURE__ */ (0, H.jsx)(Fye, { ...i }),
+ /* @__PURE__ */ (0, H.jsx)(Bye, { ...i }),
o ? /* @__PURE__ */ (0, H.jsx)("h2", {
className: "configgroup",
children: "网络与访问"
}) : null,
- o ? /* @__PURE__ */ (0, H.jsx)(Kye, { ...i }) : null,
+ o ? /* @__PURE__ */ (0, H.jsx)(Zye, { ...i }) : null,
/* @__PURE__ */ (0, H.jsx)("h2", {
className: "configgroup",
children: "更新与维护"
}),
- /* @__PURE__ */ (0, H.jsx)(lye, {
+ /* @__PURE__ */ (0, H.jsx)(fye, {
...i,
reopenTutorial: t
})
@@ -50919,14 +51151,14 @@ function Jye({ receipt: e, reopenTutorial: t }) {
}
//#endregion
//#region src/react/stats/stats.ts
-var Yye = "/api/stats", XL = ["stats"], ZL = (e) => K(Yye, e);
-async function Xye(e) {
+var ebe = "/api/stats", YL = ["stats"], XL = (e) => K(ebe, e);
+async function tbe(e) {
await z.fetchQuery({
- queryKey: XL,
- queryFn: () => ZL(e)
+ queryKey: YL,
+ queryFn: () => XL(e)
});
}
-var QL = (e, t) => t ? Math.round(e / t * 100) : 0, Zye = (e) => e >= 3600 ? `${(e / 3600).toFixed(1)} 小时` : `${Math.round(e / 60)} 分钟`, $L = (e) => e.duration ? Math.min(e.play_seconds / e.duration, 1) * 100 : 0, eR = (e) => (e.max_reached || 0) * 100, Qye = (e) => e.kind === "online" ? "在线直接观看" : $L(e) < eR(e) - 25 ? "快进扫过" : e.o_count ? `高潮 ${e.o_count}` : "正常观看", $ye = (e) => `${e.kind === "online" ? "/follow/item/" : "/item/"}${e.id}`, ebe = (e) => Math.max(1, ...e) * 1.1, tbe = (e) => Math.max(4, Math.min(14, Math.round(90 / Math.max(1, e)))), nbe = {
+var ZL = (e, t) => t ? Math.round(e / t * 100) : 0, nbe = (e) => e >= 3600 ? `${(e / 3600).toFixed(1)} 小时` : `${Math.round(e / 60)} 分钟`, QL = (e) => e.duration ? Math.min(e.play_seconds / e.duration, 1) * 100 : 0, $L = (e) => (e.max_reached || 0) * 100, rbe = (e) => e.kind === "online" ? "在线直接观看" : QL(e) < $L(e) - 25 ? "快进扫过" : e.o_count ? `高潮 ${e.o_count}` : "正常观看", ibe = (e) => `${e.kind === "online" ? "/follow/item/" : "/item/"}${e.id}`, abe = (e) => Math.max(1, ...e) * 1.1, obe = (e) => Math.max(4, Math.min(14, Math.round(90 / Math.max(1, e)))), sbe = {
video: "视频",
image: "图片",
illustration: "插画",
@@ -50934,18 +51166,18 @@ var QL = (e, t) => t ? Math.round(e / t * 100) : 0, Zye = (e) => e >= 3600 ? `${
audio: "音频",
account: "账号",
other: "其它文件"
-}, rbe = (e) => e.map((e) => ({
- name: nbe[e.k] ?? e.k,
+}, cbe = (e) => e.map((e) => ({
+ name: sbe[e.k] ?? e.k,
value: e.n
-})).sort((e, t) => t.value - e.value), ibe = {
+})).sort((e, t) => t.value - e.value), lbe = {
速食: "<5 分钟",
短: "5–15 分钟",
中: "15–40 分钟",
长: ">40 分钟"
-}, tR = (e, t = {}) => e.map((e) => ({
+}, eR = (e, t = {}) => e.map((e) => ({
name: t[e.k] ?? e.k,
value: e.n
-})), abe = (e) => tR(e, ibe), obe = [
+})), ube = (e) => eR(e, lbe), dbe = [
[
1,
1,
@@ -50981,49 +51213,49 @@ var QL = (e, t) => t ? Math.round(e / t * 100) : 0, Zye = (e) => e >= 3600 ? `${
Infinity,
"≥10 次"
]
-], sbe = (e) => obe.map(([t, n, r]) => ({
+], fbe = (e) => dbe.map(([t, n, r]) => ({
name: r,
value: e.filter((e) => e.k >= t && e.k <= n).reduce((e, t) => e + t.n, 0)
-})), cbe = /* @__PURE__ */ "dangerouslySetInnerHTML.onCopy.onCopyCapture.onCut.onCutCapture.onPaste.onPasteCapture.onCompositionEnd.onCompositionEndCapture.onCompositionStart.onCompositionStartCapture.onCompositionUpdate.onCompositionUpdateCapture.onFocus.onFocusCapture.onBlur.onBlurCapture.onChange.onChangeCapture.onBeforeInput.onBeforeInputCapture.onInput.onInputCapture.onReset.onResetCapture.onSubmit.onSubmitCapture.onInvalid.onInvalidCapture.onLoad.onLoadCapture.onError.onErrorCapture.onKeyDown.onKeyDownCapture.onKeyPress.onKeyPressCapture.onKeyUp.onKeyUpCapture.onAbort.onAbortCapture.onCanPlay.onCanPlayCapture.onCanPlayThrough.onCanPlayThroughCapture.onDurationChange.onDurationChangeCapture.onEmptied.onEmptiedCapture.onEncrypted.onEncryptedCapture.onEnded.onEndedCapture.onLoadedData.onLoadedDataCapture.onLoadedMetadata.onLoadedMetadataCapture.onLoadStart.onLoadStartCapture.onPause.onPauseCapture.onPlay.onPlayCapture.onPlaying.onPlayingCapture.onProgress.onProgressCapture.onRateChange.onRateChangeCapture.onSeeked.onSeekedCapture.onSeeking.onSeekingCapture.onStalled.onStalledCapture.onSuspend.onSuspendCapture.onTimeUpdate.onTimeUpdateCapture.onVolumeChange.onVolumeChangeCapture.onWaiting.onWaitingCapture.onAuxClick.onAuxClickCapture.onClick.onClickCapture.onContextMenu.onContextMenuCapture.onDoubleClick.onDoubleClickCapture.onDrag.onDragCapture.onDragEnd.onDragEndCapture.onDragEnter.onDragEnterCapture.onDragExit.onDragExitCapture.onDragLeave.onDragLeaveCapture.onDragOver.onDragOverCapture.onDragStart.onDragStartCapture.onDrop.onDropCapture.onMouseDown.onMouseDownCapture.onMouseEnter.onMouseLeave.onMouseMove.onMouseMoveCapture.onMouseOut.onMouseOutCapture.onMouseOver.onMouseOverCapture.onMouseUp.onMouseUpCapture.onSelect.onSelectCapture.onTouchCancel.onTouchCancelCapture.onTouchEnd.onTouchEndCapture.onTouchMove.onTouchMoveCapture.onTouchStart.onTouchStartCapture.onPointerDown.onPointerDownCapture.onPointerMove.onPointerMoveCapture.onPointerUp.onPointerUpCapture.onPointerCancel.onPointerCancelCapture.onPointerEnter.onPointerEnterCapture.onPointerLeave.onPointerLeaveCapture.onPointerOver.onPointerOverCapture.onPointerOut.onPointerOutCapture.onGotPointerCapture.onGotPointerCaptureCapture.onLostPointerCapture.onLostPointerCaptureCapture.onScroll.onScrollCapture.onWheel.onWheelCapture.onAnimationStart.onAnimationStartCapture.onAnimationEnd.onAnimationEndCapture.onAnimationIteration.onAnimationIterationCapture.onTransitionEnd.onTransitionEndCapture".split(".");
-function nR(e) {
- return typeof e == "string" && cbe.includes(e);
+})), pbe = /* @__PURE__ */ "dangerouslySetInnerHTML.onCopy.onCopyCapture.onCut.onCutCapture.onPaste.onPasteCapture.onCompositionEnd.onCompositionEndCapture.onCompositionStart.onCompositionStartCapture.onCompositionUpdate.onCompositionUpdateCapture.onFocus.onFocusCapture.onBlur.onBlurCapture.onChange.onChangeCapture.onBeforeInput.onBeforeInputCapture.onInput.onInputCapture.onReset.onResetCapture.onSubmit.onSubmitCapture.onInvalid.onInvalidCapture.onLoad.onLoadCapture.onError.onErrorCapture.onKeyDown.onKeyDownCapture.onKeyPress.onKeyPressCapture.onKeyUp.onKeyUpCapture.onAbort.onAbortCapture.onCanPlay.onCanPlayCapture.onCanPlayThrough.onCanPlayThroughCapture.onDurationChange.onDurationChangeCapture.onEmptied.onEmptiedCapture.onEncrypted.onEncryptedCapture.onEnded.onEndedCapture.onLoadedData.onLoadedDataCapture.onLoadedMetadata.onLoadedMetadataCapture.onLoadStart.onLoadStartCapture.onPause.onPauseCapture.onPlay.onPlayCapture.onPlaying.onPlayingCapture.onProgress.onProgressCapture.onRateChange.onRateChangeCapture.onSeeked.onSeekedCapture.onSeeking.onSeekingCapture.onStalled.onStalledCapture.onSuspend.onSuspendCapture.onTimeUpdate.onTimeUpdateCapture.onVolumeChange.onVolumeChangeCapture.onWaiting.onWaitingCapture.onAuxClick.onAuxClickCapture.onClick.onClickCapture.onContextMenu.onContextMenuCapture.onDoubleClick.onDoubleClickCapture.onDrag.onDragCapture.onDragEnd.onDragEndCapture.onDragEnter.onDragEnterCapture.onDragExit.onDragExitCapture.onDragLeave.onDragLeaveCapture.onDragOver.onDragOverCapture.onDragStart.onDragStartCapture.onDrop.onDropCapture.onMouseDown.onMouseDownCapture.onMouseEnter.onMouseLeave.onMouseMove.onMouseMoveCapture.onMouseOut.onMouseOutCapture.onMouseOver.onMouseOverCapture.onMouseUp.onMouseUpCapture.onSelect.onSelectCapture.onTouchCancel.onTouchCancelCapture.onTouchEnd.onTouchEndCapture.onTouchMove.onTouchMoveCapture.onTouchStart.onTouchStartCapture.onPointerDown.onPointerDownCapture.onPointerMove.onPointerMoveCapture.onPointerUp.onPointerUpCapture.onPointerCancel.onPointerCancelCapture.onPointerEnter.onPointerEnterCapture.onPointerLeave.onPointerLeaveCapture.onPointerOver.onPointerOverCapture.onPointerOut.onPointerOutCapture.onGotPointerCapture.onGotPointerCaptureCapture.onLostPointerCapture.onLostPointerCaptureCapture.onScroll.onScrollCapture.onWheel.onWheelCapture.onAnimationStart.onAnimationStartCapture.onAnimationEnd.onAnimationEndCapture.onAnimationIteration.onAnimationIterationCapture.onTransitionEnd.onTransitionEndCapture".split(".");
+function tR(e) {
+ return typeof e == "string" && pbe.includes(e);
}
//#endregion
//#region node_modules/recharts/es6/util/svgPropertiesNoEvents.js
-var lbe = /* @__PURE__ */ new Set(/* @__PURE__ */ "aria-activedescendant.aria-atomic.aria-autocomplete.aria-busy.aria-checked.aria-colcount.aria-colindex.aria-colspan.aria-controls.aria-current.aria-describedby.aria-details.aria-disabled.aria-errormessage.aria-expanded.aria-flowto.aria-haspopup.aria-hidden.aria-invalid.aria-keyshortcuts.aria-label.aria-labelledby.aria-level.aria-live.aria-modal.aria-multiline.aria-multiselectable.aria-orientation.aria-owns.aria-placeholder.aria-posinset.aria-pressed.aria-readonly.aria-relevant.aria-required.aria-roledescription.aria-rowcount.aria-rowindex.aria-rowspan.aria-selected.aria-setsize.aria-sort.aria-valuemax.aria-valuemin.aria-valuenow.aria-valuetext.className.color.height.id.lang.max.media.method.min.name.style.target.width.role.tabIndex.accentHeight.accumulate.additive.alignmentBaseline.allowReorder.alphabetic.amplitude.arabicForm.ascent.attributeName.attributeType.autoReverse.azimuth.baseFrequency.baselineShift.baseProfile.bbox.begin.bias.by.calcMode.capHeight.clip.clipPath.clipPathUnits.clipRule.colorInterpolation.colorInterpolationFilters.colorProfile.colorRendering.contentScriptType.contentStyleType.cursor.cx.cy.d.decelerate.descent.diffuseConstant.direction.display.divisor.dominantBaseline.dur.dx.dy.edgeMode.elevation.enableBackground.end.exponent.externalResourcesRequired.fill.fillOpacity.fillRule.filter.filterRes.filterUnits.floodColor.floodOpacity.focusable.fontFamily.fontSize.fontSizeAdjust.fontStretch.fontStyle.fontVariant.fontWeight.format.from.fx.fy.g1.g2.glyphName.glyphOrientationHorizontal.glyphOrientationVertical.glyphRef.gradientTransform.gradientUnits.hanging.horizAdvX.horizOriginX.href.ideographic.imageRendering.in2.in.intercept.k1.k2.k3.k4.k.kernelMatrix.kernelUnitLength.kerning.keyPoints.keySplines.keyTimes.lengthAdjust.letterSpacing.lightingColor.limitingConeAngle.local.markerEnd.markerHeight.markerMid.markerStart.markerUnits.markerWidth.mask.maskContentUnits.maskUnits.mathematical.mode.numOctaves.offset.opacity.operator.order.orient.orientation.origin.overflow.overlinePosition.overlineThickness.paintOrder.panose1.pathLength.patternContentUnits.patternTransform.patternUnits.pointerEvents.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.r.radius.refX.refY.renderingIntent.repeatCount.repeatDur.requiredExtensions.requiredFeatures.restart.result.rotate.rx.ry.seed.shapeRendering.slope.spacing.specularConstant.specularExponent.speed.spreadMethod.startOffset.stdDeviation.stemh.stemv.stitchTiles.stopColor.stopOpacity.strikethroughPosition.strikethroughThickness.string.stroke.strokeDasharray.strokeDashoffset.strokeLinecap.strokeLinejoin.strokeMiterlimit.strokeOpacity.strokeWidth.surfaceScale.systemLanguage.tableValues.targetX.targetY.textAnchor.textDecoration.textLength.textRendering.to.transform.u1.u2.underlinePosition.underlineThickness.unicode.unicodeBidi.unicodeRange.unitsPerEm.vAlphabetic.values.vectorEffect.version.vertAdvY.vertOriginX.vertOriginY.vHanging.vIdeographic.viewTarget.visibility.vMathematical.widths.wordSpacing.writingMode.x1.x2.x.xChannelSelector.xHeight.xlinkActuate.xlinkArcrole.xlinkHref.xlinkRole.xlinkShow.xlinkTitle.xlinkType.xmlBase.xmlLang.xmlns.xmlnsXlink.xmlSpace.y1.y2.y.yChannelSelector.z.zoomAndPan.ref.key.angle".split("."));
-function rR(e) {
- return typeof e == "string" && lbe.has(e);
+var mbe = /* @__PURE__ */ new Set(/* @__PURE__ */ "aria-activedescendant.aria-atomic.aria-autocomplete.aria-busy.aria-checked.aria-colcount.aria-colindex.aria-colspan.aria-controls.aria-current.aria-describedby.aria-details.aria-disabled.aria-errormessage.aria-expanded.aria-flowto.aria-haspopup.aria-hidden.aria-invalid.aria-keyshortcuts.aria-label.aria-labelledby.aria-level.aria-live.aria-modal.aria-multiline.aria-multiselectable.aria-orientation.aria-owns.aria-placeholder.aria-posinset.aria-pressed.aria-readonly.aria-relevant.aria-required.aria-roledescription.aria-rowcount.aria-rowindex.aria-rowspan.aria-selected.aria-setsize.aria-sort.aria-valuemax.aria-valuemin.aria-valuenow.aria-valuetext.className.color.height.id.lang.max.media.method.min.name.style.target.width.role.tabIndex.accentHeight.accumulate.additive.alignmentBaseline.allowReorder.alphabetic.amplitude.arabicForm.ascent.attributeName.attributeType.autoReverse.azimuth.baseFrequency.baselineShift.baseProfile.bbox.begin.bias.by.calcMode.capHeight.clip.clipPath.clipPathUnits.clipRule.colorInterpolation.colorInterpolationFilters.colorProfile.colorRendering.contentScriptType.contentStyleType.cursor.cx.cy.d.decelerate.descent.diffuseConstant.direction.display.divisor.dominantBaseline.dur.dx.dy.edgeMode.elevation.enableBackground.end.exponent.externalResourcesRequired.fill.fillOpacity.fillRule.filter.filterRes.filterUnits.floodColor.floodOpacity.focusable.fontFamily.fontSize.fontSizeAdjust.fontStretch.fontStyle.fontVariant.fontWeight.format.from.fx.fy.g1.g2.glyphName.glyphOrientationHorizontal.glyphOrientationVertical.glyphRef.gradientTransform.gradientUnits.hanging.horizAdvX.horizOriginX.href.ideographic.imageRendering.in2.in.intercept.k1.k2.k3.k4.k.kernelMatrix.kernelUnitLength.kerning.keyPoints.keySplines.keyTimes.lengthAdjust.letterSpacing.lightingColor.limitingConeAngle.local.markerEnd.markerHeight.markerMid.markerStart.markerUnits.markerWidth.mask.maskContentUnits.maskUnits.mathematical.mode.numOctaves.offset.opacity.operator.order.orient.orientation.origin.overflow.overlinePosition.overlineThickness.paintOrder.panose1.pathLength.patternContentUnits.patternTransform.patternUnits.pointerEvents.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.r.radius.refX.refY.renderingIntent.repeatCount.repeatDur.requiredExtensions.requiredFeatures.restart.result.rotate.rx.ry.seed.shapeRendering.slope.spacing.specularConstant.specularExponent.speed.spreadMethod.startOffset.stdDeviation.stemh.stemv.stitchTiles.stopColor.stopOpacity.strikethroughPosition.strikethroughThickness.string.stroke.strokeDasharray.strokeDashoffset.strokeLinecap.strokeLinejoin.strokeMiterlimit.strokeOpacity.strokeWidth.surfaceScale.systemLanguage.tableValues.targetX.targetY.textAnchor.textDecoration.textLength.textRendering.to.transform.u1.u2.underlinePosition.underlineThickness.unicode.unicodeBidi.unicodeRange.unitsPerEm.vAlphabetic.values.vectorEffect.version.vertAdvY.vertOriginX.vertOriginY.vHanging.vIdeographic.viewTarget.visibility.vMathematical.widths.wordSpacing.writingMode.x1.x2.x.xChannelSelector.xHeight.xlinkActuate.xlinkArcrole.xlinkHref.xlinkRole.xlinkShow.xlinkTitle.xlinkType.xmlBase.xmlLang.xmlns.xmlnsXlink.xmlSpace.y1.y2.y.yChannelSelector.z.zoomAndPan.ref.key.angle".split("."));
+function nR(e) {
+ return typeof e == "string" && mbe.has(e);
}
-function iR(e) {
+function rR(e) {
return typeof e == "string" && e.startsWith("data-");
}
-function aR(e) {
+function iR(e) {
if (typeof e != "object" || !e) return {};
var t = {};
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (rR(n) || iR(n)) && (t[n] = e[n]);
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (nR(n) || rR(n)) && (t[n] = e[n]);
return t;
}
-function oR(e) {
+function aR(e) {
if (e == null) return null;
if (/*#__PURE__*/ (0, B.isValidElement)(e) && typeof e.props == "object" && e.props !== null) {
var t = e.props;
- return aR(t);
+ return iR(t);
}
- return typeof e == "object" && !Array.isArray(e) ? aR(e) : null;
+ return typeof e == "object" && !Array.isArray(e) ? iR(e) : null;
}
//#endregion
//#region node_modules/recharts/es6/util/svgPropertiesAndEvents.js
-function sR(e) {
+function oR(e) {
var t = {};
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (rR(n) || iR(n) || nR(n)) && (t[n] = e[n]);
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (nR(n) || rR(n) || tR(n)) && (t[n] = e[n]);
return t;
}
-function ube(e) {
- return e == null ? null : /*#__PURE__*/ (0, B.isValidElement)(e) ? sR(e.props) : typeof e == "object" && !Array.isArray(e) ? sR(e) : null;
+function hbe(e) {
+ return e == null ? null : /*#__PURE__*/ (0, B.isValidElement)(e) ? oR(e.props) : typeof e == "object" && !Array.isArray(e) ? oR(e) : null;
}
//#endregion
//#region node_modules/recharts/es6/container/Surface.js
-var dbe = [
+var gbe = [
"children",
"width",
"height",
@@ -51033,25 +51265,25 @@ var dbe = [
"title",
"desc"
];
-function cR() {
- return cR = Object.assign ? Object.assign.bind() : function(e) {
+function sR() {
+ return sR = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
}
return e;
- }, cR.apply(null, arguments);
+ }, sR.apply(null, arguments);
}
-function fbe(e, t) {
+function _be(e, t) {
if (e == null) return {};
- var n, r, i = pbe(e, t);
+ var n, r, i = vbe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function pbe(e, t) {
+function vbe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -51060,14 +51292,14 @@ function pbe(e, t) {
}
return n;
}
-var lR = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
- var { children: n, width: r, height: i, viewBox: a, className: o, style: s, title: c, desc: l } = e, u = fbe(e, dbe), d = a || {
+var cR = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
+ var { children: n, width: r, height: i, viewBox: a, className: o, style: s, title: c, desc: l } = e, u = _be(e, gbe), d = a || {
width: r,
height: i,
x: 0,
y: 0
}, f = Jr("recharts-surface", o);
- return /*#__PURE__*/ B.createElement("svg", cR({}, sR(u), {
+ return /*#__PURE__*/ B.createElement("svg", sR({}, oR(u), {
className: f,
width: r,
height: i,
@@ -51075,26 +51307,26 @@ var lR = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
viewBox: `${d.x} ${d.y} ${d.width} ${d.height}`,
ref: t
}), /*#__PURE__*/ B.createElement("title", null, c), /*#__PURE__*/ B.createElement("desc", null, l), n);
-}), mbe = ["children", "className"];
-function uR() {
- return uR = Object.assign ? Object.assign.bind() : function(e) {
+}), ybe = ["children", "className"];
+function lR() {
+ return lR = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
}
return e;
- }, uR.apply(null, arguments);
+ }, lR.apply(null, arguments);
}
-function hbe(e, t) {
+function bbe(e, t) {
if (e == null) return {};
- var n, r, i = gbe(e, t);
+ var n, r, i = xbe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function gbe(e, t) {
+function xbe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -51103,39 +51335,39 @@ function gbe(e, t) {
}
return n;
}
-var dR = /*#__PURE__*/ B.forwardRef((e, t) => {
- var { children: n, className: r } = e, i = hbe(e, mbe), a = Jr("recharts-layer", r);
- return /*#__PURE__*/ B.createElement("g", uR({ className: a }, sR(i), { ref: t }), n);
-}), fR = /*#__PURE__*/ (0, B.createContext)(null), _be = () => (0, B.useContext)(fR);
+var uR = /*#__PURE__*/ B.forwardRef((e, t) => {
+ var { children: n, className: r } = e, i = bbe(e, ybe), a = Jr("recharts-layer", r);
+ return /*#__PURE__*/ B.createElement("g", lR({ className: a }, oR(i), { ref: t }), n);
+}), dR = /*#__PURE__*/ (0, B.createContext)(null), Sbe = () => (0, B.useContext)(dR);
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/constant.js
-function pR(e) {
+function fR(e) {
return function() {
return e;
};
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/math.js
-var mR = Math.cos, hR = Math.sin, gR = Math.sqrt, _R = Math.PI;
-_R / 2;
-var vR = 2 * _R, yR = Math.PI, bR = 2 * yR, xR = 1e-6, vbe = bR - xR;
-function SR(e) {
+var pR = Math.cos, mR = Math.sin, hR = Math.sqrt, gR = Math.PI;
+gR / 2;
+var _R = 2 * gR, vR = Math.PI, yR = 2 * vR, bR = 1e-6, Cbe = yR - bR;
+function xR(e) {
this._ += e[0];
for (let t = 1, n = e.length; t < n; ++t) this._ += arguments[t] + e[t];
}
-function ybe(e) {
+function wbe(e) {
let t = Math.floor(e);
if (!(t >= 0)) throw Error(`invalid digits: ${e}`);
- if (t > 15) return SR;
+ if (t > 15) return xR;
let n = 10 ** t;
return function(e) {
this._ += e[0];
for (let t = 1, r = e.length; t < r; ++t) this._ += Math.round(arguments[t] * n) / n + e[t];
};
}
-var CR = class {
+var SR = class {
constructor(e) {
- this._x0 = this._y0 = this._x1 = this._y1 = null, this._ = "", this._append = e == null ? SR : ybe(e);
+ this._x0 = this._y0 = this._x1 = this._y1 = null, this._ = "", this._append = e == null ? xR : wbe(e);
}
moveTo(e, t) {
this._append`M${this._x0 = this._x1 = +e},${this._y0 = this._y1 = +t}`;
@@ -51156,18 +51388,18 @@ var CR = class {
if (e = +e, t = +t, n = +n, r = +r, i = +i, i < 0) throw Error(`negative radius: ${i}`);
let a = this._x1, o = this._y1, s = n - e, c = r - t, l = a - e, u = o - t, d = l * l + u * u;
if (this._x1 === null) this._append`M${this._x1 = e},${this._y1 = t}`;
- else if (d > xR) {
- if (!(Math.abs(u * s - c * l) > xR) || !i) this._append`L${this._x1 = e},${this._y1 = t}`;
+ else if (d > bR) {
+ if (!(Math.abs(u * s - c * l) > bR) || !i) this._append`L${this._x1 = e},${this._y1 = t}`;
else {
- let f = n - a, p = r - o, m = s * s + c * c, h = f * f + p * p, g = Math.sqrt(m), _ = Math.sqrt(d), v = i * Math.tan((yR - Math.acos((m + d - h) / (2 * g * _))) / 2), y = v / _, b = v / g;
- Math.abs(y - 1) > xR && this._append`L${e + y * l},${t + y * u}`, this._append`A${i},${i},0,0,${+(u * f > l * p)},${this._x1 = e + b * s},${this._y1 = t + b * c}`;
+ let f = n - a, p = r - o, m = s * s + c * c, h = f * f + p * p, g = Math.sqrt(m), _ = Math.sqrt(d), v = i * Math.tan((vR - Math.acos((m + d - h) / (2 * g * _))) / 2), y = v / _, b = v / g;
+ Math.abs(y - 1) > bR && this._append`L${e + y * l},${t + y * u}`, this._append`A${i},${i},0,0,${+(u * f > l * p)},${this._x1 = e + b * s},${this._y1 = t + b * c}`;
}
}
}
arc(e, t, n, r, i, a) {
if (e = +e, t = +t, n = +n, a = !!a, n < 0) throw Error(`negative radius: ${n}`);
let o = n * Math.cos(r), s = n * Math.sin(r), c = e + o, l = t + s, u = 1 ^ a, d = a ? r - i : i - r;
- this._x1 === null ? this._append`M${c},${l}` : (Math.abs(this._x1 - c) > xR || Math.abs(this._y1 - l) > xR) && this._append`L${c},${l}`, n && (d < 0 && (d = d % bR + bR), d > vbe ? this._append`A${n},${n},0,1,${u},${e - o},${t - s}A${n},${n},0,1,${u},${this._x1 = c},${this._y1 = l}` : d > xR && this._append`A${n},${n},0,${+(d >= yR)},${u},${this._x1 = e + n * Math.cos(i)},${this._y1 = t + n * Math.sin(i)}`);
+ this._x1 === null ? this._append`M${c},${l}` : (Math.abs(this._x1 - c) > bR || Math.abs(this._y1 - l) > bR) && this._append`L${c},${l}`, n && (d < 0 && (d = d % yR + yR), d > Cbe ? this._append`A${n},${n},0,1,${u},${e - o},${t - s}A${n},${n},0,1,${u},${this._x1 = c},${this._y1 = l}` : d > bR && this._append`A${n},${n},0,${+(d >= vR)},${u},${this._x1 = e + n * Math.cos(i)},${this._y1 = t + n * Math.sin(i)}`);
}
rect(e, t, n, r) {
this._append`M${this._x0 = this._x1 = +e},${this._y0 = this._y1 = +t}h${n = +n}v${+r}h${-n}Z`;
@@ -51176,10 +51408,10 @@ var CR = class {
return this._;
}
};
-CR.prototype;
+SR.prototype;
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/path.js
-function wR(e) {
+function CR(e) {
let t = 3;
return e.digits = function(n) {
if (!arguments.length) return t;
@@ -51190,18 +51422,18 @@ function wR(e) {
t = e;
}
return e;
- }, () => new CR(t);
+ }, () => new SR(t);
}
Array.prototype.slice;
-function TR(e) {
+function wR(e) {
return typeof e == "object" && "length" in e ? e : Array.from(e);
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/curve/linear.js
-function ER(e) {
+function TR(e) {
this._context = e;
}
-ER.prototype = {
+TR.prototype = {
areaStart: function() {
this._line = 0;
},
@@ -51224,33 +51456,33 @@ ER.prototype = {
}
}
};
-function DR(e) {
- return new ER(e);
+function ER(e) {
+ return new TR(e);
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/point.js
-function OR(e) {
+function DR(e) {
return e[0];
}
-function kR(e) {
+function OR(e) {
return e[1];
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/line.js
-function AR(e, t) {
- var n = pR(!0), r = null, i = DR, a = null, o = wR(s);
- e = typeof e == "function" ? e : e === void 0 ? OR : pR(e), t = typeof t == "function" ? t : t === void 0 ? kR : pR(t);
+function kR(e, t) {
+ var n = fR(!0), r = null, i = ER, a = null, o = CR(s);
+ e = typeof e == "function" ? e : e === void 0 ? DR : fR(e), t = typeof t == "function" ? t : t === void 0 ? OR : fR(t);
function s(s) {
- var c, l = (s = TR(s)).length, u, d = !1, f;
+ var c, l = (s = wR(s)).length, u, d = !1, f;
for (r ?? (a = i(f = o())), c = 0; c <= l; ++c) !(c < l && n(u = s[c], c, s)) === d && ((d = !d) ? a.lineStart() : a.lineEnd()), d && a.point(+e(u, c, s), +t(u, c, s));
if (f) return a = null, f + "" || null;
}
return s.x = function(t) {
- return arguments.length ? (e = typeof t == "function" ? t : pR(+t), s) : e;
+ return arguments.length ? (e = typeof t == "function" ? t : fR(+t), s) : e;
}, s.y = function(e) {
- return arguments.length ? (t = typeof e == "function" ? e : pR(+e), s) : t;
+ return arguments.length ? (t = typeof e == "function" ? e : fR(+e), s) : t;
}, s.defined = function(e) {
- return arguments.length ? (n = typeof e == "function" ? e : pR(!!e), s) : n;
+ return arguments.length ? (n = typeof e == "function" ? e : fR(!!e), s) : n;
}, s.curve = function(e) {
return arguments.length ? (i = e, r != null && (a = i(r)), s) : i;
}, s.context = function(e) {
@@ -51259,11 +51491,11 @@ function AR(e, t) {
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/area.js
-function jR(e, t, n) {
- var r = null, i = pR(!0), a = null, o = DR, s = null, c = wR(l);
- e = typeof e == "function" ? e : e === void 0 ? OR : pR(+e), t = typeof t == "function" ? t : pR(t === void 0 ? 0 : +t), n = typeof n == "function" ? n : n === void 0 ? kR : pR(+n);
+function AR(e, t, n) {
+ var r = null, i = fR(!0), a = null, o = ER, s = null, c = CR(l);
+ e = typeof e == "function" ? e : e === void 0 ? DR : fR(+e), t = typeof t == "function" ? t : fR(t === void 0 ? 0 : +t), n = typeof n == "function" ? n : n === void 0 ? OR : fR(+n);
function l(l) {
- var u, d, f, p = (l = TR(l)).length, m, h = !1, g, _ = Array(p), v = Array(p);
+ var u, d, f, p = (l = wR(l)).length, m, h = !1, g, _ = Array(p), v = Array(p);
for (a ?? (s = o(g = c())), u = 0; u <= p; ++u) {
if (!(u < p && i(m = l[u], u, l)) === h) {
if (h = !h) d = u, s.areaStart(), s.lineStart();
@@ -51277,20 +51509,20 @@ function jR(e, t, n) {
if (g) return s = null, g + "" || null;
}
function u() {
- return AR().defined(i).curve(o).context(a);
+ return kR().defined(i).curve(o).context(a);
}
return l.x = function(t) {
- return arguments.length ? (e = typeof t == "function" ? t : pR(+t), r = null, l) : e;
+ return arguments.length ? (e = typeof t == "function" ? t : fR(+t), r = null, l) : e;
}, l.x0 = function(t) {
- return arguments.length ? (e = typeof t == "function" ? t : pR(+t), l) : e;
+ return arguments.length ? (e = typeof t == "function" ? t : fR(+t), l) : e;
}, l.x1 = function(e) {
- return arguments.length ? (r = e == null ? null : typeof e == "function" ? e : pR(+e), l) : r;
+ return arguments.length ? (r = e == null ? null : typeof e == "function" ? e : fR(+e), l) : r;
}, l.y = function(e) {
- return arguments.length ? (t = typeof e == "function" ? e : pR(+e), n = null, l) : t;
+ return arguments.length ? (t = typeof e == "function" ? e : fR(+e), n = null, l) : t;
}, l.y0 = function(e) {
- return arguments.length ? (t = typeof e == "function" ? e : pR(+e), l) : t;
+ return arguments.length ? (t = typeof e == "function" ? e : fR(+e), l) : t;
}, l.y1 = function(e) {
- return arguments.length ? (n = e == null ? null : typeof e == "function" ? e : pR(+e), l) : n;
+ return arguments.length ? (n = e == null ? null : typeof e == "function" ? e : fR(+e), l) : n;
}, l.lineX0 = l.lineY0 = function() {
return u().x(e).y(t);
}, l.lineY1 = function() {
@@ -51298,7 +51530,7 @@ function jR(e, t, n) {
}, l.lineX1 = function() {
return u().x(r).y(t);
}, l.defined = function(e) {
- return arguments.length ? (i = typeof e == "function" ? e : pR(!!e), l) : i;
+ return arguments.length ? (i = typeof e == "function" ? e : fR(!!e), l) : i;
}, l.curve = function(e) {
return arguments.length ? (o = e, a != null && (s = o(a)), l) : o;
}, l.context = function(e) {
@@ -51307,7 +51539,7 @@ function jR(e, t, n) {
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/curve/bump.js
-var MR = class {
+var jR = class {
constructor(e, t) {
this._context = e, this._x = t;
}
@@ -51334,70 +51566,70 @@ var MR = class {
this._x0 = e, this._y0 = t;
}
};
-function bbe(e) {
- return new MR(e, !0);
+function Tbe(e) {
+ return new jR(e, !0);
}
-function xbe(e) {
- return new MR(e, !1);
+function Ebe(e) {
+ return new jR(e, !1);
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/symbol/circle.js
-var NR = { draw(e, t) {
- let n = gR(t / _R);
- e.moveTo(n, 0), e.arc(0, 0, n, 0, vR);
-} }, Sbe = { draw(e, t) {
- let n = gR(t / 5) / 2;
+var MR = { draw(e, t) {
+ let n = hR(t / gR);
+ e.moveTo(n, 0), e.arc(0, 0, n, 0, _R);
+} }, Dbe = { draw(e, t) {
+ let n = hR(t / 5) / 2;
e.moveTo(-3 * n, -n), e.lineTo(-n, -n), e.lineTo(-n, -3 * n), e.lineTo(n, -3 * n), e.lineTo(n, -n), e.lineTo(3 * n, -n), e.lineTo(3 * n, n), e.lineTo(n, n), e.lineTo(n, 3 * n), e.lineTo(-n, 3 * n), e.lineTo(-n, n), e.lineTo(-3 * n, n), e.closePath();
-} }, PR = gR(1 / 3), Cbe = PR * 2, wbe = { draw(e, t) {
- let n = gR(t / Cbe), r = n * PR;
+} }, NR = hR(1 / 3), Obe = NR * 2, kbe = { draw(e, t) {
+ let n = hR(t / Obe), r = n * NR;
e.moveTo(0, -n), e.lineTo(r, 0), e.lineTo(0, n), e.lineTo(-r, 0), e.closePath();
-} }, Tbe = { draw(e, t) {
- let n = gR(t), r = -n / 2;
+} }, Abe = { draw(e, t) {
+ let n = hR(t), r = -n / 2;
e.rect(r, r, n, n);
-} }, Ebe = .8908130915292852, FR = hR(_R / 10) / hR(7 * _R / 10), Dbe = hR(vR / 10) * FR, Obe = -mR(vR / 10) * FR, kbe = { draw(e, t) {
- let n = gR(t * Ebe), r = Dbe * n, i = Obe * n;
+} }, jbe = .8908130915292852, PR = mR(gR / 10) / mR(7 * gR / 10), Mbe = mR(_R / 10) * PR, Nbe = -pR(_R / 10) * PR, Pbe = { draw(e, t) {
+ let n = hR(t * jbe), r = Mbe * n, i = Nbe * n;
e.moveTo(0, -n), e.lineTo(r, i);
for (let t = 1; t < 5; ++t) {
- let a = vR * t / 5, o = mR(a), s = hR(a);
+ let a = _R * t / 5, o = pR(a), s = mR(a);
e.lineTo(s * n, -o * n), e.lineTo(o * r - s * i, s * r + o * i);
}
e.closePath();
-} }, IR = gR(3), Abe = { draw(e, t) {
- let n = -gR(t / (IR * 3));
- e.moveTo(0, n * 2), e.lineTo(-IR * n, -n), e.lineTo(IR * n, -n), e.closePath();
-} }, LR = -.5, RR = gR(3) / 2, zR = 1 / gR(12), jbe = (zR / 2 + 1) * 3, Mbe = { draw(e, t) {
- let n = gR(t / jbe), r = n / 2, i = n * zR, a = r, o = n * zR + n, s = -a, c = o;
- e.moveTo(r, i), e.lineTo(a, o), e.lineTo(s, c), e.lineTo(LR * r - RR * i, RR * r + LR * i), e.lineTo(LR * a - RR * o, RR * a + LR * o), e.lineTo(LR * s - RR * c, RR * s + LR * c), e.lineTo(LR * r + RR * i, LR * i - RR * r), e.lineTo(LR * a + RR * o, LR * o - RR * a), e.lineTo(LR * s + RR * c, LR * c - RR * s), e.closePath();
+} }, FR = hR(3), Fbe = { draw(e, t) {
+ let n = -hR(t / (FR * 3));
+ e.moveTo(0, n * 2), e.lineTo(-FR * n, -n), e.lineTo(FR * n, -n), e.closePath();
+} }, IR = -.5, LR = hR(3) / 2, RR = 1 / hR(12), Ibe = (RR / 2 + 1) * 3, Lbe = { draw(e, t) {
+ let n = hR(t / Ibe), r = n / 2, i = n * RR, a = r, o = n * RR + n, s = -a, c = o;
+ e.moveTo(r, i), e.lineTo(a, o), e.lineTo(s, c), e.lineTo(IR * r - LR * i, LR * r + IR * i), e.lineTo(IR * a - LR * o, LR * a + IR * o), e.lineTo(IR * s - LR * c, LR * s + IR * c), e.lineTo(IR * r + LR * i, IR * i - LR * r), e.lineTo(IR * a + LR * o, IR * o - LR * a), e.lineTo(IR * s + LR * c, IR * c - LR * s), e.closePath();
} };
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/symbol.js
-function Nbe(e, t) {
- let n = null, r = wR(i);
- e = typeof e == "function" ? e : pR(e || NR), t = typeof t == "function" ? t : pR(t === void 0 ? 64 : +t);
+function Rbe(e, t) {
+ let n = null, r = CR(i);
+ e = typeof e == "function" ? e : fR(e || MR), t = typeof t == "function" ? t : fR(t === void 0 ? 64 : +t);
function i() {
let i;
if (n ||= i = r(), e.apply(this, arguments).draw(n, +t.apply(this, arguments)), i) return n = null, i + "" || null;
}
return i.type = function(t) {
- return arguments.length ? (e = typeof t == "function" ? t : pR(t), i) : e;
+ return arguments.length ? (e = typeof t == "function" ? t : fR(t), i) : e;
}, i.size = function(e) {
- return arguments.length ? (t = typeof e == "function" ? e : pR(+e), i) : t;
+ return arguments.length ? (t = typeof e == "function" ? e : fR(+e), i) : t;
}, i.context = function(e) {
return arguments.length ? (n = e ?? null, i) : n;
}, i;
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/noop.js
-function BR() {}
+function zR() {}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/curve/basis.js
-function VR(e, t, n) {
+function BR(e, t, n) {
e._context.bezierCurveTo((2 * e._x0 + e._x1) / 3, (2 * e._y0 + e._y1) / 3, (e._x0 + 2 * e._x1) / 3, (e._y0 + 2 * e._y1) / 3, (e._x0 + 4 * e._x1 + t) / 6, (e._y0 + 4 * e._y1 + n) / 6);
}
-function HR(e) {
+function VR(e) {
this._context = e;
}
-HR.prototype = {
+VR.prototype = {
areaStart: function() {
this._line = 0;
},
@@ -51409,7 +51641,7 @@ HR.prototype = {
},
lineEnd: function() {
switch (this._point) {
- case 3: VR(this, this._x1, this._y1);
+ case 3: BR(this, this._x1, this._y1);
case 2: this._context.lineTo(this._x1, this._y1);
}
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
@@ -51423,22 +51655,22 @@ HR.prototype = {
this._point = 2;
break;
case 2: this._point = 3, this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6);
- default: VR(this, e, t);
+ default: BR(this, e, t);
}
this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t;
}
};
-function Pbe(e) {
- return new HR(e);
+function zbe(e) {
+ return new VR(e);
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/curve/basisClosed.js
-function UR(e) {
+function HR(e) {
this._context = e;
}
-UR.prototype = {
- areaStart: BR,
- areaEnd: BR,
+HR.prototype = {
+ areaStart: zR,
+ areaEnd: zR,
lineStart: function() {
this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN, this._point = 0;
},
@@ -51464,20 +51696,20 @@ UR.prototype = {
case 2:
this._point = 3, this._x4 = e, this._y4 = t, this._context.moveTo((this._x0 + 4 * this._x1 + e) / 6, (this._y0 + 4 * this._y1 + t) / 6);
break;
- default: VR(this, e, t);
+ default: BR(this, e, t);
}
this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t;
}
};
-function Fbe(e) {
- return new UR(e);
+function Bbe(e) {
+ return new HR(e);
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/curve/basisOpen.js
-function WR(e) {
+function UR(e) {
this._context = e;
}
-WR.prototype = {
+UR.prototype = {
areaStart: function() {
this._line = 0;
},
@@ -51504,22 +51736,22 @@ WR.prototype = {
this._line ? this._context.lineTo(n, r) : this._context.moveTo(n, r);
break;
case 3: this._point = 4;
- default: VR(this, e, t);
+ default: BR(this, e, t);
}
this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t;
}
};
-function Ibe(e) {
- return new WR(e);
+function Vbe(e) {
+ return new UR(e);
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/curve/linearClosed.js
-function GR(e) {
+function WR(e) {
this._context = e;
}
-GR.prototype = {
- areaStart: BR,
- areaEnd: BR,
+WR.prototype = {
+ areaStart: zR,
+ areaEnd: zR,
lineStart: function() {
this._point = 0;
},
@@ -51530,30 +51762,30 @@ GR.prototype = {
e = +e, t = +t, this._point ? this._context.lineTo(e, t) : (this._point = 1, this._context.moveTo(e, t));
}
};
-function Lbe(e) {
- return new GR(e);
+function Hbe(e) {
+ return new WR(e);
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/curve/monotone.js
-function KR(e) {
+function GR(e) {
return e < 0 ? -1 : 1;
}
-function qR(e, t, n) {
+function KR(e, t, n) {
var r = e._x1 - e._x0, i = t - e._x1, a = (e._y1 - e._y0) / (r || i < 0 && -0), o = (n - e._y1) / (i || r < 0 && -0), s = (a * i + o * r) / (r + i);
- return (KR(a) + KR(o)) * Math.min(Math.abs(a), Math.abs(o), .5 * Math.abs(s)) || 0;
+ return (GR(a) + GR(o)) * Math.min(Math.abs(a), Math.abs(o), .5 * Math.abs(s)) || 0;
}
-function JR(e, t) {
+function qR(e, t) {
var n = e._x1 - e._x0;
return n ? (3 * (e._y1 - e._y0) / n - t) / 2 : t;
}
-function YR(e, t, n) {
+function JR(e, t, n) {
var r = e._x0, i = e._y0, a = e._x1, o = e._y1, s = (a - r) / 3;
e._context.bezierCurveTo(r + s, i + s * t, a - s, o - s * n, a, o);
}
-function XR(e) {
+function YR(e) {
this._context = e;
}
-XR.prototype = {
+YR.prototype = {
areaStart: function() {
this._line = 0;
},
@@ -51568,7 +51800,7 @@ XR.prototype = {
case 2:
this._context.lineTo(this._x1, this._y1);
break;
- case 3: YR(this, this._t0, JR(this, this._t0));
+ case 3: JR(this, this._t0, qR(this, this._t0));
}
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
},
@@ -51583,24 +51815,24 @@ XR.prototype = {
this._point = 2;
break;
case 2:
- this._point = 3, YR(this, JR(this, n = qR(this, e, t)), n);
+ this._point = 3, JR(this, qR(this, n = KR(this, e, t)), n);
break;
- default: YR(this, this._t0, n = qR(this, e, t));
+ default: JR(this, this._t0, n = KR(this, e, t));
}
this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t, this._t0 = n;
}
}
};
-function ZR(e) {
- this._context = new QR(e);
+function XR(e) {
+ this._context = new ZR(e);
}
-(ZR.prototype = Object.create(XR.prototype)).point = function(e, t) {
- XR.prototype.point.call(this, t, e);
+(XR.prototype = Object.create(YR.prototype)).point = function(e, t) {
+ YR.prototype.point.call(this, t, e);
};
-function QR(e) {
+function ZR(e) {
this._context = e;
}
-QR.prototype = {
+ZR.prototype = {
moveTo: function(e, t) {
this._context.moveTo(t, e);
},
@@ -51614,18 +51846,18 @@ QR.prototype = {
this._context.bezierCurveTo(t, e, r, n, a, i);
}
};
-function Rbe(e) {
- return new XR(e);
+function Ube(e) {
+ return new YR(e);
}
-function zbe(e) {
- return new ZR(e);
+function Wbe(e) {
+ return new XR(e);
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/curve/natural.js
-function $R(e) {
+function QR(e) {
this._context = e;
}
-$R.prototype = {
+QR.prototype = {
areaStart: function() {
this._line = 0;
},
@@ -51639,7 +51871,7 @@ $R.prototype = {
var e = this._x, t = this._y, n = e.length;
if (n) {
if (this._line ? this._context.lineTo(e[0], t[0]) : this._context.moveTo(e[0], t[0]), n === 2) this._context.lineTo(e[1], t[1]);
- else for (var r = ez(e), i = ez(t), a = 0, o = 1; o < n; ++a, ++o) this._context.bezierCurveTo(r[0][a], i[0][a], r[1][a], i[1][a], e[o], t[o]);
+ else for (var r = $R(e), i = $R(t), a = 0, o = 1; o < n; ++a, ++o) this._context.bezierCurveTo(r[0][a], i[0][a], r[1][a], i[1][a], e[o], t[o]);
}
(this._line || this._line !== 0 && n === 1) && this._context.closePath(), this._line = 1 - this._line, this._x = this._y = null;
},
@@ -51647,7 +51879,7 @@ $R.prototype = {
this._x.push(+e), this._y.push(+t);
}
};
-function ez(e) {
+function $R(e) {
var t, n = e.length - 1, r, i = Array(n), a = Array(n), o = Array(n);
for (i[0] = 0, a[0] = 2, o[0] = e[0] + 2 * e[1], t = 1; t < n - 1; ++t) i[t] = 1, a[t] = 4, o[t] = 4 * e[t] + 2 * e[t + 1];
for (i[n - 1] = 2, a[n - 1] = 7, o[n - 1] = 8 * e[n - 1] + e[n], t = 1; t < n; ++t) r = i[t] / a[t - 1], a[t] -= r, o[t] -= r * o[t - 1];
@@ -51655,15 +51887,15 @@ function ez(e) {
for (a[n - 1] = (e[n] + i[n - 1]) / 2, t = 0; t < n - 1; ++t) a[t] = 2 * e[t + 1] - i[t + 1];
return [i, a];
}
-function Bbe(e) {
- return new $R(e);
+function Gbe(e) {
+ return new QR(e);
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/curve/step.js
-function tz(e, t) {
+function ez(e, t) {
this._context = e, this._t = t;
}
-tz.prototype = {
+ez.prototype = {
areaStart: function() {
this._line = 0;
},
@@ -51691,78 +51923,78 @@ tz.prototype = {
this._x = e, this._y = t;
}
};
-function Vbe(e) {
- return new tz(e, .5);
+function Kbe(e) {
+ return new ez(e, .5);
}
-function Hbe(e) {
- return new tz(e, 0);
+function qbe(e) {
+ return new ez(e, 0);
}
-function Ube(e) {
- return new tz(e, 1);
+function Jbe(e) {
+ return new ez(e, 1);
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/offset/none.js
-function nz(e, t) {
+function tz(e, t) {
if ((o = e.length) > 1) for (var n = 1, r, i, a = e[t[0]], o, s = a.length; n < o; ++n) for (i = a, a = e[t[n]], r = 0; r < s; ++r) a[r][1] += a[r][0] = isNaN(i[r][1]) ? i[r][0] : i[r][1];
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/order/none.js
-function rz(e) {
+function nz(e) {
for (var t = e.length, n = Array(t); --t >= 0;) n[t] = t;
return n;
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/stack.js
-function Wbe(e, t) {
+function Ybe(e, t) {
return e[t];
}
-function Gbe(e) {
+function Xbe(e) {
let t = [];
return t.key = e, t;
}
-function Kbe() {
- var e = pR([]), t = rz, n = nz, r = Wbe;
+function Zbe() {
+ var e = fR([]), t = nz, n = tz, r = Ybe;
function i(i) {
- var a = Array.from(e.apply(this, arguments), Gbe), o, s = a.length, c = -1, l;
+ var a = Array.from(e.apply(this, arguments), Xbe), o, s = a.length, c = -1, l;
for (let e of i) for (o = 0, ++c; o < s; ++o) (a[o][c] = [0, +r(e, a[o].key, c, i)]).data = e;
- for (o = 0, l = TR(t(a)); o < s; ++o) a[l[o]].index = o;
+ for (o = 0, l = wR(t(a)); o < s; ++o) a[l[o]].index = o;
return n(a, l), a;
}
return i.keys = function(t) {
- return arguments.length ? (e = typeof t == "function" ? t : pR(Array.from(t)), i) : e;
+ return arguments.length ? (e = typeof t == "function" ? t : fR(Array.from(t)), i) : e;
}, i.value = function(e) {
- return arguments.length ? (r = typeof e == "function" ? e : pR(+e), i) : r;
+ return arguments.length ? (r = typeof e == "function" ? e : fR(+e), i) : r;
}, i.order = function(e) {
- return arguments.length ? (t = e == null ? rz : typeof e == "function" ? e : pR(Array.from(e)), i) : t;
+ return arguments.length ? (t = e == null ? nz : typeof e == "function" ? e : fR(Array.from(e)), i) : t;
}, i.offset = function(e) {
- return arguments.length ? (n = e ?? nz, i) : n;
+ return arguments.length ? (n = e ?? tz, i) : n;
}, i;
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/offset/expand.js
-function qbe(e, t) {
+function Qbe(e, t) {
if ((r = e.length) > 0) {
for (var n, r, i = 0, a = e[0].length, o; i < a; ++i) {
for (o = n = 0; n < r; ++n) o += e[n][i][1] || 0;
if (o) for (n = 0; n < r; ++n) e[n][i][1] /= o;
}
- nz(e, t);
+ tz(e, t);
}
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/offset/silhouette.js
-function Jbe(e, t) {
+function $be(e, t) {
if ((i = e.length) > 0) {
for (var n = 0, r = e[t[0]], i, a = r.length; n < a; ++n) {
for (var o = 0, s = 0; o < i; ++o) s += e[o][n][1] || 0;
r[n][1] += r[n][0] = -s / 2;
}
- nz(e, t);
+ tz(e, t);
}
}
//#endregion
//#region node_modules/victory-vendor/node_modules/d3-shape/src/offset/wiggle.js
-function Ybe(e, t) {
+function exe(e, t) {
if (!(!((o = e.length) > 0) || !((a = (i = e[t[0]]).length) > 0))) {
for (var n = 0, r = 1, i, a, o; r < a; ++r) {
for (var s = 0, c = 0, l = 0; s < o; ++s) {
@@ -51774,53 +52006,53 @@ function Ybe(e, t) {
}
i[r - 1][1] += i[r - 1][0] = n, c && (n -= l / c);
}
- i[r - 1][1] += i[r - 1][0] = n, nz(e, t);
+ i[r - 1][1] += i[r - 1][0] = n, tz(e, t);
}
}
//#endregion
//#region node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
-function iz(e) {
+function rz(e) {
return e === "__proto__";
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/_internal/isDeepKey.mjs
-var Xbe = /\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;
-function az(e) {
+var txe = /\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;
+function iz(e) {
switch (typeof e) {
case "number":
case "symbol": return !1;
- case "string": return e === "" || e.startsWith(".") || e.endsWith(".") ? !1 : Xbe.test(e);
+ case "string": return e === "" || e.startsWith(".") || e.endsWith(".") ? !1 : txe.test(e);
default: return !1;
}
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/_internal/toKey.mjs
-function oz(e) {
+function az(e) {
return typeof e == "string" || typeof e == "symbol" ? e : Object.is(e?.valueOf?.(), -0) ? "-0" : String(e);
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/predicate/isSymbol.mjs
-function sz(e) {
+function oz(e) {
return typeof e == "symbol" || e instanceof Symbol;
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/util/toString.mjs
-function Zbe(e) {
- return e == null ? "" : cz(e);
+function nxe(e) {
+ return e == null ? "" : sz(e);
}
-function cz(e) {
+function sz(e) {
if (typeof e == "string") return e;
- if (Array.isArray(e)) return e.map(cz).join(",");
- if (sz(e)) return e.toString();
+ if (Array.isArray(e)) return e.map(sz).join(",");
+ if (oz(e)) return e.toString();
let t = e + "";
return t === "0" && Object.is(Number(e), -0) ? "-0" : t;
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/util/toPath.mjs
-function lz(e) {
- if (Array.isArray(e)) return e.map(oz);
+function cz(e) {
+ if (Array.isArray(e)) return e.map(az);
if (typeof e == "symbol") return [e];
- e = Zbe(e);
+ e = nxe(e);
let t = [], n = e.length;
if (n === 0) return t;
let r = 0, i = "", a = "", o = !1, s = !1, c = /^-?\d+(?:\.\d+)?$/;
@@ -51848,100 +52080,100 @@ function lz(e) {
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/object/get.mjs
-function uz(e, t, n) {
+function lz(e, t, n) {
if (e == null) return n;
switch (typeof t) {
case "string": {
- if (iz(t)) return n;
+ if (rz(t)) return n;
let r = e[t];
- return r === void 0 ? az(t) && !Object.hasOwn(e, t) ? uz(e, lz(t), n) : n : r;
+ return r === void 0 ? iz(t) && !Object.hasOwn(e, t) ? lz(e, cz(t), n) : n : r;
}
case "number":
case "symbol": {
- typeof t == "number" && (t = oz(t));
+ typeof t == "number" && (t = az(t));
let r = e[t];
return r === void 0 ? n : r;
}
default: {
- if (Array.isArray(t)) return Qbe(e, t, n);
- if (t = Object.is(t?.valueOf(), -0) ? "-0" : String(t), iz(t)) return n;
+ if (Array.isArray(t)) return rxe(e, t, n);
+ if (t = Object.is(t?.valueOf(), -0) ? "-0" : String(t), rz(t)) return n;
let r = e[t];
return r === void 0 ? n : r;
}
}
}
-function Qbe(e, t, n) {
+function rxe(e, t, n) {
if (t.length === 0) return n;
let r = e;
for (let e = 0; e < t.length; e++) {
- if (r == null || iz(t[e])) return n;
+ if (r == null || rz(t[e])) return n;
r = r[t[e]];
}
return r === void 0 ? n : r;
}
//#endregion
//#region node_modules/recharts/es6/util/round.js
-var $be = 4;
-function dz(e) {
- var t = 10 ** (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : $be), n = Math.round(e * t) / t;
+var ixe = 4;
+function uz(e) {
+ var t = 10 ** (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ixe), n = Math.round(e * t) / t;
return Object.is(n, -0) ? 0 : n;
}
-function fz(e) {
+function dz(e) {
var t = [...arguments].slice(1);
return e.reduce((e, n, r) => {
var i = t[r - 1];
- return typeof i == "string" ? e + i + n : i === void 0 ? e + n : e + dz(i) + n;
+ return typeof i == "string" ? e + i + n : i === void 0 ? e + n : e + uz(i) + n;
}, "");
}
//#endregion
//#region node_modules/recharts/es6/util/DataUtils.js
-var pz = (e) => e === 0 ? 0 : e > 0 ? 1 : -1, mz = (e) => typeof e == "number" && e != +e, hz = (e) => typeof e == "string" && e.indexOf("%") === e.length - 1, Z = (e) => (typeof e == "number" || e instanceof Number) && !mz(e), gz = (e) => Z(e) || typeof e == "string", exe = 0, _z = (e) => {
- var t = ++exe;
+var fz = (e) => e === 0 ? 0 : e > 0 ? 1 : -1, pz = (e) => typeof e == "number" && e != +e, mz = (e) => typeof e == "string" && e.indexOf("%") === e.length - 1, Z = (e) => (typeof e == "number" || e instanceof Number) && !pz(e), hz = (e) => Z(e) || typeof e == "string", axe = 0, gz = (e) => {
+ var t = ++axe;
return `${e || ""}${t}`;
-}, vz = function(e, t) {
+}, _z = function(e, t) {
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, r = arguments.length > 3 && arguments[3] !== void 0 && arguments[3];
if (!Z(e) && typeof e != "string") return n;
var i;
- if (hz(e)) {
+ if (mz(e)) {
if (t == null) return n;
var a = e.indexOf("%");
i = t * parseFloat(e.slice(0, a)) / 100;
} else i = +e;
- return mz(i) && (i = n), r && t != null && i > t && (i = t), i;
-}, yz = (e) => {
+ return pz(i) && (i = n), r && t != null && i > t && (i = t), i;
+}, vz = (e) => {
if (!Array.isArray(e)) return !1;
for (var t = e.length, n = {}, r = 0; r < t; r++) if (!n[String(e[r])]) n[String(e[r])] = !0;
else return !0;
return !1;
};
-function bz(e, t, n) {
- return Z(e) && Z(t) ? dz(e + n * (t - e)) : t;
+function yz(e, t, n) {
+ return Z(e) && Z(t) ? uz(e + n * (t - e)) : t;
}
-function xz(e, t, n) {
- if (!(!e || !e.length)) return e.find((e) => e && (typeof t == "function" ? t(e) : uz(e, t)) === n);
+function bz(e, t, n) {
+ if (!(!e || !e.length)) return e.find((e) => e && (typeof t == "function" ? t(e) : lz(e, t)) === n);
}
-var Sz = (e) => e == null, Cz = (e) => Sz(e) ? e : `${e.charAt(0).toUpperCase()}${e.slice(1)}`;
-function wz(e) {
+var xz = (e) => e == null, Sz = (e) => xz(e) ? e : `${e.charAt(0).toUpperCase()}${e.slice(1)}`;
+function Cz(e) {
return e != null;
}
-function Tz() {}
+function wz() {}
//#endregion
//#region node_modules/recharts/es6/shape/Symbols.js
-var txe = [
+var oxe = [
"type",
"size",
"sizeType"
];
-function Ez() {
- return Ez = Object.assign ? Object.assign.bind() : function(e) {
+function Tz() {
+ return Tz = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
}
return e;
- }, Ez.apply(null, arguments);
+ }, Tz.apply(null, arguments);
}
-function Dz(e, t) {
+function Ez(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
@@ -51951,30 +52183,30 @@ function Dz(e, t) {
}
return n;
}
-function Oz(e) {
+function Dz(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
- t % 2 ? Dz(Object(n), !0).forEach(function(t) {
- nxe(e, t, n[t]);
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Dz(Object(n)).forEach(function(t) {
+ t % 2 ? Ez(Object(n), !0).forEach(function(t) {
+ sxe(e, t, n[t]);
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Ez(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function nxe(e, t, n) {
- return (t = rxe(t)) in e ? Object.defineProperty(e, t, {
+function sxe(e, t, n) {
+ return (t = cxe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function rxe(e) {
- var t = ixe(e, "string");
+function cxe(e) {
+ var t = lxe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function ixe(e, t) {
+function lxe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -51984,16 +52216,16 @@ function ixe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function axe(e, t) {
+function uxe(e, t) {
if (e == null) return {};
- var n, r, i = oxe(e, t);
+ var n, r, i = dxe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function oxe(e, t) {
+function dxe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -52002,68 +52234,68 @@ function oxe(e, t) {
}
return n;
}
-var kz = {
- symbolCircle: NR,
- symbolCross: Sbe,
- symbolDiamond: wbe,
- symbolSquare: Tbe,
- symbolStar: kbe,
- symbolTriangle: Abe,
- symbolWye: Mbe
-}, sxe = Math.PI / 180, cxe = (e) => kz[`symbol${Cz(e)}`] || NR, lxe = (e, t, n) => {
+var Oz = {
+ symbolCircle: MR,
+ symbolCross: Dbe,
+ symbolDiamond: kbe,
+ symbolSquare: Abe,
+ symbolStar: Pbe,
+ symbolTriangle: Fbe,
+ symbolWye: Lbe
+}, fxe = Math.PI / 180, pxe = (e) => Oz[`symbol${Sz(e)}`] || MR, mxe = (e, t, n) => {
if (t === "area") return e;
switch (n) {
case "cross": return 5 * e * e / 9;
case "diamond": return .5 * e * e / Math.sqrt(3);
case "square": return e * e;
case "star":
- var r = 18 * sxe;
+ var r = 18 * fxe;
return 1.25 * e * e * (Math.tan(r) - Math.tan(r * 2) * Math.tan(r) ** 2);
case "triangle": return Math.sqrt(3) * e * e / 4;
case "wye": return (21 - 10 * Math.sqrt(3)) * e * e / 8;
default: return Math.PI * e * e / 4;
}
-}, uxe = (e, t) => {
- kz[`symbol${Cz(e)}`] = t;
-}, Az = (e) => {
- var { type: t = "circle", size: n = 64, sizeType: r = "area" } = e, i = Oz(Oz({}, axe(e, txe)), {}, {
+}, hxe = (e, t) => {
+ Oz[`symbol${Sz(e)}`] = t;
+}, kz = (e) => {
+ var { type: t = "circle", size: n = 64, sizeType: r = "area" } = e, i = Dz(Dz({}, uxe(e, oxe)), {}, {
type: t,
size: n,
sizeType: r
}), a = "circle";
typeof t == "string" && (a = t);
var o = () => {
- var e = cxe(a), t = Nbe().type(e).size(lxe(n, r, a))();
+ var e = pxe(a), t = Rbe().type(e).size(mxe(n, r, a))();
if (t !== null) return t;
- }, { className: s, cx: c, cy: l } = i, u = sR(i);
- return Z(c) && Z(l) && Z(n) ? /*#__PURE__*/ B.createElement("path", Ez({}, u, {
+ }, { className: s, cx: c, cy: l } = i, u = oR(i);
+ return Z(c) && Z(l) && Z(n) ? /*#__PURE__*/ B.createElement("path", Tz({}, u, {
className: Jr("recharts-symbols", s),
transform: `translate(${c}, ${l})`,
d: o()
})) : null;
};
-Az.registerSymbol = uxe;
+kz.registerSymbol = hxe;
//#endregion
//#region node_modules/recharts/es6/util/types.js
-var jz = (e) => "radius" in e && "startAngle" in e && "endAngle" in e, Mz = (e, t) => {
+var Az = (e) => "radius" in e && "startAngle" in e && "endAngle" in e, jz = (e, t) => {
if (!e || typeof e == "function" || typeof e == "boolean") return null;
var n = e;
if (/*#__PURE__*/ (0, B.isValidElement)(e) && (n = e.props), typeof n != "object" && typeof n != "function") return null;
var r = {};
return Object.keys(n).forEach((e) => {
- nR(e) && typeof n[e] == "function" && (r[e] = t || ((t) => n[e](n, t)));
+ tR(e) && typeof n[e] == "function" && (r[e] = t || ((t) => n[e](n, t)));
}), r;
-}, dxe = (e, t, n) => (r) => (e(t, n, r), null), Nz = (e, t, n) => {
+}, gxe = (e, t, n) => (r) => (e(t, n, r), null), Mz = (e, t, n) => {
if (e === null || typeof e != "object" && typeof e != "function") return null;
var r = null;
return Object.keys(e).forEach((i) => {
var a = e[i];
- nR(i) && typeof a == "function" && (r ||= {}, r[i] = dxe(a, t, n));
+ tR(i) && typeof a == "function" && (r ||= {}, r[i] = gxe(a, t, n));
}), r;
};
//#endregion
//#region node_modules/recharts/es6/util/resolveDefaultProps.js
-function Pz(e, t) {
+function Nz(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
@@ -52073,30 +52305,30 @@ function Pz(e, t) {
}
return n;
}
-function fxe(e) {
+function _xe(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
- t % 2 ? Pz(Object(n), !0).forEach(function(t) {
- pxe(e, t, n[t]);
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Pz(Object(n)).forEach(function(t) {
+ t % 2 ? Nz(Object(n), !0).forEach(function(t) {
+ vxe(e, t, n[t]);
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Nz(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function pxe(e, t, n) {
- return (t = mxe(t)) in e ? Object.defineProperty(e, t, {
+function vxe(e, t, n) {
+ return (t = yxe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function mxe(e) {
- var t = hxe(e, "string");
+function yxe(e) {
+ var t = bxe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function hxe(e, t) {
+function bxe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -52106,22 +52338,22 @@ function hxe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function Fz(e, t) {
- var n = fxe({}, e), r = t;
+function Pz(e, t) {
+ var n = _xe({}, e), r = t;
return Object.keys(t).reduce((e, t) => (e[t] === void 0 && r[t] !== void 0 && (e[t] = r[t]), e), n);
}
//#endregion
//#region node_modules/recharts/es6/component/DefaultLegendContent.js
-function Iz() {
- return Iz = Object.assign ? Object.assign.bind() : function(e) {
+function Fz() {
+ return Fz = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
}
return e;
- }, Iz.apply(null, arguments);
+ }, Fz.apply(null, arguments);
}
-function Lz(e, t) {
+function Iz(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
@@ -52131,30 +52363,30 @@ function Lz(e, t) {
}
return n;
}
-function Rz(e) {
+function Lz(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
- t % 2 ? Lz(Object(n), !0).forEach(function(t) {
- gxe(e, t, n[t]);
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Lz(Object(n)).forEach(function(t) {
+ t % 2 ? Iz(Object(n), !0).forEach(function(t) {
+ xxe(e, t, n[t]);
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Iz(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function gxe(e, t, n) {
- return (t = _xe(t)) in e ? Object.defineProperty(e, t, {
+function xxe(e, t, n) {
+ return (t = Sxe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function _xe(e) {
- var t = vxe(e, "string");
+function Sxe(e) {
+ var t = Cxe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function vxe(e, t) {
+function Cxe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -52164,7 +52396,7 @@ function vxe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var zz = 32, yxe = {
+var Rz = 32, wxe = {
align: "center",
iconSize: 14,
inactiveColor: "#ccc",
@@ -52172,20 +52404,20 @@ var zz = 32, yxe = {
verticalAlign: "middle",
labelStyle: {}
};
-function bxe(e) {
+function Txe(e) {
if (typeof e == "object" && e && "strokeDasharray" in e) return String(e.strokeDasharray);
}
-function xxe(e) {
- var { data: t, iconType: n, inactiveColor: r } = e, i = zz / 2, a = zz / 6, o = zz / 3, s = t.inactive ? r : t.color, c = n ?? t.type;
+function Exe(e) {
+ var { data: t, iconType: n, inactiveColor: r } = e, i = Rz / 2, a = Rz / 6, o = Rz / 3, s = t.inactive ? r : t.color, c = n ?? t.type;
if (c === "none") return null;
if (c === "plainline") return /*#__PURE__*/ B.createElement("line", {
strokeWidth: 4,
fill: "none",
stroke: s,
- strokeDasharray: bxe(t.payload),
+ strokeDasharray: Txe(t.payload),
x1: 0,
y1: i,
- x2: zz,
+ x2: Rz,
y2: i,
className: "recharts-legend-icon"
});
@@ -52195,35 +52427,35 @@ function xxe(e) {
stroke: s,
d: `M0,${i}h${o}
A${a},${a},0,1,1,${2 * o},${i}
- H${zz}M${2 * o},${i}
+ H${Rz}M${2 * o},${i}
A${a},${a},0,1,1,${o},${i}`,
className: "recharts-legend-icon"
});
if (c === "rect") return /*#__PURE__*/ B.createElement("path", {
stroke: "none",
fill: s,
- d: `M0,${zz / 8}h${zz}v${zz * 3 / 4}h${-zz}z`,
+ d: `M0,${Rz / 8}h${Rz}v${Rz * 3 / 4}h${-Rz}z`,
className: "recharts-legend-icon"
});
if (/*#__PURE__*/ B.isValidElement(t.legendIcon)) {
- var l = Rz({}, t);
+ var l = Lz({}, t);
return delete l.legendIcon, /*#__PURE__*/ B.cloneElement(t.legendIcon, l);
}
- return /*#__PURE__*/ B.createElement(Az, {
+ return /*#__PURE__*/ B.createElement(kz, {
fill: s,
cx: i,
cy: i,
- size: zz,
+ size: Rz,
sizeType: "diameter",
type: c
});
}
-function Sxe(e) {
+function Dxe(e) {
var { payload: t, iconSize: n, layout: r, formatter: i, inactiveColor: a, iconType: o, labelStyle: s } = e, c = {
x: 0,
y: 0,
- width: zz,
- height: zz
+ width: Rz,
+ height: Rz
}, l = {
display: r === "horizontal" ? "inline-block" : "block",
marginRight: 10
@@ -52239,20 +52471,20 @@ function Sxe(e) {
inactive: t.inactive
});
if (t.type === "none") return null;
- var p = typeof s == "object" ? Rz({}, s) : {};
+ var p = typeof s == "object" ? Lz({}, s) : {};
p.color = t.inactive ? a : p.color || t.color;
var m = d ? d(t.value, t, r) : t.value;
- return /*#__PURE__*/ B.createElement("li", Iz({
+ return /*#__PURE__*/ B.createElement("li", Fz({
className: f,
style: l,
key: `legend-item-${r}`
- }, Nz(e, t, r)), /*#__PURE__*/ B.createElement(lR, {
+ }, Mz(e, t, r)), /*#__PURE__*/ B.createElement(cR, {
width: n,
height: n,
viewBox: c,
style: u,
"aria-label": `${m} legend icon`
- }, /*#__PURE__*/ B.createElement(xxe, {
+ }, /*#__PURE__*/ B.createElement(Exe, {
data: t,
iconType: o,
inactiveColor: a
@@ -52262,8 +52494,8 @@ function Sxe(e) {
}, m));
});
}
-var Cxe = (e) => {
- var t = Fz(e, yxe), { payload: n, layout: r, align: i } = t;
+var Oxe = (e) => {
+ var t = Pz(e, wxe), { payload: n, layout: r, align: i } = t;
if (!n || !n.length) return null;
var a = {
padding: 0,
@@ -52273,11 +52505,11 @@ var Cxe = (e) => {
return /*#__PURE__*/ B.createElement("ul", {
className: "recharts-default-legend",
style: a
- }, /*#__PURE__*/ B.createElement(Sxe, Iz({}, t, { payload: n })));
+ }, /*#__PURE__*/ B.createElement(Dxe, Fz({}, t, { payload: n })));
};
//#endregion
//#region node_modules/es-toolkit/dist/array/uniqBy.mjs
-function wxe(e, t) {
+function kxe(e, t) {
let n = /* @__PURE__ */ new Map();
for (let r = 0; r < e.length; r++) {
let i = e[r], a = t(i, r, e);
@@ -52287,77 +52519,77 @@ function wxe(e, t) {
}
//#endregion
//#region node_modules/es-toolkit/dist/function/ary.mjs
-function Txe(e, t) {
+function Axe(e, t) {
return function(...n) {
return e.apply(this, n.slice(0, t));
};
}
//#endregion
//#region node_modules/es-toolkit/dist/function/identity.mjs
-function Bz(e) {
+function zz(e) {
return e;
}
//#endregion
//#region node_modules/es-toolkit/dist/predicate/isLength.mjs
-function Exe(e) {
+function jxe(e) {
return Number.isSafeInteger(e) && e >= 0;
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/predicate/isArrayLike.mjs
-function Vz(e) {
- return e != null && typeof e != "function" && Exe(e.length);
+function Bz(e) {
+ return e != null && typeof e != "function" && jxe(e.length);
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/object/property.mjs
-function Dxe(e) {
+function Mxe(e) {
return function(t) {
- return uz(t, e);
+ return lz(t, e);
};
}
//#endregion
//#region node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
-function Hz(e) {
+function Vz(e) {
return e == null || typeof e != "object" && typeof e != "function";
}
//#endregion
//#region node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
-function Oxe(e) {
+function Nxe(e) {
return ArrayBuffer.isView(e) && !(e instanceof DataView);
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
-function kxe(e) {
+function Pxe(e) {
return Object.getOwnPropertySymbols(e).filter((t) => Object.prototype.propertyIsEnumerable.call(e, t));
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
-function Uz(e) {
+function Hz(e) {
return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/_internal/tags.mjs
-var Axe = "[object RegExp]", Wz = "[object String]", Gz = "[object Number]", Kz = "[object Boolean]", qz = "[object Arguments]", jxe = "[object Symbol]", Mxe = "[object Date]", Nxe = "[object Map]", Pxe = "[object Set]", Fxe = "[object Array]", Ixe = "[object ArrayBuffer]", Lxe = "[object Object]", Rxe = "[object DataView]", zxe = "[object Uint8Array]", Bxe = "[object Uint8ClampedArray]", Vxe = "[object Uint16Array]", Hxe = "[object Uint32Array]", Uxe = "[object Int8Array]", Wxe = "[object Int16Array]", Gxe = "[object Int32Array]", Kxe = "[object Float32Array]", qxe = "[object Float64Array]", Jz = typeof globalThis == "object" && globalThis || typeof window == "object" && window || typeof self == "object" && self || typeof global == "object" && global || (function() {
+var Fxe = "[object RegExp]", Uz = "[object String]", Wz = "[object Number]", Gz = "[object Boolean]", Kz = "[object Arguments]", Ixe = "[object Symbol]", Lxe = "[object Date]", Rxe = "[object Map]", zxe = "[object Set]", Bxe = "[object Array]", Vxe = "[object ArrayBuffer]", Hxe = "[object Object]", Uxe = "[object DataView]", Wxe = "[object Uint8Array]", Gxe = "[object Uint8ClampedArray]", Kxe = "[object Uint16Array]", qxe = "[object Uint32Array]", Jxe = "[object Int8Array]", Yxe = "[object Int16Array]", Xxe = "[object Int32Array]", Zxe = "[object Float32Array]", Qxe = "[object Float64Array]", qz = typeof globalThis == "object" && globalThis || typeof window == "object" && window || typeof self == "object" && self || typeof global == "object" && global || (function() {
return this;
})();
//#endregion
//#region node_modules/es-toolkit/dist/predicate/isBuffer.mjs
-function Jxe(e) {
- return Jz.Buffer !== void 0 && Jz.Buffer.isBuffer(e);
+function $xe(e) {
+ return qz.Buffer !== void 0 && qz.Buffer.isBuffer(e);
}
//#endregion
//#region node_modules/es-toolkit/dist/object/cloneDeepWith.mjs
-function Yxe(e, t) {
- return Yz(e, void 0, e, /* @__PURE__ */ new Map(), t);
+function eSe(e, t) {
+ return Jz(e, void 0, e, /* @__PURE__ */ new Map(), t);
}
-function Yz(e, t, n, r = /* @__PURE__ */ new Map(), i = void 0) {
+function Jz(e, t, n, r = /* @__PURE__ */ new Map(), i = void 0) {
let a = i?.(e, t, n, r);
if (a !== void 0) return a;
- if (Hz(e)) return e;
+ if (Vz(e)) return e;
if (r.has(e)) return r.get(e);
if (Array.isArray(e)) {
let t = Array(e.length);
r.set(e, t);
- for (let a = 0; a < e.length; a++) t[a] = Yz(e[a], a, n, r, i);
+ for (let a = 0; a < e.length; a++) t[a] = Jz(e[a], a, n, r, i);
return Object.hasOwn(e, "index") && (t.index = e.index), Object.hasOwn(e, "input") && (t.input = e.input), t;
}
if (e instanceof Date) return new Date(e.getTime());
@@ -52368,95 +52600,95 @@ function Yz(e, t, n, r = /* @__PURE__ */ new Map(), i = void 0) {
if (e instanceof Map) {
let t = /* @__PURE__ */ new Map();
r.set(e, t);
- for (let [a, o] of e) t.set(a, Yz(o, a, n, r, i));
+ for (let [a, o] of e) t.set(a, Jz(o, a, n, r, i));
return t;
}
if (e instanceof Set) {
let t = /* @__PURE__ */ new Set();
r.set(e, t);
- for (let a of e) t.add(Yz(a, void 0, n, r, i));
+ for (let a of e) t.add(Jz(a, void 0, n, r, i));
return t;
}
- if (Jxe(e)) return e.subarray();
- if (Oxe(e)) {
+ if ($xe(e)) return e.subarray();
+ if (Nxe(e)) {
let t = new (Object.getPrototypeOf(e)).constructor(e.length);
r.set(e, t);
- for (let a = 0; a < e.length; a++) t[a] = Yz(e[a], a, n, r, i);
+ for (let a = 0; a < e.length; a++) t[a] = Jz(e[a], a, n, r, i);
return t;
}
if (e instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer) return e.slice(0);
if (e instanceof DataView) {
let t = new DataView(e.buffer.slice(0), e.byteOffset, e.byteLength);
- return r.set(e, t), Xz(t, e, n, r, i), t;
+ return r.set(e, t), Yz(t, e, n, r, i), t;
}
if (typeof File < "u" && e instanceof File) {
let t = new File([e], e.name, { type: e.type });
- return r.set(e, t), Xz(t, e, n, r, i), t;
+ return r.set(e, t), Yz(t, e, n, r, i), t;
}
if (typeof Blob < "u" && e instanceof Blob) {
let t = new Blob([e], { type: e.type });
- return r.set(e, t), Xz(t, e, n, r, i), t;
+ return r.set(e, t), Yz(t, e, n, r, i), t;
}
if (e instanceof Error) {
let t = structuredClone(e);
- return r.set(e, t), t.message = e.message, t.name = e.name, t.stack = e.stack, t.cause = e.cause, t.constructor = e.constructor, Xz(t, e, n, r, i), t;
+ return r.set(e, t), t.message = e.message, t.name = e.name, t.stack = e.stack, t.cause = e.cause, t.constructor = e.constructor, Yz(t, e, n, r, i), t;
}
if (e instanceof Boolean) {
let t = new Boolean(e.valueOf());
- return r.set(e, t), Xz(t, e, n, r, i), t;
+ return r.set(e, t), Yz(t, e, n, r, i), t;
}
if (e instanceof Number) {
let t = new Number(e.valueOf());
- return r.set(e, t), Xz(t, e, n, r, i), t;
+ return r.set(e, t), Yz(t, e, n, r, i), t;
}
if (e instanceof String) {
let t = new String(e.valueOf());
- return r.set(e, t), Xz(t, e, n, r, i), t;
+ return r.set(e, t), Yz(t, e, n, r, i), t;
}
- if (typeof e == "object" && Xxe(e)) {
+ if (typeof e == "object" && tSe(e)) {
let t = Object.create(Object.getPrototypeOf(e));
- return r.set(e, t), Xz(t, e, n, r, i), t;
+ return r.set(e, t), Yz(t, e, n, r, i), t;
}
return e;
}
-function Xz(e, t, n = e, r, i) {
- let a = [...Object.keys(t), ...kxe(t)];
+function Yz(e, t, n = e, r, i) {
+ let a = [...Object.keys(t), ...Pxe(t)];
for (let o = 0; o < a.length; o++) {
let s = a[o], c = Object.getOwnPropertyDescriptor(e, s);
- (c == null || c.writable) && (e[s] = Yz(t[s], s, n, r, i));
+ (c == null || c.writable) && (e[s] = Jz(t[s], s, n, r, i));
}
}
-function Xxe(e) {
- switch (Uz(e)) {
- case qz:
- case Fxe:
- case Ixe:
- case Rxe:
+function tSe(e) {
+ switch (Hz(e)) {
case Kz:
- case Mxe:
- case Kxe:
- case qxe:
+ case Bxe:
+ case Vxe:
case Uxe:
- case Wxe:
- case Gxe:
- case Nxe:
case Gz:
case Lxe:
- case Axe:
- case Pxe:
+ case Zxe:
+ case Qxe:
+ case Jxe:
+ case Yxe:
+ case Xxe:
+ case Rxe:
case Wz:
- case jxe:
+ case Hxe:
+ case Fxe:
case zxe:
- case Bxe:
- case Vxe:
- case Hxe: return !0;
+ case Uz:
+ case Ixe:
+ case Wxe:
+ case Gxe:
+ case Kxe:
+ case qxe: return !0;
default: return !1;
}
}
//#endregion
//#region node_modules/es-toolkit/dist/object/cloneDeep.mjs
-function Zxe(e) {
- return Yz(e, void 0, e, /* @__PURE__ */ new Map(), void 0);
+function Xz(e) {
+ return Jz(e, void 0, e, /* @__PURE__ */ new Map(), void 0);
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/util/eq.mjs
@@ -52491,9 +52723,9 @@ function tB(e, t, n, r, i = !1) {
if (t instanceof Set) return iB(e, t, n, r);
let a = Object.keys(t);
if (e == null) return i && a.length === 0;
- if (i) Hz(e) && (e = Object(e));
+ if (i) Vz(e) && (e = Object(e));
else {
- let t = Uz(e);
+ let t = Hz(e);
if (t !== "[object Object]" && t !== "[object Arguments]") return !1;
}
if (a.length === 0) return !0;
@@ -52544,29 +52776,29 @@ function aB(e, t) {
//#endregion
//#region node_modules/es-toolkit/dist/compat/predicate/matches.mjs
function oB(e) {
- return e = Zxe(e), (t) => aB(t, e);
+ return e = Xz(e), (t) => aB(t, e);
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/object/cloneDeepWith.mjs
function sB(e, t) {
- return Yxe(e, (n, r, i, a) => {
+ return eSe(e, (n, r, i, a) => {
let o = t?.(n, r, i, a);
if (o !== void 0) return o;
if (typeof e == "object") {
- if (Uz(e) === "[object Object]" && typeof e.constructor != "function") {
+ if (Hz(e) === "[object Object]" && typeof e.constructor != "function") {
let t = {};
- return a.set(e, t), Xz(t, e, i, a), t;
+ return a.set(e, t), Yz(t, e, i, a), t;
}
switch (Object.prototype.toString.call(e)) {
- case Gz:
case Wz:
- case Kz: {
+ case Uz:
+ case Gz: {
let t = new e.constructor(e?.valueOf());
- return Xz(t, e), t;
+ return Yz(t, e), t;
}
- case qz: {
+ case Kz: {
let t = {};
- return Xz(t, e), t.length = e.length, t[Symbol.iterator] = e[Symbol.iterator], t;
+ return Yz(t, e), t.length = e.length, t[Symbol.iterator] = e[Symbol.iterator], t;
}
default: return;
}
@@ -52591,16 +52823,16 @@ function uB(e, t = 2 ** 53 - 1) {
//#endregion
//#region node_modules/es-toolkit/dist/compat/predicate/isArguments.mjs
function dB(e) {
- return typeof e == "object" && !!e && Uz(e) === "[object Arguments]";
+ return typeof e == "object" && !!e && Hz(e) === "[object Arguments]";
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/object/has.mjs
function fB(e, t) {
let n;
- if (n = Array.isArray(t) ? t : typeof t == "string" && az(t) && !(t in Object(e)) ? lz(t) : [t], n.length === 0) return !1;
+ if (n = Array.isArray(t) ? t : typeof t == "string" && iz(t) && !(t in Object(e)) ? cz(t) : [t], n.length === 0) return !1;
let r = e;
for (let e = 0; e < n.length; e++) {
- let t = oz(n[e]);
+ let t = az(n[e]);
if ((r == null || !Object.hasOwn(r, t)) && !((Array.isArray(r) || dB(r)) && uB(t) && Number(t) < r.length)) return !1;
r = r[t];
}
@@ -52613,21 +52845,21 @@ function pB(e, t) {
case "object":
Object.is(e?.valueOf(), -0) && (e = "-0");
break;
- case "number": e = oz(e);
+ case "number": e = az(e);
}
return t = cB(t), function(n) {
- let r = uz(n, e);
+ let r = lz(n, e);
return r === void 0 ? fB(n, e) : t === void 0 ? r === void 0 : aB(r, t);
};
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/util/iteratee.mjs
function mB(e) {
- if (e == null) return Bz;
+ if (e == null) return zz;
switch (typeof e) {
case "function": return e;
case "object": return Array.isArray(e) && e.length === 2 ? pB(e[0], e[1]) : oB(e);
- default: return Dxe(e);
+ default: return Mxe(e);
}
}
//#endregion
@@ -52637,8 +52869,8 @@ function hB(e) {
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/array/uniqBy.mjs
-function gB(e, t = Bz) {
- return Vz(e) ? wxe(Array.from(e), Txe(mB(t), 1)).map(hB) : [];
+function gB(e, t = zz) {
+ return Bz(e) ? kxe(Array.from(e), Axe(mB(t), 1)).map(hB) : [];
}
//#endregion
//#region node_modules/recharts/es6/util/payload/getUniqPayload.js
@@ -52831,7 +53063,7 @@ function VB(e, t = 1) {
//#endregion
//#region node_modules/es-toolkit/dist/compat/_internal/isIterateeCall.mjs
function HB(e, t, n) {
- return Qz(n) && (typeof t == "number" && Vz(n) && uB(t) && t < n.length || typeof t == "string" && t in n) ? Zz(n[t], e) : !1;
+ return Qz(n) && (typeof t == "number" && Bz(n) && uB(t) && t < n.length || typeof t == "string" && t in n) ? Zz(n[t], e) : !1;
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/_internal/compareValues.mjs
@@ -52850,13 +53082,13 @@ var WB = (e, t, n) => {
return 0;
}, GB = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, KB = /^\w*$/;
function qB(e, t) {
- return Array.isArray(e) ? !1 : typeof e == "number" || typeof e == "boolean" || e == null || sz(e) ? !0 : typeof e == "string" && (KB.test(e) || !GB.test(e)) || t != null && Object.hasOwn(t, e);
+ return Array.isArray(e) ? !1 : typeof e == "number" || typeof e == "boolean" || e == null || oz(e) ? !0 : typeof e == "string" && (KB.test(e) || !GB.test(e)) || t != null && Object.hasOwn(t, e);
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/array/orderBy.mjs
function JB(e, t, n, r) {
if (e == null) return [];
- n = r ? void 0 : n, Array.isArray(e) || (e = Vz(e) ? Array.from(e) : Object.values(e)), Array.isArray(t) || (t = t == null ? [null] : [t]), t.length === 0 && (t = [null]), Array.isArray(n) || (n = n == null ? [] : [n]), n = n.map((e) => String(e));
+ n = r ? void 0 : n, Array.isArray(e) || (e = Bz(e) ? Array.from(e) : Object.values(e)), Array.isArray(t) || (t = t == null ? [null] : [t]), t.length === 0 && (t = [null]), Array.isArray(n) || (n = n == null ? [] : [n]), n = n.map((e) => String(e));
let i = (e, t) => {
let n = e, r = 0;
for (; r < t.length && n != null; ++r) n = n[t[r]];
@@ -52866,7 +53098,7 @@ function JB(e, t, n, r) {
if (t != null) return typeof e == "object" && "key" in e ? Object.hasOwn(t, e.key) ? t[e.key] : i(t, e.path) : typeof e == "function" ? e(t) : Array.isArray(e) ? i(t, e) : t[e];
}, o = t.map((e) => (Array.isArray(e) && e.length === 1 && (e = e[0]), e == null || typeof e == "function" || Array.isArray(e) || qB(e) ? e : {
key: e,
- path: lz(e)
+ path: cz(e)
}));
return e.map((e) => ({
original: e,
@@ -53158,7 +53390,7 @@ function eH(e) {
let t = $V[e];
return t || gV(0, e), t;
}
-var tH = (e) => !!$V[e], nH, rH = () => nH, Qxe = (e, t) => ({
+var tH = (e) => !!$V[e], nH, rH = () => nH, nSe = (e, t) => ({
drafts_: [],
parent_: e,
immer_: t,
@@ -53173,13 +53405,13 @@ function iH(e, t) {
t && (e.patchPlugin_ = eH(ZV), e.patches_ = [], e.inversePatches_ = [], e.patchListener_ = t);
}
function aH(e) {
- oH(e), e.drafts_.forEach($xe), e.drafts_ = null;
+ oH(e), e.drafts_.forEach(rSe), e.drafts_ = null;
}
function oH(e) {
e === nH && (nH = e.parent_);
}
-var sH = (e) => nH = Qxe(nH, e);
-function $xe(e) {
+var sH = (e) => nH = nSe(nH, e);
+function rSe(e) {
let t = e[hV];
t.type_ === 0 || t.type_ === 1 ? t.revoke_() : t.revoked_ = !0;
}
@@ -53191,7 +53423,7 @@ function cH(e, t) {
let { patchPlugin_: r } = t;
r && r.generateReplacementPatches_(n[hV].base_, e, t);
} else e = lH(t, n);
- return eSe(t, e, !0), aH(t), t.patches_ && t.patchListener_(t.patches_, t.inversePatches_), e === pV ? void 0 : e;
+ return iSe(t, e, !0), aH(t), t.patches_ && t.patchListener_(t.patches_, t.inversePatches_), e === pV ? void 0 : e;
}
function lH(e, t) {
if (YV(t)) return t;
@@ -53206,13 +53438,13 @@ function lH(e, t) {
}
return n.copy_;
}
-function eSe(e, t, n = !1) {
+function iSe(e, t, n = !1) {
!e.parent_ && e.immer_.autoFreeze_ && e.canAutoFreeze_ && KV(t, n);
}
function uH(e) {
e.finalized_ = !0, e.scope_.unfinalizedDrafts_--;
}
-var dH = (e, t) => e.scope_ === t, tSe = [];
+var dH = (e, t) => e.scope_ === t, aSe = [];
function fH(e, t, n, r) {
let i = UV(e), a = e.type_;
if (r !== void 0 && NV(i, r, a) === t) {
@@ -53228,10 +53460,10 @@ function fH(e, t, n, r) {
}
});
}
- let o = e.draftLocations_.get(t) ?? tSe;
+ let o = e.draftLocations_.get(t) ?? aSe;
for (let e of o) PV(i, e, n, a);
}
-function nSe(e, t, n) {
+function oSe(e, t, n) {
e.callbacks_.push(function(r) {
let i = t;
if (!i || !dH(i, r)) return;
@@ -53250,7 +53482,7 @@ function pH(e, t) {
uH(e);
}
}
-function rSe(e, t, n) {
+function sSe(e, t, n) {
let { scope_: r } = e;
if (TV(n)) {
let i = n[hV];
@@ -53270,7 +53502,7 @@ function mH(e, t, n) {
} else EV(i) && mH(i, t, n);
}), e);
}
-function iSe(e, t) {
+function cSe(e, t) {
let n = IV(e), r = {
type_: +!!n,
scope_: t ? t.scope_ : rH(),
@@ -53295,10 +53527,10 @@ var hH = {
let n = e.scope_.arrayMethodsPlugin_, r = e.type_ === 1 && typeof t == "string";
if (r && n?.isArrayOperationMethod(t)) return n.createMethodInterceptor(e, t);
let i = UV(e);
- if (!MV(i, t, e.type_)) return oSe(e, i, t);
+ if (!MV(i, t, e.type_)) return uSe(e, i, t);
let a = i[t];
if (e.finalized_ || !EV(a) || r && e.operationMethod && n?.isMutatingArrayMethod(e.operationMethod) && HV(t)) return a;
- if (a === _H(e.base_, t) || aSe(e, t, a)) {
+ if (a === _H(e.base_, t) || lSe(e, t, a)) {
bH(e);
let n = e.type_ === 1 ? +t : t, r = xH(e.scope_, a, e, n);
return e.copy_[n] = r;
@@ -53320,7 +53552,7 @@ var hH = {
if (FV(n, r) && (n !== void 0 || MV(e.base_, t, e.type_))) return !0;
bH(e), yH(e);
}
- return e.copy_[t] === n && (n !== void 0 || MV(e.copy_, t, e.type_)) || Number.isNaN(n) && Number.isNaN(e.copy_[t]) ? !0 : (e.copy_[t] = n, e.assigned_.set(t, !0), rSe(e, t, n), !0);
+ return e.copy_[t] === n && (n !== void 0 || MV(e.copy_, t, e.type_)) || Number.isNaN(n) && Number.isNaN(e.copy_[t]) ? !0 : (e.copy_[t] = n, e.assigned_.set(t, !0), sSe(e, t, n), !0);
},
deleteProperty(e, t) {
return bH(e), _H(e.base_, t) !== void 0 || t in e.base_ ? (e.assigned_.set(t, !1), yH(e)) : e.assigned_.delete(t), e.copy_ && delete e.copy_[t], !0;
@@ -53360,10 +53592,10 @@ function _H(e, t) {
let n = e[hV];
return (n ? UV(n) : e)[t];
}
-function aSe(e, t, n) {
+function lSe(e, t, n) {
return e.type_ !== 1 || !e.allIndicesReassigned_ || e.assigned_?.get(t) || !EV(n) || n[hV] ? !1 : e.baseRefs_.has(n);
}
-function oSe(e, t, n) {
+function uSe(e, t, n) {
let r = vH(t, n);
return r ? wV in r ? r[wV] : r.get?.call(e.draft_) : void 0;
}
@@ -53382,7 +53614,7 @@ function yH(e) {
function bH(e) {
e.copy_ ||= (e.assigned_ = /* @__PURE__ */ new Map(), GV(e.base_, e.scope_.immer_.useStrictShallowCopy_));
}
-var sSe = class {
+var dSe = class {
constructor(e) {
this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.useStrictIteration_ = !1, this.produce = (e, t, n) => {
if (BV(e) && !BV(t)) {
@@ -53465,8 +53697,8 @@ var sSe = class {
}
};
function xH(e, t, n, r) {
- let [i, a] = LV(t) ? eH(XV).proxyMap_(t, n) : RV(t) ? eH(XV).proxySet_(t, n) : iSe(t, n);
- return (n?.scope_ ?? rH()).drafts_.push(i), a.callbacks_ = n?.callbacks_ ?? [], a.key_ = r, n && r !== void 0 ? nSe(n, a, r) : a.callbacks_.push(function(e) {
+ let [i, a] = LV(t) ? eH(XV).proxyMap_(t, n) : RV(t) ? eH(XV).proxySet_(t, n) : cSe(t, n);
+ return (n?.scope_ ?? rH()).drafts_.push(i), a.callbacks_ = n?.callbacks_ ?? [], a.key_ = r, n && r !== void 0 ? oSe(n, a, r) : a.callbacks_.push(function(e) {
e.mapSetPlugin_?.fixSetContents(a);
let { patchPlugin_: t } = e;
a.modified_ && t && t.generatePatches_(a, [], e);
@@ -53487,13 +53719,13 @@ function CH(e) {
}, r), t && (t.finalized_ = !1), n;
}
globalThis.Iterator?.from;
-var wH = new sSe().produce;
+var wH = new dSe().produce;
//#endregion
//#region node_modules/redux-thunk/dist/redux-thunk.mjs
function TH(e) {
return ({ dispatch: t, getState: n }) => (r) => (i) => typeof i == "function" ? i(t, n, e) : r(i);
}
-var cSe = TH(), lSe = TH, uSe = typeof window < "u" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function() {
+var fSe = TH(), pSe = TH, mSe = typeof window < "u" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function() {
if (arguments.length !== 0) return typeof arguments[0] == "object" ? uV : uV.apply(null, arguments);
};
typeof window < "u" && window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__;
@@ -53536,23 +53768,23 @@ function OH(e) {
function kH(e, t, n) {
return e.has(t) ? e.get(t) : e.set(t, n(t)).get(t);
}
-function dSe(e) {
+function hSe(e) {
return typeof e == "boolean";
}
-var fSe = () => function(e) {
+var gSe = () => function(e) {
let { thunk: t = !0, immutableCheck: n = !0, serializableCheck: r = !0, actionCreatorCheck: i = !0 } = e ?? {}, a = new DH();
- return t && (dSe(t) ? a.push(cSe) : a.push(lSe(t.extraArgument))), a;
+ return t && (hSe(t) ? a.push(fSe) : a.push(pSe(t.extraArgument))), a;
}, AH = "RTK_autoBatch", jH = () => (e) => ({
payload: e,
meta: { [AH]: !0 }
}), MH = (e) => (t) => {
setTimeout(t, e);
-}, pSe = (e, t) => (n) => {
+}, _Se = (e, t) => (n) => {
let r = !1, i = () => {
r || (r = !0, cancelAnimationFrame(a), clearTimeout(o), n());
}, a = e(i), o = setTimeout(i, t);
}, NH = (e = { type: "raf" }) => (t) => (...n) => {
- let r = t(...n), i = !0, a = !1, o = !1, s = /* @__PURE__ */ new Set(), c = e.type === "tick" ? queueMicrotask : e.type === "raf" ? typeof window < "u" && window.requestAnimationFrame ? pSe(window.requestAnimationFrame, 100) : MH(10) : e.type === "callback" ? e.queueNotification : MH(e.timeout), l = () => {
+ let r = t(...n), i = !0, a = !1, o = !1, s = /* @__PURE__ */ new Set(), c = e.type === "tick" ? queueMicrotask : e.type === "raf" ? typeof window < "u" && window.requestAnimationFrame ? _Se(window.requestAnimationFrame, 100) : MH(10) : e.type === "callback" ? e.queueNotification : MH(e.timeout), l = () => {
o = !1, a && (a = !1, s.forEach((e) => e()));
};
return Object.assign({}, r, {
@@ -53570,23 +53802,23 @@ var fSe = () => function(e) {
}
}
});
-}, mSe = (e) => function(t) {
+}, vSe = (e) => function(t) {
let { autoBatch: n = !0 } = t ?? {}, r = new DH(e);
return n && r.push(NH(typeof n == "object" ? n : void 0)), r;
};
-function hSe(e) {
- let t = fSe(), { reducer: n = void 0, middleware: r, devTools: i = !0, duplicateMiddlewareCheck: a = !0, preloadedState: o = void 0, enhancers: s = void 0 } = e || {}, c;
+function ySe(e) {
+ let t = gSe(), { reducer: n = void 0, middleware: r, devTools: i = !0, duplicateMiddlewareCheck: a = !0, preloadedState: o = void 0, enhancers: s = void 0 } = e || {}, c;
if (typeof n == "function") c = n;
else if (oV(n)) c = lV(n);
else throw Error(sU(1));
let l;
l = typeof r == "function" ? r(t) : t();
let u = uV;
- i && (u = uSe({
+ i && (u = mSe({
trace: !1,
...typeof i == "object" && i
}));
- let d = mSe(dV(...l)), f = typeof s == "function" ? s(d) : d(), p = u(...f);
+ let d = vSe(dV(...l)), f = typeof s == "function" ? s(d) : d(), p = u(...f);
return sV(c, o, p);
}
function PH(e) {
@@ -53619,12 +53851,12 @@ function PH(e) {
r
];
}
-function gSe(e) {
+function bSe(e) {
return typeof e == "function";
}
-function _Se(e, t) {
+function xSe(e, t) {
let [n, r, i] = PH(t), a;
- if (gSe(e)) a = () => OH(e());
+ if (bSe(e)) a = () => OH(e());
else {
let t = OH(e);
a = () => t;
@@ -53652,20 +53884,20 @@ function _Se(e, t) {
}
return o.getInitialState = a, o;
}
-var vSe = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW", ySe = (e = 21) => {
+var SSe = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW", CSe = (e = 21) => {
let t = "", n = e;
- for (; n--;) t += vSe[Math.random() * 64 | 0];
+ for (; n--;) t += SSe[Math.random() * 64 | 0];
return t;
-}, bSe = /* @__PURE__ */ Symbol.for("rtk-slice-createasyncthunk");
-function xSe(e, t) {
+}, wSe = /* @__PURE__ */ Symbol.for("rtk-slice-createasyncthunk");
+function TSe(e, t) {
return `${e}/${t}`;
}
-function SSe({ creators: e } = {}) {
- let t = e?.asyncThunk?.[bSe];
+function ESe({ creators: e } = {}) {
+ let t = e?.asyncThunk?.[wSe];
return function(e) {
let { name: n, reducerPath: r = n } = e;
if (!n) throw Error(sU(11));
- let i = (typeof e.reducers == "function" ? e.reducers(wSe()) : e.reducers) || {}, a = Object.keys(i), o = {
+ let i = (typeof e.reducers == "function" ? e.reducers(OSe()) : e.reducers) || {}, a = Object.keys(i), o = {
sliceCaseReducersByName: {},
sliceCaseReducersByType: {},
actionCreators: {},
@@ -53693,17 +53925,17 @@ function SSe({ creators: e } = {}) {
a.forEach((r) => {
let a = i[r], o = {
reducerName: r,
- type: xSe(n, r),
+ type: TSe(n, r),
createNotation: typeof e.reducers == "function"
};
- ESe(a) ? OSe(o, a, s, t) : TSe(o, a, s);
+ ASe(a) ? MSe(o, a, s, t) : kSe(o, a, s);
});
function c() {
let [t = {}, n = [], r = void 0] = typeof e.extraReducers == "function" ? PH(e.extraReducers) : [e.extraReducers], i = {
...t,
...o.sliceCaseReducersByType
};
- return _Se(e.initialState, (e) => {
+ return xSe(e.initialState, (e) => {
for (let t in i) e.addCase(t, i[t]);
for (let t of o.sliceMatchers) e.addMatcher(t.matcher, t.reducer);
for (let t of n) e.addMatcher(t.matcher, t.reducer);
@@ -53725,7 +53957,7 @@ function SSe({ creators: e } = {}) {
function i(t = l) {
return kH(kH(u, n, () => /* @__PURE__ */ new WeakMap()), t, () => {
let r = {};
- for (let [i, a] of Object.entries(e.selectors ?? {})) r[i] = CSe(a, t, () => kH(d, t, m), n);
+ for (let [i, a] of Object.entries(e.selectors ?? {})) r[i] = DSe(a, t, () => kH(d, t, m), n);
return r;
});
}
@@ -53759,15 +53991,15 @@ function SSe({ creators: e } = {}) {
return g;
};
}
-function CSe(e, t, n, r) {
+function DSe(e, t, n, r) {
function i(i, ...a) {
let o = t(i);
return o === void 0 && r && (o = n()), e(o, ...a);
}
return i.unwrapped = e, i;
}
-var FH = /* @__PURE__ */ SSe();
-function wSe() {
+var FH = /* @__PURE__ */ ESe();
+function OSe() {
function e(e, t) {
return {
_reducerDefinitionType: "asyncThunk",
@@ -53791,21 +54023,21 @@ function wSe() {
asyncThunk: e
};
}
-function TSe({ type: e, reducerName: t, createNotation: n }, r, i) {
+function kSe({ type: e, reducerName: t, createNotation: n }, r, i) {
let a, o;
if ("reducer" in r) {
- if (n && !DSe(r)) throw Error(sU(17));
+ if (n && !jSe(r)) throw Error(sU(17));
a = r.reducer, o = r.prepare;
} else a = r;
i.addCase(e, a).exposeCaseReducer(t, a).exposeAction(t, o ? EH(e, o) : EH(e));
}
-function ESe(e) {
+function ASe(e) {
return e._reducerDefinitionType === "asyncThunk";
}
-function DSe(e) {
+function jSe(e) {
return e._reducerDefinitionType === "reducerWithPrepare";
}
-function OSe({ type: e, reducerName: t }, n, r, i) {
+function MSe({ type: e, reducerName: t }, n, r, i) {
if (!i) throw Error(sU(18));
let { payloadCreator: a, fulfilled: o, pending: s, rejected: c, settled: l, options: u } = n, d = i(e, a, u);
r.exposeAction(t, d), o && r.addCase(d.fulfilled, o), s && r.addCase(d.pending, s), c && r.addCase(d.rejected, c), l && r.addMatcher(d.settled, l), r.exposeCaseReducer(t, {
@@ -53816,9 +54048,9 @@ function OSe({ type: e, reducerName: t }, n, r, i) {
});
}
function IH() {}
-var kSe = "task", LH = "listener", RH = "completed", zH = "cancelled", ASe = `task-${zH}`, jSe = `task-${RH}`, BH = `${LH}-${zH}`, MSe = `${LH}-${RH}`, VH = class {
+var NSe = "task", LH = "listener", RH = "completed", zH = "cancelled", PSe = `task-${zH}`, FSe = `task-${RH}`, BH = `${LH}-${zH}`, ISe = `${LH}-${RH}`, VH = class {
constructor(e) {
- this.code = e, this.message = `${kSe} ${zH} (reason: ${e})`;
+ this.code = e, this.message = `${NSe} ${zH} (reason: ${e})`;
}
code;
name = "TaskAbortError";
@@ -53841,7 +54073,7 @@ function qH(e, t) {
n = UH;
});
}
-var NSe = async (e, t) => {
+var LSe = async (e, t) => {
try {
return await Promise.resolve(), {
status: "ok",
@@ -53858,13 +54090,13 @@ var NSe = async (e, t) => {
}, JH = (e) => (t) => WH(qH(e, t).then((t) => (KH(e), t))), YH = (e) => {
let t = JH(e);
return (e) => t(new Promise((t) => setTimeout(t, e)));
-}, { assign: XH } = Object, ZH = {}, QH = "listenerMiddleware", PSe = (e, t) => {
+}, { assign: XH } = Object, ZH = {}, QH = "listenerMiddleware", RSe = (e, t) => {
let n = (t) => GH(e, () => t.abort(e.reason));
return (r, i) => {
HH(r, "taskExecutor");
let a = new AbortController();
n(a);
- let o = NSe(async () => {
+ let o = LSe(async () => {
KH(e), KH(a.signal);
let t = await r({
pause: JH(a.signal),
@@ -53872,15 +54104,15 @@ var NSe = async (e, t) => {
signal: a.signal
});
return KH(a.signal), t;
- }, () => a.abort(jSe));
+ }, () => a.abort(FSe));
return i?.autoJoin && t.push(o.catch(UH)), {
result: JH(e)(o),
cancel() {
- a.abort(ASe);
+ a.abort(PSe);
}
};
};
-}, FSe = (e, t) => {
+}, zSe = (e, t) => {
let n = async (n, r) => {
KH(t);
let i = () => {}, a = [new Promise((t, r) => {
@@ -53921,7 +54153,7 @@ var NSe = async (e, t) => {
}, eU = /* @__PURE__ */ XH((e) => {
let { type: t, predicate: n, effect: r } = $H(e);
return {
- id: ySe(),
+ id: CSe(),
effect: r,
type: t,
predicate: n,
@@ -53937,7 +54169,7 @@ var NSe = async (e, t) => {
e.pending.forEach((e) => {
e.abort(BH);
});
-}, ISe = (e, t) => () => {
+}, BSe = (e, t) => () => {
for (let e of t.keys()) nU(e);
e.clear();
}, rU = (e, t, n) => {
@@ -53948,7 +54180,7 @@ var NSe = async (e, t) => {
throw e;
}, 0);
}
-}, iU = /* @__PURE__ */ XH(/* @__PURE__ */ EH(`${QH}/add`), { withTypes: () => iU }), LSe = /* @__PURE__ */ EH(`${QH}/removeAll`), aU = /* @__PURE__ */ XH(/* @__PURE__ */ EH(`${QH}/remove`), { withTypes: () => aU }), RSe = (...e) => {
+}, iU = /* @__PURE__ */ XH(/* @__PURE__ */ EH(`${QH}/add`), { withTypes: () => iU }), VSe = /* @__PURE__ */ EH(`${QH}/removeAll`), aU = /* @__PURE__ */ XH(/* @__PURE__ */ EH(`${QH}/remove`), { withTypes: () => aU }), HSe = (...e) => {
console.error(`${QH}/error`, ...e);
}, oU = (e = {}) => {
let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = (e) => {
@@ -53957,7 +54189,7 @@ var NSe = async (e, t) => {
}, i = (e) => {
let t = n.get(e) ?? 1;
t === 1 ? n.delete(e) : n.set(e, t - 1);
- }, { extra: a, onError: o = RSe } = e;
+ }, { extra: a, onError: o = HSe } = e;
HH(o, "onError");
let s = (e) => (e.unsubscribe = () => t.delete(e.id), t.set(e.id, e), (t) => {
e.unsubscribe(), t?.cancelActive && nU(e);
@@ -53972,7 +54204,7 @@ var NSe = async (e, t) => {
};
XH(l, { withTypes: () => l });
let u = async (e, n, s, l) => {
- let u = new AbortController(), d = FSe(c, u.signal), f = [];
+ let u = new AbortController(), d = zSe(c, u.signal), f = [];
try {
e.pending.add(u), r(e), await Promise.resolve(e.effect(n, XH({}, s, {
getOriginalState: l,
@@ -53982,7 +54214,7 @@ var NSe = async (e, t) => {
pause: JH(u.signal),
extra: a,
signal: u.signal,
- fork: PSe(u.signal, f),
+ fork: RSe(u.signal, f),
unsubscribe: e.unsubscribe,
subscribe: () => {
t.set(e.id, e);
@@ -54002,14 +54234,14 @@ var NSe = async (e, t) => {
} catch (e) {
e instanceof VH || rU(o, e, { raisedBy: "effect" });
} finally {
- await Promise.all(f), u.abort(MSe), i(e), e.pending.delete(u);
+ await Promise.all(f), u.abort(ISe), i(e), e.pending.delete(u);
}
- }, d = ISe(t, n);
+ }, d = BSe(t, n);
return {
middleware: (e) => (n) => (r) => {
if (!fV(r)) return n(r);
if (iU.match(r)) return c(r.payload);
- if (LSe.match(r)) {
+ if (VSe.match(r)) {
d();
return;
}
@@ -54074,7 +54306,7 @@ var cU = FH({
e.scale = t.payload;
}
}
-}), { setMargin: zSe, setLayout: BSe, setChartSize: VSe, setScale: HSe } = cU.actions, USe = cU.reducer;
+}), { setMargin: USe, setLayout: WSe, setChartSize: GSe, setScale: KSe } = cU.actions, qSe = cU.reducer;
//#endregion
//#region node_modules/recharts/es6/util/getSliced.js
function lU(e, t, n) {
@@ -54104,26 +54336,26 @@ function pU(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? fU(Object(n), !0).forEach(function(t) {
- WSe(e, t, n[t]);
+ JSe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : fU(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function WSe(e, t, n) {
- return (t = GSe(t)) in e ? Object.defineProperty(e, t, {
+function JSe(e, t, n) {
+ return (t = YSe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function GSe(e) {
- var t = KSe(e, "string");
+function YSe(e) {
+ var t = XSe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function KSe(e, t) {
+function XSe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -54134,9 +54366,9 @@ function KSe(e, t) {
return (t === "string" ? String : Number)(e);
}
function mU(e, t, n) {
- return Sz(e) || Sz(t) ? n : gz(t) ? uz(e, t, n) : typeof t == "function" ? t(e) : n;
+ return xz(e) || xz(t) ? n : hz(t) ? lz(e, t, n) : typeof t == "function" ? t(e) : n;
}
-var qSe = (e, t, n) => {
+var ZSe = (e, t, n) => {
if (t && n) {
var { width: r, height: i } = n, { align: a, verticalAlign: o, layout: s } = t;
if ((s === "vertical" || s === "horizontal" && o === "middle") && a !== "center" && Z(e[a])) return pU(pU({}, e), {}, { [a]: e[a] + (r || 0) });
@@ -54152,7 +54384,7 @@ var qSe = (e, t, n) => {
var { duplicateDomain: r, type: i, range: a, scale: o, realScaleType: s, isCategorical: c, categoricalDomain: l, tickCount: u, ticks: d, niceTicks: f, axisType: p } = e;
if (!o) return null;
var m = s === "scaleBand" && o.bandwidth ? o.bandwidth() / 2 : 2, h = (t || n) && i === "category" && o.bandwidth ? o.bandwidth() / m : 0;
- return h = p === "angleAxis" && a && a.length >= 2 ? pz(a[0] - a[1]) * 2 * h : h, t && (d || f) ? (d || f || []).map((e, t) => {
+ return h = p === "angleAxis" && a && a.length >= 2 ? fz(a[0] - a[1]) * 2 * h : h, t && (d || f) ? (d || f || []).map((e, t) => {
var n = r ? r.indexOf(e) : e, i = o.map(n);
return uU(i) ? {
coordinate: i + h,
@@ -54160,7 +54392,7 @@ var qSe = (e, t, n) => {
offset: h,
index: t
} : null;
- }).filter(wz) : c && l ? l.map((e, t) => {
+ }).filter(Cz) : c && l ? l.map((e, t) => {
var n = o.map(e);
return uU(n) ? {
coordinate: n + h,
@@ -54168,7 +54400,7 @@ var qSe = (e, t, n) => {
index: t,
offset: h
} : null;
- }).filter(wz) : o.ticks && !n && u != null ? o.ticks(u).map((e, t) => {
+ }).filter(Cz) : o.ticks && !n && u != null ? o.ticks(u).map((e, t) => {
var n = o.map(e);
return uU(n) ? {
coordinate: n + h,
@@ -54176,7 +54408,7 @@ var qSe = (e, t, n) => {
index: t,
offset: h
} : null;
- }).filter(wz) : o.domain().map((e, t) => {
+ }).filter(Cz) : o.domain().map((e, t) => {
var n = o.map(e);
return uU(n) ? {
coordinate: n + h,
@@ -54184,12 +54416,12 @@ var qSe = (e, t, n) => {
index: t,
offset: h
} : null;
- }).filter(wz);
+ }).filter(Cz);
}, vU = (e, t) => {
if (!t || t.length !== 2 || !Z(t[0]) || !Z(t[1])) return e;
var n = Math.min(t[0], t[1]), r = Math.max(t[0], t[1]), i = [e[0], e[1]];
return (!Z(e[0]) || e[0] < n) && (i[0] = n), (!Z(e[1]) || e[1] > r) && (i[1] = r), i[0] > r && (i[0] = r), i[1] < n && (i[1] = n), i;
-}, JSe = {
+}, QSe = {
sign: (e) => {
var t = e.length;
if (!(t <= 0)) {
@@ -54197,16 +54429,16 @@ var qSe = (e, t, n) => {
if (!(n == null || n <= 0)) for (var r = 0; r < n; ++r) for (var i = 0, a = 0, o = 0; o < t; ++o) {
var s = e[o]?.[r];
if (s != null) {
- var c = s[1], l = s[0], u = mz(c) ? l : c;
+ var c = s[1], l = s[0], u = pz(c) ? l : c;
u >= 0 ? (s[0] = i, i += u, s[1] = i) : (s[0] = a, a += u, s[1] = a);
}
}
}
},
- expand: qbe,
- none: nz,
- silhouette: Jbe,
- wiggle: Ybe,
+ expand: Qbe,
+ none: tz,
+ silhouette: $be,
+ wiggle: exe,
positive: (e) => {
var t = e.length;
if (!(t <= 0)) {
@@ -54214,14 +54446,14 @@ var qSe = (e, t, n) => {
if (!(n == null || n <= 0)) for (var r = 0; r < n; ++r) for (var i = 0, a = 0; a < t; ++a) {
var o = e[a]?.[r];
if (o != null) {
- var s = mz(o[1]) ? o[0] : o[1];
+ var s = pz(o[1]) ? o[0] : o[1];
s >= 0 ? (o[0] = i, i += s, o[1] = i) : (o[0] = 0, o[1] = 0);
}
}
}
}
-}, YSe = (e, t, n) => {
- var r = JSe[n] ?? nz, i = Kbe().keys(t).value((e, t) => Number(mU(e, t, 0))).order(rz).offset(r)(e);
+}, $Se = (e, t, n) => {
+ var r = QSe[n] ?? tz, i = Zbe().keys(t).value((e, t) => Number(mU(e, t, 0))).order(nz).offset(r)(e);
return i.forEach((n, r) => {
n.forEach((n, i) => {
var a = mU(e[i], t[r], 0);
@@ -54235,20 +54467,20 @@ function yU(e) {
function bU(e) {
var { axis: t, ticks: n, bandSize: r, entry: i, index: a, dataKey: o } = e;
if (t.type === "category") {
- if (!t.allowDuplicatedCategory && t.dataKey && !Sz(i[t.dataKey])) {
- var s = xz(n, "value", i[t.dataKey]);
+ if (!t.allowDuplicatedCategory && t.dataKey && !xz(i[t.dataKey])) {
+ var s = bz(n, "value", i[t.dataKey]);
if (s) return s.coordinate + r / 2;
}
return n != null && n[a] ? n[a].coordinate + r / 2 : null;
}
- var c = mU(i, Sz(o) ? t.dataKey : o), l = t.scale.map(c);
+ var c = mU(i, xz(o) ? t.dataKey : o), l = t.scale.map(c);
return Z(l) ? l : null;
}
var xU = (e) => {
var { axis: t, ticks: n, offset: r, bandSize: i, entry: a, index: o } = e;
if (t.type === "category") return n[o] ? n[o].coordinate + r : null;
var s = mU(a, t.dataKey, t.scale.domain()[o]);
- if (Sz(s)) return null;
+ if (xz(s)) return null;
var c = t.scale.map(s);
return Z(c) ? c - i / 2 + r : null;
}, SU = (e) => {
@@ -54258,15 +54490,15 @@ var xU = (e) => {
return r <= 0 && i >= 0 ? 0 : i < 0 ? i : r;
}
return n[0];
-}, XSe = (e) => {
+}, eCe = (e) => {
var t = e.flat(2).filter(Z);
return [Math.min(...t), Math.max(...t)];
-}, ZSe = (e) => [e[0] === Infinity ? 0 : e[0], e[1] === -Infinity ? 0 : e[1]], QSe = (e, t, n) => {
- if (e != null) return ZSe(Object.keys(e).reduce((r, i) => {
+}, tCe = (e) => [e[0] === Infinity ? 0 : e[0], e[1] === -Infinity ? 0 : e[1]], nCe = (e, t, n) => {
+ if (e != null) return tCe(Object.keys(e).reduce((r, i) => {
var a = e[i];
if (!a) return r;
var { stackedData: o } = a, s = o.reduce((e, r) => {
- var i = XSe(lU(r, t, n));
+ var i = eCe(lU(r, t, n));
return !uU(i[0]) || !uU(i[1]) ? e : [Math.min(e[0], i[0]), Math.max(e[1], i[1])];
}, [Infinity, -Infinity]);
return [Math.min(s[0], r[0]), Math.max(s[1], r[1])];
@@ -54298,10 +54530,10 @@ function DU(e, t) {
if (e) return String(e);
if (typeof t == "string") return t;
}
-var $Se = (e, t) => {
+var rCe = (e, t) => {
if (t === "horizontal") return e.relativeX;
if (t === "vertical") return e.relativeY;
-}, eCe = (e, t) => t === "centric" ? e.angle : e.radius, OU = (e) => e.layout.width, kU = (e) => e.layout.height, tCe = (e) => e.layout.scale, AU = (e) => e.layout.margin, jU = $((e) => e.cartesianAxis.xAxis, (e) => Object.values(e)), MU = $((e) => e.cartesianAxis.yAxis, (e) => Object.values(e)), nCe = "data-recharts-item-index";
+}, iCe = (e, t) => t === "centric" ? e.angle : e.radius, OU = (e) => e.layout.width, kU = (e) => e.layout.height, aCe = (e) => e.layout.scale, AU = (e) => e.layout.margin, jU = $((e) => e.cartesianAxis.xAxis, (e) => Object.values(e)), MU = $((e) => e.cartesianAxis.yAxis, (e) => Object.values(e)), oCe = "data-recharts-item-index";
//#endregion
//#region node_modules/recharts/es6/state/selectors/selectChartOffsetInternal.js
function NU(e, t) {
@@ -54318,26 +54550,26 @@ function PU(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? NU(Object(n), !0).forEach(function(t) {
- rCe(e, t, n[t]);
+ sCe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : NU(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function rCe(e, t, n) {
- return (t = iCe(t)) in e ? Object.defineProperty(e, t, {
+function sCe(e, t, n) {
+ return (t = cCe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function iCe(e) {
- var t = aCe(e, "string");
+function cCe(e) {
+ var t = lCe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function aCe(e, t) {
+function lCe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -54347,28 +54579,28 @@ function aCe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var oCe = (e) => e.brush.height;
-function sCe(e) {
+var uCe = (e) => e.brush.height;
+function dCe(e) {
return MU(e).reduce((e, t) => t.orientation === "left" && !t.mirror && !t.hide ? e + (typeof t.width == "number" ? t.width : 60) : e, 0);
}
-function cCe(e) {
+function fCe(e) {
return MU(e).reduce((e, t) => t.orientation === "right" && !t.mirror && !t.hide ? e + (typeof t.width == "number" ? t.width : 60) : e, 0);
}
-function lCe(e) {
+function pCe(e) {
return jU(e).reduce((e, t) => t.orientation === "top" && !t.mirror && !t.hide ? e + t.height : e, 0);
}
-function uCe(e) {
+function mCe(e) {
return jU(e).reduce((e, t) => t.orientation === "bottom" && !t.mirror && !t.hide ? e + t.height : e, 0);
}
var FU = $([
OU,
kU,
AU,
- oCe,
- sCe,
- cCe,
- lCe,
uCe,
+ dCe,
+ fCe,
+ pCe,
+ mCe,
XB,
ZB
], (e, t, n, r, i, a, o, s, c, l) => {
@@ -54379,13 +54611,13 @@ var FU = $([
top: (n.top || 0) + o,
bottom: (n.bottom || 0) + s
}), u), f = d.bottom;
- d.bottom += r, d = qSe(d, c, l);
+ d.bottom += r, d = ZSe(d, c, l);
var p = e - d.left - d.right, m = t - d.top - d.bottom;
return PU(PU({ brushBottom: f }, d), {}, {
width: Math.max(p, 0),
height: Math.max(m, 0)
});
-}), dCe = $(FU, (e) => ({
+}), hCe = $(FU, (e) => ({
x: e.left,
y: e.top,
width: e.width,
@@ -54395,7 +54627,7 @@ var FU = $([
y: 0,
width: e,
height: t
-})), fCe = /*#__PURE__*/ (0, B.createContext)(null), LU = () => (0, B.useContext)(fCe) != null, RU = (e) => e.brush, zU = $([
+})), gCe = /*#__PURE__*/ (0, B.createContext)(null), LU = () => (0, B.useContext)(gCe) != null, RU = (e) => e.brush, zU = $([
RU,
FU,
AU
@@ -54407,7 +54639,7 @@ var FU = $([
}));
//#endregion
//#region node_modules/es-toolkit/dist/function/debounce.mjs
-function pCe(e, t, { signal: n, edges: r } = {}) {
+function _Ce(e, t, { signal: n, edges: r } = {}) {
let i, a = null, o = r != null && r.includes("leading"), s = r == null || r.includes("trailing"), c = () => {
a !== null && (e.apply(i, a), i = void 0, a = null);
}, l = () => {
@@ -54432,11 +54664,11 @@ function pCe(e, t, { signal: n, edges: r } = {}) {
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/function/debounce.mjs
-function mCe(e, t = 0, n = {}) {
+function vCe(e, t = 0, n = {}) {
typeof n != "object" && (n = {});
let { leading: r = !1, trailing: i = !0, maxWait: a } = n, o = [, ,];
r && (o[0] = "leading"), i && (o[1] = "trailing");
- let s, c = null, l = pCe(function(...t) {
+ let s, c = null, l = _Ce(function(...t) {
s = e.apply(this, t), c = null;
}, t, { edges: o }), u = function(...t) {
return a != null && (c === null && (c = Date.now()), Date.now() - c >= a) ? ((r || i) && (s = e.apply(this, t)), c = Date.now(), l.cancel(), l.schedule(), s) : (l.apply(this, t), s);
@@ -54445,9 +54677,9 @@ function mCe(e, t = 0, n = {}) {
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/function/throttle.mjs
-function hCe(e, t = 0, n = {}) {
+function yCe(e, t = 0, n = {}) {
let { leading: r = !0, trailing: i = !0 } = n;
- return mCe(e, t, {
+ return vCe(e, t, {
leading: r,
maxWait: t,
trailing: i
@@ -54474,26 +54706,26 @@ var BU = function(e, t) {
height: -1
}
}, HU = (e, t, n) => {
- var { width: r = VU.width, height: i = VU.height, aspect: a, maxHeight: o } = n, s = hz(r) ? e : Number(r), c = hz(i) ? t : Number(i);
+ var { width: r = VU.width, height: i = VU.height, aspect: a, maxHeight: o } = n, s = mz(r) ? e : Number(r), c = mz(i) ? t : Number(i);
return a && a > 0 && (s ? c = s / a : c && (s = c * a), o && c != null && c > o && (c = o)), {
calculatedWidth: s,
calculatedHeight: c
};
-}, gCe = {
+}, bCe = {
width: 0,
height: 0,
overflow: "visible"
-}, _Ce = {
+}, xCe = {
width: 0,
overflowX: "visible"
-}, vCe = {
+}, SCe = {
height: 0,
overflowY: "visible"
-}, yCe = {}, bCe = (e) => {
- var { width: t, height: n } = e, r = hz(t), i = hz(n);
- return r && i ? gCe : r ? _Ce : i ? vCe : yCe;
+}, CCe = {}, wCe = (e) => {
+ var { width: t, height: n } = e, r = mz(t), i = mz(n);
+ return r && i ? bCe : r ? xCe : i ? SCe : CCe;
};
-function xCe(e) {
+function TCe(e) {
var { width: t, height: n, aspect: r } = e, i = t, a = n;
return i === void 0 && a === void 0 ? (i = VU.width, a = VU.height) : i === void 0 ? i = r && r > 0 ? void 0 : VU.width : a === void 0 && (a = r && r > 0 ? void 0 : VU.height), {
width: i,
@@ -54525,26 +54757,26 @@ function GU(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? WU(Object(n), !0).forEach(function(t) {
- SCe(e, t, n[t]);
+ ECe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : WU(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function SCe(e, t, n) {
- return (t = CCe(t)) in e ? Object.defineProperty(e, t, {
+function ECe(e, t, n) {
+ return (t = DCe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function CCe(e) {
- var t = wCe(e, "string");
+function DCe(e) {
+ var t = OCe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function wCe(e, t) {
+function OCe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -54555,7 +54787,7 @@ function wCe(e, t) {
return (t === "string" ? String : Number)(e);
}
var KU = /*#__PURE__*/ (0, B.createContext)(VU.initialDimension);
-function TCe(e) {
+function kCe(e) {
return dU(e.width) && dU(e.height);
}
function qU(e) {
@@ -54563,9 +54795,9 @@ function qU(e) {
width: n,
height: r
}), [n, r]);
- return TCe(i) ? /*#__PURE__*/ B.createElement(KU.Provider, { value: i }, t) : null;
+ return kCe(i) ? /*#__PURE__*/ B.createElement(KU.Provider, { value: i }, t) : null;
}
-var JU = () => (0, B.useContext)(KU), ECe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
+var JU = () => (0, B.useContext)(KU), ACe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
var { aspect: n, initialDimension: r = VU.initialDimension, width: i, height: a, minWidth: o = VU.minWidth, minHeight: s, maxHeight: c, children: l, debounce: u = VU.debounce, id: d, className: f, onResize: p, style: m = {} } = e, h = (0, B.useRef)(null), g = (0, B.useRef)();
g.current = p, (0, B.useImperativeHandle)(t, () => h.current);
var [_, v] = (0, B.useState)({
@@ -54581,7 +54813,7 @@ var JU = () => (0, B.useContext)(KU), ECe = /*#__PURE__*/ (0, B.forwardRef)((e,
});
}, []);
(0, B.useEffect)(() => {
- if (h.current == null || typeof ResizeObserver > "u") return Tz;
+ if (h.current == null || typeof ResizeObserver > "u") return wz;
var e = (e) => {
var t, n = e[0];
if (n != null) {
@@ -54589,7 +54821,7 @@ var JU = () => (0, B.useContext)(KU), ECe = /*#__PURE__*/ (0, B.forwardRef)((e,
y(r, i), (t = g.current) == null || t.call(g, r, i);
}
};
- u > 0 && (e = hCe(e, u, {
+ u > 0 && (e = yCe(e, u, {
trailing: !0,
leading: !1
}));
@@ -54617,7 +54849,7 @@ var JU = () => (0, B.useContext)(KU), ECe = /*#__PURE__*/ (0, B.forwardRef)((e,
maxHeight: c
}),
ref: h
- }, /*#__PURE__*/ B.createElement("div", { style: bCe({
+ }, /*#__PURE__*/ B.createElement("div", { style: wCe({
width: i,
height: a
}) }, /*#__PURE__*/ B.createElement(qU, {
@@ -54627,7 +54859,7 @@ var JU = () => (0, B.useContext)(KU), ECe = /*#__PURE__*/ (0, B.forwardRef)((e,
}), YU = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
var n = JU();
if (dU(n.width) && dU(n.height)) return e.children;
- var { width: r, height: i } = xCe({
+ var { width: r, height: i } = TCe({
width: e.width,
height: e.height,
aspect: e.aspect
@@ -54640,7 +54872,7 @@ var JU = () => (0, B.useContext)(KU), ECe = /*#__PURE__*/ (0, B.forwardRef)((e,
return Z(a) && Z(o) ? /*#__PURE__*/ B.createElement(qU, {
width: a,
height: o
- }, e.children) : /*#__PURE__*/ B.createElement(ECe, UU({}, e, {
+ }, e.children) : /*#__PURE__*/ B.createElement(ACe, UU({}, e, {
width: r,
height: i,
ref: t
@@ -54659,14 +54891,14 @@ function XU(e) {
};
}
var ZU = () => {
- var e = LU(), t = Q(dCe), n = Q(zU), r = Q(RU)?.padding;
+ var e = LU(), t = Q(hCe), n = Q(zU), r = Q(RU)?.padding;
return !e || !n || !r ? t : {
width: n.width - r.left - r.right,
height: n.height - r.top - r.bottom,
x: r.left,
y: r.top
};
-}, DCe = {
+}, jCe = {
top: 0,
bottom: 0,
left: 0,
@@ -54674,16 +54906,16 @@ var ZU = () => {
width: 0,
height: 0,
brushBottom: 0
-}, QU = () => Q(FU) ?? DCe, $U = () => Q(OU), eW = () => Q(kU), OCe = () => Q((e) => e.layout.margin), tW = (e) => e.layout.layoutType, nW = () => Q(tW), rW = () => {
+}, QU = () => Q(FU) ?? jCe, $U = () => Q(OU), eW = () => Q(kU), MCe = () => Q((e) => e.layout.margin), tW = (e) => e.layout.layoutType, nW = () => Q(tW), rW = () => {
var e = nW();
if (e === "horizontal" || e === "vertical") return e;
}, iW = (e) => {
var t = e.layout.layoutType;
if (t === "centric" || t === "radial") return t;
-}, aW = () => Q(iW), kCe = () => nW() !== void 0, oW = (e) => {
+}, aW = () => Q(iW), NCe = () => nW() !== void 0, oW = (e) => {
var t = CB(), n = LU(), { width: r, height: i } = e, a = JU(), o = r, s = i;
return a && (o = a.width > 0 ? a.width : r, s = a.height > 0 ? a.height : i), (0, B.useEffect)(() => {
- !n && dU(o) && dU(s) && t(VSe({
+ !n && dU(o) && dU(s) && t(GSe({
width: o,
height: s
}));
@@ -54704,7 +54936,7 @@ function fW(e) {
function pW(e) {
return e ? hW(e) || Array.isArray(e) || !!e[cW] || !!e.constructor?.[cW] || bW(e) || xW(e) : !1;
}
-var ACe = Object.prototype.constructor.toString(), mW = /* @__PURE__ */ new WeakMap();
+var PCe = Object.prototype.constructor.toString(), mW = /* @__PURE__ */ new WeakMap();
function hW(e) {
if (!e || typeof e != "object") return !1;
let t = Object.getPrototypeOf(e);
@@ -54713,7 +54945,7 @@ function hW(e) {
if (n === Object) return !0;
if (typeof n != "function") return !1;
let r = mW.get(n);
- return r === void 0 && (r = Function.toString.call(n), mW.set(n, r)), r === ACe;
+ return r === void 0 && (r = Function.toString.call(n), mW.set(n, r)), r === PCe;
}
function gW(e, t, n = !0) {
_W(e) === 0 ? (n ? Reflect.ownKeys(e) : Object.keys(e)).forEach((n) => {
@@ -54731,7 +54963,7 @@ function yW(e, t, n) {
let r = _W(e);
r === 2 ? e.set(t, n) : r === 3 ? e.add(n) : e[t] = n;
}
-function jCe(e, t) {
+function FCe(e, t) {
return e === t ? e !== 0 || 1 / e == 1 / t : e !== e && t !== t;
}
function bW(e) {
@@ -54778,23 +55010,23 @@ function wW(e, t = !1) {
delete: TW
}), Object.freeze(e), t && Object.values(e).forEach((e) => wW(e, !0)), e);
}
-function MCe() {
+function ICe() {
uW(2);
}
-var TW = { value: MCe };
+var TW = { value: ICe };
function EW(e) {
return typeof e != "object" || !e || Object.isFrozen(e);
}
-var NCe = {};
+var LCe = {};
function DW(e) {
- let t = NCe[e];
+ let t = LCe[e];
return t || uW(0, e), t;
}
var OW;
function kW() {
return OW;
}
-function PCe(e, t) {
+function RCe(e, t) {
return {
drafts_: [],
parent_: e,
@@ -54807,15 +55039,15 @@ function AW(e, t) {
t && (DW("Patches"), e.patches_ = [], e.inversePatches_ = [], e.patchListener_ = t);
}
function jW(e) {
- MW(e), e.drafts_.forEach(FCe), e.drafts_ = null;
+ MW(e), e.drafts_.forEach(zCe), e.drafts_ = null;
}
function MW(e) {
e === OW && (OW = e.parent_);
}
function NW(e) {
- return OW = PCe(OW, e);
+ return OW = RCe(OW, e);
}
-function FCe(e) {
+function zCe(e) {
let t = e[lW];
t.type_ === 0 || t.type_ === 1 ? t.revoke_() : t.revoked_ = !0;
}
@@ -54855,7 +55087,7 @@ function IW(e, t, n, r, i, a, o) {
function LW(e, t, n = !1) {
!e.parent_ && e.immer_.autoFreeze_ && e.canAutoFreeze_ && wW(t, n);
}
-function ICe(e, t) {
+function BCe(e, t) {
let n = Array.isArray(e), r = {
type_: +!!n,
scope_: t ? t.scope_ : kW(),
@@ -54877,7 +55109,7 @@ var RW = {
get(e, t) {
if (t === lW) return e;
let n = SW(e);
- if (!vW(n, t)) return LCe(e, n, t);
+ if (!vW(n, t)) return VCe(e, n, t);
let r = n[t];
return e.finalized_ || !pW(r) ? r : r === BW(e.base_, t) ? (UW(e), e.copy_[t] = WW(r, e)) : r;
},
@@ -54893,7 +55125,7 @@ var RW = {
if (!e.modified_) {
let r = BW(SW(e), t), i = r?.[lW];
if (i && i.base_ === n) return e.copy_[t] = n, e.assigned_[t] = !1, !0;
- if (jCe(n, r) && (n !== void 0 || vW(e.base_, t))) return !0;
+ if (FCe(n, r) && (n !== void 0 || vW(e.base_, t))) return !0;
UW(e), HW(e);
}
return e.copy_[t] === n && (n !== void 0 || t in e.copy_) || Number.isNaN(n) && Number.isNaN(e.copy_[t]) ? !0 : (e.copy_[t] = n, e.assigned_[t] = !0, !0);
@@ -54933,7 +55165,7 @@ function BW(e, t) {
let n = e[lW];
return (n ? SW(n) : e)[t];
}
-function LCe(e, t, n) {
+function VCe(e, t, n) {
let r = VW(t, n);
return r ? "value" in r ? r.value : r.get?.call(e.draft_) : void 0;
}
@@ -54952,7 +55184,7 @@ function HW(e) {
function UW(e) {
e.copy_ ||= CW(e.base_, e.scope_.immer_.useStrictShallowCopy_);
}
-var RCe = class {
+var HCe = class {
constructor(e) {
this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.useStrictIteration_ = !0, this.produce = (e, t, n) => {
if (typeof e == "function" && typeof t != "function") {
@@ -54995,7 +55227,7 @@ var RCe = class {
}, typeof e?.autoFreeze == "boolean" && this.setAutoFreeze(e.autoFreeze), typeof e?.useStrictShallowCopy == "boolean" && this.setUseStrictShallowCopy(e.useStrictShallowCopy), typeof e?.useStrictIteration == "boolean" && this.setUseStrictIteration(e.useStrictIteration);
}
createDraft(e) {
- pW(e) || uW(8), fW(e) && (e = zCe(e));
+ pW(e) || uW(8), fW(e) && (e = UCe(e));
let t = NW(this), n = WW(e, void 0);
return n[lW].isManual_ = !0, MW(t), n;
}
@@ -55032,10 +55264,10 @@ var RCe = class {
}
};
function WW(e, t) {
- let n = bW(e) ? DW("MapSet").proxyMap_(e, t) : xW(e) ? DW("MapSet").proxySet_(e, t) : ICe(e, t);
+ let n = bW(e) ? DW("MapSet").proxyMap_(e, t) : xW(e) ? DW("MapSet").proxySet_(e, t) : BCe(e, t);
return (t ? t.scope_ : kW()).drafts_.push(n), n;
}
-function zCe(e) {
+function UCe(e) {
return fW(e) || uW(10, e), GW(e);
}
function GW(e) {
@@ -55049,7 +55281,7 @@ function GW(e) {
yW(n, e, GW(t));
}, r), t && (t.finalized_ = !1), n;
}
-new RCe().produce;
+new HCe().produce;
function KW(e) {
return e;
}
@@ -55098,24 +55330,24 @@ var qW = FH({
prepare: jH()
}
}
-}), { setLegendSize: JW, setLegendSettings: BCe, addLegendPayload: YW, replaceLegendPayload: XW, removeLegendPayload: ZW } = qW.actions, VCe = qW.reducer, HCe = /* @__PURE__ */ mt(((e) => {
+}), { setLegendSize: JW, setLegendSettings: WCe, addLegendPayload: YW, replaceLegendPayload: XW, removeLegendPayload: ZW } = qW.actions, GCe = qW.reducer, KCe = /* @__PURE__ */ mt(((e) => {
var t = St();
t.useSyncExternalStore, t.useRef, t.useEffect, t.useMemo, t.useDebugValue;
}));
(/* @__PURE__ */ mt(((e, t) => {
- t.exports = HCe();
+ t.exports = KCe();
})))();
-function UCe(e) {
+function qCe(e) {
e();
}
-function WCe() {
+function JCe() {
let e = null, t = null;
return {
clear() {
e = null, t = null;
},
notify() {
- UCe(() => {
+ qCe(() => {
let t = e;
for (; t;) t.callback(), t = t.next;
});
@@ -55141,7 +55373,7 @@ var QW = {
notify() {},
get: () => []
};
-function GCe(e, t) {
+function YCe(e, t) {
let n, r = QW, i = 0, a = !1;
function o(e) {
u();
@@ -55160,7 +55392,7 @@ function GCe(e, t) {
return a;
}
function u() {
- i++, n || (n = t ? t.addNestedSub(c) : e.subscribe(c), r = WCe());
+ i++, n || (n = t ? t.addNestedSub(c) : e.subscribe(c), r = JCe());
}
function d() {
i--, n && i === 0 && (n(), n = void 0, r.clear(), r = QW);
@@ -55182,11 +55414,11 @@ function GCe(e, t) {
};
return m;
}
-var KCe = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, qCe = typeof navigator < "u" && navigator.product === "ReactNative", JCe = KCe || qCe ? B.useLayoutEffect : B.useEffect;
+var XCe = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, ZCe = typeof navigator < "u" && navigator.product === "ReactNative", QCe = XCe || ZCe ? B.useLayoutEffect : B.useEffect;
function $W(e, t) {
return e === t ? e !== 0 || t !== 0 || 1 / e == 1 / t : e !== e && t !== t;
}
-function YCe(e, t) {
+function $Ce(e, t) {
if ($W(e, t)) return !0;
if (typeof e != "object" || !e || typeof t != "object" || !t) return !1;
let n = Object.keys(e), r = Object.keys(t);
@@ -55194,32 +55426,32 @@ function YCe(e, t) {
for (let r = 0; r < n.length; r++) if (!Object.prototype.hasOwnProperty.call(t, n[r]) || !$W(e[n[r]], t[n[r]])) return !1;
return !0;
}
-var XCe = /* @__PURE__ */ Symbol.for("react-redux-context"), ZCe = typeof globalThis < "u" ? globalThis : {};
-function QCe() {
+var ewe = /* @__PURE__ */ Symbol.for("react-redux-context"), twe = typeof globalThis < "u" ? globalThis : {};
+function nwe() {
if (!B.createContext) return {};
- let e = ZCe[XCe] ??= /* @__PURE__ */ new Map(), t = e.get(B.createContext);
+ let e = twe[ewe] ??= /* @__PURE__ */ new Map(), t = e.get(B.createContext);
return t || (t = B.createContext(null), e.set(B.createContext, t)), t;
}
-var $Ce = /* @__PURE__ */ QCe();
-function ewe(e) {
+var rwe = /* @__PURE__ */ nwe();
+function iwe(e) {
let { children: t, context: n, serverState: r, store: i } = e, a = B.useMemo(() => {
- let e = GCe(i);
+ let e = YCe(i);
return {
store: i,
subscription: e,
getServerState: r ? () => r : void 0
};
}, [i, r]), o = B.useMemo(() => i.getState(), [i]);
- JCe(() => {
+ QCe(() => {
let { subscription: e } = a;
return e.onStateChange = e.notifyNestedSubs, e.trySubscribe(), o !== i.getState() && e.notifyNestedSubs(), () => {
e.tryUnsubscribe(), e.onStateChange = void 0;
};
}, [a, o]);
- let s = n || $Ce;
+ let s = n || rwe;
return /* @__PURE__ */ B.createElement(s.Provider, { value: a }, t);
}
-var twe = ewe, nwe = /* @__PURE__ */ new Set([
+var awe = iwe, owe = /* @__PURE__ */ new Set([
"axisLine",
"tickLine",
"activeBar",
@@ -55242,19 +55474,19 @@ var twe = ewe, nwe = /* @__PURE__ */ new Set([
"radius",
"throttledEvents"
]);
-function rwe(e, t) {
+function swe(e, t) {
return e == null && t == null ? !0 : typeof e == "number" && typeof t == "number" ? e === t || e !== e && t !== t : e === t;
}
function eG(e, t) {
- for (var n of /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)])) if (nwe.has(n)) {
+ for (var n of /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)])) if (owe.has(n)) {
if (e[n] == null && t[n] == null) continue;
- if (!YCe(e[n], t[n])) return !1;
- } else if (!rwe(e[n], t[n])) return !1;
+ if (!$Ce(e[n], t[n])) return !1;
+ } else if (!swe(e[n], t[n])) return !1;
return !0;
}
//#endregion
//#region node_modules/recharts/es6/component/Legend.js
-var iwe = ["contextPayload"];
+var cwe = ["contextPayload"];
function tG() {
return tG = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
@@ -55278,26 +55510,26 @@ function rG(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? nG(Object(n), !0).forEach(function(t) {
- awe(e, t, n[t]);
+ lwe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : nG(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function awe(e, t, n) {
- return (t = owe(t)) in e ? Object.defineProperty(e, t, {
+function lwe(e, t, n) {
+ return (t = uwe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function owe(e) {
- var t = swe(e, "string");
+function uwe(e) {
+ var t = dwe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function swe(e, t) {
+function dwe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -55307,16 +55539,16 @@ function swe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function cwe(e, t) {
+function fwe(e, t) {
if (e == null) return {};
- var n, r, i = lwe(e, t);
+ var n, r, i = pwe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function lwe(e, t) {
+function pwe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -55325,24 +55557,24 @@ function lwe(e, t) {
}
return n;
}
-function uwe(e) {
+function mwe(e) {
return e.value;
}
-function dwe(e) {
- var { contextPayload: t } = e, n = cwe(e, iwe), r = _B(t, e.payloadUniqBy, uwe), i = rG(rG({}, n), {}, { payload: r });
- return /*#__PURE__*/ B.isValidElement(e.content) ? /*#__PURE__*/ B.cloneElement(e.content, i) : typeof e.content == "function" ? /*#__PURE__*/ B.createElement(e.content, i) : /*#__PURE__*/ B.createElement(Cxe, i);
+function hwe(e) {
+ var { contextPayload: t } = e, n = fwe(e, cwe), r = _B(t, e.payloadUniqBy, mwe), i = rG(rG({}, n), {}, { payload: r });
+ return /*#__PURE__*/ B.isValidElement(e.content) ? /*#__PURE__*/ B.cloneElement(e.content, i) : typeof e.content == "function" ? /*#__PURE__*/ B.createElement(e.content, i) : /*#__PURE__*/ B.createElement(Oxe, i);
}
-function fwe(e, t, n, r, i, a) {
+function gwe(e, t, n, r, i, a) {
var { layout: o, align: s, verticalAlign: c } = t, l, u;
return (!e || (e.left === void 0 || e.left === null) && (e.right === void 0 || e.right === null)) && (l = s === "center" && o === "vertical" ? { left: ((r || 0) - a.width) / 2 } : s === "right" ? { right: n && n.right || 0 } : { left: n && n.left || 0 }), (!e || (e.top === void 0 || e.top === null) && (e.bottom === void 0 || e.bottom === null)) && (u = c === "middle" ? { top: ((i || 0) - a.height) / 2 } : c === "bottom" ? { bottom: n && n.bottom || 0 } : { top: n && n.top || 0 }), rG(rG({}, l), u);
}
-function pwe(e) {
+function _we(e) {
var t = CB();
return (0, B.useEffect)(() => {
- t(BCe(e));
+ t(WCe(e));
}, [t, e]), null;
}
-function mwe(e) {
+function vwe(e) {
var t = CB();
return (0, B.useEffect)(() => (t(JW(e)), () => {
t(JW({
@@ -55351,10 +55583,10 @@ function mwe(e) {
}));
}), [t, e]), null;
}
-function hwe(e, t, n, r) {
+function ywe(e, t, n, r) {
return e === "vertical" && t != null ? { height: t } : e === "horizontal" ? { width: n || r } : null;
}
-var gwe = {
+var bwe = {
align: "center",
iconSize: 14,
inactiveColor: "#ccc",
@@ -55362,28 +55594,28 @@ var gwe = {
layout: "horizontal",
verticalAlign: "bottom"
};
-function _we(e) {
- var t = Fz(e, gwe), n = $B(), r = _be(), i = OCe(), { width: a, height: o, wrapperStyle: s, portal: c } = t, [l, u] = tV([n]), d = $U(), f = eW();
+function xwe(e) {
+ var t = Pz(e, bwe), n = $B(), r = Sbe(), i = MCe(), { width: a, height: o, wrapperStyle: s, portal: c } = t, [l, u] = tV([n]), d = $U(), f = eW();
if (d == null || f == null) return null;
- var p = d - (i?.left || 0) - (i?.right || 0), m = hwe(t.layout, o, a, p), h = c ? s : rG(rG({
+ var p = d - (i?.left || 0) - (i?.right || 0), m = ywe(t.layout, o, a, p), h = c ? s : rG(rG({
position: "absolute",
width: m?.width || a || "auto",
height: m?.height || o || "auto"
- }, fwe(s, t, i, d, f, l)), s), g = c ?? r;
+ }, gwe(s, t, i, d, f, l)), s), g = c ?? r;
if (g == null || n == null) return null;
var _ = /*#__PURE__*/ B.createElement("div", {
className: "recharts-legend-wrapper",
style: h,
ref: u
- }, /*#__PURE__*/ B.createElement(pwe, {
+ }, /*#__PURE__*/ B.createElement(_we, {
layout: t.layout,
align: t.align,
verticalAlign: t.verticalAlign,
itemSorter: t.itemSorter
- }), !c && /*#__PURE__*/ B.createElement(mwe, {
+ }), !c && /*#__PURE__*/ B.createElement(vwe, {
width: l.width,
height: l.height
- }), /*#__PURE__*/ B.createElement(dwe, tG({}, t, m, {
+ }), /*#__PURE__*/ B.createElement(hwe, tG({}, t, m, {
margin: i,
chartWidth: d,
chartHeight: f,
@@ -55391,7 +55623,7 @@ function _we(e) {
})));
return /*#__PURE__*/ (0, Dt.createPortal)(_, g);
}
-var iG = /*#__PURE__*/ B.memo(_we, eG);
+var iG = /*#__PURE__*/ B.memo(xwe, eG);
iG.displayName = "Legend";
//#endregion
//#region node_modules/recharts/es6/component/DefaultTooltipContent.js
@@ -55418,26 +55650,26 @@ function sG(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? oG(Object(n), !0).forEach(function(t) {
- vwe(e, t, n[t]);
+ Swe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : oG(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function vwe(e, t, n) {
- return (t = ywe(t)) in e ? Object.defineProperty(e, t, {
+function Swe(e, t, n) {
+ return (t = Cwe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function ywe(e) {
- var t = bwe(e, "string");
+function Cwe(e) {
+ var t = wwe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function bwe(e, t) {
+function wwe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -55447,8 +55679,8 @@ function bwe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function xwe(e) {
- return Array.isArray(e) && gz(e[0]) && gz(e[1]) ? e.join(" ~ ") : e;
+function Twe(e) {
+ return Array.isArray(e) && hz(e[0]) && hz(e[1]) ? e.join(" ~ ") : e;
}
var cG = {
separator: " : ",
@@ -55468,18 +55700,18 @@ var cG = {
labelStyle: {},
accessibilityLayer: !1
};
-function Swe(e, t) {
+function Ewe(e, t) {
return t == null ? e : YB(e, t);
}
-var Cwe = (e) => {
+var Dwe = (e) => {
var { separator: t = cG.separator, contentStyle: n, itemStyle: r, labelStyle: i = cG.labelStyle, payload: a, formatter: o, itemSorter: s, wrapperClassName: c, labelClassName: l, label: u, labelFormatter: d, accessibilityLayer: f = cG.accessibilityLayer } = e, p = () => {
if (a && a.length) {
var e = {
padding: 0,
margin: 0
- }, n = Swe(a, s).map((e, n) => {
+ }, n = Ewe(a, s).map((e, n) => {
if (e.type === "none") return null;
- var i = e.formatter || o || xwe, { value: s, name: c } = e, l = s, u = c;
+ var i = e.formatter || o || Twe, { value: s, name: c } = e, l = s, u = c;
if (i) {
var d = i(s, c, e, n, a);
if (Array.isArray(d)) [l, u] = d;
@@ -55491,7 +55723,7 @@ var Cwe = (e) => {
className: "recharts-tooltip-item",
key: `tooltip-item-${n}`,
style: f
- }, gz(u) ? /*#__PURE__*/ B.createElement("span", { className: "recharts-tooltip-item-name" }, u) : null, gz(u) ? /*#__PURE__*/ B.createElement("span", { className: "recharts-tooltip-item-separator" }, t) : null, /*#__PURE__*/ B.createElement("span", { className: "recharts-tooltip-item-value" }, l), /*#__PURE__*/ B.createElement("span", { className: "recharts-tooltip-item-unit" }, e.unit || ""));
+ }, hz(u) ? /*#__PURE__*/ B.createElement("span", { className: "recharts-tooltip-item-name" }, u) : null, hz(u) ? /*#__PURE__*/ B.createElement("span", { className: "recharts-tooltip-item-separator" }, t) : null, /*#__PURE__*/ B.createElement("span", { className: "recharts-tooltip-item-value" }, l), /*#__PURE__*/ B.createElement("span", { className: "recharts-tooltip-item-unit" }, e.unit || ""));
});
return /*#__PURE__*/ B.createElement("ul", {
className: "recharts-tooltip-item-list",
@@ -55499,7 +55731,7 @@ var Cwe = (e) => {
}, n);
}
return null;
- }, m = sG(sG({}, cG.contentStyle), n), h = sG({ margin: 0 }, i), g = !Sz(u), _ = g ? u : "", v = Jr("recharts-default-tooltip", c), y = Jr("recharts-tooltip-label", l);
+ }, m = sG(sG({}, cG.contentStyle), n), h = sG({ margin: 0 }, i), g = !xz(u), _ = g ? u : "", v = Jr("recharts-default-tooltip", c), y = Jr("recharts-tooltip-label", l);
g && d && a != null && (_ = d(u, a));
var b = f ? {
role: "status",
@@ -55512,8 +55744,8 @@ var Cwe = (e) => {
className: y,
style: h
}, /*#__PURE__*/ B.isValidElement(_) ? _ : `${_}`), p());
-}, lG = "recharts-tooltip-wrapper", wwe = { visibility: "hidden" };
-function Twe(e) {
+}, lG = "recharts-tooltip-wrapper", Owe = { visibility: "hidden" };
+function kwe(e) {
var { coordinate: t, translateX: n, translateY: r } = e;
return Jr(lG, {
[`${lG}-right`]: Z(n) && t && Z(t.x) && n >= t.x,
@@ -55530,11 +55762,11 @@ function uG(e) {
var f = c[r];
return f == null ? 0 : o[r] ? Math.max(u < f ? d : u, f) : l == null ? 0 : d + s > f + l ? Math.max(u, f) : Math.max(d, f);
}
-function Ewe(e) {
+function Awe(e) {
var { translateX: t, translateY: n, useTranslate3d: r } = e;
return { transform: r ? `translate3d(${t}px, ${n}px, 0)` : `translate(${t}px, ${n}px)` };
}
-function Dwe(e) {
+function jwe(e) {
var { allowEscapeViewBox: t, coordinate: n, offsetTop: r, offsetLeft: i, position: a, reverseDirection: o, tooltipBox: s, useTranslate3d: c, viewBox: l } = e, u, d, f;
return s.height > 0 && s.width > 0 && n ? (d = uG({
allowEscapeViewBox: t,
@@ -55556,13 +55788,13 @@ function Dwe(e) {
tooltipDimension: s.height,
viewBox: l,
viewBoxDimension: l.height
- }), u = Ewe({
+ }), u = Awe({
translateX: d,
translateY: f,
useTranslate3d: c
- })) : u = wwe, {
+ })) : u = Owe, {
cssProperties: u,
- cssClasses: Twe({
+ cssClasses: kwe({
translateX: d,
translateY: f,
coordinate: n
@@ -55604,26 +55836,26 @@ function mG(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? pG(Object(n), !0).forEach(function(t) {
- Owe(e, t, n[t]);
+ Mwe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : pG(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function Owe(e, t, n) {
- return (t = kwe(t)) in e ? Object.defineProperty(e, t, {
+function Mwe(e, t, n) {
+ return (t = Nwe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function kwe(e) {
- var t = Awe(e, "string");
+function Nwe(e) {
+ var t = Pwe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function Awe(e, t) {
+function Pwe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -55633,10 +55865,10 @@ function Awe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function jwe(e) {
+function Fwe(e) {
if (!(e.prefersReducedMotion && e.isAnimationActive === "auto") && e.isAnimationActive && e.active) return `transform ${e.animationDuration}ms ${e.animationEasing}`;
}
-function Mwe(e) {
+function Iwe(e) {
var t = fG(), [n, r] = B.useState(() => ({
dismissed: !1,
dismissedAtCoordinate: {
@@ -55658,7 +55890,7 @@ function Mwe(e) {
document.removeEventListener("keydown", t);
};
}, [e.coordinate?.x, e.coordinate?.y]), n.dismissed && ((e.coordinate?.x ?? 0) !== n.dismissedAtCoordinate.x || (e.coordinate?.y ?? 0) !== n.dismissedAtCoordinate.y) && r(mG(mG({}, n), {}, { dismissed: !1 }));
- var { cssClasses: i, cssProperties: a } = Dwe({
+ var { cssClasses: i, cssProperties: a } = jwe({
allowEscapeViewBox: e.allowEscapeViewBox,
coordinate: e.coordinate,
offsetLeft: typeof e.offset == "number" ? e.offset : e.offset.x,
@@ -55671,7 +55903,7 @@ function Mwe(e) {
},
useTranslate3d: e.useTranslate3d,
viewBox: e.viewBox
- }), o = mG(mG({}, e.hasPortalFromProps ? {} : mG(mG({ transition: jwe({
+ }), o = mG(mG({}, e.hasPortalFromProps ? {} : mG(mG({ transition: Fwe({
prefersReducedMotion: t,
isAnimationActive: e.isAnimationActive,
active: e.active,
@@ -55691,7 +55923,7 @@ function Mwe(e) {
ref: e.innerRef
}, e.children);
}
-var Nwe = /*#__PURE__*/ B.memo(Mwe), hG = () => Q((e) => e.rootProps.accessibilityLayer) ?? !0;
+var Lwe = /*#__PURE__*/ B.memo(Iwe), hG = () => Q((e) => e.rootProps.accessibilityLayer) ?? !0;
//#endregion
//#region node_modules/recharts/es6/shape/Curve.js
function gG() {
@@ -55717,26 +55949,26 @@ function vG(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? _G(Object(n), !0).forEach(function(t) {
- Pwe(e, t, n[t]);
+ Rwe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : _G(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function Pwe(e, t, n) {
- return (t = Fwe(t)) in e ? Object.defineProperty(e, t, {
+function Rwe(e, t, n) {
+ return (t = zwe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function Fwe(e) {
- var t = Iwe(e, "string");
+function zwe(e) {
+ var t = Bwe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function Iwe(e, t) {
+function Bwe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -55747,37 +55979,37 @@ function Iwe(e, t) {
return (t === "string" ? String : Number)(e);
}
var yG = {
- curveBasisClosed: Fbe,
- curveBasisOpen: Ibe,
- curveBasis: Pbe,
- curveBumpX: bbe,
- curveBumpY: xbe,
- curveLinearClosed: Lbe,
- curveLinear: DR,
- curveMonotoneX: Rbe,
- curveMonotoneY: zbe,
- curveNatural: Bbe,
- curveStep: Vbe,
- curveStepAfter: Ube,
- curveStepBefore: Hbe
-}, bG = (e) => uU(e.x) && uU(e.y), xG = (e) => e.base != null && bG(e.base) && bG(e), SG = (e) => e.x, CG = (e) => e.y, Lwe = (e, t) => {
+ curveBasisClosed: Bbe,
+ curveBasisOpen: Vbe,
+ curveBasis: zbe,
+ curveBumpX: Tbe,
+ curveBumpY: Ebe,
+ curveLinearClosed: Hbe,
+ curveLinear: ER,
+ curveMonotoneX: Ube,
+ curveMonotoneY: Wbe,
+ curveNatural: Gbe,
+ curveStep: Kbe,
+ curveStepAfter: Jbe,
+ curveStepBefore: qbe
+}, bG = (e) => uU(e.x) && uU(e.y), xG = (e) => e.base != null && bG(e.base) && bG(e), SG = (e) => e.x, CG = (e) => e.y, Vwe = (e, t) => {
if (typeof e == "function") return e;
- var n = `curve${Cz(e)}`;
+ var n = `curve${Sz(e)}`;
if ((n === "curveMonotone" || n === "curveBump") && t) {
var r = yG[`${n}${t === "vertical" ? "Y" : "X"}`];
if (r) return r;
}
- return yG[n] || DR;
+ return yG[n] || ER;
}, wG = {
connectNulls: !1,
type: "linear"
-}, Rwe = (e) => {
- var { type: t = wG.type, points: n = [], baseLine: r, layout: i, connectNulls: a = wG.connectNulls } = e, o = Lwe(t, i), s = a ? n.filter(bG) : n;
+}, Hwe = (e) => {
+ var { type: t = wG.type, points: n = [], baseLine: r, layout: i, connectNulls: a = wG.connectNulls } = e, o = Vwe(t, i), s = a ? n.filter(bG) : n;
if (Array.isArray(r)) {
var c, l = n.map((e, t) => vG(vG({}, e), {}, { base: r[t] }));
- return c = i === "vertical" ? jR().y(CG).x1(SG).x0((e) => e.base.x) : jR().x(SG).y1(CG).y0((e) => e.base.y), c.defined(xG).curve(o)(a ? l.filter(xG) : l);
+ return c = i === "vertical" ? AR().y(CG).x1(SG).x0((e) => e.base.x) : AR().x(SG).y1(CG).y0((e) => e.base.y), c.defined(xG).curve(o)(a ? l.filter(xG) : l);
}
- return (i === "vertical" && Z(r) ? jR().y(CG).x1(SG).x0(r) : Z(r) ? jR().x(SG).y1(CG).y0(r) : AR().x(SG).y(CG)).defined(bG).curve(o)(s);
+ return (i === "vertical" && Z(r) ? AR().y(CG).x1(SG).x0(r) : Z(r) ? AR().x(SG).y1(CG).y0(r) : kR().x(SG).y(CG)).defined(bG).curve(o)(s);
}, TG = (e) => {
var { className: t, points: n, path: r, pathRef: i } = e, a = nW();
if ((!n || !n.length) && !r) return null;
@@ -55787,13 +56019,13 @@ var yG = {
baseLine: e.baseLine,
layout: e.layout || a,
connectNulls: e.connectNulls
- }, s = n && n.length ? Rwe(o) : r;
- return /*#__PURE__*/ B.createElement("path", gG({}, aR(e), Mz(e), {
+ }, s = n && n.length ? Hwe(o) : r;
+ return /*#__PURE__*/ B.createElement("path", gG({}, iR(e), jz(e), {
className: Jr("recharts-curve", t),
d: s === null ? void 0 : s,
ref: i
}));
-}, zwe = [
+}, Uwe = [
"x",
"y",
"top",
@@ -55821,30 +56053,30 @@ function DG(e, t) {
}
return n;
}
-function Bwe(e) {
+function Wwe(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? DG(Object(n), !0).forEach(function(t) {
- Vwe(e, t, n[t]);
+ Gwe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : DG(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function Vwe(e, t, n) {
- return (t = Hwe(t)) in e ? Object.defineProperty(e, t, {
+function Gwe(e, t, n) {
+ return (t = Kwe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function Hwe(e) {
- var t = Uwe(e, "string");
+function Kwe(e) {
+ var t = qwe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function Uwe(e, t) {
+function qwe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -55854,16 +56086,16 @@ function Uwe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function Wwe(e, t) {
+function Jwe(e, t) {
if (e == null) return {};
- var n, r, i = Gwe(e, t);
+ var n, r, i = Ywe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function Gwe(e, t) {
+function Ywe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -55872,8 +56104,8 @@ function Gwe(e, t) {
}
return n;
}
-var Kwe = (e, t, n, r, i, a) => `M${e},${i}v${r}M${a},${t}h${n}`, qwe = (e) => {
- var { x: t = 0, y: n = 0, top: r = 0, left: i = 0, width: a = 0, height: o = 0, className: s } = e, c = Wwe(e, zwe), l = Bwe({
+var Xwe = (e, t, n, r, i, a) => `M${e},${i}v${r}M${a},${t}h${n}`, Zwe = (e) => {
+ var { x: t = 0, y: n = 0, top: r = 0, left: i = 0, width: a = 0, height: o = 0, className: s } = e, c = Jwe(e, Uwe), l = Wwe({
x: t,
y: n,
top: r,
@@ -55881,14 +56113,14 @@ var Kwe = (e, t, n, r, i, a) => `M${e},${i}v${r}M${a},${t}h${n}`, qwe = (e) => {
width: a,
height: o
}, c);
- return !Z(t) || !Z(n) || !Z(a) || !Z(o) || !Z(r) || !Z(i) ? null : /*#__PURE__*/ B.createElement("path", EG({}, sR(l), {
+ return !Z(t) || !Z(n) || !Z(a) || !Z(o) || !Z(r) || !Z(i) ? null : /*#__PURE__*/ B.createElement("path", EG({}, oR(l), {
className: Jr("recharts-cross", s),
- d: Kwe(t, n, a, o, r, i)
+ d: Xwe(t, n, a, o, r, i)
}));
};
//#endregion
//#region node_modules/recharts/es6/util/cursor/getCursorRectangle.js
-function Jwe(e, t, n, r) {
+function Qwe(e, t, n, r) {
var i = r / 2;
return {
stroke: "none",
@@ -55915,26 +56147,26 @@ function kG(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? OG(Object(n), !0).forEach(function(t) {
- Ywe(e, t, n[t]);
+ $we(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : OG(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function Ywe(e, t, n) {
- return (t = Xwe(t)) in e ? Object.defineProperty(e, t, {
+function $we(e, t, n) {
+ return (t = eTe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function Xwe(e) {
- var t = Zwe(e, "string");
+function eTe(e) {
+ var t = tTe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function Zwe(e, t) {
+function tTe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -55944,7 +56176,7 @@ function Zwe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var Qwe = (e) => e.replace(/([A-Z])/g, (e) => `-${e.toLowerCase()}`), AG = (e, t, n) => e.map((e) => `${Qwe(e)} ${t}ms ${n}`).join(","), $we = (e, t) => [Object.keys(e), Object.keys(t)].reduce((e, t) => e.filter((e) => t.includes(e))), jG = (e, t) => Object.keys(t).reduce((n, r) => kG(kG({}, n), {}, { [r]: e(r, t[r]) }), {});
+var nTe = (e) => e.replace(/([A-Z])/g, (e) => `-${e.toLowerCase()}`), AG = (e, t, n) => e.map((e) => `${nTe(e)} ${t}ms ${n}`).join(","), rTe = (e, t) => [Object.keys(e), Object.keys(t)].reduce((e, t) => e.filter((e) => t.includes(e))), jG = (e, t) => Object.keys(t).reduce((n, r) => kG(kG({}, n), {}, { [r]: e(r, t[r]) }), {});
//#endregion
//#region node_modules/recharts/es6/animation/configUpdate.js
function MG(e, t) {
@@ -55961,26 +56193,26 @@ function NG(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? MG(Object(n), !0).forEach(function(t) {
- eTe(e, t, n[t]);
+ iTe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : MG(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function eTe(e, t, n) {
- return (t = tTe(t)) in e ? Object.defineProperty(e, t, {
+function iTe(e, t, n) {
+ return (t = aTe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function tTe(e) {
- var t = nTe(e, "string");
+function aTe(e) {
+ var t = oTe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function nTe(e, t) {
+function oTe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -56009,7 +56241,7 @@ var PG = (e, t, n) => e + (t - e) * n, FG = (e) => {
from: PG(t.from, r[e].from, n)
}) : t, t) : IG(e, r, n - 1);
};
-function rTe(e, t, n, r, i, a) {
+function sTe(e, t, n, r, i, a) {
var o, s = r.reduce((n, r) => NG(NG({}, n), {}, { [r]: {
from: e[r],
velocity: 0,
@@ -56024,7 +56256,7 @@ function rTe(e, t, n, r, i, a) {
(e = u) == null || e();
});
}
-function iTe(e, t, n, r, i, a, o) {
+function cTe(e, t, n, r, i, a, o) {
var s = null, c = i.reduce((n, r) => {
var i = e[r], a = t[r];
return i == null || a == null ? n : NG(NG({}, n), {}, { [r]: [i, a] });
@@ -56042,15 +56274,15 @@ function iTe(e, t, n, r, i, a, o) {
(e = s) == null || e();
});
}
-var aTe = (e, t, n, r, i, a) => {
- var o = $we(e, t);
- return n == null ? () => (i(NG(NG({}, e), t)), () => {}) : n.isStepper === !0 ? rTe(e, t, n, o, i, a) : iTe(e, t, n, r, o, i, a);
+var lTe = (e, t, n, r, i, a) => {
+ var o = rTe(e, t);
+ return n == null ? () => (i(NG(NG({}, e), t)), () => {}) : n.isStepper === !0 ? sTe(e, t, n, o, i, a) : cTe(e, t, n, r, o, i, a);
}, LG = (e, t) => [
0,
3 * e,
3 * t - 6 * e,
3 * e - 3 * t + 1
-], RG = (e, t) => e.map((e, n) => e * t ** n).reduce((e, t) => e + t), zG = (e, t) => (n) => RG(LG(e, t), n), oTe = (e, t) => (n) => RG([...LG(e, t).map((e, t) => e * t).slice(1), 0], n), sTe = (e) => {
+], RG = (e, t) => e.map((e, n) => e * t ** n).reduce((e, t) => e + t), zG = (e, t) => (n) => RG(LG(e, t), n), uTe = (e, t) => (n) => RG([...LG(e, t).map((e, t) => e * t).slice(1), 0], n), dTe = (e) => {
var t, n = e.split("(");
if (n.length !== 2 || n[0] !== "cubic-bezier") return null;
var r = (t = n[1]) == null || (t = t.split(")")[0]) == null ? void 0 : t.split(",");
@@ -56062,7 +56294,7 @@ var aTe = (e, t, n, r, i, a) => {
i[2],
i[3]
];
-}, cTe = function() {
+}, fTe = function() {
var e = [...arguments];
if (e.length === 1) switch (e[0]) {
case "linear": return [
@@ -56096,7 +56328,7 @@ var aTe = (e, t, n, r, i, a) => {
1
];
default:
- var t = sTe(e[0]);
+ var t = dTe(e[0]);
if (t) return t;
}
return e.length === 4 ? e : [
@@ -56105,8 +56337,8 @@ var aTe = (e, t, n, r, i, a) => {
1,
1
];
-}, lTe = (e, t, n, r) => {
- var i = zG(e, n), a = zG(t, r), o = oTe(e, n), s = (e) => e > 1 ? 1 : e < 0 ? 0 : e, c = (e) => {
+}, pTe = (e, t, n, r) => {
+ var i = zG(e, n), a = zG(t, r), o = uTe(e, n), s = (e) => e > 1 ? 1 : e < 0 ? 0 : e, c = (e) => {
for (var t = e > 1 ? 1 : e, n = t, r = 0; r < 8; ++r) {
var c = i(n) - t, l = o(n);
if (Math.abs(c - t) < 1e-4 || l < 1e-4) return a(n);
@@ -56116,28 +56348,28 @@ var aTe = (e, t, n, r, i, a) => {
};
return c.isStepper = !1, c;
}, BG = function() {
- return lTe(...cTe(...arguments));
-}, uTe = function() {
+ return pTe(...fTe(...arguments));
+}, mTe = function() {
var { stiff: e = 100, damping: t = 8, dt: n = 17 } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = (r, i, a) => {
var o = a + (-(r - i) * e - a * t) * n / 1e3, s = a * n / 1e3 + r;
return Math.abs(s - i) < 1e-4 && Math.abs(o) < 1e-4 ? [i, 0] : [s, o];
};
return r.isStepper = !0, r.dt = n, r;
-}, dTe = (e) => {
+}, hTe = (e) => {
if (typeof e == "string") switch (e) {
case "ease":
case "ease-in-out":
case "ease-out":
case "ease-in":
case "linear": return BG(e);
- case "spring": return uTe();
+ case "spring": return mTe();
default: if (e.split("(")[0] === "cubic-bezier") return BG(e);
}
return typeof e == "function" ? e : null;
};
//#endregion
//#region node_modules/recharts/es6/animation/AnimationManager.js
-function fTe(e) {
+function gTe(e) {
var t, n = () => null, r = !1, i = null, a = (o) => {
if (!r) {
if (Array.isArray(o)) {
@@ -56168,7 +56400,7 @@ function fTe(e) {
}
//#endregion
//#region node_modules/recharts/es6/animation/timeoutController.js
-var pTe = class {
+var _Te = class {
setTimeout(e) {
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = performance.now(), r = null, i = (a) => {
a - n >= t ? e(a) : typeof requestAnimationFrame == "function" && (r = requestAnimationFrame(i));
@@ -56180,14 +56412,14 @@ var pTe = class {
};
//#endregion
//#region node_modules/recharts/es6/animation/createDefaultAnimationManager.js
-function mTe() {
- return fTe(new pTe());
+function vTe() {
+ return gTe(new _Te());
}
//#endregion
//#region node_modules/recharts/es6/animation/useAnimationManager.js
-var hTe = /*#__PURE__*/ (0, B.createContext)(mTe);
-function gTe(e, t) {
- var n = (0, B.useContext)(hTe);
+var yTe = /*#__PURE__*/ (0, B.createContext)(vTe);
+function bTe(e, t) {
+ var n = (0, B.useContext)(yTe);
return (0, B.useMemo)(() => t ?? n(e), [
e,
t,
@@ -56196,7 +56428,7 @@ function gTe(e, t) {
}
//#endregion
//#region node_modules/recharts/es6/animation/JavascriptAnimate.js
-var _Te = {
+var xTe = {
begin: 0,
duration: 1e3,
easing: "ease",
@@ -56206,12 +56438,12 @@ var _Te = {
onAnimationStart: () => {}
}, VG = { t: 0 }, HG = { t: 1 };
function UG(e) {
- var t = Fz(e, _Te), { isActive: n, canBegin: r, duration: i, easing: a, begin: o, onAnimationEnd: s, onAnimationStart: c, children: l } = t, u = fG(), d = n === "auto" ? !dG.isSsr && !u : n, f = gTe(t.animationId, t.animationManager), [p, m] = (0, B.useState)(d ? VG : HG), h = (0, B.useRef)(null);
+ var t = Pz(e, xTe), { isActive: n, canBegin: r, duration: i, easing: a, begin: o, onAnimationEnd: s, onAnimationStart: c, children: l } = t, u = fG(), d = n === "auto" ? !dG.isSsr && !u : n, f = bTe(t.animationId, t.animationManager), [p, m] = (0, B.useState)(d ? VG : HG), h = (0, B.useRef)(null);
return (0, B.useEffect)(() => {
d || m(HG);
}, [d]), (0, B.useEffect)(() => {
- if (!d || !r) return Tz;
- var e = aTe(VG, HG, dTe(a), i, m, f.getTimeoutController());
+ if (!d || !r) return wz;
+ var e = lTe(VG, HG, hTe(a), i, m, f.getTimeoutController());
return f.start([
c,
o,
@@ -56237,12 +56469,12 @@ function UG(e) {
//#endregion
//#region node_modules/recharts/es6/util/useAnimationId.js
function WG(e) {
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "animation-", n = (0, B.useRef)(_z(t)), r = (0, B.useRef)(e);
- return r.current !== e && (n.current = _z(t), r.current = e), n.current;
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "animation-", n = (0, B.useRef)(gz(t)), r = (0, B.useRef)(e);
+ return r.current !== e && (n.current = gz(t), r.current = e), n.current;
}
//#endregion
//#region node_modules/recharts/es6/shape/Rectangle.js
-var vTe = ["radius"], yTe = ["radius"], bTe, xTe, STe, CTe, wTe, TTe, ETe, DTe, OTe, kTe;
+var STe = ["radius"], CTe = ["radius"], wTe, TTe, ETe, DTe, OTe, kTe, ATe, jTe, MTe, NTe;
function GG(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
@@ -56257,26 +56489,26 @@ function KG(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? GG(Object(n), !0).forEach(function(t) {
- ATe(e, t, n[t]);
+ PTe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : GG(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function ATe(e, t, n) {
- return (t = jTe(t)) in e ? Object.defineProperty(e, t, {
+function PTe(e, t, n) {
+ return (t = FTe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function jTe(e) {
- var t = MTe(e, "string");
+function FTe(e) {
+ var t = ITe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function MTe(e, t) {
+function ITe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -56297,14 +56529,14 @@ function qG() {
}
function JG(e, t) {
if (e == null) return {};
- var n, r, i = NTe(e, t);
+ var n, r, i = LTe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function NTe(e, t) {
+function LTe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -56317,7 +56549,7 @@ function YG(e, t) {
return t ||= e.slice(0), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } }));
}
var XG = (e, t, n, r, i) => {
- var a = dz(n), o = dz(r), s = Math.min(Math.abs(a) / 2, Math.abs(o) / 2), c = o >= 0 ? 1 : -1, l = a >= 0 ? 1 : -1, u = +(o >= 0 && a >= 0 || o < 0 && a < 0), d;
+ var a = uz(n), o = uz(r), s = Math.min(Math.abs(a) / 2, Math.abs(o) / 2), c = o >= 0 ? 1 : -1, l = a >= 0 ? 1 : -1, u = +(o >= 0 && a >= 0 || o < 0 && a < 0), d;
if (s > 0 && Array.isArray(i)) {
for (var f = [
0,
@@ -56328,44 +56560,44 @@ var XG = (e, t, n, r, i) => {
var h = i[p] ?? 0;
f[p] = h > s ? s : h;
}
- d = fz(bTe ||= YG([
+ d = dz(wTe ||= YG([
"M",
",",
""
- ]), e, t + c * f[0]), f[0] > 0 && (d += fz(xTe ||= YG([
+ ]), e, t + c * f[0]), f[0] > 0 && (d += dz(TTe ||= YG([
"A ",
",",
",0,0,",
",",
",",
""
- ]), f[0], f[0], u, e + l * f[0], t)), d += fz(STe ||= YG([
+ ]), f[0], f[0], u, e + l * f[0], t)), d += dz(ETe ||= YG([
"L ",
",",
""
- ]), e + n - l * f[1], t), f[1] > 0 && (d += fz(CTe ||= YG([
+ ]), e + n - l * f[1], t), f[1] > 0 && (d += dz(DTe ||= YG([
"A ",
",",
",0,0,",
",\n ",
",",
""
- ]), f[1], f[1], u, e + n, t + c * f[1])), d += fz(wTe ||= YG([
+ ]), f[1], f[1], u, e + n, t + c * f[1])), d += dz(OTe ||= YG([
"L ",
",",
""
- ]), e + n, t + r - c * f[2]), f[2] > 0 && (d += fz(TTe ||= YG([
+ ]), e + n, t + r - c * f[2]), f[2] > 0 && (d += dz(kTe ||= YG([
"A ",
",",
",0,0,",
",\n ",
",",
""
- ]), f[2], f[2], u, e + n - l * f[2], t + r)), d += fz(ETe ||= YG([
+ ]), f[2], f[2], u, e + n - l * f[2], t + r)), d += dz(ATe ||= YG([
"L ",
",",
""
- ]), e + l * f[3], t + r), f[3] > 0 && (d += fz(DTe ||= YG([
+ ]), e + l * f[3], t + r), f[3] > 0 && (d += dz(jTe ||= YG([
"A ",
",",
",0,0,",
@@ -56375,8 +56607,8 @@ var XG = (e, t, n, r, i) => {
]), f[3], f[3], u, e, t + r - c * f[3])), d += "Z";
} else if (s > 0 && i === +i && i > 0) {
var g = Math.min(s, i);
- d = fz(OTe ||= YG(/* @__PURE__ */ "M .,.\n A .,.,0,0,.,.,.\n L .,.\n A .,.,0,0,.,.,.\n L .,.\n A .,.,0,0,.,.,.\n L .,.\n A .,.,0,0,.,.,. Z".split(".")), e, t + c * g, g, g, u, e + l * g, t, e + n - l * g, t, g, g, u, e + n, t + c * g, e + n, t + r - c * g, g, g, u, e + n - l * g, t + r, e + l * g, t + r, g, g, u, e, t + r - c * g);
- } else d = fz(kTe ||= YG([
+ d = dz(MTe ||= YG(/* @__PURE__ */ "M .,.\n A .,.,0,0,.,.,.\n L .,.\n A .,.,0,0,.,.,.\n L .,.\n A .,.,0,0,.,.,.\n L .,.\n A .,.,0,0,.,.,. Z".split(".")), e, t + c * g, g, g, u, e + l * g, t, e + n - l * g, t, g, g, u, e + n, t + c * g, e + n, t + r - c * g, g, g, u, e + n - l * g, t + r, e + l * g, t + r, g, g, u, e, t + r - c * g);
+ } else d = dz(NTe ||= YG([
"M ",
",",
" h ",
@@ -56397,7 +56629,7 @@ var XG = (e, t, n, r, i) => {
animationDuration: 1500,
animationEasing: "ease"
}, QG = (e) => {
- var t = Fz(e, ZG), n = (0, B.useRef)(null), [r, i] = (0, B.useState)(-1);
+ var t = Pz(e, ZG), n = (0, B.useRef)(null), [r, i] = (0, B.useState)(-1);
(0, B.useEffect)(() => {
if (n.current && n.current.getTotalLength) try {
var e = n.current.getTotalLength();
@@ -56420,12 +56652,12 @@ var XG = (e, t, n, r, i) => {
if (a !== +a || o !== +o || s !== +s || c !== +c || s === 0 || c === 0) return null;
var x = Jr("recharts-rectangle", u);
if (!h) {
- var S = sR(t), { radius: C } = S, w = JG(S, vTe);
+ var S = oR(t), { radius: C } = S, w = JG(S, STe);
return /*#__PURE__*/ B.createElement("path", qG({}, w, {
- x: dz(a),
- y: dz(o),
- width: dz(s),
- height: dz(c),
+ x: uz(a),
+ y: uz(o),
+ width: uz(s),
+ height: uz(c),
radius: typeof l == "number" ? l : void 0,
className: x,
d: XG(a, o, s, c, l)
@@ -56441,12 +56673,12 @@ var XG = (e, t, n, r, i) => {
isActive: h,
begin: p
}, (e) => {
- var r = bz(T, s, e), i = bz(E, c, e), u = bz(D, a, e), d = bz(O, o, e);
+ var r = yz(T, s, e), i = yz(E, c, e), u = yz(D, a, e), d = yz(O, o, e);
n.current && (g.current = r, _.current = i, v.current = u, y.current = d);
var f = m ? e > 0 ? {
transition: j,
strokeDasharray: A
- } : { strokeDasharray: k } : { strokeDasharray: A }, p = sR(t), { radius: h } = p, b = JG(p, yTe);
+ } : { strokeDasharray: k } : { strokeDasharray: A }, p = oR(t), { radius: h } = p, b = JG(p, CTe);
return /*#__PURE__*/ B.createElement("path", qG({}, b, {
radius: typeof l == "number" ? l : void 0,
className: x,
@@ -56472,26 +56704,26 @@ function eK(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? $G(Object(n), !0).forEach(function(t) {
- PTe(e, t, n[t]);
+ RTe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : $G(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function PTe(e, t, n) {
- return (t = FTe(t)) in e ? Object.defineProperty(e, t, {
+function RTe(e, t, n) {
+ return (t = zTe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function FTe(e) {
- var t = ITe(e, "string");
+function zTe(e) {
+ var t = BTe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function ITe(e, t) {
+function BTe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -56501,10 +56733,10 @@ function ITe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var tK = Math.PI / 180, nK = (e) => e * Math.PI / 180, LTe = (e) => e * 180 / Math.PI, rK = (e, t, n, r) => ({
+var tK = Math.PI / 180, nK = (e) => e * Math.PI / 180, VTe = (e) => e * 180 / Math.PI, rK = (e, t, n, r) => ({
x: e + Math.cos(-tK * r) * n,
y: t + Math.sin(-tK * r) * n
-}), RTe = function(e, t) {
+}), HTe = function(e, t) {
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
top: 0,
right: 0,
@@ -56515,11 +56747,11 @@ var tK = Math.PI / 180, nK = (e) => e * Math.PI / 180, LTe = (e) => e * 180 / Ma
brushBottom: 0
};
return Math.min(Math.abs(e - (n.left || 0) - (n.right || 0)), Math.abs(t - (n.top || 0) - (n.bottom || 0))) / 2;
-}, zTe = (e, t) => {
+}, UTe = (e, t) => {
var { x: n, y: r } = e, { x: i, y: a } = t;
return Math.sqrt((n - i) ** 2 + (r - a) ** 2);
-}, BTe = (e, t) => {
- var { x: n, y: r } = e, { cx: i, cy: a } = t, o = zTe({
+}, WTe = (e, t) => {
+ var { x: n, y: r } = e, { cx: i, cy: a } = t, o = UTe({
x: n,
y: r
}, {
@@ -56533,25 +56765,25 @@ var tK = Math.PI / 180, nK = (e) => e * Math.PI / 180, LTe = (e) => e * 180 / Ma
var s = (n - i) / o, c = Math.acos(s);
return r > a && (c = 2 * Math.PI - c), {
radius: o,
- angle: LTe(c),
+ angle: VTe(c),
angleInRadian: c
};
-}, VTe = (e) => {
+}, GTe = (e) => {
var { startAngle: t, endAngle: n } = e, r = Math.floor(t / 360), i = Math.floor(n / 360), a = Math.min(r, i);
return {
startAngle: t - a * 360,
endAngle: n - a * 360
};
-}, HTe = (e, t) => {
+}, KTe = (e, t) => {
var { startAngle: n, endAngle: r } = t, i = Math.floor(n / 360), a = Math.floor(r / 360);
return e + Math.min(i, a) * 360;
-}, UTe = (e, t) => {
- var { relativeX: n, relativeY: r } = e, { radius: i, angle: a } = BTe({
+}, qTe = (e, t) => {
+ var { relativeX: n, relativeY: r } = e, { radius: i, angle: a } = WTe({
x: n,
y: r
}, t), { innerRadius: o, outerRadius: s } = t;
if (i < o || i > s || i === 0) return null;
- var { startAngle: c, endAngle: l } = VTe(t), u = a, d;
+ var { startAngle: c, endAngle: l } = GTe(t), u = a, d;
if (c <= l) {
for (; u > l;) u -= 360;
for (; u < c;) u += 360;
@@ -56563,7 +56795,7 @@ var tK = Math.PI / 180, nK = (e) => e * Math.PI / 180, LTe = (e) => e * 180 / Ma
}
return d ? eK(eK({}, t), {}, {
radius: i,
- angle: HTe(u, t)
+ angle: KTe(u, t)
}) : null;
};
//#endregion
@@ -56581,7 +56813,7 @@ function iK(e) {
}
//#endregion
//#region node_modules/recharts/es6/shape/Sector.js
-var WTe, GTe, KTe, qTe, JTe, YTe, XTe;
+var JTe, YTe, XTe, ZTe, QTe, $Te, eEe;
function aK() {
return aK = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
@@ -56594,7 +56826,7 @@ function aK() {
function oK(e, t) {
return t ||= e.slice(0), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } }));
}
-var ZTe = (e, t) => pz(t - e) * Math.min(Math.abs(t - e), 359.999), sK = (e) => {
+var tEe = (e, t) => fz(t - e) * Math.min(Math.abs(t - e), 359.999), sK = (e) => {
var { cx: t, cy: n, radius: r, angle: i, sign: a, isExternal: o, cornerRadius: s, cornerIsExternal: c } = e, l = s * (o ? 1 : -1) + r, u = Math.asin(s / l) / tK, d = c ? i : i + a * u, f = rK(t, n, l, d), p = rK(t, n, r, d), m = c ? i - a * u : i;
return {
center: f,
@@ -56603,7 +56835,7 @@ var ZTe = (e, t) => pz(t - e) * Math.min(Math.abs(t - e), 359.999), sK = (e) =>
theta: u
};
}, cK = (e) => {
- var { cx: t, cy: n, innerRadius: r, outerRadius: i, startAngle: a, endAngle: o } = e, s = ZTe(a, o), c = a + s, l = rK(t, n, i, a), u = rK(t, n, i, c), d = fz(WTe ||= oK([
+ var { cx: t, cy: n, innerRadius: r, outerRadius: i, startAngle: a, endAngle: o } = e, s = tEe(a, o), c = a + s, l = rK(t, n, i, a), u = rK(t, n, i, c), d = dz(JTe ||= oK([
"M ",
",",
"\n A ",
@@ -56616,7 +56848,7 @@ var ZTe = (e, t) => pz(t - e) * Math.min(Math.abs(t - e), 359.999), sK = (e) =>
]), l.x, l.y, i, i, +(Math.abs(s) > 180), +(a > c), u.x, u.y);
if (r > 0) {
var f = rK(t, n, r, a), p = rK(t, n, r, c);
- d += fz(GTe ||= oK([
+ d += dz(YTe ||= oK([
"L ",
",",
"\n A ",
@@ -56627,14 +56859,14 @@ var ZTe = (e, t) => pz(t - e) * Math.min(Math.abs(t - e), 359.999), sK = (e) =>
",",
" Z"
]), p.x, p.y, r, r, +(Math.abs(s) > 180), +(a <= c), f.x, f.y);
- } else d += fz(KTe ||= oK([
+ } else d += dz(XTe ||= oK([
"L ",
",",
" Z"
]), t, n);
return d;
-}, QTe = (e) => {
- var { cx: t, cy: n, innerRadius: r, outerRadius: i, cornerRadius: a, forceCornerRadius: o, cornerIsExternal: s, startAngle: c, endAngle: l } = e, u = pz(l - c), { circleTangency: d, lineTangency: f, theta: p } = sK({
+}, nEe = (e) => {
+ var { cx: t, cy: n, innerRadius: r, outerRadius: i, cornerRadius: a, forceCornerRadius: o, cornerIsExternal: s, startAngle: c, endAngle: l } = e, u = fz(l - c), { circleTangency: d, lineTangency: f, theta: p } = sK({
cx: t,
cy: n,
radius: i,
@@ -56651,7 +56883,7 @@ var ZTe = (e, t) => pz(t - e) * Math.min(Math.abs(t - e), 359.999), sK = (e) =>
cornerRadius: a,
cornerIsExternal: s
}), _ = s ? Math.abs(c - l) : Math.abs(c - l) - p - g;
- if (_ < 0) return o ? fz(qTe ||= oK([
+ if (_ < 0) return o ? dz(ZTe ||= oK([
"M ",
",",
"\n a",
@@ -56669,7 +56901,7 @@ var ZTe = (e, t) => pz(t - e) * Math.min(Math.abs(t - e), 359.999), sK = (e) =>
startAngle: c,
endAngle: l
});
- var v = fz(JTe ||= oK([
+ var v = dz(QTe ||= oK([
"M ",
",",
"\n A",
@@ -56711,7 +56943,7 @@ var ZTe = (e, t) => pz(t - e) * Math.min(Math.abs(t - e), 359.999), sK = (e) =>
cornerIsExternal: s
}), T = s ? Math.abs(c - l) : Math.abs(c - l) - x - w;
if (T < 0 && a === 0) return `${v}L${t},${n}Z`;
- v += fz(YTe ||= oK([
+ v += dz($Te ||= oK([
"L",
",",
"\n A",
@@ -56732,13 +56964,13 @@ var ZTe = (e, t) => pz(t - e) * Math.min(Math.abs(t - e), 359.999), sK = (e) =>
",",
"Z"
]), C.x, C.y, a, a, +(u < 0), S.x, S.y, r, r, +(T > 180), +(u > 0), y.x, y.y, a, a, +(u < 0), b.x, b.y);
- } else v += fz(XTe ||= oK([
+ } else v += dz(eEe ||= oK([
"L",
",",
"Z"
]), t, n);
return v;
-}, $Te = {
+}, rEe = {
cx: 0,
cy: 0,
innerRadius: 0,
@@ -56749,9 +56981,9 @@ var ZTe = (e, t) => pz(t - e) * Math.min(Math.abs(t - e), 359.999), sK = (e) =>
forceCornerRadius: !1,
cornerIsExternal: !1
}, lK = (e) => {
- var t = Fz(e, $Te), { cx: n, cy: r, innerRadius: i, outerRadius: a, cornerRadius: o, forceCornerRadius: s, cornerIsExternal: c, startAngle: l, endAngle: u, className: d } = t;
+ var t = Pz(e, rEe), { cx: n, cy: r, innerRadius: i, outerRadius: a, cornerRadius: o, forceCornerRadius: s, cornerIsExternal: c, startAngle: l, endAngle: u, className: d } = t;
if (a < i || l === u) return null;
- var f = Jr("recharts-sector", d), p = a - i, m = vz(o, p, 0, !0), h = m > 0 && Math.abs(l - u) < 360 ? QTe({
+ var f = Jr("recharts-sector", d), p = a - i, m = _z(o, p, 0, !0), h = m > 0 && Math.abs(l - u) < 360 ? nEe({
cx: n,
cy: r,
innerRadius: i,
@@ -56769,14 +57001,14 @@ var ZTe = (e, t) => pz(t - e) * Math.min(Math.abs(t - e), 359.999), sK = (e) =>
startAngle: l,
endAngle: u
});
- return /*#__PURE__*/ B.createElement("path", aK({}, sR(t), {
+ return /*#__PURE__*/ B.createElement("path", aK({}, oR(t), {
className: f,
d: h
}));
};
//#endregion
//#region node_modules/recharts/es6/util/cursor/getCursorPoints.js
-function eEe(e, t, n) {
+function iEe(e, t, n) {
if (e === "horizontal") return [{
x: t.x,
y: n.top
@@ -56791,7 +57023,7 @@ function eEe(e, t, n) {
x: n.left + n.width,
y: t.y
}];
- if (jz(t)) {
+ if (Az(t)) {
if (e === "centric") {
var { cx: r, cy: i, innerRadius: a, outerRadius: o, angle: s } = t, c = rK(r, i, a, s), l = rK(r, i, o, s);
return [{
@@ -56807,13 +57039,13 @@ function eEe(e, t, n) {
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/util/toNumber.mjs
-function tEe(e) {
- return sz(e) ? NaN : Number(e);
+function aEe(e) {
+ return oz(e) ? NaN : Number(e);
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/util/toFinite.mjs
function uK(e) {
- return e ? (e = tEe(e), e === Infinity || e === -Infinity ? (e < 0 ? -1 : 1) * Number.MAX_VALUE : e === e ? e : 0) : e === 0 ? e : 0;
+ return e ? (e = aEe(e), e === Infinity || e === -Infinity ? (e < 0 ? -1 : 1) * Number.MAX_VALUE : e === e ? e : 0) : e === 0 ? e : 0;
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/math/range.mjs
@@ -56857,7 +57089,7 @@ function vK(e, t) {
if (gK(o)) return o;
}
}
-function nEe(e, t, n) {
+function oEe(e, t, n) {
if (!(!n && t == null)) {
if (typeof e == "function" && t != null) try {
var r = e(t, n);
@@ -57304,7 +57536,7 @@ var SK = (e) => {
}
var u = r[c] ?? 1, d = new yK.default(u).mul(o);
return t ? d : new yK.default(Math.ceil(d.toNumber()));
-}, rEe = (e, t, n) => {
+}, sEe = (e, t, n) => {
var r = new yK.default(1), i = new yK.default(e);
if (!i.isint() && n) {
var a = Math.abs(e);
@@ -57333,7 +57565,7 @@ var SK = (e) => {
var l = c === Infinity ? [s, ...Array(r - 1).fill(Infinity)] : [...Array(r - 1).fill(-Infinity), c];
return t > n ? l.reverse() : l;
}
- if (s === c) return rEe(s, r, i);
+ if (s === c) return sEe(s, r, i);
var { step: u, tickMin: d, tickMax: f } = TK(s, c, o, i, 0, a === "snap125" ? wK : CK), p = xK(d, f.add(new yK.default(.1).mul(u)), u);
return t > n ? p.reverse() : p;
}, DK = function(e, t) {
@@ -57342,7 +57574,7 @@ var SK = (e) => {
if (o === s) return [o];
var c = a === "snap125" ? wK : CK, l = Math.max(t, 2), u = c(new yK.default(s).sub(o).div(l - 1), i, 0), d = [...xK(new yK.default(o), new yK.default(s), u), s];
return i === !1 && (d = d.map((e) => Math.round(e))), n > r ? d.reverse() : d;
-}, OK = (e) => e.rootProps.maxBarSize, kK = (e) => e.rootProps.barGap, AK = (e) => e.rootProps.barCategoryGap, jK = (e) => e.rootProps.barSize, MK = (e) => e.rootProps.stackOffset, NK = (e) => e.rootProps.reverseStackOrder, PK = (e) => e.options.chartName, FK = (e) => e.rootProps.syncId, IK = (e) => e.rootProps.syncMethod, LK = (e) => e.options.eventEmitter, iEe = (e) => e.rootProps.baseValue, RK = {
+}, OK = (e) => e.rootProps.maxBarSize, kK = (e) => e.rootProps.barGap, AK = (e) => e.rootProps.barCategoryGap, jK = (e) => e.rootProps.barSize, MK = (e) => e.rootProps.stackOffset, NK = (e) => e.rootProps.reverseStackOrder, PK = (e) => e.options.chartName, FK = (e) => e.rootProps.syncId, IK = (e) => e.rootProps.syncMethod, LK = (e) => e.options.eventEmitter, cEe = (e) => e.rootProps.baseValue, RK = {
grid: -100,
barBackground: -50,
area: 100,
@@ -57422,26 +57654,26 @@ function WK(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? UK(Object(n), !0).forEach(function(t) {
- aEe(e, t, n[t]);
+ lEe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : UK(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function aEe(e, t, n) {
- return (t = oEe(t)) in e ? Object.defineProperty(e, t, {
+function lEe(e, t, n) {
+ return (t = uEe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function oEe(e) {
- var t = sEe(e, "string");
+function uEe(e) {
+ var t = dEe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function sEe(e, t) {
+function dEe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -57499,21 +57731,21 @@ var GK = {
OU,
kU,
FU
-], RTe), ZK = $([YK, XK], (e, t) => {
- if (e != null) return vz(e.innerRadius, t, 0);
+], HTe), ZK = $([YK, XK], (e, t) => {
+ if (e != null) return _z(e.innerRadius, t, 0);
}), QK = $([YK, XK], (e, t) => {
- if (e != null) return vz(e.outerRadius, t, t * .8);
+ if (e != null) return _z(e.outerRadius, t, t * .8);
}), $K = $([YK], (e) => {
if (e == null) return [0, 0];
var { startAngle: t, endAngle: n } = e;
return [t, n];
-}), cEe = $([qK, $K], VK), eq = $([
+}), fEe = $([qK, $K], VK), eq = $([
XK,
ZK,
QK
], (e, t, n) => {
if (e != null && t != null && n != null) return [t, n];
-}), lEe = $([JK, eq], VK), tq = $([
+}), pEe = $([JK, eq], VK), tq = $([
tW,
YK,
ZK,
@@ -57524,8 +57756,8 @@ var GK = {
if (!(e !== "centric" && e !== "radial" || t == null || n == null || r == null)) {
var { cx: o, cy: s, startAngle: c, endAngle: l } = t;
return {
- cx: vz(o, i, i / 2),
- cy: vz(s, a, a / 2),
+ cx: _z(o, i, i / 2),
+ cy: _z(s, a, a / 2),
innerRadius: n,
outerRadius: r,
startAngle: c,
@@ -57567,7 +57799,7 @@ var sq = (e, t) => e === t ? !0 : e == null || t == null ? !1 : e[0] === t[0] &&
function cq(e, t) {
return Array.isArray(e) && Array.isArray(t) && e.length === 0 && t.length === 0 ? !0 : e === t;
}
-function uEe(e, t) {
+function mEe(e, t) {
if (e.length === t.length) {
for (var n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
return !0;
@@ -57646,7 +57878,7 @@ function pq(e, t) {
//#region node_modules/d3-array/src/bisector.js
function mq(e) {
let t = e, n = e;
- e.length === 1 && (t = (t, n) => e(t) - n, n = dEe(e));
+ e.length === 1 && (t = (t, n) => e(t) - n, n = hEe(e));
function r(e, t, r, i) {
for (r ??= 0, i ??= e.length; r < i;) {
let a = r + i >>> 1;
@@ -57672,7 +57904,7 @@ function mq(e) {
right: i
};
}
-function dEe(e) {
+function hEe(e) {
return (t, n) => pq(e(t), n);
}
//#endregion
@@ -57680,7 +57912,7 @@ function dEe(e) {
function hq(e) {
return e === null ? NaN : +e;
}
-function* fEe(e, t) {
+function* gEe(e, t) {
if (t === void 0) for (let t of e) t != null && (t = +t) >= t && (yield t);
else {
let n = -1;
@@ -57694,7 +57926,7 @@ gq.left, mq(hq).center;
//#endregion
//#region node_modules/internmap/src/index.js
var vq = class extends Map {
- constructor(e, t = hEe) {
+ constructor(e, t = yEe) {
if (super(), Object.defineProperties(this, {
_intern: { value: /* @__PURE__ */ new Map() },
_key: { value: t }
@@ -57707,25 +57939,25 @@ var vq = class extends Map {
return super.has(yq(this, e));
}
set(e, t) {
- return super.set(pEe(this, e), t);
+ return super.set(_Ee(this, e), t);
}
delete(e) {
- return super.delete(mEe(this, e));
+ return super.delete(vEe(this, e));
}
};
function yq({ _intern: e, _key: t }, n) {
let r = t(n);
return e.has(r) ? e.get(r) : n;
}
-function pEe({ _intern: e, _key: t }, n) {
+function _Ee({ _intern: e, _key: t }, n) {
let r = t(n);
return e.has(r) ? e.get(r) : (e.set(r, n), n);
}
-function mEe({ _intern: e, _key: t }, n) {
+function vEe({ _intern: e, _key: t }, n) {
let r = t(n);
return e.has(r) && (n = e.get(n), e.delete(r)), n;
}
-function hEe(e) {
+function yEe(e) {
return typeof e == "object" && e ? e.valueOf() : e;
}
//#endregion
@@ -57798,15 +58030,15 @@ function kq(e, t, n) {
}
//#endregion
//#region node_modules/d3-array/src/quantile.js
-function gEe(e, t, n) {
- if (e = Float64Array.from(fEe(e, n)), r = e.length) {
+function bEe(e, t, n) {
+ if (e = Float64Array.from(gEe(e, n)), r = e.length) {
if ((t = +t) <= 0 || r < 2) return Dq(e);
if (t >= 1) return Eq(e);
var r, i = (r - 1) * t, a = Math.floor(i), o = Eq(Oq(e, a).subarray(0, a + 1));
return o + (Dq(e.subarray(a + 1)) - o) * (i - a);
}
}
-function _Ee(e, t, n = hq) {
+function xEe(e, t, n = hq) {
if (r = e.length) {
if ((t = +t) <= 0 || r < 2) return +n(e[0], 0, e);
if (t >= 1) return +n(e[r - 1], r - 1, e);
@@ -57816,7 +58048,7 @@ function _Ee(e, t, n = hq) {
}
//#endregion
//#region node_modules/d3-array/src/range.js
-function vEe(e, t, n) {
+function SEe(e, t, n) {
e = +e, t = +t, n = (i = arguments.length) < 2 ? (t = e, e = 0, 1) : i < 3 ? 1 : +n;
for (var r = -1, i = Math.max(0, Math.ceil((t - e) / n)) | 0, a = Array(i); ++r < i;) a[r] = e + r * n;
return a;
@@ -57888,7 +58120,7 @@ function Fq() {
function d() {
var e = t().length, d = i < r, f = d ? i : r, p = d ? r : i;
a = (p - f) / Math.max(1, e - c + l * 2), s && (a = Math.floor(a)), f += (p - f - a * (e - c)) * u, o = a * (1 - c), s && (f = Math.round(f), o = Math.round(o));
- var m = vEe(e).map(function(e) {
+ var m = SEe(e).map(function(e) {
return f + a * e;
});
return n(d ? m.reverse() : m);
@@ -57923,7 +58155,7 @@ function Iq(e) {
return Iq(t());
}, e;
}
-function yEe() {
+function CEe() {
return Iq(Fq.apply(null, arguments).paddingInner(1));
}
//#endregion
@@ -57939,7 +58171,7 @@ function Rq(e, t) {
//#endregion
//#region node_modules/d3-color/src/color.js
function zq() {}
-var Bq = .7, Vq = 1 / Bq, Hq = "\\s*([+-]?\\d+)\\s*", Uq = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", Wq = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", bEe = /^#([0-9a-f]{3,8})$/, xEe = RegExp(`^rgb\\(${Hq},${Hq},${Hq}\\)$`), SEe = RegExp(`^rgb\\(${Wq},${Wq},${Wq}\\)$`), CEe = RegExp(`^rgba\\(${Hq},${Hq},${Hq},${Uq}\\)$`), wEe = RegExp(`^rgba\\(${Wq},${Wq},${Wq},${Uq}\\)$`), TEe = RegExp(`^hsl\\(${Uq},${Wq},${Wq}\\)$`), EEe = RegExp(`^hsla\\(${Uq},${Wq},${Wq},${Uq}\\)$`), Gq = {
+var Bq = .7, Vq = 1 / Bq, Hq = "\\s*([+-]?\\d+)\\s*", Uq = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", Wq = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", wEe = /^#([0-9a-f]{3,8})$/, TEe = RegExp(`^rgb\\(${Hq},${Hq},${Hq}\\)$`), EEe = RegExp(`^rgb\\(${Wq},${Wq},${Wq}\\)$`), DEe = RegExp(`^rgba\\(${Hq},${Hq},${Hq},${Uq}\\)$`), OEe = RegExp(`^rgba\\(${Wq},${Wq},${Wq},${Uq}\\)$`), kEe = RegExp(`^hsl\\(${Uq},${Wq},${Wq}\\)$`), AEe = RegExp(`^hsla\\(${Uq},${Wq},${Wq},${Uq}\\)$`), Gq = {
aliceblue: 15792383,
antiquewhite: 16444375,
aqua: 65535,
@@ -58098,18 +58330,18 @@ Lq(zq, Jq, {
},
hex: Kq,
formatHex: Kq,
- formatHex8: DEe,
- formatHsl: OEe,
+ formatHex8: jEe,
+ formatHsl: MEe,
formatRgb: qq,
toString: qq
});
function Kq() {
return this.rgb().formatHex();
}
-function DEe() {
+function jEe() {
return this.rgb().formatHex8();
}
-function OEe() {
+function MEe() {
return aJ(this).formatHsl();
}
function qq() {
@@ -58117,7 +58349,7 @@ function qq() {
}
function Jq(e) {
var t, n;
- return e = (e + "").trim().toLowerCase(), (t = bEe.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? Yq(t) : n === 3 ? new Qq(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? Xq(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? Xq(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = xEe.exec(e)) ? new Qq(t[1], t[2], t[3], 1) : (t = SEe.exec(e)) ? new Qq(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = CEe.exec(e)) ? Xq(t[1], t[2], t[3], t[4]) : (t = wEe.exec(e)) ? Xq(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = TEe.exec(e)) ? iJ(t[1], t[2] / 100, t[3] / 100, 1) : (t = EEe.exec(e)) ? iJ(t[1], t[2] / 100, t[3] / 100, t[4]) : Gq.hasOwnProperty(e) ? Yq(Gq[e]) : e === "transparent" ? new Qq(NaN, NaN, NaN, 0) : null;
+ return e = (e + "").trim().toLowerCase(), (t = wEe.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? Yq(t) : n === 3 ? new Qq(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? Xq(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? Xq(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = TEe.exec(e)) ? new Qq(t[1], t[2], t[3], 1) : (t = EEe.exec(e)) ? new Qq(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = DEe.exec(e)) ? Xq(t[1], t[2], t[3], t[4]) : (t = OEe.exec(e)) ? Xq(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = kEe.exec(e)) ? iJ(t[1], t[2] / 100, t[3] / 100, 1) : (t = AEe.exec(e)) ? iJ(t[1], t[2] / 100, t[3] / 100, t[4]) : Gq.hasOwnProperty(e) ? Yq(Gq[e]) : e === "transparent" ? new Qq(NaN, NaN, NaN, 0) : null;
}
function Yq(e) {
return new Qq(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
@@ -58125,11 +58357,11 @@ function Yq(e) {
function Xq(e, t, n, r) {
return r <= 0 && (e = t = n = NaN), new Qq(e, t, n, r);
}
-function kEe(e) {
+function NEe(e) {
return e instanceof zq || (e = Jq(e)), e ? (e = e.rgb(), new Qq(e.r, e.g, e.b, e.opacity)) : new Qq();
}
function Zq(e, t, n, r) {
- return arguments.length === 1 ? kEe(e) : new Qq(e, t, n, r ?? 1);
+ return arguments.length === 1 ? NEe(e) : new Qq(e, t, n, r ?? 1);
}
function Qq(e, t, n, r) {
this.r = +e, this.g = +t, this.b = +n, this.opacity = +r;
@@ -58152,14 +58384,14 @@ Lq(Qq, Zq, Rq(zq, {
},
hex: $q,
formatHex: $q,
- formatHex8: AEe,
+ formatHex8: PEe,
formatRgb: eJ,
toString: eJ
}));
function $q() {
return `#${rJ(this.r)}${rJ(this.g)}${rJ(this.b)}`;
}
-function AEe() {
+function PEe() {
return `#${rJ(this.r)}${rJ(this.g)}${rJ(this.b)}${rJ((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
}
function eJ() {
@@ -58186,13 +58418,13 @@ function aJ(e) {
var t = e.r / 255, n = e.g / 255, r = e.b / 255, i = Math.min(t, n, r), a = Math.max(t, n, r), o = NaN, s = a - i, c = (a + i) / 2;
return s ? (o = t === a ? (n - r) / s + (n < r) * 6 : n === a ? (r - t) / s + 2 : (t - n) / s + 4, s /= c < .5 ? a + i : 2 - a - i, o *= 60) : s = c > 0 && c < 1 ? 0 : o, new oJ(o, s, c, e.opacity);
}
-function jEe(e, t, n, r) {
+function FEe(e, t, n, r) {
return arguments.length === 1 ? aJ(e) : new oJ(e, t, n, r ?? 1);
}
function oJ(e, t, n, r) {
this.h = +e, this.s = +t, this.l = +n, this.opacity = +r;
}
-Lq(oJ, jEe, Rq(zq, {
+Lq(oJ, FEe, Rq(zq, {
brighter(e) {
return e = e == null ? Vq : Vq ** +e, new oJ(this.h, this.s, this.l * e, this.opacity);
},
@@ -58228,29 +58460,29 @@ function lJ(e, t, n) {
var uJ = (e) => () => e;
//#endregion
//#region node_modules/d3-interpolate/src/color.js
-function MEe(e, t) {
+function IEe(e, t) {
return function(n) {
return e + n * t;
};
}
-function NEe(e, t, n) {
+function LEe(e, t, n) {
return e **= +n, t = t ** +n - e, n = 1 / n, function(r) {
return (e + r * t) ** +n;
};
}
-function PEe(e) {
+function REe(e) {
return (e = +e) == 1 ? dJ : function(t, n) {
- return n - t ? NEe(t, n, e) : uJ(isNaN(t) ? n : t);
+ return n - t ? LEe(t, n, e) : uJ(isNaN(t) ? n : t);
};
}
function dJ(e, t) {
var n = t - e;
- return n ? MEe(e, n) : uJ(isNaN(e) ? t : e);
+ return n ? IEe(e, n) : uJ(isNaN(e) ? t : e);
}
//#endregion
//#region node_modules/d3-interpolate/src/rgb.js
var fJ = (function e(t) {
- var n = PEe(t);
+ var n = REe(t);
function r(e, t) {
var r = n((e = Zq(e)).r, (t = Zq(t)).r), i = n(e.g, t.g), a = n(e.b, t.b), o = dJ(e.opacity, t.opacity);
return function(t) {
@@ -58261,7 +58493,7 @@ var fJ = (function e(t) {
})(1);
//#endregion
//#region node_modules/d3-interpolate/src/numberArray.js
-function FEe(e, t) {
+function zEe(e, t) {
t ||= [];
var n = e ? Math.min(t.length, e.length) : 0, r = t.slice(), i;
return function(a) {
@@ -58269,12 +58501,12 @@ function FEe(e, t) {
return r;
};
}
-function IEe(e) {
+function BEe(e) {
return ArrayBuffer.isView(e) && !(e instanceof DataView);
}
//#endregion
//#region node_modules/d3-interpolate/src/array.js
-function LEe(e, t) {
+function VEe(e, t) {
var n = t ? t.length : 0, r = e ? Math.min(n, e.length) : 0, i = Array(r), a = Array(n), o;
for (o = 0; o < r; ++o) i[o] = gJ(e[o], t[o]);
for (; o < n; ++o) a[o] = t[o];
@@ -58285,7 +58517,7 @@ function LEe(e, t) {
}
//#endregion
//#region node_modules/d3-interpolate/src/date.js
-function REe(e, t) {
+function HEe(e, t) {
var n = /* @__PURE__ */ new Date();
return e = +e, t = +t, function(r) {
return n.setTime(e * (1 - r) + t * r), n;
@@ -58300,7 +58532,7 @@ function pJ(e, t) {
}
//#endregion
//#region node_modules/d3-interpolate/src/object.js
-function zEe(e, t) {
+function UEe(e, t) {
var n = {}, r = {}, i;
for (i in (typeof e != "object" || !e) && (e = {}), (typeof t != "object" || !t) && (t = {}), t) i in e ? n[i] = gJ(e[i], t[i]) : r[i] = t[i];
return function(e) {
@@ -58311,23 +58543,23 @@ function zEe(e, t) {
//#endregion
//#region node_modules/d3-interpolate/src/string.js
var mJ = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, hJ = new RegExp(mJ.source, "g");
-function BEe(e) {
+function WEe(e) {
return function() {
return e;
};
}
-function VEe(e) {
+function GEe(e) {
return function(t) {
return e(t) + "";
};
}
-function HEe(e, t) {
+function KEe(e, t) {
var n = mJ.lastIndex = hJ.lastIndex = 0, r, i, a, o = -1, s = [], c = [];
for (e += "", t += ""; (r = mJ.exec(e)) && (i = hJ.exec(t));) (a = i.index) > n && (a = t.slice(n, a), s[o] ? s[o] += a : s[++o] = a), (r = r[0]) === (i = i[0]) ? s[o] ? s[o] += i : s[++o] = i : (s[++o] = null, c.push({
i: o,
x: pJ(r, i)
})), n = hJ.lastIndex;
- return n < t.length && (a = t.slice(n), s[o] ? s[o] += a : s[++o] = a), s.length < 2 ? c[0] ? VEe(c[0].x) : BEe(t) : (t = c.length, function(e) {
+ return n < t.length && (a = t.slice(n), s[o] ? s[o] += a : s[++o] = a), s.length < 2 ? c[0] ? GEe(c[0].x) : WEe(t) : (t = c.length, function(e) {
for (var n = 0, r; n < t; ++n) s[(r = c[n]).i] = r.x(e);
return s.join("");
});
@@ -58336,7 +58568,7 @@ function HEe(e, t) {
//#region node_modules/d3-interpolate/src/value.js
function gJ(e, t) {
var n = typeof t, r;
- return t == null || n === "boolean" ? uJ(t) : (n === "number" ? pJ : n === "string" ? (r = Jq(t)) ? (t = r, fJ) : HEe : t instanceof Jq ? fJ : t instanceof Date ? REe : IEe(t) ? FEe : Array.isArray(t) ? LEe : typeof t.valueOf != "function" && typeof t.toString != "function" || isNaN(t) ? zEe : pJ)(e, t);
+ return t == null || n === "boolean" ? uJ(t) : (n === "number" ? pJ : n === "string" ? (r = Jq(t)) ? (t = r, fJ) : KEe : t instanceof Jq ? fJ : t instanceof Date ? HEe : BEe(t) ? zEe : Array.isArray(t) ? VEe : typeof t.valueOf != "function" && typeof t.toString != "function" || isNaN(t) ? UEe : pJ)(e, t);
}
//#endregion
//#region node_modules/d3-interpolate/src/round.js
@@ -58347,7 +58579,7 @@ function _J(e, t) {
}
//#endregion
//#region node_modules/d3-interpolate/src/piecewise.js
-function UEe(e, t) {
+function qEe(e, t) {
t === void 0 && (t = e, e = gJ);
for (var n = 0, r = t.length - 1, i = t[0], a = Array(r < 0 ? 0 : r); n < r;) a[n] = e(i, i = t[++n]);
return function(e) {
@@ -58357,7 +58589,7 @@ function UEe(e, t) {
}
//#endregion
//#region node_modules/d3-scale/src/constant.js
-function WEe(e) {
+function JEe(e) {
return function() {
return e;
};
@@ -58376,21 +58608,21 @@ function bJ(e) {
function xJ(e, t) {
return (t -= e = +e) ? function(n) {
return (n - e) / t;
- } : WEe(isNaN(t) ? NaN : .5);
+ } : JEe(isNaN(t) ? NaN : .5);
}
-function GEe(e, t) {
+function YEe(e, t) {
var n;
return e > t && (n = e, e = t, t = n), function(n) {
return Math.max(e, Math.min(t, n));
};
}
-function KEe(e, t, n) {
+function XEe(e, t, n) {
var r = e[0], i = e[1], a = t[0], o = t[1];
return i < r ? (r = xJ(i, r), a = n(o, a)) : (r = xJ(r, i), a = n(a, o)), function(e) {
return a(r(e));
};
}
-function qEe(e, t, n) {
+function ZEe(e, t, n) {
var r = Math.min(e.length, t.length) - 1, i = Array(r), a = Array(r), o = -1;
for (e[r] < e[0] && (e = e.slice().reverse(), t = t.slice().reverse()); ++o < r;) i[o] = xJ(e[o], e[o + 1]), a[o] = n(t[o], t[o + 1]);
return function(t) {
@@ -58405,7 +58637,7 @@ function CJ() {
var e = yJ, t = yJ, n = gJ, r, i, a, o = bJ, s, c, l;
function u() {
var n = Math.min(e.length, t.length);
- return o !== bJ && (o = GEe(e[0], e[n - 1])), s = n > 2 ? qEe : KEe, c = l = null, d;
+ return o !== bJ && (o = YEe(e[0], e[n - 1])), s = n > 2 ? ZEe : XEe, c = l = null, d;
}
function d(i) {
return i == null || isNaN(i = +i) ? a : (c ||= s(e.map(r), t, n))(r(o(i)));
@@ -58433,7 +58665,7 @@ function wJ() {
}
//#endregion
//#region node_modules/d3-format/src/formatDecimal.js
-function JEe(e) {
+function QEe(e) {
return Math.abs(e = Math.round(e)) >= 1e21 ? e.toLocaleString("en").replace(/,/g, "") : e.toString(10);
}
function TJ(e, t) {
@@ -58448,7 +58680,7 @@ function EJ(e) {
}
//#endregion
//#region node_modules/d3-format/src/formatGroup.js
-function YEe(e, t) {
+function $Ee(e, t) {
return function(n, r) {
for (var i = n.length, a = [], o = 0, s = e[0], c = 0; i > 0 && s > 0 && (c + s + 1 > r && (s = Math.max(1, r - c)), a.push(n.substring(i -= s, i + s)), !((c += s + 1) > r));) s = e[o = (o + 1) % e.length];
return a.reverse().join(t);
@@ -58456,7 +58688,7 @@ function YEe(e, t) {
}
//#endregion
//#region node_modules/d3-format/src/formatNumerals.js
-function XEe(e) {
+function eDe(e) {
return function(t) {
return t.replace(/[0-9]/g, function(t) {
return e[+t];
@@ -58465,9 +58697,9 @@ function XEe(e) {
}
//#endregion
//#region node_modules/d3-format/src/formatSpecifier.js
-var ZEe = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
+var tDe = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
function DJ(e) {
- if (!(t = ZEe.exec(e))) throw Error("invalid format: " + e);
+ if (!(t = tDe.exec(e))) throw Error("invalid format: " + e);
var t;
return new OJ({
fill: t[1],
@@ -58491,7 +58723,7 @@ OJ.prototype.toString = function() {
};
//#endregion
//#region node_modules/d3-format/src/formatTrim.js
-function QEe(e) {
+function nDe(e) {
out: for (var t = e.length, n = 1, r = -1, i; n < t; ++n) switch (e[n]) {
case ".":
r = i = n;
@@ -58508,7 +58740,7 @@ function QEe(e) {
//#endregion
//#region node_modules/d3-format/src/formatPrefixAuto.js
var kJ;
-function $Ee(e, t) {
+function rDe(e, t) {
var n = TJ(e, t);
if (!n) return kJ = void 0, e.toPrecision(t);
var r = n[0], i = n[1], a = i - (kJ = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1, o = r.length;
@@ -58528,14 +58760,14 @@ var jJ = {
"%": (e, t) => (e * 100).toFixed(t),
b: (e) => Math.round(e).toString(2),
c: (e) => e + "",
- d: JEe,
+ d: QEe,
e: (e, t) => e.toExponential(t),
f: (e, t) => e.toFixed(t),
g: (e, t) => e.toPrecision(t),
o: (e) => Math.round(e).toString(8),
p: (e, t) => AJ(e * 100, t),
r: AJ,
- s: $Ee,
+ s: rDe,
X: (e) => Math.round(e).toString(16).toUpperCase(),
x: (e) => Math.round(e).toString(16)
};
@@ -58565,8 +58797,8 @@ var NJ = Array.prototype.map, PJ = [
"Z",
"Y"
];
-function eDe(e) {
- var t = e.grouping === void 0 || e.thousands === void 0 ? MJ : YEe(NJ.call(e.grouping, Number), e.thousands + ""), n = e.currency === void 0 ? "" : e.currency[0] + "", r = e.currency === void 0 ? "" : e.currency[1] + "", i = e.decimal === void 0 ? "." : e.decimal + "", a = e.numerals === void 0 ? MJ : XEe(NJ.call(e.numerals, String)), o = e.percent === void 0 ? "%" : e.percent + "", s = e.minus === void 0 ? "−" : e.minus + "", c = e.nan === void 0 ? "NaN" : e.nan + "";
+function iDe(e) {
+ var t = e.grouping === void 0 || e.thousands === void 0 ? MJ : $Ee(NJ.call(e.grouping, Number), e.thousands + ""), n = e.currency === void 0 ? "" : e.currency[0] + "", r = e.currency === void 0 ? "" : e.currency[1] + "", i = e.decimal === void 0 ? "." : e.decimal + "", a = e.numerals === void 0 ? MJ : eDe(NJ.call(e.numerals, String)), o = e.percent === void 0 ? "%" : e.percent + "", s = e.minus === void 0 ? "−" : e.minus + "", c = e.nan === void 0 ? "NaN" : e.nan + "";
function l(e, l) {
e = DJ(e);
var u = e.fill, d = e.align, f = e.sign, p = e.symbol, m = e.zero, h = e.width, g = e.comma, _ = e.precision, v = e.trim, y = e.type;
@@ -58579,7 +58811,7 @@ function eDe(e) {
else {
e = +e;
var w = e < 0 || 1 / e < 0;
- if (e = isNaN(e) ? c : S(Math.abs(e), _), v && (e = QEe(e)), w && +e == 0 && f !== "+" && (w = !1), n = (w ? f === "(" ? f : s : f === "-" || f === "(" ? "" : f) + n, r = (y === "s" && !isNaN(e) && kJ !== void 0 ? PJ[8 + kJ / 3] : "") + r + (w && f === "(" ? ")" : ""), C) {
+ if (e = isNaN(e) ? c : S(Math.abs(e), _), v && (e = nDe(e)), w && +e == 0 && f !== "+" && (w = !1), n = (w ? f === "(" ? f : s : f === "-" || f === "(" ? "" : f) + n, r = (y === "s" && !isNaN(e) && kJ !== void 0 ? PJ[8 + kJ / 3] : "") + r + (w && f === "(" ? ")" : ""), C) {
for (o = -1, l = e.length; ++o < l;) if (p = e.charCodeAt(o), 48 > p || p > 57) {
r = (p === 46 ? i + e.slice(o + 1) : e.slice(o)) + r, e = e.slice(0, o);
break;
@@ -58620,27 +58852,27 @@ function eDe(e) {
//#endregion
//#region node_modules/d3-format/src/defaultLocale.js
var FJ, IJ, LJ;
-tDe({
+aDe({
thousands: ",",
grouping: [3],
currency: ["$", ""]
});
-function tDe(e) {
- return FJ = eDe(e), IJ = FJ.format, LJ = FJ.formatPrefix, FJ;
+function aDe(e) {
+ return FJ = iDe(e), IJ = FJ.format, LJ = FJ.formatPrefix, FJ;
}
//#endregion
//#region node_modules/d3-format/src/precisionFixed.js
-function nDe(e) {
+function oDe(e) {
return Math.max(0, -EJ(Math.abs(e)));
}
//#endregion
//#region node_modules/d3-format/src/precisionPrefix.js
-function rDe(e, t) {
+function sDe(e, t) {
return Math.max(0, Math.max(-8, Math.min(8, Math.floor(EJ(t) / 3))) * 3 - EJ(Math.abs(e)));
}
//#endregion
//#region node_modules/d3-format/src/precisionRound.js
-function iDe(e, t) {
+function cDe(e, t) {
return e = Math.abs(e), t = Math.abs(t) - e, Math.max(0, EJ(t) - EJ(e)) + 1;
}
//#endregion
@@ -58650,16 +58882,16 @@ function RJ(e, t, n, r) {
switch (r = DJ(r ?? ",f"), r.type) {
case "s":
var o = Math.max(Math.abs(e), Math.abs(t));
- return r.precision == null && !isNaN(a = rDe(i, o)) && (r.precision = a), LJ(r, o);
+ return r.precision == null && !isNaN(a = sDe(i, o)) && (r.precision = a), LJ(r, o);
case "":
case "e":
case "g":
case "p":
case "r":
- r.precision == null && !isNaN(a = iDe(i, Math.max(Math.abs(e), Math.abs(t)))) && (r.precision = a - (r.type === "e"));
+ r.precision == null && !isNaN(a = cDe(i, Math.max(Math.abs(e), Math.abs(t)))) && (r.precision = a - (r.type === "e"));
break;
case "f":
- case "%": r.precision == null && !isNaN(a = nDe(i)) && (r.precision = a - (r.type === "%") * 2);
+ case "%": r.precision == null && !isNaN(a = oDe(i)) && (r.precision = a - (r.type === "%") * 2);
}
return IJ(r);
}
@@ -58722,19 +58954,19 @@ function UJ(e) {
function WJ(e) {
return Math.exp(e);
}
-function aDe(e) {
+function lDe(e) {
return -Math.log(-e);
}
-function oDe(e) {
+function uDe(e) {
return -Math.exp(-e);
}
-function sDe(e) {
+function dDe(e) {
return isFinite(e) ? +("1e" + e) : e < 0 ? 0 : e;
}
-function cDe(e) {
- return e === 10 ? sDe : e === Math.E ? Math.exp : (t) => e ** +t;
+function fDe(e) {
+ return e === 10 ? dDe : e === Math.E ? Math.exp : (t) => e ** +t;
}
-function lDe(e) {
+function pDe(e) {
return e === Math.E ? Math.log : e === 10 && Math.log10 || e === 2 && Math.log2 || (e = Math.log(e), (t) => Math.log(t) / e);
}
function GJ(e) {
@@ -58743,7 +58975,7 @@ function GJ(e) {
function KJ(e) {
let t = e(UJ, WJ), n = t.domain, r = 10, i, a;
function o() {
- return i = lDe(r), a = cDe(r), n()[0] < 0 ? (i = GJ(i), a = GJ(a), e(aDe, oDe)) : e(UJ, WJ), t;
+ return i = pDe(r), a = fDe(r), n()[0] < 0 ? (i = GJ(i), a = GJ(a), e(lDe, uDe)) : e(UJ, WJ), t;
}
return t.base = function(e) {
return arguments.length ? (r = +e, o()) : r;
@@ -58813,16 +59045,16 @@ function QJ(e) {
return t < 0 ? -((-t) ** +e) : t ** +e;
};
}
-function uDe(e) {
+function mDe(e) {
return e < 0 ? -Math.sqrt(-e) : Math.sqrt(e);
}
-function dDe(e) {
+function hDe(e) {
return e < 0 ? -e * e : e * e;
}
function $J(e) {
var t = e(bJ, bJ), n = 1;
function r() {
- return n === 1 ? e(bJ, bJ) : n === .5 ? e(uDe, dDe) : e(QJ(n), QJ(1 / n));
+ return n === 1 ? e(bJ, bJ) : n === .5 ? e(mDe, hDe) : e(QJ(n), QJ(1 / n));
}
return t.exponent = function(e) {
return arguments.length ? (n = +e, r()) : n;
@@ -58834,7 +59066,7 @@ function eY() {
return SJ(e, eY()).exponent(e.exponent());
}, jq.apply(e, arguments), e;
}
-function fDe() {
+function gDe() {
return eY.apply(null, arguments).exponent(.5);
}
//#endregion
@@ -58842,13 +59074,13 @@ function fDe() {
function tY(e) {
return Math.sign(e) * e * e;
}
-function pDe(e) {
+function _De(e) {
return Math.sign(e) * Math.sqrt(Math.abs(e));
}
function nY() {
var e = wJ(), t = [0, 1], n = !1, r;
function i(t) {
- var i = pDe(e(t));
+ var i = _De(e(t));
return isNaN(i) ? r : n ? Math.round(i) : i;
}
return i.invert = function(t) {
@@ -58875,7 +59107,7 @@ function rY() {
var e = [], t = [], n = [], r;
function i() {
var r = 0, i = Math.max(1, t.length);
- for (n = Array(i - 1); ++r < i;) n[r - 1] = _Ee(e, r / i);
+ for (n = Array(i - 1); ++r < i;) n[r - 1] = xEe(e, r / i);
return a;
}
function a(e) {
@@ -59044,8 +59276,8 @@ function TY(e) {
e.setDate(e.getDate() + t * 7);
}, (e, t) => (t - e - (t.getTimezoneOffset() - e.getTimezoneOffset()) * dY) / mY);
}
-var EY = TY(0), DY = TY(1), mDe = TY(2), hDe = TY(3), OY = TY(4), gDe = TY(5), _De = TY(6);
-EY.range, DY.range, mDe.range, hDe.range, OY.range, gDe.range, _De.range;
+var EY = TY(0), DY = TY(1), vDe = TY(2), yDe = TY(3), OY = TY(4), bDe = TY(5), xDe = TY(6);
+EY.range, DY.range, vDe.range, yDe.range, OY.range, bDe.range, xDe.range;
function kY(e) {
return cY((t) => {
t.setUTCDate(t.getUTCDate() - (t.getUTCDay() + 7 - e) % 7), t.setUTCHours(0, 0, 0, 0);
@@ -59053,8 +59285,8 @@ function kY(e) {
e.setUTCDate(e.getUTCDate() + t * 7);
}, (e, t) => (t - e) / mY);
}
-var AY = kY(0), jY = kY(1), vDe = kY(2), yDe = kY(3), MY = kY(4), bDe = kY(5), xDe = kY(6);
-AY.range, jY.range, vDe.range, yDe.range, MY.range, bDe.range, xDe.range;
+var AY = kY(0), jY = kY(1), SDe = kY(2), CDe = kY(3), MY = kY(4), wDe = kY(5), TDe = kY(6);
+AY.range, jY.range, SDe.range, CDe.range, MY.range, wDe.range, TDe.range;
//#endregion
//#region node_modules/d3-time/src/month.js
var NY = cY((e) => {
@@ -59201,7 +59433,7 @@ function LY(e, t, n, r, i, a) {
}
return [s, c];
}
-var [SDe, CDe] = LY(IY, PY, AY, wY, xY, yY), [wDe, TDe] = LY(FY, NY, EY, SY, bY, vY);
+var [EDe, DDe] = LY(IY, PY, AY, wY, xY, yY), [ODe, kDe] = LY(FY, NY, EY, SY, bY, vY);
//#endregion
//#region node_modules/d3-time-format/src/locale.js
function RY(e) {
@@ -59229,7 +59461,7 @@ function BY(e, t, n) {
L: 0
};
}
-function EDe(e) {
+function ADe(e) {
var t = e.dateTime, n = e.date, r = e.time, i = e.periods, a = e.days, o = e.shortDays, s = e.months, c = e.shortMonths, l = WY(i), u = GY(i), d = WY(a), f = GY(a), p = WY(o), m = GY(o), h = WY(s), g = GY(s), _ = WY(c), v = GY(c), y = {
a: N,
A: ee,
@@ -59238,30 +59470,30 @@ function EDe(e) {
c: null,
d: XY,
e: XY,
- f: YDe,
- g: aOe,
- G: sOe,
- H: KDe,
- I: qDe,
- j: JDe,
+ f: $De,
+ g: lOe,
+ G: dOe,
+ H: XDe,
+ I: ZDe,
+ j: QDe,
L: ZY,
- m: XDe,
- M: ZDe,
+ m: eOe,
+ M: tOe,
p: F,
q: ne,
Q: rX,
s: iX,
- S: QDe,
- u: $De,
- U: eOe,
- V: tOe,
- w: nOe,
- W: rOe,
+ S: nOe,
+ u: rOe,
+ U: iOe,
+ V: aOe,
+ w: oOe,
+ W: sOe,
x: null,
X: null,
- y: iOe,
- Y: oOe,
- Z: cOe,
+ y: cOe,
+ Y: uOe,
+ Z: fOe,
"%": nX
}, b = {
a: I,
@@ -59271,30 +59503,30 @@ function EDe(e) {
c: null,
d: $Y,
e: $Y,
- f: fOe,
- g: SOe,
- G: wOe,
- H: lOe,
- I: uOe,
- j: dOe,
+ f: gOe,
+ g: EOe,
+ G: OOe,
+ H: pOe,
+ I: mOe,
+ j: hOe,
L: eX,
- m: pOe,
- M: mOe,
+ m: _Oe,
+ M: vOe,
p: ae,
q: oe,
Q: rX,
s: iX,
- S: hOe,
- u: gOe,
- U: _Oe,
- V: vOe,
- w: yOe,
- W: bOe,
+ S: yOe,
+ u: bOe,
+ U: xOe,
+ V: SOe,
+ w: COe,
+ W: wOe,
x: null,
X: null,
- y: xOe,
- Y: COe,
- Z: TOe,
+ y: TOe,
+ Y: DOe,
+ Z: kOe,
"%": nX
}, x = {
a: E,
@@ -59304,31 +59536,31 @@ function EDe(e) {
c: A,
d: JY,
e: JY,
- f: HDe,
+ f: KDe,
g: qY,
G: KY,
H: YY,
I: YY,
- j: RDe,
- L: VDe,
- m: LDe,
- M: zDe,
+ j: HDe,
+ L: GDe,
+ m: VDe,
+ M: UDe,
p: T,
- q: IDe,
- Q: WDe,
- s: GDe,
- S: BDe,
- u: jDe,
- U: MDe,
- V: NDe,
- w: ADe,
- W: PDe,
+ q: BDe,
+ Q: JDe,
+ s: YDe,
+ S: WDe,
+ u: FDe,
+ U: IDe,
+ V: LDe,
+ w: PDe,
+ W: RDe,
x: j,
X: M,
y: qY,
Y: KY,
- Z: FDe,
- "%": UDe
+ Z: zDe,
+ "%": qDe
};
y.x = S(n, y), y.X = S(r, y), y.c = S(t, y), b.x = S(n, b), b.X = S(r, b), b.c = S(t, b);
function S(e, t) {
@@ -59456,37 +59688,37 @@ var VY = {
"-": "",
_: " ",
0: "0"
-}, HY = /^\s*\d+/, DDe = /^%/, ODe = /[\\^$*+?|[\]().{}]/g;
+}, HY = /^\s*\d+/, jDe = /^%/, MDe = /[\\^$*+?|[\]().{}]/g;
function UY(e, t, n) {
var r = e < 0 ? "-" : "", i = (r ? -e : e) + "", a = i.length;
return r + (a < n ? Array(n - a + 1).join(t) + i : i);
}
-function kDe(e) {
- return e.replace(ODe, "\\$&");
+function NDe(e) {
+ return e.replace(MDe, "\\$&");
}
function WY(e) {
- return RegExp("^(?:" + e.map(kDe).join("|") + ")", "i");
+ return RegExp("^(?:" + e.map(NDe).join("|") + ")", "i");
}
function GY(e) {
return new Map(e.map((e, t) => [e.toLowerCase(), t]));
}
-function ADe(e, t, n) {
+function PDe(e, t, n) {
var r = HY.exec(t.slice(n, n + 1));
return r ? (e.w = +r[0], n + r[0].length) : -1;
}
-function jDe(e, t, n) {
+function FDe(e, t, n) {
var r = HY.exec(t.slice(n, n + 1));
return r ? (e.u = +r[0], n + r[0].length) : -1;
}
-function MDe(e, t, n) {
+function IDe(e, t, n) {
var r = HY.exec(t.slice(n, n + 2));
return r ? (e.U = +r[0], n + r[0].length) : -1;
}
-function NDe(e, t, n) {
+function LDe(e, t, n) {
var r = HY.exec(t.slice(n, n + 2));
return r ? (e.V = +r[0], n + r[0].length) : -1;
}
-function PDe(e, t, n) {
+function RDe(e, t, n) {
var r = HY.exec(t.slice(n, n + 2));
return r ? (e.W = +r[0], n + r[0].length) : -1;
}
@@ -59498,15 +59730,15 @@ function qY(e, t, n) {
var r = HY.exec(t.slice(n, n + 2));
return r ? (e.y = +r[0] + (+r[0] > 68 ? 1900 : 2e3), n + r[0].length) : -1;
}
-function FDe(e, t, n) {
+function zDe(e, t, n) {
var r = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n, n + 6));
return r ? (e.Z = r[1] ? 0 : -(r[2] + (r[3] || "00")), n + r[0].length) : -1;
}
-function IDe(e, t, n) {
+function BDe(e, t, n) {
var r = HY.exec(t.slice(n, n + 1));
return r ? (e.q = r[0] * 3 - 3, n + r[0].length) : -1;
}
-function LDe(e, t, n) {
+function VDe(e, t, n) {
var r = HY.exec(t.slice(n, n + 2));
return r ? (e.m = r[0] - 1, n + r[0].length) : -1;
}
@@ -59514,7 +59746,7 @@ function JY(e, t, n) {
var r = HY.exec(t.slice(n, n + 2));
return r ? (e.d = +r[0], n + r[0].length) : -1;
}
-function RDe(e, t, n) {
+function HDe(e, t, n) {
var r = HY.exec(t.slice(n, n + 3));
return r ? (e.m = 0, e.d = +r[0], n + r[0].length) : -1;
}
@@ -59522,159 +59754,159 @@ function YY(e, t, n) {
var r = HY.exec(t.slice(n, n + 2));
return r ? (e.H = +r[0], n + r[0].length) : -1;
}
-function zDe(e, t, n) {
+function UDe(e, t, n) {
var r = HY.exec(t.slice(n, n + 2));
return r ? (e.M = +r[0], n + r[0].length) : -1;
}
-function BDe(e, t, n) {
+function WDe(e, t, n) {
var r = HY.exec(t.slice(n, n + 2));
return r ? (e.S = +r[0], n + r[0].length) : -1;
}
-function VDe(e, t, n) {
+function GDe(e, t, n) {
var r = HY.exec(t.slice(n, n + 3));
return r ? (e.L = +r[0], n + r[0].length) : -1;
}
-function HDe(e, t, n) {
+function KDe(e, t, n) {
var r = HY.exec(t.slice(n, n + 6));
return r ? (e.L = Math.floor(r[0] / 1e3), n + r[0].length) : -1;
}
-function UDe(e, t, n) {
- var r = DDe.exec(t.slice(n, n + 1));
+function qDe(e, t, n) {
+ var r = jDe.exec(t.slice(n, n + 1));
return r ? n + r[0].length : -1;
}
-function WDe(e, t, n) {
+function JDe(e, t, n) {
var r = HY.exec(t.slice(n));
return r ? (e.Q = +r[0], n + r[0].length) : -1;
}
-function GDe(e, t, n) {
+function YDe(e, t, n) {
var r = HY.exec(t.slice(n));
return r ? (e.s = +r[0], n + r[0].length) : -1;
}
function XY(e, t) {
return UY(e.getDate(), t, 2);
}
-function KDe(e, t) {
+function XDe(e, t) {
return UY(e.getHours(), t, 2);
}
-function qDe(e, t) {
+function ZDe(e, t) {
return UY(e.getHours() % 12 || 12, t, 2);
}
-function JDe(e, t) {
+function QDe(e, t) {
return UY(1 + SY.count(FY(e), e), t, 3);
}
function ZY(e, t) {
return UY(e.getMilliseconds(), t, 3);
}
-function YDe(e, t) {
+function $De(e, t) {
return ZY(e, t) + "000";
}
-function XDe(e, t) {
+function eOe(e, t) {
return UY(e.getMonth() + 1, t, 2);
}
-function ZDe(e, t) {
+function tOe(e, t) {
return UY(e.getMinutes(), t, 2);
}
-function QDe(e, t) {
+function nOe(e, t) {
return UY(e.getSeconds(), t, 2);
}
-function $De(e) {
+function rOe(e) {
var t = e.getDay();
return t === 0 ? 7 : t;
}
-function eOe(e, t) {
+function iOe(e, t) {
return UY(EY.count(FY(e) - 1, e), t, 2);
}
function QY(e) {
var t = e.getDay();
return t >= 4 || t === 0 ? OY(e) : OY.ceil(e);
}
-function tOe(e, t) {
+function aOe(e, t) {
return e = QY(e), UY(OY.count(FY(e), e) + (FY(e).getDay() === 4), t, 2);
}
-function nOe(e) {
+function oOe(e) {
return e.getDay();
}
-function rOe(e, t) {
+function sOe(e, t) {
return UY(DY.count(FY(e) - 1, e), t, 2);
}
-function iOe(e, t) {
+function cOe(e, t) {
return UY(e.getFullYear() % 100, t, 2);
}
-function aOe(e, t) {
+function lOe(e, t) {
return e = QY(e), UY(e.getFullYear() % 100, t, 2);
}
-function oOe(e, t) {
+function uOe(e, t) {
return UY(e.getFullYear() % 1e4, t, 4);
}
-function sOe(e, t) {
+function dOe(e, t) {
var n = e.getDay();
return e = n >= 4 || n === 0 ? OY(e) : OY.ceil(e), UY(e.getFullYear() % 1e4, t, 4);
}
-function cOe(e) {
+function fOe(e) {
var t = e.getTimezoneOffset();
return (t > 0 ? "-" : (t *= -1, "+")) + UY(t / 60 | 0, "0", 2) + UY(t % 60, "0", 2);
}
function $Y(e, t) {
return UY(e.getUTCDate(), t, 2);
}
-function lOe(e, t) {
+function pOe(e, t) {
return UY(e.getUTCHours(), t, 2);
}
-function uOe(e, t) {
+function mOe(e, t) {
return UY(e.getUTCHours() % 12 || 12, t, 2);
}
-function dOe(e, t) {
+function hOe(e, t) {
return UY(1 + CY.count(IY(e), e), t, 3);
}
function eX(e, t) {
return UY(e.getUTCMilliseconds(), t, 3);
}
-function fOe(e, t) {
+function gOe(e, t) {
return eX(e, t) + "000";
}
-function pOe(e, t) {
+function _Oe(e, t) {
return UY(e.getUTCMonth() + 1, t, 2);
}
-function mOe(e, t) {
+function vOe(e, t) {
return UY(e.getUTCMinutes(), t, 2);
}
-function hOe(e, t) {
+function yOe(e, t) {
return UY(e.getUTCSeconds(), t, 2);
}
-function gOe(e) {
+function bOe(e) {
var t = e.getUTCDay();
return t === 0 ? 7 : t;
}
-function _Oe(e, t) {
+function xOe(e, t) {
return UY(AY.count(IY(e) - 1, e), t, 2);
}
function tX(e) {
var t = e.getUTCDay();
return t >= 4 || t === 0 ? MY(e) : MY.ceil(e);
}
-function vOe(e, t) {
+function SOe(e, t) {
return e = tX(e), UY(MY.count(IY(e), e) + (IY(e).getUTCDay() === 4), t, 2);
}
-function yOe(e) {
+function COe(e) {
return e.getUTCDay();
}
-function bOe(e, t) {
+function wOe(e, t) {
return UY(jY.count(IY(e) - 1, e), t, 2);
}
-function xOe(e, t) {
+function TOe(e, t) {
return UY(e.getUTCFullYear() % 100, t, 2);
}
-function SOe(e, t) {
+function EOe(e, t) {
return e = tX(e), UY(e.getUTCFullYear() % 100, t, 2);
}
-function COe(e, t) {
+function DOe(e, t) {
return UY(e.getUTCFullYear() % 1e4, t, 4);
}
-function wOe(e, t) {
+function OOe(e, t) {
var n = e.getUTCDay();
return e = n >= 4 || n === 0 ? MY(e) : MY.ceil(e), UY(e.getUTCFullYear() % 1e4, t, 4);
}
-function TOe() {
+function kOe() {
return "+0000";
}
function nX() {
@@ -59689,7 +59921,7 @@ function iX(e) {
//#endregion
//#region node_modules/d3-time-format/src/defaultLocale.js
var aX, oX, sX;
-EOe({
+AOe({
dateTime: "%x, %X",
date: "%-m/%-d/%Y",
time: "%-I:%M:%S %p",
@@ -59741,15 +59973,15 @@ EOe({
"Dec"
]
});
-function EOe(e) {
- return aX = EDe(e), oX = aX.format, aX.parse, sX = aX.utcFormat, aX.utcParse, aX;
+function AOe(e) {
+ return aX = ADe(e), oX = aX.format, aX.parse, sX = aX.utcFormat, aX.utcParse, aX;
}
//#endregion
//#region node_modules/d3-scale/src/time.js
-function DOe(e) {
+function jOe(e) {
return new Date(e);
}
-function OOe(e) {
+function MOe(e) {
return e instanceof Date ? +e : +/* @__PURE__ */ new Date(+e);
}
function cX(e, t, n, r, i, a, o, s, c, l) {
@@ -59760,7 +59992,7 @@ function cX(e, t, n, r, i, a, o, s, c, l) {
return u.invert = function(e) {
return new Date(d(e));
}, u.domain = function(e) {
- return arguments.length ? f(Array.from(e, OOe)) : f().map(DOe);
+ return arguments.length ? f(Array.from(e, MOe)) : f().map(jOe);
}, u.ticks = function(t) {
var n = f();
return e(n[0], n[n.length - 1], t ?? 10);
@@ -59773,13 +60005,13 @@ function cX(e, t, n, r, i, a, o, s, c, l) {
return SJ(u, cX(e, t, n, r, i, a, o, s, c, l));
}, u;
}
-function kOe() {
- return jq.apply(cX(wDe, TDe, FY, NY, EY, SY, bY, vY, _Y, oX).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments);
+function NOe() {
+ return jq.apply(cX(ODe, kDe, FY, NY, EY, SY, bY, vY, _Y, oX).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments);
}
//#endregion
//#region node_modules/d3-scale/src/utcTime.js
-function AOe() {
- return jq.apply(cX(SDe, CDe, IY, PY, AY, CY, xY, yY, _Y, sX).domain([Date.UTC(2e3, 0, 1), Date.UTC(2e3, 0, 2)]), arguments);
+function POe() {
+ return jq.apply(cX(EDe, DDe, IY, PY, AY, CY, xY, yY, _Y, sX).domain([Date.UTC(2e3, 0, 1), Date.UTC(2e3, 0, 2)]), arguments);
}
//#endregion
//#region node_modules/d3-scale/src/sequential.js
@@ -59834,7 +60066,7 @@ function mX() {
return uX(e, mX()).exponent(e.exponent());
}, Mq.apply(e, arguments);
}
-function jOe() {
+function FOe() {
return mX.apply(null, arguments).exponent(.5);
}
//#endregion
@@ -59854,7 +60086,7 @@ function hX() {
}, n.range = function() {
return e.map((n, r) => t(r / (e.length - 1)));
}, n.quantiles = function(t) {
- return Array.from({ length: t + 1 }, (n, r) => gEe(e, r / t));
+ return Array.from({ length: t + 1 }, (n, r) => bEe(e, r / t));
}, n.copy = function() {
return hX(t).domain(e);
}, Mq.apply(n, arguments);
@@ -59880,7 +60112,7 @@ function gX() {
function m(e) {
return function(t) {
var n, r, i;
- return arguments.length ? ([n, r, i] = t, l = UEe(e, [
+ return arguments.length ? ([n, r, i] = t, l = qEe(e, [
n,
r,
i
@@ -59925,7 +60157,7 @@ function bX() {
return uX(e, bX()).exponent(e.exponent());
}, Mq.apply(e, arguments);
}
-function MOe() {
+function IOe() {
return bX.apply(null, arguments).exponent(.5);
}
//#endregion
@@ -59935,14 +60167,14 @@ var xX = /* @__PURE__ */ ht({
scaleDiverging: () => _X,
scaleDivergingLog: () => vX,
scaleDivergingPow: () => bX,
- scaleDivergingSqrt: () => MOe,
+ scaleDivergingSqrt: () => IOe,
scaleDivergingSymlog: () => yX,
scaleIdentity: () => VJ,
scaleImplicit: () => Nq,
scaleLinear: () => BJ,
scaleLog: () => qJ,
scaleOrdinal: () => Pq,
- scalePoint: () => yEe,
+ scalePoint: () => CEe,
scalePow: () => eY,
scaleQuantile: () => rY,
scaleQuantize: () => iY,
@@ -59951,26 +60183,26 @@ var xX = /* @__PURE__ */ ht({
scaleSequentialLog: () => fX,
scaleSequentialPow: () => mX,
scaleSequentialQuantile: () => hX,
- scaleSequentialSqrt: () => jOe,
+ scaleSequentialSqrt: () => FOe,
scaleSequentialSymlog: () => pX,
- scaleSqrt: () => fDe,
+ scaleSqrt: () => gDe,
scaleSymlog: () => ZJ,
scaleThreshold: () => aY,
- scaleTime: () => kOe,
- scaleUtc: () => AOe,
+ scaleTime: () => NOe,
+ scaleUtc: () => POe,
tickFormat: () => RJ
});
//#endregion
//#region node_modules/recharts/es6/state/selectors/combiners/combineConfiguredScale.js
-function NOe(e) {
+function LOe(e) {
if (e in xX) return xX[e]();
- var t = `scale${Cz(e)}`;
+ var t = `scale${Sz(e)}`;
if (t in xX) return xX[t]();
}
function SX(e, t, n) {
if (typeof e == "function") return e.copy().domain(t).range(n);
if (e != null) {
- var r = NOe(e);
+ var r = LOe(e);
if (r != null) return r.domain(t).range(n), r;
}
}
@@ -59979,22 +60211,22 @@ function CX(e, t, n, r) {
}
//#endregion
//#region node_modules/recharts/es6/state/selectors/combiners/combineRealScaleType.js
-function POe(e) {
- return `scale${Cz(e)}`;
+function ROe(e) {
+ return `scale${Sz(e)}`;
}
-function FOe(e) {
- return POe(e) in xX;
+function zOe(e) {
+ return ROe(e) in xX;
}
var wX = (e, t, n) => {
if (e != null) {
var { scale: r, type: i } = e;
if (r === "auto") return i === "category" && n && (n.indexOf("LineChart") >= 0 || n.indexOf("AreaChart") >= 0 || n.indexOf("ComposedChart") >= 0 && !t) ? "point" : i === "category" ? "band" : "linear";
- if (typeof r == "string") return FOe(r) ? r : "point";
+ if (typeof r == "string") return zOe(r) ? r : "point";
}
};
//#endregion
//#region node_modules/recharts/es6/util/scale/createCategoricalInverse.js
-function IOe(e, t) {
+function BOe(e, t) {
for (var n = 0, r = e.length, i = e[0] < e[e.length - 1]; n < r;) {
var a = Math.floor((n + r) / 2);
(i ? e[a] < t : e[a] > t) ? n = a + 1 : r = a;
@@ -60005,7 +60237,7 @@ function TX(e, t) {
if (e) {
var n = t ?? e.domain(), r = n.map((t) => e(t) ?? 0), i = e.range();
if (!(n.length === 0 || i.length < 2)) return (e) => {
- var t = IOe(r, e);
+ var t = BOe(r, e);
if (t <= 0) return n[0];
if (t >= n.length) return n[n.length - 1];
var i = r[t - 1] ?? 0, a = r[t] ?? 0;
@@ -60015,7 +60247,7 @@ function TX(e, t) {
}
//#endregion
//#region node_modules/recharts/es6/state/selectors/combiners/combineInverseScaleFunction.js
-function LOe(e) {
+function VOe(e) {
if (e != null) return "invert" in e && typeof e.invert == "function" ? e.invert.bind(e) : TX(e, void 0);
}
//#endregion
@@ -60034,26 +60266,26 @@ function DX(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? EX(Object(n), !0).forEach(function(t) {
- ROe(e, t, n[t]);
+ HOe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : EX(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function ROe(e, t, n) {
- return (t = zOe(t)) in e ? Object.defineProperty(e, t, {
+function HOe(e, t, n) {
+ return (t = UOe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function zOe(e) {
- var t = BOe(e, "string");
+function UOe(e) {
+ var t = WOe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function BOe(e, t) {
+function WOe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -60121,7 +60353,7 @@ var OX = [0, "auto"], kX = {
unit: void 0,
niceTicks: "auto",
width: 60
-}, NX = (e, t) => e.cartesianAxis.yAxis[t], PX = (e, t) => NX(e, t) ?? MX, VOe = {
+}, NX = (e, t) => e.cartesianAxis.yAxis[t], PX = (e, t) => NX(e, t) ?? MX, GOe = {
domain: [0, "auto"],
includeHidden: !1,
reversed: !1,
@@ -60134,7 +60366,7 @@ var OX = [0, "auto"], kX = {
scale: "auto",
type: "number",
unit: ""
-}, FX = (e, t) => e.cartesianAxis.zAxis[t] ?? VOe, IX = (e, t, n) => {
+}, FX = (e, t) => e.cartesianAxis.zAxis[t] ?? GOe, IX = (e, t, n) => {
switch (t) {
case "xAxis": return jX(e, n);
case "yAxis": return PX(e, n);
@@ -60143,7 +60375,7 @@ var OX = [0, "auto"], kX = {
case "radiusAxis": return JK(e, n);
default: throw Error(`Unexpected axis type: ${t}`);
}
-}, HOe = (e, t, n) => {
+}, KOe = (e, t, n) => {
switch (t) {
case "xAxis": return jX(e, n);
case "yAxis": return PX(e, n);
@@ -60170,20 +60402,20 @@ function zX(e, t) {
}
};
}
-var BX = (e) => e.graphicalItems.cartesianItems, UOe = $([nq, rq], zX), VX = (e, t, n) => e.filter(n).filter((e) => t?.includeHidden === !0 || !e.hide), HX = $([
+var BX = (e) => e.graphicalItems.cartesianItems, qOe = $([nq, rq], zX), VX = (e, t, n) => e.filter(n).filter((e) => t?.includeHidden === !0 || !e.hide), HX = $([
BX,
IX,
- UOe
-], VX, { memoizeOptions: { resultEqualityCheck: cq } }), UX = $([HX], (e) => e.filter((e) => e.type === "area" || e.type === "bar").filter(oq)), WX = (e) => e.filter((e) => !("stackId" in e) || e.stackId === void 0), WOe = $([HX], WX), GX = (e) => e.map((e) => e.data).filter(Boolean).flat(1), GOe = $([HX], GX, { memoizeOptions: { resultEqualityCheck: cq } }), KX = (e, t) => {
+ qOe
+], VX, { memoizeOptions: { resultEqualityCheck: cq } }), UX = $([HX], (e) => e.filter((e) => e.type === "area" || e.type === "bar").filter(oq)), WX = (e) => e.filter((e) => !("stackId" in e) || e.stackId === void 0), JOe = $([HX], WX), GX = (e) => e.map((e) => e.data).filter(Boolean).flat(1), YOe = $([HX], GX, { memoizeOptions: { resultEqualityCheck: cq } }), KX = (e, t) => {
var { chartData: n = [], dataStartIndex: r, dataEndIndex: i } = t;
return e.length > 0 ? e : n.slice(r, i + 1);
-}, qX = $([GOe, mK], KX), JX = (e, t, n) => t?.dataKey == null ? n.length > 0 ? n.map((e) => e.dataKey).flatMap((t) => e.map((e) => ({ value: mU(e, t) }))) : e.map((e) => ({ value: e })) : e.map((e) => ({ value: mU(e, t.dataKey) })), YX = $([
+}, qX = $([YOe, mK], KX), JX = (e, t, n) => t?.dataKey == null ? n.length > 0 ? n.map((e) => e.dataKey).flatMap((t) => e.map((e) => ({ value: mU(e, t) }))) : e.map((e) => ({ value: e })) : e.map((e) => ({ value: mU(e, t.dataKey) })), YX = $([
qX,
IX,
HX
], JX);
function XX(e) {
- if (gz(e) || e instanceof Date) {
+ if (hz(e) || e instanceof Date) {
var t = Number(e);
if (uU(t)) return t;
}
@@ -60197,13 +60429,13 @@ function ZX(e) {
if (n != null) return [n, n];
}
function QX(e) {
- return e.map(XX).filter(wz);
+ return e.map(XX).filter(Cz);
}
-function KOe(e, t) {
+function XOe(e, t) {
var n = XX(e), r = XX(t);
return n == null && r == null ? 0 : n == null ? -1 : r == null ? 1 : n - r;
}
-var qOe = $([YX], (e) => e?.map((e) => e.value).sort(KOe));
+var ZOe = $([YX], (e) => e?.map((e) => e.value).sort(XOe));
function $X(e, t) {
switch (e) {
case "xAxis": return t.direction === "x";
@@ -60211,13 +60443,13 @@ function $X(e, t) {
default: return !1;
}
}
-function JOe(e, t, n) {
- return !n || typeof t != "number" || mz(t) || !n.length ? [] : QX(n.flatMap((n) => {
+function QOe(e, t, n) {
+ return !n || typeof t != "number" || pz(t) || !n.length ? [] : QX(n.flatMap((n) => {
var r = mU(e, n.dataKey), i, a;
if (Array.isArray(r) ? [i, a] = r : i = a = r, !(!uU(i) || !uU(a))) return [t - i, t + a];
}));
}
-var eZ = (e) => LX(e, lq(e), uq(e)), tZ = $([eZ], (e) => e?.dataKey), YOe = $([
+var eZ = (e) => LX(e, lq(e), uq(e)), tZ = $([eZ], (e) => e?.dataKey), $Oe = $([
UX,
mK,
eZ
@@ -60230,22 +60462,22 @@ var eZ = (e) => LX(e, lq(e), uq(e)), tZ = $([eZ], (e) => e?.dataKey), YOe = $([
return Object.fromEntries(Object.entries(i).map((t) => {
var [i, a] = t, o = r ? [...a].reverse() : a;
return [i, {
- stackedData: YSe(e, o.map(iq), n),
+ stackedData: $Se(e, o.map(iq), n),
graphicalItems: o
}];
}));
}, rZ = $([
- YOe,
+ $Oe,
UX,
MK,
NK
], nZ), iZ = (e, t, n, r) => {
var { dataStartIndex: i, dataEndIndex: a } = t;
if (r == null && n !== "zAxis") {
- var o = QSe(e, i, a);
+ var o = nCe(e, i, a);
if (o == null || o[0] !== 0 || o[1] !== 0) return o;
}
-}, XOe = $([IX], (e) => e.allowDataOverflow), aZ = (e) => {
+}, eke = $([IX], (e) => e.allowDataOverflow), aZ = (e) => {
if (e == null || !("domain" in e)) return OX;
if (e.domain != null) return e.domain;
if ("ticks" in e && e.ticks != null) {
@@ -60256,12 +60488,12 @@ var eZ = (e) => LX(e, lq(e), uq(e)), tZ = $([eZ], (e) => e?.dataKey), YOe = $([
if (e.type === "category") return e.ticks.map(String);
}
return e?.domain ?? OX;
-}, oZ = $([IX], aZ), sZ = $([oZ, XOe], vK), ZOe = $([
+}, oZ = $([IX], aZ), sZ = $([oZ, eke], vK), tke = $([
rZ,
fK,
nq,
sZ
-], iZ, { memoizeOptions: { resultEqualityCheck: sq } }), cZ = (e) => e.errorBars, QOe = (e, t, n) => e.flatMap((e) => t[e.id]).filter(Boolean).filter((e) => $X(n, e)), lZ = function() {
+], iZ, { memoizeOptions: { resultEqualityCheck: sq } }), cZ = (e) => e.errorBars, nke = (e, t, n) => e.flatMap((e) => t[e.id]).filter(Boolean).filter((e) => $X(n, e)), lZ = function() {
var e = [...arguments].filter(Boolean);
if (e.length !== 0) {
var t = e.flat();
@@ -60271,7 +60503,7 @@ var eZ = (e) => LX(e, lq(e), uq(e)), tZ = $([eZ], (e) => e?.dataKey), YOe = $([
var a, o;
if (n.length > 0 && e.forEach((e) => {
n.forEach((n) => {
- var s = r[n.id]?.filter((e) => $X(i, e)), c = mU(e, t.dataKey ?? n.dataKey), l = JOe(e, c, s);
+ var s = r[n.id]?.filter((e) => $X(i, e)), c = mU(e, t.dataKey ?? n.dataKey), l = QOe(e, c, s);
if (l.length >= 2) {
var u = Math.min(...l), d = Math.max(...l);
(a == null || u < a) && (a = u), (o == null || d > o) && (o = d);
@@ -60283,29 +60515,29 @@ var eZ = (e) => LX(e, lq(e), uq(e)), tZ = $([eZ], (e) => e?.dataKey), YOe = $([
var n = ZX(mU(e, t.dataKey));
n != null && (a = a == null ? n[0] : Math.min(a, n[0]), o = o == null ? n[1] : Math.max(o, n[1]));
}), uU(a) && uU(o)) return [a, o];
-}, $Oe = $([
+}, rke = $([
qX,
IX,
- WOe,
+ JOe,
cZ,
nq
], uZ, { memoizeOptions: { resultEqualityCheck: sq } });
-function eke(e) {
+function ike(e) {
var { value: t } = e;
- if (gz(t) || t instanceof Date) return t;
+ if (hz(t) || t instanceof Date) return t;
}
-var tke = (e, t, n) => {
- var r = e.map(eke).filter((e) => e != null);
- return n && (t.dataKey == null || t.allowDuplicatedCategory && yz(r)) ? dK(0, e.length) : t.allowDuplicatedCategory ? r : Array.from(new Set(r));
-}, dZ = (e) => e.referenceElements.dots, fZ = (e, t, n) => e.filter((e) => e.ifOverflow === "extendDomain").filter((e) => t === "xAxis" ? e.xAxisId === n : e.yAxisId === n), nke = $([
+var ake = (e, t, n) => {
+ var r = e.map(ike).filter((e) => e != null);
+ return n && (t.dataKey == null || t.allowDuplicatedCategory && vz(r)) ? dK(0, e.length) : t.allowDuplicatedCategory ? r : Array.from(new Set(r));
+}, dZ = (e) => e.referenceElements.dots, fZ = (e, t, n) => e.filter((e) => e.ifOverflow === "extendDomain").filter((e) => t === "xAxis" ? e.xAxisId === n : e.yAxisId === n), oke = $([
dZ,
nq,
rq
-], fZ), pZ = (e) => e.referenceElements.areas, rke = $([
+], fZ), pZ = (e) => e.referenceElements.areas, ske = $([
pZ,
nq,
rq
-], fZ), mZ = (e) => e.referenceElements.lines, ike = $([
+], fZ), mZ = (e) => e.referenceElements.lines, cke = $([
mZ,
nq,
rq
@@ -60314,40 +60546,40 @@ var tke = (e, t, n) => {
var n = QX(e.map((e) => t === "xAxis" ? e.x : e.y));
if (n.length !== 0) return [Math.min(...n), Math.max(...n)];
}
-}, ake = $(nke, nq, hZ), gZ = (e, t) => {
+}, lke = $(oke, nq, hZ), gZ = (e, t) => {
if (e != null) {
var n = QX(e.flatMap((e) => [t === "xAxis" ? e.x1 : e.y1, t === "xAxis" ? e.x2 : e.y2]));
if (n.length !== 0) return [Math.min(...n), Math.max(...n)];
}
-}, oke = $([rke, nq], gZ);
-function ske(e) {
+}, uke = $([ske, nq], gZ);
+function dke(e) {
if (e.x != null) return QX([e.x]);
var t = e.segment?.map((e) => e.x);
return t == null || t.length === 0 ? [] : QX(t);
}
-function cke(e) {
+function fke(e) {
if (e.y != null) return QX([e.y]);
var t = e.segment?.map((e) => e.y);
return t == null || t.length === 0 ? [] : QX(t);
}
var _Z = (e, t) => {
if (e != null) {
- var n = e.flatMap((e) => t === "xAxis" ? ske(e) : cke(e));
+ var n = e.flatMap((e) => t === "xAxis" ? dke(e) : fke(e));
if (n.length !== 0) return [Math.min(...n), Math.max(...n)];
}
-}, lke = $(ake, $([ike, nq], _Z), oke, (e, t, n) => lZ(e, n, t)), vZ = (e, t, n, r, i, a, o, s) => n ?? nEe(t, o === "vertical" && s === "xAxis" || o === "horizontal" && s === "yAxis" ? lZ(r, a, i) : lZ(a, i), e.allowDataOverflow), uke = $([
+}, pke = $(lke, $([cke, nq], _Z), uke, (e, t, n) => lZ(e, n, t)), vZ = (e, t, n, r, i, a, o, s) => n ?? oEe(t, o === "vertical" && s === "xAxis" || o === "horizontal" && s === "yAxis" ? lZ(r, a, i) : lZ(a, i), e.allowDataOverflow), mke = $([
IX,
oZ,
sZ,
- ZOe,
- $Oe,
- lke,
+ tke,
+ rke,
+ pke,
tW,
nq
-], vZ, { memoizeOptions: { resultEqualityCheck: sq } }), dke = [0, 1], yZ = (e, t, n, r, i, a, o) => {
+], vZ, { memoizeOptions: { resultEqualityCheck: sq } }), hke = [0, 1], yZ = (e, t, n, r, i, a, o) => {
if (e != null && n != null && n.length !== 0 || o !== void 0) {
var { dataKey: s, type: c } = e, l = hU(t, a);
- return l && s == null ? dK(0, n?.length ?? 0) : c === "category" ? tke(r, e, l) : i === "expand" ? dke : o;
+ return l && s == null ? dK(0, n?.length ?? 0) : c === "category" ? ake(r, e, l) : i === "expand" ? hke : o;
}
}, bZ = $([
IX,
@@ -60356,7 +60588,7 @@ var _Z = (e, t) => {
YX,
MK,
nq,
- uke
+ mke
], yZ), xZ = $([
IX,
RX,
@@ -60384,7 +60616,7 @@ var _Z = (e, t) => {
return [Math.min(i, a), Math.max(o, s)];
}
return t;
-}, fke = $([
+}, gke = $([
IX,
bZ,
CZ,
@@ -60409,17 +60641,17 @@ var _Z = (e, t) => {
var a = t === "vertical" ? r.height : r.width;
if (i === "gap") return e * a / 2;
if (i === "no-gap") {
- var o = vz(n, e * a), s = e * a / 2;
+ var o = _z(n, e * a), s = e * a / 2;
return s - o - (s - o) / a * o;
}
return 0;
-}), pke = (e, t, n) => {
+}), _ke = (e, t, n) => {
var r = jX(e, t);
return r == null || typeof r.padding != "string" ? 0 : TZ(e, "xAxis", t, n, r.padding);
-}, mke = (e, t, n) => {
+}, vke = (e, t, n) => {
var r = PX(e, t);
return r == null || typeof r.padding != "string" ? 0 : TZ(e, "yAxis", t, n, r.padding);
-}, hke = $(jX, pke, (e, t) => {
+}, yke = $(jX, _ke, (e, t) => {
if (e == null) return {
left: 0,
right: 0
@@ -60432,7 +60664,7 @@ var _Z = (e, t) => {
left: (n.left ?? 0) + t,
right: (n.right ?? 0) + t
};
-}), gke = $(PX, mke, (e, t) => {
+}), bke = $(PX, vke, (e, t) => {
if (e == null) return {
top: 0,
bottom: 0
@@ -60445,19 +60677,19 @@ var _Z = (e, t) => {
top: (n.top ?? 0) + t,
bottom: (n.bottom ?? 0) + t
};
-}), _ke = $([
+}), xke = $([
FU,
- hke,
+ yke,
zU,
RU,
(e, t, n) => n
], (e, t, n, r, i) => {
var { padding: a } = r;
return i ? [a.left, n.width - a.right] : [e.left + t.left, e.left + e.width - t.right];
-}), vke = $([
+}), Ske = $([
FU,
tW,
- gke,
+ bke,
zU,
RU,
(e, t, n) => n
@@ -60466,8 +60698,8 @@ var _Z = (e, t) => {
return a ? [r.height - o.bottom, o.top] : t === "horizontal" ? [e.top + e.height - n.bottom, e.top + n.top] : [e.top + n.top, e.top + e.height - n.bottom];
}), EZ = (e, t, n, r) => {
switch (t) {
- case "xAxis": return _ke(e, n, r);
- case "yAxis": return vke(e, n, r);
+ case "xAxis": return xke(e, n, r);
+ case "yAxis": return Ske(e, n, r);
case "zAxis": return FX(e, n)?.range;
case "angleAxis": return $K(e);
case "radiusAxis": return eq(e, n);
@@ -60476,7 +60708,7 @@ var _Z = (e, t) => {
}, DZ = $([IX, EZ], VK), OZ = $([
IX,
xZ,
- $([xZ, fke], fq),
+ $([xZ, gke], fq),
DZ
], CX), kZ = (e, t, n, r) => {
if (n != null && n.dataKey != null) {
@@ -60489,54 +60721,54 @@ var _Z = (e, t) => {
LX,
nq
], kZ), jZ = $([OZ], dq);
-$([OZ], LOe), $([OZ, qOe], TX), $([
+$([OZ], VOe), $([OZ, ZOe], TX), $([
HX,
cZ,
nq
-], QOe);
+], nke);
function MZ(e, t) {
return e.id < t.id ? -1 : +(e.id > t.id);
}
-var NZ = (e, t) => t, PZ = (e, t, n) => n, yke = $(jU, NZ, PZ, (e, t, n) => e.filter((e) => e.orientation === t).filter((e) => e.mirror === n).sort(MZ)), bke = $(MU, NZ, PZ, (e, t, n) => e.filter((e) => e.orientation === t).filter((e) => e.mirror === n).sort(MZ)), FZ = (e, t) => ({
+var NZ = (e, t) => t, PZ = (e, t, n) => n, Cke = $(jU, NZ, PZ, (e, t, n) => e.filter((e) => e.orientation === t).filter((e) => e.mirror === n).sort(MZ)), wke = $(MU, NZ, PZ, (e, t, n) => e.filter((e) => e.orientation === t).filter((e) => e.mirror === n).sort(MZ)), FZ = (e, t) => ({
width: e.width,
height: t.height
-}), xke = (e, t) => ({
+}), Tke = (e, t) => ({
width: typeof t.width == "number" ? t.width : 60,
height: e.height
-}), IZ = $(FU, jX, FZ), Ske = (e, t, n) => {
+}), IZ = $(FU, jX, FZ), Eke = (e, t, n) => {
switch (t) {
case "top": return e.top;
case "bottom": return n - e.bottom;
default: return 0;
}
-}, Cke = (e, t, n) => {
+}, Dke = (e, t, n) => {
switch (t) {
case "left": return e.left;
case "right": return n - e.right;
default: return 0;
}
-}, wke = $(kU, FU, yke, NZ, PZ, (e, t, n, r, i) => {
+}, Oke = $(kU, FU, Cke, NZ, PZ, (e, t, n, r, i) => {
var a = {}, o;
return n.forEach((n) => {
var s = FZ(t, n);
- o ??= Ske(t, r, e);
+ o ??= Eke(t, r, e);
var c = r === "top" && !i || r === "bottom" && i;
a[n.id] = o - Number(c) * s.height, o += (c ? -1 : 1) * s.height;
}), a;
-}), Tke = $(OU, FU, bke, NZ, PZ, (e, t, n, r, i) => {
+}), kke = $(OU, FU, wke, NZ, PZ, (e, t, n, r, i) => {
var a = {}, o;
return n.forEach((n) => {
- var s = xke(t, n);
- o ??= Cke(t, r, e);
+ var s = Tke(t, n);
+ o ??= Dke(t, r, e);
var c = r === "left" && !i || r === "right" && i;
a[n.id] = o - Number(c) * s.width, o += (c ? -1 : 1) * s.width;
}), a;
-}), Eke = $([
+}), Ake = $([
FU,
jX,
(e, t) => {
var n = jX(e, t);
- if (n != null) return wke(e, n.orientation, n.mirror);
+ if (n != null) return Oke(e, n.orientation, n.mirror);
},
(e, t) => t
], (e, t, n, r) => {
@@ -60550,12 +60782,12 @@ var NZ = (e, t) => t, PZ = (e, t, n) => n, yke = $(jU, NZ, PZ, (e, t, n) => e.fi
y: i
};
}
-}), Dke = $([
+}), jke = $([
FU,
PX,
(e, t) => {
var n = PX(e, t);
- if (n != null) return Tke(e, n.orientation, n.mirror);
+ if (n != null) return kke(e, n.orientation, n.mirror);
},
(e, t) => t
], (e, t, n, r) => {
@@ -60581,7 +60813,7 @@ var NZ = (e, t) => t, PZ = (e, t, n) => n, yke = $(jU, NZ, PZ, (e, t, n) => e.fi
}, zZ = (e, t, n, r) => {
if (n != null) {
var { allowDuplicatedCategory: i, type: a, dataKey: o } = n, s = hU(e, r), c = t.map((e) => e.value);
- if (o && s && a === "category" && i && yz(c)) return c;
+ if (o && s && a === "category" && i && vz(c)) return c;
}
}, BZ = $([
tW,
@@ -60590,7 +60822,7 @@ var NZ = (e, t) => t, PZ = (e, t, n) => n, yke = $(jU, NZ, PZ, (e, t, n) => e.fi
nq
], zZ), VZ = $([
tW,
- HOe,
+ KOe,
xZ,
jZ,
BZ,
@@ -60625,7 +60857,7 @@ var NZ = (e, t) => t, PZ = (e, t, n) => n, yke = $(jU, NZ, PZ, (e, t, n) => e.fi
}), HZ = (e, t, n, r, i, a, o, s, c) => {
if (t != null && r != null) {
var l = hU(e, c), { type: u, ticks: d, tickCount: f } = t, p = n === "scaleBand" && typeof r.bandwidth == "function" ? r.bandwidth() / 2 : 2, m = u === "category" && r.bandwidth ? r.bandwidth() / p : 0;
- m = c === "angleAxis" && a != null && a.length >= 2 ? pz(a[0] - a[1]) * 2 * m : m;
+ m = c === "angleAxis" && a != null && a.length >= 2 ? fz(a[0] - a[1]) * 2 * m : m;
var h = d || i;
return h ? h.map((e, t) => {
var n = o ? o.indexOf(e) : e, i = r.map(n);
@@ -60635,7 +60867,7 @@ var NZ = (e, t) => t, PZ = (e, t, n) => n, yke = $(jU, NZ, PZ, (e, t, n) => e.fi
value: e,
offset: m
} : null;
- }).filter(wz) : l && s ? s.map((e, t) => {
+ }).filter(Cz) : l && s ? s.map((e, t) => {
var n = r.map(e);
return uU(n) ? {
coordinate: n + m,
@@ -60643,7 +60875,7 @@ var NZ = (e, t) => t, PZ = (e, t, n) => n, yke = $(jU, NZ, PZ, (e, t, n) => e.fi
index: t,
offset: m
} : null;
- }).filter(wz) : r.ticks ? r.ticks(f).map((e, t) => {
+ }).filter(Cz) : r.ticks ? r.ticks(f).map((e, t) => {
var n = r.map(e);
return uU(n) ? {
coordinate: n + m,
@@ -60651,7 +60883,7 @@ var NZ = (e, t) => t, PZ = (e, t, n) => n, yke = $(jU, NZ, PZ, (e, t, n) => e.fi
index: t,
offset: m
} : null;
- }).filter(wz) : r.domain().map((e, t) => {
+ }).filter(Cz) : r.domain().map((e, t) => {
var n = r.map(e);
return uU(n) ? {
coordinate: n + m,
@@ -60659,7 +60891,7 @@ var NZ = (e, t) => t, PZ = (e, t, n) => n, yke = $(jU, NZ, PZ, (e, t, n) => e.fi
index: t,
offset: m
} : null;
- }).filter(wz);
+ }).filter(Cz);
}
}, UZ = $([
tW,
@@ -60674,7 +60906,7 @@ var NZ = (e, t) => t, PZ = (e, t, n) => n, yke = $(jU, NZ, PZ, (e, t, n) => e.fi
], HZ), WZ = (e, t, n, r, i, a, o) => {
if (t != null && n != null && r != null && r[0] !== r[1]) {
var s = hU(e, o), { tickCount: c } = t, l = 0;
- return l = o === "angleAxis" && r?.length >= 2 ? pz(r[0] - r[1]) * 2 * l : l, s && a ? a.map((e, t) => {
+ return l = o === "angleAxis" && r?.length >= 2 ? fz(r[0] - r[1]) * 2 * l : l, s && a ? a.map((e, t) => {
var r = n.map(e);
return uU(r) ? {
coordinate: r + l,
@@ -60682,7 +60914,7 @@ var NZ = (e, t) => t, PZ = (e, t, n) => n, yke = $(jU, NZ, PZ, (e, t, n) => e.fi
index: t,
offset: l
} : null;
- }).filter(wz) : n.ticks ? n.ticks(c).map((e, t) => {
+ }).filter(Cz) : n.ticks ? n.ticks(c).map((e, t) => {
var r = n.map(e);
return uU(r) ? {
coordinate: r + l,
@@ -60690,7 +60922,7 @@ var NZ = (e, t) => t, PZ = (e, t, n) => n, yke = $(jU, NZ, PZ, (e, t, n) => e.fi
index: t,
offset: l
} : null;
- }).filter(wz) : n.domain().map((e, t) => {
+ }).filter(Cz) : n.domain().map((e, t) => {
var r = n.map(e);
return uU(r) ? {
coordinate: r + l,
@@ -60698,7 +60930,7 @@ var NZ = (e, t) => t, PZ = (e, t, n) => n, yke = $(jU, NZ, PZ, (e, t, n) => e.fi
index: t,
offset: l
} : null;
- }).filter(wz);
+ }).filter(Cz);
}
}, GZ = $([
tW,
@@ -60719,7 +60951,7 @@ $((e, t, n) => FX(e, n), $([$([
], CX)], dq), (e, t) => {
if (e != null && t != null) return DX(DX({}, e), {}, { scale: t });
});
-var Oke = $([
+var Mke = $([
tW,
jU,
MU
@@ -60753,15 +60985,15 @@ function YZ(e, t, n) {
function XZ(e, t) {
return YZ(t, qZ(e), JZ(e));
}
-function kke(e) {
+function Nke(e) {
return Q((t) => XZ(t, e));
}
//#endregion
//#region node_modules/recharts/es6/state/selectors/combiners/combineActiveLabel.js
var ZZ = (e, t) => {
var n, r = Number(t);
- if (!(mz(r) || t == null)) return r >= 0 ? e == null || (n = e[r]) == null ? void 0 : n.value : void 0;
-}, Ake = (e) => e.tooltip.settings, QZ = {
+ if (!(pz(r) || t == null)) return r >= 0 ? e == null || (n = e[r]) == null ? void 0 : n.value : void 0;
+}, Pke = (e) => e.tooltip.settings, QZ = {
active: !1,
index: null,
dataKey: void 0,
@@ -60846,7 +61078,7 @@ var ZZ = (e, t) => {
e.keyboardInteraction.active = t.payload.active, e.keyboardInteraction.index = t.payload.activeIndex, e.keyboardInteraction.coordinate = t.payload.activeCoordinate;
}
}
-}), { addTooltipEntrySettings: jke, replaceTooltipEntrySettings: Mke, removeTooltipEntrySettings: Nke, setTooltipSettingsState: Pke, setActiveMouseOverItemIndex: eQ, mouseLeaveItem: Fke, mouseLeaveChart: tQ, setActiveClickItemIndex: Ike, setMouseOverAxisIndex: nQ, setMouseClickAxisIndex: Lke, setSyncInteraction: rQ, setKeyboardInteraction: iQ } = $Z.actions, Rke = $Z.reducer;
+}), { addTooltipEntrySettings: Fke, replaceTooltipEntrySettings: Ike, removeTooltipEntrySettings: Lke, setTooltipSettingsState: Rke, setActiveMouseOverItemIndex: eQ, mouseLeaveItem: zke, mouseLeaveChart: tQ, setActiveClickItemIndex: Bke, setMouseOverAxisIndex: nQ, setMouseClickAxisIndex: Vke, setSyncInteraction: rQ, setKeyboardInteraction: iQ } = $Z.actions, Hke = $Z.reducer;
//#endregion
//#region node_modules/recharts/es6/state/selectors/combiners/combineTooltipInteractionState.js
function aQ(e, t) {
@@ -60863,26 +61095,26 @@ function oQ(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? aQ(Object(n), !0).forEach(function(t) {
- zke(e, t, n[t]);
+ Uke(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : aQ(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function zke(e, t, n) {
- return (t = Bke(t)) in e ? Object.defineProperty(e, t, {
+function Uke(e, t, n) {
+ return (t = Wke(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function Bke(e) {
- var t = Vke(e, "string");
+function Wke(e) {
+ var t = Gke(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function Vke(e, t) {
+function Gke(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -60892,21 +61124,21 @@ function Vke(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function Hke(e, t, n) {
+function Kke(e, t, n) {
return t === "axis" ? n === "click" ? e.axisInteraction.click : e.axisInteraction.hover : n === "click" ? e.itemInteraction.click : e.itemInteraction.hover;
}
-function Uke(e) {
+function qke(e) {
return e.index != null;
}
var sQ = (e, t, n, r) => {
if (t == null) return QZ;
- var i = Hke(e, t, n);
+ var i = Kke(e, t, n);
if (i == null) return QZ;
if (i.active) return i;
if (e.keyboardInteraction.active) return e.keyboardInteraction;
if (e.syncInteraction.active && e.syncInteraction.index != null) return e.syncInteraction;
var a = e.settings.active === !0;
- if (Uke(i)) {
+ if (qke(i)) {
if (a) return oQ(oQ({}, i), {}, { active: !0 });
} else if (r != null) return {
active: !0,
@@ -60919,7 +61151,7 @@ var sQ = (e, t, n, r) => {
};
//#endregion
//#region node_modules/recharts/es6/state/selectors/combiners/combineActiveTooltipIndex.js
-function Wke(e) {
+function Jke(e) {
if (typeof e == "number") return Number.isFinite(e) ? e : void 0;
if (e instanceof Date) {
var t = e.valueOf();
@@ -60928,14 +61160,14 @@ function Wke(e) {
var n = Number(e);
return Number.isFinite(n) ? n : void 0;
}
-function Gke(e, t) {
- var n = Wke(e), r = t[0], i = t[1];
+function Yke(e, t) {
+ var n = Jke(e), r = t[0], i = t[1];
return n !== void 0 && n >= Math.min(r, i) && n <= Math.max(r, i);
}
-function Kke(e, t, n) {
+function Xke(e, t, n) {
if (n == null || t == null) return !0;
var r = mU(e, t);
- return r == null || !gK(n) || Gke(r, n);
+ return r == null || !gK(n) || Yke(r, n);
}
var cQ = (e, t, n, r) => {
var i = e?.index;
@@ -60945,7 +61177,7 @@ var cQ = (e, t, n, r) => {
var o = 0, s = Infinity;
t.length > 0 && (s = t.length - 1);
var c = Math.max(o, Math.min(a, s)), l = t[c];
- return l == null || Kke(l, n, r) ? String(c) : null;
+ return l == null || Xke(l, n, r) ? String(c) : null;
}, lQ = (e, t, n, r, i, a, o) => {
if (a != null) {
var s = o[0]?.getPosition(a);
@@ -60989,26 +61221,26 @@ function mQ(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? pQ(Object(n), !0).forEach(function(t) {
- qke(e, t, n[t]);
+ Zke(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : pQ(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function qke(e, t, n) {
- return (t = Jke(t)) in e ? Object.defineProperty(e, t, {
+function Zke(e, t, n) {
+ return (t = Qke(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function Jke(e) {
- var t = Yke(e, "string");
+function Qke(e) {
+ var t = $ke(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function Yke(e, t) {
+function $ke(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -61018,39 +61250,39 @@ function Yke(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function Xke(e) {
+function eAe(e) {
if (typeof e == "string" || typeof e == "number") return e;
}
-function Zke(e) {
+function tAe(e) {
if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") return e;
}
-function Qke(e) {
+function nAe(e) {
if (typeof e == "string" || typeof e == "number") return e;
if (typeof e == "function") return (t) => e(t);
}
function hQ(e) {
if (typeof e == "string") return e;
}
-function $ke(e) {
+function rAe(e) {
if (!(typeof e != "object" || !e)) return {
- name: "name" in e ? Xke(e.name) : void 0,
- unit: "unit" in e ? Zke(e.unit) : void 0,
- dataKey: "dataKey" in e ? Qke(e.dataKey) : void 0,
+ name: "name" in e ? eAe(e.name) : void 0,
+ unit: "unit" in e ? tAe(e.unit) : void 0,
+ dataKey: "dataKey" in e ? nAe(e.dataKey) : void 0,
payload: "payload" in e ? e.payload : void 0,
color: "color" in e ? hQ(e.color) : void 0,
fill: "fill" in e ? hQ(e.fill) : void 0
};
}
-function eAe(e, t) {
+function iAe(e, t) {
return e ?? t;
}
var gQ = (e, t, n, r, i, a, o) => {
if (t != null && a != null) {
var { chartData: s, computedData: c, dataStartIndex: l, dataEndIndex: u } = n;
return e.reduce((e, n) => {
- var { dataDefinedOnItem: d, settings: f } = n, p = eAe(d, s), m = Array.isArray(p) ? lU(p, l, u) : p, h = f?.dataKey ?? r, g = f?.nameKey, _ = r && Array.isArray(m) && !Array.isArray(m[0]) && o === "axis" ? xz(m, r, i) : a(m, t, c, g);
+ var { dataDefinedOnItem: d, settings: f } = n, p = iAe(d, s), m = Array.isArray(p) ? lU(p, l, u) : p, h = f?.dataKey ?? r, g = f?.nameKey, _ = r && Array.isArray(m) && !Array.isArray(m[0]) && o === "axis" ? bz(m, r, i) : a(m, t, c, g);
return Array.isArray(_) ? _.forEach((t) => {
- var n = $ke(t), r = n?.name, i = n?.dataKey, a = n?.payload, o = mQ(mQ({}, f), {}, {
+ var n = rAe(t), r = n?.name, i = n?.dataKey, a = n?.payload, o = mQ(mQ({}, f), {}, {
name: r,
unit: n?.unit,
color: n?.color ?? f?.color,
@@ -61080,17 +61312,17 @@ var gQ = (e, t, n, r, i, a, o) => {
$([(e) => e.graphicalItems.cartesianItems, (e) => e.graphicalItems.polarItems], (e, t) => [...e, ...t]),
eZ,
$([lq, uq], zX)
-], VX, { memoizeOptions: { resultEqualityCheck: cq } }), tAe = $([vQ], (e) => e.filter(oq)), yQ = $([$([vQ], GX, { memoizeOptions: { resultEqualityCheck: cq } }), fK], KX), nAe = $([
- tAe,
+], VX, { memoizeOptions: { resultEqualityCheck: cq } }), aAe = $([vQ], (e) => e.filter(oq)), yQ = $([$([vQ], GX, { memoizeOptions: { resultEqualityCheck: cq } }), fK], KX), oAe = $([
+ aAe,
fK,
eZ
], aq), bQ = $([
yQ,
eZ,
vQ
-], JX), xQ = $([eZ], aZ), SQ = $([xQ, $([eZ], (e) => e.allowDataOverflow)], vK), rAe = $([
+], JX), xQ = $([eZ], aZ), SQ = $([xQ, $([eZ], (e) => e.allowDataOverflow)], vK), sAe = $([
$([
- nAe,
+ oAe,
$([vQ], (e) => e.filter(oq)),
MK,
NK
@@ -61098,17 +61330,17 @@ var gQ = (e, t, n, r, i, a, o) => {
fK,
lq,
SQ
-], iZ), iAe = $([
+], iZ), cAe = $([
yQ,
eZ,
$([vQ], WX),
cZ,
lq
-], uZ, { memoizeOptions: { resultEqualityCheck: sq } }), aAe = $([$([
+], uZ, { memoizeOptions: { resultEqualityCheck: sq } }), lAe = $([$([
dZ,
lq,
uq
-], fZ), lq], hZ), oAe = $([$([
+], fZ), lq], hZ), uAe = $([$([
pZ,
lq,
uq
@@ -61123,21 +61355,21 @@ var gQ = (e, t, n, r, i, a, o) => {
eZ,
xQ,
SQ,
- rAe,
- iAe,
+ sAe,
+ cAe,
$([
- aAe,
+ lAe,
$([$([
mZ,
lq,
uq
], fZ), lq], _Z),
- oAe
+ uAe
], lZ),
tW,
lq
], vZ)
-], yZ), sAe = $([
+], yZ), dAe = $([
eZ,
CQ,
$([
@@ -61149,7 +61381,7 @@ var gQ = (e, t, n, r, i, a, o) => {
], wZ), wQ = (e) => EZ(e, lq(e), uq(e), !1), TQ = $([eZ, wQ], VK), EQ = $([$([
eZ,
_Q,
- sAe,
+ dAe,
TQ
], CX)], dq), DQ = $([
tW,
@@ -61175,7 +61407,7 @@ var gQ = (e, t, n, r, i, a, o) => {
var { type: c } = t, l = hU(e, s);
if (r) {
var u = n === "scaleBand" && r.bandwidth ? r.bandwidth() / 2 : 2, d = c === "category" && r.bandwidth ? r.bandwidth() / u : 0;
- return d = s === "angleAxis" && i != null && i?.length >= 2 ? pz(i[0] - i[1]) * 2 * d : d, l && o ? o.map((e, t) => {
+ return d = s === "angleAxis" && i != null && i?.length >= 2 ? fz(i[0] - i[1]) * 2 * d : d, l && o ? o.map((e, t) => {
var n = r.map(e);
return uU(n) ? {
coordinate: n + d,
@@ -61183,7 +61415,7 @@ var gQ = (e, t, n, r, i, a, o) => {
index: t,
offset: d
} : null;
- }).filter(wz) : r.domain().map((e, t) => {
+ }).filter(Cz) : r.domain().map((e, t) => {
var n = r.map(e);
return uU(n) ? {
coordinate: n + d,
@@ -61191,13 +61423,13 @@ var gQ = (e, t, n, r, i, a, o) => {
index: t,
offset: d
} : null;
- }).filter(wz);
+ }).filter(Cz);
}
}
}), OQ = $([
qZ,
JZ,
- Ake
+ Pke
], (e, t, n) => YZ(n.shared, e, t)), kQ = (e) => e.tooltip.settings.trigger, AQ = (e) => e.tooltip.settings.defaultIndex, jQ = $([
fQ,
OQ,
@@ -61210,14 +61442,14 @@ var gQ = (e, t, n, r, i, a, o) => {
CQ
], cQ), NQ = $([DQ, MQ], ZZ), PQ = $([jQ], (e) => {
if (e) return e.dataKey;
-}), cAe = $([jQ], (e) => {
+}), fAe = $([jQ], (e) => {
if (e) return e.graphicalItemId;
}), FQ = $([
fQ,
OQ,
kQ,
AQ
-], uQ), lAe = $([jQ, $([
+], uQ), pAe = $([jQ, $([
OU,
kU,
tW,
@@ -61225,7 +61457,7 @@ var gQ = (e, t, n, r, i, a, o) => {
DQ,
AQ,
FQ
-], lQ)], (e, t) => e != null && e.coordinate ? e.coordinate : t), uAe = $([jQ], (e) => e?.active ?? !1), dAe = $([$([
+], lQ)], (e, t) => e != null && e.coordinate ? e.coordinate : t), mAe = $([jQ], (e) => e?.active ?? !1), hAe = $([$([
FQ,
MQ,
fK,
@@ -61255,26 +61487,26 @@ function LQ(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? IQ(Object(n), !0).forEach(function(t) {
- fAe(e, t, n[t]);
+ gAe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : IQ(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function fAe(e, t, n) {
- return (t = pAe(t)) in e ? Object.defineProperty(e, t, {
+function gAe(e, t, n) {
+ return (t = _Ae(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function pAe(e) {
- var t = mAe(e, "string");
+function _Ae(e) {
+ var t = vAe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function mAe(e, t) {
+function vAe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -61284,8 +61516,8 @@ function mAe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var hAe = () => Q(eZ), gAe = () => {
- var e = hAe(), t = Q(DQ), n = Q(EQ);
+var yAe = () => Q(eZ), bAe = () => {
+ var e = yAe(), t = Q(DQ), n = Q(EQ);
return TU(!e || !n ? void 0 : LQ(LQ({}, e), {}, { scale: n }), t);
};
//#endregion
@@ -61304,26 +61536,26 @@ function zQ(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? RQ(Object(n), !0).forEach(function(t) {
- _Ae(e, t, n[t]);
+ xAe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : RQ(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function _Ae(e, t, n) {
- return (t = vAe(t)) in e ? Object.defineProperty(e, t, {
+function xAe(e, t, n) {
+ return (t = SAe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function vAe(e) {
- var t = yAe(e, "string");
+function SAe(e) {
+ var t = CAe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function yAe(e, t) {
+function CAe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -61333,7 +61565,7 @@ function yAe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var bAe = (e, t, n, r) => {
+var wAe = (e, t, n, r) => {
var i = t.find((e) => e && e.index === n);
if (i) {
if (e === "horizontal") return {
@@ -61349,7 +61581,7 @@ var bAe = (e, t, n, r) => {
x: 0,
y: 0
};
-}, xAe = (e, t, n, r) => {
+}, TAe = (e, t, n, r) => {
var i = t.find((e) => e && e.index === n);
if (i) {
if (e === "centric") {
@@ -61379,7 +61611,7 @@ var bAe = (e, t, n, r) => {
y: 0
};
};
-function SAe(e, t) {
+function EAe(e, t) {
var { relativeX: n, relativeY: r } = e;
return n >= t.left && n <= t.left + t.width && r >= t.top && r <= t.top + t.height;
}
@@ -61389,9 +61621,9 @@ var BQ = (e, t, n, r, i) => {
if (r === "angleAxis" && i != null && Math.abs(Math.abs(i[1] - i[0]) - 360) <= 1e-6) for (var o = 0; o < a; o++) {
var s = o > 0 ? n[o - 1]?.coordinate : n[a - 1]?.coordinate, c = n[o]?.coordinate, l = o >= a - 1 ? n[0]?.coordinate : n[o + 1]?.coordinate, u = void 0;
if (s != null && c != null && l != null) {
- if (pz(c - s) !== pz(l - c)) {
+ if (fz(c - s) !== fz(l - c)) {
var d = [];
- if (pz(l - c) === pz(i[1] - i[0])) {
+ if (fz(l - c) === fz(i[1] - i[0])) {
u = l;
var f = c + i[1] - i[0];
d[0] = Math.min(f, (f + s) / 2), d[1] = Math.max(f, (f + s) / 2);
@@ -61416,7 +61648,7 @@ var BQ = (e, t, n, r, i) => {
}
}
return -1;
-}, VQ = () => Q(PK), HQ = (e, t) => t, UQ = (e, t, n) => n, WQ = (e, t, n, r) => r, CAe = $(DQ, (e) => YB(e, (e) => e.coordinate)), GQ = $([
+}, VQ = () => Q(PK), HQ = (e, t) => t, UQ = (e, t, n) => n, WQ = (e, t, n, r) => r, DAe = $(DQ, (e) => YB(e, (e) => e.coordinate)), GQ = $([
fQ,
HQ,
UQ,
@@ -61426,7 +61658,7 @@ var BQ = (e, t, n, r, i) => {
yQ,
tZ,
CQ
-], cQ), wAe = (e, t, n) => {
+], cQ), OAe = (e, t, n) => {
if (t != null) {
var r = fQ(e);
return t === "axis" ? n === "hover" ? r.axisInteraction.hover.dataKey : r.axisInteraction.click.dataKey : n === "hover" ? r.itemInteraction.hover.dataKey : r.itemInteraction.click.dataKey;
@@ -61444,7 +61676,7 @@ var BQ = (e, t, n, r, i) => {
DQ,
WQ,
qQ
-], lQ), TAe = $([GQ, JQ], (e, t) => e.coordinate ?? t), YQ = $([DQ, KQ], ZZ), EAe = $([
+], lQ), kAe = $([GQ, JQ], (e, t) => e.coordinate ?? t), YQ = $([DQ, KQ], ZZ), AAe = $([
qQ,
KQ,
fK,
@@ -61452,39 +61684,39 @@ var BQ = (e, t, n, r, i) => {
YQ,
dQ,
HQ
-], gQ), DAe = $([GQ, KQ], (e, t) => ({
+], gQ), jAe = $([GQ, KQ], (e, t) => ({
isActive: e.active && t != null,
activeIndex: t
-})), OAe = (e, t, n, r, i, a, o) => {
- if (!(!e || !n || !r || !i) && SAe(e, o)) {
- var s = BQ($Se(e, t), a, i, n, r), c = bAe(t, i, s, e);
+})), MAe = (e, t, n, r, i, a, o) => {
+ if (!(!e || !n || !r || !i) && EAe(e, o)) {
+ var s = BQ(rCe(e, t), a, i, n, r), c = wAe(t, i, s, e);
return {
activeIndex: String(s),
activeCoordinate: c
};
}
-}, kAe = (e, t, n, r, i, a, o) => {
+}, NAe = (e, t, n, r, i, a, o) => {
if (!(!e || !r || !i || !a || !n)) {
- var s = UTe(e, n);
+ var s = qTe(e, n);
if (s) {
- var c = BQ(eCe(s, t), o, a, r, i), l = xAe(t, a, c, s);
+ var c = BQ(iCe(s, t), o, a, r, i), l = TAe(t, a, c, s);
return {
activeIndex: String(c),
activeCoordinate: l
};
}
}
-}, AAe = (e, t, n, r, i, a, o, s) => {
- if (!(!e || !t || !r || !i || !a)) return t === "horizontal" || t === "vertical" ? OAe(e, t, r, i, a, o, s) : kAe(e, t, n, r, i, a, o);
-}, jAe = $((e) => e.zIndex.zIndexMap, (e, t) => t, (e, t, n) => n, (e, t, n) => {
+}, PAe = (e, t, n, r, i, a, o, s) => {
+ if (!(!e || !t || !r || !i || !a)) return t === "horizontal" || t === "vertical" ? MAe(e, t, r, i, a, o, s) : NAe(e, t, n, r, i, a, o);
+}, FAe = $((e) => e.zIndex.zIndexMap, (e, t) => t, (e, t, n) => n, (e, t, n) => {
if (t != null) {
var r = e[t];
if (r != null) return n ? r.panoramaElement : r.element;
}
-}), MAe = $((e) => e.zIndex.zIndexMap, (e) => {
+}), IAe = $((e) => e.zIndex.zIndexMap, (e) => {
var t = Object.keys(e).map((e) => parseInt(e, 10)).concat(Object.values(RK));
return Array.from(new Set(t)).sort((e, t) => e - t);
-}, { memoizeOptions: { resultEqualityCheck: uEe } });
+}, { memoizeOptions: { resultEqualityCheck: mEe } });
//#endregion
//#region node_modules/recharts/es6/state/zIndexSlice.js
function XQ(e, t) {
@@ -61501,26 +61733,26 @@ function ZQ(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? XQ(Object(n), !0).forEach(function(t) {
- NAe(e, t, n[t]);
+ LAe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : XQ(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function NAe(e, t, n) {
- return (t = PAe(t)) in e ? Object.defineProperty(e, t, {
+function LAe(e, t, n) {
+ return (t = RAe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function PAe(e) {
- var t = FAe(e, "string");
+function RAe(e) {
+ var t = zAe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function FAe(e, t) {
+function zAe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -61530,17 +61762,17 @@ function FAe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var IAe = { zIndexMap: Object.values(RK).reduce((e, t) => ZQ(ZQ({}, e), {}, { [t]: {
+var BAe = { zIndexMap: Object.values(RK).reduce((e, t) => ZQ(ZQ({}, e), {}, { [t]: {
element: void 0,
panoramaElement: void 0,
consumers: 0
-} }), {}) }, LAe = new Set(Object.values(RK));
-function RAe(e) {
- return LAe.has(e);
+} }), {}) }, VAe = new Set(Object.values(RK));
+function HAe(e) {
+ return VAe.has(e);
}
var QQ = FH({
name: "zIndex",
- initialState: IAe,
+ initialState: BAe,
reducers: {
registerZIndexPortal: {
reducer: (e, t) => {
@@ -61556,7 +61788,7 @@ var QQ = FH({
unregisterZIndexPortal: {
reducer: (e, t) => {
var { zIndex: n } = t.payload;
- e.zIndexMap[n] && (--e.zIndexMap[n].consumers, e.zIndexMap[n].consumers <= 0 && !RAe(n) && delete e.zIndexMap[n]);
+ e.zIndexMap[n] && (--e.zIndexMap[n].consumers, e.zIndexMap[n].consumers <= 0 && !HAe(n) && delete e.zIndexMap[n]);
},
prepare: jH()
},
@@ -61579,19 +61811,19 @@ var QQ = FH({
prepare: jH()
}
}
-}), { registerZIndexPortal: zAe, unregisterZIndexPortal: BAe, registerZIndexPortalElement: VAe, unregisterZIndexPortalElement: HAe } = QQ.actions, UAe = QQ.reducer;
+}), { registerZIndexPortal: UAe, unregisterZIndexPortal: WAe, registerZIndexPortalElement: GAe, unregisterZIndexPortalElement: KAe } = QQ.actions, qAe = QQ.reducer;
//#endregion
//#region node_modules/recharts/es6/zIndex/ZIndexLayer.js
function $Q(e) {
- var { zIndex: t, children: n } = e, r = kCe() && t !== void 0 && t !== 0, i = LU(), a = CB();
- (0, B.useLayoutEffect)(() => r ? (a(zAe({ zIndex: t })), () => {
- a(BAe({ zIndex: t }));
- }) : Tz, [
+ var { zIndex: t, children: n } = e, r = NCe() && t !== void 0 && t !== 0, i = LU(), a = CB();
+ (0, B.useLayoutEffect)(() => r ? (a(UAe({ zIndex: t })), () => {
+ a(WAe({ zIndex: t }));
+ }) : wz, [
a,
t,
r
]);
- var o = Q((e) => jAe(e, t, i));
+ var o = Q((e) => FAe(e, t, i));
return r ? o ? /*#__PURE__*/ (0, Dt.createPortal)(n, o) : null : n;
}
//#endregion
@@ -61619,26 +61851,26 @@ function n$(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? t$(Object(n), !0).forEach(function(t) {
- WAe(e, t, n[t]);
+ JAe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : t$(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function WAe(e, t, n) {
- return (t = GAe(t)) in e ? Object.defineProperty(e, t, {
+function JAe(e, t, n) {
+ return (t = YAe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function GAe(e) {
- var t = KAe(e, "string");
+function YAe(e) {
+ var t = XAe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function KAe(e, t) {
+function XAe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -61648,17 +61880,17 @@ function KAe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function qAe(e) {
+function ZAe(e) {
var { cursor: t, cursorComp: n, cursorProps: r } = e;
return /*#__PURE__*/ (0, B.isValidElement)(t) ? /*#__PURE__*/ (0, B.cloneElement)(t, r) : /*#__PURE__*/ (0, B.createElement)(n, r);
}
-function JAe(e) {
+function QAe(e) {
var { coordinate: t, payload: n, index: r, offset: i, tooltipAxisBandSize: a, layout: o, cursor: s, tooltipEventType: c, chartName: l } = e, u = t, d = n, f = r;
if (!s || !u || l !== "ScatterChart" && c !== "axis") return null;
var p, m, h;
- if (l === "ScatterChart") p = u, m = qwe, h = RK.cursorLine;
- else if (l === "BarChart") p = Jwe(o, u, i, a), m = QG, h = RK.cursorRectangle;
- else if (o === "radial" && jz(u)) {
+ if (l === "ScatterChart") p = u, m = Zwe, h = RK.cursorLine;
+ else if (l === "BarChart") p = Qwe(o, u, i, a), m = QG, h = RK.cursorRectangle;
+ else if (o === "radial" && Az(u)) {
var { cx: g, cy: _, radius: v, startAngle: y, endAngle: b } = iK(u);
p = {
cx: g,
@@ -61668,24 +61900,24 @@ function JAe(e) {
innerRadius: v,
outerRadius: v
}, m = lK, h = RK.cursorLine;
- } else p = { points: eEe(o, u, i) }, m = TG, h = RK.cursorLine;
+ } else p = { points: iEe(o, u, i) }, m = TG, h = RK.cursorLine;
var x = typeof s == "object" && "className" in s ? s.className : void 0, S = n$(n$(n$(n$({
stroke: "#ccc",
pointerEvents: "none"
- }, i), p), oR(s)), {}, {
+ }, i), p), aR(s)), {}, {
payload: d,
payloadIndex: f,
className: Jr("recharts-tooltip-cursor", x)
});
- return /*#__PURE__*/ B.createElement($Q, { zIndex: e.zIndex ?? h }, /*#__PURE__*/ B.createElement(qAe, {
+ return /*#__PURE__*/ B.createElement($Q, { zIndex: e.zIndex ?? h }, /*#__PURE__*/ B.createElement(ZAe, {
cursor: s,
cursorComp: m,
cursorProps: S
}));
}
-function YAe(e) {
- var t = gAe(), n = QU(), r = nW(), i = VQ();
- return t == null || n == null || r == null || i == null ? null : /*#__PURE__*/ B.createElement(JAe, e$({}, e, {
+function $Ae(e) {
+ var t = bAe(), n = QU(), r = nW(), i = VQ();
+ return t == null || n == null || r == null || i == null ? null : /*#__PURE__*/ B.createElement(QAe, e$({}, e, {
offset: n,
layout: r,
tooltipAxisBandSize: t,
@@ -61694,7 +61926,7 @@ function YAe(e) {
}
//#endregion
//#region node_modules/recharts/es6/context/tooltipPortalContext.js
-var r$ = /*#__PURE__*/ (0, B.createContext)(null), XAe = () => (0, B.useContext)(r$), ZAe = (/* @__PURE__ */ vt((/* @__PURE__ */ mt(((e, t) => {
+var r$ = /*#__PURE__*/ (0, B.createContext)(null), eje = () => (0, B.useContext)(r$), tje = (/* @__PURE__ */ vt((/* @__PURE__ */ mt(((e, t) => {
var n = Object.prototype.hasOwnProperty, r = "~";
function i() {}
Object.create && (i.prototype = Object.create(null), new i().__proto__ || (r = !1));
@@ -61781,10 +62013,10 @@ var r$ = /*#__PURE__*/ (0, B.createContext)(null), XAe = () => (0, B.useContext)
var t;
return e ? (t = r ? r + e : e, this._events[t] && s(this, t)) : (this._events = new i(), this._eventsCount = 0), this;
}, c.prototype.off = c.prototype.removeListener, c.prototype.addListener = c.prototype.on, c.prefixed = r, c.EventEmitter = c, t !== void 0 && (t.exports = c);
-})))(), 1)).default, i$ = new ZAe(), a$ = "recharts.syncEvent.tooltip", o$ = "recharts.syncEvent.brush", s$ = (e, t) => {
+})))(), 1)).default, i$ = new tje(), a$ = "recharts.syncEvent.tooltip", o$ = "recharts.syncEvent.brush", s$ = (e, t) => {
if (t && Array.isArray(e)) {
var n = Number.parseInt(t, 10);
- if (!mz(n)) return e[n];
+ if (!pz(n)) return e[n];
}
}, c$ = FH({
name: "options",
@@ -61797,10 +62029,10 @@ var r$ = /*#__PURE__*/ (0, B.createContext)(null), XAe = () => (0, B.useContext)
reducers: { createEventEmitter: (e) => {
e.eventEmitter ??= Symbol("rechartsEventEmitter");
} }
-}), QAe = c$.reducer, { createEventEmitter: $Ae } = c$.actions;
+}), nje = c$.reducer, { createEventEmitter: rje } = c$.actions;
//#endregion
//#region node_modules/recharts/es6/synchronisation/syncSelectors.js
-function eje(e) {
+function ije(e) {
return e.tooltip.syncInteraction;
}
var l$ = FH({
@@ -61827,7 +62059,7 @@ var l$ = FH({
n != null && (e.dataStartIndex = n), r != null && (e.dataEndIndex = r);
}
}
-}), { setChartData: u$, setDataStartEndIndexes: tje, setComputedData: nje } = l$.actions, rje = l$.reducer, ije = ["x", "y"];
+}), { setChartData: u$, setDataStartEndIndexes: aje, setComputedData: oje } = l$.actions, sje = l$.reducer, cje = ["x", "y"];
function d$(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
@@ -61842,26 +62074,26 @@ function f$(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? d$(Object(n), !0).forEach(function(t) {
- aje(e, t, n[t]);
+ lje(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : d$(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function aje(e, t, n) {
- return (t = oje(t)) in e ? Object.defineProperty(e, t, {
+function lje(e, t, n) {
+ return (t = uje(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function oje(e) {
- var t = sje(e, "string");
+function uje(e) {
+ var t = dje(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function sje(e, t) {
+function dje(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -61871,16 +62103,16 @@ function sje(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function cje(e, t) {
+function fje(e, t) {
if (e == null) return {};
- var n, r, i = lje(e, t);
+ var n, r, i = pje(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function lje(e, t) {
+function pje(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -61889,16 +62121,16 @@ function lje(e, t) {
}
return n;
}
-function uje() {
+function mje() {
var e = Q(FK), t = Q(LK), n = CB(), r = Q(IK), i = Q(DQ), a = nW(), o = ZU(), s = Q((e) => e.rootProps.className);
(0, B.useEffect)(() => {
- if (e == null) return Tz;
+ if (e == null) return wz;
var s = (s, c, l) => {
if (t !== l && e === s) {
if (r === "index") {
var u;
if (o && c != null && (u = c.payload) != null && u.coordinate && c.payload.sourceViewBox) {
- var d = c.payload.coordinate, { x: f, y: p } = d, m = cje(d, ije), { x: h, y: g, width: _, height: v } = c.payload.sourceViewBox, y = f$(f$({}, m), {}, {
+ var d = c.payload.coordinate, { x: f, y: p } = d, m = fje(d, cje), { x: h, y: g, width: _, height: v } = c.payload.sourceViewBox, y = f$(f$({}, m), {}, {
x: o.x + (_ ? (f - h) / _ : 0) * o.width,
y: o.y + (v ? (p - g) / v : 0) * o.height
});
@@ -61959,12 +62191,12 @@ function uje() {
o
]);
}
-function dje() {
+function hje() {
var e = Q(FK), t = Q(LK), n = CB();
(0, B.useEffect)(() => {
- if (e == null) return Tz;
+ if (e == null) return wz;
var r = (r, i, a) => {
- t !== a && e === r && n(tje(i));
+ t !== a && e === r && n(aje(i));
};
return i$.on(o$, r), () => {
i$.off(o$, r);
@@ -61975,14 +62207,14 @@ function dje() {
e
]);
}
-function fje() {
+function gje() {
var e = CB();
(0, B.useEffect)(() => {
- e($Ae());
- }, [e]), uje(), dje();
+ e(rje());
+ }, [e]), mje(), hje();
}
-function pje(e, t, n, r, i, a) {
- var o = Q((n) => wAe(n, e, t)), s = Q(cAe), c = Q(LK), l = Q(FK), u = Q(IK), d = Q(eje)?.active, f = ZU();
+function _je(e, t, n, r, i, a) {
+ var o = Q((n) => OAe(n, e, t)), s = Q(fAe), c = Q(LK), l = Q(FK), u = Q(IK), d = Q(ije)?.active, f = ZU();
(0, B.useEffect)(() => {
if (!d && l != null && c != null) {
var e = rQ({
@@ -62026,26 +62258,26 @@ function m$(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? p$(Object(n), !0).forEach(function(t) {
- mje(e, t, n[t]);
+ vje(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : p$(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function mje(e, t, n) {
- return (t = hje(t)) in e ? Object.defineProperty(e, t, {
+function vje(e, t, n) {
+ return (t = yje(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function hje(e) {
- var t = gje(e, "string");
+function yje(e) {
+ var t = bje(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function gje(e, t) {
+function bje(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -62055,13 +62287,13 @@ function gje(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function _je(e) {
+function xje(e) {
return e.dataKey;
}
-function vje(e, t) {
- return /*#__PURE__*/ B.isValidElement(e) ? /*#__PURE__*/ B.cloneElement(e, t) : typeof e == "function" ? /*#__PURE__*/ B.createElement(e, t) : /*#__PURE__*/ B.createElement(Cwe, t);
+function Sje(e, t) {
+ return /*#__PURE__*/ B.isValidElement(e) ? /*#__PURE__*/ B.cloneElement(e, t) : typeof e == "function" ? /*#__PURE__*/ B.createElement(e, t) : /*#__PURE__*/ B.createElement(Dwe, t);
}
-var h$ = [], yje = {
+var h$ = [], Cje = {
allowEscapeViewBox: {
x: !1,
y: !1
@@ -62087,10 +62319,10 @@ var h$ = [], yje = {
useTranslate3d: !1,
wrapperStyle: {}
};
-function bje(e) {
- var t = Fz(e, yje), { active: n, allowEscapeViewBox: r, animationDuration: i, animationEasing: a, content: o, filterNull: s, isAnimationActive: c, offset: l, payloadUniqBy: u, position: d, reverseDirection: f, useTranslate3d: p, wrapperStyle: m, cursor: h, shared: g, trigger: _, defaultIndex: v, portal: y, axisId: b } = t, x = CB(), S = typeof v == "number" ? String(v) : v;
+function wje(e) {
+ var t = Pz(e, Cje), { active: n, allowEscapeViewBox: r, animationDuration: i, animationEasing: a, content: o, filterNull: s, isAnimationActive: c, offset: l, payloadUniqBy: u, position: d, reverseDirection: f, useTranslate3d: p, wrapperStyle: m, cursor: h, shared: g, trigger: _, defaultIndex: v, portal: y, axisId: b } = t, x = CB(), S = typeof v == "number" ? String(v) : v;
(0, B.useEffect)(() => {
- x(Pke({
+ x(Rke({
shared: g,
trigger: _,
axisId: b,
@@ -62105,12 +62337,12 @@ function bje(e) {
n,
S
]);
- var C = ZU(), w = hG(), T = kke(g), { activeIndex: E, isActive: D } = Q((e) => DAe(e, T, _, S)) ?? {}, O = Q((e) => EAe(e, T, _, S)), k = Q((e) => YQ(e, T, _, S)), A = Q((e) => TAe(e, T, _, S)), j = O, M = XAe(), N = n ?? D ?? !1, [ee, te] = tV([j, N]), P = T === "axis" ? k : void 0;
- pje(T, _, A, P, E, N);
+ var C = ZU(), w = hG(), T = Nke(g), { activeIndex: E, isActive: D } = Q((e) => jAe(e, T, _, S)) ?? {}, O = Q((e) => AAe(e, T, _, S)), k = Q((e) => YQ(e, T, _, S)), A = Q((e) => kAe(e, T, _, S)), j = O, M = eje(), N = n ?? D ?? !1, [ee, te] = tV([j, N]), P = T === "axis" ? k : void 0;
+ _je(T, _, A, P, E, N);
var F = y ?? M;
if (F == null || C == null || T == null) return null;
var ne = j ?? h$;
- N || (ne = h$), s && ne.length && (ne = _B(ne.filter((e) => e.value != null && (e.hide !== !0 || t.includeHidden)), u, _je));
+ N || (ne = h$), s && ne.length && (ne = _B(ne.filter((e) => e.value != null && (e.hide !== !0 || t.includeHidden)), u, xje));
var I = ne.length > 0, re = m$(m$({}, t), {}, {
payload: ne,
label: P,
@@ -62118,7 +62350,7 @@ function bje(e) {
activeIndex: E,
coordinate: A,
accessibilityLayer: w
- }), L = /*#__PURE__*/ B.createElement(Nwe, {
+ }), L = /*#__PURE__*/ B.createElement(Lwe, {
allowEscapeViewBox: r,
animationDuration: i,
animationEasing: a,
@@ -62135,8 +62367,8 @@ function bje(e) {
lastBoundingBox: ee,
innerRef: te,
hasPortalFromProps: !!y
- }, vje(o, re));
- return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ (0, Dt.createPortal)(L, F), N && /*#__PURE__*/ B.createElement(YAe, {
+ }, Sje(o, re));
+ return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ (0, Dt.createPortal)(L, F), N && /*#__PURE__*/ B.createElement($Ae, {
cursor: h,
tooltipEventType: T,
coordinate: A,
@@ -62150,19 +62382,19 @@ var g$ = (e) => null;
g$.displayName = "Cell";
//#endregion
//#region node_modules/recharts/es6/util/LRUCache.js
-function xje(e, t, n) {
- return (t = Sje(t)) in e ? Object.defineProperty(e, t, {
+function Tje(e, t, n) {
+ return (t = Eje(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function Sje(e) {
- var t = Cje(e, "string");
+function Eje(e) {
+ var t = Dje(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function Cje(e, t) {
+function Dje(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -62172,9 +62404,9 @@ function Cje(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var wje = class {
+var Oje = class {
constructor(e) {
- xje(this, "cache", /* @__PURE__ */ new Map()), this.maxSize = e;
+ Tje(this, "cache", /* @__PURE__ */ new Map()), this.maxSize = e;
}
get(e) {
var t = this.cache.get(e);
@@ -62207,30 +62439,30 @@ function _$(e, t) {
}
return n;
}
-function Tje(e) {
+function kje(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? _$(Object(n), !0).forEach(function(t) {
- Eje(e, t, n[t]);
+ Aje(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : _$(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function Eje(e, t, n) {
- return (t = Dje(t)) in e ? Object.defineProperty(e, t, {
+function Aje(e, t, n) {
+ return (t = jje(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function Dje(e) {
- var t = Oje(e, "string");
+function jje(e) {
+ var t = Mje(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function Oje(e, t) {
+function Mje(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -62240,10 +62472,10 @@ function Oje(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var v$ = Tje({}, {
+var v$ = kje({}, {
cacheSize: 2e3,
enableCache: !0
-}), y$ = new wje(v$.cacheSize), kje = {
+}), y$ = new Oje(v$.cacheSize), Nje = {
position: "absolute",
top: "-20000px",
left: 0,
@@ -62252,13 +62484,13 @@ var v$ = Tje({}, {
border: "none",
whiteSpace: "pre"
}, b$ = "recharts_measurement_span";
-function Aje(e, t) {
+function Pje(e, t) {
return `${e}|${t.fontSize || ""}|${t.fontFamily || ""}|${t.fontWeight || ""}|${t.fontStyle || ""}|${t.letterSpacing || ""}|${t.textTransform || ""}`;
}
var x$ = (e, t) => {
try {
var n = document.getElementById(b$);
- n || (n = document.createElement("span"), n.setAttribute("id", b$), n.setAttribute("aria-hidden", "true"), document.body.appendChild(n)), Object.assign(n.style, kje, t), n.textContent = `${e}`;
+ n || (n = document.createElement("span"), n.setAttribute("id", b$), n.setAttribute("aria-hidden", "true"), document.body.appendChild(n)), Object.assign(n.style, Nje, t), n.textContent = `${e}`;
var r = n.getBoundingClientRect();
return {
width: r.width,
@@ -62277,24 +62509,24 @@ var x$ = (e, t) => {
height: 0
};
if (!v$.enableCache) return x$(e, t);
- var n = Aje(e, t), r = y$.get(n);
+ var n = Pje(e, t), r = y$.get(n);
if (r) return r;
var i = x$(e, t);
return y$.set(n, i), i;
}, C$;
-function jje(e, t, n) {
- return (t = Mje(t)) in e ? Object.defineProperty(e, t, {
+function Fje(e, t, n) {
+ return (t = Ije(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function Mje(e) {
- var t = Nje(e, "string");
+function Ije(e) {
+ var t = Lje(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function Nje(e, t) {
+function Lje(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -62304,7 +62536,7 @@ function Nje(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var w$ = /(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/, T$ = /(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/, Pje = /^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/, Fje = /(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/, Ije = {
+var w$ = /(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/, T$ = /(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/, Rje = /^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/, zje = /(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/, Bje = {
cm: 96 / 2.54,
mm: 96 / 25.4,
pt: 96 / 72,
@@ -62312,7 +62544,7 @@ var w$ = /(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/, T$ = /(
in: 96,
Q: 96 / 101.6,
px: 1
-}, Lje = [
+}, Vje = [
"cm",
"mm",
"pt",
@@ -62321,20 +62553,20 @@ var w$ = /(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/, T$ = /(
"Q",
"px"
];
-function Rje(e) {
- return Lje.includes(e);
+function Hje(e) {
+ return Vje.includes(e);
}
var E$ = "NaN";
-function zje(e, t) {
- return e * Ije[t];
+function Uje(e, t) {
+ return e * Bje[t];
}
var D$ = class e {
static parse(t) {
- var [, n, r] = Fje.exec(t) ?? [];
+ var [, n, r] = zje.exec(t) ?? [];
return n == null ? e.NaN : new e(parseFloat(n), r ?? "");
}
constructor(e, t) {
- this.num = e, this.unit = t, this.num = e, this.unit = t, mz(e) && (this.unit = ""), t !== "" && !Pje.test(t) && (this.num = NaN, this.unit = ""), Rje(t) && (this.num = zje(e, t), this.unit = "px");
+ this.num = e, this.unit = t, this.num = e, this.unit = t, pz(e) && (this.unit = ""), t !== "" && !Rje.test(t) && (this.num = NaN, this.unit = ""), Hje(t) && (this.num = Uje(e, t), this.unit = "px");
}
add(t) {
return this.unit === t.unit ? new e(this.num + t.num, this.unit) : new e(NaN, "");
@@ -62352,10 +62584,10 @@ var D$ = class e {
return `${this.num}${this.unit}`;
}
isNaN() {
- return mz(this.num);
+ return pz(this.num);
}
};
-C$ = D$, jje(D$, "NaN", new C$(NaN, ""));
+C$ = D$, Fje(D$, "NaN", new C$(NaN, ""));
function O$(e) {
if (e == null || e.includes(E$)) return E$;
for (var t = e; t.includes("*") || t.includes("/");) {
@@ -62371,31 +62603,31 @@ function O$(e) {
return t;
}
var k$ = /\(([^()]*)\)/;
-function Bje(e) {
+function Wje(e) {
for (var t = e, n; (n = k$.exec(t)) != null;) {
var [, r] = n;
t = t.replace(k$, O$(r));
}
return t;
}
-function Vje(e) {
+function Gje(e) {
var t = e.replace(/\s+/g, "");
- return t = Bje(t), t = O$(t), t;
+ return t = Wje(t), t = O$(t), t;
}
-function Hje(e) {
+function Kje(e) {
try {
- return Vje(e);
+ return Gje(e);
} catch {
return E$;
}
}
function A$(e) {
- var t = Hje(e.slice(5, -1));
+ var t = Kje(e.slice(5, -1));
return t === E$ ? "" : t;
}
//#endregion
//#region node_modules/recharts/es6/component/Text.js
-var Uje = [
+var qje = [
"x",
"y",
"lineHeight",
@@ -62404,7 +62636,7 @@ var Uje = [
"scaleToFit",
"textAnchor",
"verticalAnchor"
-], Wje = [
+], Jje = [
"dx",
"dy",
"angle",
@@ -62422,14 +62654,14 @@ function j$() {
}
function M$(e, t) {
if (e == null) return {};
- var n, r, i = Gje(e, t);
+ var n, r, i = Yje(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function Gje(e, t) {
+function Yje(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -62442,7 +62674,7 @@ var N$ = /[ \f\n\r\t\v\u2028\u2029]+/, P$ = (e) => {
var { children: t, breakAll: n, style: r } = e;
try {
var i = [];
- return Sz(t) || (i = n ? t.toString().split("") : t.toString().split(N$)), {
+ return xz(t) || (i = n ? t.toString().split("") : t.toString().split(N$)), {
wordsWithComputedWidth: i.map((e) => ({
word: e,
width: S$(e, r).width
@@ -62456,8 +62688,8 @@ var N$ = /[ \f\n\r\t\v\u2028\u2029]+/, P$ = (e) => {
function F$(e) {
return e === "start" || e === "middle" || e === "end" || e === "inherit";
}
-function Kje(e) {
- return Sz(e) || typeof e == "string" || typeof e == "number" || typeof e == "boolean";
+function Xje(e) {
+ return xz(e) || typeof e == "string" || typeof e == "number" || typeof e == "boolean";
}
var I$ = (e, t, n, r) => e.reduce((e, i) => {
var { word: a, width: o } = i, s = e[e.length - 1];
@@ -62470,16 +62702,16 @@ var I$ = (e, t, n, r) => e.reduce((e, i) => {
e.push(c);
}
return e;
-}, []), L$ = (e) => e.reduce((e, t) => e.width > t.width ? e : t), qje = "…", R$ = (e, t, n, r, i, a, o, s) => {
+}, []), L$ = (e) => e.reduce((e, t) => e.width > t.width ? e : t), Zje = "…", R$ = (e, t, n, r, i, a, o, s) => {
var c = P$({
breakAll: n,
style: r,
- children: e.slice(0, t) + qje
+ children: e.slice(0, t) + Zje
});
if (!c) return [!1, []];
var l = I$(c.wordsWithComputedWidth, a, o, s);
return [l.length > i || L$(l).width > Number(a), l];
-}, Jje = (e, t, n, r, i) => {
+}, Qje = (e, t, n, r, i) => {
var { maxLines: a, children: o, style: s, breakAll: c } = e, l = Z(a), u = String(o), d = I$(t, r, n, i);
if (!l || i || !(d.length > a || L$(d).width > Number(r))) return d;
for (var f = 0, p = u.length - 1, m = 0, h; f <= p && m <= u.length - 1;) {
@@ -62492,9 +62724,9 @@ var I$ = (e, t, n, r) => e.reduce((e, i) => {
}
return h || d;
}, z$ = (e) => [{
- words: Sz(e) ? [] : e.toString().split(N$),
+ words: xz(e) ? [] : e.toString().split(N$),
width: void 0
-}], Yje = (e) => {
+}], $je = (e) => {
var { width: t, scaleToFit: n, children: r, style: i, breakAll: a, maxLines: o } = e;
if ((t || n) && !dG.isSsr) {
var s, c, l = P$({
@@ -62506,7 +62738,7 @@ var I$ = (e, t, n, r) => e.reduce((e, i) => {
var { wordsWithComputedWidth: u, spaceWidth: d } = l;
s = u, c = d;
} else return z$(r);
- return Jje({
+ return Qje({
breakAll: a,
children: r,
maxLines: o,
@@ -62514,7 +62746,7 @@ var I$ = (e, t, n, r) => e.reduce((e, i) => {
}, s, c, t, !!n);
}
return z$(r);
-}, B$ = "#808080", Xje = {
+}, B$ = "#808080", eMe = {
angle: 0,
breakAll: !1,
capHeight: "0.71em",
@@ -62526,7 +62758,7 @@ var I$ = (e, t, n, r) => e.reduce((e, i) => {
x: 0,
y: 0
}, V$ = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
- var n = Fz(e, Xje), { x: r, y: i, lineHeight: a, capHeight: o, fill: s, scaleToFit: c, textAnchor: l, verticalAnchor: u } = n, d = M$(n, Uje), f = (0, B.useMemo)(() => Yje({
+ var n = Pz(e, eMe), { x: r, y: i, lineHeight: a, capHeight: o, fill: s, scaleToFit: c, textAnchor: l, verticalAnchor: u } = n, d = M$(n, qje), f = (0, B.useMemo)(() => $je({
breakAll: d.breakAll,
children: d.children,
maxLines: d.maxLines,
@@ -62540,8 +62772,8 @@ var I$ = (e, t, n, r) => e.reduce((e, i) => {
c,
d.style,
d.width
- ]), { dx: p, dy: m, angle: h, className: g, breakAll: _ } = d, v = M$(d, Wje);
- if (!gz(r) || !gz(i) || f.length === 0) return null;
+ ]), { dx: p, dy: m, angle: h, className: g, breakAll: _ } = d, v = M$(d, Jje);
+ if (!hz(r) || !hz(i) || f.length === 0) return null;
var y = Number(r) + (Z(p) ? p : 0), b = Number(i) + (Z(m) ? m : 0);
if (!uU(y) || !uU(b)) return null;
var x;
@@ -62559,7 +62791,7 @@ var I$ = (e, t, n, r) => e.reduce((e, i) => {
var w = C.width, { width: T } = d;
S.push(`scale(${Z(T) && Z(w) ? T / w : 1})`);
}
- return h && S.push(`rotate(${h}, ${y}, ${b})`), S.length && (v.transform = S.join(" ")), /*#__PURE__*/ B.createElement("text", j$({}, sR(v), {
+ return h && S.push(`rotate(${h}, ${y}, ${b})`), S.length && (v.transform = S.join(" ")), /*#__PURE__*/ B.createElement("text", j$({}, oR(v), {
ref: t,
x: y,
y: b,
@@ -62592,26 +62824,26 @@ function U$(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? H$(Object(n), !0).forEach(function(t) {
- Zje(e, t, n[t]);
+ tMe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : H$(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function Zje(e, t, n) {
- return (t = Qje(t)) in e ? Object.defineProperty(e, t, {
+function tMe(e, t, n) {
+ return (t = nMe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function Qje(e) {
- var t = $je(e, "string");
+function nMe(e) {
+ var t = rMe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function $je(e, t) {
+function rMe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -62621,7 +62853,7 @@ function $je(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var eMe = (e) => {
+var iMe = (e) => {
var { viewBox: t, position: n, offset: r = 0, parentViewBox: i, clamp: a } = e, { x: o, y: s, height: c, upperWidth: l, lowerWidth: u } = XU(t), d = o, f = o + (l - u) / 2, p = (d + f) / 2, m = (l + u) / 2, h = d + l / 2, g = c >= 0 ? 1 : -1, _ = g * r, v = g > 0 ? "end" : "start", y = g > 0 ? "start" : "end", b = l >= 0 ? 1 : -1, x = b * r, S = b > 0 ? "end" : "start", C = b > 0 ? "start" : "end", w = i;
if (n === "top") {
var T = {
@@ -62703,9 +62935,9 @@ var eMe = (e) => {
y: s + c - _,
horizontalAnchor: S,
verticalAnchor: v
- }, k) : n && typeof n == "object" && (Z(n.x) || hz(n.x)) && (Z(n.y) || hz(n.y)) ? U$({
- x: o + vz(n.x, m),
- y: s + vz(n.y, c),
+ }, k) : n && typeof n == "object" && (Z(n.x) || mz(n.x)) && (Z(n.y) || mz(n.y)) ? U$({
+ x: o + _z(n.x, m),
+ y: s + _z(n.y, c),
horizontalAnchor: "end",
verticalAnchor: "end"
}, k) : U$({
@@ -62714,17 +62946,17 @@ var eMe = (e) => {
horizontalAnchor: "middle",
verticalAnchor: "middle"
}, k);
-}, tMe = ["labelRef"], nMe = ["content"];
+}, aMe = ["labelRef"], oMe = ["content"];
function W$(e, t) {
if (e == null) return {};
- var n, r, i = rMe(e, t);
+ var n, r, i = sMe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function rMe(e, t) {
+function sMe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -62747,26 +62979,26 @@ function K$(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? G$(Object(n), !0).forEach(function(t) {
- iMe(e, t, n[t]);
+ cMe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : G$(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function iMe(e, t, n) {
- return (t = aMe(t)) in e ? Object.defineProperty(e, t, {
+function cMe(e, t, n) {
+ return (t = lMe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function aMe(e) {
- var t = oMe(e, "string");
+function lMe(e) {
+ var t = uMe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function oMe(e, t) {
+function uMe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -62805,7 +63037,7 @@ var J$ = /*#__PURE__*/ (0, B.createContext)(null), Y$ = (e) => {
}, X$ = () => {
var e = (0, B.useContext)(J$), t = ZU();
return e || (t ? XU(t) : void 0);
-}, Z$ = /*#__PURE__*/ (0, B.createContext)(null), sMe = (e) => {
+}, Z$ = /*#__PURE__*/ (0, B.createContext)(null), dMe = (e) => {
var { cx: t, cy: n, innerRadius: r, outerRadius: i, startAngle: a, endAngle: o, clockWise: s, children: c } = e, l = (0, B.useMemo)(() => ({
cx: t,
cy: n,
@@ -62827,11 +63059,11 @@ var J$ = /*#__PURE__*/ (0, B.createContext)(null), Y$ = (e) => {
}, Q$ = () => {
var e = (0, B.useContext)(Z$), t = Q(tq);
return e || t;
-}, cMe = (e) => {
- var { value: t, formatter: n } = e, r = Sz(e.children) ? t : e.children;
+}, fMe = (e) => {
+ var { value: t, formatter: n } = e, r = xz(e.children) ? t : e.children;
return typeof n == "function" ? n(r) : r;
-}, $$ = (e) => e != null && typeof e == "function", lMe = (e, t) => pz(t - e) * Math.min(Math.abs(t - e), 360), uMe = (e, t, n, r, i) => {
- var { offset: a, className: o } = e, { cx: s, cy: c, innerRadius: l, outerRadius: u, startAngle: d, endAngle: f, clockWise: p } = i, m = (l + u) / 2, h = lMe(d, f), g = h >= 0 ? 1 : -1, _, v;
+}, $$ = (e) => e != null && typeof e == "function", pMe = (e, t) => fz(t - e) * Math.min(Math.abs(t - e), 360), mMe = (e, t, n, r, i) => {
+ var { offset: a, className: o } = e, { cx: s, cy: c, innerRadius: l, outerRadius: u, startAngle: d, endAngle: f, clockWise: p } = i, m = (l + u) / 2, h = pMe(d, f), g = h >= 0 ? 1 : -1, _, v;
switch (t) {
case "insideStart":
_ = d + g * a, v = p;
@@ -62847,7 +63079,7 @@ var J$ = /*#__PURE__*/ (0, B.createContext)(null), Y$ = (e) => {
v = h <= 0 ? v : !v;
var y = rK(s, c, m, _), b = rK(s, c, m, _ + (v ? 1 : -1) * 359), x = `M${y.x},${y.y}
A${m},${m},0,1,${+!v},
- ${b.x},${b.y}`, S = Sz(e.id) ? _z("recharts-radial-line-") : e.id;
+ ${b.x},${b.y}`, S = xz(e.id) ? gz("recharts-radial-line-") : e.id;
return /*#__PURE__*/ B.createElement("text", q$({}, r, {
dominantBaseline: "central",
className: Jr("recharts-radial-bar-label", o)
@@ -62855,7 +63087,7 @@ var J$ = /*#__PURE__*/ (0, B.createContext)(null), Y$ = (e) => {
id: S,
d: x
})), /*#__PURE__*/ B.createElement("textPath", { xlinkHref: `#${S}` }, n));
-}, dMe = (e, t, n) => {
+}, hMe = (e, t, n) => {
var { cx: r, cy: i, innerRadius: a, outerRadius: o, startAngle: s, endAngle: c } = e, l = (s + c) / 2;
if (n === "outside") {
var { x: u, y: d } = rK(r, i, o + t, l);
@@ -62891,14 +63123,14 @@ var J$ = /*#__PURE__*/ (0, B.createContext)(null), Y$ = (e) => {
textAnchor: "middle",
verticalAnchor: "middle"
};
-}, e1 = (e) => e != null && "cx" in e && Z(e.cx), fMe = {
+}, e1 = (e) => e != null && "cx" in e && Z(e.cx), gMe = {
angle: 0,
offset: 5,
zIndex: RK.label,
position: "middle",
textBreakAll: !1
};
-function pMe(e) {
+function _Me(e) {
if (!e1(e)) return e;
var { cx: t, cy: n, outerRadius: r } = e, i = r * 2;
return {
@@ -62911,24 +63143,24 @@ function pMe(e) {
};
}
function t1(e) {
- var t = Fz(e, fMe), { viewBox: n, parentViewBox: r, position: i, value: a, children: o, content: s, className: c = "", textBreakAll: l, labelRef: u } = t, d = Q$(), f = X$(), p = n == null ? i === "center" ? f : d ?? f : e1(n) ? n : XU(n), m, h, g = pMe(p);
- if (!p || Sz(a) && Sz(o) && !/*#__PURE__*/ (0, B.isValidElement)(s) && typeof s != "function") return null;
+ var t = Pz(e, gMe), { viewBox: n, parentViewBox: r, position: i, value: a, children: o, content: s, className: c = "", textBreakAll: l, labelRef: u } = t, d = Q$(), f = X$(), p = n == null ? i === "center" ? f : d ?? f : e1(n) ? n : XU(n), m, h, g = _Me(p);
+ if (!p || xz(a) && xz(o) && !/*#__PURE__*/ (0, B.isValidElement)(s) && typeof s != "function") return null;
var _ = K$(K$({}, t), {}, { viewBox: p });
if (/*#__PURE__*/ (0, B.isValidElement)(s)) {
- var { labelRef: v } = _, y = W$(_, tMe);
+ var { labelRef: v } = _, y = W$(_, aMe);
return /*#__PURE__*/ (0, B.cloneElement)(s, y);
}
if (typeof s == "function") {
- var { content: b } = _, x = W$(_, nMe);
+ var { content: b } = _, x = W$(_, oMe);
if (m = /*#__PURE__*/ (0, B.createElement)(s, x), /*#__PURE__*/ (0, B.isValidElement)(m)) return m;
- } else m = cMe(t);
- var S = sR(t);
+ } else m = fMe(t);
+ var S = oR(t);
if (e1(p)) {
- if (i === "insideStart" || i === "insideEnd" || i === "end") return uMe(t, i, m, S, p);
- h = dMe(p, t.offset, t.position);
+ if (i === "insideStart" || i === "insideEnd" || i === "end") return mMe(t, i, m, S, p);
+ h = hMe(p, t.offset, t.position);
} else {
if (!g) return null;
- var C = eMe({
+ var C = iMe({
viewBox: g,
position: i,
offset: t.offset,
@@ -62957,7 +63189,7 @@ var n1 = (e, t, n) => {
viewBox: t,
labelRef: n
};
- return e === !0 ? /*#__PURE__*/ B.createElement(t1, q$({ key: "label-implicit" }, r)) : gz(e) ? /*#__PURE__*/ B.createElement(t1, q$({
+ return e === !0 ? /*#__PURE__*/ B.createElement(t1, q$({ key: "label-implicit" }, r)) : hz(e) ? /*#__PURE__*/ B.createElement(t1, q$({
key: "label-implicit",
value: e
}, r)) : /*#__PURE__*/ (0, B.isValidElement)(e) ? e.type === t1 ? /*#__PURE__*/ (0, B.cloneElement)(e, K$({ key: "label-implicit" }, r)) : /*#__PURE__*/ B.createElement(t1, q$({
@@ -62972,13 +63204,13 @@ function r1(e) {
var { label: t, labelRef: n } = e;
return n1(t, X$(), n) || null;
}
-function mMe(e) {
+function vMe(e) {
var { label: t } = e;
return n1(t, Q$()) || null;
}
//#endregion
//#region node_modules/recharts/es6/component/LabelList.js
-var hMe = ["valueAccessor"], gMe = [
+var yMe = ["valueAccessor"], bMe = [
"dataKey",
"clockWise",
"id",
@@ -62996,14 +63228,14 @@ function i1() {
}
function a1(e, t) {
if (e == null) return {};
- var n, r, i = _Me(e, t);
+ var n, r, i = xMe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function _Me(e, t) {
+function xMe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -63012,21 +63244,21 @@ function _Me(e, t) {
}
return n;
}
-var vMe = (e) => {
+var SMe = (e) => {
var t = Array.isArray(e.value) ? e.value[e.value.length - 1] : e.value;
- if (Kje(t)) return t;
-}, o1 = /*#__PURE__*/ (0, B.createContext)(void 0), s1 = o1.Provider, c1 = /*#__PURE__*/ (0, B.createContext)(void 0), yMe = c1.Provider;
-function bMe() {
+ if (Xje(t)) return t;
+}, o1 = /*#__PURE__*/ (0, B.createContext)(void 0), s1 = o1.Provider, c1 = /*#__PURE__*/ (0, B.createContext)(void 0), CMe = c1.Provider;
+function wMe() {
return (0, B.useContext)(o1);
}
-function xMe() {
+function TMe() {
return (0, B.useContext)(c1);
}
function l1(e) {
- var { valueAccessor: t = vMe } = e, n = a1(e, hMe), { dataKey: r, clockWise: i, id: a, textBreakAll: o, zIndex: s } = n, c = a1(n, gMe), l = bMe(), u = xMe(), d = l || u;
- return !d || !d.length ? null : /*#__PURE__*/ B.createElement($Q, { zIndex: s ?? RK.label }, /*#__PURE__*/ B.createElement(dR, { className: "recharts-label-list" }, d.map((e, i) => {
- var s = Sz(r) ? t(e, i) : mU(e.payload, r), l = Sz(a) ? {} : { id: `${a}-${i}` };
- return /*#__PURE__*/ B.createElement(t1, i1({ key: `label-${i}` }, sR(e), c, l, {
+ var { valueAccessor: t = SMe } = e, n = a1(e, yMe), { dataKey: r, clockWise: i, id: a, textBreakAll: o, zIndex: s } = n, c = a1(n, bMe), l = wMe(), u = TMe(), d = l || u;
+ return !d || !d.length ? null : /*#__PURE__*/ B.createElement($Q, { zIndex: s ?? RK.label }, /*#__PURE__*/ B.createElement(uR, { className: "recharts-label-list" }, d.map((e, i) => {
+ var s = xz(r) ? t(e, i) : mU(e.payload, r), l = xz(a) ? {} : { id: `${a}-${i}` };
+ return /*#__PURE__*/ B.createElement(t1, i1({ key: `label-${i}` }, oR(e), c, l, {
fill: n.fill ?? e.fill,
parentViewBox: e.parentViewBox,
value: s,
@@ -63047,12 +63279,12 @@ function u1(e) {
}
//#endregion
//#region node_modules/recharts/es6/shape/Polygon.js
-var SMe = [
+var EMe = [
"points",
"className",
"baseLinePoints",
"connectNulls"
-], CMe;
+], DMe;
function d1() {
return d1 = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
@@ -63062,16 +63294,16 @@ function d1() {
return e;
}, d1.apply(null, arguments);
}
-function wMe(e, t) {
+function OMe(e, t) {
if (e == null) return {};
- var n, r, i = TMe(e, t);
+ var n, r, i = kMe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function TMe(e, t) {
+function kMe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -63080,10 +63312,10 @@ function TMe(e, t) {
}
return n;
}
-function EMe(e, t) {
+function AMe(e, t) {
return t ||= e.slice(0), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } }));
}
-var f1 = (e) => e != null && e.x === +e.x && e.y === +e.y, DMe = function() {
+var f1 = (e) => e != null && e.x === +e.x && e.y === +e.y, jMe = function() {
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = [[]];
e.forEach((e) => {
var n = t[t.length - 1];
@@ -63094,9 +63326,9 @@ var f1 = (e) => e != null && e.x === +e.x && e.y === +e.y, DMe = function() {
var i = t[t.length - 1];
return i && i.length <= 0 && (t = t.slice(0, -1)), t;
}, p1 = (e, t) => {
- var n = DMe(e);
+ var n = jMe(e);
t && (n = [n.reduce((e, t) => [...e, ...t], [])]);
- var r = n.map((e) => e.reduce((e, t, n) => fz(CMe ||= EMe([
+ var r = n.map((e) => e.reduce((e, t, n) => dz(DMe ||= AMe([
"",
"",
"",
@@ -63104,29 +63336,29 @@ var f1 = (e) => e != null && e.x === +e.x && e.y === +e.y, DMe = function() {
""
]), e, n === 0 ? "M" : "L", t.x, t.y), "")).join("");
return n.length === 1 ? `${r}Z` : r;
-}, OMe = (e, t, n) => {
+}, MMe = (e, t, n) => {
var r = p1(e, n);
return `${r.slice(-1) === "Z" ? r.slice(0, -1) : r}L${p1(Array.from(t).reverse(), n).slice(1)}`;
}, m1 = (e) => {
- var { points: t, className: n, baseLinePoints: r, connectNulls: i } = e, a = wMe(e, SMe);
+ var { points: t, className: n, baseLinePoints: r, connectNulls: i } = e, a = OMe(e, EMe);
if (!t || !t.length) return null;
var o = Jr("recharts-polygon", n);
if (r && r.length) {
- var s = a.stroke && a.stroke !== "none", c = OMe(t, r, i);
- return /*#__PURE__*/ B.createElement("g", { className: o }, /*#__PURE__*/ B.createElement("path", d1({}, sR(a), {
+ var s = a.stroke && a.stroke !== "none", c = MMe(t, r, i);
+ return /*#__PURE__*/ B.createElement("g", { className: o }, /*#__PURE__*/ B.createElement("path", d1({}, oR(a), {
fill: c.slice(-1) === "Z" ? a.fill : "none",
stroke: "none",
d: c
- })), s ? /*#__PURE__*/ B.createElement("path", d1({}, sR(a), {
+ })), s ? /*#__PURE__*/ B.createElement("path", d1({}, oR(a), {
fill: "none",
d: p1(t, i)
- })) : null, s ? /*#__PURE__*/ B.createElement("path", d1({}, sR(a), {
+ })) : null, s ? /*#__PURE__*/ B.createElement("path", d1({}, oR(a), {
fill: "none",
d: p1(r, i)
})) : null);
}
var l = p1(t, i);
- return /*#__PURE__*/ B.createElement("path", d1({}, sR(a), {
+ return /*#__PURE__*/ B.createElement("path", d1({}, oR(a), {
fill: l.slice(-1) === "Z" ? a.fill : "none",
className: o,
d: l
@@ -63145,7 +63377,7 @@ function h1() {
}
var g1 = (e) => {
var { cx: t, cy: n, r, className: i } = e, a = Jr("recharts-dot", i);
- return Z(t) && Z(n) && Z(r) ? /*#__PURE__*/ B.createElement("circle", h1({}, aR(e), Mz(e), {
+ return Z(t) && Z(n) && Z(r) ? /*#__PURE__*/ B.createElement("circle", h1({}, iR(e), jz(e), {
className: a,
cx: t,
cy: n,
@@ -63201,7 +63433,7 @@ var x1 = () => void 0, S1 = $([
S1,
LX,
xZ
-], SZ), kMe = $([xZ, $([
+], SZ), NMe = $([xZ, $([
IX,
S1,
C1,
@@ -63214,14 +63446,14 @@ var x1 = () => void 0, S1 = $([
}
}, T1 = (e, t, n) => {
switch (t) {
- case "angleAxis": return cEe(e, n);
- case "radiusAxis": return lEe(e, n);
+ case "angleAxis": return fEe(e, n);
+ case "radiusAxis": return pEe(e, n);
default: throw Error(`Unexpected axis type: ${t}`);
}
}, E1 = $([$([
w1,
xZ,
- kMe,
+ NMe,
T1
], CX)], dq), D1 = $([
tW,
@@ -63238,7 +63470,7 @@ var x1 = () => void 0, S1 = $([
BZ,
D1,
nq
-], HZ), AMe = $([O1], (e) => {
+], HZ), PMe = $([O1], (e) => {
if (e) {
var t = /* @__PURE__ */ new Map();
return e.forEach((e) => {
@@ -63246,7 +63478,7 @@ var x1 = () => void 0, S1 = $([
t.has(n) || t.set(n, e);
}), Array.from(t.values());
}
-}), jMe = $([
+}), FMe = $([
tW,
w1,
E1,
@@ -63254,11 +63486,11 @@ var x1 = () => void 0, S1 = $([
BZ,
D1,
nq
-], WZ), MMe = $([(e, t) => O1(e, "angleAxis", t, !1)], (e) => {
+], WZ), IMe = $([(e, t) => O1(e, "angleAxis", t, !1)], (e) => {
if (e) return e.map((e) => e.coordinate);
-}), NMe = $([(e, t) => O1(e, "radiusAxis", t, !1)], (e) => {
+}), LMe = $([(e, t) => O1(e, "radiusAxis", t, !1)], (e) => {
if (e) return e.map((e) => e.coordinate);
-}), PMe = [
+}), RMe = [
"gridType",
"radialLines",
"angleAxisId",
@@ -63271,16 +63503,16 @@ var x1 = () => void 0, S1 = $([
"polarRadius",
"zIndex"
];
-function FMe(e, t) {
+function zMe(e, t) {
if (e == null) return {};
- var n, r, i = IMe(e, t);
+ var n, r, i = BMe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function IMe(e, t) {
+function BMe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -63312,26 +63544,26 @@ function j1(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? A1(Object(n), !0).forEach(function(t) {
- LMe(e, t, n[t]);
+ VMe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : A1(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function LMe(e, t, n) {
- return (t = RMe(t)) in e ? Object.defineProperty(e, t, {
+function VMe(e, t, n) {
+ return (t = HMe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function RMe(e) {
- var t = zMe(e, "string");
+function HMe(e) {
+ var t = UMe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function zMe(e, t) {
+function UMe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -63341,16 +63573,16 @@ function zMe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var BMe = (e, t, n, r) => {
+var WMe = (e, t, n, r) => {
var i = "";
return r.forEach((r, a) => {
var o = rK(t, n, e, r);
i += a ? `L ${o.x},${o.y}` : `M ${o.x},${o.y}`;
}), i += "Z", i;
-}, VMe = (e) => {
+}, GMe = (e) => {
var { cx: t, cy: n, innerRadius: r, outerRadius: i, polarAngles: a, radialLines: o } = e;
if (!a || !a.length || !o) return null;
- var s = j1({ stroke: "#ccc" }, aR(e));
+ var s = j1({ stroke: "#ccc" }, iR(e));
return /*#__PURE__*/ B.createElement("g", { className: "recharts-polar-grid-angle" }, a.map((e) => {
var a = rK(t, n, r, e), o = rK(t, n, i, e);
return /*#__PURE__*/ B.createElement("line", k1({ key: `line-${e}` }, s, {
@@ -63364,7 +63596,7 @@ var BMe = (e, t, n, r) => {
var { cx: t, cy: n, radius: r } = e, i = j1({
stroke: "#ccc",
fill: "none"
- }, aR(e));
+ }, iR(e));
return /*#__PURE__*/ B.createElement("circle", k1({}, i, {
className: Jr("recharts-polar-grid-concentric-circle", e.className),
cx: t,
@@ -63375,12 +63607,12 @@ var BMe = (e, t, n, r) => {
var { radius: t } = e, n = j1({
stroke: "#ccc",
fill: "none"
- }, aR(e));
+ }, iR(e));
return /*#__PURE__*/ B.createElement("path", k1({}, n, {
className: Jr("recharts-polar-grid-concentric-polygon", e.className),
- d: BMe(t, e.cx, e.cy, e.polarAngles)
+ d: WMe(t, e.cx, e.cy, e.polarAngles)
}));
-}, HMe = (e) => {
+}, KMe = (e) => {
var { polarRadius: t, gridType: n } = e;
if (!t || !t.length) return null;
var r = Math.max(...t), i = e.fill && e.fill !== "none";
@@ -63394,14 +63626,14 @@ var BMe = (e, t, n, r) => {
radius: t
}));
}));
-}, UMe = {
+}, qMe = {
angleAxisId: 0,
radiusAxisId: 0,
gridType: "polygon",
radialLines: !0,
zIndex: RK.grid
}, P1 = (e) => {
- var t = Fz(e, UMe), { gridType: n, radialLines: r, angleAxisId: i, radiusAxisId: a, cx: o, cy: s, innerRadius: c, outerRadius: l, polarAngles: u, polarRadius: d, zIndex: f } = t, p = FMe(t, PMe), m = Q(tq), h = Q((e) => MMe(e, i)), g = Q((e) => NMe(e, a)), _ = Array.isArray(u) ? u : h, v = Array.isArray(d) ? d : g;
+ var t = Pz(e, qMe), { gridType: n, radialLines: r, angleAxisId: i, radiusAxisId: a, cx: o, cy: s, innerRadius: c, outerRadius: l, polarAngles: u, polarRadius: d, zIndex: f } = t, p = zMe(t, RMe), m = Q(tq), h = Q((e) => IMe(e, i)), g = Q((e) => LMe(e, a)), _ = Array.isArray(u) ? u : h, v = Array.isArray(d) ? d : g;
if (_ == null || v == null) return null;
var y = j1({
cx: m?.cx ?? o ?? 0,
@@ -63412,13 +63644,13 @@ var BMe = (e, t, n, r) => {
polarRadius: v,
zIndex: f
}, p), { outerRadius: b } = y;
- return b <= 0 ? null : /*#__PURE__*/ B.createElement($Q, { zIndex: y.zIndex }, /*#__PURE__*/ B.createElement("g", { className: "recharts-polar-grid" }, /*#__PURE__*/ B.createElement(HMe, k1({
+ return b <= 0 ? null : /*#__PURE__*/ B.createElement($Q, { zIndex: y.zIndex }, /*#__PURE__*/ B.createElement("g", { className: "recharts-polar-grid" }, /*#__PURE__*/ B.createElement(KMe, k1({
gridType: n,
radialLines: r
}, y, {
polarAngles: _,
polarRadius: v
- })), /*#__PURE__*/ B.createElement(VMe, k1({
+ })), /*#__PURE__*/ B.createElement(GMe, k1({
gridType: n,
radialLines: r
}, y, {
@@ -63434,7 +63666,7 @@ function F1(e) {
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/math/maxBy.mjs
-function WMe(e, t = Bz) {
+function JMe(e, t = zz) {
if (e == null) return;
let n = F1(e);
if (n.length === 0) return;
@@ -63447,7 +63679,7 @@ function WMe(e, t = Bz) {
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/math/minBy.mjs
-function GMe(e, t = Bz) {
+function YMe(e, t = zz) {
if (e == null) return;
let n = F1(e);
if (n.length === 0) return;
@@ -63480,7 +63712,7 @@ var I1 = FH({
delete e.angleAxis[t.payload.id];
}
}
-}), { addRadiusAxis: KMe, removeRadiusAxis: qMe, addAngleAxis: JMe, removeAngleAxis: YMe } = I1.actions, XMe = I1.reducer;
+}), { addRadiusAxis: XMe, removeRadiusAxis: ZMe, addAngleAxis: QMe, removeAngleAxis: $Me } = I1.actions, eNe = I1.reducer;
//#endregion
//#region node_modules/recharts/es6/util/getClassNameFromUnknown.js
function L1(e) {
@@ -63488,12 +63720,12 @@ function L1(e) {
}
//#endregion
//#region node_modules/recharts/es6/polar/PolarRadiusAxis.js
-var ZMe = ["type"], QMe = [
+var tNe = ["type"], nNe = [
"cx",
"cy",
"angle",
"axisLine"
-], $Me = [
+], rNe = [
"angle",
"tickFormatter",
"stroke",
@@ -63522,26 +63754,26 @@ function B1(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? z1(Object(n), !0).forEach(function(t) {
- eNe(e, t, n[t]);
+ iNe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : z1(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function eNe(e, t, n) {
- return (t = tNe(t)) in e ? Object.defineProperty(e, t, {
+function iNe(e, t, n) {
+ return (t = aNe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function tNe(e) {
- var t = nNe(e, "string");
+function aNe(e) {
+ var t = oNe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function nNe(e, t) {
+function oNe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -63553,14 +63785,14 @@ function nNe(e, t) {
}
function V1(e, t) {
if (e == null) return {};
- var n, r, i = rNe(e, t);
+ var n, r, i = sNe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function rNe(e, t) {
+function sNe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -63569,20 +63801,20 @@ function rNe(e, t) {
}
return n;
}
-var iNe = "radiusAxis";
-function aNe(e) {
+var cNe = "radiusAxis";
+function lNe(e) {
var t = CB(), n = aW(), r = (0, B.useMemo)(() => {
- var { type: t } = e, r = V1(e, ZMe), i = HK(n, "radiusAxis", t);
+ var { type: t } = e, r = V1(e, tNe), i = HK(n, "radiusAxis", t);
if (i != null) return B1(B1({}, r), {}, { type: i });
}, [e, n]);
- return (0, B.useEffect)(() => r == null ? Tz : (t(KMe(r)), () => {
- t(qMe(r));
+ return (0, B.useEffect)(() => r == null ? wz : (t(XMe(r)), () => {
+ t(ZMe(r));
}), [t, r]), null;
}
-var oNe = (e, t, n, r) => {
+var uNe = (e, t, n, r) => {
var { coordinate: i } = e;
return rK(n, r, i, t);
-}, sNe = (e) => {
+}, dNe = (e) => {
var t;
switch (e) {
case "left":
@@ -63594,49 +63826,49 @@ var oNe = (e, t, n, r) => {
default: t = "middle";
}
return t;
-}, cNe = (e, t, n, r) => {
- var i = WMe(r, (e) => e.coordinate || 0);
+}, fNe = (e, t, n, r) => {
+ var i = JMe(r, (e) => e.coordinate || 0);
return {
cx: t,
cy: n,
startAngle: e,
endAngle: e,
- innerRadius: GMe(r, (e) => e.coordinate || 0)?.coordinate || 0,
+ innerRadius: YMe(r, (e) => e.coordinate || 0)?.coordinate || 0,
outerRadius: i?.coordinate || 0,
clockWise: !1
};
-}, lNe = (e, t) => {
- var { cx: n, cy: r, angle: i, axisLine: a } = e, o = V1(e, QMe), s = t.reduce((e, t) => [Math.min(e[0], t.coordinate), Math.max(e[1], t.coordinate)], [Infinity, -Infinity]), c = rK(n, r, s[0], i), l = rK(n, r, s[1], i), u = B1(B1(B1({}, aR(o)), {}, { fill: "none" }, aR(a)), {}, {
+}, pNe = (e, t) => {
+ var { cx: n, cy: r, angle: i, axisLine: a } = e, o = V1(e, nNe), s = t.reduce((e, t) => [Math.min(e[0], t.coordinate), Math.max(e[1], t.coordinate)], [Infinity, -Infinity]), c = rK(n, r, s[0], i), l = rK(n, r, s[1], i), u = B1(B1(B1({}, iR(o)), {}, { fill: "none" }, iR(a)), {}, {
x1: c.x,
y1: c.y,
x2: l.x,
y2: l.y
});
return /*#__PURE__*/ B.createElement("line", R1({ className: "recharts-polar-radius-axis-line" }, u));
-}, uNe = (e, t, n) => /*#__PURE__*/ B.isValidElement(e) ? /*#__PURE__*/ B.cloneElement(e, t) : typeof e == "function" ? e(t) : /*#__PURE__*/ B.createElement(V$, R1({}, t, { className: "recharts-polar-radius-axis-tick-value" }), n), dNe = (e, t) => {
- var { angle: n, tickFormatter: r, stroke: i, tick: a } = e, o = V1(e, $Me), s = sNe(e.orientation), c = aR(o), l = oR(a), u = t.map((t, o) => {
- var u = oNe(t, e.angle, e.cx, e.cy), d = B1(B1(B1(B1({
+}, mNe = (e, t, n) => /*#__PURE__*/ B.isValidElement(e) ? /*#__PURE__*/ B.cloneElement(e, t) : typeof e == "function" ? e(t) : /*#__PURE__*/ B.createElement(V$, R1({}, t, { className: "recharts-polar-radius-axis-tick-value" }), n), hNe = (e, t) => {
+ var { angle: n, tickFormatter: r, stroke: i, tick: a } = e, o = V1(e, rNe), s = dNe(e.orientation), c = iR(o), l = aR(a), u = t.map((t, o) => {
+ var u = uNe(t, e.angle, e.cx, e.cy), d = B1(B1(B1(B1({
textAnchor: s,
transform: `rotate(${90 - n}, ${u.x}, ${u.y})`
}, c), {}, {
stroke: "none",
fill: i
}, l), {}, { index: o }, u), {}, { payload: t });
- return /*#__PURE__*/ B.createElement(dR, R1({
+ return /*#__PURE__*/ B.createElement(uR, R1({
className: Jr("recharts-polar-radius-axis-tick", L1(a)),
key: `tick-${t.coordinate}`
- }, Nz(e, t, o)), uNe(a, d, r ? r(t.value, o) : t.value));
+ }, Mz(e, t, o)), mNe(a, d, r ? r(t.value, o) : t.value));
});
- return /*#__PURE__*/ B.createElement(dR, { className: "recharts-polar-radius-axis-ticks" }, u);
-}, fNe = (e) => {
+ return /*#__PURE__*/ B.createElement(uR, { className: "recharts-polar-radius-axis-ticks" }, u);
+}, gNe = (e) => {
var { radiusAxisId: t } = e, n = Q(tq), r = Q((e) => E1(e, "radiusAxis", t)), i = Q((e) => O1(e, "radiusAxis", t, !1));
if (n == null || !i || !i.length || r == null) return null;
var a = B1(B1({}, e), {}, { scale: r }, n), { tick: o, axisLine: s } = a;
- return /*#__PURE__*/ B.createElement($Q, { zIndex: a.zIndex }, /*#__PURE__*/ B.createElement(dR, { className: Jr("recharts-polar-radius-axis", iNe, a.className) }, s && lNe(a, i), o && dNe(a, i), /*#__PURE__*/ B.createElement(sMe, cNe(a.angle, a.cx, a.cy, i), /*#__PURE__*/ B.createElement(mMe, { label: a.label }), a.children)));
+ return /*#__PURE__*/ B.createElement($Q, { zIndex: a.zIndex }, /*#__PURE__*/ B.createElement(uR, { className: Jr("recharts-polar-radius-axis", cNe, a.className) }, s && pNe(a, i), o && hNe(a, i), /*#__PURE__*/ B.createElement(dMe, fNe(a.angle, a.cx, a.cy, i), /*#__PURE__*/ B.createElement(vMe, { label: a.label }), a.children)));
};
function H1(e) {
- var t = Fz(e, BK);
- return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(aNe, {
+ var t = Pz(e, BK);
+ return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(lNe, {
domain: t.domain,
id: t.radiusAxisId,
scale: t.scale,
@@ -63653,12 +63885,12 @@ function H1(e) {
ticks: t.ticks,
tickCount: t.tickCount,
tick: t.tick
- }), /*#__PURE__*/ B.createElement(fNe, t));
+ }), /*#__PURE__*/ B.createElement(gNe, t));
}
H1.displayName = "PolarRadiusAxis";
//#endregion
//#region node_modules/recharts/es6/polar/PolarAngleAxis.js
-var pNe = ["children", "type"], mNe = ["ref"];
+var _Ne = ["children", "type"], vNe = ["ref"];
function U1() {
return U1 = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
@@ -63682,26 +63914,26 @@ function G1(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? W1(Object(n), !0).forEach(function(t) {
- hNe(e, t, n[t]);
+ yNe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : W1(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function hNe(e, t, n) {
- return (t = gNe(t)) in e ? Object.defineProperty(e, t, {
+function yNe(e, t, n) {
+ return (t = bNe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function gNe(e) {
- var t = _Ne(e, "string");
+function bNe(e) {
+ var t = xNe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function _Ne(e, t) {
+function xNe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -63713,14 +63945,14 @@ function _Ne(e, t) {
}
function K1(e, t) {
if (e == null) return {};
- var n, r, i = vNe(e, t);
+ var n, r, i = SNe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function vNe(e, t) {
+function SNe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -63729,17 +63961,17 @@ function vNe(e, t) {
}
return n;
}
-var q1 = 1e-5, yNe = Math.cos(nK(45)), bNe = "angleAxis";
-function xNe(e) {
+var q1 = 1e-5, CNe = Math.cos(nK(45)), wNe = "angleAxis";
+function TNe(e) {
var t = CB(), n = aW(), r = (0, B.useMemo)(() => {
- var { children: t, type: r } = e, i = K1(e, pNe), a = HK(n, "angleAxis", r);
+ var { children: t, type: r } = e, i = K1(e, _Ne), a = HK(n, "angleAxis", r);
if (a != null) return G1(G1({}, i), {}, { type: a });
}, [e, n]), i = r === Q((e) => qK(e, r?.id));
- return (0, B.useEffect)(() => r == null ? Tz : (t(JMe(r)), () => {
- t(YMe(r));
+ return (0, B.useEffect)(() => r == null ? wz : (t(QMe(r)), () => {
+ t($Me(r));
}), [t, r]), i ? e.children : null;
}
-var SNe = (e, t) => {
+var ENe = (e, t) => {
var { cx: n, cy: r, radius: i, orientation: a, tickSize: o } = t, s = o || 8, c = rK(n, r, i, e.coordinate), l = rK(n, r, i + (a === "inner" ? -1 : 1) * s, e.coordinate);
return {
x1: c.x,
@@ -63747,16 +63979,16 @@ var SNe = (e, t) => {
x2: l.x,
y2: l.y
};
-}, CNe = (e, t) => {
+}, DNe = (e, t) => {
var n = Math.cos(nK(-e.coordinate));
return n > q1 ? t === "outer" ? "start" : "end" : n < -q1 ? t === "outer" ? "end" : "start" : "middle";
-}, wNe = (e) => {
+}, ONe = (e) => {
var t = Math.cos(nK(-e.coordinate)), n = Math.sin(nK(-e.coordinate));
- return Math.abs(t) <= yNe ? n > 0 ? "start" : "end" : "middle";
-}, TNe = (e) => {
+ return Math.abs(t) <= CNe ? n > 0 ? "start" : "end" : "middle";
+}, kNe = (e) => {
var { cx: t, cy: n, radius: r, axisLineType: i, axisLine: a, ticks: o } = e;
if (!a) return null;
- var s = G1(G1({}, aR(e)), {}, { fill: "none" }, aR(a));
+ var s = G1(G1({}, iR(e)), {}, { fill: "none" }, iR(a));
if (i === "circle") return /*#__PURE__*/ B.createElement(g1, U1({ className: "recharts-polar-angle-axis-line" }, s, {
cx: t,
cy: n,
@@ -63764,12 +63996,12 @@ var SNe = (e, t) => {
}));
var c = o.map((e) => rK(t, n, r, e.coordinate));
return /*#__PURE__*/ B.createElement(m1, U1({ className: "recharts-polar-angle-axis-line" }, s, { points: c }));
-}, ENe = (e) => {
+}, ANe = (e) => {
var { tick: t, tickProps: n, value: r } = e;
return t ? /*#__PURE__*/ B.isValidElement(t) ? /*#__PURE__*/ B.cloneElement(t, n) : typeof t == "function" ? t(n) : /*#__PURE__*/ B.createElement(V$, U1({}, n, { className: "recharts-polar-angle-axis-tick-value" }), r) : null;
-}, DNe = (e) => {
- var { tick: t, tickLine: n, tickFormatter: r, stroke: i, ticks: a } = e, o = aR(e), { ref: s } = o, c = K1(o, mNe), l = oR(t), u = G1(G1({}, c), {}, { fill: "none" }, aR(n)), d = a.map((a, o) => {
- var s = SNe(a, e), d = CNe(a, e.orientation), f = wNe(a), p = G1(G1(G1({}, c), {}, {
+}, jNe = (e) => {
+ var { tick: t, tickLine: n, tickFormatter: r, stroke: i, ticks: a } = e, o = iR(e), { ref: s } = o, c = K1(o, vNe), l = aR(t), u = G1(G1({}, c), {}, { fill: "none" }, iR(n)), d = a.map((a, o) => {
+ var s = ENe(a, e), d = DNe(a, e.orientation), f = ONe(a), p = G1(G1(G1({}, c), {}, {
textAnchor: d,
verticalAnchor: f,
stroke: "none",
@@ -63780,28 +64012,28 @@ var SNe = (e, t) => {
x: s.x2,
y: s.y2
});
- return /*#__PURE__*/ B.createElement(dR, U1({
+ return /*#__PURE__*/ B.createElement(uR, U1({
className: Jr("recharts-polar-angle-axis-tick", L1(t)),
key: `tick-${a.coordinate}`
- }, Nz(e, a, o)), n && /*#__PURE__*/ B.createElement("line", U1({ className: "recharts-polar-angle-axis-tick-line" }, u, s)), /*#__PURE__*/ B.createElement(ENe, {
+ }, Mz(e, a, o)), n && /*#__PURE__*/ B.createElement("line", U1({ className: "recharts-polar-angle-axis-tick-line" }, u, s)), /*#__PURE__*/ B.createElement(ANe, {
tick: t,
tickProps: p,
value: r ? r(a.value, o) : a.value
}));
});
- return /*#__PURE__*/ B.createElement(dR, { className: "recharts-polar-angle-axis-ticks" }, d);
-}, ONe = (e) => {
- var { angleAxisId: t } = e, n = Q(tq), r = Q((e) => E1(e, "angleAxis", t)), i = LU(), a = Q((e) => AMe(e, "angleAxis", t, i));
+ return /*#__PURE__*/ B.createElement(uR, { className: "recharts-polar-angle-axis-ticks" }, d);
+}, MNe = (e) => {
+ var { angleAxisId: t } = e, n = Q(tq), r = Q((e) => E1(e, "angleAxis", t)), i = LU(), a = Q((e) => PMe(e, "angleAxis", t, i));
if (n == null || !a || !a.length || r == null) return null;
var o = G1(G1(G1({}, e), {}, { scale: r }, n), {}, {
radius: n.outerRadius,
ticks: a
});
- return /*#__PURE__*/ B.createElement($Q, { zIndex: o.zIndex }, /*#__PURE__*/ B.createElement(dR, { className: Jr("recharts-polar-angle-axis", bNe, o.className) }, /*#__PURE__*/ B.createElement(TNe, o), /*#__PURE__*/ B.createElement(DNe, o)));
+ return /*#__PURE__*/ B.createElement($Q, { zIndex: o.zIndex }, /*#__PURE__*/ B.createElement(uR, { className: Jr("recharts-polar-angle-axis", wNe, o.className) }, /*#__PURE__*/ B.createElement(kNe, o), /*#__PURE__*/ B.createElement(jNe, o)));
};
function J1(e) {
- var t = Fz(e, zK);
- return /*#__PURE__*/ B.createElement(xNe, {
+ var t = Pz(e, zK);
+ return /*#__PURE__*/ B.createElement(TNe, {
id: t.angleAxisId,
scale: t.scale,
type: t.type,
@@ -63818,12 +64050,12 @@ function J1(e) {
ticks: t.ticks,
tick: t.tick,
domain: t.domain
- }, /*#__PURE__*/ B.createElement(ONe, t));
+ }, /*#__PURE__*/ B.createElement(MNe, t));
}
J1.displayName = "PolarAngleAxis";
//#endregion
//#region node_modules/react-is/cjs/react-is.production.js
-var kNe = /* @__PURE__ */ mt(((e) => {
+var NNe = /* @__PURE__ */ mt(((e) => {
var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), o = Symbol.for("react.consumer"), s = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), d = Symbol.for("react.memo"), f = Symbol.for("react.lazy"), p = Symbol.for("react.view_transition");
function m(e) {
if (typeof e == "object" && e) {
@@ -63852,26 +64084,26 @@ var kNe = /* @__PURE__ */ mt(((e) => {
e.isFragment = function(e) {
return m(e) === r;
};
-})), ANe = (/* @__PURE__ */ mt(((e, t) => {
- t.exports = kNe();
+})), PNe = (/* @__PURE__ */ mt(((e, t) => {
+ t.exports = NNe();
})))(), Y1 = (e) => typeof e == "string" ? e : e ? e.displayName || e.name || "Component" : "", X1 = null, Z1 = null, Q1 = (e) => {
if (e === X1 && Array.isArray(Z1)) return Z1;
var t = [];
return B.Children.forEach(e, (e) => {
- Sz(e) || ((0, ANe.isFragment)(e) ? t = t.concat(Q1(e.props.children)) : t.push(e));
+ xz(e) || ((0, PNe.isFragment)(e) ? t = t.concat(Q1(e.props.children)) : t.push(e));
}), Z1 = t, X1 = e, t;
};
function $1(e, t) {
var n = [], r = [];
return r = Array.isArray(t) ? t.map((e) => Y1(e)) : [Y1(t)], Q1(e).forEach((e) => {
- var t = uz(e, "type.displayName") || uz(e, "type.name");
+ var t = lz(e, "type.displayName") || lz(e, "type.name");
t && r.indexOf(t) !== -1 && n.push(e);
}), n;
}
var e0 = (e) => e && typeof e == "object" && "clipDot" in e ? !!e.clipDot : !0;
//#endregion
//#region node_modules/es-toolkit/dist/compat/predicate/isPlainObject.mjs
-function jNe(e) {
+function FNe(e) {
if (typeof e != "object" || !e) return !1;
if (Object.getPrototypeOf(e) === null) return !0;
if (Object.prototype.toString.call(e) !== "[object Object]") {
@@ -63884,7 +64116,7 @@ function jNe(e) {
}
//#endregion
//#region node_modules/recharts/es6/shape/Trapezoid.js
-var MNe, NNe, PNe, FNe, INe;
+var INe, LNe, RNe, zNe, BNe;
function t0(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
@@ -63899,26 +64131,26 @@ function n0(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? t0(Object(n), !0).forEach(function(t) {
- LNe(e, t, n[t]);
+ VNe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : t0(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function LNe(e, t, n) {
- return (t = RNe(t)) in e ? Object.defineProperty(e, t, {
+function VNe(e, t, n) {
+ return (t = HNe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function RNe(e) {
- var t = zNe(e, "string");
+function HNe(e) {
+ var t = UNe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function zNe(e, t) {
+function UNe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -63941,29 +64173,29 @@ function i0(e, t) {
return t ||= e.slice(0), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } }));
}
var a0 = (e, t, n, r, i) => {
- var a = n - r, o = fz(MNe ||= i0([
+ var a = n - r, o = dz(INe ||= i0([
"M ",
",",
""
]), e, t);
- return o += fz(NNe ||= i0([
+ return o += dz(LNe ||= i0([
"L ",
",",
""
- ]), e + n, t), o += fz(PNe ||= i0([
+ ]), e + n, t), o += dz(RNe ||= i0([
"L ",
",",
""
- ]), e + n - a / 2, t + i), o += fz(FNe ||= i0([
+ ]), e + n - a / 2, t + i), o += dz(zNe ||= i0([
"L ",
",",
""
- ]), e + n - a / 2 - r, t + i), o += fz(INe ||= i0([
+ ]), e + n - a / 2 - r, t + i), o += dz(BNe ||= i0([
"L ",
",",
" Z"
]), e, t), o;
-}, BNe = {
+}, WNe = {
x: 0,
y: 0,
upperWidth: 0,
@@ -63973,8 +64205,8 @@ var a0 = (e, t, n, r, i) => {
animationBegin: 0,
animationDuration: 1500,
animationEasing: "ease"
-}, VNe = (e) => {
- var t = Fz(e, BNe), { x: n, y: r, upperWidth: i, lowerWidth: a, height: o, className: s } = t, { animationEasing: c, animationDuration: l, animationBegin: u, isUpdateAnimationActive: d } = t, f = (0, B.useRef)(null), [p, m] = (0, B.useState)(-1), h = (0, B.useRef)(i), g = (0, B.useRef)(a), _ = (0, B.useRef)(o), v = (0, B.useRef)(n), y = (0, B.useRef)(r), b = WG(e, "trapezoid-");
+}, GNe = (e) => {
+ var t = Pz(e, WNe), { x: n, y: r, upperWidth: i, lowerWidth: a, height: o, className: s } = t, { animationEasing: c, animationDuration: l, animationBegin: u, isUpdateAnimationActive: d } = t, f = (0, B.useRef)(null), [p, m] = (0, B.useState)(-1), h = (0, B.useRef)(i), g = (0, B.useRef)(a), _ = (0, B.useRef)(o), v = (0, B.useRef)(n), y = (0, B.useRef)(r), b = WG(e, "trapezoid-");
if ((0, B.useEffect)(() => {
if (f.current && f.current.getTotalLength) try {
var e = f.current.getTotalLength();
@@ -63982,7 +64214,7 @@ var a0 = (e, t, n, r, i) => {
} catch {}
}, []), n !== +n || r !== +r || i !== +i || a !== +a || o !== +o || i === 0 && a === 0 || o === 0) return null;
var x = Jr("recharts-trapezoid", s);
- if (!d) return /*#__PURE__*/ B.createElement("g", null, /*#__PURE__*/ B.createElement("path", r0({}, sR(t), {
+ if (!d) return /*#__PURE__*/ B.createElement("g", null, /*#__PURE__*/ B.createElement("path", r0({}, oR(t), {
className: x,
d: a0(n, r, i, a, o)
})));
@@ -63996,35 +64228,35 @@ var a0 = (e, t, n, r, i) => {
isActive: d,
begin: u
}, (e) => {
- var s = bz(S, i, e), c = bz(C, a, e), l = bz(w, o, e), u = bz(T, n, e), d = bz(E, r, e);
+ var s = yz(S, i, e), c = yz(C, a, e), l = yz(w, o, e), u = yz(T, n, e), d = yz(E, r, e);
f.current && (h.current = s, g.current = c, _.current = l, v.current = u, y.current = d);
var p = e > 0 ? {
transition: k,
strokeDasharray: O
} : { strokeDasharray: D };
- return /*#__PURE__*/ B.createElement("path", r0({}, sR(t), {
+ return /*#__PURE__*/ B.createElement("path", r0({}, oR(t), {
className: x,
d: a0(u, d, s, c, l),
ref: f,
style: n0(n0({}, p), t.style)
}));
});
-}, HNe = [
+}, KNe = [
"option",
"shapeType",
"activeClassName",
"inActiveClassName"
];
-function UNe(e, t) {
+function qNe(e, t) {
if (e == null) return {};
- var n, r, i = WNe(e, t);
+ var n, r, i = JNe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function WNe(e, t) {
+function JNe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -64047,26 +64279,26 @@ function s0(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? o0(Object(n), !0).forEach(function(t) {
- GNe(e, t, n[t]);
+ YNe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : o0(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function GNe(e, t, n) {
- return (t = KNe(t)) in e ? Object.defineProperty(e, t, {
+function YNe(e, t, n) {
+ return (t = XNe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function KNe(e) {
- var t = qNe(e, "string");
+function XNe(e) {
+ var t = ZNe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function qNe(e, t) {
+function ZNe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -64076,34 +64308,34 @@ function qNe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function JNe(e, t) {
+function QNe(e, t) {
return s0(s0({}, t), e);
}
-function YNe(e, t) {
+function $Ne(e, t) {
return e === "symbols";
}
function c0(e) {
var { shapeType: t, elementProps: n } = e;
switch (t) {
case "rectangle": return /*#__PURE__*/ B.createElement(QG, n);
- case "trapezoid": return /*#__PURE__*/ B.createElement(VNe, n);
+ case "trapezoid": return /*#__PURE__*/ B.createElement(GNe, n);
case "sector": return /*#__PURE__*/ B.createElement(lK, n);
case "symbols":
- if (YNe(t, n)) return /*#__PURE__*/ B.createElement(Az, n);
+ if ($Ne(t, n)) return /*#__PURE__*/ B.createElement(kz, n);
break;
case "curve": return /*#__PURE__*/ B.createElement(TG, n);
default: return null;
}
}
-function XNe(e) {
+function ePe(e) {
return /*#__PURE__*/ (0, B.isValidElement)(e) ? e.props : e;
}
function l0(e) {
- var { option: t, shapeType: n, activeClassName: r = "recharts-active-shape", inActiveClassName: i = "recharts-shape" } = e, a = UNe(e, HNe), o;
- if (/*#__PURE__*/ (0, B.isValidElement)(t)) o = /*#__PURE__*/ (0, B.cloneElement)(t, s0(s0({}, a), XNe(t)));
+ var { option: t, shapeType: n, activeClassName: r = "recharts-active-shape", inActiveClassName: i = "recharts-shape" } = e, a = qNe(e, KNe), o;
+ if (/*#__PURE__*/ (0, B.isValidElement)(t)) o = /*#__PURE__*/ (0, B.cloneElement)(t, s0(s0({}, a), ePe(t)));
else if (typeof t == "function") o = t(a, a.index);
- else if (jNe(t) && typeof t != "boolean") {
- var s = JNe(t, a);
+ else if (FNe(t) && typeof t != "boolean") {
+ var s = QNe(t, a);
o = /*#__PURE__*/ B.createElement(c0, {
shapeType: n,
elementProps: s
@@ -64115,7 +64347,7 @@ function l0(e) {
elementProps: c
});
}
- return a.isActive ? /*#__PURE__*/ B.createElement(dR, { className: r }, o) : /*#__PURE__*/ B.createElement(dR, { className: i }, o);
+ return a.isActive ? /*#__PURE__*/ B.createElement(uR, { className: r }, o) : /*#__PURE__*/ B.createElement(uR, { className: i }, o);
}
//#endregion
//#region node_modules/recharts/es6/context/tooltipContext.js
@@ -64132,12 +64364,12 @@ var u0 = (e, t, n) => {
}, d0 = (e) => {
var t = CB();
return (n, r) => (i) => {
- e?.(n, r, i), t(Fke());
+ e?.(n, r, i), t(zke());
};
}, f0 = (e, t, n) => {
var r = CB();
return (i, a) => (o) => {
- e?.(i, a, o), r(Ike({
+ e?.(i, a, o), r(Bke({
activeIndex: String(a),
activeDataKey: t,
activeCoordinate: i.tooltipPosition,
@@ -64150,7 +64382,7 @@ var u0 = (e, t, n) => {
function p0(e) {
var { tooltipEntrySettings: t } = e, n = CB(), r = LU(), i = (0, B.useRef)(null);
return (0, B.useLayoutEffect)(() => {
- r || (i.current === null ? n(jke(t)) : i.current !== t && n(Mke({
+ r || (i.current === null ? n(Fke(t)) : i.current !== t && n(Ike({
prev: i.current,
next: t
})), i.current = t);
@@ -64159,7 +64391,7 @@ function p0(e) {
n,
r
]), (0, B.useLayoutEffect)(() => () => {
- i.current &&= (n(Nke(i.current)), null);
+ i.current &&= (n(Lke(i.current)), null);
}, [n]), null;
}
//#endregion
@@ -64196,21 +64428,21 @@ function h0(e) {
}
//#endregion
//#region node_modules/recharts/es6/util/useId.js
-var ZNe = B.useId ?? (() => {
- var [e] = B.useState(() => _z("uid-"));
+var tPe = B.useId ?? (() => {
+ var [e] = B.useState(() => gz("uid-"));
return e;
});
//#endregion
//#region node_modules/recharts/es6/util/useUniqueId.js
-function QNe(e, t) {
- var n = ZNe();
+function nPe(e, t) {
+ var n = tPe();
return t || (e ? `${e}-${n}` : n);
}
//#endregion
//#region node_modules/recharts/es6/context/RegisterGraphicalItemId.js
-var $Ne = /*#__PURE__*/ (0, B.createContext)(void 0), g0 = (e) => {
- var { id: t, type: n, children: r } = e, i = QNe(`recharts-${n}`, t);
- return /*#__PURE__*/ B.createElement($Ne.Provider, { value: i }, r(i));
+var rPe = /*#__PURE__*/ (0, B.createContext)(void 0), g0 = (e) => {
+ var { id: t, type: n, children: r } = e, i = nPe(`recharts-${n}`, t);
+ return /*#__PURE__*/ B.createElement(rPe.Provider, { value: i }, r(i));
}, _0 = FH({
name: "graphicalItems",
initialState: {
@@ -64259,40 +64491,40 @@ var $Ne = /*#__PURE__*/ (0, B.createContext)(void 0), g0 = (e) => {
prepare: jH()
}
}
-}), { addCartesianGraphicalItem: ePe, replaceCartesianGraphicalItem: tPe, removeCartesianGraphicalItem: nPe, addPolarGraphicalItem: rPe, removePolarGraphicalItem: iPe, replacePolarGraphicalItem: aPe } = _0.actions, oPe = _0.reducer, v0 = /*#__PURE__*/ (0, B.memo)((e) => {
+}), { addCartesianGraphicalItem: iPe, replaceCartesianGraphicalItem: aPe, removeCartesianGraphicalItem: oPe, addPolarGraphicalItem: sPe, removePolarGraphicalItem: cPe, replacePolarGraphicalItem: lPe } = _0.actions, uPe = _0.reducer, v0 = /*#__PURE__*/ (0, B.memo)((e) => {
var t = CB(), n = (0, B.useRef)(null);
return (0, B.useLayoutEffect)(() => {
- n.current === null ? t(ePe(e)) : n.current !== e && t(tPe({
+ n.current === null ? t(iPe(e)) : n.current !== e && t(aPe({
prev: n.current,
next: e
})), n.current = e;
}, [t, e]), (0, B.useLayoutEffect)(() => () => {
- n.current &&= (t(nPe(n.current)), null);
+ n.current &&= (t(oPe(n.current)), null);
}, [t]), null;
}), y0 = /*#__PURE__*/ (0, B.memo)((e) => {
var t = CB(), n = (0, B.useRef)(null);
return (0, B.useLayoutEffect)(() => {
- n.current === null ? t(rPe(e)) : n.current !== e && t(aPe({
+ n.current === null ? t(sPe(e)) : n.current !== e && t(lPe({
prev: n.current,
next: e
})), n.current = e;
}, [t, e]), (0, B.useLayoutEffect)(() => () => {
- n.current &&= (t(iPe(n.current)), null);
+ n.current &&= (t(cPe(n.current)), null);
}, [t]), null;
});
//#endregion
//#region node_modules/es-toolkit/dist/array/last.mjs
-function sPe(e) {
+function dPe(e) {
return e[e.length - 1];
}
//#endregion
//#region node_modules/es-toolkit/dist/compat/array/last.mjs
-function cPe(e) {
- if (!(!Vz(e) || e.length === 0)) return sPe(F1(e));
+function fPe(e) {
+ if (!(!Bz(e) || e.length === 0)) return dPe(F1(e));
}
//#endregion
//#region node_modules/recharts/es6/component/Dots.js
-var lPe = ["points"];
+var pPe = ["points"];
function b0(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
@@ -64307,26 +64539,26 @@ function x0(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? b0(Object(n), !0).forEach(function(t) {
- uPe(e, t, n[t]);
+ mPe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : b0(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function uPe(e, t, n) {
- return (t = dPe(t)) in e ? Object.defineProperty(e, t, {
+function mPe(e, t, n) {
+ return (t = hPe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function dPe(e) {
- var t = fPe(e, "string");
+function hPe(e) {
+ var t = gPe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function fPe(e, t) {
+function gPe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -64345,16 +64577,16 @@ function S0() {
return e;
}, S0.apply(null, arguments);
}
-function pPe(e, t) {
+function _Pe(e, t) {
if (e == null) return {};
- var n, r, i = mPe(e, t);
+ var n, r, i = vPe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function mPe(e, t) {
+function vPe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -64363,20 +64595,20 @@ function mPe(e, t) {
}
return n;
}
-function hPe(e) {
+function yPe(e) {
var { option: t, dotProps: n, className: r } = e;
if (/*#__PURE__*/ (0, B.isValidElement)(t)) return /*#__PURE__*/ (0, B.cloneElement)(t, n);
if (typeof t == "function") return t(n);
- var i = Jr(r, typeof t == "boolean" ? "" : t.className), a = n ?? {}, { points: o } = a, s = pPe(a, lPe);
+ var i = Jr(r, typeof t == "boolean" ? "" : t.className), a = n ?? {}, { points: o } = a, s = _Pe(a, pPe);
return /*#__PURE__*/ B.createElement(g1, S0({}, s, { className: i }));
}
-function gPe(e, t) {
+function bPe(e, t) {
return e == null ? !1 : t ? !0 : e.length === 1;
}
function C0(e) {
var { points: t, dot: n, className: r, dotClassName: i, dataKey: a, baseProps: o, needClip: s, clipPathId: c, zIndex: l = RK.scatter } = e;
- if (!gPe(t, n)) return null;
- var u = e0(n), d = ube(n), f = t.map((e, r) => {
+ if (!bPe(t, n)) return null;
+ var u = e0(n), d = hbe(n), f = t.map((e, r) => {
var s = x0(x0(x0({ r: 3 }, o), d), {}, {
index: r,
cx: e.x ?? void 0,
@@ -64386,14 +64618,14 @@ function C0(e) {
payload: e.payload,
points: t
});
- return /*#__PURE__*/ B.createElement(hPe, {
+ return /*#__PURE__*/ B.createElement(yPe, {
key: `dot-${r}`,
option: n,
dotProps: s,
className: i
});
}), p = {};
- return s && c != null && (p.clipPath = `url(#clipPath-${u ? "" : "dots-"}${c})`), /*#__PURE__*/ B.createElement($Q, { zIndex: l }, /*#__PURE__*/ B.createElement(dR, S0({ className: r }, p), f));
+ return s && c != null && (p.clipPath = `url(#clipPath-${u ? "" : "dots-"}${c})`), /*#__PURE__*/ B.createElement($Q, { zIndex: l }, /*#__PURE__*/ B.createElement(uR, S0({ className: r }, p), f));
}
//#endregion
//#region node_modules/recharts/es6/state/cartesianAxisSlice.js
@@ -64411,26 +64643,26 @@ function T0(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? w0(Object(n), !0).forEach(function(t) {
- _Pe(e, t, n[t]);
+ xPe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : w0(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function _Pe(e, t, n) {
- return (t = vPe(t)) in e ? Object.defineProperty(e, t, {
+function xPe(e, t, n) {
+ return (t = SPe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function vPe(e) {
- var t = yPe(e, "string");
+function SPe(e) {
+ var t = CPe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function yPe(e, t) {
+function CPe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -64518,7 +64750,7 @@ var E0 = FH({
}
}
}
-}), { addXAxis: bPe, replaceXAxis: xPe, removeXAxis: SPe, addYAxis: CPe, replaceYAxis: wPe, removeYAxis: TPe, addZAxis: EPe, replaceZAxis: DPe, removeZAxis: OPe, updateYAxisWidth: kPe } = E0.actions, APe = E0.reducer, jPe = $([
+}), { addXAxis: wPe, replaceXAxis: TPe, removeXAxis: EPe, addYAxis: DPe, replaceYAxis: OPe, removeYAxis: kPe, addZAxis: APe, replaceZAxis: jPe, removeZAxis: MPe, updateYAxisWidth: NPe } = E0.actions, PPe = E0.reducer, FPe = $([
$([FU], (e) => ({
top: e.top,
bottom: e.bottom,
@@ -64534,7 +64766,7 @@ var E0 = FH({
width: Math.max(0, t - e.left - e.right),
height: Math.max(0, n - e.top - e.bottom)
};
-}), D0 = () => Q(jPe), MPe = () => Q(dAe);
+}), D0 = () => Q(FPe), IPe = () => Q(hAe);
//#endregion
//#region node_modules/recharts/es6/component/ActivePoints.js
function O0(e, t) {
@@ -64551,26 +64783,26 @@ function k0(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? O0(Object(n), !0).forEach(function(t) {
- NPe(e, t, n[t]);
+ LPe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : O0(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function NPe(e, t, n) {
- return (t = PPe(t)) in e ? Object.defineProperty(e, t, {
+function LPe(e, t, n) {
+ return (t = RPe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function PPe(e) {
- var t = FPe(e, "string");
+function RPe(e) {
+ var t = zPe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function FPe(e, t) {
+function zPe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -64580,7 +64812,7 @@ function FPe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var IPe = (e) => {
+var BPe = (e) => {
var { point: t, childIndex: n, mainColor: r, activeDot: i, dataKey: a, clipPath: o } = e;
if (i === !1 || t.x == null || t.y == null) return null;
var s = k0(k0(k0({}, {
@@ -64594,17 +64826,17 @@ var IPe = (e) => {
stroke: "#fff",
payload: t.payload,
value: t.value
- }), oR(i)), Mz(i)), c = /*#__PURE__*/ (0, B.isValidElement)(i) ? /*#__PURE__*/ (0, B.cloneElement)(i, s) : typeof i == "function" ? i(s) : /*#__PURE__*/ B.createElement(g1, s);
- return /*#__PURE__*/ B.createElement(dR, {
+ }), aR(i)), jz(i)), c = /*#__PURE__*/ (0, B.isValidElement)(i) ? /*#__PURE__*/ (0, B.cloneElement)(i, s) : typeof i == "function" ? i(s) : /*#__PURE__*/ B.createElement(g1, s);
+ return /*#__PURE__*/ B.createElement(uR, {
className: "recharts-active-dot",
clipPath: o
}, c);
};
function A0(e) {
- var { points: t, mainColor: n, activeDot: r, itemDataKey: i, clipPath: a, zIndex: o = RK.activeDot } = e, s = Q(MQ), c = MPe();
+ var { points: t, mainColor: n, activeDot: r, itemDataKey: i, clipPath: a, zIndex: o = RK.activeDot } = e, s = Q(MQ), c = IPe();
if (t == null || c == null) return null;
var l = t.find((e) => c.includes(e.payload));
- return Sz(l) ? null : /*#__PURE__*/ B.createElement($Q, { zIndex: o }, /*#__PURE__*/ B.createElement(IPe, {
+ return xz(l) ? null : /*#__PURE__*/ B.createElement($Q, { zIndex: o }, /*#__PURE__*/ B.createElement(BPe, {
point: l,
childIndex: Number(s),
mainColor: n,
@@ -64629,26 +64861,26 @@ function M0(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? j0(Object(n), !0).forEach(function(t) {
- LPe(e, t, n[t]);
+ VPe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : j0(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function LPe(e, t, n) {
- return (t = RPe(t)) in e ? Object.defineProperty(e, t, {
+function VPe(e, t, n) {
+ return (t = HPe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function RPe(e) {
- var t = zPe(e, "string");
+function HPe(e) {
+ var t = UPe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function zPe(e, t) {
+function UPe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -64658,13 +64890,13 @@ function zPe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var N0 = (e, t) => E1(e, "radiusAxis", t), BPe = $([N0], (e) => {
+var N0 = (e, t) => E1(e, "radiusAxis", t), WPe = $([N0], (e) => {
if (e != null) return { scale: e };
-}), VPe = $([JK, N0], (e, t) => {
+}), GPe = $([JK, N0], (e, t) => {
if (e != null && t != null) return M0(M0({}, e), {}, { scale: t });
-}), HPe = (e, t, n, r) => O1(e, "radiusAxis", t, r), P0 = (e, t, n) => qK(e, n), F0 = (e, t, n) => E1(e, "angleAxis", n), UPe = $([P0, F0], (e, t) => {
+}), KPe = (e, t, n, r) => O1(e, "radiusAxis", t, r), P0 = (e, t, n) => qK(e, n), F0 = (e, t, n) => E1(e, "angleAxis", n), qPe = $([P0, F0], (e, t) => {
if (e != null && t != null) return M0(M0({}, e), {}, { scale: t });
-}), WPe = (e, t, n, r) => O1(e, "angleAxis", n, r), GPe = $([
+}), JPe = (e, t, n, r) => O1(e, "angleAxis", n, r), YPe = $([
P0,
F0,
tq
@@ -64676,30 +64908,30 @@ var N0 = (e, t) => E1(e, "radiusAxis", t), BPe = $([N0], (e) => {
cx: n.cx,
cy: n.cy
};
-}), KPe = (e, t, n, r, i) => i, qPe = $([
+}), XPe = (e, t, n, r, i) => i, ZPe = $([
tW,
- VPe,
- HPe,
- UPe,
- WPe
-], (e, t, n, r, i) => hU(e, "radiusAxis") ? TU(t, n, !1) : TU(r, i, !1)), JPe = $([
- BPe,
GPe,
+ KPe,
+ qPe,
+ JPe
+], (e, t, n, r, i) => hU(e, "radiusAxis") ? TU(t, n, !1) : TU(r, i, !1)), QPe = $([
+ WPe,
+ YPe,
pK,
- $([_1, KPe], (e, t) => {
+ $([_1, XPe], (e, t) => {
if (e != null) return e.find((e) => e.type === "radar" && t === e.id)?.dataKey;
}),
- qPe
+ ZPe
], (e, t, n, r, i) => {
var { chartData: a, dataStartIndex: o, dataEndIndex: s } = n;
- if (e != null && t != null && a != null && i != null && r != null) return iFe({
+ if (e != null && t != null && a != null && i != null && r != null) return cFe({
radiusAxis: e,
angleAxis: t,
displayedData: a.slice(o, s + 1),
dataKey: r,
bandSize: i
});
-}), YPe = ["id"];
+}), $Pe = ["id"];
function I0() {
return I0 = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
@@ -64723,26 +64955,26 @@ function R0(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? L0(Object(n), !0).forEach(function(t) {
- XPe(e, t, n[t]);
+ eFe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : L0(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function XPe(e, t, n) {
- return (t = ZPe(t)) in e ? Object.defineProperty(e, t, {
+function eFe(e, t, n) {
+ return (t = tFe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function ZPe(e) {
- var t = QPe(e, "string");
+function tFe(e) {
+ var t = nFe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function QPe(e, t) {
+function nFe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -64752,16 +64984,16 @@ function QPe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function $Pe(e, t) {
+function rFe(e, t) {
if (e == null) return {};
- var n, r, i = eFe(e, t);
+ var n, r, i = iFe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function eFe(e, t) {
+function iFe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -64773,7 +65005,7 @@ function eFe(e, t) {
function z0(e, t) {
return e && e !== "none" ? e : t;
}
-var tFe = (e) => {
+var aFe = (e) => {
var { dataKey: t, name: n, stroke: r, fill: i, legendType: a, hide: o } = e;
return [{
inactive: o,
@@ -64783,10 +65015,10 @@ var tFe = (e) => {
value: DU(n, t),
payload: e
}];
-}, nFe = /*#__PURE__*/ B.memo((e) => {
+}, oFe = /*#__PURE__*/ B.memo((e) => {
var { dataKey: t, stroke: n, strokeWidth: r, fill: i, name: a, hide: o, tooltipType: s, id: c } = e, l = {
dataDefinedOnItem: void 0,
- getPosition: Tz,
+ getPosition: wz,
settings: {
stroke: n,
strokeWidth: r,
@@ -64803,8 +65035,8 @@ var tFe = (e) => {
};
return /*#__PURE__*/ B.createElement(p0, { tooltipEntrySettings: l });
});
-function rFe(e) {
- var { points: t, props: n } = e, { dot: r, dataKey: i } = n, { id: a } = n, o = aR($Pe(n, YPe));
+function sFe(e) {
+ var { points: t, props: n } = e, { dot: r, dataKey: i } = n, { id: a } = n, o = iR(rFe(n, $Pe));
return /*#__PURE__*/ B.createElement(C0, {
points: t,
dot: r,
@@ -64814,10 +65046,10 @@ function rFe(e) {
baseProps: o
});
}
-function iFe(e) {
+function cFe(e) {
var { radiusAxis: t, angleAxis: n, displayedData: r, dataKey: i, bandSize: a } = e, { cx: o, cy: s } = n, c = !1, l = [], u = n.type === "number" ? 0 : a ?? 0;
r.forEach((e, r) => {
- var a = mU(e, n.dataKey, r), d = mU(e, i), f = (n.scale.map(a) ?? 0) + u, p = Array.isArray(d) ? cPe(d) : d, m = Sz(p) ? 0 : t.scale.map(p) ?? 0;
+ var a = mU(e, n.dataKey, r), d = mU(e, i), f = (n.scale.map(a) ?? 0) + u, p = Array.isArray(d) ? fPe(d) : d, m = xz(p) ? 0 : t.scale.map(p) ?? 0;
Array.isArray(d) && d.length >= 2 && (c = !0), l.push(R0(R0({}, rK(o, s, m, f)), {}, {
name: a,
value: d,
@@ -64831,7 +65063,7 @@ function iFe(e) {
var d = [];
return c && l.forEach((e) => {
if (Array.isArray(e.value)) {
- var n = e.value[0], r = Sz(n) ? 0 : t.scale.map(n) ?? 0;
+ var n = e.value[0], r = xz(n) ? 0 : t.scale.map(n) ?? 0;
d.push(R0(R0({}, e), {}, { radius: r }, rK(o, s, r, e.angle)));
} else d.push(e);
}), {
@@ -64840,7 +65072,7 @@ function iFe(e) {
baseLinePoints: d
};
}
-function aFe(e) {
+function lFe(e) {
var { showLabels: t, points: n, children: r } = e, i = n.map((e) => {
var t = {
x: e.x,
@@ -64860,10 +65092,10 @@ function aFe(e) {
});
return /*#__PURE__*/ B.createElement(s1, { value: t ? i : void 0 }, r);
}
-function oFe(e) {
+function uFe(e) {
var { points: t, baseLinePoints: n, props: r } = e;
if (t == null) return null;
- var { shape: i, isRange: a, connectNulls: o } = r, s = /*#__PURE__*/ B.isValidElement(i) ? /*#__PURE__*/ B.cloneElement(i, R0(R0({}, r), {}, { points: t })) : typeof i == "function" ? i(R0(R0({}, r), {}, { points: t })) : /*#__PURE__*/ B.createElement(m1, I0({}, sR(r), {
+ var { shape: i, isRange: a, connectNulls: o } = r, s = /*#__PURE__*/ B.isValidElement(i) ? /*#__PURE__*/ B.cloneElement(i, R0(R0({}, r), {}, { points: t })) : typeof i == "function" ? i(R0(R0({}, r), {}, { points: t })) : /*#__PURE__*/ B.createElement(m1, I0({}, oR(r), {
onMouseEnter: (e) => {
var { onMouseEnter: t } = r;
t && t(r, e);
@@ -64876,7 +65108,7 @@ function oFe(e) {
baseLinePoints: a ? n : void 0,
connectNulls: o
}));
- return /*#__PURE__*/ B.createElement(dR, { className: "recharts-radar-polygon" }, s, /*#__PURE__*/ B.createElement(rFe, {
+ return /*#__PURE__*/ B.createElement(uR, { className: "recharts-radar-polygon" }, s, /*#__PURE__*/ B.createElement(sFe, {
props: r,
points: t
}));
@@ -64884,20 +65116,20 @@ function oFe(e) {
var B0 = (e, t, n) => (r, i) => {
var a = e && e[Math.floor(i * t)];
return a ? R0(R0({}, r), {}, {
- x: bz(a.x, r.x, n),
- y: bz(a.y, r.y, n)
+ x: yz(a.x, r.x, n),
+ y: yz(a.y, r.y, n)
}) : R0(R0({}, r), {}, {
- x: bz(r.cx, r.x, n),
- y: bz(r.cy, r.y, n)
+ x: yz(r.cx, r.x, n),
+ y: yz(r.cy, r.y, n)
});
};
-function sFe(e) {
+function dFe(e) {
var { props: t, previousPointsRef: n, previousBaseLinePointsRef: r } = e, { points: i, baseLinePoints: a, isAnimationActive: o, animationBegin: s, animationDuration: c, animationEasing: l, onAnimationEnd: u, onAnimationStart: d } = t, f = n.current, p = r.current, m = f ? f.length / i.length : 1, h = p ? p.length / a.length : 1, g = WG(t, "recharts-radar-"), [_, v] = (0, B.useState)(!1), y = !_, b = (0, B.useCallback)(() => {
typeof u == "function" && u(), v(!1);
}, [u]), x = (0, B.useCallback)(() => {
typeof d == "function" && d(), v(!0);
}, [d]);
- return /*#__PURE__*/ B.createElement(aFe, {
+ return /*#__PURE__*/ B.createElement(lFe, {
showLabels: y,
points: i
}, /*#__PURE__*/ B.createElement(UG, {
@@ -64911,22 +65143,22 @@ function sFe(e) {
onAnimationStart: x
}, (e) => {
var o = e === 1 ? i : i.map(B0(f, m, e)), s = e === 1 ? a : a?.map(B0(p, h, e));
- return e > 0 && (n.current = o, r.current = s), /*#__PURE__*/ B.createElement(oFe, {
+ return e > 0 && (n.current = o, r.current = s), /*#__PURE__*/ B.createElement(uFe, {
points: o,
baseLinePoints: s,
props: t
});
}), /*#__PURE__*/ B.createElement(u1, { label: t.label }), t.children);
}
-function cFe(e) {
+function fFe(e) {
var t = (0, B.useRef)(void 0), n = (0, B.useRef)(void 0);
- return /*#__PURE__*/ B.createElement(sFe, {
+ return /*#__PURE__*/ B.createElement(dFe, {
props: e,
previousPointsRef: t,
previousBaseLinePointsRef: n
});
}
-var lFe = {
+var pFe = {
activeDot: !0,
angleAxisId: 0,
animationBegin: 0,
@@ -64940,27 +65172,27 @@ var lFe = {
radiusAxisId: 0,
zIndex: RK.area
};
-function uFe(e) {
+function mFe(e) {
var { hide: t, className: n, points: r } = e;
if (t) return null;
var i = Jr("recharts-radar", n);
- return /*#__PURE__*/ B.createElement($Q, { zIndex: e.zIndex }, /*#__PURE__*/ B.createElement(dR, { className: i }, /*#__PURE__*/ B.createElement(cFe, e)), /*#__PURE__*/ B.createElement(A0, {
+ return /*#__PURE__*/ B.createElement($Q, { zIndex: e.zIndex }, /*#__PURE__*/ B.createElement(uR, { className: i }, /*#__PURE__*/ B.createElement(fFe, e)), /*#__PURE__*/ B.createElement(A0, {
points: r,
mainColor: z0(e.stroke, e.fill),
itemDataKey: e.dataKey,
activeDot: e.activeDot
}));
}
-function dFe(e) {
- var t = LU(), n = Q((n) => JPe(n, e.radiusAxisId, e.angleAxisId, t, e.id));
- return n?.points == null ? null : /*#__PURE__*/ B.createElement(uFe, I0({}, e, {
+function hFe(e) {
+ var t = LU(), n = Q((n) => QPe(n, e.radiusAxisId, e.angleAxisId, t, e.id));
+ return n?.points == null ? null : /*#__PURE__*/ B.createElement(mFe, I0({}, e, {
points: n?.points,
baseLinePoints: n?.baseLinePoints,
isRange: n?.isRange
}));
}
function V0(e) {
- var t = Fz(e, lFe);
+ var t = Pz(e, pFe);
return /*#__PURE__*/ B.createElement(g0, {
id: t.id,
type: "radar"
@@ -64972,7 +65204,7 @@ function V0(e) {
hide: t.hide,
angleAxisId: t.angleAxisId,
radiusAxisId: t.radiusAxisId
- }), /*#__PURE__*/ B.createElement(h0, { legendPayload: tFe(t) }), /*#__PURE__*/ B.createElement(nFe, {
+ }), /*#__PURE__*/ B.createElement(h0, { legendPayload: aFe(t) }), /*#__PURE__*/ B.createElement(oFe, {
dataKey: t.dataKey,
stroke: t.stroke,
strokeWidth: t.strokeWidth,
@@ -64981,7 +65213,7 @@ function V0(e) {
hide: t.hide,
tooltipType: t.tooltipType,
id: e
- }), /*#__PURE__*/ B.createElement(dFe, I0({}, t, { id: e }))));
+ }), /*#__PURE__*/ B.createElement(hFe, I0({}, t, { id: e }))));
}
V0.displayName = "Radar";
//#endregion
@@ -65005,7 +65237,7 @@ function W0(e) {
//#region node_modules/recharts/es6/state/selectors/combiners/combineBarSizeList.js
var G0 = (e, t, n) => {
var r = n ?? e;
- if (!Sz(r)) return vz(r, t, 0);
+ if (!xz(r)) return _z(r, t, 0);
}, K0 = (e, t, n) => {
var r = {}, i = e.filter(oq), a = e.filter((e) => e.stackId == null), o = i.reduce((e, t) => {
var n = e[t.stackId];
@@ -65040,26 +65272,26 @@ function J0(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? q0(Object(n), !0).forEach(function(t) {
- fFe(e, t, n[t]);
+ gFe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : q0(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function fFe(e, t, n) {
- return (t = pFe(t)) in e ? Object.defineProperty(e, t, {
+function gFe(e, t, n) {
+ return (t = _Fe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function pFe(e) {
- var t = mFe(e, "string");
+function _Fe(e) {
+ var t = vFe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function mFe(e, t) {
+function vFe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -65069,10 +65301,10 @@ function mFe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function hFe(e, t, n, r, i) {
+function yFe(e, t, n, r, i) {
var a = r.length;
if (!(a < 1)) {
- var o = vz(e, n, 0, !0), s, c = [];
+ var o = _z(e, n, 0, !0), s, c = [];
if (uU(r[0]?.barSize)) {
var l = !1, u = n / a, d = r.reduce((e, t) => e + (t.barSize || 0), 0);
d += (a - 1) * o, d >= n && (d -= (a - 1) * o, o = 0), d >= n && u > 0 && (l = !0, u *= .9, d = a * u);
@@ -65092,7 +65324,7 @@ function hFe(e, t, n, r, i) {
return f = n.position, r;
}, c);
} else {
- var p = vz(t, n, 0, !0);
+ var p = _z(t, n, 0, !0);
n - 2 * p - (a - 1) * o <= 0 && (o = 0);
var m = (n - 2 * p - (a - 1) * o) / a;
m > 1 && (m >>= 0);
@@ -65110,7 +65342,7 @@ function hFe(e, t, n, r, i) {
}
}
var Y0 = (e, t, n, r, i, a, o) => {
- var s = Sz(o) ? t : o, c = hFe(n, r, i === a ? a : i, e, s);
+ var s = xz(o) ? t : o, c = yFe(n, r, i === a ? a : i, e, s);
return i !== a && c != null && (c = c.map((e) => J0(J0({}, e), {}, { position: J0(J0({}, e.position), {}, { offset: e.position.offset - i / 2 }) }))), c;
}, X0 = (e, t) => {
var n = iq(t);
@@ -65146,26 +65378,26 @@ function $0(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? Q0(Object(n), !0).forEach(function(t) {
- gFe(e, t, n[t]);
+ bFe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Q0(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function gFe(e, t, n) {
- return (t = _Fe(t)) in e ? Object.defineProperty(e, t, {
+function bFe(e, t, n) {
+ return (t = xFe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function _Fe(e) {
- var t = vFe(e, "string");
+function xFe(e) {
+ var t = SFe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function vFe(e, t) {
+function SFe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -65177,7 +65409,7 @@ function vFe(e, t) {
}
var e2 = $([(e, t) => JK(e, t), (e, t) => E1(e, "radiusAxis", t)], (e, t) => {
if (e != null && t != null) return $0($0({}, e), {}, { scale: t });
-}), t2 = (e, t) => jMe(e, "radiusAxis", t, !1), n2 = $([(e, t, n) => qK(e, n), (e, t, n) => E1(e, "angleAxis", n)], (e, t) => {
+}), t2 = (e, t) => FMe(e, "radiusAxis", t, !1), n2 = $([(e, t, n) => qK(e, n), (e, t, n) => E1(e, "angleAxis", n)], (e, t) => {
if (e != null && t != null) return $0($0({}, e), {}, { scale: t });
}), r2 = (e, t, n) => O1(e, "angleAxis", n, !1), i2 = $([_1, (e, t, n, r) => r], (e, t) => {
if (e.some((e) => e.type === "radialBar" && t.dataKey === e.dataKey && t.stackId === e.stackId)) return t;
@@ -65187,20 +65419,20 @@ var e2 = $([(e, t) => JK(e, t), (e, t) => E1(e, "radiusAxis", t)], (e, t) => {
t2,
n2,
r2
-], (e, t, n, r, i) => hU(e, "radiusAxis") ? TU(t, n, !1) : TU(r, i, !1)), yFe = $([
+], (e, t, n, r, i) => hU(e, "radiusAxis") ? TU(t, n, !1) : TU(r, i, !1)), CFe = $([
n2,
e2,
tW
], (e, t, n) => {
var r = n === "radial" ? e : t;
if (r != null && r.scale != null) return SU({ numericAxis: r });
-}), bFe = (e, t, n, r, i) => i, xFe = (e, t, n, r, i) => n, SFe = (e, t, n, r, i) => t, o2 = (e, t, n, r, i) => r.maxBarSize, s2 = (e) => e.type === "radialBar", CFe = $([$([
+}), wFe = (e, t, n, r, i) => i, TFe = (e, t, n, r, i) => n, EFe = (e, t, n, r, i) => t, o2 = (e, t, n, r, i) => r.maxBarSize, s2 = (e) => e.type === "radialBar", DFe = $([$([
$([
$([
tW,
_1,
- xFe,
- SFe
+ TFe,
+ EFe
], (e, t, n, r) => t.filter((t) => e === "centric" ? t.angleAxisId === n : t.radiusAxisId === r).filter((e) => e.hide === !1).filter(s2)),
jK,
() => void 0
@@ -65217,7 +65449,7 @@ var e2 = $([(e, t) => JK(e, t), (e, t) => E1(e, "radiusAxis", t)], (e, t) => {
t2,
o2
], (e, t, n, r, i, a, o) => {
- var s = Sz(o) ? t : o;
+ var s = xz(o) ? t : o;
return e === "centric" ? TU(n, r, !0) ?? s ?? 0 : TU(i, a, !0) ?? s ?? 0;
}),
a2,
@@ -65231,7 +65463,7 @@ var e2 = $([(e, t) => JK(e, t), (e, t) => E1(e, "radiusAxis", t)], (e, t) => {
c2,
MK,
NK
-], nZ), wFe = $([
+], nZ), OFe = $([
n2,
r2,
e2,
@@ -65240,16 +65472,16 @@ var e2 = $([(e, t) => JK(e, t), (e, t) => E1(e, "radiusAxis", t)], (e, t) => {
i2,
a2,
tW,
- yFe,
- tq,
- bFe,
CFe,
+ tq,
+ wFe,
+ DFe,
$([(e, t, n) => tW(e) === "centric" ? l2(e, "radiusAxis", t) : l2(e, "angleAxis", n), i2], X0)
], (e, t, n, r, i, a, o, s, c, l, u, d, f) => {
var { chartData: p, dataStartIndex: m, dataEndIndex: h } = i;
if (a == null || n == null || e == null || p == null || o == null || d == null || s !== "centric" && s !== "radial" || r == null || l == null) return [];
var { dataKey: g, minPointSize: _ } = a, { cx: v, cy: y, startAngle: b, endAngle: x } = l;
- return VFe({
+ return GFe({
angleAxis: e,
angleAxisTicks: t,
bandSize: o,
@@ -65270,7 +65502,7 @@ var e2 = $([(e, t) => JK(e, t), (e, t) => E1(e, "radiusAxis", t)], (e, t) => {
stackedDomain: f ? (s === "centric" ? n : e).scale.domain() : null,
startAngle: b
});
-}), TFe = $([pK, (e, t) => t], (e, t) => {
+}), kFe = $([pK, (e, t) => t], (e, t) => {
var { chartData: n, dataStartIndex: r, dataEndIndex: i } = e;
if (n == null) return [];
var a = n.slice(r, i + 1);
@@ -65288,16 +65520,16 @@ function u2(e, t) {
}
//#endregion
//#region node_modules/recharts/es6/polar/RadialBar.js
-var EFe = [
+var AFe = [
"shape",
"activeShape",
"cornerRadius",
"id"
-], DFe = [
+], jFe = [
"onMouseEnter",
"onClick",
"onMouseLeave"
-], OFe = ["value", "background"];
+], MFe = ["value", "background"];
function d2() {
return d2 = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
@@ -65321,26 +65553,26 @@ function p2(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? f2(Object(n), !0).forEach(function(t) {
- kFe(e, t, n[t]);
+ NFe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : f2(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function kFe(e, t, n) {
- return (t = AFe(t)) in e ? Object.defineProperty(e, t, {
+function NFe(e, t, n) {
+ return (t = PFe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function AFe(e) {
- var t = jFe(e, "string");
+function PFe(e) {
+ var t = FFe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function jFe(e, t) {
+function FFe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -65352,14 +65584,14 @@ function jFe(e, t) {
}
function m2(e, t) {
if (e == null) return {};
- var n, r, i = MFe(e, t);
+ var n, r, i = IFe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function MFe(e, t) {
+function IFe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -65369,7 +65601,7 @@ function MFe(e, t) {
return n;
}
var h2 = [];
-function NFe(e) {
+function LFe(e) {
var { showLabels: t, sectors: n, children: r } = e, i = n.map((e) => ({
value: e.value,
payload: e.payload,
@@ -65386,15 +65618,15 @@ function NFe(e) {
},
fill: e.fill
}));
- return /*#__PURE__*/ B.createElement(yMe, { value: t ? i : void 0 }, r);
+ return /*#__PURE__*/ B.createElement(CMe, { value: t ? i : void 0 }, r);
}
-function PFe(e) {
- var { sectors: t, allOtherRadialBarProps: n, showLabels: r } = e, { shape: i, activeShape: a, cornerRadius: o, id: s } = n, c = m2(n, EFe), l = aR(c), u = Q(MQ), { onMouseEnter: d, onClick: f, onMouseLeave: p } = n, m = m2(n, DFe), h = u0(d, n.dataKey, s), g = d0(p), _ = f0(f, n.dataKey, s);
- return t == null ? null : /*#__PURE__*/ B.createElement(NFe, {
+function RFe(e) {
+ var { sectors: t, allOtherRadialBarProps: n, showLabels: r } = e, { shape: i, activeShape: a, cornerRadius: o, id: s } = n, c = m2(n, AFe), l = iR(c), u = Q(MQ), { onMouseEnter: d, onClick: f, onMouseLeave: p } = n, m = m2(n, jFe), h = u0(d, n.dataKey, s), g = d0(p), _ = f0(f, n.dataKey, s);
+ return t == null ? null : /*#__PURE__*/ B.createElement(LFe, {
showLabels: r,
sectors: t
}, t.map((e, t) => {
- var n = !!(a && u === String(t)), r = h(e, t), s = g(e, t), d = _(e, t), f = p2(p2(p2(p2({}, l), {}, { cornerRadius: U0(o) }, e), Nz(m, e, t)), {}, {
+ var n = !!(a && u === String(t)), r = h(e, t), s = g(e, t), d = _(e, t), f = p2(p2(p2(p2({}, l), {}, { cornerRadius: U0(o) }, e), Mz(m, e, t)), {}, {
onMouseEnter: r,
onMouseLeave: s,
onClick: d,
@@ -65411,7 +65643,7 @@ function PFe(e) {
}, /*#__PURE__*/ B.createElement(W0, f)) : /*#__PURE__*/ B.createElement(W0, d2({ key: `sector-${e.cx}-${e.cy}-${e.innerRadius}-${e.outerRadius}-${e.startAngle}-${e.endAngle}-${t}` }, f));
}), /*#__PURE__*/ B.createElement(u1, { label: n.label }), n.children);
}
-function FFe(e) {
+function zFe(e) {
var { props: t, previousSectorsRef: n } = e, { sectors: r, isAnimationActive: i, animationBegin: a, animationDuration: o, animationEasing: s, onAnimationEnd: c, onAnimationStart: l } = t, u = WG(t, "recharts-radialbar-"), d = n.current, [f, p] = (0, B.useState)(!1), m = (0, B.useCallback)(() => {
typeof c == "function" && c(), p(!1);
}, [c]), h = (0, B.useCallback)(() => {
@@ -65430,34 +65662,34 @@ function FFe(e) {
var i = e === 1 ? r : (r ?? h2).map((t, n) => {
var r = d && d[n];
if (r) return p2(p2({}, t), {}, {
- startAngle: bz(r.startAngle, t.startAngle, e),
- endAngle: bz(r.endAngle, t.endAngle, e)
+ startAngle: yz(r.startAngle, t.startAngle, e),
+ endAngle: yz(r.endAngle, t.endAngle, e)
});
var { endAngle: i, startAngle: a } = t;
- return p2(p2({}, t), {}, { endAngle: bz(a, i, e) });
+ return p2(p2({}, t), {}, { endAngle: yz(a, i, e) });
});
- return e > 0 && (n.current = i ?? null), /*#__PURE__*/ B.createElement(PFe, {
+ return e > 0 && (n.current = i ?? null), /*#__PURE__*/ B.createElement(RFe, {
sectors: i ?? h2,
allOtherRadialBarProps: t,
showLabels: !f
});
});
}
-function IFe(e) {
+function BFe(e) {
var t = (0, B.useRef)(null);
- return /*#__PURE__*/ B.createElement(FFe, {
+ return /*#__PURE__*/ B.createElement(zFe, {
props: e,
previousSectorsRef: t
});
}
-function LFe(e) {
- var t = Q((t) => TFe(t, e.legendType));
+function VFe(e) {
+ var t = Q((t) => kFe(t, e.legendType));
return /*#__PURE__*/ B.createElement(h0, { legendPayload: t ?? [] });
}
-var RFe = /*#__PURE__*/ B.memo((e) => {
+var HFe = /*#__PURE__*/ B.memo((e) => {
var { dataKey: t, sectors: n, stroke: r, strokeWidth: i, name: a, hide: o, fill: s, tooltipType: c, id: l } = e, u = {
dataDefinedOnItem: n,
- getPosition: Tz,
+ getPosition: wz,
settings: {
graphicalItemId: l,
stroke: r,
@@ -65473,14 +65705,14 @@ var RFe = /*#__PURE__*/ B.memo((e) => {
}
};
return /*#__PURE__*/ B.createElement(p0, { tooltipEntrySettings: u });
-}), zFe = class extends B.PureComponent {
+}), UFe = class extends B.PureComponent {
renderBackground(e) {
if (e == null) return null;
- var { cornerRadius: t } = this.props, n = oR(this.props.background);
+ var { cornerRadius: t } = this.props, n = aR(this.props.background);
return /*#__PURE__*/ B.createElement($Q, { zIndex: u2(this.props.background, RK.barBackground) }, e.map((e, r) => {
- var { value: i, background: a } = e, o = m2(e, OFe);
+ var { value: i, background: a } = e, o = m2(e, MFe);
if (!a) return null;
- var s = p2(p2(p2(p2(p2({ cornerRadius: U0(t) }, o), {}, { fill: "#eee" }, a), n), Nz(this.props, e, r)), {}, {
+ var s = p2(p2(p2(p2(p2({ cornerRadius: U0(t) }, o), {}, { fill: "#eee" }, a), n), Mz(this.props, e, r)), {}, {
index: r,
className: Jr("recharts-radial-bar-background-sector", String(n?.className)),
option: a,
@@ -65493,10 +65725,10 @@ var RFe = /*#__PURE__*/ B.memo((e) => {
var { hide: e, sectors: t, className: n, background: r } = this.props;
if (e) return null;
var i = Jr("recharts-area", n);
- return /*#__PURE__*/ B.createElement($Q, { zIndex: this.props.zIndex }, /*#__PURE__*/ B.createElement(dR, { className: i }, r && /*#__PURE__*/ B.createElement(dR, { className: "recharts-radial-bar-background" }, this.renderBackground(t)), /*#__PURE__*/ B.createElement(dR, { className: "recharts-radial-bar-sectors" }, /*#__PURE__*/ B.createElement(IFe, this.props))));
+ return /*#__PURE__*/ B.createElement($Q, { zIndex: this.props.zIndex }, /*#__PURE__*/ B.createElement(uR, { className: i }, r && /*#__PURE__*/ B.createElement(uR, { className: "recharts-radial-bar-background" }, this.renderBackground(t)), /*#__PURE__*/ B.createElement(uR, { className: "recharts-radial-bar-sectors" }, /*#__PURE__*/ B.createElement(BFe, this.props))));
}
};
-function BFe(e) {
+function WFe(e) {
var t = B.useMemo(() => $1(e.children, g$), [e.children]), n = B.useMemo(() => ({
data: void 0,
hide: !1,
@@ -65518,8 +65750,8 @@ function BFe(e) {
e.barSize,
e.angleAxisId,
e.radiusAxisId
- ]), r = Q((r) => wFe(r, e.radiusAxisId, e.angleAxisId, n, t)) ?? h2;
- return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(RFe, {
+ ]), r = Q((r) => OFe(r, e.radiusAxisId, e.angleAxisId, n, t)) ?? h2;
+ return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(HFe, {
dataKey: e.dataKey,
sectors: r,
stroke: e.stroke,
@@ -65529,7 +65761,7 @@ function BFe(e) {
fill: e.fill,
tooltipType: e.tooltipType,
id: e.id
- }), /*#__PURE__*/ B.createElement(zFe, d2({}, e, { sectors: r })));
+ }), /*#__PURE__*/ B.createElement(UFe, d2({}, e, { sectors: r })));
}
var g2 = {
angleAxisId: 0,
@@ -65548,7 +65780,7 @@ var g2 = {
radiusAxisId: 0,
zIndex: RK.bar
};
-function VFe(e) {
+function GFe(e) {
var { displayedData: t, stackedData: n, dataStartIndex: r, stackedDomain: i, dataKey: a, baseValue: o, layout: s, radiusAxis: c, radiusAxisTicks: l, bandSize: u, pos: d, angleAxis: f, minPointSize: p, cx: m, cy: h, angleAxisTicks: g, cells: _, startAngle: v, endAngle: y } = e;
return g == null || l == null ? h2 : (t ?? []).map((e, t) => {
var b, x, S, C, w, T;
@@ -65564,7 +65796,7 @@ function VFe(e) {
S = x + d.size;
var E = w - C;
if (Math.abs(p) > 0 && Math.abs(E) < Math.abs(p)) {
- var D = pz(E || p) * (Math.abs(p) - Math.abs(E));
+ var D = fz(E || p) * (Math.abs(p) - Math.abs(E));
w += D;
}
T = { background: {
@@ -65587,7 +65819,7 @@ function VFe(e) {
w = C + d.size;
var O = S - x;
if (Math.abs(p) > 0 && Math.abs(O) < Math.abs(p)) {
- var k = pz(O || p) * (Math.abs(p) - Math.abs(O));
+ var k = fz(O || p) * (Math.abs(p) - Math.abs(O));
S += k;
}
}
@@ -65604,7 +65836,7 @@ function VFe(e) {
});
}
function _2(e) {
- var t = Fz(e, g2);
+ var t = Pz(e, g2);
return /*#__PURE__*/ B.createElement(g0, {
id: t.id,
type: "radialBar"
@@ -65620,7 +65852,7 @@ function _2(e) {
barSize: t.barSize,
minPointSize: t.minPointSize,
maxBarSize: t.maxBarSize
- }), /*#__PURE__*/ B.createElement(LFe, t), /*#__PURE__*/ B.createElement(BFe, d2({}, t, { id: e }))));
+ }), /*#__PURE__*/ B.createElement(VFe, t), /*#__PURE__*/ B.createElement(WFe, d2({}, t, { id: e }))));
}
_2.displayName = "RadialBar";
//#endregion
@@ -65651,7 +65883,7 @@ var v2 = (e) => {
reducers: { setBrushSettings(e, t) {
return t.payload == null ? y2 : t.payload;
} }
-}), { setBrushSettings: HFe } = b2.actions, UFe = b2.reducer, WFe = (e, t) => {
+}), { setBrushSettings: KFe } = b2.actions, qFe = b2.reducer, JFe = (e, t) => {
var { x: n, y: r } = e, { x: i, y: a } = t;
return {
x: Math.min(n, i),
@@ -65659,9 +65891,9 @@ var v2 = (e) => {
width: Math.abs(i - n),
height: Math.abs(a - r)
};
-}, GFe = (e) => {
+}, YFe = (e) => {
var { x1: t, y1: n, x2: r, y2: i } = e;
- return WFe({
+ return JFe({
x: t,
y: n
}, {
@@ -65669,11 +65901,11 @@ var v2 = (e) => {
y: i
});
};
-function KFe(e) {
+function XFe(e) {
return (e % 180 + 180) % 180;
}
-var qFe = function(e) {
- var { width: t, height: n } = e, r = KFe(arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0) * Math.PI / 180, i = Math.atan(n / t), a = r > i && r < Math.PI - i ? n / Math.sin(r) : t / Math.cos(r);
+var ZFe = function(e) {
+ var { width: t, height: n } = e, r = XFe(arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0) * Math.PI / 180, i = Math.atan(n / t), a = r > i && r < Math.PI - i ? n / Math.sin(r) : t / Math.cos(r);
return Math.abs(a);
}, x2 = FH({
name: "referenceElements",
@@ -65705,8 +65937,8 @@ var qFe = function(e) {
n !== -1 && e.lines.splice(n, 1);
}
}
-}), { addDot: JFe, removeDot: YFe, addArea: XFe, removeArea: ZFe, addLine: QFe, removeLine: $Fe } = x2.actions, eIe = x2.reducer, S2 = /*#__PURE__*/ (0, B.createContext)(void 0), tIe = (e) => {
- var { children: t } = e, [n] = (0, B.useState)(`${_z("recharts")}-clip`), r = D0();
+}), { addDot: QFe, removeDot: $Fe, addArea: eIe, removeArea: tIe, addLine: nIe, removeLine: rIe } = x2.actions, iIe = x2.reducer, S2 = /*#__PURE__*/ (0, B.createContext)(void 0), aIe = (e) => {
+ var { children: t } = e, [n] = (0, B.useState)(`${gz("recharts")}-clip`), r = D0();
if (r == null) return null;
var { x: i, y: a, width: o, height: s } = r;
return /*#__PURE__*/ B.createElement(S2.Provider, { value: n }, /*#__PURE__*/ B.createElement("defs", null, /*#__PURE__*/ B.createElement("clipPath", { id: n }, /*#__PURE__*/ B.createElement("rect", {
@@ -65715,7 +65947,7 @@ var qFe = function(e) {
height: s,
width: o
}))), t);
-}, nIe = () => (0, B.useContext)(S2), rIe = class {
+}, oIe = () => (0, B.useContext)(S2), sIe = class {
constructor(e) {
var { x: t, y: n } = e;
this.xAxisScale = t, this.yAxisScale = n;
@@ -65755,26 +65987,26 @@ function w2(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? C2(Object(n), !0).forEach(function(t) {
- iIe(e, t, n[t]);
+ cIe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : C2(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function iIe(e, t, n) {
- return (t = aIe(t)) in e ? Object.defineProperty(e, t, {
+function cIe(e, t, n) {
+ return (t = lIe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function aIe(e) {
- var t = oIe(e, "string");
+function lIe(e) {
+ var t = uIe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function oIe(e, t) {
+function uIe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -65793,7 +66025,7 @@ function T2() {
return e;
}, T2.apply(null, arguments);
}
-var sIe = (e, t) => {
+var dIe = (e, t) => {
var n;
if (/*#__PURE__*/ B.isValidElement(e)) n = /*#__PURE__*/ B.cloneElement(e, t);
else if (typeof e == "function") n = e(t);
@@ -65802,7 +66034,7 @@ var sIe = (e, t) => {
n = /*#__PURE__*/ B.createElement("line", T2({}, t, { className: "recharts-reference-line-line" }));
}
return n;
-}, cIe = (e, t, n, r, i, a) => {
+}, fIe = (e, t, n, r, i, a) => {
var { x: o, width: s } = a, c = i.map(e, { position: n });
if (!uU(c) || t === "discard" && !i.isInRange(c)) return null;
var l = [{
@@ -65813,7 +66045,7 @@ var sIe = (e, t) => {
y: c
}];
return r === "left" ? l.reverse() : l;
-}, lIe = (e, t, n, r, i, a) => {
+}, pIe = (e, t, n, r, i, a) => {
var { y: o, height: s } = a, c = i.map(e, { position: n });
if (!uU(c) || t === "discard" && !i.isInRange(c)) return null;
var l = [{
@@ -65824,7 +66056,7 @@ var sIe = (e, t) => {
y: o
}];
return r === "top" ? l.reverse() : l;
-}, uIe = (e, t, n, r) => {
+}, mIe = (e, t, n, r) => {
var i = [r.mapWithFallback(e[0], {
position: n,
fallback: "rangeMin"
@@ -65833,43 +66065,43 @@ var sIe = (e, t) => {
fallback: "rangeMax"
})];
return t === "discard" && i.some((e) => !r.isInRange(e)) ? null : i;
-}, dIe = (e, t, n, r, i, a, o) => {
- var { x: s, y: c, segment: l, ifOverflow: u } = o, d = gz(s);
- return gz(c) ? cIe(c, u, r, a, t, n) : d ? lIe(s, u, r, i, e, n) : l != null && l.length === 2 ? uIe(l, u, r, new rIe({
+}, hIe = (e, t, n, r, i, a, o) => {
+ var { x: s, y: c, segment: l, ifOverflow: u } = o, d = hz(s);
+ return hz(c) ? fIe(c, u, r, a, t, n) : d ? pIe(s, u, r, i, e, n) : l != null && l.length === 2 ? mIe(l, u, r, new sIe({
x: e,
y: t
})) : null;
};
-function fIe(e) {
+function gIe(e) {
var t = CB();
- return (0, B.useEffect)(() => (t(QFe(e)), () => {
- t($Fe(e));
+ return (0, B.useEffect)(() => (t(nIe(e)), () => {
+ t(rIe(e));
})), null;
}
-function pIe(e) {
- var { xAxisId: t, yAxisId: n, shape: r, className: i, ifOverflow: a } = e, o = LU(), s = nIe(), c = Q((e) => jX(e, t)), l = Q((e) => PX(e, n)), u = Q((e) => jZ(e, "xAxis", t, o)), d = Q((e) => jZ(e, "yAxis", n, o)), f = ZU();
+function _Ie(e) {
+ var { xAxisId: t, yAxisId: n, shape: r, className: i, ifOverflow: a } = e, o = LU(), s = oIe(), c = Q((e) => jX(e, t)), l = Q((e) => PX(e, n)), u = Q((e) => jZ(e, "xAxis", t, o)), d = Q((e) => jZ(e, "yAxis", n, o)), f = ZU();
if (!s || !f || c == null || l == null || u == null || d == null) return null;
- var p = dIe(u, d, f, e.position, c.orientation, l.orientation, e);
+ var p = hIe(u, d, f, e.position, c.orientation, l.orientation, e);
if (!p) return null;
var m = p[0], h = p[1];
if (m == null || h == null) return null;
- var { x: g, y: _ } = m, { x: v, y } = h, b = w2(w2({ clipPath: a === "hidden" ? `url(#${s})` : void 0 }, sR(e)), {}, {
+ var { x: g, y: _ } = m, { x: v, y } = h, b = w2(w2({ clipPath: a === "hidden" ? `url(#${s})` : void 0 }, oR(e)), {}, {
x1: g,
y1: _,
x2: v,
y2: y
- }), x = GFe({
+ }), x = YFe({
x1: g,
y1: _,
x2: v,
y2: y
});
- return /*#__PURE__*/ B.createElement($Q, { zIndex: e.zIndex }, /*#__PURE__*/ B.createElement(dR, { className: Jr("recharts-reference-line", i) }, sIe(r, b), /*#__PURE__*/ B.createElement(Y$, T2({}, x, {
+ return /*#__PURE__*/ B.createElement($Q, { zIndex: e.zIndex }, /*#__PURE__*/ B.createElement(uR, { className: Jr("recharts-reference-line", i) }, dIe(r, b), /*#__PURE__*/ B.createElement(Y$, T2({}, x, {
lowerWidth: x.width,
upperWidth: x.width
}), /*#__PURE__*/ B.createElement(r1, { label: e.label }), e.children)));
}
-var mIe = {
+var vIe = {
ifOverflow: "discard",
xAxisId: 0,
yAxisId: 0,
@@ -65882,15 +66114,15 @@ var mIe = {
zIndex: RK.line
};
function E2(e) {
- var t = Fz(e, mIe);
- return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(fIe, {
+ var t = Pz(e, vIe);
+ return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(gIe, {
yAxisId: t.yAxisId,
xAxisId: t.xAxisId,
ifOverflow: t.ifOverflow,
x: t.x,
y: t.y,
segment: t.segment
- }), /*#__PURE__*/ B.createElement(pIe, t));
+ }), /*#__PURE__*/ B.createElement(_Ie, t));
}
E2.displayName = "ReferenceLine";
//#endregion
@@ -65906,13 +66138,13 @@ function D2(e, t) {
}
//#endregion
//#region node_modules/recharts/es6/util/TickUtils.js
-function hIe(e, t, n) {
- return qFe({
+function yIe(e, t, n) {
+ return ZFe({
width: e.width + t.width,
height: e.height + t.height
}, n);
}
-function gIe(e, t, n) {
+function bIe(e, t, n) {
var r = n === "width", { x: i, y: a, width: o, height: s } = e;
return t === 1 ? {
start: r ? i : a,
@@ -65927,12 +66159,12 @@ function O2(e, t, n, r, i) {
var a = n();
return e * (t - e * a / 2 - r) >= 0 && e * (t + e * a / 2 - i) <= 0;
}
-function _Ie(e, t) {
+function xIe(e, t) {
return D2(e, t + 1);
}
//#endregion
//#region node_modules/recharts/es6/cartesian/getEquidistantTicks.js
-function vIe(e, t, n, r, i) {
+function SIe(e, t, n, r, i) {
for (var a = (r || []).slice(), { start: o, end: s } = t, c = 0, l = 1, u = o, d = function() {
var t = r?.[c];
if (t === void 0) return { v: D2(r, l) };
@@ -65941,7 +66173,7 @@ function vIe(e, t, n, r, i) {
}, f; l <= a.length;) if (f = d(), f) return f.v;
return [];
}
-function yIe(e, t, n, r, i) {
+function CIe(e, t, n, r, i) {
var a = (r || []).slice().length;
if (a === 0) return [];
for (var { start: o, end: s } = t, c = 1; c <= a; c++) {
@@ -65978,26 +66210,26 @@ function A2(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? k2(Object(n), !0).forEach(function(t) {
- bIe(e, t, n[t]);
+ wIe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : k2(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function bIe(e, t, n) {
- return (t = xIe(t)) in e ? Object.defineProperty(e, t, {
+function wIe(e, t, n) {
+ return (t = TIe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function xIe(e) {
- var t = SIe(e, "string");
+function TIe(e) {
+ var t = EIe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function SIe(e, t) {
+function EIe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -66007,7 +66239,7 @@ function SIe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-function CIe(e, t, n, r, i) {
+function DIe(e, t, n, r, i) {
for (var a = (r || []).slice(), o = a.length, { start: s } = t, { end: c } = t, l = function(t) {
var r = a[t];
if (r == null) return 1;
@@ -66020,7 +66252,7 @@ function CIe(e, t, n, r, i) {
}, u = o - 1; u >= 0; u--) if (l(u)) continue;
return a;
}
-function wIe(e, t, n, r, i, a) {
+function OIe(e, t, n, r, i, a) {
var o = (r || []).slice(), s = o.length, { start: c, end: l } = t;
if (a) {
var u = r[s - 1];
@@ -66044,7 +66276,7 @@ function wIe(e, t, n, r, i, a) {
function j2(e, t, n) {
var { tick: r, ticks: i, viewBox: a, minTickGap: o, orientation: s, interval: c, tickFormatter: l, unit: u, angle: d } = e;
if (!i || !i.length || !r) return [];
- if (Z(c) || dG.isSsr) return _Ie(i, Z(c) ? c : 0) ?? [];
+ if (Z(c) || dG.isSsr) return xIe(i, Z(c) ? c : 0) ?? [];
var f = [], p = s === "top" || s === "bottom" ? "width" : "height", m = u && p === "width" ? S$(u, {
fontSize: t,
letterSpacing: n
@@ -66053,19 +66285,19 @@ function j2(e, t, n) {
height: 0
}, h = (e, r) => {
var i = typeof l == "function" ? l(e.value, r) : e.value;
- return p === "width" ? hIe(S$(i, {
+ return p === "width" ? yIe(S$(i, {
fontSize: t,
letterSpacing: n
}), m, d) : S$(i, {
fontSize: t,
letterSpacing: n
})[p];
- }, g = i[0], _ = i[1], v = i.length >= 2 && g != null && _ != null ? pz(_.coordinate - g.coordinate) : 1, y = gIe(a, v, p);
- return c === "equidistantPreserveStart" ? vIe(v, y, h, i, o) : c === "equidistantPreserveEnd" ? yIe(v, y, h, i, o) : (f = c === "preserveStart" || c === "preserveStartEnd" ? wIe(v, y, h, i, o, c === "preserveStartEnd") : CIe(v, y, h, i, o), f.filter((e) => e.isShow));
+ }, g = i[0], _ = i[1], v = i.length >= 2 && g != null && _ != null ? fz(_.coordinate - g.coordinate) : 1, y = bIe(a, v, p);
+ return c === "equidistantPreserveStart" ? SIe(v, y, h, i, o) : c === "equidistantPreserveEnd" ? CIe(v, y, h, i, o) : (f = c === "preserveStart" || c === "preserveStartEnd" ? OIe(v, y, h, i, o, c === "preserveStartEnd") : DIe(v, y, h, i, o), f.filter((e) => e.isShow));
}
//#endregion
//#region node_modules/recharts/es6/util/YAxisUtils.js
-var TIe = (e) => {
+var kIe = (e) => {
var { ticks: t, label: n, labelGapWithTick: r = 5, tickSize: i = 0, tickMargin: a = 0 } = e, o = 0;
if (t) {
Array.from(t).forEach((e) => {
@@ -66094,7 +66326,7 @@ var TIe = (e) => {
delete e[n][r];
}
}
-}), { setRenderedTicks: EIe, removeRenderedTicks: DIe } = M2.actions, OIe = M2.reducer, kIe = [
+}), { setRenderedTicks: AIe, removeRenderedTicks: jIe } = M2.actions, MIe = M2.reducer, NIe = [
"axisLine",
"width",
"height",
@@ -66104,16 +66336,16 @@ var TIe = (e) => {
"axisType",
"axisId"
];
-function AIe(e, t) {
+function PIe(e, t) {
if (e == null) return {};
- var n, r, i = jIe(e, t);
+ var n, r, i = FIe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function jIe(e, t) {
+function FIe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -66145,26 +66377,26 @@ function F2(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? P2(Object(n), !0).forEach(function(t) {
- MIe(e, t, n[t]);
+ IIe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : P2(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function MIe(e, t, n) {
- return (t = NIe(t)) in e ? Object.defineProperty(e, t, {
+function IIe(e, t, n) {
+ return (t = LIe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function NIe(e) {
- var t = PIe(e, "string");
+function LIe(e) {
+ var t = RIe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function PIe(e, t) {
+function RIe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -66198,10 +66430,10 @@ var I2 = {
interval: "preserveEnd",
zIndex: RK.axis
};
-function FIe(e) {
+function zIe(e) {
var { x: t, y: n, width: r, height: i, orientation: a, mirror: o, axisLine: s, otherSvgProps: c } = e;
if (!s) return null;
- var l = F2(F2(F2({}, c), aR(s)), {}, { fill: "none" });
+ var l = F2(F2(F2({}, c), iR(s)), {}, { fill: "none" });
if (a === "top" || a === "bottom") {
var u = +(a === "top" && !o || a === "bottom" && o);
l = F2(F2({}, l), {}, {
@@ -66219,9 +66451,9 @@ function FIe(e) {
y2: n + i
});
}
- return /*#__PURE__*/ B.createElement("line", N2({}, l, { className: Jr("recharts-cartesian-axis-line", uz(s, "className")) }));
+ return /*#__PURE__*/ B.createElement("line", N2({}, l, { className: Jr("recharts-cartesian-axis-line", lz(s, "className")) }));
}
-function IIe(e, t, n, r, i, a, o, s, c) {
+function BIe(e, t, n, r, i, a, o, s, c) {
var l, u, d, f, p, m, h = s ? -1 : 1, g = e.tickSize || o, _ = Z(e.tickCoord) ? e.tickCoord : e.coordinate;
switch (a) {
case "top":
@@ -66248,14 +66480,14 @@ function IIe(e, t, n, r, i, a, o, s, c) {
}
};
}
-function LIe(e, t) {
+function VIe(e, t) {
switch (e) {
case "left": return t ? "start" : "end";
case "right": return t ? "end" : "start";
default: return "middle";
}
}
-function RIe(e, t) {
+function HIe(e, t) {
switch (e) {
case "left":
case "right": return "middle";
@@ -66263,7 +66495,7 @@ function RIe(e, t) {
default: return t ? "end" : "start";
}
}
-function zIe(e) {
+function UIe(e) {
var { option: t, tickProps: n, value: r } = e, i, a = Jr(n.className, "recharts-cartesian-axis-tick-value");
if (/*#__PURE__*/ B.isValidElement(t)) i = /*#__PURE__*/ B.cloneElement(t, F2(F2({}, n), {}, { className: a }));
else if (typeof t == "function") i = t(F2(F2({}, n), {}, { className: a }));
@@ -66273,9 +66505,9 @@ function zIe(e) {
}
return i;
}
-function BIe(e) {
+function WIe(e) {
var { ticks: t, axisType: n, axisId: r } = e, i = CB();
- return (0, B.useEffect)(() => r == null || n == null ? Tz : (i(EIe({
+ return (0, B.useEffect)(() => r == null || n == null ? wz : (i(AIe({
ticks: t.map((e) => ({
value: e.value,
coordinate: e.coordinate,
@@ -66285,7 +66517,7 @@ function BIe(e) {
axisId: r,
axisType: n
})), () => {
- i(DIe({
+ i(jIe({
axisId: r,
axisType: n
}));
@@ -66296,15 +66528,15 @@ function BIe(e) {
n
]), null;
}
-var VIe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
- var { ticks: n = [], tick: r, tickLine: i, stroke: a, tickFormatter: o, unit: s, padding: c, tickTextProps: l, orientation: u, mirror: d, x: f, y: p, width: m, height: h, tickSize: g, tickMargin: _, fontSize: v, letterSpacing: y, getTicksConfig: b, events: x, axisType: S, axisId: C } = e, w = j2(F2(F2({}, b), {}, { ticks: n }), v, y), T = aR(b), E = oR(r), D = F$(T.textAnchor) ? T.textAnchor : LIe(u, d), O = RIe(u, d), k = {};
+var GIe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
+ var { ticks: n = [], tick: r, tickLine: i, stroke: a, tickFormatter: o, unit: s, padding: c, tickTextProps: l, orientation: u, mirror: d, x: f, y: p, width: m, height: h, tickSize: g, tickMargin: _, fontSize: v, letterSpacing: y, getTicksConfig: b, events: x, axisType: S, axisId: C } = e, w = j2(F2(F2({}, b), {}, { ticks: n }), v, y), T = iR(b), E = aR(r), D = F$(T.textAnchor) ? T.textAnchor : VIe(u, d), O = HIe(u, d), k = {};
typeof i == "object" && (k = i);
- var A = F2(F2({}, T), {}, { fill: "none" }, k), j = w.map((e) => F2({ entry: e }, IIe(e, f, p, m, h, u, g, d, _))), M = j.map((e) => {
+ var A = F2(F2({}, T), {}, { fill: "none" }, k), j = w.map((e) => F2({ entry: e }, BIe(e, f, p, m, h, u, g, d, _))), M = j.map((e) => {
var { entry: t, line: n } = e;
- return /*#__PURE__*/ B.createElement(dR, {
+ return /*#__PURE__*/ B.createElement(uR, {
className: "recharts-cartesian-axis-tick",
key: `tick-${t.value}-${t.coordinate}-${t.tickCoord}`
- }, i && /*#__PURE__*/ B.createElement("line", N2({}, A, n, { className: Jr("recharts-cartesian-axis-tick-line", uz(i, "className")) })));
+ }, i && /*#__PURE__*/ B.createElement("line", N2({}, A, n, { className: Jr("recharts-cartesian-axis-tick-line", lz(i, "className")) })));
}), N = j.map((e, t) => {
var { entry: n, tick: i } = e, u = F2(F2({}, F2(F2(F2(F2({ verticalAnchor: O }, T), {}, {
textAnchor: D,
@@ -66317,16 +66549,16 @@ var VIe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
tickFormatter: o,
padding: c
}, l), {}, { angle: l?.angle ?? T.angle ?? 0 })), E);
- return /*#__PURE__*/ B.createElement(dR, N2({
+ return /*#__PURE__*/ B.createElement(uR, N2({
className: "recharts-cartesian-axis-tick-label",
key: `tick-label-${n.value}-${n.coordinate}-${n.tickCoord}`
- }, Nz(x, n, t)), r && /*#__PURE__*/ B.createElement(zIe, {
+ }, Mz(x, n, t)), r && /*#__PURE__*/ B.createElement(UIe, {
option: r,
tickProps: u,
value: `${typeof o == "function" ? o(n.value, t) : n.value}${s || ""}`
}));
});
- return /*#__PURE__*/ B.createElement("g", { className: `recharts-cartesian-axis-ticks recharts-${S}-ticks` }, /*#__PURE__*/ B.createElement(BIe, {
+ return /*#__PURE__*/ B.createElement("g", { className: `recharts-cartesian-axis-ticks recharts-${S}-ticks` }, /*#__PURE__*/ B.createElement(WIe, {
ticks: w,
axisId: C,
axisType: S
@@ -66334,9 +66566,9 @@ var VIe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
className: `recharts-cartesian-axis-tick-labels recharts-${S}-tick-labels`,
ref: t
}, N)), M.length > 0 && /*#__PURE__*/ B.createElement("g", { className: `recharts-cartesian-axis-tick-lines recharts-${S}-tick-lines` }, M));
-}), HIe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
- var { axisLine: n, width: r, height: i, className: a, hide: o, ticks: s, axisType: c, axisId: l } = e, u = AIe(e, kIe), [d, f] = (0, B.useState)(""), [p, m] = (0, B.useState)(""), h = (0, B.useRef)(null);
- (0, B.useImperativeHandle)(t, () => ({ getCalculatedWidth: () => TIe({
+}), KIe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
+ var { axisLine: n, width: r, height: i, className: a, hide: o, ticks: s, axisType: c, axisId: l } = e, u = PIe(e, NIe), [d, f] = (0, B.useState)(""), [p, m] = (0, B.useState)(""), h = (0, B.useRef)(null);
+ (0, B.useImperativeHandle)(t, () => ({ getCalculatedWidth: () => kIe({
ticks: h.current,
label: e.labelRef?.current,
labelGapWithTick: 5,
@@ -66354,7 +66586,7 @@ var VIe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
}
}
}, [d, p]);
- return o || r != null && r <= 0 || i != null && i <= 0 ? null : /*#__PURE__*/ B.createElement($Q, { zIndex: e.zIndex }, /*#__PURE__*/ B.createElement(dR, { className: Jr("recharts-cartesian-axis", a) }, /*#__PURE__*/ B.createElement(FIe, {
+ return o || r != null && r <= 0 || i != null && i <= 0 ? null : /*#__PURE__*/ B.createElement($Q, { zIndex: e.zIndex }, /*#__PURE__*/ B.createElement(uR, { className: Jr("recharts-cartesian-axis", a) }, /*#__PURE__*/ B.createElement(zIe, {
x: e.x,
y: e.y,
width: r,
@@ -66362,8 +66594,8 @@ var VIe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
orientation: e.orientation,
mirror: e.mirror,
axisLine: n,
- otherSvgProps: aR(e)
- }), /*#__PURE__*/ B.createElement(VIe, {
+ otherSvgProps: iR(e)
+ }), /*#__PURE__*/ B.createElement(GIe, {
ref: g,
axisType: c,
events: u,
@@ -66399,19 +66631,19 @@ var VIe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
labelRef: e.labelRef
}), e.children)));
}), L2 = /*#__PURE__*/ B.forwardRef((e, t) => {
- var n = Fz(e, I2);
- return /*#__PURE__*/ B.createElement(HIe, N2({}, n, { ref: t }));
+ var n = Pz(e, I2);
+ return /*#__PURE__*/ B.createElement(KIe, N2({}, n, { ref: t }));
});
L2.displayName = "CartesianAxis";
//#endregion
//#region node_modules/recharts/es6/cartesian/CartesianGrid.js
-var UIe = [
+var qIe = [
"x1",
"y1",
"x2",
"y2",
"key"
-], WIe = ["offset"], GIe = ["xAxisId", "yAxisId"], KIe = ["xAxisId", "yAxisId"];
+], JIe = ["offset"], YIe = ["xAxisId", "yAxisId"], XIe = ["xAxisId", "yAxisId"];
function R2(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
@@ -66426,26 +66658,26 @@ function z2(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? R2(Object(n), !0).forEach(function(t) {
- qIe(e, t, n[t]);
+ ZIe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : R2(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function qIe(e, t, n) {
- return (t = JIe(t)) in e ? Object.defineProperty(e, t, {
+function ZIe(e, t, n) {
+ return (t = QIe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function JIe(e) {
- var t = YIe(e, "string");
+function QIe(e) {
+ var t = $Ie(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function YIe(e, t) {
+function $Ie(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -66466,14 +66698,14 @@ function B2() {
}
function V2(e, t) {
if (e == null) return {};
- var n, r, i = XIe(e, t);
+ var n, r, i = eLe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function XIe(e, t) {
+function eLe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -66482,7 +66714,7 @@ function XIe(e, t) {
}
return n;
}
-var ZIe = (e) => {
+var tLe = (e) => {
var { fill: t } = e;
if (!t || t === "none") return null;
var { fillOpacity: n, x: r, y: i, width: a, height: o, ry: s } = e;
@@ -66503,7 +66735,7 @@ function H2(e) {
if (/*#__PURE__*/ B.isValidElement(t)) r = /*#__PURE__*/ B.cloneElement(t, n);
else if (typeof t == "function") r = t(n);
else {
- var { x1: i, y1: a, x2: o, y2: s, key: c } = n, l = aR(V2(n, UIe)) ?? {}, { offset: u } = l, d = V2(l, WIe);
+ var { x1: i, y1: a, x2: o, y2: s, key: c } = n, l = iR(V2(n, qIe)) ?? {}, { offset: u } = l, d = V2(l, JIe);
r = /*#__PURE__*/ B.createElement("line", B2({}, d, {
x1: i,
y1: a,
@@ -66515,10 +66747,10 @@ function H2(e) {
}
return r;
}
-function QIe(e) {
+function nLe(e) {
var { x: t, width: n, horizontal: r = !0, horizontalPoints: i } = e;
if (!r || !i || !i.length) return null;
- var { xAxisId: a, yAxisId: o } = e, s = V2(e, GIe), c = i.map((e, i) => {
+ var { xAxisId: a, yAxisId: o } = e, s = V2(e, YIe), c = i.map((e, i) => {
var a = z2(z2({}, s), {}, {
x1: t,
y1: e,
@@ -66535,10 +66767,10 @@ function QIe(e) {
});
return /*#__PURE__*/ B.createElement("g", { className: "recharts-cartesian-grid-horizontal" }, c);
}
-function $Ie(e) {
+function rLe(e) {
var { y: t, height: n, vertical: r = !0, verticalPoints: i } = e;
if (!r || !i || !i.length) return null;
- var { xAxisId: a, yAxisId: o } = e, s = V2(e, KIe), c = i.map((e, i) => {
+ var { xAxisId: a, yAxisId: o } = e, s = V2(e, XIe), c = i.map((e, i) => {
var a = z2(z2({}, s), {}, {
x1: e,
y1: t,
@@ -66555,7 +66787,7 @@ function $Ie(e) {
});
return /*#__PURE__*/ B.createElement("g", { className: "recharts-cartesian-grid-vertical" }, c);
}
-function eLe(e) {
+function iLe(e) {
var { horizontalFill: t, fillOpacity: n, x: r, y: i, width: a, height: o, horizontalPoints: s, horizontal: c = !0 } = e;
if (!c || !t || !t.length || s == null) return null;
var l = s.map((e) => Math.round(e + i - i)).sort((e, t) => e - t);
@@ -66578,7 +66810,7 @@ function eLe(e) {
});
return /*#__PURE__*/ B.createElement("g", { className: "recharts-cartesian-gridstripes-horizontal" }, u);
}
-function tLe(e) {
+function aLe(e) {
var { vertical: t = !0, verticalFill: n, fillOpacity: r, x: i, y: a, width: o, height: s, verticalPoints: c } = e;
if (!t || !n || !n.length) return null;
var l = c.map((e) => Math.round(e + i - i)).sort((e, t) => e - t);
@@ -66601,7 +66833,7 @@ function tLe(e) {
});
return /*#__PURE__*/ B.createElement("g", { className: "recharts-cartesian-gridstripes-vertical" }, u);
}
-var nLe = (e, t) => {
+var oLe = (e, t) => {
var { xAxis: n, width: r, height: i, offset: a } = e;
return gU(j2(z2(z2(z2({}, I2), n), {}, {
ticks: _U(n, !0),
@@ -66612,7 +66844,7 @@ var nLe = (e, t) => {
height: i
}
})), a.left, a.left + a.width, t);
-}, rLe = (e, t) => {
+}, sLe = (e, t) => {
var { yAxis: n, width: r, height: i, offset: a } = e;
return gU(j2(z2(z2(z2({}, I2), n), {}, {
ticks: _U(n, !0),
@@ -66623,7 +66855,7 @@ var nLe = (e, t) => {
height: i
}
})), a.top, a.top + a.height, t);
-}, iLe = {
+}, cLe = {
horizontal: !0,
vertical: !0,
horizontalPoints: [],
@@ -66638,14 +66870,14 @@ var nLe = (e, t) => {
zIndex: RK.grid
};
function U2(e) {
- var t = $U(), n = eW(), r = QU(), i = z2(z2({}, Fz(e, iLe)), {}, {
+ var t = $U(), n = eW(), r = QU(), i = z2(z2({}, Pz(e, cLe)), {}, {
x: Z(e.x) ? e.x : r.left,
y: Z(e.y) ? e.y : r.top,
width: Z(e.width) ? e.width : r.width,
height: Z(e.height) ? e.height : r.height
}), { xAxisId: a, yAxisId: o, x: s, y: c, width: l, height: u, syncWithTicks: d, horizontalValues: f, verticalValues: p } = i, m = LU(), h = Q((e) => VZ(e, "xAxis", a, m)), g = Q((e) => VZ(e, "yAxis", o, m));
if (!dU(l) || !dU(u) || !Z(s) || !Z(c)) return null;
- var _ = i.verticalCoordinatesGenerator || nLe, v = i.horizontalCoordinatesGenerator || rLe, { horizontalPoints: y, verticalPoints: b } = i;
+ var _ = i.verticalCoordinatesGenerator || oLe, v = i.horizontalCoordinatesGenerator || sLe, { horizontalPoints: y, verticalPoints: b } = i;
if ((!y || !y.length) && typeof v == "function") {
var x = f && f.length, S = v({
yAxis: g ? z2(z2({}, g), {}, { ticks: x ? f : g.ticks }) : void 0,
@@ -66664,7 +66896,7 @@ function U2(e) {
}, C ? !0 : d);
BU(Array.isArray(w), `verticalCoordinatesGenerator should return Array but instead it returned [${typeof w}]`), Array.isArray(w) && (b = w);
}
- return /*#__PURE__*/ B.createElement($Q, { zIndex: i.zIndex }, /*#__PURE__*/ B.createElement("g", { className: "recharts-cartesian-grid" }, /*#__PURE__*/ B.createElement(ZIe, {
+ return /*#__PURE__*/ B.createElement($Q, { zIndex: i.zIndex }, /*#__PURE__*/ B.createElement("g", { className: "recharts-cartesian-grid" }, /*#__PURE__*/ B.createElement(tLe, {
fill: i.fill,
fillOpacity: i.fillOpacity,
x: i.x,
@@ -66672,12 +66904,12 @@ function U2(e) {
width: i.width,
height: i.height,
ry: i.ry
- }), /*#__PURE__*/ B.createElement(eLe, B2({}, i, { horizontalPoints: y })), /*#__PURE__*/ B.createElement(tLe, B2({}, i, { verticalPoints: b })), /*#__PURE__*/ B.createElement(QIe, B2({}, i, {
+ }), /*#__PURE__*/ B.createElement(iLe, B2({}, i, { horizontalPoints: y })), /*#__PURE__*/ B.createElement(aLe, B2({}, i, { verticalPoints: b })), /*#__PURE__*/ B.createElement(nLe, B2({}, i, {
offset: r,
horizontalPoints: y,
xAxis: h,
yAxis: g
- })), /*#__PURE__*/ B.createElement($Ie, B2({}, i, {
+ })), /*#__PURE__*/ B.createElement(rLe, B2({}, i, {
offset: r,
verticalPoints: b,
xAxis: h,
@@ -66704,17 +66936,17 @@ var W2 = FH({
e[n] && (e[n] = e[n].filter((e) => e.dataKey !== r.dataKey || e.direction !== r.direction));
}
}
-}), { addErrorBar: aLe, replaceErrorBar: oLe, removeErrorBar: sLe } = W2.actions, cLe = W2.reducer, lLe = ["children"];
-function uLe(e, t) {
+}), { addErrorBar: lLe, replaceErrorBar: uLe, removeErrorBar: dLe } = W2.actions, fLe = W2.reducer, pLe = ["children"];
+function mLe(e, t) {
if (e == null) return {};
- var n, r, i = dLe(e, t);
+ var n, r, i = hLe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function dLe(e, t) {
+function hLe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -66723,7 +66955,7 @@ function dLe(e, t) {
}
return n;
}
-var fLe = /*#__PURE__*/ (0, B.createContext)({
+var gLe = /*#__PURE__*/ (0, B.createContext)({
data: [],
xAxisId: "xAxis-0",
yAxisId: "yAxis-0",
@@ -66735,8 +66967,8 @@ var fLe = /*#__PURE__*/ (0, B.createContext)({
errorBarOffset: 0
});
function G2(e) {
- var { children: t } = e, n = uLe(e, lLe);
- return /*#__PURE__*/ B.createElement(fLe.Provider, { value: n }, t);
+ var { children: t } = e, n = mLe(e, pLe);
+ return /*#__PURE__*/ B.createElement(gLe.Provider, { value: n }, t);
}
//#endregion
//#region node_modules/recharts/es6/cartesian/GraphicalItemClipPath.js
@@ -66761,30 +66993,30 @@ function q2(e) {
}
//#endregion
//#region node_modules/recharts/es6/state/selectors/lineSelectors.js
-var J2 = (e, t, n, r) => KZ(e, "xAxis", t, r), Y2 = (e, t, n, r) => GZ(e, "xAxis", t, r), X2 = (e, t, n, r) => KZ(e, "yAxis", n, r), Z2 = (e, t, n, r) => GZ(e, "yAxis", n, r), pLe = $([
+var J2 = (e, t, n, r) => KZ(e, "xAxis", t, r), Y2 = (e, t, n, r) => GZ(e, "xAxis", t, r), X2 = (e, t, n, r) => KZ(e, "yAxis", n, r), Z2 = (e, t, n, r) => GZ(e, "yAxis", n, r), _Le = $([
tW,
J2,
X2,
Y2,
Z2
-], (e, t, n, r, i) => hU(e, "xAxis") ? TU(t, r, !1) : TU(n, i, !1)), mLe = (e, t, n, r, i) => i;
-function hLe(e) {
+], (e, t, n, r, i) => hU(e, "xAxis") ? TU(t, r, !1) : TU(n, i, !1)), vLe = (e, t, n, r, i) => i;
+function yLe(e) {
return e.type === "line";
}
-var gLe = $([
+var bLe = $([
tW,
J2,
X2,
Y2,
Z2,
- $([BX, mLe], (e, t) => e.filter(hLe).find((e) => e.id === t)),
- pLe,
+ $([BX, vLe], (e, t) => e.filter(yLe).find((e) => e.id === t)),
+ _Le,
mK
], (e, t, n, r, i, a, o, s) => {
var { chartData: c, dataStartIndex: l, dataEndIndex: u } = s;
if (!(a == null || t == null || n == null || r == null || i == null || r.length === 0 || i.length === 0 || o == null || e !== "horizontal" && e !== "vertical")) {
var { dataKey: d, data: f } = a, p = f != null && f.length > 0 ? f : c?.slice(l, u + 1);
- if (p != null) return ILe({
+ if (p != null) return BLe({
layout: e,
xAxis: t,
yAxis: n,
@@ -66799,7 +67031,7 @@ var gLe = $([
//#endregion
//#region node_modules/recharts/es6/util/getRadiusAndStrokeWidthFromDot.js
function Q2(e) {
- var t = oR(e), n = 3, r = 2;
+ var t = aR(e), n = 3, r = 2;
if (t != null) {
var { r: i, strokeWidth: a } = t, o = Number(i), s = Number(a);
return (Number.isNaN(o) || o < 0) && (o = n), (Number.isNaN(s) || s < 0) && (s = r), {
@@ -66814,13 +67046,13 @@ function Q2(e) {
}
//#endregion
//#region node_modules/recharts/es6/cartesian/Line.js
-var _Le = ["id"], vLe = [
+var xLe = ["id"], SLe = [
"type",
"layout",
"connectNulls",
"needClip",
"shape"
-], yLe = [
+], CLe = [
"activeDot",
"animateNewValues",
"animationBegin",
@@ -66859,26 +67091,26 @@ function t4(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? e4(Object(n), !0).forEach(function(t) {
- bLe(e, t, n[t]);
+ wLe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : e4(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function bLe(e, t, n) {
- return (t = xLe(t)) in e ? Object.defineProperty(e, t, {
+function wLe(e, t, n) {
+ return (t = TLe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function xLe(e) {
- var t = SLe(e, "string");
+function TLe(e) {
+ var t = ELe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function SLe(e, t) {
+function ELe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -66890,14 +67122,14 @@ function SLe(e, t) {
}
function n4(e, t) {
if (e == null) return {};
- var n, r, i = CLe(e, t);
+ var n, r, i = DLe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function CLe(e, t) {
+function DLe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -66906,7 +67138,7 @@ function CLe(e, t) {
}
return n;
}
-var wLe = (e) => {
+var OLe = (e) => {
var { dataKey: t, name: n, stroke: r, legendType: i, hide: a } = e;
return [{
inactive: a,
@@ -66916,10 +67148,10 @@ var wLe = (e) => {
value: DU(n, t),
payload: e
}];
-}, TLe = /*#__PURE__*/ B.memo((e) => {
+}, kLe = /*#__PURE__*/ B.memo((e) => {
var { dataKey: t, data: n, stroke: r, strokeWidth: i, fill: a, name: o, hide: s, unit: c, tooltipType: l, id: u } = e, d = {
dataDefinedOnItem: n,
- getPosition: Tz,
+ getPosition: wz,
settings: {
stroke: r,
strokeWidth: i,
@@ -66936,11 +67168,11 @@ var wLe = (e) => {
};
return /*#__PURE__*/ B.createElement(p0, { tooltipEntrySettings: d });
}), r4 = (e, t) => `${t}px ${e}px`;
-function ELe(e, t) {
+function ALe(e, t) {
for (var n = e.length % 2 == 0 ? e : [...e, 0], r = [], i = 0; i < t; ++i) r.push(...n);
return r;
}
-var DLe = (e, t, n) => {
+var jLe = (e, t, n) => {
var r = n.reduce((e, t) => e + t, 0);
if (!r) return r4(t, e);
for (var i = Math.floor(e / r), a = e % r, o = [], s = 0, c = 0; s < n.length; c += (l = n[s]) ?? 0, ++s) {
@@ -66952,13 +67184,13 @@ var DLe = (e, t, n) => {
}
var d = o.length % 2 == 0 ? [0, t] : [t];
return [
- ...ELe(n, i),
+ ...ALe(n, i),
...o,
...d
].map((e) => `${e}px`).join(", ");
};
-function OLe(e) {
- var { clipPathId: t, points: n, props: r } = e, { dot: i, dataKey: a, needClip: o } = r, { id: s } = r, c = aR(n4(r, _Le));
+function MLe(e) {
+ var { clipPathId: t, points: n, props: r } = e, { dot: i, dataKey: a, needClip: o } = r, { id: s } = r, c = iR(n4(r, xLe));
return /*#__PURE__*/ B.createElement(C0, {
points: n,
dot: i,
@@ -66970,7 +67202,7 @@ function OLe(e) {
clipPathId: t
});
}
-function kLe(e) {
+function NLe(e) {
var { showLabels: t, children: n, points: r } = e, i = (0, B.useMemo)(() => r?.map((e) => {
var t = {
x: e.x ?? 0,
@@ -66991,7 +67223,7 @@ function kLe(e) {
return /*#__PURE__*/ B.createElement(s1, { value: t ? i : void 0 }, n);
}
function i4(e) {
- var { clipPathId: t, pathRef: n, points: r, strokeDasharray: i, props: a } = e, { type: o, layout: s, connectNulls: c, needClip: l, shape: u } = a, d = t4(t4({}, sR(n4(a, vLe))), {}, {
+ var { clipPathId: t, pathRef: n, points: r, strokeDasharray: i, props: a } = e, { type: o, layout: s, connectNulls: c, needClip: l, shape: u } = a, d = t4(t4({}, oR(n4(a, SLe))), {}, {
fill: "none",
className: "recharts-line-curve",
clipPath: l ? `url(#clipPath-${t})` : void 0,
@@ -67004,28 +67236,28 @@ function i4(e) {
return /*#__PURE__*/ B.createElement(B.Fragment, null, r?.length > 1 && /*#__PURE__*/ B.createElement(l0, $2({
shapeType: "curve",
option: u
- }, d, { pathRef: n })), /*#__PURE__*/ B.createElement(OLe, {
+ }, d, { pathRef: n })), /*#__PURE__*/ B.createElement(MLe, {
points: r,
clipPathId: t,
props: a
}));
}
-function ALe(e) {
+function PLe(e) {
try {
return e && e.getTotalLength && e.getTotalLength() || 0;
} catch {
return 0;
}
}
-function jLe(e) {
+function FLe(e) {
var { clipPathId: t, props: n, pathRef: r, previousPointsRef: i, longestAnimatedLengthRef: a } = e, { points: o, strokeDasharray: s, isAnimationActive: c, animationBegin: l, animationDuration: u, animationEasing: d, animateNewValues: f, width: p, height: m, onAnimationEnd: h, onAnimationStart: g } = n, _ = i.current, v = WG(o, "recharts-line-"), y = (0, B.useRef)(v), [b, x] = (0, B.useState)(!1), S = !b, C = (0, B.useCallback)(() => {
typeof h == "function" && h(), x(!1);
}, [h]), w = (0, B.useCallback)(() => {
typeof g == "function" && g(), x(!0);
- }, [g]), T = ALe(r.current), E = (0, B.useRef)(0);
+ }, [g]), T = PLe(r.current), E = (0, B.useRef)(0);
y.current !== v && (E.current = a.current, y.current = v);
var D = E.current;
- return /*#__PURE__*/ B.createElement(kLe, {
+ return /*#__PURE__*/ B.createElement(NLe, {
points: o,
showLabels: S
}, n.children, /*#__PURE__*/ B.createElement(UG, {
@@ -67038,20 +67270,20 @@ function jLe(e) {
onAnimationStart: w,
key: v
}, (e) => {
- var l = bz(D, T + D, e), u = Math.min(l, T), d = c ? s ? DLe(u, T, `${s}`.split(/[,\s]+/gim).map((e) => parseFloat(e))) : r4(T, u) : s == null ? void 0 : String(s);
+ var l = yz(D, T + D, e), u = Math.min(l, T), d = c ? s ? jLe(u, T, `${s}`.split(/[,\s]+/gim).map((e) => parseFloat(e))) : r4(T, u) : s == null ? void 0 : String(s);
if (e > 0 && T > 0 && (i.current = o, a.current = Math.max(a.current, u)), _) {
var h = _.length / o.length, g = e === 1 ? o : o.map((t, n) => {
var r = Math.floor(n * h);
if (_[r]) {
var i = _[r];
return t4(t4({}, t), {}, {
- x: bz(i.x, t.x, e),
- y: bz(i.y, t.y, e)
+ x: yz(i.x, t.x, e),
+ y: yz(i.y, t.y, e)
});
}
return f ? t4(t4({}, t), {}, {
- x: bz(p * 2, t.x, e),
- y: bz(m / 2, t.y, e)
+ x: yz(p * 2, t.x, e),
+ y: yz(m / 2, t.y, e)
}) : t4(t4({}, t), {}, {
x: t.x,
y: t.y
@@ -67074,9 +67306,9 @@ function jLe(e) {
});
}), /*#__PURE__*/ B.createElement(u1, { label: n.label }));
}
-function MLe(e) {
+function ILe(e) {
var { clipPathId: t, props: n } = e, r = (0, B.useRef)(null), i = (0, B.useRef)(0), a = (0, B.useRef)(null);
- return /*#__PURE__*/ B.createElement(jLe, {
+ return /*#__PURE__*/ B.createElement(FLe, {
props: n,
clipPathId: t,
previousPointsRef: r,
@@ -67084,17 +67316,17 @@ function MLe(e) {
pathRef: a
});
}
-var NLe = (e, t) => ({
+var LLe = (e, t) => ({
x: e.x ?? void 0,
y: e.y ?? void 0,
value: e.value,
errorVal: mU(e.payload, t)
-}), PLe = class extends B.Component {
+}), RLe = class extends B.Component {
render() {
var { hide: e, dot: t, points: n, className: r, xAxisId: i, yAxisId: a, top: o, left: s, width: c, height: l, id: u, needClip: d, zIndex: f } = this.props;
if (e) return null;
var p = Jr("recharts-line", r), m = u, { r: h, strokeWidth: g } = Q2(t), _ = e0(t), v = h * 2 + g, y = d ? `url(#clipPath-${_ ? "" : "dots-"}${m})` : void 0;
- return /*#__PURE__*/ B.createElement($Q, { zIndex: f }, /*#__PURE__*/ B.createElement(dR, { className: p }, d && /*#__PURE__*/ B.createElement("defs", null, /*#__PURE__*/ B.createElement(q2, {
+ return /*#__PURE__*/ B.createElement($Q, { zIndex: f }, /*#__PURE__*/ B.createElement(uR, { className: p }, d && /*#__PURE__*/ B.createElement("defs", null, /*#__PURE__*/ B.createElement(q2, {
clipPathId: m,
xAxisId: i,
yAxisId: a
@@ -67107,9 +67339,9 @@ var NLe = (e, t) => ({
xAxisId: i,
yAxisId: a,
data: n,
- dataPointFormatter: NLe,
+ dataPointFormatter: LLe,
errorBarOffset: 0
- }, /*#__PURE__*/ B.createElement(MLe, {
+ }, /*#__PURE__*/ B.createElement(ILe, {
props: this.props,
clipPathId: m
}))), /*#__PURE__*/ B.createElement(A0, {
@@ -67140,11 +67372,11 @@ var NLe = (e, t) => ({
zIndex: RK.line,
type: "linear"
};
-function FLe(e) {
- var t = Fz(e, a4), { activeDot: n, animateNewValues: r, animationBegin: i, animationDuration: a, animationEasing: o, connectNulls: s, dot: c, hide: l, isAnimationActive: u, label: d, legendType: f, xAxisId: p, yAxisId: m, id: h } = t, g = n4(t, yLe), { needClip: _ } = K2(p, m), v = D0(), y = nW(), b = LU(), x = Q((e) => gLe(e, p, m, b, h));
+function zLe(e) {
+ var t = Pz(e, a4), { activeDot: n, animateNewValues: r, animationBegin: i, animationDuration: a, animationEasing: o, connectNulls: s, dot: c, hide: l, isAnimationActive: u, label: d, legendType: f, xAxisId: p, yAxisId: m, id: h } = t, g = n4(t, CLe), { needClip: _ } = K2(p, m), v = D0(), y = nW(), b = LU(), x = Q((e) => bLe(e, p, m, b, h));
if (y !== "horizontal" && y !== "vertical" || x == null || v == null) return null;
var { height: S, width: C, x: w, y: T } = v;
- return /*#__PURE__*/ B.createElement(PLe, $2({}, g, {
+ return /*#__PURE__*/ B.createElement(RLe, $2({}, g, {
id: h,
connectNulls: s,
dot: c,
@@ -67168,7 +67400,7 @@ function FLe(e) {
needClip: _
}));
}
-function ILe(e) {
+function BLe(e) {
var { layout: t, xAxis: n, yAxis: r, xAxisTicks: i, yAxisTicks: a, dataKey: o, bandSize: s, displayedData: c } = e;
return c.map((e, c) => {
var l = mU(e, o);
@@ -67180,11 +67412,11 @@ function ILe(e) {
entry: e,
index: c
}),
- y: (Sz(l) ? null : r.scale.map(l)) ?? null,
+ y: (xz(l) ? null : r.scale.map(l)) ?? null,
value: l,
payload: e
};
- var u = Sz(l) ? null : n.scale.map(l), d = bU({
+ var u = xz(l) ? null : n.scale.map(l), d = bU({
axis: r,
ticks: a,
bandSize: s,
@@ -67199,12 +67431,12 @@ function ILe(e) {
};
}).filter(Boolean);
}
-function LLe(e) {
- var t = Fz(e, a4), n = LU();
+function VLe(e) {
+ var t = Pz(e, a4), n = LU();
return /*#__PURE__*/ B.createElement(g0, {
id: t.id,
type: "line"
- }, (e) => /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(m0, { legendPayload: wLe(t) }), /*#__PURE__*/ B.createElement(TLe, {
+ }, (e) => /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(m0, { legendPayload: OLe(t) }), /*#__PURE__*/ B.createElement(kLe, {
dataKey: t.dataKey,
data: t.data,
stroke: t.stroke,
@@ -67225,9 +67457,9 @@ function LLe(e) {
dataKey: t.dataKey,
hide: t.hide,
isPanorama: n
- }), /*#__PURE__*/ B.createElement(FLe, $2({}, t, { id: e }))));
+ }), /*#__PURE__*/ B.createElement(zLe, $2({}, t, { id: e }))));
}
-var o4 = /*#__PURE__*/ B.memo(LLe, eG);
+var o4 = /*#__PURE__*/ B.memo(VLe, eG);
o4.displayName = "Line";
//#endregion
//#region node_modules/recharts/es6/state/selectors/graphicalItemSelectors.js
@@ -67239,19 +67471,19 @@ function c4(e, t) {
}
//#endregion
//#region node_modules/recharts/es6/state/selectors/areaSelectors.js
-var l4 = (e, t, n) => KZ(e, "xAxis", s4(e, t), n), u4 = (e, t, n) => GZ(e, "xAxis", s4(e, t), n), d4 = (e, t, n) => KZ(e, "yAxis", c4(e, t), n), f4 = (e, t, n) => GZ(e, "yAxis", c4(e, t), n), RLe = $([
+var l4 = (e, t, n) => KZ(e, "xAxis", s4(e, t), n), u4 = (e, t, n) => GZ(e, "xAxis", s4(e, t), n), d4 = (e, t, n) => KZ(e, "yAxis", c4(e, t), n), f4 = (e, t, n) => GZ(e, "yAxis", c4(e, t), n), HLe = $([
tW,
l4,
d4,
u4,
f4
-], (e, t, n, r, i) => hU(e, "xAxis") ? TU(t, r, !1) : TU(n, i, !1)), p4 = $([BX, (e, t) => t], (e, t) => e.filter((e) => e.type === "area").find((e) => e.id === t)), m4 = (e) => hU(tW(e), "xAxis") ? "yAxis" : "xAxis", zLe = (e, t) => m4(e) === "yAxis" ? c4(e, t) : s4(e, t), BLe = $([
+], (e, t, n, r, i) => hU(e, "xAxis") ? TU(t, r, !1) : TU(n, i, !1)), p4 = $([BX, (e, t) => t], (e, t) => e.filter((e) => e.type === "area").find((e) => e.id === t)), m4 = (e) => hU(tW(e), "xAxis") ? "yAxis" : "xAxis", ULe = (e, t) => m4(e) === "yAxis" ? c4(e, t) : s4(e, t), WLe = $([
tW,
l4,
d4,
u4,
f4,
- $([p4, (e, t, n) => rZ(e, m4(e), zLe(e, t), n)], (e, t) => {
+ $([p4, (e, t, n) => rZ(e, m4(e), ULe(e, t), n)], (e, t) => {
if (e != null && t != null) {
var { stackId: n } = e, r = iq(e);
if (n != null && r != null) {
@@ -67261,14 +67493,14 @@ var l4 = (e, t, n) => KZ(e, "xAxis", s4(e, t), n), u4 = (e, t, n) => GZ(e, "xAxi
}
}),
hK,
- RLe,
+ HLe,
p4,
- iEe
+ cEe
], (e, t, n, r, i, a, o, s, c, l) => {
var { chartData: u, dataStartIndex: d, dataEndIndex: f } = o;
if (!(c == null || e !== "horizontal" && e !== "vertical" || t == null || n == null || r == null || i == null || r.length === 0 || i.length === 0 || s == null)) {
var { data: p } = c, m = p && p.length > 0 ? p : u?.slice(d, f + 1);
- if (m != null) return oRe({
+ if (m != null) return uRe({
layout: e,
xAxis: t,
yAxis: n,
@@ -67282,7 +67514,7 @@ var l4 = (e, t, n) => KZ(e, "xAxis", s4(e, t), n), u4 = (e, t, n) => GZ(e, "xAxi
bandSize: s
});
}
-}), VLe = ["id"], HLe = [
+}), GLe = ["id"], KLe = [
"activeDot",
"animationBegin",
"animationDuration",
@@ -67309,14 +67541,14 @@ function h4() {
}
function g4(e, t) {
if (e == null) return {};
- var n, r, i = ULe(e, t);
+ var n, r, i = qLe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function ULe(e, t) {
+function qLe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -67339,26 +67571,26 @@ function v4(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? _4(Object(n), !0).forEach(function(t) {
- WLe(e, t, n[t]);
+ JLe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : _4(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function WLe(e, t, n) {
- return (t = GLe(t)) in e ? Object.defineProperty(e, t, {
+function JLe(e, t, n) {
+ return (t = YLe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function GLe(e) {
- var t = KLe(e, "string");
+function YLe(e) {
+ var t = XLe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function KLe(e, t) {
+function XLe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -67371,7 +67603,7 @@ function KLe(e, t) {
function y4(e, t) {
return e && e !== "none" ? e : t;
}
-var qLe = (e) => {
+var ZLe = (e) => {
var { dataKey: t, name: n, stroke: r, fill: i, legendType: a, hide: o } = e;
return [{
inactive: o,
@@ -67381,10 +67613,10 @@ var qLe = (e) => {
value: DU(n, t),
payload: e
}];
-}, JLe = /*#__PURE__*/ B.memo((e) => {
+}, QLe = /*#__PURE__*/ B.memo((e) => {
var { dataKey: t, data: n, stroke: r, strokeWidth: i, fill: a, name: o, hide: s, unit: c, tooltipType: l, id: u } = e, d = {
dataDefinedOnItem: n,
- getPosition: Tz,
+ getPosition: wz,
settings: {
stroke: r,
strokeWidth: i,
@@ -67401,8 +67633,8 @@ var qLe = (e) => {
};
return /*#__PURE__*/ B.createElement(p0, { tooltipEntrySettings: d });
});
-function YLe(e) {
- var { clipPathId: t, points: n, props: r } = e, { needClip: i, dot: a, dataKey: o } = r, s = aR(r);
+function $Le(e) {
+ var { clipPathId: t, points: n, props: r } = e, { needClip: i, dot: a, dataKey: o } = r, s = iR(r);
return /*#__PURE__*/ B.createElement(C0, {
points: n,
dot: a,
@@ -67414,7 +67646,7 @@ function YLe(e) {
clipPathId: t
});
}
-function XLe(e) {
+function eRe(e) {
var { showLabels: t, children: n, points: r } = e, i = r.map((e) => {
var t = {
x: e.x ?? 0,
@@ -67435,8 +67667,8 @@ function XLe(e) {
return /*#__PURE__*/ B.createElement(s1, { value: t ? i : void 0 }, n);
}
function b4(e) {
- var { points: t, baseLine: n, needClip: r, clipPathId: i, props: a } = e, { layout: o, type: s, stroke: c, connectNulls: l, isRange: u } = a, { id: d } = a, f = g4(a, VLe), p = aR(f), m = sR(f);
- return /*#__PURE__*/ B.createElement(B.Fragment, null, t?.length > 1 && /*#__PURE__*/ B.createElement(dR, { clipPath: r ? `url(#clipPath-${i})` : void 0 }, /*#__PURE__*/ B.createElement(TG, h4({}, m, {
+ var { points: t, baseLine: n, needClip: r, clipPathId: i, props: a } = e, { layout: o, type: s, stroke: c, connectNulls: l, isRange: u } = a, { id: d } = a, f = g4(a, GLe), p = iR(f), m = oR(f);
+ return /*#__PURE__*/ B.createElement(B.Fragment, null, t?.length > 1 && /*#__PURE__*/ B.createElement(uR, { clipPath: r ? `url(#clipPath-${i})` : void 0 }, /*#__PURE__*/ B.createElement(TG, h4({}, m, {
id: d,
points: t,
connectNulls: l,
@@ -67459,13 +67691,13 @@ function b4(e) {
connectNulls: l,
fill: "none",
points: n
- }))), /*#__PURE__*/ B.createElement(YLe, {
+ }))), /*#__PURE__*/ B.createElement($Le, {
points: t,
props: f,
clipPathId: i
}));
}
-function ZLe(e) {
+function tRe(e) {
var { alpha: t, baseLine: n, points: r, strokeWidth: i } = e, a = r[0]?.y, o = r[r.length - 1]?.y;
if (!uU(a) || !uU(o)) return null;
var s = t * Math.abs(a - o), c = Math.max(...r.map((e) => e.x || 0));
@@ -67476,7 +67708,7 @@ function ZLe(e) {
height: Math.floor(s)
}) : null;
}
-function QLe(e) {
+function nRe(e) {
var { alpha: t, baseLine: n, points: r, strokeWidth: i } = e, a = r[0]?.x, o = r[r.length - 1]?.x;
if (!uU(a) || !uU(o)) return null;
var s = t * Math.abs(a - o), c = Math.max(...r.map((e) => e.y || 0));
@@ -67487,21 +67719,21 @@ function QLe(e) {
height: Math.floor(c + (i ? parseInt(`${i}`, 10) : 1))
}) : null;
}
-function $Le(e) {
+function rRe(e) {
var { alpha: t, layout: n, points: r, baseLine: i, strokeWidth: a } = e;
- return n === "vertical" ? /*#__PURE__*/ B.createElement(ZLe, {
+ return n === "vertical" ? /*#__PURE__*/ B.createElement(tRe, {
alpha: t,
points: r,
baseLine: i,
strokeWidth: a
- }) : /*#__PURE__*/ B.createElement(QLe, {
+ }) : /*#__PURE__*/ B.createElement(nRe, {
alpha: t,
points: r,
baseLine: i,
strokeWidth: a
});
}
-function eRe(e) {
+function iRe(e) {
var { needClip: t, clipPathId: n, props: r, previousPointsRef: i, previousBaselineRef: a } = e, { points: o, baseLine: s, isAnimationActive: c, animationBegin: l, animationDuration: u, animationEasing: d, onAnimationStart: f, onAnimationEnd: p } = r, m = WG((0, B.useMemo)(() => ({
points: o,
baseLine: s
@@ -67512,7 +67744,7 @@ function eRe(e) {
}, [f]);
if (h == null) return null;
var x = i.current, S = a.current;
- return /*#__PURE__*/ B.createElement(XLe, {
+ return /*#__PURE__*/ B.createElement(eRe, {
showLabels: v,
points: o
}, r.children, /*#__PURE__*/ B.createElement(UG, {
@@ -67531,18 +67763,18 @@ function eRe(e) {
if (x[r]) {
var i = x[r];
return v4(v4({}, t), {}, {
- x: bz(i.x, t.x, e),
- y: bz(i.y, t.y, e)
+ x: yz(i.x, t.x, e),
+ y: yz(i.y, t.y, e)
});
}
return t;
- }), d = Z(s) ? bz(S, s, e) : Sz(s) || mz(s) ? bz(S, 0, e) : s.map((t, n) => {
+ }), d = Z(s) ? yz(S, s, e) : xz(s) || pz(s) ? yz(S, 0, e) : s.map((t, n) => {
var r = Math.floor(n * l);
if (Array.isArray(S) && S[r]) {
var i = S[r];
return v4(v4({}, t), {}, {
- x: bz(i.x, t.x, e),
- y: bz(i.y, t.y, e)
+ x: yz(i.x, t.x, e),
+ y: yz(i.y, t.y, e)
});
}
return t;
@@ -67555,13 +67787,13 @@ function eRe(e) {
props: r
});
}
- return e > 0 && (i.current = o, a.current = s), /*#__PURE__*/ B.createElement(dR, null, c && /*#__PURE__*/ B.createElement("defs", null, /*#__PURE__*/ B.createElement("clipPath", { id: `animationClipPath-${n}` }, /*#__PURE__*/ B.createElement($Le, {
+ return e > 0 && (i.current = o, a.current = s), /*#__PURE__*/ B.createElement(uR, null, c && /*#__PURE__*/ B.createElement("defs", null, /*#__PURE__*/ B.createElement("clipPath", { id: `animationClipPath-${n}` }, /*#__PURE__*/ B.createElement(rRe, {
alpha: e,
points: o,
baseLine: s,
layout: h,
strokeWidth: r.strokeWidth
- }))), /*#__PURE__*/ B.createElement(dR, { clipPath: `url(#animationClipPath-${n})` }, /*#__PURE__*/ B.createElement(b4, {
+ }))), /*#__PURE__*/ B.createElement(uR, { clipPath: `url(#animationClipPath-${n})` }, /*#__PURE__*/ B.createElement(b4, {
points: o,
baseLine: s,
needClip: t,
@@ -67570,9 +67802,9 @@ function eRe(e) {
})));
}), /*#__PURE__*/ B.createElement(u1, { label: r.label }));
}
-function tRe(e) {
+function aRe(e) {
var { needClip: t, clipPathId: n, props: r } = e, i = (0, B.useRef)(null), a = (0, B.useRef)();
- return /*#__PURE__*/ B.createElement(eRe, {
+ return /*#__PURE__*/ B.createElement(iRe, {
needClip: t,
clipPathId: n,
props: r,
@@ -67580,12 +67812,12 @@ function tRe(e) {
previousBaselineRef: a
});
}
-var nRe = class extends B.PureComponent {
+var oRe = class extends B.PureComponent {
render() {
var { hide: e, dot: t, points: n, className: r, top: i, left: a, needClip: o, xAxisId: s, yAxisId: c, width: l, height: u, id: d, baseLine: f, zIndex: p } = this.props;
if (e) return null;
var m = Jr("recharts-area", r), h = d, { r: g, strokeWidth: _ } = Q2(t), v = e0(t), y = g * 2 + _, b = o ? `url(#clipPath-${v ? "" : "dots-"}${h})` : void 0;
- return /*#__PURE__*/ B.createElement($Q, { zIndex: p }, /*#__PURE__*/ B.createElement(dR, { className: m }, o && /*#__PURE__*/ B.createElement("defs", null, /*#__PURE__*/ B.createElement(q2, {
+ return /*#__PURE__*/ B.createElement($Q, { zIndex: p }, /*#__PURE__*/ B.createElement(uR, { className: m }, o && /*#__PURE__*/ B.createElement("defs", null, /*#__PURE__*/ B.createElement(q2, {
clipPathId: h,
xAxisId: s,
yAxisId: c
@@ -67594,7 +67826,7 @@ var nRe = class extends B.PureComponent {
y: i - y / 2,
width: l + y,
height: u + y
- }))), /*#__PURE__*/ B.createElement(tRe, {
+ }))), /*#__PURE__*/ B.createElement(aRe, {
needClip: o,
clipPathId: h,
props: this.props
@@ -67612,7 +67844,7 @@ var nRe = class extends B.PureComponent {
clipPath: b
}));
}
-}, rRe = {
+}, sRe = {
activeDot: !0,
animationBegin: 0,
animationDuration: 1500,
@@ -67632,11 +67864,11 @@ var nRe = class extends B.PureComponent {
yAxisId: 0,
zIndex: RK.area
};
-function iRe(e) {
- var { activeDot: t, animationBegin: n, animationDuration: r, animationEasing: i, connectNulls: a, dot: o, fill: s, fillOpacity: c, hide: l, isAnimationActive: u, legendType: d, stroke: f, xAxisId: p, yAxisId: m } = e, h = g4(e, HLe), g = nW(), _ = VQ(), { needClip: v } = K2(p, m), y = LU(), { points: b, isRange: x, baseLine: S } = Q((t) => BLe(t, e.id, y)) ?? {}, C = D0();
+function cRe(e) {
+ var { activeDot: t, animationBegin: n, animationDuration: r, animationEasing: i, connectNulls: a, dot: o, fill: s, fillOpacity: c, hide: l, isAnimationActive: u, legendType: d, stroke: f, xAxisId: p, yAxisId: m } = e, h = g4(e, KLe), g = nW(), _ = VQ(), { needClip: v } = K2(p, m), y = LU(), { points: b, isRange: x, baseLine: S } = Q((t) => WLe(t, e.id, y)) ?? {}, C = D0();
if (g !== "horizontal" && g !== "vertical" || C == null || _ !== "AreaChart" && _ !== "ComposedChart") return null;
var { height: w, width: T, x: E, y: D } = C;
- return !b || !b.length ? null : /*#__PURE__*/ B.createElement(nRe, h4({}, h, {
+ return !b || !b.length ? null : /*#__PURE__*/ B.createElement(oRe, h4({}, h, {
activeDot: t,
animationBegin: n,
animationDuration: r,
@@ -67662,7 +67894,7 @@ function iRe(e) {
yAxisId: m
}));
}
-var aRe = (e, t, n, r, i) => {
+var lRe = (e, t, n, r, i) => {
var a = n ?? t;
if (Z(a)) return a;
var o = e === "horizontal" ? i : r, s = o.scale.domain();
@@ -67672,8 +67904,8 @@ var aRe = (e, t, n, r, i) => {
}
return a === "dataMin" ? s[0] : a === "dataMax" ? s[1] : s[0];
};
-function oRe(e) {
- var { areaSettings: { connectNulls: t, baseValue: n, dataKey: r }, stackedData: i, layout: a, chartBaseValue: o, xAxis: s, yAxis: c, displayedData: l, dataStartIndex: u, xAxisTicks: d, yAxisTicks: f, bandSize: p } = e, m = i && i.length, h = aRe(a, o, n, s, c), g = a === "horizontal", _ = !1, v = l.map((e, n) => {
+function uRe(e) {
+ var { areaSettings: { connectNulls: t, baseValue: n, dataKey: r }, stackedData: i, layout: a, chartBaseValue: o, xAxis: s, yAxis: c, displayedData: l, dataStartIndex: u, xAxisTicks: d, yAxisTicks: f, bandSize: p } = e, m = i && i.length, h = lRe(a, o, n, s, c), g = a === "horizontal", _ = !1, v = l.map((e, n) => {
var a;
if (m) a = i[u + n];
else {
@@ -67722,12 +67954,12 @@ function oRe(e) {
isRange: _
};
}
-function sRe(e) {
- var t = Fz(e, rRe), n = LU();
+function dRe(e) {
+ var t = Pz(e, sRe), n = LU();
return /*#__PURE__*/ B.createElement(g0, {
id: t.id,
type: "area"
- }, (e) => /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(m0, { legendPayload: qLe(t) }), /*#__PURE__*/ B.createElement(JLe, {
+ }, (e) => /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(m0, { legendPayload: ZLe(t) }), /*#__PURE__*/ B.createElement(QLe, {
dataKey: t.dataKey,
data: t.data,
stroke: t.stroke,
@@ -67752,15 +67984,15 @@ function sRe(e) {
baseValue: t.baseValue,
isPanorama: n,
connectNulls: t.connectNulls
- }), /*#__PURE__*/ B.createElement(iRe, h4({}, t, { id: e }))));
+ }), /*#__PURE__*/ B.createElement(cRe, h4({}, t, { id: e }))));
}
-var x4 = /*#__PURE__*/ B.memo(sRe, eG);
+var x4 = /*#__PURE__*/ B.memo(dRe, eG);
x4.displayName = "Area";
//#endregion
//#region node_modules/tiny-invariant/dist/esm/tiny-invariant.js
-var cRe = "Invariant failed";
-function lRe(e, t) {
- if (!e) throw Error(cRe);
+var fRe = "Invariant failed";
+function pRe(e, t) {
+ if (!e) throw Error(fRe);
}
//#endregion
//#region node_modules/recharts/es6/util/BarUtils.js
@@ -67780,35 +68012,35 @@ function C4(e) {
inActiveClassName: "recharts-inactive-bar"
}, e));
}
-var uRe = function(e) {
+var mRe = function(e) {
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
return (n, r) => {
if (Z(e)) return e;
- var i = Z(n) || Sz(n);
- return i ? e(n, r) : (!i && lRe(!1, `minPointSize callback function received a value with type of ${typeof n}. Currently only numbers or null/undefined are supported.`), t);
+ var i = Z(n) || xz(n);
+ return i ? e(n, r) : (!i && pRe(!1, `minPointSize callback function received a value with type of ${typeof n}. Currently only numbers or null/undefined are supported.`), t);
};
-}, dRe = (e, t, n) => n, w4 = $([BX, (e, t) => t], (e, t) => e.filter((e) => e.type === "bar").find((e) => e.id === t)), fRe = $([w4], (e) => e?.maxBarSize), pRe = (e, t, n, r) => r, mRe = $([
+}, hRe = (e, t, n) => n, w4 = $([BX, (e, t) => t], (e, t) => e.filter((e) => e.type === "bar").find((e) => e.id === t)), gRe = $([w4], (e) => e?.maxBarSize), _Re = (e, t, n, r) => r, vRe = $([
tW,
BX,
s4,
c4,
- dRe
-], (e, t, n, r, i) => t.filter((t) => e === "horizontal" ? t.xAxisId === n : t.yAxisId === r).filter((e) => e.isPanorama === i).filter((e) => e.hide === !1).filter((e) => e.type === "bar")), hRe = (e, t, n) => {
+ hRe
+], (e, t, n, r, i) => t.filter((t) => e === "horizontal" ? t.xAxisId === n : t.yAxisId === r).filter((e) => e.isPanorama === i).filter((e) => e.hide === !1).filter((e) => e.type === "bar")), yRe = (e, t, n) => {
var r = tW(e), i = s4(e, t), a = c4(e, t);
if (i != null && a != null) return r === "horizontal" ? rZ(e, "yAxis", a, n) : rZ(e, "xAxis", i, n);
-}, gRe = $([
- mRe,
+}, bRe = $([
+ vRe,
jK,
(e, t) => {
var n = tW(e), r = s4(e, t), i = c4(e, t);
if (r != null && i != null) return n === "horizontal" ? RZ(e, "xAxis", r) : RZ(e, "yAxis", i);
}
-], K0), _Re = (e, t, n) => {
+], K0), xRe = (e, t, n) => {
var r = w4(e, t);
if (r == null) return 0;
var i = s4(e, t), a = c4(e, t);
if (i == null || a == null) return 0;
- var o = tW(e), s = OK(e), { maxBarSize: c } = r, l = Sz(c) ? s : c, u, d;
+ var o = tW(e), s = OK(e), { maxBarSize: c } = r, l = xz(c) ? s : c, u, d;
return o === "horizontal" ? (u = KZ(e, "xAxis", i, n), d = GZ(e, "xAxis", i, n)) : (u = KZ(e, "yAxis", a, n), d = GZ(e, "yAxis", a, n)), TU(u, d, !0) ?? l ?? 0;
}, T4 = (e, t, n) => {
var r = tW(e), i = s4(e, t), a = c4(e, t);
@@ -67816,7 +68048,7 @@ var uRe = function(e) {
var o, s;
return r === "horizontal" ? (o = KZ(e, "xAxis", i, n), s = GZ(e, "xAxis", i, n)) : (o = KZ(e, "yAxis", a, n), s = GZ(e, "yAxis", a, n)), TU(o, s);
}
-}, vRe = $([
+}, SRe = $([
FU,
IU,
(e, t, n) => {
@@ -67836,25 +68068,25 @@ var uRe = function(e) {
if (r != null) return GZ(e, "yAxis", r, n);
},
$([$([
- gRe,
+ bRe,
OK,
kK,
AK,
- _Re,
+ xRe,
T4,
- fRe
+ gRe
], Y0), w4], Z0),
tW,
hK,
T4,
- $([hRe, w4], X0),
+ $([yRe, w4], X0),
w4,
- pRe
+ _Re
], (e, t, n, r, i, a, o, s, c, l, u, d, f) => {
var { chartData: p, dataStartIndex: m, dataEndIndex: h } = c;
if (!(d == null || o == null || t == null || s !== "horizontal" && s !== "vertical" || n == null || r == null || i == null || a == null || l == null)) {
var { data: g } = d, _ = g != null && g.length > 0 ? g : p?.slice(m, h + 1);
- if (_ != null) return KRe({
+ if (_ != null) return XRe({
layout: s,
barSettings: d,
pos: o,
@@ -67871,7 +68103,7 @@ var uRe = function(e) {
dataStartIndex: m
});
}
-}), yRe = ["index"];
+}), CRe = ["index"];
function E4() {
return E4 = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
@@ -67881,16 +68113,16 @@ function E4() {
return e;
}, E4.apply(null, arguments);
}
-function bRe(e, t) {
+function wRe(e, t) {
if (e == null) return {};
- var n, r, i = xRe(e, t);
+ var n, r, i = TRe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function xRe(e, t) {
+function TRe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -67899,31 +68131,31 @@ function xRe(e, t) {
}
return n;
}
-var D4 = /*#__PURE__*/ (0, B.createContext)(void 0), SRe = (e) => {
+var D4 = /*#__PURE__*/ (0, B.createContext)(void 0), ERe = (e) => {
var t = (0, B.useContext)(D4);
if (t != null) return t.stackId;
if (e != null) return yU(e);
-}, CRe = (e, t) => `recharts-bar-stack-clip-path-${e}-${t}`, wRe = (e) => {
+}, DRe = (e, t) => `recharts-bar-stack-clip-path-${e}-${t}`, ORe = (e) => {
var t = (0, B.useContext)(D4);
if (t != null) {
var { stackId: n } = t;
- return `url(#${CRe(n, e)})`;
+ return `url(#${DRe(n, e)})`;
}
}, O4 = (e) => {
- var { index: t } = e, n = bRe(e, yRe), r = wRe(t);
- return /*#__PURE__*/ B.createElement(dR, E4({
+ var { index: t } = e, n = wRe(e, CRe), r = ORe(t);
+ return /*#__PURE__*/ B.createElement(uR, E4({
className: "recharts-bar-stack-layer",
clipPath: r
}, n));
-}, TRe = [
+}, kRe = [
"onMouseEnter",
"onMouseLeave",
"onClick"
-], ERe = [
+], ARe = [
"value",
"background",
"tooltipPosition"
-], DRe = ["id"], ORe = [
+], jRe = ["id"], MRe = [
"onMouseEnter",
"onClick",
"onMouseLeave"
@@ -67951,26 +68183,26 @@ function j4(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? A4(Object(n), !0).forEach(function(t) {
- kRe(e, t, n[t]);
+ NRe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : A4(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function kRe(e, t, n) {
- return (t = ARe(t)) in e ? Object.defineProperty(e, t, {
+function NRe(e, t, n) {
+ return (t = PRe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function ARe(e) {
- var t = jRe(e, "string");
+function PRe(e) {
+ var t = FRe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function jRe(e, t) {
+function FRe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -67982,14 +68214,14 @@ function jRe(e, t) {
}
function M4(e, t) {
if (e == null) return {};
- var n, r, i = MRe(e, t);
+ var n, r, i = IRe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function MRe(e, t) {
+function IRe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -67998,7 +68230,7 @@ function MRe(e, t) {
}
return n;
}
-var NRe = (e) => {
+var LRe = (e) => {
var { dataKey: t, name: n, fill: r, legendType: i, hide: a } = e;
return [{
inactive: a,
@@ -68008,10 +68240,10 @@ var NRe = (e) => {
value: DU(n, t),
payload: e
}];
-}, PRe = /*#__PURE__*/ B.memo((e) => {
+}, RRe = /*#__PURE__*/ B.memo((e) => {
var { dataKey: t, stroke: n, strokeWidth: r, fill: i, name: a, hide: o, unit: s, tooltipType: c, id: l } = e, u = {
dataDefinedOnItem: void 0,
- getPosition: Tz,
+ getPosition: wz,
settings: {
stroke: n,
strokeWidth: r,
@@ -68028,17 +68260,17 @@ var NRe = (e) => {
};
return /*#__PURE__*/ B.createElement(p0, { tooltipEntrySettings: u });
});
-function FRe(e) {
- var t = Q(MQ), { data: n, dataKey: r, background: i, allOtherBarProps: a } = e, { onMouseEnter: o, onMouseLeave: s, onClick: c } = a, l = M4(a, TRe), u = u0(o, r, a.id), d = d0(s), f = f0(c, r, a.id);
+function zRe(e) {
+ var t = Q(MQ), { data: n, dataKey: r, background: i, allOtherBarProps: a } = e, { onMouseEnter: o, onMouseLeave: s, onClick: c } = a, l = M4(a, kRe), u = u0(o, r, a.id), d = d0(s), f = f0(c, r, a.id);
if (!i || n == null) return null;
- var p = oR(i);
+ var p = aR(i);
return /*#__PURE__*/ B.createElement($Q, { zIndex: u2(i, RK.barBackground) }, n.map((e, n) => {
- var { value: a, background: o, tooltipPosition: s } = e, c = M4(e, ERe);
+ var { value: a, background: o, tooltipPosition: s } = e, c = M4(e, ARe);
if (!o) return null;
var m = u(e, n), h = d(e, n), g = f(e, n), _ = j4(j4(j4(j4(j4({
option: i,
isActive: String(n) === t
- }, c), {}, { fill: "#eee" }, o), p), Nz(l, e, n)), {}, {
+ }, c), {}, { fill: "#eee" }, o), p), Mz(l, e, n)), {}, {
onMouseEnter: m,
onMouseLeave: h,
onClick: g,
@@ -68049,7 +68281,7 @@ function FRe(e) {
return /*#__PURE__*/ B.createElement(C4, k4({ key: `background-bar-${n}` }, _));
}));
}
-function IRe(e) {
+function BRe(e) {
var { showLabels: t, children: n, rects: r } = e, i = r?.map((e) => {
var t = {
x: e.x,
@@ -68069,7 +68301,7 @@ function IRe(e) {
});
return /*#__PURE__*/ B.createElement(s1, { value: t ? i : void 0 }, n);
}
-function LRe(e) {
+function VRe(e) {
var { shape: t, activeBar: n, baseProps: r, entry: i, index: a, dataKey: o } = e, s = Q(MQ), c = Q(PQ), l = n && String(i.originalDataIndex) === s && (c == null || o === c), [u, d] = (0, B.useState)(!1), [f, p] = (0, B.useState)(!1);
(0, B.useEffect)(() => {
var e;
@@ -68090,7 +68322,7 @@ function LRe(e) {
}));
return g ? /*#__PURE__*/ B.createElement($Q, { zIndex: RK.activeBar }, /*#__PURE__*/ B.createElement(O4, { index: i.originalDataIndex }, v)) : v;
}
-function RRe(e) {
+function HRe(e) {
var { shape: t, baseProps: n, entry: r, index: i, dataKey: a } = e;
return /*#__PURE__*/ B.createElement(C4, k4({}, n, { name: String(n.name) }, r, {
isActive: !1,
@@ -68099,24 +68331,24 @@ function RRe(e) {
dataKey: a
}));
}
-function zRe(e) {
- var { data: t, props: n } = e, r = aR(n) ?? {}, { id: i } = r, a = M4(r, DRe), { shape: o, dataKey: s, activeBar: c } = n, { onMouseEnter: l, onClick: u, onMouseLeave: d } = n, f = M4(n, ORe), p = u0(l, s, i), m = d0(d), h = f0(u, s, i);
+function URe(e) {
+ var { data: t, props: n } = e, r = iR(n) ?? {}, { id: i } = r, a = M4(r, jRe), { shape: o, dataKey: s, activeBar: c } = n, { onMouseEnter: l, onClick: u, onMouseLeave: d } = n, f = M4(n, MRe), p = u0(l, s, i), m = d0(d), h = f0(u, s, i);
return t ? /*#__PURE__*/ B.createElement(B.Fragment, null, t.map((e, t) => /*#__PURE__*/ B.createElement(O4, k4({
index: e.originalDataIndex,
key: `rectangle-${e?.x}-${e?.y}-${e?.value}-${t}`,
className: "recharts-bar-rectangle"
- }, Nz(f, e, t), {
+ }, Mz(f, e, t), {
onMouseEnter: p(e, t),
onMouseLeave: m(e, t),
onClick: h(e, t)
- }), c ? /*#__PURE__*/ B.createElement(LRe, {
+ }), c ? /*#__PURE__*/ B.createElement(VRe, {
shape: o,
activeBar: c,
baseProps: a,
entry: e,
index: t,
dataKey: s
- }) : /*#__PURE__*/ B.createElement(RRe, {
+ }) : /*#__PURE__*/ B.createElement(HRe, {
shape: o,
baseProps: a,
entry: e,
@@ -68124,13 +68356,13 @@ function zRe(e) {
dataKey: s
})))) : null;
}
-function BRe(e) {
+function WRe(e) {
var { props: t, previousRectanglesRef: n } = e, { data: r, layout: i, isAnimationActive: a, animationBegin: o, animationDuration: s, animationEasing: c, onAnimationEnd: l, onAnimationStart: u } = t, d = n.current, f = WG(t, "recharts-bar-"), [p, m] = (0, B.useState)(!1), h = !p, g = (0, B.useCallback)(() => {
typeof l == "function" && l(), m(!1);
}, [l]), _ = (0, B.useCallback)(() => {
typeof u == "function" && u(), m(!0);
}, [u]);
- return /*#__PURE__*/ B.createElement(IRe, {
+ return /*#__PURE__*/ B.createElement(BRe, {
showLabels: h,
rects: r
}, /*#__PURE__*/ B.createElement(UG, {
@@ -68146,38 +68378,38 @@ function BRe(e) {
var a = e === 1 ? r : r?.map((t, n) => {
var r = d && d[n];
if (r) return j4(j4({}, t), {}, {
- x: bz(r.x, t.x, e),
- y: bz(r.y, t.y, e),
- width: bz(r.width, t.width, e),
- height: bz(r.height, t.height, e)
+ x: yz(r.x, t.x, e),
+ y: yz(r.y, t.y, e),
+ width: yz(r.width, t.width, e),
+ height: yz(r.height, t.height, e)
});
if (i === "horizontal") {
- var a = bz(0, t.height, e), o = bz(t.stackedBarStart, t.y, e);
+ var a = yz(0, t.height, e), o = yz(t.stackedBarStart, t.y, e);
return j4(j4({}, t), {}, {
y: o,
height: a
});
}
- var s = bz(0, t.width, e), c = bz(t.stackedBarStart, t.x, e);
+ var s = yz(0, t.width, e), c = yz(t.stackedBarStart, t.x, e);
return j4(j4({}, t), {}, {
width: s,
x: c
});
});
- return e > 0 && (n.current = a ?? null), a == null ? null : /*#__PURE__*/ B.createElement(dR, null, /*#__PURE__*/ B.createElement(zRe, {
+ return e > 0 && (n.current = a ?? null), a == null ? null : /*#__PURE__*/ B.createElement(uR, null, /*#__PURE__*/ B.createElement(URe, {
props: t,
data: a
}));
}), /*#__PURE__*/ B.createElement(u1, { label: t.label }), t.children);
}
-function VRe(e) {
+function GRe(e) {
var t = (0, B.useRef)(null);
- return /*#__PURE__*/ B.createElement(BRe, {
+ return /*#__PURE__*/ B.createElement(WRe, {
previousRectanglesRef: t,
props: e
});
}
-var N4 = 0, HRe = (e, t) => {
+var N4 = 0, KRe = (e, t) => {
var n = Array.isArray(e.value) ? e.value[1] : e.value;
return {
x: e.x,
@@ -68185,29 +68417,29 @@ var N4 = 0, HRe = (e, t) => {
value: n,
errorVal: mU(e, t)
};
-}, URe = class extends B.PureComponent {
+}, qRe = class extends B.PureComponent {
render() {
var { hide: e, data: t, dataKey: n, className: r, xAxisId: i, yAxisId: a, needClip: o, background: s, id: c } = this.props;
if (e || t == null) return null;
var l = Jr("recharts-bar", r), u = c;
- return /*#__PURE__*/ B.createElement(dR, {
+ return /*#__PURE__*/ B.createElement(uR, {
className: l,
id: c
}, o && /*#__PURE__*/ B.createElement("defs", null, /*#__PURE__*/ B.createElement(q2, {
clipPathId: u,
xAxisId: i,
yAxisId: a
- })), /*#__PURE__*/ B.createElement(dR, {
+ })), /*#__PURE__*/ B.createElement(uR, {
className: "recharts-bar-rectangles",
clipPath: o ? `url(#clipPath-${u})` : void 0
- }, /*#__PURE__*/ B.createElement(FRe, {
+ }, /*#__PURE__*/ B.createElement(zRe, {
data: t,
dataKey: n,
background: s,
allOtherBarProps: this.props
- }), /*#__PURE__*/ B.createElement(VRe, this.props)));
+ }), /*#__PURE__*/ B.createElement(GRe, this.props)));
}
-}, WRe = {
+}, JRe = {
activeBar: !1,
animationBegin: 0,
animationDuration: 400,
@@ -68222,17 +68454,17 @@ var N4 = 0, HRe = (e, t) => {
yAxisId: 0,
zIndex: RK.bar
};
-function GRe(e) {
- var { xAxisId: t, yAxisId: n, hide: r, legendType: i, minPointSize: a, activeBar: o, animationBegin: s, animationDuration: c, animationEasing: l, isAnimationActive: u } = e, { needClip: d } = K2(t, n), f = nW(), p = LU(), m = $1(e.children, g$), h = Q((t) => vRe(t, e.id, p, m));
+function YRe(e) {
+ var { xAxisId: t, yAxisId: n, hide: r, legendType: i, minPointSize: a, activeBar: o, animationBegin: s, animationDuration: c, animationEasing: l, isAnimationActive: u } = e, { needClip: d } = K2(t, n), f = nW(), p = LU(), m = $1(e.children, g$), h = Q((t) => SRe(t, e.id, p, m));
if (f !== "vertical" && f !== "horizontal") return null;
var g, _ = h?.[0];
return g = _ == null || _.height == null || _.width == null ? 0 : f === "vertical" ? _.height / 2 : _.width / 2, /*#__PURE__*/ B.createElement(G2, {
xAxisId: t,
yAxisId: n,
data: h,
- dataPointFormatter: HRe,
+ dataPointFormatter: KRe,
errorBarOffset: g
- }, /*#__PURE__*/ B.createElement(URe, k4({}, e, {
+ }, /*#__PURE__*/ B.createElement(qRe, k4({}, e, {
layout: f,
needClip: d,
data: h,
@@ -68248,7 +68480,7 @@ function GRe(e) {
isAnimationActive: u
})));
}
-function KRe(e) {
+function XRe(e) {
var { layout: t, barSettings: { dataKey: n, minPointSize: r, hasCustomShape: i }, pos: a, bandSize: o, xAxis: s, yAxis: c, xAxisTicks: l, yAxisTicks: u, stackedData: d, displayedData: f, offset: p, cells: m, parentViewBox: h, dataStartIndex: g } = e, _ = t === "horizontal" ? c : s, v = d ? _.scale.domain() : null, y = SU({ numericAxis: _ }), b = _.scale.map(y);
return f.map((e, f) => {
var _, x, S, C, w, T;
@@ -68257,7 +68489,7 @@ function KRe(e) {
if (E == null) return null;
_ = vU(E, v);
} else _ = mU(e, n), Array.isArray(_) || (_ = [y, _]);
- var D = uRe(r, N4)(_[1], f);
+ var D = mRe(r, N4)(_[1], f);
if (t === "horizontal") {
var O = c.scale.map(_[0]), k = c.scale.map(_[1]);
if (O == null || k == null) return null;
@@ -68270,13 +68502,13 @@ function KRe(e) {
index: f
}), S = k ?? O ?? void 0, C = a.size;
var A = O - k;
- if (w = mz(A) ? 0 : A, T = {
+ if (w = pz(A) ? 0 : A, T = {
x,
y: p.top,
width: C,
height: p.height
}, Math.abs(D) > 0 && Math.abs(w) < Math.abs(D)) {
- var j = pz(w || D) * (Math.abs(D) - Math.abs(w));
+ var j = fz(w || D) * (Math.abs(D) - Math.abs(w));
S -= j, w += j;
}
} else {
@@ -68295,7 +68527,7 @@ function KRe(e) {
width: p.width,
height: w
}, Math.abs(D) > 0 && Math.abs(C) < Math.abs(D)) {
- var ee = pz(C || D) * (Math.abs(D) - Math.abs(C));
+ var ee = fz(C || D) * (Math.abs(D) - Math.abs(C));
C += ee;
}
}
@@ -68317,12 +68549,12 @@ function KRe(e) {
}, m && m[f] && m[f].props);
}).filter(Boolean);
}
-function qRe(e) {
- var t = Fz(e, WRe), n = SRe(t.stackId), r = LU();
+function ZRe(e) {
+ var t = Pz(e, JRe), n = ERe(t.stackId), r = LU();
return /*#__PURE__*/ B.createElement(g0, {
id: t.id,
type: "bar"
- }, (e) => /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(m0, { legendPayload: NRe(t) }), /*#__PURE__*/ B.createElement(PRe, {
+ }, (e) => /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(m0, { legendPayload: LRe(t) }), /*#__PURE__*/ B.createElement(RRe, {
dataKey: t.dataKey,
stroke: t.stroke,
strokeWidth: t.strokeWidth,
@@ -68347,23 +68579,23 @@ function qRe(e) {
maxBarSize: t.maxBarSize,
isPanorama: r,
hasCustomShape: t.shape != null
- }), /*#__PURE__*/ B.createElement($Q, { zIndex: t.zIndex }, /*#__PURE__*/ B.createElement(GRe, k4({}, t, { id: e })))));
+ }), /*#__PURE__*/ B.createElement($Q, { zIndex: t.zIndex }, /*#__PURE__*/ B.createElement(YRe, k4({}, t, { id: e })))));
}
-var P4 = /*#__PURE__*/ B.memo(qRe, eG);
+var P4 = /*#__PURE__*/ B.memo(ZRe, eG);
P4.displayName = "Bar";
//#endregion
//#region node_modules/recharts/es6/util/axisPropsAreEqual.js
-var JRe = ["domain", "range"], YRe = ["domain", "range"];
+var QRe = ["domain", "range"], $Re = ["domain", "range"];
function F4(e, t) {
if (e == null) return {};
- var n, r, i = XRe(e, t);
+ var n, r, i = eze(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function XRe(e, t) {
+function eze(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -68377,16 +68609,16 @@ function I4(e, t) {
}
function L4(e, t) {
if (e === t) return !0;
- var { domain: n, range: r } = e, i = F4(e, JRe), { domain: a, range: o } = t, s = F4(t, YRe);
+ var { domain: n, range: r } = e, i = F4(e, QRe), { domain: a, range: o } = t, s = F4(t, $Re);
return !I4(n, a) || !I4(r, o) ? !1 : eG(i, s);
}
//#endregion
//#region node_modules/recharts/es6/cartesian/XAxis.js
-var ZRe = ["type"], QRe = [
+var tze = ["type"], nze = [
"dangerouslySetInnerHTML",
"ticks",
"scale"
-], $Re = ["id", "scale"];
+], rze = ["id", "scale"];
function R4() {
return R4 = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
@@ -68410,26 +68642,26 @@ function B4(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? z4(Object(n), !0).forEach(function(t) {
- eze(e, t, n[t]);
+ ize(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : z4(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function eze(e, t, n) {
- return (t = tze(t)) in e ? Object.defineProperty(e, t, {
+function ize(e, t, n) {
+ return (t = aze(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function tze(e) {
- var t = nze(e, "string");
+function aze(e) {
+ var t = oze(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function nze(e, t) {
+function oze(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -68441,14 +68673,14 @@ function nze(e, t) {
}
function V4(e, t) {
if (e == null) return {};
- var n, r, i = rze(e, t);
+ var n, r, i = sze(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function rze(e, t) {
+function sze(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -68457,23 +68689,23 @@ function rze(e, t) {
}
return n;
}
-function ize(e) {
- var t = CB(), n = (0, B.useRef)(null), r = rW(), { type: i } = e, a = V4(e, ZRe), o = HK(r, "xAxis", i), s = (0, B.useMemo)(() => {
+function cze(e) {
+ var t = CB(), n = (0, B.useRef)(null), r = rW(), { type: i } = e, a = V4(e, tze), o = HK(r, "xAxis", i), s = (0, B.useMemo)(() => {
if (o != null) return B4(B4({}, a), {}, { type: o });
}, [a, o]);
return (0, B.useLayoutEffect)(() => {
- s != null && (n.current === null ? t(bPe(s)) : n.current !== s && t(xPe({
+ s != null && (n.current === null ? t(wPe(s)) : n.current !== s && t(TPe({
prev: n.current,
next: s
})), n.current = s);
}, [s, t]), (0, B.useLayoutEffect)(() => () => {
- n.current &&= (t(SPe(n.current)), null);
+ n.current &&= (t(EPe(n.current)), null);
}, [t]), null;
}
-var aze = (e) => {
- var { xAxisId: t, className: n } = e, r = Q(IU), i = LU(), a = "xAxis", o = Q((e) => UZ(e, a, t, i)), s = Q((e) => IZ(e, t)), c = Q((e) => Eke(e, t)), l = Q((e) => AX(e, t));
+var lze = (e) => {
+ var { xAxisId: t, className: n } = e, r = Q(IU), i = LU(), a = "xAxis", o = Q((e) => UZ(e, a, t, i)), s = Q((e) => IZ(e, t)), c = Q((e) => Ake(e, t)), l = Q((e) => AX(e, t));
if (s == null || c == null || l == null) return null;
- var { dangerouslySetInnerHTML: u, ticks: d, scale: f } = e, p = V4(e, QRe), { id: m, scale: h } = l, g = V4(l, $Re);
+ var { dangerouslySetInnerHTML: u, ticks: d, scale: f } = e, p = V4(e, nze), { id: m, scale: h } = l, g = V4(l, rze);
return /*#__PURE__*/ B.createElement(L2, R4({}, p, g, {
x: c.x,
y: c.y,
@@ -68485,7 +68717,7 @@ var aze = (e) => {
axisType: a,
axisId: t
}));
-}, oze = {
+}, uze = {
allowDataOverflow: kX.allowDataOverflow,
allowDecimals: kX.allowDecimals,
allowDuplicatedCategory: kX.allowDuplicatedCategory,
@@ -68510,8 +68742,8 @@ var aze = (e) => {
niceTicks: kX.niceTicks,
xAxisId: 0
}, H4 = /*#__PURE__*/ B.memo((e) => {
- var t = Fz(e, oze);
- return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(ize, {
+ var t = Pz(e, uze);
+ return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(cze, {
allowDataOverflow: t.allowDataOverflow,
allowDecimals: t.allowDecimals,
allowDuplicatedCategory: t.allowDuplicatedCategory,
@@ -68537,16 +68769,16 @@ var aze = (e) => {
type: t.type,
unit: t.unit,
niceTicks: t.niceTicks
- }), /*#__PURE__*/ B.createElement(aze, t));
+ }), /*#__PURE__*/ B.createElement(lze, t));
}, L4);
H4.displayName = "XAxis";
//#endregion
//#region node_modules/recharts/es6/cartesian/YAxis.js
-var sze = ["type"], cze = [
+var dze = ["type"], fze = [
"dangerouslySetInnerHTML",
"ticks",
"scale"
-], lze = ["id", "scale"];
+], pze = ["id", "scale"];
function U4() {
return U4 = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
@@ -68570,26 +68802,26 @@ function G4(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? W4(Object(n), !0).forEach(function(t) {
- uze(e, t, n[t]);
+ mze(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : W4(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function uze(e, t, n) {
- return (t = dze(t)) in e ? Object.defineProperty(e, t, {
+function mze(e, t, n) {
+ return (t = hze(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function dze(e) {
- var t = fze(e, "string");
+function hze(e) {
+ var t = gze(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function fze(e, t) {
+function gze(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -68601,14 +68833,14 @@ function fze(e, t) {
}
function K4(e, t) {
if (e == null) return {};
- var n, r, i = pze(e, t);
+ var n, r, i = _ze(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function pze(e, t) {
+function _ze(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -68617,27 +68849,27 @@ function pze(e, t) {
}
return n;
}
-function mze(e) {
- var t = CB(), n = (0, B.useRef)(null), r = rW(), { type: i } = e, a = K4(e, sze), o = HK(r, "yAxis", i), s = (0, B.useMemo)(() => {
+function vze(e) {
+ var t = CB(), n = (0, B.useRef)(null), r = rW(), { type: i } = e, a = K4(e, dze), o = HK(r, "yAxis", i), s = (0, B.useMemo)(() => {
if (o != null) return G4(G4({}, a), {}, { type: o });
}, [o, a]);
return (0, B.useLayoutEffect)(() => {
- s != null && (n.current === null ? t(CPe(s)) : n.current !== s && t(wPe({
+ s != null && (n.current === null ? t(DPe(s)) : n.current !== s && t(OPe({
prev: n.current,
next: s
})), n.current = s);
}, [s, t]), (0, B.useLayoutEffect)(() => () => {
- n.current &&= (t(TPe(n.current)), null);
+ n.current &&= (t(kPe(n.current)), null);
}, [t]), null;
}
-function hze(e) {
- var { yAxisId: t, className: n, width: r, label: i } = e, a = (0, B.useRef)(null), o = (0, B.useRef)(null), s = Q(IU), c = LU(), l = CB(), u = "yAxis", d = Q((e) => LZ(e, t)), f = Q((e) => Dke(e, t)), p = Q((e) => UZ(e, u, t, c)), m = Q((e) => NX(e, t));
+function yze(e) {
+ var { yAxisId: t, className: n, width: r, label: i } = e, a = (0, B.useRef)(null), o = (0, B.useRef)(null), s = Q(IU), c = LU(), l = CB(), u = "yAxis", d = Q((e) => LZ(e, t)), f = Q((e) => jke(e, t)), p = Q((e) => UZ(e, u, t, c)), m = Q((e) => NX(e, t));
if ((0, B.useLayoutEffect)(() => {
if (!(r !== "auto" || !d || $$(i) || /*#__PURE__*/ (0, B.isValidElement)(i) || m == null)) {
var e = a.current;
if (e) {
var n = e.getCalculatedWidth();
- Math.round(d.width) !== Math.round(n) && l(kPe({
+ Math.round(d.width) !== Math.round(n) && l(NPe({
id: t,
width: n
}));
@@ -68652,7 +68884,7 @@ function hze(e) {
r,
m
]), d == null || f == null || m == null) return null;
- var { dangerouslySetInnerHTML: h, ticks: g, scale: _ } = e, v = K4(e, cze), { id: y, scale: b } = m, x = K4(m, lze);
+ var { dangerouslySetInnerHTML: h, ticks: g, scale: _ } = e, v = K4(e, fze), { id: y, scale: b } = m, x = K4(m, pze);
return /*#__PURE__*/ B.createElement(L2, U4({}, v, x, {
ref: a,
labelRef: o,
@@ -68668,7 +68900,7 @@ function hze(e) {
axisId: t
}));
}
-var gze = {
+var bze = {
allowDataOverflow: MX.allowDataOverflow,
allowDecimals: MX.allowDecimals,
allowDuplicatedCategory: MX.allowDuplicatedCategory,
@@ -68693,8 +68925,8 @@ var gze = {
width: MX.width,
yAxisId: 0
}, q4 = /*#__PURE__*/ B.memo((e) => {
- var t = Fz(e, gze);
- return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(mze, {
+ var t = Pz(e, bze);
+ return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(vze, {
interval: t.interval,
id: t.yAxisId,
scale: t.scale,
@@ -68720,7 +68952,7 @@ var gze = {
tick: t.tick,
tickFormatter: t.tickFormatter,
niceTicks: t.niceTicks
- }), /*#__PURE__*/ B.createElement(hze, t));
+ }), /*#__PURE__*/ B.createElement(yze, t));
}, L4);
q4.displayName = "YAxis";
var J4 = $([
@@ -68730,17 +68962,17 @@ var J4 = $([
lq,
TQ,
DQ,
- CAe,
+ DAe,
FU
-], AAe);
+], PAe);
//#endregion
//#region node_modules/recharts/es6/util/getRelativeCoordinate.js
-function _ze(e) {
+function xze(e) {
return "getBBox" in e.currentTarget && typeof e.currentTarget.getBBox == "function";
}
function Y4(e) {
var t = e.currentTarget.getBoundingClientRect(), n, r;
- if (_ze(e)) {
+ if (xze(e)) {
var i = e.currentTarget.getBBox();
n = i.width > 0 ? t.width / i.width : 1, r = i.height > 0 ? t.height / i.height : 1;
} else {
@@ -68760,7 +68992,7 @@ Z4.startListening({
actionCreator: X4,
effect: (e, t) => {
var n = e.payload, r = J4(t.getState(), Y4(n));
- r?.activeIndex != null && t.dispatch(Lke({
+ r?.activeIndex != null && t.dispatch(Vke({
activeIndex: r.activeIndex,
activeDataKey: void 0,
activeCoordinate: r.activeCoordinate
@@ -68798,7 +69030,7 @@ $4.startListening({
});
//#endregion
//#region node_modules/recharts/es6/state/reduxDevtoolsJsonStringifyReplacer.js
-function vze(e, t) {
+function Sze(e, t) {
return t instanceof HTMLElement ? `HTMLElement <${t.tagName} class="${t.className}">` : t === window ? "global.window" : e === "children" && typeof t == "object" && t ? "<<CHILDREN>>" : t;
}
//#endregion
@@ -68821,11 +69053,11 @@ var r3 = {
reducers: { updateOptions: (e, t) => {
e.accessibilityLayer = t.payload.accessibilityLayer, e.barCategoryGap = t.payload.barCategoryGap, e.barGap = t.payload.barGap ?? r3.barGap, e.barSize = t.payload.barSize, e.maxBarSize = t.payload.maxBarSize, e.stackOffset = t.payload.stackOffset, e.syncId = t.payload.syncId, e.syncMethod = t.payload.syncMethod, e.className = t.payload.className, e.baseValue = t.payload.baseValue, e.reverseStackOrder = t.payload.reverseStackOrder;
} }
-}), yze = i3.reducer, { updateOptions: bze } = i3.actions, a3 = FH({
+}), Cze = i3.reducer, { updateOptions: wze } = i3.actions, a3 = FH({
name: "polarOptions",
initialState: null,
reducers: { updatePolarOptions: (e, t) => e === null ? t.payload : (e.startAngle = t.payload.startAngle, e.endAngle = t.payload.endAngle, e.cx = t.payload.cx, e.cy = t.payload.cy, e.innerRadius = t.payload.innerRadius, e.outerRadius = t.payload.outerRadius, e) }
-}), { updatePolarOptions: xze } = a3.actions, Sze = a3.reducer, o3 = EH("keyDown"), s3 = EH("focus"), c3 = EH("blur"), l3 = oU(), u3 = null, d3 = null, f3 = null;
+}), { updatePolarOptions: Tze } = a3.actions, Eze = a3.reducer, o3 = EH("keyDown"), s3 = EH("focus"), c3 = EH("blur"), l3 = oU(), u3 = null, d3 = null, f3 = null;
l3.startListening({
actionCreator: o3,
effect: (e, t) => {
@@ -68850,7 +69082,7 @@ l3.startListening({
}));
return;
}
- var c = Oke(e) === "left-to-right" ? 1 : -1, l = a + (r === "ArrowRight" ? 1 : -1) * c;
+ var c = Mke(e) === "left-to-right" ? 1 : -1, l = a + (r === "ArrowRight" ? 1 : -1) * c;
if (o == null || l >= o.length || l < 0) return;
var u = JQ(e, "axis", "hover", String(l));
t.dispatch(iQ({
@@ -68933,12 +69165,12 @@ h3.startListening({
try {
if (!e) return;
var { handler: n, reactEvent: r } = e, a = t.getState(), o = {
- activeCoordinate: lAe(a),
+ activeCoordinate: pAe(a),
activeDataKey: PQ(a),
activeIndex: MQ(a),
activeLabel: NQ(a),
activeTooltipIndex: MQ(a),
- isTooltipActive: uAe(a)
+ isTooltipActive: mAe(a)
};
n && n(o, r);
} finally {
@@ -68962,7 +69194,7 @@ h3.startListening({
}
}
});
-var Cze = $([
+var Dze = $([
$([fQ], (e) => e.tooltipItemPayloads),
(e, t) => t,
(e, t, n) => n
@@ -69007,9 +69239,9 @@ b3.startListening({
if (document.elementFromPoint == null || a == null) return;
var o = document.elementFromPoint(a.clientX, a.clientY);
if (!o || !o.getAttribute) return;
- var s = o.getAttribute(nCe), c = o.getAttribute("data-recharts-item-id") ?? void 0, l = vQ(e).find((e) => e.id === c);
+ var s = o.getAttribute(oCe), c = o.getAttribute("data-recharts-item-id") ?? void 0, l = vQ(e).find((e) => e.id === c);
if (s == null || l == null || c == null) return;
- var { dataKey: u } = l, d = Cze(e, s, c);
+ var { dataKey: u } = l, d = Dze(e, s, c);
t.dispatch(eQ({
activeDataKey: u,
activeIndex: s,
@@ -69047,27 +69279,27 @@ var T3 = {
reducers: { setEventSettings: (e, t) => {
t.payload.throttleDelay != null && (e.throttleDelay = t.payload.throttleDelay), t.payload.throttledEvents != null && (e.throttledEvents = KW(t.payload.throttledEvents));
} }
-}), { setEventSettings: wze } = E3.actions, Tze = E3.reducer, Eze = lV({
- brush: UFe,
- cartesianAxis: APe,
- chartData: rje,
- errorBars: cLe,
- eventSettings: Tze,
- graphicalItems: oPe,
- layout: USe,
- legend: VCe,
- options: QAe,
- polarAxis: XMe,
- polarOptions: Sze,
- referenceElements: eIe,
- renderedTicks: OIe,
- rootProps: yze,
- tooltip: Rke,
- zIndex: UAe
-}), Dze = function(e) {
+}), { setEventSettings: Oze } = E3.actions, kze = E3.reducer, Aze = lV({
+ brush: qFe,
+ cartesianAxis: PPe,
+ chartData: sje,
+ errorBars: fLe,
+ eventSettings: kze,
+ graphicalItems: uPe,
+ layout: qSe,
+ legend: GCe,
+ options: nje,
+ polarAxis: eNe,
+ polarOptions: Eze,
+ referenceElements: iIe,
+ renderedTicks: MIe,
+ rootProps: Cze,
+ tooltip: Hke,
+ zIndex: qAe
+}), jze = function(e) {
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "Chart";
- return hSe({
- reducer: Eze,
+ return ySe({
+ reducer: Aze,
preloadedState: e,
middleware: (e) => e({
serializableCheck: !1,
@@ -69088,7 +69320,7 @@ var T3 = {
return typeof e == "function" && (t = e()), t.concat(NH({ type: "raf" }));
},
devTools: dG.devToolsEnabled && {
- serialize: { replacer: vze },
+ serialize: { replacer: Sze },
name: `recharts-${t}`
}
});
@@ -69098,19 +69330,19 @@ var T3 = {
function D3(e) {
var { preloadedState: t, children: n, reduxStoreName: r } = e, i = LU(), a = (0, B.useRef)(null);
if (i) return n;
- a.current ??= Dze(t, r);
+ a.current ??= jze(t, r);
var o = bB;
- return /*#__PURE__*/ B.createElement(twe, {
+ return /*#__PURE__*/ B.createElement(awe, {
context: o,
store: a.current
}, n);
}
//#endregion
//#region node_modules/recharts/es6/state/ReportMainChartProps.js
-function Oze(e) {
+function Mze(e) {
var { layout: t, margin: n } = e, r = CB(), i = LU();
return (0, B.useEffect)(() => {
- i || (r(BSe(t)), r(zSe(n)));
+ i || (r(WSe(t)), r(USe(n)));
}, [
r,
i,
@@ -69118,31 +69350,31 @@ function Oze(e) {
n
]), null;
}
-var O3 = /*#__PURE__*/ (0, B.memo)(Oze, eG);
+var O3 = /*#__PURE__*/ (0, B.memo)(Mze, eG);
//#endregion
//#region node_modules/recharts/es6/state/ReportChartProps.js
function k3(e) {
var t = CB();
return (0, B.useEffect)(() => {
- t(bze(e));
+ t(wze(e));
}, [t, e]), null;
}
var A3 = /*#__PURE__*/ (0, B.memo)((e) => {
var t = CB();
return (0, B.useEffect)(() => {
- t(wze(e));
+ t(Oze(e));
}, [t, e]), null;
}, eG);
//#endregion
//#region node_modules/recharts/es6/zIndex/ZIndexPortal.js
function j3(e) {
var { zIndex: t, isPanorama: n } = e, r = (0, B.useRef)(null), i = CB();
- return (0, B.useLayoutEffect)(() => (r.current && i(VAe({
+ return (0, B.useLayoutEffect)(() => (r.current && i(GAe({
zIndex: t,
element: r.current,
isPanorama: n
})), () => {
- i(HAe({
+ i(KAe({
zIndex: t,
isPanorama: n
}));
@@ -69157,7 +69389,7 @@ function j3(e) {
});
}
function M3(e) {
- var { children: t, isPanorama: n } = e, r = Q(MAe);
+ var { children: t, isPanorama: n } = e, r = Q(IAe);
if (!r || r.length === 0) return t;
var i = r.filter((e) => e < 0), a = r.filter((e) => e > 0);
return /*#__PURE__*/ B.createElement(B.Fragment, null, i.map((e) => /*#__PURE__*/ B.createElement(j3, {
@@ -69172,17 +69404,17 @@ function M3(e) {
}
//#endregion
//#region node_modules/recharts/es6/container/RootSurface.js
-var kze = ["children"];
-function Aze(e, t) {
+var Nze = ["children"];
+function Pze(e, t) {
if (e == null) return {};
- var n, r, i = jze(e, t);
+ var n, r, i = Fze(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function jze(e, t) {
+function Fze(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -69200,46 +69432,46 @@ function N3() {
return e;
}, N3.apply(null, arguments);
}
-var Mze = {
+var Ize = {
width: "100%",
height: "100%",
display: "block"
-}, Nze = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
+}, Lze = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
var n = $U(), r = eW(), i = hG();
if (!dU(n) || !dU(r)) return null;
var { children: a, otherAttributes: o, title: s, desc: c } = e, l, u;
- return o != null && (l = typeof o.tabIndex == "number" ? o.tabIndex : i ? 0 : void 0, u = typeof o.role == "string" ? o.role : i ? "application" : void 0), /*#__PURE__*/ B.createElement(lR, N3({}, o, {
+ return o != null && (l = typeof o.tabIndex == "number" ? o.tabIndex : i ? 0 : void 0, u = typeof o.role == "string" ? o.role : i ? "application" : void 0), /*#__PURE__*/ B.createElement(cR, N3({}, o, {
title: s,
desc: c,
role: u,
tabIndex: l,
width: n,
height: r,
- style: Mze,
+ style: Ize,
ref: t
}), a);
-}), Pze = (e) => {
+}), Rze = (e) => {
var { children: t } = e, n = Q(zU);
if (!n) return null;
var { width: r, height: i, y: a, x: o } = n;
- return /*#__PURE__*/ B.createElement(lR, {
+ return /*#__PURE__*/ B.createElement(cR, {
width: r,
height: i,
x: o,
y: a
}, t);
}, P3 = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
- var { children: n } = e, r = Aze(e, kze);
- return LU() ? /*#__PURE__*/ B.createElement(Pze, null, /*#__PURE__*/ B.createElement(M3, { isPanorama: !0 }, n)) : /*#__PURE__*/ B.createElement(Nze, N3({ ref: t }, r), /*#__PURE__*/ B.createElement(M3, { isPanorama: !1 }, n));
+ var { children: n } = e, r = Pze(e, Nze);
+ return LU() ? /*#__PURE__*/ B.createElement(Rze, null, /*#__PURE__*/ B.createElement(M3, { isPanorama: !0 }, n)) : /*#__PURE__*/ B.createElement(Lze, N3({ ref: t }, r), /*#__PURE__*/ B.createElement(M3, { isPanorama: !1 }, n));
});
//#endregion
//#region node_modules/recharts/es6/util/useReportScale.js
-function Fze() {
- var e = CB(), [t, n] = (0, B.useState)(null), r = Q(tCe);
+function zze() {
+ var e = CB(), [t, n] = (0, B.useState)(null), r = Q(aCe);
return (0, B.useEffect)(() => {
if (t != null) {
var n = t.getBoundingClientRect().width / t.offsetWidth;
- uU(n) && n !== r && e(HSe(n));
+ uU(n) && n !== r && e(KSe(n));
}
}, [
t,
@@ -69259,30 +69491,30 @@ function F3(e, t) {
}
return n;
}
-function Ize(e) {
+function Bze(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? F3(Object(n), !0).forEach(function(t) {
- Lze(e, t, n[t]);
+ Vze(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : F3(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function Lze(e, t, n) {
- return (t = Rze(t)) in e ? Object.defineProperty(e, t, {
+function Vze(e, t, n) {
+ return (t = Hze(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function Rze(e) {
- var t = zze(e, "string");
+function Hze(e) {
+ var t = Uze(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function zze(e, t) {
+function Uze(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -69301,7 +69533,7 @@ function I3() {
return e;
}, I3.apply(null, arguments);
}
-var Bze = () => (fje(), null);
+var Wze = () => (gje(), null);
function L3(e) {
if (typeof e == "number") return e;
if (typeof e == "string") {
@@ -69310,7 +69542,7 @@ function L3(e) {
}
return 0;
}
-var Vze = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
+var Gze = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
var n = (0, B.useRef)(null), [r, i] = (0, B.useState)({
containerWidth: L3(e.style?.width),
containerHeight: L3(e.style?.height)
@@ -69342,7 +69574,7 @@ var Vze = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
width: r.containerWidth,
height: r.containerHeight
}), /*#__PURE__*/ B.createElement("div", I3({ ref: o }, e)));
-}), Hze = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
+}), Kze = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
var { width: n, height: r } = e, [i, a] = (0, B.useState)({
containerWidth: L3(n),
containerHeight: L3(r)
@@ -69364,15 +69596,15 @@ var Vze = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
width: i.containerWidth,
height: i.containerHeight
}), /*#__PURE__*/ B.createElement("div", I3({ ref: s }, e)));
-}), Uze = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
+}), qze = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
var { width: n, height: r } = e;
return /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(oW, {
width: n,
height: r
}), /*#__PURE__*/ B.createElement("div", I3({ ref: t }, e)));
-}), Wze = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
+}), Jze = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
var { width: n, height: r } = e;
- return typeof n == "string" || typeof r == "string" ? /*#__PURE__*/ B.createElement(Hze, I3({}, e, { ref: t })) : typeof n == "number" && typeof r == "number" ? /*#__PURE__*/ B.createElement(Uze, I3({}, e, {
+ return typeof n == "string" || typeof r == "string" ? /*#__PURE__*/ B.createElement(Kze, I3({}, e, { ref: t })) : typeof n == "number" && typeof r == "number" ? /*#__PURE__*/ B.createElement(qze, I3({}, e, {
width: n,
height: r,
ref: t
@@ -69381,11 +69613,11 @@ var Vze = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
height: r
}), /*#__PURE__*/ B.createElement("div", I3({ ref: t }, e)));
});
-function Gze(e) {
- return e ? Vze : Wze;
+function Yze(e) {
+ return e ? Gze : Jze;
}
-var Kze = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
- var { children: n, className: r, height: i, onClick: a, onContextMenu: o, onDoubleClick: s, onMouseDown: c, onMouseEnter: l, onMouseLeave: u, onMouseMove: d, onMouseUp: f, onTouchEnd: p, onTouchMove: m, onTouchStart: h, style: g, width: _, responsive: v, dispatchTouchEvents: y = !0 } = e, b = (0, B.useRef)(null), x = CB(), [S, C] = (0, B.useState)(null), [w, T] = (0, B.useState)(null), E = Fze(), D = JU(), O = D?.width > 0 ? D.width : _, k = D?.height > 0 ? D.height : i, A = (0, B.useCallback)((e) => {
+var Xze = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
+ var { children: n, className: r, height: i, onClick: a, onContextMenu: o, onDoubleClick: s, onMouseDown: c, onMouseEnter: l, onMouseLeave: u, onMouseMove: d, onMouseUp: f, onTouchEnd: p, onTouchMove: m, onTouchStart: h, style: g, width: _, responsive: v, dispatchTouchEvents: y = !0 } = e, b = (0, B.useRef)(null), x = CB(), [S, C] = (0, B.useState)(null), [w, T] = (0, B.useState)(null), E = zze(), D = JU(), O = D?.width > 0 ? D.width : _, k = D?.height > 0 ? D.height : i, A = (0, B.useCallback)((e) => {
E(e), typeof t == "function" && t(e), C(e), T(e), e != null && (b.current = e);
}, [
E,
@@ -69457,12 +69689,12 @@ var Kze = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
handler: p,
reactEvent: e
}));
- }, [x, p]), se = Gze(v);
- return /*#__PURE__*/ B.createElement(r$.Provider, { value: S }, /*#__PURE__*/ B.createElement(fR.Provider, { value: w }, /*#__PURE__*/ B.createElement(se, {
+ }, [x, p]), se = Yze(v);
+ return /*#__PURE__*/ B.createElement(r$.Provider, { value: S }, /*#__PURE__*/ B.createElement(dR.Provider, { value: w }, /*#__PURE__*/ B.createElement(se, {
width: O ?? g?.width,
height: k ?? g?.height,
className: Jr("recharts-wrapper", r),
- style: Ize({
+ style: Bze({
position: "relative",
cursor: "default",
width: O,
@@ -69483,8 +69715,8 @@ var Kze = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
onTouchMove: ae,
onTouchStart: ie,
ref: A
- }, /*#__PURE__*/ B.createElement(Bze, null), n)));
-}), qze = [
+ }, /*#__PURE__*/ B.createElement(Wze, null), n)));
+}), Zze = [
"width",
"height",
"responsive",
@@ -69495,16 +69727,16 @@ var Kze = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
"title",
"desc"
];
-function Jze(e, t) {
+function Qze(e, t) {
if (e == null) return {};
- var n, r, i = Yze(e, t);
+ var n, r, i = $ze(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function Yze(e, t) {
+function $ze(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -69514,7 +69746,7 @@ function Yze(e, t) {
return n;
}
var R3 = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
- var { width: n, height: r, responsive: i, children: a, className: o, style: s, compact: c, title: l, desc: u } = e, d = aR(Jze(e, qze));
+ var { width: n, height: r, responsive: i, children: a, className: o, style: s, compact: c, title: l, desc: u } = e, d = iR(Qze(e, Zze));
return c ? /*#__PURE__*/ B.createElement(B.Fragment, null, /*#__PURE__*/ B.createElement(oW, {
width: n,
height: r
@@ -69522,7 +69754,7 @@ var R3 = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
otherAttributes: d,
title: l,
desc: u
- }, a)) : /*#__PURE__*/ B.createElement(Kze, {
+ }, a)) : /*#__PURE__*/ B.createElement(Xze, {
className: o,
style: s,
width: n,
@@ -69544,7 +69776,7 @@ var R3 = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
title: l,
desc: u,
ref: t
- }, /*#__PURE__*/ B.createElement(tIe, null, a)));
+ }, /*#__PURE__*/ B.createElement(aIe, null, a)));
});
//#endregion
//#region node_modules/recharts/es6/chart/CartesianChart.js
@@ -69567,30 +69799,30 @@ function B3(e, t) {
}
return n;
}
-function Xze(e) {
+function eBe(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? B3(Object(n), !0).forEach(function(t) {
- Zze(e, t, n[t]);
+ tBe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : B3(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function Zze(e, t, n) {
- return (t = Qze(t)) in e ? Object.defineProperty(e, t, {
+function tBe(e, t, n) {
+ return (t = nBe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function Qze(e) {
- var t = $ze(e, "string");
+function nBe(e) {
+ var t = rBe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function $ze(e, t) {
+function rBe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -69600,7 +69832,7 @@ function $ze(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var eBe = Xze({
+var iBe = eBe({
accessibilityLayer: !0,
barCategoryGap: "10%",
barGap: 4,
@@ -69616,7 +69848,7 @@ var eBe = Xze({
stackOffset: "none",
syncMethod: "index"
}, T3), V3 = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- var n = Fz(e.categoricalChartProps, eBe), { chartName: r, defaultTooltipEventType: i, validateTooltipEventTypes: a, tooltipPayloadSearcher: o, categoricalChartProps: s } = e, c = {
+ var n = Pz(e.categoricalChartProps, iBe), { chartName: r, defaultTooltipEventType: i, validateTooltipEventTypes: a, tooltipPayloadSearcher: o, categoricalChartProps: s } = e, c = {
chartName: r,
defaultTooltipEventType: i,
validateTooltipEventTypes: a,
@@ -69645,32 +69877,32 @@ var eBe = Xze({
className: n.className,
reverseStackOrder: n.reverseStackOrder
}), /*#__PURE__*/ B.createElement(R3, z3({}, n, { ref: t })));
-}), tBe = ["axis"], nBe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => /*#__PURE__*/ B.createElement(V3, {
+}), aBe = ["axis"], oBe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => /*#__PURE__*/ B.createElement(V3, {
chartName: "LineChart",
defaultTooltipEventType: "axis",
- validateTooltipEventTypes: tBe,
+ validateTooltipEventTypes: aBe,
tooltipPayloadSearcher: s$,
categoricalChartProps: e,
ref: t
-})), rBe = ["axis", "item"], H3 = /*#__PURE__*/ (0, B.forwardRef)((e, t) => /*#__PURE__*/ B.createElement(V3, {
+})), sBe = ["axis", "item"], H3 = /*#__PURE__*/ (0, B.forwardRef)((e, t) => /*#__PURE__*/ B.createElement(V3, {
chartName: "BarChart",
defaultTooltipEventType: "axis",
- validateTooltipEventTypes: rBe,
+ validateTooltipEventTypes: sBe,
tooltipPayloadSearcher: s$,
categoricalChartProps: e,
ref: t
}));
//#endregion
//#region node_modules/recharts/es6/state/ReportPolarOptions.js
-function iBe(e) {
+function cBe(e) {
var t = CB();
return (0, B.useEffect)(() => {
- t(xze(e));
+ t(Tze(e));
}, [t, e]), null;
}
//#endregion
//#region node_modules/recharts/es6/chart/PolarChart.js
-var aBe = ["layout"];
+var lBe = ["layout"];
function U3() {
return U3 = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
@@ -69680,16 +69912,16 @@ function U3() {
return e;
}, U3.apply(null, arguments);
}
-function oBe(e, t) {
+function uBe(e, t) {
if (e == null) return {};
- var n, r, i = sBe(e, t);
+ var n, r, i = dBe(e, t);
if (Object.getOwnPropertySymbols) {
var a = Object.getOwnPropertySymbols(e);
for (r = 0; r < a.length; r++) n = a[r], t.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
}
return i;
}
-function sBe(e, t) {
+function dBe(e, t) {
if (e == null) return {};
var n = {};
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -69708,30 +69940,30 @@ function W3(e, t) {
}
return n;
}
-function cBe(e) {
+function fBe(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? W3(Object(n), !0).forEach(function(t) {
- lBe(e, t, n[t]);
+ pBe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : W3(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function lBe(e, t, n) {
- return (t = uBe(t)) in e ? Object.defineProperty(e, t, {
+function pBe(e, t, n) {
+ return (t = mBe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function uBe(e) {
- var t = dBe(e, "string");
+function mBe(e) {
+ var t = hBe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function dBe(e, t) {
+function hBe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -69741,7 +69973,7 @@ function dBe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var G3 = cBe({
+var G3 = fBe({
accessibilityLayer: !0,
stackOffset: "none",
barCategoryGap: "10%",
@@ -69761,7 +69993,7 @@ var G3 = cBe({
innerRadius: 0,
outerRadius: "80%"
}, T3), K3 = /*#__PURE__*/ (0, B.forwardRef)(function(e, t) {
- var n = Fz(e.categoricalChartProps, G3), { layout: r } = n, i = oBe(n, aBe), { chartName: a, defaultTooltipEventType: o, validateTooltipEventTypes: s, tooltipPayloadSearcher: c } = e, l = {
+ var n = Pz(e.categoricalChartProps, G3), { layout: r } = n, i = uBe(n, lBe), { chartName: a, defaultTooltipEventType: o, validateTooltipEventTypes: s, tooltipPayloadSearcher: c } = e, l = {
chartName: a,
defaultTooltipEventType: o,
validateTooltipEventTypes: s,
@@ -69789,7 +70021,7 @@ var G3 = cBe({
syncMethod: n.syncMethod,
className: n.className,
reverseStackOrder: n.reverseStackOrder
- }), /*#__PURE__*/ B.createElement(iBe, {
+ }), /*#__PURE__*/ B.createElement(cBe, {
cx: n.cx,
cy: n.cy,
startAngle: n.startAngle,
@@ -69814,26 +70046,26 @@ function J3(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? q3(Object(n), !0).forEach(function(t) {
- fBe(e, t, n[t]);
+ gBe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : q3(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function fBe(e, t, n) {
- return (t = pBe(t)) in e ? Object.defineProperty(e, t, {
+function gBe(e, t, n) {
+ return (t = _Be(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function pBe(e) {
- var t = mBe(e, "string");
+function _Be(e) {
+ var t = vBe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function mBe(e, t) {
+function vBe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -69843,24 +70075,24 @@ function mBe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var hBe = ["axis"], gBe = J3(J3({}, G3), {}, {
+var yBe = ["axis"], bBe = J3(J3({}, G3), {}, {
layout: "centric",
startAngle: 90,
endAngle: -270
-}), _Be = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
- var n = Fz(e, gBe);
+}), xBe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
+ var n = Pz(e, bBe);
return /*#__PURE__*/ B.createElement(K3, {
chartName: "RadarChart",
defaultTooltipEventType: "axis",
- validateTooltipEventTypes: hBe,
+ validateTooltipEventTypes: yBe,
tooltipPayloadSearcher: s$,
categoricalChartProps: n,
ref: t
});
-}), vBe = ["axis"], yBe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => /*#__PURE__*/ B.createElement(V3, {
+}), SBe = ["axis"], CBe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => /*#__PURE__*/ B.createElement(V3, {
chartName: "AreaChart",
defaultTooltipEventType: "axis",
- validateTooltipEventTypes: vBe,
+ validateTooltipEventTypes: SBe,
tooltipPayloadSearcher: s$,
categoricalChartProps: e,
ref: t
@@ -69881,26 +70113,26 @@ function X3(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] == null ? {} : arguments[t];
t % 2 ? Y3(Object(n), !0).forEach(function(t) {
- bBe(e, t, n[t]);
+ wBe(e, t, n[t]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Y3(Object(n)).forEach(function(t) {
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
});
}
return e;
}
-function bBe(e, t, n) {
- return (t = xBe(t)) in e ? Object.defineProperty(e, t, {
+function wBe(e, t, n) {
+ return (t = TBe(t)) in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n, e;
}
-function xBe(e) {
- var t = SBe(e, "string");
+function TBe(e) {
+ var t = EBe(e, "string");
return typeof t == "symbol" ? t : t + "";
}
-function SBe(e, t) {
+function EBe(e, t) {
if (typeof e != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
@@ -69910,16 +70142,16 @@ function SBe(e, t) {
}
return (t === "string" ? String : Number)(e);
}
-var CBe = ["axis", "item"], wBe = X3(X3({}, G3), {}, {
+var DBe = ["axis", "item"], OBe = X3(X3({}, G3), {}, {
layout: "radial",
startAngle: 0,
endAngle: 360
-}), TBe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
- var n = Fz(e, wBe);
+}), kBe = /*#__PURE__*/ (0, B.forwardRef)((e, t) => {
+ var n = Pz(e, OBe);
return /*#__PURE__*/ B.createElement(K3, {
chartName: "RadialBarChart",
defaultTooltipEventType: "axis",
- validateTooltipEventTypes: CBe,
+ validateTooltipEventTypes: DBe,
tooltipPayloadSearcher: s$,
categoricalChartProps: n,
ref: t
@@ -69936,7 +70168,7 @@ var Q3 = {
light: "",
dark: ".dark"
}, $3 = Object.keys(Q3);
-function EBe(e) {
+function ABe(e) {
for (let [t, n] of Object.entries(e)) if (n.colors && !$3.some((e) => n.colors?.[e] !== void 0)) throw Error(`[EvilCharts] Invalid chart config for "${t}": colors object must have at least one theme key (${$3.join(", ")}). Received empty object or invalid keys.`);
}
var e6 = B.createContext(null);
@@ -69950,7 +70182,7 @@ function n6({ id: e, config: t, initialDimension: n = {
height: 200
}, className: r, children: i, footer: a, ...o }) {
let s = B.useId(), c = `chart-${e ?? s.replace(/:/g, "")}`;
- return EBe(t), /* @__PURE__ */ (0, H.jsx)(e6.Provider, {
+ return ABe(t), /* @__PURE__ */ (0, H.jsx)(e6.Provider, {
value: { config: t },
children: /* @__PURE__ */ (0, H.jsxs)("div", {
"data-slot": "chart",
@@ -69981,7 +70213,7 @@ function r6({ isLoading: e }) {
})
}) : null;
}
-function DBe(e, t) {
+function jBe(e, t) {
let n = e.length;
if (n >= t) return e.slice(0, t);
let r = [], i = Math.floor(t / n), a = t % n;
@@ -69996,7 +70228,7 @@ var i6 = ({ id: e, config: t }) => {
if (!n.length) return null;
let r = (e) => n.flatMap(([t, n]) => {
let r = n.colors?.[e];
- return !r || !Array.isArray(r) || r.length === 0 ? [] : DBe(r, o6(n)).map((e, n) => ` --color-${t}-${n}: ${e};`);
+ return !r || !Array.isArray(r) || r.length === 0 ? [] : jBe(r, o6(n)).map((e, n) => ` --color-${t}-${n}: ${e};`);
}).filter(Boolean).join("\n"), i = Object.entries(Q3).map(([t, n]) => `${n} [data-chart=${e}] {\n${r(t)}\n}`).join("\n");
return /* @__PURE__ */ (0, H.jsx)("style", { dangerouslySetInnerHTML: { __html: i } });
};
@@ -70010,15 +70242,15 @@ function o6(e) {
let t = $3.map((t) => e.colors?.[t]?.length ?? 0);
return Math.max(...t, 1);
}
-var OBe = (e = 10, t = 0, n = 70) => {
+var MBe = (e = 10, t = 0, n = 70) => {
let r = n - t;
return Array.from({ length: e }, () => ({ loading: Math.floor(Math.random() * r) + t }));
-}, kBe = {
+}, NBe = {
sm: "rounded-sm",
md: "rounded-md",
lg: "rounded-lg",
xl: "rounded-xl"
-}, ABe = {
+}, PBe = {
default: "bg-background",
"frosted-glass": "bg-background/70 backdrop-blur-sm"
};
@@ -70045,7 +70277,7 @@ function s6({ active: e, payload: t, className: n, indicator: r = "dot", hideLab
if (!e || !t?.length) return /* @__PURE__ */ (0, H.jsx)("span", { className: "p-4" });
let _ = t.length === 1 && r !== "dot";
return /* @__PURE__ */ (0, H.jsxs)("div", {
- className: Z3("border-border/50 grid min-w-32 items-start gap-1.5 border px-2.5 py-1.5 text-xs shadow-xl", kBe[p], ABe[m], n),
+ className: Z3("border-border/50 grid min-w-32 items-start gap-1.5 border px-2.5 py-1.5 text-xs shadow-xl", NBe[p], PBe[m], n),
children: [_ ? null : g, /* @__PURE__ */ (0, H.jsx)("div", {
className: "grid gap-1.5",
children: t.filter((e) => e.type !== "none").map((e, t) => {
@@ -70059,7 +70291,7 @@ function s6({ active: e, payload: t, className: n, indicator: r = "dot", hideLab
"w-0 border-[1.5px] border-dashed bg-transparent!": r === "dashed",
"my-0.5": _ && r === "dashed"
}),
- style: jBe(n, o)
+ style: FBe(n, o)
}), /* @__PURE__ */ (0, H.jsxs)("div", {
className: Z3("flex flex-1 justify-between gap-4 leading-none", _ ? "items-end" : "items-center"),
children: [/* @__PURE__ */ (0, H.jsxs)("div", {
@@ -70078,10 +70310,10 @@ function s6({ active: e, payload: t, className: n, indicator: r = "dot", hideLab
})]
});
}
-function jBe(e, t) {
+function FBe(e, t) {
return t <= 1 ? { background: `var(--color-${e}-0)` } : { background: `linear-gradient(to right, ${Array.from({ length: t }, (n, r) => `var(--color-${e}-${r}) ${r / (t - 1) * 100}%`).join(", ")})` };
}
-var c6 = ({ animationDuration: e = 200, ...t }) => /* @__PURE__ */ (0, H.jsx)(bje, {
+var c6 = ({ animationDuration: e = 200, ...t }) => /* @__PURE__ */ (0, H.jsx)(wje, {
animationDuration: e,
...t
});
@@ -70098,7 +70330,7 @@ function l6({ className: e, hideIcon: t = !1, nameKey: n, payload: r, verticalAl
onClick: () => {
c && s?.(o === r ? null : r);
},
- children: [i?.icon && !t ? /* @__PURE__ */ (0, H.jsx)(i.icon, {}) : /* @__PURE__ */ (0, H.jsx)(MBe, {
+ children: [i?.icon && !t ? /* @__PURE__ */ (0, H.jsx)(i.icon, {}) : /* @__PURE__ */ (0, H.jsx)(IBe, {
variant: l,
dataKey: r,
colorsCount: d
@@ -70107,8 +70339,8 @@ function l6({ className: e, hideIcon: t = !1, nameKey: n, payload: r, verticalAl
})
}) : null;
}
-function MBe({ variant: e, dataKey: t, colorsCount: n }) {
- let r = NBe(t, n), i = PBe(t, n);
+function IBe({ variant: e, dataKey: t, colorsCount: n }) {
+ let r = LBe(t, n), i = RBe(t, n);
switch (e) {
case "square": return /* @__PURE__ */ (0, H.jsx)("div", {
className: "h-2 w-2 shrink-0",
@@ -70140,10 +70372,10 @@ function MBe({ variant: e, dataKey: t, colorsCount: n }) {
});
}
}
-function NBe(e, t) {
+function LBe(e, t) {
return t <= 1 ? { backgroundColor: `var(--color-${e}-0)` } : { background: `linear-gradient(to right, ${Array.from({ length: t }, (n, r) => `var(--color-${e}-${r}) ${r / (t - 1) * 100}%`).join(", ")})` };
}
-function PBe(e, t) {
+function RBe(e, t) {
let n = {
WebkitMask: "linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",
WebkitMaskComposite: "xor",
@@ -70163,7 +70395,7 @@ var u6 = iG, d6 = () => null, f6 = {
damping: 35,
mass: .8
};
-function FBe({ range: e, totalPoints: t, containerRef: n, commit: r }) {
+function zBe({ range: e, totalPoints: t, containerRef: n, commit: r }) {
let i = B.useRef(null), [a, o] = B.useState(!1), s = (0, B.useCallback)((e) => !n.current || t <= 1 ? 0 : Math.round(e / n.current.getBoundingClientRect().width * (t - 1)), [t, n]), c = (0, B.useCallback)((t, n) => {
t.preventDefault(), t.target.setPointerCapture(t.pointerId), i.current = {
type: n,
@@ -70209,7 +70441,7 @@ function FBe({ range: e, totalPoints: t, containerRef: n, commit: r }) {
])
};
}
-function IBe({ data: e, chartConfig: t, dataKeys: n, xDataKey: r, variant: i = "area", height: a = 56, className: o, stacked: s = !1, strokeVariant: c = "solid", connectNulls: l = !1, barRadius: u, startIndex: d, endIndex: f, defaultStartIndex: p = 0, defaultEndIndex: m, onChange: h, formatLabel: g, curveType: _ = "monotone", minSpan: v = 2, showLabels: y = !0, skipStyle: b = !1 }) {
+function BBe({ data: e, chartConfig: t, dataKeys: n, xDataKey: r, variant: i = "area", height: a = 56, className: o, stacked: s = !1, strokeVariant: c = "solid", connectNulls: l = !1, barRadius: u, startIndex: d, endIndex: f, defaultStartIndex: p = 0, defaultEndIndex: m, onChange: h, formatLabel: g, curveType: _ = "monotone", minSpan: v = 2, showLabels: y = !0, skipStyle: b = !1 }) {
let x = B.useRef(null), S = B.useMemo(() => n ?? Object.keys(t), [n, t]), C = e.length, w = B.useId().replace(/:/g, ""), T = d !== void 0 && f !== void 0, [E, D] = B.useState(() => ({
startIndex: Math.max(0, Math.min(p, C - 1)),
endIndex: Math.max(0, Math.min(m ?? C - 1, C - 1))
@@ -70243,7 +70475,7 @@ function IBe({ data: e, chartConfig: t, dataKeys: n, xDataKey: r, variant: i = "
startIndex: n,
endIndex: r
};
- }, [C, v]), { isDragging: A, bind: j } = FBe({
+ }, [C, v]), { isDragging: A, bind: j } = zBe({
range: E,
totalPoints: C,
containerRef: x,
@@ -70268,16 +70500,16 @@ function IBe({ data: e, chartConfig: t, dataKeys: n, xDataKey: r, variant: i = "
f,
A
]);
- let N = C > 1 ? M.startIndex / (C - 1) * 100 : 0, ee = C > 1 ? M.endIndex / (C - 1) * 100 : 100, te = BE(N), P = BE(ee);
+ let N = C > 1 ? M.startIndex / (C - 1) * 100 : 0, ee = C > 1 ? M.endIndex / (C - 1) * 100 : 100, te = RE(N), P = RE(ee);
te.get() !== N && te.set(N), P.get() !== ee && P.set(ee);
- let F = WE(te, f6), ne = WE(P, f6), I = HE(F, (e) => `${e}%`), re = HE(ne, (e) => `${e}%`), L = HE(F, (e) => `${e}%`), ie = HE(ne, (e) => `${Math.max(0, 100 - e)}%`), ae = BE(`${Math.max(0, ee - N)}%`), oe = (0, B.useCallback)(() => {
+ let F = HE(te, f6), ne = HE(P, f6), I = BE(F, (e) => `${e}%`), re = BE(ne, (e) => `${e}%`), L = BE(F, (e) => `${e}%`), ie = BE(ne, (e) => `${Math.max(0, 100 - e)}%`), ae = RE(`${Math.max(0, ee - N)}%`), oe = (0, B.useCallback)(() => {
ae.set(`${Math.max(0, ne.get() - F.get())}%`);
}, [
F,
ne,
ae
]);
- zE(F, "change", oe), zE(ne, "change", oe);
+ LE(F, "change", oe), LE(ne, "change", oe);
let se = (0, B.useCallback)((t) => {
if (!r) return String(t);
let n = e[t]?.[r];
@@ -70299,7 +70531,7 @@ function IBe({ data: e, chartConfig: t, dataKeys: n, xDataKey: r, variant: i = "
}),
/* @__PURE__ */ (0, H.jsx)("div", {
className: "absolute inset-0 overflow-hidden rounded-md",
- children: /* @__PURE__ */ (0, H.jsx)(LBe, {
+ children: /* @__PURE__ */ (0, H.jsx)(VBe, {
data: e,
keys: S,
chartConfig: t,
@@ -70312,15 +70544,15 @@ function IBe({ data: e, chartConfig: t, dataKeys: n, xDataKey: r, variant: i = "
barRadius: u
})
}),
- /* @__PURE__ */ (0, H.jsx)(GE.div, {
+ /* @__PURE__ */ (0, H.jsx)(UE.div, {
className: "bg-background/70 pointer-events-none absolute inset-y-0 left-0 rounded-l-md backdrop-blur-[2px]",
style: { width: L }
}),
- /* @__PURE__ */ (0, H.jsx)(GE.div, {
+ /* @__PURE__ */ (0, H.jsx)(UE.div, {
className: "bg-background/70 pointer-events-none absolute inset-y-0 right-0 rounded-r-md backdrop-blur-[2px]",
style: { width: ie }
}),
- /* @__PURE__ */ (0, H.jsx)(GE.div, {
+ /* @__PURE__ */ (0, H.jsx)(UE.div, {
className: "absolute inset-y-0 cursor-grab touch-none rounded-sm border active:cursor-grabbing",
style: {
left: I,
@@ -70345,7 +70577,7 @@ function IBe({ data: e, chartConfig: t, dataKeys: n, xDataKey: r, variant: i = "
}
function p6({ side: e, position: t, label: n, bind: r }) {
let i = e === "left";
- return /* @__PURE__ */ (0, H.jsxs)(GE.div, {
+ return /* @__PURE__ */ (0, H.jsxs)(UE.div, {
className: "absolute inset-y-0 z-10",
style: { left: t },
children: [/* @__PURE__ */ (0, H.jsx)("div", {
@@ -70368,7 +70600,7 @@ function p6({ side: e, position: t, label: n, bind: r }) {
})]
});
}
-function LBe({ data: e, keys: t, chartConfig: n, variant: r, curveType: i, chartId: a, stacked: o, strokeVariant: s = "solid", connectNulls: c = !1, barRadius: l }) {
+function VBe({ data: e, keys: t, chartConfig: n, variant: r, curveType: i, chartId: a, stacked: o, strokeVariant: s = "solid", connectNulls: c = !1, barRadius: l }) {
let u = B.useMemo(() => Object.entries(n).filter(([e]) => t.includes(e)).map(([e, t]) => ({
dataKey: e,
colorsCount: o6(t)
@@ -70428,7 +70660,7 @@ function LBe({ data: e, keys: t, chartConfig: n, variant: r, curveType: i, chart
if (r === "line") return /* @__PURE__ */ (0, H.jsx)(YU, {
width: "100%",
height: "100%",
- children: /* @__PURE__ */ (0, H.jsxs)(nBe, {
+ children: /* @__PURE__ */ (0, H.jsxs)(oBe, {
data: e,
margin: {
top: 4,
@@ -70484,7 +70716,7 @@ function LBe({ data: e, keys: t, chartConfig: n, variant: r, curveType: i, chart
return /* @__PURE__ */ (0, H.jsx)(YU, {
width: "100%",
height: "100%",
- children: /* @__PURE__ */ (0, H.jsxs)(yBe, {
+ children: /* @__PURE__ */ (0, H.jsxs)(CBe, {
data: e,
margin: {
top: 4,
@@ -70510,7 +70742,7 @@ function LBe({ data: e, keys: t, chartConfig: n, variant: r, curveType: i, chart
})
});
}
-function RBe({ data: e, defaultStartIndex: t = 0, defaultEndIndex: n }) {
+function HBe({ data: e, defaultStartIndex: t = 0, defaultEndIndex: n }) {
let [r, i] = B.useState({
startIndex: t,
endIndex: n ?? Math.max(0, e.length - 1)
@@ -70534,7 +70766,7 @@ function RBe({ data: e, defaultStartIndex: t = 0, defaultEndIndex: n }) {
}
};
}
-var zBe = {
+var UBe = {
dots: ({ id: e }) => /* @__PURE__ */ (0, H.jsx)("pattern", {
id: e,
x: "0",
@@ -70707,7 +70939,7 @@ var zBe = {
})
};
function m6({ variant: e }) {
- let t = (0, B.useId)().replace(/:/g, ""), n = `${t}-bg-${e}`, r = `${t}-bg-edge-fade`, i = `${t}-bg-blur`, a = zBe[e];
+ let t = (0, B.useId)().replace(/:/g, ""), n = `${t}-bg-${e}`, r = `${t}-bg-edge-fade`, i = `${t}-bg-blur`, a = UBe[e];
return /* @__PURE__ */ (0, H.jsxs)($Q, {
zIndex: -1,
children: [/* @__PURE__ */ (0, H.jsxs)("defs", { children: [
@@ -70738,7 +70970,7 @@ function m6({ variant: e }) {
}
//#endregion
//#region src/react/evilcharts/registry/charts/recharts-bar-chart.tsx
-var h6 = 2, BBe = "loading", VBe = 2e3, HBe = "evil-stacked", UBe = .5, WBe = .05, GBe = [
+var h6 = 2, WBe = "loading", GBe = 2e3, KBe = "evil-stacked", qBe = .5, JBe = .05, YBe = [
0,
.7,
.5,
@@ -70750,7 +70982,7 @@ function _6() {
return e;
}
function v6({ config: e, data: t, children: n, className: r, chartProps: i, stackType: a = "default", layout: o = "vertical", barRadius: s = h6, animationType: c = "left-to-right", barGap: l, barCategoryGap: u, backgroundVariant: d, defaultSelectedDataKey: f = null, onSelectionChange: p, isLoading: m = !1, loadingBars: h, xDataKey: g }) {
- let _ = (0, B.useId)().replace(/:/g, ""), [v] = (0, B.useState)(() => Date.now()), [y, b] = (0, B.useState)(f), [x, S] = (0, B.useState)(!1), { loadingData: C, onShimmerExit: w } = uVe(m, h), { visibleData: T, brushProps: E } = RBe({ data: t }), D = (0, B.useMemo)(() => {
+ let _ = (0, B.useId)().replace(/:/g, ""), [v] = (0, B.useState)(() => Date.now()), [y, b] = (0, B.useState)(f), [x, S] = (0, B.useState)(!1), { loadingData: C, onShimmerExit: w } = mVe(m, h), { visibleData: T, brushProps: E } = HBe({ data: t }), D = (0, B.useMemo)(() => {
let e = B.Children.toArray(n), t = e.find((e) => (0, B.isValidElement)(e) && e.type === d6), r = (0, B.isValidElement)(t) ? t.props : {};
return {
slot: {
@@ -70793,7 +71025,7 @@ function v6({ config: e, data: t, children: n, className: r, chartProps: i, stac
children: /* @__PURE__ */ (0, H.jsxs)(n6, {
className: r,
config: e,
- footer: O && !m && /* @__PURE__ */ (0, H.jsx)(IBe, {
+ footer: O && !m && /* @__PURE__ */ (0, H.jsx)(BBe, {
data: t,
chartConfig: e,
xDataKey: g,
@@ -70824,7 +71056,7 @@ function v6({ config: e, data: t, children: n, className: r, chartProps: i, stac
d && /* @__PURE__ */ (0, H.jsx)(m6, { variant: d }),
/* @__PURE__ */ (0, H.jsx)(E2, { color: "white" }),
D.chartChildren,
- m && /* @__PURE__ */ (0, H.jsx)(dVe, {
+ m && /* @__PURE__ */ (0, H.jsx)(hVe, {
chartId: _,
onShimmerExit: w
})
@@ -70833,8 +71065,8 @@ function v6({ config: e, data: t, children: n, className: r, chartProps: i, stac
})
});
}
-function KBe({ dataKey: e, variant: t = "default", radius: n, animationType: r, isClickable: i = !1, enableHoverHighlight: a = !1, glowing: o = !1, bufferBar: s = !1, barProps: c }) {
- let { config: l, isStacked: u, isHorizontal: d, isLoading: f, barRadius: p, animationType: m, introStartedAt: h, dataLength: g, selectedDataKey: _, selectDataKey: v, isMouseInChart: y } = _6(), b = (0, B.useId)().replace(/:/g, ""), x = rce();
+function XBe({ dataKey: e, variant: t = "default", radius: n, animationType: r, isClickable: i = !1, enableHoverHighlight: a = !1, glowing: o = !1, bufferBar: s = !1, barProps: c }) {
+ let { config: l, isStacked: u, isHorizontal: d, isLoading: f, barRadius: p, animationType: m, introStartedAt: h, dataLength: g, selectedDataKey: _, selectDataKey: v, isMouseInChart: y } = _6(), b = (0, B.useId)().replace(/:/g, ""), x = ace();
if (f) return null;
let S = n ?? p, C = _ === e, w = x ? "none" : r ?? m, T = {
id: b,
@@ -70856,7 +71088,7 @@ function KBe({ dataKey: e, variant: t = "default", radius: n, animationType: r,
};
return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(P4, {
dataKey: e,
- stackId: u ? HBe : void 0,
+ stackId: u ? KBe : void 0,
fill: `url(#${b}-colors-${e})`,
radius: S,
isAnimationActive: !1,
@@ -70873,44 +71105,44 @@ function KBe({ dataKey: e, variant: t = "default", radius: n, animationType: r,
}),
...c
}), /* @__PURE__ */ (0, H.jsxs)("defs", { children: [
- /* @__PURE__ */ (0, H.jsx)(tVe, {
+ /* @__PURE__ */ (0, H.jsx)(aVe, {
id: b,
dataKey: e,
config: l
}),
- t === "hatched" && /* @__PURE__ */ (0, H.jsx)(nVe, {
+ t === "hatched" && /* @__PURE__ */ (0, H.jsx)(oVe, {
id: b,
dataKey: e
}),
- t === "duotone" && /* @__PURE__ */ (0, H.jsx)(iVe, {
+ t === "duotone" && /* @__PURE__ */ (0, H.jsx)(cVe, {
id: b,
dataKey: e,
config: l
}),
- t === "duotone-reverse" && /* @__PURE__ */ (0, H.jsx)(aVe, {
+ t === "duotone-reverse" && /* @__PURE__ */ (0, H.jsx)(lVe, {
id: b,
dataKey: e,
config: l
}),
- t === "gradient" && /* @__PURE__ */ (0, H.jsx)(oVe, {
+ t === "gradient" && /* @__PURE__ */ (0, H.jsx)(uVe, {
id: b,
dataKey: e
}),
- t === "stripped" && /* @__PURE__ */ (0, H.jsx)(sVe, {
+ t === "stripped" && /* @__PURE__ */ (0, H.jsx)(dVe, {
id: b,
dataKey: e
}),
- s && /* @__PURE__ */ (0, H.jsx)(rVe, {
+ s && /* @__PURE__ */ (0, H.jsx)(sVe, {
id: b,
dataKey: e
}),
- o && /* @__PURE__ */ (0, H.jsx)(cVe, {
+ o && /* @__PURE__ */ (0, H.jsx)(fVe, {
id: b,
dataKey: e
})
] })] });
}
-function qBe({ tickLine: e = !1, axisLine: t = !1, tickMargin: n = 8, minTickGap: r = 8, type: i, ...a }) {
+function ZBe({ tickLine: e = !1, axisLine: t = !1, tickMargin: n = 8, minTickGap: r = 8, type: i, ...a }) {
let { isLoading: o, isHorizontal: s } = _6();
return o ? null : /* @__PURE__ */ (0, H.jsx)(H4, {
tickLine: e,
@@ -70921,7 +71153,7 @@ function qBe({ tickLine: e = !1, axisLine: t = !1, tickMargin: n = 8, minTickGap
...a
});
}
-function JBe({ tickLine: e = !1, axisLine: t = !1, tickMargin: n = 8, minTickGap: r = 8, width: i = "auto", type: a, ...o }) {
+function QBe({ tickLine: e = !1, axisLine: t = !1, tickMargin: n = 8, minTickGap: r = 8, width: i = "auto", type: a, ...o }) {
let { isLoading: s, isHorizontal: c } = _6();
return s ? null : /* @__PURE__ */ (0, H.jsx)(q4, {
tickLine: e,
@@ -70933,7 +71165,7 @@ function JBe({ tickLine: e = !1, axisLine: t = !1, tickMargin: n = 8, minTickGap
...o
});
}
-function YBe({ strokeDasharray: e = "3 3", vertical: t, horizontal: n, ...r }) {
+function $Be({ strokeDasharray: e = "3 3", vertical: t, horizontal: n, ...r }) {
let { isHorizontal: i } = _6();
return /* @__PURE__ */ (0, H.jsx)(U2, {
strokeDasharray: e,
@@ -70942,7 +71174,7 @@ function YBe({ strokeDasharray: e = "3 3", vertical: t, horizontal: n, ...r }) {
...r
});
}
-function XBe({ variant: e, roundness: t, defaultIndex: n }) {
+function eVe({ variant: e, roundness: t, defaultIndex: n }) {
let { isLoading: r, selectedDataKey: i } = _6();
return r ? null : /* @__PURE__ */ (0, H.jsx)(c6, {
cursor: !1,
@@ -70954,7 +71186,7 @@ function XBe({ variant: e, roundness: t, defaultIndex: n }) {
})
});
}
-function ZBe({ variant: e, align: t = "right", verticalAlign: n = "top", isClickable: r = !1 }) {
+function tVe({ variant: e, align: t = "right", verticalAlign: n = "top", isClickable: r = !1 }) {
let { selectedDataKey: i, selectDataKey: a } = _6();
return /* @__PURE__ */ (0, H.jsx)(u6, {
verticalAlign: n,
@@ -70968,7 +71200,7 @@ function ZBe({ variant: e, align: t = "right", verticalAlign: n = "top", isClick
});
}
var y6 = (e) => {
- let { x: t = 0, y: n = 0, width: r = 0, height: i = 0, id: a, dataKey: o, variant: s, barRadius: c, glowing: l, bufferBar: u, isClickable: d, enableHoverHighlight: f, isMouseInChart: p, isHorizontal: m = !1, animationType: h = "none", introStartedAt: g = 0, selectedDataKey: _, isActive: v, dataLength: y = 0, onClick: b } = e, x = typeof e.index == "number" ? e.index : -1, S = u && y > 0 && x === y - 1, C = s === "stripped", w = QBe(h, x, y, m, g), T = S ? `url(#${a}-buffer-hatched-${o})` : $Be(s, a, o), E = l ? `url(#${a}-bar-glow-${o})` : void 0, D = eVe({
+ let { x: t = 0, y: n = 0, width: r = 0, height: i = 0, id: a, dataKey: o, variant: s, barRadius: c, glowing: l, bufferBar: u, isClickable: d, enableHoverHighlight: f, isMouseInChart: p, isHorizontal: m = !1, animationType: h = "none", introStartedAt: g = 0, selectedDataKey: _, isActive: v, dataLength: y = 0, onClick: b } = e, x = typeof e.index == "number" ? e.index : -1, S = u && y > 0 && x === y - 1, C = s === "stripped", w = nVe(h, x, y, m, g), T = S ? `url(#${a}-buffer-hatched-${o})` : rVe(s, a, o), E = l ? `url(#${a}-bar-glow-${o})` : void 0, D = iVe({
isClickable: d,
selectedDataKey: _,
dataKey: o,
@@ -71005,7 +71237,7 @@ var y6 = (e) => {
children: [/* @__PURE__ */ (0, H.jsx)(QG, {
...e,
fill: "transparent"
- }), w ? /* @__PURE__ */ (0, H.jsx)(GE.g, {
+ }), w ? /* @__PURE__ */ (0, H.jsx)(UE.g, {
initial: w.initial,
animate: w.animate,
transition: w.transition,
@@ -71013,7 +71245,7 @@ var y6 = (e) => {
children: A
}) : A]
});
-}, QBe = (e, t, n, r, i) => {
+}, nVe = (e, t, n, r, i) => {
if (e === "none" || t < 0 || n <= 0) return null;
let a = n - 1, o = a / 2, s;
switch (e) {
@@ -71028,11 +71260,11 @@ var y6 = (e) => {
break;
default: s = t;
}
- let c = s * WBe * 1e3, l = UBe * 1e3, u = c + l, d = Date.now() - i;
+ let c = s * JBe * 1e3, l = qBe * 1e3, u = c + l, d = Date.now() - i;
if (d >= u) return null;
let f = d <= c ? 0 : (d - c) / l, p = {
duration: (u - Math.max(d, c)) / 1e3,
- ease: GBe,
+ ease: YBe,
delay: Math.max(0, c - d) / 1e3
};
return r ? {
@@ -71046,7 +71278,7 @@ var y6 = (e) => {
transition: p,
style: { originY: 1 }
};
-}, $Be = (e, t, n) => {
+}, rVe = (e, t, n) => {
switch (e) {
case "hatched": return `url(#${t}-hatched-${n})`;
case "duotone": return `url(#${t}-duotone-${n})`;
@@ -71055,10 +71287,10 @@ var y6 = (e) => {
case "stripped": return `url(#${t}-stripped-${n})`;
default: return `url(#${t}-colors-${n})`;
}
-}, eVe = ({ isClickable: e, selectedDataKey: t, dataKey: n, enableHoverHighlight: r, isMouseInChart: i, isActive: a }) => {
+}, iVe = ({ isClickable: e, selectedDataKey: t, dataKey: n, enableHoverHighlight: r, isMouseInChart: i, isActive: a }) => {
let o = e && t !== null ? t === null || t === n ? 1 : .15 : 1;
return r && i ? a ? o : o * .3 : o;
-}, tVe = ({ id: e, dataKey: t, config: n }) => {
+}, aVe = ({ id: e, dataKey: t, config: n }) => {
let r = o6(n[t] ?? {});
return /* @__PURE__ */ (0, H.jsx)("linearGradient", {
id: `${e}-colors-${t}`,
@@ -71080,7 +71312,7 @@ var y6 = (e) => {
}, i);
})
});
-}, nVe = ({ id: e, dataKey: t }) => /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [
+}, oVe = ({ id: e, dataKey: t }) => /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [
/* @__PURE__ */ (0, H.jsxs)("pattern", {
id: `${e}-hatched-mask-pattern`,
x: "0",
@@ -71121,7 +71353,7 @@ var y6 = (e) => {
mask: `url(#${e}-hatched-mask-${t})`
})
})
-] }), rVe = ({ id: e, dataKey: t }) => /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [
+] }), sVe = ({ id: e, dataKey: t }) => /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [
/* @__PURE__ */ (0, H.jsxs)("pattern", {
id: `${e}-buffer-hatched-mask-pattern`,
x: "0",
@@ -71162,7 +71394,7 @@ var y6 = (e) => {
mask: `url(#${e}-buffer-hatched-mask-${t})`
})
})
-] }), iVe = ({ id: e, dataKey: t, config: n }) => {
+] }), cVe = ({ id: e, dataKey: t, config: n }) => {
let r = o6(n[t] ?? {});
return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [
/* @__PURE__ */ (0, H.jsxs)("linearGradient", {
@@ -71230,7 +71462,7 @@ var y6 = (e) => {
})
})
] });
-}, aVe = ({ id: e, dataKey: t, config: n }) => {
+}, lVe = ({ id: e, dataKey: t, config: n }) => {
let r = o6(n[t] ?? {});
return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [
/* @__PURE__ */ (0, H.jsxs)("linearGradient", {
@@ -71298,7 +71530,7 @@ var y6 = (e) => {
})
})
] });
-}, oVe = ({ id: e, dataKey: t }) => /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [
+}, uVe = ({ id: e, dataKey: t }) => /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [
/* @__PURE__ */ (0, H.jsxs)("linearGradient", {
id: `${e}-gradient-mask-gradient`,
x1: "0",
@@ -71335,7 +71567,7 @@ var y6 = (e) => {
mask: `url(#${e}-gradient-mask-${t})`
})
})
-] }), sVe = ({ id: e, dataKey: t }) => /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [
+] }), dVe = ({ id: e, dataKey: t }) => /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [
/* @__PURE__ */ (0, H.jsxs)("linearGradient", {
id: `${e}-stripped-mask-gradient`,
x1: "0",
@@ -71372,7 +71604,7 @@ var y6 = (e) => {
mask: `url(#${e}-stripped-mask-${t})`
})
})
-] }), cVe = ({ id: e, dataKey: t }) => /* @__PURE__ */ (0, H.jsxs)("filter", {
+] }), fVe = ({ id: e, dataKey: t }) => /* @__PURE__ */ (0, H.jsxs)("filter", {
id: `${e}-bar-glow-${t}`,
x: "-100%",
y: "-100%",
@@ -71392,35 +71624,35 @@ var y6 = (e) => {
}),
/* @__PURE__ */ (0, H.jsxs)("feMerge", { children: [/* @__PURE__ */ (0, H.jsx)("feMergeNode", { in: "glow" }), /* @__PURE__ */ (0, H.jsx)("feMergeNode", { in: "SourceGraphic" })] })
]
-}), lVe = (e = 17, t = .05, n = .9) => Array.from({ length: e }, (r, i) => {
+}), pVe = (e = 17, t = .05, n = .9) => Array.from({ length: e }, (r, i) => {
let a = i / (e - 1), o = t + Math.sin(a * Math.PI) ** 2 * (n - t);
return {
offset: `${(a * 100).toFixed(0)}%`,
opacity: Number(o.toFixed(3))
};
});
-function uVe(e, t = 12) {
+function mVe(e, t = 12) {
let [n, r] = (0, B.useState)(!1), i = (0, B.useCallback)(() => {
e && r((e) => !e);
}, [e]);
return {
- loadingData: (0, B.useMemo)(() => OBe(t, 20, 80), [t, n]),
+ loadingData: (0, B.useMemo)(() => MBe(t, 20, 80), [t, n]),
onShimmerExit: i
};
}
-var dVe = ({ chartId: e, onShimmerExit: t }) => /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(P4, {
- dataKey: BBe,
+var hVe = ({ chartId: e, onShimmerExit: t }) => /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(P4, {
+ dataKey: WBe,
fill: "currentColor",
fillOpacity: .15,
radius: h6,
isAnimationActive: !1,
legendType: "none",
style: { mask: `url(#${e}-loading-mask)` }
-}), /* @__PURE__ */ (0, H.jsx)("defs", { children: /* @__PURE__ */ (0, H.jsx)(fVe, {
+}), /* @__PURE__ */ (0, H.jsx)("defs", { children: /* @__PURE__ */ (0, H.jsx)(gVe, {
chartId: e,
onShimmerExit: t
-}) })] }), fVe = ({ chartId: e, onShimmerExit: t }) => {
- let n = lVe(), r = (0, B.useRef)(-1);
+}) })] }), gVe = ({ chartId: e, onShimmerExit: t }) => {
+ let n = pVe(), r = (0, B.useRef)(-1);
return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [
/* @__PURE__ */ (0, H.jsx)("linearGradient", {
id: `${e}-loading-mask-gradient`,
@@ -71443,7 +71675,7 @@ var dVe = ({ chartId: e, onShimmerExit: t }) => /* @__PURE__ */ (0, H.jsxs)(H.Fr
height: "1",
x: "0",
y: "0",
- children: /* @__PURE__ */ (0, H.jsx)(GE.rect, {
+ children: /* @__PURE__ */ (0, H.jsx)(UE.rect, {
y: "0",
width: "1",
height: "1",
@@ -71451,7 +71683,7 @@ var dVe = ({ chartId: e, onShimmerExit: t }) => /* @__PURE__ */ (0, H.jsxs)(H.Fr
initial: { x: -1 },
animate: { x: 2 },
transition: {
- duration: VBe / 1e3,
+ duration: GBe / 1e3,
ease: "linear",
repeat: Infinity,
repeatType: "loop"
@@ -71473,10 +71705,10 @@ var dVe = ({ chartId: e, onShimmerExit: t }) => /* @__PURE__ */ (0, H.jsxs)(H.Fr
})
] });
};
-v6.Bar = KBe, v6.XAxis = qBe, v6.YAxis = JBe, v6.Grid = YBe, v6.Tooltip = XBe, v6.Legend = ZBe, v6.Brush = d6;
+v6.Bar = XBe, v6.XAxis = ZBe, v6.YAxis = QBe, v6.Grid = $Be, v6.Tooltip = eVe, v6.Legend = tVe, v6.Brush = d6;
//#endregion
//#region src/react/charts/chart-card.tsx
-var b6 = `${lT({ radius: "chart" })} flex flex-col gap-4 max-sm:p-4`;
+var b6 = `${sT({ radius: "chart" })} flex flex-col gap-4 max-sm:p-4`;
function x6({ title: e, figure: t, note: n }) {
return /* @__PURE__ */ (0, H.jsxs)("header", {
className: "flex flex-wrap items-end justify-between gap-x-4 gap-y-1",
@@ -71503,7 +71735,7 @@ var S6 = [
"var(--color-chart-5)",
"var(--color-chart-6)"
], C6 = (e) => ({ light: [e] }), w6 = (e) => `s${e}`;
-function pVe(e) {
+function _Ve(e) {
return Object.fromEntries(e.map((e, t) => [w6(t), {
label: e,
colors: C6(S6[t % S6.length])
@@ -71528,7 +71760,7 @@ function E6({ swatch: e, name: t, value: n }) {
});
}
var D6 = "size-2.5 shrink-0 rounded-xs";
-function mVe({ active: e, payload: t, label: n, nameKey: r, valueKey: i, hideLabel: a }) {
+function vVe({ active: e, payload: t, label: n, nameKey: r, valueKey: i, hideLabel: a }) {
let { config: o } = t6(), s = (t ?? []).filter((e) => e.type !== "none");
if (!e || !s.length) return /* @__PURE__ */ (0, H.jsx)("span", { className: "p-4" });
let c = a || typeof n != "string" ? null : o[n]?.label ?? n;
@@ -71553,7 +71785,7 @@ function mVe({ active: e, payload: t, label: n, nameKey: r, valueKey: i, hideLab
function O6({ nameKey: e, valueKey: t, hideLabel: n }) {
return /* @__PURE__ */ (0, H.jsx)(c6, {
cursor: !1,
- content: /* @__PURE__ */ (0, H.jsx)(mVe, {
+ content: /* @__PURE__ */ (0, H.jsx)(vVe, {
nameKey: e,
valueKey: t,
hideLabel: n
@@ -71630,7 +71862,7 @@ var M6 = [
"周六",
"周日"
], N6 = (e, t) => e ? Math.max(.12, e / t) : 0;
-function hVe(e) {
+function yVe(e) {
let t = Array.from({ length: 7 }, () => Array(24).fill(0));
for (let n of e?.hours || []) {
let { weekday: e, hour: r, count: i } = n;
@@ -71647,7 +71879,7 @@ function hVe(e) {
total: n.reduce((e, t) => e + t, 0)
};
}
-function gVe(e) {
+function bVe(e) {
let t = (e?.days || []).filter((e) => /^\d{4}-\d{2}-\d{2}$/.test(e.date) && Number.isFinite(e.count) && e.count >= 0).slice().sort((e, t) => e.date.localeCompare(t.date)), n = {
cells: [],
total: 0,
@@ -71686,19 +71918,19 @@ var P6 = 14, F6 = 17, I6 = {
fill: "fill-chart-5",
dot: "bg-chart-5"
}
-}, _Ve = {
+}, xVe = {
start: "translate-x-0",
center: "-translate-x-1/2",
end: "-translate-x-full"
};
-function vVe({ cell: e, series: t, tone: n, left: r, top: i, anchor: a }) {
+function SVe({ cell: e, series: t, tone: n, left: r, top: i, anchor: a }) {
return /* @__PURE__ */ (0, H.jsxs)("div", {
"aria-hidden": !0,
style: {
left: `${r}%`,
top: `${i}%`
},
- className: `pointer-events-none absolute z-10 -mt-2 -translate-y-full ${T6} ${_Ve[a]}`,
+ className: `pointer-events-none absolute z-10 -mt-2 -translate-y-full ${T6} ${xVe[a]}`,
children: [/* @__PURE__ */ (0, H.jsx)("div", {
className: "font-medium text-foreground",
children: e.label
@@ -71756,7 +71988,7 @@ function L6({ title: e, words: t, cells: n, total: r, columns: i, rows: a, axis:
}, e.key);
})]
})
- }), g && _ ? /* @__PURE__ */ (0, H.jsx)(vVe, {
+ }), g && _ ? /* @__PURE__ */ (0, H.jsx)(SVe, {
cell: g,
series: t.series,
tone: c,
@@ -71772,7 +72004,7 @@ function L6({ title: e, words: t, cells: n, total: r, columns: i, rows: a, axis:
]
});
}
-var yVe = /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [M6.map((e, t) => /* @__PURE__ */ (0, H.jsx)("text", {
+var CVe = /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [M6.map((e, t) => /* @__PURE__ */ (0, H.jsx)("text", {
x: 0,
y: 18 + t * F6 + 7,
dominantBaseline: "middle",
@@ -71786,7 +72018,7 @@ var yVe = /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [M6.map((e, t) =>
children: t
}, t))] });
function R6({ activity: e, title: t, dailyTitle: n, words: r, tone: i, empty: a }) {
- let o = hVe(e), s = gVe(e);
+ let o = yVe(e), s = bVe(e);
return s.cells.length ? /* @__PURE__ */ (0, H.jsxs)("div", {
className: "inline-grid w-full items-start gap-5 lg:grid-cols-2",
children: [/* @__PURE__ */ (0, H.jsx)(L6, {
@@ -71797,7 +72029,7 @@ function R6({ activity: e, title: t, dailyTitle: n, words: r, tone: i, empty: a
total: o.total,
columns: 24,
rows: 7,
- axis: yVe,
+ axis: CVe,
footer: /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)("span", { children: "星期 × 小时" }), /* @__PURE__ */ (0, H.jsx)("span", { children: e?.timezone || "UTC+08:00" })] })
}), /* @__PURE__ */ (0, H.jsx)(L6, {
title: n,
@@ -71863,20 +72095,20 @@ function z6({ children: e, className: t = "", previewCount: n = 10 }) {
onClick: () => {
c(!0), o((e) => !e);
},
- children: /* @__PURE__ */ (0, H.jsx)(Iw, { "aria-hidden": !0 })
+ children: /* @__PURE__ */ (0, H.jsx)(Pw, { "aria-hidden": !0 })
}) : null]
});
}
//#endregion
//#region src/react/evilcharts/registry/charts/recharts-radial-chart.tsx
-var bVe = "30%", xVe = "100%", B6 = 5, V6 = 14, SVe = 5, H6 = 1500, U6 = (0, B.createContext)(null);
+var wVe = "30%", TVe = "100%", B6 = 5, V6 = 14, EVe = 5, H6 = 1500, U6 = (0, B.createContext)(null);
function W6() {
let e = (0, B.use)(U6);
if (!e) throw Error("Radial chart parts (<RadialBar />, <Tooltip />, …) must be used within <EvilRadialChart />");
return e;
}
-function G6({ config: e, data: t, nameKey: n, children: r, className: i, chartProps: a, variant: o = "full", max: s, innerRadius: c = bVe, outerRadius: l = xVe, defaultSelectedDataKey: u = null, onSelectionChange: d, isLoading: f = !1, backgroundVariant: p }) {
- let m = (0, B.useId)().replace(/:/g, ""), [h, g] = (0, B.useState)(u), _ = kVe(f), v = EVe(o), y = (0, B.useCallback)((e, t) => {
+function G6({ config: e, data: t, nameKey: n, children: r, className: i, chartProps: a, variant: o = "full", max: s, innerRadius: c = wVe, outerRadius: l = TVe, defaultSelectedDataKey: u = null, onSelectionChange: d, isLoading: f = !1, backgroundVariant: p }) {
+ let m = (0, B.useId)().replace(/:/g, ""), [h, g] = (0, B.useState)(u), _ = NVe(f), v = AVe(o), y = (0, B.useCallback)((e, t) => {
g(e), d?.(e === null ? null : {
dataKey: e,
value: t ?? 0
@@ -71908,7 +72140,7 @@ function G6({ config: e, data: t, nameKey: n, children: r, className: i, chartPr
children: /* @__PURE__ */ (0, H.jsxs)(n6, {
className: i,
config: e,
- children: [/* @__PURE__ */ (0, H.jsx)(r6, { isLoading: f }), /* @__PURE__ */ (0, H.jsxs)(TBe, {
+ children: [/* @__PURE__ */ (0, H.jsx)(r6, { isLoading: f }), /* @__PURE__ */ (0, H.jsxs)(kBe, {
id: m,
data: f ? _ : b,
innerRadius: c,
@@ -71927,8 +72159,8 @@ function G6({ config: e, data: t, nameKey: n, children: r, className: i, chartPr
}),
p && /* @__PURE__ */ (0, H.jsx)(m6, { variant: p }),
r,
- f && /* @__PURE__ */ (0, H.jsx)(AVe, {}),
- /* @__PURE__ */ (0, H.jsx)("defs", { children: /* @__PURE__ */ (0, H.jsx)(DVe, {
+ f && /* @__PURE__ */ (0, H.jsx)(PVe, {}),
+ /* @__PURE__ */ (0, H.jsx)("defs", { children: /* @__PURE__ */ (0, H.jsx)(jVe, {
config: e,
chartId: m
}) })
@@ -71937,7 +72169,7 @@ function G6({ config: e, data: t, nameKey: n, children: r, className: i, chartPr
})
});
}
-function CVe({ dataKey: e, cornerRadius: t = B6, barSize: n = V6, showBackground: r = !0, isClickable: i = !1, radialBarProps: a }) {
+function DVe({ dataKey: e, cornerRadius: t = B6, barSize: n = V6, showBackground: r = !0, isClickable: i = !1, radialBarProps: a }) {
let { nameKey: o, isLoading: s, selectedBar: c, selectBar: l } = W6();
return s ? null : /* @__PURE__ */ (0, H.jsx)(_2, {
dataKey: e,
@@ -71962,7 +72194,7 @@ function CVe({ dataKey: e, cornerRadius: t = B6, barSize: n = V6, showBackground
...a
});
}
-function wVe({ variant: e, roundness: t, defaultIndex: n }) {
+function OVe({ variant: e, roundness: t, defaultIndex: n }) {
let { nameKey: r, isLoading: i } = W6();
return i ? null : /* @__PURE__ */ (0, H.jsx)(c6, {
defaultIndex: n,
@@ -71975,7 +72207,7 @@ function wVe({ variant: e, roundness: t, defaultIndex: n }) {
})
});
}
-function TVe({ variant: e, align: t = "center", verticalAlign: n = "bottom", isClickable: r = !1 }) {
+function kVe({ variant: e, align: t = "center", verticalAlign: n = "bottom", isClickable: r = !1 }) {
let { nameKey: i, isLoading: a, selectedBar: o, selectBar: s } = W6();
return a ? null : /* @__PURE__ */ (0, H.jsx)(u6, {
verticalAlign: n,
@@ -71989,7 +72221,7 @@ function TVe({ variant: e, align: t = "center", verticalAlign: n = "bottom", isC
})
});
}
-function EVe(e) {
+function AVe(e) {
switch (e) {
case "semi": return {
startAngle: 180,
@@ -72005,7 +72237,7 @@ function EVe(e) {
};
}
}
-var DVe = ({ config: e, chartId: t }) => /* @__PURE__ */ (0, H.jsx)(H.Fragment, { children: Object.entries(e).map(([e, n]) => {
+var jVe = ({ config: e, chartId: t }) => /* @__PURE__ */ (0, H.jsx)(H.Fragment, { children: Object.entries(e).map(([e, n]) => {
let r = o6(n);
return /* @__PURE__ */ (0, H.jsx)("linearGradient", {
id: `${t}-radial-colors-${e}`,
@@ -72028,13 +72260,13 @@ var DVe = ({ config: e, chartId: t }) => /* @__PURE__ */ (0, H.jsx)(H.Fragment,
})
}, `${t}-radial-colors-${e}`);
}) });
-function OVe() {
- return Array.from({ length: SVe }, (e, t) => ({
+function MVe() {
+ return Array.from({ length: EVe }, (e, t) => ({
name: `loading${t}`,
value: 40 + Math.random() * 60
}));
}
-function kVe(e) {
+function NVe(e) {
let [t, n] = (0, B.useState)(0);
return (0, B.useEffect)(() => {
if (!e) return;
@@ -72042,9 +72274,9 @@ function kVe(e) {
n((e) => e + 1);
}, H6);
return () => clearInterval(t);
- }, [e]), (0, B.useMemo)(() => OVe(), [t]);
+ }, [e]), (0, B.useMemo)(() => MVe(), [t]);
}
-var AVe = () => /* @__PURE__ */ (0, H.jsx)(_2, {
+var PVe = () => /* @__PURE__ */ (0, H.jsx)(_2, {
dataKey: "value",
cornerRadius: B6,
barSize: V6,
@@ -72058,17 +72290,17 @@ var AVe = () => /* @__PURE__ */ (0, H.jsx)(_2, {
fillOpacity: .25
})
});
-G6.RadialBar = CVe, G6.Tooltip = wVe, G6.Legend = TVe;
+G6.RadialBar = DVe, G6.Tooltip = OVe, G6.Legend = kVe;
//#endregion
//#region src/react/stats/radial-card.tsx
-var jVe = [
+var FVe = [
"bg-chart-1",
"bg-chart-2",
"bg-chart-3",
"bg-chart-4",
"bg-chart-5",
"bg-chart-6"
-], MVe = [
+], IVe = [
"aria-pressed:bg-chart-1/10 aria-pressed:ring-chart-1",
"aria-pressed:bg-chart-2/10 aria-pressed:ring-chart-2",
"aria-pressed:bg-chart-3/10 aria-pressed:ring-chart-3",
@@ -72109,13 +72341,13 @@ function K6({ title: e, rows: t, unit: n = "个视频" }) {
children: /* @__PURE__ */ (0, H.jsxs)(G6, {
data: f,
nameKey: "slice",
- config: pVe(s.map((e) => e.name)),
- max: ebe(s.map((e) => e.value)),
+ config: _Ve(s.map((e) => e.name)),
+ max: abe(s.map((e) => e.value)),
innerRadius: "22%",
className: "aspect-auto h-75 max-sm:h-65",
children: [/* @__PURE__ */ (0, H.jsx)(G6.RadialBar, {
dataKey: "value",
- barSize: tbe(s.length),
+ barSize: obe(s.length),
radialBarProps: {
shape: (e) => /* @__PURE__ */ (0, H.jsx)(lK, {
...e,
@@ -72141,13 +72373,13 @@ function K6({ title: e, rows: t, unit: n = "个视频" }) {
onPointerLeave: () => o(-1),
onFocus: () => o(t),
onBlur: () => o(-1),
- className: `flex min-w-0 cursor-pointer flex-col items-start gap-1 rounded-xl bg-background-tertiary-default p-2.5 text-left outline-none aria-pressed:ring-1 aria-pressed:ring-inset focus-visible:ring-2 focus-visible:ring-border-focus-ring ${MVe[t % 6]}`,
+ className: `flex min-w-0 cursor-pointer flex-col items-start gap-1 rounded-xl bg-background-tertiary-default p-2.5 text-left outline-none aria-pressed:ring-1 aria-pressed:ring-inset focus-visible:ring-2 focus-visible:ring-border-focus-ring ${IVe[t % 6]}`,
children: [
/* @__PURE__ */ (0, H.jsxs)("span", {
className: "flex min-w-0 items-center gap-1.5 text-caption-1-regular text-text-secondary",
children: [/* @__PURE__ */ (0, H.jsx)("i", {
"aria-hidden": !0,
- className: `size-3 shrink-0 rounded-sm ${jVe[t % 6]}`
+ className: `size-3 shrink-0 rounded-sm ${FVe[t % 6]}`
}), e.name]
}),
/* @__PURE__ */ (0, H.jsx)("b", {
@@ -72166,7 +72398,7 @@ function K6({ title: e, rows: t, unit: n = "个视频" }) {
}
//#endregion
//#region src/react/stats/stats-page.tsx
-var NVe = 10, q6 = S6[5], PVe = S6[4], FVe = `${lT()} flex flex-col gap-4`, IVe = "添加媒体文件夹或关注来源后,这里会显示馆藏统计。", LVe = "补全资料或添加标签后,这里会显示馆藏中的内容标签。", RVe = "开始播放后,这里会显示最近的真实观看证据。", zVe = "刮削或手动打标之后,这里会显示每个来源覆盖了多少视频。", BVe = "添加媒体文件夹后,这里会显示存储空间。";
+var LVe = 10, q6 = S6[5], RVe = S6[4], zVe = `${sT()} flex flex-col gap-4`, BVe = "添加媒体文件夹或关注来源后,这里会显示馆藏统计。", VVe = "补全资料或添加标签后,这里会显示馆藏中的内容标签。", HVe = "开始播放后,这里会显示最近的真实观看证据。", UVe = "刮削或手动打标之后,这里会显示每个来源覆盖了多少视频。", WVe = "添加媒体文件夹后,这里会显示存储空间。";
function J6({ term: e, value: t }) {
return /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex min-h-16 min-w-0 flex-col gap-1.5 rounded-2lg bg-background-primary-default p-3",
@@ -72188,10 +72420,10 @@ function Y6({ term: e, value: t, total: n }) {
className: "tabular-nums",
children: [t.toLocaleString(), /* @__PURE__ */ (0, H.jsxs)("span", {
className: "ml-1.5 text-caption-1-regular text-text-secondary",
- children: [QL(t, n), "%"]
+ children: [ZL(t, n), "%"]
})]
})]
- }), /* @__PURE__ */ (0, H.jsx)(ST, {
+ }), /* @__PURE__ */ (0, H.jsx)(bT, {
label: `${e}:${t.toLocaleString()} / ${n.toLocaleString()}`,
value: t,
max: Math.max(n, 1)
@@ -72219,14 +72451,14 @@ function X6({ term: e, figure: t, unit: n }) {
}
function Z6({ headline: e, children: t }) {
return /* @__PURE__ */ (0, H.jsxs)("div", {
- className: `${FVe} md:flex-row md:gap-6`,
+ className: `${zVe} md:flex-row md:gap-6`,
children: [e, /* @__PURE__ */ (0, H.jsx)("div", {
className: "min-w-0 grow",
children: t
})]
});
}
-function VVe({ data: e, configurable: t, openMediaSettings: n }) {
+function GVe({ data: e, configurable: t, openMediaSettings: n }) {
return e.by_loc.reduce((e, t) => e + t.videos, 0) ? /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-col gap-5",
children: [/* @__PURE__ */ (0, H.jsxs)("div", {
@@ -72254,14 +72486,14 @@ function VVe({ data: e, configurable: t, openMediaSettings: n }) {
unit: "个视频",
series: "视频",
color: q6,
- rows: abe(e.by_length)
+ rows: ube(e.by_length)
}),
/* @__PURE__ */ (0, H.jsx)(j6, {
title: "画质",
unit: "个视频",
series: "视频",
color: q6,
- rows: tR(e.by_quality)
+ rows: eR(e.by_quality)
}),
/* @__PURE__ */ (0, H.jsx)(j6, {
title: "文件类型",
@@ -72269,28 +72501,28 @@ function VVe({ data: e, configurable: t, openMediaSettings: n }) {
series: "条目",
color: q6,
layout: "horizontal",
- rows: rbe(e.by_medium)
+ rows: cbe(e.by_medium)
})
]
})]
- }) : /* @__PURE__ */ (0, H.jsx)(fA, {
+ }) : /* @__PURE__ */ (0, H.jsx)(Nk, {
shell: "plain",
- icon: aoe,
+ icon: soe,
title: "还没有视频",
actions: /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [t ? /* @__PURE__ */ (0, H.jsx)(J, {
size: "small",
onClick: n,
children: "添加媒体文件夹"
- }) : null, /* @__PURE__ */ (0, H.jsx)(rT, {
+ }) : null, /* @__PURE__ */ (0, H.jsx)(tT, {
variant: "secondary",
href: "/follow-manage?tab=add",
size: "small",
children: "添加关注"
})] }),
- children: IVe
+ children: BVe
});
}
-function HVe({ data: e }) {
+function KVe({ data: e }) {
return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(R6, {
activity: e.play_activity,
title: "播放时间",
@@ -72305,11 +72537,11 @@ function HVe({ data: e }) {
title: "播放次数",
unit: "个作品",
series: "作品",
- color: PVe,
- rows: sbe(e.replays)
+ color: RVe,
+ rows: fbe(e.replays)
})] });
}
-function UVe({ attribution: e }) {
+function qVe({ attribution: e }) {
let t = e.videos;
return /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-col",
@@ -72342,7 +72574,7 @@ function UVe({ attribution: e }) {
]
});
}
-function WVe({ volume: e }) {
+function JVe({ volume: e }) {
let t = e.total, n = e.used ?? 0;
return /* @__PURE__ */ (0, H.jsxs)("article", {
className: "flex min-w-0 flex-col gap-1.5 border-b border-separator-border py-3 last:border-b-0",
@@ -72359,11 +72591,11 @@ function WVe({ volume: e }) {
className: "whitespace-nowrap tabular-nums",
children: [I(n), /* @__PURE__ */ (0, H.jsxs)("span", {
className: "ml-1.5 text-caption-1-regular text-text-secondary",
- children: [QL(n, t), "%"]
+ children: [ZL(n, t), "%"]
})]
})]
}),
- t == null ? null : /* @__PURE__ */ (0, H.jsx)(ST, {
+ t == null ? null : /* @__PURE__ */ (0, H.jsx)(bT, {
label: `${e.label}空间使用率`,
value: n,
max: Math.max(t, 1)
@@ -72381,25 +72613,25 @@ function WVe({ volume: e }) {
]
});
}
-function GVe({ volumes: e, configurable: t, openMediaSettings: n }) {
+function YVe({ volumes: e, configurable: t, openMediaSettings: n }) {
return e.length ? /* @__PURE__ */ (0, H.jsx)("div", {
className: "flex flex-col",
- children: e.map((e) => /* @__PURE__ */ (0, H.jsx)(WVe, { volume: e }, `${e.kind}:${e.label}`))
- }) : /* @__PURE__ */ (0, H.jsx)(fA, {
+ children: e.map((e) => /* @__PURE__ */ (0, H.jsx)(JVe, { volume: e }, `${e.kind}:${e.label}`))
+ }) : /* @__PURE__ */ (0, H.jsx)(Nk, {
shell: "plain",
- icon: qw,
+ icon: Gw,
title: "还没有存储来源",
actions: t ? /* @__PURE__ */ (0, H.jsx)(J, {
size: "small",
onClick: n,
children: "添加媒体文件夹"
}) : void 0,
- children: BVe
+ children: WVe
});
}
-function KVe({ tags: e, tagLabel: t, onTag: n }) {
+function XVe({ tags: e, tagLabel: t, onTag: n }) {
return e.length ? /* @__PURE__ */ (0, H.jsx)(z6, {
- previewCount: NVe,
+ previewCount: LVe,
className: "inline-grid w-full gap-x-6 gap-y-1 sm:grid-cols-2",
children: e.map((e, r) => /* @__PURE__ */ (0, H.jsx)("li", {
className: "min-w-0",
@@ -72423,24 +72655,24 @@ function KVe({ tags: e, tagLabel: t, onTag: n }) {
]
})
}, e.k))
- }) : /* @__PURE__ */ (0, H.jsx)(fA, {
+ }) : /* @__PURE__ */ (0, H.jsx)(Nk, {
shell: "plain",
- icon: Yw,
+ icon: qw,
title: "还没有内容标签",
- actions: /* @__PURE__ */ (0, H.jsx)(rT, {
+ actions: /* @__PURE__ */ (0, H.jsx)(tT, {
variant: "secondary",
href: "/data-cleanup",
size: "small",
children: "补全资料"
}),
- children: LVe
+ children: VVe
});
}
-function qVe({ rows: e }) {
+function ZVe({ rows: e }) {
return e.length ? /* @__PURE__ */ (0, H.jsx)("div", {
className: "flex flex-col gap-5",
children: e.map((e) => {
- let t = $L(e);
+ let t = QL(e);
return /* @__PURE__ */ (0, H.jsxs)("article", {
className: "flex flex-wrap items-center gap-x-6 gap-y-2",
children: [/* @__PURE__ */ (0, H.jsxs)("div", {
@@ -72448,41 +72680,41 @@ function qVe({ rows: e }) {
children: [/* @__PURE__ */ (0, H.jsx)("h3", {
className: "min-w-0 text-body-2-medium text-text-primary",
children: /* @__PURE__ */ (0, H.jsx)("a", {
- href: $ye(e),
+ href: ibe(e),
"data-middle-truncate": !0,
className: "block max-w-full overflow-hidden whitespace-nowrap hover:underline",
children: e.name
})
}), /* @__PURE__ */ (0, H.jsxs)("p", {
className: "flex flex-wrap gap-3 text-caption-1-regular text-text-secondary",
- children: [/* @__PURE__ */ (0, H.jsx)("span", { children: e.creator ?? "" }), /* @__PURE__ */ (0, H.jsx)("span", { children: Qye(e) })]
+ children: [/* @__PURE__ */ (0, H.jsx)("span", { children: e.creator ?? "" }), /* @__PURE__ */ (0, H.jsx)("span", { children: rbe(e) })]
})]
}), /* @__PURE__ */ (0, H.jsxs)("div", {
className: "min-w-0 basis-40",
- children: [/* @__PURE__ */ (0, H.jsx)(ST, {
+ children: [/* @__PURE__ */ (0, H.jsx)(bT, {
label: `真实观看 ${t.toFixed(0)}%`,
value: t
}), /* @__PURE__ */ (0, H.jsx)("small", {
className: "mt-1.5 block text-caption-1-regular text-text-secondary",
- children: `真实 ${t.toFixed(0)}% · 到达 ${eR(e).toFixed(0)}%`
+ children: `真实 ${t.toFixed(0)}% · 到达 ${$L(e).toFixed(0)}%`
})]
})]
}, `${e.kind}:${e.id}`);
})
- }) : /* @__PURE__ */ (0, H.jsx)(fA, {
+ }) : /* @__PURE__ */ (0, H.jsx)(Nk, {
shell: "plain",
- icon: Jw,
+ icon: Kw,
title: "还没有观看记录",
- actions: /* @__PURE__ */ (0, H.jsx)(rT, {
+ actions: /* @__PURE__ */ (0, H.jsx)(tT, {
variant: "secondary",
href: "/",
size: "small",
children: "浏览馆藏"
}),
- children: RVe
+ children: HVe
});
}
-function JVe({ sources: e, videos: t }) {
+function QVe({ sources: e, videos: t }) {
return e.length ? /* @__PURE__ */ (0, H.jsx)("div", {
className: "inline-grid w-full gap-x-8 gap-y-6 sm:grid-cols-2",
children: e.map((e) => /* @__PURE__ */ (0, H.jsxs)("article", {
@@ -72501,7 +72733,7 @@ function JVe({ sources: e, videos: t }) {
})]
})]
}),
- /* @__PURE__ */ (0, H.jsx)(ST, {
+ /* @__PURE__ */ (0, H.jsx)(bT, {
label: `${e.k} 覆盖视频`,
value: e.assets,
max: Math.max(t, 1)
@@ -72512,27 +72744,27 @@ function JVe({ sources: e, videos: t }) {
})
]
}, e.k))
- }) : /* @__PURE__ */ (0, H.jsx)(fA, {
+ }) : /* @__PURE__ */ (0, H.jsx)(Nk, {
shell: "plain",
- icon: Yw,
+ icon: qw,
title: "还没有标签来源",
- actions: /* @__PURE__ */ (0, H.jsx)(rT, {
+ actions: /* @__PURE__ */ (0, H.jsx)(tT, {
variant: "secondary",
href: "/data-cleanup",
size: "small",
children: "补全资料"
}),
- children: zVe
+ children: UVe
});
}
function Q6({ id: e, label: t, figure: n, detail: r, icon: i, accent: a }) {
- return /* @__PURE__ */ (0, H.jsx)(B_, {
+ return /* @__PURE__ */ (0, H.jsx)(z_, {
id: e,
- className: wM({
+ className: eM({
interactive: !0,
selectable: !0
}),
- children: /* @__PURE__ */ (0, H.jsx)(OM, {
+ children: /* @__PURE__ */ (0, H.jsx)(iM, {
label: t,
icon: i,
accent: a,
@@ -72541,34 +72773,34 @@ function Q6({ id: e, label: t, figure: n, detail: r, icon: i, accent: a }) {
})
});
}
-function YVe(e) {
- let t = xw({
- queryKey: XL,
- queryFn: ({ signal: e }) => ZL(e)
+function $Ve(e) {
+ let t = yw({
+ queryKey: YL,
+ queryFn: ({ signal: e }) => XL(e)
}), n = t.data;
- if (!n) return /* @__PURE__ */ (0, H.jsx)(pA, { children: /* @__PURE__ */ (0, H.jsx)(Y, {
+ if (!n) return /* @__PURE__ */ (0, H.jsx)(Pk, { children: /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "error",
title: "馆藏统计读取失败",
children: t.error ? G(t.error) : "未取得统计数据,请刷新页面重试。"
}) });
- let r = n.consumption, i = n.storage_summary, a = n.by_loc.reduce((e, t) => e + t.videos, 0), o = n.by_loc.reduce((e, t) => e + t.bytes, 0), s = QL(n.tag_cov, n.attribution.videos);
- return /* @__PURE__ */ (0, H.jsxs)(pA, { children: [
+ let r = n.consumption, i = n.storage_summary, a = n.by_loc.reduce((e, t) => e + t.videos, 0), o = n.by_loc.reduce((e, t) => e + t.bytes, 0), s = ZL(n.tag_cov, n.attribution.videos);
+ return /* @__PURE__ */ (0, H.jsxs)(Pk, { children: [
/* @__PURE__ */ (0, H.jsx)("p", {
className: "text-caption-1-regular text-text-secondary",
children: `账本当前快照 · ${a.toLocaleString()} 个视频 · ${I(o)}`
}),
- /* @__PURE__ */ (0, H.jsxs)(R_, {
+ /* @__PURE__ */ (0, H.jsxs)(L_, {
defaultSelectedKey: "inventory",
className: "flex flex-col gap-4",
children: [
- /* @__PURE__ */ (0, H.jsxs)(z_, {
+ /* @__PURE__ */ (0, H.jsxs)(R_, {
"aria-label": "统计视图",
- className: TM,
+ className: tM,
children: [
/* @__PURE__ */ (0, H.jsx)(Q6, {
id: "inventory",
label: "馆藏视频",
- icon: Uw,
+ icon: Vw,
accent: 0,
figure: a.toLocaleString(),
detail: I(o)
@@ -72576,15 +72808,15 @@ function YVe(e) {
/* @__PURE__ */ (0, H.jsx)(Q6, {
id: "viewing",
label: "看过",
- icon: Kw,
+ icon: Ww,
accent: 1,
figure: r.played.toLocaleString(),
- detail: Zye(r.play_seconds)
+ detail: nbe(r.play_seconds)
}),
/* @__PURE__ */ (0, H.jsx)(Q6, {
id: "coverage",
label: "内容标签",
- icon: Yw,
+ icon: qw,
accent: 2,
figure: `${s}%`,
detail: `${n.tag_cov.toLocaleString()} / ${n.attribution.videos.toLocaleString()}`
@@ -72592,21 +72824,21 @@ function YVe(e) {
/* @__PURE__ */ (0, H.jsx)(Q6, {
id: "storage",
label: "使用空间",
- icon: qw,
+ icon: Gw,
accent: 3,
figure: `${i.online} 个卷`,
detail: i.measured ? `已用 ${I(i.used)}` : "容量未取得"
})
]
}),
- /* @__PURE__ */ (0, H.jsx)(V_, {
+ /* @__PURE__ */ (0, H.jsx)(B_, {
id: "inventory",
- children: /* @__PURE__ */ (0, H.jsx)(VVe, {
+ children: /* @__PURE__ */ (0, H.jsx)(GVe, {
data: n,
...e
})
}),
- /* @__PURE__ */ (0, H.jsxs)(V_, {
+ /* @__PURE__ */ (0, H.jsxs)(B_, {
id: "viewing",
className: "flex flex-col gap-5",
children: [/* @__PURE__ */ (0, H.jsx)(Z6, {
@@ -72652,9 +72884,9 @@ function YVe(e) {
})
]
})
- }), /* @__PURE__ */ (0, H.jsx)(HVe, { data: n })]
+ }), /* @__PURE__ */ (0, H.jsx)(KVe, { data: n })]
}),
- /* @__PURE__ */ (0, H.jsx)(V_, {
+ /* @__PURE__ */ (0, H.jsx)(B_, {
id: "coverage",
children: /* @__PURE__ */ (0, H.jsx)(Z6, {
headline: /* @__PURE__ */ (0, H.jsx)(X6, {
@@ -72662,10 +72894,10 @@ function YVe(e) {
figure: `${s}%`,
unit: `${n.tag_cov.toLocaleString()} / ${n.attribution.videos.toLocaleString()}`
}),
- children: /* @__PURE__ */ (0, H.jsx)(UVe, { attribution: n.attribution })
+ children: /* @__PURE__ */ (0, H.jsx)(qVe, { attribution: n.attribution })
})
}),
- /* @__PURE__ */ (0, H.jsx)(V_, {
+ /* @__PURE__ */ (0, H.jsx)(B_, {
id: "storage",
children: /* @__PURE__ */ (0, H.jsx)(Z6, {
headline: /* @__PURE__ */ (0, H.jsx)(X6, {
@@ -72673,7 +72905,7 @@ function YVe(e) {
figure: String(i.measured),
unit: "个卷已取得容量"
}),
- children: /* @__PURE__ */ (0, H.jsx)(GVe, {
+ children: /* @__PURE__ */ (0, H.jsx)(YVe, {
volumes: n.storage_volumes,
...e
})
@@ -72681,51 +72913,51 @@ function YVe(e) {
})
]
}),
- /* @__PURE__ */ (0, H.jsxs)(R_, {
+ /* @__PURE__ */ (0, H.jsxs)(L_, {
defaultSelectedKey: "tags",
- className: `${lT({ padding: "none" })} flex flex-col`,
+ className: `${sT({ padding: "none" })} flex flex-col`,
children: [
/* @__PURE__ */ (0, H.jsx)("div", {
className: "px-4 pt-3",
- children: /* @__PURE__ */ (0, H.jsxs)(lC, {
+ children: /* @__PURE__ */ (0, H.jsxs)(TC, {
"aria-label": "统计维度",
- className: dC,
+ className: DC,
children: [
- /* @__PURE__ */ (0, H.jsx)(B_, {
+ /* @__PURE__ */ (0, H.jsx)(z_, {
id: "tags",
- className: fC,
+ className: OC,
children: "内容标签"
}),
- /* @__PURE__ */ (0, H.jsx)(B_, {
+ /* @__PURE__ */ (0, H.jsx)(z_, {
id: "recent",
- className: fC,
+ className: OC,
children: "最近看过"
}),
- /* @__PURE__ */ (0, H.jsx)(B_, {
+ /* @__PURE__ */ (0, H.jsx)(z_, {
id: "sources",
- className: fC,
+ className: OC,
children: "标签来源"
})
]
})
}),
- /* @__PURE__ */ (0, H.jsx)(V_, {
+ /* @__PURE__ */ (0, H.jsx)(B_, {
id: "tags",
className: "px-4 pt-3.5 pb-4",
- children: /* @__PURE__ */ (0, H.jsx)(KVe, {
+ children: /* @__PURE__ */ (0, H.jsx)(XVe, {
tags: n.top_tags,
...e
})
}),
- /* @__PURE__ */ (0, H.jsx)(V_, {
+ /* @__PURE__ */ (0, H.jsx)(B_, {
id: "recent",
className: "px-4 pt-3.5 pb-4",
- children: /* @__PURE__ */ (0, H.jsx)(qVe, { rows: n.recent })
+ children: /* @__PURE__ */ (0, H.jsx)(ZVe, { rows: n.recent })
}),
- /* @__PURE__ */ (0, H.jsx)(V_, {
+ /* @__PURE__ */ (0, H.jsx)(B_, {
id: "sources",
className: "px-4 pt-3.5 pb-4",
- children: /* @__PURE__ */ (0, H.jsx)(JVe, {
+ children: /* @__PURE__ */ (0, H.jsx)(QVe, {
sources: n.tag_source,
videos: n.attribution.videos
})
@@ -72736,7 +72968,7 @@ function YVe(e) {
}
//#endregion
//#region node_modules/d3-sankey/src/align.js
-function XVe(e, t) {
+function eHe(e, t) {
return e.sourceLinks.length ? e.depth : t - 1;
}
//#endregion
@@ -72760,13 +72992,13 @@ function n8(e, t) {
function r8(e) {
return e.value;
}
-function ZVe(e) {
+function tHe(e) {
return e.index;
}
-function QVe(e) {
+function nHe(e) {
return e.nodes;
}
-function $Ve(e) {
+function rHe(e) {
return e.links;
}
function i8(e, t) {
@@ -72781,8 +73013,8 @@ function a8({ nodes: e }) {
for (let e of t.targetLinks) e.y1 = n + e.width / 2, n += e.width;
}
}
-function eHe() {
- let e = 0, t = 0, n = 1, r = 1, i = 24, a = 8, o, s = ZVe, c = XVe, l, u, d = QVe, f = $Ve, p = 6;
+function iHe() {
+ let e = 0, t = 0, n = 1, r = 1, i = 24, a = 8, o, s = tHe, c = eHe, l, u, d = nHe, f = rHe, p = 6;
function m() {
let e = {
nodes: d.apply(null, arguments),
@@ -72968,7 +73200,7 @@ function eHe() {
}
//#endregion
//#region node_modules/d3-path/src/path.js
-var o8 = Math.PI, s8 = 2 * o8, c8 = 1e-6, tHe = s8 - c8;
+var o8 = Math.PI, s8 = 2 * o8, c8 = 1e-6, aHe = s8 - c8;
function l8() {
this._x0 = this._y0 = this._x1 = this._y1 = null, this._ = "";
}
@@ -73009,7 +73241,7 @@ l8.prototype = u8.prototype = {
e = +e, t = +t, n = +n, a = !!a;
var o = n * Math.cos(r), s = n * Math.sin(r), c = e + o, l = t + s, u = 1 ^ a, d = a ? r - i : i - r;
if (n < 0) throw Error("negative radius: " + n);
- this._x1 === null ? this._ += "M" + c + "," + l : (Math.abs(this._x1 - c) > c8 || Math.abs(this._y1 - l) > c8) && (this._ += "L" + c + "," + l), n && (d < 0 && (d = d % s8 + s8), d > tHe ? this._ += "A" + n + "," + n + ",0,1," + u + "," + (e - o) + "," + (t - s) + "A" + n + "," + n + ",0,1," + u + "," + (this._x1 = c) + "," + (this._y1 = l) : d > c8 && (this._ += "A" + n + "," + n + ",0," + +(d >= o8) + "," + u + "," + (this._x1 = e + n * Math.cos(i)) + "," + (this._y1 = t + n * Math.sin(i))));
+ this._x1 === null ? this._ += "M" + c + "," + l : (Math.abs(this._x1 - c) > c8 || Math.abs(this._y1 - l) > c8) && (this._ += "L" + c + "," + l), n && (d < 0 && (d = d % s8 + s8), d > aHe ? this._ += "A" + n + "," + n + ",0,1," + u + "," + (e - o) + "," + (t - s) + "A" + n + "," + n + ",0,1," + u + "," + (this._x1 = c) + "," + (this._y1 = l) : d > c8 && (this._ += "A" + n + "," + n + ",0," + +(d >= o8) + "," + u + "," + (this._x1 = e + n * Math.cos(i)) + "," + (this._y1 = t + n * Math.sin(i))));
},
rect: function(e, t, n, r) {
this._ += "M" + (this._x0 = this._x1 = +e) + "," + (this._y0 = this._y1 = +t) + "h" + +n + "v" + +r + "h" + -n + "Z";
@@ -73027,27 +73259,27 @@ function d8(e) {
}
//#endregion
//#region node_modules/d3-shape/src/point.js
-function nHe(e) {
+function oHe(e) {
return e[0];
}
-function rHe(e) {
+function sHe(e) {
return e[1];
}
//#endregion
//#region node_modules/d3-shape/src/array.js
-var iHe = Array.prototype.slice;
+var cHe = Array.prototype.slice;
//#endregion
//#region node_modules/d3-shape/src/link/index.js
-function aHe(e) {
+function lHe(e) {
return e.source;
}
-function oHe(e) {
+function uHe(e) {
return e.target;
}
-function sHe(e) {
- var t = aHe, n = oHe, r = nHe, i = rHe, a = null;
+function dHe(e) {
+ var t = lHe, n = uHe, r = oHe, i = sHe, a = null;
function o() {
- var o, s = iHe.call(arguments), c = t.apply(this, s), l = n.apply(this, s);
+ var o, s = cHe.call(arguments), c = t.apply(this, s), l = n.apply(this, s);
if (a ||= o = u8(), e(a, +r.apply(this, (s[0] = c, s)), +i.apply(this, s), +r.apply(this, (s[0] = l, s)), +i.apply(this, s)), o) return a = null, o + "" || null;
}
return o.source = function(e) {
@@ -73062,48 +73294,48 @@ function sHe(e) {
return arguments.length ? (a = e ?? null, o) : a;
}, o;
}
-function cHe(e, t, n, r, i) {
+function fHe(e, t, n, r, i) {
e.moveTo(t, n), e.bezierCurveTo(t = (t + r) / 2, n, t, i, r, i);
}
-function lHe() {
- return sHe(cHe);
+function pHe() {
+ return dHe(fHe);
}
//#endregion
//#region node_modules/d3-sankey/src/sankeyLinkHorizontal.js
-function uHe(e) {
+function mHe(e) {
return [e.source.x1, e.y0];
}
-function dHe(e) {
+function hHe(e) {
return [e.target.x0, e.y1];
}
-function fHe() {
- return lHe().source(uHe).target(dHe);
+function gHe() {
+ return pHe().source(mHe).target(hHe);
}
//#endregion
//#region src/react/taste/taste.ts
-var pHe = "/api/taste", f8 = "/api/taste/refresh", mHe = "/api/taste/import", hHe = "/api/taste/source", p8 = (e) => ["taste", e], gHe = ["taste", "refresh"], _He = [
+var _He = "/api/taste", f8 = "/api/taste/refresh", vHe = "/api/taste/import", yHe = "/api/taste/source", p8 = (e) => ["taste", e], bHe = ["taste", "refresh"], xHe = [
["7d", "最近 7 天"],
["30d", "最近 30 天"],
["90d", "最近 90 天"],
["365d", "最近一年"],
["all", "全部时间"]
-], m8 = (e, t) => K(`${pHe}?window=${e}`, t), vHe = (e) => K(f8, e);
-async function yHe(e, t) {
+], m8 = (e, t) => K(`${_He}?window=${e}`, t), SHe = (e) => K(f8, e);
+async function CHe(e, t) {
await z.fetchQuery({
queryKey: p8(e),
queryFn: () => m8(e, t)
});
}
-var bHe = (e) => q(f8, {
+var wHe = (e) => q(f8, {
window: e,
background: !0
-}), xHe = (e, t) => q(hHe, {
+}), THe = (e, t) => q(yHe, {
operation: "remove",
source_key: e,
window: t
});
-async function SHe(e) {
- let t = await fetch(mHe, {
+async function EHe(e) {
+ let t = await fetch(vHe, {
method: "POST",
credentials: "same-origin",
headers: {
@@ -73117,25 +73349,25 @@ async function SHe(e) {
} catch {}
if (!t.ok) {
let e = n?.error;
- throw new BC(e || `导入失败(${t.status})`, t.status, n);
+ throw new VC(e || `导入失败(${t.status})`, t.status, n);
}
return n;
}
-var CHe = 1e4, h8 = (e) => e ? new Date(e).toLocaleDateString("zh-CN") : "—", wHe = (e) => e >= 3600 ? `${(e / 3600).toFixed(1)} 小时` : `${Math.round(e / 60)} 分钟`, THe = (e) => Number(e.web_visits ?? e.score ?? e.visits ?? e.peach_items ?? 0);
-function EHe(e) {
+var DHe = 1e4, h8 = (e) => e ? new Date(e).toLocaleDateString("zh-CN") : "—", OHe = (e) => e >= 3600 ? `${(e / 3600).toFixed(1)} 小时` : `${Math.round(e / 60)} 分钟`, kHe = (e) => Number(e.web_visits ?? e.score ?? e.visits ?? e.peach_items ?? 0);
+function AHe(e) {
if (e.web_visits == null) return Number(e.score || e.visits || 0).toLocaleString();
let t = [];
return e.web_visits && t.push(`浏览 ${e.web_visits}`), e.peach_items && t.push(`Peach ${e.peach_items}`), t.join(" · ");
}
-function DHe(e) {
- let t = e.map(THe), n = Math.max(1, ...t);
+function jHe(e) {
+ let t = e.map(kHe), n = Math.max(1, ...t);
return t.map((e) => Math.max(0, Math.min(100, e / n * 100)));
}
var g8 = (e, t) => e.filter((e) => Number.isFinite(Number(e.score)) && Number(e.score) > 0).map((e) => ({
name: e.name,
value: Number(e.score)
})).sort((e, t) => t.value - e.value).slice(0, t);
-function OHe(e) {
+function MHe(e) {
let t = g8(e, 6);
return t.length < 3 ? [] : t;
}
@@ -73146,10 +73378,10 @@ var _8 = {
source: 145,
target: 545
};
-function kHe(e = []) {
+function NHe(e = []) {
let t = e.filter((e) => e.source && e.target && Number.isFinite(e.value) && e.value > 0);
if (!t.length) return null;
- let n = [...new Set(t.map((e) => e.source))], r = [...new Set(t.map((e) => e.target))], i = eHe().nodeId((e) => e.id).nodeWidth(10).nodePadding(22).extent([[155, 16], [535, 404]])({
+ let n = [...new Set(t.map((e) => e.source))], r = [...new Set(t.map((e) => e.target))], i = iHe().nodeId((e) => e.id).nodeWidth(10).nodePadding(22).extent([[155, 16], [535, 404]])({
nodes: [...n.map((e) => ({
id: `source:${e}`,
name: e,
@@ -73164,7 +73396,7 @@ function kHe(e = []) {
target: `target:${e.target}`,
value: e.value
}))
- }), a = t.reduce((e, t) => e + t.value, 0), o = fHe();
+ }), a = t.reduce((e, t) => e + t.value, 0), o = gHe();
return {
nodes: i.nodes.map((e) => ({
id: e.id,
@@ -73194,7 +73426,7 @@ function kHe(e = []) {
total: a
};
}
-var AHe = (e) => e.length > 18 ? `${e.slice(0, 16)}…` : e, y8 = B.memo(function({ cx: e, cy: t, dataKey: n, chartId: r, className: i, fillOpacity: a = 1, type: o = "default", maskId: s }) {
+var PHe = (e) => e.length > 18 ? `${e.slice(0, 16)}…` : e, y8 = B.memo(function({ cx: e, cy: t, dataKey: n, chartId: r, className: i, fillOpacity: a = 1, type: o = "default", maskId: s }) {
let c = B.useId().replace(/:/g, ""), l = `url(#${r}-colors-${String(n)})`;
if (e === void 0 || t === void 0) return null;
switch (o) {
@@ -73317,14 +73549,14 @@ var S8 = B.memo(({ cx: e, cy: t, dotId: n, fillOpacity: r, gradientUrl: i, class
S8.displayName = "ColoredBorderDot";
//#endregion
//#region src/react/evilcharts/registry/charts/recharts-radar-chart.tsx
-var jHe = 1, MHe = .3, NHe = 6, C8 = 1500, w8 = "value", T8 = (0, B.createContext)(null);
+var FHe = 1, IHe = .3, LHe = 6, C8 = 1500, w8 = "value", T8 = (0, B.createContext)(null);
function E8() {
let e = (0, B.use)(T8);
if (!e) throw Error("Radar chart parts (<Radar />, <PolarAngleAxis />, …) must be used within <EvilRadarChart />");
return e;
}
function D8({ config: e, data: t, children: n, className: r, chartProps: i, backgroundVariant: a, defaultSelectedDataKey: o = null, onSelectionChange: s, isLoading: c = !1, loadingPoints: l }) {
- let u = (0, B.useId)().replace(/:/g, ""), [d, f] = (0, B.useState)(o), p = KHe(c, l), m = (0, B.useCallback)((e) => {
+ let u = (0, B.useId)().replace(/:/g, ""), [d, f] = (0, B.useState)(o), p = XHe(c, l), m = (0, B.useCallback)((e) => {
f(e), s?.(e);
}, [s]), h = (0, B.useMemo)(() => ({
config: e,
@@ -73342,32 +73574,32 @@ function D8({ config: e, data: t, children: n, className: r, chartProps: i, back
children: /* @__PURE__ */ (0, H.jsxs)(n6, {
className: r,
config: e,
- children: [/* @__PURE__ */ (0, H.jsx)(r6, { isLoading: c }), /* @__PURE__ */ (0, H.jsxs)(_Be, {
+ children: [/* @__PURE__ */ (0, H.jsx)(r6, { isLoading: c }), /* @__PURE__ */ (0, H.jsxs)(xBe, {
id: u,
data: c ? p : t,
...i,
children: [
a && /* @__PURE__ */ (0, H.jsx)(m6, { variant: a }),
n,
- c && /* @__PURE__ */ (0, H.jsx)(qHe, {})
+ c && /* @__PURE__ */ (0, H.jsx)(ZHe, {})
]
})]
})
});
}
-function PHe({ dataKey: e, variant: t = "filled", fillOpacity: n = MHe, isGlowing: r = !1, isClickable: i = !1, children: a, radarProps: o }) {
+function RHe({ dataKey: e, variant: t = "filled", fillOpacity: n = IHe, isGlowing: r = !1, isClickable: i = !1, children: a, radarProps: o }) {
let { config: s, isLoading: c, selectedDataKey: l, selectDataKey: u } = E8(), d = (0, B.useId)().replace(/:/g, "");
if (c) return null;
let f = i && l !== null && l !== e, p = {
stroke: f ? .2 : 1,
fill: f ? .1 : 1,
dot: f ? .2 : 1
- }, m = t === "filled", { dot: h, activeDot: g } = BHe(a, d, e, p.dot);
+ }, m = t === "filled", { dot: h, activeDot: g } = WHe(a, d, e, p.dot);
return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(V0, {
dataKey: e,
stroke: `url(#${d}-radar-stroke-${e})`,
strokeOpacity: p.stroke,
- strokeWidth: jHe,
+ strokeWidth: FHe,
fill: m ? `url(#${d}-radar-fill-${e})` : "none",
fillOpacity: m ? n * p.fill : 0,
dot: h,
@@ -73380,29 +73612,29 @@ function PHe({ dataKey: e, variant: t = "filled", fillOpacity: n = MHe, isGlowin
},
...o
}), /* @__PURE__ */ (0, H.jsxs)("defs", { children: [
- /* @__PURE__ */ (0, H.jsx)(VHe, {
+ /* @__PURE__ */ (0, H.jsx)(GHe, {
id: d,
dataKey: e,
config: s
}),
- /* @__PURE__ */ (0, H.jsx)(HHe, {
+ /* @__PURE__ */ (0, H.jsx)(KHe, {
id: d,
dataKey: e,
config: s
}),
- m && /* @__PURE__ */ (0, H.jsx)(UHe, {
+ m && /* @__PURE__ */ (0, H.jsx)(qHe, {
id: d,
dataKey: e,
config: s
}),
- r && /* @__PURE__ */ (0, H.jsx)(WHe, {
+ r && /* @__PURE__ */ (0, H.jsx)(JHe, {
id: d,
dataKey: e
})
] })] });
}
var O8 = () => null, k8 = () => null;
-function FHe({ gridType: e = "polygon", stroke: t = "currentColor", strokeOpacity: n = .2, strokeDasharray: r = "3 4", ...i }) {
+function zHe({ gridType: e = "polygon", stroke: t = "currentColor", strokeOpacity: n = .2, strokeDasharray: r = "3 4", ...i }) {
return /* @__PURE__ */ (0, H.jsx)(P1, {
gridType: e,
stroke: t,
@@ -73411,7 +73643,7 @@ function FHe({ gridType: e = "polygon", stroke: t = "currentColor", strokeOpacit
...i
});
}
-function IHe({ tick: e = {
+function BHe({ tick: e = {
fill: "currentColor",
fontSize: 12
}, tickLine: t = !1, ...n }) {
@@ -73422,7 +73654,7 @@ function IHe({ tick: e = {
...n
});
}
-function LHe({ tick: e = {
+function VHe({ tick: e = {
fill: "currentColor",
fontSize: 10
}, tickLine: t = !1, axisLine: n = !1, ...r }) {
@@ -73434,7 +73666,7 @@ function LHe({ tick: e = {
...r
});
}
-function RHe({ variant: e, roundness: t, defaultIndex: n }) {
+function HHe({ variant: e, roundness: t, defaultIndex: n }) {
let { isLoading: r, selectedDataKey: i } = E8();
return r ? null : /* @__PURE__ */ (0, H.jsx)(c6, {
defaultIndex: n,
@@ -73446,7 +73678,7 @@ function RHe({ variant: e, roundness: t, defaultIndex: n }) {
})
});
}
-function zHe({ variant: e, align: t = "center", verticalAlign: n = "bottom", isClickable: r = !1 }) {
+function UHe({ variant: e, align: t = "center", verticalAlign: n = "bottom", isClickable: r = !1 }) {
let { isLoading: i, selectedDataKey: a, selectDataKey: o } = E8();
return i ? null : /* @__PURE__ */ (0, H.jsx)(u6, {
verticalAlign: n,
@@ -73459,7 +73691,7 @@ function zHe({ variant: e, align: t = "center", verticalAlign: n = "bottom", isC
})
});
}
-var BHe = (e, t, n, r) => {
+var WHe = (e, t, n, r) => {
let i = !1, a = !1;
return B.Children.forEach(e, (e) => {
if ((0, B.isValidElement)(e)) {
@@ -73501,7 +73733,7 @@ var BHe = (e, t, n, r) => {
stopColor: `var(--color-${e}-${i}, var(--color-${e}-0))`,
stopOpacity: n?.[i]
}, a);
-}) }), VHe = ({ id: e, dataKey: t, config: n }) => {
+}) }), GHe = ({ id: e, dataKey: t, config: n }) => {
let r = o6(n[t] ?? {});
return /* @__PURE__ */ (0, H.jsx)("linearGradient", {
id: `${e}-colors-${t}`,
@@ -73514,7 +73746,7 @@ var BHe = (e, t, n, r) => {
colorsCount: r
})
});
-}, HHe = ({ id: e, dataKey: t, config: n }) => {
+}, KHe = ({ id: e, dataKey: t, config: n }) => {
let r = o6(n[t] ?? {});
return /* @__PURE__ */ (0, H.jsx)("linearGradient", {
id: `${e}-radar-stroke-${t}`,
@@ -73527,7 +73759,7 @@ var BHe = (e, t, n, r) => {
colorsCount: r
})
});
-}, UHe = ({ id: e, dataKey: t, config: n }) => {
+}, qHe = ({ id: e, dataKey: t, config: n }) => {
let r = o6(n[t] ?? {}), i = r === 1 ? [.8, .3] : Array.from({ length: r }, (e, t) => t === 0 ? .8 : .3);
return /* @__PURE__ */ (0, H.jsx)("radialGradient", {
id: `${e}-radar-fill-${t}`,
@@ -73540,7 +73772,7 @@ var BHe = (e, t, n, r) => {
opacities: i
})
});
-}, WHe = ({ id: e, dataKey: t }) => /* @__PURE__ */ (0, H.jsxs)("filter", {
+}, JHe = ({ id: e, dataKey: t }) => /* @__PURE__ */ (0, H.jsxs)("filter", {
id: `${e}-radar-glow-${t}`,
x: "-50%",
y: "-50%",
@@ -73560,7 +73792,7 @@ var BHe = (e, t, n, r) => {
}),
/* @__PURE__ */ (0, H.jsxs)("feMerge", { children: [/* @__PURE__ */ (0, H.jsx)("feMergeNode", { in: "glow" }), /* @__PURE__ */ (0, H.jsx)("feMergeNode", { in: "SourceGraphic" })] })
]
-}), GHe = (e) => [
+}), YHe = (e) => [
"A",
"B",
"C",
@@ -73571,7 +73803,7 @@ var BHe = (e, t, n, r) => {
skill: e,
[w8]: 30 + Math.random() * 70
}));
-function KHe(e, t = NHe) {
+function XHe(e, t = LHe) {
let [n, r] = (0, B.useState)(0);
return (0, B.useEffect)(() => {
if (!e) return;
@@ -73579,9 +73811,9 @@ function KHe(e, t = NHe) {
r((e) => e + 1);
}, C8);
return () => clearInterval(t);
- }, [e]), (0, B.useMemo)(() => GHe(t), [t, n]);
+ }, [e]), (0, B.useMemo)(() => YHe(t), [t, n]);
}
-var qHe = () => /* @__PURE__ */ (0, H.jsx)(V0, {
+var ZHe = () => /* @__PURE__ */ (0, H.jsx)(V0, {
dataKey: w8,
stroke: "currentColor",
strokeOpacity: .3,
@@ -73593,17 +73825,17 @@ var qHe = () => /* @__PURE__ */ (0, H.jsx)(V0, {
animationDuration: C8,
animationEasing: "ease-in-out"
});
-D8.Radar = PHe, D8.Dot = O8, D8.ActiveDot = k8, D8.PolarGrid = FHe, D8.PolarAngleAxis = IHe, D8.PolarRadiusAxis = LHe, D8.Tooltip = RHe, D8.Legend = zHe;
+D8.Radar = RHe, D8.Dot = O8, D8.ActiveDot = k8, D8.PolarGrid = zHe, D8.PolarAngleAxis = BHe, D8.PolarRadiusAxis = VHe, D8.Tooltip = HHe, D8.Legend = UHe;
//#endregion
//#region src/react/taste/charts.tsx
-var JHe = [
+var QHe = [
"stroke-chart-1",
"stroke-chart-2",
"stroke-chart-3",
"stroke-chart-4",
"stroke-chart-5",
"stroke-chart-6"
-], YHe = [
+], $He = [
"fill-chart-1",
"fill-chart-2",
"fill-chart-3",
@@ -73613,7 +73845,7 @@ var JHe = [
], j8 = { value: {
label: "标签命中",
colors: C6(S6[3])
-} }, XHe = [
+} }, eUe = [
"min-h-24",
"min-h-24",
"min-h-24",
@@ -73623,20 +73855,20 @@ var JHe = [
"min-h-52",
"min-h-60",
"min-h-64"
-], ZHe = 26, QHe = { radius: j8.value }, $He = (e, t) => Math.sqrt(e / t);
-function eUe({ rows: e, label: t }) {
- let n = OHe(e);
+], tUe = 26, nUe = { radius: j8.value }, rUe = (e, t) => Math.sqrt(e / t);
+function iUe({ rows: e, label: t }) {
+ let n = MHe(e);
if (!n.length) return null;
let r = n[0].value, i = n.map((e) => ({
...e,
- radius: $He(e.value, r)
+ radius: rUe(e.value, r)
}));
return /* @__PURE__ */ (0, H.jsx)("div", {
role: "img",
"aria-label": `${t}:${i.map((e) => e.name).join(",")}`,
children: /* @__PURE__ */ (0, H.jsxs)(D8, {
data: i,
- config: QHe,
+ config: nUe,
chartProps: { outerRadius: "58%" },
className: "aspect-auto h-70 text-text-secondary",
children: [
@@ -73653,17 +73885,17 @@ function eUe({ rows: e, label: t }) {
})
});
}
-function tUe({ rows: e, label: t }) {
+function aUe({ rows: e, label: t }) {
let n = g8(e, 8);
return n.length ? /* @__PURE__ */ (0, H.jsx)("section", {
"aria-label": t,
- className: `flex grow flex-col ${XHe[n.length]}`,
+ className: `flex grow flex-col ${eUe[n.length]}`,
children: /* @__PURE__ */ (0, H.jsxs)(v6, {
data: n,
config: j8,
layout: "horizontal",
barRadius: 4,
- chartProps: { maxBarSize: ZHe },
+ chartProps: { maxBarSize: tUe },
className: "aspect-auto text-text-secondary",
children: [
/* @__PURE__ */ (0, H.jsx)(v6.YAxis, {
@@ -73687,8 +73919,8 @@ function tUe({ rows: e, label: t }) {
})
}) : null;
}
-function nUe({ flows: e }) {
- let [t, n] = (0, B.useState)(null), r = kHe(e);
+function oUe({ flows: e }) {
+ let [t, n] = (0, B.useState)(null), r = NHe(e);
if (!r) return null;
let i = t?.node ?? null, a = (e, n) => t ? i === null ? t.label === n : e.source === i || e.target === i : !0;
return /* @__PURE__ */ (0, H.jsxs)("section", {
@@ -73716,7 +73948,7 @@ function nUe({ flows: e }) {
"aria-label": `${e.label}:${e.value} 条线索`,
fillOpacity: 0,
strokeOpacity: a(e, e.label) ? .55 : .08,
- className: `outline-none transition-opacity ${JHe[e.color]}`,
+ className: `outline-none transition-opacity ${QHe[e.color]}`,
onPointerEnter: () => n({
value: e.value,
label: e.label,
@@ -73750,14 +73982,14 @@ function nUe({ flows: e }) {
width: 10,
height: e.height,
rx: 5,
- className: e.side === "source" ? YHe[e.color] : "fill-text-secondary"
+ className: e.side === "source" ? $He[e.color] : "fill-text-secondary"
}), /* @__PURE__ */ (0, H.jsxs)("text", {
x: v8[e.side],
y: e.y + e.height / 2,
textAnchor: e.side === "source" ? "end" : "start",
dominantBaseline: "middle",
className: "fill-text-secondary text-caption-1-regular",
- children: [AHe(e.name), /* @__PURE__ */ (0, H.jsx)("tspan", {
+ children: [PHe(e.name), /* @__PURE__ */ (0, H.jsx)("tspan", {
x: v8[e.side],
dy: 15,
children: e.side === "source" ? e.value.toLocaleString() : `${e.share.toFixed(1)}%`
@@ -73775,11 +74007,11 @@ function nUe({ flows: e }) {
}
//#endregion
//#region src/react/taste/taste-page.tsx
-var rUe = 10, M8 = dr(sT, cT, "text-body-2-medium"), N8 = `${lT()} flex flex-col gap-4`, P8 = "rounded-xl bg-background-primary-default p-3", iUe = "读取运行 Peach 的这台电脑上的浏览记录", aUe = "导入或读取浏览记录后,这里会列出已采集设备。", oUe = "馆藏里暂时没有对得上浏览信号的标签。", sUe = "采集浏览记录后,这里会显示聚合后的口味证据。", cUe = "这些词在浏览记录中出现,但 Peach 观看记录还没有对应证据", lUe = "在运行 Peach 的电脑上使用浏览器:点上面的「读取浏览器历史」。", uUe = "记录在其他设备上:导出文件后,点上面的「导入历史文件」。多台设备的文件分别导入。", dUe = "需要刷新时再次读取或导入;数据源可在页面底部移除。", fUe = "这个数据源将不再用于口味分析。原始导出文件保留。", F8 = "peach-taste-guide-dismissed";
+var sUe = 10, M8 = dr(aT, oT, "text-body-2-medium"), N8 = `${sT()} flex flex-col gap-4`, P8 = "rounded-xl bg-background-primary-default p-3", cUe = "读取运行 Peach 的这台电脑上的浏览记录", lUe = "导入或读取浏览记录后,这里会列出已采集设备。", uUe = "馆藏里暂时没有对得上浏览信号的标签。", dUe = "采集浏览记录后,这里会显示聚合后的口味证据。", fUe = "这些词在浏览记录中出现,但 Peach 观看记录还没有对应证据", pUe = "在运行 Peach 的电脑上使用浏览器:点上面的「读取浏览器历史」。", mUe = "记录在其他设备上:导出文件后,点上面的「导入历史文件」。多台设备的文件分别导入。", hUe = "需要刷新时再次读取或导入;数据源可在页面底部移除。", gUe = "这个数据源将不再用于口味分析。原始导出文件保留。", F8 = "peach-taste-guide-dismissed";
function I8({ icon: e, term: t, figure: n, detail: r, accent: i }) {
return /* @__PURE__ */ (0, H.jsx)("div", {
- className: wM(),
- children: /* @__PURE__ */ (0, H.jsx)(OM, {
+ className: eM(),
+ children: /* @__PURE__ */ (0, H.jsx)(iM, {
label: t,
icon: e,
accent: i,
@@ -73802,22 +74034,22 @@ function L8({ name: e, domain: t }) {
})]
});
}
-function pUe({ html: e }) {
+function _Ue({ html: e }) {
return /* @__PURE__ */ (0, H.jsx)("span", {
- className: `relative inline-grid size-8 shrink-0 place-items-center overflow-hidden rounded-full bg-background-tertiary-default text-caption-1-medium text-text-secondary ${RI}`,
+ className: `relative inline-grid size-8 shrink-0 place-items-center overflow-hidden rounded-full bg-background-tertiary-default text-caption-1-medium text-text-secondary ${II}`,
dangerouslySetInnerHTML: { __html: e }
});
}
-function mUe({ rows: e, kind: t, visual: n, empty: r, onSignal: i }) {
- if (!e.length) return /* @__PURE__ */ (0, H.jsx)(fA, {
+function vUe({ rows: e, kind: t, visual: n, empty: r, onSignal: i }) {
+ if (!e.length) return /* @__PURE__ */ (0, H.jsx)(Nk, {
shell: "plain",
- icon: Qw,
+ icon: Xw,
title: "暂无足够证据",
children: r
});
- let a = DHe(e);
+ let a = jHe(e);
return /* @__PURE__ */ (0, H.jsx)(z6, {
- previewCount: rUe,
+ previewCount: sUe,
className: "inline-grid w-full gap-x-7 gap-y-2 sm:grid-cols-2",
children: e.map((e, r) => {
let o = !!t && !!e.peach_items, s = String(e.source_domain || ""), c = /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [
@@ -73844,7 +74076,7 @@ function mUe({ rows: e, kind: t, visual: n, empty: r, onSignal: i }) {
name: e.name,
domain: s
}) : null,
- n !== "none" && n !== "domain" && (e.entity_id || e.has_avatar || !s) ? /* @__PURE__ */ (0, H.jsx)(pUe, { html: ue(e.name, e.entity_id ? {
+ n !== "none" && n !== "domain" && (e.entity_id || e.has_avatar || !s) ? /* @__PURE__ */ (0, H.jsx)(_Ue, { html: ue(e.name, e.entity_id ? {
id: e.entity_id,
has_image: !!e.has_image,
image_version: e.image_version,
@@ -73857,10 +74089,10 @@ function mUe({ rows: e, kind: t, visual: n, empty: r, onSignal: i }) {
children: e.name
}), /* @__PURE__ */ (0, H.jsx)("small", {
className: "text-caption-1-regular text-text-secondary",
- children: EHe(e)
+ children: AHe(e)
})]
}),
- o ? /* @__PURE__ */ (0, H.jsx)(Rw, {
+ o ? /* @__PURE__ */ (0, H.jsx)(Iw, {
"aria-hidden": !0,
className: "size-4 shrink-0 text-text-tertiary"
}) : null
@@ -73881,30 +74113,30 @@ function mUe({ rows: e, kind: t, visual: n, empty: r, onSignal: i }) {
});
}
function R8({ label: e, panels: t, onSignal: n }) {
- return /* @__PURE__ */ (0, H.jsxs)(R_, {
- className: `${lT({ padding: "none" })} flex flex-col`,
+ return /* @__PURE__ */ (0, H.jsxs)(L_, {
+ className: `${sT({ padding: "none" })} flex flex-col`,
children: [/* @__PURE__ */ (0, H.jsx)("div", {
className: "px-4 pt-3",
- children: /* @__PURE__ */ (0, H.jsx)(lC, {
+ children: /* @__PURE__ */ (0, H.jsx)(TC, {
"aria-label": e,
- className: dC,
- children: t.map((e) => /* @__PURE__ */ (0, H.jsx)(B_, {
+ className: DC,
+ children: t.map((e) => /* @__PURE__ */ (0, H.jsx)(z_, {
id: e.id,
- className: fC,
+ className: OC,
children: e.name
}, e.id))
})
- }), t.map((e) => /* @__PURE__ */ (0, H.jsx)(V_, {
+ }), t.map((e) => /* @__PURE__ */ (0, H.jsx)(B_, {
id: e.id,
className: "px-4 pt-3.5 pb-4",
- children: /* @__PURE__ */ (0, H.jsx)(mUe, {
+ children: /* @__PURE__ */ (0, H.jsx)(vUe, {
...e.props,
onSignal: n
})
}, e.id))]
});
}
-function hUe({ data: e, onSignal: t, navigate: n }) {
+function yUe({ data: e, onSignal: t, navigate: n }) {
let r = e.analysis;
if (!r?.headline) return null;
let i = r.confidence || {}, a = [...(r.explore || []).map((e) => ({
@@ -73970,21 +74202,21 @@ function hUe({ data: e, onSignal: t, navigate: n }) {
className: "text-caption-1-regular text-text-secondary",
children: e.detail
})]
- }), /* @__PURE__ */ (0, H.jsx)(Rw, {
+ }), /* @__PURE__ */ (0, H.jsx)(Iw, {
"aria-hidden": !0,
className: "size-4 shrink-0 text-text-tertiary"
})]
}, e.key))
- }) : /* @__PURE__ */ (0, H.jsx)(fA, {
+ }) : /* @__PURE__ */ (0, H.jsx)(Nk, {
shell: "plain",
- icon: Qw,
+ icon: Xw,
title: "还没有可探索的入口",
- children: oUe
+ children: uUe
})
]
});
}
-function gUe({ onboarding: e, done: t }) {
+function bUe({ onboarding: e, done: t }) {
let [n, r] = (0, B.useState)(() => {
try {
return localStorage.getItem(F8) === "1";
@@ -73993,21 +74225,21 @@ function gUe({ onboarding: e, done: t }) {
}
});
return t || n ? null : /* @__PURE__ */ (0, H.jsx)("div", {
- className: lT({
+ className: sT({
padding: "none",
className: "p-4"
}),
- children: /* @__PURE__ */ (0, H.jsxs)(LT, {
+ children: /* @__PURE__ */ (0, H.jsxs)(FT, {
summary: "浏览器历史记录导入指南",
defaultOpen: e,
children: [
/* @__PURE__ */ (0, H.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
- children: lUe
+ children: pUe
}),
/* @__PURE__ */ (0, H.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
- children: uUe
+ children: mUe
}),
/* @__PURE__ */ (0, H.jsxs)("ul", {
className: "flex list-disc flex-col gap-1 pl-5 text-body-2-regular text-text-secondary",
@@ -74037,7 +74269,7 @@ function gUe({ onboarding: e, done: t }) {
}),
/* @__PURE__ */ (0, H.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
- children: dUe
+ children: hUe
}),
/* @__PURE__ */ (0, H.jsx)("span", {
className: "self-start",
@@ -74057,7 +74289,7 @@ function gUe({ onboarding: e, done: t }) {
})
});
}
-function _Ue({ busy: e, onRefresh: t, onImport: n }) {
+function xUe({ busy: e, onRefresh: t, onImport: n }) {
let r = (0, B.useRef)(null), [i, a] = (0, B.useState)(!1), o = (e) => {
a(!1), e();
};
@@ -74066,15 +74298,15 @@ function _Ue({ busy: e, onRefresh: t, onImport: n }) {
"data-split-button": !0,
"data-variant": "primary",
children: [/* @__PURE__ */ (0, H.jsx)(J, {
- leadingIcon: Hw,
- title: iUe,
+ leadingIcon: Bw,
+ title: cUe,
onClick: t,
...X(e),
children: "读取浏览器历史"
}), /* @__PURE__ */ (0, H.jsx)(J, {
ref: r,
iconOnly: !0,
- leadingIcon: Iw,
+ leadingIcon: Pw,
"aria-label": "更多取得浏览记录的方式",
"aria-haspopup": "dialog",
"aria-expanded": i,
@@ -74089,15 +74321,15 @@ function _Ue({ busy: e, onRefresh: t, onImport: n }) {
onOpenChange: a,
placement: "bottom end",
offset: 4,
- className: oT,
- children: /* @__PURE__ */ (0, H.jsxs)(tT, {
+ className: iT,
+ children: /* @__PURE__ */ (0, H.jsxs)($w, {
"aria-label": "更多取得浏览记录的方式",
className: "flex w-52 flex-col gap-1 outline-none",
children: [/* @__PURE__ */ (0, H.jsxs)("button", {
type: "button",
className: M8,
onClick: () => o(t),
- children: [/* @__PURE__ */ (0, H.jsx)(Hw, {
+ children: [/* @__PURE__ */ (0, H.jsx)(Bw, {
"aria-hidden": !0,
className: "size-4 shrink-0"
}), "读取浏览器历史"]
@@ -74105,7 +74337,7 @@ function _Ue({ busy: e, onRefresh: t, onImport: n }) {
type: "button",
className: M8,
onClick: () => o(n),
- children: [/* @__PURE__ */ (0, H.jsx)($w, {
+ children: [/* @__PURE__ */ (0, H.jsx)(Zw, {
"aria-hidden": !0,
className: "size-4 shrink-0"
}), "导入历史文件"]
@@ -74113,9 +74345,9 @@ function _Ue({ busy: e, onRefresh: t, onImport: n }) {
})
})] });
}
-function vUe({ sources: e, window: t, toast: n }) {
- let i = ww({
- mutationFn: (e) => xHe(e, t),
+function SUe({ sources: e, window: t, toast: n }) {
+ let i = Sw({
+ mutationFn: (e) => THe(e, t),
onSuccess: (e) => {
z.setQueryData(p8(t), e.dashboard), n("已移除口味数据源");
}
@@ -74139,10 +74371,10 @@ function vUe({ sources: e, window: t, toast: n }) {
children: [
/* @__PURE__ */ (0, H.jsx)("span", {
className: "inline-grid size-8 shrink-0 place-items-center rounded-lg text-text-secondary",
- children: e.browser === "browserexport" ? /* @__PURE__ */ (0, H.jsx)($w, {
+ children: e.browser === "browserexport" ? /* @__PURE__ */ (0, H.jsx)(Zw, {
"aria-hidden": !0,
className: "size-4"
- }) : /* @__PURE__ */ (0, H.jsx)(Uw, {
+ }) : /* @__PURE__ */ (0, H.jsx)(Vw, {
"aria-hidden": !0,
className: "size-4"
})
@@ -74162,12 +74394,12 @@ function vUe({ sources: e, window: t, toast: n }) {
size: "small",
"aria-label": `移除 ${e.profile}`,
iconOnly: !0,
- leadingIcon: Ww,
+ leadingIcon: Hw,
...X(i.isPending),
onClick: () => {
i.isPending || r({
title: "移除口味数据源",
- body: fUe,
+ body: gUe,
confirmLabel: "移除口味数据源",
onConfirm: () => i.mutateAsync(e.source_key)
});
@@ -74175,30 +74407,30 @@ function vUe({ sources: e, window: t, toast: n }) {
})
]
}, e.source_key))
- }) : /* @__PURE__ */ (0, H.jsx)(fA, {
+ }) : /* @__PURE__ */ (0, H.jsx)(Nk, {
shell: "plain",
- icon: Uw,
+ icon: Vw,
title: "还没有数据源",
- children: aUe
+ children: lUe
})
]
});
}
-function yUe(e) {
- let { onSignal: t, navigate: n, toast: r, onboarding: i } = e, [a, o] = (0, B.useState)("all"), [s, c] = (0, B.useState)("browser"), l = (0, B.useRef)(null), u = xw({
+function CUe(e) {
+ let { onSignal: t, navigate: n, toast: r, onboarding: i } = e, [a, o] = (0, B.useState)("all"), [s, c] = (0, B.useState)("browser"), l = (0, B.useRef)(null), u = yw({
queryKey: p8(a),
queryFn: ({ signal: e }) => m8(a, e),
- placeholderData: Ew.keepPreviousData
- }), { job: d, running: f, outcome: p, start: m } = AM({
- queryKey: gHe,
- queryFn: ({ signal: e }) => vHe(e),
- start: () => bHe(a),
- idlePollMs: CHe,
+ placeholderData: ww.keepPreviousData
+ }), { job: d, running: f, outcome: p, start: m } = oM({
+ queryKey: bHe,
+ queryFn: ({ signal: e }) => SHe(e),
+ start: () => wHe(a),
+ idlePollMs: DHe,
onFinish: (e) => {
e.status !== "failed" && (z.invalidateQueries({ queryKey: ["taste"] }), r("已更新口味分析"));
}
- }), h = ww({
- mutationFn: (e) => SHe(e),
+ }), h = Sw({
+ mutationFn: (e) => EHe(e),
onSuccess: (e) => {
z.setQueryData(p8("all"), e.dashboard), o("all"), r("已导入口味数据");
}
@@ -74208,47 +74440,47 @@ function yUe(e) {
}, _ = () => {
f || m.isPending || (m.reset(), m.mutate());
}, v = u.data;
- if (!v) return /* @__PURE__ */ (0, H.jsx)(pA, { children: /* @__PURE__ */ (0, H.jsx)(Y, {
+ if (!v) return /* @__PURE__ */ (0, H.jsx)(Pk, { children: /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "error",
title: "口味分析读取失败",
children: u.error ? G(u.error) : "读取口味分析失败"
}) });
let y = v.summary || {}, b = v.coverage || {}, x = v.rankings || {}, S = v.storage || {}, C = x.browser_categories || [], w = v.gaps || [], T = b.tagged || 0, E = b.identified || 0, D = m.error ? G(m.error) : h.error ? G(h.error) : p?.status === "failed" ? p.error || "读取未取得" : "";
- return /* @__PURE__ */ (0, H.jsxs)(pA, { children: [
- /* @__PURE__ */ (0, H.jsxs)(R_, {
+ return /* @__PURE__ */ (0, H.jsxs)(Pk, { children: [
+ /* @__PURE__ */ (0, H.jsxs)(L_, {
selectedKey: s,
onSelectionChange: (e) => c(String(e)),
className: "flex flex-col gap-5",
children: [
/* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-wrap items-center justify-between gap-3",
- children: [/* @__PURE__ */ (0, H.jsxs)(lC, {
+ children: [/* @__PURE__ */ (0, H.jsxs)(TC, {
"aria-label": "口味证据来源",
- className: dC,
- children: [/* @__PURE__ */ (0, H.jsx)(B_, {
+ className: DC,
+ children: [/* @__PURE__ */ (0, H.jsx)(z_, {
id: "browser",
- className: fC,
+ className: OC,
children: "浏览器记录"
- }), /* @__PURE__ */ (0, H.jsx)(B_, {
+ }), /* @__PURE__ */ (0, H.jsx)(z_, {
id: "peach",
- className: fC,
+ className: OC,
children: "Peach 内部"
})]
}), /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-wrap items-center gap-2",
children: [
- /* @__PURE__ */ (0, H.jsx)(SA, {
+ /* @__PURE__ */ (0, H.jsx)(Vk, {
"aria-label": "分析范围",
selectedKey: a,
onSelectionChange: (e) => {
e !== null && o(String(e));
},
- children: _He.map(([e, t]) => /* @__PURE__ */ (0, H.jsx)(CA, {
+ children: xHe.map(([e, t]) => /* @__PURE__ */ (0, H.jsx)(Hk, {
id: e,
children: t
}, e))
}),
- /* @__PURE__ */ (0, H.jsx)(_Ue, {
+ /* @__PURE__ */ (0, H.jsx)(xUe, {
busy: f || m.isPending || h.isPending,
onRefresh: _,
onImport: () => l.current?.click()
@@ -74264,7 +74496,7 @@ function yUe(e) {
]
})]
}),
- /* @__PURE__ */ (0, H.jsx)(gUe, {
+ /* @__PURE__ */ (0, H.jsx)(bUe, {
onboarding: i,
done: !!(y.history_sources || v.updated_at)
}),
@@ -74272,48 +74504,48 @@ function yUe(e) {
"aria-live": "polite",
className: "flex flex-col gap-3 empty:hidden",
children: [
- f ? /* @__PURE__ */ (0, H.jsx)(CT, {
+ f ? /* @__PURE__ */ (0, H.jsx)(xT, {
label: d?.message || "正在读取浏览记录并更新口味分析",
value: d?.checked,
total: d?.total
}) : null,
- h.isPending ? /* @__PURE__ */ (0, H.jsx)(CT, { label: "正在导入历史文件" }) : null,
+ h.isPending ? /* @__PURE__ */ (0, H.jsx)(xT, { label: "正在导入历史文件" }) : null,
D ? /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "error",
children: D
}) : null
]
}),
- /* @__PURE__ */ (0, H.jsxs)(V_, {
+ /* @__PURE__ */ (0, H.jsxs)(B_, {
id: "browser",
className: "flex flex-col gap-5",
children: [
/* @__PURE__ */ (0, H.jsxs)("div", {
- className: TM,
+ className: tM,
children: [
/* @__PURE__ */ (0, H.jsx)(I8, {
accent: 0,
- icon: Jw,
+ icon: Kw,
term: "浏览记录",
figure: Number(y.history_visits || 0).toLocaleString(),
detail: `${y.history_sources || 0} 个数据源 · ${h8(y.range_start)}—${h8(y.range_end)}`
}),
/* @__PURE__ */ (0, H.jsx)(I8, {
accent: 1,
- icon: Yw,
+ icon: qw,
term: "口味维度",
figure: C.length.toLocaleString(),
detail: C[0]?.name || "尚无主维度"
}),
/* @__PURE__ */ (0, H.jsx)(I8, {
accent: 2,
- icon: Qw,
+ icon: Xw,
term: "浏览候选",
figure: w.length.toLocaleString()
}),
/* @__PURE__ */ (0, H.jsx)(I8, {
accent: 3,
- icon: Uw,
+ icon: Vw,
term: "私有导出",
figure: Number(S.exports || 0).toLocaleString(),
detail: I(S.bytes || 0)
@@ -74330,7 +74562,7 @@ function yUe(e) {
className: "text-caption-1-regular text-text-secondary",
children: "浏览器画像"
}),
- /* @__PURE__ */ (0, H.jsx)(eUe, {
+ /* @__PURE__ */ (0, H.jsx)(iUe, {
rows: C,
label: "主要口味维度"
}),
@@ -74341,14 +74573,14 @@ function yUe(e) {
]
}), /* @__PURE__ */ (0, H.jsx)("div", {
className: "flex min-w-0 grow flex-col",
- children: C.length ? /* @__PURE__ */ (0, H.jsx)(tUe, {
+ children: C.length ? /* @__PURE__ */ (0, H.jsx)(aUe, {
rows: C,
label: "口味维度排名"
- }) : /* @__PURE__ */ (0, H.jsx)(fA, {
+ }) : /* @__PURE__ */ (0, H.jsx)(Nk, {
shell: "plain",
- icon: Qw,
+ icon: Xw,
title: "暂无口味维度",
- children: sUe
+ children: dUe
})
})]
}),
@@ -74364,7 +74596,7 @@ function yUe(e) {
tone: 4,
empty: "还没有可用于分析的口味网站访问记录。"
}),
- /* @__PURE__ */ (0, H.jsx)(nUe, { flows: v.creator_flows }),
+ /* @__PURE__ */ (0, H.jsx)(oUe, { flows: v.creator_flows }),
/* @__PURE__ */ (0, H.jsx)(R8, {
label: "浏览器口味维度",
onSignal: t,
@@ -74406,42 +74638,42 @@ function yUe(e) {
rows: w,
kind: "",
visual: "none",
- empty: cUe
+ empty: fUe
}
}
]
})
]
}),
- /* @__PURE__ */ (0, H.jsxs)(V_, {
+ /* @__PURE__ */ (0, H.jsxs)(B_, {
id: "peach",
className: "flex flex-col gap-5",
children: [
/* @__PURE__ */ (0, H.jsxs)("div", {
- className: TM,
+ className: tM,
children: [
/* @__PURE__ */ (0, H.jsx)(I8, {
accent: 0,
- icon: Kw,
+ icon: Ww,
term: "Peach 看过",
figure: Number(y.peach_items || 0).toLocaleString(),
- detail: wHe(y.peach_seconds || 0)
+ detail: OHe(y.peach_seconds || 0)
}),
/* @__PURE__ */ (0, H.jsx)(I8, {
accent: 1,
- icon: ioe,
+ icon: ooe,
term: "喜欢",
figure: Number(y.liked || 0).toLocaleString()
}),
/* @__PURE__ */ (0, H.jsx)(I8, {
accent: 2,
- icon: roe,
+ icon: aoe,
term: "不合口味",
figure: Number(y.disliked || 0).toLocaleString()
}),
/* @__PURE__ */ (0, H.jsx)(I8, {
accent: 3,
- icon: Yw,
+ icon: qw,
term: "有标签",
figure: T.toLocaleString()
})
@@ -74519,12 +74751,12 @@ function yUe(e) {
})
]
}),
- /* @__PURE__ */ (0, H.jsx)(hUe, {
+ /* @__PURE__ */ (0, H.jsx)(yUe, {
data: v,
onSignal: t,
navigate: n
}),
- /* @__PURE__ */ (0, H.jsx)(vUe, {
+ /* @__PURE__ */ (0, H.jsx)(SUe, {
sources: v.sources || [],
window: a,
toast: r
@@ -74544,7 +74776,7 @@ function z8({ term: e, value: t, rest: n }) {
children: `${n} 项待补`
})]
})]
- }), /* @__PURE__ */ (0, H.jsx)(ST, {
+ }), /* @__PURE__ */ (0, H.jsx)(bT, {
label: `${e}:${t.toLocaleString()} / ${r.toLocaleString()}`,
value: t,
max: r
@@ -74553,7 +74785,7 @@ function z8({ term: e, value: t, rest: n }) {
}
//#endregion
//#region src/react/router/managed-routes.tsx
-function bUe(e, t, n) {
+function wUe(e, t, n) {
if (e === "duplicates") {
n("/duplicates");
return;
@@ -74563,8 +74795,8 @@ function bUe(e, t, n) {
}
var B8 = {
"/stats": {
- prefetch: (e, t) => Xye(t),
- page: (e, t, n) => /* @__PURE__ */ (0, H.jsx)(YVe, {
+ prefetch: (e, t) => tbe(t),
+ page: (e, t, n) => /* @__PURE__ */ (0, H.jsx)($Ve, {
tagLabel: Je,
onTag: t.openTag,
configurable: e.configurable,
@@ -74574,8 +74806,8 @@ var B8 = {
})
},
"/taste": {
- prefetch: (e, t) => yHe("all", t),
- page: (e, t, n) => /* @__PURE__ */ (0, H.jsx)(yUe, {
+ prefetch: (e, t) => CHe("all", t),
+ page: (e, t, n) => /* @__PURE__ */ (0, H.jsx)(CUe, {
onSignal: t.openTasteSignal,
navigate: n,
toast: (e) => t.receipt(e),
@@ -74583,8 +74815,8 @@ var B8 = {
})
},
"/review": {
- prefetch: (e, t) => fde(t),
- page: (e, t) => /* @__PURE__ */ (0, H.jsx)(zve, {
+ prefetch: (e, t) => Lde(t),
+ page: (e, t) => /* @__PURE__ */ (0, H.jsx)(Hve, {
...e,
route: t.routeReview,
openItem: t.openItem,
@@ -74594,24 +74826,24 @@ var B8 = {
})
},
"/data-cleanup": {
- prefetch: (e, t) => $de(t),
- page: (e, t, n) => /* @__PURE__ */ (0, H.jsx)(Ufe, {
+ prefetch: (e, t) => wfe(t),
+ page: (e, t, n) => /* @__PURE__ */ (0, H.jsx)(mpe, {
failure: t.failure,
- open: (e) => bUe(e, t, n),
+ open: (e) => wUe(e, t, n),
toast: (e, { warning: n = !1 } = {}) => n ? t.toast({ text: e }, { sound: "warning" }) : t.receipt(e)
})
},
"/duplicates": {
- prefetch: (e, t) => Fue(t),
- page: (e, t) => /* @__PURE__ */ (0, H.jsx)(jme, {
+ prefetch: (e, t) => ode(t),
+ page: (e, t) => /* @__PURE__ */ (0, H.jsx)(Pme, {
openItem: t.openItem,
failure: t.failure,
toast: (e, { undo: n } = {}) => t.receipt(e, n ? { undo: n } : {})
})
},
"/quality-goals": {
- prefetch: (e, t) => Gue(t),
- page: (e, t) => /* @__PURE__ */ (0, H.jsx)(Cve, {
+ prefetch: (e, t) => gde(t),
+ page: (e, t) => /* @__PURE__ */ (0, H.jsx)(Eve, {
openItem: t.openItem,
javTitleHtml: qe,
javDisplayName: Ke,
@@ -74619,23 +74851,23 @@ var B8 = {
})
},
"/scraping": {
- prefetch: (e, t) => Kve(t),
- page: (e, t) => /* @__PURE__ */ (0, H.jsx)($ve, { toast: (e) => t.toast(e) })
+ prefetch: (e, t) => Yve(t),
+ page: (e, t) => /* @__PURE__ */ (0, H.jsx)(nye, { toast: (e) => t.toast(e) })
},
"/configuration": {
- prefetch: (e, t) => RL(t),
- page: (e, t) => /* @__PURE__ */ (0, H.jsx)(Jye, {
+ prefetch: (e, t) => IL(t),
+ page: (e, t) => /* @__PURE__ */ (0, H.jsx)($ye, {
receipt: (e) => t.receipt(e),
reopenTutorial: t.reopenTutorial
})
},
"/activity": {
- prefetch: (e, t) => Ule(t),
- page: (e) => /* @__PURE__ */ (0, H.jsx)(uue, { ...e.prefill ? { prefill: e.prefill } : {} })
+ prefetch: (e, t) => wue(t),
+ page: (e) => /* @__PURE__ */ (0, H.jsx)(oA, { ...e.prefill ? { prefill: e.prefill } : {} })
},
"/follow-manage": {
- prefetch: (e, t) => che(t, e.tab),
- page: (e, t, n) => /* @__PURE__ */ (0, H.jsx)(A_e, {
+ prefetch: (e, t) => dhe(t, e.tab),
+ page: (e, t, n) => /* @__PURE__ */ (0, H.jsx)(N_e, {
...e,
route: t.routeFollowManage,
savePreference: t.saveFollowPreference,
@@ -74648,8 +74880,8 @@ var B8 = {
}
}, V8 = (e) => Object.hasOwn(B8, e), H8 = {
"/playlists": {
- prefetch: (e, t) => lve(t),
- page: (e, t) => /* @__PURE__ */ (0, H.jsx)(xve, {
+ prefetch: (e, t) => fve(t),
+ page: (e, t) => /* @__PURE__ */ (0, H.jsx)(wve, {
revision: e.revision,
openPlaylist: t.openPlaylist,
openEntity: t.openEntity,
@@ -74658,12 +74890,12 @@ var B8 = {
})
},
"/follow": {
- prefetch: (e, t) => ghe(e, t),
- page: (e) => /* @__PURE__ */ (0, H.jsx)(Bhe, { ...e })
+ prefetch: (e, t) => yhe(e, t),
+ page: (e) => /* @__PURE__ */ (0, H.jsx)(Uhe, { ...e })
}
}, U8 = (e) => Object.hasOwn(H8, e), W8 = {
- prefetch: (e, t) => ape(e, t),
- page: (e, t) => /* @__PURE__ */ (0, H.jsx)(U_e, {
+ prefetch: (e, t) => tN(e, t),
+ page: (e, t) => /* @__PURE__ */ (0, H.jsx)(K_e, {
...e,
route: t.routeIndex,
savePreference: t.savePeopleLayout,
@@ -74683,8 +74915,8 @@ var B8 = {
"/agencies": W8,
"/tags": W8
}, K8 = {
- prefetch: (e) => Jfe(e),
- page: (e) => /* @__PURE__ */ (0, H.jsx)(Sme, { ...e })
+ prefetch: (e) => ype(e),
+ page: (e) => /* @__PURE__ */ (0, H.jsx)(Tme, { ...e })
}, q8 = {
"/performers/*": K8,
"/studios/*": K8,
@@ -74693,40 +74925,40 @@ var B8 = {
"/agencies/*": K8
}, J8 = {
"/": {
- prefetch: (e, t) => Xce(e, t),
- page: (e) => /* @__PURE__ */ (0, H.jsx)(QA, { ...e })
+ prefetch: (e, t) => Qce(e, t),
+ page: (e) => /* @__PURE__ */ (0, H.jsx)(OA, { ...e })
},
"/junk-files": {
prefetch: async () => {},
- page: (e) => /* @__PURE__ */ (0, H.jsx)(ive, { ...e })
+ page: (e) => /* @__PURE__ */ (0, H.jsx)(sve, { ...e })
}
-}, Y8 = (e) => Object.hasOwn(J8, e), xUe = [
+}, Y8 = (e) => Object.hasOwn(J8, e), TUe = [
"/",
"/unseen",
"/watch-later",
"/flagged",
"/trash",
"/junk-files"
-], SUe = [
+], EUe = [
...Object.keys(B8),
...Object.keys(H8),
...Object.keys(G8),
...Object.keys(q8),
- ...xUe
+ ...TUe
], X8 = (e) => V8(e) || U8(e) || Object.hasOwn(G8, e) || Object.hasOwn(q8, e) || Y8(e);
function Z8(e) {
return V8(e) ? B8[e] : U8(e) ? H8[e] : Y8(e) ? J8[e] : Object.hasOwn(G8, e) ? G8[e] : q8[e];
}
-function CUe(e, t, n) {
+function DUe(e, t, n) {
return X8(e) ? Z8(e).prefetch(t, n) : Promise.reject(/* @__PURE__ */ Error(`路由树里没有这一页:${e}`));
}
-function wUe(e, t, n, r) {
+function OUe(e, t, n, r) {
return Z8(e).page(t, n, r);
}
//#endregion
//#region node_modules/react-router/dist/production/lib/router/url.js
-var TUe = /^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i, EUe = /^[\\/]{2}/;
-function DUe(e, t) {
+var kUe = /^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i, AUe = /^[\\/]{2}/;
+function jUe(e, t) {
return t + e.replace(/\\/g, "/");
}
//#endregion
@@ -74742,7 +74974,7 @@ function $8(e, t) {
} catch {}
}
}
-function OUe({ pathname: e = "/", search: t = "", hash: n = "" }) {
+function MUe({ pathname: e = "/", search: t = "", hash: n = "" }) {
return t && t !== "?" && (e += t.charAt(0) === "?" ? t : "?" + t), n && n !== "#" && (e += n.charAt(0) === "#" ? n : "#" + n), e;
}
function e5(e) {
@@ -74757,19 +74989,19 @@ function e5(e) {
}
//#endregion
//#region node_modules/react-router/dist/production/lib/router/utils.js
-function kUe(e, t, n = "/") {
- return AUe(e, t, n, !1);
+function NUe(e, t, n = "/") {
+ return PUe(e, t, n, !1);
}
-function AUe(e, t, n, r, i) {
+function PUe(e, t, n, r, i) {
let a = s5((typeof t == "string" ? e5(t) : t).pathname || "/", n);
if (a == null) return null;
- let o = i ?? jUe(e), s = null, c = WUe(a);
- for (let e = 0; s == null && e < o.length; ++e) s = UUe(o[e], c, r);
+ let o = i ?? FUe(e), s = null, c = JUe(a);
+ for (let e = 0; s == null && e < o.length; ++e) s = qUe(o[e], c, r);
return s;
}
-function jUe(e) {
+function FUe(e) {
let t = t5(e);
- return MUe(t), t;
+ return IUe(t), t;
}
function t5(e, t = [], n = [], r = "", i = !1) {
let a = (e, a, o = i, s) => {
@@ -74786,7 +75018,7 @@ function t5(e, t = [], n = [], r = "", i = !1) {
let l = d5([r, c.relativePath]), u = n.concat(c);
e.children && e.children.length > 0 && (Q8(e.index !== !0, `Index routes must not have child routes. Please remove all child routes from route path "${l}".`), t5(e.children, t, u, l, o)), !(e.path == null && !e.index) && t.push({
path: l,
- score: VUe(l, e.index),
+ score: GUe(l, e.index),
routesMeta: u.map((e, t) => {
let [n, r] = o5(e.relativePath, e.caseSensitive, t === u.length - 1);
return {
@@ -74810,18 +75042,18 @@ function n5(e) {
let o = n5(r.join("/")), s = [];
return s.push(...o.map((e) => e === "" ? a : [a, e].join("/"))), i && s.push(...o), s.map((t) => e.startsWith("/") && t === "" ? "/" : t);
}
-function MUe(e) {
- e.sort((e, t) => e.score === t.score ? HUe(e.routesMeta.map((e) => e.childrenIndex), t.routesMeta.map((e) => e.childrenIndex)) : t.score - e.score);
+function IUe(e) {
+ e.sort((e, t) => e.score === t.score ? KUe(e.routesMeta.map((e) => e.childrenIndex), t.routesMeta.map((e) => e.childrenIndex)) : t.score - e.score);
}
-var NUe = /^:[\w-]+$/, PUe = /^:[\w-]+/, FUe = 3.5, IUe = 3, LUe = 2, RUe = 1, zUe = 10, BUe = -2, r5 = (e) => e === "*";
-function VUe(e, t) {
+var LUe = /^:[\w-]+$/, RUe = /^:[\w-]+/, zUe = 3.5, BUe = 3, VUe = 2, HUe = 1, UUe = 10, WUe = -2, r5 = (e) => e === "*";
+function GUe(e, t) {
let n = e.split("/"), r = n.length;
- return n.some(r5) && (r += BUe), t && (r += LUe), n.filter((e) => !r5(e)).reduce((e, t) => e + (NUe.test(t) ? IUe : PUe.test(t) ? FUe : t === "" ? RUe : zUe), r);
+ return n.some(r5) && (r += WUe), t && (r += VUe), n.filter((e) => !r5(e)).reduce((e, t) => e + (LUe.test(t) ? BUe : RUe.test(t) ? zUe : t === "" ? HUe : UUe), r);
}
-function HUe(e, t) {
+function KUe(e, t) {
return e.length === t.length && e.slice(0, -1).every((e, n) => e === t[n]) ? e[e.length - 1] - t[t.length - 1] : 0;
}
-function UUe(e, t, n = !1) {
+function qUe(e, t, n = !1) {
let { routesMeta: r } = e, i = {}, a = "/", o = [];
for (let e = 0; e < r.length; ++e) {
let s = r[e], c = e === r.length - 1, l = a === "/" ? t : t.slice(a.length) || "/", u = {
@@ -74837,7 +75069,7 @@ function UUe(e, t, n = !1) {
Object.assign(i, d.params), o.push({
params: i,
pathname: d5([a, d.pathname]),
- pathnameBase: YUe(d5([a, d.pathnameBase])),
+ pathnameBase: $Ue(d5([a, d.pathnameBase])),
route: f
}), d.pathnameBase !== "/" && (a = d5([a, d.pathnameBase]));
}
@@ -74884,7 +75116,7 @@ function o5(e, t = !1, n = !0) {
}).replace(/\/([\w-]+)\?(?=\/|$|\()/g, "(?:/$1)?");
return e.endsWith("*") ? (r.push({ paramName: "*" }), i += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : n ? i += "\\/*$" : e !== "" && e !== "/" && (i += "(?:(?=\\/|$))"), [new RegExp(i, t ? void 0 : "i"), r];
}
-function WUe(e) {
+function JUe(e) {
try {
return e.split("/").map((e) => decodeURIComponent(e).replace(/\//g, "%2F")).join("/");
} catch (t) {
@@ -74897,12 +75129,12 @@ function s5(e, t) {
let n = t.endsWith("/") ? t.length - 1 : t.length, r = e.charAt(n);
return r && r !== "/" ? null : e.slice(n) || "/";
}
-function GUe(e, t = "/") {
+function YUe(e, t = "/") {
let { pathname: n, search: r = "", hash: i = "" } = typeof e == "string" ? e5(e) : e, a;
return n ? (n = u5(n), a = n.startsWith("/") || n.startsWith("\\") ? c5(n.substring(1), "/") : c5(n, t)) : a = t, {
pathname: a,
- search: XUe(r),
- hash: ZUe(i)
+ search: eWe(r),
+ hash: tWe(i)
};
}
function c5(e, t) {
@@ -74914,14 +75146,14 @@ function c5(e, t) {
function l5(e, t, n, r) {
return `Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
}
-function KUe(e) {
+function XUe(e) {
return e.filter((e, t) => t === 0 || e.route.path && e.route.path.length > 0);
}
-function qUe(e) {
- let t = KUe(e);
+function ZUe(e) {
+ let t = XUe(e);
return t.map((e, n) => n === t.length - 1 ? e.pathname : e.pathnameBase);
}
-function JUe(e, t, n, r = !1) {
+function QUe(e, t, n, r = !1) {
let i;
typeof e == "string" ? i = e5(e) : (i = { ...e }, Q8(!i.pathname || !i.pathname.includes("?"), l5("?", "pathname", "search", i)), Q8(!i.pathname || !i.pathname.includes("#"), l5("#", "pathname", "hash", i)), Q8(!i.search || !i.search.includes("#"), l5("#", "search", "hash", i)));
let a = e === "" || i.pathname === "", o = a ? "/" : i.pathname, s;
@@ -74935,7 +75167,7 @@ function JUe(e, t, n, r = !1) {
}
s = e >= 0 ? t[e] : "/";
}
- let c = GUe(i, s), l = o && o !== "/" && o.endsWith("/"), u = (a || o === ".") && n.endsWith("/");
+ let c = YUe(i, s), l = o && o !== "/" && o.endsWith("/"), u = (a || o === ".") && n.endsWith("/");
return !c.pathname.endsWith("/") && (l || u) && (c.pathname += "/"), c;
}
var u5 = (e) => e.replace(/[\\/]{2,}/g, "/"), d5 = (e) => u5(e.join("/"));
@@ -74944,7 +75176,7 @@ function f5(e, t = 0) {
for (; n > t && e.charCodeAt(n - 1) === 47;) n--;
return n === e.length ? e : e.slice(0, n);
}
-var YUe = (e) => f5(e).replace(/^\/*/, "/"), XUe = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, ZUe = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, QUe = class {
+var $Ue = (e) => f5(e).replace(/^\/*/, "/"), eWe = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, tWe = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, nWe = class {
status;
statusText;
data;
@@ -74954,23 +75186,23 @@ var YUe = (e) => f5(e).replace(/^\/*/, "/"), XUe = (e) => !e || e === "?" ? "" :
this.status = e, this.statusText = t || "", this.internal = r, n instanceof Error ? (this.data = n.toString(), this.error = n) : this.data = n;
}
};
-function $Ue(e) {
+function rWe(e) {
return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
}
-function eWe(e) {
+function iWe(e) {
return d5(e.map((e) => e.route.path).filter(Boolean)) || "/";
}
var p5 = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0;
-function tWe(e, t) {
+function aWe(e, t) {
let n = e;
- if (typeof n != "string" || !TUe.test(n)) return {
+ if (typeof n != "string" || !kUe.test(n)) return {
absoluteURL: void 0,
isExternal: !1,
to: n
};
let r = n, i = !1;
if (p5) try {
- let e = new URL(window.location.href), r = EUe.test(n) ? new URL(DUe(n, e.protocol)) : new URL(n), a = s5(r.pathname, t);
+ let e = new URL(window.location.href), r = AUe.test(n) ? new URL(jUe(n, e.protocol)) : new URL(n), a = s5(r.pathname, t);
r.origin === e.origin && a != null ? n = a + r.search + r.hash : i = !0;
} catch {
$8(!1, `<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`);
@@ -74995,7 +75227,7 @@ function h5(e) {
function g5(e, t) {
return e.origin === t.origin && (e.origin !== "null" || e.protocol === t.protocol && e.host === t.host);
}
-function nWe(e, t) {
+function oWe(e, t) {
if (e.startsWith("//")) return !0;
let n = t.protocol.toLowerCase();
return e.toLowerCase().startsWith(n) ? t.host === "" || e.slice(n.length).startsWith("//") : !1;
@@ -75008,7 +75240,7 @@ function _5(e, t, n, r) {
let a = new URL(t, n), o = i != null && !g5(i, n), s = !g5(a, n);
if (r === "reject") {
if (o || s) throw Error("External navigation is not allowed");
- } else if (s && (i == null || !nWe(e, i) || !g5(i, a))) throw Error("External navigation is not allowed");
+ } else if (s && (i == null || !oWe(e, i) || !g5(i, a))) throw Error("External navigation is not allowed");
}
//#endregion
//#region node_modules/react-router/dist/production/lib/router/router.js
@@ -75019,9 +75251,9 @@ var v5 = [
"DELETE"
];
new Set(v5);
-var rWe = ["GET", ...v5];
-new Set(rWe);
-var iWe = [
+var sWe = ["GET", ...v5];
+new Set(sWe);
+var cWe = [
"about:",
"blob:",
"chrome:",
@@ -75033,9 +75265,9 @@ var iWe = [
"filesystem:",
"javascript:"
];
-function aWe(e) {
+function lWe(e) {
try {
- return iWe.includes(new URL(e).protocol);
+ return cWe.includes(new URL(e).protocol);
} catch {
return !1;
}
@@ -75044,18 +75276,18 @@ function aWe(e) {
//#region node_modules/react-router/dist/production/lib/context.js
var y5 = B.createContext(null);
y5.displayName = "DataRouter";
-var oWe = B.createContext(null);
-oWe.displayName = "DataRouterState";
+var uWe = B.createContext(null);
+uWe.displayName = "DataRouterState";
var b5 = B.createContext(null);
b5.displayName = "DataRouterData";
-var sWe = B.createContext(null);
-sWe.displayName = "DataRouterNavigation";
-var cWe = B.createContext(!1), lWe = B.createContext({ isTransitioning: !1 });
-lWe.displayName = "ViewTransition";
-var uWe = B.createContext(null);
-uWe.displayName = "Fetchers";
var dWe = B.createContext(null);
-dWe.displayName = "Await";
+dWe.displayName = "DataRouterNavigation";
+var fWe = B.createContext(!1), pWe = B.createContext({ isTransitioning: !1 });
+pWe.displayName = "ViewTransition";
+var mWe = B.createContext(null);
+mWe.displayName = "Fetchers";
+var hWe = B.createContext(null);
+hWe.displayName = "Await";
var x5 = B.createContext(null);
x5.displayName = "Navigation";
var S5 = B.createContext(null);
@@ -75074,17 +75306,17 @@ var E5 = B.createContext(null);
E5.displayName = "RouteError";
//#endregion
//#region node_modules/react-router/dist/production/lib/errors.js
-var D5 = "REACT_ROUTER_ERROR", fWe = "REDIRECT", pWe = "ROUTE_ERROR_RESPONSE";
-function mWe(e) {
- if (e.startsWith(`${D5}:${fWe}:{`)) try {
+var D5 = "REACT_ROUTER_ERROR", gWe = "REDIRECT", _We = "ROUTE_ERROR_RESPONSE";
+function vWe(e) {
+ if (e.startsWith(`${D5}:${gWe}:{`)) try {
let t = JSON.parse(e.slice(28));
if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string" && typeof t.location == "string" && typeof t.reloadDocument == "boolean" && typeof t.replace == "boolean") return t;
} catch {}
}
-function hWe(e) {
- if (e.startsWith(`${D5}:${pWe}:{`)) try {
+function yWe(e) {
+ if (e.startsWith(`${D5}:${_We}:{`)) try {
let t = JSON.parse(e.slice(40));
- if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string") return new QUe(t.status, t.statusText, t.data);
+ if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string") return new nWe(t.status, t.statusText, t.data);
} catch {}
}
//#endregion
@@ -75096,12 +75328,12 @@ function k5() {
return Q8(O5(), "useLocation() may be used only in the context of a <Router> component."), B.useContext(S5).location;
}
var A5 = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
-function gWe() {
- return B.useContext(w5) ? DWe() : _We();
+function bWe() {
+ return B.useContext(w5) ? MWe() : xWe();
}
-function _We() {
+function xWe() {
Q8(O5(), "useNavigate() may be used only in the context of a <Router> component.");
- let e = B.useContext(y5), { basename: t, navigator: n } = B.useContext(x5), { matches: r } = B.useContext(C5), { pathname: i } = k5(), a = JSON.stringify(qUe(r)), o = B.useRef(!1);
+ let e = B.useContext(y5), { basename: t, navigator: n } = B.useContext(x5), { matches: r } = B.useContext(C5), { pathname: i } = k5(), a = JSON.stringify(ZUe(r)), o = B.useRef(!1);
return B.useLayoutEffect(() => {
o.current = !0;
}), B.useCallback((r, s = {}) => {
@@ -75110,8 +75342,8 @@ function _We() {
n.go(r);
return;
}
- let c = JUe(r, JSON.parse(a), i, s.relative === "path");
- e == null && t !== "/" && (c.pathname = c.pathname === "/" ? t : d5([t, c.pathname])), _5(typeof r == "string" ? r : OUe(r), n.createHref(c), h5(n), "reject"), (s.replace ? n.replace : n.push)(c, s.state, s);
+ let c = QUe(r, JSON.parse(a), i, s.relative === "path");
+ e == null && t !== "/" && (c.pathname = c.pathname === "/" ? t : d5([t, c.pathname])), _5(typeof r == "string" ? r : MUe(r), n.createHref(c), h5(n), "reject"), (s.replace ? n.replace : n.push)(c, s.state, s);
}, [
t,
n,
@@ -75121,7 +75353,7 @@ function _We() {
]);
}
B.createContext(null);
-function vWe(e, t) {
+function SWe(e, t) {
return j5(e, t);
}
function j5(e, t, n) {
@@ -75141,8 +75373,8 @@ function j5(e, t, n) {
d = "/" + u.replace(/^\//, "").split("/").slice(e.length).join("/");
}
let f;
- f = n ? n.state.matches.length ? n.state.matches.map((e) => Object.assign(e, { route: n.manifest[e.route.id] || e.route })) : n.router.match(n.state.location) : kUe(e, { pathname: d });
- let p = CWe(f && f.map((e) => Object.assign({}, e, {
+ f = n ? n.state.matches.length ? n.state.matches.map((e) => Object.assign(e, { route: n.manifest[e.route.id] || e.route })) : n.router.match(n.state.location) : NUe(e, { pathname: d });
+ let p = OWe(f && f.map((e) => Object.assign({}, e, {
params: Object.assign({}, o, e.params),
pathname: d5([s, r.encodeLocation ? r.encodeLocation(e.pathname.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : e.pathname]),
pathnameBase: e.pathnameBase === "/" ? s : d5([s, r.encodeLocation ? r.encodeLocation(e.pathnameBase.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : e.pathnameBase])
@@ -75160,14 +75392,14 @@ function j5(e, t, n) {
navigationType: "POP"
} }, p) : p;
}
-function yWe() {
- let e = EWe(), t = $Ue(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), n = e instanceof Error ? e.stack : null;
+function CWe() {
+ let e = jWe(), t = rWe(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), n = e instanceof Error ? e.stack : null;
return /* @__PURE__ */ B.createElement(B.Fragment, null, /* @__PURE__ */ B.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ B.createElement("h3", { style: { fontStyle: "italic" } }, t), n ? /* @__PURE__ */ B.createElement("pre", { style: {
padding: "0.5rem",
backgroundColor: "rgba(200,200,200, 0.5)"
} }, n) : null, null);
}
-var M5 = /* @__PURE__ */ B.createElement(yWe, null), bWe = class extends B.Component {
+var wWe = /* @__PURE__ */ B.createElement(CWe, null), TWe = class extends B.Component {
constructor(e) {
super(e), this.state = {
location: e.location,
@@ -75175,7 +75407,7 @@ var M5 = /* @__PURE__ */ B.createElement(yWe, null), bWe = class extends B.Compo
error: e.error
};
}
- static contextType = cWe;
+ static contextType = fWe;
static getDerivedStateFromError(e) {
return { error: e };
}
@@ -75196,30 +75428,30 @@ var M5 = /* @__PURE__ */ B.createElement(yWe, null), bWe = class extends B.Compo
render() {
let e = this.state.error;
if (this.context && typeof e == "object" && e && "digest" in e && typeof e.digest == "string") {
- let t = hWe(e.digest);
+ let t = yWe(e.digest);
t && (e = t);
}
let t = e === void 0 ? this.props.children : /* @__PURE__ */ B.createElement(C5.Provider, { value: this.props.routeContext }, /* @__PURE__ */ B.createElement(w5.Provider, { value: this.props.routeContext.isDataRoute }, /* @__PURE__ */ B.createElement(T5.Provider, { value: this.props.routeContext.matches[this.props.routeContext.matches.length - 1]?.route.id }, /* @__PURE__ */ B.createElement(E5.Provider, {
value: e,
children: this.props.component
}))));
- return this.context ? /* @__PURE__ */ B.createElement(xWe, { error: e }, t) : t;
+ return this.context ? /* @__PURE__ */ B.createElement(EWe, { error: e }, t) : t;
}
-}, N5 = /* @__PURE__ */ new WeakMap();
-function xWe({ children: e, error: t }) {
+}, M5 = /* @__PURE__ */ new WeakMap();
+function EWe({ children: e, error: t }) {
let { basename: n, navigator: r } = B.useContext(x5);
if (typeof t == "object" && t && "digest" in t && typeof t.digest == "string") {
- let e = mWe(t.digest);
+ let e = vWe(t.digest);
if (e) {
- let i = N5.get(t);
+ let i = M5.get(t);
if (i) throw i;
- let a = tWe(e.location, n), o = a.absoluteURL || a.to;
- if (_5(e.location, o, h5(r), "allow-explicit"), aWe(o)) throw Error("Invalid redirect location");
- if (p5 && !N5.get(t)) {
+ let a = aWe(e.location, n), o = a.absoluteURL || a.to;
+ if (_5(e.location, o, h5(r), "allow-explicit"), lWe(o)) throw Error("Invalid redirect location");
+ if (p5 && !M5.get(t)) {
if (a.isExternal || e.reloadDocument) window.location.href = o;
else {
let n = Promise.resolve().then(() => window.__reactRouterDataRouter.navigate(a.to, { replace: e.replace }));
- throw N5.set(t, n), n;
+ throw M5.set(t, n), n;
}
}
return /* @__PURE__ */ B.createElement("meta", {
@@ -75230,11 +75462,11 @@ function xWe({ children: e, error: t }) {
}
return e;
}
-function SWe({ routeContext: e, match: t, children: n }) {
+function DWe({ routeContext: e, match: t, children: n }) {
let r = B.useContext(y5);
return r && r.static && r.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (r.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ B.createElement(C5.Provider, { value: e }, /* @__PURE__ */ B.createElement(w5.Provider, { value: e.isDataRoute }, /* @__PURE__ */ B.createElement(T5.Provider, { value: t.route.id }, n)));
}
-function CWe(e, t = [], n) {
+function OWe(e, t = [], n) {
let r = n?.state;
if (e == null) {
if (!r) return null;
@@ -75265,16 +75497,16 @@ function CWe(e, t = [], n) {
c(e, {
location: r.location,
params: r.matches?.[0]?.params ?? {},
- pattern: eWe(r.matches),
+ pattern: iWe(r.matches),
errorInfo: t
});
} : void 0;
return i.reduceRight((e, n, c) => {
let u, d = !1, f = null, p = null;
- r && (u = a && n.route.id ? a[n.route.id] : void 0, f = n.route.errorElement || M5, o && (s < 0 && c === 0 ? (OWe("route-fallback", !1, "No `HydrateFallback` element provided to render during initial hydration"), d = !0, p = null) : s === c && (d = !0, p = n.route.hydrateFallbackElement || null)));
+ r && (u = a && n.route.id ? a[n.route.id] : void 0, f = n.route.errorElement || wWe, o && (s < 0 && c === 0 ? (NWe("route-fallback", !1, "No `HydrateFallback` element provided to render during initial hydration"), d = !0, p = null) : s === c && (d = !0, p = n.route.hydrateFallbackElement || null)));
let m = t.concat(i.slice(0, c + 1)), h = () => {
let t;
- return t = u ? f : d ? p : n.route.Component ? /* @__PURE__ */ B.createElement(n.route.Component, null) : n.route.element ? n.route.element : e, /* @__PURE__ */ B.createElement(SWe, {
+ return t = u ? f : d ? p : n.route.Component ? /* @__PURE__ */ B.createElement(n.route.Component, null) : n.route.element ? n.route.element : e, /* @__PURE__ */ B.createElement(DWe, {
match: n,
routeContext: {
outlet: e,
@@ -75284,7 +75516,7 @@ function CWe(e, t = [], n) {
children: t
});
};
- return r && (n.route.ErrorBoundary || n.route.errorElement || c === 0) ? /* @__PURE__ */ B.createElement(bWe, {
+ return r && (n.route.ErrorBoundary || n.route.errorElement || c === 0) ? /* @__PURE__ */ B.createElement(TWe, {
location: r.location,
revalidation: r.revalidation,
component: f,
@@ -75299,27 +75531,27 @@ function CWe(e, t = [], n) {
}) : h();
}, null);
}
-function P5(e) {
+function N5(e) {
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
}
-function wWe(e) {
+function kWe(e) {
let t = B.useContext(y5);
- return Q8(t, P5(e)), t;
+ return Q8(t, N5(e)), t;
}
-function TWe(e) {
+function AWe(e) {
let t = B.useContext(b5);
- return Q8(t, P5(e)), t;
+ return Q8(t, N5(e)), t;
}
-function F5(e) {
+function P5(e) {
let t = B.useContext(T5);
return Q8(t, `${e} can only be used on routes that contain a unique "id"`), t;
}
-function EWe() {
- let e = B.useContext(E5), t = TWe("useRouteError"), n = F5("useRouteError");
+function jWe() {
+ let e = B.useContext(E5), t = AWe("useRouteError"), n = P5("useRouteError");
return e === void 0 ? t.errors?.[n] : e;
}
-function DWe() {
- let { router: e } = wWe("useNavigate"), t = F5("useNavigate"), n = B.useRef(!1);
+function MWe() {
+ let { router: e } = kWe("useNavigate"), t = P5("useNavigate"), n = B.useRef(!1);
return B.useLayoutEffect(() => {
n.current = !0;
}), B.useCallback(async (r, i = {}) => {
@@ -75329,12 +75561,12 @@ function DWe() {
}));
}, [e, t]);
}
-var I5 = {};
-function OWe(e, t, n) {
- !t && !I5[e] && (I5[e] = !0, $8(!1, n));
+var F5 = {};
+function NWe(e, t, n) {
+ !t && !F5[e] && (F5[e] = !0, $8(!1, n));
}
-B.memo(kWe);
-function kWe({ routes: e, manifest: t, state: n, isStatic: r, onError: i }) {
+B.memo(PWe);
+function PWe({ routes: e, manifest: t, state: n, isStatic: r, onError: i }) {
let a = B.useContext(y5);
return Q8(a, "You must render this element inside a <DataRouterContext.Provider> element"), j5(e, void 0, {
router: a.router,
@@ -75344,10 +75576,10 @@ function kWe({ routes: e, manifest: t, state: n, isStatic: r, onError: i }) {
onError: i
});
}
-function L5(e) {
+function I5(e) {
Q8(!1, "A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.");
}
-function AWe({ basename: e = "/", children: t = null, location: n, navigationType: r = "POP", navigator: i, static: a = !1, useTransitions: o }) {
+function FWe({ basename: e = "/", children: t = null, location: n, navigationType: r = "POP", navigator: i, static: a = !1, useTransitions: o }) {
Q8(!O5(), "You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");
let s = e.replace(/^\/*/, "/"), c = B.useMemo(() => ({
basename: s,
@@ -75390,20 +75622,20 @@ function AWe({ basename: e = "/", children: t = null, location: n, navigationTyp
value: h
}));
}
-function jWe({ children: e, location: t }) {
- return vWe(R5(e), t);
+function IWe({ children: e, location: t }) {
+ return SWe(L5(e), t);
}
B.Component;
-function R5(e, t = []) {
+function L5(e, t = []) {
let n = [];
return B.Children.forEach(e, (e, r) => {
if (!B.isValidElement(e)) return;
let i = [...t, r];
if (e.type === B.Fragment) {
- n.push.apply(n, R5(e.props.children, i));
+ n.push.apply(n, L5(e.props.children, i));
return;
}
- Q8(e.type === L5, `[${typeof e.type == "string" ? e.type : e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`);
+ Q8(e.type === I5, `[${typeof e.type == "string" ? e.type : e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`);
let a = e.props;
Q8(!a.index || !a.children, "An index route cannot have child routes.");
let o = {
@@ -75424,17 +75656,17 @@ function R5(e, t = []) {
handle: a.handle,
lazy: a.lazy
};
- a.children && (o.children = R5(a.children, i)), n.push(o);
+ a.children && (o.children = L5(a.children, i)), n.push(o);
}), n;
}
//#endregion
//#region src/react/router/router.tsx
-var z5 = (0, B.createContext)(0), B5 = (0, B.createContext)(null);
-function MWe({ children: e }) {
+var R5 = (0, B.createContext)(0), z5 = (0, B.createContext)(null);
+function LWe({ children: e }) {
let [t, n] = (0, B.useState)(() => Ze.navigation);
- return (0, B.useLayoutEffect)(() => (n(Ze.navigation), Ze.listen(n)), []), /* @__PURE__ */ (0, H.jsx)(z5.Provider, {
+ return (0, B.useLayoutEffect)(() => (n(Ze.navigation), Ze.listen(n)), []), /* @__PURE__ */ (0, H.jsx)(R5.Provider, {
value: t.seq,
- children: /* @__PURE__ */ (0, H.jsx)(AWe, {
+ children: /* @__PURE__ */ (0, H.jsx)(FWe, {
location: t.location,
navigationType: t.action,
navigator: Ze,
@@ -75442,19 +75674,19 @@ function MWe({ children: e }) {
})
});
}
-function NWe() {
- let e = (0, B.useContext)(z5);
+function RWe() {
+ let e = (0, B.useContext)(R5);
return (0, B.useLayoutEffect)(() => {
queueMicrotask(() => Qe(e));
}, [e]), null;
}
-function PWe({ target: e }) {
- let t = gWe();
+function zWe({ target: e }) {
+ let t = bWe();
return (0, B.useLayoutEffect)(() => {
e.current = t;
}), null;
}
-function FWe(e, t, n) {
+function BWe(e, t, n) {
let r = new URL(e, window.location.href);
if (!V8(r.pathname)) {
t.navigate(e);
@@ -75462,39 +75694,39 @@ function FWe(e, t, n) {
}
n(`${r.pathname}${r.search}${r.hash}`);
}
-function IWe() {
- let e = (0, B.useContext)(B5), [t, n] = (0, B.useState)(Xe), r = (0, B.useRef)(null);
+function VWe() {
+ let e = (0, B.useContext)(z5), [t, n] = (0, B.useState)(Xe), r = (0, B.useRef)(null);
(0, B.useLayoutEffect)(() => (n(Xe()), Ye((e, t) => {
t ? (0, Dt.flushSync)(() => n(e)) : n(e);
})), []);
let i = (0, B.useMemo)(() => (t) => {
- e && r.current && FWe(t, e, r.current);
+ e && r.current && BWe(t, e, r.current);
}, [e]);
- return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(PWe, { target: r }), e ? t.map((t) => /* @__PURE__ */ (0, H.jsx)(LWe, {
+ return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(zWe, { target: r }), e ? t.map((t) => /* @__PURE__ */ (0, H.jsx)(HWe, {
entry: t,
actions: e,
go: i
}, t.revision)) : null] });
}
-var LWe = (0, B.memo)(function({ entry: e, actions: t, go: n }) {
- return X8(e.path) ? (0, Dt.createPortal)(wUe(e.path, e.props, t, n), e.host, String(e.revision)) : null;
+var HWe = (0, B.memo)(function({ entry: e, actions: t, go: n }) {
+ return X8(e.path) ? (0, Dt.createPortal)(OUe(e.path, e.props, t, n), e.host, String(e.revision)) : null;
});
-function RWe({ children: e, actions: t = null }) {
- return /* @__PURE__ */ (0, H.jsx)(qE, { children: /* @__PURE__ */ (0, H.jsx)(B5.Provider, {
+function UWe({ children: e, actions: t = null }) {
+ return /* @__PURE__ */ (0, H.jsx)(GE, { children: /* @__PURE__ */ (0, H.jsx)(z5.Provider, {
value: t,
- children: /* @__PURE__ */ (0, H.jsxs)(MWe, { children: [
- /* @__PURE__ */ (0, H.jsx)(NWe, {}),
- /* @__PURE__ */ (0, H.jsx)(IWe, {}),
- /* @__PURE__ */ (0, H.jsxs)(jWe, { children: [
- SUe.map((e) => /* @__PURE__ */ (0, H.jsx)(L5, {
+ children: /* @__PURE__ */ (0, H.jsxs)(LWe, { children: [
+ /* @__PURE__ */ (0, H.jsx)(RWe, {}),
+ /* @__PURE__ */ (0, H.jsx)(VWe, {}),
+ /* @__PURE__ */ (0, H.jsxs)(IWe, { children: [
+ EUe.map((e) => /* @__PURE__ */ (0, H.jsx)(I5, {
path: e,
element: null
}, e)),
- /* @__PURE__ */ (0, H.jsx)(L5, {
+ /* @__PURE__ */ (0, H.jsx)(I5, {
path: "/resource-sync",
element: null
}),
- /* @__PURE__ */ (0, H.jsx)(L5, {
+ /* @__PURE__ */ (0, H.jsx)(I5, {
path: "*",
element: e
})
@@ -75502,49 +75734,49 @@ function RWe({ children: e, actions: t = null }) {
] })
}) });
}
-var V5 = null;
-function zWe(e) {
- if (V5) return;
- V5 = (0, Ot.createRoot)(document.createElement("div"));
- let t = V5;
- (0, Dt.flushSync)(() => t.render(/* @__PURE__ */ (0, H.jsx)(RWe, { actions: e })));
+var B5 = null;
+function WWe(e) {
+ if (B5) return;
+ B5 = (0, Ot.createRoot)(document.createElement("div"));
+ let t = B5;
+ (0, Dt.flushSync)(() => t.render(/* @__PURE__ */ (0, H.jsx)(UWe, { actions: e })));
}
//#endregion
//#region src/number-setting.ts
-function H5(e, t, n, r) {
+function V5(e, t, n, r) {
return Number.isInteger(e) && e >= t && e <= n ? e : r;
}
//#endregion
//#region src/react/settings/configuration-summary.tsx
-var BWe = (e) => {
+var GWe = (e) => {
let t = e.updates;
return t ? t.message ? `${t.current_version} · ${t.message}` : t.current_version : "未取得";
};
-function VWe({ openConfiguration: e }) {
- let t = xw({
- queryKey: IL,
- queryFn: ({ signal: e }) => LL(e)
+function KWe({ openConfiguration: e }) {
+ let t = yw({
+ queryKey: PL,
+ queryFn: ({ signal: e }) => FL(e)
}), n = t.data;
return /* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex flex-col",
- children: [n ? /* @__PURE__ */ (0, H.jsxs)(FT, { children: [
- /* @__PURE__ */ (0, H.jsx)(IT, {
+ children: [n ? /* @__PURE__ */ (0, H.jsxs)(NT, { children: [
+ /* @__PURE__ */ (0, H.jsx)(PT, {
term: "媒体库",
children: `${n.library_count} 个`
}),
- /* @__PURE__ */ (0, H.jsx)(IT, {
+ /* @__PURE__ */ (0, H.jsx)(PT, {
term: "端口",
children: String(n.port)
}),
- /* @__PURE__ */ (0, H.jsx)(IT, {
+ /* @__PURE__ */ (0, H.jsx)(PT, {
term: "更新",
- children: BWe(n)
+ children: GWe(n)
})
- ] }) : /* @__PURE__ */ (0, H.jsx)(kT, { children: /* @__PURE__ */ (0, H.jsx)(Y, {
+ ] }) : /* @__PURE__ */ (0, H.jsx)(DT, { children: /* @__PURE__ */ (0, H.jsx)(Y, {
tone: "error",
title: "配置读取失败",
children: t.error ? G(t.error) : "未取得配置,请刷新页面重试。"
- }) }), /* @__PURE__ */ (0, H.jsx)(AT, {
+ }) }), /* @__PURE__ */ (0, H.jsx)(OT, {
status: "媒体文件夹、端口、代理与更新在配置页上改。",
children: /* @__PURE__ */ (0, H.jsx)(J, {
onClick: e,
@@ -75555,16 +75787,16 @@ function VWe({ openConfiguration: e }) {
}
//#endregion
//#region src/react/settings-panel/legacy-controls.tsx
-var U5 = (e) => e.map(([e, t, n]) => n ? [
+var H5 = (e) => e.map(([e, t, n]) => n ? [
e,
t,
n
] : [e, t]);
-function W5({ id: e, name: t, legend: n, options: r, value: i, attr: a, variant: o, text: s = !1, epoch: c, onChoose: l }) {
+function U5({ id: e, name: t, legend: n, options: r, value: i, attr: a, variant: o, text: s = !1, epoch: c, onChoose: l }) {
let d = (0, B.useRef)(null), f = (0, B.useRef)(null), p = (0, B.useRef)(l);
return p.current = l, (0, B.useLayoutEffect)(() => {
let e = d.current;
- e && (f.current && f.current.value === i && f.current.epoch === c || (e.innerHTML = u(t, n, U5(r), i, {
+ e && (f.current && f.current.value === i && f.current.epoch === c || (e.innerHTML = u(t, n, H5(r), i, {
attr: a,
className: o,
text: s
@@ -75582,13 +75814,13 @@ function W5({ id: e, name: t, legend: n, options: r, value: i, attr: a, variant:
ref: d
});
}
-function G5({ id: e, label: t, options: n, value: r, disabled: i = !1, busy: a = !1, hidden: o, describedBy: s, epoch: c, onPick: l, decorate: u }) {
+function W5({ id: e, label: t, options: n, value: r, disabled: i = !1, busy: a = !1, hidden: o, describedBy: s, epoch: c, onPick: l, decorate: u }) {
let d = (0, B.useRef)(null), f = (0, B.useRef)(null), p = (0, B.useRef)(-1), m = (0, B.useRef)(l);
return m.current = l, (0, B.useLayoutEffect)(() => {
let e = d.current;
if (!e) return;
if (p.current !== c || !f.current) {
- e.innerHTML = b(U5(n), r, { label: t });
+ e.innerHTML = b(H5(n), r, { label: t });
let i = j(e.firstElementChild);
i.addEventListener("change", () => m.current(i.value)), f.current = i, p.current = c;
}
@@ -75601,7 +75833,7 @@ function G5({ id: e, label: t, options: n, value: r, disabled: i = !1, busy: a =
"aria-describedby": s
});
}
-function HWe({ field: e, label: t, max: n, value: r, hidden: a, onStep: o, onSettle: s }) {
+function qWe({ field: e, label: t, max: n, value: r, hidden: a, onStep: o, onSettle: s }) {
let c = (0, B.useRef)(null), l = (0, B.useRef)(null), u = (0, B.useRef)({
onStep: o,
onSettle: s
@@ -75636,7 +75868,7 @@ function HWe({ field: e, label: t, max: n, value: r, hidden: a, onStep: o, onSet
}
//#endregion
//#region src/react/settings-panel/glow-settings.tsx
-var UWe = [
+var JWe = [
[
"strength",
"强度",
@@ -75663,7 +75895,7 @@ var UWe = [
100
]
];
-function WWe({ host: e, spot: t, index: r, glow: i }) {
+function YWe({ host: e, spot: t, index: r, glow: i }) {
let a = $e[r], o = (0, B.useRef)(null), s = (0, B.useRef)(null), c = (0, B.useRef)(null), [l, u] = (0, B.useState)("all");
(0, B.useLayoutEffect)(() => {
let [e, t, n] = [
@@ -75702,7 +75934,7 @@ function WWe({ host: e, spot: t, index: r, glow: i }) {
children: d
})]
}),
- /* @__PURE__ */ (0, H.jsx)(Jk, { name: "chevron-down" })
+ /* @__PURE__ */ (0, H.jsx)(Tk, { name: "chevron-down" })
]
}), /* @__PURE__ */ (0, H.jsxs)("div", {
className: "popmenu",
@@ -75741,7 +75973,7 @@ function WWe({ host: e, spot: t, index: r, glow: i }) {
})]
});
}
-function GWe({ host: e }) {
+function XWe({ host: e }) {
let t = e.store.value.homeGlow, n = at(t.preset);
return /* @__PURE__ */ (0, H.jsxs)("section", {
"data-glow-setting": "",
@@ -75760,7 +75992,7 @@ function GWe({ host: e }) {
children: it(t.preset)
})]
}),
- /* @__PURE__ */ (0, H.jsx)(tD, {
+ /* @__PURE__ */ (0, H.jsx)($E, {
store: e.store,
label: "光晕配色"
}),
@@ -75771,7 +76003,7 @@ function GWe({ host: e }) {
}),
/* @__PURE__ */ (0, H.jsx)("div", {
"data-glow-fields": "",
- children: UWe.map(([r, i, a]) => /* @__PURE__ */ (0, H.jsx)(HWe, {
+ children: JWe.map(([r, i, a]) => /* @__PURE__ */ (0, H.jsx)(qWe, {
field: r,
label: i,
max: a,
@@ -75793,7 +76025,7 @@ function GWe({ host: e }) {
hidden: n,
children: [/* @__PURE__ */ (0, H.jsx)("h4", { children: "颜色" }), /* @__PURE__ */ (0, H.jsx)("div", {
"data-glow-stops": "",
- children: nt.map((n, r) => /* @__PURE__ */ (0, H.jsx)(WWe, {
+ children: nt.map((n, r) => /* @__PURE__ */ (0, H.jsx)(YWe, {
host: e,
spot: n,
index: r,
@@ -75818,7 +76050,7 @@ function GWe({ host: e }) {
}
//#endregion
//#region src/react/settings-panel/number-setting.tsx
-var KWe = {
+var ZWe = {
batchSizeSetting: {
min: 1,
max: 200,
@@ -75859,10 +76091,10 @@ var KWe = {
optional: !0,
fallback: 60
}
-}, K5 = (e) => `peach.number.${e}`;
-function q5({ id: e, label: t, value: n, disabled: r = !1, onApply: i }) {
- let a = KWe[e], { min: o, max: s, unit: c, fallback: l } = a, u = a.optional === !0, d = (0, B.useRef)(0);
- d.current ||= H5(Number(localStorage.getItem(K5(e))), o, s, n && n > 0 ? n : l);
+}, G5 = (e) => `peach.number.${e}`;
+function K5({ id: e, label: t, value: n, disabled: r = !1, onApply: i }) {
+ let a = ZWe[e], { min: o, max: s, unit: c, fallback: l } = a, u = a.optional === !0, d = (0, B.useRef)(0);
+ d.current ||= V5(Number(localStorage.getItem(G5(e))), o, s, n && n > 0 ? n : l);
let [f, p] = (0, B.useState)(n ?? 0), [m, h] = (0, B.useState)(String(n && n > 0 ? n : d.current)), [g, _] = (0, B.useState)(""), v = (0, B.useRef)(null), y = (0, B.useRef)(i);
y.current = i, (0, B.useLayoutEffect)(() => {
n !== null && (p(n), n > 0 && h(String(n)));
@@ -75874,7 +76106,7 @@ function q5({ id: e, label: t, value: n, disabled: r = !1, onApply: i }) {
t.setAttribute("aria-invalid", "true"), _(`请输入 ${o}–${s} 的整数(${c})`);
return;
}
- t.removeAttribute("aria-invalid"), _(""), d.current = Number(t.value), localStorage.setItem(K5(e), String(d.current)), y.current(d.current);
+ t.removeAttribute("aria-invalid"), _(""), d.current = Number(t.value), localStorage.setItem(G5(e), String(d.current)), y.current(d.current);
}
}, x = (0, B.useRef)(b);
x.current = b, (0, B.useEffect)(() => {
@@ -75889,7 +76121,7 @@ function q5({ id: e, label: t, value: n, disabled: r = !1, onApply: i }) {
p(d.current), h(String(d.current)), y.current(d.current);
return;
}
- t && t.value && t.checkValidity() && (d.current = Number(t.value)), localStorage.setItem(K5(e), String(d.current)), p(0), y.current(0);
+ t && t.value && t.checkValidity() && (d.current = Number(t.value)), localStorage.setItem(G5(e), String(d.current)), p(0), y.current(0);
}, w = r || n === null;
return /* @__PURE__ */ (0, H.jsxs)("div", {
"data-number-setting": "",
@@ -75939,13 +76171,13 @@ function q5({ id: e, label: t, value: n, disabled: r = !1, onApply: i }) {
}
//#endregion
//#region src/react/sidebar/sidebar-order.ts
-function J5(e) {
- let { mutate: t } = Qj();
+function q5(e) {
+ let { mutate: t } = Oj();
return (0, B.useCallback)((n) => {
e.value.sidebarOrder = n, e.save(), t({ sidebarOrder: n }, { onError: () => {} });
}, [e, t]);
}
-function Y5(e, t, n, r) {
+function J5(e, t, n, r) {
if (t === n) return null;
let i = [...e], a = i.indexOf(t);
if (a < 0) return null;
@@ -75955,17 +76187,17 @@ function Y5(e, t, n, r) {
}
//#endregion
//#region src/react/settings-panel/sidebar-order.tsx
-var qWe = "__home__", X5 = (e) => e === "" ? qWe : e;
-function JWe({ host: e }) {
- let t = J5(e.store), n = e.store.value.sidebarOrder, r = new Map(e.navCatalog.map((e) => [e[0], e])), i = n.map((e) => r.get(e)).filter((e) => e !== void 0), o = e.navCatalog.filter(([e]) => !n.includes(e)), [s, c] = (0, B.useState)(null), [l, u] = (0, B.useState)(!1), [d, f] = (0, B.useState)(null), [p, m] = (0, B.useState)(null), h = (0, B.useRef)(null), g = (0, B.useRef)(null), v = (e, r, i) => {
- let a = Y5(n, e, r, i);
+var QWe = "__home__", Y5 = (e) => e === "" ? QWe : e;
+function $We({ host: e }) {
+ let t = q5(e.store), n = e.store.value.sidebarOrder, r = new Map(e.navCatalog.map((e) => [e[0], e])), i = n.map((e) => r.get(e)).filter((e) => e !== void 0), o = e.navCatalog.filter(([e]) => !n.includes(e)), [s, c] = (0, B.useState)(null), [l, u] = (0, B.useState)(!1), [d, f] = (0, B.useState)(null), [p, m] = (0, B.useState)(null), h = (0, B.useRef)(null), g = (0, B.useRef)(null), v = (e, r, i) => {
+ let a = J5(n, e, r, i);
a && t(a);
}, y = (e, r) => {
let i = n.indexOf(e), a = i + r;
if (i < 0 || a < 0 || a >= n.length) return;
let o = [...n];
[o[i], o[a]] = [o[a], o[i]], t(o);
- }, b = o.find(([e]) => X5(e) === s) ?? o[0], x = () => {
+ }, b = o.find(([e]) => Y5(e) === s) ?? o[0], x = () => {
g.current && a(g.current), u(!1);
}, S = () => {
let e = g.current;
@@ -75986,7 +76218,7 @@ function JWe({ host: e }) {
}, T = (e) => ({
draggable: !0,
onDragStart: (t) => {
- f(e), t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData("text/plain", X5(e));
+ f(e), t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData("text/plain", Y5(e));
},
onDragOver: (t) => {
if (d === null || d === e) return;
@@ -76018,9 +76250,9 @@ function JWe({ host: e }) {
/* @__PURE__ */ (0, H.jsx)("i", {
"data-sidebar-grip": "",
"aria-hidden": "true",
- children: /* @__PURE__ */ (0, H.jsx)(Jk, { name: "grip-vertical" })
+ children: /* @__PURE__ */ (0, H.jsx)(Tk, { name: "grip-vertical" })
}),
- /* @__PURE__ */ (0, H.jsx)(Jk, { name: a ?? "" }),
+ /* @__PURE__ */ (0, H.jsx)(Tk, { name: a ?? "" }),
/* @__PURE__ */ (0, H.jsx)("b", { children: r })
]
}), /* @__PURE__ */ (0, H.jsxs)("span", {
@@ -76034,7 +76266,7 @@ function JWe({ host: e }) {
title: "上移",
disabled: o === 0,
onClick: () => y(e, -1),
- children: /* @__PURE__ */ (0, H.jsx)(Jk, { name: "chevron-up" })
+ children: /* @__PURE__ */ (0, H.jsx)(Tk, { name: "chevron-up" })
}),
/* @__PURE__ */ (0, H.jsx)("button", {
type: "button",
@@ -76044,7 +76276,7 @@ function JWe({ host: e }) {
title: "下移",
disabled: o === i.length - 1,
onClick: () => y(e, 1),
- children: /* @__PURE__ */ (0, H.jsx)(Jk, { name: "chevron-down" })
+ children: /* @__PURE__ */ (0, H.jsx)(Tk, { name: "chevron-down" })
}),
/* @__PURE__ */ (0, H.jsx)("button", {
type: "button",
@@ -76056,11 +76288,11 @@ function JWe({ host: e }) {
onClick: () => {
n.length > 1 && t(n.filter((t) => t !== e));
},
- children: /* @__PURE__ */ (0, H.jsx)(Jk, { name: "eye-off" })
+ children: /* @__PURE__ */ (0, H.jsx)(Tk, { name: "eye-off" })
})
]
})]
- }, X5(e))), /* @__PURE__ */ (0, H.jsxs)("div", {
+ }, Y5(e))), /* @__PURE__ */ (0, H.jsxs)("div", {
"data-sidebar-add-row": "",
children: [/* @__PURE__ */ (0, H.jsxs)("div", {
"data-sidebar-add-picker": "",
@@ -76076,13 +76308,13 @@ function JWe({ host: e }) {
ref: h,
onClick: S,
children: b ? /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [
- /* @__PURE__ */ (0, H.jsx)(Jk, { name: b[2] ?? "" }),
+ /* @__PURE__ */ (0, H.jsx)(Tk, { name: b[2] ?? "" }),
/* @__PURE__ */ (0, H.jsx)("span", {
"data-sidebar-add-label": "",
children: b[1]
}),
- /* @__PURE__ */ (0, H.jsx)(Jk, { name: "chevron-down" })
- ] }) : /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(Jk, { name: "check" }), /* @__PURE__ */ (0, H.jsx)("span", { children: "全部页面都已显示" })] })
+ /* @__PURE__ */ (0, H.jsx)(Tk, { name: "chevron-down" })
+ ] }) : /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)(Tk, { name: "check" }), /* @__PURE__ */ (0, H.jsx)("span", { children: "全部页面都已显示" })] })
}), o.length ? /* @__PURE__ */ (0, H.jsx)("div", {
className: "popmenu",
"data-sidebar-add-menu": "",
@@ -76093,15 +76325,15 @@ function JWe({ host: e }) {
children: o.map(([e, t, n]) => /* @__PURE__ */ (0, H.jsxs)("button", {
type: "button",
role: "option",
- "data-sidebar-add-option": X5(e),
+ "data-sidebar-add-option": Y5(e),
"aria-selected": b?.[0] === e,
tabIndex: b?.[0] === e ? 0 : -1,
onKeyDown: C,
onClick: () => {
- c(X5(e)), x(), h.current?.focus();
+ c(Y5(e)), x(), h.current?.focus();
},
- children: [/* @__PURE__ */ (0, H.jsx)(Jk, { name: n ?? "" }), /* @__PURE__ */ (0, H.jsx)("span", { children: t })]
- }, X5(e)))
+ children: [/* @__PURE__ */ (0, H.jsx)(Tk, { name: n ?? "" }), /* @__PURE__ */ (0, H.jsx)("span", { children: t })]
+ }, Y5(e)))
}) : null]
}), /* @__PURE__ */ (0, H.jsx)("button", {
type: "button",
@@ -76118,7 +76350,7 @@ function JWe({ host: e }) {
}
//#endregion
//#region src/react/settings-panel/settings-panel.tsx
-var Z5 = [
+var X5 = [
["界面", "ri-palette-line"],
["浏览", "ri-layout-grid-line"],
["播放", "ri-play-circle-line"],
@@ -76126,7 +76358,7 @@ var Z5 = [
["关注", "ri-rss-line"],
["安全", "ri-shield-check-line"],
["这台电脑", "ri-macbook-line"]
-], YWe = [
+], eGe = [
["seed", "随机"],
["rating", "评分"],
["o", "高潮计数"],
@@ -76135,16 +76367,16 @@ var Z5 = [
["size", "体积"],
["new", "入库时间"],
["played", "观看时间"]
-], XWe = [["desc", "降序"], ["asc", "升序"]], ZWe = [
+], tGe = [["desc", "降序"], ["asc", "升序"]], nGe = [
["off", "关闭"],
["precise", "精准"],
["coarse", "粗略"]
-], QWe = [
+], rGe = [
["7", "每周"],
["30", "每月"],
["90", "每季"],
["0", "从不"]
-], $We = [[
+], iGe = [[
"cover",
"官方封面",
""
@@ -76152,7 +76384,7 @@ var Z5 = [
"thumbnail",
"预览图",
""
-]], eGe = [
+]], aGe = [
[
"feedHideGroupSetting",
"feedHideGroupCompilations",
@@ -76177,91 +76409,91 @@ var Z5 = [
"feedHideExcerptDescription",
"把出过的正片剪成十几分钟单卖的,比如ハイライト厂牌。"
]
-], tGe = "button:not([disabled]),input:not([disabled]),textarea:not([disabled]),a[href]", Q5 = null, $5 = null, e7 = null, t7 = {
+], oGe = "button:not([disabled]),input:not([disabled]),textarea:not([disabled]),a[href]", Z5 = null, Q5 = null, $5 = null, e7 = {
open: !1,
closing: !1,
epoch: 0,
tab: 0,
machine: "none"
-}, n7 = 0, r7 = null;
-function nGe() {
- return (!$5 || !e7?.isConnected) && ($5?.unmount(), e7 = document.createElement("div"), e7.dataset.settingsHost = "", document.body.append(e7), $5 = (0, Ot.createRoot)(e7)), $5;
+}, t7 = 0, n7 = null;
+function sGe() {
+ return (!Q5 || !$5?.isConnected) && (Q5?.unmount(), $5 = document.createElement("div"), $5.dataset.settingsHost = "", document.body.append($5), Q5 = (0, Ot.createRoot)($5)), Q5;
}
-function i7() {
- let e = Q5;
- e && (0, Dt.flushSync)(() => nGe().render(/* @__PURE__ */ (0, H.jsx)(qE, { children: /* @__PURE__ */ (0, H.jsx)(lGe, {
+function r7() {
+ let e = Z5;
+ e && (0, Dt.flushSync)(() => sGe().render(/* @__PURE__ */ (0, H.jsx)(GE, { children: /* @__PURE__ */ (0, H.jsx)(mGe, {
host: e,
- view: t7
+ view: e7
}) })));
}
-function a7(e) {
- t7 = {
- ...t7,
+function i7(e) {
+ e7 = {
+ ...e7,
...e
- }, i7();
+ }, r7();
}
-async function rGe(e) {
- if (t7.machine === "summary") return;
+async function cGe(e) {
+ if (e7.machine === "summary") return;
let t = await e.configurable();
- if (t7.open) {
+ if (e7.open) {
if (!t) {
- a7({ machine: "note" });
+ i7({ machine: "note" });
return;
}
try {
- await RL(new AbortController().signal);
+ await IL(new AbortController().signal);
} catch {}
- t7.open && a7({ machine: "summary" });
+ e7.open && i7({ machine: "summary" });
}
}
-function iGe(e = "") {
- let t = Q5;
+function lGe(e = "") {
+ let t = Z5;
if (!t) return;
- n(), n7 += 1, r7 ||= document.activeElement, t.sound("whoosh"), document.documentElement.style.overflow = "hidden", document.body.classList.add("settings-open");
- let r = Z5.findIndex(([t]) => t === e), i = xde();
- a7({
+ n(), t7 += 1, n7 ||= document.activeElement, t.sound("whoosh"), document.documentElement.style.overflow = "hidden", document.body.classList.add("settings-open");
+ let r = X5.findIndex(([t]) => t === e), i = Kde();
+ i7({
open: !0,
closing: !1,
- epoch: t7.epoch + 1,
- tab: r >= 0 ? r : t7.tab
+ epoch: e7.epoch + 1,
+ tab: r >= 0 ? r : e7.tab
}), i.then((e) => {
e && t.syncRemote(e);
- }), rGe(t), queueMicrotask(() => document.getElementById("settingsClose")?.focus());
+ }), cGe(t), queueMicrotask(() => document.getElementById("settingsClose")?.focus());
}
-function o7() {
- if (!t7.open || t7.closing) return;
- let e = ++n7;
- a7({ closing: !0 });
+function a7() {
+ if (!e7.open || e7.closing) return;
+ let e = ++t7;
+ i7({ closing: !0 });
let t = () => {
- e !== n7 || !t7.closing || (a7({
+ e !== t7 || !e7.closing || (i7({
open: !1,
closing: !1
- }), document.documentElement.style.overflow = "", document.body.classList.remove("settings-open"), r7 instanceof HTMLElement && document.contains(r7) && r7.focus(), r7 = null);
+ }), document.documentElement.style.overflow = "", document.body.classList.remove("settings-open"), n7 instanceof HTMLElement && document.contains(n7) && n7.focus(), n7 = null);
};
if (matchMedia("(prefers-reduced-motion: reduce)").matches) {
queueMicrotask(t);
return;
}
- e7?.querySelector("[data-settings-card]")?.addEventListener("animationend", t, { once: !0 }), setTimeout(t, 380);
+ $5?.querySelector("[data-settings-card]")?.addEventListener("animationend", t, { once: !0 }), setTimeout(t, 380);
}
-var aGe = {
- open: iGe,
- close: o7,
- isOpen: () => t7.open,
+var uGe = {
+ open: lGe,
+ close: a7,
+ isOpen: () => e7.open,
reveal: (e) => queueMicrotask(() => document.querySelector(e)?.scrollIntoView({ block: "nearest" }))
};
-function oGe(e) {
- return Q5 = e, i7(), aGe;
+function dGe(e) {
+ return Z5 = e, r7(), uGe;
}
-function sGe(e) {
+function fGe(e) {
if (e.key !== "Tab") return;
- let t = [...e.currentTarget.querySelectorAll(tGe)].filter((e) => e.getClientRects().length > 0);
+ let t = [...e.currentTarget.querySelectorAll(oGe)].filter((e) => e.getClientRects().length > 0);
if (!t.length) return;
let n = t[0], r = t[t.length - 1];
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus());
}
-var s7 = (e) => `settings-tab-${e}`, c7 = (e) => e === Z5.length - 1 ? "machineGroup" : `settings-group-${e}`;
-function cGe({ tab: e, epoch: t, onSelect: n }) {
+var o7 = (e) => `settings-tab-${e}`, s7 = (e) => e === X5.length - 1 ? "machineGroup" : `settings-group-${e}`;
+function pGe({ tab: e, epoch: t, onSelect: n }) {
let r = (0, B.useRef)(null), i = (0, B.useRef)(null), a = (0, B.useRef)(null), o = (0, B.useRef)(e), s = (0, B.useRef)([]), c = (e, t) => {
let n = i.current;
if (!n) return;
@@ -76289,7 +76521,7 @@ function cGe({ tab: e, epoch: t, onSelect: n }) {
o.current = e, l.current(s.current[e], t);
}, [e, t]);
let u = (e, t) => {
- let r = Z5.length, i = t;
+ let r = X5.length, i = t;
if (e.key === "ArrowRight" || e.key === "ArrowDown") i = (t + 1) % r;
else if (e.key === "ArrowLeft" || e.key === "ArrowUp") i = (t + r - 1) % r;
else if (e.key === "Home") i = 0;
@@ -76318,11 +76550,11 @@ function cGe({ tab: e, epoch: t, onSelect: n }) {
role: "presentation",
children: "设置"
}),
- Z5.map(([t, r], i) => /* @__PURE__ */ (0, H.jsxs)("button", {
+ X5.map(([t, r], i) => /* @__PURE__ */ (0, H.jsxs)("button", {
type: "button",
role: "tab",
- id: s7(i),
- "aria-controls": c7(i),
+ id: o7(i),
+ "aria-controls": s7(i),
"aria-selected": i === e,
tabIndex: i === e ? 0 : -1,
ref: (e) => {
@@ -76333,22 +76565,22 @@ function cGe({ tab: e, epoch: t, onSelect: n }) {
onPointerEnter: (e) => {
e.pointerType !== "touch" && c(e.currentTarget, !0);
},
- children: [/* @__PURE__ */ (0, H.jsx)(Yk, { name: r }), t]
+ children: [/* @__PURE__ */ (0, H.jsx)(iue, { name: r }), t]
}, t))
]
});
}
-function l7({ index: e, tab: t, children: n }) {
+function c7({ index: e, tab: t, children: n }) {
return /* @__PURE__ */ (0, H.jsxs)("section", {
"data-setting-group": "",
- id: c7(e),
+ id: s7(e),
role: "tabpanel",
- "aria-labelledby": s7(e),
+ "aria-labelledby": o7(e),
hidden: e !== t,
- children: [/* @__PURE__ */ (0, H.jsx)("h3", { children: Z5[e][0] }), n]
+ children: [/* @__PURE__ */ (0, H.jsx)("h3", { children: X5[e][0] }), n]
});
}
-function u7({ id: e, title: t, description: n, describedBy: r = `${e.replace(/Setting$/, "")}Description`, checked: i, onToggle: a }) {
+function l7({ id: e, title: t, description: n, describedBy: r = `${e.replace(/Setting$/, "")}Description`, checked: i, onToggle: a }) {
return /* @__PURE__ */ (0, H.jsxs)("label", {
"data-setting-row": "",
children: [/* @__PURE__ */ (0, H.jsxs)("span", { children: [/* @__PURE__ */ (0, H.jsx)("b", { children: t }), /* @__PURE__ */ (0, H.jsx)("small", {
@@ -76365,7 +76597,7 @@ function u7({ id: e, title: t, description: n, describedBy: r = `${e.replace(/Se
})]
});
}
-function d7({ title: e, description: t, kind: n, children: r }) {
+function u7({ title: e, description: t, kind: n, children: r }) {
return /* @__PURE__ */ (0, H.jsxs)("div", {
"data-setting-row": "",
"data-setting-sort": n === "sort" ? "" : void 0,
@@ -76373,11 +76605,11 @@ function d7({ title: e, description: t, kind: n, children: r }) {
children: [/* @__PURE__ */ (0, H.jsxs)("span", { children: [/* @__PURE__ */ (0, H.jsx)("b", { children: e }), typeof t == "string" ? /* @__PURE__ */ (0, H.jsx)("small", { children: t }) : t] }), r]
});
}
-var f7 = ({ html: e, ...t }) => /* @__PURE__ */ (0, H.jsx)("small", {
+var d7 = ({ html: e, ...t }) => /* @__PURE__ */ (0, H.jsx)("small", {
...t,
dangerouslySetInnerHTML: { __html: e }
-}), p7 = () => `${w("保存中")}<span>正在保存…</span>`, m7 = (e, t) => e instanceof Error && e.message || t;
-function lGe({ host: e, view: n }) {
+}), f7 = () => `${w("保存中")}<span>正在保存…</span>`, p7 = (e, t) => e instanceof Error && e.message || t;
+function mGe({ host: e, view: n }) {
(0, B.useSyncExternalStore)(e.store.subscribe, e.store.version);
let r = e.store.value, i = (0, B.useRef)(null), a = (0, B.useRef)(null), o = (0, B.useRef)(null), s = (0, B.useRef)(null), c = (0, B.useRef)(null), l = (0, B.useRef)(n.tab), u = () => {
let [e, t] = [a.current, s.current];
@@ -76398,7 +76630,7 @@ function lGe({ host: e, view: n }) {
c.current?.();
});
let f = n.epoch, p = (e) => {
- e !== t7.tab && a7({ tab: e });
+ e !== e7.tab && i7({ tab: e });
}, m = () => e.store.save();
return /* @__PURE__ */ (0, H.jsx)("section", {
"data-settings-panel": "",
@@ -76409,9 +76641,9 @@ function lGe({ host: e, view: n }) {
"aria-labelledby": "settingsTitle",
"data-closing": n.closing ? "" : void 0,
ref: i,
- onKeyDown: sGe,
+ onKeyDown: fGe,
onClick: (e) => {
- e.target === e.currentTarget && o7();
+ e.target === e.currentTarget && a7();
},
children: /* @__PURE__ */ (0, H.jsxs)("div", {
"data-settings-card": "",
@@ -76422,19 +76654,19 @@ function lGe({ host: e, view: n }) {
ref: o,
children: [/* @__PURE__ */ (0, H.jsx)("h2", {
id: "settingsTitle",
- children: Z5[n.tab][0]
+ children: X5[n.tab][0]
}), /* @__PURE__ */ (0, H.jsx)("button", {
type: "button",
id: "settingsClose",
"aria-label": "关闭设置",
- onClick: o7,
+ onClick: a7,
children: /* @__PURE__ */ (0, H.jsx)("svg", {
viewBox: "0 0 24 24",
children: /* @__PURE__ */ (0, H.jsx)("use", { href: "#i-x" })
})
})]
}),
- /* @__PURE__ */ (0, H.jsx)(cGe, {
+ /* @__PURE__ */ (0, H.jsx)(pGe, {
tab: n.tab,
epoch: f,
onSelect: p
@@ -76443,14 +76675,14 @@ function lGe({ host: e, view: n }) {
"data-settings-scroll": "",
ref: s,
children: [
- /* @__PURE__ */ (0, H.jsxs)(l7, {
+ /* @__PURE__ */ (0, H.jsxs)(c7, {
index: 0,
tab: n.tab,
children: [
- /* @__PURE__ */ (0, H.jsx)(d7, {
+ /* @__PURE__ */ (0, H.jsx)(u7, {
title: "主题",
description: "跟随系统,或固定用浅色、深色。",
- children: /* @__PURE__ */ (0, H.jsx)(W5, {
+ children: /* @__PURE__ */ (0, H.jsx)(U5, {
id: "themeSetting",
name: "theme",
legend: "主题",
@@ -76478,7 +76710,7 @@ function lGe({ host: e, view: n }) {
onChange: (t) => e.setHighContrast(t.target.checked)
})]
}),
- /* @__PURE__ */ (0, H.jsx)(u7, {
+ /* @__PURE__ */ (0, H.jsx)(l7, {
id: "uiSoundsSetting",
title: "界面音效",
checked: r.uiSounds,
@@ -76487,7 +76719,7 @@ function lGe({ host: e, view: n }) {
r.uiSounds = t, m(), e.changed("uiSounds");
}
}),
- /* @__PURE__ */ (0, H.jsx)(u7, {
+ /* @__PURE__ */ (0, H.jsx)(l7, {
id: "homeGlowSetting",
title: "侧栏光晕",
checked: r.homeGlow.on,
@@ -76496,44 +76728,44 @@ function lGe({ host: e, view: n }) {
r.homeGlow.on = t, m(), e.changed("glow");
}
}),
- /* @__PURE__ */ (0, H.jsx)(GWe, { host: e }),
+ /* @__PURE__ */ (0, H.jsx)(XWe, { host: e }),
/* @__PURE__ */ (0, H.jsxs)("section", {
"data-sidebar-setting": "",
"aria-labelledby": "sidebarOrderTitle",
children: [/* @__PURE__ */ (0, H.jsxs)("span", { children: [/* @__PURE__ */ (0, H.jsx)("b", {
id: "sidebarOrderTitle",
children: "左侧导航"
- }), /* @__PURE__ */ (0, H.jsx)("small", { children: "直接拖动排序;可隐藏入口,也可从具体页面列表重新添加。窄栏和筛选抽屉会保持一致。" })] }), /* @__PURE__ */ (0, H.jsx)(JWe, { host: e })]
+ }), /* @__PURE__ */ (0, H.jsx)("small", { children: "直接拖动排序;可隐藏入口,也可从具体页面列表重新添加。窄栏和筛选抽屉会保持一致。" })] }), /* @__PURE__ */ (0, H.jsx)($We, { host: e })]
})
]
}),
- /* @__PURE__ */ (0, H.jsx)(dGe, {
+ /* @__PURE__ */ (0, H.jsx)(gGe, {
host: e,
tab: n.tab,
epoch: f
}),
- /* @__PURE__ */ (0, H.jsx)(pGe, {
+ /* @__PURE__ */ (0, H.jsx)(vGe, {
host: e,
tab: n.tab,
epoch: f
}),
- /* @__PURE__ */ (0, H.jsx)(l7, {
+ /* @__PURE__ */ (0, H.jsx)(c7, {
index: 3,
tab: n.tab,
- children: /* @__PURE__ */ (0, H.jsx)(hGe, {
+ children: /* @__PURE__ */ (0, H.jsx)(bGe, {
host: e,
epoch: f
})
}),
- /* @__PURE__ */ (0, H.jsx)(gGe, {
+ /* @__PURE__ */ (0, H.jsx)(xGe, {
host: e,
tab: n.tab,
epoch: f
}),
- /* @__PURE__ */ (0, H.jsx)(l7, {
+ /* @__PURE__ */ (0, H.jsx)(c7, {
index: 5,
tab: n.tab,
- children: /* @__PURE__ */ (0, H.jsx)(u7, {
+ children: /* @__PURE__ */ (0, H.jsx)(l7, {
id: "censorSetting",
title: "SFW 模式",
describedBy: "sfwDescription",
@@ -76542,10 +76774,10 @@ function lGe({ host: e, view: n }) {
onToggle: (t) => e.setCensored(t)
})
}),
- /* @__PURE__ */ (0, H.jsx)(l7, {
+ /* @__PURE__ */ (0, H.jsx)(c7, {
index: 6,
tab: n.tab,
- children: /* @__PURE__ */ (0, H.jsx)(vGe, {
+ children: /* @__PURE__ */ (0, H.jsx)(CGe, {
host: e,
machine: n.machine
})
@@ -76556,7 +76788,7 @@ function lGe({ host: e, view: n }) {
})
});
}
-function uGe(e, t) {
+function hGe(e, t) {
let n = e.querySelector("[data-select-label]");
if (!n) return;
n.querySelector("[data-icon-swap]") || (n.innerHTML = l("arrow-up", "arrow-down", "a", {
@@ -76566,18 +76798,18 @@ function uGe(e, t) {
let r = n.querySelector("[data-sort-direction-label]");
r && (r.textContent = t ? "升序" : "降序");
}
-function dGe({ host: e, tab: t, epoch: n }) {
+function gGe({ host: e, tab: t, epoch: n }) {
let r = e.store.value, i = () => e.store.save(), a = r.defaultSort === "seed", o = r.defaultSortDirection === "asc";
- return /* @__PURE__ */ (0, H.jsxs)(l7, {
+ return /* @__PURE__ */ (0, H.jsxs)(c7, {
index: 1,
tab: t,
children: [
- /* @__PURE__ */ (0, H.jsx)(d7, {
+ /* @__PURE__ */ (0, H.jsx)(u7, {
title: "每批作品",
description: "首页每次加载的作品数量。",
children: /* @__PURE__ */ (0, H.jsx)("div", {
id: "batchSizeSetting",
- children: /* @__PURE__ */ (0, H.jsx)(q5, {
+ children: /* @__PURE__ */ (0, H.jsx)(K5, {
id: "batchSizeSetting",
label: "每批作品",
value: r.batchSize,
@@ -76587,7 +76819,7 @@ function dGe({ host: e, tab: t, epoch: n }) {
}, n)
})
}),
- /* @__PURE__ */ (0, H.jsx)(d7, {
+ /* @__PURE__ */ (0, H.jsx)(u7, {
title: "默认排序",
kind: "sort",
description: /* @__PURE__ */ (0, H.jsx)("small", {
@@ -76596,19 +76828,19 @@ function dGe({ host: e, tab: t, epoch: n }) {
}),
children: /* @__PURE__ */ (0, H.jsxs)("div", {
"data-setting-sort-controls": "",
- children: [/* @__PURE__ */ (0, H.jsx)(G5, {
+ children: [/* @__PURE__ */ (0, H.jsx)(W5, {
id: "defaultSortSetting",
label: "默认排序",
- options: YWe,
+ options: eGe,
value: r.defaultSort,
epoch: n,
onPick: (t) => {
r.defaultSort = t, i(), e.changed("defaultSort");
}
- }), /* @__PURE__ */ (0, H.jsx)(G5, {
+ }), /* @__PURE__ */ (0, H.jsx)(W5, {
id: "defaultSortDirectionSetting",
label: "默认排序方向",
- options: XWe,
+ options: tGe,
value: o ? "asc" : "desc",
hidden: a,
disabled: a,
@@ -76617,7 +76849,7 @@ function dGe({ host: e, tab: t, epoch: n }) {
onPick: (t) => {
r.defaultSortDirection = t, i(), e.changed("sortDirection");
},
- decorate: (e) => uGe(e, o)
+ decorate: (e) => hGe(e, o)
})]
})
}),
@@ -76634,29 +76866,29 @@ function dGe({ host: e, tab: t, epoch: n }) {
}
})]
}),
- /* @__PURE__ */ (0, H.jsx)(d7, {
+ /* @__PURE__ */ (0, H.jsx)(u7, {
title: "JAV 默认封面",
description: "首页、接着看和 Mix 等位置共用;缺图时使用另一种封面。",
- children: /* @__PURE__ */ (0, H.jsx)(W5, {
+ children: /* @__PURE__ */ (0, H.jsx)(U5, {
id: "javImageSetting",
name: "jav-image",
legend: "JAV 默认封面",
- options: $We,
+ options: iGe,
value: r.javImage,
attr: "data-jav-image-choice",
variant: "javimageswitch",
text: !0,
epoch: n,
onChoose: (t) => {
- r.javImage = ZD(t), i(), e.changed("javImage");
+ r.javImage = YD(t), i(), e.changed("javImage");
}
})
}),
- /* @__PURE__ */ (0, H.jsx)(d7, {
+ /* @__PURE__ */ (0, H.jsx)(u7, {
title: "视频封面默认大小",
kind: "related",
description: "首页和 JAV 等视频列表共用;小图展示完整封套,大图展示完整正封。",
- children: /* @__PURE__ */ (0, H.jsx)(W5, {
+ children: /* @__PURE__ */ (0, H.jsx)(U5, {
id: "javSizeSetting",
name: "video-size",
legend: "视频封面默认大小",
@@ -76669,7 +76901,7 @@ function dGe({ host: e, tab: t, epoch: n }) {
onChoose: (t) => e.setVideoLayout(t)
})
}),
- /* @__PURE__ */ (0, H.jsx)(u7, {
+ /* @__PURE__ */ (0, H.jsx)(l7, {
id: "feedAutoScrollSetting",
title: "新作自动滚动",
checked: r.feedAutoScroll,
@@ -76678,7 +76910,7 @@ function dGe({ host: e, tab: t, epoch: n }) {
r.feedAutoScroll = t, i(), e.changed("feedAutoScroll");
}
}),
- eGe.map(([t, n, r, i, a, o]) => /* @__PURE__ */ (0, H.jsx)(fGe, {
+ aGe.map(([t, n, r, i, a, o]) => /* @__PURE__ */ (0, H.jsx)(_Ge, {
host: e,
id: t,
settingKey: n,
@@ -76690,8 +76922,8 @@ function dGe({ host: e, tab: t, epoch: n }) {
]
});
}
-function fGe({ host: e, id: t, settingKey: n, label: r, title: i, describedBy: a, description: o }) {
- let s = Qj(), [c, l] = (0, B.useState)(null), u = (0, B.useRef)(null), d = e.store.value, f = (t) => {
+function _Ge({ host: e, id: t, settingKey: n, label: r, title: i, describedBy: a, description: o }) {
+ let s = Oj(), [c, l] = (0, B.useState)(null), u = (0, B.useRef)(null), d = e.store.value, f = (t) => {
l(t), x(u.current), s.mutate({ [n]: t }, {
onSuccess: (i) => {
d[n] = i[n] === !0, e.store.save(), e.changed("feedCompilations"), e.receipt(t ? `新作已收起${r}` : `新作已列出${r}`);
@@ -76719,28 +76951,28 @@ function fGe({ host: e, id: t, settingKey: n, label: r, title: i, describedBy: a
})]
});
}
-function pGe({ host: e, tab: t, epoch: n }) {
+function vGe({ host: e, tab: t, epoch: n }) {
let r = e.store.value, i = () => e.store.save();
- return /* @__PURE__ */ (0, H.jsxs)(l7, {
+ return /* @__PURE__ */ (0, H.jsxs)(c7, {
index: 2,
tab: t,
children: [
- /* @__PURE__ */ (0, H.jsx)(d7, {
+ /* @__PURE__ */ (0, H.jsx)(u7, {
title: "悬停放大",
description: "转圈完成后进入放大预览。",
children: /* @__PURE__ */ (0, H.jsx)("div", {
id: "hoverDelaySetting",
- children: /* @__PURE__ */ (0, H.jsx)(q5, {
+ children: /* @__PURE__ */ (0, H.jsx)(K5, {
id: "hoverDelaySetting",
label: "悬停放大",
value: r.hoverDelaySeconds,
onApply: (t) => {
- r.hoverDelaySeconds = H5(t, 0, 60, 5), i(), e.changed("hoverDelay");
+ r.hoverDelaySeconds = V5(t, 0, 60, 5), i(), e.changed("hoverDelay");
}
}, n)
})
}),
- /* @__PURE__ */ (0, H.jsx)(u7, {
+ /* @__PURE__ */ (0, H.jsx)(l7, {
id: "detailAutoplaySetting",
title: "打开详情自动播放",
checked: r.detailAutoplay,
@@ -76749,7 +76981,7 @@ function pGe({ host: e, tab: t, epoch: n }) {
r.detailAutoplay = e, i();
}
}),
- /* @__PURE__ */ (0, H.jsx)(u7, {
+ /* @__PURE__ */ (0, H.jsx)(l7, {
id: "miniplayerSetting",
title: "小窗播放",
checked: r.miniplayer,
@@ -76758,12 +76990,12 @@ function pGe({ host: e, tab: t, epoch: n }) {
r.miniplayer = t, i(), e.changed("miniplayer");
}
}),
- /* @__PURE__ */ (0, H.jsx)(d7, {
+ /* @__PURE__ */ (0, H.jsx)(u7, {
title: "快进 / 快退",
description: "卡片预览和详情播放器共用。",
children: /* @__PURE__ */ (0, H.jsx)("div", {
id: "seekSecondsSetting",
- children: /* @__PURE__ */ (0, H.jsx)(q5, {
+ children: /* @__PURE__ */ (0, H.jsx)(K5, {
id: "seekSecondsSetting",
label: "快进 / 快退",
value: r.seekSeconds,
@@ -76773,13 +77005,13 @@ function pGe({ host: e, tab: t, epoch: n }) {
}, n)
})
}),
- /* @__PURE__ */ (0, H.jsx)(mGe, { epoch: n }),
- /* @__PURE__ */ (0, H.jsx)(d7, {
+ /* @__PURE__ */ (0, H.jsx)(yGe, { epoch: n }),
+ /* @__PURE__ */ (0, H.jsx)(u7, {
title: "相关推荐",
description: "详情下方一次显示的相似作品数量。",
children: /* @__PURE__ */ (0, H.jsx)("div", {
id: "relatedLimitSetting",
- children: /* @__PURE__ */ (0, H.jsx)(q5, {
+ children: /* @__PURE__ */ (0, H.jsx)(K5, {
id: "relatedLimitSetting",
label: "相关推荐",
value: r.relatedLimit,
@@ -76792,26 +77024,26 @@ function pGe({ host: e, tab: t, epoch: n }) {
]
});
}
-function mGe({ epoch: e }) {
- let t = xw({
- queryKey: Yj,
- queryFn: ({ signal: e }) => Zj(e)
- }), n = Cde(), r = n.reset;
+function yGe({ epoch: e }) {
+ let t = yw({
+ queryKey: Tj,
+ queryFn: ({ signal: e }) => Dj(e)
+ }), n = Jde(), r = n.reset;
(0, B.useEffect)(() => {
r();
}, [e, r]);
- let i = t.data?.mode || "off", a = n.isPending ? p7() : t.isFetching ? f("正在读取状态") : n.isError ? h7(m7(n.error, "保存失败")) : t.isError ? h7(`状态未取得:${m7(t.error, String(t.error))}`) : t.data ? h7(Tde(t.data)) : "读取运行状态…";
- return /* @__PURE__ */ (0, H.jsx)(d7, {
+ let i = t.data?.mode || "off", a = n.isPending ? f7() : t.isFetching ? f("正在读取状态") : n.isError ? m7(p7(n.error, "保存失败")) : t.isError ? m7(`状态未取得:${p7(t.error, String(t.error))}`) : t.data ? m7(Xde(t.data)) : "读取运行状态…";
+ return /* @__PURE__ */ (0, H.jsx)(u7, {
title: "视频缩略图采集",
- description: /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)("small", { children: "拖动进度条时按时间点看画面。精准每 10 秒一张,粗略每 30 秒一张;两小时的片子约 720 / 240 张,占 20–100 / 7–35 MB。只采集本机磁盘上的片子,网盘上的每张都要回源拉一次。" }), /* @__PURE__ */ (0, H.jsx)(f7, {
+ description: /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)("small", { children: "拖动进度条时按时间点看画面。精准每 10 秒一张,粗略每 30 秒一张;两小时的片子约 720 / 240 张,占 20–100 / 7–35 MB。只采集本机磁盘上的片子,网盘上的每张都要回源拉一次。" }), /* @__PURE__ */ (0, H.jsx)(d7, {
id: "videoThumbnailState",
"aria-live": "polite",
html: a
})] }),
- children: /* @__PURE__ */ (0, H.jsx)(G5, {
+ children: /* @__PURE__ */ (0, H.jsx)(W5, {
id: "videoThumbnailSetting",
label: "视频缩略图采集",
- options: ZWe,
+ options: nGe,
value: n.isPending || n.isError ? n.variables ?? i : i,
disabled: n.isPending || t.isFetching,
epoch: e,
@@ -76819,26 +77051,26 @@ function mGe({ epoch: e }) {
})
});
}
-function hGe({ host: e, epoch: t }) {
- let n = e.store.value, r = Qj();
- return /* @__PURE__ */ (0, H.jsx)(d7, {
+function bGe({ host: e, epoch: t }) {
+ let n = e.store.value, r = Oj();
+ return /* @__PURE__ */ (0, H.jsx)(u7, {
title: "搜索记录",
description: "保存在 Peach 账本,所有访问端同步。",
children: /* @__PURE__ */ (0, H.jsx)("div", {
id: "searchHistoryLimitSetting",
- children: /* @__PURE__ */ (0, H.jsx)(q5, {
+ children: /* @__PURE__ */ (0, H.jsx)(K5, {
id: "searchHistoryLimitSetting",
label: "搜索记录",
value: n.searchHistoryLimit,
onApply: (t) => {
- n.searchHistoryLimit = H5(t, 0, 50, 10), e.store.save(), e.changed("searchHistoryLimit"), r.mutate({ searchHistoryLimit: n.searchHistoryLimit }, { onError: () => {} });
+ n.searchHistoryLimit = V5(t, 0, 50, 10), e.store.save(), e.changed("searchHistoryLimit"), r.mutate({ searchHistoryLimit: n.searchHistoryLimit }, { onError: () => {} });
}
}, t)
})
});
}
-function gGe({ host: e, tab: t, epoch: n }) {
- let r = e.store.value, i = Qj(), a = Qj(), [o, s] = (0, B.useState)("");
+function xGe({ host: e, tab: t, epoch: n }) {
+ let r = e.store.value, i = Oj(), a = Oj(), [o, s] = (0, B.useState)("");
(0, B.useEffect)(() => {
s("");
}, [n]);
@@ -76848,22 +77080,22 @@ function gGe({ host: e, tab: t, epoch: n }) {
typeof t.followInitialDays == "number" && (r.followInitialDays = t.followInitialDays), e.store.save(), s("已保存,适用于尚未开始采集的来源。"), e.receipt("已保存首次采集历史范围");
},
onError: (t) => {
- s(m7(t, "")), e.failure("保存首次采集历史范围", t);
+ s(p7(t, "")), e.failure("保存首次采集历史范围", t);
}
}));
};
- return /* @__PURE__ */ (0, H.jsxs)(l7, {
+ return /* @__PURE__ */ (0, H.jsxs)(c7, {
index: 4,
tab: t,
children: [
- /* @__PURE__ */ (0, H.jsx)(d7, {
+ /* @__PURE__ */ (0, H.jsx)(u7, {
title: "首次采集历史范围",
description: /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)("small", { children: "按发布时间限制新来源首次导入的内容;范围内不足 30 条时补到 30 条。没有日期的条目仍会导入;已有内容不受影响,支持历史分页的来源可手动加载更早。" }), /* @__PURE__ */ (0, H.jsx)("small", {
id: "followInitialDaysState",
"aria-live": "polite",
children: o
})] }),
- children: /* @__PURE__ */ (0, H.jsx)(G5, {
+ children: /* @__PURE__ */ (0, H.jsx)(W5, {
id: "followInitialDaysSetting",
label: "首次采集历史范围",
options: e.followInitialRanges,
@@ -76873,14 +77105,14 @@ function gGe({ host: e, tab: t, epoch: n }) {
onPick: (e) => c(Number(e))
})
}),
- /* @__PURE__ */ (0, H.jsx)(_Ge, { epoch: n }),
- /* @__PURE__ */ (0, H.jsx)(d7, {
+ /* @__PURE__ */ (0, H.jsx)(SGe, { epoch: n }),
+ /* @__PURE__ */ (0, H.jsx)(u7, {
title: "头像与站点图标刷新",
description: "创作者头像、来源图标和外链圆标保存在本机,到期后下次显示时重新取一次;视频与图片不保存。",
- children: /* @__PURE__ */ (0, H.jsx)(G5, {
+ children: /* @__PURE__ */ (0, H.jsx)(W5, {
id: "metadataRefreshSetting",
label: "头像与站点图标刷新",
- options: QWe,
+ options: rGe,
value: String(r.metadataRefreshDays),
epoch: n,
onPick: (t) => {
@@ -76892,25 +77124,25 @@ function gGe({ host: e, tab: t, epoch: n }) {
]
});
}
-function _Ge({ epoch: e }) {
- let t = xw({
- queryKey: Jj,
- queryFn: ({ signal: e }) => Xj(e)
- }), n = Sde(), r = n.reset;
+function SGe({ epoch: e }) {
+ let t = yw({
+ queryKey: wj,
+ queryFn: ({ signal: e }) => Ej(e)
+ }), n = qde(), r = n.reset;
(0, B.useEffect)(() => {
r();
}, [e, r]);
- let i = t.data, a = n.isPending || t.isFetching || t.isError && !n.isError, o = n.isPending ? p7() : t.isFetching ? f("正在读取状态") : n.isError ? h7(m7(n.error, "保存失败")) : t.isError ? h7(`状态未取得:${m7(t.error, String(t.error))}`) : i ? h7(wde(i)) : "读取运行状态…";
- return /* @__PURE__ */ (0, H.jsx)(d7, {
+ let i = t.data, a = n.isPending || t.isFetching || t.isError && !n.isError, o = n.isPending ? f7() : t.isFetching ? f("正在读取状态") : n.isError ? m7(p7(n.error, "保存失败")) : t.isError ? m7(`状态未取得:${p7(t.error, String(t.error))}`) : i ? m7(Yde(i)) : "读取运行状态…";
+ return /* @__PURE__ */ (0, H.jsx)(u7, {
title: "关注自动更新",
- description: /* @__PURE__ */ (0, H.jsx)(f7, {
+ description: /* @__PURE__ */ (0, H.jsx)(d7, {
id: "followScheduleState",
"aria-live": "polite",
html: o
}),
children: /* @__PURE__ */ (0, H.jsx)("div", {
id: "followScheduleSetting",
- children: /* @__PURE__ */ (0, H.jsx)(q5, {
+ children: /* @__PURE__ */ (0, H.jsx)(K5, {
id: "followScheduleSetting",
label: "关注自动更新",
value: i && !a ? i.enabled ? i.interval_minutes : 0 : null,
@@ -76920,13 +77152,13 @@ function _Ge({ epoch: e }) {
})
});
}
-function vGe({ host: e, machine: t }) {
+function CGe({ host: e, machine: t }) {
return t === "summary" ? /* @__PURE__ */ (0, H.jsx)("div", {
id: "machineSettings",
children: /* @__PURE__ */ (0, H.jsx)("div", {
className: "peach-react",
- children: /* @__PURE__ */ (0, H.jsx)(VWe, { openConfiguration: () => {
- o7(), e.openConfiguration();
+ children: /* @__PURE__ */ (0, H.jsx)(KWe, { openConfiguration: () => {
+ a7(), e.openConfiguration();
} })
})
}, "summary") : t === "note" ? /* @__PURE__ */ (0, H.jsx)("div", {
@@ -76934,55 +77166,55 @@ function vGe({ host: e, machine: t }) {
dangerouslySetInnerHTML: { __html: m("媒体文件夹、端口、代理与更新只能在运行 Peach 服务的那台设备上改:在它的浏览器里打开配置页。", { label: "在服务端设备修改" }) }
}, "note") : /* @__PURE__ */ (0, H.jsx)("div", { id: "machineSettings" }, "none");
}
-function h7(e) {
+function m7(e) {
return e.replace(/[&<>"']/g, (e) => `&#${e.charCodeAt(0)};`);
}
//#endregion
//#region src/react/sidebar/sidebar-island.tsx
-var g7 = "__home__", yGe = {
+var h7 = "__home__", wGe = {
creator: 26,
tag: 30,
tech: 16
-}, _7 = 180, v7 = null, y7 = null, b7 = {
+}, g7 = 180, _7 = null, v7 = null, y7 = {
content: null,
filters: {},
latest: null
-}, x7 = 0;
-function S7() {
- let e = v7;
- if (!e || !y7) return;
- let t = b7, n = x7;
- (0, Dt.flushSync)(() => y7.render(/* @__PURE__ */ (0, H.jsx)(qE, { children: /* @__PURE__ */ (0, H.jsx)(SGe, {
+}, b7 = 0;
+function x7() {
+ let e = _7;
+ if (!e || !v7) return;
+ let t = y7, n = b7;
+ (0, Dt.flushSync)(() => v7.render(/* @__PURE__ */ (0, H.jsx)(GE, { children: /* @__PURE__ */ (0, H.jsx)(EGe, {
host: e,
props: t,
epoch: n
}) })));
}
-var bGe = {
+var S7 = {
render(e) {
- b7 = e, S7();
+ y7 = e, x7();
},
navChanged() {
- x7 += 1, S7();
+ b7 += 1, x7();
}
};
-function xGe(e) {
- return v7 = e, b7 = {
+function TGe(e) {
+ return _7 = e, y7 = {
content: null,
filters: {},
latest: null
- }, e.scroll.replaceChildren(), y7 = (0, Ot.createRoot)(e.scroll), S7(), e.attached(), bGe;
+ }, e.scroll.replaceChildren(), v7 = (0, Ot.createRoot)(e.scroll), x7(), e.attached(), S7;
}
-function SGe({ host: e, props: t, epoch: n }) {
+function EGe({ host: e, props: t, epoch: n }) {
let r = (0, B.useSyncExternalStore)(e.store.subscribe, e.store.version);
return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [
/* @__PURE__ */ (0, H.jsx)("div", { "data-sidebar-head": "" }),
- /* @__PURE__ */ (0, H.jsx)(CGe, {
+ /* @__PURE__ */ (0, H.jsx)(DGe, {
host: e,
epoch: n,
version: r
}),
- t.content ? /* @__PURE__ */ (0, H.jsx)(TGe, {
+ t.content ? /* @__PURE__ */ (0, H.jsx)(kGe, {
host: e,
content: t.content,
filters: t.filters,
@@ -76990,8 +77222,8 @@ function SGe({ host: e, props: t, epoch: n }) {
}) : null
] });
}
-function CGe({ host: e, epoch: t, version: n }) {
- let r = J5(e.store), i = e.store.value.sidebarOrder, a = new Map(e.navCatalog.map((e) => [e[0], e])), o = i.map((e) => a.get(e)).filter((e) => e !== void 0), s = o.map(([t]) => e.navOn(t)), c = (0, B.useRef)(null), l = (0, B.useRef)(null), u = Sr(l, c, "[data-nav][aria-pressed=\"true\"]", `${t}:${n}:${o.map(([e], t) => s[t] ? e || g7 : "").join(",")}`, { axis: "y" }), { sync: d } = u;
+function DGe({ host: e, epoch: t, version: n }) {
+ let r = q5(e.store), i = e.store.value.sidebarOrder, a = new Map(e.navCatalog.map((e) => [e[0], e])), o = i.map((e) => a.get(e)).filter((e) => e !== void 0), s = o.map(([t]) => e.navOn(t)), c = (0, B.useRef)(null), l = (0, B.useRef)(null), u = Sr(l, c, "[data-nav][aria-pressed=\"true\"]", `${t}:${n}:${o.map(([e], t) => s[t] ? e || h7 : "").join(",")}`, { axis: "y" }), { sync: d } = u;
(0, B.useEffect)(() => {
let t = e.scroll, n = t.parentElement, r = t.querySelector(":scope > [data-sidebar-head]"), i = new ResizeObserver(() => d());
return [
@@ -77009,7 +77241,7 @@ function CGe({ host: e, epoch: t, version: n }) {
}, _ = (e) => ({
draggable: !0,
onDragStart: (t) => {
- p(e), t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData("text/plain", e || g7);
+ p(e), t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData("text/plain", e || h7);
},
onDragOver: (t) => {
if (f === null || f === e) return;
@@ -77024,7 +77256,7 @@ function CGe({ host: e, epoch: t, version: n }) {
t.preventDefault();
let n = f, a = m?.key === e && m.after;
g();
- let o = n === null ? null : Y5(i, n, e, a);
+ let o = n === null ? null : J5(i, n, e, a);
o && r(o);
},
onDragEnd: g
@@ -77047,8 +77279,8 @@ function CGe({ host: e, epoch: t, version: n }) {
"data-sidebar-home-logo": "",
src: "/peach-logo.png",
alt: ""
- }) : /* @__PURE__ */ (0, H.jsx)(Jk, { name: r }), /* @__PURE__ */ (0, H.jsx)("span", { children: n })]
- }, t || g7))
+ }) : /* @__PURE__ */ (0, H.jsx)(Tk, { name: r }), /* @__PURE__ */ (0, H.jsx)("span", { children: n })]
+ }, t || h7))
}), v ? (0, Dt.createPortal)(/* @__PURE__ */ (0, H.jsx)("span", {
"data-sidebar-glide": "",
"aria-hidden": "true",
@@ -77056,7 +77288,7 @@ function CGe({ host: e, epoch: t, version: n }) {
}), v) : null] });
}
var C7 = (e, t) => String(e[t] ?? "").split(",").filter(Boolean);
-function wGe(e) {
+function OGe(e) {
if (!e) return null;
let t = /* @__PURE__ */ new Map(), n = [
["loc", e.locations],
@@ -77069,7 +77301,7 @@ function wGe(e) {
for (let [e, r] of n) for (let n of r) t.set(`${e}\n${n.value}`, n.n ?? 0);
return t;
}
-function TGe({ host: e, content: t, filters: n, latest: r }) {
+function kGe({ host: e, content: t, filters: n, latest: r }) {
let i = t.kind === "catalog" ? t.key : `follow:${t.selected.join(",")}:${t.tags.map((e) => e.value).join(",")}`;
(0, B.useLayoutEffect)(() => {
t.kind === "catalog" && h(e.scroll, "drawer");
@@ -77078,8 +77310,8 @@ function TGe({ host: e, content: t, filters: n, latest: r }) {
i,
t.kind
]);
- let a = t.kind === "catalog" ? EGe(e, t.facets, n, r, i) : [DGe(e, t.tags, new Set(t.selected))], o = 0;
- return a.map((e) => e && /* @__PURE__ */ (0, H.jsx)(OGe, {
+ let a = t.kind === "catalog" ? AGe(e, t.facets, n, r, i) : [jGe(e, t.tags, new Set(t.selected))], o = 0;
+ return a.map((e) => e && /* @__PURE__ */ (0, H.jsx)(MGe, {
title: e.title,
kind: e.kind,
active: e.active,
@@ -77088,8 +77320,8 @@ function TGe({ host: e, content: t, filters: n, latest: r }) {
children: e.body
}, e.title));
}
-function EGe(e, t, n, r, i) {
- let a = wGe(r), o = (t, r, i) => {
+function AGe(e, t, n, r, i) {
+ let a = OGe(r), o = (t, r, i) => {
if (!t.length) return null;
let o = C7(n, r);
return /* @__PURE__ */ (0, H.jsx)(E7, {
@@ -77114,12 +77346,12 @@ function EGe(e, t, n, r, i) {
title: t,
kind: s,
active: p,
- body: /* @__PURE__ */ (0, H.jsx)(AGe, {
+ body: /* @__PURE__ */ (0, H.jsx)(PGe, {
epoch: i,
title: t,
rows: c,
latest: m ?? null,
- limit: yGe[d],
+ limit: wGe[d],
filterKey: l,
selected: f,
counts: a,
@@ -77134,7 +77366,7 @@ function EGe(e, t, n, r, i) {
title: "时长",
kind: "meta",
active: !1,
- body: /* @__PURE__ */ (0, H.jsx)(jGe, {
+ body: /* @__PURE__ */ (0, H.jsx)(FGe, {
host: e,
filters: n
})
@@ -77157,7 +77389,7 @@ function EGe(e, t, n, r, i) {
} : null
];
}
-function DGe(e, t, n) {
+function jGe(e, t, n) {
return t.length ? {
title: "内容标签",
kind: "online",
@@ -77177,7 +77409,7 @@ function w7(e, t) {
} catch {}
return n === null ? t : n === "open";
}
-function OGe({ title: e, kind: t, active: n, index: r, epoch: i, children: a }) {
+function MGe({ title: e, kind: t, active: n, index: r, epoch: i, children: a }) {
let o = (0, B.useRef)(null), s = (0, B.useRef)(null), [c, l] = (0, B.useState)(() => w7(e, n)), u = (0, B.useRef)(!1);
(0, B.useLayoutEffect)(() => {
let t = o.current, r = s.current;
@@ -77203,7 +77435,7 @@ function OGe({ title: e, kind: t, active: n, index: r, epoch: i, children: a })
"aria-expanded": c,
"aria-controls": f,
onClick: d,
- children: [/* @__PURE__ */ (0, H.jsx)(Jk, { name: "chevron-right" }), /* @__PURE__ */ (0, H.jsx)("span", { children: e })]
+ children: [/* @__PURE__ */ (0, H.jsx)(Tk, { name: "chevron-right" }), /* @__PURE__ */ (0, H.jsx)("span", { children: e })]
}), /* @__PURE__ */ (0, H.jsx)("div", {
ref: s,
"data-sidebar-collapse": "",
@@ -77224,8 +77456,8 @@ function OGe({ title: e, kind: t, active: n, index: r, epoch: i, children: a })
});
}
var T7 = (0, B.createContext)(() => {});
-function kGe({ dot: e }) {
- return e ? e.kind === "glyph" ? /* @__PURE__ */ (0, H.jsx)(Jk, { name: e.name }) : e.kind === "image" ? /* @__PURE__ */ (0, H.jsx)("img", {
+function NGe({ dot: e }) {
+ return e ? e.kind === "glyph" ? /* @__PURE__ */ (0, H.jsx)(Tk, { name: e.name }) : e.kind === "image" ? /* @__PURE__ */ (0, H.jsx)("img", {
"data-sidebar-source-icon": "",
src: e.src,
alt: ""
@@ -77248,7 +77480,7 @@ function E7({ rows: e, filterKey: t, multi: n, selected: r, counts: i, host: a }
title: e.offline,
onClick: () => a.toggleChip(t, e.value, n),
children: [
- /* @__PURE__ */ (0, H.jsx)(kGe, { dot: e.dot }),
+ /* @__PURE__ */ (0, H.jsx)(NGe, { dot: e.dot }),
/* @__PURE__ */ (0, H.jsx)("span", {
"data-sidebar-chip-label": "",
children: e.label
@@ -77263,7 +77495,7 @@ function E7({ rows: e, filterKey: t, multi: n, selected: r, counts: i, host: a }
})
});
}
-function AGe({ epoch: e, title: t, rows: n, latest: r, limit: i, filterKey: a, selected: o, counts: s, host: l, expandable: u }) {
+function PGe({ epoch: e, title: t, rows: n, latest: r, limit: i, filterKey: a, selected: o, counts: s, host: l, expandable: u }) {
let d = (0, B.useContext)(T7), [f, p] = (0, B.useState)(null), [m, h] = (0, B.useState)(e);
m !== e && (h(e), p(null));
let g = (0, B.useRef)(null), _ = (0, B.useRef)(null), v = !!f?.all, y = f ? f.rows : n;
@@ -77304,7 +77536,7 @@ function AGe({ epoch: e, title: t, rows: n, latest: r, limit: i, filterKey: a, s
all: !v
}), v && d());
},
- children: /* @__PURE__ */ (0, H.jsx)(Jk, { name: "chevron-down" })
+ children: /* @__PURE__ */ (0, H.jsx)(Tk, { name: "chevron-down" })
}) : null] });
}
function D7({ rows: e, host: t, selected: n, badges: r }) {
@@ -77328,10 +77560,10 @@ function D7({ rows: e, host: t, selected: n, badges: r }) {
}, e.value))
});
}
-var O7 = (e, t) => e ? Math.min(_7, Number(e) / 60) : t;
-function jGe({ host: e, filters: t }) {
- let n = `${t.dur_min ?? ""}:${t.dur_max ?? ""}`, [r, i] = (0, B.useState)(n), [a, o] = (0, B.useState)(() => [O7(t.dur_min, 0), O7(t.dur_max, _7)]), [s, c] = (0, B.useState)("max");
- r !== n && (i(n), o([O7(t.dur_min, 0), O7(t.dur_max, _7)]));
+var O7 = (e, t) => e ? Math.min(g7, Number(e) / 60) : t;
+function FGe({ host: e, filters: t }) {
+ let n = `${t.dur_min ?? ""}:${t.dur_max ?? ""}`, [r, i] = (0, B.useState)(n), [a, o] = (0, B.useState)(() => [O7(t.dur_min, 0), O7(t.dur_max, g7)]), [s, c] = (0, B.useState)("max");
+ r !== n && (i(n), o([O7(t.dur_min, 0), O7(t.dur_max, g7)]));
let [l, u] = a, d = (0, B.useRef)(null), f = (0, B.useRef)(null), p = (0, B.useRef)(null), m = (0, B.useRef)(a);
m.current = a;
let h = (e, t) => {
@@ -77344,11 +77576,11 @@ function jGe({ host: e, filters: t }) {
}, [e]), (0, B.useLayoutEffect)(() => {
let e = d.current;
if (!e) return;
- e.style.setProperty("--lo", `${l / _7 * 100}%`), e.style.setProperty("--hi", `${u / _7 * 100}%`);
+ e.style.setProperty("--lo", `${l / g7 * 100}%`), e.style.setProperty("--hi", `${u / g7 * 100}%`);
let t = e.getBoundingClientRect();
e.querySelectorAll("[data-sidebar-range-tip]").forEach((e) => {
let n = e.dataset.rangeEnd === "max" ? u : l;
- e.style.left = `${n / _7 * 100}%`, e.style.setProperty("--range-tip-shift", "0px");
+ e.style.left = `${n / g7 * 100}%`, e.style.setProperty("--range-tip-shift", "0px");
let r = e.getBoundingClientRect(), i = r.right > t.right ? t.right - r.right : r.left < t.left ? t.left - r.left : 0;
i && e.style.setProperty("--range-tip-shift", `${Math.round(i)}px`);
});
@@ -77358,7 +77590,7 @@ function jGe({ host: e, filters: t }) {
"data-range-end": e,
"data-range-active": s === e ? "" : void 0,
"aria-hidden": "true",
- children: e === "max" && t >= _7 ? "不限" : `${t} 分钟`
+ children: e === "max" && t >= g7 ? "不限" : `${t} 分钟`
});
return /* @__PURE__ */ (0, H.jsx)("div", {
"data-sidebar-duration": "",
@@ -77373,7 +77605,7 @@ function jGe({ host: e, filters: t }) {
id: "durMin",
type: "range",
min: "0",
- max: _7,
+ max: g7,
step: "5",
value: l,
"aria-label": "最短时长(分钟)",
@@ -77384,7 +77616,7 @@ function jGe({ host: e, filters: t }) {
id: "durMax",
type: "range",
min: "0",
- max: _7,
+ max: g7,
step: "5",
value: u,
"aria-label": "最长时长(分钟)",
@@ -77399,17 +77631,17 @@ function jGe({ host: e, filters: t }) {
}
//#endregion
//#region src/board-skeleton.ts
-var k7 = (e = "60%") => `<span class="skeleton" style="width:${e}"></span>`, MGe = () => `${k7("80%")}${k7("48%")}`, NGe = (e, t) => e.repeat(t);
-function PGe() {
- return `<div data-stage-grid="" aria-hidden="true"><div data-stage-media="" class="skeleton-detail-media skeleton"></div><aside data-stage-side=""><div data-stage-side-content="" class="skeleton-lines">${k7("85%")}${k7("65%")}${NGe(MGe(), 4)}</div></aside></div>`;
+var k7 = (e = "60%") => `<span class="skeleton" style="width:${e}"></span>`, IGe = () => `${k7("80%")}${k7("48%")}`, LGe = (e, t) => e.repeat(t);
+function RGe() {
+ return `<div data-stage-grid="" aria-hidden="true"><div data-stage-media="" class="skeleton-detail-media skeleton"></div><aside data-stage-side=""><div data-stage-side-content="" class="skeleton-lines">${k7("85%")}${k7("65%")}${LGe(IGe(), 4)}</div></aside></div>`;
}
//#endregion
//#region src/react/follow-detail/follow-detail.ts
-var A7 = (e) => ["follow-item", e], FGe = (e) => `/api/follow?item=${encodeURIComponent(e)}`, IGe = "/api/follow/save", LGe = "/api/follow/media/hide";
+var A7 = (e) => ["follow-item", e], zGe = (e) => `/api/follow?item=${encodeURIComponent(e)}`, BGe = "/api/follow/save", VGe = "/api/follow/media/hide";
async function j7(e, t) {
- let n = await K(FGe(e), t);
+ let n = await K(zGe(e), t);
for (let t of n.groups || []) {
- let r = pF(t).find((t) => t.id === e);
+ let r = dF(t).find((t) => t.id === e);
if (r) return {
item: r,
group: t,
@@ -77419,10 +77651,10 @@ async function j7(e, t) {
}
throw Error("这条关注内容已不存在");
}
-async function RGe(e, t) {
- let n = A7(e.id), r = _he(e.id), i = z.getQueryData(lF) ? null : z.fetchQuery({
- queryKey: lF,
- queryFn: () => uF(t)
+async function HGe(e, t) {
+ let n = A7(e.id), r = bhe(e.id), i = z.getQueryData(sF) ? null : z.fetchQuery({
+ queryKey: sF,
+ queryFn: () => cF(t)
});
r ? z.setQueryData(n, {
...r,
@@ -77432,8 +77664,8 @@ async function RGe(e, t) {
queryFn: () => j7(e.id, t)
}), await i;
}
-function zGe(e, t, n, r) {
- let i = e.media_items || [], a = r === "images" ? "image" : "video", o = i.find((e) => e.media_kind === a) || i[0], s = i.length ? i.find((e) => e.index === (n ?? o.index)) || o : null, c = i.filter((e) => e.media_kind === "image"), l = c.findIndex((e) => e.index === s?.index), u = c.length > 1 && l >= 0, d = i.length > 1 && !u, f = !i.length && t && vF(t).length > 1 ? t : null, p = s?.media_kind || e.media_kind || "", m = (u ? [...c, e] : [s, e]).filter((e) => !!e && (e.width || 0) > 0 && (e.height || 0) > 0);
+function UGe(e, t, n, r) {
+ let i = e.media_items || [], a = r === "images" ? "image" : "video", o = i.find((e) => e.media_kind === a) || i[0], s = i.length ? i.find((e) => e.index === (n ?? o.index)) || o : null, c = i.filter((e) => e.media_kind === "image"), l = c.findIndex((e) => e.index === s?.index), u = c.length > 1 && l >= 0, d = i.length > 1 && !u, f = !i.length && t && gF(t).length > 1 ? t : null, p = s?.media_kind || e.media_kind || "", m = (u ? [...c, e] : [s, e]).filter((e) => !!e && (e.width || 0) > 0 && (e.height || 0) > 0);
return {
embedded: i,
selected: s,
@@ -77447,32 +77679,32 @@ function zGe(e, t, n, r) {
src: e.playable ? `/follow-stream?id=${e.id}${s ? `&media=${s.index}` : ""}` : ""
};
}
-var BGe = (e) => pF(e).find((e) => (e.media_items || []).some((e) => e.resource_group)), VGe = {
+var WGe = (e) => dF(e).find((e) => (e.media_items || []).some((e) => e.resource_group)), GGe = {
"gofile.io": "Gofile",
"pixeldrain.com": "Pixeldrain",
"mega.nz": "MEGA",
"mega.io": "MEGA",
"mediafire.com": "MediaFire",
"drive.google.com": "Google Drive"
-}, HGe = {
+}, KGe = {
gofile: "Gofile",
pixeldrain: "Pixeldrain",
mega: "MEGA",
mediafire: "MediaFire",
google_drive: "Google Drive"
};
-function UGe(e) {
+function qGe(e) {
try {
let t = new URL(e).hostname.replace(/^www\./, "");
- return VGe[t] || t;
+ return GGe[t] || t;
} catch {
return "外部文件页";
}
}
function M7(e, t) {
- return HGe[e?.resource_provider || ""] || t.provider_label || t.provider || "在线图片";
+ return KGe[e?.resource_provider || ""] || t.provider_label || t.provider || "在线图片";
}
-function WGe(e, t, n = "") {
+function JGe(e, t, n = "") {
let r = n;
!r && e.is_release && (r = t.variant_label || t.variant_kind || ""), r ||= t.variant_kind === "wip" ? "WIP" : t.variant_label || t.variant_kind || "视频";
let i = e.is_release ? t.summary || (t.has_media ? "(仅附件)" : "(无正文)") : t.title;
@@ -77481,16 +77713,16 @@ function WGe(e, t, n = "") {
title: e.is_release && t.author ? `${t.author}:${i}` : i
};
}
-var GGe = (e) => String(e.name || "").trim(), N7 = (e, t) => e.tag_types?.[t] || "unknown", KGe = /* @__PURE__ */ new Set([
+var YGe = (e) => String(e.name || "").trim(), N7 = (e, t) => e.tag_types?.[t] || "unknown", XGe = /* @__PURE__ */ new Set([
"artist",
"character",
"copyright",
"metadata",
"unknown"
]);
-function qGe(e, t) {
+function ZGe(e, t) {
let n = N7(e, t);
- return `r34-${KGe.has(n) ? n : "general"}`;
+ return `r34-${XGe.has(n) ? n : "general"}`;
}
var P7 = [
"copyright",
@@ -77499,23 +77731,23 @@ var P7 = [
"general",
"metadata"
];
-function JGe(e, t) {
+function QGe(e, t) {
let n = e.detail_tags || e.tags || [], r = (t) => {
let n = P7.indexOf(N7(e, t));
return n < 0 ? P7.length : n;
};
return [...n].sort((e, n) => r(e) - r(n) || t(e).localeCompare(t(n)));
}
-function YGe(e, t) {
+function $Ge(e, t) {
let n = t.find((t) => t.id === e.source_id), r = t.filter((e) => n?.author_key && e.author_key === n.author_key);
return !r.length && n && r.push(n), r;
}
-var XGe = (e, t) => ({
+var eKe = (e, t) => ({
sources: e.sources,
aliases: e.aliases,
credentials: t
}), F7 = (e) => e?.size ? { size: e.size } : {};
-function ZGe(e, t) {
+function tKe(e, t) {
let { images: n, kind: r, src: i, selected: a } = t;
return n.length ? n.map((t, r) => ({
src: `/follow-stream?id=${e.id}&media=${t.index}`,
@@ -77542,7 +77774,7 @@ function ZGe(e, t) {
total: 1
}] : [];
}
-var QGe = (e) => e === "seen" ? "已标记看过" : "已更新关注状态";
+var nKe = (e) => e === "seen" ? "已标记看过" : "已更新关注状态";
//#endregion
//#region src/react/components/mix-queue.tsx
function I7({ kind: e, title: t, summary: n, onClose: r, actions: i, listRef: a, children: o, ...s }) {
@@ -77596,29 +77828,29 @@ function L7({ current: e, pic: t, lead: n, after: r, row: i, children: a, ...o }
}), r]
});
}
-var $Ge = ({ label: e, count: t }) => /* @__PURE__ */ (0, H.jsxs)("h3", {
+var rKe = ({ label: e, count: t }) => /* @__PURE__ */ (0, H.jsxs)("h3", {
"data-mix-group-label": "",
children: [
e,
" ",
/* @__PURE__ */ (0, H.jsx)("span", { children: t })
]
-}), R7 = (e) => Number(e) > 0, eKe = ({ name: e }) => /* @__PURE__ */ (0, H.jsx)("span", {
+}), R7 = (e) => Number(e) > 0, iKe = ({ name: e }) => /* @__PURE__ */ (0, H.jsx)("span", {
className: "contents",
dangerouslySetInnerHTML: { __html: L(e) }
}), z7 = L("external-link", "externalmark");
-function tKe(e) {
- let { id: t, actions: n } = e, r = xw({
+function aKe(e) {
+ let { id: t, actions: n } = e, r = yw({
queryKey: A7(t),
queryFn: ({ signal: e }) => j7(t, e)
- }), i = xw({
- queryKey: lF,
- queryFn: ({ signal: e }) => uF(e)
+ }), i = yw({
+ queryKey: sF,
+ queryFn: ({ signal: e }) => cF(e)
}), a = (0, B.useMemo)(() => new Set((i.data?.providers || []).filter((e) => e.present).map((e) => e.provider)), [i.data]), [o, s] = (0, B.useState)(e.mediaIndex);
- return r.data ? /* @__PURE__ */ (0, H.jsx)(nKe, {
+ return r.data ? /* @__PURE__ */ (0, H.jsx)(oKe, {
...e,
data: r.data,
- context: XGe(r.data, a),
+ context: eKe(r.data, a),
mediaIndex: o,
onMedia: s
}) : /* @__PURE__ */ (0, H.jsx)("div", {
@@ -77629,7 +77861,7 @@ function tKe(e) {
"data-follow-detail-media": "none",
children: [/* @__PURE__ */ (0, H.jsx)(B7, { onClose: n.close }), /* @__PURE__ */ (0, H.jsx)("div", {
"data-follow-detail-placeholder": "",
- children: r.isError ? /* @__PURE__ */ (0, H.jsx)(HA, {
+ children: r.isError ? /* @__PURE__ */ (0, H.jsx)(cA, {
message: ce(r.error),
onRetry: () => void r.refetch()
}) : null
@@ -77646,8 +77878,8 @@ var B7 = ({ onClose: e }) => /* @__PURE__ */ (0, H.jsx)("button", {
onClick: e,
dangerouslySetInnerHTML: { __html: L("x") }
});
-function nKe({ data: e, context: t, mediaIndex: n, onMedia: r, mediaView: i, helpers: a, actions: o }) {
- let { item: s, group: c } = e, l = zGe(s, c, n, i), u = oKe(s, o, r), d = `${s.id}:${l.selected?.index ?? ""}`, [f, p] = (0, B.useState)({
+function oKe({ data: e, context: t, mediaIndex: n, onMedia: r, mediaView: i, helpers: a, actions: o }) {
+ let { item: s, group: c } = e, l = UGe(s, c, n, i), u = uKe(s, o, r), d = `${s.id}:${l.selected?.index ?? ""}`, [f, p] = (0, B.useState)({
key: "",
kind: ""
}), m = {
@@ -77667,7 +77899,7 @@ function nKe({ data: e, context: t, mediaIndex: n, onMedia: r, mediaView: i, hel
s,
l.kind
]);
- let h = !l.embedded.length && l.collection ? BGe(l.collection) : void 0, g = l.embeddedQueue ? /* @__PURE__ */ (0, H.jsx)(W7, {
+ let h = !l.embedded.length && l.collection ? WGe(l.collection) : void 0, g = l.embeddedQueue ? /* @__PURE__ */ (0, H.jsx)(W7, {
item: s,
current: l.selected.index,
helpers: a,
@@ -77680,7 +77912,7 @@ function nKe({ data: e, context: t, mediaIndex: n, onMedia: r, mediaView: i, hel
actions: o,
onMedia: r,
currentId: s.id
- }) : /* @__PURE__ */ (0, H.jsx)(iKe, {
+ }) : /* @__PURE__ */ (0, H.jsx)(cKe, {
group: l.collection,
itemId: s.id,
helpers: a,
@@ -77691,7 +77923,7 @@ function nKe({ data: e, context: t, mediaIndex: n, onMedia: r, mediaView: i, hel
"data-with-queue": g ? "" : void 0,
"data-follow-detail": "",
children: [
- /* @__PURE__ */ (0, H.jsx)(rKe, {
+ /* @__PURE__ */ (0, H.jsx)(sKe, {
item: s,
media: l,
helpers: a,
@@ -77700,7 +77932,7 @@ function nKe({ data: e, context: t, mediaIndex: n, onMedia: r, mediaView: i, hel
issues: m
}, d),
g,
- /* @__PURE__ */ (0, H.jsx)(aKe, {
+ /* @__PURE__ */ (0, H.jsx)(lKe, {
item: s,
data: e,
context: t,
@@ -77713,8 +77945,8 @@ function nKe({ data: e, context: t, mediaIndex: n, onMedia: r, mediaView: i, hel
]
});
}
-function rKe({ item: e, media: t, actions: n, onMedia: r, issues: i }) {
- let { kind: a, selected: o, src: s, images: c, position: l, carousel: u, frameRatio: d } = t, f = (0, B.useRef)(null), [p, m] = (0, B.useState)(null), h = ZGe(e, t), g = o?.thumb_url || e.thumb_url || "", _ = e.playable && a === "video", v = e.playable && a === "image" ? s : e.thumb_url || "", y = e.playable && a === "image" && g && g !== s ? g : "", [b, x] = (0, B.useState)(v), S = (0, B.useRef)({
+function sKe({ item: e, media: t, actions: n, onMedia: r, issues: i }) {
+ let { kind: a, selected: o, src: s, images: c, position: l, carousel: u, frameRatio: d } = t, f = (0, B.useRef)(null), [p, m] = (0, B.useState)(null), h = tKe(e, t), g = o?.thumb_url || e.thumb_url || "", _ = e.playable && a === "video", v = e.playable && a === "image" ? s : e.thumb_url || "", y = e.playable && a === "image" && g && g !== s ? g : "", [b, x] = (0, B.useState)(v), S = (0, B.useRef)({
item: e,
selected: o
}), C = (0, B.useRef)(i.failed);
@@ -77751,7 +77983,7 @@ function rKe({ item: e, media: t, actions: n, onMedia: r, issues: i }) {
src: b,
alt: e.title,
referrerPolicy: "no-referrer",
- onClick: h.length ? () => void DN(Math.max(0, l), h) : void 0,
+ onClick: h.length ? () => void TN(Math.max(0, l), h) : void 0,
onError: () => {
if (y && b !== y) {
x(y), i.thumbFallback();
@@ -77763,7 +77995,7 @@ function rKe({ item: e, media: t, actions: n, onMedia: r, issues: i }) {
"data-follow-detail-placeholder": "",
children: [/* @__PURE__ */ (0, H.jsx)("span", {
className: "contents",
- dangerouslySetInnerHTML: { __html: wF(e.resource_provider || e.provider) }
+ dangerouslySetInnerHTML: { __html: SF(e.resource_provider || e.provider) }
}), /* @__PURE__ */ (0, H.jsx)("span", { children: "没有可用预览" })]
}),
u ? /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [
@@ -77821,8 +78053,8 @@ function U7(e) {
t && e.wireDrag(t);
}, [e]);
}
-function iKe({ group: e, itemId: t, helpers: n, actions: r }) {
- let i = vF(e), a = U7(n);
+function cKe({ group: e, itemId: t, helpers: n, actions: r }) {
+ let i = gF(e), a = U7(n);
return /* @__PURE__ */ (0, H.jsx)(I7, {
kind: "collection",
"data-follow-queue": "",
@@ -77831,7 +78063,7 @@ function iKe({ group: e, itemId: t, helpers: n, actions: r }) {
listRef: a,
summary: `${e.primary.title || "未命名合集"} · ${i.length} 个视频`,
children: i.map((n) => {
- let i = e.duplicates.includes(n), a = WGe(e, n, i ? n.provider_label : ""), o = i ? wF(n.provider, n.provider_label) : "";
+ let i = e.duplicates.includes(n), a = JGe(e, n, i ? n.provider_label : ""), o = i ? SF(n.provider, n.provider_label) : "";
return /* @__PURE__ */ (0, H.jsxs)(L7, {
current: n.id === t,
"data-follow-queue-item": n.id,
@@ -77854,7 +78086,7 @@ function iKe({ group: e, itemId: t, helpers: n, actions: r }) {
children: a.label
}), /* @__PURE__ */ (0, H.jsx)("time", {
dateTime: n.published_at || "",
- children: jF(n)
+ children: kF(n)
})]
})]
}, n.id);
@@ -77879,7 +78111,7 @@ function W7({ item: e, current: t, currentId: n = e.id, helpers: r, actions: i,
onClose: i.close,
listRef: s,
summary: `${e.title || "未命名内容"} · ${o.length} 个媒体`,
- children: c.map((n) => [n.label ? /* @__PURE__ */ (0, H.jsx)($Ge, {
+ children: c.map((n) => [n.label ? /* @__PURE__ */ (0, H.jsx)(rKe, {
label: n.label,
count: n.items.length
}, `label:${n.key}`) : null, ...n.items.map((n) => /* @__PURE__ */ (0, H.jsxs)(L7, {
@@ -77891,7 +78123,7 @@ function W7({ item: e, current: t, currentId: n = e.id, helpers: r, actions: i,
pic: n.thumb_url ? /* @__PURE__ */ (0, H.jsx)(H7, { src: n.thumb_url }) : /* @__PURE__ */ (0, H.jsx)(V7, { kind: n.media_kind || "" }),
children: [/* @__PURE__ */ (0, H.jsx)("b", {
"data-middle-truncate": "",
- children: GGe(n)
+ children: YGe(n)
}), /* @__PURE__ */ (0, H.jsx)("span", {
"data-truncate-end": "",
children: n.media_kind === "image" ? "图片" : "视频"
@@ -77899,13 +78131,13 @@ function W7({ item: e, current: t, currentId: n = e.id, helpers: r, actions: i,
}, n.index))])
});
}
-function aKe({ item: e, data: t, context: n, media: r, write: i, issue: a, helpers: o, actions: s }) {
+function lKe({ item: e, data: t, context: n, media: r, write: i, issue: a, helpers: o, actions: s }) {
let { kind: c, selected: l, src: u } = r, d = {
primary: e,
variants: [],
duplicates: [],
has_wip: e.variant_kind === "wip"
- }, f = kF(d, e), p = DF(e, YGe(e, t.sources), n), m = p.credited ? "" : e.author && re(e.author) !== re(p.author) ? e.author : "", h = AF(e, n), g = JGe(e, o.tagLabel), _ = e.status === "saved", { busy: v } = i, y = (e) => v.has(e) ? {
+ }, f = DF(d, e), p = TF(e, $Ge(e, t.sources), n), m = p.credited ? "" : e.author && re(e.author) !== re(p.author) ? e.author : "", h = OF(e, n), g = QGe(e, o.tagLabel), _ = e.status === "saved", { busy: v } = i, y = (e) => v.has(e) ? {
"aria-busy": !0,
"aria-disabled": !0
} : {};
@@ -77921,7 +78153,7 @@ function aKe({ item: e, data: t, context: n, media: r, write: i, issue: a, helpe
"data-stage-title": "",
"data-follow-detail-name": "",
"data-reveal-line": "",
- dangerouslySetInnerHTML: { __html: OF(d, e) + P(e.title) }
+ dangerouslySetInnerHTML: { __html: EF(d, e) + P(e.title) }
}), e.url ? /* @__PURE__ */ (0, H.jsx)("a", {
"data-follow-origin": "",
href: e.url,
@@ -77948,7 +78180,7 @@ function aKe({ item: e, data: t, context: n, media: r, write: i, issue: a, helpe
"data-stage-meta": "",
"data-reveal-line": "",
children: [
- /* @__PURE__ */ (0, H.jsx)("span", { children: jF(e) }),
+ /* @__PURE__ */ (0, H.jsx)("span", { children: kF(e) }),
R7(e.duration) ? /* @__PURE__ */ (0, H.jsx)("span", { children: ne(e.duration) }) : null,
f ? /* @__PURE__ */ (0, H.jsx)("span", {
"data-follow-badges": "",
@@ -77982,7 +78214,7 @@ function aKe({ item: e, data: t, context: n, media: r, write: i, issue: a, helpe
href: e,
target: "_blank",
rel: "noreferrer noopener",
- children: [UGe(e), /* @__PURE__ */ (0, H.jsx)("span", {
+ children: [qGe(e), /* @__PURE__ */ (0, H.jsx)("span", {
className: "contents",
dangerouslySetInnerHTML: { __html: z7 }
})]
@@ -78091,7 +78323,7 @@ function aKe({ item: e, data: t, context: n, media: r, write: i, issue: a, helpe
"aria-label": `恢复显示 ${e.name || ""}`,
...y(`restore:${e.index}`),
onClick: () => i.restore(e.index),
- children: [e.thumb_url ? /* @__PURE__ */ (0, H.jsx)(H7, { src: e.thumb_url }) : /* @__PURE__ */ (0, H.jsx)(eKe, { name: "image-off" }), /* @__PURE__ */ (0, H.jsx)("i", { dangerouslySetInnerHTML: { __html: L("rotate-ccw") } })]
+ children: [e.thumb_url ? /* @__PURE__ */ (0, H.jsx)(H7, { src: e.thumb_url }) : /* @__PURE__ */ (0, H.jsx)(iKe, { name: "image-off" }), /* @__PURE__ */ (0, H.jsx)("i", { dangerouslySetInnerHTML: { __html: L("rotate-ccw") } })]
}, e.index))
})]
}) : null,
@@ -78105,7 +78337,7 @@ function aKe({ item: e, data: t, context: n, media: r, write: i, issue: a, helpe
"data-follow-detail-tags": "",
children: g.map((t) => /* @__PURE__ */ (0, H.jsx)("button", {
type: "button",
- "data-tag-cat": qGe(e, t),
+ "data-tag-cat": ZGe(e, t),
"data-follow-tag": t,
onClick: () => s.openTag(t),
children: o.tagLabel(t)
@@ -78115,7 +78347,7 @@ function aKe({ item: e, data: t, context: n, media: r, write: i, issue: a, helpe
})
});
}
-function oKe(e, t, n) {
+function uKe(e, t, n) {
let r = e.id, i = A7(r), [a, o] = (0, B.useState)(() => /* @__PURE__ */ new Set()), [s, c] = (0, B.useState)(""), l = (e, t) => o((n) => {
let r = new Set(n);
return t ? r.add(e) : r.delete(e), r;
@@ -78126,17 +78358,17 @@ function oKe(e, t, n) {
...t.item,
status: e
}
- }), yhe(r, e);
+ }), She(r, e);
}, d = (e) => {
c(ce(e) || "操作失败"), t.failure("更新关注状态", e);
- }, f = ww({
- mutationFn: ({ to: e }) => q(CP, {
+ }, f = Sw({
+ mutationFn: ({ to: e }) => q(xP, {
item: r,
to: e
}),
onSuccess: (e, { to: n, was: i }) => {
- u(n), c(""), n === "ignored" && JI(), t.toast(QGe(n), { undo: i === "saved" ? void 0 : async () => {
- await q(CP, {
+ u(n), c(""), n === "ignored" && KI(), t.toast(nKe(n), { undo: i === "saved" ? void 0 : async () => {
+ await q(xP, {
item: r,
to: i
}), u(i);
@@ -78144,16 +78376,16 @@ function oKe(e, t, n) {
},
onError: d,
onSettled: (e, t, { to: n }) => l(n, !1)
- }), p = ww({
- mutationFn: () => q(IGe, { item: r }),
+ }), p = Sw({
+ mutationFn: () => q(BGe, { item: r }),
onSuccess: () => {
u("saved"), c(""), t.toast("已保存到账本");
},
onError: d,
onSettled: () => l("save", !1)
- }), m = ww({
+ }), m = Sw({
mutationFn: async ({ index: e, hidden: t }) => {
- await q(LGe, {
+ await q(VGe, {
item: r,
media: e,
hidden: t
@@ -78164,17 +78396,17 @@ function oKe(e, t, n) {
},
onSuccess: (e, { hidden: r, next: a }) => {
let o = z.getQueryData(i);
- o && vhe(o.item), n(a), c(""), t.toast(r ? "已隐藏这张图" : "已恢复显示");
+ o && xhe(o.item), n(a), c(""), t.toast(r ? "已隐藏这张图" : "已恢复显示");
},
onError: d,
onSettled: (e, t, { index: n, hidden: r }) => l(`${r ? "hide" : "restore"}:${n}`, !1)
- }), h = xw({
- queryKey: b_e(r),
- queryFn: ({ signal: e }) => C_e(r, e)
- }).data?.want ?? null, g = ww({
- mutationFn: async (e) => (e ? await qI([e.id]) : await KI({ follow: r }), !e),
+ }), h = yw({
+ queryKey: C_e(r),
+ queryFn: ({ signal: e }) => E_e(r, e)
+ }).data?.want ?? null, g = Sw({
+ mutationFn: async (e) => (e ? await GI([e.id]) : await WI({ follow: r }), !e),
onSuccess: (e) => {
- c(""), t.toast(e ? "已加入想要" : "已取消想要"), JI();
+ c(""), t.toast(e ? "已加入想要" : "已取消想要"), KI();
},
onError: d,
onSettled: () => l("want", !1)
@@ -78214,19 +78446,19 @@ function oKe(e, t, n) {
}
//#endregion
//#region src/react/components/overlay-host.ts
-function sKe(e) {
+function dKe(e) {
let t = e.querySelector(":scope > [data-react-overlays]");
if (t) return t;
let n = e.ownerDocument.createElement("div");
return n.className = "peach-react", n.dataset.reactOverlays = "", e.append(n), n;
}
-function cKe(e) {
+function fKe(e) {
let t = e?.ownerDocument ?? globalThis.document, n = e?.closest("dialog[open]");
- return sKe(n ?? t.body);
+ return dKe(n ?? t.body);
}
//#endregion
//#region src/react/cover-crop/cover-crop.ts
-var lKe = "/api/cover-crop", uKe = (e, t) => q(lKe, {
+var pKe = "/api/cover-crop", mKe = (e, t) => q(pKe, {
code: e,
box: t
});
@@ -78245,7 +78477,7 @@ function G7({ className: e }) {
children: /* @__PURE__ */ (0, H.jsx)("use", { href: "#i-crop" })
});
}
-function dKe({ code: e, coverUrl: t, box: n, onSaved: r }) {
+function hKe({ code: e, coverUrl: t, box: n, onSaved: r }) {
let [i, a] = (0, B.useState)(!1), o = (0, B.useRef)(null);
return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)("button", {
ref: o,
@@ -78258,13 +78490,13 @@ function dKe({ code: e, coverUrl: t, box: n, onSaved: r }) {
className: "flex size-7 cursor-pointer items-center justify-center rounded-lg text-foreground-icon-secondary outline-none transition-colors hover:bg-background-primary-hover hover:text-foreground-icon-primary focus-visible:ring-2 focus-visible:ring-border-focus-ring",
children: /* @__PURE__ */ (0, H.jsx)(G7, { className: "size-3.75" })
}), /* @__PURE__ */ (0, H.jsx)(Gp, {
- getContainer: () => cKe(o.current),
- children: /* @__PURE__ */ (0, H.jsx)(VN, {
+ getContainer: () => fKe(o.current),
+ children: /* @__PURE__ */ (0, H.jsx)(zN, {
isOpen: i,
onOpenChange: a,
width: "cover-crop",
label: "裁剪封面",
- children: /* @__PURE__ */ (0, H.jsx)(fKe, {
+ children: /* @__PURE__ */ (0, H.jsx)(gKe, {
code: e,
coverUrl: t,
box: n,
@@ -78274,9 +78506,9 @@ function dKe({ code: e, coverUrl: t, box: n, onSaved: r }) {
})
})] });
}
-function fKe({ code: e, coverUrl: t, box: n, onSaved: r, close: i }) {
- let [a, o] = (0, B.useState)(null), [s, c] = (0, B.useState)(null), [l, u] = (0, B.useState)(!0), d = hT(), f = ww({
- mutationFn: (t) => uKe(e, t),
+function gKe({ code: e, coverUrl: t, box: n, onSaved: r, close: i }) {
+ let [a, o] = (0, B.useState)(null), [s, c] = (0, B.useState)(null), [l, u] = (0, B.useState)(!0), d = pT(), f = Sw({
+ mutationFn: (t) => mKe(e, t),
onSuccess: (e) => {
i(), r(e.poster_box);
}
@@ -78288,15 +78520,15 @@ function fKe({ code: e, coverUrl: t, box: n, onSaved: r, close: i }) {
y0: n.y0,
x1: n.x1,
y1: n.y1
- } : Ope(e, QD);
- c(LN(t, e, null));
+ } : jpe(e, XD);
+ c(FN(t, e, null));
}
let m = f.isPending;
return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [
/* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex shrink-0 items-start gap-4 p-5",
children: [
- /* @__PURE__ */ (0, H.jsx)(HN, { children: /* @__PURE__ */ (0, H.jsx)(G7, { className: "size-6" }) }),
+ /* @__PURE__ */ (0, H.jsx)(BN, { children: /* @__PURE__ */ (0, H.jsx)(G7, { className: "size-6" }) }),
/* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex min-w-0 flex-1 flex-col gap-2",
children: [
@@ -78315,8 +78547,8 @@ function fKe({ code: e, coverUrl: t, box: n, onSaved: r, close: i }) {
}) : null
]
}),
- /* @__PURE__ */ (0, H.jsx)(_T, {
- icon: Vw,
+ /* @__PURE__ */ (0, H.jsx)(hT, {
+ icon: zw,
size: "small",
"aria-label": "关闭",
onClick: i
@@ -78326,24 +78558,24 @@ function fKe({ code: e, coverUrl: t, box: n, onSaved: r, close: i }) {
/* @__PURE__ */ (0, H.jsx)("div", {
ref: d,
className: "flex min-h-0 flex-1 flex-col items-center gap-4 overflow-y-auto border-t border-separator-border px-5 py-4",
- children: /* @__PURE__ */ (0, H.jsx)(WN, {
+ children: /* @__PURE__ */ (0, H.jsx)(HN, {
src: t,
- aspect: l ? QD : null,
+ aspect: l ? XD : null,
box: s,
size: a,
label: `${e} 的正封取景框`,
onSize: (e) => {
- FN(e) && p(e);
+ NN(e) && p(e);
},
onBox: c
})
}),
/* @__PURE__ */ (0, H.jsxs)("div", {
className: "flex shrink-0 flex-wrap items-center gap-3 border-t border-separator-border p-5",
- children: [/* @__PURE__ */ (0, H.jsx)(LI, {
+ children: [/* @__PURE__ */ (0, H.jsx)(FI, {
isSelected: l,
onChange: (e) => {
- u(e), e && s && a && c(LN(s, a, QD));
+ u(e), e && s && a && c(FN(s, a, XD));
},
children: /* @__PURE__ */ (0, H.jsx)("span", {
className: "text-body-2-regular text-text-secondary",
@@ -78379,14 +78611,14 @@ var K7 = ({ name: e }) => /* @__PURE__ */ (0, H.jsx)("span", {
className: "contents",
dangerouslySetInnerHTML: { __html: e }
});
-function pKe(e) {
- let { queue: t, actions: n } = e, r = xw({
- queryKey: t ? aO(t) : ["item-queue", "none"],
- queryFn: ({ signal: n }) => mO(t, e.helpers, n),
+function _Ke(e) {
+ let { queue: t, actions: n } = e, r = yw({
+ queryKey: t ? rO(t) : ["item-queue", "none"],
+ queryFn: ({ signal: n }) => fO(t, e.helpers, n),
enabled: !!t
- }), i = t && r.data || null, a = i ? _O(i, e.id) : t ? null : e.id, o = xw({
- queryKey: iO(a ?? 0),
- queryFn: ({ signal: e }) => pO(a, e),
+ }), i = t && r.data || null, a = i ? hO(i, e.id) : t ? null : e.id, o = yw({
+ queryKey: nO(a ?? 0),
+ queryFn: ({ signal: e }) => dO(a, e),
enabled: a != null
});
if (!o.data || t && !i) {
@@ -78399,7 +78631,7 @@ function pKe(e) {
"data-item-media": "none",
children: [/* @__PURE__ */ (0, H.jsx)(J7, { onClose: n.close }), /* @__PURE__ */ (0, H.jsx)("div", {
"data-item-placeholder": "",
- children: e ? /* @__PURE__ */ (0, H.jsx)(HA, {
+ children: e ? /* @__PURE__ */ (0, H.jsx)(cA, {
message: ce(e),
onRetry: () => {
r.error && r.refetch(), o.error && o.refetch();
@@ -78409,9 +78641,9 @@ function pKe(e) {
})
});
}
- return /* @__PURE__ */ (0, H.jsx)(mKe, {
+ return /* @__PURE__ */ (0, H.jsx)(vKe, {
...e,
- item: ole(o.data, i),
+ item: cle(o.data, i),
queue: i
}, o.data.id);
}
@@ -78424,36 +78656,36 @@ var J7 = ({ onClose: e }) => /* @__PURE__ */ (0, H.jsx)("button", {
onClick: e,
dangerouslySetInnerHTML: { __html: L("x") }
});
-function mKe(e) {
- let { item: t, queue: n, actions: r, helpers: i } = e, a = AKe(t, r, i.tagLabel), o = (0, B.useRef)(t);
+function vKe(e) {
+ let { item: t, queue: n, actions: r, helpers: i } = e, a = PKe(t, r, i.tagLabel), o = (0, B.useRef)(t);
(0, B.useLayoutEffect)(() => {
r.present(o.current, n);
}, [r]), (0, B.useEffect)(() => {
- n?.kind === "playlist" && q(oO, {
+ n?.kind === "playlist" && q(iO, {
action: "progress",
id: n.playlistId,
asset_id: t.id
}).catch(() => {});
}, []);
- let s = ble(t, i.sourceOffline(t.location || ""));
+ let s = Sle(t, i.sourceOffline(t.location || ""));
return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsxs)("div", {
"data-stage-grid": "",
"data-with-queue": n ? "" : void 0,
"data-item-detail": "",
children: [
- /* @__PURE__ */ (0, H.jsx)(hKe, {
+ /* @__PURE__ */ (0, H.jsx)(yKe, {
item: t,
gate: s,
helpers: i,
actions: r
}),
- n ? /* @__PURE__ */ (0, H.jsx)(_Ke, {
+ n ? /* @__PURE__ */ (0, H.jsx)(xKe, {
queue: n,
itemId: t.id,
helpers: i,
actions: r
}) : null,
- /* @__PURE__ */ (0, H.jsx)(bKe, {
+ /* @__PURE__ */ (0, H.jsx)(wKe, {
item: t,
queue: n,
write: a,
@@ -78461,9 +78693,9 @@ function mKe(e) {
actions: r
})
]
- }), !n && e.relatedLimit > 0 ? /* @__PURE__ */ (0, H.jsx)(kKe, { ...e }) : null] });
+ }), !n && e.relatedLimit > 0 ? /* @__PURE__ */ (0, H.jsx)(NKe, { ...e }) : null] });
}
-function hKe({ item: e, gate: t, helpers: n, actions: r }) {
+function yKe({ item: e, gate: t, helpers: n, actions: r }) {
let [i, a] = (0, B.useState)(t ? "" : "auto"), o = (0, B.useRef)(null), s = (0, B.useRef)(e);
(0, B.useLayoutEffect)(() => {
let e = o.current;
@@ -78474,7 +78706,7 @@ function hKe({ item: e, gate: t, helpers: n, actions: r }) {
ref: o,
"data-stage-media": "",
"data-item-media": t || "video",
- children: [/* @__PURE__ */ (0, H.jsx)(J7, { onClose: r.close }), t === "offline" ? /* @__PURE__ */ (0, H.jsx)(gKe, {
+ children: [/* @__PURE__ */ (0, H.jsx)(J7, { onClose: r.close }), t === "offline" ? /* @__PURE__ */ (0, H.jsx)(bKe, {
item: e,
badge: c,
helpers: n,
@@ -78503,7 +78735,7 @@ function hKe({ item: e, gate: t, helpers: n, actions: r }) {
}) : null]
});
}
-function gKe({ item: e, badge: t, helpers: n, actions: r }) {
+function bKe({ item: e, badge: t, helpers: n, actions: r }) {
let [i, a] = (0, B.useState)(!1), [o, s] = (0, B.useState)(!1), c = async () => {
a(!0);
let t = await r.checkSource(e.location || "").catch(() => !1);
@@ -78528,8 +78760,8 @@ function gKe({ item: e, badge: t, helpers: n, actions: r }) {
]
});
}
-function _Ke({ queue: e, itemId: t, helpers: n, actions: r }) {
- let i = gle(e), a = (0, B.useRef)(null), o = yKe(e, t, r), s = (0, B.useRef)(o);
+function xKe({ queue: e, itemId: t, helpers: n, actions: r }) {
+ let i = vle(e), a = (0, B.useRef)(null), o = CKe(e, t, r), s = (0, B.useRef)(o);
s.current = o;
let c = (0, B.useCallback)((t) => {
a.current = t, t && (n.wireDrag(t), e.kind === "playlist" && n.wireDragReorder(t, {
@@ -78537,7 +78769,7 @@ function _Ke({ queue: e, itemId: t, helpers: n, actions: r }) {
attribute: "data-queue-row",
onMove: (e, t, n) => s.current.move(+e, +t, n)
}));
- }, [n, e.kind]), l = vKe(e, r), u = e.kind === "mix" ? /* @__PURE__ */ (0, H.jsx)("button", {
+ }, [n, e.kind]), l = SKe(e, r), u = e.kind === "mix" ? /* @__PURE__ */ (0, H.jsx)("button", {
type: "button",
"data-save-mix": "",
title: "保存为播放列表",
@@ -78565,10 +78797,10 @@ function _Ke({ queue: e, itemId: t, helpers: n, actions: r }) {
listRef: c,
children: e.items.map((i) => {
let a = e.kind === "editions" && i.edition_label ? /* @__PURE__ */ (0, H.jsx)("i", {
- className: `javedition ${mle[i.edition_label] || "censored"}`,
+ className: `javedition ${gle[i.edition_label] || "censored"}`,
"data-queue-edition": "",
children: i.edition_label
- }) : null, s = e.kind === "playlist" && gO(i);
+ }) : null, s = e.kind === "playlist" && mO(i);
return /* @__PURE__ */ (0, H.jsxs)(L7, {
current: i.id === t,
"data-queue-item": i.id,
@@ -78608,14 +78840,14 @@ function _Ke({ queue: e, itemId: t, helpers: n, actions: r }) {
})]
}), /* @__PURE__ */ (0, H.jsx)("span", {
"data-truncate-end": "",
- children: s ? "已消失 · 文件已不在盘上" : e.kind === "parts" ? TO(i.part_label) : be(i, n.tagLabel)
+ children: s ? "已消失 · 文件已不在盘上" : e.kind === "parts" ? CO(i.part_label) : be(i, n.tagLabel)
})]
}, i.id);
})
});
}
-function vKe(e, t) {
- let n = ww({ mutationFn: (t) => q(oO, {
+function SKe(e, t) {
+ let n = Sw({ mutationFn: (t) => q(iO, {
action: "create",
name: t,
asset_ids: e.items.map((e) => e.id),
@@ -78628,14 +78860,14 @@ function vKe(e, t) {
save: (e) => n.mutateAsync(e)
});
}
-function yKe(e, t, n) {
- let i = aO({
+function CKe(e, t, n) {
+ let i = rO({
kind: "playlist",
playlistId: e.playlistId
- }), a = (e) => (z.setQueryData(i, hO(e)), e), o = (t) => q(oO, {
+ }), a = (e) => (z.setQueryData(i, pO(e)), e), o = (t) => q(iO, {
id: e.playlistId,
...t
- }).then((e) => e.playlist), s = ww({
+ }).then((e) => e.playlist), s = Sw({
mutationFn: (e) => o({
action: "reorder",
asset_ids: e
@@ -78648,8 +78880,8 @@ function yKe(e, t, n) {
return {
move: async (t, r, i) => {
if (e.kind !== "playlist") return;
- let l = vle(c, t, r, i);
- if (yle(l, c)) return;
+ let l = ble(c, t, r, i);
+ if (xle(l, c)) return;
let u = c;
await s.mutateAsync(l), n.toast("已调整播放顺序", { undo: async () => {
a(await o({
@@ -78695,7 +78927,7 @@ function yKe(e, t, n) {
}
};
}
-function bKe({ item: e, queue: t, write: n, helpers: r, actions: i }) {
+function wKe({ item: e, queue: t, write: n, helpers: r, actions: i }) {
let a = e.location === "online", o = n.busyAttrs, [s, c] = (0, B.useState)(!1);
return /* @__PURE__ */ (0, H.jsx)("div", {
"data-stage-side": "",
@@ -78703,7 +78935,7 @@ function bKe({ item: e, queue: t, write: n, helpers: r, actions: i }) {
children: /* @__PURE__ */ (0, H.jsxs)("div", {
"data-stage-side-content": "",
children: [
- /* @__PURE__ */ (0, H.jsx)(xKe, {
+ /* @__PURE__ */ (0, H.jsx)(TKe, {
item: e,
queue: t,
helpers: r,
@@ -78715,7 +78947,7 @@ function bKe({ item: e, queue: t, write: n, helpers: r, actions: i }) {
"aria-live": "polite",
children: n.sourceState
}),
- /* @__PURE__ */ (0, H.jsx)(CKe, {
+ /* @__PURE__ */ (0, H.jsx)(DKe, {
item: e,
write: n
}),
@@ -78750,18 +78982,18 @@ function bKe({ item: e, queue: t, write: n, helpers: r, actions: i }) {
}) : null
]
}),
- /* @__PURE__ */ (0, H.jsx)(wKe, {
+ /* @__PURE__ */ (0, H.jsx)(OKe, {
item: e,
helpers: r,
actions: i
}),
- /* @__PURE__ */ (0, H.jsx)(TKe, {
+ /* @__PURE__ */ (0, H.jsx)(kKe, {
item: e,
write: n,
helpers: r,
actions: i
}),
- /* @__PURE__ */ (0, H.jsx)(DKe, { item: e }),
+ /* @__PURE__ */ (0, H.jsx)(jKe, { item: e }),
/* @__PURE__ */ (0, H.jsxs)("div", {
"data-stage-actions": "",
"data-item-feedback": "",
@@ -78863,7 +79095,7 @@ function bKe({ item: e, queue: t, write: n, helpers: r, actions: i }) {
})
]
}),
- /* @__PURE__ */ (0, H.jsx)(OKe, {
+ /* @__PURE__ */ (0, H.jsx)(MKe, {
item: e,
open: s,
write: n
@@ -78887,7 +79119,7 @@ function bKe({ item: e, queue: t, write: n, helpers: r, actions: i }) {
})
});
}
-function xKe({ item: e, queue: t, helpers: n, actions: r, onStatus: i }) {
+function TKe({ item: e, queue: t, helpers: n, actions: r, onStatus: i }) {
let a = (0, B.useRef)(null), [o, s] = (0, B.useState)(!1), [c, l] = (0, B.useState)(!1);
(0, B.useLayoutEffect)(() => {
let e = a.current;
@@ -78897,7 +79129,7 @@ function xKe({ item: e, queue: t, helpers: n, actions: r, onStatus: i }) {
}, n = new ResizeObserver(t);
return n.observe(e), t(), () => n.disconnect();
}, []);
- let u = () => s((e) => !e), d = n.badgeHtml(e.location || "", e.cost || "", "srcbig") + n.titleHtml(e) + _le(e, t);
+ let u = () => s((e) => !e), d = n.badgeHtml(e.location || "", e.cost || "", "srcbig") + n.titleHtml(e) + yle(e, t);
return /* @__PURE__ */ (0, H.jsx)("div", {
"data-item-title": "",
children: /* @__PURE__ */ (0, H.jsxs)("div", {
@@ -78928,19 +79160,19 @@ function xKe({ item: e, queue: t, helpers: n, actions: r, onStatus: i }) {
}),
e.has_cover && e.code ? /* @__PURE__ */ (0, H.jsx)("span", {
"data-cover-crop-host": "",
- children: /* @__PURE__ */ (0, H.jsx)(dKe, {
+ children: /* @__PURE__ */ (0, H.jsx)(hKe, {
code: e.code,
coverUrl: pe(e),
box: e.poster_box || null,
onSaved: (t) => {
z.invalidateQueries({
- queryKey: iO(e.id),
+ queryKey: nO(e.id),
exact: !0
- }), rO((t) => t.code === e.code, { poster_box: t });
+ }), tO((t) => t.code === e.code, { poster_box: t });
}
})
}) : null,
- e.location === "online" ? null : /* @__PURE__ */ (0, H.jsx)(SKe, {
+ e.location === "online" ? null : /* @__PURE__ */ (0, H.jsx)(EKe, {
id: e.id,
actions: r,
onStatus: i
@@ -78950,7 +79182,7 @@ function xKe({ item: e, queue: t, helpers: n, actions: r, onStatus: i }) {
})
});
}
-function SKe({ id: e, actions: t, onStatus: n }) {
+function EKe({ id: e, actions: t, onStatus: n }) {
let [r, i] = (0, B.useState)(""), a = async () => {
r || (i("reveal"), n(""), n(await t.reveal(e)), i(""));
}, o = async () => {
@@ -78983,14 +79215,14 @@ function SKe({ id: e, actions: t, onStatus: n }) {
children: /* @__PURE__ */ (0, H.jsx)(K7, { name: "folder-sync" })
})] });
}
-function CKe({ item: e, write: t }) {
- let n = yO(e.rating);
+function DKe({ item: e, write: t }) {
+ let n = _O(e.rating);
return /* @__PURE__ */ (0, H.jsxs)("div", {
id: "detailRating",
role: "group",
"data-item-rating": "",
"aria-label": "评分",
- "data-value": vO(e.rating),
+ "data-value": gO(e.rating),
children: [/* @__PURE__ */ (0, H.jsx)("div", {
"data-rating-stars": "",
children: [
@@ -79012,12 +79244,12 @@ function CKe({ item: e, write: t }) {
}), /* @__PURE__ */ (0, H.jsx)("span", {
"data-rating-value": "",
"aria-live": "polite",
- children: lle(e.rating)
+ children: dle(e.rating)
})]
});
}
-function wKe({ item: e, actions: t }) {
- let n = (0, B.useMemo)(() => cle(e), [e]), [r, i] = (0, B.useState)(!1), a = Math.max(0, n.cast.length - 8), o = (e, n, i) => {
+function OKe({ item: e, actions: t }) {
+ let n = (0, B.useMemo)(() => ule(e), [e]), [r, i] = (0, B.useState)(!1), a = Math.max(0, n.cast.length - 8), o = (e, n, i) => {
let a = e === "performer" && i >= 8 && !r, o = e === "performer" ? /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [/* @__PURE__ */ (0, H.jsx)("span", { children: n.name.slice(0, 1) }), /* @__PURE__ */ (0, H.jsx)(q7, { html: ge({
id: n.id,
hasImage: n.has_image,
@@ -79131,8 +79363,8 @@ function wKe({ item: e, actions: t }) {
]
});
}
-function TKe({ item: e, write: t, helpers: n, actions: r }) {
- let i = dle(e, n);
+function kKe({ item: e, write: t, helpers: n, actions: r }) {
+ let i = ple(e, n);
return /* @__PURE__ */ (0, H.jsxs)("div", {
"data-stage-tags": "",
id: "detailTags",
@@ -79153,14 +79385,14 @@ function TKe({ item: e, write: t, helpers: n, actions: r }) {
onClick: () => t.removeTag(e),
children: /* @__PURE__ */ (0, H.jsx)(K7, { name: "x" })
})]
- }, e.k)), /* @__PURE__ */ (0, H.jsx)(EKe, {
+ }, e.k)), /* @__PURE__ */ (0, H.jsx)(AKe, {
item: e,
write: t,
helpers: n
})]
});
}
-function EKe({ item: e, write: t, helpers: n }) {
+function AKe({ item: e, write: t, helpers: n }) {
let r = (0, B.useRef)(null), i = (0, B.useRef)(null), o = (0, B.useRef)(null), s = (0, B.useRef)(!1), [c, l] = (0, B.useState)(!1), [u, d] = (0, B.useState)(""), [f, p] = (0, B.useState)(""), [m, h] = (0, B.useState)(-1), g = (0, B.useCallback)(() => {
i.current && a(i.current), l(!1);
}, []);
@@ -79174,7 +79406,7 @@ function EKe({ item: e, write: t, helpers: n }) {
clearTimeout(t), document.removeEventListener("pointerdown", e, !0);
};
}, [c, g]);
- let v = c ? ple(f, n.tagCandidates(), wO()) : {
+ let v = c ? hle(f, n.tagCandidates(), SO()) : {
recent: [],
results: [],
create: ""
@@ -79202,12 +79434,12 @@ function EKe({ item: e, write: t, helpers: n }) {
if (n.key === "Enter") {
n.preventDefault();
let r = m >= 0 ? y[m] : null;
- r ? b(r, r.n !== -1 && bO(e, r.k)) : u.trim() && (g(), t.addTag(u.trim()));
+ r ? b(r, r.n !== -1 && vO(e, r.k)) : u.trim() && (g(), t.addTag(u.trim()));
}
}
}, S = -1, C = (t) => {
S += 1;
- let r = S, i = bO(e, t.k);
+ let r = S, i = vO(e, t.k);
return /* @__PURE__ */ (0, H.jsxs)("button", {
type: "button",
"data-pick": t.k,
@@ -79304,8 +79536,8 @@ function EKe({ item: e, write: t, helpers: n }) {
})]
})] });
}
-function DKe({ item: e }) {
- let t = xle(e);
+function jKe({ item: e }) {
+ let t = Cle(e);
return /* @__PURE__ */ (0, H.jsxs)("div", {
"data-item-trace": "",
children: [/* @__PURE__ */ (0, H.jsxs)("div", {
@@ -79339,7 +79571,7 @@ function DKe({ item: e }) {
})]
});
}
-function OKe({ item: e, open: t, write: n }) {
+function MKe({ item: e, open: t, write: n }) {
let [r, i] = (0, B.useState)(e.like_reason || ""), a = (0, B.useRef)(null);
(0, B.useEffect)(() => {
t && a.current?.focus();
@@ -79378,10 +79610,10 @@ function OKe({ item: e, open: t, write: n }) {
})]
});
}
-function kKe(e) {
- let { item: t, relatedLimit: n, helpers: r, grid: i } = e, a = xw({
- queryKey: rle(t.id, n),
- queryFn: async ({ signal: e }) => (await K(ale(t.id, n), e)).items || []
+function NKe(e) {
+ let { item: t, relatedLimit: n, helpers: r, grid: i } = e, a = yw({
+ queryKey: ale(t.id, n),
+ queryFn: async ({ signal: e }) => (await K(sle(t.id, n), e)).items || []
}), [o] = (0, B.useState)(() => r.relatedSkeletonHtml()), c = (0, B.useCallback)((e) => {
e && (s(e), r.wireDrag(e));
}, [r]);
@@ -79394,7 +79626,7 @@ function kKe(e) {
ref: c,
id: "nrow",
"data-related-row": "",
- children: a.data ? /* @__PURE__ */ (0, H.jsx)(QA, {
+ children: a.data ? /* @__PURE__ */ (0, H.jsx)(OA, {
mode: "items",
variant: "next",
items: a.data,
@@ -79411,8 +79643,8 @@ function kKe(e) {
})]
});
}
-function AKe(e, t, n) {
- let r = e.id, i = iO(r), [a, o] = (0, B.useState)(() => /* @__PURE__ */ new Set()), [s, c] = (0, B.useState)(""), [l, u] = (0, B.useState)(""), d = (e, t) => o((n) => {
+function PKe(e, t, n) {
+ let r = e.id, i = nO(r), [a, o] = (0, B.useState)(() => /* @__PURE__ */ new Set()), [s, c] = (0, B.useState)(""), [l, u] = (0, B.useState)(""), d = (e, t) => o((n) => {
let r = new Set(n);
return t ? r.add(e) : r.delete(e), r;
}), f = () => z.getQueryData(i) || e, p = (e) => {
@@ -79428,11 +79660,11 @@ function AKe(e, t, n) {
rating: t.rating,
o_count: t.o_count
};
- return nO(r, n), t;
+ return eO(r, n), t;
}, m = (e, t) => q(e, {
id: r,
...t
- }), h = ww({
+ }), h = Sw({
mutationFn: ({ run: e }) => e(),
onError: (e, { action: n }) => t.failure(n, e),
onSettled: (e, t, { name: n }) => d(n, !1)
@@ -79443,7 +79675,7 @@ function AKe(e, t, n) {
run: n
}));
}, _ = async (e, t) => {
- let n = await m(sO, t === void 0 ? { kind: e } : {
+ let n = await m(aO, t === void 0 ? { kind: e } : {
kind: e,
value: t
});
@@ -79463,21 +79695,21 @@ function AKe(e, t, n) {
"aria-disabled": !0
} : {},
rate: (e) => g(`rate:${e}`, "评分", async () => {
- let n = f().rating || 0, r = ule(n, e);
- await _("rate", r), t.toast(r ? `已评 ${yO(r)} 星` : "已取消评分", { undo: async () => {
+ let n = f().rating || 0, r = fle(n, e);
+ await _("rate", r), t.toast(r ? `已评 ${_O(r)} 星` : "已取消评分", { undo: async () => {
await _("rate", n);
} });
}),
feedback: (e) => g(e, "操作", async () => {
let n = { feedback: f().feedback || null }, r = await _(e);
- t.toast(EO(e, r), { undo: async () => {
+ t.toast(wO(e, r), { undo: async () => {
e === "o" ? await _("o-undo") : e === "dispose" ? await _("dispose") : (r.feedback && await _(r.feedback), n.feedback && await _(n.feedback)), await t.trashChanged(f().disposal || null, !0);
} }), e === "dispose" && await t.trashChanged(r.disposal || null, !1);
}),
later: () => g("later", "更新稍后看", async () => {
- let e = await m(lO, {});
+ let e = await m(sO, {});
p({ watch_later: e.watch_later }), t.toast(e.watch_later ? "已加入稍后看" : "已移出稍后看", { undo: async () => {
- p({ watch_later: (await m(lO, {})).watch_later });
+ p({ watch_later: (await m(sO, {})).watch_later });
} });
}),
quality: () => g("quality", "更新版本需求", async () => {
@@ -79487,9 +79719,9 @@ function AKe(e, t, n) {
}, n = (e) => p({
better_version: e.better_version,
better_version_reason: e.better_version_reason || ""
- }), r = await m(uO, { wanted: !e.wanted });
+ }), r = await m(cO, { wanted: !e.wanted });
n(r), t.toast(r.better_version ? "已标记寻找更好版本" : "已取消寻找更好版本", { undo: async () => {
- n(await m(uO, e));
+ n(await m(cO, e));
} });
}),
preference: ({ liked: e, reason: n }) => {
@@ -79503,7 +79735,7 @@ function AKe(e, t, n) {
});
u("保存中…");
try {
- o(await m(dO, {
+ o(await m(lO, {
liked: a,
reason: i
}));
@@ -79513,7 +79745,7 @@ function AKe(e, t, n) {
u("已保存"), setTimeout(() => u((e) => e === "已保存" ? "" : e), 1400);
let s = f();
t.toast(s.liked ? "已保存喜欢偏好" : "已取消喜欢", { undo: async () => {
- o(await m(dO, r));
+ o(await m(lO, r));
} });
});
},
@@ -79522,11 +79754,11 @@ function AKe(e, t, n) {
operation: "remove",
tag: e.k
})).ok) throw Error("标签未删除");
- p((t) => xO(t, e.k)), t.toast(`已删除标签「${n(e.k)}」`, { undo: async () => {
- await m(cO, {
+ p((t) => yO(t, e.k)), t.toast(`已删除标签「${n(e.k)}」`, { undo: async () => {
+ await m(oO, {
operation: "add",
tag: e.k
- }), p((t) => SO(t, e));
+ }), p((t) => bO(t, e));
} });
}),
addTag: (e) => {
@@ -79535,14 +79767,14 @@ function AKe(e, t, n) {
(await m("/api/item-tag", {
operation: "add",
tag: r
- })).ok && (p((e) => SO(e, {
+ })).ok && (p((e) => bO(e, {
k: r,
cat: "general"
- })), fle(r), t.toast(`已添加标签「${n(r)}」`, { undo: async () => {
- await m(cO, {
+ })), mle(r), t.toast(`已添加标签「${n(r)}」`, { undo: async () => {
+ await m(oO, {
operation: "remove",
tag: r
- }), p((e) => xO(e, r));
+ }), p((e) => yO(e, r));
} }));
});
}
@@ -79551,16 +79783,16 @@ function AKe(e, t, n) {
//#endregion
//#region src/react/stage/stage-player.ts
var Y7 = null, X7 = null, Z7 = null, Q7 = null, $7 = null, e9 = !1, t9 = 0, n9 = null, r9 = () => !1, i9 = (e, t, n) => `${e}:${t}:${n ?? ""}`;
-function jKe(e, t) {
- Y7 = e, r9 = () => t.isOpen(), n9 = () => t.requestClose(), mce({
+function FKe(e, t) {
+ Y7 = e, r9 = () => t.isOpen(), n9 = () => t.requestClose(), gce({
...e.player,
stage: () => document.getElementById("stage")
- }), hce({
+ }), _ce({
inMiniplayer: (e) => X7?.player === e,
kind: (e) => X7?.player === e ? X7.kind : Z7?.kind ?? Q7?.kind ?? "item",
expand: () => S9(),
toMiniplayer: () => C9()
- }), a9 || (a9 = !0, addEventListener("pagehide", () => FD()));
+ }), a9 || (a9 = !0, addEventListener("pagehide", () => ND()));
}
var a9 = !1;
function o9() {
@@ -79570,10 +79802,10 @@ function o9() {
function s9(e) {
Q7 = e;
}
-var MKe = () => Q7;
+var IKe = () => Q7;
function c9(e, t) {
let { kind: n, item: r, media: i = null } = t, a = i9(n, r.id, i?.index ?? null);
- if (X7 && X7.key === a) return NKe(e, X7);
+ if (X7 && X7.key === a) return LKe(e, X7);
X7 && x9();
let o = {
player: null,
@@ -79585,7 +79817,7 @@ function c9(e, t) {
Z7 = o;
let s = document.createElement("video");
t.id && (s.id = t.id), s.className = "video-js vjs-big-play-centered", s.controls = !0, s.setAttribute("playsinline", ""), s.preload = "metadata", t.poster && (s.poster = t.poster), t.onError && s.addEventListener("error", t.onError), e.append(s);
- let c = YD(s, {
+ let c = qD(s, {
kind: n,
item: r,
media: i,
@@ -79598,12 +79830,12 @@ function c9(e, t) {
});
return () => {
let e = !!o.player && X7?.player === o.player;
- Z7 === o && (Z7 = null), c(), !e && (o.player || (s.pause(), s.removeAttribute("src"), s.load()), FD());
+ Z7 === o && (Z7 = null), c(), !e && (o.player || (s.pause(), s.removeAttribute("src"), s.load()), ND());
};
}
-function NKe(e, t) {
+function LKe(e, t) {
let { player: n } = t;
- y9(t), X7 = null, b9(), n.el().classList.remove("vjs-peach-mini"), qD(e), e.append(n.el()), uD(n);
+ y9(t), X7 = null, b9(), n.el().classList.remove("vjs-peach-mini"), GD(e), e.append(n.el()), cD(n);
let r = {
player: n,
kind: t.kind,
@@ -79612,22 +79844,22 @@ function NKe(e, t) {
key: t.key
};
Z7 = r;
- let i = JD(n, e);
- return dD(n), () => {
- Z7 === r && (Z7 = null), i(), X7?.player !== n && (lD() === n && uD(null), DD(n), FD());
+ let i = KD(n, e);
+ return lD(n), () => {
+ Z7 === r && (Z7 = null), i(), X7?.player !== n && (sD() === n && cD(null), TD(n), ND());
};
}
var l9 = () => {
let e = Z7?.player;
return e && !e.isDisposed() ? e : null;
};
-function PKe(e) {
+function RKe(e) {
let t = e9;
e9 = !1, X7?.pending && x9();
let n = Z7, r = n?.player, i = Q7;
if (!n || !r || r.isDisposed() || !i || !$7) return;
let a = o9().player.settings();
- (t || e && a.miniplayer && !r.paused() && !r.ended() && !r.error()) && zKe({
+ (t || e && a.miniplayer && !r.paused() && !r.ended() && !r.error()) && UKe({
player: r,
kind: n.kind,
item: n.item,
@@ -79635,7 +79867,7 @@ function PKe(e) {
key: n.key
}, i);
}
-function FKe(e, t) {
+function zKe(e, t) {
if (e9 = !1, X7) {
if (X7.kind === e && X7.item.id === t) {
X7.pending = !0, b9();
@@ -79648,11 +79880,11 @@ function u9(e) {
$7 = e, $7 && _9();
}
var d9 = () => !!X7 && !X7.pending && !X7.player.isDisposed();
-function IKe() {
+function BKe() {
return d9() ? $7?.frame.querySelector("video") ?? null : null;
}
-function LKe() {
- return r9() ? document.getElementById("stage")?.querySelector("video") ?? null : IKe();
+function VKe() {
+ return r9() ? document.getElementById("stage")?.querySelector("video") ?? null : BKe();
}
function f9(e) {
$7 && ($7.title.textContent = e.title || "", $7.sub.textContent = e.sub || "", $7.info.setAttribute("aria-label", e.title ? `展开到详情:${e.title}` : "展开到详情"));
@@ -79701,7 +79933,7 @@ function v9(e) {
function y9(e) {
e.off.forEach((e) => e()), e.off = [];
}
-function RKe() {
+function HKe() {
let e = $7?.root;
if (!e) return;
let t = e.hidden;
@@ -79722,7 +79954,7 @@ function b9() {
e.style.transform = "";
}
}
-function zKe(e, t) {
+function UKe(e, t) {
if (!$7) return;
let n = {
...e,
@@ -79730,13 +79962,13 @@ function zKe(e, t) {
off: [],
pending: !1
};
- X7 = n, t9++, e.player.el().classList.add("vjs-peach-mini"), $7.frame.prepend(e.player.el()), f9(t), v9(n), RKe(), dD(e.player);
+ X7 = n, t9++, e.player.el().classList.add("vjs-peach-mini"), $7.frame.prepend(e.player.el()), f9(t), v9(n), HKe(), lD(e.player);
}
function x9() {
let e = X7;
e && y9(e), X7 = null, t9++;
let t = e?.player ?? null;
- t && lD() === t && uD(null), DD(t), t && FD(), $7?.frame.querySelectorAll(".video-js,video").forEach((e) => e.remove()), sD(), b9();
+ t && sD() === t && cD(null), TD(t), t && ND(), $7?.frame.querySelectorAll(".video-js,video").forEach((e) => e.remove()), aD(), b9();
}
function S9() {
if (!d9() || !X7) return;
@@ -79750,7 +79982,7 @@ function C9() {
}
r9() && l9() && n9 && (e9 = !0, n9());
}
-function BKe() {
+function WKe() {
let e = X7?.player;
!e || e.isDisposed() || (e.paused() ? e.play()?.catch(() => {}) : e.pause());
}
@@ -79763,7 +79995,7 @@ function w9(e) {
function T9(e) {
return !(!d9() || !e || e.part_group || e.edition_group || e.medium && e.medium !== "video" || e.cost === "metered" && e.location !== "online" || e.location === "online" && !e.follow_item_id || o9().sourceOffline(String(e.location ?? "")));
}
-async function VKe(e) {
+async function GKe(e) {
if (!d9() || !X7 || !$7) return;
let t = ++t9, n = await N(`/api/item?id=${e}`).catch(() => null);
if (t !== t9 || !d9() || !X7 || !$7 || !n || n.error) return;
@@ -79772,7 +80004,7 @@ async function VKe(e) {
return;
}
let r = X7;
- y9(r), lD() === r.player && uD(null), DD(r.player), FD(), $7.frame.querySelectorAll(".video-js,video").forEach((e) => e.remove());
+ y9(r), sD() === r.player && cD(null), TD(r.player), ND(), $7.frame.querySelectorAll(".video-js,video").forEach((e) => e.remove());
let i = document.createElement("video");
i.className = "video-js", i.setAttribute("playsinline", ""), i.preload = "metadata", $7.frame.prepend(i);
let a = {
@@ -79781,14 +80013,14 @@ async function VKe(e) {
title: String(n.title || n.name || ""),
sub: String(n.performers?.[0] || n.creator || "未归属")
};
- f9(a), YD(i, {
+ f9(a), qD(i, {
kind: "item",
item: n,
autoplay: !0,
chrome: !1,
onPlayer: (r) => {
if (t !== t9) {
- r && lD() === r && uD(null), DD(r);
+ r && sD() === r && cD(null), TD(r);
return;
}
if (!r) {
@@ -79816,9 +80048,9 @@ var E9 = ({ name: e }) => /* @__PURE__ */ (0, H.jsx)("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
children: /* @__PURE__ */ (0, H.jsx)("use", { href: `#i-${e}` })
-}), HKe = { __html: "<svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><use href=\"#i-player-pause\"/></svg>" }, D9 = (e) => (t) => {
+}), KKe = { __html: "<svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><use href=\"#i-player-pause\"/></svg>" }, D9 = (e) => (t) => {
t.stopPropagation(), e();
-}, UKe = (0, B.memo)(function() {
+}, qKe = (0, B.memo)(function() {
let e = (0, B.useRef)(null), t = (0, B.useRef)(null), n = (0, B.useRef)(null), r = (0, B.useRef)(null), i = (0, B.useRef)(null), a = (0, B.useRef)(null), o = (0, B.useRef)(null), s = (0, B.useRef)(null), c = (0, B.useRef)(null), l = (0, B.useRef)(null);
return (0, B.useLayoutEffect)(() => (u9({
root: e.current,
@@ -79830,7 +80062,7 @@ var E9 = ({ name: e }) => /* @__PURE__ */ (0, H.jsx)("svg", {
title: s.current,
sub: c.current,
info: l.current
- }), () => u9(null)), []), (0, B.useEffect)(() => GKe(e.current, t.current), []), /* @__PURE__ */ (0, H.jsx)("aside", {
+ }), () => u9(null)), []), (0, B.useEffect)(() => YKe(e.current, t.current), []), /* @__PURE__ */ (0, H.jsx)("aside", {
ref: e,
"data-miniplayer": "",
id: "miniplayer",
@@ -79880,8 +80112,8 @@ var E9 = ({ name: e }) => /* @__PURE__ */ (0, H.jsx)("svg", {
id: "miniplayerPlay",
"aria-label": "暂停",
"aria-keyshortcuts": "k",
- onClick: D9(BKe),
- dangerouslySetInnerHTML: HKe
+ onClick: D9(WKe),
+ dangerouslySetInnerHTML: KKe
}),
/* @__PURE__ */ (0, H.jsx)("button", {
ref: o,
@@ -79920,7 +80152,7 @@ var E9 = ({ name: e }) => /* @__PURE__ */ (0, H.jsx)("svg", {
})
});
});
-function WKe(e, t, n) {
+function JKe(e, t, n) {
let r = e.getBoundingClientRect(), i = (r.top + r.height / 2 < innerHeight / 2 ? "t" : "b") + (r.left + r.width / 2 < innerWidth / 2 ? "l" : "r"), a = parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--topH")) || 56, o = {
left: r.left - t,
top: r.top - n
@@ -79942,7 +80174,7 @@ function WKe(e, t, n) {
};
e.addEventListener("transitionend", u), setTimeout(u, 600);
}
-function GKe(e, t) {
+function YKe(e, t) {
let n = null, r = (e) => {
if (!(e.button !== 0 || e.target.closest("[data-miniplayer-button],[data-miniplayer-play],[data-miniplayer-seek],.vjs-control-bar"))) {
n = {
@@ -79968,7 +80200,7 @@ function GKe(e, t) {
} catch {}
i.moved && (e.dataset.dragged = "1", setTimeout(() => {
delete e.dataset.dragged;
- }, 0), WKe(e, i.dx, i.dy));
+ }, 0), JKe(e, i.dx, i.dy));
}, o = (t) => {
e.dataset.dragged && (t.stopPropagation(), t.preventDefault());
}, s = (e) => {
@@ -79988,21 +80220,21 @@ function L9() {
if (!O9) throw Error("舞台还没有接上宿主(configureStage)");
return O9;
}
-function KKe() {
+function XKe() {
return (!k9 || !A9?.isConnected) && (k9?.unmount(), A9 = document.createElement("div"), A9.dataset.stageHost = "", document.body.append(A9), k9 = (0, Ot.createRoot)(A9)), k9;
}
function R9() {
- let e = KKe();
- (0, Dt.flushSync)(() => e.render(/* @__PURE__ */ (0, H.jsx)(qE, { children: /* @__PURE__ */ (0, H.jsx)(qKe, { view: j9 }) })));
+ let e = XKe();
+ (0, Dt.flushSync)(() => e.render(/* @__PURE__ */ (0, H.jsx)(GE, { children: /* @__PURE__ */ (0, H.jsx)(ZKe, { view: j9 }) })));
}
-function qKe({ view: e }) {
- return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [e ? /* @__PURE__ */ (0, H.jsx)(JKe, { view: e }, e.generation) : null, /* @__PURE__ */ (0, H.jsx)(UKe, {})] });
+function ZKe({ view: e }) {
+ return /* @__PURE__ */ (0, H.jsxs)(H.Fragment, { children: [e ? /* @__PURE__ */ (0, H.jsx)(QKe, { view: e }, e.generation) : null, /* @__PURE__ */ (0, H.jsx)(qKe, {})] });
}
var z9 = () => /* @__PURE__ */ (0, H.jsx)("div", {
"data-skeleton": "detail",
role: "status",
"aria-label": "正在读取作品详情",
- dangerouslySetInnerHTML: { __html: PGe() }
+ dangerouslySetInnerHTML: { __html: RGe() }
});
function B9(e) {
let t = e.currentTarget;
@@ -80010,7 +80242,7 @@ function B9(e) {
let n = t.getBoundingClientRect();
return e.clientX < n.left || e.clientX > n.right || e.clientY < n.top || e.clientY > n.bottom;
}
-function JKe({ view: e }) {
+function QKe({ view: e }) {
let t = (0, B.useRef)(null);
(0, B.useLayoutEffect)(() => {
let e = t.current, n = (e) => {
@@ -80018,7 +80250,7 @@ function JKe({ view: e }) {
};
return e.addEventListener("cancel", n), () => e.removeEventListener("cancel", n);
}, []);
- let { phase: n, content: r } = e, i = r.kind === "item" ? /* @__PURE__ */ (0, H.jsx)(pKe, { ...r.props }) : /* @__PURE__ */ (0, H.jsx)(tKe, { ...r.props });
+ let { phase: n, content: r } = e, i = r.kind === "item" ? /* @__PURE__ */ (0, H.jsx)(_Ke, { ...r.props }) : /* @__PURE__ */ (0, H.jsx)(aKe, { ...r.props });
return /* @__PURE__ */ (0, H.jsxs)("dialog", {
ref: t,
id: "stage",
@@ -80057,7 +80289,7 @@ function H9(e, t) {
let n = I9();
n?.toggleAttribute("data-ambient", e), n?.toggleAttribute("data-theater", t);
}
-function YKe(e) {
+function $Ke(e) {
let t = e.resume ?? null, n = (n) => {
let r = t && (e.id == null || e.id === n) ? t : null;
return t = null, r;
@@ -80119,7 +80351,7 @@ function YKe(e) {
}
};
}
-function XKe(e, t) {
+function eqe(e, t) {
let n = e.querySelector(":scope > [data-stage-fade]");
e.setAttribute("data-stage-reveal", ""), e.getBoundingClientRect(), e.setAttribute("data-stage-revealing", "");
let r = 0, i = () => {
@@ -80132,13 +80364,13 @@ function XKe(e, t) {
};
n?.addEventListener("transitionend", a), r = window.setTimeout(i, 1e3);
}
-async function ZKe(e) {
+async function tqe(e) {
j9 && U9({ miniplayer: !1 });
let t = ++M9, n = new AbortController();
- N9 = n, P9 = !1, F9 = !1, FKe(e.kind, e.id ?? NaN), j9 = {
+ N9 = n, P9 = !1, F9 = !1, zKe(e.kind, e.id ?? NaN), j9 = {
generation: t,
request: e,
- content: YKe(e),
+ content: $Ke(e),
phase: "skeleton"
}, R9();
let r = I9();
@@ -80146,7 +80378,7 @@ async function ZKe(e) {
s(r), document.body.setAttribute("data-detail-open", ""), r.open || r.showModal();
let i = j9.content;
try {
- i.kind === "item" ? await sle(i.props, n.signal) : await RGe(i.props, n.signal);
+ i.kind === "item" ? await lle(i.props, n.signal) : await HGe(i.props, n.signal);
} catch {
if (n.signal.aborted) return;
}
@@ -80155,11 +80387,11 @@ async function ZKe(e) {
j9 = {
...j9,
phase: a ? "content" : "reveal"
- }, R9(), a || XKe(r, t), v(r, ":scope>:not([data-stage-fade]) [data-reveal-line]");
+ }, R9(), a || eqe(r, t), v(r, ":scope>:not([data-stage-fade]) [data-reveal-line]");
let o = document.activeElement;
(o === r || !r.contains(o)) && r.querySelector("#closeStage")?.focus();
}
-function QKe() {
+function nqe() {
let e = I9();
return !e?.open || e.hasAttribute("data-closing") || matchMedia("(prefers-reduced-motion: reduce)").matches ? Promise.resolve() : (e.setAttribute("data-closing", ""), new Promise((t) => {
let n = 0, r = () => {
@@ -80171,11 +80403,11 @@ function QKe() {
}));
}
function U9({ miniplayer: e = !0 } = {}) {
- if (M9++, N9?.abort(), N9 = null, PKe(e), !j9) return;
+ if (M9++, N9?.abort(), N9 = null, RKe(e), !j9) return;
let t = I9();
- t && De(t), sD(), t?.open && t.close(), j9 = null, P9 = !1, F9 = !1, R9(), s9(null), document.body.removeAttribute("data-detail-open");
+ t && De(t), aD(), t?.open && t.close(), j9 = null, P9 = !1, F9 = !1, R9(), s9(null), document.body.removeAttribute("data-detail-open");
}
-function $Ke(e) {
+function rqe(e) {
!j9 || j9.content.kind !== "item" || (j9 = {
...j9,
content: {
@@ -80187,60 +80419,60 @@ function $Ke(e) {
}
}, R9());
}
-function eqe() {
- let e = MKe(), t = e?.kind === "item" ? e.item : null, n = t ? me(t, L9().player.settings().javImage) : "";
+function iqe() {
+ let e = IKe(), t = e?.kind === "item" ? e.item : null, n = t ? me(t, L9().player.settings().javImage) : "";
if (!n) return;
let r = l9();
r ? r.poster(n) : document.getElementById("vid")?.setAttribute("poster", n);
}
-var tqe = {
- open: ZKe,
- update: $Ke,
- exit: QKe,
+var aqe = {
+ open: tqe,
+ update: rqe,
+ exit: nqe,
dispose: U9,
requestClose: V9,
- repaintPoster: eqe,
+ repaintPoster: iqe,
isOpen: () => !!j9,
- activeVideo: () => LKe(),
+ activeVideo: () => VKe(),
toggleTheater: () => {
- j9 && ED(!L9().player.settings().theaterMode);
+ j9 && wD(!L9().player.settings().theaterMode);
},
toggleMiniplayer: () => C9(),
closeMiniplayer: () => x9(),
miniplayerActive: () => d9(),
miniplayerTakesCard: (e) => T9(e),
miniplayerPlay: (e) => {
- VKe(e);
+ GKe(e);
}
};
-function nqe(e) {
- return O9 = e, jKe(e, {
+function oqe(e) {
+ return O9 = e, FKe(e, {
isOpen: () => !!j9,
requestClose: V9
- }), R9(), tqe;
+ }), R9(), aqe;
}
//#endregion
//#region node_modules/sonner/dist/index.mjs
-function rqe(e) {
+function sqe(e) {
if (!e || typeof document > "u") return;
let t = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style");
n.type = "text/css", t.appendChild(n), n.styleSheet ? n.styleSheet.cssText = e : n.appendChild(document.createTextNode(e));
}
-var iqe = (e) => {
+var cqe = (e) => {
switch (e) {
- case "success": return sqe;
- case "info": return lqe;
- case "warning": return cqe;
- case "error": return uqe;
+ case "success": return dqe;
+ case "info": return pqe;
+ case "warning": return fqe;
+ case "error": return mqe;
default: return null;
}
-}, aqe = Array(12).fill(0), oqe = ({ visible: e, className: t }) => /*#__PURE__*/ B.createElement("div", {
+}, lqe = Array(12).fill(0), uqe = ({ visible: e, className: t }) => /*#__PURE__*/ B.createElement("div", {
className: ["sonner-loading-wrapper", t].filter(Boolean).join(" "),
"data-visible": e
-}, /*#__PURE__*/ B.createElement("div", { className: "sonner-spinner" }, aqe.map((e, t) => /*#__PURE__*/ B.createElement("div", {
+}, /*#__PURE__*/ B.createElement("div", { className: "sonner-spinner" }, lqe.map((e, t) => /*#__PURE__*/ B.createElement("div", {
className: "sonner-loading-bar",
key: `spinner-bar-${t}`
-})))), sqe = /*#__PURE__*/ B.createElement("svg", {
+})))), dqe = /*#__PURE__*/ B.createElement("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 20 20",
fill: "currentColor",
@@ -80251,7 +80483,7 @@ var iqe = (e) => {
fillRule: "evenodd",
d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",
clipRule: "evenodd"
-})), cqe = /*#__PURE__*/ B.createElement("svg", {
+})), fqe = /*#__PURE__*/ B.createElement("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
fill: "currentColor",
@@ -80262,7 +80494,7 @@ var iqe = (e) => {
fillRule: "evenodd",
d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",
clipRule: "evenodd"
-})), lqe = /*#__PURE__*/ B.createElement("svg", {
+})), pqe = /*#__PURE__*/ B.createElement("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 20 20",
fill: "currentColor",
@@ -80273,7 +80505,7 @@ var iqe = (e) => {
fillRule: "evenodd",
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",
clipRule: "evenodd"
-})), uqe = /*#__PURE__*/ B.createElement("svg", {
+})), mqe = /*#__PURE__*/ B.createElement("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 20 20",
fill: "currentColor",
@@ -80284,7 +80516,7 @@ var iqe = (e) => {
fillRule: "evenodd",
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",
clipRule: "evenodd"
-})), dqe = /*#__PURE__*/ B.createElement("svg", {
+})), hqe = /*#__PURE__*/ B.createElement("svg", {
xmlns: "http://www.w3.org/2000/svg",
width: "12",
height: "12",
@@ -80305,7 +80537,7 @@ var iqe = (e) => {
y1: "6",
x2: "18",
y2: "18"
-})), fqe = () => {
+})), gqe = () => {
let [e, t] = B.useState(document.hidden);
return B.useEffect(() => {
let e = () => {
@@ -80313,7 +80545,7 @@ var iqe = (e) => {
};
return document.addEventListener("visibilitychange", e), () => document.removeEventListener("visibilitychange", e);
}, []), e;
-}, pqe = 1, mqe = 100, W9 = (e) => typeof e?.id == "number" || e?.id?.length > 0 ? e.id : pqe++, G9 = new class {
+}, _qe = 1, vqe = 100, W9 = (e) => typeof e?.id == "number" || e?.id?.length > 0 ? e.id : _qe++, G9 = new class {
constructor() {
this.subscribe = (e) => (this.subscribers.push(e), this.getActiveToasts().forEach((t) => e(t)), () => {
let t = this.subscribers.indexOf(e);
@@ -80323,7 +80555,7 @@ var iqe = (e) => {
}, this.addToast = (e) => {
this.publish(e), this.toasts = [...this.toasts, e], this.trimHistory();
}, this.trimHistory = () => {
- let e = this.toasts.length - mqe;
+ let e = this.toasts.length - vqe;
e <= 0 || (this.toasts = this.toasts.filter((t) => e > 0 && this.dismissedToasts.has(t.id) ? (this.dismissedToasts.delete(t.id), e--, !1) : !0));
}, this.create = (e) => {
let { message: t, ...n } = e, r = W9(e), i = this.pendingDismissals.get(r);
@@ -80401,7 +80633,7 @@ var iqe = (e) => {
type: "default",
message: e
});
- else if (gqe(e) && !e.ok) {
+ else if (bqe(e) && !e.ok) {
i = !1;
let r = typeof t.error == "function" ? await t.error(`HTTP error! status: ${e.status}`) : t.error, a = typeof t.description == "function" ? await t.description(`HTTP error! status: ${e.status}`) : t.description, o = typeof r == "object" && !B.isValidElement(r) ? r : { message: r };
this.create({
@@ -80454,7 +80686,7 @@ var iqe = (e) => {
}), n;
}, this.getActiveToasts = () => this.toasts.filter((e) => !this.dismissedToasts.has(e.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set(), this.pendingDismissals = /* @__PURE__ */ new Map();
}
-}(), hqe = (e, t) => G9.message(e, t), gqe = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", K9 = Object.assign(hqe, {
+}(), yqe = (e, t) => G9.message(e, t), bqe = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", K9 = Object.assign(yqe, {
success: G9.success,
info: G9.info,
warning: G9.warning,
@@ -80468,20 +80700,20 @@ var iqe = (e) => {
getHistory: () => G9.toasts,
getToasts: () => G9.getActiveToasts()
});
-rqe("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
+sqe("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
function q9(e) {
return e.label !== void 0;
}
-var _qe = 3, vqe = "24px", yqe = "16px", J9 = 4e3, bqe = 356, xqe = 14, Sqe = 45, Cqe = 200;
+var xqe = 3, Sqe = "24px", Cqe = "16px", J9 = 4e3, wqe = 356, Tqe = 14, Eqe = 45, Dqe = 200;
function Y9(...e) {
return e.filter(Boolean).join(" ");
}
-function wqe(e) {
+function Oqe(e) {
let [t, n] = e.split("-"), r = [];
return t && r.push(t), n && r.push(n), r;
}
-var Tqe = (e) => {
- let { invert: t, toast: n, unstyled: r, interacting: i, setHeights: a, visibleToasts: o, heights: s, index: c, toasts: l, expanded: u, removeToast: d, defaultRichColors: f, closeButton: p, style: m, cancelButtonStyle: h, actionButtonStyle: g, className: _ = "", descriptionClassName: v = "", duration: y, position: b, gap: x, expandByDefault: S, classNames: C, icons: w, closeButtonAriaLabel: T = "Close toast" } = e, [E, D] = B.useState(null), [O, k] = B.useState(null), [A, j] = B.useState(!1), [M, N] = B.useState(!1), [ee, te] = B.useState(!1), [P, F] = B.useState(!1), [ne, I] = B.useState(!1), [re, L] = B.useState(0), [ie, ae] = B.useState(0), oe = B.useRef(n.duration || y || J9), se = B.useRef(null), ce = B.useRef(null), le = c === 0, R = c + 1 <= o, ue = n.type, de = ue ?? "default", fe = n.dismissible !== !1, pe = n.className || "", me = n.descriptionClassName || "", he = B.useMemo(() => s.findIndex((e) => e.toastId === n.id) || 0, [s, n.id]), ge = B.useMemo(() => n.closeButton ?? p, [n.closeButton, p]), _e = B.useMemo(() => n.duration || y || J9, [n.duration, y]), ve = B.useRef(0), ye = B.useRef(0), be = B.useRef(0), xe = B.useRef(null), [Se, Ce] = b.split("-"), we = B.useMemo(() => s.reduce((e, t, n) => n >= he ? e : e + t.height, 0), [s, he]), Te = fqe(), Ee = B.useMemo(() => e.swipeDirections ?? wqe(b), [e.swipeDirections, b]), De = n.invert || t, Oe = ue === "loading";
+var kqe = (e) => {
+ let { invert: t, toast: n, unstyled: r, interacting: i, setHeights: a, visibleToasts: o, heights: s, index: c, toasts: l, expanded: u, removeToast: d, defaultRichColors: f, closeButton: p, style: m, cancelButtonStyle: h, actionButtonStyle: g, className: _ = "", descriptionClassName: v = "", duration: y, position: b, gap: x, expandByDefault: S, classNames: C, icons: w, closeButtonAriaLabel: T = "Close toast" } = e, [E, D] = B.useState(null), [O, k] = B.useState(null), [A, j] = B.useState(!1), [M, N] = B.useState(!1), [ee, te] = B.useState(!1), [P, F] = B.useState(!1), [ne, I] = B.useState(!1), [re, L] = B.useState(0), [ie, ae] = B.useState(0), oe = B.useRef(n.duration || y || J9), se = B.useRef(null), ce = B.useRef(null), le = c === 0, R = c + 1 <= o, ue = n.type, de = ue ?? "default", fe = n.dismissible !== !1, pe = n.className || "", me = n.descriptionClassName || "", he = B.useMemo(() => s.findIndex((e) => e.toastId === n.id) || 0, [s, n.id]), ge = B.useMemo(() => n.closeButton ?? p, [n.closeButton, p]), _e = B.useMemo(() => n.duration || y || J9, [n.duration, y]), ve = B.useRef(0), ye = B.useRef(0), be = B.useRef(0), xe = B.useRef(null), [Se, Ce] = b.split("-"), we = B.useMemo(() => s.reduce((e, t, n) => n >= he ? e : e + t.height, 0), [s, he]), Te = gqe(), Ee = B.useMemo(() => e.swipeDirections ?? Oqe(b), [e.swipeDirections, b]), De = n.invert || t, Oe = ue === "loading";
ye.current = B.useMemo(() => he * x + we, [he, we]), B.useEffect(() => {
oe.current = _e;
}, [_e]), B.useEffect(() => {
@@ -80522,7 +80754,7 @@ var Tqe = (e) => {
let ke = B.useCallback(() => {
N(!0), L(ye.current), a((e) => e.filter((e) => e.toastId !== n.id)), setTimeout(() => {
d(n);
- }, Cqe);
+ }, Dqe);
}, [
n,
d,
@@ -80555,12 +80787,12 @@ var Tqe = (e) => {
return w?.loading ? /*#__PURE__*/ B.createElement("div", {
className: Y9(C?.loader, n?.classNames?.loader, "sonner-loader"),
"data-visible": ue === "loading"
- }, w.loading) : /*#__PURE__*/ B.createElement(oqe, {
+ }, w.loading) : /*#__PURE__*/ B.createElement(uqe, {
className: Y9(C?.loader, n?.classNames?.loader),
visible: ue === "loading"
});
}
- let Ae = n.icon || w?.[ue] || iqe(ue);
+ let Ae = n.icon || w?.[ue] || cqe(ue);
return /*#__PURE__*/ B.createElement("li", {
tabIndex: 0,
ref: ce,
@@ -80607,7 +80839,7 @@ var Tqe = (e) => {
if (P || !fe) return;
xe.current = null;
let e = Number(ce.current?.style.getPropertyValue("--swipe-amount-x").replace("px", "") || 0), t = Number(ce.current?.style.getPropertyValue("--swipe-amount-y").replace("px", "") || 0), r = (/* @__PURE__ */ new Date()).getTime() - se.current?.getTime(), i = E === "x" ? e : t, a = Math.abs(i) / r;
- if ((E === "x" ? Ee.includes(e > 0 ? "right" : "left") : Ee.includes(t > 0 ? "bottom" : "top")) && (Math.abs(i) >= Sqe || a > .11)) {
+ if ((E === "x" ? Ee.includes(e > 0 ? "right" : "left") : Ee.includes(t > 0 ? "bottom" : "top")) && (Math.abs(i) >= Eqe || a > .11)) {
L(ye.current), n.onDismiss == null || n.onDismiss.call(n, n), k(E === "x" ? e > 0 ? "right" : "left" : t > 0 ? "down" : "up"), ke(), F(!0);
return;
}
@@ -80648,7 +80880,7 @@ var Tqe = (e) => {
ke(), n.onDismiss == null || n.onDismiss.call(n, n);
},
className: Y9(C?.closeButton, n?.classNames?.closeButton)
- }, w?.close ?? dqe) : null, (ue || n.icon || n.promise) && n.icon !== null && (w?.[ue] !== null || n.icon) ? /*#__PURE__*/ B.createElement("div", {
+ }, w?.close ?? hqe) : null, (ue || n.icon || n.promise) && n.icon !== null && (w?.[ue] !== null || n.icon) ? /*#__PURE__*/ B.createElement("div", {
"data-icon": "",
className: Y9(C?.icon, n?.classNames?.icon)
}, ue === "loading" ? n.icon || z() : n.promise ? z() : null, ue === "loading" ? null : Ae) : null, /*#__PURE__*/ B.createElement("div", {
@@ -80683,10 +80915,10 @@ function X9() {
let e = document.documentElement.getAttribute("dir");
return e === "auto" || !e ? window.getComputedStyle(document.documentElement).direction : e;
}
-function Eqe(e, t) {
+function Aqe(e, t) {
let n = {};
return [e, t].forEach((e, t) => {
- let r = t === 1, i = r ? "--mobile-offset" : "--offset", a = r ? yqe : vqe;
+ let r = t === 1, i = r ? "--mobile-offset" : "--offset", a = r ? Cqe : Sqe;
function o(e) {
[
"top",
@@ -80707,8 +80939,8 @@ function Eqe(e, t) {
}) : o(a);
}), n;
}
-var Dqe = /*#__PURE__*/ B.forwardRef(function(e, t) {
- let { id: n, invert: r, position: i = "bottom-right", hotkey: a = ["altKey", "KeyT"], expand: o, closeButton: s, className: c, offset: l, mobileOffset: u, theme: d = "light", richColors: f, duration: p, style: m, visibleToasts: h = _qe, toastOptions: g, dir: _ = X9(), gap: v = xqe, icons: y, customAriaLabel: b, containerAriaLabel: x = "Notifications" } = e, [S, C] = B.useState([]), w = B.useMemo(() => n ? S.filter((e) => e.toasterId === n) : S.filter((e) => !e.toasterId), [S, n]), T = B.useMemo(() => Array.from(new Set([i].concat(w.filter((e) => e.position).map((e) => e.position)))), [w, i]), [E, D] = B.useState([]), [O, k] = B.useState(!1), [A, j] = B.useState(!1), [M, N] = B.useState(d === "system" ? typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : d), ee = B.useRef(null), te = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), P = B.useRef(null), F = B.useRef(!1), ne = B.useCallback((e) => {
+var jqe = /*#__PURE__*/ B.forwardRef(function(e, t) {
+ let { id: n, invert: r, position: i = "bottom-right", hotkey: a = ["altKey", "KeyT"], expand: o, closeButton: s, className: c, offset: l, mobileOffset: u, theme: d = "light", richColors: f, duration: p, style: m, visibleToasts: h = xqe, toastOptions: g, dir: _ = X9(), gap: v = Tqe, icons: y, customAriaLabel: b, containerAriaLabel: x = "Notifications" } = e, [S, C] = B.useState([]), w = B.useMemo(() => n ? S.filter((e) => e.toasterId === n) : S.filter((e) => !e.toasterId), [S, n]), T = B.useMemo(() => Array.from(new Set([i].concat(w.filter((e) => e.position).map((e) => e.position)))), [w, i]), [E, D] = B.useState([]), [O, k] = B.useState(!1), [A, j] = B.useState(!1), [M, N] = B.useState(d === "system" ? typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : d), ee = B.useRef(null), te = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), P = B.useRef(null), F = B.useRef(!1), ne = B.useCallback((e) => {
C((t) => (t.find((t) => t.id === e.id)?.delete || G9.dismiss(e.id), t.filter(({ id: t }) => t !== e.id)));
}, []);
return B.useEffect(() => G9.subscribe((e) => {
@@ -80794,10 +81026,10 @@ var Dqe = /*#__PURE__*/ B.forwardRef(function(e, t) {
"data-x-position": a,
style: {
"--front-toast-height": `${E[0]?.height || 0}px`,
- "--width": `${bqe}px`,
+ "--width": `${wqe}px`,
"--gap": `${v}px`,
...m,
- ...Eqe(l, u)
+ ...Aqe(l, u)
},
onBlur: (e) => {
F.current && !e.currentTarget.contains(e.relatedTarget) && (F.current = !1, P.current &&= (P.current.focus({ preventScroll: !0 }), null));
@@ -80815,7 +81047,7 @@ var Dqe = /*#__PURE__*/ B.forwardRef(function(e, t) {
e.target instanceof HTMLElement && e.target.dataset.dismissible === "false" || j(!0);
},
onPointerUp: () => j(!1)
- }, w.filter((e) => !e.position && n === 0 || e.position === t).map((n, i) => /*#__PURE__*/ B.createElement(Tqe, {
+ }, w.filter((e) => !e.position && n === 0 || e.position === t).map((n, i) => /*#__PURE__*/ B.createElement(kqe, {
key: n.id,
icons: y,
index: i,
@@ -80849,8 +81081,8 @@ var Dqe = /*#__PURE__*/ B.forwardRef(function(e, t) {
"data-toast-glyph": t ? "draw" : "still",
"aria-hidden": "true",
dangerouslySetInnerHTML: { __html: e }
-}), Q9 = !1, Oqe = (e, t) => {
- Q9 || (Q9 = !0, (0, Ot.createRoot)(e).render(/* @__PURE__ */ (0, H.jsx)(Dqe, {
+}), Q9 = !1, Mqe = (e, t) => {
+ Q9 || (Q9 = !0, (0, Ot.createRoot)(e).render(/* @__PURE__ */ (0, H.jsx)(jqe, {
position: "bottom-right",
closeButton: !0,
gap: 8,
@@ -80871,7 +81103,7 @@ var Dqe = /*#__PURE__*/ B.forwardRef(function(e, t) {
error: Z9(t.error, !1)
}
})));
-}, kqe = (e, t) => {
+}, Nqe = (e, t) => {
let n = t.alert ? K9.error : K9.success, r = t.action;
n(/* @__PURE__ */ (0, H.jsx)("span", { dangerouslySetInnerHTML: { __html: t.html } }), {
id: e,
@@ -80888,30 +81120,30 @@ var Dqe = /*#__PURE__*/ B.forwardRef(function(e, t) {
//#region src/react/entry.tsx
function $9(e) {
return (t, n) => {
- let r = (0, Ot.createRoot)(t), i = (t) => r.render(/* @__PURE__ */ (0, H.jsx)(qE, { children: /* @__PURE__ */ (0, H.jsx)(e, { ...t }) }));
+ let r = (0, Ot.createRoot)(t), i = (t) => r.render(/* @__PURE__ */ (0, H.jsx)(GE, { children: /* @__PURE__ */ (0, H.jsx)(e, { ...t }) }));
return (0, Dt.flushSync)(() => i(n)), {
update: i,
unmount: () => r.unmount()
};
};
}
-var Aqe = {
+var Pqe = {
"catalog-filter": {
prefetch: async () => {},
- mount: $9(AC)
+ mount: $9($ie)
},
"feed-new": {
- prefetch: vae,
- mount: $9(Nae)
+ prefetch: bae,
+ mount: $9(Fae)
},
"library-processing": {
- prefetch: (e, t) => jw(t),
- mount: $9((e) => e.mode === "notice" ? /* @__PURE__ */ (0, H.jsx)(Loe, { ...e }) : /* @__PURE__ */ (0, H.jsx)(BT, { ...e }))
+ prefetch: (e, t) => kw(t),
+ mount: $9((e) => e.mode === "notice" ? /* @__PURE__ */ (0, H.jsx)(zoe, { ...e }) : /* @__PURE__ */ (0, H.jsx)(RT, { ...e }))
},
search: {
prefetch: async () => {},
- mount: $9(uae)
+ mount: $9(fae)
}
};
//#endregion
-export { uce as configureBatchDock, fce as configureGlowPicker, Hk as configureImmerse, tA as configureManageHeader, zWe as configureRouter, oGe as configureSettingsPanel, xGe as configureSidebar, nqe as configureStage, Oqe as mountToaster, Aqe as pages, CUe as prefetchManagedRoute, kqe as showToast };
+export { fce as configureBatchDock, mce as configureGlowPicker, Qle as configureImmerse, sue as configureManageHeader, WWe as configureRouter, dGe as configureSettingsPanel, TGe as configureSidebar, oqe as configureStage, Mqe as mountToaster, Pqe as pages, DUe as prefetchManagedRoute, Nqe as showToast };