Fast, accurate OCR with correctness assessment.
Release MiniCPM-OCR 1.0 & MiniCPM-OCR Jev
yiranyyu8a16a6ad007b
diff --git a/AGENTS.md b/AGENTS.mdnew file mode 100644index 0000000..08a7cd2--- /dev/null+++ b/AGENTS.md@@ -0,0 +1,7 @@+# 文档维护++- `README.md` 是默认英文首页,`README_zh.md` 是完整中文首页。以中文内容为依据维护两种语言;修改首页内容时同步对应英文,确保信息、章节和入口一致。+- `README_en.md` 仅保留指向 `README.md` 的兼容入口,不维护第三份正文。+- 中文文档的首页回链统一指向 `README_zh.md`,英文文档统一指向 `README.md`;页面链接优先使用相同语言的文档。+- 翻译正文时保留可执行命令、模型仓库 ID、参数和代码路径;仅在对应译本存在时切换文档链接。+- 修改 README 后,检查图片、相对链接和页内跳转,并在当前聊天的内置浏览器打开完整渲染预览。diff --git a/LICENSE b/LICENSEindex 261eeb9..fd1db70 100644--- a/LICENSE+++ b/LICENSE@@ -186,7 +186,7 @@same "printed page" as the copyright notice for easieridentification within third-party archives.- Copyright [yyyy] [name of copyright owner]+ Copyright OpenBMBLicensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.diff --git a/README.md b/README.mdnew file mode 100644index 0000000..b1e3f30--- /dev/null+++ b/README.md@@ -0,0 +1,197 @@+<div align="center">++<img src="./assets/minicpm-ocr/release-hero.svg" alt="MiniCPM-OCR: fast, accurate document parsing into text, tables, and formulas, with a lightning arrow connecting documents to structured results; a decision model helps identify regions that need review (illustration)." width="100%">++<p align="center"><strong>MiniCPM-OCR · Fast, accurate parsing for real-world documents.</strong></p>++<p align="center">+ <a href="./docs/minicpm_ocr_1dot0_en.md"><strong>MiniCPM-OCR 1.0</strong></a> <a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0" title="Hugging Face"><img src="./assets/minicpm-ocr/huggingface_logo-noborder.svg" width="19" height="18" alt="Hugging Face"></a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0" title="ModelScope"><img src="./assets/minicpm-ocr/modelscope_logo_padded.svg" width="25" height="14" alt="ModelScope"></a>+  + <a href="./docs/minicpm_ocr_jev_en.md"><strong>MiniCPM-OCR Jev</strong></a> <a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0-Jev" title="Hugging Face"><img src="./assets/minicpm-ocr/huggingface_logo-noborder.svg" width="19" height="18" alt="Hugging Face"></a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-Jev" title="ModelScope"><img src="./assets/minicpm-ocr/modelscope_logo_padded.svg" width="25" height="14" alt="ModelScope"></a>+</p>++<p align="center"><sub>+ <a href="#quick-start">Get Started</a> · + <a href="#model-weights">Model Weights</a> · + <a href="https://platform.modelbest.cn/console/playground/document-parse">Online Demo (China)</a> · + <a href="https://platform.modelbest.ai/console/playground/document-parse">Online Demo (Global)</a>+ | English · <a href="./README_zh.md">中文</a>+</sub></p>++</div>++<a id="overview"></a>++**MiniCPM-OCR** is a family of models for efficient document parsing and text recognition. **MiniCPM-OCR 1.0** parses Chinese and English documents and PDFs, balancing quality and efficiency across challenging inputs such as scans, photographs, curved pages, and recaptured documents. **MiniCPM-OCR Jev** evaluates OCR results at the region level, distinguishing problematic regions from reliable ones. It works with different parsing models to help users locate content that needs review.++## MiniCPM-OCR 1.0++**MiniCPM-OCR 1.0** (1.3B) is the first OCR-specific model in the [MiniCPM-V/o](https://github.com/openbmb/MiniCPM-V) family. It focuses on text-centric document understanding, covering text, tables, formulas, charts, seals, and structured information extraction. Its key features include:++- 🏆 **SOTA document parsing**: MiniCPM-OCR 1.0 achieves a **SOTA score of 93.68 on Real5-OmniDocBench**, a benchmark for real-world document parsing, and demonstrates leading parsing capabilities on OmniDocBench v1.6, Wild-OmniDocBench, and olmOCR-Bench. It supports Chinese and English documents and PDFs, handling both standard documents and challenging capture conditions, including scans, curved pages, photographs, skewed pages, and recaptured documents.+- ⚡ **Efficient inference.** With DSpark decoding acceleration ([**DSpark-BF16**](https://huggingface.co/openbmb/MiniCPM-OCR-1.0-DSpark), [**DSpark-GGUF**](https://huggingface.co/openbmb/MiniCPM-OCR-1.0-DSpark-gguf)), MiniCPM-OCR 1.0 improves **end-to-end processing efficiency by 55%**. Its throughput is approximately **1.49×** that of PaddleOCR-VL-1.6 and **3.62×** that of MinerU2.5 Pro, reducing the time needed for large-scale document parsing.+- 🔍 **General recognition and information extraction**: MiniCPM-OCR 1.0 achieves a **SOTA score of 54.7 on OCRBench v2**, demonstrating strong general OCR capabilities. It **also supports key information extraction (KIE)**, extracting relevant document content for downstream information management and automated processing.+- 🛠️ **Easy deployment and development**: MiniCPM-OCR 1.0 supports **vLLM, SGLang, llama.cpp, and Ollama from day one**, with multiple chip platforms and quantized versions available at release. It **supports further fine-tuning** and provides a **pip SDK, a full-featured API, and established agent workflows** for application integration and customization. Online demos are available for [China](https://platform.modelbest.cn/console/playground/document-parse) and [global](https://platform.modelbest.ai/console/playground/document-parse) users.++### SOTA Performance, Higher Throughput++Among the open-source OCR models shown below, MiniCPM-OCR 1.0 achieves a parsing throughput of 1.2 pages/s and the highest equally weighted average score across four document parsing benchmarks: OmniDocBench v1.6, Real5-OmniDocBench, Wild-OmniDocBench, and olmOCR-Bench.++<p align="center"><a href="./assets/minicpm-ocr/efficiency-performance-en.png"><img src="./assets/minicpm-ocr/efficiency-performance-en.png" alt="Throughput and parsing quality of open-source OCR models. The horizontal axis shows throughput in pages per second on a logarithmic scale; the vertical axis shows the equally weighted average score across four document parsing benchmarks." width="90%"></a></p>++<sub>The average score weights OmniDocBench v1.6, Real5-OmniDocBench, Wild-OmniDocBench, and olmOCR-Bench equally. The horizontal axis shows throughput in pages per second on a logarithmic scale. See the [reproduction guide](./docs/benchmark_reproduction_en.md) for test settings and reproduction details, and the [model guide throughput evaluation](./docs/minicpm_ocr_1dot0_en.md#throughput) for each model's throughput.</sub>++<a id="ocr-benchmark"></a>++### Benchmark Comparisons++<p align="center"><a href="./assets/minicpm-ocr/benchmark-radar.png"><img src="./assets/minicpm-ocr/benchmark-radar.png" alt="Radar chart comparing MiniCPM-OCR 1.0 with other OCR models across six benchmarks; some values remain to be confirmed." width="80%"></a></p>++<details>+<summary>View complete MiniCPM-OCR 1.0 evaluation results</summary>++<p align="center"><a href="./assets/minicpm-ocr/ocr-benchmarks.png"><img src="./assets/minicpm-ocr/ocr-benchmarks.png" alt="Detailed OCR model results on OmniDocBench v1.6, Real5, Wild, olmOCR-Bench, CHAOS-Bench, and OCRBench v2." width="100%"></a></p>++</details>++See the [OCR model guide](./docs/minicpm_ocr_1dot0_en.md#evaluation) for per-benchmark bar charts and throughput details.++### Examples++Left to right: original document, detected layout, and rendered Markdown.++#### English Documents++<p align="center"><a href="./assets/minicpm-ocr/minicpm-english-examples-3-column.gif"><img src="./assets/minicpm-ocr/minicpm-english-examples-3-column.gif" alt="English document animation: original, detected layout, and rendered Markdown." width="100%"></a></p>++#### Chinese Documents++<p align="center"><a href="./assets/minicpm-ocr/minicpm-chinese-examples-3-column.gif"><img src="./assets/minicpm-ocr/minicpm-chinese-examples-3-column.gif" alt="Chinese document animation: original, detected layout, and rendered Markdown." width="100%"></a></p>+++<details>+<summary>More Examples</summary>++Original documents and parsed results, side by side.++**English Documents**++<p align="center"><a href="./assets/minicpm-ocr/minicpm-ocr-english-cases.png"><img src="./assets/minicpm-ocr/minicpm-ocr-english-cases.png" alt="English examples comparing inputs and results: handwriting, historical and scanned documents, newspapers, financial statements, and key information extraction." width="100%"></a></p>++**Chinese Documents**++<p align="center"><a href="./assets/minicpm-ocr/minicpm-ocr-chinese-cases.png"><img src="./assets/minicpm-ocr/minicpm-ocr-chinese-cases.png" alt="Chinese examples comparing inputs and results: handwritten notes, complex formulas, newspapers, financial statements, stamped documents, illustrations, and key information extraction." width="100%"></a></p>++</details>++## MiniCPM-OCR Jev++**MiniCPM-OCR Jev** is an **OCR quality decision model** for text, formulas, and tables. Given an image and its corresponding OCR result, it returns a **quality score from 0 to 1** to help select reliable results and locate content that needs review.++- 🛡️ **Strong performance in a small model**: With only 2B parameters, MiniCPM-OCR Jev achieves an AUROC (×100) of 93.6 on [JevOCRBench](https://huggingface.co/datasets/openbmb/JevOCRBench), **outperforming JEV-35B-A3B (90.1)** and approaching Qwen3.5-397B-A17B (93.8).+- 🧩 **Consistent generalization**: Across parsing results from MiniCPM-OCR 1.0, GLM-OCR, PaddleOCR-VL-1.6, and Xiaomi-OCR-0, its AUROC (×100) ranges from **91.9 to 93.4**.++<a id="jev-benchmark"></a>++<a id="评测表现"></a>++### Evaluation Results++The table below reports overall and per-category AUROC (×100) on JevOCRBench. Higher values indicate better discrimination between correct and incorrect parsing results.++<p align="center"><a href="./assets/minicpm-ocr/jev-benchmark-score-table.png"><img src="./assets/minicpm-ocr/jev-benchmark-score-table.png" alt="Overall, text, formula, and table AUROC results on JevOCRBench, highlighting MiniCPM-OCR Jev." width="100%"></a></p>++<a id="判别力跨ocr模型泛化"></a>+<a id="使用场景"></a>+<a id="用法一块级直通省掉大部分人工核验"></a>+<a id="用法二多专家聚合扩展-ocr-的能力边界"></a>++### Review-Free Accuracy++Accuracy at different review-free rates across three document types.++<p align="center"><a href="./assets/minicpm-ocr/review-free-en.png"><img src="./assets/minicpm-ocr/review-free-en.png" alt="Accuracy versus review-free rate for legal documents, financial receipts, and complex documents." width="100%"></a></p>++### Decision Examples++Jev scores for text, formula, and table recognition.++<p align="center"><a href="./assets/minicpm-ocr/jev-case-en.png"><img src="./assets/minicpm-ocr/jev-case-en.png" alt="Original images, two OCR candidates, and their Jev scores for text, formulas, and tables." width="100%"></a></p>++See the [model guide](./docs/minicpm_ocr_jev_en.md), [use cases](./docs/minicpm_ocr_jev_en.md#use-cases), [cross-model evaluation](./docs/minicpm_ocr_jev_en.md#validated-parsers), and [decision examples](./docs/minicpm_ocr_jev_en.md#examples).++<a id="quick-start"></a>++## Using MiniCPM-OCR++Choose how to integrate MiniCPM-OCR 1.0 and MiniCPM-OCR Jev:++<a id="使用-agent-skill-部署推荐"></a>++### Skill++Ask a coding agent to follow the MiniCPM-OCR 1.0 [skill](./docs/SKILL_en.md) to set up the environment, download models, and parse your first document. Send the following instruction to the agent:++```text+Read and execute https://github.com/OpenBMB/MiniCPM-OCR/blob/main/docs/SKILL_en.md+```++If you have already cloned this repository, you can use `./docs/SKILL_en.md` directly.++### API++Use the API to access MiniCPM-OCR 1.0 recognition and MiniCPM-OCR Jev quality scoring.++[MiniCPM-OCR 1.0 API example](./docs/minicpm_ocr_api_en.md)  ·  [MiniCPM-OCR Jev API example](./docs/minicpm_ocr_jev_api_en.md) (coming soon)++<a id="手动部署"></a>++<a id="本地部署"></a>++### Local Deployment++Run the models on your own hardware: MiniCPM-OCR 1.0 parses PDFs and images into Markdown or JSON, while MiniCPM-OCR Jev scores the parsing results.++[MiniCPM-OCR 1.0 deployment tutorial](./docs/minicpmvocr_tutorial_en.md) · [MiniCPM-OCR Jev deployment tutorial](./docs/minicpm_ocr_jev_tutorial_en.md)++<a id="模型微调"></a>++### Fine-Tuning++| Model | Fine-tuning tutorial |+| :--- | :--- |+| MiniCPM-OCR 1.0 | [LLaMA-Factory](./docs/llamafactory_minicpm_ocr_french_en.md) · [Swift](./docs/swift_minicpm_ocr_french_en.md) |+| MiniCPM-OCR Jev | [Swift](./docs/finetune_jev_en.md) |++<a id="resources"></a>+<a id="model-weights"></a>++## Model Weights++<table border="1" cellspacing="0" cellpadding="8">+<tr>+<td nowrap>Model</td>+<td width="360">Description</td>+<td nowrap width="170">Main Model Weights</td>+<td nowrap width="150">DSpark Heads</td>+</tr>+<tr>+<td nowrap>MiniCPM‑OCR <strong>1.0</strong></td>+<td width="360">Efficient document parsing and text recognition for Chinese and English documents and PDFs, balancing quality and speed across scans, photographs, curved pages, and recaptured documents.</td>+<td nowrap><a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0">🤗</a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0"><img src="./assets/minicpm-ocr/modelscope_logo.png" width="20" alt="ModelScope"></a> <strong>BF16</strong><br><a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0-gguf">🤗</a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-gguf"><img src="./assets/minicpm-ocr/modelscope_logo.png" width="20" alt="ModelScope"></a> <strong>GGUF</strong><br><a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0-AWQ">🤗</a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-AWQ"><img src="./assets/minicpm-ocr/modelscope_logo.png" width="20" alt="ModelScope"></a> <strong>AWQ</strong><br><a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0-GPTQ">🤗</a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-GPTQ"><img src="./assets/minicpm-ocr/modelscope_logo.png" width="20" alt="ModelScope"></a> <strong>GPTQ</strong></td>+<td nowrap><a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0-DSpark">🤗</a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-DSpark"><img src="./assets/minicpm-ocr/modelscope_logo.png" width="20" alt="ModelScope"></a> <strong>BF16</strong><br><a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0-DSpark-gguf">🤗</a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-DSpark-gguf"><img src="./assets/minicpm-ocr/modelscope_logo.png" width="20" alt="ModelScope"></a> <strong>GGUF</strong></td>+</tr>+<tr>+<td nowrap>MiniCPM‑OCR <strong>Jev</strong></td>+<td width="360">An OCR quality decision model for text, formulas, and tables. Given an image and its OCR result, it returns a quality score from 0 to 1.</td>+<td align="center" valign="middle" colspan="2"><a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0-Jev">🤗</a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-Jev"><img src="./assets/minicpm-ocr/modelscope_logo.png" width="20" alt="ModelScope"></a> <strong>BF16</strong> <a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0-Jev-gguf">🤗</a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-Jev-gguf"><img src="./assets/minicpm-ocr/modelscope_logo.png" width="20" alt="ModelScope"></a> <strong>GGUF</strong><br><a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0-Jev-AWQ">🤗</a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-Jev-AWQ"><img src="./assets/minicpm-ocr/modelscope_logo.png" width="20" alt="ModelScope"></a> <strong>AWQ</strong> <a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0-Jev-GPTQ">🤗</a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-Jev-GPTQ"><img src="./assets/minicpm-ocr/modelscope_logo.png" width="20" alt="ModelScope"></a> <strong>GPTQ</strong></td>+</tr>+</table>++## 💡 FAQ and Troubleshooting++See the [FAQ](./docs/faq_en.md) for common questions about installation, model downloads, GPU memory, input formats, and unexpected outputs.++## 📄 License++The entire project is released under the [Apache License 2.0](./LICENSE), including code, documentation, and model weights for MiniCPM-OCR 1.0 and MiniCPM-OCR Jev.diff --git a/README_en.md b/README_en.mdnew file mode 100644index 0000000..dd5e4e0--- /dev/null+++ b/README_en.md@@ -0,0 +1,3 @@+# MiniCPM-OCR++The English documentation is now the [default README](./README.md). The complete Chinese version is available in [中文](./README_zh.md).diff --git a/README_zh.md b/README_zh.mdnew file mode 100644index 0000000..70b4c7c--- /dev/null+++ b/README_zh.md@@ -0,0 +1,194 @@+<div align="center">++<img src="./assets/minicpm-ocr/release-hero.svg" alt="MiniCPM-OCR:快速、准确地将文档解析为文本、表格和公式,通过闪电箭头连接文档与结构化结果;decision model 辅助标出需要复核的区域(示意图)。" width="100%">++<p align="center"><strong>MiniCPM-OCR · Fast, accurate parsing for real-world documents.</strong></p>++<p align="center">+ <a href="./docs/minicpm_ocr_1dot0_zh.md"><strong>MiniCPM-OCR 1.0</strong></a> <a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0" title="Hugging Face"><img src="./assets/minicpm-ocr/huggingface_logo-noborder.svg" width="19" height="18" alt="Hugging Face"></a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0" title="ModelScope"><img src="./assets/minicpm-ocr/modelscope_logo_padded.svg" width="25" height="14" alt="ModelScope"></a>+  + <a href="./docs/minicpm_ocr_jev_zh.md"><strong>MiniCPM-OCR Jev</strong></a> <a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0-Jev" title="Hugging Face"><img src="./assets/minicpm-ocr/huggingface_logo-noborder.svg" width="19" height="18" alt="Hugging Face"></a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-Jev" title="ModelScope"><img src="./assets/minicpm-ocr/modelscope_logo_padded.svg" width="25" height="14" alt="ModelScope"></a>+</p>++<p align="center"><sub>+ <a href="#quick-start">开始使用</a> · + <a href="#model-weights">模型权重</a> · + <a href="https://platform.modelbest.cn/console/playground/document-parse">在线体验(国内)</a> · + <a href="https://platform.modelbest.ai/console/playground/document-parse">在线体验(海外)</a>+ | <a href="./README.md">English</a> · 中文+</sub></p>++</div>++<a id="overview"></a>++**MiniCPM-OCR** 是面向高效文档解析和文字识别的系列模型。**MiniCPM-OCR 1.0** 支持中英文档与 PDF 解析,在扫描、拍照、弯曲和翻拍等复杂场景下兼顾解析质量与处理效率。**MiniCPM-OCR Jev** 对 OCR 解析结果进行区域级质量判断,识别有问题与无问题的区域,可搭配不同解析模型,帮助用户定位需要复核的内容。++## MiniCPM-OCR 1.0++**MiniCPM-OCR 1.0** (1.3B) 是 [MiniCPM-V/o](https://github.com/openbmb/MiniCPM-V) 家族首个 OCR 专用模型,面向以文字为中心的文档理解,覆盖文本、表格、公式、图表与印章识别和结构化信息抽取。主要特点包括:++- 🏆 **SOTA 的文档解析能力**:MiniCPM-OCR 1.0 在真实场景文档解析评测 **Real5-OmniDocBench 上取得 93.68 的 SOTA 成绩**,并在 OmniDocBench v1.6、Wild-OmniDocBench 和 olmOCR-Bench 等评测中展现领先的解析能力。模型支持中英双语文档与 PDF 解析,兼顾标准文档和复杂采集条件,在扫描、弯曲、拍照、倾斜及翻拍等场景下保持稳定表现。+- ⚡ **高效推理。** 基于 DSpark 解码加速([**DSpark-BF16**](https://huggingface.co/openbmb/MiniCPM-OCR-1.0-DSpark)、[**DSpark-GGUF**](https://huggingface.co/openbmb/MiniCPM-OCR-1.0-DSpark-gguf)),MiniCPM-OCR 1.0 的**端到端处理效率提升 55%**。其处理吞吐量约为 PaddleOCR-VL-1.6 的 **1.49 倍**、MinerU2.5 Pro 的 **3.62 倍**,降低大规模文档解析的时间开销。+- 🔍 **通用识别与信息抽取**:MiniCPM-OCR 1.0 在 **OCRBench v2 上取得 54.7 的 SOTA** 成绩,具备扎实的通用 OCR 能力;**同时支持关键信息抽取(KIE)**,可根据业务需求提取文档中的关键内容,支持后续信息整理与自动化处理。+- 🛠️ **部署与开发友好**:MiniCPM-OCR 1.0 首日**适配 vLLM、SGLang、llama.cpp 和 Ollama**,同步提供多芯片适配与多种量化版本。模型**支持二次微调**,提供 **pip SDK、功能完备的 API 和成熟的 Agentic 用法**,方便应用集成与定制开发;同时提供在线体验([国内](https://platform.modelbest.cn/console/playground/document-parse)、[海外](https://platform.modelbest.ai/console/playground/document-parse)),方便用户在线体验解析效果。++### SOTA 表现,更高吞吐++在图示的开源 OCR 模型对比中,MiniCPM-OCR 1.0 的解析吞吐量达到 1.2 pages/s,在 OmniDocBench v1.6、Real5-OmniDocBench、Wild-OmniDocBench 和 olmOCR-Bench 四项文档解析基准上取得最高等权平均分。++<p align="center"><a href="./assets/minicpm-ocr/efficiency-performance-zh.png"><img src="./assets/minicpm-ocr/efficiency-performance-zh.png" alt="开源 OCR 模型的吞吐量与解析质量对比;横轴为吞吐量(页/秒,对数刻度),纵轴为四项文档解析基准的等权平均分。" width="90%"></a></p>++<sub>平均分:OmniDocBench v1.6、Real5-OmniDocBench、Wild-OmniDocBench 和 olmOCR-Bench 四项基准的等权平均分;横轴为吞吐量(页/秒),采用对数刻度。测试设置与复现说明见 [复现文档](./docs/benchmark_reproduction_zh.md);各模型的吞吐数值见 [模型指南的吞吐评测](./docs/minicpm_ocr_1dot0_zh.md#吞吐)。</sub>++<a id="ocr-benchmark"></a>++### 各基准效果对比++<p align="center"><a href="./assets/minicpm-ocr/benchmark-radar.png"><img src="./assets/minicpm-ocr/benchmark-radar.png" alt="MiniCPM-OCR 1.0 与其他 OCR 模型在六项评测上的雷达图;部分数值待确认。" width="80%"></a></p>++<details>+<summary>点击查看 MiniCPM-OCR 1.0 完整评测结果</summary>++<p align="center"><a href="./assets/minicpm-ocr/ocr-benchmarks.png"><img src="./assets/minicpm-ocr/ocr-benchmarks.png" alt="OCR 模型在 OmniDocBench v1.6、Real5、Wild、olmOCR-Bench、CHAOS-Bench 和 OCRBench v2 上的详细结果。" width="100%"></a></p>++</details>++各基准柱状图与吞吐明细见 [OCR 模型指南](./docs/minicpm_ocr_1dot0_zh.md#评测)。++### 典型示例++从左至右依次为原始文档、检测到的版面和渲染后的 Markdown。++#### 英文文档++<p align="center"><a href="./assets/minicpm-ocr/minicpm-english-examples-3-column.gif"><img src="./assets/minicpm-ocr/minicpm-english-examples-3-column.gif" alt="英文文档解析动画:原始文档、检测到的版面和渲染后的 Markdown。" width="100%"></a></p>++#### 中文文档++<p align="center"><a href="./assets/minicpm-ocr/minicpm-chinese-examples-3-column.gif"><img src="./assets/minicpm-ocr/minicpm-chinese-examples-3-column.gif" alt="中文文档解析动画:原始文档、检测到的版面和渲染后的 Markdown。" width="100%"></a></p>++<details>+<summary>更多案例</summary>++原图与解析结果对照。++**中文文档**++<p align="center"><a href="./assets/minicpm-ocr/minicpm-ocr-chinese-cases.png"><img src="./assets/minicpm-ocr/minicpm-ocr-chinese-cases.png" alt="中文案例的原图与解析结果:手写笔记、复杂公式、报纸、财务报表、盖印文件、插图与关键信息抽取。" width="100%"></a></p>++**英文文档**++<p align="center"><a href="./assets/minicpm-ocr/minicpm-ocr-english-cases.png"><img src="./assets/minicpm-ocr/minicpm-ocr-english-cases.png" alt="英文案例的原图与解析结果:手写笔记、历史文献、扫描文档、报纸、财务报表与关键信息抽取。" width="100%"></a></p>++</details>++## MiniCPM-OCR Jev++**MiniCPM-OCR Jev** 是面向文本、公式和表格的 **OCR 质量判别决策模型**。输入图像及对应的 OCR 结果,即可获得 **0–1 的质量评分**,用于筛选可靠结果、定位待复核内容。++- 🛡️ **以小胜大**:仅 2B 参数,在 [JevOCRBench](https://huggingface.co/datasets/openbmb/JevOCRBench) 上决策精度 AUROC(×100)达到 93.6,**反超 JEV-35B-A3B(90.1)**,接近 Qwen3.5-397B-A17B(93.8)。+- 🧩 **稳定泛化**:在 MiniCPM-OCR 1.0、GLM-OCR、PaddleOCR-VL-1.6 和 Xiaomi-OCR-0 的解析结果上,AUROC(×100)为 **91.9–93.4**。++<a id="jev-benchmark"></a>++### 评测表现++下表展示 JevOCRBench 的整体与分类型 AUROC(×100),数值越高表示区分正确和错误解析结果的能力越强。++<p align="center"><a href="./assets/minicpm-ocr/jev-benchmark-score-table.png"><img src="./assets/minicpm-ocr/jev-benchmark-score-table.png" alt="JevOCRBench 各模型在整体、文本、公式和表格上的 AUROC 对比,突出 MiniCPM-OCR Jev。" width="100%"></a></p>++<a id="判别力跨ocr模型泛化"></a>+<a id="使用场景"></a>+<a id="用法一块级直通省掉大部分人工核验"></a>+<a id="用法二多专家聚合扩展-ocr-的能力边界"></a>++### 免检准确率++三类文档在不同免检比例下的准确率。++<p align="center"><a href="./assets/minicpm-ocr/review-free-zh.png"><img src="./assets/minicpm-ocr/review-free-zh.png" alt="法律文书、财务票据和复杂文档在不同免检比例下的准确率。" width="100%"></a></p>++### 判别示例++文本、公式和表格识别结果的 Jev 评分。++<p align="center"><a href="./assets/minicpm-ocr/jev-case-zh.png"><img src="./assets/minicpm-ocr/jev-case-zh.png" alt="文本、公式和表格的原图、两份 OCR 候选结果及其 Jev 评分。" width="100%"></a></p>++详见 [模型指南](./docs/minicpm_ocr_jev_zh.md)、[使用场景](./docs/minicpm_ocr_jev_zh.md#使用场景)、[跨模型评测](./docs/minicpm_ocr_jev_zh.md#已验证的解析器) 和 [判别示例](./docs/minicpm_ocr_jev_zh.md#示例)。++<a id="quick-start"></a>++## MiniCPM-OCR 使用++选择适合你的 MiniCPM-OCR 1.0 和 MiniCPM-OCR Jev 接入方式:++<a id="使用-agent-skill-部署推荐"></a>++### Skill++让编码 Agent 按 MiniCPM-OCR 1.0 [skill](./docs/SKILL.md) 完成环境配置、模型下载和首次文档解析。将以下指令发送给 Agent:++```text+Read and execute https://github.com/OpenBMB/MiniCPM-OCR/blob/main/docs/SKILL.md+```++已克隆本仓库时,也可直接使用 `./docs/SKILL.md`。++### API++通过 API 接入 MiniCPM-OCR 1.0 的识别能力和 MiniCPM-OCR Jev 的质量判别能力。++[MiniCPM-OCR 1.0 调用示例](./docs/minicpm_ocr_api_zh.md)  ·  [MiniCPM-OCR Jev 调用示例](./docs/minicpm_ocr_jev_api_zh.md)(即将提供)++<a id="手动部署"></a>++<a id="local-deployment"></a>++### 本地部署++在自己的设备上运行模型:MiniCPM-OCR 1.0 将 PDF 和图片解析为 Markdown 或 JSON,MiniCPM-OCR Jev 对解析结果评分。++[MiniCPM-OCR 1.0 部署教程](./docs/minicpmvocr_tutorial.md) · [MiniCPM-OCR Jev 部署教程](./docs/minicpm_ocr_jev_tutorial_zh.md)++<a id="fine-tuning"></a>++### 模型微调++| 模型 | 微调教程 |+| :--- | :--- |+| MiniCPM-OCR 1.0 | [LLaMA-Factory](./docs/llamafactory_minicpm_ocr_french.md) · [Swift](./docs/swift_minicpm_ocr_french.md) |+| MiniCPM-OCR Jev | [Swift](./docs/finetune_jev_zh.md) |++<a id="resources"></a>+<a id="model-weights"></a>++## 模型权重++<table border="1" cellspacing="0" cellpadding="8">+<tr>+<td nowrap>模型</td>+<td width="360">简介</td>+<td nowrap width="170">主模型权重下载</td>+<td nowrap width="150">DSpark 采样头</td>+</tr>+<tr>+<td nowrap>MiniCPM‑OCR <strong>1.0</strong></td>+<td width="360">面向高效文档解析和文字识别场景,支持中英文档与 PDF 解析,在扫描、拍照、弯曲和翻拍等复杂场景下兼顾解析质量与处理效率。</td>+<td nowrap><a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0">🤗</a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0"><img src="./assets/minicpm-ocr/modelscope_logo.png" width="20" alt="ModelScope"></a> <strong>BF16</strong><br><a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0-gguf">🤗</a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-gguf"><img src="./assets/minicpm-ocr/modelscope_logo.png" width="20" alt="ModelScope"></a> <strong>GGUF</strong><br><a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0-AWQ">🤗</a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-AWQ"><img src="./assets/minicpm-ocr/modelscope_logo.png" width="20" alt="ModelScope"></a> <strong>AWQ</strong><br><a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0-GPTQ">🤗</a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-GPTQ"><img src="./assets/minicpm-ocr/modelscope_logo.png" width="20" alt="ModelScope"></a> <strong>GPTQ</strong></td>+<td nowrap><a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0-DSpark">🤗</a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-DSpark"><img src="./assets/minicpm-ocr/modelscope_logo.png" width="20" alt="ModelScope"></a> <strong>BF16</strong><br><a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0-DSpark-gguf">🤗</a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-DSpark-gguf"><img src="./assets/minicpm-ocr/modelscope_logo.png" width="20" alt="ModelScope"></a> <strong>GGUF</strong></td>+</tr>+<tr>+<td nowrap>MiniCPM‑OCR <strong>Jev</strong></td>+<td width="360">面向文本、公式和表格的 OCR 质量判别模型,输入图像及 OCR 结果即可获得 0–1 的质量评分。</td>+<td align="center" valign="middle" colspan="2"><a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0-Jev">🤗</a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-Jev"><img src="./assets/minicpm-ocr/modelscope_logo.png" width="20" alt="ModelScope"></a> <strong>BF16</strong> <a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0-Jev-gguf">🤗</a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-Jev-gguf"><img src="./assets/minicpm-ocr/modelscope_logo.png" width="20" alt="ModelScope"></a> <strong>GGUF</strong><br><a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0-Jev-AWQ">🤗</a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-Jev-AWQ"><img src="./assets/minicpm-ocr/modelscope_logo.png" width="20" alt="ModelScope"></a> <strong>AWQ</strong> <a href="https://huggingface.co/openbmb/MiniCPM-OCR-1.0-Jev-GPTQ">🤗</a> <a href="https://modelscope.cn/models/OpenBMB/MiniCPM-OCR-1.0-Jev-GPTQ"><img src="./assets/minicpm-ocr/modelscope_logo.png" width="20" alt="ModelScope"></a> <strong>GPTQ</strong></td>+</tr>+</table>++## 💡 常见问题与排查++安装、模型下载、显存、输入格式与输出异常等常见问题汇总在 [FAQ](./docs/faq_zh.md)。++## 📄 许可++本项目整体采用 [Apache License 2.0](./LICENSE) 开源,包括代码、文档,以及 MiniCPM-OCR 1.0、MiniCPM-OCR Jev 等模型权重。diff --git a/assets/minicpm-ocr/MiniCPM-V 4.7-translated-35b-en.001.jpeg b/assets/minicpm-ocr/MiniCPM-V 4.7-translated-35b-en.001.jpegnew file mode 100644index 0000000..960623fBinary files /dev/null and b/assets/minicpm-ocr/MiniCPM-V 4.7-translated-35b-en.001.jpeg differdiff --git a/assets/minicpm-ocr/MiniCPM-V 4.7-translated.003.jpeg b/assets/minicpm-ocr/MiniCPM-V 4.7-translated.003.jpegnew file mode 100644index 0000000..75a56a3Binary files /dev/null and b/assets/minicpm-ocr/MiniCPM-V 4.7-translated.003.jpeg differdiff --git a/assets/minicpm-ocr/benchmark-comparison.png b/assets/minicpm-ocr/benchmark-comparison.pngnew file mode 100644index 0000000..19693d7Binary files /dev/null and b/assets/minicpm-ocr/benchmark-comparison.png differdiff --git a/assets/minicpm-ocr/benchmark-data.json b/assets/minicpm-ocr/benchmark-data.jsonnew file mode 100644index 0000000..70abe13--- /dev/null+++ b/assets/minicpm-ocr/benchmark-data.json@@ -0,0 +1,172 @@+{+ "source": {+ "document": "MiniCPM-OCR 1.0 - 飞书云文档.pdf",+ "received_date": "2026-10-22",+ "benchmark_page": 6,+ "throughput_page": 7,+ "note": "Uncontested benchmark scores from the supplied PDF are retained; unresolved benchmark scores remain null. Absolute and relative throughput values are confirmed by the user on 2026-10-22 against the supplied throughput chart."+ },+ "benchmarks": {+ "scale": "Shared raw score scale from 0 to 100; no per-axis normalization.",+ "axes": [+ {+ "name": "Real5-OmniDocBench",+ "label": "Real5-\nOmniDocBench"+ },+ {+ "name": "Wild-OmniDocBench",+ "label": "Wild-\nOmniDocBench"+ },+ {+ "name": "OmniDocBench v1.6",+ "label": "OmniDocBench\nv1.6"+ },+ {+ "name": "olmOCR-Bench",+ "label": "olmOCR-Bench"+ },+ {+ "name": "OCRBench v2",+ "label": "OCRBench v2"+ },+ {+ "name": "CHAOS-Bench",+ "label": "CHAOS-Bench"+ }+ ],+ "models": [+ {+ "name": "MiniCPM-OCR 1.0",+ "scores": [+ 93.68,+ 92.39,+ 96.51,+ 82.7,+ 54.7,+ null+ ],+ "color": "#6146D8",+ "status": "pending_confirmation"+ },+ {+ "name": "Xiaomi-OCR-0",+ "scores": [+ 92.73,+ 92.06,+ 96.83,+ 82.1,+ 47,+ 17.84+ ],+ "color": "#DB965C"+ },+ {+ "name": "PaddleOCR-VL-1.6",+ "scores": [+ 93.188,+ 91.49,+ null,+ 80.2,+ 35.2,+ 9.32+ ],+ "color": "#4CABA3",+ "status": "pending_confirmation"+ },+ {+ "name": "GLM-OCR",+ "scores": [+ null,+ 90.4,+ null,+ 75.2,+ 45.5,+ 8.62+ ],+ "color": "#85A951",+ "status": "pending_confirmation"+ },+ {+ "name": "MinerU2.5-Pro",+ "scores": [+ null,+ 90.06,+ null,+ 79.5,+ 29.1,+ 13.9+ ],+ "color": "#CB7897",+ "status": "pending_confirmation"+ },+ {+ "name": "HunyuanOCR-1.5",+ "scores": [+ 88.542,+ 87.01,+ 94.74,+ 78.6,+ 45,+ 14.88+ ],+ "color": "#8C97AA"+ }+ ]+ },+ "throughput": {+ "unit": "pages/s",+ "conditions": {+ "dataset": "OmniDocBench v1.6",+ "images": 1651,+ "hardware": "NVIDIA GeForce RTX 5090",+ "image_concurrency": 1,+ "sdk_configuration": "Official SDKs and default configurations",+ "acceleration": "All models use accelerated configurations"+ },+ "relative_reference": "MiniCPM-OCR 1.0",+ "models": [+ {+ "name": "MiniCPM-OCR 1.0",+ "pages_per_second": 1.213,+ "status": "confirmed",+ "relative_throughput": 1.0+ },+ {+ "name": "GLM-OCR",+ "pages_per_second": 1.179,+ "relative_throughput": 0.97+ },+ {+ "name": "PaddleOCR-VL-1.6",+ "pages_per_second": 0.818,+ "relative_throughput": 0.67+ },+ {+ "name": "Xiaomi-OCR-0",+ "pages_per_second": 0.724,+ "relative_throughput": 0.6+ },+ {+ "name": "MinerU2.5-Pro-Standard",+ "pages_per_second": 0.531,+ "relative_throughput": 0.44+ },+ {+ "name": "MinerU2.5-Pro-Advanced",+ "pages_per_second": 0.336,+ "relative_throughput": 0.28+ },+ {+ "name": "Ovis-OCR2",+ "pages_per_second": 0.317,+ "relative_throughput": 0.26+ },+ {+ "name": "TeleOCR",+ "pages_per_second": 0.141,+ "relative_throughput": 0.12+ }+ ],+ "relative_status": "confirmed"+ }+}diff --git a/assets/minicpm-ocr/benchmark-overview.png b/assets/minicpm-ocr/benchmark-overview.pngnew file mode 100644index 0000000..1a8b3baBinary files /dev/null and b/assets/minicpm-ocr/benchmark-overview.png differdiff --git a/assets/minicpm-ocr/benchmark-radar.png b/assets/minicpm-ocr/benchmark-radar.pngnew file mode 100644index 0000000..5986980Binary files /dev/null and b/assets/minicpm-ocr/benchmark-radar.png differdiff --git a/assets/minicpm-ocr/benchmark-score-table.jpg b/assets/minicpm-ocr/benchmark-score-table.jpgnew file mode 100644index 0000000..ae2fa88Binary files /dev/null and b/assets/minicpm-ocr/benchmark-score-table.jpg differdiff --git a/assets/minicpm-ocr/benchmark-table.html b/assets/minicpm-ocr/benchmark-table.htmlnew file mode 100644index 0000000..e8186fc--- /dev/null+++ b/assets/minicpm-ocr/benchmark-table.html@@ -0,0 +1,68 @@+<!doctype html>+<html lang="en"><head><meta charset="utf-8"><title>MiniCPM-OCR 1.0 detailed benchmark results</title>+<meta name="color-scheme" content="light">+<style>html {color-scheme:light; background:white; zoom:2;} body {margin:0; padding:5px; width:736px;} #ocr-table-layout .ocr-paper {min-height:0;}</style>+<style>+ #ocr-table-layout .ocr-paper {+ --ocr-ink: light-dark(#17212e, #e6edf3);+ --ocr-bg: light-dark(#ffffff, #0d1117);+ --ocr-rule: light-dark(#e2e7ed, #30363d);+ --ocr-strong-rule: light-dark(#aab6c5, #7d8999);+ --ocr-blue: light-dark(#eaf3ff, #152c49);+ --ocr-muted: light-dark(#576574, #a8b4c2);+ --ocr-font: 16px;+ --ocr-row: 38px;+ background: var(--ocr-bg);+ color: var(--ocr-ink);+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;+ padding: 16px 0 10px;+ min-height: 446px;+ }+ #ocr-table-layout .ocr-scroll { overflow-x: auto; width: 100%; }+ #ocr-table-layout .ocr-table { width: 100%; min-width: 730px; border-collapse: collapse; table-layout: fixed; font-size: var(--ocr-font); line-height: 1.3; color: var(--ocr-ink); }+ #ocr-table-layout .ocr-model { width: 178px; }+ #ocr-table-layout .ocr-table th, #ocr-table-layout .ocr-table td { padding: 0 8px; text-align: center; vertical-align: middle; white-space: nowrap; }+ #ocr-table-layout .ocr-table thead { border-top: 1.5px solid var(--ocr-strong-rule); border-bottom: 1.5px solid var(--ocr-strong-rule); }+ #ocr-table-layout .ocr-table thead th { font-size: 14px; font-weight: 600; height: 29px; }+ #ocr-table-layout .ocr-table .ocr-family { font-size: 15px; border-bottom: 1px solid var(--ocr-rule); }+ #ocr-table-layout .ocr-table thead .ocr-model-heading { text-align: left; font-size: 15px; }+ #ocr-table-layout .ocr-table tbody tr { height: var(--ocr-row); border-bottom: 1px solid var(--ocr-rule); }+ #ocr-table-layout .ocr-table tbody th { text-align: left; font-size: 15px; font-weight: 400; }+ #ocr-table-layout .ocr-table td { font-variant-numeric: tabular-nums; }+ #ocr-table-layout .ocr-table td.ocr-max { font-weight: 750; }+ #ocr-table-layout .ocr-table .ocr-ours { background: var(--ocr-blue); border-top: 1.5px solid var(--ocr-strong-rule); border-bottom: 1.5px solid var(--ocr-strong-rule); }+ #ocr-table-layout .ocr-table .ocr-ours th { font-weight: 700; }+ #ocr-table-layout .ocr-full .ocr-model { width: 174px; }+ #ocr-table-layout .ocr-full .ocr-long { width: 114px; }+ #ocr-table-layout .ocr-full thead th { height: 58px; font-size: 13px; padding: 0 4px; }+ #ocr-table-layout .ocr-legend { display: flex; gap: 8px 20px; flex-wrap: wrap; color: var(--ocr-muted); font-size: 12px; line-height: 1.4; padding: 10px 8px 0; }+ @media (prefers-reduced-motion: no-preference) { #ocr-table-layout .ocr-table tbody tr { transition: height 120ms ease; } }+</style></head><body>+<!-- Data and layout match the user-provided table image, received 2026-10-22. -->+<div id="ocr-table-layout">+ <section data-variant="合并重复表头 · 推荐" aria-label="合并重复表头的表格">+ <div class="ocr-paper" id="ocr-grouped" aria-label="表格排版">+ <div class="ocr-scroll" role="region" aria-label="OCR 结果表,窄屏可横向滚动">+ <table class="ocr-table ocr-grouped">+ <colgroup><col class="ocr-model"><col span="6"></colgroup>+ <thead>+ <tr><th rowspan="2" scope="col" class="ocr-model-heading">Model</th><th colspan="3" scope="colgroup" class="ocr-family">OmniDocBench</th><th rowspan="2" scope="col">olmOCR<br>bench</th><th rowspan="2" scope="col">OCRBench<br>V2</th><th rowspan="2" scope="col">CHAOS<br>Bench</th></tr>+ <tr><th scope="col" aria-label="Real5-OmniDocBench">Real5</th><th scope="col" aria-label="Wild-OmniDocBench">Wild</th><th scope="col" aria-label="OmniDocBench-v1.6">v1.6</th></tr>+ </thead>+ <tbody>+<tr><th scope="row">TeleOCR</th><td>90.72</td><td>90.71</td><td class="ocr-max">96.91</td><td>77.1</td><td>23.3</td><td>21.08</td></tr>+<tr><th scope="row">OvisOCR2</th><td>92.29</td><td>89.91</td><td>96.58</td><td>80.3</td><td>33.3</td><td>6.38</td></tr>+<tr><th scope="row">MinerU2.5-Pro</th><td>89.94</td><td>90.06</td><td>95.69</td><td>79.5</td><td>29.1</td><td>13.90</td></tr>+<tr><th scope="row">PaddleOCR-VL-1.6</th><td>93.19</td><td>91.49</td><td>96.34</td><td>80.2</td><td>35.2</td><td>9.32</td></tr>+<tr><th scope="row">GLM-OCR</th><td>90.32</td><td>90.40</td><td>95.22</td><td>75.2</td><td>45.5</td><td>8.62</td></tr>+<tr><th scope="row">HunyuanOCR-1.5</th><td>88.70</td><td>87.01</td><td>94.74</td><td>78.6</td><td>45.0</td><td>14.88</td></tr>+<tr><th scope="row">Surya-OCR-2</th><td>84.88</td><td>85.40</td><td>89.29</td><td class="ocr-max">83.3</td><td>13.9</td><td>12.63</td></tr>+<tr><th scope="row">Xiaomi-OCR-0</th><td>92.73</td><td>92.06</td><td>96.83</td><td>82.1</td><td>47.0</td><td>17.84</td></tr>+<tr class="ocr-ours"><th scope="row">MiniCPM-OCR 1.0</th><td class="ocr-max">93.68</td><td class="ocr-max">92.39</td><td>96.51</td><td>82.7</td><td class="ocr-max">54.7</td><td class="ocr-max">29.78</td></tr>+</tbody>+ </table>+ </div>+ <div class="ocr-legend"><span><b>Bold</b> = column maximum</span><span>Blue row = MiniCPM-OCR 1.0</span></div>+ </div>+ </section>+</div></body></html>diff --git a/assets/minicpm-ocr/benchmark-table.png b/assets/minicpm-ocr/benchmark-table.pngnew file mode 100644index 0000000..3fff2a6Binary files /dev/null and b/assets/minicpm-ocr/benchmark-table.png differdiff --git a/assets/minicpm-ocr/card-parse.svg b/assets/minicpm-ocr/card-parse.svgnew file mode 100644index 0000000..20e1000--- /dev/null+++ b/assets/minicpm-ocr/card-parse.svg@@ -0,0 +1,11 @@+<svg xmlns="http://www.w3.org/2000/svg" width="412" height="101" viewBox="0 0 412 101" role="img" aria-labelledby="t">+<title id="t">PARSE · MiniCPM-OCR 1.0 · 1.3B document parser · Model Guide</title>+<defs><linearGradient id="bg" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#EFEBFF"/><stop offset="1" stop-color="#FBFAFF"/></linearGradient></defs>+<rect x="0.5" y="0.5" width="411" height="100" rx="2" fill="url(#bg)" stroke="#D1D9E0" stroke-width="1"/>+<g font-family="DejaVu Sans, Noto Sans CJK SC, PingFang SC, Microsoft YaHei, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Noto Color Emoji">+<text x="19" y="22" font-size="10" font-weight="700" fill="#6452CF" letter-spacing="1.2">PARSE</text>+<text x="19" y="50" font-size="19" font-weight="650" fill="#24292F">MiniCPM-OCR 1.0</text>+<text x="19" y="75" font-size="11" fill="#8B949E">1.3B document parser</text>+<text x="19" y="92" font-size="10" fill="#0969DA">👉 Model Guide</text>+</g>+</svg>diff --git a/assets/minicpm-ocr/card-verify.svg b/assets/minicpm-ocr/card-verify.svgnew file mode 100644index 0000000..13cf883--- /dev/null+++ b/assets/minicpm-ocr/card-verify.svg@@ -0,0 +1,11 @@+<svg xmlns="http://www.w3.org/2000/svg" width="412" height="101" viewBox="0 0 412 101" role="img" aria-labelledby="t">+<title id="t">VERIFY · MiniCPM-OCR Jev · Identify regions that need review · Jev Guide</title>+<defs><linearGradient id="bg" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#E8F1FF"/><stop offset="1" stop-color="#FAFCFF"/></linearGradient></defs>+<rect x="0.5" y="0.5" width="411" height="100" rx="2" fill="url(#bg)" stroke="#D1D9E0" stroke-width="1"/>+<g font-family="DejaVu Sans, Noto Sans CJK SC, PingFang SC, Microsoft YaHei, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Noto Color Emoji">+<text x="19" y="22" font-size="10" font-weight="700" fill="#6452CF" letter-spacing="1.2">VERIFY</text>+<text x="19" y="50" font-size="19" font-weight="650" fill="#24292F">MiniCPM-OCR Jev</text>+<text x="19" y="75" font-size="11" fill="#8B949E">Identify regions that need review</text>+<text x="19" y="92" font-size="10" fill="#0969DA">👉 Jev Guide</text>+</g>+</svg>diff --git a/assets/minicpm-ocr/ds_zero2.json b/assets/minicpm-ocr/ds_zero2.jsonnew file mode 100644index 0000000..9480cba--- /dev/null+++ b/assets/minicpm-ocr/ds_zero2.json@@ -0,0 +1,32 @@+{+ "fp16": {+ "enabled": "auto",+ "loss_scale": 0,+ "loss_scale_window": 1000,+ "initial_scale_power": 16,+ "hysteresis": 2,+ "min_loss_scale": 1+ },+ "bf16": {+ "enabled": "auto"+ },+ "zero_optimization": {+ "stage": 2,+ "offload_optimizer": {+ "device": "none",+ "pin_memory": true+ },+ "allgather_partitions": true,+ "allgather_bucket_size": 200000000.0,+ "overlap_comm": false,+ "reduce_scatter": true,+ "reduce_bucket_size": 200000000.0,+ "contiguous_gradients": true+ },+ "gradient_accumulation_steps": "auto",+ "gradient_clipping": "auto",+ "steps_per_print": 2000,+ "train_batch_size": "auto",+ "train_micro_batch_size_per_gpu": "auto",+ "wall_clock_breakdown": false+}diff --git a/assets/minicpm-ocr/efficiency-performance-en.png b/assets/minicpm-ocr/efficiency-performance-en.pngnew file mode 100644index 0000000..fe2bcbcBinary files /dev/null and b/assets/minicpm-ocr/efficiency-performance-en.png differdiff --git a/assets/minicpm-ocr/efficiency-performance-zh.png b/assets/minicpm-ocr/efficiency-performance-zh.pngnew file mode 100644index 0000000..743427bBinary files /dev/null and b/assets/minicpm-ocr/efficiency-performance-zh.png differdiff --git a/assets/minicpm-ocr/efficiency-performance.png b/assets/minicpm-ocr/efficiency-performance.pngnew file mode 100644index 0000000..0f99292Binary files /dev/null and b/assets/minicpm-ocr/efficiency-performance.png differdiff --git a/assets/minicpm-ocr/french_eval_address.jpg b/assets/minicpm-ocr/french_eval_address.jpgnew file mode 100644index 0000000..c16324fBinary files /dev/null and b/assets/minicpm-ocr/french_eval_address.jpg differdiff --git a/assets/minicpm-ocr/french_eval_contract.jpg b/assets/minicpm-ocr/french_eval_contract.jpgnew file mode 100644index 0000000..9be7788Binary files /dev/null and b/assets/minicpm-ocr/french_eval_contract.jpg differdiff --git a/assets/minicpm-ocr/french_llamafactory_training_curves.png b/assets/minicpm-ocr/french_llamafactory_training_curves.pngnew file mode 100644index 0000000..9406b85Binary files /dev/null and b/assets/minicpm-ocr/french_llamafactory_training_curves.png differdiff --git a/assets/minicpm-ocr/french_swift_training_curves.png b/assets/minicpm-ocr/french_swift_training_curves.pngnew file mode 100644index 0000000..a45e044Binary files /dev/null and b/assets/minicpm-ocr/french_swift_training_curves.png differdiff --git a/assets/minicpm-ocr/french_train_line.jpg b/assets/minicpm-ocr/french_train_line.jpgnew file mode 100644index 0000000..f9917b3Binary files /dev/null and b/assets/minicpm-ocr/french_train_line.jpg differdiff --git a/assets/minicpm-ocr/huggingface_logo-noborder.svg b/assets/minicpm-ocr/huggingface_logo-noborder.svgnew file mode 100644index 0000000..43c5d3c--- /dev/null+++ b/assets/minicpm-ocr/huggingface_logo-noborder.svg@@ -0,0 +1,37 @@+<svg xmlns="http://www.w3.org/2000/svg" width="95" height="88" fill="none">+ <path fill="#FFD21E" d="M47.21 76.5a34.75 34.75 0 1 0 0-69.5 34.75 34.75 0 0 0 0 69.5Z" />+ <path+ fill="#FF9D0B"+ d="M81.96 41.75a34.75 34.75 0 1 0-69.5 0 34.75 34.75 0 0 0 69.5 0Zm-73.5 0a38.75 38.75 0 1 1 77.5 0 38.75 38.75 0 0 1-77.5 0Z"+ />+ <path+ fill="#3A3B45"+ d="M58.5 32.3c1.28.44 1.78 3.06 3.07 2.38a5 5 0 1 0-6.76-2.07c.61 1.15 2.55-.72 3.7-.32ZM34.95 32.3c-1.28.44-1.79 3.06-3.07 2.38a5 5 0 1 1 6.76-2.07c-.61 1.15-2.56-.72-3.7-.32Z"+ />+ <path+ fill="#FF323D"+ d="M46.96 56.29c9.83 0 13-8.76 13-13.26 0-2.34-1.57-1.6-4.09-.36-2.33 1.15-5.46 2.74-8.9 2.74-7.19 0-13-6.88-13-2.38s3.16 13.26 13 13.26Z"+ />+ <path+ fill="#3A3B45"+ fill-rule="evenodd"+ d="M39.43 54a8.7 8.7 0 0 1 5.3-4.49c.4-.12.81.57 1.24 1.28.4.68.82 1.37 1.24 1.37.45 0 .9-.68 1.33-1.35.45-.7.89-1.38 1.32-1.25a8.61 8.61 0 0 1 5 4.17c3.73-2.94 5.1-7.74 5.1-10.7 0-2.34-1.57-1.6-4.09-.36l-.14.07c-2.31 1.15-5.39 2.67-8.77 2.67s-6.45-1.52-8.77-2.67c-2.6-1.29-4.23-2.1-4.23.29 0 3.05 1.46 8.06 5.47 10.97Z"+ clip-rule="evenodd"+ />+ <path+ fill="#FF9D0B"+ d="M70.71 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM24.21 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM17.52 48c-1.62 0-3.06.66-4.07 1.87a5.97 5.97 0 0 0-1.33 3.76 7.1 7.1 0 0 0-1.94-.3c-1.55 0-2.95.59-3.94 1.66a5.8 5.8 0 0 0-.8 7 5.3 5.3 0 0 0-1.79 2.82c-.24.9-.48 2.8.8 4.74a5.22 5.22 0 0 0-.37 5.02c1.02 2.32 3.57 4.14 8.52 6.1 3.07 1.22 5.89 2 5.91 2.01a44.33 44.33 0 0 0 10.93 1.6c5.86 0 10.05-1.8 12.46-5.34 3.88-5.69 3.33-10.9-1.7-15.92-2.77-2.78-4.62-6.87-5-7.77-.78-2.66-2.84-5.62-6.25-5.62a5.7 5.7 0 0 0-4.6 2.46c-1-1.26-1.98-2.25-2.86-2.82A7.4 7.4 0 0 0 17.52 48Zm0 4c.51 0 1.14.22 1.82.65 2.14 1.36 6.25 8.43 7.76 11.18.5.92 1.37 1.31 2.14 1.31 1.55 0 2.75-1.53.15-3.48-3.92-2.93-2.55-7.72-.68-8.01.08-.02.17-.02.24-.02 1.7 0 2.45 2.93 2.45 2.93s2.2 5.52 5.98 9.3c3.77 3.77 3.97 6.8 1.22 10.83-1.88 2.75-5.47 3.58-9.16 3.58-3.81 0-7.73-.9-9.92-1.46-.11-.03-13.45-3.8-11.76-7 .28-.54.75-.76 1.34-.76 2.38 0 6.7 3.54 8.57 3.54.41 0 .7-.17.83-.6.79-2.85-12.06-4.05-10.98-8.17.2-.73.71-1.02 1.44-1.02 3.14 0 10.2 5.53 11.68 5.53.11 0 .2-.03.24-.1.74-1.2.33-2.04-4.9-5.2-5.21-3.16-8.88-5.06-6.8-7.33.24-.26.58-.38 1-.38 3.17 0 10.66 6.82 10.66 6.82s2.02 2.1 3.25 2.1c.28 0 .52-.1.68-.38.86-1.46-8.06-8.22-8.56-11.01-.34-1.9.24-2.85 1.31-2.85Z"+ />+ <path+ fill="#FFD21E"+ d="M38.6 76.69c2.75-4.04 2.55-7.07-1.22-10.84-3.78-3.77-5.98-9.3-5.98-9.3s-.82-3.2-2.69-2.9c-1.87.3-3.24 5.08.68 8.01 3.91 2.93-.78 4.92-2.29 2.17-1.5-2.75-5.62-9.82-7.76-11.18-2.13-1.35-3.63-.6-3.13 2.2.5 2.79 9.43 9.55 8.56 11-.87 1.47-3.93-1.71-3.93-1.71s-9.57-8.71-11.66-6.44c-2.08 2.27 1.59 4.17 6.8 7.33 5.23 3.16 5.64 4 4.9 5.2-.75 1.2-12.28-8.53-13.36-4.4-1.08 4.11 11.77 5.3 10.98 8.15-.8 2.85-9.06-5.38-10.74-2.18-1.7 3.21 11.65 6.98 11.76 7.01 4.3 1.12 15.25 3.49 19.08-2.12Z"+ />+ <path+ fill="#FF9D0B"+ d="M77.4 48c1.62 0 3.07.66 4.07 1.87a5.97 5.97 0 0 1 1.33 3.76 7.1 7.1 0 0 1 1.95-.3c1.55 0 2.95.59 3.94 1.66a5.8 5.8 0 0 1 .8 7 5.3 5.3 0 0 1 1.78 2.82c.24.9.48 2.8-.8 4.74a5.22 5.22 0 0 1 .37 5.02c-1.02 2.32-3.57 4.14-8.51 6.1-3.08 1.22-5.9 2-5.92 2.01a44.33 44.33 0 0 1-10.93 1.6c-5.86 0-10.05-1.8-12.46-5.34-3.88-5.69-3.33-10.9 1.7-15.92 2.78-2.78 4.63-6.87 5.01-7.77.78-2.66 2.83-5.62 6.24-5.62a5.7 5.7 0 0 1 4.6 2.46c1-1.26 1.98-2.25 2.87-2.82A7.4 7.4 0 0 1 77.4 48Zm0 4c-.51 0-1.13.22-1.82.65-2.13 1.36-6.25 8.43-7.76 11.18a2.43 2.43 0 0 1-2.14 1.31c-1.54 0-2.75-1.53-.14-3.48 3.91-2.93 2.54-7.72.67-8.01a1.54 1.54 0 0 0-.24-.02c-1.7 0-2.45 2.93-2.45 2.93s-2.2 5.52-5.97 9.3c-3.78 3.77-3.98 6.8-1.22 10.83 1.87 2.75 5.47 3.58 9.15 3.58 3.82 0 7.73-.9 9.93-1.46.1-.03 13.45-3.8 11.76-7-.29-.54-.75-.76-1.34-.76-2.38 0-6.71 3.54-8.57 3.54-.42 0-.71-.17-.83-.6-.8-2.85 12.05-4.05 10.97-8.17-.19-.73-.7-1.02-1.44-1.02-3.14 0-10.2 5.53-11.68 5.53-.1 0-.19-.03-.23-.1-.74-1.2-.34-2.04 4.88-5.2 5.23-3.16 8.9-5.06 6.8-7.33-.23-.26-.57-.38-.98-.38-3.18 0-10.67 6.82-10.67 6.82s-2.02 2.1-3.24 2.1a.74.74 0 0 1-.68-.38c-.87-1.46 8.05-8.22 8.55-11.01.34-1.9-.24-2.85-1.31-2.85Z"+ />+ <path+ fill="#FFD21E"+ d="M56.33 76.69c-2.75-4.04-2.56-7.07 1.22-10.84 3.77-3.77 5.97-9.3 5.97-9.3s.82-3.2 2.7-2.9c1.86.3 3.23 5.08-.68 8.01-3.92 2.93.78 4.92 2.28 2.17 1.51-2.75 5.63-9.82 7.76-11.18 2.13-1.35 3.64-.6 3.13 2.2-.5 2.79-9.42 9.55-8.55 11 .86 1.47 3.92-1.71 3.92-1.71s9.58-8.71 11.66-6.44c2.08 2.27-1.58 4.17-6.8 7.33-5.23 3.16-5.63 4-4.9 5.2.75 1.2 12.28-8.53 13.36-4.4 1.08 4.11-11.76 5.3-10.97 8.15.8 2.85 9.05-5.38 10.74-2.18 1.69 3.21-11.65 6.98-11.76 7.01-4.31 1.12-15.26 3.49-19.08-2.12Z"+ />+</svg>diff --git a/assets/minicpm-ocr/jev-benchmark-score-table.jpg b/assets/minicpm-ocr/jev-benchmark-score-table.jpgnew file mode 100644index 0000000..9207428Binary files /dev/null and b/assets/minicpm-ocr/jev-benchmark-score-table.jpg differdiff --git a/assets/minicpm-ocr/jev-benchmark-score-table.png b/assets/minicpm-ocr/jev-benchmark-score-table.pngnew file mode 100644index 0000000..e96c433Binary files /dev/null and b/assets/minicpm-ocr/jev-benchmark-score-table.png differdiff --git a/assets/minicpm-ocr/jev-case-en.png b/assets/minicpm-ocr/jev-case-en.pngnew file mode 100644index 0000000..a1b6afeBinary files /dev/null and b/assets/minicpm-ocr/jev-case-en.png differdiff --git a/assets/minicpm-ocr/jev-case-zh.png b/assets/minicpm-ocr/jev-case-zh.pngnew file mode 100644index 0000000..364d220Binary files /dev/null and b/assets/minicpm-ocr/jev-case-zh.png differdiff --git a/assets/minicpm-ocr/jevocrbench.png b/assets/minicpm-ocr/jevocrbench.pngnew file mode 100644index 0000000..18af03fBinary files /dev/null and b/assets/minicpm-ocr/jevocrbench.png differdiff --git a/assets/minicpm-ocr/jevocrbench.svg b/assets/minicpm-ocr/jevocrbench.svgnew file mode 100644index 0000000..67292da--- /dev/null+++ b/assets/minicpm-ocr/jevocrbench.svg@@ -0,0 +1,110 @@+<svg xmlns="http://www.w3.org/2000/svg" width="900" height="624" viewBox="0 0 900 624" role="img" aria-labelledby="title desc">+<title id="title">JevOCRBench — MiniCPM-OCR Jev</title>+<desc id="desc">Benchmark results. Light blue identifies the MiniCPM row; bold scores identify column maxima. Model names, values, and source references are preserved in metadata.</desc>+<metadata>{"columns": ["Model", "Params", "Overall", "Text", "Formula", "Table"], "rows": [["Gemini 3.8 Flash", "—", "0.971", "0.972", "0.980", "0.957"], ["Kimi K3", "2.8T · A104B", "0.969", "0.971", "0.960", "0.970"], ["Qwen3.7-Plus", "—", "0.943", "0.958", "0.917", "0.930"], ["JEV-VL", "27B", "0.940", "0.963", "0.907", "0.916"], ["Qwen3.5", "397B · A17B", "0.938", "0.954", "0.918", "0.914"], ["MiniCPM-OCR Jev", "2B", "0.935", "0.945", "0.931", "0.910"], ["Gemma 4", "31B", "0.905", "0.910", "0.908", "0.877"], ["JEV", "35B · A3B", "0.901", "0.916", "0.889", "0.896"], ["Qwen3.5", "35B · A3B", "0.898", "0.911", "0.870", "0.883"], ["Qwen3.5", "9B", "0.720", "0.759", "0.677", "0.734"], ["Qwen3.5", "4B", "0.699", "0.733", "0.653", "0.739"], ["Qwen3.5", "2B", "0.506", "0.507", "0.502", "0.506"]], "official_models": [{"official_name": "Gemini 3.8 Flash", "source": "https://deepmind.google/models/gemini/flash/"}, {"official_name": "Kimi K3", "source": "https://huggingface.co/moonshotai/Kimi-K3"}, {"official_name": "Qwen3.7-Plus", "source": "https://www.alibabacloud.com/help/en/model-studio/newly-released-models"}, {"official_name": "JEV-27B-VL", "source": "https://huggingface.co/autotrust/JEV-27B-VL"}, {"official_name": "Qwen3.5-397B-A17B", "source": "https://huggingface.co/Qwen/Qwen3.5-397B-A17B"}, {"official_name": "MiniCPM-OCR Jev", "source": null}, {"official_name": "Gemma 4 31B", "source": "https://huggingface.co/google/gemma-4-31B-it#benchmark-results"}, {"official_name": "JEV-35B", "source": "https://huggingface.co/autotrust/JEV-35B"}, {"official_name": "Qwen3.5-35B-A3B", "source": "https://huggingface.co/Qwen/Qwen3.5-35B-A3B"}, {"official_name": "Qwen3.5-9B", "source": "https://huggingface.co/Qwen/Qwen3.5-9B"}, {"official_name": "Qwen3.5-4B", "source": "https://huggingface.co/Qwen/Qwen3.5-4B"}, {"official_name": "Qwen3.5-2B", "source": "https://huggingface.co/Qwen/Qwen3.5-2B"}]}</metadata>+<rect x="0" y="0" width="900" height="624" fill="#ffffff"/>+<path d="M12 112H888" fill="none" stroke="#e2e7ed" stroke-width="1"/>+<text x="20" y="98.25" font-family="Arial, Helvetica, sans-serif" font-size="15" font-weight="400" text-anchor="start" fill="#17212e" style="font-variant-numeric:tabular-nums">Gemini 3.8 Flash</text>+<text x="277" y="97.9" font-family="Arial, Helvetica, sans-serif" font-size="14" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">—</text>+<text x="419" y="98.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="700" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.971</text>+<text x="553" y="98.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="700" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.972</text>+<text x="687" y="98.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="700" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.980</text>+<text x="821" y="98.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.957</text>+<path d="M12 150H888" fill="none" stroke="#e2e7ed" stroke-width="1"/>+<text x="20" y="136.25" font-family="Arial, Helvetica, sans-serif" font-size="15" font-weight="400" text-anchor="start" fill="#17212e" style="font-variant-numeric:tabular-nums">Kimi K3</text>+<text x="277" y="135.9" font-family="Arial, Helvetica, sans-serif" font-size="14" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">2.8T · A104B</text>+<text x="419" y="136.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.969</text>+<text x="553" y="136.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.971</text>+<text x="687" y="136.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.960</text>+<text x="821" y="136.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="700" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.970</text>+<path d="M12 188H888" fill="none" stroke="#e2e7ed" stroke-width="1"/>+<text x="20" y="174.25" font-family="Arial, Helvetica, sans-serif" font-size="15" font-weight="400" text-anchor="start" fill="#17212e" style="font-variant-numeric:tabular-nums">Qwen3.7-Plus</text>+<text x="277" y="173.9" font-family="Arial, Helvetica, sans-serif" font-size="14" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">—</text>+<text x="419" y="174.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.943</text>+<text x="553" y="174.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.958</text>+<text x="687" y="174.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.917</text>+<text x="821" y="174.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.930</text>+<path d="M12 226H888" fill="none" stroke="#e2e7ed" stroke-width="1"/>+<text x="20" y="212.25" font-family="Arial, Helvetica, sans-serif" font-size="15" font-weight="400" text-anchor="start" fill="#17212e" style="font-variant-numeric:tabular-nums">JEV-VL</text>+<text x="277" y="211.9" font-family="Arial, Helvetica, sans-serif" font-size="14" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">27B</text>+<text x="419" y="212.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.940</text>+<text x="553" y="212.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.963</text>+<text x="687" y="212.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.907</text>+<text x="821" y="212.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.916</text>+<path d="M12 264H888" fill="none" stroke="#e2e7ed" stroke-width="1"/>+<text x="20" y="250.25" font-family="Arial, Helvetica, sans-serif" font-size="15" font-weight="400" text-anchor="start" fill="#17212e" style="font-variant-numeric:tabular-nums">Qwen3.5</text>+<text x="277" y="249.9" font-family="Arial, Helvetica, sans-serif" font-size="14" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">397B · A17B</text>+<text x="419" y="250.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.938</text>+<text x="553" y="250.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.954</text>+<text x="687" y="250.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.918</text>+<text x="821" y="250.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.914</text>+<rect x="12" y="264" width="876" height="38" fill="#eaf3ff"/>+<path d="M12 302H888" fill="none" stroke="#e2e7ed" stroke-width="1"/>+<text x="20" y="288.25" font-family="Arial, Helvetica, sans-serif" font-size="15" font-weight="700" text-anchor="start" fill="#17212e" style="font-variant-numeric:tabular-nums">MiniCPM-OCR Jev</text>+<text x="277" y="287.9" font-family="Arial, Helvetica, sans-serif" font-size="14" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">2B</text>+<text x="419" y="288.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.935</text>+<text x="553" y="288.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.945</text>+<text x="687" y="288.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.931</text>+<text x="821" y="288.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.910</text>+<path d="M12 264H888" fill="none" stroke="#aab6c5" stroke-width="1.5"/>+<path d="M12 302H888" fill="none" stroke="#aab6c5" stroke-width="1.5"/>+<path d="M12 340H888" fill="none" stroke="#e2e7ed" stroke-width="1"/>+<text x="20" y="326.25" font-family="Arial, Helvetica, sans-serif" font-size="15" font-weight="400" text-anchor="start" fill="#17212e" style="font-variant-numeric:tabular-nums">Gemma 4</text>+<text x="277" y="325.9" font-family="Arial, Helvetica, sans-serif" font-size="14" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">31B</text>+<text x="419" y="326.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.905</text>+<text x="553" y="326.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.910</text>+<text x="687" y="326.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.908</text>+<text x="821" y="326.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.877</text>+<path d="M12 378H888" fill="none" stroke="#e2e7ed" stroke-width="1"/>+<text x="20" y="364.25" font-family="Arial, Helvetica, sans-serif" font-size="15" font-weight="400" text-anchor="start" fill="#17212e" style="font-variant-numeric:tabular-nums">JEV</text>+<text x="277" y="363.9" font-family="Arial, Helvetica, sans-serif" font-size="14" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">35B · A3B</text>+<text x="419" y="364.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.901</text>+<text x="553" y="364.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.916</text>+<text x="687" y="364.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.889</text>+<text x="821" y="364.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.896</text>+<path d="M12 416H888" fill="none" stroke="#e2e7ed" stroke-width="1"/>+<text x="20" y="402.25" font-family="Arial, Helvetica, sans-serif" font-size="15" font-weight="400" text-anchor="start" fill="#17212e" style="font-variant-numeric:tabular-nums">Qwen3.5</text>+<text x="277" y="401.9" font-family="Arial, Helvetica, sans-serif" font-size="14" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">35B · A3B</text>+<text x="419" y="402.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.898</text>+<text x="553" y="402.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.911</text>+<text x="687" y="402.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.870</text>+<text x="821" y="402.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.883</text>+<path d="M12 454H888" fill="none" stroke="#e2e7ed" stroke-width="1"/>+<text x="20" y="440.25" font-family="Arial, Helvetica, sans-serif" font-size="15" font-weight="400" text-anchor="start" fill="#17212e" style="font-variant-numeric:tabular-nums">Qwen3.5</text>+<text x="277" y="439.9" font-family="Arial, Helvetica, sans-serif" font-size="14" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">9B</text>+<text x="419" y="440.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.720</text>+<text x="553" y="440.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.759</text>+<text x="687" y="440.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.677</text>+<text x="821" y="440.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.734</text>+<path d="M12 492H888" fill="none" stroke="#e2e7ed" stroke-width="1"/>+<text x="20" y="478.25" font-family="Arial, Helvetica, sans-serif" font-size="15" font-weight="400" text-anchor="start" fill="#17212e" style="font-variant-numeric:tabular-nums">Qwen3.5</text>+<text x="277" y="477.9" font-family="Arial, Helvetica, sans-serif" font-size="14" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">4B</text>+<text x="419" y="478.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.699</text>+<text x="553" y="478.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.733</text>+<text x="687" y="478.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.653</text>+<text x="821" y="478.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.739</text>+<path d="M12 530H888" fill="none" stroke="#e2e7ed" stroke-width="1"/>+<text x="20" y="516.25" font-family="Arial, Helvetica, sans-serif" font-size="15" font-weight="400" text-anchor="start" fill="#17212e" style="font-variant-numeric:tabular-nums">Qwen3.5</text>+<text x="277" y="515.9" font-family="Arial, Helvetica, sans-serif" font-size="14" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">2B</text>+<text x="419" y="516.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.506</text>+<text x="553" y="516.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.507</text>+<text x="687" y="516.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.502</text>+<text x="821" y="516.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">0.506</text>+<path d="M12 16H888" fill="none" stroke="#aab6c5" stroke-width="1.5"/>+<path d="M12 74H888" fill="none" stroke="#aab6c5" stroke-width="1.5"/>+<path d="M12 530H888" fill="none" stroke="#aab6c5" stroke-width="1.5"/>+<text x="20" y="50.25" font-family="Arial, Helvetica, sans-serif" font-size="15" font-weight="700" text-anchor="start" fill="#17212e" style="font-variant-numeric:tabular-nums">Model</text>+<text x="277" y="49.9" font-family="Arial, Helvetica, sans-serif" font-size="14" font-weight="700" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">Params</text>+<text x="620" y="35.75" font-family="Arial, Helvetica, sans-serif" font-size="15" font-weight="700" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">JevOCRBench</text>+<path d="M352 45H888" fill="none" stroke="#e2e7ed" stroke-width="1"/>+<text x="419" y="64.4" font-family="Arial, Helvetica, sans-serif" font-size="14" font-weight="700" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">Overall</text>+<text x="553" y="64.4" font-family="Arial, Helvetica, sans-serif" font-size="14" font-weight="700" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">Text</text>+<text x="687" y="64.4" font-family="Arial, Helvetica, sans-serif" font-size="14" font-weight="700" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">Formula</text>+<text x="821" y="64.4" font-family="Arial, Helvetica, sans-serif" font-size="14" font-weight="700" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">Table</text>+<text x="20" y="554.2" font-family="Arial, Helvetica, sans-serif" font-size="12" font-weight="700" text-anchor="start" fill="#576574" style="font-variant-numeric:tabular-nums">Bold</text>+<text x="50.668" y="554.2" font-family="Arial, Helvetica, sans-serif" font-size="12" font-weight="400" text-anchor="start" fill="#576574" style="font-variant-numeric:tabular-nums">= column maximum</text>+<text x="218" y="554.2" font-family="Arial, Helvetica, sans-serif" font-size="12" font-weight="400" text-anchor="start" fill="#576574" style="font-variant-numeric:tabular-nums">Blue row = MiniCPM-OCR Jev</text>+<text x="20" y="578.2" font-family="Arial, Helvetica, sans-serif" font-size="12" font-weight="400" text-anchor="start" fill="#576574" style="font-variant-numeric:tabular-nums">Parameter sizes follow official nominal counts. A = active parameters; — = not disclosed.</text>+<text x="20" y="596.2" font-family="Arial, Helvetica, sans-serif" font-size="12" font-weight="400" text-anchor="start" fill="#576574" style="font-variant-numeric:tabular-nums">All results are reported on JevOCRBench.</text>+<text x="20" y="614.2" font-family="Arial, Helvetica, sans-serif" font-size="12" font-weight="400" text-anchor="start" fill="#576574" style="font-variant-numeric:tabular-nums">Jev models are evaluated with the Noul setting, while general models are evaluated with our rubric prompt.</text>+</svg>diff --git a/assets/minicpm-ocr/minicpm-chinese-examples-3-column.gif b/assets/minicpm-ocr/minicpm-chinese-examples-3-column.gifnew file mode 100644index 0000000..7b97530Binary files /dev/null and b/assets/minicpm-ocr/minicpm-chinese-examples-3-column.gif differdiff --git a/assets/minicpm-ocr/minicpm-english-examples-3-column.gif b/assets/minicpm-ocr/minicpm-english-examples-3-column.gifnew file mode 100644index 0000000..452b225Binary files /dev/null and b/assets/minicpm-ocr/minicpm-english-examples-3-column.gif differdiff --git a/assets/minicpm-ocr/minicpm-ocr-chinese-cases.png b/assets/minicpm-ocr/minicpm-ocr-chinese-cases.pngnew file mode 100644index 0000000..8509d08Binary files /dev/null and b/assets/minicpm-ocr/minicpm-ocr-chinese-cases.png differdiff --git a/assets/minicpm-ocr/minicpm-ocr-english-cases.png b/assets/minicpm-ocr/minicpm-ocr-english-cases.pngnew file mode 100644index 0000000..15d0f52Binary files /dev/null and b/assets/minicpm-ocr/minicpm-ocr-english-cases.png differdiff --git a/assets/minicpm-ocr/modelscope_logo.png b/assets/minicpm-ocr/modelscope_logo.pngnew file mode 100644index 0000000..0286d28Binary files /dev/null and b/assets/minicpm-ocr/modelscope_logo.png differdiff --git a/assets/minicpm-ocr/modelscope_logo_padded.svg b/assets/minicpm-ocr/modelscope_logo_padded.svgnew file mode 100644index 0000000..54a4b1f--- /dev/null+++ b/assets/minicpm-ocr/modelscope_logo_padded.svg@@ -0,0 +1,3 @@+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 60 34" width="60" height="34">+ <image x="0" y="0" width="60" height="32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAgCAYAAABO6BuSAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAINSURBVFiF7ZlPSxthEMafWVZzESlE0NAgySXpSaFIsKUUexDcXHqU3tx8AYvYD+BZKPoF1iBiTz2a7SUoUuwfSmsEoRba5FBISgx4sRCRHa+6mTcmIR7cfX/HeZh554GXHeZdgoKFOU4YBsoqXYIZexsuvegm5zZsi3eJMNNNjuchmf9AFUkz+tHUfUIbDjqhM2xmvhymJKH+sfZwtDgmSZcA/orVCP/619qNmhWFGgdg+oP12Voys3I4KJbL/CixJAw2ItXU23RMkCpOgZIdtnun5LJcBpDwx38tnVQvok2p9/BdaW046GjDQcccPh4WR4l5PnAOIN8iEBqqYlOlUpqYnkoaefj59fHEJ0nLfD96wgYeSRoTH3ybnDwRDyS8ByPqDw/9Hnp2WYvIvsa3E6OK/v87BbIVmoo0MTuSwIR1AKJhJp4nxqIi7yUA0bCzQ8tSPAf+A0D0FborrQ0HHW046JCdZfFLbAAPGJjwx5lxuuHSGymn3ViKubF4dH8kIWmN56eVqlUVN7B2Y8m2eJUII/44AUcecCblkBQE2r5p9bQtLWR50QDWJM0DXucLtN5tTdW2pN+0rqENBx1tOOi0PIB1QNy2WPwjQcBnx6VXkuY1seVF4IoVm+oNLGfxOwamVb3c1qyfXgybRK2jAACYla+L2CxSA1AbU8HAmOq8XgjdldaGg07oDF8Bu3melqQY3RQAAAAASUVORK5CYII="/>+</svg>\ No newline at end of filediff --git a/assets/minicpm-ocr/multi-models-improvements-en.png b/assets/minicpm-ocr/multi-models-improvements-en.pngnew file mode 100644index 0000000..cc2c642Binary files /dev/null and b/assets/minicpm-ocr/multi-models-improvements-en.png differdiff --git a/assets/minicpm-ocr/multi-models-improvements-zh.png b/assets/minicpm-ocr/multi-models-improvements-zh.pngnew file mode 100644index 0000000..21a7defBinary files /dev/null and b/assets/minicpm-ocr/multi-models-improvements-zh.png differdiff --git a/assets/minicpm-ocr/ocr-benchmark-results.png b/assets/minicpm-ocr/ocr-benchmark-results.pngnew file mode 100644index 0000000..960dd35Binary files /dev/null and b/assets/minicpm-ocr/ocr-benchmark-results.png differdiff --git a/assets/minicpm-ocr/ocr-benchmarks.png b/assets/minicpm-ocr/ocr-benchmarks.pngnew file mode 100644index 0000000..49b33deBinary files /dev/null and b/assets/minicpm-ocr/ocr-benchmarks.png differdiff --git a/assets/minicpm-ocr/ocr-benchmarks.svg b/assets/minicpm-ocr/ocr-benchmarks.svgnew file mode 100644index 0000000..c638884--- /dev/null+++ b/assets/minicpm-ocr/ocr-benchmarks.svg@@ -0,0 +1,99 @@+<svg xmlns="http://www.w3.org/2000/svg" width="900" height="452" viewBox="0 0 900 452" role="img" aria-labelledby="title desc">+<title id="title">OCR benchmark comparison — MiniCPM-OCR 1.0</title>+<desc id="desc">Benchmark results. Light blue identifies the MiniCPM row; bold scores identify column maxima. Model names, values, and source references are preserved in metadata.</desc>+<metadata>{"columns": ["Model", "Real5-OmniDocBench", "Wild-OmniDocBench", "OmniDocBench-v1.6", "olmOCR-bench", "OCRBench V2", "CHAOS-Bench"], "rows": [["TeleOCR", "90.72", "90.71", "96.91", "77.1", "23.3", "21.08"], ["OvisOCR2", "92.29", "89.91", "96.58", "80.3", "33.3", "6.38"], ["MinerU2.5-Pro", "89.94", "90.06", "95.69", "79.5", "29.1", "13.90"], ["PaddleOCR-VL-1.6", "93.19", "91.49", "96.34", "80.2", "35.2", "9.32"], ["GLM-OCR", "90.32", "90.40", "95.22", "75.2", "45.5", "8.62"], ["HunyuanOCR-1.5", "88.70", "87.01", "94.74", "78.6", "45.0", "14.88"], ["Surya-OCR-2", "84.88", "85.40", "89.29", "83.3", "13.9", "12.63"], ["Xiaomi-OCR-0", "92.73", "92.06", "96.83", "82.1", "47.0", "17.84"], ["MiniCPM-OCR 1.0", "93.68", "92.39", "96.51", "82.7", "54.7", "29.78"]]}</metadata>+<rect x="0" y="0" width="900" height="452" fill="#ffffff"/>+<path d="M12 112H888" fill="none" stroke="#e2e7ed" stroke-width="1"/>+<text x="20" y="98.25" font-family="Arial, Helvetica, sans-serif" font-size="15" font-weight="400" text-anchor="start" fill="#17212e" style="font-variant-numeric:tabular-nums">TeleOCR</text>+<text x="259.167" y="98.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">90.72</text>+<text x="373.5" y="98.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">90.71</text>+<text x="487.833" y="98.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="700" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">96.91</text>+<text x="602.167" y="98.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">77.1</text>+<text x="716.5" y="98.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">23.3</text>+<text x="830.833" y="98.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">21.08</text>+<path d="M12 150H888" fill="none" stroke="#e2e7ed" stroke-width="1"/>+<text x="20" y="136.25" font-family="Arial, Helvetica, sans-serif" font-size="15" font-weight="400" text-anchor="start" fill="#17212e" style="font-variant-numeric:tabular-nums">OvisOCR2</text>+<text x="259.167" y="136.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">92.29</text>+<text x="373.5" y="136.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">89.91</text>+<text x="487.833" y="136.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">96.58</text>+<text x="602.167" y="136.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">80.3</text>+<text x="716.5" y="136.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">33.3</text>+<text x="830.833" y="136.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">6.38</text>+<path d="M12 188H888" fill="none" stroke="#e2e7ed" stroke-width="1"/>+<text x="20" y="174.25" font-family="Arial, Helvetica, sans-serif" font-size="15" font-weight="400" text-anchor="start" fill="#17212e" style="font-variant-numeric:tabular-nums">MinerU2.5-Pro</text>+<text x="259.167" y="174.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">89.94</text>+<text x="373.5" y="174.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">90.06</text>+<text x="487.833" y="174.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">95.69</text>+<text x="602.167" y="174.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">79.5</text>+<text x="716.5" y="174.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">29.1</text>+<text x="830.833" y="174.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">13.90</text>+<path d="M12 226H888" fill="none" stroke="#e2e7ed" stroke-width="1"/>+<text x="20" y="212.25" font-family="Arial, Helvetica, sans-serif" font-size="15" font-weight="400" text-anchor="start" fill="#17212e" style="font-variant-numeric:tabular-nums">PaddleOCR-VL-1.6</text>+<text x="259.167" y="212.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">93.19</text>+<text x="373.5" y="212.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">91.49</text>+<text x="487.833" y="212.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">96.34</text>+<text x="602.167" y="212.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">80.2</text>+<text x="716.5" y="212.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">35.2</text>+<text x="830.833" y="212.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">9.32</text>+<path d="M12 264H888" fill="none" stroke="#e2e7ed" stroke-width="1"/>+<text x="20" y="250.25" font-family="Arial, Helvetica, sans-serif" font-size="15" font-weight="400" text-anchor="start" fill="#17212e" style="font-variant-numeric:tabular-nums">GLM-OCR</text>+<text x="259.167" y="250.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">90.32</text>+<text x="373.5" y="250.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">90.40</text>+<text x="487.833" y="250.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">95.22</text>+<text x="602.167" y="250.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">75.2</text>+<text x="716.5" y="250.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">45.5</text>+<text x="830.833" y="250.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">8.62</text>+<path d="M12 302H888" fill="none" stroke="#e2e7ed" stroke-width="1"/>+<text x="20" y="288.25" font-family="Arial, Helvetica, sans-serif" font-size="15" font-weight="400" text-anchor="start" fill="#17212e" style="font-variant-numeric:tabular-nums">HunyuanOCR-1.5</text>+<text x="259.167" y="288.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">88.70</text>+<text x="373.5" y="288.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">87.01</text>+<text x="487.833" y="288.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">94.74</text>+<text x="602.167" y="288.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">78.6</text>+<text x="716.5" y="288.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">45.0</text>+<text x="830.833" y="288.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">14.88</text>+<path d="M12 340H888" fill="none" stroke="#e2e7ed" stroke-width="1"/>+<text x="20" y="326.25" font-family="Arial, Helvetica, sans-serif" font-size="15" font-weight="400" text-anchor="start" fill="#17212e" style="font-variant-numeric:tabular-nums">Surya-OCR-2</text>+<text x="259.167" y="326.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">84.88</text>+<text x="373.5" y="326.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">85.40</text>+<text x="487.833" y="326.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">89.29</text>+<text x="602.167" y="326.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="700" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">83.3</text>+<text x="716.5" y="326.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">13.9</text>+<text x="830.833" y="326.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">12.63</text>+<path d="M12 378H888" fill="none" stroke="#e2e7ed" stroke-width="1"/>+<text x="20" y="364.25" font-family="Arial, Helvetica, sans-serif" font-size="15" font-weight="400" text-anchor="start" fill="#17212e" style="font-variant-numeric:tabular-nums">Xiaomi-OCR-0</text>+<text x="259.167" y="364.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">92.73</text>+<text x="373.5" y="364.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">92.06</text>+<text x="487.833" y="364.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">96.83</text>+<text x="602.167" y="364.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">82.1</text>+<text x="716.5" y="364.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">47.0</text>+<text x="830.833" y="364.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">17.84</text>+<rect x="12" y="378" width="876" height="38" fill="#eaf3ff"/>+<path d="M12 416H888" fill="none" stroke="#e2e7ed" stroke-width="1"/>+<text x="20" y="402.25" font-family="Arial, Helvetica, sans-serif" font-size="15" font-weight="700" text-anchor="start" fill="#17212e" style="font-variant-numeric:tabular-nums">MiniCPM-OCR 1.0</text>+<text x="259.167" y="402.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="700" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">93.68</text>+<text x="373.5" y="402.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="700" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">92.39</text>+<text x="487.833" y="402.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">96.51</text>+<text x="602.167" y="402.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="400" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">82.7</text>+<text x="716.5" y="402.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="700" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">54.7</text>+<text x="830.833" y="402.6" font-family="Arial, Helvetica, sans-serif" font-size="16" font-weight="700" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">29.78</text>+<path d="M12 378H888" fill="none" stroke="#aab6c5" stroke-width="1.5"/>+<path d="M12 416H888" fill="none" stroke="#aab6c5" stroke-width="1.5"/>+<path d="M12 16H888" fill="none" stroke="#aab6c5" stroke-width="1.5"/>+<path d="M12 74H888" fill="none" stroke="#aab6c5" stroke-width="1.5"/>+<path d="M12 416H888" fill="none" stroke="#aab6c5" stroke-width="1.5"/>+<text x="20" y="50.25" font-family="Arial, Helvetica, sans-serif" font-size="15" font-weight="700" text-anchor="start" fill="#17212e" style="font-variant-numeric:tabular-nums">Model</text>+<text x="373.5" y="35.75" font-family="Arial, Helvetica, sans-serif" font-size="15" font-weight="700" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">OmniDocBench</text>+<path d="M202 45H545" fill="none" stroke="#e2e7ed" stroke-width="1"/>+<text x="259.167" y="64.4" font-family="Arial, Helvetica, sans-serif" font-size="14" font-weight="700" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">Real5</text>+<text x="373.5" y="64.4" font-family="Arial, Helvetica, sans-serif" font-size="14" font-weight="700" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">Wild</text>+<text x="487.833" y="64.4" font-family="Arial, Helvetica, sans-serif" font-size="14" font-weight="700" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">v1.6</text>+<text x="602.167" y="40.9" font-family="Arial, Helvetica, sans-serif" font-size="14" font-weight="700" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">olmOCR</text>+<text x="602.167" y="58.9" font-family="Arial, Helvetica, sans-serif" font-size="14" font-weight="700" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">bench</text>+<text x="716.5" y="40.9" font-family="Arial, Helvetica, sans-serif" font-size="14" font-weight="700" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">OCRBench</text>+<text x="716.5" y="58.9" font-family="Arial, Helvetica, sans-serif" font-size="14" font-weight="700" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">V2</text>+<text x="830.833" y="40.9" font-family="Arial, Helvetica, sans-serif" font-size="14" font-weight="700" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">CHAOS</text>+<text x="830.833" y="58.9" font-family="Arial, Helvetica, sans-serif" font-size="14" font-weight="700" text-anchor="middle" fill="#17212e" style="font-variant-numeric:tabular-nums">Bench</text>+<text x="20" y="440.2" font-family="Arial, Helvetica, sans-serif" font-size="12" font-weight="700" text-anchor="start" fill="#576574" style="font-variant-numeric:tabular-nums">Bold</text>+<text x="50.668" y="440.2" font-family="Arial, Helvetica, sans-serif" font-size="12" font-weight="400" text-anchor="start" fill="#576574" style="font-variant-numeric:tabular-nums">= column maximum</text>+<text x="218" y="440.2" font-family="Arial, Helvetica, sans-serif" font-size="12" font-weight="400" text-anchor="start" fill="#576574" style="font-variant-numeric:tabular-nums">Blue row = MiniCPM-OCR 1.0</text>+</svg>diff --git a/assets/minicpm-ocr/parse-verify-workflow.svg b/assets/minicpm-ocr/parse-verify-workflow.svgnew file mode 100644index 0000000..1445d24--- /dev/null+++ b/assets/minicpm-ocr/parse-verify-workflow.svg@@ -0,0 +1,30 @@+<svg xmlns="http://www.w3.org/2000/svg" width="824" height="178" viewBox="0 0 824 178" role="img" aria-labelledby="title desc">+<title id="title">See Parse + Verify in action (schematic)</title>+<desc id="desc">1 Document: illustrative input. 2 Parser output: raw OCR output from MiniCPM-OCR 1.0 or another OCR parser. 3 MiniCPM-OCR Jev assessment: quality assessment; score, meaning and schema to confirm before release.</desc>+<g transform="translate(-88,-811)" font-family="DejaVu Sans, Arial, Helvetica, sans-serif">+<rect x="88" y="811" width="824" height="178" rx="3" fill="#FAFBFD" stroke="#D8DEE4" stroke-width="1"/>+<text x="106" y="837" font-size="10" font-weight="600" fill="#656D76" letter-spacing=".6">1 DOCUMENT</text>+<text x="389" y="837" font-size="10" font-weight="600" fill="#656D76" letter-spacing=".6">2 PARSER OUTPUT</text>+<text x="671" y="837" font-size="10" font-weight="600" fill="#656D76" letter-spacing=".6">3 JEV ASSESSMENT</text>+<rect x="107" y="852" width="217" height="115" rx="3" fill="#FFFFFF" stroke="#CDD5DF" stroke-width="1"/>+<text x="120" y="875" font-size="12" font-weight="600" fill="#656D76">Illustrative input</text>+<line x1="120" y1="893" x2="290" y2="893" stroke="#CCD1DC" stroke-width="2"/>+<line x1="120" y1="904" x2="278" y2="904" stroke="#CCD1DC" stroke-width="2"/>+<line x1="120" y1="915" x2="295" y2="915" stroke="#CCD1DC" stroke-width="2"/>+<rect x="120" y="930" width="170" height="24" rx="1" fill="#F7F5FD" stroke="#D7CEE9" stroke-width="1"/>+<line x1="173" y1="930" x2="173" y2="954" stroke="#D7CEE9" stroke-width="1"/>+<line x1="235" y1="930" x2="235" y2="954" stroke="#D7CEE9" stroke-width="1"/>+<rect x="389" y="852" width="217" height="115" rx="3" fill="#F2F4F8" stroke="#D8DEE4" stroke-width="1"/>+<text x="402" y="882" font-family="DejaVu Sans Mono, Menlo, Consolas, monospace" font-size="13" font-weight="500" fill="#6753C5">[raw OCR output]</text>+<text x="402" y="910" font-size="10" fill="#656D76">From MiniCPM-OCR 1.0</text>+<text x="402" y="929" font-size="10" fill="#656D76">or another OCR parser</text>+<rect x="670" y="852" width="217" height="115" rx="3" fill="#F7F4FF" stroke="#CEC3EB" stroke-width="1"/>+<text x="683" y="882" font-family="DejaVu Sans Mono, Menlo, Consolas, monospace" font-size="12" font-weight="500" fill="#6753C5">[quality assessment]</text>+<text x="683" y="910" font-size="10" fill="#656D76">Score, meaning and schema</text>+<text x="683" y="929" font-size="10" fill="#656D76">to confirm before release</text>+<line x1="341" y1="910" x2="372" y2="910" stroke="#7867CF" stroke-width="2"/>+<path d="M366 904 L373 910 L366 916" fill="none" stroke="#7867CF" stroke-width="2"/>+<line x1="623" y1="910" x2="654" y2="910" stroke="#7867CF" stroke-width="2"/>+<path d="M648 904 L655 910 L648 916" fill="none" stroke="#7867CF" stroke-width="2"/>+</g>+</svg>diff --git a/assets/minicpm-ocr/radar_blue_20261021-123600.png b/assets/minicpm-ocr/radar_blue_20261021-123600.pngnew file mode 100644index 0000000..ef4c7c3Binary files /dev/null and b/assets/minicpm-ocr/radar_blue_20261021-123600.png differdiff --git a/assets/minicpm-ocr/rebuild-benchmarks.py b/assets/minicpm-ocr/rebuild-benchmarks.pynew file mode 100644index 0000000..f1e846e--- /dev/null+++ b/assets/minicpm-ocr/rebuild-benchmarks.py@@ -0,0 +1,171 @@+#!/usr/bin/env python3+"""Rebuild the two README benchmark figures from benchmark-data.json.++Usage: python3 rebuild-benchmarks.py+Dependency: matplotlib (pip install matplotlib).+Source: user-provided MiniCPM-OCR 1.0 PDF, received 2026-10-22;+benchmark summary table on page 6 and throughput chart on page 7.+Conflicting values must remain null until confirmed. Incomplete data blocks plotting.+All paths are relative to this script, so it can run from any directory.+"""++from pathlib import Path+import json+import math++++ROOT = Path(__file__).resolve().parent+DATA = json.loads((ROOT / "benchmark-data.json").read_text(encoding="utf-8"))++if __name__ == "__main__":+ pending = [+ f"{model['name']} / {axis['name']}"+ for model in DATA["benchmarks"]["models"]+ for axis, score in zip(DATA["benchmarks"]["axes"], model["scores"])+ if score is None+ ]+ pending.extend(+ f"{model['name']} / throughput"+ for model in DATA["throughput"]["models"]+ if model["pages_per_second"] is None+ )+ if pending:+ raise SystemExit("Data pending confirmation; charts were not generated:\n- " + "\n- ".join(pending))++import matplotlib++matplotlib.use("Agg")+import matplotlib.pyplot as plt+from matplotlib.ticker import FixedLocator++PURPLE = "#6146D8"+INK = "#252A36"+MUTED = "#697384"+GRID = "#E2E5EC"++plt.rcParams.update({+ "font.family": "DejaVu Sans",+ "font.size": 11,+ "text.color": INK,+ "axes.labelcolor": INK,+ "xtick.color": MUTED,+ "ytick.color": MUTED,+ "figure.facecolor": "white",+ "savefig.facecolor": "white",+ "svg.fonttype": "path",+ "svg.hashsalt": "minicpm-ocr-benchmarks-20261022",+})+++def save_figure(fig, stem):+ metadata = {+ "Title": stem,+ "Description": DATA["source"]["note"],+ "Date": None,+ }+ fig.savefig(ROOT / f"{stem}.svg", metadata=metadata)+ fig.savefig(ROOT / f"{stem}.png", dpi=180, metadata={"Source": DATA["source"]["note"]})+ plt.close(fig)+++def draw_radar():+ source = DATA["benchmarks"]+ count = len(source["axes"])+ angles = [2 * math.pi * index / count for index in range(count)]+ closed_angles = angles + angles[:1]+ fig = plt.figure(figsize=(9.8, 9.0))+ fig.text(0.5, 0.955, "Document parsing and OCR benchmarks", ha="center", fontsize=20, weight="bold")+ fig.text(0.5, 0.917, "Shared 0-100 raw score scale on all six axes", ha="center", color=MUTED, fontsize=11.5)+ ax = fig.add_axes([0.18, 0.23, 0.64, 0.61], projection="polar")+ ax.set_theta_offset(math.pi / 2)+ ax.set_theta_direction(-1)+ ax.set_ylim(0, 100)+ ax.set_yticks([20, 40, 60, 80, 100])+ ax.set_yticklabels(["20", "40", "60", "80", "100"], fontsize=9, color="#929BAB")+ ax.set_rlabel_position(30)+ ax.set_xticks(angles)+ ax.set_xticklabels([])+ for angle, axis in zip(angles, source["axes"]):+ horizontal = "left" if math.sin(angle) > 0.1 else "right" if math.sin(angle) < -0.1 else "center"+ ax.text(angle, 116, axis["label"], color=INK, fontsize=11.5,+ ha=horizontal, va="center", clip_on=False)+ ax.grid(color=GRID, linewidth=0.8)+ ax.spines["polar"].set_color("#C7CCD8")+ ax.spines["polar"].set_linewidth(0.9)+ ax.set_facecolor("#FAFBFD")+ handles = {}+ # Draw the focus model last so its points remain visible where scores overlap.+ for model in source["models"][1:] + source["models"][:1]:+ focus = model["name"] == "MiniCPM-OCR 1.0"+ closed_scores = model["scores"] + model["scores"][:1]+ if focus:+ ax.fill(closed_angles, closed_scores, color=PURPLE, alpha=0.06, zorder=2)+ line, = ax.plot(+ closed_angles, closed_scores, color=model["color"],+ linewidth=2.8 if focus else 1.4,+ marker="o", markersize=5.8 if focus else 3.6,+ markeredgecolor="white", markeredgewidth=0.8 if focus else 0.45,+ alpha=1 if focus else 0.9, zorder=5 if focus else 3,+ )+ handles[model["name"]] = line+ offsets = [(8, 7), (9, 3), (9, -2), (7, -10), (-8, -9), (-8, 7)]+ for angle, score, offset in zip(angles, source["models"][0]["scores"], offsets):+ ax.annotate(+ f"{score:g}", xy=(angle, score), xytext=offset,+ textcoords="offset points", color=PURPLE, weight="bold", fontsize=10,+ ha="left" if offset[0] > 0 else "right", va="center", zorder=6,+ bbox={"facecolor": "white", "edgecolor": "none", "alpha": 0.82, "pad": 0.7},+ )+ names = [model["name"] for model in source["models"]]+ legend = fig.legend(+ [handles[name] for name in names], names,+ loc="lower center", bbox_to_anchor=(0.5, 0.083), ncol=3,+ frameon=False, fontsize=10, columnspacing=1.9, handlelength=2.4, labelspacing=1.1,+ )+ legend.get_texts()[0].set_weight("bold")+ legend.get_texts()[0].set_color(PURPLE)+ save_figure(fig, "benchmarks-radar")+++def draw_throughput():+ source = DATA["throughput"]+ models = source["models"]+ values = [model["pages_per_second"] for model in models]+ reference = values[0]+ fig = plt.figure(figsize=(12.1, 6.8))+ fig.text(0.07, 0.94, "End-to-end document parsing throughput", fontsize=20, weight="bold")+ fig.text(0.07, 0.893, "OmniDocBench v1.6 (1,651 images) | RTX 5090 | Image concurrency: 1", fontsize=11, color=MUTED)+ ax = fig.add_axes([0.265, 0.235, 0.61, 0.565])+ y_positions = list(range(len(models)))+ ax.axhspan(-0.43, 0.43, color="#F2EFFC", zorder=0)+ ax.barh(y_positions, values, height=0.5, color=[PURPLE] + ["#929CA9"] * (len(models) - 1), zorder=3)+ ax.set_yticks(y_positions)+ ax.set_yticklabels([model["name"] for model in models], fontsize=10.5)+ ax.get_yticklabels()[0].set_weight("bold")+ ax.get_yticklabels()[0].set_color(INK)+ ax.invert_yaxis()+ ax.set_xlim(0, 1.4)+ ax.set_ylim(7.6, -0.6)+ ax.xaxis.set_major_locator(FixedLocator([0, 0.3, 0.6, 0.9, 1.2]))+ ax.set_xticklabels(["0", "0.3", "0.6", "0.9", "1.2"], fontsize=10)+ ax.set_xlabel("Throughput (pages/s; higher is better)", fontsize=10.5, labelpad=12)+ ax.xaxis.grid(True, color=GRID, linewidth=0.8, zorder=1)+ ax.tick_params(axis="both", length=0)+ ax.tick_params(axis="y", pad=15)+ for spine in ax.spines.values():+ spine.set_visible(False)+ for index, value in enumerate(values):+ weight = "bold" if index == 0 else "normal"+ ax.text(value + 0.013, index, f"{value:.3f}", va="center", ha="left", color=INK, fontsize=10.5, weight=weight)+ ax.text(1.075, index, f"{value / reference:.2f}x", transform=ax.get_yaxis_transform(), va="center", ha="center", color=INK if index == 0 else MUTED, fontsize=10.5, weight=weight)+ ax.text(1.075, 1.035, "Relative\nthroughput", transform=ax.transAxes, ha="center", va="bottom", fontsize=9.5, color=MUTED, linespacing=1.4)+ fig.text(0.07, 0.115, "Official SDKs and default configurations. All models use accelerated configurations.", fontsize=9, color=MUTED)+ fig.text(0.07, 0.077, "Relative throughput is normalized to MiniCPM-OCR 1.0 = 1.00x.", fontsize=9, color=MUTED)+ save_figure(fig, "throughput-benchmarks")+++if __name__ == "__main__":+ draw_radar()+ draw_throughput()+ print("Rebuilt benchmarks-radar.{svg,png} and throughput-benchmarks.{svg,png}.")diff --git a/assets/minicpm-ocr/release-hero.svg b/assets/minicpm-ocr/release-hero.svgnew file mode 100644index 0000000..d10a74a--- /dev/null+++ b/assets/minicpm-ocr/release-hero.svg@@ -0,0 +1,82 @@+<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="350" viewBox="0 0 1200 350" role="img" aria-labelledby="title desc">+ <title id="title">MiniCPM-OCR — Fast parsing. High accuracy.</title>+ <desc id="desc">MiniCPM-OCR rapidly turns documents into structured text, tables and formulas. A stack of document pages flows through a lightning arrow into Markdown output. A decision model flags regions for review. Illustrative workflow.</desc>+ <defs>+ <linearGradient id="background" x1="0" y1="0" x2="1" y2="0.7">+ <stop stop-color="#FAFBFF"/>+ <stop offset="0.55" stop-color="#F6F5FF"/>+ <stop offset="1" stop-color="#EBEEFF"/>+ </linearGradient>+ <linearGradient id="brand" x1="0" y1="0" x2="1" y2="0">+ <stop stop-color="#3930AC"/>+ <stop offset="1" stop-color="#6552E6"/>+ </linearGradient>+ <linearGradient id="flow" x1="0" y1="0" x2="1" y2="0">+ <stop stop-color="#B7AFF0" stop-opacity="0"/>+ <stop offset="1" stop-color="#7765DB" stop-opacity="0.16"/>+ </linearGradient>+ <filter id="shadow" x="-30%" y="-25%" width="160%" height="170%">+ <feDropShadow dx="0" dy="8" stdDeviation="10" flood-color="#40368A" flood-opacity="0.10"/>+ </filter>+ <clipPath id="canvas"><rect width="1200" height="350" rx="18"/></clipPath>+ </defs>+ <g clip-path="url(#canvas)" font-family="Arial, Helvetica, sans-serif">+ <rect width="1200" height="350" fill="url(#background)"/>+ <path d="M576 121H1200V233H576Z" fill="url(#flow)"/>+ <g fill="none" stroke="#DCDDF5" opacity="0.7">+ <circle cx="1094" cy="176" r="186"/>+ <circle cx="1094" cy="176" r="222"/>+ <circle cx="1094" cy="176" r="258"/>+ </g>++ <!-- Parsing is the main story; the decision model is a secondary note. -->+ <rect x="46" y="38" width="6" height="15" rx="3" fill="#6351DB"/>+ <text x="64" y="50" fill="#6C6199" font-size="12" font-weight="700" letter-spacing="2">DOCUMENT PARSING</text>+ <text x="43" y="119" fill="url(#brand)" font-size="58" font-weight="750" letter-spacing="-2.2">MiniCPM-OCR</text>+ <text x="46" y="169" fill="#29263F" font-size="30" font-weight="600" letter-spacing="-0.5">Fast parsing. High accuracy.</text>+ <text x="47" y="211" fill="#716B85" font-size="17">Text · Tables · Formulas → Markdown</text>+ <path d="M47 249H554" stroke="#DEDBEF"/>+ <g fill="none" stroke="#8C80B9" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round">+ <path d="M52 287h9m0 0v-7h8m-8 7v7h8"/>+ <circle cx="49" cy="287" r="3" fill="#F7F6FE"/>+ <circle cx="72" cy="280" r="3" fill="#F7F6FE"/>+ <circle cx="72" cy="294" r="3" fill="#F7F6FE"/>+ </g>+ <text x="87" y="284" fill="#665C83" font-size="16" font-weight="700">Decision model</text>+ <text x="87" y="307" fill="#81788F" font-size="15">Flags regions that need review</text>++ <!-- Incoming pages and motion trails convey throughput without claiming a number. -->+ <g fill="none" stroke="#BAB2E9" stroke-linecap="round">+ <path d="M590 130h48m-69 23h63m-35 23h30" stroke-width="3" opacity="0.7"/>+ <path d="M591 225h42m-20 21h24" stroke-width="2" opacity="0.5"/>+ </g>+ <rect x="634" y="87" width="159" height="206" rx="10" fill="#E5E2F7" stroke="#D3CDEA" transform="rotate(-10 713 190)"/>+ <rect x="645" y="75" width="159" height="206" rx="10" fill="#F0EEFB" stroke="#D6D0EB" transform="rotate(-5 724 178)"/>+ <rect x="657" y="63" width="159" height="206" rx="10" fill="white" stroke="#D7D2EC" filter="url(#shadow)"/>+ <text x="672" y="93" fill="#5D5773" font-size="14" font-weight="700">Document</text>+ <path d="M672 110h90m-90 12h128m-128 12h115" stroke="#C7C3D5" stroke-width="4" stroke-linecap="round"/>+ <rect x="672" y="152" width="128" height="56" rx="3" fill="#F6F4FE" stroke="#CFC7EA"/>+ <path d="M673 170h126m-126 19h126m-84-36v54m43-54v54" stroke="#CFC7EA"/>+ <text x="673" y="244" fill="#8C80B0" font-family="Georgia, Times New Roman, serif" font-size="21" font-style="italic">x² + y² = r²</text>+ <text x="738" y="318" text-anchor="middle" fill="#8D85A4" font-size="13">PDFs & images</text>++ <!-- A fast, directional handoff from source document to structured output. -->+ <path d="M830 170h98m-13-12 13 12-13 12" fill="none" stroke="#6B53CF" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>+ <path d="M833 137h18m-11 65h23" fill="none" stroke="#BEB3E9" stroke-width="3" stroke-linecap="round"/>+ <circle cx="875" cy="170" r="27" fill="url(#brand)"/>+ <path d="M877 151l-14 22h11l-3 17 16-25h-12z" fill="#FFF"/>++ <!-- The output mirrors the text, table and formula in the source page. -->+ <rect x="944" y="49" width="211" height="236" rx="12" fill="white" stroke="#CFC8EA" filter="url(#shadow)"/>+ <path d="M956 49h187a12 12 0 0 1 12 12v31H944V61a12 12 0 0 1 12-12Z" fill="#F2EFFC"/>+ <text x="961" y="77" fill="#6450AE" font-size="15" font-weight="700">Markdown</text>+ <path d="m1123 66-6 5 6 5m10-10 6 5-6 5" fill="none" stroke="#9C8CC8" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"/>+ <text x="961" y="119" fill="#534377" font-size="16" font-weight="700"># Document</text>+ <path d="M962 135h171m-171 11h148" stroke="#BEB4D6" stroke-width="3" stroke-linecap="round"/>+ <rect x="961" y="163" width="177" height="57" rx="4" fill="#FAF9FD" stroke="#D3C9E9"/>+ <path d="M962 182h175m-175 19h175m-116-37v55m58-55v55" stroke="#D3C9E9"/>+ <path d="M969 173h29m30 0h22m35 0h26m-142 19h35m24 0h18m39 0h34m-150 19h26m33 0h26m33 0h19" stroke="#A99AC8" stroke-width="2.2" stroke-linecap="round"/>+ <text x="961" y="251" fill="#7D699F" font-family="Consolas, Menlo, monospace" font-size="15">$x^2+y^2=r^2$</text>+ <text x="1049" y="318" text-anchor="middle" fill="#8D85A4" font-size="13">Structured output</text>+ </g>+</svg>diff --git a/assets/minicpm-ocr/review-free-en.png b/assets/minicpm-ocr/review-free-en.pngnew file mode 100644index 0000000..0a4fb14Binary files /dev/null and b/assets/minicpm-ocr/review-free-en.png differdiff --git a/assets/minicpm-ocr/review-free-zh.png b/assets/minicpm-ocr/review-free-zh.pngnew file mode 100644index 0000000..ab65f44Binary files /dev/null and b/assets/minicpm-ocr/review-free-zh.png differdiff --git a/assets/minicpm-ocr/rubic_prompt.py b/assets/minicpm-ocr/rubic_prompt.pynew file mode 100644index 0000000..b0d9a2e--- /dev/null+++ b/assets/minicpm-ocr/rubic_prompt.py@@ -0,0 +1,357 @@+rubic_prompt = r"""+你是 OCR 质检员,对比【原图】、【OCR文本】和【OCR渲染图】,先按5项逐项核查,再给出量化评分。++【输入说明】+- 你会收到三部分输入:原图、OCR文本、由 OCR文本渲染得到的 OCR渲染图。+- OCR文本和OCR渲染图共同表示同一个待评测候选结果,最终要判断该候选结果是否忠实还原原图内容。+- OCR文本是主要评估对象;OCR渲染图作为辅助理解OCR文本结构、表格和可视化效果的参考。+- 渲染基准是标准 markdown 渲染器(数学部分为 KaTeX):渲染图即OCR文本在该基准下的真实+ 渲染结果。若渲染图显示的是 KaTeX 报错信息(报错文本图),表示OCR文本数学源码在标准+ 渲染器下解析失败,该渲染失败本身属OCR文本自身缺陷(见分项1〔源码写法缺陷〕)。+ 若渲染图中出现字面显示的 LaTeX 命令或定界符(如 \quad、\(),表示该内容未被识别为数学、+ 按普通字符渲染——请按渲染图所见与原图比对判定。+- 你只能根据原图、OCR文本和OCR渲染图独立判断。++【无图检查】+- 若你没有收到原图,或收到的原图无法辨认出任何图像内容,直接只输出一行:ERROR_NO_IMAGE+- 此时不要输出逐项核查、评分或最终判断。严禁在没有原图的情况下给出任何判断。++【预检信息(可选输入)】+- 判卷输入可能在OCR文本之后附带一行以"预检:"开头的提示(如"预检:该候选文本未通过标准+ KaTeX 解析(错误:……)")。这是管线用标准 markdown 渲染器(KaTeX)对OCR文本数学源码+ 做解析预检的结果,表示该写法在 markdown 基准下不可渲染。+- 收到该提示时:对应缺陷(数学环境未闭合、定界符缺失、\left 与 \right 不配对、display 环境+ 非法嵌套、KaTeX 不支持的 LaTeX-only 命令等)属于OCR文本自身缺陷,不得引用忽略项I豁免;+ 即使该写法在完整 LaTeX 引擎(pdflatex)下能正常渲染,也不构成豁免——渲染基准是+ markdown 渲染器,不是完整 LaTeX。+- 没有附带预检提示时,不代表候选一定可渲染,引用忽略项I前仍须自行核对其前提。++【重要前提:忠实于原图】+- 你的唯一判断依据是当前原图中实际可见的内容。+- 绝对不要推测原图中不存在的内容,如"占位符"、"隐藏元素"或是不完整的内容等,如果原图中+ 看不到某个元素,那它就是不存在的。+- 只有当前原图中确实可见的内容,在OCR文本中缺失、错误、错位或乱码,或OCR渲染图暴露出+ OCR文本本身的结构/位置错误,才能判不合格。++【核查范围:只比对主体内容】+- 原图可能因裁切或旋转/光照/畸变等变换,在主体内容之外带有边缘内容:被裁得不完整的+ 上下残行/残块、旋转带入的邻栏文字或题头栏等界外内容。主体与边缘的分界通常肉眼明显。+- 核查只针对主体内容。边缘内容:OCR未识别 → 不算遗漏;边缘内容(无论是变换带入的界外+ 内容,还是被裁断的残缺内容)被OCR识别写进结果 → 按分项1"多出内容"判不合格。+- 轻微截断不属于边缘内容:若截断处残缺比例非常小、几乎不影响内容辨认(如一行文字被+ 横向截断、仅底部约1/6不可见但每个字仍可识别),该行属于主体内容,照常核查。++【忽略项:以下情况必须判合格。其中 G、J、K 条内的列举为封闭清单:列举即全部适用范围,+未列举的情形不得类比套用或引申扩展】+A. 字体风格差异(斜体/粗体/字号/字体族)、行距、颜色、分栏版式差异。+ 注意①:字母大小写不属于字体风格——大小写属于内容,与原图不一致必须判不合格(见分项1)。+ 注意②:数学字母表属于符号身份、不属于字体风格——原图使用黑板体/花体/手写体/哥特体+ (\mathbb、\mathcal、\mathscr、\mathfrak 等)符号被OCR写成普通字母或其他字母表,+ 按分项1符号错误判不合格。例外:同一字母的常见书写变体不构成符号对立时可接受+ (如手写原图中 ℓ 即字母 l 的标准手写体,ℓ→l 合格);判断标准是该字形在文档中是否+ 构成与普通字母的区分性对立、或印刷体原图特意选用了该字母表。+B. LaTeX/Markdown/HTML 源码层写法差异,一律以渲染结果为准:源码中的空白、换行、+ 转义写法(%→\%、$多余、{1 7} 与 {17} 等),只要渲染后无可见差异、数值文意不变,判合格;+ 标题 # 层级、加粗星号等纯样式标记差异按渲染样式差异处理,不判错;+ 但以下不属于本条豁免:+ - 内容的增删不属于写法差异:多出的内容即使在渲染图中恰好不可见(如数学环境内的+ 裸下划线被渲染器吞掉、非法嵌套里的编号被吞掉),仍按分项1"多出内容"判不合格——+ 渲染巧合不构成豁免,且 markdown 基准下这类内容通常以字面形式可见;+ - 原图中的上标/下标必须保留,被写成普通同行文本不属于可忽略差异(®/™/© 商标类符号除外,见分项1例外);+ - 原图的字面字符被写成 markdown 结构语法致渲染形态改变不属于可忽略差异+ (如原图行首字面短横"–"被写成列表语法"- "渲染成圆点•,见分项1)。+C. 原图末尾或边缘本身已截断(该行/块残缺、无法完整辨认),OCR文本没有输出该残缺内容、+ 也没有补出原图不可见内容,同时主体部分实际可见的内容没有遗漏。必须判合格,这是原图+ 本身的限制,不是OCR错误。注意:把残缺内容写进结果不受本条保护(按分项1"多出内容"+ 判不合格);截断轻微、内容仍可完整辨认的行属主体内容,照常核查(见【核查范围】)。+D. 表格单元格内容的对齐方式差异(居中/左对齐/右对齐),只要内容正确即可忽略对齐差异。+E. 单栏/双栏/多栏的版式结构差异(原图是双栏但渲染图变成单栏,或反之),只要文本内容完整、+ 且阅读顺序正确(先读完一栏再读下一栏,不得两栏交错混读),即可忽略栏数差异;+ 两栏内容交错混读属于顺序错误,按分项1判不合格。+F. 段落之间、标题与正文之间的换行/空行差异(原图有换行但OCR文本或渲染图没有,或渲染图多了+ 换行),只要文本内容本身没有缺失、且不触发分项1中"语义空白"条款,即可忽略。+G. 目录页中条目后的引导符号差异(如点线 ...... 的长短不同),但目录页码数字本身必须核查。+ 本条仅适用于目录页的长短差异;表格行名后的引导点线属于内容,整体省略按分项1判不合格。+H. 如果当前原图是纯图片/纯图形且没有需要 OCR 的可见文字,OCR文本为空或仅表示图片占位可判+ 合格;若原图中可见文字、数字、公式或表格文字,则必须核查。+I. OCR文本本身是标准可渲染写法且内容正确,但OCR渲染图因渲染器自动换行、样式、字体、字号、+ HTML/Markdown/LaTeX显示规则产生差异,必须判合格;不要把渲染器显示问题当作 OCR 错误。+ 渲染器缺陷(字体缺失呈方框、标准命令静默降级为普通体)同理:以 OCR 文本本身是否正确为准。+ 引用本条的前提:必须先核对 OCR 文本的写法在标准 markdown 渲染器(KaTeX)下本身可正确+ 渲染——"标准可渲染"以 markdown+KaTeX 为准,仅完整 LaTeX 引擎能渲染不算。+ 以下属于OCR文本自身缺陷、渲染失真责任在候选,不得引用本条豁免:+ - LaTeX-only 方言写法:仅完整 LaTeX 引擎(pdflatex)能渲染、标准 markdown+KaTeX+ 解析报错的命令或环境(如 \lefteqn、\ensuremath 等宏包命令);+ - 数学内容未置于数学定界符($…$、$$…$$、\(…\)、\[…\])内:裸 LaTeX 命令在 markdown+ 下按字面字符显示,是否判负按渲染结果与原图比对(见分项1);+ - 非标方言写法(如 <math> 标签内装 LaTeX 命令、HTML 与 LaTeX 杂交写法);+ - markdown 控制字符未转义(见分项1);+ - 数学环境未闭合、定界符缺失、\left 与 \right 不配对等不可渲染缺陷。+J. 版面装饰差异,默认判合格(可在说明中记录,不扣分)。封闭清单:纯强调性下划线的丢失、+ 着重号、装饰性边框、横线长短/宽度变体(— / - / -)、全角/半角标点宽度、引号样式差异。+ 以下不属于本条豁免:+ - 功能性标记(列表项目符号■•–、序号、圈选框等)属于内容,丢失或形态互换按分项1判不合格;+ - 省略号点数改变(如六点"……"写成三点"…"或三个中圆点"···")按分项1判不合格;+ 仅点位差异(同点数的基线点↔中圆点)不算差异(与数学内 \cdots↔\ldots 同理,见忽略项K);+ - 公式/化学式内的上划线、下划线属内容符号(存在与覆盖范围均须一致,见分项1),不适用本条;+ - 候选擅自添加原图没有的装饰标签(如给字符包 <u>)且渲染后改变字符观感,按分项1判不合格;+ - 若装饰构成题面语义、或符号变化导致语义歧义,按分项1的对应条款判不合格。+K. 数学语义等价的写法/排版差异,即使渲染外观不同也判合格。封闭清单:+ - 大型数学算子的上下限排版位置差异,封闭适用于:∫ ∑ ∏ ⋃ ⋂ ⨁ lim max min sup inf+ 以及进程代数并行算子 ‖/||| 的同步集合(正下方 ↔ 右下标互换)——即同一附着内容因+ display/inline 排版风格出现在正下方或侧边,内容集合本身不变;+ 化学反应箭头(\xrightarrow 等)不属于本条:箭头上方与下方是两个不同的内容槽位+ (试剂/条件的归属由原图决定),上下互换或从上方移到下方按分项1判不合格;+ - LaTeX 对齐符顺序差异(= & 与 &=);+ - 化学语境的 ⇄ 与 ⇌;+ - \tag 公式编号的位置差异(纵向不跟随原图行位、以及原图编号在左而渲染在右),+ 但编号数字本身必须与原图一致;+ 推理规则名旁注(如自然演绎推理式右侧的 (NOT ∧ intro))的纵向位置差异同理可容忍,+ 旁注内容与符号必须一致;+ - 同点数的 \cdots 与 \ldots 互换(点位高低差异)——已拍板允许(8/19);+ - 简单分式的竖式与行内写法互换(双向:\frac{1}{2}↔1/2、\frac{a}{b}↔a/b)——仅当+ 分子、分母均为单个字母或数字/数字串时豁免,两种写法数学语义唯一等价;分子或分母含+ 复合表达式(多项运算、函数、上下标嵌套等)的改写不在豁免之列:行内斜杠会引入运算+ 优先级/切分歧义(如 \frac{a+b}{c} 写成 a+b/c 语义已变),按分项1判不合格。+ 增删可见符号不属于等价(如原图 \cdots 被写成 \cdot\ldots\cdot,多出两个可见点号,+ 按分项1判不合格);未列举的符号对不得以"语义等价/符号变体"为由放行+ (如 ∽ 写成 ∼,按分项1判不合格)。++【判断逻辑】任一分项不合格(且不属于忽略项)→ 最终不合格。+- 以OCR文本是否忠实还原原图为主;OCR渲染图用于辅助发现 OCR文本中的内容、顺序、表格结构+ 或单元格位置问题。+- 如果OCR文本和OCR渲染图彼此不一致,先判断差异责任方:OCR文本写法标准且正确、差异仅来自+ 渲染器 → 不判不合格(忽略项I);OCR文本写法非标或有缺陷导致渲染失真 → 判不合格。+- 只有当OCR文本本身存在实质内容错误,或OCR渲染图暴露出OCR文本中的结构/位置错误时,+ 才判对应分项不合格。++1. 文本完整性:当前原图主体内容中的可见文字、数字、公式是否在OCR结果中完整正确?+ (核查对象限主体内容,见【核查范围】)+ 〔缺失与多出〕+ - 整段、整行、标题、页码、脚注、表格标题、图表文字、公式或数字缺失 → 不合格+ - 目录条目的页码缺失或错误 → 不合格+ - 多出原图中不存在的文字、数字、公式或占位内容 → 不合格;把边缘内容(变换带入的+ 界外内容、被裁断的残缺内容)识别写进结果同属多出内容 → 不合格(见【核查范围】)+ - 把可见内容识别错、顺序错、正文整段消失或截断(且原图对应位置内容完整)→ 不合格+ 〔字符与符号保真〕+ - 公式、化学式、单位、变量名或表格内容中的上标/下标丢失,或被写成普通同行文本+ (如 x² 写成 x2、H₂O 写成 H2O、m² 写成 m2)→ 不合格+ - 例外:®/™/© 等商标版权类符号的上下标位置差异不判错——此类符号的身份由字符本身+ 携带(U+00AE 即标准编码、无非上标变体),垂直位置不改变语义,纯文本亦无法在不加+ 标记的情况下表达上标;但符号丢失、或被写成替代形式(字母 R、(R)、TM 等)→ 不合格。+ - 例外:原图中印刷偏高的星号(显著性记号、脚注记号等)被写成上标 ^{*} → 默认合格+ (忠实还原偏高形态);唯一例外:上下文构成可验算的算术计算链(如 A*B=C 且数值可+ 验算),此时星号语义为乘号、垂直位置属运算符排版,写成上标属语义错置 → 不合格;+ 符号定义式中的系数乘(无可验算等式)不构成计算链,维持合格。反向情形按既有条款:+ 原图真上标星号(显著性 ***)被写成同行普通文本 → 不合格(上标丢失)。+ - 例外:Unicode 兼容字符与其对应的上标写法互换不判:㎡↔m²、㎥↔m³、℃↔°C 等——+ 兼容字符本身携带上标形态语义,非上标丢失。+ - 数学字母表符号被替换(黑板体/花体/哥特体被写成普通字母,或 \mathscr 写成 \mathcal 等+ 字形可辨区分的互换)→ 不合格(边界见忽略项A注意②)+ - 公式/化学式内的上划线、下划线(\overline/\underline 及印刷体上下划线)属内容符号:+ 存在与覆盖范围都必须与原图一致——丢失、或覆盖跨度明显不同(如原图横线只覆盖+ Mn(CO) 而候选 \overline 覆盖整个配合物)→ 不合格;此类划线不适用忽略项J+ (J 的"纯强调性下划线"仅限正文文字的强调装饰)+ - 矩阵/行列式的行数与列数属内容结构:包括内容为空的行/列——原图定界括号的+ 纵向/横向延伸范围明显超出可见元素时,即证明存在空行/空列(如原图 4 行矩阵+ 末行为空、候选写成 3 行矩阵)→ 行列数与原图不一致判不合格。+ - 字母大小写与原图不一致(如原图 X 写成 x、原图 pH 写成 PH)→ 不合格+ - 繁简字形与原图不一致(原图繁体字被写成简体字,或反之)→ 不合格+ - 字符/标点缺失 → 不合格:原图中语义上存在且视觉上可见的字符、标点符号,在OCR文本与+ 渲染图中缺失(如少一个逗号/顿号/句号)→ 不合格;但以下不计缺失:原图污渍、噪点造成+ 的貌似标点而语义上明显不存在的内容;孤立点划与正文间距明显超出常规标点间距、+ 无法明确归属该句的(疑漂移墨点),不得要求补出。+ - 正文省略号点数改变 → 不合格:六点"……"被写成三点"…"或三个中圆点"···"(点数减半)+ 均属字符不一致;仅点位差异(同点数基线点↔中圆点)不算差异+ (目录页引导点线长短差异见忽略项G;数学公式内 \cdots↔\ldots 见忽略项K)+ - 符号宽度变化导致语义歧义 → 不合格(如姓名后的长破折号"王博——"被写成"王博-",+ 渲染后近似"王博一",可能误读为另一个姓名)。+ 〔语义空白与连字符〕+ - 空格或换行的丢失导致语义改变 → 不合格。包括四种情形:+ ① 题号与内容被并读成一个数值(如原图"13. 9"是题号13.加答案9,OCR写成小数"13.9");+ ② 原图换行处行尾没有标点、且下一行行首没有序号或项目符号,去掉换行后前后字符直接粘连;+ 行首记号的豁免按记号类型分判:序号,以及无行内角色的项目符号(•、●、▪、■ 等),+ 粘连串中该记号仍无歧义地标示列表边界 → 豁免不判;短横类记号(-、–、—)不在豁免+ 之列——短横另有行内合法角色(数值区间、连字符复合词、破折号),换行丢失后+ (如"easement– Federal"、"$165,000– State")会被误读为区间/连写/破折号,+ 属产生真歧义的粘连 → 不合格(与"符号宽度变化导致语义歧义"条款同理);+ ③ 姓名之间的空格丢失(可能造成姓名歧义)。+ ④ 词间可见空格丢失致粘连 → 不合格:原图中相邻的词、术语与编号/型号之间+ ("inhibitor 1"→"inhibitor1"、"Gro 1"→"Gro1"、"Integrin B1"→"IntegrinB1"),+ 或公式内文字词与相邻数字/变量之间("mod 16"→"mod16"、"when k"→"whenk"、+ "2 if r"→"2ifr"),原图存在的空格在候选中丢失、渲染后字符直接粘连成串——+ 词与编号的边界消失、易误读为单一记号;公式内候选应把空格写进 \text{}+ (\text{when })或用 \bmod/\pmod 等标准命令。+ 本情形判据是"原图有空格、渲染后无空格且粘连"的二值变化;以下不判:+ 空格宽度/数量差异(单空格↔双空格)、换行与空行差异(忽略项F)、+ 中英文之间的间距差异、标点前后空隙宽度、渲染无差异的源码层空白(忽略项B)。+ 〔粘连判负通则(适用于情形②与④)〕粘连判不合格以产生新的合法误读为前提——+ 边界虽粘连但读者仍能唯一正确切分的,不判。以下豁免:junction 一侧为强定界符号+ (括号/方括号、标点、竖线 |、量词 ∀ ∃ 等数学定界符号,以及上标位记号 ^{*}、′),+ 符号本身即边界,粘连不产生歧义(如"for∀"、"t^{*}given");定界符收口的配对记法+ (估计值与括注紧邻串接"0.0061***(0.0017)"、金额与[标签]串接"[individual]$750"),+ 配对定界符自成边界;数字后直接接单位/型号记号("8.12m"、"15HDM"),数字|字母+ 边界自明可自恢复。豁免不适用(仍判不合格)的粘连:词|词(含希腊/花体变量与词团+ 驼峰)、词|数字编号("Proposition3"、"inhibitor1")、数值|数值或数值|$ 直接串接+ ("$0$0$0",区间切分歧义)、中文|中文,以及定界符粘连仍产生新合法误读的情形+ (如"BB₉(4)"被读作函数作用)。反向的词内离散同判不合格:原图单词内部被多出的+ 空格拆散(如"Parent"写成"P a r e n t"),词形边界被破坏 → 不合格。+ - 悬挂连字符丢失 → 不合格:原图行尾连字符若合并后不构成合法单词或改变语义+ (如化学命名"4-methyl- and 4-ethylpyridine"的悬挂连字符),该连字符属真实内容+ 必须保留,丢失判不合格;属单词内断行的连字符(合并后为合法单词),OCR合并去除+ 不算差异。+ 〔源码写法缺陷(渲染失真责任在候选,不适用忽略项I)〕+ - 数学源码在标准 markdown 渲染器下解析失败 → 不合格:数学环境未闭合、定界符缺失、+ \left 与 \right 不配对、display 环境非法嵌套,以及 LaTeX-only 方言(\lefteqn、+ \ensuremath 等仅完整 LaTeX 引擎支持、KaTeX 解析报错的命令或环境)——渲染图显示+ KaTeX 报错信息即属此类;即使完整 LaTeX 引擎能渲染该写法,也不构成豁免。+ - 数学内容缺定界符按字面显示且与原图不一致 → 不合格:数学命令/公式未置于数学定界符+ ($…$、$$…$$、\(…\)、\[…\])内时,markdown 按字面字符渲染(如原图是排版好的公式、+ 渲染图却显示 \quad、\frac 等字面命令,或多出字面定界符 \(、\])——按渲染图所见与+ 原图比对,不一致判不合格;渲染结果与原图无可见差异的不判。+ - markdown 控制字符未转义 → 不合格:原图正文中的字面 *、_、# 等字符被OCR裸写进+ markdown,渲染后字符消失或引发原图不存在的斜体/粗体等伪样式(如字面"(*)"被吞、+ 成对"__"双下划线引发伪粗体)→ 不合格。此类伪样式不属于忽略项A的字体风格差异。+ - 非标方言写法致渲染缺失 → 不合格:如 <math> 标签内装 LaTeX 命令(标准渲染器均不识别,+ 符号整体消失)→ 不合格。+ 〔装饰与功能性标记〕+ - 版面装饰构成题面语义时丢失 → 不合格:答案框/选项框/圈选(如原图"18"带方框表示圈选+ 作答,OCR丢失方框)、填空线标示作答位置等;纯强调性下划线丢失仍按忽略项J判合格。+ - 功能性标记丢失或形态互换 → 不合格:列表项目符号(■、•、–等)、序号属于内容;+ 丢失判不合格;用 markdown 列表语法替代致渲染形态改变(原图"–"渲染成"•")也判不合格。+ - 填空线形态:实线横线"——"与下划线"___"互换 → 合格;点线(虚线点状)与横线/下划线+ 互换 → 不合格。+ - 表格行名后的引导点线(如"ABC……")整体省略 → 不合格。+ - 表格结构线不要求复现 → 合格:原图表格框线、财报小计/合计横线、双线等属结构层,+ OCR文本不输出这些线不算差异;但把结构线编码进内容层(如给单元格内容包 <u>、+ 插入 <hr/> 行)致渲染观感异化或多出行 → 不合格(多出行同时按分项2判)。+ 〔豁免情形〕+ - OCR文本正确,但OCR渲染图因渲染器自动换行、样式或显示规则导致可见差异 → 合格(忽略项I)+ - 原图末尾已截断的残缺行:OCR未输出且未补出不可见内容 → 合格(忽略项C);+ 截断轻微、内容仍可辨认的行照常核查++2. 表格行列数:有清晰行列结构的表格,OCR结果的表格结构是否与原图一致?+ - 本项适用于一切具有行列对应关系的表格,包括无边框/无网格线的表格(财务报表、+ 列表式排版、PPT表格等);仅当原图内容不构成行列对应关系(自由排版、统计图)时不适用。+ - 行数、列数、表头层级明显不一致 → 不合格+ - 多出原图不存在的行/列 → 不合格:包括把表外文字并入表格成行、把结构线编码为+ 独立行(<hr/> 行)、多余空行等。+ - 单元格内多段内容的拆分/合并按对应关系判:原图某单元格内含多段并列内容、候选将其+ 拆成多行(常配合给相邻单元格加 rowspan 保持对应),或反向把多行合并进一个单元格——+ 只要拆分/合并后每段内容与相邻单元格内容的对应关系和原图一致(逐段对齐,或多段共同+ 对应同一个相邻单元格),且无内容丢失、错位 → 视作无差异判合格,分项2/3/4 均不得+ 因此判不合格;仅当拆分/合并制造了原图不存在的错误对应(某段被对到错误的相邻内容、+ 或把无关的表外文字并入表格成行)→ 不合格。+ 本条款仅适用于数据区单元格,表头单位行的合并/分行见下条;合并方向同时受分项4的+ 结构证据条款约束——原图有斑马纹等证据表明是多个独立单元格时,合并属自创结构,+ 不得引用本条判合格。+ - 表头标题下方的计量单位行(如各数字列下的"人民币元"/"单位:元",与标题之间常有+ 表头横线分隔):候选保持独立两行、或并入标题单元格(如"年初数人民币元")均可接受,+ 不判错——单位是对标题的限定,两种写法信息等价;仅当单位文本丢失、或归属到错误的+ 列时判不合格。长标题自然折行的换行合并同理可接受。+ - 判不合格时,必须写出:不一致的具体行号/列号、原图中该处的结构、OCR结果中的结构;+ 写不出具体证据则不得判不合格。++3. 单元格内容及位置:原图表格中每个有内容的单元格,在OCR结果中是否存在且位于相同的行列+ 位置?请逐行逐列仔细对比,不要只看内容是否存在,还要确认位置是否正确;含空白单元格的+ 行列也要核对内容归属的列位置。+ - 原图有内容但渲染图对应位置为空 → 不合格+ - 内容存在但出现在错误的行或列(例如原图在第2行第3列,渲染图跑到了第3行第3列)→ 不合格+ - 单元格内容的对齐方式差异 → 可忽略(忽略项D)+ - 无表格 → 合格+ - 判不合格时,必须写出:出错单元格的行列位置、该单元格在原图中的原文、OCR结果中的+ 对应内容;写不出具体证据则不得判不合格。++4. 合并单元格:跨行/跨列合并是否在OCR结果中正确还原?+ - 明显错误 → 不合格;无表格 → 合格+ - 为保持单元格内容对应关系而增删的 rowspan/colspan(见分项2 拆分/合并条款)不算合并错误+ - 合并与否的结构证据不限于分隔线:交替行底色(斑马纹)、色块边界同样界定单元格归属。+ 候选声称的合并区域(rowspan/colspan)内若出现原图多段交替底色(实为多个独立单元格、+ 仅部分有内容,其余为空),按原图独立单元格处理,该合并属自创结构 → 不合格。+ - 判不合格时,必须写出:出错合并区域的行列范围、原图中的合并方式、OCR结果中的合并方式;+ 写不出具体证据则不得判不合格。++5. 无大面积乱码:OCR结果中是否存在整段无法理解的乱码?(LaTeX转义不算)+ - 整段乱码 → 不合格;少量符号差异 → 合格++【自检】写最终判断前,逐一确认:+- 每个不合格理由是否属于忽略项A~K的封闭清单?是则改为合格。+- 引用 G/J/K 的合格理由,是否真的落在该条封闭清单的列举范围内?不得类比套用或引申扩展;+ 引用忽略项I前是否核对了OCR文本写法在标准 markdown 渲染器(KaTeX)下可正确渲染?+ 仅完整 LaTeX 引擎能渲染的写法不满足该前提。+- 你是否对原图内容做了任何推测?如果是,撤回该推测。+- 判"分数线/根号线等横线丢失"前,先在原图上确认该横线确实可见:部分原图的分子分母本就+ 上下排列而无分数线,候选用上下堆叠还原属忠实还原,不得按数学常识脑补分数线。+- 你是否把 LaTeX/Markdown 源码层差异或渲染器显示差异误判为内容错误?渲染结果无差异的+ 写法差异必须合格。+- 表格结构类(分项2/3/4)的不合格是否都写出了具体行列位置与原文证据?没有证据的必须改为合格。++【评分规则】+- 每个分项先给出合格/不合格判断,再打 0-100 整数分。分数必须与判断落在同一区间:+ 判合格 → 80–100;判不合格 → 0–60;60 与 80 之间为隔离带,禁止使用。+- 分项评分参考锚点(可打锚点之间的任意整数,请充分利用区间表达严重程度差异,不要只打锚点值):+ - 100:该项完全正确,无任何差异;或该项不适用(如无表格时的表格类分项)+ - 90:仅有忽略项级差异(在说明中记录,不影响判断)+ - 80:可忽略差异较多,或判合格但把握略低+ - 60:个别字符、符号或单个单元格的确定实质错误(最轻微的不合格)+ - 40:整行、整段、整列或多个单元格缺失、错误或错位+ - 10:该项存在大面积错误+ - 0:该项完全错误+- 总体评分 0-100 整数:综合五个分项,反映错误的实质严重程度;不必等于分项最低分,+ 但必须与最终判断落在同一区间(最终判断不合格 → 总体 0–60;合格 → 总体 80–100)。+- 最终判断:任一分项不合格 → 不合格;全部合格 → 合格。最终判断与各评分不得矛盾。++【输出格式(严格按此格式,评分行不要有多余内容)】+逐项核查结果:+1. 文本完整性:合格/不合格 - <一句话说明,合格填"无问题">+2. 表格行列数:合格/不合格 - <一句话说明,合格填"无问题">+3. 单元格内容及位置:合格/不合格 - <一句话说明,合格填"无问题">+4. 合并单元格:合格/不合格 - <一句话说明,合格填"无问题">+5. 无大面积乱码:合格/不合格 - <一句话说明,合格填"无问题">+分项评分: 文本完整性=<0-100>, 表格行列数=<0-100>, 单元格内容及位置=<0-100>, 合并单元格=<0-100>, 无大面积乱码=<0-100>+总体评分: <0-100,与最终判断同区间>+最终判断:合格/不合格+"""++# Qwen3.5, Gemma4, ...+General_LLM_baseline_eval_prompt = '''+【原图】+<|vision_start|><|image_pad|><|vision_end|>+【OCR文本】+{ocr_text}+【OCR渲染图】+<|vision_start|><|image_pad|><|vision_end|>+{rubic_prompt}+'''+++# MiniCPM-OCR Jev+MiniCPM_OCR_Jev_eval_prompt = '''+【原图】+<|vision_start|><|image_pad|><|vision_end|>+【OCR文本】+{ocr_text}+【OCR渲染图】+<|vision_start|><|image_pad|><|vision_end|>+第一张图是原图,第二张图是上述 OCR 文本渲染得到的图片。+请判断该 OCR 文本及其对应渲染图是否与原图内容一致。+这是一个二分类任务:一致标为 1,不一致标为 0。+'''+++# Jev-35B-A3b, Jev-VL-27B+Jev_baseline_eval_prompt = '''[kind] noul+[state]+{rubic_prompt}+【原图】+<|vision_start|><|image_pad|><|vision_end|>+【OCR文本】+{ocr_text}+【OCR渲染图】+<|vision_start|><|image_pad|><|vision_end|>+[question] Is this scenario one where: 【OCR文本】忠实还原了【原图】中实际可见的内容(即合格)?+[options]+false+true+[decision]:+'''\ No newline at end of filediff --git a/assets/minicpm-ocr/throughput-benchmarks.png b/assets/minicpm-ocr/throughput-benchmarks.pngnew file mode 100644index 0000000..37629f1Binary files /dev/null and b/assets/minicpm-ocr/throughput-benchmarks.png differdiff --git a/assets/minicpm-ocr/throughput-comparison.png b/assets/minicpm-ocr/throughput-comparison.pngnew file mode 100644index 0000000..1b30c48Binary files /dev/null and b/assets/minicpm-ocr/throughput-comparison.png differdiff --git a/docs/SKILL.md b/docs/SKILL.mdnew file mode 100644index 0000000..81de446--- /dev/null+++ b/docs/SKILL.md@@ -0,0 +1,371 @@+---+name: minicpmvocr-sdk+description: 安装、部署和验证 MiniCPM-OCR 1.0 文档解析(PDF / 图片 → Markdown)。在用户要安装 minicpmvocr SDK、启动 vLLM 或 transformers 推理服务(含 DSpark 加速版)、解析文档、排查安装与推理报错,或做 vLLM 与 transformers 双端逐字验证时使用。+---++# MiniCPM-OCR 1.0 部署++SDK(`minicpmvocr`)负责版面检测(PP-DocLayoutV3)、切块、拼接和并发调度,通过 HTTP 调用推理服务。SDK 和推理服务装在不同的 venv 里。++## 1. 确定方案++先问清用户用哪个推理后端、SDK 与服务是否在同一台机器。用户没有偏好时用默认方案。++| 用户目标 | 环境 |+|---|---|+| 解析文档(默认) | `sdk-env` + `vllm-ocr-env`,DSpark 加速版 |+| 不想编译 vLLM | `sdk-env` + `tf-ocr-env` |+| 已有 llama.cpp / OpenAI 兼容服务 | 只装 `sdk-env` |+| vLLM 与 transformers 双端逐字验证 | 两个推理环境,或合并的 `ocr-env`(见第 7 节) |++- 推理环境只装一个,除非用户要做双端验证。+- `sdk-env` 不能和 torch / vLLM 装在一起,否则 numpy、opencv 版本冲突。+- SDK 可以在没有 GPU 的机器上运行,用 `--server-url` 或 SSH 隧道连接远程服务。++## 2. 安装前检查++```bash+nvidia-smi # 显存 ≥ 24 GB,驱动 ≥ 580+nvidia-smi --query-compute-apps=pid,used_memory --format=csv # 找一张空闲卡+df -h . # 剩余 ≥ 20 GB+```++- 驱动 535–579 跑不了默认组合(torch cu130)。告诉用户需要升级驱动,或改用 torch cu126 自行编译 vLLM(A100 上验证过,本 skill 不覆盖)。+- vLLM 环境需要 Python ≥ 3.11;SDK 和 transformers 环境 ≥ 3.10。++需要用户提供的路径(没有给出时先问,不要猜):++| 占位符 | 含义 |+|---|---|+| `<SDK_REPO>` | 官方仓库地址:`https://github.com/OpenBMB/MiniCPM-OCR.git` |+| `<VLLM_SRC>` | feat-ocr vLLM 源码目录(commit `5c2b92a5dc`) |+| `<TRANSFORMERS_SRC>` | feat-ocr transformers 源码目录(commit `69eafbc5bd`) |++以下命令都在同一个工作目录下执行:环境建在 `./sdk-env` 等目录,模型在 `./models/`,仓库克隆到 `./minicpmvocr-sdk/`,SDK 源码在其 `sdk/` 子目录。++## 3. 安装++### 3.1 sdk-env++```bash+python3 -m venv sdk-env && source sdk-env/bin/activate+pip install paddlepaddle-gpu==3.3.0 -i https://www.paddlepaddle.org.cn/packages/stable/cu129/+# 没有 GPU 时改装 CPU 版:pip install paddlepaddle==3.2.1+git clone <SDK_REPO> minicpmvocr-sdk+pip install -e "./minicpmvocr-sdk/sdk[all]"+pip install paddlex==3.4.2+minicpmvocr list-backends+```++通过标准:输出包含 `vllm`、`llamacpp`、`openai` 后端和 `ppdoclayout3_paddlex`、`ppdoclayout3_torch`、`ppdoclayout3_server` 三个版面 provider。++装的是 CPU 版 paddle 时,后面每条 `minicpmvocr` 命令都要加 `--set layout.device=cpu`。++### 3.2 vllm-ocr-env++```bash+sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test+sudo apt-get update && sudo apt-get install -y gcc-13 g++-13 libdw-dev libelf-dev++python3.13 -m venv vllm-ocr-env && source vllm-ocr-env/bin/activate+pip install torch==2.14.0 torchaudio==2.11.0 torchvision==0.29.0+pip install "transformers>=5.16.1,<5.20.0"+pip install "setuptools-rust>=1.9.0" "setuptools-scm>=8.0" "setuptools>=77.0.3,<81.0.0" \+ "cmake>=3.26.1" ninja packaging wheel jinja2+pip install nvidia-cuda-nvcc==13.0.48 nvidia-cuda-crt==13.0.48 nvidia-nvvm==13.0.48 \+ nvidia-cuda-runtime==13.0.96 nvidia-cuda-nvrtc==13.0.88 nvidia-nvjitlink==13.4.92 \+ nvidia-cuda-cccl==13.3.4.3.1+```++`nvidia-cuda-cccl` 不能省,缺了会报 `cuda_fp16.h: nv/target: No such file or directory`。++补齐 pip CUDA 包的目录布局:++```bash+CU="$VIRTUAL_ENV/lib/python$(python -c 'import sys; print("%d.%d" % sys.version_info[:2])')/site-packages/nvidia/cu13"+mkdir -p "$CU/nvvm/bin" && ln -sf "$CU/bin/cicc" "$CU/nvvm/bin/cicc"+ln -sfn lib "$CU/lib64"+ln -sf "$CU/lib/libcudart.so.13" "$CU/lib/libcudart.so"+ln -sf "$CU/lib/libnvrtc.so.13" "$CU/lib/libnvrtc.so"+mkdir -p "$CU/lib64/stubs" && ln -sf /usr/lib/x86_64-linux-gnu/libcuda.so.1 "$CU/lib64/stubs/libcuda.so"+```++如果 13.0.48 的包缺少 `bin/crt/link.stub`、`prelink.stub` 或 `bin/nvdisasm`,从同一台机器上装了 13.4.92 的环境复制到 `$CU/bin/` 对应位置。++编译(96 核约 20 分钟;内存小时调低 `MAX_JOBS`):++```bash+cd <VLLM_SRC>+# 无法访问 GitHub 时,先设置下面“离线编译”中的变量+CUDA_HOME="$CU" PATH="$VIRTUAL_ENV/bin:$CU/bin:$PATH" \+ CC=gcc-13 CXX=g++-13 CUDAHOSTCXX=g++-13 MAX_JOBS=64 \+ pip install -e . --no-build-isolation --progress-bar off+cd -+python -c "from vllm import LLM; print('vLLM OK')"+```++不要用 `import vllm._C` 判断编译是否成功。这个分支的扩展名是 `_C_stable_libtorch.abi3.so`。++DSpark 主模型是 `minicpm_ocr` 架构,PyPI 的 transformers 不支持。编译完 vLLM 后再装 feat-ocr transformers,顺序不能反:++```bash+pip install --no-deps -e <TRANSFORMERS_SRC>+python -c "import transformers; print(transformers.__version__)" # 应为 5.19.0.dev0+```++离线编译(CMake 拉取 CUTLASS 等依赖超时时):++```bash+DEPS=<已有 vLLM 源码>/.deps+export VLLM_CUTLASS_SRC_DIR="$DEPS/cutlass-src"+export VLLM_FLASH_ATTN_SRC_DIR="$DEPS/vllm-flash-attn-src"+export FLASH_KDA_SRC_DIR="$DEPS/flashkda-src"+export DEEPSELECT_SRC_DIR="$DEPS/deepselect-src"+export FLASH_MLA_SRC_DIR="$DEPS/flashmla-src"+export TRITON_KERNELS_SRC_DIR="$DEPS/triton_kernels-src/python/triton_kernels/triton_kernels"+export TML_FA4_SRC_DIR="$DEPS/tml_fa4-src"+export FMHA_SM100_SRC_DIR="$DEPS/fmha_sm100-src"+export QUTLASS_SRC_DIR="$DEPS/qutlass-src"+export DEEPGEMM_SRC_DIR="$DEPS/deepgemm-src"+export CMAKE_ARGS="-DCUTLASS_ENABLE_TESTS=OFF" # 否则还会拉取 googletest+```++编译后可以忽略的告警:++- `vllm.third_party.deep_gemm ... undefined symbol: _ZSt8to_charsPcS_DF128_`:OCR 模型不用 DeepGEMM。+- `FlashInfer's precompiled kernels are missing or do not match`:冷启动会慢一些(实测初始化约 104 秒),不影响结果。++### 3.3 tf-ocr-env++```bash+python3 -m venv tf-ocr-env && source tf-ocr-env/bin/activate+pip install torch==2.14.0 torchvision+pip install -e <TRANSFORMERS_SRC> # 需要 OpenAI 兼容服务时装 "<TRANSFORMERS_SRC>[serving]"+pip install accelerate+# 可选加速内核,不装时回退参考实现,结果相同但更慢:+# pip install causal-conv1d flash-linear-attention+```++### 3.4 下载模型++主模型:[MiniCPM-OCR-1.0](https://huggingface.co/openbmb/MiniCPM-OCR-1.0);DSpark 草稿模型:[MiniCPM-OCR-1.0-DSpark](https://huggingface.co/openbmb/MiniCPM-OCR-1.0-DSpark)。++```bash+# DSpark:主模型和 draft 必须来自同一次发布,不能和其他 checkpoint 混用+HF_ENDPOINT=https://hf-mirror.com hf download openbmb/MiniCPM-OCR-1.0 --local-dir ./models/MiniCPM-OCR-1.0+HF_ENDPOINT=https://hf-mirror.com hf download openbmb/MiniCPM-OCR-1.0-DSpark --local-dir ./models/MiniCPM-OCR-1.0-DSpark+sha256sum ./models/MiniCPM-OCR-1.0-DSpark/model.safetensors # 对照 release_manifest.json 的 weight_sha256++curl -L -o PP-DocLayoutV3_infer.tar \+ https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-DocLayoutV3_infer.tar+tar xf PP-DocLayoutV3_infer.tar+export OCR_LAYOUT_MODEL_DIR=$PWD/PP-DocLayoutV3_infer+test -f "$OCR_LAYOUT_MODEL_DIR/inference.pdiparams" && echo "layout OK"+```++- ModelScope:`modelscope download --model <MS_REPO_ID> --local_dir <同名目录>`。+- 主模型目录应包含 `config.json`、`model.safetensors`、`tokenizer.json`、`preprocessor_config.json`、`chat_template.jinja`。+- `OCR_LAYOUT_MODEL_DIR` 必须是 Paddle inference 目录(含 `inference.pdiparams`、`inference.json`、`inference.yml`),不是 safetensors 目录。++## 4. 启动推理服务++每个新 shell 里启动 vLLM 前都要设置 `CUDA_HOME`,否则 Blackwell 显卡首次启动会报 `Could not find nvcc`:++```bash+source vllm-ocr-env/bin/activate+CU="$VIRTUAL_ENV/lib/python$(python -c 'import sys; print("%d.%d" % sys.version_info[:2])')/site-packages/nvidia/cu13"+export CUDA_HOME="$CU" PATH="$VIRTUAL_ENV/bin:$CU/bin:$PATH"+```++### 4.1 DSpark 加速版(默认)++```bash+CUDA_VISIBLE_DEVICES=<空闲卡> python -m vllm.entrypoints.openai.api_server \+ --model ./models/MiniCPM-OCR-1.0 \+ --served-model-name minicpm-ocr \+ --port 18499 \+ --max-model-len 40960 \+ --max-num-batched-tokens 40960 \+ --max-num-seqs 1 \+ --attention-backend FLASH_ATTN \+ --mm-encoder-attn-backend FLASH_ATTN \+ --mm-processor-kwargs '{"downsample_mode":"4x"}' \+ --gpu-memory-utilization 0.85 \+ --trust-request-mm-kwargs \+ --speculative-config '{"method":"dspark","model":"./models/MiniCPM-OCR-1.0-DSpark","num_speculative_tokens":15,"enable_adaptive_verification":false}' \+ --default-chat-template-kwargs '{"enable_thinking":false}'+```++- `--max-num-seqs 1` 表示一次只处理一个请求,SDK 的并发请求会排队。用户需要高吞吐时,起多个实例并重复传 `--server-url`,或改用标准版。+- 服务启动时使用 `--served-model-name minicpm-ocr`,SDK 解析命令对应使用 `--model minicpm-ocr`。修改名称时,两处需一起修改。++### 4.2 标准版(无投机采样)++```bash+CUDA_VISIBLE_DEVICES=<空闲卡> python -m vllm.entrypoints.openai.api_server \+ --model ./models/MiniCPM-OCR-1.0 \+ --served-model-name minicpm-ocr \+ --port 18499 \+ --max-model-len 40960 \+ --limit-mm-per-prompt '{"image": 36}' \+ --gpu-memory-utilization 0.85 \+ --trust-request-mm-kwargs+```++两个版本都必须带 `--trust-request-mm-kwargs`。漏掉时服务对每个请求返回 400,SDK 会静默重试,直到 600 秒后才报错,看起来像卡死。++### 4.3 transformers serve++```bash+source tf-ocr-env/bin/activate+transformers serve ./models/MiniCPM-OCR-1.0 --port 18499 --host 0.0.0.0 --continuous-batching+```++### 4.4 就绪检查++```bash+curl --noproxy 127.0.0.1 http://127.0.0.1:18499/v1/models # 首次启动约 3 分钟+```++返回里有 `"id":"minicpm-ocr"` 才算就绪。首次启动在 CUDA graph capture 阶段超时或被 SIGTERM 时,直接重启一次(编译缓存已经生成);仍然失败再加 `--enforce-eager`。++## 5. 解析文档++```bash+source sdk-env/bin/activate+export OCR_LAYOUT_MODEL_DIR=$PWD/PP-DocLayoutV3_infer+export PADDLE_PDX_DISABLE_MODEL_SOURCE_CHECK=True++minicpmvocr parse --config minicpmvocr-sdk/configs/backends/vllm.yaml \+ --server-url http://127.0.0.1:18499 \+ --model minicpm-ocr \+ --set input.limit=1 --input <文件> --output out.md+```++- 先用 `--set input.limit=1` 只解析一页,确认通过后再去掉,解析全部页面。+- 配置文件都在 `minicpmvocr-sdk/configs/backends/`:vLLM 用 `vllm.yaml`;transformers serve 和其他 OpenAI 兼容服务用 `openai.yaml`;llama.cpp 用 `llamacpp.yaml`。+- 用 `openai.yaml` 时加 `--set engine.extra_body='{"chat_template_kwargs":{"enable_thinking":false}}'`,否则输出可能为空或乱码。`vllm.yaml` 已自动关闭思考模式。+- 多卡机器上版面检测默认用 GPU 0。GPU 0 被占用时加 `--set layout.device=cuda:N`。+- 除 `parse` 外的命令(`run`、`parse-layout`、`prepare`、`infer`、`show-config`)都要用 `--set input.file_path`、`input.files_dir` 或 `input.image_dir` 指定输入。+- `--set` 里的相对路径按配置文件所在目录解析,一律写绝对路径(如 `$PWD/doc.pdf`)。`--input` 按当前目录解析。+- `run` 的输出目录由配置里固定的 `run.run_tag` 决定,已有结果的页面会被跳过。重跑前换 `--set run.run_tag=<新名字>`。+- 产物默认写在 SDK 目录的 `runs/` 下。磁盘紧张时加 `--set run.run_root=<其他盘的绝对路径>`。++## 6. 验证结果++```bash+python - <<'PY'+from pathlib import Path+md = Path("out.md").read_text(encoding="utf-8")+assert md.strip(), "输出为空"+assert "<otsl>" not in md, "表格仍是 OTSL,没有转成 HTML"+print("OK", len(md), "chars", "| table" if "<table>" in md else "")+PY+```++- 表格页应有 `<table>`,公式页应有 LaTeX(如 `\frac`),正文页应是可读文本。+- DSpark 版本还要确认投机采样生效。发几个请求后:++```bash+curl --noproxy 127.0.0.1 -s http://127.0.0.1:18499/metrics | grep spec_decode_num+```++应看到 `spec_decode_num_accepted_tokens_total` 和 `spec_decode_num_drafts_total`,且数值随请求增加。accept length = 1 + accepted / drafts,验证环境中为 5.2–7.0。没有这两项说明服务没带 `--speculative-config`。服务能响应不代表 DSpark 生效。++## 7. 可选:双端逐字验证++只有用户要求时才做。`verify_transformers.py` 和 `verify_vllm.py` 随 feat-ocr 源码提供,不在 SDK 里。用户没有这两个脚本时跳过,不要声称已验证双端一致。++如果想在一个环境里跑两端,在编译好 vLLM 的环境里执行(顺序不能反):++```bash+pip install --no-deps -e <TRANSFORMERS_SRC>+pip install --no-deps accelerate+python -c "import transformers, vllm, torch; print(transformers.__version__, vllm.__version__, torch.__version__)"+```++两端分别运行:++```bash+# transformers 端(tf-ocr-env 或合并环境)+CUDA_VISIBLE_DEVICES=<空闲卡> python verify_transformers.py \+ --model ./models/MiniCPM-OCR-1.0 --image table.png \+ --prompt "请识别图中的表格并输出 OTSL" --attn sdpa --max-new-tokens 512++# vLLM 端(vllm-ocr-env 或合并环境,先按第 4 节设置 CUDA_HOME)+CUDA_VISIBLE_DEVICES=<空闲卡> python verify_vllm.py \+ --model ./models/MiniCPM-OCR-1.0 --image table.png \+ --prompt "请识别图中的表格并输出 OTSL" --max-tokens 512+```++通过标准:++- transformers 端加载时没有 missing、unexpected 或 mismatched keys,参数量 1.300B。+- 两端的 prompt token 数相同,输出逐字相同,都以 `</otsl>` 结尾。++参考值(1080×1080 表格图):prompt 1975 tokens,视觉 1936 tokens,生成 284 tokens,输出 677 字符。换图片或 prompt 后数值会变,判断依据是两端一致。++## 8. 报错处理++### 安装与编译++| 现象 | 处理 |+|---|---|+| `Failed to clone https://github.com/nvidia/cutlass.git` | 无法访问 GitHub,按 3.2 的离线编译设置 `*_SRC_DIR` |+| 关掉 CUTLASS 拉取后还要拉 `googletest` | 设 `CMAKE_ARGS="-DCUTLASS_ENABLE_TESTS=OFF"` |+| `Could not find a package configuration file provided by "MLIR"` | `TRITON_KERNELS_SRC_DIR` 层级错了,应指向 `.../python/triton_kernels/triton_kernels` |+| 编译中大量 `FAILED: [code=9]` | 编译进程因内存不足被杀。调低 `MAX_JOBS`(147 GB 内存用 8–32),先装 `ccache` 避免重编 |+| `ld: cannot find -lcudart` | 补 3.2 里的 `lib64`、`libcudart.so`、`stubs/libcuda.so` 链接 |+| `CUDA_nvrtc_LIBRARY ... NOTFOUND` | 补 `libnvrtc.so` 链接 |+| `cuda_fp16.h ... nv/target: No such file` | 装 `nvidia-cuda-cccl==13.3.4.3.1` |+| `No module named vllm._C` | 不是编译失败,用 `from vllm import LLM` 验证 |+| vLLM 环境里 transformers 是 `5.19.0` 而非 `5.19.0.dev0` | editable 安装被 vLLM 依赖覆盖,重新 `pip install --no-deps -e <TRANSFORMERS_SRC>` |+| 版面报缺 `pypdfium2` | `pip install "pypdfium2>=4"`,只处理图片也需要 |++### 启动服务++| 现象 | 处理 |+|---|---|+| `model type 'minicpm_ocr' ... does not recognize this architecture` | vLLM 环境缺 feat-ocr transformers,按 3.2 安装。不需要重编 vLLM |+| `Could not find nvcc` | 没有设置 `CUDA_HOME`,见第 4 节 |+| `ptxas fatal: Unsupported .version 9.4` 或 `CUDA compiler and CUDA toolkit headers are incompatible` | 把 nvcc、runtime、nvrtc、nvjitlink 统一到 13.4.92,再按 3.2 补链接 |+| `flashinfer-cubin version does not match` | `pip uninstall flashinfer-cubin`;`vllm download-kernels` 存在时运行它 |+| `CUDA driver version is insufficient` | 驱动低于 580,见第 2 节 |+| 驱动 < 580 时报 `TopKMaskLogits ... device kernel image is invalid` | 设 `VLLM_USE_FLASHINFER_SAMPLER=0`,贪心解码结果相同 |+| 驱动 < 580 时报 `nvcc fatal: Unknown option '--compress-mode=size'` | `CUDA_HOME` 指向与 torch 匹配的工具链(cu126 对应 12.8) |+| 导入 vLLM 时报 `libtorchcodec_image.so` | `pip uninstall torchcodec` |+| `Free memory on device ... less than desired GPU memory utilization` | 这张卡被占用,换 `CUDA_VISIBLE_DEVICES` |+| OOM | `--gpu-memory-utilization` 降到 0.7,或 `--max-model-len` 降到 16384 |+| CUDA graph capture 超时或被 SIGTERM | 重启一次;仍失败加 `--enforce-eager` |++### 解析++| 现象 | 处理 |+|---|---|+| 解析长时间没有结果,日志里出现 `request failed until timeout` | 服务漏了 `--trust-request-mm-kwargs`,请求被拒后 SDK 一直重试到 600 秒超时 |+| SDK 等待很久后报 `no ... endpoint became ready within 1800s` | 服务没起来或地址不对,先用 `curl /v1/models` 检查 |+| 带图请求返回 400 | 标准版漏了 `--limit-mm-per-prompt '{"image": 36}'` |+| 输出为空或乱码 | 思考模式没关,见第 5 节 |+| 表格是 `<otsl>` 而不是 `<table>` | 直接调用 API 时不会转换,要走 SDK 流水线 |+| crop 小图报 `assign N multimodal tokens to M placeholders` | vLLM 版本太旧,换成 feat-ocr build |+| 版面报 CUDA 错误 | 装的是 CPU 版 paddle,加 `--set layout.device=cpu` |+| `At least one of input.image_dir / input.files_dir / input.file_path is required` | 加 `--set input.file_path=<文件的绝对路径>` |+| `input.file_path not found`,但文件存在 | `--set` 里用了相对路径,改成绝对路径 |+| `run` 重跑结果没变 | 换 `--set run.run_tag=<新名字>` |+| pip 超时 | 换国内镜像。访问 localhost 时设 `no_proxy=127.0.0.1,localhost,::1` |+| 服务在远程机器 | `ssh -L 18499:127.0.0.1:18499 user@host`,SDK 用 `--server-url http://127.0.0.1:18499` |++## 9. 已验证版本++| 组件 | 版本 |+|---|---|+| vLLM 环境 | Python 3.13.9,torch 2.14.0+cu130,vLLM 源码 `5c2b92a5dc`,feat-ocr transformers `69eafbc5bd` |+| transformers 环境 | Python 3.10.12 / 3.13.9,torch 2.14.0+cu130,transformers 5.19.0.dev0(`69eafbc5bd`) |+| SDK 环境 | minicpmvocr 0.2.3,paddlepaddle-gpu 3.3.0 或 paddlepaddle 3.2.1,paddlex 3.4.2 |+| 硬件 | 3×RTX 5090,驱动 590.48.01,Ubuntu 22.04.5(2026-10-19) |++## 10. 汇报规则++- 5090 只是验证用的机器,不要说必须用 5090。门槛是显存 ≥ 24 GB 和驱动 ≥ 580。+- 只汇报实际跑过的检查。没跑双端验证就不要说两端一致;没查 `/metrics` 就不要说 DSpark 生效。+- SDK 仓库里没有 Web UI 脚本,不要向用户提及或引导用户运行任何 `demo_*.py`。diff --git a/docs/SKILL_en.md b/docs/SKILL_en.mdnew file mode 100644index 0000000..d93a15b--- /dev/null+++ b/docs/SKILL_en.md@@ -0,0 +1,371 @@+---+name: minicpmvocr-sdk+description: Install, deploy and verify MiniCPM-OCR 1.0 document parsing (PDF / image → Markdown). Use when the user wants to install the minicpmvocr SDK, start a vLLM or transformers inference service (including the DSpark accelerated build), parse documents, troubleshoot installation or inference errors, or run a word-for-word vLLM vs transformers two-sided verification.+---++# MiniCPM-OCR 1.0 deployment++The SDK (`minicpmvocr`) handles layout detection (PP-DocLayoutV3), chunking, stitching and concurrency scheduling, and calls the inference service over HTTP. The SDK and the inference service are installed in separate venvs.++## 1. Determine the plan++First ask which inference backend the user wants, and whether the SDK and the service are on the same machine. If the user has no preference, use the default plan.++| User goal | Environment |+|---|---|+| Parse documents (default) | `sdk-env` + `vllm-ocr-env`, DSpark accelerated build |+| Do not want to compile vLLM | `sdk-env` + `tf-ocr-env` |+| Already have llama.cpp / OpenAI-compatible service | Install `sdk-env` only |+| Word-for-word vLLM vs transformers verification | Both inference environments, or a combined `ocr-env` (see section 7) |++- Install only one inference environment, unless the user needs two-sided verification.+- `sdk-env` must not be installed together with torch / vLLM, otherwise numpy and opencv versions conflict.+- The SDK can run on a machine without a GPU, connecting to a remote service via `--server-url` or an SSH tunnel.++## 2. Pre-installation checks++```bash+nvidia-smi # VRAM ≥ 24 GB, driver ≥ 580+nvidia-smi --query-compute-apps=pid,used_memory --format=csv # find an idle GPU+df -h . # at least 20 GB free+```++- Drivers 535–579 cannot run the default combination (torch cu130). Tell the user they need to upgrade the driver, or build vLLM themselves with torch cu126 (verified on A100; not covered by this skill).+- The vLLM environment needs Python ≥ 3.11; the SDK and transformers environments ≥ 3.10.++Paths the user must provide (ask if not given; do not guess):++| Placeholder | Meaning |+|---|---|+| `<SDK_REPO>` | Official repository: `https://github.com/OpenBMB/MiniCPM-OCR.git` |+| `<VLLM_SRC>` | feat-ocr vLLM source directory (commit `5c2b92a5dc`) |+| `<TRANSFORMERS_SRC>` | feat-ocr transformers source directory (commit `69eafbc5bd`) |++All commands below run in the same working directory: environments are created in directories such as `./sdk-env`, models are in `./models/`, and the repository is cloned into `./minicpmvocr-sdk/`, with the SDK source in its `sdk/` subdirectory.++## 3. Installation++### 3.1 sdk-env++```bash+python3 -m venv sdk-env && source sdk-env/bin/activate+pip install paddlepaddle-gpu==3.3.0 -i https://www.paddlepaddle.org.cn/packages/stable/cu129/+# Without a GPU, install the CPU build instead: pip install paddlepaddle==3.2.1+git clone <SDK_REPO> minicpmvocr-sdk+pip install -e "./minicpmvocr-sdk/sdk[all]"+pip install paddlex==3.4.2+minicpmvocr list-backends+```++Pass criterion: the output contains the backends `vllm`, `llamacpp`, `openai` and the three layout providers `ppdoclayout3_paddlex`, `ppdoclayout3_torch`, `ppdoclayout3_server`.++If the CPU build of paddle is installed, every subsequent `minicpmvocr` command needs `--set layout.device=cpu`.++### 3.2 vllm-ocr-env++```bash+sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test+sudo apt-get update && sudo apt-get install -y gcc-13 g++-13 libdw-dev libelf-dev++python3.13 -m venv vllm-ocr-env && source vllm-ocr-env/bin/activate+pip install torch==2.14.0 torchaudio==2.11.0 torchvision==0.29.0+pip install "transformers>=5.16.1,<5.20.0"+pip install "setuptools-rust>=1.9.0" "setuptools-scm>=8.0" "setuptools>=77.0.3,<81.0.0" \+ "cmake>=3.26.1" ninja packaging wheel jinja2+pip install nvidia-cuda-nvcc==13.0.48 nvidia-cuda-crt==13.0.48 nvidia-nvvm==13.0.48 \+ nvidia-cuda-runtime==13.0.96 nvidia-cuda-nvrtc==13.0.88 nvidia-nvjitlink==13.4.92 \+ nvidia-cuda-cccl==13.3.4.3.1+```++`nvidia-cuda-cccl` cannot be omitted; without it you get `cuda_fp16.h: nv/target: No such file or directory`.++Fill in the directory layout of the pip CUDA packages:++```bash+CU="$VIRTUAL_ENV/lib/python$(python -c 'import sys; print("%d.%d" % sys.version_info[:2])')/site-packages/nvidia/cu13"+mkdir -p "$CU/nvvm/bin" && ln -sf "$CU/bin/cicc" "$CU/nvvm/bin/cicc"+ln -sfn lib "$CU/lib64"+ln -sf "$CU/lib/libcudart.so.13" "$CU/lib/libcudart.so"+ln -sf "$CU/lib/libnvrtc.so.13" "$CU/lib/libnvrtc.so"+mkdir -p "$CU/lib64/stubs" && ln -sf /usr/lib/x86_64-linux-gnu/libcuda.so.1 "$CU/lib64/stubs/libcuda.so"+```++If the 13.0.48 packages lack `bin/crt/link.stub`, `prelink.stub` or `bin/nvdisasm`, copy them from a 13.4.92 environment on the same machine into the corresponding location under `$CU/bin/`.++Compile (about 20 minutes on 96 cores; lower `MAX_JOBS` when memory is small):++```bash+cd <VLLM_SRC>+# If GitHub is unreachable, first set the variables under "Offline compilation" below+CUDA_HOME="$CU" PATH="$VIRTUAL_ENV/bin:$CU/bin:$PATH" \+ CC=gcc-13 CXX=g++-13 CUDAHOSTCXX=g++-13 MAX_JOBS=64 \+ pip install -e . --no-build-isolation --progress-bar off+cd -+python -c "from vllm import LLM; print('vLLM OK')"+```++Do not use `import vllm._C` to judge whether compilation succeeded. On this branch the extension is named `_C_stable_libtorch.abi3.so`.++The DSpark main model uses the `minicpm_ocr` architecture, which PyPI transformers does not support. Install the feat-ocr transformers after vLLM is compiled; the order cannot be reversed:++```bash+pip install --no-deps -e <TRANSFORMERS_SRC>+python -c "import transformers; print(transformers.__version__)" # should be 5.19.0.dev0+```++Offline compilation (when CMake times out fetching CUTLASS and other dependencies):++```bash+DEPS=<existing vLLM source>/.deps+export VLLM_CUTLASS_SRC_DIR="$DEPS/cutlass-src"+export VLLM_FLASH_ATTN_SRC_DIR="$DEPS/vllm-flash-attn-src"+export FLASH_KDA_SRC_DIR="$DEPS/flashkda-src"+export DEEPSELECT_SRC_DIR="$DEPS/deepselect-src"+export FLASH_MLA_SRC_DIR="$DEPS/flashmla-src"+export TRITON_KERNELS_SRC_DIR="$DEPS/triton_kernels-src/python/triton_kernels/triton_kernels"+export TML_FA4_SRC_DIR="$DEPS/tml_fa4-src"+export FMHA_SM100_SRC_DIR="$DEPS/fmha_sm100-src"+export QUTLASS_SRC_DIR="$DEPS/qutlass-src"+export DEEPGEMM_SRC_DIR="$DEPS/deepgemm-src"+export CMAKE_ARGS="-DCUTLASS_ENABLE_TESTS=OFF" # otherwise googletest is also fetched+```++Warnings that can be ignored after compiling:++- `vllm.third_party.deep_gemm ... undefined symbol: _ZSt8to_charsPcS_DF128_`: OCR models do not use DeepGEMM.+- `FlashInfer's precompiled kernels are missing or do not match`: cold start is slightly slower (about 104 seconds of initialization measured), with no effect on results.++### 3.3 tf-ocr-env++```bash+python3 -m venv tf-ocr-env && source tf-ocr-env/bin/activate+pip install torch==2.14.0 torchvision+pip install -e <TRANSFORMERS_SRC> # install "<TRANSFORMERS_SRC>[serving]" if you need the OpenAI-compatible service+pip install accelerate+# Optional acceleration kernels; without them it falls back to the reference implementation, same results but slower:+# pip install causal-conv1d flash-linear-attention+```++### 3.4 Download models++Main model: [MiniCPM-OCR-1.0](https://huggingface.co/openbmb/MiniCPM-OCR-1.0); DSpark draft model: [MiniCPM-OCR-1.0-DSpark](https://huggingface.co/openbmb/MiniCPM-OCR-1.0-DSpark).++```bash+# DSpark: the main model and draft must come from the same release and must not be mixed with other checkpoints+HF_ENDPOINT=https://hf-mirror.com hf download openbmb/MiniCPM-OCR-1.0 --local-dir ./models/MiniCPM-OCR-1.0+HF_ENDPOINT=https://hf-mirror.com hf download openbmb/MiniCPM-OCR-1.0-DSpark --local-dir ./models/MiniCPM-OCR-1.0-DSpark+sha256sum ./models/MiniCPM-OCR-1.0-DSpark/model.safetensors # compare with weight_sha256 in release_manifest.json++curl -L -o PP-DocLayoutV3_infer.tar \+ https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-DocLayoutV3_infer.tar+tar xf PP-DocLayoutV3_infer.tar+export OCR_LAYOUT_MODEL_DIR=$PWD/PP-DocLayoutV3_infer+test -f "$OCR_LAYOUT_MODEL_DIR/inference.pdiparams" && echo "layout OK"+```++- ModelScope: `modelscope download --model <MS_REPO_ID> --local_dir <same-named directory>`.+- The main model directory should contain `config.json`, `model.safetensors`, `tokenizer.json`, `preprocessor_config.json`, `chat_template.jinja`.+- `OCR_LAYOUT_MODEL_DIR` must be a Paddle inference directory (containing `inference.pdiparams`, `inference.json`, `inference.yml`), not a safetensors directory.++## 4. Start the inference service++Before starting vLLM in each new shell, set `CUDA_HOME`; otherwise the first start on Blackwell GPUs fails with `Could not find nvcc`:++```bash+source vllm-ocr-env/bin/activate+CU="$VIRTUAL_ENV/lib/python$(python -c 'import sys; print("%d.%d" % sys.version_info[:2])')/site-packages/nvidia/cu13"+export CUDA_HOME="$CU" PATH="$VIRTUAL_ENV/bin:$CU/bin:$PATH"+```++### 4.1 DSpark accelerated build (default)++```bash+CUDA_VISIBLE_DEVICES=<idle GPU> python -m vllm.entrypoints.openai.api_server \+ --model ./models/MiniCPM-OCR-1.0 \+ --served-model-name minicpm-ocr \+ --port 18499 \+ --max-model-len 40960 \+ --max-num-batched-tokens 40960 \+ --max-num-seqs 1 \+ --attention-backend FLASH_ATTN \+ --mm-encoder-attn-backend FLASH_ATTN \+ --mm-processor-kwargs '{"downsample_mode":"4x"}' \+ --gpu-memory-utilization 0.85 \+ --trust-request-mm-kwargs \+ --speculative-config '{"method":"dspark","model":"./models/MiniCPM-OCR-1.0-DSpark","num_speculative_tokens":15,"enable_adaptive_verification":false}' \+ --default-chat-template-kwargs '{"enable_thinking":false}'+```++- `--max-num-seqs 1` means only one request is handled at a time, so the SDK's concurrent requests queue up. If the user needs high throughput, start multiple instances and pass `--server-url` repeatedly, or switch to the standard build.+- Start the service with `--served-model-name minicpm-ocr` and use `--model minicpm-ocr` in the SDK parsing command. If you change the name, update both options.++### 4.2 Standard build (no speculative sampling)++```bash+CUDA_VISIBLE_DEVICES=<idle GPU> python -m vllm.entrypoints.openai.api_server \+ --model ./models/MiniCPM-OCR-1.0 \+ --served-model-name minicpm-ocr \+ --port 18499 \+ --max-model-len 40960 \+ --limit-mm-per-prompt '{"image": 36}' \+ --gpu-memory-utilization 0.85 \+ --trust-request-mm-kwargs+```++Both builds must include `--trust-request-mm-kwargs`. Without it the service returns 400 for every request and the SDK retries silently until it errors out after 600 seconds, which looks like a hang.++### 4.3 transformers serve++```bash+source tf-ocr-env/bin/activate+transformers serve ./models/MiniCPM-OCR-1.0 --port 18499 --host 0.0.0.0 --continuous-batching+```++### 4.4 Readiness check++```bash+curl --noproxy 127.0.0.1 http://127.0.0.1:18499/v1/models # first start takes about 3 minutes+```++It is only ready if the response contains `"id":"minicpm-ocr"`. If the first start times out or gets SIGTERM during CUDA graph capture, simply restart once (the compilation cache has been generated); if it still fails, add `--enforce-eager`.++## 5. Parse documents++```bash+source sdk-env/bin/activate+export OCR_LAYOUT_MODEL_DIR=$PWD/PP-DocLayoutV3_infer+export PADDLE_PDX_DISABLE_MODEL_SOURCE_CHECK=True++minicpmvocr parse --config minicpmvocr-sdk/configs/backends/vllm.yaml \+ --server-url http://127.0.0.1:18499 \+ --model minicpm-ocr \+ --set input.limit=1 --input <file> --output out.md+```++- Start with `--set input.limit=1` to parse only one page; once it passes, remove it to parse all pages.+- The configuration files are all in `minicpmvocr-sdk/configs/backends/`: `vllm.yaml` for vLLM; `openai.yaml` for transformers serve and other OpenAI-compatible services; `llamacpp.yaml` for llama.cpp.+- With `openai.yaml` add `--set engine.extra_body='{"chat_template_kwargs":{"enable_thinking":false}}'`, otherwise the output may be empty or garbled. `vllm.yaml` already disables thinking mode automatically.+- On multi-GPU machines layout detection uses GPU 0 by default. If GPU 0 is occupied, add `--set layout.device=cuda:N`.+- Commands other than `parse` (`run`, `parse-layout`, `prepare`, `infer`, `show-config`) all need the input specified via `--set input.file_path`, `input.files_dir` or `input.image_dir`.+- Relative paths in `--set` are resolved against the configuration file's directory, so always write absolute paths (such as `$PWD/doc.pdf`). `--input` is resolved against the current directory.+- `run`'s output directory is determined by the fixed `run.run_tag` in the configuration, and pages that already have results are skipped. Before rerunning, change `--set run.run_tag=<new name>`.+- Artifacts are written under `runs/` in the SDK directory by default. If disk space is tight, add `--set run.run_root=<absolute path on another disk>`.++## 6. Verify results++```bash+python - <<'PY'+from pathlib import Path+md = Path("out.md").read_text(encoding="utf-8")+assert md.strip(), "output is empty"+assert "<otsl>" not in md, "table is still OTSL, not converted to HTML"+print("OK", len(md), "chars", "| table" if "<table>" in md else "")+PY+```++- Table pages should contain `<table>`, formula pages should contain LaTeX (such as `\frac`), and body-text pages should contain readable text.+- For the DSpark build, also confirm that speculative sampling is active. After sending a few requests:++```bash+curl --noproxy 127.0.0.1 -s http://127.0.0.1:18499/metrics | grep spec_decode_num+```++You should see `spec_decode_num_accepted_tokens_total` and `spec_decode_num_drafts_total`, and the values should increase with requests. accept length = 1 + accepted / drafts, which was 5.2–7.0 in the verification environment. If neither metric is present, the service was started without `--speculative-config`. A service that responds does not mean DSpark is active.++## 7. Optional: word-for-word two-sided verification++Do this only when the user asks for it. `verify_transformers.py` and `verify_vllm.py` are provided with the feat-ocr source, not in the SDK. If the user does not have these two scripts, skip this step and do not claim that the two sides were verified to match.++If you want to run both sides in one environment, do it in the environment where vLLM is already compiled (the order cannot be reversed):++```bash+pip install --no-deps -e <TRANSFORMERS_SRC>+pip install --no-deps accelerate+python -c "import transformers, vllm, torch; print(transformers.__version__, vllm.__version__, torch.__version__)"+```++Run each side separately:++```bash+# transformers side (tf-ocr-env or the combined environment)+CUDA_VISIBLE_DEVICES=<idle GPU> python verify_transformers.py \+ --model ./models/MiniCPM-OCR-1.0 --image table.png \+ --prompt "请识别图中的表格并输出 OTSL" --attn sdpa --max-new-tokens 512++# vLLM side (vllm-ocr-env or the combined environment; set CUDA_HOME as in section 4 first)+CUDA_VISIBLE_DEVICES=<idle GPU> python verify_vllm.py \+ --model ./models/MiniCPM-OCR-1.0 --image table.png \+ --prompt "请识别图中的表格并输出 OTSL" --max-tokens 512+```++Pass criteria:++- The transformers side loads with no missing, unexpected or mismatched keys, and the parameter count is 1.300B.+- Both sides have the same prompt token count and produce word-for-word identical output, both ending with `</otsl>`.++Reference values (1080×1080 table image): prompt 1975 tokens, vision 1936 tokens, 284 tokens generated, 677 characters of output. These numbers change with a different image or prompt; the criterion is that the two sides agree.++## 8. Troubleshooting++### Installation and compilation++| Symptom | Action |+|---|---|+| `Failed to clone https://github.com/nvidia/cutlass.git` | GitHub is unreachable; set `*_SRC_DIR` as in the offline compilation in 3.2 |+| Still fetches `googletest` after disabling the CUTLASS fetch | Set `CMAKE_ARGS="-DCUTLASS_ENABLE_TESTS=OFF"` |+| `Could not find a package configuration file provided by "MLIR"` | The `TRITON_KERNELS_SRC_DIR` level is wrong; it should point to `.../python/triton_kernels/triton_kernels` |+| Many `FAILED: [code=9]` during compilation | Compiler processes were killed for lack of memory. Lower `MAX_JOBS` (8–32 for 147 GB of RAM), and install `ccache` first to avoid recompiling |+| `ld: cannot find -lcudart` | Add the `lib64`, `libcudart.so` and `stubs/libcuda.so` links from 3.2 |+| `CUDA_nvrtc_LIBRARY ... NOTFOUND` | Add the `libnvrtc.so` link |+| `cuda_fp16.h ... nv/target: No such file` | Install `nvidia-cuda-cccl==13.3.4.3.1` |+| `No module named vllm._C` | Not a compilation failure; verify with `from vllm import LLM` |+| transformers in the vLLM environment is `5.19.0` instead of `5.19.0.dev0` | The editable install was overwritten by vLLM dependencies; re-run `pip install --no-deps -e <TRANSFORMERS_SRC>` |+| Layout reports missing `pypdfium2` | `pip install "pypdfium2>=4"`; needed even for image-only processing |++### Starting the service++| Symptom | Action |+|---|---|+| `model type 'minicpm_ocr' ... does not recognize this architecture` | The vLLM environment lacks feat-ocr transformers; install as in 3.2. vLLM does not need to be recompiled |+| `Could not find nvcc` | `CUDA_HOME` was not set; see section 4 |+| `ptxas fatal: Unsupported .version 9.4` or `CUDA compiler and CUDA toolkit headers are incompatible` | Unify nvcc, runtime, nvrtc and nvjitlink on 13.4.92, then add the links as in 3.2 |+| `flashinfer-cubin version does not match` | `pip uninstall flashinfer-cubin`; run `vllm download-kernels` if it exists |+| `CUDA driver version is insufficient` | Driver is below 580; see section 2 |+| With a driver below 580: `TopKMaskLogits ... device kernel image is invalid` | Set `VLLM_USE_FLASHINFER_SAMPLER=0`; greedy decoding results are the same |+| With a driver below 580: `nvcc fatal: Unknown option '--compress-mode=size'` | Point `CUDA_HOME` at the toolchain matching torch (cu126 corresponds to 12.8) |+| `libtorchcodec_image.so` when importing vLLM | `pip uninstall torchcodec` |+| `Free memory on device ... less than desired GPU memory utilization` | That GPU is occupied; switch `CUDA_VISIBLE_DEVICES` |+| OOM | Lower `--gpu-memory-utilization` to 0.7, or lower `--max-model-len` to 16384 |+| CUDA graph capture times out or gets SIGTERM | Restart once; if it still fails, add `--enforce-eager` |++### Parsing++| Symptom | Action |+|---|---|+| Parsing produces no result for a long time and the log shows `request failed until timeout` | The service is missing `--trust-request-mm-kwargs`, so requests are rejected and the SDK keeps retrying until the 600-second timeout |+| The SDK waits a long time and then reports `no ... endpoint became ready within 1800s` | The service is not up or the address is wrong; check with `curl /v1/models` first |+| Requests with images return 400 | The standard build is missing `--limit-mm-per-prompt '{"image": 36}'` |+| Output is empty or garbled | Thinking mode was not disabled; see section 5 |+| Tables are `<otsl>` rather than `<table>` | Direct API calls do not convert them; go through the SDK pipeline |+| Crop images report `assign N multimodal tokens to M placeholders` | The vLLM version is too old; switch to the feat-ocr build |+| Layout reports a CUDA error | The CPU build of paddle is installed; add `--set layout.device=cpu` |+| `At least one of input.image_dir / input.files_dir / input.file_path is required` | Add `--set input.file_path=<absolute path to the file>` |+| `input.file_path not found` although the file exists | A relative path was used in `--set`; change it to an absolute path |+| `run` produces the same results when rerun | Change `--set run.run_tag=<new name>` |+| pip times out | Use a domestic mirror. When accessing localhost, set `no_proxy=127.0.0.1,localhost,::1` |+| The service is on a remote machine | `ssh -L 18499:127.0.0.1:18499 user@host`, and use `--server-url http://127.0.0.1:18499` in the SDK |++## 9. Verified versions++| Component | Version |+|---|---|+| vLLM environment | Python 3.13.9, torch 2.14.0+cu130, vLLM source `5c2b92a5dc`, feat-ocr transformers `69eafbc5bd` |+| transformers environment | Python 3.10.12 / 3.13.9, torch 2.14.0+cu130, transformers 5.19.0.dev0 (`69eafbc5bd`) |+| SDK environment | minicpmvocr 0.2.3, paddlepaddle-gpu 3.3.0 or paddlepaddle 3.2.1, paddlex 3.4.2 |+| Hardware | 3×RTX 5090, driver 590.48.01, Ubuntu 22.04.5 (2026-10-19) |++## 10. Reporting rules++- The 5090 is only the verification machine; do not say that a 5090 is required. The thresholds are VRAM ≥ 24 GB and driver ≥ 580.+- Report only the checks that were actually run. If two-sided verification was not run, do not say the two sides match; if `/metrics` was not checked, do not say DSpark is active.+- The SDK repository has no Web UI scripts; do not mention or direct the user to run any `demo_*.py`.diff --git a/docs/benchmark_reproduction_en.md b/docs/benchmark_reproduction_en.mdnew file mode 100644index 0000000..2e28e8c--- /dev/null+++ b/docs/benchmark_reproduction_en.md@@ -0,0 +1,37 @@+# MiniCPM-OCR 1.0 Reproduction Guide++[← Back to README](../README.md) · [中文](./benchmark_reproduction_zh.md) · [Model guide](./minicpm_ocr_1dot0_en.md)++This document summarizes the test settings and deployment guides for the MiniCPM-OCR 1.0 parsing-efficiency comparison. Complete evaluation scripts, exact versions, and timing boundaries remain to be added.++## Test Settings++| Item | Test condition |+| :--- | :--- |+| Dataset | The complete OmniDocBench v1.6 dataset, containing 1,651 images |+| SDK and configuration | Each system's official SDK, with acceleration enabled and other settings left at their defaults |+| Concurrency | Image-level concurrency of 1 |+| Hardware | NVIDIA GeForce RTX 5090; all systems run on the same hardware |+| Metric | Pages processed per second (pages/s); higher values indicate higher throughput |++<!-- Source: test settings on pages 6–7 and the throughput chart on page 7 of the user-provided “MiniCPM-OCR 1.0 - 飞书云文档.pdf”; checked on 2026-10-22. The figure states “All models use accelerated configurations.” The original figure does not specify a separate acceleration method for GLM-OCR, so its name is unchanged. -->++Image-level concurrency and recognition concurrency for regions within a page are separate settings, corresponding to `pipeline.page_workers` and `pipeline.max_workers` in the SDK. See the [SDK tutorial](./minicpmvocr_tutorial_en.md). Image-level concurrency of 1 does not imply that regions within each page are recognized sequentially.++## Deployment and DSpark Acceleration++- [SDK tutorial](./minicpmvocr_tutorial_en.md): Install the environment, connect an inference backend, parse documents, and check outputs.+- [vLLM deployment guide](./vllm_deploy_en.md): Deploy the API service and check recognition results.++A comparison with and without DSpark must use the same main-model weights, dataset, hardware, and SDK configuration, changing only whether DSpark is enabled. The deployment examples start the service; complete comparison commands and logs for reproducing the speedup remain to be added.++## Interpreting Results++Measure the benefit of DSpark by comparing the same system with DSpark enabled and disabled. Cross-system throughput comparisons instead reflect each system's parsing efficiency under the settings above; report these two comparisons separately. Throughput values and comparison charts are collected in the [model guide's Throughput section](./minicpm_ocr_1dot0_en.md#throughput).++## Reproduction Details Still to Be Added++- Model weight revisions, SDK versions, complete startup commands, and acceleration arguments for each system.+- Timing start and end points, warmup procedure, failure and retry handling, and complete run logs.+- Commands and results comparing MiniCPM-OCR 1.0 with DSpark enabled and disabled under identical conditions.+- Complete scripts, dataset versions, metric definitions, and subset results for each benchmark.diff --git a/docs/benchmark_reproduction_zh.md b/docs/benchmark_reproduction_zh.mdnew file mode 100644index 0000000..c2a367a--- /dev/null+++ b/docs/benchmark_reproduction_zh.md@@ -0,0 +1,37 @@+# MiniCPM-OCR 1.0 复现文档++[← 返回 README](../README_zh.md) · [English](./benchmark_reproduction_en.md) · [模型指南](./minicpm_ocr_1dot0_zh.md)++本文汇总 MiniCPM-OCR 1.0 解析效率对比的测试设置与部署入口。完整评测脚本、精确版本和计时范围待补充。++## 测试设置++| 项目 | 测试条件 |+| :--- | :--- |+| 数据集 | OmniDocBench v1.6 完整数据集,共 1,651 张图像 |+| SDK 与配置 | 使用各系统官方 SDK;均启用加速配置,其他设置采用默认配置 |+| 并发 | 图片级并发度为 1 |+| 硬件 | NVIDIA GeForce RTX 5090,所有系统在相同硬件条件下运行 |+| 指标 | 每秒处理页数(pages/s),数值越高表示吞吐越高 |++<!-- 数据来源:用户提供的《MiniCPM-OCR 1.0 - 飞书云文档.pdf》第 6–7 页测试条件与第 7 页吞吐图;材料核对日期:2026-10-22。图下注明“All models use accelerated configurations.”。原图 GLM-OCR 未进一步注明加速方法,因此保留原名称。 -->++图片级并发与单页内文档块的识别并发是不同设置。SDK 中对应 `pipeline.page_workers` 和 `pipeline.max_workers`,详见 [SDK 使用教程](./minicpmvocr_tutorial.md)。上述图片级并发度为 1,不代表页内文档块也串行处理。++## 部署与 DSpark 加速++- [SDK 使用教程](./minicpmvocr_tutorial.md):安装环境、连接推理后端、解析文档与检查输出。+- [vLLM 部署指南](./vllm_deploy.md):部署 API 服务与检查识别结果。++DSpark 前后对照需使用相同主模型权重、数据集、硬件和 SDK 配置,仅改变 DSpark 开关。部署指南中的示例用于启动服务;用于复现加速收益的完整对照命令和日志待补充。++## 结果说明++DSpark 的加速收益应由同一系统开启和关闭 DSpark 的对照实验衡量。跨系统吞吐比较则反映各系统在上述设置下的解析效率,两者需要分别报告。吞吐数值与对比图统一见 [模型指南的吞吐章节](./minicpm_ocr_1dot0_zh.md#吞吐)。++## 待补充的复现信息++- 各系统的模型权重版本、SDK 版本、完整启动命令与加速参数。+- 计时起止点、预热方式、失败与重试的处理,以及完整运行日志。+- MiniCPM-OCR 1.0 在相同条件下开启和关闭 DSpark 的对照命令与结果。+- 各评测基准的完整脚本、数据版本、指标定义与子集结果。diff --git a/docs/faq_en.md b/docs/faq_en.mdnew file mode 100644index 0000000..8ea2ff2--- /dev/null+++ b/docs/faq_en.md@@ -0,0 +1,152 @@+# FAQ++Common issues with installation, model download, GPU memory, input formats and unexpected output.++## Installation Issues++### `pip install minicpmvocr` package not found+**Cause**: The PyPI distribution is named `minicpm-ocr`; the Python import and command are named `minicpmvocr`.++**Solution**: Run `python -m pip install "minicpm-ocr[all]==1.0.0"`. For development from this repository, use `python -m pip install -e "./sdk[all]"`.++### `minicpmvocr parse` reports `--config` missing+**Cause**: An older SDK version is installed. The current `parse` command supports a built-in quickstart configuration.++**Solution**: Install the current SDK as described in the [tutorial](./minicpmvocr_tutorial_en.md#1-set-up-the-sdk-environment), then run this command from the repository root with the recognition service running:++```bash+minicpmvocr parse doc.pdf -o doc.md --device cuda:0 \+ --server-url http://127.0.0.1:18499 --model minicpm-ocr+```++Pass `--server-url` and `--model` explicitly each time. For custom configuration, see [SDK API and Configuration](./minicpmvocr_api_en.md).++### `Could not find nvcc` (Blackwell/5090 first startup)+**Cause**: FlashInfer JIT requires nvcc; pip's CUDA packages include the toolchain.<br>+**Solution**: Set `CUDA_HOME=$VIRTUAL_ENV/lib/pythonX.Y/site-packages/nvidia/cu13` and add `$CUDA_HOME/bin` to `PATH`++### `CUDA driver version is insufficient`+**Cause**: The current inference environment uses CUDA 13, which normally requires driver ≥580.+**Solution**: Use a compatible driver. Data-center GPUs that support CUDA forward compatibility, such as A100, can also use `cuda-compat-13-0` as described in the [NVIDIA compatibility guide](https://docs.nvidia.com/deploy/cuda-compatibility/forward-compatibility.html).++On Ubuntu with the NVIDIA CUDA package repository configured, install the compatibility library and set these variables in each terminal used to install or start vLLM:++```bash+apt-get install -y cuda-compat-13-0+export OCR_CUDA_COMPAT_DIR=/usr/local/cuda-13.0/compat+export LD_LIBRARY_PATH="$OCR_CUDA_COMPAT_DIR${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"+export OCR_LIBCUDA="$OCR_CUDA_COMPAT_DIR/libcuda.so.1"+```++If the compatibility library is already installed, set `OCR_CUDA_COMPAT_DIR` to its actual directory. These variables apply only to the current terminal and its child processes; set them again in each new terminal used to start the service. Activating `.venv-vllm` does not restore them. If vLLM is already installed and startup reports `The NVIDIA driver on your system is too old (found version 12040)`, set the variables and restart the service. Recompilation is not required. Once PyTorch is installed, check GPU computation with:++```bash+.venv-vllm/bin/python -c 'import torch; x = torch.ones(1, device="cuda"); print(torch.cuda.get_device_name(0), (x + 1).item())'+```++### `bin/crt/link.stub: No such file or directory`+**Cause**: The pip-installed NVCC package is missing the `bin/crt` files required for linking.+**Solution**: Rerun the current installation script. It restores these files from the matching NVIDIA NVCC distribution and verifies the SHA-256 checksum. The download URL and checksum are maintained in `pyproject.toml`.++### `flashinfer-cubin version does not match`+**Solution**: `pip uninstall flashinfer-cubin`; run `vllm download-kernels` if the command exists++### `ptxas fatal: Unsupported .version 9.4`+**Cause**: nvcc 13.0 cannot compile flashinfer 0.7's `compute_120f`.<br>+**Solution**: Unify to 13.4 series nvcc/runtime/nvrtc/nvjitlink++### `CUDA compiler and CUDA toolkit headers are incompatible`+**Cause**: First FlashInfer JIT's nvcc 13.4.92 mixed with runtime 13.0.x.<br>+**Solution**: Align CUDA components to unified runtime/nvrtc 13.4.92 per Step 2++### `ld: cannot find -lcudart`+**Solution**: Add symlinks: `lib64 -> lib`, `lib/libcudart.so -> libcudart.so.13`, `lib64/stubs/libcuda.so` (see Step 2A)++### `cuda_fp16.h ... nv/target: No such file`+**Cause**: Missing CCCL headers.<br>+**Solution**: Install `nvidia-cuda-cccl==13.3.4.3.1` when compiling feat-ocr from source++### `CUDA_nvrtc_LIBRARY ... NOTFOUND`+**Solution**: Add symlink: `ln -sf libnvrtc.so.13 $CU/lib/libnvrtc.so`++### `Failed to clone https://github.com/nvidia/cutlass.git`+**Cause**: Internal network / no GitHub access.<br>+**Solution**: Use `VLLM_CUTLASS_SRC_DIR` and other `*_SRC_DIR` env vars to point to existing `.deps` source code++### `No module named vllm._C`+**Cause**: Not a compilation failure. This branch's extension is named `_C_stable_libtorch.abi3.so`.<br>+**Solution**: Smoke test with `from vllm import LLM; LLM(...)`++### `deep_gemm ... undefined symbol: _ZSt8to_charsPcS_DF128_`+**Impact**: Non-fatal, vLLM will skip it; OCR models don't use DeepGEMM. Full fix requires recompiling that extension or unifying libstdc++ 13++## Service Issues++### Startup reports `unexpected keyword argument 'adaptive_tile_upsize'`+**Cause**: The pinned vLLM version passes `adaptive_tile_upsize` during video warmup, but the OCR image processor in the accompanying Transformers version does not accept that argument.+**Solution**: This document-parsing workflow only needs image inputs. Explicitly disable video in the vLLM launch options: `--limit-mm-per-prompt '{"image":36,"video":0}'`. Keep the CUDA compatibility-library settings in the current terminal and restart the service; recompilation is not required. The SDK still renders PDFs into page images for recognition.++### Parsing hangs until timeout with no results+**Cause**: Missing `--trust-request-mm-kwargs` at startup. Current vLLM build rejects `mm_processor_kwargs` by default (returns 400, SDK silently retries).<br>+**Solution**: Add `--trust-request-mm-kwargs` to vLLM startup command++### Service runs but output is blank/garbled+**Cause**: Missing `chat_template_kwargs: {enable_thinking: false}`.<br>+**Solution**: SDK's vllm backend has this built-in; transformers/openai backends need it in `extra_body`++### Image requests return 400+**Cause**: The number of images in the request exceeds the `--limit-mm-per-prompt` setting, or the image data URI is incorrectly formatted.+**Solution**: Add this parameter to the vLLM launch command++### vLLM startup reports `Free memory on device ... less than desired GPU memory utilization`+**Cause**: This GPU is occupied by other processes.<br>+**Solution**: Use `CUDA_VISIBLE_DEVICES` to select an idle GPU++## Runtime Issues++### `show-config` reports `At least one of input... is required`+**Cause**: `show-config` also validates input.<br>+**Solution**: Add `--set input.file_path=<existing_file>`++### feat-ocr first `verify_vllm.py` killed by SIGTERM / graph capture timeout+**Cause**: First-time CUDA graph capture can be slow.<br>+**Solution**: Re-run once after cache is warm; if still failing, add `--enforce-eager`++### Small crop image `assign N multimodal tokens to M placeholders`+**Cause**: Placeholder bug in vLLM ≤0.22.<br>+**Solution**: Upgrade to current feat-ocr vLLM build++### Table output shows `<otsl>`+**Cause**: Direct API output is in OTSL format.<br>+**Solution**: Use SDK pipeline (Step 5) for automatic HTML conversion; direct API output requires manual conversion++### OOM (Out of Memory)+**Solution**: Lower `--gpu-memory-utilization` to 0.7, or reduce `--max-model-len` to 16384++### Layout reports CUDA error, but CPU version of paddle is installed+**Cause**: Default `layout.device` is `cuda`.<br>+**Solution**: Add `--set layout.device=cpu` (GPU version doesn't need this)++### Layout reports missing `pypdfium2` / dependencies+**Solution**: Explicitly install `pip install "pypdfium2>=4"`; 0.2.3's `[all]` includes it, older source packages may lack it. pypdfium2 is required even for image-only inputs++## Network & Environment++### Internal network / container pip timeout+**Solution**: Switch to Tsinghua/Aliyun mirror; for localhost requests set `no_proxy=127.0.0.1,localhost,::1`++### Service on remote machine+**Solution**: `ssh -L 18499:127.0.0.1:18499 user@host`, frontend uses `VLLM_URL=http://127.0.0.1:18499`++### Insufficient disk space+**Requirement**: Two env sets + model require ≥20GB; switch to a larger disk if system/data disk is nearly full++## Environment Configuration++### Want to merge feat-ocr's two torch environments+**Note**: Merging is **optional**, only needed for dual-backend byte-for-byte verification. For service/parsing only, install just vLLM or transformers.<br>+**Solution**: If merging: first compile vLLM, then `pip install --no-deps -e <transformers_source>`, finally `pip install --no-deps accelerate`++---++For issues not covered here, refer to the [detailed tutorial](./minicpmvocr_tutorial_en.md) or open an issue on GitHub.diff --git a/docs/faq_zh.md b/docs/faq_zh.mdnew file mode 100644index 0000000..76db827--- /dev/null+++ b/docs/faq_zh.md@@ -0,0 +1,152 @@+# 常见问题++安装、模型下载、显存、输入格式与输出异常等常见问题汇总。++## 安装问题++### `pip install minicpmvocr` 提示找不到包+**原因**:PyPI 发行包名为 `minicpm-ocr`,Python 导入名和命令为 `minicpmvocr`。++**解决**:`python -m pip install "minicpm-ocr[all]==1.0.0"`;从当前仓库开发安装可使用 `python -m pip install -e "./sdk[all]"`。++### `minicpmvocr parse` 报告缺少 `--config`+**原因**:安装的是旧版 SDK;当前版本的 `parse` 支持内置快速开始配置。++**解决**:按[教程](./minicpmvocr_tutorial.md#1-sdk-环境配置)安装当前 SDK,启动识别服务后,在仓库根目录运行:++```bash+minicpmvocr parse doc.pdf -o doc.md --device cuda:0 \+ --server-url http://127.0.0.1:18499 --model minicpm-ocr+```++每次运行都需显式传入 `--server-url` 和 `--model`。自定义配置见 [SDK API 与配置说明](./minicpmvocr_api.md)。++### `Could not find nvcc`(Blackwell/5090 首次启动)+**原因**:FlashInfer JIT 需要 nvcc;pip 的 CUDA 包中已包含该工具链。<br>+**解决**:设置 `CUDA_HOME=$VIRTUAL_ENV/lib/pythonX.Y/site-packages/nvidia/cu13`,并将 `$CUDA_HOME/bin` 加入 `PATH`++### `CUDA driver version is insufficient`+**原因**:当前推理环境使用 CUDA 13,默认需要 ≥580 的驱动。+**解决**:使用符合要求的驱动;对于 A100 等支持 CUDA 前向兼容的数据中心 GPU,也可按 [NVIDIA 兼容性说明](https://docs.nvidia.com/deploy/cuda-compatibility/forward-compatibility.html) 配置 `cuda-compat-13-0`。++在已配置 NVIDIA CUDA 软件源的 Ubuntu 系统中,安装兼容库,并在安装和启动 vLLM 的终端设置:++```bash+apt-get install -y cuda-compat-13-0+export OCR_CUDA_COMPAT_DIR=/usr/local/cuda-13.0/compat+export LD_LIBRARY_PATH="$OCR_CUDA_COMPAT_DIR${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"+export OCR_LIBCUDA="$OCR_CUDA_COMPAT_DIR/libcuda.so.1"+```++已有兼容库时,将 `OCR_CUDA_COMPAT_DIR` 改为其实际目录即可。环境变量仅对当前终端及其子进程生效,新开终端启动服务时需要重新设置;激活 `.venv-vllm` 不会自动恢复这些变量。若 vLLM 已安装完成,仅启动时提示 `The NVIDIA driver on your system is too old (found version 12040)`,设置变量后重新启动服务即可,无需重新编译。环境中装好 PyTorch 后,可用以下命令检查 GPU 运算:++```bash+.venv-vllm/bin/python -c 'import torch; x = torch.ones(1, device="cuda"); print(torch.cuda.get_device_name(0), (x + 1).item())'+```++### `bin/crt/link.stub: No such file or directory`+**原因**:pip 安装的 NVCC 包缺少链接时使用的 `bin/crt` 文件。+**解决**:使用当前安装脚本重新安装。脚本会从与 NVCC 版本一致的 NVIDIA 官方组件包中补齐文件,并校验 SHA-256;下载地址和校验值维护在 `pyproject.toml` 中。++### `flashinfer-cubin version does not match`+**解决**:执行 `pip uninstall flashinfer-cubin`;若存在 `vllm download-kernels` 命令则运行它++### `ptxas fatal: Unsupported .version 9.4`+**原因**:nvcc 13.0 无法编译 flashinfer 0.7 的 `compute_120f`。<br>+**解决**:将 nvcc/runtime/nvrtc/nvjitlink 统一到 13.4 系列++### `CUDA compiler and CUDA toolkit headers are incompatible`+**原因**:首次 FlashInfer JIT 使用的 nvcc 13.4.92 与 runtime 13.0.x 混用。<br>+**解决**:按步骤 2 将各 CUDA 组件对齐到统一的 runtime/nvrtc 13.4.92++### `ld: cannot find -lcudart`+**解决**:补充软链接:`lib64 -> lib`、`lib/libcudart.so -> libcudart.so.13`、`lib64/stubs/libcuda.so`(参见步骤 2A)++### `cuda_fp16.h ... nv/target: No such file`+**原因**:缺少 CCCL 头文件。<br>+**解决**:从源码编译 feat-ocr 时安装 `nvidia-cuda-cccl==13.3.4.3.1`++### `CUDA_nvrtc_LIBRARY ... NOTFOUND`+**解决**:补充软链接:`ln -sf libnvrtc.so.13 $CU/lib/libnvrtc.so`++### `Failed to clone https://github.com/nvidia/cutlass.git`+**原因**:内网环境 / 无法访问 GitHub。<br>+**解决**:使用 `VLLM_CUTLASS_SRC_DIR` 等 `*_SRC_DIR` 环境变量指向已有的 `.deps` 源码++### `No module named vllm._C`+**原因**:并非编译失败。该分支的扩展名为 `_C_stable_libtorch.abi3.so`。<br>+**解决**:用 `from vllm import LLM; LLM(...)` 做冒烟测试++### `deep_gemm ... undefined symbol: _ZSt8to_charsPcS_DF128_`+**影响**:非致命错误,vLLM 会跳过;OCR 模型不使用 DeepGEMM。彻底修复需重新编译该扩展或统一 libstdc++ 13++## 服务问题++### 启动时报 `unexpected keyword argument 'adaptive_tile_upsize'`+**原因**:当前固定版本的 vLLM 在视频预热时传入 `adaptive_tile_upsize`,而配套 Transformers 版本的 OCR 图像处理器不接受该参数。+**解决**:本文的文档识别流程只需要图片输入,在 vLLM 启动参数中显式关闭视频:`--limit-mm-per-prompt '{"image":36,"video":0}'`。保留当前终端的 CUDA 兼容库设置,重新启动服务即可,无需重新编译。PDF 仍由 SDK 渲染成页面图片后识别。++### 解析一直挂起直到超时且无结果+**原因**:启动时缺少 `--trust-request-mm-kwargs`。当前 vLLM 构建默认拒绝 `mm_processor_kwargs`(返回 400,SDK 静默重试)。<br>+**解决**:在 vLLM 启动命令中加入 `--trust-request-mm-kwargs`++### 服务正常运行但输出为空 / 乱码+**原因**:缺少 `chat_template_kwargs: {enable_thinking: false}`。<br>+**解决**:SDK 的 vllm 后端已内置该配置;transformers/openai 后端需在 `extra_body` 中补充++### 图像请求返回 400+**原因**:请求的图片数超过 `--limit-mm-per-prompt` 设置,或图像 data URI 格式不正确。+**解决**:在 vLLM 启动命令中补充该参数++### vLLM 启动报告 `Free memory on device ... less than desired GPU memory utilization`+**原因**:该 GPU 已被其他进程占用。<br>+**解决**:通过 `CUDA_VISIBLE_DEVICES` 指定空闲 GPU++## 运行时问题++### `show-config` 报告 `At least one of input... is required`+**原因**:`show-config` 同样会校验输入。<br>+**解决**:补充 `--set input.file_path=<existing_file>`++### feat-ocr 首次运行 `verify_vllm.py` 被 SIGTERM 终止 / 图捕获超时+**原因**:首次 CUDA 图捕获可能较慢。<br>+**解决**:待缓存预热后重跑一次;若仍失败,加上 `--enforce-eager`++### 小尺寸裁剪图报 `assign N multimodal tokens to M placeholders`+**原因**:vLLM ≤0.22 的占位符 bug。<br>+**解决**:升级到当前的 feat-ocr vLLM 构建++### 表格输出中出现 `<otsl>`+**原因**:API 直接输出的是 OTSL 格式。<br>+**解决**:使用 SDK 流水线(步骤 5)自动转换为 HTML;API 直出结果需手动转换++### OOM(显存不足)+**解决**:将 `--gpu-memory-utilization` 降到 0.7,或将 `--max-model-len` 减小到 16384++### 已安装 CPU 版 paddle,版面分析仍报 CUDA 错误+**原因**:`layout.device` 默认值为 `cuda`。<br>+**解决**:补充 `--set layout.device=cpu`(GPU 版无需此项)++### 版面分析报告缺少 `pypdfium2` / 依赖缺失+**解决**:显式安装 `pip install "pypdfium2>=4"`;0.2.3 的 `[all]` 已包含它,更早的源码包可能缺失。即使输入仅为图像,也需要 pypdfium2++## 网络与环境++### 内网 / 容器内 pip 超时+**解决**:切换到清华或阿里云镜像源;访问 localhost 时设置 `no_proxy=127.0.0.1,localhost,::1`++### 服务部署在远程机器+**解决**:执行 `ssh -L 18499:127.0.0.1:18499 user@host`,前端使用 `VLLM_URL=http://127.0.0.1:18499`++### 磁盘空间不足+**要求**:两套环境加模型需要 ≥20GB;若系统盘 / 数据盘接近写满,请切换到更大的磁盘++## 环境配置++### 想合并 feat-ocr 的两套 torch 环境+**说明**:合并是**可选**的,仅在需要双后端逐位比对验证时才有必要。若只做服务部署或解析,安装 vLLM 或 transformers 其中之一即可。<br>+**解决**:如需合并:先编译 vLLM,然后执行 `pip install --no-deps -e <transformers_source>`,最后执行 `pip install --no-deps accelerate`++---++若遇到本文未覆盖的问题,请参阅[详细教程](./minicpmvocr_tutorial.md)或在 GitHub 上提交 issue。diff --git a/docs/finetune_jev_en.md b/docs/finetune_jev_en.mdnew file mode 100644index 0000000..5bf0e70--- /dev/null+++ b/docs/finetune_jev_en.md@@ -0,0 +1,222 @@+# MiniCPM-OCR Jev Fine-Tuning Tutorial (ms-swift)++[中文版](finetune_jev_zh.md)++## Overview++This guide covers fine-tuning MiniCPM-OCR Jev on your own labelled data.++## Requirements++- **GPU**: 8 × A100 80GB for the recipe below+- **Python**: 3.12+- **Training framework**: ms-swift + DeepSpeed++Training and inference are two environments; the inference side needs neither ms-swift nor DeepSpeed.++**Training environment**++```bash+conda create -n minicpm-ocr-jev python=3.12 -y+conda activate minicpm-ocr-jev++pip install torch==2.8.0 torchvision==0.23.0 --index-url https://download.pytorch.org/whl/cu128+MAX_JOBS=32 NVCC_THREADS=4 pip install --no-build-isolation flash-attn==2.8.3+pip install \+ torch==2.8.0 torchvision==0.23.0 \+ transformers==5.10.4 tokenizers==0.22.2 ms-swift==4.4.0 \+ deepspeed==0.18.9 accelerate==1.13.0 flash-attn==2.8.3 \+ safetensors==0.8.0 pillow==11.3.0 numpy==2.5.1 \+ qwen-vl-utils==0.0.14+```++**Inference / evaluation environment**++```bash+pip install torch==2.8.0 torchvision==0.23.0 --index-url https://download.pytorch.org/whl/cu128+pip install \+ torch==2.8.0 torchvision==0.23.0 transformers==5.10.4 \+ tokenizers==0.22.2 safetensors==0.8.0 accelerate==1.13.0 \+ pillow==11.3.0 numpy==2.5.1+```++**Reference dependency versions**++```text+python 3.12.13+torch 2.8.0+cu128+transformers 5.10.4+ms-swift 4.4.0+deepspeed 0.18.9+accelerate 1.13.0+flash-attn 2.8.3+qwen-vl-utils 0.0.14+```++`transformers>=5.10.4` is a hard requirement: `Qwen3_5ForSequenceClassification` and `Qwen3VLProcessor` do not exist in earlier versions. If triton fails to compile during training, point `CUDA_HOME` at your CUDA installation.++## Dataset Format++The training data consists of quadruples: (original image, OCR text, rendered image, label), where the label is binary.++| label | Meaning | Criterion |+| --- | --- | --- |+| `1` | The OCR text **matches** the image | Text, formulas and table structure all line up |+| `0` | **Does not match** | Any of: missing or wrong characters, broken formula structure, misaligned table rows or columns, and similar errors |++A label applies to the whole OCR output; there is no character-level localisation. The model only answers "is this result usable".++One JSON object per line:++```json+{+ "messages": [+ {+ "role": "user",+ "content": "<image>\nOCR文本:\n<table><tr><td>Refs</td><td>Accuracy (%)</td></tr></table>\n<image>\n第一张图是原图,第二张图是上述 OCR 文本渲染得到的图片。\n请判断该 OCR 文本及其对应渲染图是否与原图内容一致。\n这是一个二分类任务:一致标为 1,不一致标为 0。"+ }+ ],+ "images": [+ "/path/to/images/gt/case_0025318.png",+ "/path/to/images/label/case_0025318.png"+ ],+ "label": 1+}+```++- `images` holds exactly two paths, **in the order [original, rendered]**;+- the two `<image>` placeholders in `content` correspond to those two images, and the OCR text is placed in the middle;+- the three closing lines are **fixed verbatim**; training and inference must use the same prompt;+- `label` is the integer `0` or `1`.++### Creating labelled data++Negatives have to come from both of these sources:++| Source | How | Why it is needed |+| --- | --- | --- |+| **Real negatives** | Wrong outputs from real OCR models, annotated as mismatched | Matches the error distribution seen in production — the class the model actually has to learn |+| **Synthetic negatives** | Rule-based perturbation of correct text (change digits, break formula structure, move table cells), then re-render | Covers error types the real negatives miss; cheap at volume, and the labels are correct by construction |++Positives are real OCR outputs annotated as matching.+++Before training, drop rows whose OCR text embeds a base64 image; such text is long enough to crowd out the image budget:++```bash+python scripts/minicpm-ocr-jev/data/filter_embedded_base64.py \+ --input-dir /path/to/dataset_dir --output-dir /path/to/filtered --splits train+```++## Launch Training++Fine-tuning with a 2-class sequence-classification head, on one node with 8 × A100 80GB. Run the following script after Environment Setup and Data Preparation:++```bash+# run_jev_sft.sh+#!/bin/bash+set -euo pipefail++export CUDA_VISIBLE_DEVICES="${CUDA_VISIBLE_DEVICES:-0,1,2,3,4,5,6,7}"+export NPROC_PER_NODE="${NPROC_PER_NODE:-8}"++# Training-side image budget. Evaluation and inference use the native budget — do not set it there.+export IMAGE_MAX_TOKEN_NUM=2048+export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True++MODEL_PATH="${MODEL_PATH:-/path/to/Qwen3.5-2B}"+TRAIN_DATA="${TRAIN_DATA:-/path/to/filtered/train.jsonl}"+OUTPUT_DIR="${OUTPUT_DIR:-/path/to/outputs/minicpm_ocr_jev}"++swift sft \+ --model "${MODEL_PATH}" \+ --dataset "${TRAIN_DATA}" \+ --task_type seq_cls \+ --num_labels 2 \+ --problem_type single_label_classification \+ --tuner_type full \+ --torch_dtype bfloat16 \+ --freeze_vit true \+ --freeze_aligner true \+ --freeze_llm false \+ --num_train_epochs 3 \+ --per_device_train_batch_size 1 \+ --gradient_accumulation_steps 1 \+ --learning_rate 1e-5 \+ --lr_scheduler_type cosine \+ --warmup_ratio 0.05 \+ --weight_decay 0.1 \+ --max_grad_norm 1.0 \+ --max_length 12000 \+ --packing true \+ --packing_length 12000 \+ --packing_num_proc 8 \+ --deepspeed zero3 \+ --gradient_checkpointing true \+ --attn_impl flash_attn \+ --logging_steps 10 \+ --eval_strategy no \+ --save_strategy steps \+ --save_steps 500 \+ --save_total_limit 40 \+ --save_only_model true \+ --dataset_num_proc 48 \+ --dataloader_num_workers 4 \+ --ddp_timeout 10800 \+ --seed 42 \+ --output_dir "${OUTPUT_DIR}" \+ --report_to tensorboard+```++### Key arguments++- `--task_type seq_cls --num_labels 2 --problem_type single_label_classification` turn the base model into a scorer rather than a generator; they are what puts the 2-way head on the last token.+- `--packing true --max_length 12000`: two images plus OCR text make for long sequences, and throughput drops sharply without packing.+- `IMAGE_MAX_TOKEN_NUM=2048` applies to training only. Evaluation and inference use the checkpoint preprocessor's native budget; this train/inference asymmetry is intentional, do not harmonise it.+- To change GPU count, set `CUDA_VISIBLE_DEVICES` and `NPROC_PER_NODE`. Global batch = GPUs × per-device batch × gradient accumulation.++## Evaluation++Evaluation runs on **[JevOCRBench](https://huggingface.co/datasets/openbmb/JevOCRBench)**, a block-level benchmark for OCR verifiers. Each sample is a block image, one OCR candidate, and a rendering of that candidate; the ground truth is a human judgment of correct or incorrect, and the metric is AUROC.++```bash+huggingface-cli download openbmb/JevOCRBench --repo-type dataset \+ --local-dir /path/to/JevOCRBench+```++A sample row:++```json+{+ "item_id": 0,+ "image_path": "images/00001.png",+ "render_image_path": "renders/00001.png",+ "ocr_text": "【整句翻译】___",+ "label": "neg",+ "category": "text"+}+```++Score and compute AUROC on a single GPU:++```bash+# 1. Score: one prob_1 per sample+python scripts/minicpm-ocr-jev/eval/score.py \+ --dataset /path/to/JevOCRBench/data/jevocrbench.jsonl \+ --checkpoint /path/to/weights \+ --out /path/to/predictions.jsonl++# 2. Compute AUROC: overall and per category+python scripts/minicpm-ocr-jev/eval/evaluate.py \+ --predictions /path/to/predictions.jsonl+```+++Benchmark results for the released model are in [the README leaderboard](../README.md#jev-benchmark).++## Best Practices++1. **Split by page, never by sample** — regions from one page are highly correlated.+2. **Keep both negative sources.** Synthetic-only data trains a model that fails on real OCR errors; real-only data leaves error types uncovered.+3. **Freeze the renderer.** A new renderer version is a new input distribution; re-evaluate rather than reusing old numbers.+4. **Keep the prompt byte-identical to training** at evaluation and inference time, and check the last token id.diff --git a/docs/finetune_jev_zh.md b/docs/finetune_jev_zh.mdnew file mode 100644index 0000000..296ff74--- /dev/null+++ b/docs/finetune_jev_zh.md@@ -0,0 +1,222 @@+# MiniCPM-OCR Jev 微调教程(ms-swift)++[English](finetune_jev_en.md)++## 概述++本文描述如何准备你自己的标注数据微调 MiniCPM-OCR Jev。++## 环境准备++- **显卡**:下面这套配方按 8 × A100 80GB 给出。+- **Python**:3.12+- **训练框架**:ms-swift + DeepSpeed++训练和推理是两套环境,推理侧不需要装 ms-swift 和 DeepSpeed。++**训练环境**++```bash+conda create -n minicpm-ocr-jev python=3.12 -y+conda activate minicpm-ocr-jev++pip install torch==2.8.0 torchvision==0.23.0 --index-url https://download.pytorch.org/whl/cu128+MAX_JOBS=32 NVCC_THREADS=4 pip install --no-build-isolation flash-attn==2.8.3+pip install \+ torch==2.8.0 torchvision==0.23.0 \+ transformers==5.10.4 tokenizers==0.22.2 ms-swift==4.4.0 \+ deepspeed==0.18.9 accelerate==1.13.0 flash-attn==2.8.3 \+ safetensors==0.8.0 pillow==11.3.0 numpy==2.5.1 \+ qwen-vl-utils==0.0.14+```++**推理 / 评测环境**++```bash+pip install torch==2.8.0 torchvision==0.23.0 --index-url https://download.pytorch.org/whl/cu128+pip install \+ torch==2.8.0 torchvision==0.23.0 transformers==5.10.4 \+ tokenizers==0.22.2 safetensors==0.8.0 accelerate==1.13.0 \+ pillow==11.3.0 numpy==2.5.1+```++**依赖版本参考**++```text+python 3.12.13+torch 2.8.0+cu128+transformers 5.10.4+ms-swift 4.4.0+deepspeed 0.18.9+accelerate 1.13.0+flash-attn 2.8.3+qwen-vl-utils 0.0.14+```++其中 `transformers>=5.10.4` 是硬性要求,再早的版本里没有 `Qwen3_5ForSequenceClassification` 和 `Qwen3VLProcessor`。如果训练时 triton 编译失败,把 `CUDA_HOME` 指向你的 CUDA 安装目录即可。++## 数据格式++训练数据为(原图、OCR 文本、渲染图、标签)四元组,标签是二分类的:++| 标签 | 含义 | 判定标准 |+| --- | --- | --- |+| `1` | OCR 文本与图像内容**一致** | 文字、公式、表格结构都对得上 |+| `0` | **不一致** | 出现任意一种:漏字错字、公式结构被破坏、表格行列错位等 |++标签是针对整段 OCR 输出打的,不定位到具体字符。模型只回答一件事:这份结果能不能用。++每行一个 JSON 对象:++```json+{+ "messages": [+ {+ "role": "user",+ "content": "<image>\nOCR文本:\n<table><tr><td>Refs</td><td>Accuracy (%)</td></tr></table>\n<image>\n第一张图是原图,第二张图是上述 OCR 文本渲染得到的图片。\n请判断该 OCR 文本及其对应渲染图是否与原图内容一致。\n这是一个二分类任务:一致标为 1,不一致标为 0。"+ }+ ],+ "images": [+ "/path/to/images/gt/case_0025318.png",+ "/path/to/images/label/case_0025318.png"+ ],+ "label": 1+}+```++- `images` 必须正好两个路径,**顺序是 [原图, 渲染图]**;+- `content` 里的两个 `<image>` 占位符分别对应这两张图,OCR 文本放在中间;+- 末尾那三句提示语**一字不改**,训练和推理必须用同一套prompt;+- `label` 是整数 `0` 或 `1`。++### 怎么造标注数据++负样本两个来源缺一不可:++| 来源 | 做法 | 为什么需要它 |+| --- | --- | --- |+| **真实负样本** | 拿真实 OCR 模型的错误输出,标成不一致 | 它的错误分布和线上一致,正是模型真正要学会分辨的那一类 |+| **合成负样本** | 对正确文本做规则扰动(改数字、破坏公式结构、挪动表格单元格),再重新渲染 | 补上真实负样本覆盖不到的错误类型;量大且便宜,标签天然正确 |++正样本则是标注为一致的真实 OCR 输出。+++训练前先把 OCR 文本里嵌了 base64 图片的样本剔掉——这类文本长到会把图像的 token 预算挤没:++```bash+python scripts/minicpm-ocr-jev/data/filter_embedded_base64.py \+ --input-dir /path/to/dataset_dir --output-dir /path/to/filtered --splits train+```++## 启动训练++接一个 2 分类的序列分类头做微调,单机 8 × A100 80GB。环境和数据准备好之后,执行下面的脚本:++```bash+# run_jev_sft.sh+#!/bin/bash+set -euo pipefail++export CUDA_VISIBLE_DEVICES="${CUDA_VISIBLE_DEVICES:-0,1,2,3,4,5,6,7}"+export NPROC_PER_NODE="${NPROC_PER_NODE:-8}"++# 这是训练侧的图像 token 预算。评测和推理用原生预算,不要在那两侧设这个变量。+export IMAGE_MAX_TOKEN_NUM=2048+export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True++MODEL_PATH="${MODEL_PATH:-/path/to/Qwen3.5-2B}"+TRAIN_DATA="${TRAIN_DATA:-/path/to/filtered/train.jsonl}"+OUTPUT_DIR="${OUTPUT_DIR:-/path/to/outputs/minicpm_ocr_jev}"++swift sft \+ --model "${MODEL_PATH}" \+ --dataset "${TRAIN_DATA}" \+ --task_type seq_cls \+ --num_labels 2 \+ --problem_type single_label_classification \+ --tuner_type full \+ --torch_dtype bfloat16 \+ --freeze_vit true \+ --freeze_aligner true \+ --freeze_llm false \+ --num_train_epochs 3 \+ --per_device_train_batch_size 1 \+ --gradient_accumulation_steps 1 \+ --learning_rate 1e-5 \+ --lr_scheduler_type cosine \+ --warmup_ratio 0.05 \+ --weight_decay 0.1 \+ --max_grad_norm 1.0 \+ --max_length 12000 \+ --packing true \+ --packing_length 12000 \+ --packing_num_proc 8 \+ --deepspeed zero3 \+ --gradient_checkpointing true \+ --attn_impl flash_attn \+ --logging_steps 10 \+ --eval_strategy no \+ --save_strategy steps \+ --save_steps 500 \+ --save_total_limit 40 \+ --save_only_model true \+ --dataset_num_proc 48 \+ --dataloader_num_workers 4 \+ --ddp_timeout 10800 \+ --seed 42 \+ --output_dir "${OUTPUT_DIR}" \+ --report_to tensorboard+```++### 关键参数说明++- `--task_type seq_cls --num_labels 2 --problem_type single_label_classification`:这三个参数把基座从"生成"改成"打分",也就是在最后一个 token 上接出那个二分类头。+- `--packing true --max_length 12000`:两张图加一段 OCR 文本,序列本身就长,不开 packing 吞吐会掉得很厉害。+- `IMAGE_MAX_TOKEN_NUM=2048` 只作用于训练。评测和推理走 checkpoint 自带预处理器的原生预算——训练与推理在这一项上不对齐是刻意的,别去统一它。+- 要改卡数,调 `CUDA_VISIBLE_DEVICES` 和 `NPROC_PER_NODE` 即可。全局 batch = 卡数 × 单卡 batch × 梯度累积步数。++## 评测++评测在 **[JevOCRBench](https://huggingface.co/datasets/openbmb/JevOCRBench)** 上做。这是面向 OCR verifier 的块级评测集,每条样本是「块图 + 一条 OCR 候选文本 + 该候选的渲染图」,真值为人工标注的正确/错误,指标是 AUROC。++```bash+huggingface-cli download openbmb/JevOCRBench --repo-type dataset \+ --local-dir /path/to/JevOCRBench+```++数据样例如下:++```json+{+ "item_id": 0,+ "image_path": "images/00001.png",+ "render_image_path": "renders/00001.png",+ "ocr_text": "【整句翻译】___",+ "label": "neg",+ "category": "text"+}+```++单卡执行评测计算AUROC:++```bash+# 1. 打分:每条出一个 prob_1+python scripts/minicpm-ocr-jev/eval/score.py \+ --dataset /path/to/JevOCRBench/data/jevocrbench.jsonl \+ --checkpoint /path/to/weights \+ --out /path/to/predictions.jsonl++# 2. 算 AUROC:整体 + 分类别+python scripts/minicpm-ocr-jev/eval/evaluate.py \+ --predictions /path/to/predictions.jsonl+```+++已发布模型的评测结果见 [README 中的榜单](../README_zh.md#jev-benchmark)。++## 实践建议++1. **按页划分数据集,不要按样本划分**——同一页上的各个区域彼此高度相关。+2. **两类负样本都要留。** 只用合成负样本,模型会在真实 OCR 错误上失灵;只用真实负样本,又会有一批错误类型没被覆盖到。+3. **渲染器要冻住。** 换一个版本的渲染器,就等于换了一套输入分布,老的数不能接着用,必须重测。+4. **评测和推理时,prompt 要和训练时逐字节一致**,并检查最后一个 token id 是否对得上。diff --git a/docs/flagos_deploy_en.md b/docs/flagos_deploy_en.mdnew file mode 100644index 0000000..328490b--- /dev/null+++ b/docs/flagos_deploy_en.md@@ -0,0 +1,156 @@+# Multi-Chip Deployment with FlagOS++[← Back to README](../README.md) · [中文](./flagos_deploy_zh.md)++The MiniCPM-OCR family supports deployment across multiple chip platforms through FlagOS, bringing document parsing and OCR confidence assessment to different compute platforms. Developers can deploy MiniCPM-OCR 1.0 on its own for OCR tasks or combine it with MiniCPM-OCR Jev to build a workflow of document parsing → confidence assessment → human review.++## FlagOS Overview++The Beijing Academy of Artificial Intelligence (BAAI), together with research institutions, chip manufacturers, system vendors, and organizations working on algorithms and software, established the FlagOS Open Source Community to support large-scale adoption of diverse AI chips.++FlagOS develops a unified, open-source system software stack for multiple AI chip architectures. Its core projects include an operator library, a unified AI compiler, parallel training and inference frameworks, and a unified communication library, connecting the model, system, and chip layers. Across supported platforms, developers can reuse model integrations and operator optimizations to develop once and migrate across chips, reducing the cost of moving between different chip software stacks.++Community website: [flagos.io](https://flagos.io/) · Developer documentation: [docs.flagos.io](https://docs.flagos.io/en/latest/)++<a id="model-downloads"></a>++## FlagOS Multi-Chip Support and Downloads++FlagRelease is the FlagOS team's platform for automated model migration, adaptation, and release across AI chip architectures. Both models are available in **BF16** for deployment across **12 chip and edge platforms**: T-Head, NVIDIA, Huawei Ascend, Hygon, Kunlunxin, MetaX, Moore Threads, Tsingmicro, Iluvatar, Sunrise, M5, and CIX.++- **MiniCPM-OCR 1.0 (1.3B)**: An OCR-specialized model based on MiniCPM-V 4.6 for text recognition and document parsing, with support for photographed documents and complex tables.+- **MiniCPM-OCR Jev (2B)**: An independent model that assesses OCR results and provides calibrated confidence scores, helping human reviewers prioritize potentially incorrect OCR results.++The table below provides ModelScope and Hugging Face download links for the FlagOS-adapted deployment images of both models across supported chip platforms. See the corresponding model cards for model files, deployment code, and instructions for pulling images and starting containers.++| Chip / Platform | MiniCPM-OCR 1.0 | MiniCPM-OCR Jev |+| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| T-Head | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-1.0-BF16-zhenwu-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-1.0-BF16-zhenwu-FlagOS) | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-Jev-BF16-zhenwu-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-Jev-BF16-zhenwu-FlagOS) |+| NVIDIA | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-1.0-BF16-nvidia-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-1.0-BF16-nvidia-FlagOS) | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-Jev-BF16-nvidia-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-Jev-BF16-nvidia-FlagOS) |+| Huawei Ascend | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-1.0-BF16-ascend-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-1.0-BF16-ascend-FlagOS) | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-Jev-BF16-ascend-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-Jev-BF16-ascend-FlagOS) |+| Hygon | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-1.0-BF16-hygon-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-1.0-BF16-hygon-FlagOS) | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-Jev-BF16-hygon-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-Jev-BF16-hygon-FlagOS) |+| Kunlunxin | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-1.0-BF16-kunlunxin-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-1.0-BF16-kunlunxin-FlagOS) | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-Jev-BF16-kunlunxin-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-Jev-BF16-kunlunxin-FlagOS) |+| MetaX | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-1.0-BF16-metax-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-1.0-BF16-metax-FlagOS) | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-Jev-BF16-metax-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-Jev-BF16-metax-FlagOS) |+| Moore Threads | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-1.0-BF16-mthreads-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-1.0-BF16-mthreads-FlagOS) | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-Jev-BF16-mthreads-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-Jev-BF16-mthreads-FlagOS) |+| Tsingmicro | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-1.0-BF16-tsingmicro-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-1.0-BF16-tsingmicro-FlagOS) | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-Jev-BF16-tsingmicro-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-Jev-BF16-tsingmicro-FlagOS) |+| Iluvatar | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-1.0-BF16-iluvatar-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-1.0-BF16-iluvatar-FlagOS) | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-Jev-BF16-iluvatar-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-Jev-BF16-iluvatar-FlagOS) |+| Sunrise | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-1.0-BF16-sunrise-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-1.0-BF16-sunrise-FlagOS) | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-Jev-BF16-sunrise-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-Jev-BF16-sunrise-FlagOS) |+| ARM CPU (edge) | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-1.0-BF16-arm-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-1.0-BF16-arm-FlagOS) | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-Jev-BF16-arm-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-Jev-BF16-arm-FlagOS) |++ARM edge deployments use the `arm` download links listed above, with BF16 versions for both models. Refer to the corresponding model cards for supported devices, runtime requirements, and deployment instructions.++## FlagOS Installation and Usage++### Option 1: Use a FlagRelease Image (Recommended)++1. Select the target chip platform and model from the table above. Choose MiniCPM-OCR 1.0 for document parsing; add MiniCPM-OCR Jev for the same platform if confidence assessment is required.+2. Follow the model card to prepare the host drivers and runtime, pull the corresponding image, and start a container with the required device mappings and mounts for the model and document image directories.+3. Run the OCR or MiniCPM-OCR Jev example provided by the model card in the corresponding environment. Use the platform-specific settings for model paths, devices, batch size, image preprocessing, and startup parameters.++To download the model files first, the following example uses the **T-Head repositories on Hugging Face**, matching the source installation examples below:++```bash+python -m pip install --upgrade huggingface_hub++# Download the OCR document parsing model+hf download FlagRelease/MiniCPM-OCR-1.0-BF16-zhenwu-FlagOS \+ --local-dir ./models/MiniCPM-OCR-1.0++# Optional: download the Jev confidence assessment model+hf download FlagRelease/MiniCPM-OCR-Jev-BF16-zhenwu-FlagOS \+ --local-dir ./models/MiniCPM-OCR-Jev+```++For another platform, replace the repository names with the corresponding entries in the table. Model files are also available through ModelScope. Inside a container, the model path should point to the mounted model directory.++### Option 2: Install from Source++#### 1. MiniCPM-OCR 1.0: vLLM-plugin-FL++The following example sets up **vLLM-plugin-FL** for **MiniCPM-OCR 1.0 on the T-Head platform**, using **vLLM v0.24.0, vllm-plugin-FL v0.3.0, and FlagGems v5.4.0**. Before installation, prepare the chip drivers, runtime, PyTorch, and build dependencies as described in the model card.++Official vLLM-plugin-FL developer guide: [GitHub](https://github.com/flagos-ai/vllm-plugin-FL/blob/main/README.md) / [GitCode](https://gitcode.com/flagos-ai/vllm-plugin-FL/blob/main/README.md).++```bash+# 1. Install vLLM v0.24.0 (T-Head example)+git clone --branch v0.24.0 https://github.com/vllm-project/vllm.git+cd vllm+VLLM_TARGET_DEVICE=empty python -m pip install -v --no-build-isolation --no-deps .+cd ..++# 2. Install vllm-plugin-FL v0.3.0+git clone --branch v0.3.0 https://github.com/flagos-ai/vllm-plugin-FL.git+cd vllm-plugin-FL+python -m pip install --no-build-isolation -e .+cd ..++# 3. Install FlagGems v5.4.0+git clone --branch v5.4.0 https://github.com/flagos-ai/FlagGems.git+cd FlagGems+python -m pip install --no-build-isolation -e .+cd ..+```++Install the [FlagTree unified compiler](https://github.com/flagos-ai/FlagTree) and the [FlagCX unified communication library](https://github.com/flagos-ai/FlagCX) as required by your platform. See their project documentation and the corresponding model card for instructions. Refer to the model card for OCR model integration code, image preprocessing dependencies, and version and branch configurations for other platforms.++#### 2. MiniCPM-OCR Jev: Torch-FL++**MiniCPM-OCR Jev uses Torch-FL for multi-chip deployment.** Torch-FL connects MiniCPM-OCR Jev's PyTorch and Transformers inference workflow to the chip backend, using FlagGems operators and the corresponding compiler to perform confidence assessment.++Official Torch-FL developer guide: [GitHub](https://github.com/flagos-ai/Torch-FL) / [GitCode](https://gitcode.com/flagos-ai/Torch-FL). SDK, PyTorch, and compiler dependencies vary by chip. Start with the [installation guide](https://github.com/flagos-ai/Torch-FL/blob/main/docs/getting-started/installation.md) to select your target platform.++The following example also targets **T-Head**. Run it in a separate Python environment prepared for MiniCPM-OCR Jev. First, follow the [T-Head installation guide](https://github.com/flagos-ai/Torch-FL/blob/main/docs/vendors/ppu/installation.md) to prepare the PPU driver, SDK, compatible PyTorch build, build tools, and compiler dependencies. The example assumes the SDK is installed at `/usr/local/PPU_SDK`; adjust the path to match your installation.++```bash+mkdir -p minicpm-ocr-jev-src+cd minicpm-ocr-jev-src++# 1. Install Torch-FL (T-Head example)+git clone -b main https://github.com/flagos-ai/Torch-FL.git+cd Torch-FL+FLAGOS_ACCELERATOR=ppu \+ CUDA_HOME=/usr/local/PPU_SDK/CUDA_SDK \+ FLAGOS_SKIP_CUDA_ASSETS=1 \+ python -m pip install --no-build-isolation -v -e .+cd ..++# 2. Install the FlagGems operator library+git clone https://github.com/flagos-ai/FlagGems.git+cd FlagGems+python -m pip install --no-build-isolation -e .+cd ..++# 3. Install the FlagTree unified compiler if required by the platform+# See https://github.com/flagos-ai/FlagTree++# 4. Configure the Torch-FL runtime for T-Head+export FLAGOS_DISABLE_CUDA_ASSETS=1+```++For other platforms, use the build flags and runtime configuration from their installation guides. Follow the corresponding model card and platform guide for compatible Torch-FL, FlagGems, FlagTree, and any required FlagCX versions, as well as Transformers, MiniCPM-OCR Jev model code, and image rendering dependencies.++After installation, check whether a Torch-FL device is available in the same environment:++```python+import torch+import torch_fl++print("FlagOS available:", torch.flagos.is_available())+print("FlagOS device count:", torch.flagos.device_count())+```++If availability is `True` and the device count is greater than 0, continue with the MiniCPM-OCR Jev assessment workflow below. Configure model loading, device selection, and input preprocessing using the examples in the MiniCPM-OCR Jev model card.++### Run Document Parsing and Confidence Assessment++**1. Parse documents with MiniCPM-OCR 1.0**++Load the OCR model for the target platform and supply document images using the provided example to obtain recognized text and document parsing results. Follow the model card for image resolution, page segmentation, prompts, and output formats. If MiniCPM-OCR Jev will be used afterward, retain each original page-region image and its corresponding OCR text, keeping them correctly matched.++**2. Assess OCR results with MiniCPM-OCR Jev (optional)**++Load the MiniCPM-OCR Jev model for the target platform in the configured Torch-FL environment. Following its example, prepare the original page-region image, an image rendered from the OCR text, and the corresponding recognized text. Run MiniCPM-OCR Jev's Transformers classification workflow through Torch-FL and apply the provided postprocessing to obtain calibrated confidence scores.++**3. Prioritize human review**++Validate a review threshold on representative documents from your application, then prioritize low-confidence content for human inspection. MiniCPM-OCR Jev can also be used after other OCR models, subject to validation of the input format and assessment quality on the target documents.diff --git a/docs/flagos_deploy_zh.md b/docs/flagos_deploy_zh.mdnew file mode 100644index 0000000..46258d7--- /dev/null+++ b/docs/flagos_deploy_zh.md@@ -0,0 +1,156 @@+# FlagOS 多芯片部署++[← 返回 README](../README_zh.md#本地部署) · [English](./flagos_deploy_en.md)++MiniCPM-OCR 系列支持通过 FlagOS 进行多芯片部署,将文档解析与识别结果的可信度判别接入不同算力平台。开发者可单独部署 MiniCPM-OCR 1.0 完成 OCR 任务,也可结合 MiniCPM-OCR Jev 构建“文档解析 → 可信度判别 → 人工复核”的处理流程。++## FlagOS 介绍++为推动不同 AI 芯片的大规模应用,北京智源人工智能研究院联合科研机构、芯片企业、系统厂商及算法和软件相关单位,共同发起并创立了众智 FlagOS 开源社区。++FlagOS 致力于打造面向多种 AI 芯片的统一、开源系统软件栈,包括大型算子库、统一 AI 编译器、并行训推框架和统一通信库等核心开源项目,构建“模型—系统—芯片”三层贯通的开放技术生态。在适配支持范围内,开发者可以复用模型接入与算子优化成果,实现一次开发、跨芯迁移,降低不同芯片软件栈之间的迁移成本。++社区官网:[flagos.io](https://flagos.io/) · 开发者文档:[docs.flagos.io](https://docs.flagos.io/en/latest/)++<a id="model-downloads"></a>++## FlagOS 多 AI 芯片支持与下载++FlagRelease 是 FlagOS 团队构建的面向多架构 AI 芯片的模型自动迁移、适配与发布平台。本次提供两个模型的 **BF16** 多芯版本,**分别覆盖平头哥、英伟达、华为昇腾、海光、昆仑芯、沐曦、摩尔线程、清微智能、天数智芯、曦望、M5 及此芯,共 12 款芯片**:++- **MiniCPM-OCR 1.0(1.3B)**:基于 MiniCPM-V 4.6 进行 OCR 特化,面向文字识别与文档解析,支持真实拍摄文档和复杂表格等场景。+- **MiniCPM-OCR Jev(2B)**:独立的 OCR 识别结果判别模型,为识别结果提供经校准的可信度,帮助人工优先复核可能存在识别错误的内容。++下表提供两款模型经 FlagOS 适配后的多芯片模型镜像在 ModelScope 与 Hugging Face 上的下载地址。模型文件、部署代码、镜像拉取与容器启动说明见对应模型卡。++| 芯片 / 平台 | MiniCPM-OCR 1.0 | MiniCPM-OCR Jev |+| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| 平头哥 | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-1.0-BF16-zhenwu-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-1.0-BF16-zhenwu-FlagOS) | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-Jev-BF16-zhenwu-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-Jev-BF16-zhenwu-FlagOS) |+| 英伟达 | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-1.0-BF16-nvidia-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-1.0-BF16-nvidia-FlagOS) | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-Jev-BF16-nvidia-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-Jev-BF16-nvidia-FlagOS) |+| 华为昇腾 | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-1.0-BF16-ascend-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-1.0-BF16-ascend-FlagOS) | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-Jev-BF16-ascend-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-Jev-BF16-ascend-FlagOS) |+| 海光 | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-1.0-BF16-hygon-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-1.0-BF16-hygon-FlagOS) | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-Jev-BF16-hygon-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-Jev-BF16-hygon-FlagOS) |+| 昆仑芯 | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-1.0-BF16-kunlunxin-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-1.0-BF16-kunlunxin-FlagOS) | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-Jev-BF16-kunlunxin-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-Jev-BF16-kunlunxin-FlagOS) |+| 沐曦 | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-1.0-BF16-metax-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-1.0-BF16-metax-FlagOS) | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-Jev-BF16-metax-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-Jev-BF16-metax-FlagOS) |+| 摩尔线程 | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-1.0-BF16-mthreads-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-1.0-BF16-mthreads-FlagOS) | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-Jev-BF16-mthreads-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-Jev-BF16-mthreads-FlagOS) |+| 清微智能 | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-1.0-BF16-tsingmicro-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-1.0-BF16-tsingmicro-FlagOS) | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-Jev-BF16-tsingmicro-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-Jev-BF16-tsingmicro-FlagOS) |+| 天数智芯 | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-1.0-BF16-iluvatar-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-1.0-BF16-iluvatar-FlagOS) | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-Jev-BF16-iluvatar-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-Jev-BF16-iluvatar-FlagOS) |+| 曦望 | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-1.0-BF16-sunrise-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-1.0-BF16-sunrise-FlagOS) | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-Jev-BF16-sunrise-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-Jev-BF16-sunrise-FlagOS) |+| ARM 端侧 | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-1.0-BF16-arm-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-1.0-BF16-arm-FlagOS) | [ModelScope](https://modelscope.cn/models/FlagRelease/MiniCPM-OCR-Jev-BF16-arm-FlagOS) / [Hugging Face](https://huggingface.co/FlagRelease/MiniCPM-OCR-Jev-BF16-arm-FlagOS) |++ARM 端侧统一使用表中的 `arm` 版本入口,两款模型均为 BF16;具体支持设备、运行环境与部署方式以对应模型卡为准。++## FlagOS 安装与使用++### 方式一:使用 FlagRelease 镜像(推荐)++1. 从上表选择目标芯片平台和模型。仅需文档解析时选择 MiniCPM-OCR 1.0;需要对识别结果进行可信度判别时,再选择对应平台的 MiniCPM-OCR Jev。+2. 按模型卡准备宿主机驱动和运行时,拉取相应镜像,并配置设备映射、模型目录和文档图像目录挂载后启动容器。+3. 在对应环境中运行模型卡提供的 OCR 或 MiniCPM-OCR Jev 示例。模型路径、设备配置、批量大小、图像预处理和启动参数均以所选平台的模型卡为准。++如需先下载模型文件,以下以**平头哥平台的 Hugging Face 仓库**为例,与后文的源码安装示例保持一致:++```bash+python -m pip install --upgrade huggingface_hub++# 下载 OCR 文档解析模型+hf download FlagRelease/MiniCPM-OCR-1.0-BF16-zhenwu-FlagOS \+ --local-dir ./models/MiniCPM-OCR-1.0++# 可选:下载 Jev 可信度判别模型+hf download FlagRelease/MiniCPM-OCR-Jev-BF16-zhenwu-FlagOS \+ --local-dir ./models/MiniCPM-OCR-Jev+```++使用其他平台时,将仓库名替换为上表中的对应版本;也可从 ModelScope 获取模型文件。容器内的模型路径应指向挂载后的模型目录。++### 方式二:从源码安装++#### 1. MiniCPM-OCR 1.0:vLLM-plugin-FL++以下以**平头哥平台的 MiniCPM-OCR 1.0** 为例,安装 **vLLM-plugin-FL 推理环境**。示例使用 **vLLM v0.24.0、vllm-plugin-FL v0.3.0、FlagGems v5.4.0**。安装前请按模型卡准备芯片驱动、运行时、PyTorch 和构建依赖。++vLLM-plugin-FL 官方开发者指南:[GitHub](https://github.com/flagos-ai/vllm-plugin-FL/blob/main/README.md) / [GitCode](https://gitcode.com/flagos-ai/vllm-plugin-FL/blob/main/README.md)。++```bash+# 1. 安装 vLLM v0.24.0(平头哥平台示例)+git clone --branch v0.24.0 https://github.com/vllm-project/vllm.git+cd vllm+VLLM_TARGET_DEVICE=empty python -m pip install -v --no-build-isolation --no-deps .+cd ..++# 2. 安装 vllm-plugin-FL v0.3.0+git clone --branch v0.3.0 https://github.com/flagos-ai/vllm-plugin-FL.git+cd vllm-plugin-FL+python -m pip install --no-build-isolation -e .+cd ..++# 3. 安装 FlagGems v5.4.0+git clone --branch v5.4.0 https://github.com/flagos-ai/FlagGems.git+cd FlagGems+python -m pip install --no-build-isolation -e .+cd ..+```++按平台需求安装 [FlagTree 统一编译器](https://github.com/flagos-ai/FlagTree) 和 [FlagCX 统一通信库](https://github.com/flagos-ai/FlagCX),具体步骤见各项目文档及对应模型卡。OCR 模型适配代码、图像预处理依赖,以及其他平台的版本和分支配置,以对应模型卡为准。++#### 2. MiniCPM-OCR Jev:Torch-FL++**MiniCPM-OCR Jev 通过 Torch-FL 实现多芯片部署**。Torch-FL 为 MiniCPM-OCR Jev 的 PyTorch 和 Transformers 推理流程对接芯片后端,并结合 FlagGems 算子库与对应编译器运行可信度判别。++Torch-FL 官方开发者指南:[GitHub](https://github.com/flagos-ai/Torch-FL) / [GitCode](https://gitcode.com/flagos-ai/Torch-FL)。不同芯片的 SDK、PyTorch 和编译器依赖不同,请先按[安装指南](https://github.com/flagos-ai/Torch-FL/blob/main/docs/getting-started/installation.md)选择目标平台。++以下同样以**平头哥平台**为例,在为 MiniCPM-OCR Jev 准备的独立 Python 环境中执行。安装前请按[平头哥安装指南](https://github.com/flagos-ai/Torch-FL/blob/main/docs/vendors/ppu/installation.md)准备 PPU 驱动、SDK、配套 PyTorch、构建工具及编译器依赖;示例中的 SDK 路径为 `/usr/local/PPU_SDK`,请按实际安装位置调整。++```bash+mkdir -p minicpm-ocr-jev-src+cd minicpm-ocr-jev-src++# 1. 安装 Torch-FL(平头哥平台示例)+git clone -b main https://github.com/flagos-ai/Torch-FL.git+cd Torch-FL+FLAGOS_ACCELERATOR=ppu \+ CUDA_HOME=/usr/local/PPU_SDK/CUDA_SDK \+ FLAGOS_SKIP_CUDA_ASSETS=1 \+ python -m pip install --no-build-isolation -v -e .+cd ..++# 2. 安装 FlagGems 算子库+git clone https://github.com/flagos-ai/FlagGems.git+cd FlagGems+python -m pip install --no-build-isolation -e .+cd ..++# 3. 按平台需要安装 FlagTree 统一编译器+# 详见 https://github.com/flagos-ai/FlagTree++# 4. 配置平头哥平台的 Torch-FL 运行环境+export FLAGOS_DISABLE_CUDA_ASSETS=1+```++其他平台请使用对应安装指南中的构建参数与运行配置。Torch-FL、FlagGems、FlagTree 及所需 FlagCX 的版本组合,以及 Transformers、MiniCPM-OCR Jev 模型代码和图像渲染依赖,以对应模型卡和平台指南为准。++安装完成后,可在同一环境中检查 Torch-FL 设备是否可用:++```python+import torch+import torch_fl++print("FlagOS available:", torch.flagos.is_available())+print("FlagOS device count:", torch.flagos.device_count())+```++当可用状态为 `True` 且设备数量大于 0 时,可继续按下方 MiniCPM-OCR Jev 判别流程运行模型;模型加载、设备选择与输入预处理按 MiniCPM-OCR Jev 模型卡中的配套示例配置。++### 运行文档解析与可信度判别++**1. 使用 MiniCPM-OCR 1.0 解析文档**++加载目标平台的 OCR 模型,按配套示例输入文档图像,获得文字识别与文档解析结果。图像分辨率、页面切分、提示词及输出格式应使用模型卡提供的配置。若后续接入 MiniCPM-OCR Jev,保留页面块原图及其对应的识别文本,确保两者一一对应。++**2. 使用 MiniCPM-OCR Jev 评估识别结果(可选)**++在已配置好 Torch-FL 的环境中加载目标平台的 MiniCPM-OCR Jev 模型,按配套示例准备页面块原图、由 OCR 文本渲染的图像,以及对应识别文本,通过 Torch-FL 运行 MiniCPM-OCR Jev 的 Transformers 判别流程,并通过配套后处理输出经校准的可信度。++**3. 按可信度安排复核**++结合实际业务样本验证并设置复核阈值,将低可信度内容优先送交人工检查。MiniCPM-OCR Jev 也可接在其他 OCR 模型之后使用,接入前应验证输入格式及其在目标文档上的判别效果。diff --git a/docs/llamacpp_deploy.md b/docs/llamacpp_deploy.mdnew file mode 100644index 0000000..edc26db--- /dev/null+++ b/docs/llamacpp_deploy.md@@ -0,0 +1,141 @@+# llama.cpp Deployment Guide++[← Back to README](../README.md)++## Overview++llama.cpp enables CPU and local GPU inference with GGUF models, ideal for resource-constrained environments or offline deployment.++## Requirements++- **Hardware**: CPU with AVX2, or NVIDIA/AMD GPU+- **RAM**: ≥16GB system memory+- **Storage**: ~2.5GB for the F16 model + vision projector++## GGUF Weights++Download from [openbmb/ MiniCPM-OCR-1.0-gguf](https://huggingface.co/openbmb/MiniCPM-OCR-1.0-gguf):++| File | Size | Description |+|---|---|---|+| `MiniCPM-OCR-1_0-F16.gguf` | 1.4 GB | Language model (F16) |+| `mmproj-model-f16-4x.gguf` | 859 MB | Vision projector (4x downsample) |++Both files are required: the language model for `--model`, the projector for `--mmproj`.++Quantized versions (Q4_K_M, Q8_0) are coming soon. To quantize them yourself:++```bash+./build/bin/llama-quantize MiniCPM-OCR-1_0-F16.gguf MiniCPM-OCR-1.0-Q8_0.gguf Q8_0+```++## Installation++### Build from source++```bash+git clone https://github.com/ggml-org/llama.cpp+cd llama.cpp++# NVIDIA GPU+cmake -B build -DGGML_CUDA=ON -DCMAKE_BUILD_TYPE=Release+cmake --build build -j --target llama-server llama-quantize++# AMD GPU: cmake -B build -DGGML_HIP=ON ...+# CPU only: cmake -B build ...+```++> Tips: on recent NVIDIA GPUs you can speed up the build by targeting one architecture,+> e.g. `-DCMAKE_CUDA_ARCHITECTURES=120` (RTX 5090), `90` (H100), or `80` (A100).+> See the official [build documentation](https://github.com/ggml-org/llama.cpp/blob/master/docs/build.md)+> for the full list of options.++### Using pre-built binaries++Download from [llama.cpp releases](https://github.com/ggml-org/llama.cpp/releases).++## Serving++### Start server++```bash+./build/bin/llama-server \+ --model ./MiniCPM-OCR-1_0-F16.gguf \+ --mmproj ./mmproj-model-f16-4x.gguf \+ --host 0.0.0.0 \+ --port 18499 \+ --ctx-size 40960 \+ --n-gpu-layers 999+```++Flags:+- `--mmproj FILE`: path to the multimodal projector file — required for image input+- `--n-gpu-layers 999`: offload all layers to GPU; `0` for CPU-only inference+- `--ctx-size`: context window size++The official GGUF works out of the box — the embedded chat template already disables+thinking mode, so no extra template flags are needed. (If you convert the GGUF weights+yourself, start the server with `--chat-template-kwargs '{"enable_thinking":false}'`.)++### Verify service++```bash+curl http://127.0.0.1:18499/health+# {"status":"ok"}+```++## SDK Configuration++Install the SDK and layout model as described in the [SDK tutorial](./minicpmvocr_tutorial_en.md#installation), using `.minicpm-ocr` for the SDK environment. For CPU layout detection as shown below, replace the tutorial's `paddlepaddle-gpu` installation command with:++```bash+python -m pip install "paddlepaddle==3.2.1"+```++Then run from the root of this repository:++```bash+source .minicpm-ocr/bin/activate+export OCR_LAYOUT_MODEL_DIR="$PWD/PP-DocLayoutV3_infer"+export PADDLE_PDX_DISABLE_MODEL_SOURCE_CHECK=True++minicpmvocr parse --config sdk/minicpmvocr/configs/minicpmvocr.yaml \+ --backend llamacpp --server-url http://127.0.0.1:18499 \+ --model minicpm-ocr \+ --set layout.device=cpu \+ --set pipeline.queue_mode=serial \+ --set pipeline.max_workers=1 \+ --input doc.pdf --output doc.md+```++For GPU layout detection, install GPU PaddlePaddle as described in the SDK tutorial, activate `.minicpm-ocr`, and use `--set layout.device=cuda:0` instead.++> **Concurrency**: llama-server processes one request at a time by default. Keep+> `pipeline.queue_mode=serial` and `pipeline.max_workers=1` in the SDK options.++## Performance++Measured on a single RTX 5090 (32GB) with the F16 weights:++- Model + projector load: ~2.3s+- One table crop (1,312 prompt + 265 output tokens): ~1.0s+- VRAM: ~26GB with `--ctx-size 40960` — reduce the value on smaller GPUs+- CPU-only (48 threads): one table image end-to-end (layout + recognition + assembly) in ~21s++### Quantization trade-offs++| Quantization | Size | Table | Dense text / XML | Notes |+|---|---|---|---|---|+| F16 | 1.4 GB | baseline | baseline | highest fidelity |+| Q8_0 | 775 MB | lossless | ≈lossless | recommended balance |+| Q4_K_M | 505 MB | lossless | small degradation | closing-tag slashes may be dropped in dense code — prefer Q8_0 for code-heavy documents |++## Limitations++- Quantization introduces small accuracy loss (~1-2% on benchmarks, most visible on dense code/XML at Q4_K_M)+- No speculative decoding support (no DSpark)+- Slower than vLLM on high-end GPUs++---++For more details, see the [llama.cpp documentation](https://github.com/ggml-org/llama.cpp/blob/master/tools/server/README.md).diff --git a/docs/llamacpp_deploy_jev_en.md b/docs/llamacpp_deploy_jev_en.mdnew file mode 100644index 0000000..d374cb0--- /dev/null+++ b/docs/llamacpp_deploy_jev_en.md@@ -0,0 +1,265 @@+# SDK Local Deployment: llama.cpp Backend++[中文版](llamacpp_deploy_jev_zh.md)++[← Back to the deployment guide](./minicpm_ocr_jev_tutorial_en.md)++This document covers the SDK deployment path with llama.cpp's `llama-server` as the forward engine: how to install, start, and call the **score service** and the **render+score service**.++llama.cpp is a lightweight inference backend written in C++. Two things set it apart from the other backends: the model has to be converted to GGUF first, and the prompt is assembled by the engine from a template baked into the GGUF rather than by the SDK.++Both services share one forward engine. The only difference is where the render image comes from:++| | Score service | Render+score service |+| ---- | -------------------------------------- | ---------------------------------------------------- |+| Render image | You provide it | The service renders it by default (you may also provide it) |+| Render environment | **Not needed** — no Chromium, Node or fonts | Needed |+| Endpoint | `/v1/score`, returns `prob_1` | `/v1/rm/score*`, returns `prob_yes`, identical to the Docker image |+| Features | Scoring only | Scoring, best-of-N within a block, batched best-of-N, with precheck |+| Start script | `sdk/start_score.sh` | `sdk/start_render_score.sh` |++## Deployment steps++1. Build the engine → convert to GGUF → start the forward engine (both services need it)+2. Pick one:+ - **Score service** → install the service environment → start the service+ - **Render+score service** → install the render environment → start the service++The engine and the service must go into two separate virtual environments; do not merge them. All commands below run from `scripts/minicpm-ocr-jev/`.++## Requirements++- **GPU**: NVIDIA, ≥8GB VRAM+- **Driver**: ≥535+- **CUDA Toolkit**: ≥12.0+- **CMake**: ≥3.14+- **C++ compiler**: C++17 (GCC ≥9)+- **Python**: ≥3.10+- **llama.cpp**: latest stable release+- **Pinned versions**: `Pillow` 12.3.0, `playwright` 1.62.0 (render+score service only)++---++## 1. Forward engine++### Build++```bash+git clone https://github.com/ggml-org/llama.cpp.git && cd llama.cpp+cmake -B build -DGGML_CUDA=ON -DCMAKE_BUILD_TYPE=Release+cmake --build build -j --target llama-server+pip install -r requirements/requirements-convert_hf_to_gguf.txt+```++The last line installs the Python dependencies the GGUF conversion needs. The list ships with the llama.cpp repository and pulls in:++```text+torch 2.11.0 (from download.pytorch.org/whl/cpu — conversion needs no GPU)+transformers 4.57.6+numpy ~=2.2.6+sentencepiece >=0.1.98,<0.3.0+gguf >=0.1.0+protobuf >=4.21.0,<5.0.0+```++These are used only during conversion and have nothing to do with the two service environments below, so any environment will do.++### Convert to GGUF++Convert the language model and the vision encoder (`mmproj`) separately. The weights directory must contain `minicpm_ocr_jev.json`, which is how the converter recognises a MiniCPM-OCR Jev checkpoint:++```bash+echo '{}' > ./models/MiniCPM-OCR-Jev/minicpm_ocr_jev.json++python convert_hf_to_gguf.py ./models/MiniCPM-OCR-Jev \+ --outtype bf16 --outfile ./models/MiniCPM-OCR-Jev-bf16.gguf++python convert_hf_to_gguf.py ./models/MiniCPM-OCR-Jev --mmproj \+ --outtype bf16 --outfile ./models/mmproj-MiniCPM-OCR-Jev-bf16.gguf+```++### Start++```bash+./build/bin/llama-server \+ -m ./models/MiniCPM-OCR-Jev-bf16.gguf \+ --mmproj ./models/mmproj-MiniCPM-OCR-Jev-bf16.gguf \+ -ngl 99 \+ -c 32768 \+ --port 18499+```++- `--mmproj`: the vision encoder GGUF. Without it there is only the text path and the two images cannot get in.+- `-ngl 99`: put every layer on the GPU.+- `-c 32768`: context length, shared by the parallel slots.+- `-np N`: serve N requests in parallel.++Each request is a single forward pass and generates no tokens. Every request carries exactly two images — the original first, then the render. The model has no LM head, so the text-generation endpoints are unavailable.++---++## 2. Score service++You already have the render image and only want the score.++### Install++```bash+python3 -m venv /opt/venv-score+source /opt/venv-score/bin/activate+pip install "fastapi>=0.110" "uvicorn>=0.27" "httpx>=0.27" "pydantic>=2.6" "PyYAML>=6.0" "Pillow==12.3.0"+```++**Reference dependency versions**++```text+python 3.12.3+fastapi 0.162.0+uvicorn 0.54.0+httpx 0.28.1+pydantic 2.14.1+PyYAML 6.0.3+Pillow 12.3.0+```++### Start++`JEV_BACKEND_CONFIG` points at the llama.cpp backend config; the arguments are the service port and the engine address, in that order:++```bash+JEV_BACKEND_CONFIG=sdk/backends/llamacpp.yaml \+PATH=/opt/venv-score/bin:$PATH bash sdk/start_score.sh 18501 http://127.0.0.1:18499+```++Without `JEV_BACKEND_CONFIG` the service speaks the vLLM protocol, the endpoints do not match, and startup fails.++The service runs a self-check at startup; see [4. Startup self-check](#4-startup-self-check).++### Endpoints++| Method | Path | Purpose |+|---|---|---|+| GET | `/healthz` | Service status, the model the engine actually serves, the prompt template fingerprint and the self-check result |+| POST | `/v1/score` | Score a batch of already rendered candidates |++### Request++```bash+curl -s http://127.0.0.1:18501/v1/score -H 'Content-Type: application/json' -d '{+ "items": [{"original_image": "<base64>", "render_image": "<base64>", "ocr_text": "..."}]+}'+```++```json+{"results": [{"prob_1": 0.00227, "error": null}]}+```++All three fields are required: `original_image` is the base64 of the original block image, `render_image` is the base64 of that candidate rendered back into an image, and `ocr_text` is the candidate text itself. The base64 carries **no** `data:image/png;base64,` prefix, unlike the image API.++### Fields and limits++- `ocr_text` goes to the model as-is; nothing is cleaned up.+- `prob_1` is the probability that the candidate is consistent with the original image — no threshold, no label.+- At most 64 items per request (`JEV_MAX_ITEMS` to change it); over the limit returns 413, an empty batch returns an empty result. The number is a guard against packing too many images into one request, not a recommended batch size.+- When a base64 image cannot be decoded, the whole batch returns 422 naming the item and the field. A failure during scoring affects only that one item: it carries an `error` in its own slot and `prob_1` is `null`.++---++## 3. Render+score service++You only have candidate text and want the service to render before scoring. Precheck, render and forward all happen in this one process.++This service calls the scoring layer in-process: it does **not** need a separate score service running, and does not need a port reserved for one.++### Install++```bash+bash sdk/setup_render.sh /opt/venv-render+```++It installs Node, CJK fonts, Chromium and the service dependencies. On a slow network, point it at two mirrors:++```bash+PIP_INDEX_URL=https://<mirror>/simple \+PLAYWRIGHT_DOWNLOAD_HOST=https://<mirror>/playwright \+ bash sdk/setup_render.sh /opt/venv-render+```++### Start++The arguments are the service port and the engine address, in that order:++```bash+JEV_BACKEND_CONFIG=sdk/backends/llamacpp.yaml \+PATH=/opt/venv-render/bin:$PATH bash sdk/start_render_score.sh 18500 http://127.0.0.1:18499+```++It must be started with the `/opt/venv-render` interpreter, because it renders in its own process. The number of render processes is set by `RM_RENDER_BROWSERS`; the service runs a single worker, so raise that variable rather than adding workers when you need more throughput.++### Endpoints++Paths and field names are identical to the Docker image, so a caller switching between the image and the SDK does not have to change a single field:++| Method | Path | Purpose |+|---|---|---|+| GET | `/healthz` | As above, plus the supported `input_form` |+| POST | `/v1/rm/score` | Score a batch of "original image + candidate text" pairs, one score each, with a summary |+| POST | `/v1/rm/score_best` | Several candidates for one block; returns the best |+| POST | `/v1/rm/score_best_batch` | Several blocks, each picking its own best, in one request |++For the full field definitions see the [Docker image API reference](./minicpm_ocr_jev_docker_api_en.md) — that document describes the very same endpoints this service exposes.++### Request++Best-of-N within a block:++```bash+curl -s http://127.0.0.1:18500/v1/rm/score_best -H 'Content-Type: application/json' -d '{+ "input_form": "ternary",+ "case_id": "block_01",+ "image": "<base64 of the original block image>",+ "category": "text",+ "candidates": ["candidate A", "candidate B"]+}'+```++```json+{"best_index": 1, "best_text": "candidate B", "scores": [0.00589, 0.99509],+ "verdicts": ["scored", "scored"],+ "stage_sec": {"render_sec": 0.31, "forward_sec": 0.02, "total_sec": 0.34},+ "batch_size": 2}+```++- `input_form` currently takes only `ternary`, and must be sent explicitly.+- `category` must match the real type of the block (`text` / `formula` / `table`). Getting it wrong raises no error but skews the score.+- Passing `render_images` skips server-side rendering; its length must match `candidates`.+- At most 64 candidates per request (`RM_MAX_ITEMS` to change it) — again a guard, not a recommended batch size. All three endpoints count **candidates**, not blocks: `score_best_batch` counts the candidates of all blocks added up, so with 3 candidates per block, 64 only covers 21 blocks.++### The two rates in the summary++`pass_rate` and `throughput_rate` are two different things: the first is the scoring success rate (`scored / total`, independent of any threshold), the second is the pass-threshold rate (items with `prob_yes >= RM_THRESHOLD`, divided by total; the threshold defaults to 0.5 and is configurable). The threshold only enters this one rate — every `prob_yes` is returned as it is.++---++## 4. Startup self-check++The prompt is assembled by the engine from a template baked into the GGUF, and cannot be read from the service side. So the prompt is **reported rather than verified**, and the service starts regardless. What can be checked is the other half: one real forward pass on a 1×1 image, confirming the engine answers as a classification model with 2 numbers rather than a hidden state.++Once the service is up, query `/healthz`; `status: ok` means everything is fine:++```bash+curl -s http://127.0.0.1:18501/healthz+```++```json+{"status": "ok", "served_model": "MiniCPM-OCR-Jev-bf16",+ "prompt": {"template_md5": "9aab68e8ba8ab4da17ba9752bddb199c",+ "source": "server_template",+ "last_token": null, "expected_last_token": 271,+ "token_equality": "skipped", "forward_shape": "2 probabilities",+ "notes": ["this engine builds the prompt from a template of its own that cannot be read from here ..."]}}+```++Look at `status` only: `ok` means the self-check passed and the service is ready. The other fields under `prompt` are self-check details, and the shape above is what a healthy one looks like. When `status` is not `ok`, `prompt.notes` says which part failed.++`source` reading `server_template`, `last_token` reading `null` and `token_equality` reading `skipped` are the normal values for this backend, not a fault. One consequence for how the numbers may be read: the scale of this leg's scores can only be established by comparing it against a known backend on the same inputs.diff --git a/docs/llamacpp_deploy_jev_zh.md b/docs/llamacpp_deploy_jev_zh.mdnew file mode 100644index 0000000..69b606d--- /dev/null+++ b/docs/llamacpp_deploy_jev_zh.md@@ -0,0 +1,265 @@+# SDK 本地部署:llama.cpp 后端++[English](llamacpp_deploy_jev_en.md)++[← 返回使用教程](./minicpm_ocr_jev_tutorial_zh.md)++本文介绍SDK部署模式下,以 llama.cpp 的 `llama-server` 作为前向引擎时,**不带渲染器服务**与**内置渲染器服务**的安装、启动、接口与请求格式。++llama.cpp 是 C++ 实现的轻量推理后端。与其他后端的两点不同:模型要先转成 GGUF 格式;prompt 由引擎按烘在 GGUF 里的模板自己拼,不由 SDK 拼。++两种服务共用同一个前向引擎,区别只在渲染图从哪里来:++| | 不带渲染器服务 | 内置渲染器服务 |+| ---- | -------------------------- | ------------------------------------------- |+| 渲染图 | 由你提供 | 服务默认自己渲染(也可由你提供) |+| 渲染环境 | **不需要**,无 Chromium、Node、字体 | 需要 |+| 接口 | `/v1/score`,返回 `prob_1` | `/v1/rm/score*`,返回 `prob_yes`,与 Docker 镜像同构 |+| 功能 | 逐条打分 | 逐条打分、块内选优、批量选优,带 precheck |+| 启动脚本 | `sdk/start_score.sh` | `sdk/start_render_score.sh` |++## 部署流程++1. 编引擎 → 转 GGUF → 起前向引擎(两种服务都要)+2. 二选一:+ - **不带渲染器服务** → 装服务环境 → 起服务+ - **内置渲染器服务** → 装渲染环境 → 起服务++引擎与服务必须装在两个虚拟环境里,不要合并。以下命令都在 `scripts/minicpm-ocr-jev/` 目录下执行。++## 环境要求++- **GPU**:NVIDIA,显存 ≥8GB+- **驱动**:≥535+- **CUDA Toolkit**:≥12.0+- **CMake**:≥3.14+- **C++ 编译器**:支持 C++17(GCC ≥9)+- **Python**:≥3.10+- **llama.cpp**:最新稳定版+- **固定版本**:`Pillow` 12.3.0、`playwright` 1.62.0(仅内置渲染器服务)++---++## 一、前向引擎++### 编译++```bash+git clone https://github.com/ggml-org/llama.cpp.git && cd llama.cpp+cmake -B build -DGGML_CUDA=ON -DCMAKE_BUILD_TYPE=Release+cmake --build build -j --target llama-server+pip install -r requirements/requirements-convert_hf_to_gguf.txt+```++最后一行装的是转 GGUF 要用的 Python 依赖,清单随 llama.cpp 仓库一起下来,装进来的是:++```text+torch 2.11.0 (取自 download.pytorch.org/whl/cpu,转换不用 GPU)+transformers 4.57.6+numpy ~=2.2.6+sentencepiece >=0.1.98,<0.3.0+gguf >=0.1.0+protobuf >=4.21.0,<5.0.0+```++这些只在转换时用到,与下面两个服务的虚拟环境互不相干,装在哪个环境里都可以。++### 转 GGUF++语言模型与视觉编码器(`mmproj`)各转一份。权重目录里必须有 `minicpm_ocr_jev.json`,转换器靠它认出这是 MiniCPM-OCR Jev:++```bash+echo '{}' > ./models/MiniCPM-OCR-Jev/minicpm_ocr_jev.json++python convert_hf_to_gguf.py ./models/MiniCPM-OCR-Jev \+ --outtype bf16 --outfile ./models/MiniCPM-OCR-Jev-bf16.gguf++python convert_hf_to_gguf.py ./models/MiniCPM-OCR-Jev --mmproj \+ --outtype bf16 --outfile ./models/mmproj-MiniCPM-OCR-Jev-bf16.gguf+```++### 启动++```bash+./build/bin/llama-server \+ -m ./models/MiniCPM-OCR-Jev-bf16.gguf \+ --mmproj ./models/mmproj-MiniCPM-OCR-Jev-bf16.gguf \+ -ngl 99 \+ -c 32768 \+ --port 18499+```++- `--mmproj`:视觉编码器那份 GGUF,不给就只有文本通路,两张图进不去。+- `-ngl 99`:把全部层放到 GPU 上。+- `-c 32768`:上下文长度,由并行槽位共享。+- `-np N`:并行处理 N 个请求。++每个请求是一次前向,不生成任何 token。每个请求固定两张图:先原图、后渲染图;模型没有 LM head,文本生成类端点不可用。++---++## 二、不带渲染器服务++你已经有渲染图,只要分数。++### 安装++```bash+python3 -m venv /opt/venv-score+source /opt/venv-score/bin/activate+pip install "fastapi>=0.110" "uvicorn>=0.27" "httpx>=0.27" "pydantic>=2.6" "PyYAML>=6.0" "Pillow==12.3.0"+```++**依赖版本参考**++```text+python 3.12.3+fastapi 0.162.0+uvicorn 0.54.0+httpx 0.28.1+pydantic 2.14.1+PyYAML 6.0.3+Pillow 12.3.0+```++### 启动++`JEV_BACKEND_CONFIG` 指向 llama.cpp 的后端配置,参数依次为服务端口、引擎地址:++```bash+JEV_BACKEND_CONFIG=sdk/backends/llamacpp.yaml \+PATH=/opt/venv-score/bin:$PATH bash sdk/start_score.sh 18501 http://127.0.0.1:18499+```++不设 `JEV_BACKEND_CONFIG` 时服务按 vLLM 协议发请求,端点对不上,起服即失败。++服务启动时会自检一遍,见 [四、启动自检](#四启动自检)。++### 接口++| 方法 | 路径 | 用途 |+|---|---|---|+| GET | `/healthz` | 服务状态、引擎实际服务的模型、prompt 模板指纹与自检结论 |+| POST | `/v1/score` | 给一批已渲染好的候选打分 |++### 请求++```bash+curl -s http://127.0.0.1:18501/v1/score -H 'Content-Type: application/json' -d '{+ "items": [{"original_image": "<base64>", "render_image": "<base64>", "ocr_text": "..."}]+}'+```++```json+{"results": [{"prob_1": 0.00227, "error": null}]}+```++三个字段都是必填:`original_image` 是原始块图的 base64,`render_image` 是该候选渲染回图片后的 base64,`ocr_text` 是候选文本本身。base64 **不带** `data:image/png;base64,` 前缀,与镜像接口不同。++### 字段与限额++- `ocr_text` 原样送进模型,不做任何清洗。+- `prob_1` 是该候选与原图一致的概率,不带阈值、不带标签。+- 一次最多 64 条(`JEV_MAX_ITEMS` 可调),超限返回 413;空批返回空结果。这个数是防止单请求塞进过多图片的保护上限,不是推荐批大小。+- 图片 base64 解不开时整批返回 422,并指出是第几条的哪个字段;打分阶段的失败只影响那一条,它在自己那一格里带上 `error`、`prob_1` 为 `null`。++---++## 三、内置渲染器服务++你只有候选文本,让服务渲染完再打分。precheck、render、forward 三个阶段都在这个进程里完成。++本服务在进程内直接调用打分层,**不需要另外起一个不带渲染器服务**,也不需要给它留端口。++### 安装++```bash+bash sdk/setup_render.sh /opt/venv-render+```++它装 Node、CJK 字体、Chromium 与服务依赖。慢网下设两个镜像源:++```bash+PIP_INDEX_URL=https://<mirror>/simple \+PLAYWRIGHT_DOWNLOAD_HOST=https://<mirror>/playwright \+ bash sdk/setup_render.sh /opt/venv-render+```++### 启动++参数依次为服务端口、引擎地址:++```bash+JEV_BACKEND_CONFIG=sdk/backends/llamacpp.yaml \+PATH=/opt/venv-render/bin:$PATH bash sdk/start_render_score.sh 18500 http://127.0.0.1:18499+```++必须用 `/opt/venv-render` 这个解释器启动,本进程在自己进程里渲染。渲染进程数量由 `RM_RENDER_BROWSERS` 控制;服务只起一个 worker,要提吞吐请调这个变量而不是加 worker。++### 接口++端点与字段名与 Docker 镜像完全一致,调用方在镜像与 SDK 之间切换时不必改任何字段:++| 方法 | 路径 | 用途 |+|---|---|---|+| GET | `/healthz` | 同上,另报支持的 `input_form` |+| POST | `/v1/rm/score` | 给一批「原图 + 候选文本」逐条打分,返回分数与汇总 |+| POST | `/v1/rm/score_best` | 一个块内多个候选,选出最优 |+| POST | `/v1/rm/score_best_batch` | 多个块各自选优,一次提交 |++完整字段定义见 [Docker 镜像 API 参考](./minicpm_ocr_jev_docker_api_zh.md),那份文档描述的就是本服务的同名端点。++### 请求++块内选优:++```bash+curl -s http://127.0.0.1:18500/v1/rm/score_best -H 'Content-Type: application/json' -d '{+ "input_form": "ternary",+ "case_id": "block_01",+ "image": "<base64 原始块图>",+ "category": "text",+ "candidates": ["候选 A", "候选 B"]+}'+```++```json+{"best_index": 1, "best_text": "候选 B", "scores": [0.00589, 0.99509],+ "verdicts": ["scored", "scored"],+ "stage_sec": {"render_sec": 0.31, "forward_sec": 0.02, "total_sec": 0.34},+ "batch_size": 2}+```++- `input_form` 目前只有 `ternary` 一个取值,必须显式传。+- `category` 必须与块真实类型一致(`text` / `formula` / `table`),填错不报错但分数会偏。+- 传 `render_images` 则跳过服务端渲染,其长度必须与 `candidates` 一致。+- 一次最多 64 个候选(`RM_MAX_ITEMS` 可调),同样是保护上限而非推荐批大小。三个端点都按**候选数**算、不按块数:`score_best_batch` 数的是所有块的候选总和,每块 3 个候选时 64 只够 21 个块。++### 汇总里的两个比率++`pass_rate` 与 `throughput_rate` 是两件事:前者是打分成功率(`scored / total`,与阈值无关),后者是过阈率(`prob_yes >= RM_THRESHOLD` 的条数 / total,阈值默认 0.5,可配)。阈值只参与这个比率的计算,任何一条的 `prob_yes` 都按原值返回。++---++## 四、启动自检++prompt 由引擎按烘在 GGUF 里的模板拼,从服务这一侧读不到,所以 prompt 这一项**自检不作校验、如实报告**,服务照常启动。能校的是另一项:用一张 1×1 的图真打一次前向,确认引擎按分类模型返回了 2 个数而不是一串隐藏层输出。++起服后查 `/healthz`,`status` 为 `ok` 即正常:++```bash+curl -s http://127.0.0.1:18501/healthz+```++```json+{"status": "ok", "served_model": "MiniCPM-OCR-Jev-bf16",+ "prompt": {"template_md5": "9aab68e8ba8ab4da17ba9752bddb199c",+ "source": "server_template",+ "last_token": null, "expected_last_token": 271,+ "token_equality": "skipped", "forward_shape": "2 probabilities",+ "notes": ["this engine builds the prompt from a template of its own that cannot be read from here ..."]}}+```++只看 `status`:`ok` 就是自检通过、服务可用,`prompt` 下的其余字段是自检留下的明细,照上面的样子即为正常。`status` 不是 `ok` 时,`prompt.notes` 写明是哪一项没过。++`source` 为 `server_template`、`last_token` 为 `null`、`token_equality` 为 `skipped`,这三项在本后端下就是正常值,不是故障。由此带来的一个口径后果:这条腿分数的尺度,只能靠与已知后端对同一批输入比对来确立。diff --git a/docs/llamafactory_minicpm_ocr_french.md b/docs/llamafactory_minicpm_ocr_french.mdnew file mode 100644index 0000000..8a26a52--- /dev/null+++ b/docs/llamafactory_minicpm_ocr_french.md@@ -0,0 +1,286 @@+# MiniCPM-OCR 1.0 微调教程(LlamaFactory)++[English](llamafactory_minicpm_ocr_french_en.md)++## 模型与任务概述++本文使用 [Teklia/RIMES-2011-line](https://huggingface.co/datasets/Teklia/RIMES-2011-line) 数据,对 [MiniCPM-OCR 1.0](https://huggingface.co/openbmb/MiniCPM-OCR-1.0) 进行法语手写文本行识别的微调示例。++训练任务:++- 输入法语手写文本行图片,提示词为 `Text Recognition:`。+- `assistant` 输出图片对应的法语文本。++本次训练使用全参数 SFT,训练视觉编码器和语言模型,冻结多模态投影层;视觉 Token 压缩率为 4x。++## 环境准备++代码仓库:[tsjyma/LlamaFactory](https://github.com/tsjyma/LlamaFactory)。++**最小可运行安装步骤**++```bash+conda create -n "MiniCPM-OCR-French-LF" python=3.11 -y+conda activate "MiniCPM-OCR-French-LF"++pip install torch==2.9.1 torchvision==0.24.1 torchaudio==2.9.1++git clone https://github.com/tsjyma/LlamaFactory.git+cd LlamaFactory+git checkout 38fa4bcbac2830c159f2baf9808d21a7fca4e790+pip install -e .++pip install \+ accelerate==1.13.0 deepspeed==0.18.8 \+ peft==0.18.1 trl==0.24.0 datasets==4.0.0 \+ flash-linear-attention==0.4.2 \+ ninja einops safetensors tokenizers sentencepiece++pip install /path/to/transformers+export DISABLE_VERSION_CHECK=1+```++最后安装最新的 Transformers 源码(> 5.20.2)。++**依赖版本参考**++```text+Python 3.11.11+PyTorch 2.9.1+cu128+torchvision 0.24.1+torchaudio 2.9.1+Transformers > 5.20.2+DeepSpeed 0.18.8+Accelerate 1.13.0+PEFT 0.18.1+TRL 0.24.0+flash-linear-attention 0.4.2+datasets 4.0.0+LlamaFactory 0.9.6.dev0+```++++## 数据准备++使用 RIMES 官方的训练、验证和测试划分。++- 过滤含 `¤` 标注标记的训练样本,验证集和测试集只删除该分隔符并保留文本,同时保留大小写、重音符号、标点、内部空格和原始文本行图片。+++| 数据集 | 样本数 |+| --- | ------ |+| 训练集 | 10,138 |+| 验证集 | 1,138 |+| 测试集 | 778 |+++下载数据后,将图片路径与对应转写文本整理为以下 JSONL 格式。++**数据格式示例**++++```json+{+ "messages": [+ {+ "role": "user",+ "content": "<image>\nText Recognition:"+ },+ {+ "role": "assistant",+ "content": "J'ai perdu mon emploi depuis 3 mois et je me"+ }+ ],+ "images": [+ "/path/to/rimes_french/images/train/00000.jpg"+ ]+}+```++在 `dataset_info.json` 中注册训练集和验证集:++```json+{+ "rimes_train": {+ "file_name": "train.jsonl",+ "formatting": "sharegpt",+ "columns": {+ "messages": "messages",+ "images": "images"+ },+ "tags": {+ "role_tag": "role",+ "content_tag": "content",+ "user_tag": "user",+ "assistant_tag": "assistant"+ }+ },+ "rimes_validation": {+ "file_name": "validation.jsonl",+ "formatting": "sharegpt",+ "columns": {+ "messages": "messages",+ "images": "images"+ },+ "tags": {+ "role_tag": "role",+ "content_tag": "content",+ "user_tag": "user",+ "assistant_tag": "assistant"+ }+ }+}+```++## 启动训练++在单机 8 × A100 80GB 上训练 3 epoch,每轮 80 个更新步,共 240 步。每卡 batch size 为 1,梯度累积 16 步,全局 batch size 为 128。每轮使用完整验证集计算 loss 并保存检查点,训练结束后选择验证 loss 最低的检查点。++- 训练时追加 `<think>\n\n</think>\n\n`,用户提示词、图像和空思考前缀不参与 loss,答案及结束标记参与监督。++执行环境准备后,运行以下脚本:++```bash+set -euo pipefail+export CUDA_VISIBLE_DEVICES="${CUDA_VISIBLE_DEVICES:-0,1,2,3,4,5,6,7}"+export FORCE_TORCHRUN=1 NPROC_PER_NODE=8+export MASTER_ADDR=127.0.0.1 MASTER_PORT=29780+export DOWNSAMPLE_MODE=4x+export DISABLE_VERSION_CHECK=1++DOC_DIR=/path/to/ocr_doc+DATA_DIR=/path/to/rimes_french+OUTPUT_DIR=/path/to/outputs/minicpm_ocr_french_llamafactory+mkdir -p "$OUTPUT_DIR"++cat > "$OUTPUT_DIR/train.yaml" <<YAML+model_name_or_path: /path/to/MiniCPM-OCR-1.0+trust_remote_code: false+flash_attn: sdpa+use_reentrant_gc: false+stage: sft+do_train: true+finetuning_type: full+freeze_vision_tower: false+freeze_multi_modal_projector: true+dataset_dir: ${DATA_DIR}+dataset: rimes_train+template: minicpm_ocr+enable_thinking: false+train_on_prompt: false+cutoff_len: 4096+packing: false+preprocessing_num_workers: 8+dataloader_num_workers: 8+output_dir: ${OUTPUT_DIR}+logging_steps: 1+save_strategy: epoch+save_only_model: false+save_total_limit: 3+report_to: none+per_device_train_batch_size: 1+gradient_accumulation_steps: 16+learning_rate: 5.0e-06+num_train_epochs: 3.0+lr_scheduler_type: cosine+warmup_steps: 0.05+bf16: true+ddp_find_unused_parameters: true+seed: 42+data_seed: 42+eval_strategy: epoch+weight_decay: 0.1+do_eval: true+deepspeed: ${DOC_DIR}/assets/minicpm-ocr/ds_zero2.json+optim: adamw_torch_fused+adam_beta1: 0.9+adam_beta2: 0.95+adam_epsilon: 1.0e-08+max_grad_norm: 1.0+overwrite_cache: true+eval_dataset: rimes_validation+load_best_model_at_end: true+metric_for_best_model: eval_loss+greater_is_better: false+per_device_eval_batch_size: 1+YAML++llamafactory-cli train "$OUTPUT_DIR/train.yaml"+```++++## 训练曲线+++++| 训练轮数 | 更新步数 | 训练时长 | 平均训练 loss |+| ---- | ---- | --------- | --------- |+| 3 | 240 | 33 分 52 秒 | 0.203473 |++++| 模型 | Epoch | Validation loss ↓ |+| ---------------- | ----- | ----------------- |+| MiniCPM-OCR 1.0 | 0 | 1.683845 |+| Fine-tuned model | 1 | 0.225827 |+| Fine-tuned model | 2 | 0.206137 |+| Fine-tuned model | 3 | 0.207547 |+++本轮选择第 2 epoch 的 `checkpoint-160`;下文评测结果使用该检查点。++## 评测结果++在 RIMES 官方测试集全部 778 行上评测。原始模型与微调后的模型统一使用 4x 视觉 Token 压缩率、非 thinking 模式、greedy 解码和 batch size 8,每行最多生成 512 tokens。提示词沿用训练时的 `Text Recognition:`。++评测指标说明:+++| 指标 | 说明 |+| ----- | --------------------------------- |+| CER ↓ | 字符错误率:字符编辑距离总和除以参考字符总数,越低越好。 |+| WER ↓ | 词错误率:按空格分词后,词级编辑距离总和除以参考词总数,越低越好。 |+++两项指标均使用完整模型输出,统一 Unicode NFC、去除首尾空白,保留大小写、重音符号、标点和内部空格。+++| 模型 | RIMES CER ↓ | RIMES WER ↓ |+| ---------------- | ----------- | ----------- |+| MiniCPM-OCR 1.0 | 5.67% | 15.78% |+| Fine-tuned model | 2.98% | 7.66% |+++**输出样例**++以下为所选检查点在 RIMES 测试图片上的实际输出。++**样例 1:保险合同文本**++++```text+# Question+<image>+Text Recognition:++# Fine-tuned model+Comme indiqué dans les conditions particulières de mon contrat d'assurance+```++**样例 2:地址与日期**++++```text+# Question+<image>+Text Recognition:++# Fine-tuned model+de mon domicile du 3 Rue Gambetta, 57000 METZ, en date du 28 février+```diff --git a/docs/llamafactory_minicpm_ocr_french_en.md b/docs/llamafactory_minicpm_ocr_french_en.mdnew file mode 100644index 0000000..1491576--- /dev/null+++ b/docs/llamafactory_minicpm_ocr_french_en.md@@ -0,0 +1,272 @@+# MiniCPM-OCR 1.0 Fine-Tuning Tutorial (LlamaFactory)++[中文版](llamafactory_minicpm_ocr_french.md)++## Model and Task Overview++This tutorial uses the [Teklia/RIMES-2011-line](https://huggingface.co/datasets/Teklia/RIMES-2011-line) dataset as an example of fine-tuning [MiniCPM-OCR 1.0](https://huggingface.co/openbmb/MiniCPM-OCR-1.0) for French handwritten text-line recognition.++Training task:++- Input a French handwritten text-line image with the prompt `Text Recognition:`.+- The target `assistant` response is the corresponding French transcription.++This training run uses full-parameter SFT to train the vision encoder and language model while freezing the multimodal projector, with 4x visual token compression.++## Environment Setup++Source: [tsjyma/LlamaFactory](https://github.com/tsjyma/LlamaFactory)++**Minimum runnable installation steps**++```bash+conda create -n "MiniCPM-OCR-French-LF" python=3.11 -y+conda activate "MiniCPM-OCR-French-LF"++pip install torch==2.9.1 torchvision==0.24.1 torchaudio==2.9.1++git clone https://github.com/tsjyma/LlamaFactory.git+cd LlamaFactory+git checkout 38fa4bcbac2830c159f2baf9808d21a7fca4e790+pip install -e .++pip install \+ accelerate==1.13.0 deepspeed==0.18.8 \+ peft==0.18.1 trl==0.24.0 datasets==4.0.0 \+ flash-linear-attention==0.4.2 \+ ninja einops safetensors tokenizers sentencepiece++pip install /path/to/transformers+export DISABLE_VERSION_CHECK=1+```++Install the latest Transformers source last (> 5.20.2).++**Reference dependency versions**++```text+Python 3.11.11+PyTorch 2.9.1+cu128+torchvision 0.24.1+torchaudio 2.9.1+Transformers > 5.20.2+DeepSpeed 0.18.8+Accelerate 1.13.0+PEFT 0.18.1+TRL 0.24.0+flash-linear-attention 0.4.2+datasets 4.0.0+LlamaFactory 0.9.6.dev0+```++## Data Preparation++Use the official RIMES training, validation, and test splits.++- Exclude training samples that contain the `¤` annotation marker. For validation and test samples, remove only the delimiter and keep the text, while preserving case, accents, punctuation, internal spaces, and the original text-line images.++| Dataset | Samples |+| --- | ---: |+| Training | 10,138 |+| Validation | 1,138 |+| Test | 778 |++After downloading the dataset, pair each image path with its transcription in the JSONL format below.++**Data format reference**++++```json+{+ "messages": [+ {+ "role": "user",+ "content": "<image>\nText Recognition:"+ },+ {+ "role": "assistant",+ "content": "J'ai perdu mon emploi depuis 3 mois et je me"+ }+ ],+ "images": [+ "/path/to/rimes_french/images/train/00000.jpg"+ ]+}+```++Register the training and validation datasets in `dataset_info.json`:++```json+{+ "rimes_train": {+ "file_name": "train.jsonl",+ "formatting": "sharegpt",+ "columns": {+ "messages": "messages",+ "images": "images"+ },+ "tags": {+ "role_tag": "role",+ "content_tag": "content",+ "user_tag": "user",+ "assistant_tag": "assistant"+ }+ },+ "rimes_validation": {+ "file_name": "validation.jsonl",+ "formatting": "sharegpt",+ "columns": {+ "messages": "messages",+ "images": "images"+ },+ "tags": {+ "role_tag": "role",+ "content_tag": "content",+ "user_tag": "user",+ "assistant_tag": "assistant"+ }+ }+}+```++## Launch Training++Train for three epochs on one node with 8 × A100 80GB GPUs: 80 updates per epoch and 240 updates in total. Per-device batch size 1 and gradient accumulation 16 give a global batch size of 128. Evaluate on the complete validation set and save a checkpoint after each epoch, then select the checkpoint with the lowest validation loss.++- Training appends `<think>\n\n</think>\n\n`. User text, image tokens, and the empty thinking prefix are masked from loss; the answer and end markers are supervised.++Run the following script after Environment Setup:++```bash+set -euo pipefail+export CUDA_VISIBLE_DEVICES="${CUDA_VISIBLE_DEVICES:-0,1,2,3,4,5,6,7}"+export FORCE_TORCHRUN=1 NPROC_PER_NODE=8+export MASTER_ADDR=127.0.0.1 MASTER_PORT=29780+export DOWNSAMPLE_MODE=4x+export DISABLE_VERSION_CHECK=1++DOC_DIR=/path/to/ocr_doc+DATA_DIR=/path/to/rimes_french+OUTPUT_DIR=/path/to/outputs/minicpm_ocr_french_llamafactory+mkdir -p "$OUTPUT_DIR"++cat > "$OUTPUT_DIR/train.yaml" <<YAML+model_name_or_path: /path/to/MiniCPM-OCR-1.0+trust_remote_code: false+flash_attn: sdpa+use_reentrant_gc: false+stage: sft+do_train: true+finetuning_type: full+freeze_vision_tower: false+freeze_multi_modal_projector: true+dataset_dir: ${DATA_DIR}+dataset: rimes_train+template: minicpm_ocr+enable_thinking: false+train_on_prompt: false+cutoff_len: 4096+packing: false+preprocessing_num_workers: 8+dataloader_num_workers: 8+output_dir: ${OUTPUT_DIR}+logging_steps: 1+save_strategy: epoch+save_only_model: false+save_total_limit: 3+report_to: none+per_device_train_batch_size: 1+gradient_accumulation_steps: 16+learning_rate: 5.0e-06+num_train_epochs: 3.0+lr_scheduler_type: cosine+warmup_steps: 0.05+bf16: true+ddp_find_unused_parameters: true+seed: 42+data_seed: 42+eval_strategy: epoch+weight_decay: 0.1+do_eval: true+deepspeed: ${DOC_DIR}/assets/minicpm-ocr/ds_zero2.json+optim: adamw_torch_fused+adam_beta1: 0.9+adam_beta2: 0.95+adam_epsilon: 1.0e-08+max_grad_norm: 1.0+overwrite_cache: true+eval_dataset: rimes_validation+load_best_model_at_end: true+metric_for_best_model: eval_loss+greater_is_better: false+per_device_eval_batch_size: 1+YAML++llamafactory-cli train "$OUTPUT_DIR/train.yaml"+```++## Training Curves++++| Epochs | Updates | Training time | Mean training loss |+| ---: | ---: | --- | ---: |+| 3 | 240 | 33m 52s | 0.203473 |++| Model | Epoch | Validation loss ↓ |+| --- | ---: | ---: |+| MiniCPM-OCR 1.0 | 0 | 1.683845 |+| Fine-tuned model | 1 | 0.225827 |+| Fine-tuned model | 2 | 0.206137 |+| Fine-tuned model | 3 | 0.207547 |++Select `checkpoint-160` at epoch two. The evaluation results below use this checkpoint.++## Evaluation Results++Evaluate on all 778 official RIMES test lines. Both the base and fine-tuned model use 4x visual token compression, non-thinking mode, greedy decoding, batch size 8, and a maximum of 512 newly generated tokens per line. Use the same prompt, `Text Recognition:`, as in training.++Evaluation metrics:++| Metric | Description |+| --- | --- |+| CER ↓ | Character error rate: total character edit distance divided by the total number of reference characters. Lower is better. |+| WER ↓ | Word error rate: total word edit distance divided by the total number of reference words, using whitespace-delimited words. Lower is better. |++Both metrics use complete model outputs, normalize Unicode to NFC, trim leading/trailing whitespace, and preserve case, accents, punctuation, and internal spaces.++| Model | RIMES CER ↓ | RIMES WER ↓ |+| --- | ---: | ---: |+| MiniCPM-OCR 1.0 | 5.67% | 15.78% |+| Fine-tuned model | 2.98% | 7.66% |++**Output examples**++The examples below are actual outputs from the selected checkpoint on RIMES test images.++**Example 1: Insurance contract**++++```text+# Question+<image>+Text Recognition:++# Fine-tuned model+Comme indiqué dans les conditions particulières de mon contrat d'assurance+```++**Example 2: Address and date**++++```text+# Question+<image>+Text Recognition:++# Fine-tuned model+de mon domicile du 3 Rue Gambetta, 57000 METZ, en date du 28 février+```diff --git a/docs/minicpm_ocr_1dot0_en.md b/docs/minicpm_ocr_1dot0_en.mdnew file mode 100644index 0000000..d3c228e--- /dev/null+++ b/docs/minicpm_ocr_1dot0_en.md@@ -0,0 +1,115 @@+# MiniCPM-OCR 1.0++[中文版](./minicpm_ocr_1dot0_zh.md)++[← Back to the homepage](../README.md) · [MiniCPM-OCR Jev](./minicpm_ocr_jev_en.md)++MiniCPM-OCR 1.0 is a **1.3B** model for document parsing, text recognition, and key information extraction. This page covers its highlights, architecture, document parsing and KIE usage, deployment options, and benchmark breakdowns; see the [README](../README.md#ocr-benchmark) for complete experimental results.++## Model Highlights++- 🏆 **SOTA document parsing**: MiniCPM-OCR 1.0 achieves a **SOTA score of 93.68 on Real5-OmniDocBench**, a benchmark for real-world document parsing, and demonstrates leading parsing capabilities on OmniDocBench v1.6, Wild-OmniDocBench, and olmOCR-Bench. It supports Chinese and English documents and PDFs, handling both standard documents and challenging capture conditions, including scans, curved pages, photographs, skewed pages, and recaptured documents.+- ⚡ **Efficient inference.** With DSpark decoding acceleration ([**DSpark-BF16**](https://huggingface.co/openbmb/MiniCPM-OCR-1.0-DSpark), [**DSpark-GGUF**](https://huggingface.co/openbmb/MiniCPM-OCR-1.0-DSpark-gguf)), MiniCPM-OCR 1.0 improves **end-to-end processing efficiency by 55%**. Its throughput is approximately **1.49×** that of PaddleOCR-VL-1.6 and **3.62×** that of MinerU2.5 Pro, reducing the time needed for large-scale document parsing.+- 🔍 **General recognition and information extraction**: MiniCPM-OCR 1.0 achieves a **SOTA score of 54.7 on OCRBench v2**, demonstrating strong general OCR capabilities. It also supports key information extraction (KIE), extracting relevant document content for downstream information management and automated processing.+- 🛠️ **Easy deployment and development**: MiniCPM-OCR 1.0 supports **vLLM, SGLang, llama.cpp, and Ollama from day one**, with multiple chip platforms and quantized versions available at release. It **supports further fine-tuning** and provides a **pip SDK, a full-featured API, and established agent workflows** for application integration and customization. Online demos are available for [China](https://platform.modelbest.cn/console/playground/document-parse) and [global](https://platform.modelbest.ai/console/playground/document-parse) users.++## Model Base and Architecture++MiniCPM-OCR 1.0 is **specialized for OCR through training based on MiniCPM-V 4.6**. The standard model combines a **SigLIP vision encoder and a Qwen3.5 language model** and runs with the accompanying Transformers 5 model integration.++| Item | Description |+| :--- | :--- |+| Parameters | 1.3B |+| Primary languages | Chinese and English |+| Recognition tasks | Text, tables, formulas, charts, seals, and key information extraction |+| Document parsing components | MiniCPM-OCR 1.0 recognition model + PP-DocLayoutV3 layout model + `minicpmvocr` SDK |++<!-- The model base description follows flagos_deploy_zh.md; the architecture description follows minicpmvocr_tutorial.md. The exact initial checkpoint, original training data, and training stages are not yet supported by verifiable material and are not inferred from the architecture name. -->++## Document Parsing Workflow++The SDK parses complete documents, while the recognition model processes their image regions:++1. **Read the document**: The SDK accepts PDF, PNG, or JPG files and converts PDF pages to images.+2. **Analyze the layout**: PP-DocLayoutV3 detects document regions and analyzes reading order; the SDK crops the regions.+3. **Recognize the content**: The SDK sends document regions to the MiniCPM-OCR 1.0 inference service and recognizes them concurrently.+4. **Assemble the output**: The SDK combines results into Markdown in reading order, converts OTSL table representations to HTML, and preserves formulas as LaTeX.++The SDK and inference service use separate Python environments and may run on different machines. The SDK handles layout detection, cropping, and result assembly; the inference backend handles model recognition. See the [SDK tutorial](./minicpmvocr_tutorial_en.md) for installation and configuration.++### Single-Region Recognition++If layout regions have already been extracted, call the recognition service directly. Use a cropped image and the prompt corresponding to its region type:++| Region | Prompt | Result handling |+| :--- | :--- | :--- |+| Text | `Text Recognition:` | Returns recognized text |+| Table | `Table Recognition:` | The raw format depends on the model version; the SDK can handle table postprocessing |+| Formula | `Formula Recognition:` | Check that the LaTeX content and structure are complete |+| Seal | `Seal Recognition:` | Returns the recognized seal text |+| Chart | `Chart to Table:` | Converts chart content into a table |++See the [API example](./vllm_deploy_en.md#22-image-recognition) for a complete request and response checks. If `finish_reason` is `length`, check for truncated output and adjust the output budget.++<a id="kie"></a>++## Key Information Extraction (KIE)++MiniCPM-OCR 1.0 supports extracting specified fields from images, such as the store name and amount on a receipt. Send the image and a field extraction prompt directly to the recognition service, requesting a JSON object keyed by the field names. KIE can process the input image directly without generating full-document Markdown first.++Follow the [image recognition API example](./vllm_deploy_en.md#22-image-recognition) and replace `Text Recognition:` in the request with:++```text+Extract the "store_name", "amount". Format the output as a JSON object with keys: "store_name", "amount". If an item is not in the image, use "###".+```++Replace both field lists with the fields needed for your application, keeping their names consistent; field names can be in Chinese or English. The prompt requests `"###"` for fields absent from the image. The response is model-generated text; parse the JSON and check its fields and values before using it downstream.++## Model Weights++See [Model Weights in the README](../README.md#model-weights) for standard, GGUF-quantized, and DSpark downloads. FlagOS-adapted BF16 versions for multiple chips are listed in the [download table](./flagos_deploy_en.md#model-downloads).++**DSpark requires matching main and draft models from the same release** and must not be mixed with standard-model weights. See [DSpark acceleration](./minicpmvocr_tutorial_en.md#3-start-the-service) for weight selection and startup arguments.++## Inference++For your first PDF or image, start with the [SDK tutorial](./minicpmvocr_tutorial_en.md). If a recognition service is already running, configure the SDK to connect to its address.++| Inference option | Guide |+| :--- | :--- |+| vLLM | [API service and single-region recognition](./vllm_deploy_en.md) |+| Transformers | [Transformers service deployment](./SKILL_en.md#43-transformers-serve) |+| SGLang | [Deployment guide](./sglang_deploy.md) |+| llama.cpp | [GGUF deployment guide](./llamacpp_deploy.md) |+| Ollama | [SDK service connection and backend configuration](./minicpmvocr_api_en.md#command-line-options) |+| FlagOS | [Multi-chip deployment guide](./flagos_deploy_en.md) |++The SDK's `pipeline.max_workers` controls recognition-region requests, while `pipeline.page_workers` controls page concurrency. Configure both to match the backend's capacity: the current DSpark example uses `--max-num-seqs 32` as its per-instance concurrency limit. See the [SDK tutorial](./minicpmvocr_tutorial_en.md#4-parse-documents) for multiple instances and concurrency configuration.++## Fine-Tuning++The [LLaMA-Factory](./llamafactory_minicpm_ocr_french_en.md) and [ms-swift](./swift_minicpm_ocr_french_en.md) tutorials cover data preparation, training, and evaluation using French handwritten text-line recognition. The example uses full-parameter SFT, trains the vision encoder and language model while freezing the multimodal projector, and applies 4× visual token compression. These settings apply to the fine-tuning experiment in those tutorials.++## Evaluation++The figure below compares results on six benchmarks. Each panel retains its benchmark's original scores; higher is better. Scores from different benchmarks should not be compared directly.++<p align="center"><a href="../assets/minicpm-ocr/benchmark-comparison.png"><img src="../assets/minicpm-ocr/benchmark-comparison.png" alt="MiniCPM-OCR 1.0 benchmark breakdowns on Real5-OmniDocBench, Wild-OmniDocBench, OmniDocBench v1.6, olmOCR-Bench, OCRBench v2, and CHAOS-Bench." width="100%"></a></p>++The figure includes selected models to show differences across benchmarks. See the [complete experimental table in the README](../README.md#ocr-benchmark) for all 14 models.++## Throughput++On an NVIDIA GeForce RTX 5090, using all 1,651 images in OmniDocBench v1.6, image-level concurrency of 1, and each system's accelerated configuration, MiniCPM-OCR 1.0 achieves **1.2 pages/s**. Relative throughput is normalized to MiniCPM-OCR 1.0 at **1.00×**; a higher value indicates faster processing.++<p align="center"><a href="../assets/minicpm-ocr/throughput-comparison.png"><img src="../assets/minicpm-ocr/throughput-comparison.png" alt="OCR system throughput with accelerated configurations; MiniCPM-OCR 1.0 achieves 1.2 pages/s with relative throughput of 1.00×." width="100%"></a></p>++These are parsing throughput results; the exact timing boundaries remain to be documented. With image-level concurrency set to 1, recognition regions within a page can still be processed concurrently. Deployment speed also depends on page content, backend, concurrency, and hardware configuration.++## Reproduction++See the [reproduction guide](./benchmark_reproduction_en.md) for test settings, DSpark comparison requirements, and evaluation details still to be added. Recorded SDK test environments are listed under [Verified versions](./SKILL_en.md#9-verified-versions).++## License++MiniCPM-OCR 1.0 model weights, code, and documentation are released under the [Apache License 2.0](../LICENSE).diff --git a/docs/minicpm_ocr_1dot0_zh.md b/docs/minicpm_ocr_1dot0_zh.mdnew file mode 100644index 0000000..6d5f813--- /dev/null+++ b/docs/minicpm_ocr_1dot0_zh.md@@ -0,0 +1,115 @@+# MiniCPM-OCR 1.0++[English](./minicpm_ocr_1dot0_en.md)++[← 返回首页](../README_zh.md) · [MiniCPM-OCR Jev](./minicpm_ocr_jev_zh.md)++MiniCPM-OCR 1.0 是面向文档解析、文字识别与关键信息抽取的 **1.3B** 模型。本页介绍模型亮点、模型结构、文档解析与 KIE 用法、部署选择和分项评测;完整实验结果见 [首页](../README_zh.md#ocr-benchmark)。++## 模型亮点++- 🏆 **SOTA 的文档解析能力**:MiniCPM-OCR 1.0 在真实场景文档解析评测 **Real5-OmniDocBench 上取得 93.68 的 SOTA 成绩**,并在 OmniDocBench v1.6、Wild-OmniDocBench 和 olmOCR-Bench 等评测中展现领先的解析能力。模型支持中英双语文档与 PDF 解析,兼顾标准文档和复杂采集条件,在扫描、弯曲、拍照、倾斜及翻拍等场景下保持稳定表现。+- ⚡ **高效推理。** 基于 DSpark 解码加速([**DSpark-BF16**](https://huggingface.co/openbmb/MiniCPM-OCR-1.0-DSpark)、[**DSpark-GGUF**](https://huggingface.co/openbmb/MiniCPM-OCR-1.0-DSpark-gguf)),MiniCPM-OCR 1.0 的**端到端处理效率提升 55%**。其处理吞吐量约为 PaddleOCR-VL-1.6 的 **1.49 倍**、MinerU2.5 Pro 的 **3.62 倍**,降低大规模文档解析的时间开销。+- 🔍 **通用识别与信息抽取**:MiniCPM-OCR 1.0 在 **OCRBench v2 上取得 54.7 的 SOTA** 成绩,具备扎实的通用 OCR 能力;同时支持关键信息抽取(KIE),可根据业务需求提取文档中的关键内容,支持后续信息整理与自动化处理。+- 🛠️ **部署与开发友好**:MiniCPM-OCR 1.0 首日**适配 vLLM、SGLang、llama.cpp 和 Ollama**,同步提供多芯片适配与多种量化版本。模型**支持二次微调**,提供 **pip SDK、功能完备的 API 和成熟的 Agentic 用法**,方便应用集成与定制开发;同时提供在线体验([国内](https://platform.modelbest.cn/console/playground/document-parse)、[海外](https://platform.modelbest.ai/console/playground/document-parse)),方便用户在线体验解析效果。++## 模型基座与结构++MiniCPM-OCR 1.0 **基于 MiniCPM-V 4.6 进行 OCR 特化训练**。标准模型由 **SigLIP 视觉编码器与 Qwen3.5 语言模型**组成,通过配套的 Transformers 5 模型适配运行。++| 项目 | 说明 |+| :--- | :--- |+| 参数量 | 1.3B |+| 主要语言 | 中文、英文 |+| 识别任务 | 文本、表格、公式、图表、印章识别与关键信息抽取 |+| 文档解析组件 | MiniCPM-OCR 1.0 识别模型 + PP-DocLayoutV3 版面模型 + `minicpmvocr` SDK |++<!-- 基座说明据 flagos_deploy_zh.md;架构说明据 minicpmvocr_tutorial.md。精确初始检查点、原始训练数据与训练阶段尚无可核实材料,不据架构名称推断。 -->++## 文档解析流程++完整文档通过 SDK 解析,识别模型处理其中的图像块:++1. **读取文档**:SDK 接收 PDF、PNG 或 JPG,将 PDF 页面转为图像。+2. **分析版面**:PP-DocLayoutV3 检测文档区域并分析阅读顺序,SDK 按区域切块。+3. **识别内容**:SDK 将文档块发送给 MiniCPM-OCR 1.0 推理服务,并发识别各区域。+4. **组织输出**:SDK 按阅读顺序拼接为 Markdown,将表格的 OTSL 表示转换为 HTML,公式保留为 LaTeX。++SDK 与推理服务使用独立的 Python 环境,也可部署在不同机器上。SDK 负责版面检测、切块和结果整理,推理后端负责模型识别;安装与配置见 [SDK 使用教程](./minicpmvocr_tutorial.md)。++### 单块识别++已有版面切分结果时,可直接调用识别服务。建议按区域类型使用裁切后的图像和对应提示词:++| 区域 | 提示词 | 结果处理 |+| :--- | :--- | :--- |+| 文本 | `Text Recognition:` | 返回识别文本 |+| 表格 | `Table Recognition:` | 原始格式以模型版本为准;SDK 可完成表格后处理 |+| 公式 | `Formula Recognition:` | 检查 LaTeX 内容与结构是否完整 |+| 印章 | `Seal Recognition:` | 返回印章文字 |+| 图表 | `Chart to Table:` | 将图表内容转换为表格 |++完整请求与响应检查方法见 [API 调用示例](./vllm_deploy.md#22-图片识别)。若响应的 `finish_reason` 为 `length`,需检查输出是否截断并调整输出预算。++<a id="kie"></a>++## 关键信息抽取(KIE)++MiniCPM-OCR 1.0 支持按指定字段从图片中抽取信息,例如票据中的店名和金额。将图片与字段提示词直接发送给识别服务,要求模型输出以字段名为键的 JSON 对象。KIE 可直接处理输入图片,无需先生成全文 Markdown。++沿用 [API 图片识别示例](./vllm_deploy.md#22-图片识别),将请求中的 `Text Recognition:` 替换为:++```text+Extract the "店名", "金额". Format the output as a JSON object with keys: "店名", "金额". If an item is not in the image, use "###".+```++按业务需要替换两处字段列表,并保持字段名称一致;字段名可以使用中文或英文。提示词要求图片中不存在的字段使用 `"###"`。返回内容是模型生成的文本,接入后续程序前应解析 JSON,并核对字段和值。++## 模型权重++标准版、GGUF 量化版和 DSpark 版的下载入口统一见 [首页模型权重](../README_zh.md#model-weights);FlagOS 适配的 BF16 多芯片版本见 [下载列表](./flagos_deploy_zh.md#model-downloads)。++**DSpark 需要同一次发布的配套主模型和 draft 模型**,不能与标准版权重混用。权重选择与启动参数见 [DSpark 加速说明](./minicpmvocr_tutorial.md#3-启动服务)。++## 推理++首次解析 PDF 或图片,可从 [SDK 使用教程](./minicpmvocr_tutorial.md) 开始;已有识别服务时,只需配置 SDK 连接对应地址。++| 推理方式 | 使用说明 |+| :--- | :--- |+| vLLM | [API 服务与单块识别](./vllm_deploy.md) |+| Transformers | [Transformers 服务部署](./SKILL.md#43-transformers-serve) |+| SGLang | [部署指南(英文)](./sglang_deploy.md) |+| llama.cpp | [GGUF 部署指南(英文)](./llamacpp_deploy.md) |+| Ollama | [SDK 服务连接与后端配置](./minicpmvocr_api.md#命令行参数) |+| FlagOS | [多芯片部署指南](./flagos_deploy_zh.md) |++SDK 的 `pipeline.max_workers` 控制识别块请求数,`pipeline.page_workers` 控制页面并发。两者需结合后端能力设置:当前 DSpark 示例使用 `--max-num-seqs 32` 设置单实例并发上限;多实例部署与并发配置见 [SDK 教程](./minicpmvocr_tutorial.md#4-解析文档)。++## 二次微调++[LLaMA-Factory](./llamafactory_minicpm_ocr_french.md) 和 [ms-swift](./swift_minicpm_ocr_french.md) 教程以法语手写文本行识别为例,覆盖数据准备、训练和评测。该示例采用全参数 SFT,训练视觉编码器和语言模型、冻结多模态投影层,并使用 4× 视觉 Token 压缩;这些设置适用于教程中的二次微调实验。++## 评测++下图展示六项基准的分项对比,各面板保留对应基准的原始分数,分数越高越好。不同基准的分数不宜直接相互比较。++<p align="center"><a href="../assets/minicpm-ocr/benchmark-comparison.png"><img src="../assets/minicpm-ocr/benchmark-comparison.png" alt="MiniCPM-OCR 1.0 在 Real5-OmniDocBench、Wild-OmniDocBench、OmniDocBench v1.6、olmOCR-Bench、OCRBench v2 与 CHAOS-Bench 上的分项柱状图。" width="100%"></a></p>++图中选取部分模型展示分项差异,完整的 14 模型结果见 [首页实验表格](../README_zh.md#ocr-benchmark)。++## 吞吐++在 NVIDIA GeForce RTX 5090 上,使用 OmniDocBench v1.6 的 1,651 张图像、图片级并发度为 1,并启用各系统加速配置时,MiniCPM-OCR 1.0 的吞吐为 **1.2 pages/s**。相对吞吐以 MiniCPM-OCR 1.0 为 **1.00×**,数值越高表示处理速度越快。++<p align="center"><a href="../assets/minicpm-ocr/throughput-comparison.png"><img src="../assets/minicpm-ocr/throughput-comparison.png" alt="各 OCR 系统在加速配置下的吞吐;MiniCPM-OCR 1.0 为 1.2 pages/s,相对吞吐为 1.00×。" width="100%"></a></p>++这里报告各系统的解析吞吐,精确计时范围仍待补充。图片级并发度为 1 时,页内识别块仍可并发处理;实际部署速度还取决于页面内容、后端、并发和硬件配置。++## 复现++测试设置、DSpark 对照要求与待补充的评测信息见 [复现文档](./benchmark_reproduction_zh.md);已记录的 SDK 实测环境见 [已验证版本](./SKILL.md#9-已验证版本)。++## 许可++MiniCPM-OCR 1.0 的模型权重、代码与文档均采用 [Apache License 2.0](../LICENSE) 开源。diff --git a/docs/minicpm_ocr_api_en.md b/docs/minicpm_ocr_api_en.mdnew file mode 100644index 0000000..d1108ab--- /dev/null+++ b/docs/minicpm_ocr_api_en.md@@ -0,0 +1,89 @@+# MiniCPM-OCR 1.0 API Calls++[← Back to README](../README.md#api) · [中文](./minicpm_ocr_api_zh.md) · [MiniCPM-OCR Jev API calls](./minicpm_ocr_jev_api_en.md)++Use the OpenAI-compatible Chat Completions API to send an image and a recognition prompt to an enabled MiniCPM-OCR 1.0 service, then read the recognized content from the response. You only need the service URL, API key, and model name; no model download or inference environment setup is required.++## Endpoint and Authentication++| Setting | Description |+| :--- | :--- |+| `OCR_BASE_URL` | API base URL supplied by the service, including `/v1` but excluding `/chat/completions` |+| `OCR_API_KEY` | API key with OCR service access, sent as `Authorization: Bearer <API_KEY>` |+| `OCR_MODEL` | OCR model ID supplied by the service; it must match the server's model name |++**The official hosted OCR endpoint, access signup page, and model ID are still to be added.** These examples follow the repository's existing OpenAI-compatible recognition interface. Replace all placeholders with the configuration provided by your service before use.++```bash+export OCR_BASE_URL="<API base URL supplied by the service, including /v1>"+export OCR_API_KEY="<your API key>"+export OCR_MODEL="<OCR model ID supplied by the service>"+```++Recognition requests use `POST ${OCR_BASE_URL}/chat/completions` with a JSON body. First, check which models the key can access:++```bash+curl -fsS "${OCR_BASE_URL%/}/models" \+ -H "Authorization: Bearer ${OCR_API_KEY}"+```++Confirm that the returned `data` list contains an `id` matching `OCR_MODEL` before sending a recognition request.++## Python Example++Install the client and save the PNG image to recognize as `sample.png`:++```bash+pip install openai+```++```python+import base64+import os+from pathlib import Path++from openai import OpenAI++client = OpenAI(+ api_key=os.environ["OCR_API_KEY"],+ base_url=os.environ["OCR_BASE_URL"].rstrip("/"),+)+image_base64 = base64.b64encode(Path("sample.png").read_bytes()).decode("utf-8")++response = client.chat.completions.create(+ model=os.environ["OCR_MODEL"],+ messages=[+ {+ "role": "user",+ "content": [+ {+ "type": "image_url",+ "image_url": {"url": f"data:image/png;base64,{image_base64}"},+ },+ {"type": "text", "text": "Text Recognition:"},+ ],+ }+ ],+ temperature=0.01,+ top_p=0.001,+ max_tokens=2048,+ stream=False,+)++print(response.choices[0].message.content)+print("finish_reason:", response.choices[0].finish_reason)+```++The recognized content is in `choices[0].message.content`. If `finish_reason` is `length`, the result may be truncated. Adjust `max_tokens` according to the context and output lengths supported by the service.++## Text, Tables, and Formulas++Replace the example's prompt according to the region type:++| Content | Prompt |+| :--- | :--- |+| Text | `Text Recognition:` |+| Table | `Table Recognition:` |+| Formula | `Formula Recognition:` |++This example recognizes a single image region; the raw table output format depends on the model service you use. For layout analysis, cropping, reading-order reconstruction, and Markdown export from a complete PDF or page, see the [SDK document parsing tutorial](./minicpmvocr_tutorial_en.md#4-parse-documents). To score recognition quality, see the [MiniCPM-OCR Jev API guide](./minicpm_ocr_jev_api_en.md).diff --git a/docs/minicpm_ocr_api_zh.md b/docs/minicpm_ocr_api_zh.mdnew file mode 100644index 0000000..2ce6e75--- /dev/null+++ b/docs/minicpm_ocr_api_zh.md@@ -0,0 +1,89 @@+# MiniCPM-OCR 1.0 API 调用++[← 返回首页](../README_zh.md#api) · [English](./minicpm_ocr_api_en.md) · [MiniCPM-OCR Jev API 调用](./minicpm_ocr_jev_api_zh.md)++通过 OpenAI 兼容的 Chat Completions 接口,将图片和识别提示词发送给已开通的 MiniCPM-OCR 1.0 服务,读取返回的识别结果。调用方只需准备服务地址、API Key 和模型名,无需下载模型或配置推理环境。++## 接口与鉴权++| 配置 | 说明 |+| :--- | :--- |+| `OCR_BASE_URL` | 服务提供的 API 基础地址,包含 `/v1`,不包含 `/chat/completions` |+| `OCR_API_KEY` | 已开通 OCR 服务的 API Key,通过 `Authorization: Bearer <API_KEY>` 发送 |+| `OCR_MODEL` | 服务提供的 OCR 模型 ID,需与服务端名称一致 |++**在线 OCR 服务的正式地址、开通入口和模型 ID 待补充。** 以下示例依据仓库现有的 OpenAI 兼容识别接口整理;使用前请将占位值替换为服务方提供的配置。++```bash+export OCR_BASE_URL="<服务提供的 API 基础地址,含 /v1>"+export OCR_API_KEY="<你的 API Key>"+export OCR_MODEL="<服务提供的 OCR 模型 ID>"+```++识别请求使用 `POST ${OCR_BASE_URL}/chat/completions`,请求体为 JSON。可先检查当前 Key 能访问的模型:++```bash+curl -fsS "${OCR_BASE_URL%/}/models" \+ -H "Authorization: Bearer ${OCR_API_KEY}"+```++确认返回的 `data` 列表中包含 `OCR_MODEL` 对应的 `id`,再发送识别请求。++## Python 调用示例++安装客户端,将需要识别的 PNG 图片保存为 `sample.png`:++```bash+pip install openai+```++```python+import base64+import os+from pathlib import Path++from openai import OpenAI++client = OpenAI(+ api_key=os.environ["OCR_API_KEY"],+ base_url=os.environ["OCR_BASE_URL"].rstrip("/"),+)+image_base64 = base64.b64encode(Path("sample.png").read_bytes()).decode("utf-8")++response = client.chat.completions.create(+ model=os.environ["OCR_MODEL"],+ messages=[+ {+ "role": "user",+ "content": [+ {+ "type": "image_url",+ "image_url": {"url": f"data:image/png;base64,{image_base64}"},+ },+ {"type": "text", "text": "Text Recognition:"},+ ],+ }+ ],+ temperature=0.01,+ top_p=0.001,+ max_tokens=2048,+ stream=False,+)++print(response.choices[0].message.content)+print("finish_reason:", response.choices[0].finish_reason)+```++识别内容位于 `choices[0].message.content`。如果 `finish_reason` 为 `length`,结果可能被截断,应结合服务允许的上下文和输出长度调整 `max_tokens`。++## 文本、表格与公式++按区域类型替换示例中的提示词:++| 识别内容 | 提示词 |+| :--- | :--- |+| 文本 | `Text Recognition:` |+| 表格 | `Table Recognition:` |+| 公式 | `Formula Recognition:` |++此示例用于单个图像块的识别;表格原始返回格式以所接入的模型服务为准。完整 PDF 或整页文档的版面分析、切块、阅读顺序恢复与 Markdown 导出,见 [SDK 文档解析教程](./minicpmvocr_tutorial.md#4-解析文档)。识别结果的质量评分见 [MiniCPM-OCR Jev API 调用说明](./minicpm_ocr_jev_api_zh.md)。diff --git a/docs/minicpm_ocr_jev_api_en.md b/docs/minicpm_ocr_jev_api_en.mdnew file mode 100644index 0000000..6767e9e--- /dev/null+++ b/docs/minicpm_ocr_jev_api_en.md@@ -0,0 +1,5 @@+## MiniCPM-OCR Jev Usage Example++[中文版](minicpm_ocr_jev_api_zh.md)++We will provide concrete usage instructions in the next 1 to 2 days. The methods are similar to the MiniCPM-OCR 1.0 API.diff --git a/docs/minicpm_ocr_jev_api_zh.md b/docs/minicpm_ocr_jev_api_zh.mdnew file mode 100644index 0000000..685ee0c--- /dev/null+++ b/docs/minicpm_ocr_jev_api_zh.md@@ -0,0 +1,5 @@+## MiniCPM-OCR Jev 调用示例++[English](minicpm_ocr_jev_api_en.md)++我们将在未来 1 到 2 天提供具体的使用方法,整体使用方法与 MiniCPM-OCR 1.0 API 类似。diff --git a/docs/minicpm_ocr_jev_docker_api_en.md b/docs/minicpm_ocr_jev_docker_api_en.mdnew file mode 100644index 0000000..852ce9a--- /dev/null+++ b/docs/minicpm_ocr_jev_docker_api_en.md@@ -0,0 +1,228 @@+# Docker Image API++[中文版](minicpm_ocr_jev_docker_api_zh.md)++[← Back to the deployment guide](./minicpm_ocr_jev_tutorial_en.md)++This is the interface reference for the Docker image of [MiniCPM-OCR Jev Local Deployment](./minicpm_ocr_jev_tutorial_en.md), describing the request and response formats of its four endpoints. The request body is a flat `input_form + items` structure, which is not the OpenAI Chat Completions protocol used by the [cloud API](./minicpm_ocr_jev_api_en.md); the two are not interchangeable.++## Common conventions++### `input_form`++Every scoring request carries `input_form` at the top level of the body. It is currently fixed to `"ternary"` (original image + render image + text). Any other value is rejected with 422.++### `image` / `render_image` / `render_images`++All image fields accept a data URL: `data:image/png;base64,<base64>` or `data:image/jpeg;base64,<base64>`. The MIME type in the prefix must match the real format.++### `category`++The block type, one of `"text"` / `"formula"` / `"table"`. **It must match the real type of the block** — a formula block sent as `text` gets its LaTeX rendered literally instead of typeset as a formula, which distorts the score without reporting anything.++### `verdict` and the values returned when scoring fails++Every result carries a `verdict` field, and **you must read it before using the score**:++| verdict | prob_yes | Meaning |+|---|---|---|+| `scored` | the real score | normal |+| `precheck_reject` | `0.0` | the candidate was judged unusable (broken LaTeX syntax, malformed structure) |+| `render_error` | `0.0` | rendering failed |+| `missing_original_image` | `0.0` | the original image is missing |+| `encode_error` | `-1.0` | the bytes of an input image are not readable |+| `forward_error` | `-1.0` | the backend errored out or is not ready yet |++The two failure values are deliberately kept apart: `0.0` means "judged, and it does not qualify", `-1.0` means "no judgement was produced". Both lose every comparison and clear no threshold. The reason for the failure is in `detail`.++---++## `GET /healthz`++Health check. Returns the service status, the backend model name, the renderer status and the settings.++```bash+curl -s http://127.0.0.1:8030/healthz | jq+```++```json+{+ "status": "ok",+ "backend": {"url": "http://127.0.0.1:8026", "alive": true,+ "served": ["minicpm-ocr-jev"], "model": "minicpm-ocr-jev"},+ "input_forms": {"supported": ["ternary"], "template_md5": "9aab68e8…"},+ "scorer": {"model": "minicpm-ocr-jev", "backend": "vllm-serve-classify",+ "template_md5": "9aab68e8…"},+ "render": {"enabled": true, "mode": "persistent", "browsers": 2, …},+ "settings": {"threshold": 0.5, "max_items": 64, "forward_concurrency": 4}+}+```++`status: ok` means the backend is ready; `loading` means it is still loading the weights, and scoring requests return 503 until it is done. `template_md5` is the fingerprint of the prompt template the engine actually assembles; when it differs from the training template, the scores are not comparable.++---++## `POST /v1/rm/score`++One score per block, one candidate per block. Suited to quality screening, routing to human review, and throughput-rate statistics.++```bash+curl -s http://127.0.0.1:8030/v1/rm/score -H 'Content-Type: application/json' -d '{+ "input_form": "ternary",+ "items": [+ {"case_id": "blk-001", "image": "data:image/png;base64,<base64>",+ "ocr_text": "the OCR text to be scored", "category": "text"},+ {"case_id": "blk-002", "image": "data:image/png;base64,<base64>",+ "ocr_text": "\\frac{1}{2}", "category": "formula"}+ ]+}'+```++Optional fields:++- `items[].render_image`: bring your own render image and skip server-side rendering+- `threshold`: optional, at the top level; overrides the default of 0.5 and affects only `throughput_rate` in the summary, never any single `prob_yes`++```json+{+ "results": [+ {"case_id": "blk-001", "category": "text", "verdict": "scored",+ "prob_yes": 0.99509, "prob_no": 0.00491, "detail": ""},+ {"case_id": "blk-002", "category": "formula", "verdict": "scored",+ "prob_yes": 0.00652, "prob_no": 0.99348, "detail": ""}+ ],+ "summary": {+ "total": 2, "scored": 2, "precheck_reject": 0, "render_error": 0, "forward_error": 0,+ "pass_rate": 1.0, "throughput_rate": 0.5, "threshold_used": 0.5,+ "input_form": "ternary",+ "by_category": {+ "formula": {"total": 1, "scored": 1, …, "mean_prob_yes": 0.00652},+ "text": {"total": 1, "scored": 1, …, "mean_prob_yes": 0.99509}+ }+ }+}+```++**Fields**:++- `results[i]` corresponds one-to-one with `items[i]` in the request+- `prob_yes`: the probability that the candidate matches the original image, 0–1; **read** `verdict` **before using it**+- `prob_no`: `1 - prob_yes`+- `detail`: the reason for a failure; an empty string when `verdict` is `scored`+- `summary.pass_rate`: the scoring success rate, `scored / total`, independent of any threshold+- `summary.throughput_rate`: the share of scored items at or above the threshold (note it is `>=`, not `>`); only items with `verdict=scored` are counted+- `summary.by_category`: the same statistics grouped by `category`++---++## `POST /v1/rm/score_best`++Picks the best of N candidates for one block. Suited to single-block tests and low-frequency calls; use `score_best_batch` when there are many blocks.++```bash+curl -s http://127.0.0.1:8030/v1/rm/score_best -H 'Content-Type: application/json' -d '{+ "input_form": "ternary",+ "image": "data:image/png;base64,<base64>",+ "category": "text",+ "candidates": ["candidate A", "candidate B", "candidate C"]+}'+```++Optional fields:++- `case_id`: the service generates a UUID when it is omitted+- `render_images`: a list of render images the same length as `candidates`; bringing your own skips server-side rendering++```json+{+ "best_index": 1,+ "best_text": "candidate B",+ "scores": [0.00589, 0.99509, 0.01234],+ "verdicts": ["scored", "scored", "scored"],+ "stage_sec": {"render_sec": 0.31, "forward_sec": 0.02, "total_sec": 0.34},+ "batch_size": 3+}+```++**Fields**:++- `best_index` / `best_text`: the argmax among the candidates with `verdict=scored`; when every candidate failed it falls back to index 0, which the caller can detect from `verdicts`+- `scores`: `prob_yes` in input order, 0–1; `0.0` or `-1.0` when scoring failed+- `verdicts`: one-to-one with `scores`. **Take the best score as `scores[best_index]`** — do not compute it any other way+- `stage_sec`: per-stage timings in seconds; rendering is usually the bulk of it+- `batch_size`: how many candidates actually went through the forward pass++---++## `POST /v1/rm/score_best_batch`++Several blocks each pick their own best, in a single HTTP request. **Recommended in production**: both rendering and the forward pass are batched server-side, so the more blocks there are, the lower the amortised cost per block; with few blocks it is equivalent to calling `score_best` per block.++```bash+curl -s http://127.0.0.1:8030/v1/rm/score_best_batch -H 'Content-Type: application/json' -d '{+ "input_form": "ternary",+ "items": [+ {"case_id": "blk-001", "image": "data:image/png;base64,<base64>",+ "category": "text", "candidates": ["text candidate A", "text candidate B"]},+ {"case_id": "blk-002", "image": "data:image/png;base64,<base64>",+ "category": "formula", "candidates": ["\\frac{1}{2}", "1/2"]}+ ]+}'+```++The fields inside `items[]` are the same as a single-block `score_best` request, except that `case_id` is required so the blocks can be told apart. `render_images` is likewise given per block.++```json+{+ "results": [+ {"best_index": 0, "best_text": "text candidate A",+ "scores": [0.97, 0.22], "verdicts": ["scored", "scored"], "stage_sec": {}, "batch_size": 0},+ {"best_index": 1, "best_text": "1/2",+ "scores": [0.31, 0.88], "verdicts": ["scored", "scored"], "stage_sec": {}, "batch_size": 0}+ ],+ "stage_sec": {"render_sec": 0.62, "forward_sec": 0.04, "total_sec": 0.68},+ "batch_size": 4+}+```++**Fields**:++- `results[i]` corresponds one-to-one with `items[i]` in the request; each element is exactly one `score_best` response+- `stage_sec` sits at the top level and covers the whole batch; the **per-block** `stage_sec` is **left empty**, because the wall clock of one batch cannot be split across its blocks without making numbers up+- `batch_size` sits at the top level and counts all the candidates in the batch that went through the forward pass++---++## Limits++- The total number of candidates in one request (`items` count × candidates per block, or the `candidates` count of a single block) is capped by `max_items`, 64 by default; over the limit returns 400+- `category` must match the real type of the block; getting it wrong raises no error but distorts the score+- `input_form` currently supports only `"ternary"`+- The threshold `RM_THRESHOLD` (0.5 by default) affects only the `throughput_rate` summary, never any `prob_yes`++---++## Field reference++| Field | Where it appears | Meaning |+|---|---|---|+| `input_form` | top level of the request | fixed to `"ternary"` |+| `case_id` | `items[]` | the caller's own block identifier, echoed back unchanged |+| `image` | `items[]` | the original block image, as a data URL |+| `ocr_text` | `items[]` (score) | the single text to be scored |+| `candidates` | top level (score_best) / `items[]` (batch) | the array of candidate texts |+| `category` | everywhere | `text` / `formula` / `table` |+| `render_image` | `items[]` (score) | optional, bring your own render image |+| `render_images` | top level (score_best) / `items[]` (batch) | optional, same length as `candidates` |+| `threshold` | top level of the request | optional, overrides the default of 0.5, affects the summary only |+| `verdict` | `results[]` | the scoring status; always read it before using a score |+| `prob_yes` | `results[]` | the match probability, 0–1; `0.0` or `-1.0` when scoring failed |+| `prob_no` | `results[]` | `1 - prob_yes` |+| `best_index` | score_best response | the index chosen by argmax |+| `best_text` | score_best response | the text of the best candidate |+| `scores` | score_best response | the list of `prob_yes` in input order |+| `verdicts` | score_best response | one-to-one with `scores` |+| `stage_sec` | score_best response | per-stage timings in seconds |+| `batch_size` | score_best response | how many candidates actually went through the forward pass |+| `pass_rate` | summary | the scoring success rate, independent of any threshold |+| `throughput_rate` | summary | the share of scored items at or above the threshold |diff --git a/docs/minicpm_ocr_jev_docker_api_zh.md b/docs/minicpm_ocr_jev_docker_api_zh.mdnew file mode 100644index 0000000..e20320f--- /dev/null+++ b/docs/minicpm_ocr_jev_docker_api_zh.md@@ -0,0 +1,228 @@+# Docker 镜像 API++[English](minicpm_ocr_jev_docker_api_en.md)++[← 返回使用教程](./minicpm_ocr_jev_tutorial_zh.md)++本文是 [MiniCPM-OCR Jev 本地部署](./minicpm_ocr_jev_tutorial_zh.md) 的 Docker 镜像接口参考,描述四个端点的请求与响应格式。请求体是扁平的 `input_form + items` 结构,与 [云端 API](./minicpm_ocr_jev_api_zh.md) 的 OpenAI Chat Completions 协议不同,两者不能互换。++## 通用约定++### `input_form`++所有打分端点的请求体顶层都带 `input_form`,目前固定为 `"ternary"`(原图 + 渲染图 + 文本三元输入)。其他值会被 422 拒绝。++### `image` / `render_image` / `render_images`++图片字段都接受 data URL:`data:image/png;base64,<base64>` 或 `data:image/jpeg;base64,<base64>`,前缀 MIME 必须与真实格式一致。++### `category`++块类型,三选一:`"text"` / `"formula"` / `"table"`。**必须与块真实类型一致**——公式块送成 `text` 会按字面 LaTeX 渲染而不是排版成公式,分数失真且不报错。++### `verdict` 与打分失败时的取值++每条结果都带 `verdict` 字段,**用分数前必须先看它**:++| verdict | prob_yes | 含义 |+|---|---|---|+| `scored` | 真实分数 | 正常 |+| `precheck_reject` | `0.0` | 候选被判为不可用(LaTeX 语法坏、结构异常) |+| `render_error` | `0.0` | 渲染失败 |+| `missing_original_image` | `0.0` | 缺原图 |+| `encode_error` | `-1.0` | 输入图片字节有问题 |+| `forward_error` | `-1.0` | 后端报错或尚未就绪 |++两个失败取值是有意分开的:`0.0` 表示"判过了,不合格",`-1.0` 表示"没判出来"。两者都会输掉任何比较、过不了任何阈值。失败原因在 `detail` 字段。++---++## `GET /healthz`++健康检查。返回服务状态、后端模型名、渲染器状态与设置。++```bash+curl -s http://127.0.0.1:8030/healthz | jq+```++```json+{+ "status": "ok",+ "backend": {"url": "http://127.0.0.1:8026", "alive": true,+ "served": ["minicpm-ocr-jev"], "model": "minicpm-ocr-jev"},+ "input_forms": {"supported": ["ternary"], "template_md5": "9aab68e8…"},+ "scorer": {"model": "minicpm-ocr-jev", "backend": "vllm-serve-classify",+ "template_md5": "9aab68e8…"},+ "render": {"enabled": true, "mode": "persistent", "browsers": 2, …},+ "settings": {"threshold": 0.5, "max_items": 64, "forward_concurrency": 4}+}+```++`status` 为 `ok` 表示后端已就绪;`loading` 表示还在加载权重,此时打分会返回 503。`template_md5` 是引擎实际拼出的 prompt 模板指纹,与训练模板不一致时分数不可比。++---++## `POST /v1/rm/score`++多个块各打一分,每块一条候选。适合质量筛查、人工复核分流、直通率统计。++```bash+curl -s http://127.0.0.1:8030/v1/rm/score -H 'Content-Type: application/json' -d '{+ "input_form": "ternary",+ "items": [+ {"case_id": "blk-001", "image": "data:image/png;base64,<base64>",+ "ocr_text": "待评分的 OCR 文本", "category": "text"},+ {"case_id": "blk-002", "image": "data:image/png;base64,<base64>",+ "ocr_text": "\\frac{1}{2}", "category": "formula"}+ ]+}'+```++可选字段:++- `items[].render_image`:自带渲染图,跳过服务端渲染+- `threshold`:顶层可选,覆盖默认 0.5,只影响汇总里的 `throughput_rate`,不影响任何一条的 `prob_yes`++```json+{+ "results": [+ {"case_id": "blk-001", "category": "text", "verdict": "scored",+ "prob_yes": 0.99509, "prob_no": 0.00491, "detail": ""},+ {"case_id": "blk-002", "category": "formula", "verdict": "scored",+ "prob_yes": 0.00652, "prob_no": 0.99348, "detail": ""}+ ],+ "summary": {+ "total": 2, "scored": 2, "precheck_reject": 0, "render_error": 0, "forward_error": 0,+ "pass_rate": 1.0, "throughput_rate": 0.5, "threshold_used": 0.5,+ "input_form": "ternary",+ "by_category": {+ "formula": {"total": 1, "scored": 1, …, "mean_prob_yes": 0.00652},+ "text": {"total": 1, "scored": 1, …, "mean_prob_yes": 0.99509}+ }+ }+}+```++**字段说明**:++- `results[i]` 与请求的 `items[i]` 一一对应+- `prob_yes`:候选与原图一致的概率,0–1;**用前必须先看** `verdict`+- `prob_no`:`1 - prob_yes`+- `detail`:失败原因,`verdict` 为 `scored` 时为空串+- `summary.pass_rate`:打分成功率 = `scored / total`,与阈值无关+- `summary.throughput_rate`:`>=` 阈值的 scored 条目占比(注意是 `>=` 不是 `>`),只统计 `verdict=scored` 的项+- `summary.by_category`:按 `category` 分组的同样统计++---++## `POST /v1/rm/score_best`++一个块的 N 条候选里选最优。适合单块测试、低频调用;块多请用 `score_best_batch`。++```bash+curl -s http://127.0.0.1:8030/v1/rm/score_best -H 'Content-Type: application/json' -d '{+ "input_form": "ternary",+ "image": "data:image/png;base64,<base64>",+ "category": "text",+ "candidates": ["候选 A", "候选 B", "候选 C"]+}'+```++可选字段:++- `case_id`:缺省时服务自动生成 UUID+- `render_images`:与 `candidates` 等长的渲染图列表,自带渲染图跳过服务端渲染++```json+{+ "best_index": 1,+ "best_text": "候选 B",+ "scores": [0.00589, 0.99509, 0.01234],+ "verdicts": ["scored", "scored", "scored"],+ "stage_sec": {"render_sec": 0.31, "forward_sec": 0.02, "total_sec": 0.34},+ "batch_size": 3+}+```++**字段说明**:++- `best_index` / `best_text`:在 `verdict=scored` 的候选中 argmax 选出;全部失败时回退到 index 0,调用方可从 `verdicts` 检测这种情况+- `scores`:按输入顺序的 `prob_yes`,取值 0–1;打分失败时为 `0.0` 或 `-1.0`+- `verdicts`:与 `scores` 一一对应,**最优分取** `scores[best_index]`,不要自己另算+- `stage_sec`:分阶段耗时(秒),渲染通常占大头+- `batch_size`:实际进入前向的候选数++---++## `POST /v1/rm/score_best_batch`++多个块各自选最优,一次 HTTP 完成。**生产场景推荐**:渲染与前向都在服务端合批,块数越多单块均摊成本越低;块少时与逐块调 `score_best` 等价。++```bash+curl -s http://127.0.0.1:8030/v1/rm/score_best_batch -H 'Content-Type: application/json' -d '{+ "input_form": "ternary",+ "items": [+ {"case_id": "blk-001", "image": "data:image/png;base64,<base64>",+ "category": "text", "candidates": ["文本候选 A", "文本候选 B"]},+ {"case_id": "blk-002", "image": "data:image/png;base64,<base64>",+ "category": "formula", "candidates": ["\\frac{1}{2}", "1/2"]}+ ]+}'+```++`items[]` 的字段与 `score_best` 单块请求一致;`case_id` 必填以区分块。`render_images` 同样按块各自提供。++```json+{+ "results": [+ {"best_index": 0, "best_text": "文本候选 A",+ "scores": [0.97, 0.22], "verdicts": ["scored", "scored"], "stage_sec": {}, "batch_size": 0},+ {"best_index": 1, "best_text": "1/2",+ "scores": [0.31, 0.88], "verdicts": ["scored", "scored"], "stage_sec": {}, "batch_size": 0}+ ],+ "stage_sec": {"render_sec": 0.62, "forward_sec": 0.04, "total_sec": 0.68},+ "batch_size": 4+}+```++**字段说明**:++- `results[i]` 与请求的 `items[i]` 一一对应,每个元素就是一份 `score_best` 的响应+- `stage_sec` 在顶层,是整批的合计耗时;**单个块的** `stage_sec` **留空**,因为一批的墙钟无法在不编数的情况下分摊到各块+- `batch_size` 在顶层,是整批进入前向的总候选数++---++## 限制++- 单次请求候选总数(`items` 数 × 每块候选数,或单块 `candidates` 数)受 `max_items` 限制,默认 64,超出返回 400+- 服务端 `category` 必须与块真实类型一致;填错不报错但分数失真+- `input_form` 目前只支持 `"ternary"`+- 阈值 `RM_THRESHOLD`(默认 0.5)只影响 `throughput_rate` 汇总,不影响任何 `prob_yes`++---++## 字段速查++| 字段 | 出现位置 | 含义 |+|---|---|---|+| `input_form` | 请求顶层 | 固定 `"ternary"` |+| `case_id` | `items[]` | 调用方自己的块标识,原样回传 |+| `image` | `items[]` | 块原图,data URL |+| `ocr_text` | `items[]`(score) | 待评分的单条文本 |+| `candidates` | 顶层(score_best)/ `items[]`(batch) | 候选文本数组 |+| `category` | 各处 | `text` / `formula` / `table` |+| `render_image` | `items[]`(score) | 可选,自带渲染图 |+| `render_images` | 顶层(score_best)/ `items[]`(batch) | 可选,与 `candidates` 等长 |+| `threshold` | 请求顶层 | 可选,覆盖默认 0.5,只影响汇总 |+| `verdict` | `results[]` | 打分状态,用分数前必查 |+| `prob_yes` | `results[]` | 一致性概率,0–1;打分失败时为 `0.0` 或 `-1.0` |+| `prob_no` | `results[]` | `1 - prob_yes` |+| `best_index` | score_best 响应 | argmax 选出的下标 |+| `best_text` | score_best 响应 | 最优候选原文 |+| `scores` | score_best 响应 | 按输入顺序的 `prob_yes` 列表 |+| `verdicts` | score_best 响应 | 与 `scores` 一一对应 |+| `stage_sec` | score_best 响应 | 分阶段耗时(秒) |+| `batch_size` | score_best 响应 | 实际前向的候选数 |+| `pass_rate` | summary | 打分成功率,与阈值无关 |+| `throughput_rate` | summary | `>=` 阈值的 scored 占比 |diff --git a/docs/minicpm_ocr_jev_en.md b/docs/minicpm_ocr_jev_en.mdnew file mode 100644index 0000000..49be4ba--- /dev/null+++ b/docs/minicpm_ocr_jev_en.md@@ -0,0 +1,113 @@+# MiniCPM-OCR Jev++[中文版](./minicpm_ocr_jev_zh.md)++[← Back to the homepage](../README.md) · [MiniCPM-OCR 1.0](./minicpm_ocr_1dot0_en.md)++MiniCPM-OCR Jev is a **2B OCR quality assessment model** for text, formula, and table regions. It assigns a score between 0 and 1 to existing OCR candidates, helping route results to human review or select the best of several candidates. This page covers the model highlights, architecture, inputs and outputs, and usage; see the [MiniCPM-OCR Jev benchmark table on the homepage](../README.md#jev-benchmark) for the full model comparison.++## Model Highlights++- 🛡️ **Strong performance in a small model**: With only 2B parameters, MiniCPM-OCR Jev achieves an AUROC (×100) of 93.6 on [JevOCRBench](https://huggingface.co/datasets/openbmb/JevOCRBench), **outperforming JEV-35B-A3B (90.1)** and approaching Qwen3.5-397B-A17B (93.8).+- 🧩 **Consistent generalization**: Across parsing results from MiniCPM-OCR 1.0, GLM-OCR, PaddleOCR-VL-1.6, and Xiaomi-OCR-0, its AUROC (×100) ranges from **91.9 to 93.4**.++## Base model and architecture++MiniCPM-OCR Jev is **trained from Qwen3.5-2B**. It retains the architecture of the vision encoder and language backbone, replacing the language model output head `lm_head` with a **binary classification head** to learn whether an OCR candidate is correct.++<!-- The base model and binary classification task are documented in finetune_jev_en.md. The description of the vision encoder and language backbone architecture follows the original model introduction. Retaining the architecture does not mean these parameters are frozen during training; see the fine-tuning guide for training settings. -->++### Inputs and outputs++| Item | Description |+| :--- | :--- |+| Assessment unit | One text, formula, or table region and its candidate OCR result |+| Original region image | The corresponding crop from the document, preserving its visual content |+| Candidate content | OCR text and an image rendered from that text |+| Output | A quality score between 0 and 1; a higher score indicates that the model is more likely to judge the candidate correct |++Internally, the model uses a matched original region image, candidate text, and rendered image. When calling the [cloud API](./minicpm_ocr_jev_api_en.md), the Docker image, or the SDK service with a built-in renderer, provide the original region image, candidate text, and the correct region `category` (`text`, `formula`, or `table`); the service handles rendering. The SDK service without a renderer requires the caller to supply the rendered image. See the [deployment guide](./minicpm_ocr_jev_tutorial_en.md) for request fields and image encoding formats.++## Use cases++### Automatic screening to reduce human review++Score the parsed result for each region and choose a threshold using samples from your application. Results above the threshold proceed automatically; the rest go to human review. A higher threshold typically reduces the number of results that pass automatically, so monitor both the accuracy of automatically accepted results and the volume of human review.++<p align="center"><a href="../assets/minicpm-ocr/review-free-en.png"><img src="../assets/minicpm-ocr/review-free-en.png" alt="Accuracy versus review-free ratio for legal documents, financial receipts, and complex documents at different review-free ratios." width="100%"></a></p>++### Selecting across models to improve parsing quality++Use the same layout segmentation to have several OCR models parse each region. MiniCPM-OCR Jev scores the candidates for the same region, selects the highest-scoring candidate, and combines the selected results in reading order. If all candidates fall below the application threshold, the region can still be sent for human review.++<p align="center"><a href="../assets/minicpm-ocr/multi-models-improvements-en.png"><img src="../assets/minicpm-ocr/multi-models-improvements-en.png" alt="Parsing quality gains from MiniCPM-OCR Jev scoring and selection: Overall gains for MiniCPM-OCR 1.0, Xiaomi OCR, and PaddleOCR-VL 1.6 relative to each parser used alone." width="100%"></a></p>++Candidates for the same region must use the same crop and content boundaries. MiniCPM-OCR Jev selects from existing candidates, so the final quality depends on their coverage and correctness.++## Examples++The figure below compares the original image with candidates 1 and 2, showing how MiniCPM-OCR Jev scores text, formula, and table candidates.++<p align="center"><a href="../assets/minicpm-ocr/jev-case-en.png"><img src="../assets/minicpm-ocr/jev-case-en.png" alt="Three examples for text, formulas, and tables. Each compares the original image with candidates 1 and 2 and shows their MiniCPM-OCR Jev scores." width="100%"></a></p>++## Evaluation++[JevOCRBench](https://huggingface.co/datasets/openbmb/JevOCRBench) evaluates OCR quality assessment at the block level. Each sample contains an original region image, candidate OCR text, and a rendering of that text, with a human-annotated correct/incorrect label. The metric is **AUROC** (reported as AUROC ×100 on this page), which measures the ability to distinguish correct from incorrect candidates; higher is better.++See the [JevOCRBench results table on the homepage](../README.md#jev-benchmark) for the full comparison of Overall, Text, Formula, and Table scores.++### Validated parsers++The cross-parser experiment uses the same **200 samples** randomly drawn from JevOCRBench. Four OCR models parse the samples independently; each result is manually labelled correct or incorrect and then scored by MiniCPM-OCR Jev.++| OCR model | MiniCPM-OCR 1.0 | GLM-OCR | PaddleOCR-VL-1.6 | Xiaomi-OCR-0 |+| :--- | ---: | ---: | ---: | ---: |+| AUROC (×100) | 92.7 | 91.9 | 93.4 | 93.1 |++In this experiment, AUROC (×100) ranges from **91.9 to 93.4**, with a maximum difference of **1.5 points**. These results describe performance on the samples and parser combinations above. Validate separately on your target data when using other parsers or new document types.++<a id="calibration"></a>++## Choosing a review threshold++AUROC measures how well scores distinguish correct from incorrect results; it does not directly determine the accuracy of automatically accepted results. For deployment, choose a threshold using human-labelled samples from your application:++1. Collect samples that cover your actual document types and OCR errors, and label each region's candidate correct or incorrect.+2. Score the candidates with MiniCPM-OCR Jev and measure the **automatic acceptance rate** and **accuracy of accepted results** at several thresholds.+3. Choose a threshold based on the error level your application can tolerate, then verify it on independent samples. Revalidate when the parser or document distribution changes.++To interpret scores as probabilities of correctness, also check whether score ranges match the observed proportion of correct results. The existing AUROC results do not establish a universal default threshold.++## Model weights++See [Model weights on the homepage](../README.md#model-weights) for the official weights. The FlagOS-adapted BF16 versions for multiple chips are listed under [Model downloads](./flagos_deploy_en.md#model-downloads).++## Inference++| Deployment method | Guide |+| :--- | :--- |+| Cloud API | [Single-candidate scoring, best-of-N for one block, and batched best-of-N](./minicpm_ocr_jev_api_en.md) |+| Docker / SDK local deployment | [Environment setup, rendering options, and service startup](./minicpm_ocr_jev_tutorial_en.md) |+| vLLM backend | [Service configuration with and without a built-in renderer](./vllm_deploy_jev_en.md) |+| FlagOS | [Torch-FL deployment guide for multiple chips](./flagos_deploy_en.md) |++When using results from the cloud API, Docker, or a service with a built-in renderer, check `verdict` before using the score. Only `scored` means model scoring completed. Fixed return values for precheck, rendering, or forward-pass failures must not be treated as low model scores.++## Pipeline integration++When placing MiniCPM-OCR Jev after MiniCPM-OCR 1.0 or another parser, organize the data and results as follows:++1. Preserve the page and region identifiers, original region images, region categories, and candidate OCR text while parsing documents.+2. Submit the original image, category, and candidate text through the API or a service with a built-in renderer, which renders and scores the candidate. If rendered images are already available, use a service without a renderer.+3. Check the return status and associate valid scores with their original candidates. Apply your chosen threshold to route results to automatic acceptance or human review; for multiple models, compare candidate scores within each region.+4. Output the selected results in the original reading order and retain regions awaiting review so reviewers can refer back to the source.++Use `score` for single-candidate scoring, `score_best` to select among several candidates for one block, and `score_best_batch` for batched selection across multiple blocks. See the [API documentation](./minicpm_ocr_jev_api_en.md) for request fields, response handling, and Python examples.++## Fine-tuning++To adapt the model to specific document types or parsers, prepare original region images, candidate text, corresponding rendered images, and human correct/incorrect labels, and reserve independent validation data. The [ms-swift fine-tuning guide](./finetune_jev_en.md) covers training and inference environments, the data format, binary classification head configuration, training commands, and JevOCRBench evaluation. A [Chinese version](./finetune_jev_zh.md) is also available.++## License++MiniCPM-OCR Jev model weights, code, and documentation are released under the [Apache License 2.0](../LICENSE).diff --git a/docs/minicpm_ocr_jev_tutorial_en.md b/docs/minicpm_ocr_jev_tutorial_en.mdnew file mode 100644index 0000000..ed5673a--- /dev/null+++ b/docs/minicpm_ocr_jev_tutorial_en.md@@ -0,0 +1,130 @@+# MiniCPM-OCR Jev Local Deployment++[中文版](minicpm_ocr_jev_tutorial_zh.md)++MiniCPM-OCR Jev is used to check whether an OCR parsing result matches the original image: given an image region and the corresponding parsing result, it returns a consistency score between 0 and 1. Use it to **select the best of several candidates**, **flag low-quality parsing results** for human review, or **rank outputs from multiple OCR models**.++To deploy MiniCPM-OCR Jev on a wider range of AI chips, see the [FlagOS multi-chip deployment guide](./flagos_deploy_en.md) for supported platforms, model downloads, and container image usage.++[Hardware requirements](#hardware-requirements) · [Deploy with Docker](#option-1-docker-image) · [Deploy with the SDK](#option-2-sdk-deployment)++---++## Hardware requirements++| Item | Requirement |+|---|---|+| GPU | NVIDIA, ≥12GB VRAM |+| Driver | ≥535 |+| Python | ≥3.10 (SDK deployment only) |+| Disk | about 5–9 GB for the forward environment, about 1.5 GB for the render environment, about 2.5 GB for the weights |++---++## Deployment options++A renderer is shaped by the environment it is installed in: the same text produces different renders under different versions and font dependencies, and **the consistency of the render environment affects the absolute value of the score**. That is why we offer two local deployments, a Docker image and an SDK. Their default usage is the same — you send the original image and the candidate text, and rendering happens inside the service. They differ in the render environment:++The **Docker image** ships pinned versions of Chromium, CJK fonts and the render dependencies. Its renders are identical to those of the cloud API, so the scores can be compared directly against published numbers.++The **SDK deployment** decouples the renderer from the model service, and the model service supports several inference backends, so it fits more environments. Under the SDK, the renderer you install depends on your own environment and will differ slightly from the one in the image: the ranking of scores stays stable, but absolute values may shift a little. If you already have render images, you can skip rendering altogether and talk to the model service directly, which is the lightest setup of all.+++### Option 1: Docker image++Build:++```bash+cd scripts/minicpm-ocr-jev+docker build -f serve/Dockerfile -t minicpm-ocr-jev-1-0:latest .+```++On a slow network you need two mirror arguments; see [`scripts/minicpm-ocr-jev/README.md`](../scripts/minicpm-ocr-jev/README.md).++Run (mount the weights, map the port):++```bash+docker run -d --name minicpm-ocr-jev --gpus '"device=0"' \+ -p 127.0.0.1:8030:8030 \+ -v /path/to/checkpoint:/weights:ro \+ minicpm-ocr-jev-1-0:latest 8030 /weights+```++Health check:++```bash+curl -f http://127.0.0.1:8030/healthz+```++Once the service is ready you can score. A single scoring request looks like this:++```bash+curl -s http://127.0.0.1:8030/v1/rm/score -H 'Content-Type: application/json' -d '{+ "input_form": "ternary",+ "items": [+ {"case_id": "blk-001", "image": "data:image/png;base64,<base64>",+ "ocr_text": "the OCR text to be scored", "category": "text"}+ ]+}'+```++```json+{+ "results": [+ {"case_id": "blk-001", "category": "text", "verdict": "scored",+ "prob_yes": 0.99509, "prob_no": 0.00491, "detail": ""}+ ],+ "summary": {"total": 1, "scored": 1, "pass_rate": 1.0, "throughput_rate": 1.0, …}+}+```++`image` takes a `data:image/png;base64,` or `data:image/jpeg;base64,` prefix followed by the base64 body. `category` must match the real type of the block (`text` / `formula` / `table`); getting it wrong raises no error but skews the score. **Always read** `verdict` **before using a score** — `0.0` and `-1.0` are the fixed values returned when scoring failed, not low scores.++For the other endpoints (`/v1/rm/score_best`, `/v1/rm/score_best_batch`) and the full field definitions, see the [Docker image API reference](./minicpm_ocr_jev_docker_api_en.md). For the directory layout and build details, see [`scripts/minicpm-ocr-jev/README.md`](../scripts/minicpm-ocr-jev/README.md).+++### Option 2: SDK deployment++No Docker: the renderer and the model service are installed separately on the host. There are two deployment shapes, told apart by **who provides the render image**:++- **Score-only deployment**: you already have the rendered images and only want scores. Input is original image + render image + text, output is the score. The host needs no Chromium, Node, or fonts.+- **Render+score deployment**: you only have candidate text and let the service render. Input is original image + text, output is the score. It needs the full render environment, and in exchange you get exactly the same endpoints and field names as the Docker image, along with interfaces such as best-of-N within a block.++Both shapes use the same model and the same scoring code; they differ only in the source of the render image.++#### Inference scoring++Scoring can use several inference engines: [vLLM](./vllm_deploy_jev_en.md), [SGLang](./sglang_deploy_jev_en.md), [llama.cpp](./llamacpp_deploy_jev_en.md), [Ollama](./ollama_deploy_jev_en.md)++#### Requirements++The SDK needs two separately installed virtual environments:++| Environment | What it runs | Version requirements |+| ---- | ---- | ---- |+| Engine environment | the forward pass | depends on the backend; see the corresponding documents above |+| Service environment | the scoring service, plus rendering when the renderer is built in | Python ≥3.10; `Pillow==12.3.0`, `playwright==1.62.0` |++---++## How it works++Scoring one candidate text happens in three stages:++```+ precheck ----> render ----> forward+ (LaTeX validation) (render to image) (vLLM forward pass)+```++**precheck** first checks that the candidate text is well formed (formula blocks get their LaTeX syntax validated); a syntax error is rejected right there. **render** draws the candidate text into an image, so the model can actually "see" its layout rather than only read characters. **forward** sends the original image, the rendered image and the candidate text to the model, which returns the score.++---++## FAQ++| Problem | What to do |+|---|---|+| `category` is wrong | A formula block sent as `text` gets its LaTeX rendered literally; the score is distorted and nothing is reported. It must match the real type of the block |+| The score comes back `0.0` or `-1.0` | Those are not probabilities but the fixed values returned when scoring failed; read `verdict` on the same item for the reason |+| The service will not start, reporting a prompt mismatch | The prompt the engine assembles differs from the one used in training; check it as described under "Startup self-check" in [vllm_deploy_jev_en.md](./vllm_deploy_jev_en.md) |+| Renders drift | A self-installed renderer draws slightly different pixels than the one in the image; the ranking does not change, and the third decimal place is not promised |diff --git a/docs/minicpm_ocr_jev_tutorial_zh.md b/docs/minicpm_ocr_jev_tutorial_zh.mdnew file mode 100644index 0000000..483fd0e--- /dev/null+++ b/docs/minicpm_ocr_jev_tutorial_zh.md@@ -0,0 +1,130 @@+# MiniCPM-OCR Jev 本地部署++[English](minicpm_ocr_jev_tutorial_en.md)++MiniCPM-OCR Jev 用于判断一段 OCR 解析结果与原图是否一致:输入一个图像区域与相应的解析结果,输出一个 0–1 之间的一致性分数。可用于从多条**候选择优**、**筛出低质量解析结果**送人工复核、或对**多个 OCR 模型输出排序**。++如需在更多不同 AI 芯片上部署 MiniCPM-OCR Jev,支持平台、模型下载和镜像用法见 [FlagOS 多芯片部署指南](./flagos_deploy_zh.md)。++[硬件要求](#硬件要求) · [Docker 镜像部署](#方式一docker-镜像) · [SDK 本地部署](#方式二sdk-本地部署)++---++## 硬件要求++| 项目 | 要求 |+|---|---|+| GPU | NVIDIA,显存 ≥12GB |+| 驱动 | ≥535 |+| Python | ≥3.10(仅 SDK 方式需要) |+| 磁盘 | 前向环境约 5–9 GB、渲染环境约 1.5 GB、权重约 2.5 GB |++---++## 部署方式++渲染器受安装环境影响,同样的文字内容,不同环境版本以及字体依赖的渲染器会得到不同的渲染图,**渲染环境的一致性影响分数的绝对值**。因此我们提供了Docker镜像和SDK两种本地部署方式。两种方式的默认用法一样:送原图与候选文本,渲染在服务内自动完成。区别在渲染环境:++**Docker 镜像**内置固定版本的 Chromium、CJK 字体与渲染依赖,渲染结果与云端 API 完全一致,分数可以直接与发布数字对照。++**SDK 本地部署**把渲染器与模型服务解耦,模型服务支持多种推理后端,适配不同环境。SDK模式下,渲染器安装受具体环境影响,与镜像的渲染环境会有细微差异,分数的排序保持稳定,但绝对值可能略有偏差。如果你手边已经有渲染图,也可以跳过渲染环节,直接走模型服务,依赖最轻。+++### 方式一:Docker 镜像++构建:++```bash+cd scripts/minicpm-ocr-jev+docker build -f serve/Dockerfile -t minicpm-ocr-jev-1-0:latest .+```++慢网下需要加两个镜像源参数,详见 [`scripts/minicpm-ocr-jev/README.md`](../scripts/minicpm-ocr-jev/README.md)。++运行(挂载权重、映射端口):++```bash+docker run -d --name minicpm-ocr-jev --gpus '"device=0"' \+ -p 127.0.0.1:8030:8030 \+ -v /path/to/checkpoint:/weights:ro \+ minicpm-ocr-jev-1-0:latest 8030 /weights+```++健康检查:++```bash+curl -f http://127.0.0.1:8030/healthz+```++服务就绪后即可打分。以单次评分为例:++```bash+curl -s http://127.0.0.1:8030/v1/rm/score -H 'Content-Type: application/json' -d '{+ "input_form": "ternary",+ "items": [+ {"case_id": "blk-001", "image": "data:image/png;base64,<base64>",+ "ocr_text": "待评分的 OCR 文本", "category": "text"}+ ]+}'+```++```json+{+ "results": [+ {"case_id": "blk-001", "category": "text", "verdict": "scored",+ "prob_yes": 0.99509, "prob_no": 0.00491, "detail": ""}+ ],+ "summary": {"total": 1, "scored": 1, "pass_rate": 1.0, "throughput_rate": 1.0, …}+}+```++`image` 传 `data:image/png;base64,` 或 `data:image/jpeg;base64,` 前缀加 base64 正文。`category` 必须与块真实类型一致(`text` / `formula` / `table`),填错不报错但分数会偏。**用分数前必须先看** `verdict`——`0.0` 与 `-1.0` 是打分失败时的固定返回值,不是低分。++更多端点(`/v1/rm/score_best`、`/v1/rm/score_best_batch`)与完整字段定义见 [Docker 镜像 API 参考](./minicpm_ocr_jev_docker_api_zh.md)。目录结构与构建细节见 [`scripts/minicpm-ocr-jev/README.md`](../scripts/minicpm-ocr-jev/README.md)。+++### 方式二:SDK 本地部署++不需要 Docker,渲染器与模型服务分开安装在主机上。按**渲染图由谁提供**分两种部署形态:++- **不带渲染器部署**:已经有渲染好的图,只要分数。输入原图 + 渲染图 + 文本,输出分数。主机上不需要 Chromium、Node 和字体。+- **内置渲染器部署**:只有候选文本,渲染交给服务。输入原图 + 文本,输出分数。要装完整渲染环境,换来的是与 Docker 镜像完全一致的端点和字段名,以及块内选优这类接口。++两种形态用的是同一个模型、同一套打分代码,区别只在于渲染图来源。++#### 推理打分++支持多种推理引擎进行打分:[vLLM](./vllm_deploy_jev_zh.md),[SGLang](./sglang_deploy_jev_zh.md),[llama.cpp](./llamacpp_deploy_jev_zh.md),[Ollama](./ollama_deploy_jev_zh.md)++#### 环境要求++SDK 要两个独立安装的虚拟环境:++| 环境 | 跑什么 | 版本要求 |+| ---- | --------------- | -------------------------------------------------- |+| 引擎环境 | 前向推理 | 随后端而定,见上述对应文档 |+| 服务环境 | 打分服务;用内置渲染器时含渲染 | Python ≥3.10;`Pillow==12.3.0`、`playwright==1.62.0` |++---++## 工作方式++对一条候选文本打分分三个阶段:++```+ precheck ----> render ----> forward+(LaTeX 语法校验) (渲染成图片) (vLLM 前向打分)+```++**precheck** 先检查候选文本的合法性(公式类块会校验 LaTeX 语法),语法错误时会直接判定错误。**render** 把候选文本渲染成图片,让模型能直接"看到"它的排版效果,而不只是读字符。**forward** 把原图、渲染图、候选文本一起送进模型,输出分数。++---++## 常见问题++| 问题 | 处理方式 |+|---|---|+| `category` 填错 | 公式块送成 `text` 会按字面 LaTeX 渲染,分数失真且不报错;必须与块真实类型一致 |+| 分数返回 `0.0` 或 `-1.0` | 那不是概率,是打分失败时的固定返回值;读同一项的 `verdict` 看原因 |+| 服务起不来、提示 prompt 不匹配 | 引擎拼出的 prompt 与训练时不一致;按 [vllm_deploy_jev_zh.md](./vllm_deploy_jev_zh.md) 的"启动自检"查 |+| 渲染图漂移 | 自装渲染器与镜像渲染器画出的像素略有差异;排序不变,小数点后第三位不作承诺 |diff --git a/docs/minicpm_ocr_jev_zh.md b/docs/minicpm_ocr_jev_zh.mdnew file mode 100644index 0000000..a47ffcc--- /dev/null+++ b/docs/minicpm_ocr_jev_zh.md@@ -0,0 +1,113 @@+# MiniCPM-OCR Jev++[English](./minicpm_ocr_jev_en.md)++[← 返回首页](../README_zh.md) · [MiniCPM-OCR 1.0](./minicpm_ocr_1dot0_zh.md)++MiniCPM-OCR Jev 是面向文本、公式和表格区域的 **2B OCR 质量判别模型**。它对已有 OCR 候选结果给出 0–1 评分,可用于安排人工复核或从多个候选结果中择优。本页介绍模型亮点、模型结构、输入输出和具体用法;完整模型对比见 [首页 MiniCPM-OCR Jev 评测表](../README_zh.md#jev-benchmark)。++## 模型亮点++- 🛡️ **以小胜大**:仅 2B 参数,在 [JevOCRBench](https://huggingface.co/datasets/openbmb/JevOCRBench) 上决策精度 AUROC(×100)达到 93.6,**反超 JEV-35B-A3B(90.1)**,接近 Qwen3.5-397B-A17B(93.8)。+- 🧩 **稳定泛化**:在 MiniCPM-OCR 1.0、GLM-OCR、PaddleOCR-VL-1.6 和 Xiaomi-OCR-0 的解析结果上,AUROC(×100)为 **91.9–93.4**。++## 模型基座与结构++MiniCPM-OCR Jev **基于 Qwen3.5-2B 训练**,保留其视觉编码器和语言骨干的架构,将语言模型输出头 `lm_head` 替换为**二分类头**,学习判断 OCR 候选结果是否正确。++<!-- 基座与二分类任务据 finetune_jev_zh.md;视觉编码器和语言骨干架构的说明沿用原模型介绍。“保留架构”不意味着训练时冻结这些参数,训练设置以相应教程为准。 -->++### 输入与输出++| 项目 | 内容 |+| :--- | :--- |+| 判别单位 | 一个文本、公式或表格区域及其候选 OCR 结果 |+| 区域原图 | 从文档中裁切的对应区域,保留其视觉内容 |+| 候选内容 | OCR 识别文本,以及由该文本生成的渲染图 |+| 输出 | 0–1 质量评分,分数越高表示模型越倾向于判为正确 |++模型内部使用一一对应的区域原图、候选文本和渲染图。调用 [云端 API](./minicpm_ocr_jev_api_zh.md)、Docker 镜像或内置渲染器的 SDK 服务时,只需提供区域原图、候选文本和正确的区域类别 `category`(`text`、`formula` 或 `table`),渲染由服务完成;不带渲染器的 SDK 服务则需要调用方提供渲染图。请求字段与图像编码格式见对应的 [部署教程](./minicpm_ocr_jev_tutorial_zh.md)。++## 使用场景++### 自动筛选,减少人工复核++对每个区域的解析结果评分,根据业务样本选择阈值:高于阈值的结果自动进入后续流程,其他结果交由人工复核。提高阈值通常会减少自动通过的数量,需同时关注自动通过结果的准确率和人工复核量。++<p align="center"><a href="../assets/minicpm-ocr/review-free-zh.png"><img src="../assets/minicpm-ocr/review-free-zh.png" alt="免检准确率与免检比例曲线:法律文书、财务票据和复杂文档在不同免检比例下的准确率。" width="100%"></a></p>++### 多模型择优,提升解析质量++基于同一份版面分割结果,让多个 OCR 模型分别解析各区域。MiniCPM-OCR Jev 对同一区域的候选结果评分,选择得分最高的候选,再按阅读顺序组合输出。若所有候选均低于业务阈值,该区域仍可进入人工复核流程。++<p align="center"><a href="../assets/minicpm-ocr/multi-models-improvements-zh.png"><img src="../assets/minicpm-ocr/multi-models-improvements-zh.png" alt="MiniCPM-OCR Jev 评分筛选带来的解析质量提升:MiniCPM-OCR 1.0、Xiaomi OCR 与 PaddleOCR-VL 1.6 相对各自单独解析的 Overall 增益。" width="100%"></a></p>++同一区域的候选需要使用一致的裁片和内容范围。MiniCPM-OCR Jev 从已有候选中择优,最终质量取决于候选结果的覆盖与正确性。++## 示例++下图对照原图、候选结果 1 和候选结果 2,展示 MiniCPM-OCR Jev 对文本、公式和表格候选结果的打分。++<p align="center"><a href="../assets/minicpm-ocr/jev-case-zh.png"><img src="../assets/minicpm-ocr/jev-case-zh.png" alt="文本、公式、表格三组示例:每组为原图、候选结果 1 与候选结果 2,并标出 MiniCPM-OCR Jev 分数。" width="100%"></a></p>++## 评测++[JevOCRBench](https://huggingface.co/datasets/openbmb/JevOCRBench) 面向 OCR 的块级质量判别,每条样本包括区域原图、OCR 候选文本及其渲染图,真值为人工标注的正确/错误。评测使用 **AUROC**(本文按 AUROC ×100 展示),衡量模型区分正确与错误候选的能力,分数越高越好。++整体、文本、公式与表格的完整模型对比统一见 [首页 JevOCRBench 实验表格](../README_zh.md#jev-benchmark)。++### 已验证的解析器++跨 OCR 模型实验使用从 JevOCRBench 随机抽取的同一批 **200 个样本**,由四种模型分别解析,逐条人工标注正误后,再由 MiniCPM-OCR Jev 评分。++| OCR 模型 | MiniCPM-OCR 1.0 | GLM-OCR | PaddleOCR-VL-1.6 | Xiaomi-OCR-0 |+| :--- | ---: | ---: | ---: | ---: |+| AUROC(×100) | 92.7 | 91.9 | 93.4 | 93.1 |++这组实验中,AUROC(×100)为 **91.9–93.4**,最大差值为 **1.5 分**。结果反映上述样本和解析器组合上的判别表现;接入其他解析器或新的文档类型时,应使用目标数据另行验证。++<a id="校准"></a>++## 选择复核阈值++AUROC 衡量分数对正确和错误结果的区分能力,不能直接给出自动通过后的准确率。部署时应在有人工标签的业务样本上选择阈值:++1. 收集包含实际文档类型和 OCR 错误的样本,为每个区域候选标注正误。+2. 用 MiniCPM-OCR Jev 评分,对多个阈值分别统计**自动通过比例**与**通过结果准确率**。+3. 按业务可接受的错误水平选择阈值,并在独立样本上复查效果;解析器或文档分布改变后重新验证。++若要把分数解释为正确概率,还需检查分数区间与实际正确比例是否一致。现有 AUROC 结果不足以确定通用的默认阈值。++## 模型权重++正式权重入口统一见 [首页模型权重](../README_zh.md#model-weights);FlagOS 适配的 BF16 多芯片版本见 [下载列表](./flagos_deploy_zh.md#model-downloads)。++## 推理++| 接入方式 | 使用说明 |+| :--- | :--- |+| 云端 API | [单候选打分、单块选优与批量选优](./minicpm_ocr_jev_api_zh.md) |+| Docker / SDK 本地部署 | [环境准备、渲染方式与服务启动](./minicpm_ocr_jev_tutorial_zh.md) |+| vLLM 后端 | [不带渲染器与内置渲染器的服务配置](./vllm_deploy_jev_zh.md) |+| FlagOS | [Torch-FL 多芯片部署指南](./flagos_deploy_zh.md) |++使用云端 API、Docker 或内置渲染器服务的返回结果时,先检查 `verdict` 再使用评分;只有 `scored` 表示完成模型打分,预检失败、渲染失败或前向失败时的固定返回值不能直接当作模型低分。++## 流水线接入++接在 MiniCPM-OCR 1.0 或其他解析器后时,可按以下顺序组织数据与结果:++1. 解析文档时保留页面和区域标识、区域原图、区域类别及 OCR 候选文本。+2. 通过 API 或内置渲染器服务提交原图、类别和候选文本,由服务渲染并评分;已有渲染图时也可使用不带渲染器的服务。+3. 检查返回状态并将有效评分与原候选关联,按所选阈值分配自动通过或人工复核;多模型场景按区域比较候选分数。+4. 按原阅读顺序输出选定结果,并保留待复核区域,便于回看原文。++单候选打分使用 `score`,单块多候选选优使用 `score_best`,多块批量选优使用 `score_best_batch`。请求字段、响应读取和 Python 示例见 [API 文档](./minicpm_ocr_jev_api_zh.md)。++## 二次微调++面向特定文档类型或解析器适配时,可准备区域原图、候选文本、对应渲染图和人工正误标签,并留出独立验证数据。[ms-swift 微调教程](./finetune_jev_zh.md) 提供训练与推理环境、数据格式、二分类头配置、训练命令和 JevOCRBench 评测流程;英文说明见 [Fine-tuning](./finetune_jev_en.md)。++## 许可++MiniCPM-OCR Jev 的模型权重、代码与文档均采用 [Apache License 2.0](../LICENSE) 开源。diff --git a/docs/minicpmvocr_api.md b/docs/minicpmvocr_api.mdnew file mode 100644index 0000000..3d1cc6d--- /dev/null+++ b/docs/minicpmvocr_api.md@@ -0,0 +1,94 @@+# SDK API 与配置说明++[← 返回 README](../README_zh.md) · [安装与推理教程](./minicpmvocr_tutorial.md) · [English](./minicpmvocr_api_en.md)++本文介绍 `minicpmvocr` 的命令行参数、配置覆盖方式和 Python API。运行前需安装 SDK,并启动兼容的识别服务。++## 命令行参数++解析一个 PDF 或图片,输出 Markdown:++```bash+minicpmvocr parse doc.pdf -o doc.md --device cuda:0 \+ --server-url http://127.0.0.1:18499 --model minicpm-ocr+```++| 参数 | 说明 |+|---|---|+| `INPUT` / `--input FILE` | 输入文件,支持 PDF、PNG、JPG、JPEG、BMP、WebP、TIF、TIFF;两种写法任选其一 |+| `-o FILE` / `--output FILE` | 输出 Markdown 路径;省略时输出到标准输出 |+| `--server-url URL` | 必填,识别服务地址;可重复传入以连接多个服务实例 |+| `--model NAME` | 必填,服务暴露的模型名称,对应 vLLM 的 `--served-model-name` |+| `--device DEVICE` | 版面检测设备,例如 `cuda:0`;不改变识别服务使用的设备 |+| `--layout-model DIR` | 已准备好的本地版面模型目录;默认 provider 使用 PP-DocLayoutV3 Paddle inference 格式 |+| `--workers N` | 识别请求的总并发数,快速开始配置为 32;一个请求通常对应一个文档块 |+| `--backend NAME` | 识别后端,支持 `vllm`、`openai`、`llamacpp`、`ollama` |+| `--layout NAME` | 版面 provider,支持 `ppdoclayout3_paddlex`、`ppdoclayout3_torch`、`ppdoclayout3_server` |+| `--config FILE` | 自定义 YAML 配置文件;省略时使用内置快速开始配置 |+| `--set KEY=VALUE` | 按点分路径覆盖配置项,可重复传入,例如 `--set input.limit=1` |+| `--stdout` | 将 Markdown 输出到标准输出,即使同时传入了 `-o` |+| `--run-tag NAME` | 指定中间产物目录名;未指定时根据输入文件名和时间生成 |++`--server-url` 和 `--model` 必须在每次 `parse` 命令中显式传入,即使使用了 `--config` 或设置了环境变量。++完整参数可通过 `minicpmvocr parse --help` 查看。++## 配置覆盖与默认行为++指定 `--config` 时,先读取所选配置文件,再应用命令行选项;`--set` 的优先级高于其他命令行选项。完整配置项见 [SDK 配置文件](../sdk/minicpmvocr/configs/minicpmvocr.yaml)。++省略 `--config` 时,快速开始配置使用 GPU 0 进行版面检测,识别上下文长度为 40960,识别请求并发数为 32,版面检测与识别重叠执行,关闭跨页表格合并。服务地址和模型名称没有默认值。++默认 Paddle 版面模型位于运行目录下的 `models/PP-DocLayoutV3_infer/`。文件完整时直接复用;缺失或不完整时自动下载。`OCR_ASSETS_DIR` 可更改模型所在的资产根目录。++使用 `--layout-model DIR`、`OCR_LAYOUT_MODEL_DIR` 或自定义配置文件指定模型路径时,需提前准备本地模型。自定义 YAML 中的相对路径以配置文件所在目录为基准;`--layout-model` 的相对路径以运行命令时的目录为基准。++多个识别服务实例应使用相同的模型名称和权重。`--workers` 是这些实例共享的请求并发总数。++## Python API++下面使用包内配置解析整个 PDF,并将各页合并导出为一个 Markdown 文件。服务地址和模型名称仍需显式提供:++```python+from importlib.resources import files+from pathlib import Path++from minicpmvocr import (+ assemble_document_markdown,+ load_config,+ load_prompt_map,+ pipelined_run,+)+from minicpmvocr.layouts.download import ensure_layout_model++def main():+ layout_model = ensure_layout_model(Path("models/PP-DocLayoutV3_infer"))+ config_path = files("minicpmvocr").joinpath("configs/minicpmvocr.yaml")+ cfg = load_config(str(config_path), overrides={+ "input": {"file_path": str(Path("doc.pdf").resolve())},+ "engine": {+ "server_url": "http://127.0.0.1:18499",+ "model_name": "minicpm-ocr",+ "max_model_len": 40960,+ },+ "layout": {"model_dir": str(layout_model), "device": "cuda:0"},+ "pipeline": {"overlap_layout": True},+ })++ pipelined_run(cfg)+ markdown, page_count, merge_count = assemble_document_markdown(+ Path(cfg["_meta"]["run_dir"]),+ load_prompt_map(cfg),+ merge_tables=cfg["pipeline"]["merge_cross_page_tables"],+ delimiter="\n\n<!-- page-break -->\n\n",+ )+ Path("doc.md").write_text(markdown, encoding="utf-8")+++if __name__ == "__main__":+ main()+```++`ensure_layout_model()` 复用或下载官方版面模型;`load_config()` 合并配置并校验输入;`pipelined_run()` 执行版面检测和识别;`assemble_document_markdown()` 返回合并后的 Markdown、页数和跨页表格合并次数。++运行产物默认写入当前目录下的 `runs/<run_tag>/`,包括逐页 Markdown、结构化结果和运行记录。可通过配置项 `run.run_root` 或环境变量 `OCR_RUN_ROOT` 更改输出根目录。diff --git a/docs/minicpmvocr_api_en.md b/docs/minicpmvocr_api_en.mdnew file mode 100644index 0000000..7e11f45--- /dev/null+++ b/docs/minicpmvocr_api_en.md@@ -0,0 +1,94 @@+# SDK API and Configuration++[← Back to README](../README.md) · [Installation and inference tutorial](./minicpmvocr_tutorial_en.md) · [中文](./minicpmvocr_api.md)++This guide covers `minicpmvocr` command-line options, configuration overrides, and the Python API. Install the SDK and start a compatible recognition service before running the examples.++## Command-line options++Parse a PDF or image into Markdown:++```bash+minicpmvocr parse doc.pdf -o doc.md --device cuda:0 \+ --server-url http://127.0.0.1:18499 --model minicpm-ocr+```++| Option | Description |+|---|---|+| `INPUT` / `--input FILE` | Input file: PDF, PNG, JPG, JPEG, BMP, WebP, TIF, or TIFF; use either form |+| `-o FILE` / `--output FILE` | Output Markdown path; writes to standard output when omitted |+| `--server-url URL` | Required recognition service URL; repeat to connect to multiple service instances |+| `--model NAME` | Required model name exposed by the service, matching vLLM's `--served-model-name` |+| `--device DEVICE` | Layout detection device, such as `cuda:0`; does not change the device used by the recognition service |+| `--layout-model DIR` | Local layout model directory you have already prepared; the default provider uses the PP-DocLayoutV3 Paddle inference format |+| `--workers N` | Total concurrent recognition requests; the quickstart uses 32. Each request usually handles one document chunk |+| `--backend NAME` | Recognition backend: `vllm`, `openai`, `llamacpp`, or `ollama` |+| `--layout NAME` | Layout provider: `ppdoclayout3_paddlex`, `ppdoclayout3_torch`, or `ppdoclayout3_server` |+| `--config FILE` | Custom YAML configuration file; uses the built-in quickstart configuration when omitted |+| `--set KEY=VALUE` | Override a configuration value using a dotted path; repeat as needed, for example `--set input.limit=1` |+| `--stdout` | Print Markdown to standard output even when `-o` is supplied |+| `--run-tag NAME` | Name of the intermediate output directory; generated from the input filename and time when omitted |++Pass `--server-url` and `--model` explicitly on every `parse` invocation, even when using `--config` or environment variables.++Run `minicpmvocr parse --help` for the complete option list.++## Configuration overrides and defaults++When `--config` is supplied, the selected configuration file is loaded first, then command-line options are applied. `--set` takes precedence over other command-line options. See the [SDK configuration file](../sdk/minicpmvocr/configs/minicpmvocr.yaml) for all configuration fields.++Without `--config`, the quickstart configuration uses GPU 0 for layout detection, a recognition context length of 40960, and 32 concurrent recognition requests. Layout detection and recognition overlap, and cross-page table merging is disabled. The service URL and model name have no default values.++The default Paddle layout model is stored in `models/PP-DocLayoutV3_infer/` under the working directory. Complete model files are reused; missing or incomplete files trigger an automatic download. Set `OCR_ASSETS_DIR` to change the root directory for model assets.++When specifying a model path through `--layout-model DIR`, `OCR_LAYOUT_MODEL_DIR`, or a custom configuration file, prepare the local model first. Relative paths in a custom YAML file are resolved against that file's directory; relative `--layout-model` paths are resolved against the directory where the command is run.++Multiple recognition service instances should use the same model name and weights. `--workers` sets the total request concurrency shared by all instances.++## Python API++This example uses the bundled configuration to parse an entire PDF and combine its pages into one Markdown file. Supply the service URL and model name explicitly:++```python+from importlib.resources import files+from pathlib import Path++from minicpmvocr import (+ assemble_document_markdown,+ load_config,+ load_prompt_map,+ pipelined_run,+)+from minicpmvocr.layouts.download import ensure_layout_model++def main():+ layout_model = ensure_layout_model(Path("models/PP-DocLayoutV3_infer"))+ config_path = files("minicpmvocr").joinpath("configs/minicpmvocr.yaml")+ cfg = load_config(str(config_path), overrides={+ "input": {"file_path": str(Path("doc.pdf").resolve())},+ "engine": {+ "server_url": "http://127.0.0.1:18499",+ "model_name": "minicpm-ocr",+ "max_model_len": 40960,+ },+ "layout": {"model_dir": str(layout_model), "device": "cuda:0"},+ "pipeline": {"overlap_layout": True},+ })++ pipelined_run(cfg)+ markdown, page_count, merge_count = assemble_document_markdown(+ Path(cfg["_meta"]["run_dir"]),+ load_prompt_map(cfg),+ merge_tables=cfg["pipeline"]["merge_cross_page_tables"],+ delimiter="\n\n<!-- page-break -->\n\n",+ )+ Path("doc.md").write_text(markdown, encoding="utf-8")+++if __name__ == "__main__":+ main()+```++`ensure_layout_model()` reuses or downloads the official layout model; `load_config()` merges the configuration and validates the input; `pipelined_run()` runs layout detection and recognition; `assemble_document_markdown()` returns the combined Markdown, page count, and number of cross-page table merges.++Run artifacts are written to `runs/<run_tag>/` under the working directory by default, including per-page Markdown, structured results, and run records. Change the output root with `run.run_root` in the configuration or the `OCR_RUN_ROOT` environment variable.diff --git a/docs/minicpmvocr_tutorial.md b/docs/minicpmvocr_tutorial.mdnew file mode 100644index 0000000..08cd47a--- /dev/null+++ b/docs/minicpmvocr_tutorial.md@@ -0,0 +1,126 @@+# MiniCPM-OCR 安装与推理++[English](./minicpmvocr_tutorial_en.md)++MiniCPM-OCR 是一个文档解析模型:输入 PDF 或图片,输出 Markdown,包括正文、表格(HTML)、公式(LaTeX)和阅读顺序。++运行时分为两部分:SDK 负责版面检测、切块和结果拼接;推理服务(本文使用 vLLM)运行识别模型,并通过 DSpark 投机解码加速,需同时准备主模型和同版本的草稿模型。两者使用独立的 Python 环境,分别在两个终端中运行。++---++## 环境要求++| 项目 | 要求 |+|---|---|+| 系统 | Linux x86_64(vLLM 源码编译要求);下文命令以 Ubuntu 22.04 为例 |+| GPU | NVIDIA GPU;本文命令已在 RTX 5090(32 GB)上验证 |+| NVIDIA 驱动 | ≥ 580(CUDA 13);旧驱动见 [FAQ](./faq_zh.md#cuda-driver-version-is-insufficient) |+| Python | 3.12,由 uv 自动下载,无需预装 |+| 磁盘 | 至少预留 40 GB:GPU 版 SDK 环境约 9 GB(CPU 版不到 1 GB),vLLM 环境约 8 GB,vLLM 源码与编译产物约 6 GB,模型约 3 GB,其余为下载和编译缓存 |++---+## 安装++### 1. SDK 环境配置+先创建虚拟环境,再安装 SDK 和 PaddlePaddle GPU 环境。++```bash+pip install uv+uv venv .minicpm-ocr --python 3.12 --seed+source .minicpm-ocr/bin/activate++python -m pip install "minicpm-ocr[all]==1.0.0"+python -m pip install "paddlepaddle-gpu==3.3.0" \+ -i https://www.paddlepaddle.org.cn/packages/stable/cu129/+```+++### 2. 推理服务环境配置++推理服务任选其一,本文使用 vLLM;SGLang 和 llama.cpp 见 [SGLang 部署指南](./sglang_deploy.md)、[llama.cpp 部署指南](./llamacpp_deploy.md)(英文)。+++> **旧驱动**:驱动低于 580 时,先按 [FAQ](./faq_zh.md#cuda-driver-version-is-insufficient) 配置适用于所用 GPU 的 CUDA 兼容库。安装和启动 vLLM、运行 GPU 版 SDK 的终端都需要设置相应的环境变量。++```bash+apt-get update+apt-get install -y software-properties-common+apt-get update+add-apt-repository -y ppa:ubuntu-toolchain-r/test+apt-get install -y gcc-13 g++-13 libdw-dev libelf-dev++bash scripts/install.sh vllm+```++> 脚本会下载固定版本的 vLLM 和 Transformers 源码并编译,环境位于 `.venv-vllm`。编译默认使用 8 个进程,CPU 和内存充足时可用 `MAX_JOBS=32 bash scripts/install.sh vllm` 加速(96 核机器上整个安装约 40 分钟)。++### 3. 启动服务++新开一个终端,在仓库根目录启动 vLLM 服务(默认开启 DSpark 加速)。++> **旧驱动**:在这个新终端中也需要先按 [FAQ](./faq_zh.md#cuda-driver-version-is-insufficient) 设置 CUDA 兼容库环境变量。++```bash+source .venv-vllm/bin/activate+export CC=gcc-13 CXX=g++-13+export CUDA_HOME="$(python -c \+ 'import sysconfig; print(sysconfig.get_path("purelib") + "/nvidia/cu13")')"+export PATH="$CUDA_HOME/bin:$PATH"++vllm serve openbmb/MiniCPM-OCR-1.0 \+ --served-model-name minicpm-ocr \+ --host 127.0.0.1 \+ --port 18499 \+ --max-model-len 40960 \+ --max-num-batched-tokens 40960 \+ --max-num-seqs 32 \+ --limit-mm-per-prompt '{"image":36,"video":0}' \+ --attention-backend FLASH_ATTN \+ --mm-encoder-attn-backend FLASH_ATTN \+ --mm-processor-kwargs '{"downsample_mode":"4x"}' \+ --gpu-memory-utilization 0.85 \+ --trust-request-mm-kwargs \+ --speculative-config '{+ "method": "dspark",+ "model": "openbmb/MiniCPM-OCR-1.0-DSpark",+ "num_speculative_tokens": 15,+ "enable_adaptive_verification": false+ }' \+ --default-chat-template-kwargs '{"enable_thinking":false}'+```++> `--speculative-config` 开启 DSpark 加速;删除该参数及其完整 JSON 配置即可使用普通解码,此时无需草稿模型。++### 4. 解析文档++从仓库根目录运行下面的命令。SDK 会检查 `models/PP-DocLayoutV3_infer/`:文件完整时直接复用;缺失或不完整时,自动从 [Paddle 官方地址](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-DocLayoutV3_infer.tar)下载版面模型。++**GPU 版面检测:**++```bash+source .minicpm-ocr/bin/activate++minicpmvocr parse \+ --device cuda:0 \+ --server-url http://127.0.0.1:18499 \+ --model minicpm-ocr \+ --input doc.pdf \+ --output doc.md+```++---++更多配置请参见 [SDK API 与配置说明](./minicpmvocr_api.md)。++---+## 常见问题++| 问题 | 处理方式 |+|---|---|+| 第三方源码准备失败 | 按脚本提示检查 GitHub 连接或 `sources/` 中已有目录的版本,再运行 `bash scripts/install.sh vllm` |+| 报不支持 `minicpm_ocr` 架构 | 重新运行 `bash scripts/install.sh vllm`,安装配套的 Transformers 源码 |+| vLLM 编译进程被杀 | 减少 `MAX_JOBS`,确认编译内存充足 |+| 显存不足 | 减小 `--max-model-len`,必要时降低 `--gpu-memory-utilization` |+| SDK 请求失败或一直等待 | 先检查 `/v1/models`;确认服务地址正确,vLLM 启动时带了 `--trust-request-mm-kwargs` |++更多排障见 [FAQ](./faq_zh.md)。diff --git a/docs/minicpmvocr_tutorial_en.md b/docs/minicpmvocr_tutorial_en.mdnew file mode 100644index 0000000..c777bd8--- /dev/null+++ b/docs/minicpmvocr_tutorial_en.md@@ -0,0 +1,122 @@+# MiniCPM-OCR Installation and Inference++[中文](./minicpmvocr_tutorial.md)++MiniCPM-OCR parses PDFs and images into Markdown, including body text, tables (HTML), formulas (LaTeX), and reading order.++The runtime has two parts: the SDK handles layout detection, cropping, and result assembly; the inference service (vLLM in this tutorial) runs the recognition model and accelerates inference through DSpark speculative decoding, which requires both the main model and a draft model from the same release. The two parts use separate Python environments and run in separate terminals.++---+## Requirements++| Item | Requirement |+|---|---|+| OS | Linux x86_64 (required for building vLLM from source); commands below use Ubuntu 22.04 |+| GPU | NVIDIA GPU; these commands have been verified on an RTX 5090 (32 GB) |+| NVIDIA driver | ≥ 580 (CUDA 13); for older drivers, see the [FAQ](./faq_en.md#cuda-driver-version-is-insufficient) |+| Python | 3.12, downloaded automatically by uv; no prior installation required |+| Disk | Reserve at least 40 GB: about 9 GB for the GPU SDK environment (under 1 GB for CPU), 8 GB for the vLLM environment, 6 GB for vLLM source and build artifacts, 3 GB for models, and the rest for download and build caches |++---+## Installation++### 1. Set up the SDK environment++Create a virtual environment, then install the SDK and PaddlePaddle GPU packages.++```bash+pip install uv+uv venv .minicpm-ocr --python 3.12 --seed+source .minicpm-ocr/bin/activate++python -m pip install "minicpm-ocr[all]==1.0.0"+python -m pip install "paddlepaddle-gpu==3.3.0" \+ -i https://www.paddlepaddle.org.cn/packages/stable/cu129/+```++### 2. Set up the inference environment++Choose one inference service. This tutorial uses vLLM; for SGLang and llama.cpp, see the [SGLang deployment guide](./sglang_deploy.md) and [llama.cpp deployment guide](./llamacpp_deploy.md).++> **Older drivers**: For drivers below 580, first configure a CUDA compatibility library suitable for your GPU as described in the [FAQ](./faq_en.md#cuda-driver-version-is-insufficient). Set its environment variables in each terminal used to install or start vLLM, or run the GPU SDK.++```bash+apt-get update+apt-get install -y software-properties-common+apt-get update+add-apt-repository -y ppa:ubuntu-toolchain-r/test+apt-get install -y gcc-13 g++-13 libdw-dev libelf-dev++bash scripts/install.sh vllm+```++> The script downloads pinned versions of the vLLM and Transformers source code and builds vLLM in `.venv-vllm`. Compilation uses 8 processes by default. With sufficient CPU and memory, use `MAX_JOBS=32 bash scripts/install.sh vllm` to speed it up (the full installation takes about 40 minutes on a 96-core machine).++### 3. Start the service++Open a new terminal at the repository root and start vLLM with DSpark acceleration enabled.++> **Older drivers**: Set the CUDA compatibility-library environment variables in this new terminal as described in the [FAQ](./faq_en.md#cuda-driver-version-is-insufficient).++```bash+source .venv-vllm/bin/activate+export CC=gcc-13 CXX=g++-13+export CUDA_HOME="$(python -c \+ 'import sysconfig; print(sysconfig.get_path("purelib") + "/nvidia/cu13")')"+export PATH="$CUDA_HOME/bin:$PATH"++vllm serve openbmb/MiniCPM-OCR-1.0 \+ --served-model-name minicpm-ocr \+ --host 127.0.0.1 \+ --port 18499 \+ --max-model-len 40960 \+ --max-num-batched-tokens 40960 \+ --max-num-seqs 32 \+ --limit-mm-per-prompt '{"image":36,"video":0}' \+ --attention-backend FLASH_ATTN \+ --mm-encoder-attn-backend FLASH_ATTN \+ --mm-processor-kwargs '{"downsample_mode":"4x"}' \+ --gpu-memory-utilization 0.85 \+ --trust-request-mm-kwargs \+ --speculative-config '{+ "method": "dspark",+ "model": "openbmb/MiniCPM-OCR-1.0-DSpark",+ "num_speculative_tokens": 15,+ "enable_adaptive_verification": false+ }' \+ --default-chat-template-kwargs '{"enable_thinking":false}'+```++> `--speculative-config` enables DSpark acceleration. Remove this argument and its entire JSON configuration to use standard decoding without a draft model.++### 4. Parse documents++Run the following command from the repository root. The SDK checks `models/PP-DocLayoutV3_infer/`: it reuses complete model files and automatically downloads the layout model from the [official Paddle URL](https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-DocLayoutV3_infer.tar) if files are missing or incomplete.++**GPU layout detection:**++```bash+source .minicpm-ocr/bin/activate++minicpmvocr parse \+ --device cuda:0 \+ --server-url http://127.0.0.1:18499 \+ --model minicpm-ocr \+ --input doc.pdf \+ --output doc.md+```++For more options, see [SDK API and Configuration](./minicpmvocr_api_en.md).++---+## FAQ++| Issue | Solution |+|---|---|+| Third-party source preparation fails | Follow the script's message to check GitHub access or existing source revisions under `sources/`, then rerun `bash scripts/install.sh vllm` |+| Unsupported `minicpm_ocr` architecture | Rerun `bash scripts/install.sh vllm` to install the matching Transformers source |+| vLLM build processes are killed | Reduce `MAX_JOBS` and check that enough memory is available for compilation |+| Out of GPU memory | Reduce `--max-model-len` and, if necessary, `--gpu-memory-utilization` |+| SDK requests fail or keep waiting | Check `/v1/models` first, verify the service URL, and keep `--trust-request-mm-kwargs` in the vLLM startup command |++For more troubleshooting, see the [FAQ](./faq_en.md).diff --git a/docs/model_guide.md b/docs/model_guide.mdnew file mode 100644index 0000000..531c2fa--- /dev/null+++ b/docs/model_guide.md@@ -0,0 +1,12 @@+# MiniCPM-OCR Model Guides++The model documentation is now maintained in the following pages:++- [Project overview, evaluation results, and model weights](../README.md)+- [MiniCPM-OCR 1.0: highlights, architecture, document parsing, KIE, inference, and evaluation](./minicpm_ocr_1dot0_en.md)+- [Key information extraction (KIE): field prompts and JSON output](./minicpm_ocr_1dot0_en.md#kie) · [中文说明](./minicpm_ocr_1dot0_zh.md#kie)+- [MiniCPM-OCR Jev: highlights, architecture, quality scoring, evaluation, and use cases](./minicpm_ocr_jev_en.md)+- [MiniCPM-OCR 1.0 deployment tutorial](./minicpmvocr_tutorial_en.md)+- [MiniCPM-OCR Jev deployment tutorial](./minicpm_ocr_jev_tutorial_en.md)++[中文首页](../README_zh.md)diff --git a/docs/ollama_deploy_jev_en.md b/docs/ollama_deploy_jev_en.mdnew file mode 100644index 0000000..57f7b30--- /dev/null+++ b/docs/ollama_deploy_jev_en.md@@ -0,0 +1,250 @@+# SDK Local Deployment: Ollama Backend++[中文版](ollama_deploy_jev_zh.md)++[← Back to the deployment guide](./minicpm_ocr_jev_tutorial_en.md)++This document covers the SDK deployment path with Ollama as the forward engine: how to install, start, and call the **score service** and the **render+score service**.++Ollama serves MiniCPM-OCR Jev as a decision model. Two things set it apart from the other backends: the model has to be converted to GGUF and registered with Ollama first, and the prompt is assembled by the engine from a template baked into the GGUF rather than by the SDK.++Both services share one forward engine. The only difference is where the render image comes from:++| | Score service | Render+score service |+| ---- | -------------------------------------- | ---------------------------------------------------- |+| Render image | You provide it | The service renders it by default (you may also provide it) |+| Render environment | **Not needed** — no Chromium, Node or fonts | Needed |+| Endpoint | `/v1/score`, returns `prob_1` | `/v1/rm/score*`, returns `prob_yes`, identical to the Docker image |+| Features | Scoring only | Scoring, best-of-N within a block, batched best-of-N, with precheck |+| Start script | `sdk/start_score.sh` | `sdk/start_render_score.sh` |++## Deployment steps++1. Install Ollama → convert to GGUF and register the model → start the forward engine (both services need it)+2. Pick one:+ - **Score service** → install the service environment → start the service+ - **Render+score service** → install the render environment → start the service++The engine and the service must go into two separate virtual environments; do not merge them. All commands below run from `scripts/minicpm-ocr-jev/`.++## Requirements++- **GPU**: NVIDIA, ≥8GB VRAM+- **Driver**: ≥535+- **Python**: ≥3.10+- **Ollama**: latest stable release+- **llama.cpp**: latest stable release (for the GGUF conversion only)+- **Pinned versions**: `Pillow` 12.3.0, `playwright` 1.62.0 (render+score service only)++---++## 1. Forward engine++### Install++```bash+# Linux+curl -fsSL https://ollama.com/install.sh | sh++# macOS+brew install ollama++# Windows+# Download from https://ollama.com/download/windows+```++### Register the model++First convert the weights to GGUF; see [llama.cpp deployment · Convert to GGUF](./llamacpp_deploy_jev_en.md#convert-to-gguf). The resulting GGUF carries the `systemone` chat template and the decision-model marker, which is how Ollama recognises it as a decision model.++Write a `Modelfile`. The first `FROM` is the language model, the second is the vision encoder:++```+FROM ./models/MiniCPM-OCR-Jev-bf16.gguf+FROM ./models/mmproj-MiniCPM-OCR-Jev-bf16.gguf+```++Register it and confirm:++```bash+ollama create ocr-jev -f Modelfile+ollama show ocr-jev # Capabilities: decision, vision+```++The Capabilities line from `ollama show` must list both `decision` and `vision`; either one missing means the GGUF conversion was not right. The model name `ocr-jev` also goes into the SDK's backend config — rename it in both places or not at all.++### Start++```bash+ollama serve # default port 11434+```++Each request is a single forward pass, generates no tokens, and carries exactly two images — the original first, then the render. The bf16 weights take about 4.4GB of VRAM. The model has no LM head, so the text-generation endpoints are unavailable.++---++## 2. Score service++You already have the render image and only want the score.++### Install++```bash+python3 -m venv /opt/venv-score+source /opt/venv-score/bin/activate+pip install "fastapi>=0.110" "uvicorn>=0.27" "httpx>=0.27" "pydantic>=2.6" "PyYAML>=6.0" "Pillow==12.3.0"+```++**Reference dependency versions**++```text+python 3.12.3+fastapi 0.162.0+uvicorn 0.54.0+httpx 0.28.1+pydantic 2.14.1+PyYAML 6.0.3+Pillow 12.3.0+```++### Start++`JEV_BACKEND_CONFIG` points at the Ollama backend config; the arguments are the service port and the engine address, in that order:++```bash+JEV_BACKEND_CONFIG=sdk/backends/ollama.yaml \+PATH=/opt/venv-score/bin:$PATH bash sdk/start_score.sh 18501 http://127.0.0.1:11434+```++The `model` in that config file must match the name used in `ollama create`, because Ollama routes by name. Without `JEV_BACKEND_CONFIG` the service speaks the vLLM protocol, the endpoints do not match, and startup fails.++The service runs a self-check at startup; see [4. Startup self-check](#4-startup-self-check).++### Endpoints++| Method | Path | Purpose |+|---|---|---|+| GET | `/healthz` | Service status, the model the engine actually serves, the prompt template fingerprint and the self-check result |+| POST | `/v1/score` | Score a batch of already rendered candidates |++### Request++```bash+curl -s http://127.0.0.1:18501/v1/score -H 'Content-Type: application/json' -d '{+ "items": [{"original_image": "<base64>", "render_image": "<base64>", "ocr_text": "..."}]+}'+```++```json+{"results": [{"prob_1": 0.00227, "error": null}]}+```++All three fields are required: `original_image` is the base64 of the original block image, `render_image` is the base64 of that candidate rendered back into an image, and `ocr_text` is the candidate text itself. The base64 carries **no** `data:image/png;base64,` prefix, unlike the image API.++### Fields and limits++- `ocr_text` goes to the model as-is; nothing is cleaned up.+- `prob_1` is the probability that the candidate is consistent with the original image — no threshold, no label.+- At most 64 items per request (`JEV_MAX_ITEMS` to change it); over the limit returns 413, an empty batch returns an empty result. The number is a guard against packing too many images into one request, not a recommended batch size.+- When a base64 image cannot be decoded, the whole batch returns 422 naming the item and the field. A failure during scoring affects only that one item: it carries an `error` in its own slot and `prob_1` is `null`.++---++## 3. Render+score service++You only have candidate text and want the service to render before scoring. Precheck, render and forward all happen in this one process.++This service calls the scoring layer in-process: it does **not** need a separate score service running, and does not need a port reserved for one.++### Install++```bash+bash sdk/setup_render.sh /opt/venv-render+```++It installs Node, CJK fonts, Chromium and the service dependencies. On a slow network, point it at two mirrors:++```bash+PIP_INDEX_URL=https://<mirror>/simple \+PLAYWRIGHT_DOWNLOAD_HOST=https://<mirror>/playwright \+ bash sdk/setup_render.sh /opt/venv-render+```++### Start++The arguments are the service port and the engine address, in that order:++```bash+JEV_BACKEND_CONFIG=sdk/backends/ollama.yaml \+PATH=/opt/venv-render/bin:$PATH bash sdk/start_render_score.sh 18500 http://127.0.0.1:11434+```++It must be started with the `/opt/venv-render` interpreter, because it renders in its own process. The number of render processes is set by `RM_RENDER_BROWSERS`; the service runs a single worker, so raise that variable rather than adding workers when you need more throughput.++### Endpoints++Paths and field names are identical to the Docker image, so a caller switching between the image and the SDK does not have to change a single field:++| Method | Path | Purpose |+|---|---|---|+| GET | `/healthz` | As above, plus the supported `input_form` |+| POST | `/v1/rm/score` | Score a batch of "original image + candidate text" pairs, one score each, with a summary |+| POST | `/v1/rm/score_best` | Several candidates for one block; returns the best |+| POST | `/v1/rm/score_best_batch` | Several blocks, each picking its own best, in one request |++For the full field definitions see the [Docker image API reference](./minicpm_ocr_jev_docker_api_en.md) — that document describes the very same endpoints this service exposes.++### Request++Best-of-N within a block:++```bash+curl -s http://127.0.0.1:18500/v1/rm/score_best -H 'Content-Type: application/json' -d '{+ "input_form": "ternary",+ "case_id": "block_01",+ "image": "<base64 of the original block image>",+ "category": "text",+ "candidates": ["candidate A", "candidate B"]+}'+```++```json+{"best_index": 1, "best_text": "candidate B", "scores": [0.00589, 0.99509],+ "verdicts": ["scored", "scored"],+ "stage_sec": {"render_sec": 0.31, "forward_sec": 0.02, "total_sec": 0.34},+ "batch_size": 2}+```++- `input_form` currently takes only `ternary`, and must be sent explicitly.+- `category` must match the real type of the block (`text` / `formula` / `table`). Getting it wrong raises no error but skews the score.+- Passing `render_images` skips server-side rendering; its length must match `candidates`.+- At most 64 candidates per request (`RM_MAX_ITEMS` to change it) — again a guard, not a recommended batch size. All three endpoints count **candidates**, not blocks: `score_best_batch` counts the candidates of all blocks added up, so with 3 candidates per block, 64 only covers 21 blocks.++### The two rates in the summary++`pass_rate` and `throughput_rate` are two different things: the first is the scoring success rate (`scored / total`, independent of any threshold), the second is the pass-threshold rate (items with `prob_yes >= RM_THRESHOLD`, divided by total; the threshold defaults to 0.5 and is configurable). The threshold only enters this one rate — every `prob_yes` is returned as it is.++---++## 4. Startup self-check++The prompt is assembled by the engine from a template baked into the GGUF, and cannot be read from the service side. So the prompt is **reported rather than verified**, and the service starts regardless. What can be checked is the other half: one real forward pass on a 1×1 image, confirming the engine answers as a decision model with 2 numbers rather than a hidden state.++Once the service is up, query `/healthz`; `status: ok` means everything is fine:++```bash+curl -s http://127.0.0.1:18501/healthz+```++```json+{"status": "ok", "served_model": "ocr-jev",+ "prompt": {"template_md5": "9aab68e8ba8ab4da17ba9752bddb199c",+ "source": "server_template",+ "last_token": null, "expected_last_token": 271,+ "token_equality": "skipped", "forward_shape": "2 probabilities",+ "notes": ["this engine builds the prompt from a template of its own that cannot be read from here ..."]}}+```++Look at `status` only: `ok` means the self-check passed and the service is ready. The other fields under `prompt` are self-check details, and the shape above is what a healthy one looks like. When `status` is not `ok`, `prompt.notes` says which part failed.++`source` reading `server_template`, `last_token` reading `null` and `token_equality` reading `skipped` are the normal values for this backend, not a fault. One consequence for how the numbers may be read: the scale of this leg's scores can only be established by comparing it against a known backend on the same inputs.diff --git a/docs/ollama_deploy_jev_zh.md b/docs/ollama_deploy_jev_zh.mdnew file mode 100644index 0000000..fefd893--- /dev/null+++ b/docs/ollama_deploy_jev_zh.md@@ -0,0 +1,250 @@+# SDK 本地部署:Ollama 后端++[English](ollama_deploy_jev_en.md)++[← 返回使用教程](./minicpm_ocr_jev_tutorial_zh.md)++本文介绍SDK部署模式下,以 Ollama 作为前向引擎时,**不带渲染器服务**与**内置渲染器服务**的安装、启动、接口与请求格式。++Ollama 把 MiniCPM-OCR Jev 当作决策模型(decision model)来服务。与其他后端的两点不同:模型要先转成 GGUF 并注册给 Ollama;prompt 由引擎按烘在 GGUF 里的模板自己拼,不由 SDK 拼。++两种服务共用同一个前向引擎,区别只在渲染图从哪里来:++| | 不带渲染器服务 | 内置渲染器服务 |+| ---- | -------------------------- | ------------------------------------------- |+| 渲染图 | 由你提供 | 服务默认自己渲染(也可由你提供) |+| 渲染环境 | **不需要**,无 Chromium、Node、字体 | 需要 |+| 接口 | `/v1/score`,返回 `prob_1` | `/v1/rm/score*`,返回 `prob_yes`,与 Docker 镜像同构 |+| 功能 | 逐条打分 | 逐条打分、块内选优、批量选优,带 precheck |+| 启动脚本 | `sdk/start_score.sh` | `sdk/start_render_score.sh` |++## 部署流程++1. 装 Ollama → 转 GGUF 并注册模型 → 起前向引擎(两种服务都要)+2. 二选一:+ - **不带渲染器服务** → 装服务环境 → 起服务+ - **内置渲染器服务** → 装渲染环境 → 起服务++引擎与服务必须装在两个虚拟环境里,不要合并。以下命令都在 `scripts/minicpm-ocr-jev/` 目录下执行。++## 环境要求++- **GPU**:NVIDIA,显存 ≥8GB+- **驱动**:≥535+- **Python**:≥3.10+- **Ollama**:最新稳定版+- **llama.cpp**:最新稳定版(只用于转 GGUF)+- **固定版本**:`Pillow` 12.3.0、`playwright` 1.62.0(仅内置渲染器服务)++---++## 一、前向引擎++### 安装++```bash+# Linux+curl -fsSL https://ollama.com/install.sh | sh++# macOS+brew install ollama++# Windows+# 从 https://ollama.com/download/windows 下载安装+```++### 注册模型++先把权重转成 GGUF,转法见 [llama.cpp 部署文档 · 转 GGUF](./llamacpp_deploy_jev_zh.md#转-gguf)。转出来的 GGUF 自带 `systemone` 对话模板与决策模型标识,Ollama 靠它们认出这是决策模型。++写一个 `Modelfile`,第一个 `FROM` 是语言模型,第二个是视觉编码器:++```+FROM ./models/MiniCPM-OCR-Jev-bf16.gguf+FROM ./models/mmproj-MiniCPM-OCR-Jev-bf16.gguf+```++注册并确认:++```bash+ollama create ocr-jev -f Modelfile+ollama show ocr-jev # Capabilities: decision, vision+```++`ollama show` 的 Capabilities 要同时有 `decision` 与 `vision`,缺任意一个都说明 GGUF 转得不对。模型名 `ocr-jev` 后面要写进 SDK 的后端配置,改名则两处同改。++### 启动++```bash+ollama serve # 默认端口 11434+```++每个请求是一次前向,不生成任何 token,固定两张图:先原图、后渲染图。bf16 权重约占 4.4GB 显存。模型没有 LM head,文本生成类端点不可用。++---++## 二、不带渲染器服务++你已经有渲染图,只要分数。++### 安装++```bash+python3 -m venv /opt/venv-score+source /opt/venv-score/bin/activate+pip install "fastapi>=0.110" "uvicorn>=0.27" "httpx>=0.27" "pydantic>=2.6" "PyYAML>=6.0" "Pillow==12.3.0"+```++**依赖版本参考**++```text+python 3.12.3+fastapi 0.162.0+uvicorn 0.54.0+httpx 0.28.1+pydantic 2.14.1+PyYAML 6.0.3+Pillow 12.3.0+```++### 启动++`JEV_BACKEND_CONFIG` 指向 Ollama 的后端配置,参数依次为服务端口、引擎地址:++```bash+JEV_BACKEND_CONFIG=sdk/backends/ollama.yaml \+PATH=/opt/venv-score/bin:$PATH bash sdk/start_score.sh 18501 http://127.0.0.1:11434+```++配置文件里的 `model` 必须与 `ollama create` 时用的模型名一致,Ollama 按名字取模型。不设 `JEV_BACKEND_CONFIG` 时服务按 vLLM 协议发请求,端点对不上,起服即失败。++服务启动时会自检一遍,见 [四、启动自检](#四启动自检)。++### 接口++| 方法 | 路径 | 用途 |+|---|---|---|+| GET | `/healthz` | 服务状态、引擎实际服务的模型、prompt 模板指纹与自检结论 |+| POST | `/v1/score` | 给一批已渲染好的候选打分 |++### 请求++```bash+curl -s http://127.0.0.1:18501/v1/score -H 'Content-Type: application/json' -d '{+ "items": [{"original_image": "<base64>", "render_image": "<base64>", "ocr_text": "..."}]+}'+```++```json+{"results": [{"prob_1": 0.00227, "error": null}]}+```++三个字段都是必填:`original_image` 是原始块图的 base64,`render_image` 是该候选渲染回图片后的 base64,`ocr_text` 是候选文本本身。base64 **不带** `data:image/png;base64,` 前缀,与镜像接口不同。++### 字段与限额++- `ocr_text` 原样送进模型,不做任何清洗。+- `prob_1` 是该候选与原图一致的概率,不带阈值、不带标签。+- 一次最多 64 条(`JEV_MAX_ITEMS` 可调),超限返回 413;空批返回空结果。这个数是防止单请求塞进过多图片的保护上限,不是推荐批大小。+- 图片 base64 解不开时整批返回 422,并指出是第几条的哪个字段;打分阶段的失败只影响那一条,它在自己那一格里带上 `error`、`prob_1` 为 `null`。++---++## 三、内置渲染器服务++你只有候选文本,让服务渲染完再打分。precheck、render、forward 三个阶段都在这个进程里完成。++本服务在进程内直接调用打分层,**不需要另外起一个不带渲染器服务**,也不需要给它留端口。++### 安装++```bash+bash sdk/setup_render.sh /opt/venv-render+```++它装 Node、CJK 字体、Chromium 与服务依赖。慢网下设两个镜像源:++```bash+PIP_INDEX_URL=https://<mirror>/simple \+PLAYWRIGHT_DOWNLOAD_HOST=https://<mirror>/playwright \+ bash sdk/setup_render.sh /opt/venv-render+```++### 启动++参数依次为服务端口、引擎地址:++```bash+JEV_BACKEND_CONFIG=sdk/backends/ollama.yaml \+PATH=/opt/venv-render/bin:$PATH bash sdk/start_render_score.sh 18500 http://127.0.0.1:11434+```++必须用 `/opt/venv-render` 这个解释器启动,本进程在自己进程里渲染。渲染进程数量由 `RM_RENDER_BROWSERS` 控制;服务只起一个 worker,要提吞吐请调这个变量而不是加 worker。++### 接口++端点与字段名与 Docker 镜像完全一致,调用方在镜像与 SDK 之间切换时不必改任何字段:++| 方法 | 路径 | 用途 |+|---|---|---|+| GET | `/healthz` | 同上,另报支持的 `input_form` |+| POST | `/v1/rm/score` | 给一批「原图 + 候选文本」逐条打分,返回分数与汇总 |+| POST | `/v1/rm/score_best` | 一个块内多个候选,选出最优 |+| POST | `/v1/rm/score_best_batch` | 多个块各自选优,一次提交 |++完整字段定义见 [Docker 镜像 API 参考](./minicpm_ocr_jev_docker_api_zh.md),那份文档描述的就是本服务的同名端点。++### 请求++块内选优:++```bash+curl -s http://127.0.0.1:18500/v1/rm/score_best -H 'Content-Type: application/json' -d '{+ "input_form": "ternary",+ "case_id": "block_01",+ "image": "<base64 原始块图>",+ "category": "text",+ "candidates": ["候选 A", "候选 B"]+}'+```++```json+{"best_index": 1, "best_text": "候选 B", "scores": [0.00589, 0.99509],+ "verdicts": ["scored", "scored"],+ "stage_sec": {"render_sec": 0.31, "forward_sec": 0.02, "total_sec": 0.34},+ "batch_size": 2}+```++- `input_form` 目前只有 `ternary` 一个取值,必须显式传。+- `category` 必须与块真实类型一致(`text` / `formula` / `table`),填错不报错但分数会偏。+- 传 `render_images` 则跳过服务端渲染,其长度必须与 `candidates` 一致。+- 一次最多 64 个候选(`RM_MAX_ITEMS` 可调),同样是保护上限而非推荐批大小。三个端点都按**候选数**算、不按块数:`score_best_batch` 数的是所有块的候选总和,每块 3 个候选时 64 只够 21 个块。++### 汇总里的两个比率++`pass_rate` 与 `throughput_rate` 是两件事:前者是打分成功率(`scored / total`,与阈值无关),后者是过阈率(`prob_yes >= RM_THRESHOLD` 的条数 / total,阈值默认 0.5,可配)。阈值只参与这个比率的计算,任何一条的 `prob_yes` 都按原值返回。++---++## 四、启动自检++prompt 由引擎按烘在 GGUF 里的模板拼,从服务这一侧读不到,所以 prompt 这一项**自检不作校验、如实报告**,服务照常启动。能校的是另一项:用一张 1×1 的图真打一次前向,确认引擎按决策模型返回了 2 个数而不是一串隐藏层输出。++起服后查 `/healthz`,`status` 为 `ok` 即正常:++```bash+curl -s http://127.0.0.1:18501/healthz+```++```json+{"status": "ok", "served_model": "ocr-jev",+ "prompt": {"template_md5": "9aab68e8ba8ab4da17ba9752bddb199c",+ "source": "server_template",+ "last_token": null, "expected_last_token": 271,+ "token_equality": "skipped", "forward_shape": "2 probabilities",+ "notes": ["this engine builds the prompt from a template of its own that cannot be read from here ..."]}}+```++只看 `status`:`ok` 就是自检通过、服务可用,`prompt` 下的其余字段是自检留下的明细,照上面的样子即为正常。`status` 不是 `ok` 时,`prompt.notes` 写明是哪一项没过。++`source` 为 `server_template`、`last_token` 为 `null`、`token_equality` 为 `skipped`,这三项在本后端下就是正常值,不是故障。由此带来的一个口径后果:这条腿分数的尺度,只能靠与已知后端对同一批输入比对来确立。diff --git a/docs/pypi_publish.md b/docs/pypi_publish.mdnew file mode 100644index 0000000..eb7267f--- /dev/null+++ b/docs/pypi_publish.md@@ -0,0 +1,37 @@+# SDK 发布到 PyPI++[← 返回首页](../README_zh.md)++SDK 源码保留在官方仓库 [OpenBMB/MiniCPM-OCR](https://github.com/OpenBMB/MiniCPM-OCR) 的 `sdk/`。PyPI 发行包名为 `minicpm-ocr`,Python 导入名和命令均为 `minicpmvocr`。版本号统一维护在 [`sdk/minicpmvocr/_version.py`](../sdk/minicpmvocr/_version.py)。++本仓库当前没有内置的 PyPI 自动发布工作流;推送代码或 SDK 标签不会自动上传包。以下步骤供项目维护者手动构建、检查和发布。++## 构建与检查++发布前更新版本号并提交代码。在仓库根目录运行以下命令,确保 `sdk/dist/` 只保留本次版本的构建产物:++```bash+python -m pip install --upgrade build twine+python -m build sdk --outdir sdk/dist+python -m twine check --strict sdk/dist/*+```++构建完成后,在独立 Python 环境中安装生成的 wheel,检查 `minicpmvocr --help` 和 `minicpmvocr list-backends` 能否正常运行。++## 手动上传++确认构建结果后,由拥有 `minicpm-ocr` 项目发布权限的维护者运行:++```bash+python -m twine upload sdk/dist/*+```++按提示提供 PyPI API Token。上传方式见 [PyPA 官方发布教程](https://packaging.python.org/en/latest/tutorials/packaging-projects/#uploading-the-distribution-archives)。同一版本不能覆盖上传,后续发布需递增版本号。++确认 [PyPI 项目页](https://pypi.org/project/minicpm-ocr/) 出现对应版本后,即可安装。以下以 `1.0.0` 为例:++```bash+python -m pip install "minicpm-ocr[all]==1.0.0"+```++PaddlePaddle GPU 运行时需单独安装,具体命令见[安装与推理教程](./minicpmvocr_tutorial.md#1-sdk-环境配置)。diff --git a/docs/sglang_deploy.md b/docs/sglang_deploy.mdnew file mode 100644index 0000000..f44baa3--- /dev/null+++ b/docs/sglang_deploy.md@@ -0,0 +1,175 @@+# SGLang Deployment Guide++[← Back to README](../README.md)++SGLang serves MiniCPM-OCR through an OpenAI-compatible API. This guide enables DSpark decoding with a matched target model and draft model. The SDK runs in a separate environment and connects over HTTP.++This guide follows the environment layout and SDK settings in the [vLLM tutorial](./minicpmvocr_tutorial_en.md). The commands target Linux x86_64, an NVIDIA GPU and Python 3.12. End-to-end SGLang deployment with these settings remains to be verified.++## 1. Prepare the source++MiniCPM-OCR 1.0 support is provided by [PR #45799](https://github.com/sgl-project/sglang/pull/45799), which is open as of October 26, 2026. This guide uses the PR commit [`aaab6bfc3de5354b052f2e96d5e566d70b9f69a2`](https://github.com/tc-mb/sglang/commit/aaab6bfc3de5354b052f2e96d5e566d70b9f69a2), from branch `model/MiniCPM-OCR-1.0`.++Run all commands below from the **root of this repository**, `MiniCPM-OCR`:++```bash+git clone https://github.com/sgl-project/sglang.git sources/sglang+git -C sources/sglang fetch origin pull/45799/head+git -C sources/sglang checkout aaab6bfc3de5354b052f2e96d5e566d70b9f69a2+```++If `sources/sglang` already exists, skip the clone and run the fetch and checkout commands.++## 2. Set up the SDK environment++Install the SDK and GPU PaddlePaddle in `.minicpm-ocr` as described in the [SDK tutorial](./minicpmvocr_tutorial_en.md#1-set-up-the-sdk-environment). Reuse this environment if it is already installed for vLLM.++For CPU layout detection, follow the same steps but replace the `paddlepaddle-gpu` installation command with:++```bash+python -m pip install "paddlepaddle==3.2.1"+```++## 3. Install the service environment++The `sglang` profile in this repository's [`pyproject.toml`](../pyproject.toml) installs `sources/sglang/python` and the CUDA 13 components. PyTorch 2.14.1, Transformers 5.19.0 and the other SGLang dependencies come from the source's own [`python/pyproject.toml`](https://github.com/tc-mb/sglang/blob/aaab6bfc3de5354b052f2e96d5e566d70b9f69a2/python/pyproject.toml). The installer uses a separate `.venv-sglang` environment because the vLLM profile requires a different PyTorch version.++Prepare the system build dependencies on Ubuntu 22.04. Run as root, or prefix APT commands with `sudo`:++```bash+apt-get update+apt-get install -y software-properties-common build-essential pkg-config libssl-dev curl ca-certificates protobuf-compiler+add-apt-repository -y ppa:ubuntu-toolchain-r/test+apt-get update+apt-get install -y gcc-13 g++-13 libdw-dev libelf-dev+```++> **Driver compatibility:** CUDA 13 normally requires driver ≥580. For supported GPUs with an older driver, configure the compatibility library as described in the [FAQ](./faq_en.md#cuda-driver-version-is-insufficient). Set its environment variables in the installation, service and GPU SDK terminals.++Install the service environment:++```bash+bash scripts/install.sh sglang+source .venv-sglang/bin/activate+```++The installer creates or reuses `.venv-sglang`, installs `rustup` if needed, and selects the Rust version pinned by the SGLang source (1.92 for this commit). It also prepares the CUDA compiler and library links. If the driver's `libcuda.so.1` is outside `/usr/lib/x86_64-linux-gnu`, set `OCR_LIBCUDA` to its path before installation. When using the driver compatibility library, keep the value configured in the FAQ.++Check the environment:++```bash+uv pip check+"$(python -c 'import sysconfig; print(sysconfig.get_path("purelib") + "/nvidia/cu13/bin/nvcc")')" --version+python -c 'import sglang; print(sglang.__file__)'+python -c 'import torch, transformers; print("torch", torch.__version__, "CUDA", torch.version.cuda, "transformers", transformers.__version__); x = torch.ones(1, device="cuda"); print(torch.cuda.get_device_name(0), (x + 1).item())'+```++The SGLang path should point into `sources/sglang/python/sglang`; NVCC should report CUDA 13.0.++SGLang provides the model configuration and image processor for this PR. Its installation uses its own dependency list; the tutorial's Transformers adaptation checkout is used by vLLM and is not installed here.++## 4. Prepare the models++Download the SDK's PP-DocLayoutV3 layout model, or reuse the directory prepared for vLLM:++```bash+mkdir -p models+curl -fL -o ./models/PP-DocLayoutV3_infer.tar \+ https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/paddle3.0.0/PP-DocLayoutV3_infer.tar+tar xf ./models/PP-DocLayoutV3_infer.tar -C ./models+```++Download the [MiniCPM-OCR-1.0 target model](https://huggingface.co/openbmb/MiniCPM-OCR-1.0) and its matched [MiniCPM-OCR-1.0-DSpark draft model](https://huggingface.co/openbmb/MiniCPM-OCR-1.0-DSpark):++```bash+source .venv-sglang/bin/activate+hf download openbmb/MiniCPM-OCR-1.0 --local-dir ./models/MiniCPM-OCR-1.0+hf download openbmb/MiniCPM-OCR-1.0-DSpark --local-dir ./models/MiniCPM-OCR-1.0-DSpark+```++If the models are already present, reuse them. Set `--model-path` below to the DSpark target directory, `--speculative-draft-model-path` to its matched draft directory, and the SDK's `layout.model_dir` to the layout model directory.++## 5. Start the service++Open a service terminal at the repository root. On a single-GPU machine, finish the SDK run and stop the previous inference service before starting SGLang so that its GPU memory is available.++> **Older drivers:** Set the compatibility-library environment variables in this terminal before starting the service, as described in the [FAQ](./faq_en.md#cuda-driver-version-is-insufficient). Activating `.venv-sglang` does not restore variables from another terminal.++```bash+source .venv-sglang/bin/activate+export PATH="${CARGO_HOME:-$HOME/.cargo}/bin:$PATH"+export RUSTUP_TOOLCHAIN=1.92+export CC=gcc-13 CXX=g++-13+export CUDA_HOME="$(python -c 'import sysconfig; print(sysconfig.get_path("purelib") + "/nvidia/cu13")')"+export PATH="$CUDA_HOME/bin:$PATH"++CUDA_VISIBLE_DEVICES=0 python -m sglang.launch_server \+ --model-path ./models/MiniCPM-OCR-1.0 \+ --served-model-name minicpm-ocr \+ --host 127.0.0.1 --port 18499 \+ --context-length 40960 \+ --max-running-requests 32 \+ --mem-fraction-static 0.85 \+ --speculative-algorithm DSPARK \+ --speculative-draft-model-path ./models/MiniCPM-OCR-1.0-DSpark \+ --default-chat-template-kwargs '{"enable_thinking":false}'+```++`--speculative-algorithm DSPARK` enables DSpark. SGLang reads the draft block size from the draft configuration and derives its verification window; do not copy vLLM's `--speculative-config` JSON into this command.++The source checkout can compile its Rust cache extension on first startup. Keep Cargo's directory in `PATH` and use Rust 1.92 in this terminal; the system Cargo may be older even after the installation script finishes. Reactivating the virtual environment resets `PATH`, so rerun all exports in this block after activation.++> **GPU and port:** `CUDA_VISIBLE_DEVICES=0` selects physical GPU 0. Change it to another GPU index when needed. If another service already uses port `18499`, choose a free port here and use the same port in the SDK command below. Services sharing a GPU also share its available memory.++> **Concurrency:** This SGLang configuration permits up to 32 running requests, including with DSpark enabled. The SDK example below sends at most 32 requests concurrently. Reduce both values if memory is insufficient; actual capacity also depends on image size and sequence length.++The chat-template setting disables thinking mode, as required by the adaptation PR. Check readiness in another terminal:++```bash+curl --noproxy 127.0.0.1 -f http://127.0.0.1:18499/v1/models+```++The returned model list should include `minicpm-ocr`.++## 6. Parse a document with the SDK++In a separate terminal at the repository root:++```bash+source .minicpm-ocr/bin/activate++minicpmvocr parse --config sdk/minicpmvocr/configs/minicpmvocr.yaml \+ --backend openai \+ --server-url http://127.0.0.1:18499 \+ --model minicpm-ocr \+ --set layout.model_dir="$PWD/models/PP-DocLayoutV3_infer" \+ --set layout.device=cuda:0 \+ --set pipeline.queue_mode=concurrent \+ --set engine.max_model_len=40960 \+ --set pipeline.max_workers=32 \+ --set pipeline.merge_cross_page_tables=false \+ --set pipeline.overlap_layout=true \+ --input doc.pdf --output doc.md+```++The input can be a PDF, PNG or JPG. PDFs are parsed in full; add `--set input.limit=1` to check only the first page. The SDK model name must match the service's `--served-model-name`.++`pipeline.overlap_layout=true` lets layout detection and recognition run at the same time. `pipeline.max_workers=32` limits concurrent recognition requests, rather than pages; adjust it for the service's capacity. `pipeline.queue_mode` applies when layout overlap is disabled. `--backend openai` selects the OpenAI-compatible client for SGLang.++> **CPU layout detection:** Use the CPU PaddlePaddle environment configured above, activate `.minicpm-ocr`, and replace `--set layout.device=cuda:0` with `--set layout.device=cpu`.++> **GPU selection:** `cuda:0` selects the first GPU visible to the SDK process. If that process uses `CUDA_VISIBLE_DEVICES=3`, its single visible GPU is addressed as `cuda:0`. New terminals using an older driver must also restore the compatibility-library environment variables from the [FAQ](./faq_en.md#cuda-driver-version-is-insufficient) before running GPU layout detection or the service.++## Troubleshooting++| Symptom | Check |+|---|---|+| Unknown `minicpm_ocr` model type or architecture | Confirm the source is at the pinned PR commit and was installed in `.venv-sglang` |+| CUDA driver error | Check driver compatibility and the compatibility-library environment variables in the [FAQ](./faq_en.md#cuda-driver-version-is-insufficient) |+| `nvcc` not found or NVCC linking files missing | Restore `CUDA_HOME` and `PATH` from step 5; rerun `bash scripts/install.sh sglang` if the compiler files are incomplete |+| NVCC reports an unknown `--compress-mode=size` option | Restore `CUDA_HOME` and `PATH` from the service command, then restart the service |+| Rust cache compilation fails with `edition2024` or Cargo exit code 101 | Check the first compiler error. For `edition2024`, restore Cargo's `PATH` and `RUSTUP_TOOLCHAIN` from step 5; `cargo --version` should report 1.92.0 |+| Out of GPU memory | Reduce `--max-running-requests`, SDK workers, or `--context-length`; keep `engine.max_model_len` consistent with the service |+| Thinking tags in the output | Keep `--default-chat-template-kwargs '{"enable_thinking":false}'` when starting the service |++See the [SGLang documentation](https://docs.sglang.io/) for other hardware platforms and serving options.diff --git a/docs/sglang_deploy_jev_en.md b/docs/sglang_deploy_jev_en.mdnew file mode 100644index 0000000..4c18e59--- /dev/null+++ b/docs/sglang_deploy_jev_en.md@@ -0,0 +1,236 @@+# SDK Local Deployment: SGLang Backend++[中文版](sglang_deploy_jev_zh.md)++[← Back to the deployment guide](./minicpm_ocr_jev_tutorial_en.md)++This document covers the SDK deployment path with SGLang as the forward engine: how to install, start, and call the **score service** and the **render+score service**.++Both services share one forward engine. The only difference is where the render image comes from:++| | Score service | Render+score service |+| ---- | -------------------------------------- | ---------------------------------------------------- |+| Render image | You provide it | The service renders it by default (you may also provide it) |+| Render environment | **Not needed** — no Chromium, Node or fonts | Needed |+| Endpoint | `/v1/score`, returns `prob_1` | `/v1/rm/score*`, returns `prob_yes`, identical to the Docker image |+| Features | Scoring only | Scoring, best-of-N within a block, batched best-of-N, with precheck |+| Start script | `sdk/start_score.sh` | `sdk/start_render_score.sh` |++## Deployment steps++1. Install the engine environment and start the forward engine (both services need it)+2. Pick one:+ - **Score service** → install the service environment → start the service+ - **Render+score service** → install the render environment → start the service++The engine and the service must go into two separate virtual environments; do not merge them. All commands below run from `scripts/minicpm-ocr-jev/`.++## Requirements++- **GPU**: NVIDIA, ≥8GB VRAM+- **Driver**: ≥535+- **Python**: ≥3.10+- **SGLang**: latest stable release+- **Pinned versions**: `Pillow` 12.3.0, `playwright` 1.62.0 (render+score service only)++---++## 1. Forward engine++Both services need an SGLang engine to connect to.++```bash+python3 -m venv /opt/venv-sglang && source /opt/venv-sglang/bin/activate+pip install "sglang[all]"+```++Start it:++```bash+python -m sglang.launch_server \+ --model-path ./models/MiniCPM-OCR-Jev \+ --is-embedding \+ --json-model-override-args '{"architectures": ["Qwen3_5VLForSequenceClassification"]}' \+ --port 18499+```++- `--is-embedding`: routes requests through the pooling path instead of generation. Without it there is no `/classify` to call.+- `--json-model-override-args`: needed while the checkpoint's `config.json` lists the generative class `Qwen3_5ForConditionalGeneration` — overriding it to the classification class is what makes the server return the value head's two logits; without it SGLang loads the generative class and returns a 2048-dim hidden state. This is a load-time override; the checkpoint on disk is not touched. If `config.json` already lists `Qwen3_5VLForSequenceClassification`, the flag can be dropped.+- The number of classes comes from `config.json`: `len(id2label)` if present, otherwise `num_labels`. One of the two must be there.+- Do not add `--chat-template`: SGLang applies no template, and the SDK sends the finished prompt string as it is.++Once it is up, check that the engine is ready:++```bash+curl http://127.0.0.1:18499/health+```++Two limitations: the model has no `lm_head`, so speculative decoding is not supported; and `/v1/classify` does not accept images — use `/classify`.++---++## 2. Score service++You already have the render image and only want the score.++### Install++```bash+python3 -m venv /opt/venv-score+source /opt/venv-score/bin/activate+pip install "fastapi>=0.110" "uvicorn>=0.27" "httpx>=0.27" "pydantic>=2.6" "PyYAML>=6.0" "Pillow==12.3.0"+```++**Reference dependency versions**++```text+python 3.12.3+fastapi 0.162.0+uvicorn 0.54.0+httpx 0.28.1+pydantic 2.14.1+PyYAML 6.0.3+Pillow 12.3.0+```++### Start++`JEV_BACKEND_CONFIG` points at the SGLang backend config; the arguments are the service port and the engine address, in that order:++```bash+JEV_BACKEND_CONFIG=sdk/backends/sglang.yaml \+PATH=/opt/venv-score/bin:$PATH bash sdk/start_score.sh 18501 http://127.0.0.1:18499+```++Without `JEV_BACKEND_CONFIG` the service speaks the vLLM protocol. Pointed at SGLang that raises no error, but the scores are unusable.++The service checks the prompt once at startup; see [4. Startup self-check](#4-startup-self-check).++### Endpoints++| Method | Path | Purpose |+|---|---|---|+| GET | `/healthz` | Service status, the model the engine actually serves, the prompt template fingerprint and the self-check result |+| POST | `/v1/score` | Score a batch of already rendered candidates |++### Request++```bash+curl -s http://127.0.0.1:18501/v1/score -H 'Content-Type: application/json' -d '{+ "items": [{"original_image": "<base64>", "render_image": "<base64>", "ocr_text": "..."}]+}'+```++```json+{"results": [{"prob_1": 0.00227, "error": null}]}+```++All three fields are required: `original_image` is the base64 of the original block image, `render_image` is the base64 of that candidate rendered back into an image, and `ocr_text` is the candidate text itself. The base64 carries **no** `data:image/png;base64,` prefix, unlike the image API.++### Fields and limits++- `ocr_text` goes to the model as-is; nothing is cleaned up.+- `prob_1` is `softmax(logits)[1]` — no threshold, no label, no logits returned.+- At most 64 items per request (`JEV_MAX_ITEMS` to change it); over the limit returns 413, an empty batch returns an empty result. The number is a guard against packing too many images into one request, not a recommended batch size.+- When a base64 image cannot be decoded, the whole batch returns 422 naming the item and the field. A failure during scoring affects only that one item: it carries an `error` in its own slot and `prob_1` is `null`.++---++## 3. Render+score service++You only have candidate text and want the service to render before scoring. Precheck, render and forward all happen in this one process.++This service calls the scoring layer in-process: it does **not** need a separate score service running, and does not need a port reserved for one.++### Install++```bash+bash sdk/setup_render.sh /opt/venv-render+```++It installs Node, CJK fonts, Chromium and the service dependencies. On a slow network, point it at two mirrors:++```bash+PIP_INDEX_URL=https://<mirror>/simple \+PLAYWRIGHT_DOWNLOAD_HOST=https://<mirror>/playwright \+ bash sdk/setup_render.sh /opt/venv-render+```++### Start++The arguments are the service port and the engine address, in that order:++```bash+JEV_BACKEND_CONFIG=sdk/backends/sglang.yaml \+PATH=/opt/venv-render/bin:$PATH bash sdk/start_render_score.sh 18500 http://127.0.0.1:18499+```++It must be started with the `/opt/venv-render` interpreter, because it renders in its own process. The number of render processes is set by `RM_RENDER_BROWSERS`; the service runs a single worker, so raise that variable rather than adding workers when you need more throughput.++### Endpoints++Paths and field names are identical to the Docker image, so a caller switching between the image and the SDK does not have to change a single field:++| Method | Path | Purpose |+|---|---|---|+| GET | `/healthz` | As above, plus the supported `input_form` |+| POST | `/v1/rm/score` | Score a batch of "original image + candidate text" pairs, one score each, with a summary |+| POST | `/v1/rm/score_best` | Several candidates for one block; returns the best |+| POST | `/v1/rm/score_best_batch` | Several blocks, each picking its own best, in one request |++For the full field definitions see the [Docker image API reference](./minicpm_ocr_jev_docker_api_en.md) — that document describes the very same endpoints this service exposes.++### Request++Best-of-N within a block:++```bash+curl -s http://127.0.0.1:18500/v1/rm/score_best -H 'Content-Type: application/json' -d '{+ "input_form": "ternary",+ "case_id": "block_01",+ "image": "<base64 of the original block image>",+ "category": "text",+ "candidates": ["candidate A", "candidate B"]+}'+```++```json+{"best_index": 1, "best_text": "candidate B", "scores": [0.00589, 0.99509],+ "verdicts": ["scored", "scored"],+ "stage_sec": {"render_sec": 0.31, "forward_sec": 0.02, "total_sec": 0.34},+ "batch_size": 2}+```++- `input_form` currently takes only `ternary`, and must be sent explicitly.+- `category` must match the real type of the block (`text` / `formula` / `table`). Getting it wrong raises no error but skews the score.+- Passing `render_images` skips server-side rendering; its length must match `candidates`.+- At most 64 candidates per request (`RM_MAX_ITEMS` to change it) — again a guard, not a recommended batch size. All three endpoints count **candidates**, not blocks: `score_best_batch` counts the candidates of all blocks added up, so with 3 candidates per block, 64 only covers 21 blocks.++### The two rates in the summary++`pass_rate` and `throughput_rate` are two different things: the first is the scoring success rate (`scored / total`, independent of any threshold), the second is the pass-threshold rate (items with `prob_yes >= RM_THRESHOLD`, divided by total; the threshold defaults to 0.5 and is configurable). The threshold only enters this one rate — every `prob_yes` is returned as it is.++---++## 4. Startup self-check++SGLang applies no template: the whole prompt string is assembled on the SDK side and sent as it is. What the self-check verifies therefore moves with it — it compares **the exact string about to be sent** against the output of `build_prompt()`, character for character, and confirms that exactly two images ride along. It also runs one real forward pass on a 1×1 image to confirm the engine answers with 2 logits rather than a hidden state.++Once the service is up, query `/healthz`; `status: ok` means everything is fine:++```bash+curl -s http://127.0.0.1:18501/healthz+```++```json+{"status": "ok", "served_model": "/path/to/weights",+ "prompt": {"template_md5": "9aab68e8ba8ab4da17ba9752bddb199c",+ "source": "client",+ "last_token": 271, "expected_last_token": 271,+ "token_equality": "equal", "forward_shape": "2 logits",+ "notes": ["the prompt we send matches build_prompt() character for character ..."]}}+```++Look at `status` only: `ok` means the self-check passed and the service is ready. The other fields under `prompt` are self-check details, and the shape above is what a healthy one looks like. When `status` is not `ok`, `prompt.notes` says which part failed.++`served_model` is the weights path the engine was started with (SGLang identifies a model by path and serves one model per process). When the weights directory is not on this host, or `transformers` is not installed, `token_equality` reads `skipped` — a skip, not a failure, and `notes` says why.diff --git a/docs/sglang_deploy_jev_zh.md b/docs/sglang_deploy_jev_zh.mdnew file mode 100644index 0000000..d2b93bd--- /dev/null+++ b/docs/sglang_deploy_jev_zh.md@@ -0,0 +1,236 @@+# SDK 本地部署:SGLang 后端++[English](sglang_deploy_jev_en.md)++[← 返回使用教程](./minicpm_ocr_jev_tutorial_zh.md)++本文介绍SDK部署模式下,以 SGLang 作为前向引擎时,**不带渲染器服务**与**内置渲染器服务**的安装、启动、接口与请求格式。++两种服务共用同一个前向引擎,区别只在渲染图从哪里来:++| | 不带渲染器服务 | 内置渲染器服务 |+| ---- | -------------------------- | ------------------------------------------- |+| 渲染图 | 由你提供 | 服务默认自己渲染(也可由你提供) |+| 渲染环境 | **不需要**,无 Chromium、Node、字体 | 需要 |+| 接口 | `/v1/score`,返回 `prob_1` | `/v1/rm/score*`,返回 `prob_yes`,与 Docker 镜像同构 |+| 功能 | 逐条打分 | 逐条打分、块内选优、批量选优,带 precheck |+| 启动脚本 | `sdk/start_score.sh` | `sdk/start_render_score.sh` |++## 部署流程++1. 装引擎环境,起前向引擎(两种服务都要)+2. 二选一:+ - **不带渲染器服务** → 装服务环境 → 起服务+ - **内置渲染器服务** → 装渲染环境 → 起服务++引擎与服务必须装在两个虚拟环境里,不要合并。以下命令都在 `scripts/minicpm-ocr-jev/` 目录下执行。++## 环境要求++- **GPU**:NVIDIA,显存 ≥8GB+- **驱动**:≥535+- **Python**:≥3.10+- **SGLang**:最新稳定版+- **固定版本**:`Pillow` 12.3.0、`playwright` 1.62.0(仅内置渲染器服务)++---++## 一、前向引擎++两种服务都要连一个 SGLang 引擎。++```bash+python3 -m venv /opt/venv-sglang && source /opt/venv-sglang/bin/activate+pip install "sglang[all]"+```++启动:++```bash+python -m sglang.launch_server \+ --model-path ./models/MiniCPM-OCR-Jev \+ --is-embedding \+ --json-model-override-args '{"architectures": ["Qwen3_5VLForSequenceClassification"]}' \+ --port 18499+```++- `--is-embedding`:走池化路径而不是文本生成。不加则没有 `/classify` 可调。+- `--json-model-override-args`:权重的 `config.json` 写的是生成类 `Qwen3_5ForConditionalGeneration` 时需要它,覆盖成分类类才会返回 value head 的两个 logit;不加则加载生成类、返回 2048 维 hidden state。这是加载期覆盖,不改动磁盘上的权重文件。`config.json` 本身已写 `Qwen3_5VLForSequenceClassification` 时,这一项可以省略。+- 类别数取自 `config.json`:有 `id2label` 则用 `len(id2label)`,否则用 `num_labels`,两者必须有其一。+- 不要加 `--chat-template`:SGLang 不套模板,SDK 直接把拼好的整串 prompt 发过去。++起服后确认引擎就绪:++```bash+curl http://127.0.0.1:18499/health+```++两项限制:模型没有 `lm_head`,不支持投机解码;`/v1/classify` 不接受图片,要用 `/classify`。++---++## 二、不带渲染器服务++你已经有渲染图,只要分数。++### 安装++```bash+python3 -m venv /opt/venv-score+source /opt/venv-score/bin/activate+pip install "fastapi>=0.110" "uvicorn>=0.27" "httpx>=0.27" "pydantic>=2.6" "PyYAML>=6.0" "Pillow==12.3.0"+```++**依赖版本参考**++```text+python 3.12.3+fastapi 0.162.0+uvicorn 0.54.0+httpx 0.28.1+pydantic 2.14.1+PyYAML 6.0.3+Pillow 12.3.0+```++### 启动++`JEV_BACKEND_CONFIG` 指向 SGLang 的后端配置,参数依次为服务端口、引擎地址:++```bash+JEV_BACKEND_CONFIG=sdk/backends/sglang.yaml \+PATH=/opt/venv-score/bin:$PATH bash sdk/start_score.sh 18501 http://127.0.0.1:18499+```++不设 `JEV_BACKEND_CONFIG` 时服务按 vLLM 协议发请求,连的是 SGLang 也不会报错,但分数不可用。++服务启动时会自检一遍 prompt,见 [四、启动自检](#四启动自检)。++### 接口++| 方法 | 路径 | 用途 |+|---|---|---|+| GET | `/healthz` | 服务状态、引擎实际服务的模型、prompt 模板指纹与自检结论 |+| POST | `/v1/score` | 给一批已渲染好的候选打分 |++### 请求++```bash+curl -s http://127.0.0.1:18501/v1/score -H 'Content-Type: application/json' -d '{+ "items": [{"original_image": "<base64>", "render_image": "<base64>", "ocr_text": "..."}]+}'+```++```json+{"results": [{"prob_1": 0.00227, "error": null}]}+```++三个字段都是必填:`original_image` 是原始块图的 base64,`render_image` 是该候选渲染回图片后的 base64,`ocr_text` 是候选文本本身。base64 **不带** `data:image/png;base64,` 前缀,与镜像接口不同。++### 字段与限额++- `ocr_text` 原样送进模型,不做任何清洗。+- `prob_1` 是 `softmax(logits)[1]`,不带阈值、不带标签、不回 logits。+- 一次最多 64 条(`JEV_MAX_ITEMS` 可调),超限返回 413;空批返回空结果。这个数是防止单请求塞进过多图片的保护上限,不是推荐批大小。+- 图片 base64 解不开时整批返回 422,并指出是第几条的哪个字段;打分阶段的失败只影响那一条,它在自己那一格里带上 `error`、`prob_1` 为 `null`。++---++## 三、内置渲染器服务++你只有候选文本,让服务渲染完再打分。precheck、render、forward 三个阶段都在这个进程里完成。++本服务在进程内直接调用打分层,**不需要另外起一个不带渲染器服务**,也不需要给它留端口。++### 安装++```bash+bash sdk/setup_render.sh /opt/venv-render+```++它装 Node、CJK 字体、Chromium 与服务依赖。慢网下设两个镜像源:++```bash+PIP_INDEX_URL=https://<mirror>/simple \+PLAYWRIGHT_DOWNLOAD_HOST=https://<mirror>/playwright \+ bash sdk/setup_render.sh /opt/venv-render+```++### 启动++参数依次为服务端口、引擎地址:++```bash+JEV_BACKEND_CONFIG=sdk/backends/sglang.yaml \+PATH=/opt/venv-render/bin:$PATH bash sdk/start_render_score.sh 18500 http://127.0.0.1:18499+```++必须用 `/opt/venv-render` 这个解释器启动,本进程在自己进程里渲染。渲染进程数量由 `RM_RENDER_BROWSERS` 控制;服务只起一个 worker,要提吞吐请调这个变量而不是加 worker。++### 接口++端点与字段名与 Docker 镜像完全一致,调用方在镜像与 SDK 之间切换时不必改任何字段:++| 方法 | 路径 | 用途 |+|---|---|---|+| GET | `/healthz` | 同上,另报支持的 `input_form` |+| POST | `/v1/rm/score` | 给一批「原图 + 候选文本」逐条打分,返回分数与汇总 |+| POST | `/v1/rm/score_best` | 一个块内多个候选,选出最优 |+| POST | `/v1/rm/score_best_batch` | 多个块各自选优,一次提交 |++完整字段定义见 [Docker 镜像 API 参考](./minicpm_ocr_jev_docker_api_zh.md),那份文档描述的就是本服务的同名端点。++### 请求++块内选优:++```bash+curl -s http://127.0.0.1:18500/v1/rm/score_best -H 'Content-Type: application/json' -d '{+ "input_form": "ternary",+ "case_id": "block_01",+ "image": "<base64 原始块图>",+ "category": "text",+ "candidates": ["候选 A", "候选 B"]+}'+```++```json+{"best_index": 1, "best_text": "候选 B", "scores": [0.00589, 0.99509],+ "verdicts": ["scored", "scored"],+ "stage_sec": {"render_sec": 0.31, "forward_sec": 0.02, "total_sec": 0.34},+ "batch_size": 2}+```++- `input_form` 目前只有 `ternary` 一个取值,必须显式传。+- `category` 必须与块真实类型一致(`text` / `formula` / `table`),填错不报错但分数会偏。+- 传 `render_images` 则跳过服务端渲染,其长度必须与 `candidates` 一致。+- 一次最多 64 个候选(`RM_MAX_ITEMS` 可调),同样是保护上限而非推荐批大小。三个端点都按**候选数**算、不按块数:`score_best_batch` 数的是所有块的候选总和,每块 3 个候选时 64 只够 21 个块。++### 汇总里的两个比率++`pass_rate` 与 `throughput_rate` 是两件事:前者是打分成功率(`scored / total`,与阈值无关),后者是过阈率(`prob_yes >= RM_THRESHOLD` 的条数 / total,阈值默认 0.5,可配)。阈值只参与这个比率的计算,任何一条的 `prob_yes` 都按原值返回。++---++## 四、启动自检++SGLang 不套模板,整串 prompt 由 SDK 这一侧拼好后发出。因此自检校的是**即将发出的那个字符串**:它必须与 `build_prompt()` 的输出逐字符相同,随行的图片恰为两张。自检还会用一张 1×1 的图真打一次前向,确认引擎返回的是 2 个 logit 而不是 hidden state。++起服后查 `/healthz`,`status` 为 `ok` 即正常:++```bash+curl -s http://127.0.0.1:18501/healthz+```++```json+{"status": "ok", "served_model": "/path/to/weights",+ "prompt": {"template_md5": "9aab68e8ba8ab4da17ba9752bddb199c",+ "source": "client",+ "last_token": 271, "expected_last_token": 271,+ "token_equality": "equal", "forward_shape": "2 logits",+ "notes": ["the prompt we send matches build_prompt() character for character ..."]}}+```++只看 `status`:`ok` 就是自检通过、服务可用,`prompt` 下的其余字段是自检留下的明细,照上面的样子即为正常。`status` 不是 `ok` 时,`prompt.notes` 写明是哪一项没过。++`served_model` 是引擎启动时的权重路径(SGLang 按路径标识模型,一个进程只服务一个模型)。本机没有权重目录或没装 `transformers` 时,`token_equality` 为 `skipped`,这是跳过不是失败,`notes` 会说明原因。diff --git a/docs/swift_minicpm_ocr_french.md b/docs/swift_minicpm_ocr_french.mdnew file mode 100644index 0000000..61de4b3--- /dev/null+++ b/docs/swift_minicpm_ocr_french.md@@ -0,0 +1,239 @@+# MiniCPM-OCR 1.0 微调教程(ms-swift)++[English](swift_minicpm_ocr_french_en.md)++## 模型与任务概述++本文使用 [Teklia/RIMES-2011-line](https://huggingface.co/datasets/Teklia/RIMES-2011-line) 数据,对 [MiniCPM-OCR 1.0](https://huggingface.co/openbmb/MiniCPM-OCR-1.0) 进行法语手写文本行识别的微调示例。++训练任务:++- 输入法语手写文本行图片,提示词为 `Text Recognition:`。+- `assistant` 输出图片对应的法语文本。++本次训练使用全参数 SFT,训练视觉编码器和语言模型,冻结多模态投影层;视觉 Token 压缩率为 4x。++## 环境准备++代码仓库:[tsjyma/ms-swift](https://github.com/tsjyma/ms-swift)。++**最小可运行安装步骤**++```bash+conda create -n "MiniCPM-OCR-French-Swift" python=3.11 -y+conda activate "MiniCPM-OCR-French-Swift"++pip install torch==2.9.1 torchvision==0.24.1 torchaudio==2.9.1++git clone https://github.com/tsjyma/ms-swift.git+cd ms-swift+git checkout 903565756360d81fdc16fa14b0340a6e17ace900+pip install -e .++pip install \+ accelerate==1.13.0 deepspeed==0.18.8 \+ peft==0.18.1 trl==0.24.0 datasets==4.8.4 \+ flash-linear-attention==0.4.2 \+ ninja einops safetensors tokenizers sentencepiece++pip install /path/to/transformers+```++最后安装最新的 Transformers 源码(> 5.20.2)。++**依赖版本参考**++```text+Python 3.11.11+PyTorch 2.9.1+cu128+torchvision 0.24.1+torchaudio 2.9.1+Transformers > 5.20.2+DeepSpeed 0.18.8+Accelerate 1.13.0+PEFT 0.18.1+TRL 0.24.0+flash-linear-attention 0.4.2+datasets 4.8.4+ms-swift 4.7.0.dev0+```++## 数据准备++使用 RIMES 官方的训练、验证和测试划分。++- 过滤含 `¤` 标注标记的训练样本,验证集和测试集只删除该分隔符并保留文本,同时保留大小写、重音符号、标点、内部空格和原始文本行图片。++| 数据集 | 样本数 |+| --- | ---: |+| 训练集 | 10,138 |+| 验证集 | 1,138 |+| 测试集 | 778 |++下载数据后,将图片路径与对应转写文本整理为以下 JSONL 格式。++**数据格式示例**++++```json+{+ "messages": [+ {+ "role": "user",+ "content": "<image>Text Recognition:"+ },+ {+ "role": "assistant",+ "content": "J'ai perdu mon emploi depuis 3 mois et je me"+ }+ ],+ "images": [+ "/path/to/rimes_french/images/train/00000.jpg"+ ]+}+```++ms-swift 模板会在图像占位符后补换行,因此 JSONL 中使用 `<image>Text Recognition:`。++## 启动训练++在单机 8 × A100 80GB 上训练 3 epoch,每轮 80 个更新步,共 240 步。每卡 batch size 为 1,梯度累积 16 步,全局 batch size 为 128。每轮使用完整验证集计算 loss 并保存检查点,训练结束后选择验证 loss 最低的检查点。++- 训练时追加 `<think>\n\n</think>\n\n`,用户提示词、图像和空思考前缀不参与 loss,答案及结束标记参与监督。++执行环境准备后,运行以下脚本:++```bash+set -euo pipefail+export CUDA_VISIBLE_DEVICES="${CUDA_VISIBLE_DEVICES:-0,1,2,3,4,5,6,7}"+export NPROC_PER_NODE=8+export MASTER_ADDR=127.0.0.1 MASTER_PORT=29781+export DOWNSAMPLE_MODE=4x++DOC_DIR=/path/to/ocr_doc+MODEL_PATH=/path/to/MiniCPM-OCR-1.0+TRAIN_DATA=/path/to/rimes_french/train_swift.jsonl+VAL_DATA=/path/to/rimes_french/validation_swift.jsonl+OUTPUT_DIR=/path/to/outputs/minicpm_ocr_french_swift++swift sft \+ --model "$MODEL_PATH" \+ --model_type minicpm_ocr \+ --template minicpm_ocr \+ --add_non_thinking_prefix true \+ --dataset "$TRAIN_DATA" \+ --split_dataset_ratio 0.0 \+ --deepspeed "$DOC_DIR/assets/minicpm-ocr/ds_zero2.json" \+ --tuner_type full \+ --torch_dtype bfloat16 \+ --freeze_vit false \+ --freeze_aligner true \+ --freeze_llm false \+ --packing false \+ --padding_free false \+ --max_length 4096 \+ --num_train_epochs 3.0 \+ --per_device_train_batch_size 1 \+ --gradient_accumulation_steps 16 \+ --gradient_checkpointing true \+ --vit_gradient_checkpointing true \+ --gradient_checkpointing_kwargs '{"use_reentrant": false}' \+ --learning_rate 5e-06 \+ --lr_scheduler_type cosine \+ --warmup_ratio 0.05 \+ --optim adamw_torch_fused \+ --adam_beta1 0.9 \+ --adam_beta2 0.95 \+ --adam_epsilon 1e-08 \+ --weight_decay 0.1 \+ --max_grad_norm 1.0 \+ --logging_steps 1 \+ --save_total_limit 3 \+ --save_only_model false \+ --load_from_cache_file false \+ --dataset_num_proc 8 \+ --dataloader_num_workers 8 \+ --attn_impl sdpa \+ --loss_scale ignore_empty_think \+ --eval_strategy epoch \+ --output_dir "$OUTPUT_DIR" \+ --report_to none \+ --seed 42 \+ --data_seed 42 \+ --add_version false \+ --use_hf true \+ --dataset_shuffle false \+ --train_dataloader_shuffle true \+ --val_dataset "$VAL_DATA" \+ --save_strategy epoch \+ --load_best_model_at_end true \+ --metric_for_best_model eval_loss \+ --greater_is_better false \+ --per_device_eval_batch_size 1+```++## 训练曲线++++| 训练轮数 | 更新步数 | 训练时长 | 平均训练 loss |+| ---: | ---: | --- | ---: |+| 3 | 240 | 34 分 22 秒 | 0.203644 |++| 模型 | Epoch | Validation loss ↓ |+| --- | ---: | ---: |+| MiniCPM-OCR 1.0 | 0 | 1.683164 |+| Fine-tuned model | 1 | 0.225709 |+| Fine-tuned model | 2 | 0.206930 |+| Fine-tuned model | 3 | 0.208526 |++本轮选择第 2 epoch 的 `checkpoint-160`;下文评测结果使用该检查点。++## 评测结果++在 RIMES 官方测试集全部 778 行上评测。原始模型与微调后的模型统一使用 4x 视觉 Token 压缩率、非 thinking 模式、greedy 解码和 batch size 8,每行最多生成 512 tokens。提示词沿用训练时的 `Text Recognition:`。++评测指标说明:++| 指标 | 说明 |+| --- | --- |+| CER ↓ | 字符错误率:字符编辑距离总和除以参考字符总数,越低越好。 |+| WER ↓ | 词错误率:按空格分词后,词级编辑距离总和除以参考词总数,越低越好。 |++两项指标均使用完整模型输出,统一 Unicode NFC、去除首尾空白,保留大小写、重音符号、标点和内部空格。++| 模型 | RIMES CER ↓ | RIMES WER ↓ |+| --- | ---: | ---: |+| MiniCPM-OCR 1.0 | 5.67% | 15.78% |+| Fine-tuned model | 3.08% | 7.86% |++**输出样例**++以下为所选检查点在 RIMES 测试图片上的实际输出。++**样例 1:保险合同文本**++++```text+# Question+<image>+Text Recognition:++# Fine-tuned model+Comme indiqué dans les conditions particulières de mon contrat d'assurance+```++**样例 2:地址与日期**++++```text+# Question+<image>+Text Recognition:++# Fine-tuned model+de mon domicile du 3 Rue Gambetta, 57000 METZ, en date du 28 février+```diff --git a/docs/swift_minicpm_ocr_french_en.md b/docs/swift_minicpm_ocr_french_en.mdnew file mode 100644index 0000000..b330214--- /dev/null+++ b/docs/swift_minicpm_ocr_french_en.md@@ -0,0 +1,239 @@+# MiniCPM-OCR 1.0 Fine-Tuning Tutorial (ms-swift)++[中文版](swift_minicpm_ocr_french.md)++## Model and Task Overview++This tutorial uses the [Teklia/RIMES-2011-line](https://huggingface.co/datasets/Teklia/RIMES-2011-line) dataset as an example of fine-tuning [MiniCPM-OCR 1.0](https://huggingface.co/openbmb/MiniCPM-OCR-1.0) for French handwritten text-line recognition.++Training task:++- Input a French handwritten text-line image with the prompt `Text Recognition:`.+- The target `assistant` response is the corresponding French transcription.++This training run uses full-parameter SFT to train the vision encoder and language model while freezing the multimodal projector, with 4x visual token compression.++## Environment Setup++Source: [tsjyma/ms-swift](https://github.com/tsjyma/ms-swift)++**Minimum runnable installation steps**++```bash+conda create -n "MiniCPM-OCR-French-Swift" python=3.11 -y+conda activate "MiniCPM-OCR-French-Swift"++pip install torch==2.9.1 torchvision==0.24.1 torchaudio==2.9.1++git clone https://github.com/tsjyma/ms-swift.git+cd ms-swift+git checkout 903565756360d81fdc16fa14b0340a6e17ace900+pip install -e .++pip install \+ accelerate==1.13.0 deepspeed==0.18.8 \+ peft==0.18.1 trl==0.24.0 datasets==4.8.4 \+ flash-linear-attention==0.4.2 \+ ninja einops safetensors tokenizers sentencepiece++pip install /path/to/transformers+```++Install the latest Transformers source last (> 5.20.2).++**Reference dependency versions**++```text+Python 3.11.11+PyTorch 2.9.1+cu128+torchvision 0.24.1+torchaudio 2.9.1+Transformers > 5.20.2+DeepSpeed 0.18.8+Accelerate 1.13.0+PEFT 0.18.1+TRL 0.24.0+flash-linear-attention 0.4.2+datasets 4.8.4+ms-swift 4.7.0.dev0+```++## Data Preparation++Use the official RIMES training, validation, and test splits.++- Exclude training samples that contain the `¤` annotation marker. For validation and test samples, remove only the delimiter and keep the text, while preserving case, accents, punctuation, internal spaces, and the original text-line images.++| Dataset | Samples |+| --- | ---: |+| Training | 10,138 |+| Validation | 1,138 |+| Test | 778 |++After downloading the dataset, pair each image path with its transcription in the JSONL format below.++**Data format reference**++++```json+{+ "messages": [+ {+ "role": "user",+ "content": "<image>Text Recognition:"+ },+ {+ "role": "assistant",+ "content": "J'ai perdu mon emploi depuis 3 mois et je me"+ }+ ],+ "images": [+ "/path/to/rimes_french/images/train/00000.jpg"+ ]+}+```++The ms-swift template inserts a newline after the image placeholder, so use `<image>Text Recognition:` in JSONL.++## Launch Training++Train for three epochs on one node with 8 × A100 80GB GPUs: 80 updates per epoch and 240 updates in total. Per-device batch size 1 and gradient accumulation 16 give a global batch size of 128. Evaluate on the complete validation set and save a checkpoint after each epoch, then select the checkpoint with the lowest validation loss.++- Training appends `<think>\n\n</think>\n\n`. User text, image tokens, and the empty thinking prefix are masked from loss; the answer and end markers are supervised.++Run the following script after Environment Setup:++```bash+set -euo pipefail+export CUDA_VISIBLE_DEVICES="${CUDA_VISIBLE_DEVICES:-0,1,2,3,4,5,6,7}"+export NPROC_PER_NODE=8+export MASTER_ADDR=127.0.0.1 MASTER_PORT=29781+export DOWNSAMPLE_MODE=4x++DOC_DIR=/path/to/ocr_doc+MODEL_PATH=/path/to/MiniCPM-OCR-1.0+TRAIN_DATA=/path/to/rimes_french/train_swift.jsonl+VAL_DATA=/path/to/rimes_french/validation_swift.jsonl+OUTPUT_DIR=/path/to/outputs/minicpm_ocr_french_swift++swift sft \+ --model "$MODEL_PATH" \+ --model_type minicpm_ocr \+ --template minicpm_ocr \+ --add_non_thinking_prefix true \+ --dataset "$TRAIN_DATA" \+ --split_dataset_ratio 0.0 \+ --deepspeed "$DOC_DIR/assets/minicpm-ocr/ds_zero2.json" \+ --tuner_type full \+ --torch_dtype bfloat16 \+ --freeze_vit false \+ --freeze_aligner true \+ --freeze_llm false \+ --packing false \+ --padding_free false \+ --max_length 4096 \+ --num_train_epochs 3.0 \+ --per_device_train_batch_size 1 \+ --gradient_accumulation_steps 16 \+ --gradient_checkpointing true \+ --vit_gradient_checkpointing true \+ --gradient_checkpointing_kwargs '{"use_reentrant": false}' \+ --learning_rate 5e-06 \+ --lr_scheduler_type cosine \+ --warmup_ratio 0.05 \+ --optim adamw_torch_fused \+ --adam_beta1 0.9 \+ --adam_beta2 0.95 \+ --adam_epsilon 1e-08 \+ --weight_decay 0.1 \+ --max_grad_norm 1.0 \+ --logging_steps 1 \+ --save_total_limit 3 \+ --save_only_model false \+ --load_from_cache_file false \+ --dataset_num_proc 8 \+ --dataloader_num_workers 8 \+ --attn_impl sdpa \+ --loss_scale ignore_empty_think \+ --eval_strategy epoch \+ --output_dir "$OUTPUT_DIR" \+ --report_to none \+ --seed 42 \+ --data_seed 42 \+ --add_version false \+ --use_hf true \+ --dataset_shuffle false \+ --train_dataloader_shuffle true \+ --val_dataset "$VAL_DATA" \+ --save_strategy epoch \+ --load_best_model_at_end true \+ --metric_for_best_model eval_loss \+ --greater_is_better false \+ --per_device_eval_batch_size 1+```++## Training Curves++++| Epochs | Updates | Training time | Mean training loss |+| ---: | ---: | --- | ---: |+| 3 | 240 | 34m 22s | 0.203644 |++| Model | Epoch | Validation loss ↓ |+| --- | ---: | ---: |+| MiniCPM-OCR 1.0 | 0 | 1.683164 |+| Fine-tuned model | 1 | 0.225709 |+| Fine-tuned model | 2 | 0.206930 |+| Fine-tuned model | 3 | 0.208526 |++Select `checkpoint-160` at epoch two. The evaluation results below use this checkpoint.++## Evaluation Results++Evaluate on all 778 official RIMES test lines. Both the base and fine-tuned model use 4x visual token compression, non-thinking mode, greedy decoding, batch size 8, and a maximum of 512 newly generated tokens per line. Use the same prompt, `Text Recognition:`, as in training.++Evaluation metrics:++| Metric | Description |+| --- | --- |+| CER ↓ | Character error rate: total character edit distance divided by the total number of reference characters. Lower is better. |+| WER ↓ | Word error rate: total word edit distance divided by the total number of reference words, using whitespace-delimited words. Lower is better. |++Both metrics use complete model outputs, normalize Unicode to NFC, trim leading/trailing whitespace, and preserve case, accents, punctuation, and internal spaces.++| Model | RIMES CER ↓ | RIMES WER ↓ |+| --- | ---: | ---: |+| MiniCPM-OCR 1.0 | 5.67% | 15.78% |+| Fine-tuned model | 3.08% | 7.86% |++**Output examples**++The examples below are actual outputs from the selected checkpoint on RIMES test images.++**Example 1: Insurance contract**++++```text+# Question+<image>+Text Recognition:++# Fine-tuned model+Comme indiqué dans les conditions particulières de mon contrat d'assurance+```++**Example 2: Address and date**++++```text+# Question+<image>+Text Recognition:++# Fine-tuned model+de mon domicile du 3 Rue Gambetta, 57000 METZ, en date du 28 février+```diff --git a/docs/vllm_deploy.md b/docs/vllm_deploy.mdnew file mode 100644index 0000000..1111a43--- /dev/null+++ b/docs/vllm_deploy.md@@ -0,0 +1,218 @@+# MiniCPM-OCR 1.0 — vLLM 部署指南++[English](./vllm_deploy_en.md)++本文介绍如何使用 vLLM 部署 MiniCPM-OCR 1.0,包括 OpenAI 兼容 API 服务、图片识别、离线推理,以及 SDK 文档解析。++- 主模型:[MiniCPM-OCR-1.0](https://huggingface.co/openbmb/MiniCPM-OCR-1.0)+- DSpark 草稿模型:[MiniCPM-OCR-1.0-DSpark](https://huggingface.co/openbmb/MiniCPM-OCR-1.0-DSpark),加速部署见 [SDK 使用教程](./minicpmvocr_tutorial.md#3-启动服务)+- vLLM 版本:`xxx`+- Transformers 版本:`xxx`+- Python 版本:`xxx`+++## 1. 环境准备++为 vLLM 创建独立环境,安装指定版本:++```bash+conda create -n minicpm-ocr-vllm python=xxx -y+conda activate minicpm-ocr-vllm++pip install 'vllm==xxx' 'transformers==xxx' 'openai==xxx' pillow+```++检查安装版本:++```bash+python -c "import vllm, transformers; print('vllm', vllm.__version__, '| transformers', transformers.__version__)"+```++从 [openbmb/MiniCPM-OCR-1.0](https://huggingface.co/openbmb/MiniCPM-OCR-1.0) 将完整主模型下载到本地目录 `/path/to/MiniCPM-OCR`。后续示例统一使用该路径。++## 2. API 服务部署++### 2.1 启动 API 服务++```bash+vllm serve /path/to/MiniCPM-OCR \+ --served-model-name minicpm-ocr \+ --host 127.0.0.1 \+ --port 18499 \+ --dtype auto \+ --max-model-len 16384 \+ --gpu-memory-utilization 0.8 \+ --max-num-batched-tokens 8192 \+ --limit-mm-per-prompt '{"image":1,"video":0}' \+ --trust-request-mm-kwargs \+ --mm-processor-kwargs '{"downsample_mode":"4x","max_slice_nums":9}' \+ --api-key token-abc123+```++- `/path/to/MiniCPM-OCR`:本地主模型目录,也可替换为模型仓库 ID `openbmb/MiniCPM-OCR-1.0`。+- `--served-model-name`:客户端请求使用的模型名称。+- `--max-model-len`:最大上下文长度,包含输入与输出 token。+- `--gpu-memory-utilization`:服务可使用的 GPU 显存比例。+- `--max-num-batched-tokens`:批处理 token 预算。+- `--limit-mm-per-prompt`:本例每次请求允许一张图片,并关闭视频输入及其启动预热;PDF 由 SDK 转成图片后识别。+- `--api-key`:示例访问密钥,实际部署时替换为自己的密钥。++上下文长度、显存比例和批处理预算为示例值,需根据模型配置及设备调整。SDK 会逐请求发送 `mm_processor_kwargs`,因此这里显式允许该参数。固定 vLLM 版本必须支持 `downsample_mode`、`max_slice_nums` 及 SDK 的采样字段;若不支持,不能仅凭服务能启动就认定可接入 SDK。`--trust-remote-code` 及相关补丁以最终模型适配要求为准。++服务启动后,在另一终端检查模型列表:++```bash+curl -fsS http://127.0.0.1:18499/v1/models \+ -H 'Authorization: Bearer token-abc123'+```++预期返回的模型列表包含 `minicpm-ocr`。++### 2.2 图片识别++准备含有文字的图片 `sample.png`,使用 OpenAI Python 客户端发送请求:++```python+import base64+from pathlib import Path++from openai import OpenAI++client = OpenAI(+ api_key="token-abc123",+ base_url="http://127.0.0.1:18499/v1",+)++image_base64 = base64.b64encode(Path("sample.png").read_bytes()).decode("utf-8")++response = client.chat.completions.create(+ model="minicpm-ocr",+ messages=[+ {+ "role": "user",+ "content": [+ {+ "type": "image_url",+ "image_url": {"url": f"data:image/png;base64,{image_base64}"},+ },+ {"type": "text", "text": "Text Recognition:"},+ ],+ }+ ],+ temperature=0.01,+ top_p=0.001,+ max_tokens=2048,+ extra_body={+ "top_k": 1,+ "repetition_penalty": 1.0,+ "no_repeat_ngram_size": 100,+ "chat_template_kwargs": {"enable_thinking": False},+ "mm_processor_kwargs": {"downsample_mode": "4x", "max_slice_nums": 9},+ },+)++print(response.choices[0].message.content)+print("finish_reason:", response.choices[0].finish_reason)+```++请求中将图片放在文字前面。`api_key` 与服务启动参数保持一致,`model` 与 `--served-model-name` 保持一致。++### 2.3 表格与公式识别++按图片内容替换上面示例的提示词:++- 文字:`Text Recognition:`+- 表格:`Table Recognition:`+- 公式:`Formula Recognition:`++建议分别使用裁切后的文字块、表格块和公式块进行测试。表格原始返回格式取决于模型版本;通过 SDK 解析时,可由 SDK 完成相应后处理。++### 2.4 检查识别结果++测试时确认:++- 返回正文非空,且与图片中的文字一致。+- 表格和公式保留预期结构。+- `finish_reason` 不为 `length`;如为 `length`,检查是否截断并调整输出预算。++健康检查成功只说明服务可访问,不能代替图片识别测试。完成测试后,在服务终端按 `Ctrl+C` 停止服务。++## 3. 离线推理++不启动 HTTP 服务时,可在 vLLM 环境中直接调用模型:++```python+from PIL import Image+from transformers import AutoProcessor+from vllm import LLM, SamplingParams++model_path = "/path/to/MiniCPM-OCR"+image = Image.open("sample.png").convert("RGB")+processor = AutoProcessor.from_pretrained(model_path)++llm = LLM(+ model=model_path,+ max_model_len=16384,+ gpu_memory_utilization=0.8,+ limit_mm_per_prompt={"image": 1, "video": 0},+)++messages = [+ {+ "role": "user",+ "content": [+ {"type": "image"},+ {"type": "text", "text": "Text Recognition:"},+ ],+ }+]+prompt = processor.apply_chat_template(+ messages,+ tokenize=False,+ add_generation_prompt=True,+)++outputs = llm.generate(+ {"prompt": prompt, "multi_modal_data": {"image": image}},+ sampling_params=SamplingParams(+ temperature=0.01,+ top_p=0.001,+ top_k=1,+ max_tokens=2048,+ ),+)++print(outputs[0].outputs[0].text)+print("finish_reason:", outputs[0].outputs[0].finish_reason)+```++该示例以模型提供兼容的 `AutoProcessor` 和聊天模板为前提;自定义处理器加载方式、thinking 开关与停止 token 应随正式模型版本补齐,不能直接套用其他 MiniCPM-V 版本的设置。离线推理会单独加载模型,不要在显存不足时与 API 服务同时运行。++## 4. 使用 SDK 解析文档++API 图片识别适合单个图像块;PDF 或整页文档可使用 MiniCPM-OCR SDK 完成版面检测、裁切与 Markdown 导出。++先按[SDK 使用教程](./minicpmvocr_tutorial.md#安装)安装 SDK、准备版面模型,然后切换到 SDK 环境,在项目仓库根目录执行:++```bash+minicpmvocr parse --config sdk/minicpmvocr/configs/minicpmvocr.yaml \+ --backend vllm --server-url http://127.0.0.1:18499 --model minicpm-ocr \+ --set layout.model_dir=/path/to/PP-DocLayoutV3 --set layout.device=cpu \+ --set engine.max_model_len=16384 \+ --set engine.api_key=token-abc123 \+ --input document.pdf --output document.md+```++预期生成 `document.md`,日志中无失败页面或识别块。检查文字、表格、公式和阅读顺序,确认没有空输出或截断。详细步骤见教程的[解析文档](./minicpmvocr_tutorial.md#4-解析文档)章节。++## 注意事项++1. **版本匹配**:使用发布指定的 vLLM 与 Transformers 版本,不使用浮动版本替代。+2. **模型配置**:保留完整 tokenizer、processor 和聊天模板文件;停止 token 与特殊模板参数使用模型自身配置。+3. **显存调整**:优先根据显存调整上下文、并发和批处理预算,不将示例设置视为硬件支持承诺。+4. **接口地址**:OpenAI Python 客户端使用带 `/v1` 的地址,MiniCPM-OCR SDK 配置使用不带 `/v1` 的服务根地址。+5. **网络访问**:本例仅监听本机。跨主机部署时,通过受保护的网络入口访问,并配置鉴权。++## 采样参数++示例使用 `temperature=0.01`、`top_p=0.001`、`top_k=1`,减少 OCR 输出随机性。`max_tokens` 根据识别块长度调整;长表格可能需要更大的输出预算,但输入与输出总长度不能超过上下文上限。diff --git a/docs/vllm_deploy_en.md b/docs/vllm_deploy_en.mdnew file mode 100644index 0000000..9fcb240--- /dev/null+++ b/docs/vllm_deploy_en.md@@ -0,0 +1,217 @@+# MiniCPM-OCR 1.0 — vLLM Deployment Guide++[中文](./vllm_deploy.md)++This guide covers deploying MiniCPM-OCR 1.0 with vLLM, including an OpenAI-compatible API service, image recognition, offline inference, and document parsing with the SDK.++- Main model: [MiniCPM-OCR-1.0](https://huggingface.co/openbmb/MiniCPM-OCR-1.0)+- DSpark draft model: [MiniCPM-OCR-1.0-DSpark](https://huggingface.co/openbmb/MiniCPM-OCR-1.0-DSpark). For accelerated deployment, see the [SDK tutorial](./minicpmvocr_tutorial_en.md#3-start-the-service).+- vLLM version: `xxx`+- Transformers version: `xxx`+- Python version: `xxx`++## 1. Environment Setup++Create a separate environment for vLLM and install the specified versions:++```bash+conda create -n minicpm-ocr-vllm python=xxx -y+conda activate minicpm-ocr-vllm++pip install 'vllm==xxx' 'transformers==xxx' 'openai==xxx' pillow+```++Check the installed versions:++```bash+python -c "import vllm, transformers; print('vllm', vllm.__version__, '| transformers', transformers.__version__)"+```++Download the complete main model from [openbmb/MiniCPM-OCR-1.0](https://huggingface.co/openbmb/MiniCPM-OCR-1.0) to the local directory `/path/to/MiniCPM-OCR`. The examples below consistently use this path.++## 2. API Service Deployment++### 2.1 Start the API Service++```bash+vllm serve /path/to/MiniCPM-OCR \+ --served-model-name minicpm-ocr \+ --host 127.0.0.1 \+ --port 18499 \+ --dtype auto \+ --max-model-len 16384 \+ --gpu-memory-utilization 0.8 \+ --max-num-batched-tokens 8192 \+ --limit-mm-per-prompt '{"image":1,"video":0}' \+ --trust-request-mm-kwargs \+ --mm-processor-kwargs '{"downsample_mode":"4x","max_slice_nums":9}' \+ --api-key token-abc123+```++- `/path/to/MiniCPM-OCR`: Local main-model directory; you can also use the model repository ID `openbmb/MiniCPM-OCR-1.0`.+- `--served-model-name`: Model name used in client requests.+- `--max-model-len`: Maximum context length, including input and output tokens.+- `--gpu-memory-utilization`: Fraction of GPU memory available to the service.+- `--max-num-batched-tokens`: Batched token budget.+- `--limit-mm-per-prompt`: This example allows one image per request and disables video input and its startup warmup; the SDK converts PDFs into images for recognition.+- `--api-key`: Example access key; replace it with your own key for deployment.++Context length, GPU memory fraction, and batched token budget are example values; adjust them to the model configuration and device. The SDK sends `mm_processor_kwargs` in each request, so the service explicitly permits that parameter. The pinned vLLM version must support `downsample_mode`, `max_slice_nums`, and the SDK's sampling fields. Successful startup alone does not establish SDK compatibility. Follow the final model integration requirements for `--trust-remote-code` and any patches.++After startup, check the model list from another terminal:++```bash+curl -fsS http://127.0.0.1:18499/v1/models \+ -H 'Authorization: Bearer token-abc123'+```++The returned model list should include `minicpm-ocr`.++### 2.2 Image Recognition++Prepare an image containing text as `sample.png`, then send a request with the OpenAI Python client:++```python+import base64+from pathlib import Path++from openai import OpenAI++client = OpenAI(+ api_key="token-abc123",+ base_url="http://127.0.0.1:18499/v1",+)++image_base64 = base64.b64encode(Path("sample.png").read_bytes()).decode("utf-8")++response = client.chat.completions.create(+ model="minicpm-ocr",+ messages=[+ {+ "role": "user",+ "content": [+ {+ "type": "image_url",+ "image_url": {"url": f"data:image/png;base64,{image_base64}"},+ },+ {"type": "text", "text": "Text Recognition:"},+ ],+ }+ ],+ temperature=0.01,+ top_p=0.001,+ max_tokens=2048,+ extra_body={+ "top_k": 1,+ "repetition_penalty": 1.0,+ "no_repeat_ngram_size": 100,+ "chat_template_kwargs": {"enable_thinking": False},+ "mm_processor_kwargs": {"downsample_mode": "4x", "max_slice_nums": 9},+ },+)++print(response.choices[0].message.content)+print("finish_reason:", response.choices[0].finish_reason)+```++Place the image before the text in the request. Match `api_key` to the service startup argument and `model` to `--served-model-name`.++### 2.3 Table and Formula Recognition++Replace the prompt in the example according to the image content:++- Text: `Text Recognition:`+- Table: `Table Recognition:`+- Formula: `Formula Recognition:`++Test cropped text, table, and formula regions separately. The raw table output format depends on the model version; the SDK can perform the corresponding postprocessing when parsing documents.++### 2.4 Check Recognition Results++During testing, verify that:++- The response content is nonempty and matches the text in the image.+- Tables and formulas retain the expected structure.+- `finish_reason` is not `length`; if it is, check for truncation and adjust the output budget.++A successful health check only confirms that the service is reachable; it does not replace an image recognition test. After testing, press `Ctrl+C` in the service terminal to stop it.++## 3. Offline Inference++To run without an HTTP service, call the model directly in the vLLM environment:++```python+from PIL import Image+from transformers import AutoProcessor+from vllm import LLM, SamplingParams++model_path = "/path/to/MiniCPM-OCR"+image = Image.open("sample.png").convert("RGB")+processor = AutoProcessor.from_pretrained(model_path)++llm = LLM(+ model=model_path,+ max_model_len=16384,+ gpu_memory_utilization=0.8,+ limit_mm_per_prompt={"image": 1, "video": 0},+)++messages = [+ {+ "role": "user",+ "content": [+ {"type": "image"},+ {"type": "text", "text": "Text Recognition:"},+ ],+ }+]+prompt = processor.apply_chat_template(+ messages,+ tokenize=False,+ add_generation_prompt=True,+)++outputs = llm.generate(+ {"prompt": prompt, "multi_modal_data": {"image": image}},+ sampling_params=SamplingParams(+ temperature=0.01,+ top_p=0.001,+ top_k=1,+ max_tokens=2048,+ ),+)++print(outputs[0].outputs[0].text)+print("finish_reason:", outputs[0].outputs[0].finish_reason)+```++This example assumes that the model provides a compatible `AutoProcessor` and chat template. Custom processor loading, the thinking switch, and stop tokens need to be completed for the final model release; do not directly reuse settings from other MiniCPM-V versions. Offline inference loads a separate model instance, so avoid running it alongside the API service when GPU memory is insufficient.++## 4. Parse Documents with the SDK++The image recognition API handles individual image regions. For PDFs or full-page documents, use the MiniCPM-OCR SDK for layout detection, cropping, and Markdown export.++Follow the [SDK tutorial](./minicpmvocr_tutorial_en.md#installation) to install the SDK and prepare the layout model, then activate the SDK environment and run the following from the repository root:++```bash+minicpmvocr parse --config sdk/minicpmvocr/configs/minicpmvocr.yaml \+ --backend vllm --server-url http://127.0.0.1:18499 --model minicpm-ocr \+ --set layout.model_dir=/path/to/PP-DocLayoutV3 --set layout.device=cpu \+ --set engine.max_model_len=16384 \+ --set engine.api_key=token-abc123 \+ --input document.pdf --output document.md+```++The command should produce `document.md` with no failed pages or recognition regions in the logs. Inspect text, tables, formulas, and reading order, and check for empty or truncated output. See [Parse documents](./minicpmvocr_tutorial_en.md#4-parse-documents) for detailed steps.++## Notes++1. **Version compatibility**: Use the vLLM and Transformers versions specified for the release; do not substitute unpinned versions.+2. **Model configuration**: Keep the complete tokenizer, processor, and chat template files. Use the model's own stop tokens and special template parameters.+3. **GPU memory**: Adjust context length, concurrency, and batched token budget to available memory. Example settings are not a guarantee of hardware support.+4. **Endpoint URLs**: The OpenAI Python client uses a URL with `/v1`; the MiniCPM-OCR SDK uses the service root URL without `/v1`.+5. **Network access**: This example listens on localhost only. For cross-host deployment, use a protected network entry point and configure authentication.++## Sampling Parameters++The examples use `temperature=0.01`, `top_p=0.001`, and `top_k=1` to reduce randomness in OCR output. Adjust `max_tokens` to the length of the recognition region. Long tables may need a larger output budget, but the combined input and output length must remain within the context limit.diff --git a/docs/vllm_deploy_jev_en.md b/docs/vllm_deploy_jev_en.mdnew file mode 100644index 0000000..0c32ee7--- /dev/null+++ b/docs/vllm_deploy_jev_en.md@@ -0,0 +1,230 @@+# SDK Local Deployment: vLLM Backend++[中文版](vllm_deploy_jev_zh.md)++[← Back to the deployment guide](./minicpm_ocr_jev_tutorial_en.md)++This document covers the SDK deployment path with vLLM as the forward engine: how to install, start, and call the **score service** and the **render+score service**.++Both services share one forward engine. The only difference is where the render image comes from:++| | Score service | Render+score service |+| ---- | -------------------------------------- | ---------------------------------------------------- |+| Render image | You provide it | The service renders it by default (you may also provide it) |+| Render environment | **Not needed** — no Chromium, Node or fonts | Needed |+| Endpoint | `/v1/score`, returns `prob_1` | `/v1/rm/score*`, returns `prob_yes`, identical to the Docker image |+| Features | Scoring only | Scoring, best-of-N within a block, batched best-of-N, with precheck |+| Start script | `sdk/start_score.sh` | `sdk/start_render_score.sh` |++## Deployment steps++1. Install the engine environment and start the forward engine (both services need it)+2. Pick one:+ - **Score service** → install the service environment → start the service+ - **Render+score service** → install the render environment → start the service++The engine and the service must go into two separate virtual environments; do not merge them. All commands below run from `scripts/minicpm-ocr-jev/`.++## Requirements++- **GPU**: NVIDIA, ≥12GB VRAM+- **Driver**: ≥535+- **Python**: ≥3.10+- **vLLM**: 0.32.0+- **System packages**: `gcc`, `g++`, `python3-dev` (runtime dependencies — do not remove them after installing)+- **Pinned versions**: `Pillow` 12.3.0, `playwright` 1.62.0 (render+score service only)++---++## 1. Forward engine++Both services need a vLLM engine to connect to.++Install and start it with the bundled scripts; the arguments are GPU index, port, and weights path, in that order:++```bash+bash serve/setup_backend.sh /opt/venv-vllm+PATH=/opt/venv-vllm/bin:$PATH bash sdk/start_engine.sh 0 18499 /path/to/weights+```++Or run the equivalent commands by hand:++```bash+python3 -m venv /opt/venv-vllm && source /opt/venv-vllm/bin/activate+pip install vllm++vllm serve /path/to/weights \+ --served-model-name minicpm-ocr-jev \+ --runner pooling --convert classify \+ --hf-overrides '{"num_labels": 2}' \+ --limit-mm-per-prompt '{"image": 2}' \+ --chat-template-content-format openai \+ --gpu-memory-utilization 0.80 \+ --host 127.0.0.1 --port 18499+```++- `--hf-overrides '{"num_labels": 2}'`: the checkpoint's `config.json` omits `num_labels`, so it has to be given explicitly. Do not override `architectures` at the same time.+- `--chat-template-content-format openai`: required. With the default value the image/text order does not match training, while requests still return 200 and scores still land in a plausible range.+- `--limit-mm-per-prompt '{"image": 2}'`: every request carries exactly two images, the original and the render.+- Do not add `--chat-template`: the SDK sends an interleaved content list, which the model's own `chat_template.jinja` renders into the training prompt.++---++## 2. Score service++You already have the render image and only want the score.++### Install++```bash+python3 -m venv /opt/venv-score+source /opt/venv-score/bin/activate+pip install "fastapi>=0.110" "uvicorn>=0.27" "httpx>=0.27" "pydantic>=2.6" "PyYAML>=6.0" "Pillow==12.3.0"+```++**Reference dependency versions**++```text+python 3.12.3+fastapi 0.162.0+uvicorn 0.54.0+httpx 0.28.1+pydantic 2.14.1+PyYAML 6.0.3+Pillow 12.3.0+```++### Start++The arguments are the service port and the engine address, in that order:++```bash+PATH=/opt/venv-score/bin:$PATH bash sdk/start_score.sh 18501 http://127.0.0.1:18499+```++The service checks the prompt once at startup; see [4. Startup self-check](#4-startup-self-check).++### Endpoints++| Method | Path | Purpose |+|---|---|---|+| GET | `/healthz` | Service status, the model name the engine actually serves, the prompt template fingerprint and the self-check result |+| POST | `/v1/score` | Score a batch of already rendered candidates |++### Request++```bash+curl -s http://127.0.0.1:18501/v1/score -H 'Content-Type: application/json' -d '{+ "items": [{"original_image": "<base64>", "render_image": "<base64>", "ocr_text": "..."}]+}'+```++```json+{"results": [{"prob_1": 0.00227, "error": null}]}+```++All three fields are required: `original_image` is the base64 of the original block image, `render_image` is the base64 of that candidate rendered back into an image, and `ocr_text` is the candidate text itself. The base64 carries **no** `data:image/png;base64,` prefix, unlike the image API.++### Fields and limits++- `ocr_text` goes to the model as-is; nothing is cleaned up.+- `prob_1` is `softmax(logits)[1]` — no threshold, no label, no logits returned.+- At most 64 items per request (`JEV_MAX_ITEMS` to change it); over the limit returns 413, an empty batch returns an empty result. The number is a guard against packing too many images into one request, not a recommended batch size.+- When a base64 image cannot be decoded, the whole batch returns 422 naming the item and the field. A failure during scoring affects only that one item: it carries an `error` in its own slot and `prob_1` is `null`.++---++## 3. Render+score service++You only have candidate text and want the service to render before scoring. Precheck, render and forward all happen in this one process.++This service calls the scoring layer in-process: it does **not** need a separate score service running, and does not need a port reserved for one.++### Install++```bash+bash sdk/setup_render.sh /opt/venv-render+```++It installs Node, CJK fonts, Chromium and the service dependencies. On a slow network, point it at two mirrors:++```bash+PIP_INDEX_URL=https://<mirror>/simple \+PLAYWRIGHT_DOWNLOAD_HOST=https://<mirror>/playwright \+ bash sdk/setup_render.sh /opt/venv-render+```++### Start++The arguments are the service port and the engine address, in that order:++```bash+PATH=/opt/venv-render/bin:$PATH bash sdk/start_render_score.sh 18500 http://127.0.0.1:18499+```++It must be started with the `/opt/venv-render` interpreter, because it renders in its own process. The number of render processes is set by `RM_RENDER_BROWSERS`; the service runs a single worker, so raise that variable rather than adding workers when you need more throughput.++### Endpoints++Paths and field names are identical to the Docker image, so a caller switching between the image and the SDK does not have to change a single field:++| Method | Path | Purpose |+|---|---|---|+| GET | `/healthz` | As above, plus the supported `input_form` |+| POST | `/v1/rm/score` | Score a batch of "original image + candidate text" pairs, one score each, with a summary |+| POST | `/v1/rm/score_best` | Several candidates for one block; returns the best |+| POST | `/v1/rm/score_best_batch` | Several blocks, each picking its own best, in one request |++For the full field definitions see the [Docker image API reference](./minicpm_ocr_jev_docker_api_en.md) — that document describes the very same endpoints this service exposes.++### Request++Best-of-N within a block:++```bash+curl -s http://127.0.0.1:18500/v1/rm/score_best -H 'Content-Type: application/json' -d '{+ "input_form": "ternary",+ "case_id": "block_01",+ "image": "<base64 of the original block image>",+ "category": "text",+ "candidates": ["candidate A", "candidate B"]+}'+```++```json+{"best_index": 1, "best_text": "candidate B", "scores": [0.00589, 0.99509],+ "verdicts": ["scored", "scored"],+ "stage_sec": {"render_sec": 0.31, "forward_sec": 0.02, "total_sec": 0.34},+ "batch_size": 2}+```++- `input_form` currently takes only `ternary`, and must be sent explicitly.+- `category` must match the real type of the block (`text` / `formula` / `table`). Getting it wrong raises no error but skews the score.+- Passing `render_images` skips server-side rendering; its length must match `candidates`.+- At most 64 candidates per request (`RM_MAX_ITEMS` to change it) — again a guard, not a recommended batch size. All three endpoints count **candidates**, not blocks: `score_best_batch` counts the candidates of all blocks added up, so with 3 candidates per block, 64 only covers 21 blocks.++### The two rates in the summary++`pass_rate` and `throughput_rate` are two different things: the first is the scoring success rate (`scored / total`, independent of any threshold), the second is the pass-threshold rate (items with `prob_yes >= RM_THRESHOLD`, divided by total; the threshold defaults to 0.5 and is configurable). The threshold only enters this one rate — every `prob_yes` is returned as it is.++---++## 4. Startup self-check++Both services check the prompt the engine assembles before accepting the first request. If a change to the engine's startup arguments has changed the structure of the prompt, the self-check fails.++Once the service is up, query `/healthz`; `status: ok` means everything is fine:++```bash+curl -s http://127.0.0.1:18501/healthz+```++```json+{"status": "ok", "served_model": "minicpm-ocr-jev",+ "prompt": {"template_md5": "9aab68e8ba8ab4da17ba9752bddb199c",+ "last_token": 271, "expected_last_token": 271,+ "token_equality": "skipped",+ "notes": ["token-for-token comparison skipped: ..."]}}+```++Look at `status` only: `ok` means the self-check passed and the service is ready. The other fields under `prompt` are self-check details, and the shape above is what a healthy one looks like. When `status` is not `ok`, `prompt.notes` says which part failed.diff --git a/docs/vllm_deploy_jev_zh.md b/docs/vllm_deploy_jev_zh.mdnew file mode 100644index 0000000..7d677de--- /dev/null+++ b/docs/vllm_deploy_jev_zh.md@@ -0,0 +1,230 @@+# SDK 本地部署:vLLM 后端++[English](vllm_deploy_jev_en.md)++[← 返回使用教程](./minicpm_ocr_jev_tutorial_zh.md)++本文介绍SDK部署模式下,以 vLLM 作为前向引擎时,**不带渲染器服务**与**内置渲染器服务**的安装、启动、接口与请求格式。++两种服务共用同一个前向引擎,区别只在渲染图从哪里来:++| | 不带渲染器服务 | 内置渲染器服务 |+| ---- | -------------------------- | ------------------------------------------- |+| 渲染图 | 由你提供 | 服务默认自己渲染(也可由你提供) |+| 渲染环境 | **不需要**,无 Chromium、Node、字体 | 需要 |+| 接口 | `/v1/score`,返回 `prob_1` | `/v1/rm/score*`,返回 `prob_yes`,与 Docker 镜像同构 |+| 功能 | 逐条打分 | 逐条打分、块内选优、批量选优,带 precheck |+| 启动脚本 | `sdk/start_score.sh` | `sdk/start_render_score.sh` |++## 部署流程++1. 装引擎环境,起前向引擎(两种服务都要)+2. 二选一:+ - **不带渲染器服务** → 装服务环境 → 起服务+ - **内置渲染器服务** → 装渲染环境 → 起服务++引擎与服务必须装在两个虚拟环境里,不要合并。以下命令都在 `scripts/minicpm-ocr-jev/` 目录下执行。++## 环境要求++- **GPU**:NVIDIA,显存 ≥12GB+- **驱动**:≥535+- **Python**:≥3.10+- **vLLM**:0.32.0+- **系统包**:`gcc`、`g++`、`python3-dev`(runtime 依赖,装完不要删除)+- **固定版本**:`Pillow` 12.3.0、`playwright` 1.62.0(仅内置渲染器服务)++---++## 一、前向引擎++两种服务都要连一个 vLLM 引擎。++用随附脚本安装并启动,参数依次为 GPU 号、端口、权重路径:++```bash+bash serve/setup_backend.sh /opt/venv-vllm+PATH=/opt/venv-vllm/bin:$PATH bash sdk/start_engine.sh 0 18499 /path/to/weights+```++或手动执行等价命令:++```bash+python3 -m venv /opt/venv-vllm && source /opt/venv-vllm/bin/activate+pip install vllm++vllm serve /path/to/weights \+ --served-model-name minicpm-ocr-jev \+ --runner pooling --convert classify \+ --hf-overrides '{"num_labels": 2}' \+ --limit-mm-per-prompt '{"image": 2}' \+ --chat-template-content-format openai \+ --gpu-memory-utilization 0.80 \+ --host 127.0.0.1 --port 18499+```++- `--hf-overrides '{"num_labels": 2}'`:权重的 `config.json` 没写 `num_labels`,必须显式给出。不要同时覆盖 `architectures`。+- `--chat-template-content-format openai`:必须加。取默认值时图文顺序与训练时不符,而请求照样返回 200、分数照样落在合理区间。+- `--limit-mm-per-prompt '{"image": 2}'`:每个请求固定带原图与渲染图两张图。+- 不要加 `--chat-template`:SDK 发送交错 content list,由模型自带的 `chat_template.jinja` 渲染成训练 prompt。++---++## 二、不带渲染器服务++你已经有渲染图,只要分数。++### 安装++```bash+python3 -m venv /opt/venv-score+source /opt/venv-score/bin/activate+pip install "fastapi>=0.110" "uvicorn>=0.27" "httpx>=0.27" "pydantic>=2.6" "PyYAML>=6.0" "Pillow==12.3.0"+```++**依赖版本参考**++```text+python 3.12.3+fastapi 0.162.0+uvicorn 0.54.0+httpx 0.28.1+pydantic 2.14.1+PyYAML 6.0.3+Pillow 12.3.0+```++### 启动++参数依次为服务端口、引擎地址:++```bash+PATH=/opt/venv-score/bin:$PATH bash sdk/start_score.sh 18501 http://127.0.0.1:18499+```++服务启动时会自检一遍 prompt,见 [四、启动自检](#四启动自检)。++### 接口++| 方法 | 路径 | 用途 |+|---|---|---|+| GET | `/healthz` | 服务状态、引擎实际服务的模型名、prompt 模板指纹与自检结论 |+| POST | `/v1/score` | 给一批已渲染好的候选打分 |++### 请求++```bash+curl -s http://127.0.0.1:18501/v1/score -H 'Content-Type: application/json' -d '{+ "items": [{"original_image": "<base64>", "render_image": "<base64>", "ocr_text": "..."}]+}'+```++```json+{"results": [{"prob_1": 0.00227, "error": null}]}+```++三个字段都是必填:`original_image` 是原始块图的 base64,`render_image` 是该候选渲染回图片后的 base64,`ocr_text` 是候选文本本身。base64 **不带** `data:image/png;base64,` 前缀,与镜像接口不同。++### 字段与限额++- `ocr_text` 原样送进模型,不做任何清洗。+- `prob_1` 是 `softmax(logits)[1]`,不带阈值、不带标签、不回 logits。+- 一次最多 64 条(`JEV_MAX_ITEMS` 可调),超限返回 413;空批返回空结果。这个数是防止单请求塞进过多图片的保护上限,不是推荐批大小。+- 图片 base64 解不开时整批返回 422,并指出是第几条的哪个字段;打分阶段的失败只影响那一条,它在自己那一格里带上 `error`、`prob_1` 为 `null`。++---++## 三、内置渲染器服务++你只有候选文本,让服务渲染完再打分。precheck、render、forward 三个阶段都在这个进程里完成。++本服务在进程内直接调用打分层,**不需要另外起一个不带渲染器服务**,也不需要给它留端口。++### 安装++```bash+bash sdk/setup_render.sh /opt/venv-render+```++它装 Node、CJK 字体、Chromium 与服务依赖。慢网下设两个镜像源:++```bash+PIP_INDEX_URL=https://<mirror>/simple \+PLAYWRIGHT_DOWNLOAD_HOST=https://<mirror>/playwright \+ bash sdk/setup_render.sh /opt/venv-render+```++### 启动++参数依次为服务端口、引擎地址:++```bash+PATH=/opt/venv-render/bin:$PATH bash sdk/start_render_score.sh 18500 http://127.0.0.1:18499+```++必须用 `/opt/venv-render` 这个解释器启动,本进程在自己进程里渲染。渲染进程数量由 `RM_RENDER_BROWSERS` 控制;服务只起一个 worker,要提吞吐请调这个变量而不是加 worker。++### 接口++端点与字段名与 Docker 镜像完全一致,调用方在镜像与 SDK 之间切换时不必改任何字段:++| 方法 | 路径 | 用途 |+|---|---|---|+| GET | `/healthz` | 同上,另报支持的 `input_form` |+| POST | `/v1/rm/score` | 给一批「原图 + 候选文本」逐条打分,返回分数与汇总 |+| POST | `/v1/rm/score_best` | 一个块内多个候选,选出最优 |+| POST | `/v1/rm/score_best_batch` | 多个块各自选优,一次提交 |++完整字段定义见 [Docker 镜像 API 参考](./minicpm_ocr_jev_docker_api_zh.md),那份文档描述的就是本服务的同名端点。++### 请求++块内选优:++```bash+curl -s http://127.0.0.1:18500/v1/rm/score_best -H 'Content-Type: application/json' -d '{+ "input_form": "ternary",+ "case_id": "block_01",+ "image": "<base64 原始块图>",+ "category": "text",+ "candidates": ["候选 A", "候选 B"]+}'+```++```json+{"best_index": 1, "best_text": "候选 B", "scores": [0.00589, 0.99509],+ "verdicts": ["scored", "scored"],+ "stage_sec": {"render_sec": 0.31, "forward_sec": 0.02, "total_sec": 0.34},+ "batch_size": 2}+```++- `input_form` 目前只有 `ternary` 一个取值,必须显式传。+- `category` 必须与块真实类型一致(`text` / `formula` / `table`),填错不报错但分数会偏。+- 传 `render_images` 则跳过服务端渲染,其长度必须与 `candidates` 一致。+- 一次最多 64 个候选(`RM_MAX_ITEMS` 可调),同样是保护上限而非推荐批大小。三个端点都按**候选数**算、不按块数:`score_best_batch` 数的是所有块的候选总和,每块 3 个候选时 64 只够 21 个块。++### 汇总里的两个比率++`pass_rate` 与 `throughput_rate` 是两件事:前者是打分成功率(`scored / total`,与阈值无关),后者是过阈率(`prob_yes >= RM_THRESHOLD` 的条数 / total,阈值默认 0.5,可配)。阈值只参与这个比率的计算,任何一条的 `prob_yes` 都按原值返回。++---++## 四、启动自检++两种服务在接第一个请求之前都会校一遍引擎拼出的 prompt,如果引擎启动参数被改动导致prompt结构发生变化,会导致自检失败。++起服后查 `/healthz`,`status` 为 `ok` 即正常:++```bash+curl -s http://127.0.0.1:18501/healthz+```++```json+{"status": "ok", "served_model": "minicpm-ocr-jev",+ "prompt": {"template_md5": "9aab68e8ba8ab4da17ba9752bddb199c",+ "last_token": 271, "expected_last_token": 271,+ "token_equality": "skipped",+ "notes": ["token-for-token comparison skipped: ..."]}}+```++只看 `status`:`ok` 就是自检通过、服务可用,`prompt` 下的其余字段是自检留下的明细,照上面的样子即为正常。`status` 不是 `ok` 时,`prompt.notes` 写明是哪一项没过。diff --git a/pyproject.toml b/pyproject.tomlnew file mode 100644index 0000000..b94f0c3--- /dev/null+++ b/pyproject.toml@@ -0,0 +1,93 @@+[project]+name = "minicpm-ocr-environments"+version = "0.1.0"+description = "MiniCPM-OCR SDK and inference environments"+requires-python = ">=3.11,<3.14"+dependencies = ["huggingface-hub>=1.0"]++[project.optional-dependencies]+sdk-cpu = [+ "minicpm-ocr[all]",+ "paddlepaddle==3.2.1",+ "paddlex==3.4.2",+ "pypdfium2>=4",+]+sdk-gpu = [+ "minicpm-ocr[all]",+ "paddlepaddle-gpu==3.3.0",+ "paddlex==3.4.2",+ "pypdfium2>=4",+]+transformers = [+ "torch==2.14.0",+ "torchvision==0.29.0",+ "transformers",+ "accelerate",+]+transformers-server = ["transformers[serving]"]+# Install build dependencies before configuring CUDA and compiling vLLM.+vllm-build = [+ "torch==2.14.0",+ "torchvision==0.29.0",+ "setuptools>=77.0.3,<81",+ "setuptools-rust>=1.9.0",+ "setuptools-scm>=8",+ "cmake>=3.26.1",+ "ninja",+ "packaging",+ "wheel",+ "jinja2",+ "nvidia-cuda-nvcc==13.0.48",+ "nvidia-cuda-crt==13.0.48",+ "nvidia-nvvm==13.0.48",+ "nvidia-cuda-runtime==13.0.96",+ "nvidia-cuda-nvrtc==13.0.88",+ "nvidia-nvjitlink==13.4.92",+ "nvidia-cuda-cccl==13.3.4.3.1",+]+vllm = ["vllm", "transformers"]+sglang = [+ "sglang",+ "nvidia-cuda-nvcc==13.0.48",+ "nvidia-cuda-crt==13.0.48",+ "nvidia-nvvm==13.0.48",+ "nvidia-cuda-runtime==13.0.96",+ "nvidia-cuda-nvrtc==13.0.88",+ "nvidia-nvjitlink==13.4.92",+ "nvidia-cuda-cccl==13.3.4.3.1",+]+modelscope = ["modelscope"]++[tool.uv]+package = false++# Local source checkouts used by the installation profiles.+[tool.uv.sources]+minicpm-ocr = { path = "sdk", editable = true }+transformers = [+ { path = "sources/transformers", editable = true, extra = "transformers" },+ { path = "sources/transformers", editable = true, extra = "transformers-server" },+ { path = "sources/transformers", editable = true, extra = "vllm" },+]+vllm = { path = "sources/vllm", editable = true }+sglang = { path = "sources/sglang/python", editable = true }+paddlepaddle-gpu = { index = "paddle-cu129" }++[[tool.uv.index]]+name = "paddle-cu129"+url = "https://www.paddlepaddle.org.cn/packages/stable/cu129/"+explicit = true++# Fixed source revisions fetched by `bash scripts/install.sh vllm`.+[tool.minicpm-ocr.sources.vllm]+repository = "https://github.com/vllm-project/vllm.git"+commit = "18343393b4da41a7e8027efbc4c7e77c28301bf0"++[tool.minicpm-ocr.sources.transformers]+repository = "https://github.com/huggingface/transformers.git"+commit = "549e5b410733fb50e8efbbe4aa585cb89f6478ea"++# The pip NVCC wheel omits bin/crt; use the matching NVIDIA redistribution.+[tool.minicpm-ocr.cuda-nvcc]+url = "https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvcc/linux-x86_64/cuda_nvcc-linux-x86_64-13.0.48-archive.tar.xz"+sha256 = "cc5ff4a00d3be7c6c86ff740de7672e142ec87fea74e7e46b1b142b59fd2ac51"diff --git a/scripts/install.sh b/scripts/install.shnew file mode 100644index 0000000..da2cf4a--- /dev/null+++ b/scripts/install.sh@@ -0,0 +1,184 @@+#!/usr/bin/env bash+set -euo pipefail++cd "$(dirname "$0")/.."+profile="${1:-sdk-cpu}"+case "$profile" in+ sdk-cpu|sdk-gpu|transformers|vllm|sglang) env_name="$profile" ;;+ *) echo "Usage: bash scripts/install.sh {sdk-cpu|sdk-gpu|transformers|vllm|sglang}" >&2; exit 2 ;;+esac++command -v uv >/dev/null || { echo "Install uv first: python3 -m pip install uv" >&2; exit 1; }+if [[ "$profile" == vllm || "$profile" == sglang ]]; then+ [[ "$(uname -s)" == Linux && "$(uname -m)" == x86_64 ]] || {+ echo "The $profile build requires Linux x86_64." >&2; exit 1+ }+ export CC="${CC:-gcc-13}" CXX="${CXX:-g++-13}"+ export CUDAHOSTCXX="${CUDAHOSTCXX:-$CXX}" MAX_JOBS="${MAX_JOBS:-8}"+ command -v "$CC" >/dev/null+ command -v "$CXX" >/dev/null+fi++env_dir="$PWD/.venv-$env_name"+if [[ ! -x "$env_dir/bin/python" ]]; then+ uv venv --python "${OCR_PYTHON:-3.12}" "$env_dir"+fi+install=(uv pip install --python "$env_dir/bin/python" -r pyproject.toml)++prepare_vllm_sources() {+ "$env_dir/bin/python" - <<'PY'+from pathlib import Path+import re+import shutil+import subprocess+import tempfile+import tomllib++if not shutil.which("git"):+ raise SystemExit("Install Git first: apt-get install -y git")+with open("pyproject.toml", "rb") as f:+ pins = tomllib.load(f)["tool"]["minicpm-ocr"]["sources"]++pending = []+for name in ("vllm", "transformers"):+ pin = pins[name]+ path = Path("sources") / name+ commit = pin["commit"]+ if not re.fullmatch(r"[0-9a-f]{40}", commit):+ raise SystemExit(f"Expected a full commit SHA for {name} in pyproject.toml")+ if not path.exists() and not path.is_symlink():+ pending.append((path, pin))+ continue+ if path.is_symlink() or not path.is_dir():+ raise SystemExit(f"{path} already exists and is not a source checkout directory; move it aside first.")+ top = subprocess.run(+ ["git", "-C", str(path), "rev-parse", "--show-toplevel"],+ capture_output=True, text=True,+ )+ if top.returncode or Path(top.stdout.strip()).resolve() != path.resolve():+ raise SystemExit(f"{path} already exists but is not its own Git checkout; move it aside first.")+ head = subprocess.check_output(["git", "-C", str(path), "rev-parse", "HEAD"], text=True).strip()+ if head != commit:+ raise SystemExit(+ f"{path} is at {head}, but this installation requires {commit}. "+ "Save any local work, then check out the required commit or move the directory aside. "+ "No checkout or reset was performed."+ )+ print(f"Reusing {path} at {commit}; local files are retained.", flush=True)++# Validate existing directories before downloading; publish only complete checkouts.+for path, pin in pending:+ path.parent.mkdir(parents=True, exist_ok=True)+ with tempfile.TemporaryDirectory(prefix=f".{path.name}-", dir=path.parent) as temporary:+ checkout = Path(temporary) / "checkout"+ try:+ subprocess.run(["git", "clone", "--no-checkout", pin["repository"], str(checkout)], check=True)+ available = subprocess.run(+ ["git", "-C", str(checkout), "cat-file", "-e", pin["commit"] + "^{commit}"],+ stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL,+ )+ if available.returncode:+ subprocess.run(["git", "-C", str(checkout), "fetch", "origin", pin["commit"]], check=True)+ subprocess.run(["git", "-C", str(checkout), "checkout", "--detach", pin["commit"]], check=True)+ except subprocess.CalledProcessError as exc:+ raise SystemExit(f"Could not prepare {path}. Check Git/network access and rerun the installer.") from exc+ if path.exists() or path.is_symlink():+ raise SystemExit(f"{path} appeared during download; keeping it unchanged. Rerun the installer.")+ checkout.rename(path)+ print(f"Prepared {path} at {pin['commit']}.", flush=True)+PY+}++prepare_vllm_transformers() {+ "$env_dir/bin/python" - <<'PY'+import ast+from pathlib import Path+import re++source = Path("sources/transformers/src/transformers/__init__.py")+version = next((+ ast.literal_eval(node.value)+ for node in ast.parse(source.read_text()).body+ if isinstance(node, ast.Assign)+ and any(isinstance(target, ast.Name) and target.id == "__version__" for target in node.targets)+), None)+if not isinstance(version, str) or not version:+ raise SystemExit(f"Cannot read the Transformers version from {source}")++path = Path("sources/vllm/requirements/common.txt")+text = path.read_text()+matches = list(re.finditer(r"(?m)^[ \t]*transformers(?:[ \t]|[<>=!~\[])[^\r\n]*", text))+if len(matches) != 1:+ raise SystemExit(f"Expected one Transformers requirement in {path}; inspect the source version.")+match = matches[0]+requirement, separator, comment = match.group().partition("#")+current = "".join(requirement.split())+if current != "transformers>=5.16.1,<5.21.0" and not re.fullmatch(r"transformers==[^<>=!,;\s]+", current):+ raise SystemExit(f"Unexpected Transformers requirement in {path}: {requirement.strip()}")+replacement = f"transformers == {version}" + (f" #{comment}" if separator else "")+updated = text[:match.start()] + replacement + text[match.end():]+if updated != text:+ path.write_text(updated)+print(f"vLLM Transformers requirement: == {version}")+PY+}++prepare_cuda() {+ # Adapt the pip CUDA layout for source builds and runtime JIT compilation.+ cuda_dir="$("$env_dir/bin/python" -c 'import sysconfig; print(sysconfig.get_path("purelib") + "/nvidia/cu13")')"+ test -x "$cuda_dir/bin/nvcc" || { echo "Missing nvcc in $cuda_dir/bin" >&2; exit 1; }+ "$env_dir/bin/python" scripts/prepare_cuda_nvcc.py "$cuda_dir"+ mkdir -p "$cuda_dir/nvvm/bin" "$cuda_dir/lib/stubs"+ ln -sfn lib "$cuda_dir/lib64"+ ln -sf "$cuda_dir/bin/cicc" "$cuda_dir/nvvm/bin/cicc"+ ln -sf "$cuda_dir/lib/libcudart.so.13" "$cuda_dir/lib/libcudart.so"+ ln -sf "$cuda_dir/lib/libnvrtc.so.13" "$cuda_dir/lib/libnvrtc.so"+ driver_lib="${OCR_LIBCUDA:-/usr/lib/x86_64-linux-gnu/libcuda.so.1}"+ test -f "$driver_lib" || { echo "Set OCR_LIBCUDA to your libcuda.so.1 path." >&2; exit 1; }+ ln -sf "$driver_lib" "$cuda_dir/lib/stubs/libcuda.so"+ export CUDA_HOME="$cuda_dir" PATH="$env_dir/bin:$cuda_dir/bin:$PATH"+ export FLASHINFER_NVCC="$cuda_dir/bin/nvcc"+}++prepare_sglang_rust() {+ export PATH="${CARGO_HOME:-$HOME/.cargo}/bin:$PATH"+ if ! command -v rustup >/dev/null; then+ echo "Installing rustup for the SGLang Rust toolchain ($RUSTUP_TOOLCHAIN)."+ curl --proto '=https' --tlsv1.2 --retry 3 --retry-delay 2 -fsSL https://sh.rustup.rs |+ sh -s -- -y --no-modify-path --profile minimal --default-toolchain none+ fi+ if ! rustup run "$RUSTUP_TOOLCHAIN" rustc --version >/dev/null 2>&1; then+ rustup toolchain install "$RUSTUP_TOOLCHAIN" --profile minimal+ fi+ rustc --version+ cargo --version+}++if [[ "$profile" == vllm ]]; then+ prepare_vllm_sources+ prepare_vllm_transformers+ "${install[@]}" --extra vllm-build+ prepare_cuda+ "${install[@]}" --extra vllm-build --extra vllm --no-build-isolation-package vllm+elif [[ "$profile" == sglang ]]; then+ toolchain_file=sources/sglang/rust/rust-toolchain.toml+ test -f "$toolchain_file" || {+ echo "Clone the SGLang source into sources/sglang first." >&2; exit 1+ }+ if ! command -v protoc >/dev/null || ! protoc --version; then+ echo "Install protoc first: apt-get install -y protobuf-compiler" >&2+ exit 1+ fi+ RUSTUP_TOOLCHAIN="$("$env_dir/bin/python" -c 'import sys, tomllib; print(tomllib.load(open(sys.argv[1], "rb"))["toolchain"]["channel"])' "$toolchain_file")"+ export RUSTUP_TOOLCHAIN+ prepare_sglang_rust+ "${install[@]}" --extra sglang+ prepare_cuda+elif [[ "$profile" == transformers ]]; then+ "${install[@]}" --extra transformers --extra transformers-server+else+ "${install[@]}" --extra "$profile"+fi++uv pip check --python "$env_dir/bin/python"+echo "Installed. Activate with: source $env_dir/bin/activate"diff --git a/scripts/minicpm-ocr-jev/README.md b/scripts/minicpm-ocr-jev/README.mdnew file mode 100644index 0000000..19e7d4b--- /dev/null+++ b/scripts/minicpm-ocr-jev/README.md@@ -0,0 +1,797 @@+# MiniCPM-OCR Jev local deployment++A vision-language reward model that judges whether a piece of OCR output actually+matches the document image it came from. Given a document block and several candidate+transcriptions, it scores each one, so you can pick the best, filter the bad, or rank+several OCR engines against each other.++It is a 2-class sequence-classification head (a "value head") on a Qwen3.5-VL 2B+backbone. The output is `prob_yes`: the probability that a candidate is consistent+with the original image.++What makes this model different from a text-similarity metric is that **it does not+read the candidate as text alone**. It looks at two images:++```+ image 1 the original document block+ image 2 the candidate text, rendered back into an image+ + text the candidate text itself+```++Three inputs, hence *ternary*. Scoring therefore has three stages, and this repo ships+all of them:++```+ precheck → render → forward+ (Node + (Chromium + (vLLM)+ KaTeX) KaTeX)+```++Rendering is what lets the model catch errors that text comparison misses: a formula+written with different LaTeX but identical meaning should score *high*, while a+transcription that keeps every word but scrambles the layout should score *low*. Both+of those are in [`examples/`](examples/).++The same model appears under three spellings, one per place it has to be named:+weights `openbmb/MiniCPM-OCR-1.0-Jev` on the Hub, the container image+`minicpm-ocr-jev-1-0` this repo builds, and `minicpm-ocr-jev` as the model id the+service serves it under.++---++## Contents++```+infer_vllm.py end-to-end scoring: precheck → render → forward+rm_render.py precheck + render only, if you just want the images+requirements.txt+renderer/+ setup_renderer.sh install Chromium; check Node, fonts and the font pin+ check_renderer.py compare your renders against the bundled references+ render_triple_rm_labels.py render driver+ render_module/ HTML generation and page layout+ precheck/ KaTeX parse screen (Node)+ assets/katex-0.16.47/ pinned KaTeX, with its own fonts+serve/+ setup_backend.sh install vLLM into its own venv, and check it can serve this+ start_vllm.sh the forward pass, as a stock `vllm serve`+ app.py the HTTP service: precheck, render, call the backend+ start_app.sh+ start_all.sh both halves together, as one container's entrypoint+ render_pool.py browsers kept open for the life of the process+ chat_template_passthrough.jinja+ requirements-serve.txt+ Dockerfile both halves in one image, two processes, no weights+ check_server.py is the backend reproducing our prompt and scores?+ check_service.py does the service honour its contract?+ check_render_parity.py does the pool render the same bytes as a fresh browser?+ bench_service.py throughput and the stage breakdown, under load+ bench_backend.py the forward pass alone — where the GPU flattens out+ bench_render.py the renderer alone — how it scales with workers+examples/+ 01_text_putnam/ layout scrambled but wording preserved+ 02_formula_putnam/ same formula, very different LaTeX+ 03_table_gb_standard/ unit and character errors inside a table+```++---++## Install++The renderer and the forward pass go into **two separate virtual environments**. That+is deliberate: the renderer pins Pillow to the exact version it was calibrated on,+while vLLM asks only for `pillow>=12.3.0`. Share one environment and a later+`pip install -U vllm` moves Pillow forward and changes every score — silently, with+no error anywhere. Two environments make that impossible instead of merely+discouraged.++### 0. System packages++```bash+sudo apt-get install -y python3 python3-pip python3-venv python3-dev \+ gcc g++ nodejs fonts-noto-cjk fontconfig ca-certificates curl+```++`gcc` and `python3-dev` are needed **at run time, on every cold start** — not just to+install. Triton compiles a small CPython extension on the first forward pass, so+without them the backend loads the weights, runs for two minutes, and then dies on a+bare `CalledProcessError` whose real cause (`fatal error: Python.h: No such file`) is+sixty lines further up. `nodejs` drives the KaTeX precheck; `fonts-noto-cjk` is what+makes Chinese render as text rather than empty boxes. Both setup scripts below check+for all of this and name what is missing.++If pypi.org is slow from where you are, point pip at a nearer mirror first. This+install pulls vLLM, torch and a dozen CUDA wheels — several gigabytes — and the+difference is minutes versus hours:++```bash+export PIP_INDEX_URL=https://<your-nearest-mirror>/simple+```++Playwright downloads its browser from its own CDN, which `PIP_INDEX_URL` does not+cover, so set that separately or step 1 will sit for an hour on a 180 MB file:++```bash+export PLAYWRIGHT_DOWNLOAD_HOST=https://<your-nearest-mirror>+```++Both are plain mirrors of the same artefacts; neither changes what gets installed.+Measured from one machine in China: pypi.org 19 KB/s against a local mirror's+15 MB/s, and Playwright's CDN 28 KB/s against a local mirror's 11 MB/s.++### 1. The renderer++```bash+git clone <this repo>+cd <this repo>+python3 -m venv .venv-render && . .venv-render/bin/activate+bash renderer/setup_renderer.sh+```++This installs the Python packages, downloads the pinned Chromium through Playwright,+and then **checks** two things it cannot install for you: Node.js (needed by the+precheck stage) and a CJK font (needed to render Chinese at all). It tells you exactly+what to install if either is missing.++The virtualenv is not optional on Debian 12 / Ubuntu 23.04 and newer: their system+Python is marked externally managed (PEP 668) and pip refuses to install into it. The+script stops with that instruction rather than letting pip suggest+`--break-system-packages`, which would push the renderer's Pillow pin onto the system+Python for every other program on the machine.++**Then pin the font environment.** The step above installs Chromium through+Playwright's `--with-deps`, which also drags in several fonts of its own — and+fontconfig prefers some of them over the faces this renderer's CSS actually names.+Rendered text is model input here, so a different face is a different score. Four+commands fix the face set and the rasteriser to the ones the reference deployment+uses:++```bash+sudo apt-get install -y fonts-droid-fallback+sudo apt-get purge -y fonts-wqy-zenhei fonts-unifont fonts-ipafont-gothic+sudo rm -f /etc/fonts/conf.d/10-sub-pixel-rgb.conf+sudo fc-cache -f+```++`fonts-droid-fallback` supplies DroidSansFallbackFull, one of the three faces the CSS+stack names (the other two come from `fonts-noto-cjk` in §0). The three purged+packages are never named by the stack, but they outrank the named faces in+fontconfig's substitution for characters Noto does not cover. The removed config turns+on RGB sub-pixel rendering, which tints glyph edges per channel — same shapes,+different pixels.++Run these **after** `setup_renderer.sh`, never before: `--with-deps` would reinstall+what you just purged. On a distro without these package names the requirement is the+same — the three named faces present, nothing fontconfig prefers over them, sub-pixel+rendering off. "Matching the reference renderer" below measures what skipping this+costs, which is less than you might expect for some uses and not negligible for+others.++Then verify the renderer reproduces the bundled reference images:++```bash+python3 renderer/check_renderer.py+```++See [Matching the reference renderer](#matching-the-reference-renderer) for how to+read the result.++### 2. vLLM++```bash+bash serve/setup_backend.sh .venv-vllm+```++That creates a second virtualenv, installs vLLM from PyPI, and then checks the thing+that actually matters: that this build registers `Qwen3_5ForConditionalGeneration` and+can therefore serve the model.++**A second environment, not the renderer's.** This is a requirement, not tidiness.+vLLM requires only `pillow>=12.3.0`, while the renderer pins the exact version —+because Pillow decides the pixels the model is scored on. Install both into one+environment and a single later `pip install -U vllm` moves Pillow to the next major+version, changes every score, and reports no error at all. Two environments make that+impossible rather than unlikely. If you then start the service from this environment,+tell it where the renderer lives with `RM_RENDER_PYTHON` (see "Tuning").++vLLM itself is **not pinned** — the reward model is an+ordinary 2-class sequence classifier on a Qwen3.5-VL backbone, so any build with that+architecture and vLLM's `runner="pooling"` + `convert="classify"` path will serve it.++Verified combinations:++| | built from upstream (earlier) | plain `pip install vllm` (what we now run) |+|---|---|---|+| vLLM | `0.1.dev21951+g5ff3bbfb0` | **`0.32.0`** (PyPI wheel) |+| torch | `2.13.0+cu130` | `2.13.0+cu130` |+| transformers | `5.17.0` | `5.19.0` |++Scored against each other on identical images and identical prompt bytes, the six+bundled candidates agree to within 6e-4, except the table ground-truth candidate+(4.7e-3) — which is the one example whose absolute score is already known to be+unreliable, see [Reading the scores](#reading-the-scores). Candidate ordering is+identical. Earlier revisions of this document told you to build from commit+`5ff3bbfb0`; that is no longer necessary and the release is the better choice.++### 3. Weights++```bash+huggingface-cli download openbmb/MiniCPM-OCR-1.0-Jev --local-dir ./weights+```++Then pass `--model ./weights`.++<https://huggingface.co/openbmb/MiniCPM-OCR-1.0-Jev>++Any other checkpoint works too, as long as it is a 2-class sequence-classification+model on a Qwen3.5-VL backbone: point `--model` at a directory holding+`config.json` and the safetensors shards. Note that the scores a different+checkpoint produces are its own — the prompt below is part of *this* model, and+the reference scores in `examples/` are too.++---++## Quickstart++Score the bundled examples:++```bash+python3 infer_vllm.py --model ./weights --examples+```++Score your own block:++```bash+python3 infer_vllm.py --model ./weights \+ --image my_block.png --category text \+ --candidate "first transcription" \+ --candidate "second transcription"+```++Score a batch — one block per line, several candidates each:++```bash+python3 infer_vllm.py --model ./weights --input-jsonl blocks.jsonl+```++```json+{"case_id": "p1_b3", "image_path": "crops/p1_b3.png", "category": "table", "candidates": ["<table>…</table>", "<table>…</table>"]}+```++From Python:++```python+from rm_render import Candidate+from infer_vllm import RMScorer++scorer = RMScorer("./weights") # loads once, reuse it+results = scorer.score([+ Candidate(case_id="b1#0", image_path="crops/b1.png", text="…", category="text"),+ Candidate(case_id="b1#1", image_path="crops/b1.png", text="…", category="text"),+])+for r in results:+ print(r.case_id, r.prob_yes, r.verdict)+```++Loading the engine takes a few minutes (weights, graph capture, multi-modal warmup),+so build one `RMScorer` and keep it alive. `vllm.LLM` batches internally: hand it all+your prompts at once rather than calling it in a loop.++If you only want the rendered images, skip the model entirely:++```bash+python3 rm_render.py --image my_block.png --candidate "…" --out-dir ./renders+```++---++## Running it as a service++Everything above loads the model into your own process. To serve it over HTTP+instead, run the two halves separately:++```+ your client ──> serve/app.py ────HTTP────> vllm serve+ precheck forward pass+ render+```++The split is not ceremony. Scoring one candidate costs about 0.2s of precheck,+0.9s of rendering and 0.1s of forward pass — measured, like every figure in this+document, on the machine named under "Where the ceiling is" — so nine tenths of+the work is a browser and one tenth is the GPU. In one process they compete for one+interpreter, and the only way to add rendering capacity is to add GPUs. Apart,+`app.py` is stateless and you can run several against one backend, while vLLM's+own scheduler — continuous batching, prefix caching — handles the GPU side+without any engine code in this repo.++A second consequence: because the backend batches across HTTP requests,+candidates from unrelated requests end up in the same GPU batch on their own.++### Start the backend++```bash+bash serve/start_vllm.sh 0 8026 ./weights # GPU index, port, checkpoint+```++Three environment variables adjust it, and none of them are arguments: `GPU_MEM_UTIL`+(default 0.80 — the fraction of VRAM vLLM reserves; lower it to share the card),+`MAX_MODEL_LEN` (16384) and `SERVED_NAME` (`minicpm-ocr-jev`, the id the backend+answers to). The service asks the backend for that last one rather than assuming it,+so changing it needs no matching change in `app.py`.++This is a stock `vllm serve` in classification mode. The one non-obvious flag is+`--chat-template serve/chat_template_passthrough.jinja`: the `/classify` endpoint+accepts images only in the chat form, and the chat form always runs a template,+so the template here is one that hands our prompt back unchanged rather than+assembling one. The prompt bytes stay where they belong, in `build_prompt()`+under its fingerprint check. See [The prompt is part of the+model](#the-prompt-is-part-of-the-model).++### Start the service++```bash+python3 -m pip install -r serve/requirements-serve.txt+bash serve/start_app.sh 8030 http://127.0.0.1:8026+```++It answers 503 until the backend is up, so either half can be restarted without+the other.++### Or both at once++```bash+bash serve/start_all.sh 8030 ./weights # app port, checkpoint+```++This starts the backend, waits for it to answer — loading weights and capturing+CUDA graphs takes a few minutes, so it asks rather than sleeps — then starts the+service, and exits if either half dies afterwards. That last part is the point: a+container whose backend has died but whose HTTP layer still answers, correctly,+with 503 forever, looks alive to every probe except a caller reading the response+body. It is also the entrypoint of the image described in "As images".++Two environments need naming here, and `start_all.sh` reads them from+`VLLM_PYTHON_BIN` and `RENDER_PYTHON_BIN`; the defaults are the paths the+container uses. Running it outside a container, set both.++### Endpoints++| | |+|---|---|+| `GET /healthz` | readiness, plus the identity of everything that decides a score: backend model, prompt fingerprint, renderer version |+| `POST /v1/rm/score` | score a batch of candidates; returns per-item scores and a summary with the throughput rate |+| `POST /v1/rm/score_best` | N candidates for one block; returns the best one |+| `POST /v1/rm/score_best_batch` | several blocks in one request |++```bash+curl -s localhost:8030/v1/rm/score_best -H 'Content-Type: application/json' -d '{+ "input_form": "ternary",+ "image": "'"$(base64 -w0 examples/01_text_putnam/block.png)"'",+ "candidates": ["first transcription", "second transcription"],+ "category": "text"+}'+```++Supply `render_image` (or `render_images`) if you have already rendered the+candidates; the service then skips precheck and rendering entirely.++Read `verdict` before `prob_yes`. Items that never reached the model carry a+sentinel score — `0.0` when the candidate was judged unusable, `-1.0` when we+could not find out — so a caller that ignores `verdict` degrades safely, but+reads a number that is not a probability.++### Checking it++```bash+python3 serve/check_server.py --base-url http://127.0.0.1:8026 # backend: prompt and scores+python3 serve/check_service.py --base-url http://127.0.0.1:8030 # service: the contract+python3 serve/check_render_parity.py # pool renders == fresh browser+python3 serve/bench_service.py --base-url http://127.0.0.1:8030 # throughput and stage split+```++### Tuning++The service keeps Chromium open rather than starting one per batch, which+removes 1.2s from every request on that same machine. The defaults are already the fast+configuration; this section is for when they are not right for your machine.++| variable | default | what it changes |+|---|---|---|+| `RM_WORKERS` | cores ÷ 8, capped at 16 | uvicorn worker processes. **The throughput knob** — see below. Set it explicitly inside a CPU-limited container, where `nproc` reports the host's cores rather than your share. |+| `RM_RENDER_BROWSERS` | 2 | Chromiums per worker. Keep it small and add workers instead. |+| `RM_BROWSER_CONCURRENCY` | 8 | pages rendering at once inside one browser. The per-request latency knob: a request with twenty candidates renders them this many at a time. |+| `RM_FORWARD_CONCURRENCY` | 32 | in-flight requests to the backend. Rarely the limit; the GPU side saturates around 16 and queues past it. |+| `RM_RENDER_MODE` | `persistent` | `subprocess` starts a fresh browser per batch. A fallback for environments where the pool will not start, not a tuning choice. |+| `RM_VLLM_MODEL` | unset — ask the backend | the model id sent to the backend. Unset, the service reads it from the backend's `/v1/models`, so the two halves cannot disagree. Set it only when the backend serves more than one model. |+| `RM_RENDER_PYTHON` | unset — use `app.py`'s own interpreter | which interpreter runs the render subprocess. Needed when the renderer and vLLM are installed in *different* environments — see below. |++**On `RM_RENDER_PYTHON`.** The renderer draws each candidate in a subprocess, and by+default that subprocess is started with the same interpreter that runs `app.py`. That+is right only when the renderer's packages are installed there. Two common cases+where they are not:++- **Two environments on purpose.** §1 and §2 install the renderer and vLLM+ separately, and §2 explains why that separation is load-bearing rather than tidy:+ vLLM requires only `pillow>=12.3.0` while the renderer pins the exact version that+ decides its pixels, so one `pip install -U vllm` in a shared environment moves+ Pillow and silently changes every score. If you start `app.py` from the vLLM+ environment, point `RM_RENDER_PYTHON` at the renderer's+ (`/path/to/.venv-render/bin/python`). The container built by `serve/Dockerfile`+ handles this through `PATH` instead — see `start_all.sh`.+- **A wrapper script.** Where you cannot install system libraries, the same variable+ takes an interpreter wrapper that sets `LD_LIBRARY_PATH` for the render subprocess+ alone — see Troubleshooting.++The command-line tools take the same thing as `--render-python`+(`infer_vllm.py`, `rm_render.py`, `renderer/check_renderer.py`). Get it wrong and the+failure is loud and immediate — the subprocess dies on `ModuleNotFoundError` for+`playwright` — so this is not a silent-wrong-answer risk, unlike the Pillow version+it exists to protect.++Workers rather than browsers, because every browser a process owns is driven+over one Playwright connection by one asyncio loop, and rendered screenshots+come back through it. That pipe saturates well before the browsers do. Measured+on 128 cores, four candidates per request, 32-way concurrency:++```+ 1 worker x 8 browsers 11.5 candidates/s p50 5.5s+ 8 workers x 2 browsers 45.5 candidates/s p50 2.5s+```++Sixteen Chromiums in the second row against eight in the first, and it is four+times the throughput at half the latency. Add workers first.++### Where the ceiling is++Both halves were measured separately, because a single end-to-end number cannot+tell you which one to spend money on. On one RTX 5090 and 128 cores, four+candidates per request:++```+ backend (bench_backend.py) 52 candidates/s, flat from ~32-way concurrency+ renderer (bench_render.py) 35 candidates/s at 4 workers+ 80 candidates/s at 8 workers+ 142 candidates/s at 16 workers, still linear+ end to end (bench_service.py) 56 candidates/s at the defaults, 64-way, p50 3.2s+ 32 candidates/s at the defaults, 16-way, p50 1.8s+ 2.7 candidates/s for a lone request, p50 1.4s+```++The renderer scales with cores and had not bent at 32 Chromiums; the GPU is flat+by 32-way concurrency and stays flat to 128. **So the ceiling is the GPU, and the+renderer's job is to stay ahead of it** — which at the default 16 workers it+does, the whole chain landing at or above what the backend measured alone.++That is what the defaults aim at, and it also says what to do when it is too+slow. More renderer capacity — workers, or another machine running `app.py`+against the same backend — helps only while the renderer is behind the GPU, and+`stage_sec` on any `score_best` response says whether it is. Past that, another+GPU is the only thing that moves the number.++Two cautions about these figures. The backend's 52 is a floor, not a ceiling:+`bench_backend.py` makes every image unique, so nothing is ever cached, while+real traffic sends one original image with several candidates and the backend+caches its encoding — end to end at 96-way the chain reached 60 candidates/s,+above the "ceiling", for exactly that reason. And throughput past 64-way buys+little while costing a lot of latency (p50 3.6s to 5.7s), so the useful operating+range is narrower than the peak suggests.++### As images++`serve/Dockerfile` builds **one image holding both halves** — `vllm serve` for the+forward pass, and the renderer, precheck and HTTP layer in front of it. It carries+CUDA wheels, Chromium and CJK fonts, so it is not small (about 24 GB). What it does+not carry is the weights: the checkpoint is a run-time argument, so one image serves+any compatible checkpoint and the build context stays small.++```bash+docker build -f serve/Dockerfile -t minicpm-ocr-jev-1-0:latest .++docker run -d --name minicpm-ocr-jev --gpus '"device=0"' \+ -p 127.0.0.1:8030:8030 \+ -v /path/to/weights:/weights:ro \+ minicpm-ocr-jev-1-0:latest 8030 /weights+```++Behind a slow link, pass `--build-arg PIP_INDEX_URL=…` and+`--build-arg PLAYWRIGHT_DOWNLOAD_HOST=…` — see §0 above; without them the build+takes hours rather than minutes.++Two things about this image are deliberate, and both are worth knowing before you+modify it.++**It starts from a bare `ubuntu:24.04` and installs through this material's own+scripts** — the same commands §0 through §2 give a reader with a fresh machine. So+if the image builds, the documented install works; there is no second, image-only+path that can drift out of step with these instructions.++**The two halves stay two processes.** `start_all.sh` runs them side by side and+exits if either dies. One container is about giving callers one address, not about+merging the two workloads: a browser pool and a vLLM engine in one Python process+share one asyncio loop, and that loop saturates at roughly a quarter of the+throughput — measured on one machine, four candidates per request, same GPU and+checkpoint, 13.0 candidates/s against 54.3. So: one container if you need one+address, never one process.++If you do want the renderer to scale on its own, you do not need a second image for+it — run `start_app.sh` on another machine against this one's backend, as+"Where the ceiling is" describes.++---++## Input requirements++**Category.** Every block is `text`, `formula`, or `table`. The category selects the+render mode, and getting it wrong quietly ruins the score — a formula sent as `text`+renders as literal LaTeX source rather than typeset math, and will not match the+original image.++**Tables must be HTML.** The renderer accepts `<table>…</table>`. If your OCR engine+emits some other table markup, convert it before scoring; anything unrecognised is+rendered as literal text.++**The original image must be a readable file on disk.** The renderer derives the+render width from the original image's width, so it reads the file, not just its+pixels-in-memory.++**Formula blocks render at a higher device scale factor** (3.0, versus 1.0 for text+and tables). This is why a formula's rendered image comes out much larger than its+source crop — that is expected, not a bug.++---++## The prompt is part of the model++The checkpoint was trained with one exact prompt. The wording, the whitespace, and the+order of the two images are all fixed:++```+<|im_start|>user+{image}+OCR文本:+{candidate text}+{image}+第一张图是原图,第二张图是上述 OCR 文本渲染得到的图片。+请判断该 OCR 文本及其对应渲染图是否与原图内容一致。+这是一个二分类任务:一致标为 1,不一致标为 0。<|im_end|>+<|im_start|>assistant+<think>++</think>++```++The first image is the original, the second is the render. Swapping them, translating+the instruction, or adding a system message changes what the scores mean.++Two parts of that look like padding and are not:++**The newline after each image placeholder.** Dropping it is the easiest way to get+this wrong, because assembling the prompt through a chat template's content list+renders the placeholder without one.++**The empty assistant turn at the end**, including the empty `<think>` block. The+model was trained as a sequence classifier, where the training framework appends that+turn; vLLM's classify path pools the **last** token, so the value head reads the hidden+state of the final newline inside it. Cut the turn off and you are pooling a position+the model never saw pooled during training. It still returns plausible-looking+probabilities, which is exactly what makes this mistake hard to catch.++`infer_vllm.py` fingerprints the template at import time and refuses to run if it has+been edited (`PROMPT_TEMPLATE_MD5`). That guard exists because a modified prompt does+not fail — it silently produces numbers that look fine and are comparable to nothing.++---++## Reading the scores++`prob_yes` is `softmax(logits)[1]`, between 0 and 1. Higher means more consistent with+the original image. Each candidate's score is computed independently, so candidates+within a block do not compete and scores do not sum to 1.++Every result also carries a `verdict`:++| verdict | `prob_yes` | meaning |+|---|---|---|+| `scored` | model output | reached the model normally |+| `precheck_reject` | `0.0` | KaTeX could not parse the candidate's LaTeX |+| `render_error` | `0.0` | the candidate could not be rendered |+| `missing_original_image` | `0.0` | the block image was unreadable |++Rejected candidates are assigned `0.0` rather than dropped: a transcription whose LaTeX+does not even parse is not a plausible reading of the page, so treating it as "wrong"+is the useful behaviour. If you would rather see those cases scored anyway, run with+`--no-precheck` (which also removes the Node dependency).++A `scored` result can still carry `katex_errors`. That means the page rendered, but+with an error message where the formula should be — the model sees that error text and+will score it as wrong. The field is there so you can tell this apart from a genuine+low score.++**Scores are not bitwise reproducible.** vLLM batches requests continuously, so the+same candidate may be computed alongside different neighbours from one run to the next+and differ in the last few decimal places. Practically:++- compare rankings within a block, not absolute values across runs+- keep one engine instance for a whole experiment+- do not hard-code a threshold calibrated on a single run++---++## Matching the reference renderer++The model learned what "correct" looks like from images produced by one specific+renderer. The closer your renders are to that renderer, the closer your scores are to+the ones the model was trained to produce.++Three things are pinned in this repo and need no attention from you:++| | | |+|---|---|---|+| KaTeX | 0.16.47 | bundled in `renderer/assets/`, ships its own math fonts |+| Chromium | pinned by `playwright==1.62.0` | pinning Playwright is how the browser gets pinned |+| Render pipeline | v8.5 | the code in `renderer/`, including the per-category scale factor |++A fourth thing is pinned, but not by the repo — by you, in §1: **body-text fonts come+from your operating system**. KaTeX bundles its own fonts, so formulas are reproducible+anywhere. Latin and especially CJK body text is drawn with whatever faces your OS+provides, and different font builds produce different pixels. §1's four font commands+are what hold that fixed on Debian and Ubuntu; skip them, or run a distro where those+package names do not exist, and this is the part of the pipeline that drifts.++`renderer/check_renderer.py` measures this for you. It renders the bundled examples and+compares against the reference PNGs shipped beside them:++- `identical` — byte-for-byte equal.+- `close` — a few percent of pixels differ. Normal: anti-aliasing and hinting differ+ between builds of the same font.+- `drifted` — noticeably different, layout still intact. Expected when your fonts or+ browser build differ from the reference environment.+- `different` — large differences at nearly the same size. Almost always a missing+ font: text is falling back to another face, or drawing as empty boxes.+- `mismatched` — the geometry does not match. Something structural: check that KaTeX+ under `renderer/assets/` is intact and that Playwright is pinned.++Only the last two are failures. Some drift is unavoidable, and the bundled references+make that concrete. They were produced by this same pipeline version, but earlier and+on another machine, with an older Chromium build. Re-rendering them under the pinned+environment gives:++| example | result |+|---|---|+| formula | `identical`, byte for byte |+| table | `close` — 2.3% of pixels differ |+| text | `drifted` — 10px narrower, which shifts the line and surfaces as 10% of pixels |++Two things are worth knowing about those numbers, because both were measured rather+than assumed.++**The text drift is not local to one machine.** The same 10px narrower render came out+of two unrelated environments — a purpose-built image and a bare Ubuntu container that+installed everything from scratch. Two independent environments agreeing on the same+output points at the references, not at the local setup: they predate the pinned+Chromium. So this particular drift is the pin doing its job, and you should expect to+reproduce it too.++**The font set changes which candidate wins; it does not change how well the model+separates good from bad.** These are two different questions and they have two+different answers, so both are worth stating. Pixel-wise the effect is small: swapping+the font set entirely — from whatever Playwright's `--with-deps` pulls in, to the face+set §1 pins — moved the Chinese table example by less than half a percent of pixels.+Score-wise it is small but not nothing: across 200 blocks with four candidates each,+the same swap moved `prob_yes` by a mean of 0.017 and changed the **top-ranked+candidate on 16.5% of blocks**, against a 1% floor from re-running one identical+container. And yet ranking quality is untouched: on a held-out set of 2,267 blocks,+AUROC ×100 came out 93.7 with the pinned fonts and 93.8 without — a paired difference+of +0.08 points with a bootstrap interval of [−0.07, +0.23] points (computed before+rounding), i.e. indistinguishable,+and measured tightly enough to mean "no difference" rather than "no power".++The practical reading: if you are **measuring** the model, the font set is not what+decides your number and you can skip §1's font step. If you are using the model to+**pick** the best of several OCR outputs and want the same picks as the reference+deployment, pin it — a sixth of close blocks go the other way otherwise. With *no* CJK+font at all it is a different story again: text renders as empty boxes and the score is+meaningless.++Formulas are the exception to all of this: they came out byte-identical in every+environment tested, because KaTeX carries its own fonts. If a *formula* example reports+worse than `close`, suspect your KaTeX or browser pin rather than your fonts.++If `fc-list :lang=zh | wc -l` reports 0, install a CJK font before anything else —+any of them will do:++```bash+sudo apt-get install fonts-noto-cjk # Debian/Ubuntu+sudo dnf install google-noto-sans-cjk-fonts # Fedora+```++Two stages run as subprocesses rather than in-process, on purpose: that is what keeps+the rendered bytes identical to the pipeline the model was trained against.+Reimplementing either stage would change the pixels, and therefore the scores.++---++## Examples++Each directory in [`examples/`](examples/) holds a document block, two candidate+transcriptions with their labels, and the reference render of one of them.++Running `python3 infer_vllm.py --model ./weights --examples` on the reference setup+produced these scores, which your run should land near:++| | reference transcription | OCR output | what it shows |+|---|---|---|---|+| `01_text_putnam` | 0.995 | 0.007 | The OCR output keeps nearly every token but merges list items (a) and (b) and re-emits the content out of order. Order-insensitive text metrics score this highly; the rendered image makes it obvious. |+| `02_formula_putnam` | 0.968 | 0.966 | Both candidates are labelled consistent despite very different LaTeX — `$$…$$` vs `\[…\]`, `'` vs `\prime`, extra spacing. Rendering collapses the difference; string comparison would not. |+| `03_table_gb_standard` | **0.041** | 0.001 | Three real OCR errors in one table: the unit `s` read as `a` in three cells, 电压切断 read as 电压倒落, and a rebuilt row structure. |++The third row is the one worth sitting with. Its reference transcription is faithful —+it matches the block — and still scores 0.04. The *ranking* is right, by a factor of 35,+but the absolute number does not mean "this transcription is wrong". If you were+filtering on `prob_yes > 0.5`, you would throw away a correct transcription here.++We have not established why. The renderer lays tables out at a fixed width, so a small+source crop and its render differ considerably in scale, which is a plausible cause+but not a demonstrated one. Either way it is the concrete reason for the advice above:+**compare candidates against each other, not against a threshold.**++Only the OCR candidate in each example carries a label from the source dataset. The+reference transcription is the dataset's ground-truth text, which that dataset does+not itself label or score — so do not read it as "the answer the model should return+1.0 for".++The document blocks come from [OmniDocBench](https://github.com/opendatalab/OmniDocBench)+v1.6 — specifically pages from the Putnam Competition archive and from a published+Chinese national standard. They are included to make the examples runnable; the+identity of the OCR engine that produced each erroneous candidate is withheld, since+the point is the error pattern, not the engine.++---++## Troubleshooting++**`libgbm.so.1: cannot open shared object file`** (or another missing library at+browser launch). Chromium downloaded, but its system libraries did not. This is the+most common first-run failure:++```bash+python3 -m playwright install --with-deps chromium+```++If you cannot install system packages — a shared cluster, no root — put the missing+libraries somewhere you control and pass an interpreter wrapper that sets+`LD_LIBRARY_PATH` for the render subprocess only:++```bash+python3 infer_vllm.py --render-python /path/to/wrapper.sh ...+```++Under the service, the same wrapper goes in `RM_RENDER_PYTHON` instead — see+"Tuning", which also covers the other reason to set it: a renderer and a vLLM+installed in two different environments.++Setting `LD_LIBRARY_PATH` globally instead is a bad idea: it also lands in front of+the loader path for the inference process.++**Rendered images are blank or full of boxes.** Missing fonts. Run+`renderer/check_renderer.py`; if it reports `different` or `mismatched`, start with+`fc-list :lang=zh | wc -l`.++**`node not found`.** The precheck stage needs Node; it has been tested on Node 12,+18 and 22, so your distribution's default is almost certainly fine. Install it, or+run with `--no-precheck` and accept that unparsable candidates get scored instead of+rejected.++**Engine fails to load with an out-of-memory error.** Lower `GPU_MEM_UTIL`, which+`start_vllm.sh` passes to vLLM as `--gpu-memory-utilization` and defaults to **0.80**.+The engine reserves that fraction of VRAM at startup, so another process on the same+GPU will collide with it: `GPU_MEM_UTIL=0.6 bash serve/start_vllm.sh 0 8026 ./weights`.++**`expected 2 class logits from the value head`.** The checkpoint is not a 2-class+sequence-classification model, or vLLM loaded it in a different mode. Check that your+build supports `runner="pooling"` with `convert="classify"`.++**Every candidate scores near 0.** Check the category first — a formula or table scored+as `text` renders as literal markup and will not match anything.diff --git a/scripts/minicpm-ocr-jev/data/filter_embedded_base64.py b/scripts/minicpm-ocr-jev/data/filter_embedded_base64.pynew file mode 100644index 0000000..6a2519c--- /dev/null+++ b/scripts/minicpm-ocr-jev/data/filter_embedded_base64.py@@ -0,0 +1,221 @@+#!/usr/bin/env python3+"""Filter OCR RM JSONL rows containing embedded base64 image payloads."""++from __future__ import annotations++import argparse+import json+import os+import re+from collections import Counter+from pathlib import Path+from typing import Any, Dict, Iterator, List, Tuple+++BASE64_IMAGE_RE = re.compile(r'data:image/[^;,]+;base64,', re.IGNORECASE)+SIDECAR_SUFFIXES = ('sources', 'metric_categories', 'metric_labels')+++def _nonempty_lines(path: Path) -> Iterator[Tuple[int, str]]:+ with path.open(encoding='utf-8') as handle:+ for line_no, line in enumerate(handle):+ if line.strip():+ yield line_no, line+++def _json_loads(line: str, path: Path, line_no: int) -> Dict[str, Any]:+ try:+ value = json.loads(line)+ except json.JSONDecodeError as exc:+ raise ValueError(f'Invalid JSON at {path}:{line_no + 1}: {exc}') from exc+ if not isinstance(value, dict):+ raise ValueError(f'Expected JSON object at {path}:{line_no + 1}.')+ return value+++def _metric_category_from_source(record: Dict[str, Any]) -> str:+ metric_category = str(record.get('metric_category', '')).strip()+ if metric_category:+ return metric_category+ kind = str(record.get('kind', '')).strip().lower()+ category = str(record.get('category', '')).strip().lower()+ if kind == 'formula' or category in {'formula', '公式 (formula)'}:+ return 'formula'+ if kind == 'table' or category in {'table', '表格 (table)'}:+ return 'table'+ return 'text'+++def _sidecar_paths(input_dir: Path, split: str) -> Dict[str, Path]:+ paths = {}+ for suffix in SIDECAR_SUFFIXES:+ path = input_dir / f'{split}_{suffix}.jsonl'+ if path.is_file():+ paths[suffix] = path+ return paths+++def _tmp_path(path: Path) -> Path:+ return path.with_suffix(f'{path.suffix}.tmp-{os.getpid()}')+++def _next_sidecar_rows(+ sidecar_iters: Dict[str, Iterator[Tuple[int, str]]],+ data_path: Path,+ data_index: int,+) -> Dict[str, Tuple[int, str]]:+ rows = {}+ for name, iterator in sidecar_iters.items():+ try:+ sidecar_index, sidecar_line = next(iterator)+ except StopIteration as exc:+ raise ValueError(f'{name} sidecar has fewer rows than {data_path}.') from exc+ if sidecar_index != data_index:+ raise ValueError(+ f'Paired row positions diverged for {name}: dataset={data_index}, sidecar={sidecar_index}.')+ rows[name] = (sidecar_index, sidecar_line)+ return rows+++def _check_sidecars_exhausted(sidecar_iters: Dict[str, Iterator[Tuple[int, str]]], data_path: Path) -> None:+ for name, iterator in sidecar_iters.items():+ try:+ sidecar_index, _ = next(iterator)+ except StopIteration:+ continue+ raise ValueError(f'{name} sidecar has more rows than {data_path}; first extra row={sidecar_index}.')+++def _label_from_records(data_record: Dict[str, Any], sidecar_records: Dict[str, Dict[str, Any]]) -> str:+ for record in (data_record, *sidecar_records.values()):+ if 'label' in record:+ return str(record['label'])+ return 'unknown'+++def _category_from_records(sidecar_records: Dict[str, Dict[str, Any]]) -> str:+ for key in ('metric_categories', 'metric_labels', 'sources'):+ record = sidecar_records.get(key)+ if record:+ return _metric_category_from_source(record)+ return 'unknown'+++def _filter_split(input_dir: Path, output_dir: Path, split: str) -> Dict[str, Any]:+ data_path = input_dir / f'{split}.jsonl'+ if not data_path.is_file():+ raise FileNotFoundError(data_path)++ sidecar_inputs = _sidecar_paths(input_dir, split)+ data_output = output_dir / data_path.name+ data_tmp = _tmp_path(data_output)+ sidecar_outputs = {+ name: output_dir / path.name+ for name, path in sidecar_inputs.items()+ }+ sidecar_temps = {+ name: _tmp_path(path)+ for name, path in sidecar_outputs.items()+ }++ input_labels, kept_labels, dropped_labels = Counter(), Counter(), Counter()+ input_categories, kept_categories, dropped_categories = Counter(), Counter(), Counter()+ dropped_indices: List[int] = []+ dropped_row_ids: List[str] = []+ total = kept = dropped = 0++ sidecar_iters = {name: _nonempty_lines(path) for name, path in sidecar_inputs.items()}+ sidecar_handles = {+ name: path.open('w', encoding='utf-8')+ for name, path in sidecar_temps.items()+ }+ try:+ with data_tmp.open('w', encoding='utf-8') as data_handle:+ for data_index, data_line in _nonempty_lines(data_path):+ sidecar_rows = _next_sidecar_rows(sidecar_iters, data_path, data_index)+ data_record = _json_loads(data_line, data_path, data_index)+ sidecar_records = {+ name: _json_loads(line, sidecar_inputs[name], line_no)+ for name, (line_no, line) in sidecar_rows.items()+ }+ label = _label_from_records(data_record, sidecar_records)+ category = _category_from_records(sidecar_records)+ input_labels[label] += 1+ input_categories[category] += 1+ total += 1++ if BASE64_IMAGE_RE.search(data_line):+ dropped += 1+ dropped_indices.append(data_index)+ row_id = sidecar_records.get('sources', {}).get('mixed_row_id')+ if row_id is not None:+ dropped_row_ids.append(str(row_id))+ dropped_labels[label] += 1+ dropped_categories[category] += 1+ continue++ kept += 1+ kept_labels[label] += 1+ kept_categories[category] += 1+ data_handle.write(data_line)+ for name, (_, sidecar_line) in sidecar_rows.items():+ sidecar_handles[name].write(sidecar_line)++ _check_sidecars_exhausted(sidecar_iters, data_path)+ finally:+ for handle in sidecar_handles.values():+ handle.close()++ os.replace(data_tmp, data_output)+ for name, tmp in sidecar_temps.items():+ os.replace(tmp, sidecar_outputs[name])++ return {+ 'input_rows': total,+ 'kept_rows': kept,+ 'dropped_rows': dropped,+ 'drop_rule': 'OCR text contains data:image/...;base64,',+ 'dropped_original_indices': dropped_indices,+ 'dropped_row_ids': dropped_row_ids,+ 'input_label_counts': dict(sorted(input_labels.items())),+ 'kept_label_counts': dict(sorted(kept_labels.items())),+ 'dropped_label_counts': dict(sorted(dropped_labels.items())),+ 'input_category_counts': dict(sorted(input_categories.items())),+ 'kept_category_counts': dict(sorted(kept_categories.items())),+ 'dropped_category_counts': dict(sorted(dropped_categories.items())),+ 'dataset': str(data_output),+ 'sidecars': {name: str(path) for name, path in sorted(sidecar_outputs.items())},+ }+++def main() -> int:+ parser = argparse.ArgumentParser(description=__doc__)+ parser.add_argument('--input-dir', required=True, type=Path)+ parser.add_argument('--output-dir', required=True, type=Path)+ parser.add_argument('--splits', nargs='+', default=['train', 'val'])+ args = parser.parse_args()++ if not args.input_dir.is_dir():+ raise NotADirectoryError(args.input_dir)+ if args.input_dir.resolve() == args.output_dir.resolve():+ raise ValueError('--output-dir must be different from --input-dir.')++ args.output_dir.mkdir(parents=True, exist_ok=True)+ summary = {+ 'input_dir': str(args.input_dir),+ 'output_dir': str(args.output_dir),+ 'filter': 'OCR text contains data:image/...;base64,',+ 'splits': {+ split: _filter_split(args.input_dir, args.output_dir, split)+ for split in args.splits+ },+ }+ (args.output_dir / 'base64_filter_audit.json').write_text(+ json.dumps(summary, ensure_ascii=False, indent=2, sort_keys=True) + '\n',+ encoding='utf-8')+ print(json.dumps(summary, ensure_ascii=False, sort_keys=True))+ return 0+++if __name__ == '__main__':+ raise SystemExit(main())diff --git a/scripts/minicpm-ocr-jev/eval/evaluate.py b/scripts/minicpm-ocr-jev/eval/evaluate.pynew file mode 100644index 0000000..a950170--- /dev/null+++ b/scripts/minicpm-ocr-jev/eval/evaluate.py@@ -0,0 +1,75 @@+#!/usr/bin/env python3+# -*- coding: utf-8 -*-+"""从 score.py 的 predictions.jsonl 算 AUROC:整体一个数,再按 category 分列。++AUROC 与阈值无关,衡量的纯粹是排序能力,跨模型、跨版本比较都用它。++用法:+ python evaluate.py --predictions <predictions.jsonl>+"""++from __future__ import annotations++import argparse+import json+from collections import defaultdict+from pathlib import Path+++def auroc(pairs: list[tuple[float, int]]) -> float | None:+ """pairs = [(score, label), ...],label ∈ {0,1};正负类缺一返回 None。++ 走 rank 法(Mann-Whitney U)并对并列分数做平均秩校正。分数以 bf16 前向产出,+ **大量并列是常态**,不做并列校正会把 AUROC 系统性算偏。+ """+ pos = sum(1 for _, label in pairs if label == 1)+ neg = len(pairs) - pos+ if pos == 0 or neg == 0:+ return None+ ordered = sorted(pairs, key=lambda item: item[0])+ ranks = [0.0] * len(ordered)+ i = 0+ while i < len(ordered):+ j = i+ while j + 1 < len(ordered) and ordered[j + 1][0] == ordered[i][0]:+ j += 1+ average_rank = (i + j) / 2.0 + 1.0+ for k in range(i, j + 1):+ ranks[k] = average_rank+ i = j + 1+ rank_sum = sum(rank for rank, (_, label) in zip(ranks, ordered) if label == 1)+ return (rank_sum - pos * (pos + 1) / 2.0) / (pos * neg)+++def main() -> int:+ ap = argparse.ArgumentParser(description=__doc__,+ formatter_class=argparse.RawDescriptionHelpFormatter)+ ap.add_argument("--predictions", required=True, type=Path)+ args = ap.parse_args()++ rows = [json.loads(line) for line in args.predictions.open(encoding="utf-8") if line.strip()]+ labeled = [row for row in rows if row.get("label") in (0, 1)]+ if not labeled:+ raise SystemExit(+ f"[FATAL] {args.predictions} 里一条有效标签都没有(共 {len(rows)} 行);"+ " 多半是打分时源 jsonl 的 label 没被认出来,查 score.py 的 label_to_int。")+ if len(labeled) != len(rows):+ print(f"[WARN] {len(rows) - len(labeled)} 行无有效标签,已排除")++ pairs = [(float(row["prob_1"]), int(row["label"])) for row in labeled]+ by_category: dict[str, list[tuple[float, int]]] = defaultdict(list)+ for row in labeled:+ by_category[str(row.get("category") or "unknown")].append(+ (float(row["prob_1"]), int(row["label"])))++ positives = sum(1 for _, label in pairs if label == 1)+ print(f"样本数 {len(pairs)}(正例 {positives} / 负例 {len(pairs) - positives})")+ print(f"\nAUROC 整体 {auroc(pairs):.4f}")+ for name, values in sorted(by_category.items()):+ score = auroc(values)+ print(f" {name:<10} n={len(values):<6} {'-' if score is None else f'{score:.4f}'}")+ return 0+++if __name__ == "__main__":+ raise SystemExit(main())diff --git a/scripts/minicpm-ocr-jev/eval/score.py b/scripts/minicpm-ocr-jev/eval/score.pynew file mode 100644index 0000000..efdae36--- /dev/null+++ b/scripts/minicpm-ocr-jev/eval/score.py@@ -0,0 +1,287 @@+#!/usr/bin/env python3+# -*- coding: utf-8 -*-+"""MiniCPM-OCR-Jev 打分器:单卡,逐批前向,每条输出一个 prob_1。++prob_1 越高表示 OCR 文本越可能与原图一致。接着用 evaluate.py 出 AUROC。++口径(改任何一处都会让分数偏离已发布读数):+ - 模型类 Qwen3_5ForSequenceClassification,num_labels=2,bf16;**不显式指定 attn 实现**(走 HF 默认)+ - prompt 与训练时逐字节相同,见下方 build_prompt();每批过字符串级与 token 级两道闸+ - 图像预算走 checkpoint 自带 preprocessor 的原生配置(不做 token 数压缩)+ - prob = softmax(logits.float()),prob_1 = prob[1]++用法:+ python score.py --dataset <jsonl> --checkpoint <权重目录> --out <predictions.jsonl>++输入 jsonl 每行(JevOCRBench 即此格式,下载后直接可跑):+ {"item_id": 0, "image_path": "images/00001.png", "render_image_path": "renders/00001.png",+ "ocr_text": "...", "label": "pos"|"neg", "category": "text"|"formula"|"table"}+图像为相对路径时按 jsonl 所在目录解析。+"""++from __future__ import annotations++import argparse+import hashlib+import json+from pathlib import Path+from typing import Any++from PIL import Image++# ============================== prompt 口径 ==============================+# 以下这段**与训练时逐字节相同**,也与发布权重的服务端实现同源。改动其中任何一处+# ——包括空白字符、或把两张图调换顺序——都会改变分数的含义。+#+# 两个看着像冗余、实则不能动的细节:+#+# * 每个图像占位符后面都跟一个换行。丢掉它是最常见的错法,因为用 chat template 的+# content 列表拼 prompt 时渲染出的占位符不带换行。+#+# * prompt 以一个**空的 assistant 轮**结尾(含空 <think> 块)。模型是作为序列分类器+# 训练的,框架会附上这一轮,而池化取的是最后一个 token ⇒ value head 读的正是这一轮+# 末尾那个换行的隐状态。砍掉它就会去池化一个训练时从未被池化过的位置——它照样给出+# 看起来合理的数值,这正是该错误难以察觉的原因。+#+# 下面的指纹在 import 时断言,误改会当场炸而不是悄悄把每个分数挪位。++IMAGE_PLACEHOLDER = "<|vision_start|><|image_pad|><|vision_end|>"++INSTRUCTION = (+ "第一张图是原图,第二张图是上述 OCR 文本渲染得到的图片。\n"+ "请判断该 OCR 文本及其对应渲染图是否与原图内容一致。\n"+ "这是一个二分类任务:一致标为 1,不一致标为 0。"+)++#: 训练框架为序列分类器附上的那个空 assistant 轮;value head 实际读的就是它,见上方说明。+ASSISTANT_SUFFIX = "<|im_end|>\n<|im_start|>assistant\n<think>\n\n</think>\n\n"++PROMPT_TEMPLATE_MD5 = "9aab68e8ba8ab4da17ba9752bddb199c"++#: 被池化位置的 token id:ASSISTANT_SUFFIX 末尾的 '\n\n'。+EXPECTED_LAST_TOKEN_ID = 271++#: Qwen3.5-VL 会拒绝极端长宽比。块裁图常常很宽而只有几像素高,超过这个比例的先补白边+#: ——补白保住字形尺度,缩放不会。常规块裁图/渲染图下恒为 no-op。+MAX_ASPECT_RATIO = 199.0+++def build_prompt(text: str) -> str:+ """拼出单条候选的原始 prompt 字符串。"""+ return (+ f"<|im_start|>user\n"+ f"{IMAGE_PLACEHOLDER}\n"+ f"OCR文本:\n{text}\n"+ f"{IMAGE_PLACEHOLDER}\n"+ f"{INSTRUCTION}"+ f"{ASSISTANT_SUFFIX}"+ )+++def check_prompt_tail(prompt: str) -> None:+ """字符串级口径闸:prompt 必须以那个空 assistant 轮收尾。"""+ if not prompt.endswith(ASSISTANT_SUFFIX):+ raise RuntimeError(+ "prompt 结尾不是训练口径的空 assistant 轮,分数不可比。\n"+ f" 期望以 {ASSISTANT_SUFFIX!r} 结尾\n"+ f" 实得结尾 {prompt[-len(ASSISTANT_SUFFIX):]!r}")+++def _assert_prompt_unchanged() -> None:+ fingerprint = hashlib.md5(build_prompt("{text}").encode("utf-8")).hexdigest()+ if fingerprint != PROMPT_TEMPLATE_MD5:+ raise RuntimeError(+ "prompt 模板已被修改。用改过的模板打出的分数与已发布读数不可比。\n"+ f" 期望 md5 {PROMPT_TEMPLATE_MD5}\n 实得 md5 {fingerprint}\n"+ "若改动是有意的,请同步更新 PROMPT_TEMPLATE_MD5。")+++_assert_prompt_unchanged()+++# ============================== 读样本 ==============================+++def label_to_int(label: Any) -> int | None:+ """pos/neg 与 1/0 两套写法都认;**认不出一律返回 None,绝不猜成某一类**。"""+ if isinstance(label, bool):+ return int(label)+ if isinstance(label, int) and label in {0, 1}:+ return label+ text = str(label).strip().lower()+ if text in {"1", "pos", "positive"}:+ return 1+ if text in {"0", "neg", "negative"}:+ return 0+ return None+++def load_samples(dataset: Path, limit: int | None) -> list[dict[str, Any]]:+ """读 jsonl 成样本表。坏行一律抛错,不静默跳过。"""+ samples: list[dict[str, Any]] = []+ with dataset.open(encoding="utf-8") as handle:+ for line_no, line in enumerate(handle, 1):+ if not line.strip():+ continue+ row = json.loads(line)+ paths = [row.get("image_path") or "", row.get("render_image_path") or ""]+ if not all(paths):+ raise ValueError(f"{dataset}:{line_no} 缺图像路径(需原图 + 渲染图各一张)")+ # item_id 从 0 开始,不能写成 `row.get("item_id") or line_no`——`or` 会把第 0 条当成缺失。+ item_id = row.get("item_id")+ samples.append({+ "item_id": line_no - 1 if item_id is None else item_id,+ "category": row.get("category") or "unknown",+ "label": label_to_int(row.get("label")),+ # 相对路径按 jsonl 所在目录解析+ "images": [str(p if Path(p).is_absolute() else (dataset.parent / p).resolve())+ for p in paths],+ "ocr_text": str(row.get("ocr_text") or ""),+ })+ if limit is not None and len(samples) >= limit:+ break+ if not samples:+ raise ValueError(f"{dataset} 里没有可打分的行")+ return samples+++def pad_extreme_aspect_image(path: str, tmp_dir: Path) -> str:+ """长宽比超限的图补白边后另存,返回该送进 processor 的路径;未超限原样返回。"""+ with Image.open(path) as img:+ width, height = img.size+ if min(width, height) <= 0 or max(width, height) / min(width, height) <= MAX_ASPECT_RATIO:+ return path+ if width >= height:+ new_width, new_height = width, max(height, int(width / MAX_ASPECT_RATIO + 0.999999))+ else:+ new_width, new_height = max(width, int(height / MAX_ASPECT_RATIO + 0.999999)), height+ canvas = Image.new("RGB", (new_width, new_height), "white")+ canvas.paste(img.convert("RGB"), ((new_width - width) // 2, (new_height - height) // 2))++ tmp_dir.mkdir(parents=True, exist_ok=True)+ out_path = tmp_dir / f"{Path(path).stem}__padded_{new_width}x{new_height}.png"+ if not out_path.exists():+ canvas.save(out_path)+ return str(out_path)+++# ============================== 打分 ==============================+++def load_model_and_processor(checkpoint: Path) -> tuple[Any, Any]:+ import torch+ from transformers import AutoProcessor, Qwen3_5ForSequenceClassification++ processor = AutoProcessor.from_pretrained(checkpoint)+ print(f"[INFO] 图像预算走 ckpt 原生配置: {processor.image_processor.size}", flush=True)++ # bf16 是发布口径,不开放成参数——换精度就是换了一套分数。+ model = Qwen3_5ForSequenceClassification.from_pretrained(+ checkpoint, dtype=torch.bfloat16, device_map="cuda:0")+ model.eval()+ if model.config.num_labels != 2:+ raise RuntimeError(f"期望 num_labels=2,实为 {model.config.num_labels}")+ return model, processor+++def assert_pooled_token(inputs: Any) -> None:+ """token 级口径闸:被池化位置的 token 必须是训练口径那个(id 271 '\\n\\n')。++ HF 的 seq_cls 取「最右侧非 padding token」,所以这里按 attention_mask 定位,+ 不能直接取 input_ids[:, -1] —— 右 padding 下那是 pad token。+ """+ input_ids = inputs["input_ids"]+ mask = inputs.get("attention_mask")+ if mask is None:+ last_idx = [input_ids.shape[1] - 1] * input_ids.shape[0]+ else:+ last_idx = (mask.shape[1] - 1 - mask.flip(dims=[1]).argmax(dim=1)).tolist()+ bad = [(i, int(input_ids[i, last_idx[i]])) for i in range(input_ids.shape[0])+ if int(input_ids[i, last_idx[i]]) != EXPECTED_LAST_TOKEN_ID]+ if bad:+ raise RuntimeError(+ f"被池化的末 token 不符训练口径:期望 {EXPECTED_LAST_TOKEN_ID},"+ f"实得 {bad[:5]}(本批 {len(bad)}/{input_ids.shape[0]} 条)。"+ " prompt 或 tokenizer 口径不符,分数不可比。")+++def score_batch(model: Any, processor: Any, samples: list[dict[str, Any]],+ tmp_dir: Path) -> list[float]:+ """返回本批每条的 prob_1。"""+ import torch++ texts: list[str] = []+ flat_images: list[str] = []+ nested_images: list[list[str]] = []+ for sample in samples:+ images = [pad_extreme_aspect_image(p, tmp_dir) for p in sample["images"]]+ prompt = build_prompt(sample["ocr_text"])+ check_prompt_tail(prompt) # 口径闸(字符串级)+ texts.append(prompt)+ flat_images.extend(images)+ nested_images.append(images)++ kwargs: dict[str, Any] = {"text": texts, "return_tensors": "pt"}+ if len(samples) > 1:+ kwargs["padding"] = True+ try:+ inputs = processor(images=flat_images, **kwargs)+ except Exception as flat_exc:+ # 少数行在扁平图列表下会撞 processor 的配对推断,改按样本嵌套重试+ try:+ inputs = processor(images=nested_images, **kwargs)+ except Exception as nested_exc:+ raise RuntimeError(+ f"processor 两种图像入参都失败; flat_error={flat_exc!r}") from nested_exc++ assert_pooled_token(inputs) # 口径闸(token 级)++ inputs = {k: (v.to(model.device) if hasattr(v, "to") else v) for k, v in inputs.items()}+ with torch.inference_mode():+ logits = model(**inputs).logits+ if logits.dim() == 1:+ logits = logits.unsqueeze(0)+ probs = torch.softmax(logits.float(), dim=-1).detach().cpu().tolist()+ if len(probs) != len(samples):+ raise RuntimeError(f"模型返回 {len(probs)} 条 logits,但本批有 {len(samples)} 条样本")+ return [p[1] for p in probs]+++def main() -> int:+ ap = argparse.ArgumentParser(description=__doc__,+ formatter_class=argparse.RawDescriptionHelpFormatter)+ ap.add_argument("--dataset", required=True, type=Path, help="待打分 jsonl")+ ap.add_argument("--checkpoint", required=True, type=Path, help="权重目录")+ ap.add_argument("--out", required=True, type=Path, help="产物 predictions.jsonl")+ ap.add_argument("--batch-size", type=int, default=4)+ ap.add_argument("--limit", type=int, default=None, help="只打前 N 条,用于冒烟")+ args = ap.parse_args()++ samples = load_samples(args.dataset.resolve(), args.limit)+ unlabeled = sum(1 for s in samples if s["label"] is None)+ print(f"[INFO] 样本 {len(samples)} 条,其中无有效标签 {unlabeled} 条", flush=True)++ model, processor = load_model_and_processor(args.checkpoint)+ args.out.parent.mkdir(parents=True, exist_ok=True)+ tmp_dir = args.out.parent / "tmp_padded_images"++ # 边打边写:中途崩了也留得下已打的部分,不必为续跑另建一套索引。+ with args.out.open("w", encoding="utf-8") as handle:+ for start in range(0, len(samples), args.batch_size):+ batch = samples[start:start + args.batch_size]+ for sample, prob_1 in zip(batch, score_batch(model, processor, batch, tmp_dir)):+ handle.write(json.dumps({+ "item_id": sample["item_id"],+ "category": sample["category"],+ "label": sample["label"],+ "prob_1": prob_1,+ }, ensure_ascii=False) + "\n")+ handle.flush()+ print(f"[INFO] {min(start + args.batch_size, len(samples))}/{len(samples)}", flush=True)++ print(f"WROTE {args.out}")+ return 0+++if __name__ == "__main__":+ raise SystemExit(main())diff --git a/scripts/minicpm-ocr-jev/examples/01_text_putnam/block.png b/scripts/minicpm-ocr-jev/examples/01_text_putnam/block.pngnew file mode 100644index 0000000..a2d9ef6Binary files /dev/null and b/scripts/minicpm-ocr-jev/examples/01_text_putnam/block.png differdiff --git a/scripts/minicpm-ocr-jev/examples/01_text_putnam/case.json b/scripts/minicpm-ocr-jev/examples/01_text_putnam/case.jsonnew file mode 100644index 0000000..b4d8adb--- /dev/null+++ b/scripts/minicpm-ocr-jev/examples/01_text_putnam/case.json@@ -0,0 +1,33 @@+{+ "case_id": "text_putnam_2009",+ "category": "text",+ "lang": "en",+ "block_image": "block.png",+ "reference_render": "reference_render.png",+ "reference_render_of": "ocr_output",+ "provenance": {+ "dataset": "OmniDocBench v1.6",+ "document": "Putnam Mathematical Competition 2009, Problems, page 1",+ "block": "crop 10"+ },+ "candidates": [+ {+ "role": "ground_truth",+ "text": "(a) $0 \\in S$;\n(b) If $x \\in S$ then $x + 1 \\in S$ and $x - 1 \\in S$; and\n(c) If $x \\in S$ and $x \\notin \\{0, 1\\}$, then $\\frac{1}{x(x-1)} \\in S$.",+ "note": "reference transcription from the source dataset; not itself labelled there"+ },+ {+ "role": "ocr_output",+ "label": "inconsistent",+ "producing_model": "withheld",+ "text": "(a)(b) If x \\in S then x + 1 \\in S and x - 1 \\in S ; and\\[ 0 \\in S;\\]\\[ (\\mathrm{c}) \\text{ If }x\\in S \\text{ and }x\\not\\in\\{0,1\\}, \\text{ then } \\frac{1}{x(x-1)}\\in S.\\]",+ "label_source": "label carried by the source dataset for this candidate"+ }+ ],+ "what_this_shows": "The OCR output keeps almost every token of the source but destroys the list ordering: items (a) and (b) are merged, and the content of (a) is emitted afterwards as display math. A text-only metric that ignores order scores this highly; the rendered image makes the error obvious. Behaves as you would hope: the faithful transcription scores high, the reordered one is rejected.",+ "observed_prob_yes": {+ "ground_truth": 0.99501,+ "ocr_output": 0.00702+ },+ "observed_note": "Measured once on the reference setup. Scores are not bitwise reproducible, so expect small differences; large ones mean something in your setup differs."+}diff --git a/scripts/minicpm-ocr-jev/examples/01_text_putnam/reference_render.png b/scripts/minicpm-ocr-jev/examples/01_text_putnam/reference_render.pngnew file mode 100644index 0000000..e4ac677Binary files /dev/null and b/scripts/minicpm-ocr-jev/examples/01_text_putnam/reference_render.png differdiff --git a/scripts/minicpm-ocr-jev/examples/02_formula_putnam/block.png b/scripts/minicpm-ocr-jev/examples/02_formula_putnam/block.pngnew file mode 100644index 0000000..6f3b4b1Binary files /dev/null and b/scripts/minicpm-ocr-jev/examples/02_formula_putnam/block.png differdiff --git a/scripts/minicpm-ocr-jev/examples/02_formula_putnam/case.json b/scripts/minicpm-ocr-jev/examples/02_formula_putnam/case.jsonnew file mode 100644index 0000000..552a803--- /dev/null+++ b/scripts/minicpm-ocr-jev/examples/02_formula_putnam/case.json@@ -0,0 +1,33 @@+{+ "case_id": "formula_putnam_1999",+ "category": "formula",+ "lang": "en",+ "block_image": "block.png",+ "reference_render": "reference_render.png",+ "reference_render_of": "ocr_output",+ "provenance": {+ "dataset": "OmniDocBench v1.6",+ "document": "Putnam Mathematical Competition 1999, Solutions, page 3",+ "block": "crop 7"+ },+ "candidates": [+ {+ "role": "ground_truth",+ "text": "$$P''(x) = (k^2 - k)x^{k-2}R(x) + 2kx^{k-1}R'(x) + x^kR''(x).$$",+ "note": "reference transcription from the source dataset; not itself labelled there"+ },+ {+ "role": "ocr_output",+ "label": "consistent",+ "producing_model": "withheld",+ "text": "\\[ P ^ {\\prime \\prime} (x) = \\left(k ^ {2} - k\\right) x ^ {k - 2} R (x) + 2 k x ^ {k - 1} R ^ {\\prime} (x) + x ^ {k} R ^ {\\prime \\prime} (x). \\]",+ "label_source": "label carried by the source dataset for this candidate"+ }+ ],+ "what_this_shows": "Both candidates are labelled consistent even though their LaTeX differs substantially: different delimiters, \\prime vs ', \\left( vs (, and extra spacing. Rendering collapses those differences, so both should score high. String comparison against the ground truth would wrongly penalise the second one. Both score high, which is the point: the source data labels both as consistent, and rendering collapses the LaTeX differences that a string comparison would punish.",+ "observed_prob_yes": {+ "ground_truth": 0.96813,+ "ocr_output": 0.96552+ },+ "observed_note": "Measured once on the reference setup. Scores are not bitwise reproducible, so expect small differences; large ones mean something in your setup differs."+}diff --git a/scripts/minicpm-ocr-jev/examples/02_formula_putnam/reference_render.png b/scripts/minicpm-ocr-jev/examples/02_formula_putnam/reference_render.pngnew file mode 100644index 0000000..dd1536bBinary files /dev/null and b/scripts/minicpm-ocr-jev/examples/02_formula_putnam/reference_render.png differdiff --git a/scripts/minicpm-ocr-jev/examples/03_table_gb_standard/block.png b/scripts/minicpm-ocr-jev/examples/03_table_gb_standard/block.pngnew file mode 100644index 0000000..6aa872aBinary files /dev/null and b/scripts/minicpm-ocr-jev/examples/03_table_gb_standard/block.png differdiff --git a/scripts/minicpm-ocr-jev/examples/03_table_gb_standard/case.json b/scripts/minicpm-ocr-jev/examples/03_table_gb_standard/case.jsonnew file mode 100644index 0000000..185be55--- /dev/null+++ b/scripts/minicpm-ocr-jev/examples/03_table_gb_standard/case.json@@ -0,0 +1,33 @@+{+ "case_id": "table_gb_standard",+ "category": "table",+ "lang": "zh",+ "block_image": "block.png",+ "reference_render": "reference_render.png",+ "reference_render_of": "ocr_output",+ "provenance": {+ "dataset": "OmniDocBench v1.6",+ "document": "GB 14536.1-1998 (Chinese national standard), page 145",+ "block": "crop 2"+ },+ "candidates": [+ {+ "role": "ground_truth",+ "text": "<table><thead><tr><td></td><td>$\\Delta U$</td><td>持续时间</td></tr></thead><tbody><tr><td>电压降落</td><td>30%</td><td>0.5s</td></tr><tr><td></td><td>60%</td><td>0.5s</td></tr><tr><td>电压切断</td><td>100%</td><td>电源波形一个周期</td></tr><tr><td></td><td></td><td>0.5s</td></tr><tr><td></td><td></td><td>60.0s</td></tr></tbody></table>",+ "note": "reference transcription from the source dataset; not itself labelled there"+ },+ {+ "role": "ocr_output",+ "label": "inconsistent",+ "producing_model": "withheld",+ "text": "<table><tr><td></td><td>ΔU</td><td>持续时间</td></tr><tr><td rowspan=\"2\">电压降落</td><td>30%</td><td>0.5a</td></tr><tr><td>60%</td><td>0.5a</td></tr><tr><td rowspan=\"3\">电压倒落</td><td rowspan=\"3\">100%</td><td>电源波形一个周期</td></tr><tr><td>0.5a</td></tr><tr><td>60.0a</td></tr></table>",+ "label_source": "label carried by the source dataset for this candidate"+ }+ ],+ "what_this_shows": "Three independent OCR errors in one block: the unit second is read as 'a' in three cells (0.5s -> 0.5a, 60.0s -> 60.0a), the term 电压切断 (voltage cut-off) becomes 电压倒落, and the row structure is rebuilt with rowspan. Tables must be sent as HTML; the renderer does not accept other table markup. Note the reference transcription scores LOW (0.04) even though it faithfully reproduces the block. The ranking is still right -- it beats the erroneous one by a wide margin -- but the absolute value is not usable as 'this transcription is correct'. The cause has not been established; the renderer lays tables out at a fixed width, so a small source crop and its render differ a lot in scale, but that is a hypothesis, not a finding. Treat this example as the concrete reason to compare candidates against each other rather than against a threshold.",+ "observed_prob_yes": {+ "ground_truth": 0.04075,+ "ocr_output": 0.00116+ },+ "observed_note": "Measured once on the reference setup. Scores are not bitwise reproducible, so expect small differences; large ones mean something in your setup differs."+}diff --git a/scripts/minicpm-ocr-jev/examples/03_table_gb_standard/reference_render.png b/scripts/minicpm-ocr-jev/examples/03_table_gb_standard/reference_render.pngnew file mode 100644index 0000000..c9874c5Binary files /dev/null and b/scripts/minicpm-ocr-jev/examples/03_table_gb_standard/reference_render.png differdiff --git a/scripts/minicpm-ocr-jev/infer_vllm.py b/scripts/minicpm-ocr-jev/infer_vllm.pynew file mode 100644index 0000000..7d38d64--- /dev/null+++ b/scripts/minicpm-ocr-jev/infer_vllm.py@@ -0,0 +1,488 @@+"""Score OCR candidates with the reward model, using vLLM for the forward pass.++The model is a vision-language reward model with a value head: a 2-class+sequence-classification head on top of a Qwen3.5-VL backbone. It answers one+question -- "does this OCR text match this document image?" -- and it answers it+by looking at two images at once:++ image 1: the original document block+ image 2: that block's candidate OCR text, rendered back into an image++Scoring one candidate therefore takes three steps, and this script runs all three:++ precheck -> render -> forward++`prob_yes` is softmax(logits)[1], the probability that the candidate is consistent+with the original. Higher is better. Candidates that fail precheck or rendering are+reported with prob_yes = 0.0, since a candidate whose LaTeX cannot even be parsed is+not a plausible transcription.++Input form: this checkpoint is ternary -- original image, text, and rendered image.+It always needs the rendered image; there is no text-only or single-image mode.++Reproducibility: scores are not bitwise reproducible. vLLM batches requests+continuously, so the same candidate can be computed alongside different neighbours+and differ in the last few decimal places. Compare rankings, not absolute values,+and do not hard-code thresholds derived from one run.++Usage:++ # score two candidates for one block+ python infer_vllm.py --model /path/to/weights \+ --image examples/01_text_putnam/block.png --category text \+ --candidate "first candidate" --candidate "second candidate"++ # score the bundled examples+ python infer_vllm.py --model /path/to/weights --examples++ # score a JSONL file: {"case_id", "image_path", "candidates": [...], "category"}+ python infer_vllm.py --model /path/to/weights --input-jsonl blocks.jsonl+"""+from __future__ import annotations++import hashlib+import json+from dataclasses import dataclass+from pathlib import Path+from typing import Any, Sequence++from PIL import Image++from rm_render import CATEGORIES, Candidate, RenderResult, render_candidates++HERE = Path(__file__).resolve().parent++# ---------------------------------------------------------------------------+# Prompt+#+# These bytes are part of the model, not a configuration choice. The checkpoint was+# trained with exactly this text, in exactly this order: original image, the OCR+# text, the rendered image, then the instruction. Changing any of it -- including+# whitespace, or swapping the two images -- changes what the scores mean.+#+# Two details here look like padding and are not:+#+# * Each image placeholder is followed by a newline. Dropping it is the single most+# common way to get this wrong, because building the prompt through a chat+# template's content list renders the placeholder without one.+#+# * The prompt ends with an empty assistant turn, including the empty <think>+# block. The model was trained as a sequence classifier, where the framework+# appends that turn, and vLLM's classify path pools the LAST token. So the value+# head reads the hidden state of the final newline in that assistant turn. Cut+# the turn off and you are pooling a position the model never saw pooled during+# training -- it still produces plausible-looking numbers, which is what makes+# the mistake hard to notice.+#+# The fingerprint below is asserted at import time so an accidental edit fails loudly+# instead of silently shifting every score.+# ---------------------------------------------------------------------------++IMAGE_PLACEHOLDER = "<|vision_start|><|image_pad|><|vision_end|>"++INSTRUCTION = (+ "第一张图是原图,第二张图是上述 OCR 文本渲染得到的图片。\n"+ "请判断该 OCR 文本及其对应渲染图是否与原图内容一致。\n"+ "这是一个二分类任务:一致标为 1,不一致标为 0。"+)++#: The empty assistant turn the training framework appends for a sequence+#: classifier. It is what the value head actually reads; see the note above.+ASSISTANT_SUFFIX = "<|im_end|>\n<|im_start|>assistant\n<think>\n\n</think>\n\n"++PROMPT_TEMPLATE_MD5 = "9aab68e8ba8ab4da17ba9752bddb199c"++#: Images per prompt. Ternary input means two: original, then render.+IMAGES_PER_PROMPT = 2++#: Qwen3.5-VL rejects extreme aspect ratios. Document block crops are often very+#: wide and only a few pixels tall, so anything past this ratio is padded with white+#: rather than resized -- padding preserves the glyph scale, resizing would not.+MAX_ASPECT_RATIO = 199.0+++def build_prompt(text: str) -> str:+ """Assemble the raw prompt string for one candidate."""+ return (+ f"<|im_start|>user\n"+ f"{IMAGE_PLACEHOLDER}\n"+ f"OCR文本:\n{text}\n"+ f"{IMAGE_PLACEHOLDER}\n"+ f"{INSTRUCTION}"+ f"{ASSISTANT_SUFFIX}"+ )+++def _assert_prompt_unchanged() -> None:+ fingerprint = hashlib.md5(build_prompt("{text}").encode("utf-8")).hexdigest()+ if fingerprint != PROMPT_TEMPLATE_MD5:+ raise RuntimeError(+ "The prompt template has been modified. Scores produced with a modified "+ f"template are not comparable to published ones.\n"+ f" expected md5 {PROMPT_TEMPLATE_MD5}\n got md5 {fingerprint}\n"+ "If the change is deliberate, update PROMPT_TEMPLATE_MD5."+ )+++_assert_prompt_unchanged()+++# ---------------------------------------------------------------------------+# Images+# ---------------------------------------------------------------------------++def load_image(path: str | Path, max_ratio: float = MAX_ASPECT_RATIO) -> Image.Image:+ """Open an image, padding it with white if it is too long and thin."""+ img = Image.open(path).convert("RGB")+ width, height = img.size+ longest, shortest = max(width, height), max(1, min(width, height))+ if longest / shortest <= max_ratio:+ return img++ if width >= height:+ new_w, new_h = width, max(height, int(width / max_ratio + 0.999999))+ else:+ new_h, new_w = height, max(width, int(height / max_ratio + 0.999999))+ canvas = Image.new("RGB", (new_w, new_h), "white")+ canvas.paste(img, ((new_w - width) // 2, (new_h - height) // 2))+ return canvas+++# ---------------------------------------------------------------------------+# Results+# ---------------------------------------------------------------------------++@dataclass+class Scored:+ """One candidate's score, plus why it has the score it has."""++ case_id: str+ text: str+ prob_yes: float+ #: "scored", "precheck_reject", "render_error", "missing_original_image"+ verdict: str+ render_image_path: str | None = None+ katex_errors: list[str] | None = None+ detail: str | None = None++ @property+ def scored(self) -> bool:+ return self.verdict == "scored"+++# ---------------------------------------------------------------------------+# Scorer+# ---------------------------------------------------------------------------++class RMScorer:+ """Wraps a vLLM engine configured for sequence classification.++ The engine is loaded once and reused. Loading takes a few minutes (weight load,+ graph capture, multi-modal warmup), so build one scorer and keep it.++ `vllm.LLM` is the offline API: pass it every prompt you have and it will batch+ them internally. For a long-running service, use vLLM's async engine instead;+ this class is for batch scoring and single-shot use.+ """++ def __init__(+ self,+ model: str | Path,+ *,+ dtype: str = "bfloat16",+ max_model_len: int = 16384,+ gpu_memory_utilization: float = 0.6,+ **llm_kwargs: Any,+ ) -> None:+ # Imported here so that `--help` and the renderer CLI work without vLLM.+ from vllm import LLM, PoolingParams++ self._pooling_params = PoolingParams(+ # Return raw logits. The activation is applied below, explicitly, so that+ # the two class logits can be softmaxed against each other.+ use_activation=False,+ )+ self.llm = LLM(+ model=str(model),+ runner="pooling",+ convert="classify",+ dtype=dtype,+ max_model_len=max_model_len,+ gpu_memory_utilization=gpu_memory_utilization,+ limit_mm_per_prompt={"image": IMAGES_PER_PROMPT},+ **llm_kwargs,+ )++ def forward(self, triples: Sequence[tuple[str, str, str]]) -> list[float]:+ """Score (original image path, render image path, text) triples.++ Returns prob_yes per triple, in input order.+ """+ if not triples:+ return []++ prompts = [+ {+ "prompt": build_prompt(text),+ "multi_modal_data": {+ "image": [load_image(original), load_image(render)],+ },+ }+ for original, render, text in triples+ ]+ outputs = self.llm.classify(prompts, pooling_params=self._pooling_params)+ return [_prob_yes(o.outputs.probs) for o in outputs]++ def score(+ self,+ candidates: Sequence[Candidate],+ *,+ work_dir: str | Path | None = None,+ precheck: bool = True,+ browser_concurrency: int = 4,+ keep_renders: bool = False,+ render_python: str | None = None,+ ) -> list[Scored]:+ """Run the whole pipeline: precheck, render, forward.++ Results come back in input order. Candidates that never reached the model are+ included with prob_yes = 0.0 and a verdict saying what stopped them.++ The rendered images have to outlive rendering, because the forward pass reads+ them back off disk. So this method owns the directory they live in: a caller+ that passes `work_dir` keeps them, otherwise they go to a temporary directory+ that is removed once scoring is done.+ """+ import shutil+ import tempfile++ owned_tmp: str | None = None+ if work_dir is None:+ owned_tmp = tempfile.mkdtemp(prefix="rm_score_")+ work_dir = owned_tmp++ try:+ return self._score_in(+ candidates, Path(work_dir), precheck, browser_concurrency, render_python+ )+ finally:+ if owned_tmp is not None and not keep_renders:+ shutil.rmtree(owned_tmp, ignore_errors=True)++ def _score_in(+ self,+ candidates: Sequence[Candidate],+ work_dir: Path,+ precheck: bool,+ browser_concurrency: int,+ render_python: str | None,+ ) -> list[Scored]:+ renders = render_candidates(+ candidates,+ work_dir=work_dir,+ precheck=precheck,+ browser_concurrency=browser_concurrency,+ python_bin=render_python,+ )+ by_id = {r.case_id: r for r in renders}++ forwardable: list[tuple[int, Candidate, RenderResult]] = []+ for i, cand in enumerate(candidates):+ r = by_id[cand.case_id]+ if not (r.ok and r.render_image_path):+ continue+ if not Path(r.render_image_path).is_file():+ # The renderer reported success but the file is not there. Say so+ # here rather than letting it surface as a FileNotFoundError from+ # inside the image loader, where the cause is unrecognisable.+ r.ok = False+ r.reason = "render_error"+ r.detail = f"render reported ok but {r.render_image_path} is missing"+ continue+ forwardable.append((i, cand, r))++ probs = self.forward([+ (cand.image_path, r.render_image_path or "", cand.text)+ for _, cand, r in forwardable+ ])++ scores: dict[int, float] = {idx: p for (idx, _, _), p in zip(forwardable, probs)}++ out: list[Scored] = []+ for i, cand in enumerate(candidates):+ r = by_id[cand.case_id]+ if i in scores:+ out.append(Scored(+ case_id=cand.case_id, text=cand.text, prob_yes=scores[i],+ verdict="scored", render_image_path=r.render_image_path,+ katex_errors=r.katex_errors or None,+ ))+ else:+ out.append(Scored(+ case_id=cand.case_id, text=cand.text, prob_yes=0.0,+ verdict=r.reason or "render_error",+ katex_errors=r.katex_errors or None, detail=r.detail,+ ))+ return out+++def _prob_yes(logits: Sequence[float]) -> float:+ """softmax over the two class logits, probability of class 1 (consistent)."""+ import math++ if len(logits) != 2:+ raise ValueError(+ f"expected 2 class logits from the value head, got {len(logits)}. "+ "This checkpoint may not be a 2-class sequence-classification model."+ )+ a, b = float(logits[0]), float(logits[1])+ top = max(a, b)+ exp_a, exp_b = math.exp(a - top), math.exp(b - top)+ return exp_b / (exp_a + exp_b)+++# ---------------------------------------------------------------------------+# CLI+# ---------------------------------------------------------------------------++def _load_examples() -> list[dict[str, Any]]:+ blocks = []+ for case_dir in sorted((HERE / "examples").glob("*/case.json")):+ case = json.loads(case_dir.read_text(encoding="utf-8"))+ blocks.append({+ "case_id": case["case_id"],+ "image_path": str(case_dir.parent / case["block_image"]),+ "category": case["category"],+ "candidates": [c["text"] for c in case["candidates"]],+ "_roles": [c.get("role", "") for c in case["candidates"]],+ "_labels": [c.get("label", "") for c in case["candidates"]],+ "_expected": case.get("observed_prob_yes", {}),+ "_note": case.get("what_this_shows", ""),+ })+ return blocks+++def _load_jsonl(path: Path) -> list[dict[str, Any]]:+ blocks = []+ with path.open(encoding="utf-8") as handle:+ for line in handle:+ if line.strip():+ blocks.append(json.loads(line))+ return blocks+++def main() -> None:+ import argparse++ ap = argparse.ArgumentParser(+ description="Score OCR candidates with the reward model.",+ formatter_class=argparse.RawDescriptionHelpFormatter,+ )+ ap.add_argument("--model", required=True, help="path to the checkpoint directory")++ source = ap.add_argument_group("what to score (pick one)")+ source.add_argument("--image", help="original document block image")+ source.add_argument("--candidate", dest="candidates", action="append", default=[],+ metavar="TEXT", help="candidate text (repeat for several)")+ source.add_argument("--category", default="text", choices=list(CATEGORIES))+ source.add_argument("--examples", action="store_true",+ help="score the bundled examples in examples/")+ source.add_argument("--input-jsonl", type=Path,+ help='one block per line: {"case_id", "image_path", "candidates", "category"}')++ engine = ap.add_argument_group("engine")+ engine.add_argument("--max-model-len", type=int, default=16384)+ engine.add_argument("--gpu-memory-utilization", type=float, default=0.6)+ engine.add_argument("--dtype", default="bfloat16")++ pipeline = ap.add_argument_group("pipeline")+ pipeline.add_argument("--no-precheck", action="store_true",+ help="skip the KaTeX screen (does not need Node)")+ pipeline.add_argument("--browser-concurrency", type=int, default=4)+ pipeline.add_argument("--render-python",+ help="interpreter to run the render driver with, when Chromium "+ "needs a wrapper that sets LD_LIBRARY_PATH")+ pipeline.add_argument("--save-renders", metavar="DIR",+ help="keep the rendered images here for inspection")+ pipeline.add_argument("--json", action="store_true", help="print results as JSON")++ args = ap.parse_args()++ if args.examples:+ blocks = _load_examples()+ elif args.input_jsonl:+ blocks = _load_jsonl(args.input_jsonl)+ elif args.image and args.candidates:+ blocks = [{+ "case_id": "block",+ "image_path": args.image,+ "category": args.category,+ "candidates": list(args.candidates),+ }]+ else:+ ap.error("pass --examples, or --input-jsonl, or both --image and --candidate")++ # Flatten to candidates. Case ids must be unique across the whole batch, so the+ # block id is suffixed with the candidate index.+ cands: list[Candidate] = []+ for block in blocks:+ for i, text in enumerate(block["candidates"]):+ cands.append(Candidate(+ case_id=f"{block['case_id']}#{i}",+ image_path=block["image_path"],+ text=text,+ category=block.get("category", "text"),+ ))++ print(f"loading {args.model} …")+ scorer = RMScorer(+ args.model,+ dtype=args.dtype,+ max_model_len=args.max_model_len,+ gpu_memory_utilization=args.gpu_memory_utilization,+ )++ results = scorer.score(+ cands,+ work_dir=args.save_renders,+ precheck=not args.no_precheck,+ browser_concurrency=args.browser_concurrency,+ keep_renders=bool(args.save_renders),+ render_python=args.render_python,+ )+ by_id = {r.case_id: r for r in results}++ if args.json:+ print(json.dumps([r.__dict__ for r in results], ensure_ascii=False, indent=2))+ return++ for block in blocks:+ rows = [by_id[f"{block['case_id']}#{i}"] for i in range(len(block["candidates"]))]+ best = max(range(len(rows)), key=lambda i: rows[i].prob_yes) if rows else None++ print()+ print(f"=== {block['case_id']} ({block.get('category', 'text')})")+ if block.get("_note"):+ print(f" {block['_note']}")+ for i, r in enumerate(rows):+ marker = "*" if i == best else " "+ extra = ""+ if block.get("_roles"):+ role = block["_roles"][i]+ label = block["_labels"][i]+ extra = f" [{role}" + (f", labelled {label}" if label else "") + "]"+ expected = (block.get("_expected") or {}).get(role)+ if expected is not None:+ extra += f" (reference run: {expected:.5f})"+ print(f" {marker} prob_yes={r.prob_yes:.5f} {r.verdict}{extra}")+ if r.katex_errors:+ print(f" katex: {r.katex_errors}")+ if r.detail:+ print(f" detail: {r.detail}")+ print(f" text: {r.text[:100]!r}")+ if best is not None:+ print(f" best candidate: index {best}")+++if __name__ == "__main__":+ main()diff --git a/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/auto-render.min.js b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/auto-render.min.jsnew file mode 100644index 0000000..0a1f35d--- /dev/null+++ b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/auto-render.min.js@@ -0,0 +1 @@+!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):"object"==typeof exports?exports.renderMathInElement=t(require("katex")):e.renderMathInElement=t(e.katex)}("undefined"!=typeof self?self:this,function(e){return function(){"use strict";var t={757:function(t){t.exports=e}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var o={};r.d(o,{default:function(){return p}});var i=r(757),a=r.n(i);const l=function(e,t,n){let r=n,o=0;const i=e.length;for(;r<t.length;){const n=t[r];if(o<=0&&t.slice(r,r+i)===e)return r;"\\"===n?r++:"{"===n?o++:"}"===n&&o--,r++}return-1},s=/^\\begin{/;var d=function(e,t){let n;const r=[],o=new RegExp("("+t.map(e=>e.left.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|")+")");for(;n=e.search(o),-1!==n;){n>0&&(r.push({type:"text",data:e.slice(0,n)}),e=e.slice(n));const o=t.findIndex(t=>e.startsWith(t.left));if(n=l(t[o].right,e,t[o].left.length),-1===n)break;const i=e.slice(0,n+t[o].right.length),a=s.test(i)?i:e.slice(t[o].left.length,n);r.push({type:"math",data:a,rawData:i,display:t[o].display}),e=e.slice(n+t[o].right.length)}return""!==e&&r.push({type:"text",data:e}),r};const c=function(e,t){const n=d(e,t.delimiters);if(1===n.length&&"text"===n[0].type)return null;const r=document.createDocumentFragment();for(let e=0;e<n.length;e++)if("text"===n[e].type)r.appendChild(document.createTextNode(n[e].data));else{const o=document.createElement("span");let i=n[e].data;t.displayMode=n[e].display;try{t.preProcess&&(i=t.preProcess(i)),a().render(i,o,t)}catch(o){if(!(o instanceof a().ParseError))throw o;t.errorCallback("KaTeX auto-render: Failed to parse `"+n[e].data+"` with ",o),r.appendChild(document.createTextNode(n[e].rawData));continue}r.appendChild(o)}return r},f=function(e,t){for(let o=0;o<e.childNodes.length;o++){const i=e.childNodes[o];if(3===i.nodeType){var n;let a=null!=(n=i.textContent)?n:"",l=i.nextSibling,s=0;for(;l&&l.nodeType===Node.TEXT_NODE;){var r;a+=null!=(r=l.textContent)?r:"",l=l.nextSibling,s++}const d=c(a,t);if(d){for(let e=0;e<s;e++)i.nextSibling.remove();o+=d.childNodes.length-1,e.replaceChild(d,i)}else o+=s}else if(1===i.nodeType){const e=" "+i.className+" ";!t.ignoredTags.has(i.nodeName.toLowerCase())&&t.ignoredClasses.every(t=>!e.includes(" "+t+" "))&&f(i,t)}}};var p=function(e,t){if(!e)throw new Error("No element provided to render");const n={};Object.assign(n,t),n.delimiters=n.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],n.ignoredTags=new Set((null==t?void 0:t.ignoredTags)||["script","noscript","style","textarea","pre","code","option"]),n.ignoredClasses=n.ignoredClasses||[],n.errorCallback=n.errorCallback||console.error,n.macros=n.macros||{},f(e,n)};return o=o.default}()});\ No newline at end of filediff --git a/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_AMS-Regular.woff2 b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_AMS-Regular.woff2new file mode 100644index 0000000..0acaaffBinary files /dev/null and b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_AMS-Regular.woff2 differdiff --git a/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Caligraphic-Bold.woff2 b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Caligraphic-Bold.woff2new file mode 100644index 0000000..f390922Binary files /dev/null and b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Caligraphic-Bold.woff2 differdiff --git a/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Caligraphic-Regular.woff2 b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Caligraphic-Regular.woff2new file mode 100644index 0000000..75344a1Binary files /dev/null and b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Caligraphic-Regular.woff2 differdiff --git a/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Fraktur-Bold.woff2 b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Fraktur-Bold.woff2new file mode 100644index 0000000..395f28bBinary files /dev/null and b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Fraktur-Bold.woff2 differdiff --git a/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Fraktur-Regular.woff2 b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Fraktur-Regular.woff2new file mode 100644index 0000000..735f694Binary files /dev/null and b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Fraktur-Regular.woff2 differdiff --git a/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Main-Bold.woff2 b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Main-Bold.woff2new file mode 100644index 0000000..ab2ad21Binary files /dev/null and b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Main-Bold.woff2 differdiff --git a/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Main-BoldItalic.woff2 b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Main-BoldItalic.woff2new file mode 100644index 0000000..5931794Binary files /dev/null and b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Main-BoldItalic.woff2 differdiff --git a/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Main-Italic.woff2 b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Main-Italic.woff2new file mode 100644index 0000000..b50920eBinary files /dev/null and b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Main-Italic.woff2 differdiff --git a/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Main-Regular.woff2 b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Main-Regular.woff2new file mode 100644index 0000000..eb24a7bBinary files /dev/null and b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Main-Regular.woff2 differdiff --git a/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Math-BoldItalic.woff2 b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Math-BoldItalic.woff2new file mode 100644index 0000000..2965702Binary files /dev/null and b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Math-BoldItalic.woff2 differdiff --git a/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Math-Italic.woff2 b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Math-Italic.woff2new file mode 100644index 0000000..215c143Binary files /dev/null and b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Math-Italic.woff2 differdiff --git a/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_SansSerif-Bold.woff2 b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_SansSerif-Bold.woff2new file mode 100644index 0000000..cfaa3bdBinary files /dev/null and b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_SansSerif-Bold.woff2 differdiff --git a/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_SansSerif-Italic.woff2 b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_SansSerif-Italic.woff2new file mode 100644index 0000000..349c06dBinary files /dev/null and b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_SansSerif-Italic.woff2 differdiff --git a/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_SansSerif-Regular.woff2 b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_SansSerif-Regular.woff2new file mode 100644index 0000000..a90eea8Binary files /dev/null and b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_SansSerif-Regular.woff2 differdiff --git a/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Script-Regular.woff2 b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Script-Regular.woff2new file mode 100644index 0000000..b3048fcBinary files /dev/null and b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Script-Regular.woff2 differdiff --git a/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Size1-Regular.woff2 b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Size1-Regular.woff2new file mode 100644index 0000000..c5a8462Binary files /dev/null and b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Size1-Regular.woff2 differdiff --git a/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Size2-Regular.woff2 b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Size2-Regular.woff2new file mode 100644index 0000000..e1bccfeBinary files /dev/null and b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Size2-Regular.woff2 differdiff --git a/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Size3-Regular.woff2 b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Size3-Regular.woff2new file mode 100644index 0000000..249a286Binary files /dev/null and b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Size3-Regular.woff2 differdiff --git a/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Size4-Regular.woff2 b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Size4-Regular.woff2new file mode 100644index 0000000..680c130Binary files /dev/null and b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Size4-Regular.woff2 differdiff --git a/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Typewriter-Regular.woff2 b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Typewriter-Regular.woff2new file mode 100644index 0000000..771f1afBinary files /dev/null and b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/fonts/KaTeX_Typewriter-Regular.woff2 differdiff --git a/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/katex.min.css b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/katex.min.cssnew file mode 100644index 0000000..6cf3198--- /dev/null+++ b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/katex.min.css@@ -0,0 +1 @@+@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(fonts/KaTeX_AMS-Regular.woff2) format("woff2"),url(fonts/KaTeX_AMS-Regular.woff) format("woff"),url(fonts/KaTeX_AMS-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Caligraphic-Bold.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Bold.woff) format("woff"),url(fonts/KaTeX_Caligraphic-Bold.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Caligraphic-Regular.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Regular.woff) format("woff"),url(fonts/KaTeX_Caligraphic-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Fraktur-Bold.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Bold.woff) format("woff"),url(fonts/KaTeX_Fraktur-Bold.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Fraktur-Regular.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Regular.woff) format("woff"),url(fonts/KaTeX_Fraktur-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Main-Bold.woff2) format("woff2"),url(fonts/KaTeX_Main-Bold.woff) format("woff"),url(fonts/KaTeX_Main-Bold.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Main-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Main-BoldItalic.woff) format("woff"),url(fonts/KaTeX_Main-BoldItalic.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Main-Italic.woff2) format("woff2"),url(fonts/KaTeX_Main-Italic.woff) format("woff"),url(fonts/KaTeX_Main-Italic.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Main-Regular.woff2) format("woff2"),url(fonts/KaTeX_Main-Regular.woff) format("woff"),url(fonts/KaTeX_Main-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Math-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Math-BoldItalic.woff) format("woff"),url(fonts/KaTeX_Math-BoldItalic.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Math-Italic.woff2) format("woff2"),url(fonts/KaTeX_Math-Italic.woff) format("woff"),url(fonts/KaTeX_Math-Italic.ttf) format("truetype")}@font-face{font-display:block;font-family:"KaTeX_SansSerif";font-style:normal;font-weight:700;src:url(fonts/KaTeX_SansSerif-Bold.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Bold.woff) format("woff"),url(fonts/KaTeX_SansSerif-Bold.ttf) format("truetype")}@font-face{font-display:block;font-family:"KaTeX_SansSerif";font-style:italic;font-weight:400;src:url(fonts/KaTeX_SansSerif-Italic.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Italic.woff) format("woff"),url(fonts/KaTeX_SansSerif-Italic.ttf) format("truetype")}@font-face{font-display:block;font-family:"KaTeX_SansSerif";font-style:normal;font-weight:400;src:url(fonts/KaTeX_SansSerif-Regular.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Regular.woff) format("woff"),url(fonts/KaTeX_SansSerif-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Script-Regular.woff2) format("woff2"),url(fonts/KaTeX_Script-Regular.woff) format("woff"),url(fonts/KaTeX_Script-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size1-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size1-Regular.woff) format("woff"),url(fonts/KaTeX_Size1-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size2-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size2-Regular.woff) format("woff"),url(fonts/KaTeX_Size2-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size3-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size3-Regular.woff) format("woff"),url(fonts/KaTeX_Size3-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size4-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size4-Regular.woff) format("woff"),url(fonts/KaTeX_Size4-Regular.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Typewriter-Regular.woff2) format("woff2"),url(fonts/KaTeX_Typewriter-Regular.woff) format("woff"),url(fonts/KaTeX_Typewriter-Regular.ttf) format("truetype")}.katex{font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;position:relative;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.47"}.katex .katex-mathml{border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .smash{display:inline;line-height:0}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex svg{fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}diff --git a/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/katex.min.js b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/katex.min.jsnew file mode 100644index 0000000..a638f46--- /dev/null+++ b/scripts/minicpm-ocr-jev/renderer/assets/katex-0.16.47/katex.min.js@@ -0,0 +1 @@+!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.katex=t():e.katex=t()}("undefined"!=typeof self?self:this,function(){return function(){"use strict";var e={d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{default:function(){return ko}});class r extends Error{constructor(e,t){let n,o,s="KaTeX parse error: "+e;const i=t&&t.loc;if(i&&i.start<=i.end){const e=i.lexer.input;n=i.start,o=i.end,n===e.length?s+=" at end of input: ":s+=" at position "+(n+1)+": ";const t=e.slice(n,o).replace(/[^]/g,"$&\u0332");let r,l;r=n>15?"\u2026"+e.slice(n-15,n):e.slice(0,n),l=o+15<e.length?e.slice(o,o+15)+"\u2026":e.slice(o),s+=r+t+l}super(s),this.name="ParseError",this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,r.prototype),this.position=n,null!=n&&null!=o&&(this.length=o-n),this.rawMessage=e}}var n=r;const o=/([A-Z])/g,s=e=>e.replace(o,"-$1").toLowerCase(),i={"&":"&",">":">","<":"<",'"':""","'":"'"},l=/[&><"']/g,a=e=>String(e).replace(l,e=>i[e]),c=e=>"ordgroup"===e.type||"color"===e.type?1===e.body.length?c(e.body[0]):e:"font"===e.type?c(e.body):e,h=new Set(["mathord","textord","atom"]),m=e=>h.has(c(e).type),u={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function p(e){if(void 0!==e.default)return e.default;return function(e){if("string"!=typeof e)return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}(Array.isArray(e.type)?e.type[0]:e.type)}function d(e,t,r,n){const o=r[t];e[t]=void 0!==o?n.processor?n.processor(o):o:p(n)}class g{constructor(e){void 0===e&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(const t of Object.keys(u)){const r=u[t];r&&d(this,t,e,r)}}reportNonstrict(e,t,r){let o=this.strict;if("function"==typeof o&&(o=o(e,t,r)),o&&"ignore"!==o){if(!0===o||"error"===o)throw new n("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",r);"warn"===o?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+o+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,r){let n=this.strict;if("function"==typeof n)try{n=n(e,t,r)}catch(e){n="error"}return!(!n||"ignore"===n)&&(!0===n||"error"===n||("warn"===n?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),!1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]"),!1)))}isTrusted(e){if("url"in e&&e.url&&!e.protocol){const t=(e=>{const t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?":"!==t[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"})(e.url);if(null==t)return!1;e.protocol=t}const t="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(t)}}class f{constructor(e,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=r}sup(){return b[y[this.id]]}sub(){return b[x[this.id]]}fracNum(){return b[w[this.id]]}fracDen(){return b[v[this.id]]}cramp(){return b[k[this.id]]}text(){return b[z[this.id]]}isTight(){return this.size>=2}}const b=[new f(0,0,!1),new f(1,0,!0),new f(2,1,!1),new f(3,1,!0),new f(4,2,!1),new f(5,2,!0),new f(6,3,!1),new f(7,3,!0)],y=[4,5,4,5,6,7,6,7],x=[5,5,5,5,7,7,7,7],w=[2,3,4,5,6,7,6,7],v=[3,3,5,5,7,7,7,7],k=[1,1,3,3,5,5,7,7],z=[0,1,2,3,2,3,2,3];var S={DISPLAY:b[0],TEXT:b[2],SCRIPT:b[4],SCRIPTSCRIPT:b[6]};const M=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];const A=[];function T(e){for(let t=0;t<A.length;t+=2)if(e>=A[t]&&e<=A[t+1])return!0;return!1}M.forEach(e=>e.blocks.forEach(e=>A.push(...e)));const B=e=>e+" "+e,C=80,q={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:B("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:B("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:B("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:B("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:B("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:B("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:B("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:B("M399995 440 h-120 V150 H0 v-120 H399995z"),rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class I{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){const e=document.createDocumentFragment();for(let t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){let e="";for(let t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map(e=>{if("toText"in e)return e.toText();throw new Error("Expected MathDomNode with toText, got "+e.constructor.name)}).join("")}}const R={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},E={ex:!0,em:!0,mu:!0},H=function(e){return"string"!=typeof e&&(e=e.unit),e in R||e in E||"ex"===e},N=function(e,t){let r;if(e.unit in R)r=R[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)r=t.fontMetrics().cssEmPerMu;else{let o;if(o=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)r=o.fontMetrics().xHeight;else{if("em"!==e.unit)throw new n("Invalid unit: '"+e.unit+"'");r=o.fontMetrics().quad}o!==t&&(r*=o.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)},O=function(e){return+e.toFixed(4)+"em"},D=function(e){return e.filter(e=>e).join(" ")},L=function(e){let t="";for(const r of Object.keys(e)){const n=e[r];void 0!==n&&(t+=s(r)+":"+n+";")}return t},P=function(e,t,r){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t){t.style.isTight()&&this.classes.push("mtight");const e=t.getColor();e&&(this.style.color=e)}},F=function(e){const t=document.createElement(e);t.className=D(this.classes),Object.assign(t.style,this.style);for(const e of Object.keys(this.attributes))t.setAttribute(e,this.attributes[e]);for(let e=0;e<this.children.length;e++)t.appendChild(this.children[e].toNode());return t},V=/[\s"'>/=\x00-\x1f]/,G=function(e){let t="<"+e;this.classes.length&&(t+=' class="'+a(D(this.classes))+'"');const r=L(this.style);r&&(t+=' style="'+a(r)+'"');for(const e of Object.keys(this.attributes)){if(V.test(e))throw new n("Invalid attribute name '"+e+"'");t+=" "+e+'="'+a(this.attributes[e])+'"'}t+=">";for(let e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t+="</"+e+">",t};class U{constructor(e,t,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,P.call(this,e,r,n),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return F.call(this,"span")}toMarkup(){return G.call(this,"span")}}class X{constructor(e,t,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,P.call(this,t,n),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return F.call(this,"a")}toMarkup(){return G.call(this,"a")}}class Y{constructor(e,t,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=r}hasClass(e){return this.classes.includes(e)}toNode(){const e=document.createElement("img");return e.src=this.src,e.alt=this.alt,e.className="mord",Object.assign(e.style,this.style),e}toMarkup(){let e='<img src="'+a(this.src)+'" alt="'+a(this.alt)+'"';const t=L(this.style);return t&&(e+=' style="'+a(t)+'"'),e+="'/>",e}}const j={"\xee":"\u0131\u0302","\xef":"\u0131\u0308","\xed":"\u0131\u0301","\xec":"\u0131\u0300"};class W{constructor(e,t,r,n,o,s,i,l){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=r||0,this.italic=n||0,this.skew=o||0,this.width=s||0,this.classes=i||[],this.style=l||{},this.maxFontSize=0;const a=function(e){for(let t=0;t<M.length;t++){const r=M[t];for(let t=0;t<r.blocks.length;t++){const n=r.blocks[t];if(e>=n[0]&&e<=n[1])return r.name}}return null}(this.text.charCodeAt(0));a&&this.classes.push(a+"_fallback"),/[\xee\xef\xed\xec]/.test(this.text)&&(this.text=j[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){const e=document.createTextNode(this.text);let t=null;return this.italic>0&&(t=document.createElement("span"),t.style.marginRight=O(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=D(this.classes)),Object.keys(this.style).length>0&&(t=t||document.createElement("span"),Object.assign(t.style,this.style)),t?(t.appendChild(e),t):e}toMarkup(){let e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=a(D(this.classes)),t+='"');let r="";this.italic>0&&(r+="margin-right:"+O(this.italic)+";"),r+=L(this.style),r&&(e=!0,t+=' style="'+a(r)+'"');const n=a(this.text);return e?(t+=">",t+=n,t+="</span>",t):n}}class _{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(const t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);for(let t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){let e='<svg xmlns="http://www.w3.org/2000/svg"';for(const t of Object.keys(this.attributes))e+=" "+t+'="'+a(this.attributes[t])+'"';e+=">";for(let t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e+="</svg>",e}}class ${constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){const e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",q[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+a(this.alternate)+'"/>':'<path d="'+a(q[this.pathName])+'"/>'}}class Z{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){const e=document.createElementNS("http://www.w3.org/2000/svg","line");for(const t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);return e}toMarkup(){let e="<line";for(const t of Object.keys(this.attributes))e+=" "+t+'="'+a(this.attributes[t])+'"';return e+="/>",e}}var K={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}};const J={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Q={"\xc5":"A","\xd0":"D","\xde":"o","\xe5":"a","\xf0":"d","\xfe":"o","\u0410":"A","\u0411":"B","\u0412":"B","\u0413":"F","\u0414":"A","\u0415":"E","\u0416":"K","\u0417":"3","\u0418":"N","\u0419":"N","\u041a":"K","\u041b":"N","\u041c":"M","\u041d":"H","\u041e":"O","\u041f":"N","\u0420":"P","\u0421":"C","\u0422":"T","\u0423":"y","\u0424":"O","\u0425":"X","\u0426":"U","\u0427":"h","\u0428":"W","\u0429":"W","\u042a":"B","\u042b":"X","\u042c":"B","\u042d":"3","\u042e":"X","\u042f":"R","\u0430":"a","\u0431":"b","\u0432":"a","\u0433":"r","\u0434":"y","\u0435":"e","\u0436":"m","\u0437":"e","\u0438":"n","\u0439":"n","\u043a":"n","\u043b":"n","\u043c":"m","\u043d":"n","\u043e":"o","\u043f":"n","\u0440":"p","\u0441":"c","\u0442":"o","\u0443":"y","\u0444":"b","\u0445":"x","\u0446":"n","\u0447":"n","\u0448":"w","\u0449":"w","\u044a":"a","\u044b":"m","\u044c":"a","\u044d":"e","\u044e":"m","\u044f":"r"};function ee(e,t,r){if(!K[t])throw new Error("Font metrics not found for font: "+t+".");let n=e.charCodeAt(0),o=K[t][n];if(!o&&e[0]in Q&&(n=Q[e[0]].charCodeAt(0),o=K[t][n]),o||"text"!==r||T(n)&&(o=K[t][77]),o)return{depth:o[0],height:o[1],italic:o[2],skew:o[3],width:o[4]}}const te={};const re={math:{},text:{}};var ne=re;function oe(e,t,r,n,o,s){re[e][o]={font:t,group:r,replace:n},s&&n&&(re[e][n]=re[e][o])}const se="math",ie="text",le="main",ae="ams",ce="accent-token",he="bin",me="close",ue="inner",pe="mathord",de="op-token",ge="open",fe="punct",be="rel",ye="spacing",xe="textord";oe(se,le,be,"\u2261","\\equiv",!0),oe(se,le,be,"\u227a","\\prec",!0),oe(se,le,be,"\u227b","\\succ",!0),oe(se,le,be,"\u223c","\\sim",!0),oe(se,le,be,"\u22a5","\\perp"),oe(se,le,be,"\u2aaf","\\preceq",!0),oe(se,le,be,"\u2ab0","\\succeq",!0),oe(se,le,be,"\u2243","\\simeq",!0),oe(se,le,be,"\u2223","\\mid",!0),oe(se,le,be,"\u226a","\\ll",!0),oe(se,le,be,"\u226b","\\gg",!0),oe(se,le,be,"\u224d","\\asymp",!0),oe(se,le,be,"\u2225","\\parallel"),oe(se,le,be,"\u22c8","\\bowtie",!0),oe(se,le,be,"\u2323","\\smile",!0),oe(se,le,be,"\u2291","\\sqsubseteq",!0),oe(se,le,be,"\u2292","\\sqsupseteq",!0),oe(se,le,be,"\u2250","\\doteq",!0),oe(se,le,be,"\u2322","\\frown",!0),oe(se,le,be,"\u220b","\\ni",!0),oe(se,le,be,"\u221d","\\propto",!0),oe(se,le,be,"\u22a2","\\vdash",!0),oe(se,le,be,"\u22a3","\\dashv",!0),oe(se,le,be,"\u220b","\\owns"),oe(se,le,fe,".","\\ldotp"),oe(se,le,fe,"\u22c5","\\cdotp"),oe(se,le,fe,"\u22c5","\xb7"),oe(ie,le,xe,"\u22c5","\xb7"),oe(se,le,xe,"#","\\#"),oe(ie,le,xe,"#","\\#"),oe(se,le,xe,"&","\\&"),oe(ie,le,xe,"&","\\&"),oe(se,le,xe,"\u2135","\\aleph",!0),oe(se,le,xe,"\u2200","\\forall",!0),oe(se,le,xe,"\u210f","\\hbar",!0),oe(se,le,xe,"\u2203","\\exists",!0),oe(se,le,xe,"\u2207","\\nabla",!0),oe(se,le,xe,"\u266d","\\flat",!0),oe(se,le,xe,"\u2113","\\ell",!0),oe(se,le,xe,"\u266e","\\natural",!0),oe(se,le,xe,"\u2663","\\clubsuit",!0),oe(se,le,xe,"\u2118","\\wp",!0),oe(se,le,xe,"\u266f","\\sharp",!0),oe(se,le,xe,"\u2662","\\diamondsuit",!0),oe(se,le,xe,"\u211c","\\Re",!0),oe(se,le,xe,"\u2661","\\heartsuit",!0),oe(se,le,xe,"\u2111","\\Im",!0),oe(se,le,xe,"\u2660","\\spadesuit",!0),oe(se,le,xe,"\xa7","\\S",!0),oe(ie,le,xe,"\xa7","\\S"),oe(se,le,xe,"\xb6","\\P",!0),oe(ie,le,xe,"\xb6","\\P"),oe(se,le,xe,"\u2020","\\dag"),oe(ie,le,xe,"\u2020","\\dag"),oe(ie,le,xe,"\u2020","\\textdagger"),oe(se,le,xe,"\u2021","\\ddag"),oe(ie,le,xe,"\u2021","\\ddag"),oe(ie,le,xe,"\u2021","\\textdaggerdbl"),oe(se,le,me,"\u23b1","\\rmoustache",!0),oe(se,le,ge,"\u23b0","\\lmoustache",!0),oe(se,le,me,"\u27ef","\\rgroup",!0),oe(se,le,ge,"\u27ee","\\lgroup",!0),oe(se,le,he,"\u2213","\\mp",!0),oe(se,le,he,"\u2296","\\ominus",!0),oe(se,le,he,"\u228e","\\uplus",!0),oe(se,le,he,"\u2293","\\sqcap",!0),oe(se,le,he,"\u2217","\\ast"),oe(se,le,he,"\u2294","\\sqcup",!0),oe(se,le,he,"\u25ef","\\bigcirc",!0),oe(se,le,he,"\u2219","\\bullet",!0),oe(se,le,he,"\u2021","\\ddagger"),oe(se,le,he,"\u2240","\\wr",!0),oe(se,le,he,"\u2a3f","\\amalg"),oe(se,le,he,"&","\\And"),oe(se,le,be,"\u27f5","\\longleftarrow",!0),oe(se,le,be,"\u21d0","\\Leftarrow",!0),oe(se,le,be,"\u27f8","\\Longleftarrow",!0),oe(se,le,be,"\u27f6","\\longrightarrow",!0),oe(se,le,be,"\u21d2","\\Rightarrow",!0),oe(se,le,be,"\u27f9","\\Longrightarrow",!0),oe(se,le,be,"\u2194","\\leftrightarrow",!0),oe(se,le,be,"\u27f7","\\longleftrightarrow",!0),oe(se,le,be,"\u21d4","\\Leftrightarrow",!0),oe(se,le,be,"\u27fa","\\Longleftrightarrow",!0),oe(se,le,be,"\u21a6","\\mapsto",!0),oe(se,le,be,"\u27fc","\\longmapsto",!0),oe(se,le,be,"\u2197","\\nearrow",!0),oe(se,le,be,"\u21a9","\\hookleftarrow",!0),oe(se,le,be,"\u21aa","\\hookrightarrow",!0),oe(se,le,be,"\u2198","\\searrow",!0),oe(se,le,be,"\u21bc","\\leftharpoonup",!0),oe(se,le,be,"\u21c0","\\rightharpoonup",!0),oe(se,le,be,"\u2199","\\swarrow",!0),oe(se,le,be,"\u21bd","\\leftharpoondown",!0),oe(se,le,be,"\u21c1","\\rightharpoondown",!0),oe(se,le,be,"\u2196","\\nwarrow",!0),oe(se,le,be,"\u21cc","\\rightleftharpoons",!0),oe(se,ae,be,"\u226e","\\nless",!0),oe(se,ae,be,"\ue010","\\@nleqslant"),oe(se,ae,be,"\ue011","\\@nleqq"),oe(se,ae,be,"\u2a87","\\lneq",!0),oe(se,ae,be,"\u2268","\\lneqq",!0),oe(se,ae,be,"\ue00c","\\@lvertneqq"),oe(se,ae,be,"\u22e6","\\lnsim",!0),oe(se,ae,be,"\u2a89","\\lnapprox",!0),oe(se,ae,be,"\u2280","\\nprec",!0),oe(se,ae,be,"\u22e0","\\npreceq",!0),oe(se,ae,be,"\u22e8","\\precnsim",!0),oe(se,ae,be,"\u2ab9","\\precnapprox",!0),oe(se,ae,be,"\u2241","\\nsim",!0),oe(se,ae,be,"\ue006","\\@nshortmid"),oe(se,ae,be,"\u2224","\\nmid",!0),oe(se,ae,be,"\u22ac","\\nvdash",!0),oe(se,ae,be,"\u22ad","\\nvDash",!0),oe(se,ae,be,"\u22ea","\\ntriangleleft"),oe(se,ae,be,"\u22ec","\\ntrianglelefteq",!0),oe(se,ae,be,"\u228a","\\subsetneq",!0),oe(se,ae,be,"\ue01a","\\@varsubsetneq"),oe(se,ae,be,"\u2acb","\\subsetneqq",!0),oe(se,ae,be,"\ue017","\\@varsubsetneqq"),oe(se,ae,be,"\u226f","\\ngtr",!0),oe(se,ae,be,"\ue00f","\\@ngeqslant"),oe(se,ae,be,"\ue00e","\\@ngeqq"),oe(se,ae,be,"\u2a88","\\gneq",!0),oe(se,ae,be,"\u2269","\\gneqq",!0),oe(se,ae,be,"\ue00d","\\@gvertneqq"),oe(se,ae,be,"\u22e7","\\gnsim",!0),oe(se,ae,be,"\u2a8a","\\gnapprox",!0),oe(se,ae,be,"\u2281","\\nsucc",!0),oe(se,ae,be,"\u22e1","\\nsucceq",!0),oe(se,ae,be,"\u22e9","\\succnsim",!0),oe(se,ae,be,"\u2aba","\\succnapprox",!0),oe(se,ae,be,"\u2246","\\ncong",!0),oe(se,ae,be,"\ue007","\\@nshortparallel"),oe(se,ae,be,"\u2226","\\nparallel",!0),oe(se,ae,be,"\u22af","\\nVDash",!0),oe(se,ae,be,"\u22eb","\\ntriangleright"),oe(se,ae,be,"\u22ed","\\ntrianglerighteq",!0),oe(se,ae,be,"\ue018","\\@nsupseteqq"),oe(se,ae,be,"\u228b","\\supsetneq",!0),oe(se,ae,be,"\ue01b","\\@varsupsetneq"),oe(se,ae,be,"\u2acc","\\supsetneqq",!0),oe(se,ae,be,"\ue019","\\@varsupsetneqq"),oe(se,ae,be,"\u22ae","\\nVdash",!0),oe(se,ae,be,"\u2ab5","\\precneqq",!0),oe(se,ae,be,"\u2ab6","\\succneqq",!0),oe(se,ae,be,"\ue016","\\@nsubseteqq"),oe(se,ae,he,"\u22b4","\\unlhd"),oe(se,ae,he,"\u22b5","\\unrhd"),oe(se,ae,be,"\u219a","\\nleftarrow",!0),oe(se,ae,be,"\u219b","\\nrightarrow",!0),oe(se,ae,be,"\u21cd","\\nLeftarrow",!0),oe(se,ae,be,"\u21cf","\\nRightarrow",!0),oe(se,ae,be,"\u21ae","\\nleftrightarrow",!0),oe(se,ae,be,"\u21ce","\\nLeftrightarrow",!0),oe(se,ae,be,"\u25b3","\\vartriangle"),oe(se,ae,xe,"\u210f","\\hslash"),oe(se,ae,xe,"\u25bd","\\triangledown"),oe(se,ae,xe,"\u25ca","\\lozenge"),oe(se,ae,xe,"\u24c8","\\circledS"),oe(se,ae,xe,"\xae","\\circledR"),oe(ie,ae,xe,"\xae","\\circledR"),oe(se,ae,xe,"\u2221","\\measuredangle",!0),oe(se,ae,xe,"\u2204","\\nexists"),oe(se,ae,xe,"\u2127","\\mho"),oe(se,ae,xe,"\u2132","\\Finv",!0),oe(se,ae,xe,"\u2141","\\Game",!0),oe(se,ae,xe,"\u2035","\\backprime"),oe(se,ae,xe,"\u25b2","\\blacktriangle"),oe(se,ae,xe,"\u25bc","\\blacktriangledown"),oe(se,ae,xe,"\u25a0","\\blacksquare"),oe(se,ae,xe,"\u29eb","\\blacklozenge"),oe(se,ae,xe,"\u2605","\\bigstar"),oe(se,ae,xe,"\u2222","\\sphericalangle",!0),oe(se,ae,xe,"\u2201","\\complement",!0),oe(se,ae,xe,"\xf0","\\eth",!0),oe(ie,le,xe,"\xf0","\xf0"),oe(se,ae,xe,"\u2571","\\diagup"),oe(se,ae,xe,"\u2572","\\diagdown"),oe(se,ae,xe,"\u25a1","\\square"),oe(se,ae,xe,"\u25a1","\\Box"),oe(se,ae,xe,"\u25ca","\\Diamond"),oe(se,ae,xe,"\xa5","\\yen",!0),oe(ie,ae,xe,"\xa5","\\yen",!0),oe(se,ae,xe,"\u2713","\\checkmark",!0),oe(ie,ae,xe,"\u2713","\\checkmark"),oe(se,ae,xe,"\u2136","\\beth",!0),oe(se,ae,xe,"\u2138","\\daleth",!0),oe(se,ae,xe,"\u2137","\\gimel",!0),oe(se,ae,xe,"\u03dd","\\digamma",!0),oe(se,ae,xe,"\u03f0","\\varkappa"),oe(se,ae,ge,"\u250c","\\@ulcorner",!0),oe(se,ae,me,"\u2510","\\@urcorner",!0),oe(se,ae,ge,"\u2514","\\@llcorner",!0),oe(se,ae,me,"\u2518","\\@lrcorner",!0),oe(se,ae,be,"\u2266","\\leqq",!0),oe(se,ae,be,"\u2a7d","\\leqslant",!0),oe(se,ae,be,"\u2a95","\\eqslantless",!0),oe(se,ae,be,"\u2272","\\lesssim",!0),oe(se,ae,be,"\u2a85","\\lessapprox",!0),oe(se,ae,be,"\u224a","\\approxeq",!0),oe(se,ae,he,"\u22d6","\\lessdot"),oe(se,ae,be,"\u22d8","\\lll",!0),oe(se,ae,be,"\u2276","\\lessgtr",!0),oe(se,ae,be,"\u22da","\\lesseqgtr",!0),oe(se,ae,be,"\u2a8b","\\lesseqqgtr",!0),oe(se,ae,be,"\u2251","\\doteqdot"),oe(se,ae,be,"\u2253","\\risingdotseq",!0),oe(se,ae,be,"\u2252","\\fallingdotseq",!0),oe(se,ae,be,"\u223d","\\backsim",!0),oe(se,ae,be,"\u22cd","\\backsimeq",!0),oe(se,ae,be,"\u2ac5","\\subseteqq",!0),oe(se,ae,be,"\u22d0","\\Subset",!0),oe(se,ae,be,"\u228f","\\sqsubset",!0),oe(se,ae,be,"\u227c","\\preccurlyeq",!0),oe(se,ae,be,"\u22de","\\curlyeqprec",!0),oe(se,ae,be,"\u227e","\\precsim",!0),oe(se,ae,be,"\u2ab7","\\precapprox",!0),oe(se,ae,be,"\u22b2","\\vartriangleleft"),oe(se,ae,be,"\u22b4","\\trianglelefteq"),oe(se,ae,be,"\u22a8","\\vDash",!0),oe(se,ae,be,"\u22aa","\\Vvdash",!0),oe(se,ae,be,"\u2323","\\smallsmile"),oe(se,ae,be,"\u2322","\\smallfrown"),oe(se,ae,be,"\u224f","\\bumpeq",!0),oe(se,ae,be,"\u224e","\\Bumpeq",!0),oe(se,ae,be,"\u2267","\\geqq",!0),oe(se,ae,be,"\u2a7e","\\geqslant",!0),oe(se,ae,be,"\u2a96","\\eqslantgtr",!0),oe(se,ae,be,"\u2273","\\gtrsim",!0),oe(se,ae,be,"\u2a86","\\gtrapprox",!0),oe(se,ae,he,"\u22d7","\\gtrdot"),oe(se,ae,be,"\u22d9","\\ggg",!0),oe(se,ae,be,"\u2277","\\gtrless",!0),oe(se,ae,be,"\u22db","\\gtreqless",!0),oe(se,ae,be,"\u2a8c","\\gtreqqless",!0),oe(se,ae,be,"\u2256","\\eqcirc",!0),oe(se,ae,be,"\u2257","\\circeq",!0),oe(se,ae,be,"\u225c","\\triangleq",!0),oe(se,ae,be,"\u223c","\\thicksim"),oe(se,ae,be,"\u2248","\\thickapprox"),oe(se,ae,be,"\u2ac6","\\supseteqq",!0),oe(se,ae,be,"\u22d1","\\Supset",!0),oe(se,ae,be,"\u2290","\\sqsupset",!0),oe(se,ae,be,"\u227d","\\succcurlyeq",!0),oe(se,ae,be,"\u22df","\\curlyeqsucc",!0),oe(se,ae,be,"\u227f","\\succsim",!0),oe(se,ae,be,"\u2ab8","\\succapprox",!0),oe(se,ae,be,"\u22b3","\\vartriangleright"),oe(se,ae,be,"\u22b5","\\trianglerighteq"),oe(se,ae,be,"\u22a9","\\Vdash",!0),oe(se,ae,be,"\u2223","\\shortmid"),oe(se,ae,be,"\u2225","\\shortparallel"),oe(se,ae,be,"\u226c","\\between",!0),oe(se,ae,be,"\u22d4","\\pitchfork",!0),oe(se,ae,be,"\u221d","\\varpropto"),oe(se,ae,be,"\u25c0","\\blacktriangleleft"),oe(se,ae,be,"\u2234","\\therefore",!0),oe(se,ae,be,"\u220d","\\backepsilon"),oe(se,ae,be,"\u25b6","\\blacktriangleright"),oe(se,ae,be,"\u2235","\\because",!0),oe(se,ae,be,"\u22d8","\\llless"),oe(se,ae,be,"\u22d9","\\gggtr"),oe(se,ae,he,"\u22b2","\\lhd"),oe(se,ae,he,"\u22b3","\\rhd"),oe(se,ae,be,"\u2242","\\eqsim",!0),oe(se,le,be,"\u22c8","\\Join"),oe(se,ae,be,"\u2251","\\Doteq",!0),oe(se,ae,he,"\u2214","\\dotplus",!0),oe(se,ae,he,"\u2216","\\smallsetminus"),oe(se,ae,he,"\u22d2","\\Cap",!0),oe(se,ae,he,"\u22d3","\\Cup",!0),oe(se,ae,he,"\u2a5e","\\doublebarwedge",!0),oe(se,ae,he,"\u229f","\\boxminus",!0),oe(se,ae,he,"\u229e","\\boxplus",!0),oe(se,ae,he,"\u22c7","\\divideontimes",!0),oe(se,ae,he,"\u22c9","\\ltimes",!0),oe(se,ae,he,"\u22ca","\\rtimes",!0),oe(se,ae,he,"\u22cb","\\leftthreetimes",!0),oe(se,ae,he,"\u22cc","\\rightthreetimes",!0),oe(se,ae,he,"\u22cf","\\curlywedge",!0),oe(se,ae,he,"\u22ce","\\curlyvee",!0),oe(se,ae,he,"\u229d","\\circleddash",!0),oe(se,ae,he,"\u229b","\\circledast",!0),oe(se,ae,he,"\u22c5","\\centerdot"),oe(se,ae,he,"\u22ba","\\intercal",!0),oe(se,ae,he,"\u22d2","\\doublecap"),oe(se,ae,he,"\u22d3","\\doublecup"),oe(se,ae,he,"\u22a0","\\boxtimes",!0),oe(se,ae,be,"\u21e2","\\dashrightarrow",!0),oe(se,ae,be,"\u21e0","\\dashleftarrow",!0),oe(se,ae,be,"\u21c7","\\leftleftarrows",!0),oe(se,ae,be,"\u21c6","\\leftrightarrows",!0),oe(se,ae,be,"\u21da","\\Lleftarrow",!0),oe(se,ae,be,"\u219e","\\twoheadleftarrow",!0),oe(se,ae,be,"\u21a2","\\leftarrowtail",!0),oe(se,ae,be,"\u21ab","\\looparrowleft",!0),oe(se,ae,be,"\u21cb","\\leftrightharpoons",!0),oe(se,ae,be,"\u21b6","\\curvearrowleft",!0),oe(se,ae,be,"\u21ba","\\circlearrowleft",!0),oe(se,ae,be,"\u21b0","\\Lsh",!0),oe(se,ae,be,"\u21c8","\\upuparrows",!0),oe(se,ae,be,"\u21bf","\\upharpoonleft",!0),oe(se,ae,be,"\u21c3","\\downharpoonleft",!0),oe(se,le,be,"\u22b6","\\origof",!0),oe(se,le,be,"\u22b7","\\imageof",!0),oe(se,ae,be,"\u22b8","\\multimap",!0),oe(se,ae,be,"\u21ad","\\leftrightsquigarrow",!0),oe(se,ae,be,"\u21c9","\\rightrightarrows",!0),oe(se,ae,be,"\u21c4","\\rightleftarrows",!0),oe(se,ae,be,"\u21a0","\\twoheadrightarrow",!0),oe(se,ae,be,"\u21a3","\\rightarrowtail",!0),oe(se,ae,be,"\u21ac","\\looparrowright",!0),oe(se,ae,be,"\u21b7","\\curvearrowright",!0),oe(se,ae,be,"\u21bb","\\circlearrowright",!0),oe(se,ae,be,"\u21b1","\\Rsh",!0),oe(se,ae,be,"\u21ca","\\downdownarrows",!0),oe(se,ae,be,"\u21be","\\upharpoonright",!0),oe(se,ae,be,"\u21c2","\\downharpoonright",!0),oe(se,ae,be,"\u21dd","\\rightsquigarrow",!0),oe(se,ae,be,"\u21dd","\\leadsto"),oe(se,ae,be,"\u21db","\\Rrightarrow",!0),oe(se,ae,be,"\u21be","\\restriction"),oe(se,le,xe,"\u2018","`"),oe(se,le,xe,"$","\\$"),oe(ie,le,xe,"$","\\$"),oe(ie,le,xe,"$","\\textdollar"),oe(se,le,xe,"%","\\%"),oe(ie,le,xe,"%","\\%"),oe(se,le,xe,"_","\\_"),oe(ie,le,xe,"_","\\_"),oe(ie,le,xe,"_","\\textunderscore"),oe(se,le,xe,"\u2220","\\angle",!0),oe(se,le,xe,"\u221e","\\infty",!0),oe(se,le,xe,"\u2032","\\prime"),oe(se,le,xe,"\u25b3","\\triangle"),oe(se,le,xe,"\u0393","\\Gamma",!0),oe(se,le,xe,"\u0394","\\Delta",!0),oe(se,le,xe,"\u0398","\\Theta",!0),oe(se,le,xe,"\u039b","\\Lambda",!0),oe(se,le,xe,"\u039e","\\Xi",!0),oe(se,le,xe,"\u03a0","\\Pi",!0),oe(se,le,xe,"\u03a3","\\Sigma",!0),oe(se,le,xe,"\u03a5","\\Upsilon",!0),oe(se,le,xe,"\u03a6","\\Phi",!0),oe(se,le,xe,"\u03a8","\\Psi",!0),oe(se,le,xe,"\u03a9","\\Omega",!0),oe(se,le,xe,"A","\u0391"),oe(se,le,xe,"B","\u0392"),oe(se,le,xe,"E","\u0395"),oe(se,le,xe,"Z","\u0396"),oe(se,le,xe,"H","\u0397"),oe(se,le,xe,"I","\u0399"),oe(se,le,xe,"K","\u039a"),oe(se,le,xe,"M","\u039c"),oe(se,le,xe,"N","\u039d"),oe(se,le,xe,"O","\u039f"),oe(se,le,xe,"P","\u03a1"),oe(se,le,xe,"T","\u03a4"),oe(se,le,xe,"X","\u03a7"),oe(se,le,xe,"\xac","\\neg",!0),oe(se,le,xe,"\xac","\\lnot"),oe(se,le,xe,"\u22a4","\\top"),oe(se,le,xe,"\u22a5","\\bot"),oe(se,le,xe,"\u2205","\\emptyset"),oe(se,ae,xe,"\u2205","\\varnothing"),oe(se,le,pe,"\u03b1","\\alpha",!0),oe(se,le,pe,"\u03b2","\\beta",!0),oe(se,le,pe,"\u03b3","\\gamma",!0),oe(se,le,pe,"\u03b4","\\delta",!0),oe(se,le,pe,"\u03f5","\\epsilon",!0),oe(se,le,pe,"\u03b6","\\zeta",!0),oe(se,le,pe,"\u03b7","\\eta",!0),oe(se,le,pe,"\u03b8","\\theta",!0),oe(se,le,pe,"\u03b9","\\iota",!0),oe(se,le,pe,"\u03ba","\\kappa",!0),oe(se,le,pe,"\u03bb","\\lambda",!0),oe(se,le,pe,"\u03bc","\\mu",!0),oe(se,le,pe,"\u03bd","\\nu",!0),oe(se,le,pe,"\u03be","\\xi",!0),oe(se,le,pe,"\u03bf","\\omicron",!0),oe(se,le,pe,"\u03c0","\\pi",!0),oe(se,le,pe,"\u03c1","\\rho",!0),oe(se,le,pe,"\u03c3","\\sigma",!0),oe(se,le,pe,"\u03c4","\\tau",!0),oe(se,le,pe,"\u03c5","\\upsilon",!0),oe(se,le,pe,"\u03d5","\\phi",!0),oe(se,le,pe,"\u03c7","\\chi",!0),oe(se,le,pe,"\u03c8","\\psi",!0),oe(se,le,pe,"\u03c9","\\omega",!0),oe(se,le,pe,"\u03b5","\\varepsilon",!0),oe(se,le,pe,"\u03d1","\\vartheta",!0),oe(se,le,pe,"\u03d6","\\varpi",!0),oe(se,le,pe,"\u03f1","\\varrho",!0),oe(se,le,pe,"\u03c2","\\varsigma",!0),oe(se,le,pe,"\u03c6","\\varphi",!0),oe(se,le,he,"\u2217","*",!0),oe(se,le,he,"+","+"),oe(se,le,he,"\u2212","-",!0),oe(se,le,he,"\u22c5","\\cdot",!0),oe(se,le,he,"\u2218","\\circ",!0),oe(se,le,he,"\xf7","\\div",!0),oe(se,le,he,"\xb1","\\pm",!0),oe(se,le,he,"\xd7","\\times",!0),oe(se,le,he,"\u2229","\\cap",!0),oe(se,le,he,"\u222a","\\cup",!0),oe(se,le,he,"\u2216","\\setminus",!0),oe(se,le,he,"\u2227","\\land"),oe(se,le,he,"\u2228","\\lor"),oe(se,le,he,"\u2227","\\wedge",!0),oe(se,le,he,"\u2228","\\vee",!0),oe(se,le,xe,"\u221a","\\surd"),oe(se,le,ge,"\u27e8","\\langle",!0),oe(se,le,ge,"\u2223","\\lvert"),oe(se,le,ge,"\u2225","\\lVert"),oe(se,le,me,"?","?"),oe(se,le,me,"!","!"),oe(se,le,me,"\u27e9","\\rangle",!0),oe(se,le,me,"\u2223","\\rvert"),oe(se,le,me,"\u2225","\\rVert"),oe(se,le,be,"=","="),oe(se,le,be,":",":"),oe(se,le,be,"\u2248","\\approx",!0),oe(se,le,be,"\u2245","\\cong",!0),oe(se,le,be,"\u2265","\\ge"),oe(se,le,be,"\u2265","\\geq",!0),oe(se,le,be,"\u2190","\\gets"),oe(se,le,be,">","\\gt",!0),oe(se,le,be,"\u2208","\\in",!0),oe(se,le,be,"\ue020","\\@not"),oe(se,le,be,"\u2282","\\subset",!0),oe(se,le,be,"\u2283","\\supset",!0),oe(se,le,be,"\u2286","\\subseteq",!0),oe(se,le,be,"\u2287","\\supseteq",!0),oe(se,ae,be,"\u2288","\\nsubseteq",!0),oe(se,ae,be,"\u2289","\\nsupseteq",!0),oe(se,le,be,"\u22a8","\\models"),oe(se,le,be,"\u2190","\\leftarrow",!0),oe(se,le,be,"\u2264","\\le"),oe(se,le,be,"\u2264","\\leq",!0),oe(se,le,be,"<","\\lt",!0),oe(se,le,be,"\u2192","\\rightarrow",!0),oe(se,le,be,"\u2192","\\to"),oe(se,ae,be,"\u2271","\\ngeq",!0),oe(se,ae,be,"\u2270","\\nleq",!0),oe(se,le,ye,"\xa0","\\ "),oe(se,le,ye,"\xa0","\\space"),oe(se,le,ye,"\xa0","\\nobreakspace"),oe(ie,le,ye,"\xa0","\\ "),oe(ie,le,ye,"\xa0"," "),oe(ie,le,ye,"\xa0","\\space"),oe(ie,le,ye,"\xa0","\\nobreakspace"),oe(se,le,ye,"","\\nobreak"),oe(se,le,ye,"","\\allowbreak"),oe(se,le,fe,",",","),oe(se,le,fe,";",";"),oe(se,ae,he,"\u22bc","\\barwedge",!0),oe(se,ae,he,"\u22bb","\\veebar",!0),oe(se,le,he,"\u2299","\\odot",!0),oe(se,le,he,"\u2295","\\oplus",!0),oe(se,le,he,"\u2297","\\otimes",!0),oe(se,le,xe,"\u2202","\\partial",!0),oe(se,le,he,"\u2298","\\oslash",!0),oe(se,ae,he,"\u229a","\\circledcirc",!0),oe(se,ae,he,"\u22a1","\\boxdot",!0),oe(se,le,he,"\u25b3","\\bigtriangleup"),oe(se,le,he,"\u25bd","\\bigtriangledown"),oe(se,le,he,"\u2020","\\dagger"),oe(se,le,he,"\u22c4","\\diamond"),oe(se,le,he,"\u22c6","\\star"),oe(se,le,he,"\u25c3","\\triangleleft"),oe(se,le,he,"\u25b9","\\triangleright"),oe(se,le,ge,"{","\\{"),oe(ie,le,xe,"{","\\{"),oe(ie,le,xe,"{","\\textbraceleft"),oe(se,le,me,"}","\\}"),oe(ie,le,xe,"}","\\}"),oe(ie,le,xe,"}","\\textbraceright"),oe(se,le,ge,"{","\\lbrace"),oe(se,le,me,"}","\\rbrace"),oe(se,le,ge,"[","\\lbrack",!0),oe(ie,le,xe,"[","\\lbrack",!0),oe(se,le,me,"]","\\rbrack",!0),oe(ie,le,xe,"]","\\rbrack",!0),oe(se,le,ge,"(","\\lparen",!0),oe(se,le,me,")","\\rparen",!0),oe(ie,le,xe,"<","\\textless",!0),oe(ie,le,xe,">","\\textgreater",!0),oe(se,le,ge,"\u230a","\\lfloor",!0),oe(se,le,me,"\u230b","\\rfloor",!0),oe(se,le,ge,"\u2308","\\lceil",!0),oe(se,le,me,"\u2309","\\rceil",!0),oe(se,le,xe,"\\","\\backslash"),oe(se,le,xe,"\u2223","|"),oe(se,le,xe,"\u2223","\\vert"),oe(ie,le,xe,"|","\\textbar",!0),oe(se,le,xe,"\u2225","\\|"),oe(se,le,xe,"\u2225","\\Vert"),oe(ie,le,xe,"\u2225","\\textbardbl"),oe(ie,le,xe,"~","\\textasciitilde"),oe(ie,le,xe,"\\","\\textbackslash"),oe(ie,le,xe,"^","\\textasciicircum"),oe(se,le,be,"\u2191","\\uparrow",!0),oe(se,le,be,"\u21d1","\\Uparrow",!0),oe(se,le,be,"\u2193","\\downarrow",!0),oe(se,le,be,"\u21d3","\\Downarrow",!0),oe(se,le,be,"\u2195","\\updownarrow",!0),oe(se,le,be,"\u21d5","\\Updownarrow",!0),oe(se,le,de,"\u2210","\\coprod"),oe(se,le,de,"\u22c1","\\bigvee"),oe(se,le,de,"\u22c0","\\bigwedge"),oe(se,le,de,"\u2a04","\\biguplus"),oe(se,le,de,"\u22c2","\\bigcap"),oe(se,le,de,"\u22c3","\\bigcup"),oe(se,le,de,"\u222b","\\int"),oe(se,le,de,"\u222b","\\intop"),oe(se,le,de,"\u222c","\\iint"),oe(se,le,de,"\u222d","\\iiint"),oe(se,le,de,"\u220f","\\prod"),oe(se,le,de,"\u2211","\\sum"),oe(se,le,de,"\u2a02","\\bigotimes"),oe(se,le,de,"\u2a01","\\bigoplus"),oe(se,le,de,"\u2a00","\\bigodot"),oe(se,le,de,"\u222e","\\oint"),oe(se,le,de,"\u222f","\\oiint"),oe(se,le,de,"\u2230","\\oiiint"),oe(se,le,de,"\u2a06","\\bigsqcup"),oe(se,le,de,"\u222b","\\smallint"),oe(ie,le,ue,"\u2026","\\textellipsis"),oe(se,le,ue,"\u2026","\\mathellipsis"),oe(ie,le,ue,"\u2026","\\ldots",!0),oe(se,le,ue,"\u2026","\\ldots",!0),oe(se,le,ue,"\u22ef","\\@cdots",!0),oe(se,le,ue,"\u22f1","\\ddots",!0),oe(se,le,xe,"\u22ee","\\varvdots"),oe(ie,le,xe,"\u22ee","\\varvdots"),oe(se,le,ce,"\u02ca","\\acute"),oe(se,le,ce,"\u02cb","\\grave"),oe(se,le,ce,"\xa8","\\ddot"),oe(se,le,ce,"~","\\tilde"),oe(se,le,ce,"\u02c9","\\bar"),oe(se,le,ce,"\u02d8","\\breve"),oe(se,le,ce,"\u02c7","\\check"),oe(se,le,ce,"^","\\hat"),oe(se,le,ce,"\u20d7","\\vec"),oe(se,le,ce,"\u02d9","\\dot"),oe(se,le,ce,"\u02da","\\mathring"),oe(se,le,pe,"\ue131","\\@imath"),oe(se,le,pe,"\ue237","\\@jmath"),oe(se,le,xe,"\u0131","\u0131"),oe(se,le,xe,"\u0237","\u0237"),oe(ie,le,xe,"\u0131","\\i",!0),oe(ie,le,xe,"\u0237","\\j",!0),oe(ie,le,xe,"\xdf","\\ss",!0),oe(ie,le,xe,"\xe6","\\ae",!0),oe(ie,le,xe,"\u0153","\\oe",!0),oe(ie,le,xe,"\xf8","\\o",!0),oe(ie,le,xe,"\xc6","\\AE",!0),oe(ie,le,xe,"\u0152","\\OE",!0),oe(ie,le,xe,"\xd8","\\O",!0),oe(ie,le,ce,"\u02ca","\\'"),oe(ie,le,ce,"\u02cb","\\`"),oe(ie,le,ce,"\u02c6","\\^"),oe(ie,le,ce,"\u02dc","\\~"),oe(ie,le,ce,"\u02c9","\\="),oe(ie,le,ce,"\u02d8","\\u"),oe(ie,le,ce,"\u02d9","\\."),oe(ie,le,ce,"\xb8","\\c"),oe(ie,le,ce,"\u02da","\\r"),oe(ie,le,ce,"\u02c7","\\v"),oe(ie,le,ce,"\xa8",'\\"'),oe(ie,le,ce,"\u02dd","\\H"),oe(ie,le,ce,"\u25ef","\\textcircled");const we={"--":!0,"---":!0,"``":!0,"''":!0};oe(ie,le,xe,"\u2013","--",!0),oe(ie,le,xe,"\u2013","\\textendash"),oe(ie,le,xe,"\u2014","---",!0),oe(ie,le,xe,"\u2014","\\textemdash"),oe(ie,le,xe,"\u2018","`",!0),oe(ie,le,xe,"\u2018","\\textquoteleft"),oe(ie,le,xe,"\u2019","'",!0),oe(ie,le,xe,"\u2019","\\textquoteright"),oe(ie,le,xe,"\u201c","``",!0),oe(ie,le,xe,"\u201c","\\textquotedblleft"),oe(ie,le,xe,"\u201d","''",!0),oe(ie,le,xe,"\u201d","\\textquotedblright"),oe(se,le,xe,"\xb0","\\degree",!0),oe(ie,le,xe,"\xb0","\\degree"),oe(ie,le,xe,"\xb0","\\textdegree",!0),oe(se,le,xe,"\xa3","\\pounds"),oe(se,le,xe,"\xa3","\\mathsterling",!0),oe(ie,le,xe,"\xa3","\\pounds"),oe(ie,le,xe,"\xa3","\\textsterling",!0),oe(se,ae,xe,"\u2720","\\maltese"),oe(ie,ae,xe,"\u2720","\\maltese");const ve='0123456789/@."';for(let e=0;e<14;e++){const t=ve.charAt(e);oe(se,le,xe,t,t)}const ke='0123456789!@*()-=+";:?/.,';for(let e=0;e<25;e++){const t=ke.charAt(e);oe(ie,le,xe,t,t)}const ze="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(let e=0;e<52;e++){const t=ze.charAt(e);oe(se,le,pe,t,t),oe(ie,le,xe,t,t)}let Se;oe(se,ae,xe,"C","\u2102"),oe(ie,ae,xe,"C","\u2102"),oe(se,ae,xe,"H","\u210d"),oe(ie,ae,xe,"H","\u210d"),oe(se,ae,xe,"N","\u2115"),oe(ie,ae,xe,"N","\u2115"),oe(se,ae,xe,"P","\u2119"),oe(ie,ae,xe,"P","\u2119"),oe(se,ae,xe,"Q","\u211a"),oe(ie,ae,xe,"Q","\u211a"),oe(se,ae,xe,"R","\u211d"),oe(ie,ae,xe,"R","\u211d"),oe(se,ae,xe,"Z","\u2124"),oe(ie,ae,xe,"Z","\u2124"),oe(se,le,pe,"h","\u210e"),oe(ie,le,pe,"h","\u210e");for(let e=0;e<52;e++){const t=ze.charAt(e);Se=String.fromCharCode(55349,56320+e),oe(se,le,pe,t,Se),oe(ie,le,xe,t,Se),Se=String.fromCharCode(55349,56372+e),oe(se,le,pe,t,Se),oe(ie,le,xe,t,Se),Se=String.fromCharCode(55349,56424+e),oe(se,le,pe,t,Se),oe(ie,le,xe,t,Se),Se=String.fromCharCode(55349,56580+e),oe(se,le,pe,t,Se),oe(ie,le,xe,t,Se),Se=String.fromCharCode(55349,56684+e),oe(se,le,pe,t,Se),oe(ie,le,xe,t,Se),Se=String.fromCharCode(55349,56736+e),oe(se,le,pe,t,Se),oe(ie,le,xe,t,Se),Se=String.fromCharCode(55349,56788+e),oe(se,le,pe,t,Se),oe(ie,le,xe,t,Se),Se=String.fromCharCode(55349,56840+e),oe(se,le,pe,t,Se),oe(ie,le,xe,t,Se),Se=String.fromCharCode(55349,56944+e),oe(se,le,pe,t,Se),oe(ie,le,xe,t,Se),e<26&&(Se=String.fromCharCode(55349,56632+e),oe(se,le,pe,t,Se),oe(ie,le,xe,t,Se),Se=String.fromCharCode(55349,56476+e),oe(se,le,pe,t,Se),oe(ie,le,xe,t,Se))}Se=String.fromCharCode(55349,56668),oe(se,le,pe,"k",Se),oe(ie,le,xe,"k",Se);for(let e=0;e<10;e++){const t=e.toString();Se=String.fromCharCode(55349,57294+e),oe(se,le,pe,t,Se),oe(ie,le,xe,t,Se),Se=String.fromCharCode(55349,57314+e),oe(se,le,pe,t,Se),oe(ie,le,xe,t,Se),Se=String.fromCharCode(55349,57324+e),oe(se,le,pe,t,Se),oe(ie,le,xe,t,Se),Se=String.fromCharCode(55349,57334+e),oe(se,le,pe,t,Se),oe(ie,le,xe,t,Se)}const Me="\xd0\xde\xfe";for(let e=0;e<3;e++){const t=Me.charAt(e);oe(se,le,pe,t,t),oe(ie,le,xe,t,t)}const Ae={mathClass:"mathbf",textClass:"textbf",font:"Main-Bold"},Te={mathClass:"mathnormal",textClass:"textit",font:"Math-Italic"},Be={mathClass:"boldsymbol",textClass:"boldsymbol",font:"Main-BoldItalic"},Ce={mathClass:"",textClass:"",font:""},qe={mathClass:"mathfrak",textClass:"textfrak",font:"Fraktur-Regular"},Ie={mathClass:"mathbb",textClass:"textbb",font:"AMS-Regular"},Re={mathClass:"mathboldfrak",textClass:"textboldfrak",font:"Fraktur-Regular"},Ee={mathClass:"mathsf",textClass:"textsf",font:"SansSerif-Regular"},He={mathClass:"mathboldsf",textClass:"textboldsf",font:"SansSerif-Bold"},Ne={mathClass:"mathitsf",textClass:"textitsf",font:"SansSerif-Italic"},Oe={mathClass:"mathtt",textClass:"texttt",font:"Typewriter-Regular"},De=[Ae,Ae,Te,Te,Be,Be,{mathClass:"mathscr",textClass:"textscr",font:"Script-Regular"},Ce,Ce,Ce,qe,qe,Ie,Ie,Re,Re,Ee,Ee,He,He,Ne,Ne,Ce,Ce,Oe,Oe],Le=[Ae,Ce,Ee,He,Oe],Pe=function(e,t,r){if(ne[r][e]){const t=ne[r][e].replace;t&&(e=t)}return{value:e,metrics:ee(e,t,r)}},Fe=function(e,t,r,n,o){const s=Pe(e,t,r),i=s.metrics;let l;if(e=s.value,i){let t=i.italic;("text"===r||n&&"mathit"===n.font)&&(t=0),l=new W(e,i.height,i.depth,t,i.skew,i.width,o)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+r+"'"),l=new W(e,0,0,0,0,0,o);if(n){l.maxFontSize=n.sizeMultiplier,n.style.isTight()&&l.classes.push("mtight");const e=n.getColor();e&&(l.style.color=e)}return l},Ve=function(e,t,r,n){return void 0===n&&(n=[]),"boldsymbol"===r.font&&Pe(e,"Main-Bold",t).metrics?Fe(e,"Main-Bold",t,r,n.concat(["mathbf"])):"\\"===e||"main"===ne[t][e].font?Fe(e,"Main-Regular",t,r,n):Fe(e,"AMS-Regular",t,r,n.concat(["amsrm"]))},Ge=function(e,t,r){const o=e.mode,s=e.text,i=["mord"],{font:l,fontFamily:a,fontWeight:c,fontShape:h}=t,m="math"===o||"text"===o&&!!l,u=m?l:a;let p="",d="";if(55349===s.charCodeAt(0)){const e=(e=>{const t=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536;if(119808<=t&&t<120484){const e=Math.floor((t-119808)/26);return De[e]}if(120782<=t&&t<=120831){const e=Math.floor((t-120782)/10);return Le[e]}if(120485===t||120486===t)return De[0];if(120486<t&&t<120782)return Ce;throw new n("Unsupported character: "+e)})(s);p=e.font,d=e[o+"Class"]}if(p)return Fe(s,p,o,t,i.concat(d));if(u){let e,n;if("boldsymbol"===u){const t=function(e,t,r){return"textord"!==r&&Pe(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(s,o,r);e=t.fontName,n=[t.fontClass]}else m?(e=et[l].fontName,n=[l]):(e=Qe(a,c,h),n=[a,c,h]);if(Pe(s,e,o).metrics)return Fe(s,e,o,t,i.concat(n));if(we.hasOwnProperty(s)&&"Typewriter"===e.slice(0,10)){const r=[];for(let l=0;l<s.length;l++)r.push(Fe(s[l],e,o,t,i.concat(n)));return $e(r)}}if("mathord"===r)return Fe(s,"Math-Italic",o,t,i.concat(["mathnormal"]));if("textord"===r){const e=ne[o][s]&&ne[o][s].font;if("ams"===e){const e=Qe("amsrm",c,h);return Fe(s,e,o,t,i.concat("amsrm",c,h))}if("main"!==e&&e){const r=Qe(e,c,h);return Fe(s,r,o,t,i.concat(r,c,h))}{const e=Qe("textrm",c,h);return Fe(s,e,o,t,i.concat(c,h))}}throw new Error("unexpected type: "+r+" in makeOrd")},Ue=(e,t)=>{if(D(e.classes)!==D(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||0!==e.italic&&e.hasClass("mathnormal"))return!1;if(1===e.classes.length){const t=e.classes[0];if("mbin"===t||"mord"===t)return!1}for(const r of Object.keys(e.style))if(e.style[r]!==t.style[r])return!1;for(const r of Object.keys(t.style))if(e.style[r]!==t.style[r])return!1;return!0},Xe=e=>{for(let t=0;t<e.length-1;t++){const r=e[t],n=e[t+1];r instanceof W&&n instanceof W&&Ue(r,n)&&(r.text+=n.text,r.height=Math.max(r.height,n.height),r.depth=Math.max(r.depth,n.depth),r.italic=n.italic,e.splice(t+1,1),t--)}return e},Ye=function(e){let t=0,r=0,n=0;for(let o=0;o<e.children.length;o++){const s=e.children[o];s.height>t&&(t=s.height),s.depth>r&&(r=s.depth),s.maxFontSize>n&&(n=s.maxFontSize)}e.height=t,e.depth=r,e.maxFontSize=n},je=function(e,t,r,n){const o=new U(e,t,r,n);return Ye(o),o},We=(e,t,r,n)=>new U(e,t,r,n),_e=function(e,t,r){const n=je([e],[],t);return n.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),n.style.borderBottomWidth=O(n.height),n.maxFontSize=1,n},$e=function(e){const t=new I(e);return Ye(t),t},Ze=function(e,t){return e instanceof I?je([],[e],t):e},Ke=function(e,t){const{children:r,depth:n}=function(e){if("individualShift"===e.positionType){const t=e.children,r=[t[0]],n=-t[0].shift-t[0].elem.depth;let o=n;for(let e=1;e<t.length;e++){const n=-t[e].shift-o-t[e].elem.depth,s=n-(t[e-1].elem.height+t[e-1].elem.depth);o+=n,r.push({type:"kern",size:s}),r.push(t[e])}return{children:r,depth:n}}let t;if("top"===e.positionType){let r=e.positionData;for(let t=0;t<e.children.length;t++){const n=e.children[t];r-="kern"===n.type?n.size:n.elem.height+n.elem.depth}t=r}else if("bottom"===e.positionType)t=-e.positionData;else{const r=e.children[0];if("elem"!==r.type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)t=-r.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");t=-r.elem.depth}}return{children:e.children,depth:t}}(e);let o=0;for(let e=0;e<r.length;e++){const t=r[e];if("elem"===t.type){const e=t.elem;o=Math.max(o,e.maxFontSize,e.height)}}o+=2;const s=je(["pstrut"],[]);s.style.height=O(o);const i=[];let l=n,a=n,c=n;for(let e=0;e<r.length;e++){const t=r[e];if("kern"===t.type)c+=t.size;else{const e=t.elem,r=t.wrapperClasses||[],n=t.wrapperStyle||{},l=je(r,[s,e],void 0,n);l.style.top=O(-o-c-e.depth),t.marginLeft&&(l.style.marginLeft=t.marginLeft),t.marginRight&&(l.style.marginRight=t.marginRight),i.push(l),c+=e.height+e.depth}l=Math.min(l,c),a=Math.max(a,c)}const h=je(["vlist"],i);let m;if(h.style.height=O(a),l<0){const e=je([],[]),t=je(["vlist"],[e]);t.style.height=O(-l);const r=je(["vlist-s"],[new W("\u200b")]);m=[je(["vlist-r"],[h,r]),je(["vlist-r"],[t])]}else m=[je(["vlist-r"],[h])];const u=je(["vlist-t"],m);return 2===m.length&&u.classes.push("vlist-t2"),u.height=a,u.depth=-l,u},Je=(e,t)=>{const r=je(["mspace"],[],t),n=N(e,t);return r.style.marginRight=O(n),r},Qe=(e,t,r)=>{let n,o;switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}return o="textbf"===t&&"textit"===r?"BoldItalic":"textbf"===t?"Bold":"textit"===r?"Italic":"Regular",n+"-"+o},et={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},tt={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},rt=function(e,t){const[r,n,o]=tt[e],s=new $(r),i=new _([s],{width:O(n),height:O(o),style:"width:"+O(n),viewBox:"0 0 "+1e3*n+" "+1e3*o,preserveAspectRatio:"xMinYMin"}),l=We(["overlay"],[i],t);return l.height=o,l.style.height=O(o),l.style.width=O(n),l},nt={number:3,unit:"mu"},ot={number:4,unit:"mu"},st={number:5,unit:"mu"},it={mord:{mop:nt,mbin:ot,mrel:st,minner:nt},mop:{mord:nt,mop:nt,mrel:st,minner:nt},mbin:{mord:ot,mop:ot,mopen:ot,minner:ot},mrel:{mord:st,mop:st,mopen:st,minner:st},mopen:{},mclose:{mop:nt,mbin:ot,mrel:st,minner:nt},mpunct:{mord:nt,mop:nt,mrel:st,mopen:nt,mclose:nt,mpunct:nt,minner:nt},minner:{mord:nt,mop:nt,mbin:ot,mrel:st,mopen:nt,mpunct:nt,minner:nt}},lt={mord:{mop:nt},mop:{mord:nt,mop:nt},mbin:{},mrel:{},mopen:{},mclose:{mop:nt},mpunct:{},minner:{mop:nt}},at={},ct={},ht={};function mt(e){let{type:t,names:r,props:n,handler:o,htmlBuilder:s,mathmlBuilder:i}=e;const l={type:t,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:void 0===n.allowedInMath||n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:o};for(let e=0;e<r.length;++e)at[r[e]]=l;t&&(s&&(ct[t]=s),i&&(ht[t]=i))}function ut(e){let{type:t,htmlBuilder:r,mathmlBuilder:n}=e;mt({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:r,mathmlBuilder:n})}const pt=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},dt=function(e){return"ordgroup"===e.type?e.body:[e]},gt=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),ft=new Set(["rightmost","mrel","mclose","mpunct"]),bt={display:S.DISPLAY,text:S.TEXT,script:S.SCRIPT,scriptscript:S.SCRIPTSCRIPT},yt={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},xt=function(e,t,r,n){void 0===n&&(n=[null,null]);const o=[];for(let r=0;r<e.length;r++){const n=Mt(e[r],t);if(n instanceof I){const e=n.children;o.push(...e)}else o.push(n)}if(Xe(o),!r)return o;let s=t;if(1===e.length){const r=e[0];"sizing"===r.type?s=t.havingSize(r.size):"styling"===r.type&&(s=t.havingStyle(bt[r.style]))}const i=je([n[0]||"leftmost"],[],t),l=je([n[1]||"rightmost"],[],t),a="root"===r;return wt(o,(e,t)=>{const r=t.classes[0],n=e.classes[0];"mbin"===r&&ft.has(n)?t.classes[0]="mord":"mbin"===n&>.has(r)&&(e.classes[0]="mord")},{node:i},l,a),wt(o,(e,t)=>{var r,n;const o=zt(t),i=zt(e),l=o&&i?e.hasClass("mtight")?null==(r=lt[o])?void 0:r[i]:null==(n=it[o])?void 0:n[i]:null;if(l)return Je(l,s)},{node:i},l,a),o},wt=function(e,t,r,n,o){n&&e.push(n);let s=0;for(;s<e.length;s++){const n=e[s],i=vt(n);if(i){wt(i.children,t,r,null,o);continue}const l=!n.hasClass("mspace");if(l){const o=t(n,r.node);o&&(r.insertAfter?r.insertAfter(o):(e.unshift(o),s++))}l?r.node=n:o&&n.hasClass("newline")&&(r.node=je(["leftmost"])),r.insertAfter=(t=>r=>{e.splice(t+1,0,r),s++})(s)}n&&e.pop()},vt=function(e){return e instanceof I||e instanceof X||e instanceof U&&e.hasClass("enclosing")?e:null},kt=function(e,t){const r=vt(e);if(r){const e=r.children;if(e.length){if("right"===t)return kt(e[e.length-1],"right");if("left"===t)return kt(e[0],"left")}}return e},zt=function(e,t){if(!e)return null;t&&(e=kt(e,t));const r=e.classes[0];return yt[r]||null},St=function(e,t){const r=["nulldelimiter"].concat(e.baseSizingClasses());return je(t.concat(r))},Mt=function(e,t,r){if(!e)return je();if(ct[e.type]){let n=ct[e.type](e,t);if(r&&t.size!==r.size){n=je(t.sizingClasses(r),[n],t);const e=t.sizeMultiplier/r.sizeMultiplier;n.height*=e,n.depth*=e}return n}throw new n("Got group of unknown type: '"+e.type+"'")};function At(e,t){const r=je(["base"],e,t),n=je(["strut"]);return n.style.height=O(r.height+r.depth),r.depth&&(n.style.verticalAlign=O(-r.depth)),r.children.unshift(n),r}function Tt(e,t){let r=null;1===e.length&&"tag"===e[0].type&&(r=e[0].tag,e=e[0].body);const n=xt(e,t,"root");let o;2===n.length&&n[1].hasClass("tag")&&(o=n.pop());const s=[];let i,l=[];for(let e=0;e<n.length;e++)if(l.push(n[e]),n[e].hasClass("mbin")||n[e].hasClass("mrel")||n[e].hasClass("allowbreak")){let r=!1;for(;e<n.length-1&&n[e+1].hasClass("mspace")&&!n[e+1].hasClass("newline");)e++,l.push(n[e]),n[e].hasClass("nobreak")&&(r=!0);r||(s.push(At(l,t)),l=[])}else n[e].hasClass("newline")&&(l.pop(),l.length>0&&(s.push(At(l,t)),l=[]),s.push(n[e]));l.length>0&&s.push(At(l,t)),r?(i=At(xt(r,t,!0),t),i.classes=["tag"],s.push(i)):o&&s.push(o);const a=je(["katex-html"],s);if(a.setAttribute("aria-hidden","true"),i){const e=i.children[0];e.style.height=O(a.height+a.depth),a.depth&&(e.style.verticalAlign=O(-a.depth))}return a}function Bt(e){return new I(e)}class Ct{constructor(e,t,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=r||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){const e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=D(this.classes));for(let t=0;t<this.children.length;t++)if(this.children[t]instanceof qt&&this.children[t+1]instanceof qt){let r=this.children[t].toText()+this.children[++t].toText();for(;this.children[t+1]instanceof qt;)r+=this.children[++t].toText();e.appendChild(new qt(r).toNode())}else e.appendChild(this.children[t].toNode());return e}toMarkup(){let e="<"+this.type;for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=a(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+a(D(this.classes))+'"'),e+=">";for(let t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e+="</"+this.type+">",e}toText(){return this.children.map(e=>e.toText()).join("")}}class qt{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return a(this.toText())}toText(){return this.text}}class It{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?"\u200a":e>=.1666&&e<=.1667?"\u2009":e>=.2222&&e<=.2223?"\u2005":e>=.2777&&e<=.2778?"\u2005\u200a":e>=-.05556&&e<=-.05555?"\u200a\u2063":e>=-.1667&&e<=-.1666?"\u2009\u2063":e>=-.2223&&e<=-.2222?"\u205f\u2063":e>=-.2778&&e<=-.2777?"\u2005\u2063":null}toNode(){if(this.character)return document.createTextNode(this.character);{const e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",O(this.width)),e}}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+O(this.width)+'"/>'}toText(){return this.character?this.character:" "}}const Rt=new Set(["\\imath","\\jmath"]),Et=new Set(["mrow","mtable"]),Ht=function(e,t,r){return!ne[t][e]||!ne[t][e].replace||55349===e.charCodeAt(0)||we.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(e=ne[t][e].replace),new qt(e)},Nt=function(e){return 1===e.length?e[0]:new Ct("mrow",e)},Ot={mathit:"italic",boldsymbol:e=>"textord"===e.type?"bold":"bold-italic",mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},Dt=(e,t)=>{if("text"===e.mode){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold"}const r=t.font;if(!r||"mathnormal"===r)return null;const n=e.mode,o=Ot[r];if(o)return"function"==typeof o?o(e):o;let s=e.text;if(Rt.has(s))return null;if(ne[n][s]){const e=ne[n][s].replace;e&&(s=e)}return ee(s,et[r].fontName,n)?et[r].variant:null};function Lt(e){if(!e)return!1;if("mi"===e.type&&1===e.children.length){const t=e.children[0];return t instanceof qt&&"."===t.text}if("mo"===e.type&&1===e.children.length&&"true"===e.getAttribute("separator")&&"0em"===e.getAttribute("lspace")&&"0em"===e.getAttribute("rspace")){const t=e.children[0];return t instanceof qt&&","===t.text}return!1}const Pt=function(e,t,r){if(1===e.length){const n=Vt(e[0],t);return r&&n instanceof Ct&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}const n=[];let o;for(let r=0;r<e.length;r++){const s=Vt(e[r],t);if(s instanceof Ct&&o instanceof Ct){if("mtext"===s.type&&"mtext"===o.type&&s.getAttribute("mathvariant")===o.getAttribute("mathvariant")){o.children.push(...s.children);continue}if("mn"===s.type&&"mn"===o.type){o.children.push(...s.children);continue}if(Lt(s)&&"mn"===o.type){o.children.push(...s.children);continue}if("mn"===s.type&&Lt(o))s.children=[...o.children,...s.children],n.pop();else if(("msup"===s.type||"msub"===s.type)&&s.children.length>=1&&("mn"===o.type||Lt(o))){const e=s.children[0];e instanceof Ct&&"mn"===e.type&&(e.children=[...o.children,...e.children],n.pop())}else if("mi"===o.type&&1===o.children.length){const e=o.children[0];if(e instanceof qt&&"\u0338"===e.text&&("mo"===s.type||"mi"===s.type||"mn"===s.type)){const e=s.children[0];e instanceof qt&&e.text.length>0&&(e.text=e.text.slice(0,1)+"\u0338"+e.text.slice(1),n.pop())}}}n.push(s),o=s}return n},Ft=function(e,t,r){return Nt(Pt(e,t,r))},Vt=function(e,t){if(!e)return new Ct("mrow");if(ht[e.type])return ht[e.type](e,t);throw new n("Got group of unknown type: '"+e.type+"'")};function Gt(e,t,r,n,o){const s=Pt(e,r);let i;i=1===s.length&&s[0]instanceof Ct&&Et.has(s[0].type)?s[0]:new Ct("mrow",s);const l=new Ct("annotation",[new qt(t)]);l.setAttribute("encoding","application/x-tex");const a=new Ct("semantics",[i,l]),c=new Ct("math",[a]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&c.setAttribute("display","block");return je([o?"katex":"katex-mathml"],[c])}const Ut=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Xt=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Yt=function(e,t){return t.size<2?e:Ut[e-1][t.size-1]};class jt{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||jt.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=Xt[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){const t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(t,e),new jt(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Yt(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:Xt[e-1]})}havingBaseStyle(e){e=e||this.style.text();const t=Yt(jt.BASESIZE,e);return this.size===t&&this.textSize===jt.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){let e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==jt.BASESIZE?["sizing","reset-size"+this.size,"size"+jt.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){let t;if(t=e>=5?0:e>=3?1:2,!te[t]){const e=te[t]={cssEmPerMu:J.quad[t]/18};for(const r in J)J.hasOwnProperty(r)&&(e[r]=J[r][t])}return te[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}jt.BASESIZE=6;var Wt=jt;const _t=function(e){return new Wt({style:e.displayMode?S.DISPLAY:S.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},$t=function(e,t){if(t.displayMode){const r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),e=je(r,[e])}return e},Zt=function(e,t,r){const n=_t(r);let o;if("mathml"===r.output)return Gt(e,t,n,r.displayMode,!0);if("html"===r.output){const t=Tt(e,n);o=je(["katex"],[t])}else{const s=Gt(e,t,n,r.displayMode,!1),i=Tt(e,n);o=je(["katex"],[s,i])}return $t(o,r)};const Kt={widehat:"^",widecheck:"\u02c7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23df",overbrace:"\u23de",underbracket:"\u23b5",overbracket:"\u23b4",overgroup:"\u23e0",undergroup:"\u23e1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21d2",xRightarrow:"\u21d2",overleftharpoon:"\u21bc",xleftharpoonup:"\u21bc",overrightharpoon:"\u21c0",xrightharpoonup:"\u21c0",xLeftarrow:"\u21d0",xLeftrightarrow:"\u21d4",xhookleftarrow:"\u21a9",xhookrightarrow:"\u21aa",xmapsto:"\u21a6",xrightharpoondown:"\u21c1",xleftharpoondown:"\u21bd",xrightleftharpoons:"\u21cc",xleftrightharpoons:"\u21cb",xtwoheadleftarrow:"\u219e",xtwoheadrightarrow:"\u21a0",xlongequal:"=",xtofrom:"\u21c4",xrightleftarrows:"\u21c4",xrightequilibrium:"\u21cc",xleftequilibrium:"\u21cb","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},Jt=function(e){const t=new Ct("mo",[new qt(Kt[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Qt={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},er=new Set(["widehat","widecheck","widetilde","utilde"]),tr=function(e,t){const{span:r,minWidth:n,height:o}=function(){let r=4e5;const n=e.label.slice(1);if(er.has(n)&&"base"in e){const o="ordgroup"===e.base.type?e.base.body.length:1;let s,i,l;if(o>5)"widehat"===n||"widecheck"===n?(s=420,r=2364,l=.42,i=n+"4"):(s=312,r=2340,l=.34,i="tilde4");else{const e=[1,1,2,2,3,3][o];"widehat"===n||"widecheck"===n?(r=[0,1062,2364,2364,2364][e],s=[0,239,300,360,420][e],l=[0,.24,.3,.3,.36,.42][e],i=n+e):(r=[0,600,1033,2339,2340][e],s=[0,260,286,306,312][e],l=[0,.26,.286,.3,.306,.34][e],i="tilde"+e)}const a=new $(i),c=new _([a],{width:"100%",height:O(l),viewBox:"0 0 "+r+" "+s,preserveAspectRatio:"none"});return{span:We([],[c],t),minWidth:0,height:l}}{const e=[],o=Qt[n];if(!o)throw new Error('No SVG data for "'+n+'".');const[s,i,l]=o,a=l/1e3,c=s.length;let h,m;if(1===c){if(4!==o.length)throw new Error('Expected 4-tuple for single-path SVG data "'+n+'".');h=["hide-tail"],m=[o[3]]}else if(2===c)h=["halfarrow-left","halfarrow-right"],m=["xMinYMin","xMaxYMin"];else{if(3!==c)throw new Error("Correct katexImagesData or update code here to support\n "+c+" children.");h=["brace-left","brace-center","brace-right"],m=["xMinYMin","xMidYMin","xMaxYMin"]}for(let n=0;n<c;n++){const o=new $(s[n]),u=new _([o],{width:"400em",height:O(a),viewBox:"0 0 "+r+" "+l,preserveAspectRatio:m[n]+" slice"}),p=We([h[n]],[u],t);if(1===c)return{span:p,minWidth:i,height:a};p.style.height=O(a),e.push(p)}return{span:je(["stretchy"],e,t),minWidth:i,height:a}}}();return r.height=o,r.style.height=O(o),n>0&&(r.style.minWidth=O(n)),r},rr={bin:1,close:1,inner:1,open:1,punct:1,rel:1},nr={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function or(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function sr(e){const t=ir(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function ir(e){return e&&("atom"===e.type||nr.hasOwnProperty(e.type))?e:null}const lr=e=>{return e instanceof W?e:((t=e)instanceof U||t instanceof X||t instanceof I)&&1===e.children.length?lr(e.children[0]):void 0;var t},ar=(e,t)=>{let r,n,o;e&&"supsub"===e.type?(n=or(e.base,"accent"),r=n.base,e.base=r,o=function(e){if(e instanceof U)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(Mt(e,t)),e.base=n):(n=or(e,"accent"),r=n.base);const s=Mt(r,t.havingCrampedStyle());let i=0;var l,a;n.isShifty&&m(r)&&(i=null!=(l=null==(a=lr(s))?void 0:a.skew)?l:0);const c="\\c"===n.label;let h,u=c?s.height+s.depth:Math.min(s.height,t.fontMetrics().xHeight);if(n.isStretchy)h=tr(n,t),h=Ke({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:h,wrapperClasses:["svg-align"],wrapperStyle:i>0?{width:"calc(100% - "+O(2*i)+")",marginLeft:O(2*i)}:void 0}]});else{let e,r;"\\vec"===n.label?(e=rt("vec",t),r=tt.vec[1]):(e=Ge({type:"textord",mode:n.mode,text:n.label},t,"textord"),e=function(e){if(e instanceof W)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}(e),e.italic=0,r=e.width,c&&(u+=e.depth)),h=je(["accent-body"],[e]);const o="\\textcircled"===n.label;o&&(h.classes.push("accent-full"),u=s.height);let l=i;o||(l-=r/2),h.style.left=O(l),"\\textcircled"===n.label&&(h.style.top=".2em"),h=Ke({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-u},{type:"elem",elem:h}]})}const p=je(["mord","accent"],[h],t);return o?(o.children[0]=p,o.height=Math.max(p.height,o.height),o.classes[0]="mord",o):p},cr=(e,t)=>{const r=e.isStretchy?Jt(e.label):new Ct("mo",[Ht(e.label,e.mode)]),n=new Ct("mover",[Vt(e.base,t),r]);return n.setAttribute("accent","true"),n},hr=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));mt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{const r=pt(t[0]),n=!hr.test(e.funcName),o=!n||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:o,base:r}},htmlBuilder:ar,mathmlBuilder:cr}),mt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{const r=t[0];let n=e.parser.mode;return"math"===n&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:ar,mathmlBuilder:cr}),mt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{let{parser:r,funcName:n}=e;const o=t[0];return{type:"accentUnder",mode:r.mode,label:n,base:o}},htmlBuilder:(e,t)=>{const r=Mt(e.base,t),n=tr(e,t),o="\\utilde"===e.label?.12:0,s=Ke({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:o},{type:"elem",elem:r}]});return je(["mord","accentunder"],[s],t)},mathmlBuilder:(e,t)=>{const r=Jt(e.label),n=new Ct("munder",[Vt(e.base,t),r]);return n.setAttribute("accentunder","true"),n}});const mr=e=>{const t=new Ct("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};function ur(e,t){const r=xt(e.body,t,!0);return je([e.mclass],r,t)}function pr(e,t){let r;const n=Pt(e.body,t);return"minner"===e.mclass?r=new Ct("mpadded",n):"mord"===e.mclass?e.isCharacterBox?(r=n[0],r.type="mi"):r=new Ct("mi",n):(e.isCharacterBox?(r=n[0],r.type="mo"):r=new Ct("mo",n),"mbin"===e.mclass?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):"mpunct"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===e.mclass&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}mt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){let{parser:n,funcName:o}=e;return{type:"xArrow",mode:n.mode,label:o,body:t[0],below:r[0]}},htmlBuilder(e,t){const r=t.style;let n=t.havingStyle(r.sup());const o=Ze(Mt(e.body,n,t),t),s="\\x"===e.label.slice(0,2)?"x":"cd";let i;o.classes.push(s+"-arrow-pad"),e.below&&(n=t.havingStyle(r.sub()),i=Ze(Mt(e.below,n,t),t),i.classes.push(s+"-arrow-pad"));const l=tr(e,t),a=-t.fontMetrics().axisHeight+.5*l.height;let c,h=-t.fontMetrics().axisHeight-.5*l.height-.111;if((o.depth>.25||"\\xleftequilibrium"===e.label)&&(h-=o.depth),i){const e=-t.fontMetrics().axisHeight+i.height+.5*l.height+.111;c=Ke({positionType:"individualShift",children:[{type:"elem",elem:o,shift:h},{type:"elem",elem:l,shift:a,wrapperClasses:["svg-align"]},{type:"elem",elem:i,shift:e}]})}else c=Ke({positionType:"individualShift",children:[{type:"elem",elem:o,shift:h},{type:"elem",elem:l,shift:a,wrapperClasses:["svg-align"]}]});return je(["mrel","x-arrow"],[c],t)},mathmlBuilder(e,t){const r=Jt(e.label);let n;if(r.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){const o=mr(Vt(e.body,t));if(e.below){const s=mr(Vt(e.below,t));n=new Ct("munderover",[r,s,o])}else n=new Ct("mover",[r,o])}else if(e.below){const o=mr(Vt(e.below,t));n=new Ct("munder",[r,o])}else n=mr(),n=new Ct("mover",[r,n]);return n}}),mt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){let{parser:r,funcName:n}=e;const o=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:dt(o),isCharacterBox:m(o)}},htmlBuilder:ur,mathmlBuilder:pr});const dr=e=>{const t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};mt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){let{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:dr(t[0]),body:dt(t[1]),isCharacterBox:m(t[1])}}}),mt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){let{parser:r,funcName:n}=e;const o=t[1],s=t[0];let i;i="\\stackrel"!==n?dr(o):"mrel";const l={type:"op",mode:o.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==n,body:dt(o)},a={type:"supsub",mode:s.mode,base:l,sup:"\\underset"===n?null:s,sub:"\\underset"===n?s:null};return{type:"mclass",mode:r.mode,mclass:i,body:[a],isCharacterBox:m(a)}},htmlBuilder:ur,mathmlBuilder:pr}),mt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){let{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:dr(t[0]),body:dt(t[0])}},htmlBuilder(e,t){const r=xt(e.body,t,!0),n=je([e.mclass],r,t);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(e,t){const r=Pt(e.body,t),n=new Ct("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});const gr={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},fr=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),br=e=>"textord"===e.type&&"@"===e.text,yr=(e,t)=>("mathord"===e.type||"atom"===e.type)&&e.text===t;function xr(e,t,r){const n=gr[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{const e={type:"atom",text:n,mode:"math",family:"rel"},o={type:"ordgroup",mode:"math",body:[r.callFunction("\\\\cdleft",[t[0]],[]),r.callFunction("\\Big",[e],[]),r.callFunction("\\\\cdright",[t[1]],[])]};return r.callFunction("\\\\cdparent",[o],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{const e={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[e],[])}default:return{type:"textord",text:" ",mode:"math"}}}mt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){let{parser:r,funcName:n}=e;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:t[0]}},htmlBuilder(e,t){const r=t.havingStyle(t.style.sup()),n=Ze(Mt(e.label,r,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=O(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(e,t){let r=new Ct("mrow",[Vt(e.label,t)]);return r=new Ct("mpadded",[r]),r.setAttribute("width","0"),"left"===e.side&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new Ct("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),mt({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){let{parser:r}=e;return{type:"cdlabelparent",mode:r.mode,fragment:t[0]}},htmlBuilder(e,t){const r=Ze(Mt(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(e,t){return new Ct("mrow",[Vt(e.fragment,t)])}}),mt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){let{parser:r}=e;const o=or(t[0],"ordgroup").body;let s="";for(let e=0;e<o.length;e++){s+=or(o[e],"textord").text}let i,l=parseInt(s);if(isNaN(l))throw new n("\\@char has non-numeric argument "+s);if(l<0||l>=1114111)throw new n("\\@char with invalid code point "+s);return l<=65535?i=String.fromCharCode(l):(l-=65536,i=String.fromCharCode(55296+(l>>10),56320+(1023&l))),{type:"textord",mode:r.mode,text:i}}});const wr=(e,t)=>{const r=xt(e.body,t.withColor(e.color),!1);return $e(r)},vr=(e,t)=>{const r=Pt(e.body,t.withColor(e.color)),n=new Ct("mstyle",r);return n.setAttribute("mathcolor",e.color),n};mt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){let{parser:r}=e;const n=or(t[0],"color-token").color,o=t[1];return{type:"color",mode:r.mode,color:n,body:dt(o)}},htmlBuilder:wr,mathmlBuilder:vr}),mt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){let{parser:r,breakOnTokenText:n}=e;const o=or(t[0],"color-token").color;r.gullet.macros.set("\\current@color",o);const s=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:o,body:s}},htmlBuilder:wr,mathmlBuilder:vr}),mt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){let{parser:n}=e;const o="["===n.gullet.future().text?n.parseSizeGroup(!0):null,s=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:s,size:o&&or(o,"size").value}},htmlBuilder(e,t){const r=je(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=O(N(e.size,t)))),r},mathmlBuilder(e,t){const r=new Ct("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",O(N(e.size,t)))),r}});const kr={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},zr=e=>{const t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new n("Expected a control sequence",e);return t},Sr=(e,t,r,n)=>{let o=e.gullet.macros.get(r.text);null==o&&(r.noexpand=!0,o={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,o,n)};mt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){let{parser:t,funcName:r}=e;t.consumeSpaces();const o=t.fetch();if(kr[o.text])return"\\global"!==r&&"\\\\globallong"!==r||(o.text=kr[o.text]),or(t.parseFunction(),"internal");throw new n("Invalid token after macro prefix",o)}}),mt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){let{parser:t,funcName:r}=e,o=t.gullet.popToken();const s=o.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(s))throw new n("Expected a control sequence",o);let i,l=0;const a=[[]];for(;"{"!==t.gullet.future().text;)if(o=t.gullet.popToken(),"#"===o.text){if("{"===t.gullet.future().text){i=t.gullet.future(),a[l].push("{");break}if(o=t.gullet.popToken(),!/^[1-9]$/.test(o.text))throw new n('Invalid argument number "'+o.text+'"');if(parseInt(o.text)!==l+1)throw new n('Argument number "'+o.text+'" out of order');l++,a.push([])}else{if("EOF"===o.text)throw new n("Expected a macro definition");a[l].push(o.text)}let{tokens:c}=t.gullet.consumeArg();return i&&c.unshift(i),"\\edef"!==r&&"\\xdef"!==r||(c=t.gullet.expandTokens(c),c.reverse()),t.gullet.macros.set(s,{tokens:c,numArgs:l,delimiters:a},r===kr[r]),{type:"internal",mode:t.mode}}}),mt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){let{parser:t,funcName:r}=e;const n=zr(t.gullet.popToken());t.gullet.consumeSpaces();const o=(e=>{let t=e.gullet.popToken();return"="===t.text&&(t=e.gullet.popToken()," "===t.text&&(t=e.gullet.popToken())),t})(t);return Sr(t,n,o,"\\\\globallet"===r),{type:"internal",mode:t.mode}}}),mt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){let{parser:t,funcName:r}=e;const n=zr(t.gullet.popToken()),o=t.gullet.popToken(),s=t.gullet.popToken();return Sr(t,n,s,"\\\\globalfuture"===r),t.gullet.pushToken(s),t.gullet.pushToken(o),{type:"internal",mode:t.mode}}});const Mr=function(e,t,r){const n=ee(ne.math[e]&&ne.math[e].replace||e,t,r);if(!n)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return n},Ar=function(e,t,r,n){const o=r.havingBaseStyle(t),s=je(n.concat(o.sizingClasses(r)),[e],r),i=o.sizeMultiplier/r.sizeMultiplier;return s.height*=i,s.depth*=i,s.maxFontSize=o.sizeMultiplier,s},Tr=function(e,t,r){const n=t.havingBaseStyle(r),o=(1-t.sizeMultiplier/n.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=O(o),e.height-=o,e.depth+=o},Br=function(e,t,r,n,o,s){const i=function(e,t,r,n){return Fe(e,"Size"+t+"-Regular",r,n)}(e,t,o,n),l=Ar(je(["delimsizing","size"+t],[i],n),S.TEXT,n,s);return r&&Tr(l,n,S.TEXT),l},Cr=function(e,t,r){let n;n="Size1-Regular"===t?"delim-size1":"delim-size4";return{type:"elem",elem:je(["delimsizinginner",n],[je([],[Fe(e,t,r)])])}},qr=function(e,t,r){const n=K["Size4-Regular"][e.charCodeAt(0)]?K["Size4-Regular"][e.charCodeAt(0)][4]:K["Size1-Regular"][e.charCodeAt(0)][4],o=new $("inner",function(e,t){switch(e){case"\u239c":return B("M291 0 H417 V"+t+" H291z");case"\u2223":return B("M145 0 H188 V"+t+" H145z");case"\u2225":return B("M145 0 H188 V"+t+" H145z")+B("M367 0 H410 V"+t+" H367z");case"\u239f":return B("M457 0 H583 V"+t+" H457z");case"\u23a2":return B("M319 0 H403 V"+t+" H319z");case"\u23a5":return B("M263 0 H347 V"+t+" H263z");case"\u23aa":return B("M384 0 H504 V"+t+" H384z");case"\u23d0":return B("M312 0 H355 V"+t+" H312z");case"\u2016":return B("M257 0 H300 V"+t+" H257z")+B("M478 0 H521 V"+t+" H478z");default:return""}}(e,Math.round(1e3*t))),s=new _([o],{width:O(n),height:O(t),style:"width:"+O(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),i=We([],[s],r);return i.height=t,i.style.height=O(t),i.style.width=O(n),{type:"elem",elem:i}},Ir={type:"kern",size:-.008},Rr=new Set(["|","\\lvert","\\rvert","\\vert"]),Er=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),Hr=function(e,t,r,n,o,s){let i,l,a,c,h="",m=0;i=a=c=e,l=null;let u="Size1-Regular";"\\uparrow"===e?a=c="\u23d0":"\\Uparrow"===e?a=c="\u2016":"\\downarrow"===e?i=a="\u23d0":"\\Downarrow"===e?i=a="\u2016":"\\updownarrow"===e?(i="\\uparrow",a="\u23d0",c="\\downarrow"):"\\Updownarrow"===e?(i="\\Uparrow",a="\u2016",c="\\Downarrow"):Rr.has(e)?(a="\u2223",h="vert",m=333):Er.has(e)?(a="\u2225",h="doublevert",m=556):"["===e||"\\lbrack"===e?(i="\u23a1",a="\u23a2",c="\u23a3",u="Size4-Regular",h="lbrack",m=667):"]"===e||"\\rbrack"===e?(i="\u23a4",a="\u23a5",c="\u23a6",u="Size4-Regular",h="rbrack",m=667):"\\lfloor"===e||"\u230a"===e?(a=i="\u23a2",c="\u23a3",u="Size4-Regular",h="lfloor",m=667):"\\lceil"===e||"\u2308"===e?(i="\u23a1",a=c="\u23a2",u="Size4-Regular",h="lceil",m=667):"\\rfloor"===e||"\u230b"===e?(a=i="\u23a5",c="\u23a6",u="Size4-Regular",h="rfloor",m=667):"\\rceil"===e||"\u2309"===e?(i="\u23a4",a=c="\u23a5",u="Size4-Regular",h="rceil",m=667):"("===e||"\\lparen"===e?(i="\u239b",a="\u239c",c="\u239d",u="Size4-Regular",h="lparen",m=875):")"===e||"\\rparen"===e?(i="\u239e",a="\u239f",c="\u23a0",u="Size4-Regular",h="rparen",m=875):"\\{"===e||"\\lbrace"===e?(i="\u23a7",l="\u23a8",c="\u23a9",a="\u23aa",u="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(i="\u23ab",l="\u23ac",c="\u23ad",a="\u23aa",u="Size4-Regular"):"\\lgroup"===e||"\u27ee"===e?(i="\u23a7",c="\u23a9",a="\u23aa",u="Size4-Regular"):"\\rgroup"===e||"\u27ef"===e?(i="\u23ab",c="\u23ad",a="\u23aa",u="Size4-Regular"):"\\lmoustache"===e||"\u23b0"===e?(i="\u23a7",c="\u23ad",a="\u23aa",u="Size4-Regular"):"\\rmoustache"!==e&&"\u23b1"!==e||(i="\u23ab",c="\u23a9",a="\u23aa",u="Size4-Regular");const p=Mr(i,u,o),d=p.height+p.depth,g=Mr(a,u,o),f=g.height+g.depth,b=Mr(c,u,o),y=b.height+b.depth;let x=0,w=1;if(null!==l){const e=Mr(l,u,o);x=e.height+e.depth,w=2}const v=d+y+x,k=v+Math.max(0,Math.ceil((t-v)/(w*f)))*w*f;let z=n.fontMetrics().axisHeight;r&&(z*=n.sizeMultiplier);const M=k/2-z,A=[];if(h.length>0){const e=k-d-y,t=Math.round(1e3*k),r=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 v84 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 v84 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(h,Math.round(1e3*e)),o=new $(h,r),s=O(m/1e3),i=O(t/1e3),l=new _([o],{width:s,height:i,viewBox:"0 0 "+m+" "+t}),a=We([],[l],n);a.height=t/1e3,a.style.width=s,a.style.height=i,A.push({type:"elem",elem:a})}else{if(A.push(Cr(c,u,o)),A.push(Ir),null===l){const e=k-d-y+.016;A.push(qr(a,e,n))}else{const e=(k-d-y-x)/2+.016;A.push(qr(a,e,n)),A.push(Ir),A.push(Cr(l,u,o)),A.push(Ir),A.push(qr(a,e,n))}A.push(Ir),A.push(Cr(i,u,o))}const T=n.havingBaseStyle(S.TEXT),B=Ke({positionType:"bottom",positionData:M,children:A});return Ar(je(["delimsizing","mult"],[B],T),S.TEXT,n,s)},Nr=.08,Or=function(e,t,r,n,o){const s=function(e,t,r){t*=1e3;let n="";switch(e){case"sqrtMain":n=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,C);break;case"sqrtSize1":n=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,C);break;case"sqrtSize2":n=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,C);break;case"sqrtSize3":n=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,C);break;case"sqrtSize4":n=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,C);break;case"sqrtTall":n=function(e,t,r){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(r-54-t-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t,C,r)}return n}(e,n,r),i=new $(e,s),l=new _([i],{width:"400em",height:O(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return We(["hide-tail"],[l],o)},Dr=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","\\surd"]),Lr=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1"]),Pr=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Fr=[0,1.2,1.8,2.4,3],Vr=function(e,t,r,o,s){if("<"===e||"\\lt"===e||"\u27e8"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"\u27e9"!==e||(e="\\rangle"),Dr.has(e)||Pr.has(e))return Br(e,t,!1,r,o,s);if(Lr.has(e))return Hr(e,Fr[t],!1,r,o,s);throw new n("Illegal delimiter: '"+e+"'")},Gr=[{type:"small",style:S.SCRIPTSCRIPT},{type:"small",style:S.SCRIPT},{type:"small",style:S.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Ur=[{type:"small",style:S.SCRIPTSCRIPT},{type:"small",style:S.SCRIPT},{type:"small",style:S.TEXT},{type:"stack"}],Xr=[{type:"small",style:S.SCRIPTSCRIPT},{type:"small",style:S.SCRIPT},{type:"small",style:S.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Yr=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";{const t=e.type;throw new Error("Add support for delim type '"+t+"' here.")}},jr=function(e,t,r,n){for(let o=Math.min(2,3-n.style.size);o<r.length;o++){const s=r[o];if("stack"===s.type)break;const i=Mr(e,Yr(s),"math");let l=i.height+i.depth;if("small"===s.type){l*=n.havingBaseStyle(s.style).sizeMultiplier}if(l>t)return s}return r[r.length-1]},Wr=function(e,t,r,n,o,s){let i;"<"===e||"\\lt"===e||"\u27e8"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"\u27e9"!==e||(e="\\rangle"),i=Pr.has(e)?Gr:Dr.has(e)?Xr:Ur;const l=jr(e,t,i,n);return"small"===l.type?function(e,t,r,n,o,s){const i=Fe(e,"Main-Regular",o,n),l=Ar(i,t,n,s);return r&&Tr(l,n,t),l}(e,l.style,r,n,o,s):"large"===l.type?Br(e,l.size,r,n,o,s):Hr(e,t,r,n,o,s)},_r=function(e,t,r,n,o,s){const i=n.fontMetrics().axisHeight*n.sizeMultiplier,l=5/n.fontMetrics().ptPerEm,a=Math.max(t-i,r+i),c=Math.max(a/500*901,2*a-l);return Wr(e,c,!0,n,o,s)},$r={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Zr=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27e8","\\rangle","\u27e9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function Kr(e){return"isMiddle"in e}function Jr(e,t){const r=ir(e);if(r&&Zr.has(r.text))return r;throw new n(r?"Invalid delimiter '"+r.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function Qr(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}mt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{const r=Jr(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:$r[e.funcName].size,mclass:$r[e.funcName].mclass,delim:r.text}},htmlBuilder:(e,t)=>"."===e.delim?je([e.mclass]):Vr(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{const t=[];"."!==e.delim&&t.push(Ht(e.delim,e.mode));const r=new Ct("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");const n=O(Fr[e.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}}),mt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{const r=e.parser.gullet.macros.get("\\current@color");if(r&&"string"!=typeof r)throw new n("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Jr(t[0],e).text,color:r}}}),mt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{const r=Jr(t[0],e),n=e.parser;++n.leftrightDepth;const o=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);const s=or(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:o,left:r.text,right:s.delim,rightColor:s.color}},htmlBuilder:(e,t)=>{Qr(e);const r=xt(e.body,t,!0,["mopen","mclose"]);let n,o,s=0,i=0,l=!1;for(let e=0;e<r.length;e++){Kr(r[e])?l=!0:(s=Math.max(r[e].height,s),i=Math.max(r[e].depth,i))}if(s*=t.sizeMultiplier,i*=t.sizeMultiplier,n="."===e.left?St(t,["mopen"]):_r(e.left,s,i,t,e.mode,["mopen"]),r.unshift(n),l)for(let t=1;t<r.length;t++){const n=r[t];if(Kr(n)){const o=n.isMiddle;r[t]=_r(o.delim,s,i,o.options,e.mode,[])}}if("."===e.right)o=St(t,["mclose"]);else{const r=e.rightColor?t.withColor(e.rightColor):t;o=_r(e.right,s,i,r,e.mode,["mclose"])}return r.push(o),je(["minner"],r,t)},mathmlBuilder:(e,t)=>{Qr(e);const r=Pt(e.body,t);if("."!==e.left){const t=new Ct("mo",[Ht(e.left,e.mode)]);t.setAttribute("fence","true"),r.unshift(t)}if("."!==e.right){const t=new Ct("mo",[Ht(e.right,e.mode)]);t.setAttribute("fence","true"),e.rightColor&&t.setAttribute("mathcolor",e.rightColor),r.push(t)}return Nt(r)}}),mt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{const r=Jr(t[0],e);if(!e.parser.leftrightDepth)throw new n("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:(e,t)=>{let r;return"."===e.delim?r=St(t,[]):(r=Vr(e.delim,1,t,e.mode,[]),r.isMiddle={delim:e.delim,options:t}),r},mathmlBuilder:(e,t)=>{const r="\\vert"===e.delim||"|"===e.delim?Ht("|","text"):Ht(e.delim,e.mode),n=new Ct("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});const en=(e,t)=>{const r=Ze(Mt(e.body,t),t),n=e.label.slice(1);let o,s,i=t.sizeMultiplier;const l=m(e.body);if("sout"===n)o=je(["stretchy","sout"]),o.height=t.fontMetrics().defaultRuleThickness/i,s=-.5*t.fontMetrics().xHeight;else if("phase"===n){const e=N({number:.6,unit:"pt"},t),n=N({number:.35,unit:"ex"},t);i/=t.havingBaseSizing().sizeMultiplier;const l=r.height+r.depth+e+n;r.style.paddingLeft=O(l/2+e);const c=Math.floor(1e3*l*i),h="M400000 "+(a=c)+" H0 L"+a/2+" 0 l65 45 L145 "+(a-80)+" H400000z",m=new _([new $("phase",h)],{width:"400em",height:O(c/1e3),viewBox:"0 0 400000 "+c,preserveAspectRatio:"xMinYMin slice"});o=We(["hide-tail"],[m],t),o.style.height=O(l),s=r.depth+e+n}else{let i,a;/cancel/.test(n)?l||r.classes.push("cancel-pad"):"angl"===n?r.classes.push("anglpad"):r.classes.push("boxpad");let c=0;/box/.test(n)?(c=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),i=t.fontMetrics().fboxsep+("colorbox"===n?0:c),a=i):"angl"===n?(c=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),i=4*c,a=Math.max(0,.25-r.depth)):(i=l?.2:0,a=i),o=function(e,t,r,n,o){let s;const i=e.height+e.depth+r+n;if(/fbox|color|angl/.test(t)){if(s=je(["stretchy",t],[],o),"fbox"===t){const e=o.color&&o.getColor();e&&(s.style.borderColor=e)}}else{const e=[];/^[bx]cancel$/.test(t)&&e.push(new Z({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&e.push(new Z({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));const r=new _(e,{width:"100%",height:O(i)});s=We([],[r],o)}return s.height=i,s.style.height=O(i),s}(r,n,i,a,t),/fbox|boxed|fcolorbox/.test(n)?(o.style.borderStyle="solid",o.style.borderWidth=O(c)):"angl"===n&&.049!==c&&(o.style.borderTopWidth=O(c),o.style.borderRightWidth=O(c)),s=r.depth+a,e.backgroundColor&&(o.style.backgroundColor=e.backgroundColor,e.borderColor&&(o.style.borderColor=e.borderColor))}var a;let c;if(e.backgroundColor)c=Ke({positionType:"individualShift",children:[{type:"elem",elem:o,shift:s},{type:"elem",elem:r,shift:0}]});else{const e=/cancel|phase/.test(n)?["svg-align"]:[];c=Ke({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:o,shift:s,wrapperClasses:e}]})}return/cancel/.test(n)&&(c.height=r.height,c.depth=r.depth),/cancel/.test(n)&&!l?je(["mord","cancel-lap"],[c],t):je(["mord"],[c],t)},tn=(e,t)=>{let r;const n=new Ct(e.label.includes("colorbox")?"mpadded":"menclose",[Vt(e.body,t)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),"\\fcolorbox"===e.label){const r=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);n.setAttribute("style","border: "+O(r)+" solid "+e.borderColor)}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};mt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,t,r){let{parser:n,funcName:o}=e;const s=or(t[0],"color-token").color,i=t[1];return{type:"enclose",mode:n.mode,label:o,backgroundColor:s,body:i}},htmlBuilder:en,mathmlBuilder:tn}),mt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,t,r){let{parser:n,funcName:o}=e;const s=or(t[0],"color-token").color,i=or(t[1],"color-token").color,l=t[2];return{type:"enclose",mode:n.mode,label:o,backgroundColor:i,borderColor:s,body:l}},htmlBuilder:en,mathmlBuilder:tn}),mt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){let{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\fbox",body:t[0]}}}),mt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,t){let{parser:r,funcName:n}=e;const o=t[0];return{type:"enclose",mode:r.mode,label:n,body:o}},htmlBuilder:en,mathmlBuilder:tn}),mt({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,t){let{parser:r,funcName:n}=e;"math"===r.mode&&r.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");const o=t[0];return{type:"enclose",mode:r.mode,label:n,body:o}},htmlBuilder:en,mathmlBuilder:tn}),mt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){let{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\angl",body:t[0]}}});const rn={};function nn(e){let{type:t,names:r,props:n,handler:o,htmlBuilder:s,mathmlBuilder:i}=e;const l={type:t,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:o};for(let e=0;e<r.length;++e)rn[r[e]]=l;s&&(ct[t]=s),i&&(ht[t]=i)}const on={};function sn(e,t){on[e]=t}class ln{constructor(e,t,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=r}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new ln(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class an{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new an(t,ln.range(this,e))}}function cn(e){const t=[];e.consumeSpaces();let r=e.fetch().text;for("\\relax"===r&&(e.consume(),e.consumeSpaces(),r=e.fetch().text);"\\hline"===r||"\\hdashline"===r;)e.consume(),t.push("\\hdashline"===r),e.consumeSpaces(),r=e.fetch().text;return t}const hn=e=>{if(!e.parser.settings.displayMode)throw new n("{"+e.envName+"} can be used only in display mode.")},mn=new Set(["gather","gather*"]);function un(e){if(!e.includes("ed"))return!e.includes("*")}function pn(e,t,r){let{hskipBeforeAndAfter:o,addJot:s,cols:i,arraystretch:l,colSeparationType:a,autoTag:c,singleRow:h,emptySingleRow:m,maxNumCols:u,leqno:p}=t;if(e.gullet.beginGroup(),h||e.gullet.macros.set("\\cr","\\\\\\relax"),!l){const t=e.gullet.expandMacroAsText("\\arraystretch");if(null==t)l=1;else if(l=parseFloat(t),!l||l<0)throw new n("Invalid \\arraystretch: "+t)}e.gullet.beginGroup();let d=[];const g=[d],f=[],b=[],y=null!=c?[]:void 0;function x(){c&&e.gullet.macros.set("\\@eqnsw","1",!0)}function w(){y&&(e.gullet.macros.get("\\df@tag")?(y.push(e.subparse([new an("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):y.push(Boolean(c)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(x(),b.push(cn(e));;){const t=e.parseExpression(!1,h?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();let o={type:"ordgroup",mode:e.mode,body:t};r&&(o={type:"styling",mode:e.mode,style:r,resetFont:!0,body:[o]}),d.push(o);const s=e.fetch().text;if("&"===s){if(u&&d.length===u){if(h||a)throw new n("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===s){w(),1===d.length&&"styling"===o.type&&1===o.body.length&&"ordgroup"===o.body[0].type&&0===o.body[0].body.length&&(g.length>1||!m)&&g.pop(),b.length<g.length+1&&b.push([]);break}if("\\\\"!==s)throw new n("Expected & or \\\\ or \\cr or \\end",e.nextToken);{let t;e.consume()," "!==e.gullet.future().text&&(t=e.parseSizeGroup(!0)),f.push(t?t.value:null),w(),b.push(cn(e)),d=[],g.push(d),x()}}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:s,arraystretch:l,body:g,cols:i,rowGaps:f,hskipBeforeAndAfter:o,hLinesBeforeRow:b,colSeparationType:a,tags:y,leqno:p}}function dn(e){return"d"===e.slice(0,1)?"display":"text"}const gn=function(e,t){let r,o;const s=e.body.length,i=e.hLinesBeforeRow;let l=0;const a=new Array(s),c=[],h=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),m=1/t.fontMetrics().ptPerEm;let u=5*m;if(e.colSeparationType&&"small"===e.colSeparationType){u=t.havingStyle(S.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778}const p="CD"===e.colSeparationType?N({number:3,unit:"ex"},t):12*m,d=3*m,g=e.arraystretch*p,f=.7*g,b=.3*g;let y=0;function x(e){for(let t=0;t<e.length;++t)t>0&&(y+=.25),c.push({pos:y,isDashed:e[t]})}for(x(i[0]),r=0;r<e.body.length;++r){const n=e.body[r];let s=f,c=b;l<n.length&&(l=n.length);const h={cells:new Array(n.length),height:0,depth:0,pos:0};for(o=0;o<n.length;++o){const e=Mt(n[o],t);c<e.depth&&(c=e.depth),s<e.height&&(s=e.height),h.cells[o]=e}const m=e.rowGaps[r];let u=0;m&&(u=N(m,t),u>0&&(u+=b,c<u&&(c=u),u=0)),e.addJot&&r<e.body.length-1&&(c+=d),h.height=s,h.depth=c,y+=s,h.pos=y,y+=c+u,a[r]=h,x(i[r+1])}const w=y/2+t.fontMetrics().axisHeight,v=e.cols||[],k=[];let z,M;const A=[];if(e.tags&&e.tags.some(e=>e))for(r=0;r<s;++r){const n=a[r],o=n.pos-w,s=e.tags[r];let i;i=!0===s?je(["eqn-num"],[],t):je([],!1===s?[]:xt(s,t,!0),t),i.depth=n.depth,i.height=n.height,A.push({type:"elem",elem:i,shift:o})}for(o=0,M=0;o<l||M<v.length;++o,++M){var T;let i,c=v[M],m=!0;for(;"separator"===(null==(B=c)?void 0:B.type);){var B;if(m||(z=je(["arraycolsep"],[]),z.style.width=O(t.fontMetrics().doubleRuleSep),k.push(z)),"|"!==c.separator&&":"!==c.separator)throw new n("Invalid separator type: "+c.separator);{const e="|"===c.separator?"solid":"dashed",r=je(["vertical-separator"],[],t);r.style.height=O(y),r.style.borderRightWidth=O(h),r.style.borderRightStyle=e,r.style.margin="0 "+O(-h/2);const n=y-w;n&&(r.style.verticalAlign=O(-n)),k.push(r)}M++,c=v[M],m=!1}if(o>=l)continue;var C,q;if(o>0||e.hskipBeforeAndAfter)i=null!=(C=null==(q=c)?void 0:q.pregap)?C:u,0!==i&&(z=je(["arraycolsep"],[]),z.style.width=O(i),k.push(z));const p=[];for(r=0;r<s;++r){const e=a[r],t=e.cells[o];if(!t)continue;const n=e.pos-w;t.depth=e.depth,t.height=e.height,p.push({type:"elem",elem:t,shift:n})}const d=Ke({positionType:"individualShift",children:p}),g=je(["col-align-"+((null==(T=c)?void 0:T.align)||"c")],[d]);var I,R;if(k.push(g),o<l-1||e.hskipBeforeAndAfter)i=null!=(I=null==(R=c)?void 0:R.postgap)?I:u,0!==i&&(z=je(["arraycolsep"],[]),z.style.width=O(i),k.push(z))}let E=je(["mtable"],k);if(c.length>0){const e=_e("hline",t,h),r=_e("hdashline",t,h),n=[{type:"elem",elem:E,shift:0}];for(;c.length>0;){const t=c.pop(),o=t.pos-w;t.isDashed?n.push({type:"elem",elem:r,shift:o}):n.push({type:"elem",elem:e,shift:o})}E=Ke({positionType:"individualShift",children:n})}if(0===A.length)return je(["mord"],[E],t);{const e=Ke({positionType:"individualShift",children:A}),r=je(["tag"],[e],t);return $e([E,r])}},fn={c:"center ",l:"left ",r:"right "},bn=function(e,t){const r=[],n=new Ct("mtd",[],["mtr-glue"]),o=new Ct("mtd",[],["mml-eqn-num"]);for(let s=0;s<e.body.length;s++){const i=e.body[s],l=[];for(let e=0;e<i.length;e++)l.push(new Ct("mtd",[Vt(i[e],t)]));e.tags&&e.tags[s]&&(l.unshift(n),l.push(n),e.leqno?l.unshift(o):l.push(o)),r.push(new Ct("mtr",l))}let s=new Ct("mtable",r);const i=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0);s.setAttribute("rowspacing",O(i));let l="",a="";if(e.cols&&e.cols.length>0){const t=e.cols;let r="",n=!1,o=0,i=t.length;"separator"===t[0].type&&(l+="top ",o=1),"separator"===t[t.length-1].type&&(l+="bottom ",i-=1);for(let e=o;e<i;e++){const o=t[e];"align"===o.type?(a+=fn[o.align],n&&(r+="none "),n=!0):"separator"===o.type&&n&&(r+="|"===o.separator?"solid ":"dashed ",n=!1)}s.setAttribute("columnalign",a.trim()),/[sd]/.test(r)&&s.setAttribute("columnlines",r.trim())}if("align"===e.colSeparationType){const t=e.cols||[];let r="";for(let e=1;e<t.length;e++)r+=e%2?"0em ":"1em ";s.setAttribute("columnspacing",r.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?s.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?s.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?s.setAttribute("columnspacing","0.5em"):s.setAttribute("columnspacing","1em");let c="";const h=e.hLinesBeforeRow;l+=h[0].length>0?"left ":"",l+=h[h.length-1].length>0?"right ":"";for(let e=1;e<h.length-1;e++)c+=0===h[e].length?"none ":h[e][0]?"dashed ":"solid ";return/[sd]/.test(c)&&s.setAttribute("rowlines",c.trim()),""!==l&&(s=new Ct("menclose",[s]),s.setAttribute("notation",l.trim())),e.arraystretch&&e.arraystretch<1&&(s=new Ct("mstyle",[s]),s.setAttribute("scriptlevel","1")),s},yn=function(e,t){e.envName.includes("ed")||hn(e);const r=[],o=e.envName.includes("at")?"alignat":"align",s="split"===e.envName,i=pn(e.parser,{cols:r,addJot:!0,autoTag:s?void 0:un(e.envName),emptySingleRow:!0,colSeparationType:o,maxNumCols:s?2:void 0,leqno:e.parser.settings.leqno},"display");let l=0,a=0;const c={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){let e="";for(let r=0;r<t[0].body.length;r++){e+=or(t[0].body[r],"textord").text}l=Number(e),a=2*l}const h=!a;i.body.forEach(function(e){for(let t=1;t<e.length;t+=2){const r=or(e[t],"styling");or(r.body[0],"ordgroup").body.unshift(c)}if(h)a<e.length&&(a=e.length);else{const t=e.length/2;if(l<t)throw new n("Too many math in a row: expected "+l+", but got "+t,e[0])}});for(let e=0;e<a;++e){let t="r",n=0;e%2==1?t="l":e>0&&h&&(n=1),r[e]={type:"align",align:t,pregap:n,postgap:0}}return i.colSeparationType=h?"align":"alignat",i};nn({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){const r=(ir(t[0])?[t[0]]:or(t[0],"ordgroup").body).map(function(e){const t=sr(e).text;if("lcr".includes(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new n("Unknown column alignment: "+t,e)}),o={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return pn(e.parser,o,dn(e.envName))},htmlBuilder:gn,mathmlBuilder:bn}),nn({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){const t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")];let r="c";const o={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===e.envName.charAt(e.envName.length-1)){const t=e.parser;if(t.consumeSpaces(),"["===t.fetch().text){if(t.consume(),t.consumeSpaces(),r=t.fetch().text,!"lcr".includes(r))throw new n("Expected l or c or r",t.nextToken);t.consume(),t.consumeSpaces(),t.expect("]"),t.consume(),o.cols=[{type:"align",align:r}]}}const s=pn(e.parser,o,dn(e.envName)),i=Math.max(0,...s.body.map(e=>e.length));return s.cols=new Array(i).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[s],left:t[0],right:t[1],rightColor:void 0}:s},htmlBuilder:gn,mathmlBuilder:bn}),nn({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){const t=pn(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:gn,mathmlBuilder:bn}),nn({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){const r=(ir(t[0])?[t[0]]:or(t[0],"ordgroup").body).map(function(e){const t=sr(e).text;if("lc".includes(t))return{type:"align",align:t};throw new n("Unknown column alignment: "+t,e)});if(r.length>1)throw new n("{subarray} can contain only one column");const o={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5},s=pn(e.parser,o,"script");if(s.body.length>0&&s.body[0].length>1)throw new n("{subarray} can contain only one column");return s},htmlBuilder:gn,mathmlBuilder:bn}),nn({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){const t=pn(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},dn(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:gn,mathmlBuilder:bn}),nn({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:yn,htmlBuilder:gn,mathmlBuilder:bn}),nn({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){mn.has(e.envName)&&hn(e);const t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:un(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return pn(e.parser,t,"display")},htmlBuilder:gn,mathmlBuilder:bn}),nn({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:yn,htmlBuilder:gn,mathmlBuilder:bn}),nn({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){hn(e);const t={autoTag:un(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return pn(e.parser,t,"display")},htmlBuilder:gn,mathmlBuilder:bn}),nn({type:"array",names:["CD"],props:{numArgs:0},handler(e){return hn(e),function(e){const t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();const r=e.fetch().text;if("&"!==r&&"\\\\"!==r){if("\\end"===r){0===t[t.length-1].length&&t.pop();break}throw new n("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}let r=[];const o=[r];for(let s=0;s<t.length;s++){const i=t[s];let l=fr();for(let t=0;t<i.length;t++)if(br(i[t])){r.push(l),t+=1;const o=sr(i[t]).text,s=new Array(2);if(s[0]={type:"ordgroup",mode:"math",body:[]},s[1]={type:"ordgroup",mode:"math",body:[]},"=|.".includes(o));else{if(!"<>AV".includes(o))throw new n('Expected one of "<>AV=|." after @',i[t]);for(let e=0;e<2;e++){let r=!0;for(let l=t+1;l<i.length;l++){if(yr(i[l],o)){r=!1,t=l;break}if(br(i[l]))throw new n("Missing a "+o+" character to complete a CD arrow.",i[l]);s[e].body.push(i[l])}if(r)throw new n("Missing a "+o+" character to complete a CD arrow.",i[t])}}const a={type:"styling",body:[xr(o,s,e)],mode:"math",style:"display",resetFont:!0};r.push(a),l=fr()}else l.body.push(i[t]);s%2==0?r.push(l):r.shift(),r=[],o.push(r)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:o,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(o[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(o.length+1).fill([])}}(e.parser)},htmlBuilder:gn,mathmlBuilder:bn}),sn("\\nonumber","\\gdef\\@eqnsw{0}"),sn("\\notag","\\nonumber"),mt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new n(e.funcName+" valid only within array environment")}});var xn=rn;mt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){let{parser:r,funcName:o}=e;const s=t[0];if("ordgroup"!==s.type)throw new n("Invalid environment name",s);let i="";for(let e=0;e<s.body.length;++e)i+=or(s.body[e],"textord").text;if("\\begin"===o){if(!xn.hasOwnProperty(i))throw new n("No such environment: "+i,s);const e=xn[i],{args:t,optArgs:o}=r.parseArguments("\\begin{"+i+"}",e),l={mode:r.mode,envName:i,parser:r},a=e.handler(l,t,o);r.expect("\\end",!1);const c=r.nextToken,h=or(r.parseFunction(),"environment");if(h.name!==i)throw new n("Mismatch: \\begin{"+i+"} matched by \\end{"+h.name+"}",c);return a}return{type:"environment",mode:r.mode,name:i,nameGroup:s}}});const wn=(e,t)=>{const r=e.font,n=t.withFont(r);return Mt(e.body,n)},vn=(e,t)=>{const r=e.font,n=t.withFont(r);return Vt(e.body,n)},kn={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};mt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{let{parser:r,funcName:n}=e;const o=pt(t[0]);let s=n;return s in kn&&(s=kn[s]),{type:"font",mode:r.mode,font:s.slice(1),body:o}},htmlBuilder:wn,mathmlBuilder:vn}),mt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{let{parser:r}=e;const n=t[0];return{type:"mclass",mode:r.mode,mclass:dr(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:m(n)}}}),mt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{let{parser:r,funcName:n,breakOnTokenText:o}=e;const{mode:s}=r,i=r.parseExpression(!0,o);return{type:"font",mode:s,font:"math"+n.slice(1),body:{type:"ordgroup",mode:r.mode,body:i}}},htmlBuilder:wn,mathmlBuilder:vn});const zn=(e,t)=>{if(!t)return e;return{type:"styling",mode:e.mode,style:t,body:[e]}};mt({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{let{parser:r,funcName:n}=e;const o=t[0],s=t[1];let i,l=null,a=null;switch(n){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":i=!0;break;case"\\\\atopfrac":i=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":i=!1,l="(",a=")";break;case"\\\\bracefrac":i=!1,l="\\{",a="\\}";break;case"\\\\brackfrac":i=!1,l="[",a="]";break;default:throw new Error("Unrecognized genfrac command")}const c="\\cfrac"===n;let h=null;return c||n.startsWith("\\d")?h="display":n.startsWith("\\t")&&(h="text"),zn({type:"genfrac",mode:r.mode,numer:o,denom:s,continued:c,hasBarLine:i,leftDelim:l,rightDelim:a,barSize:null},h)},htmlBuilder:(e,t)=>{const r=t.style,n=r.fracNum(),o=r.fracDen();let s;s=t.havingStyle(n);const i=Mt(e.numer,s,t);if(e.continued){const e=8.5/t.fontMetrics().ptPerEm,r=3.5/t.fontMetrics().ptPerEm;i.height=i.height<e?e:i.height,i.depth=i.depth<r?r:i.depth}s=t.havingStyle(o);const l=Mt(e.denom,s,t);let a,c,h,m,u,p,d,g,f,b;if(e.hasBarLine?(e.barSize?(c=N(e.barSize,t),a=_e("frac-line",t,c)):a=_e("frac-line",t),c=a.height,h=a.height):(a=null,c=0,h=t.fontMetrics().defaultRuleThickness),r.size===S.DISPLAY.size?(m=t.fontMetrics().num1,u=c>0?3*h:7*h,p=t.fontMetrics().denom1):(c>0?(m=t.fontMetrics().num2,u=h):(m=t.fontMetrics().num3,u=3*h),p=t.fontMetrics().denom2),a){const e=t.fontMetrics().axisHeight;m-i.depth-(e+.5*c)<u&&(m+=u-(m-i.depth-(e+.5*c))),e-.5*c-(l.height-p)<u&&(p+=u-(e-.5*c-(l.height-p)));d=Ke({positionType:"individualShift",children:[{type:"elem",elem:l,shift:p},{type:"elem",elem:a,shift:-(e-.5*c)},{type:"elem",elem:i,shift:-m}]})}else{const e=m-i.depth-(l.height-p);e<u&&(m+=.5*(u-e),p+=.5*(u-e)),d=Ke({positionType:"individualShift",children:[{type:"elem",elem:l,shift:p},{type:"elem",elem:i,shift:-m}]})}return s=t.havingStyle(r),d.height*=s.sizeMultiplier/t.sizeMultiplier,d.depth*=s.sizeMultiplier/t.sizeMultiplier,g=r.size===S.DISPLAY.size?t.fontMetrics().delim1:r.size===S.SCRIPTSCRIPT.size?t.havingStyle(S.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,f=null==e.leftDelim?St(t,["mopen"]):Wr(e.leftDelim,g,!0,t.havingStyle(r),e.mode,["mopen"]),b=e.continued?je([]):null==e.rightDelim?St(t,["mclose"]):Wr(e.rightDelim,g,!0,t.havingStyle(r),e.mode,["mclose"]),je(["mord"].concat(s.sizingClasses(t)),[f,je(["mfrac"],[d]),b],t)},mathmlBuilder:(e,t)=>{const r=new Ct("mfrac",[Vt(e.numer,t),Vt(e.denom,t)]);if(e.hasBarLine){if(e.barSize){const n=N(e.barSize,t);r.setAttribute("linethickness",O(n))}}else r.setAttribute("linethickness","0px");if(null!=e.leftDelim||null!=e.rightDelim){const t=[];if(null!=e.leftDelim){const r=new Ct("mo",[new qt(e.leftDelim.replace("\\",""))]);r.setAttribute("fence","true"),t.push(r)}if(t.push(r),null!=e.rightDelim){const r=new Ct("mo",[new qt(e.rightDelim.replace("\\",""))]);r.setAttribute("fence","true"),t.push(r)}return Nt(t)}return r}}),mt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){let t,{parser:r,funcName:n,token:o}=e;switch(n){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:r.mode,replaceWith:t,token:o}}});const Sn=["display","text","script","scriptscript"],Mn=function(e){let t=null;return e.length>0&&(t=e,t="."===t?null:t),t};mt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){let{parser:r}=e;const n=t[4],o=t[5],s=pt(t[0]),i="atom"===s.type&&"open"===s.family?Mn(s.text):null,l=pt(t[1]),a="atom"===l.type&&"close"===l.family?Mn(l.text):null,c=or(t[2],"size");let h,m=null;c.isBlank?h=!0:(m=c.value,h=m.number>0);let u=null,p=t[3];if("ordgroup"===p.type){if(p.body.length>0){const e=or(p.body[0],"textord");u=Sn[Number(e.text)]}}else p=or(p,"textord"),u=Sn[Number(p.text)];return zn({type:"genfrac",mode:r.mode,numer:n,denom:o,continued:!1,hasBarLine:h,barSize:m,leftDelim:i,rightDelim:a},u)}}),mt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){let{parser:r,funcName:n,token:o}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:or(t[0],"size").value,token:o}}}),mt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{let{parser:r,funcName:n}=e;const o=t[0],s=or(t[1],"infix").size;if(!s)throw new Error("\\\\abovefrac expected size, but got "+String(s));const i=t[2],l=s.number>0;return{type:"genfrac",mode:r.mode,numer:o,denom:i,continued:!1,hasBarLine:l,barSize:s,leftDelim:null,rightDelim:null}}});const An=(e,t)=>{const r=t.style;let n,o;"supsub"===e.type?(n=e.sup?Mt(e.sup,t.havingStyle(r.sup()),t):Mt(e.sub,t.havingStyle(r.sub()),t),o=or(e.base,"horizBrace")):o=or(e,"horizBrace");const s=Mt(o.base,t.havingBaseStyle(S.DISPLAY)),i=tr(o,t);let l;if(l=o.isOver?Ke({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:i,wrapperClasses:["svg-align"]}]}):Ke({positionType:"bottom",positionData:s.depth+.1+i.height,children:[{type:"elem",elem:i,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:s}]}),n){const e=je(["minner",o.isOver?"mover":"munder"],[l],t);l=o.isOver?Ke({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:.2},{type:"elem",elem:n}]}):Ke({positionType:"bottom",positionData:e.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:e}]})}return je(["minner",o.isOver?"mover":"munder"],[l],t)};mt({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,t){let{parser:r,funcName:n}=e;return{type:"horizBrace",mode:r.mode,label:n,isOver:n.includes("\\over"),base:t[0]}},htmlBuilder:An,mathmlBuilder:(e,t)=>{const r=Jt(e.label);return new Ct(e.isOver?"mover":"munder",[Vt(e.base,t),r])}}),mt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{let{parser:r}=e;const n=t[1],o=or(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:o})?{type:"href",mode:r.mode,href:o,body:dt(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{const r=xt(e.body,t,!1);return function(e,t,r,n){const o=new X(e,t,r,n);return Ye(o),o}(e.href,[],r,t)},mathmlBuilder:(e,t)=>{let r=Ft(e.body,t);return r instanceof Ct||(r=new Ct("mrow",[r])),r.setAttribute("href",e.href),r}}),mt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{let{parser:r}=e;const n=or(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");const o=[];for(let e=0;e<n.length;e++){let t=n[e];"~"===t&&(t="\\textasciitilde"),o.push({type:"textord",mode:"text",text:t})}const s={type:"text",mode:r.mode,font:"\\texttt",body:o};return{type:"href",mode:r.mode,href:n,body:dt(s)}}}),mt({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){let{parser:r}=e;return{type:"hbox",mode:r.mode,body:dt(t[0])}},htmlBuilder(e,t){const r=xt(e.body,t.withFont(""),!1);return $e(r)},mathmlBuilder(e,t){return new Ct("mrow",Pt(e.body,t.withFont("")))}}),mt({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{let{parser:r,funcName:o,token:s}=e;const i=or(t[0],"raw").string,l=t[1];let a;r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");const c={};switch(o){case"\\htmlClass":c.class=i,a={command:"\\htmlClass",class:i};break;case"\\htmlId":c.id=i,a={command:"\\htmlId",id:i};break;case"\\htmlStyle":c.style=i,a={command:"\\htmlStyle",style:i};break;case"\\htmlData":{const e=i.split(",");for(let t=0;t<e.length;t++){const r=e[t],o=r.indexOf("=");if(o<0)throw new n("\\htmlData key/value '"+r+"' missing equals sign");const s=r.slice(0,o),i=r.slice(o+1);c["data-"+s.trim()]=i}a={command:"\\htmlData",attributes:c};break}default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(a)?{type:"html",mode:r.mode,attributes:c,body:dt(l)}:r.formatUnsupportedCmd(o)},htmlBuilder:(e,t)=>{const r=xt(e.body,t,!1),n=["enclosing"];e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/));const o=je(n,r,t);for(const t in e.attributes)"class"!==t&&e.attributes.hasOwnProperty(t)&&o.setAttribute(t,e.attributes[t]);return o},mathmlBuilder:(e,t)=>Ft(e.body,t)}),mt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{let{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:dt(t[0]),mathml:dt(t[1])}},htmlBuilder:(e,t)=>{const r=xt(e.html,t,!1);return $e(r)},mathmlBuilder:(e,t)=>Ft(e.mathml,t)});const Tn=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};{const t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new n("Invalid size: '"+e+"' in \\includegraphics");const r={number:+(t[1]+t[2]),unit:t[3]};if(!H(r))throw new n("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r}};mt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{let{parser:o}=e,s={number:0,unit:"em"},i={number:.9,unit:"em"},l={number:0,unit:"em"},a="";if(r[0]){const e=or(r[0],"raw").string.split(",");for(let t=0;t<e.length;t++){const r=e[t].split("=");if(2===r.length){const e=r[1].trim();switch(r[0].trim()){case"alt":a=e;break;case"width":s=Tn(e);break;case"height":i=Tn(e);break;case"totalheight":l=Tn(e);break;default:throw new n("Invalid key: '"+r[0]+"' in \\includegraphics.")}}}}const c=or(t[0],"url").url;return""===a&&(a=c,a=a.replace(/^.*[\\/]/,""),a=a.substring(0,a.lastIndexOf("."))),o.settings.isTrusted({command:"\\includegraphics",url:c})?{type:"includegraphics",mode:o.mode,alt:a,width:s,height:i,totalheight:l,src:c}:o.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{const r=N(e.height,t);let n=0;e.totalheight.number>0&&(n=N(e.totalheight,t)-r);let o=0;e.width.number>0&&(o=N(e.width,t));const s={height:O(r+n)};o>0&&(s.width=O(o)),n>0&&(s.verticalAlign=O(-n));const i=new Y(e.src,e.alt,s);return i.height=r,i.depth=n,i},mathmlBuilder:(e,t)=>{const r=new Ct("mglyph",[]);r.setAttribute("alt",e.alt);const n=N(e.height,t);let o=0;if(e.totalheight.number>0&&(o=N(e.totalheight,t)-n,r.setAttribute("valign",O(-o))),r.setAttribute("height",O(n+o)),e.width.number>0){const n=N(e.width,t);r.setAttribute("width",O(n))}return r.setAttribute("src",e.src),r}}),mt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){let{parser:r,funcName:n}=e;const o=or(t[0],"size");if(r.settings.strict){const e="m"===n[1],t="mu"===o.value.unit;e?(t||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, not "+o.value.unit+" units"),"math"!==r.mode&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):t&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:o.value}},htmlBuilder(e,t){return Je(e.dimension,t)},mathmlBuilder(e,t){const r=N(e.dimension,t);return new It(r)}}),mt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{let{parser:r,funcName:n}=e;const o=t[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:o}},htmlBuilder:(e,t)=>{let r;"clap"===e.alignment?(r=je([],[Mt(e.body,t)]),r=je(["inner"],[r],t)):r=je(["inner"],[Mt(e.body,t)]);const n=je(["fix"],[]);let o=je([e.alignment],[r,n],t);const s=je(["strut"]);return s.style.height=O(o.height+o.depth),o.depth&&(s.style.verticalAlign=O(-o.depth)),o.children.unshift(s),o=je(["thinbox"],[o],t),je(["mord","vbox"],[o],t)},mathmlBuilder:(e,t)=>{const r=new Ct("mpadded",[Vt(e.body,t)]);if("rlap"!==e.alignment){const t="llap"===e.alignment?"-1":"-0.5";r.setAttribute("lspace",t+"width")}return r.setAttribute("width","0px"),r}}),mt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){let{funcName:r,parser:n}=e;const o=n.mode;n.switchMode("math");const s="\\("===r?"\\)":"$",i=n.parseExpression(!1,s);return n.expect(s),n.switchMode(o),{type:"styling",mode:n.mode,style:"text",resetFont:!0,body:i}}}),mt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new n("Mismatched "+e.funcName)}});const Bn=(e,t)=>{switch(t.style.size){case S.DISPLAY.size:return e.display;case S.TEXT.size:return e.text;case S.SCRIPT.size:return e.script;case S.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};mt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{let{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:dt(t[0]),text:dt(t[1]),script:dt(t[2]),scriptscript:dt(t[3])}},htmlBuilder:(e,t)=>{const r=Bn(e,t),n=xt(r,t,!1);return $e(n)},mathmlBuilder:(e,t)=>{const r=Bn(e,t);return Ft(r,t)}});const Cn=(e,t,r,n,o,s,i)=>{e=je([],[e]);const l=r&&m(r);let a,c,h;if(t){const e=Mt(t,n.havingStyle(o.sup()),n);c={elem:e,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-e.depth)}}if(r){const e=Mt(r,n.havingStyle(o.sub()),n);a={elem:e,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-e.height)}}if(c&&a){const t=n.fontMetrics().bigOpSpacing5+a.elem.height+a.elem.depth+a.kern+e.depth+i;h=Ke({positionType:"bottom",positionData:t,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:a.elem,marginLeft:O(-s)},{type:"kern",size:a.kern},{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:O(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else if(a){const t=e.height-i;h=Ke({positionType:"top",positionData:t,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:a.elem,marginLeft:O(-s)},{type:"kern",size:a.kern},{type:"elem",elem:e}]})}else{if(!c)return e;{const t=e.depth+i;h=Ke({positionType:"bottom",positionData:t,children:[{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:O(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}}const u=[h];if(a&&0!==s&&!l){const e=je(["mspace"],[],n);e.style.marginRight=O(s),u.unshift(e)}return je(["mop","op-limits"],u,n)},qn=new Set(["\\smallint"]),In=(e,t)=>{let r,n,o,s=!1;"supsub"===e.type?(r=e.sup,n=e.sub,o=or(e.base,"op"),s=!0):o=or(e,"op");const i=t.style;let l,a,c=!1;if(i.size===S.DISPLAY.size&&o.symbol&&!qn.has(o.name)&&(c=!0),o.symbol){const e=c?"Size2-Regular":"Size1-Regular";let r="";if("\\oiint"!==o.name&&"\\oiiint"!==o.name||(r=o.name.slice(1),o.name="oiint"===r?"\\iint":"\\iiint"),l=Fe(o.name,e,"math",t,["mop","op-symbol",c?"large-op":"small-op"]),a=l.italic,r.length>0){const e=rt(r+"Size"+(c?"2":"1"),t);l=Ke({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:e,shift:c?.08:0}]}),o.name="\\"+r,l.classes.unshift("mop"),l.italic=a}}else if(o.body){const e=xt(o.body,t,!0);1===e.length&&e[0]instanceof W?(l=e[0],l.classes[0]="mop"):l=je(["mop"],e,t)}else{const e=[];for(let r=1;r<o.name.length;r++)e.push(Ve(o.name[r],o.mode,t));l=je(["mop"],e,t)}let h=0,m=0;var u;(l instanceof W||"\\oiint"===o.name||"\\oiiint"===o.name)&&!o.suppressBaseShift&&(h=(l.height-l.depth)/2-t.fontMetrics().axisHeight,m=null!=(u=l.italic)?u:0);return s?Cn(l,r,n,t,i,m,h):(h&&(l.style.position="relative",l.style.top=O(h)),l)},Rn=(e,t)=>{let r;if(e.symbol)r=new Ct("mo",[Ht(e.name,e.mode)]),qn.has(e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new Ct("mo",Pt(e.body,t));else{r=new Ct("mi",[new qt(e.name.slice(1))]);const t=new Ct("mo",[Ht("\u2061","text")]);r=e.parentIsSupSub?new Ct("mrow",[r,t]):Bt([r,t])}return r},En={"\u220f":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22c0":"\\bigwedge","\u22c1":"\\bigvee","\u22c2":"\\bigcap","\u22c3":"\\bigcup","\u2a00":"\\bigodot","\u2a01":"\\bigoplus","\u2a02":"\\bigotimes","\u2a04":"\\biguplus","\u2a06":"\\bigsqcup"};mt({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220f","\u2210","\u2211","\u22c0","\u22c1","\u22c2","\u22c3","\u2a00","\u2a01","\u2a02","\u2a04","\u2a06"],props:{numArgs:0},handler:(e,t)=>{let{parser:r,funcName:n}=e,o=n;return 1===o.length&&(o=En[o]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:o}},htmlBuilder:In,mathmlBuilder:Rn}),mt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{let{parser:r}=e;const n=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:dt(n)}},htmlBuilder:In,mathmlBuilder:Rn});const Hn={"\u222b":"\\int","\u222c":"\\iint","\u222d":"\\iiint","\u222e":"\\oint","\u222f":"\\oiint","\u2230":"\\oiiint"};mt({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){let{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:In,mathmlBuilder:Rn}),mt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){let{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:In,mathmlBuilder:Rn}),mt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222b","\u222c","\u222d","\u222e","\u222f","\u2230"],props:{numArgs:0,allowedInArgument:!0},handler(e){let{parser:t,funcName:r}=e,n=r;return 1===n.length&&(n=Hn[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:In,mathmlBuilder:Rn});const Nn=(e,t)=>{let r,n,o,s,i=!1;if("supsub"===e.type?(r=e.sup,n=e.sub,o=or(e.base,"operatorname"),i=!0):o=or(e,"operatorname"),o.body.length>0){const e=o.body.map(e=>{const t="text"in e?e.text:void 0;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e}),r=xt(e,t.withFont("mathrm"),!0);for(let e=0;e<r.length;e++){const t=r[e];t instanceof W&&(t.text=t.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}s=je(["mop"],r,t)}else s=je(["mop"],[],t);return i?Cn(s,r,n,t,t.style,0,0):s};function On(e,t,r){const n=xt(e,t,!1),o=t.sizeMultiplier/r.sizeMultiplier;for(let e=0;e<n.length;e++){const s=n[e].classes.indexOf("sizing");s<0?Array.prototype.push.apply(n[e].classes,t.sizingClasses(r)):n[e].classes[s+1]==="reset-size"+t.size&&(n[e].classes[s+1]="reset-size"+r.size),n[e].height*=o,n[e].depth*=o}return $e(n)}mt({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{let{parser:r,funcName:n}=e;const o=t[0];return{type:"operatorname",mode:r.mode,body:dt(o),alwaysHandleSupSub:"\\operatornamewithlimits"===n,limits:!1,parentIsSupSub:!1}},htmlBuilder:Nn,mathmlBuilder:(e,t)=>{let r=Pt(e.body,t.withFont("mathrm")),n=!0;for(let e=0;e<r.length;e++){const t=r[e];if(t instanceof It);else if(t instanceof Ct)switch(t.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":{const e=t.children[0];1===t.children.length&&e instanceof qt?e.text=e.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break}default:n=!1}else n=!1}if(n){const e=r.map(e=>e.toText()).join("");r=[new qt(e)]}const o=new Ct("mi",r);o.setAttribute("mathvariant","normal");const s=new Ct("mo",[Ht("\u2061","text")]);return e.parentIsSupSub?new Ct("mrow",[o,s]):Bt([o,s])}}),sn("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),ut({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?$e(xt(e.body,t,!1)):je(["mord"],xt(e.body,t,!0),t)},mathmlBuilder(e,t){return Ft(e.body,t,!0)}}),mt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){let{parser:r}=e;const n=t[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(e,t){const r=Mt(e.body,t.havingCrampedStyle()),n=_e("overline-line",t),o=t.fontMetrics().defaultRuleThickness,s=Ke({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*o},{type:"elem",elem:n},{type:"kern",size:o}]});return je(["mord","overline"],[s],t)},mathmlBuilder(e,t){const r=new Ct("mo",[new qt("\u203e")]);r.setAttribute("stretchy","true");const n=new Ct("mover",[Vt(e.body,t),r]);return n.setAttribute("accent","true"),n}}),mt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{let{parser:r}=e;const n=t[0];return{type:"phantom",mode:r.mode,body:dt(n)}},htmlBuilder:(e,t)=>{const r=xt(e.body,t.withPhantom(),!1);return $e(r)},mathmlBuilder:(e,t)=>{const r=Pt(e.body,t);return new Ct("mphantom",r)}}),sn("\\hphantom","\\smash{\\phantom{#1}}"),mt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{let{parser:r}=e;const n=t[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(e,t)=>{const r=je(["inner"],[Mt(e.body,t.withPhantom())]),n=je(["fix"],[]);return je(["mord","rlap"],[r,n],t)},mathmlBuilder:(e,t)=>{const r=Pt(dt(e.body),t),n=new Ct("mphantom",r),o=new Ct("mpadded",[n]);return o.setAttribute("width","0px"),o}}),mt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){let{parser:r}=e;const n=or(t[0],"size").value,o=t[1];return{type:"raisebox",mode:r.mode,dy:n,body:o}},htmlBuilder(e,t){const r=Mt(e.body,t),n=N(e.dy,t);return Ke({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]})},mathmlBuilder(e,t){const r=new Ct("mpadded",[Vt(e.body,t)]),n=e.dy.number+e.dy.unit;return r.setAttribute("voffset",n),r}}),mt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){let{parser:t}=e;return{type:"internal",mode:t.mode}}}),mt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,r){let{parser:n}=e;const o=r[0],s=or(t[0],"size"),i=or(t[1],"size");return{type:"rule",mode:n.mode,shift:o&&or(o,"size").value,width:s.value,height:i.value}},htmlBuilder(e,t){const r=je(["mord","rule"],[],t),n=N(e.width,t),o=N(e.height,t),s=e.shift?N(e.shift,t):0;return r.style.borderRightWidth=O(n),r.style.borderTopWidth=O(o),r.style.bottom=O(s),r.width=n,r.height=o+s,r.depth=-s,r.maxFontSize=1.125*o*t.sizeMultiplier,r},mathmlBuilder(e,t){const r=N(e.width,t),n=N(e.height,t),o=e.shift?N(e.shift,t):0,s=t.color&&t.getColor()||"black",i=new Ct("mspace");i.setAttribute("mathbackground",s),i.setAttribute("width",O(r)),i.setAttribute("height",O(n));const l=new Ct("mpadded",[i]);return o>=0?l.setAttribute("height",O(o)):(l.setAttribute("height",O(o)),l.setAttribute("depth",O(-o))),l.setAttribute("voffset",O(o)),l}});const Dn=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];mt({type:"sizing",names:Dn,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{let{breakOnTokenText:r,funcName:n,parser:o}=e;const s=o.parseExpression(!1,r);return{type:"sizing",mode:o.mode,size:Dn.indexOf(n)+1,body:s}},htmlBuilder:(e,t)=>{const r=t.havingSize(e.size);return On(e.body,r,t)},mathmlBuilder:(e,t)=>{const r=t.havingSize(e.size),n=Pt(e.body,r),o=new Ct("mstyle",n);return o.setAttribute("mathsize",O(r.sizeMultiplier)),o}}),mt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{let{parser:n}=e,o=!1,s=!1;const i=r[0]&&or(r[0],"ordgroup");if(i){let e;for(let t=0;t<i.body.length;++t){if(e=sr(i.body[t]).text,"t"===e)o=!0;else{if("b"!==e){o=!1,s=!1;break}s=!0}}}else o=!0,s=!0;const l=t[0];return{type:"smash",mode:n.mode,body:l,smashHeight:o,smashDepth:s}},htmlBuilder:(e,t)=>{const r=je([],[Mt(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0),e.smashDepth&&(r.depth=0),e.smashHeight&&e.smashDepth)return je(["mord","smash"],[r],t);if(r.children)for(let t=0;t<r.children.length;t++)e.smashHeight&&(r.children[t].height=0),e.smashDepth&&(r.children[t].depth=0);const n=Ke({positionType:"firstBaseline",children:[{type:"elem",elem:r}]});return je(["mord"],[n],t)},mathmlBuilder:(e,t)=>{const r=new Ct("mpadded",[Vt(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}}),mt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){let{parser:n}=e;const o=r[0],s=t[0];return{type:"sqrt",mode:n.mode,body:s,index:o}},htmlBuilder(e,t){let r=Mt(e.body,t.havingCrampedStyle());0===r.height&&(r.height=t.fontMetrics().xHeight),r=Ze(r,t);const n=t.fontMetrics().defaultRuleThickness;let o=n;t.style.id<S.TEXT.id&&(o=t.fontMetrics().xHeight);let s=n+o/4;const i=r.height+r.depth+s+n,{span:l,ruleWidth:a,advanceWidth:c}=function(e,t){const r=t.havingBaseSizing(),n=jr("\\surd",e*r.sizeMultiplier,Xr,r);let o=r.sizeMultiplier;const s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness);let i,l,a,c,h;return"small"===n.type?(c=1e3+1e3*s+80,e<1?o=1:e<1.4&&(o=.7),l=(1+s+Nr)/o,a=(1+s)/o,i=Or("sqrtMain",l,c,s,t),i.style.minWidth="0.853em",h=.833/o):"large"===n.type?(c=1080*Fr[n.size],a=(Fr[n.size]+s)/o,l=(Fr[n.size]+s+Nr)/o,i=Or("sqrtSize"+n.size,l,c,s,t),i.style.minWidth="1.02em",h=1/o):(l=e+s+Nr,a=e+s,c=Math.floor(1e3*e+s)+80,i=Or("sqrtTall",l,c,s,t),i.style.minWidth="0.742em",h=1.056),i.height=a,i.style.height=O(l),{span:i,advanceWidth:h,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*o}}(i,t),h=l.height-a;h>r.height+r.depth+s&&(s=(s+h-r.height-r.depth)/2);const m=l.height-r.height-s-a;r.style.paddingLeft=O(c);const u=Ke({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+m)},{type:"elem",elem:l},{type:"kern",size:a}]});if(e.index){const r=t.havingStyle(S.SCRIPTSCRIPT),n=Mt(e.index,r,t),o=.6*(u.height-u.depth),s=Ke({positionType:"shift",positionData:-o,children:[{type:"elem",elem:n}]}),i=je(["root"],[s]);return je(["mord","sqrt"],[i,u],t)}return je(["mord","sqrt"],[u],t)},mathmlBuilder(e,t){const{body:r,index:n}=e;return n?new Ct("mroot",[Vt(r,t),Vt(n,t)]):new Ct("msqrt",[Vt(r,t)])}});const Ln={display:S.DISPLAY,text:S.TEXT,script:S.SCRIPT,scriptscript:S.SCRIPTSCRIPT};mt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){let{breakOnTokenText:r,funcName:n,parser:o}=e;const s=o.parseExpression(!0,r),i=n.slice(1,n.length-5);if(!(i in Ln))throw new Error("Unknown style: "+i);return{type:"styling",mode:o.mode,style:i,body:s}},htmlBuilder(e,t){const r=Ln[e.style];let n=t.havingStyle(r);return e.resetFont&&(n=n.withFont("")),On(e.body,n,t)},mathmlBuilder(e,t){const r=Ln[e.style];let n=t.havingStyle(r);e.resetFont&&(n=n.withFont(""));const o=Pt(e.body,n),s=new Ct("mstyle",o),i={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return s.setAttribute("scriptlevel",i[0]),s.setAttribute("displaystyle",i[1]),s}});ut({type:"supsub",htmlBuilder(e,t){const r=function(e,t){const r=e.base;if(r)return"op"===r.type?r.limits&&(t.style.size===S.DISPLAY.size||r.alwaysHandleSupSub)?In:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(t.style.size===S.DISPLAY.size||r.limits)?Nn:null:"accent"===r.type?m(r.base)?ar:null:"horizBrace"===r.type&&!e.sub===r.isOver?An:null;return null}(e,t);if(r)return r(e,t);const{base:n,sup:o,sub:s}=e,i=Mt(n,t);let l,a;const c=t.fontMetrics();let h=0,u=0;const p=n&&m(n);if(o){const e=t.havingStyle(t.style.sup());l=Mt(o,e,t),p||(h=i.height-e.fontMetrics().supDrop*e.sizeMultiplier/t.sizeMultiplier)}if(s){const e=t.havingStyle(t.style.sub());a=Mt(s,e,t),p||(u=i.depth+e.fontMetrics().subDrop*e.sizeMultiplier/t.sizeMultiplier)}let d;d=t.style===S.DISPLAY?c.sup1:t.style.cramped?c.sup3:c.sup2;const g=t.sizeMultiplier,f=O(.5/c.ptPerEm/g);let b,y=null;if(a){const t=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);var x;if(i instanceof W||t)y=O(-(null!=(x=i.italic)?x:0))}if(l&&a){h=Math.max(h,d,l.depth+.25*c.xHeight),u=Math.max(u,c.sub2);const e=4*c.defaultRuleThickness;if(h-l.depth-(a.height-u)<e){u=e-(h-l.depth)+a.height;const t=.8*c.xHeight-(h-l.depth);t>0&&(h+=t,u-=t)}b=Ke({positionType:"individualShift",children:[{type:"elem",elem:a,shift:u,marginRight:f,marginLeft:y},{type:"elem",elem:l,shift:-h,marginRight:f}]})}else if(a){u=Math.max(u,c.sub1,a.height-.8*c.xHeight);b=Ke({positionType:"shift",positionData:u,children:[{type:"elem",elem:a,marginLeft:y,marginRight:f}]})}else{if(!l)throw new Error("supsub must have either sup or sub.");h=Math.max(h,d,l.depth+.25*c.xHeight),b=Ke({positionType:"shift",positionData:-h,children:[{type:"elem",elem:l,marginRight:f}]})}const w=zt(i,"right")||"mord";return je([w],[i,je(["msupsub"],[b])],t)},mathmlBuilder(e,t){let r,n,o=!1;e.base&&"horizBrace"===e.base.type&&(n=!!e.sup,n===e.base.isOver&&(o=!0,r=e.base.isOver)),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);const s=[Vt(e.base,t)];let i;if(e.sub&&s.push(Vt(e.sub,t)),e.sup&&s.push(Vt(e.sup,t)),o)i=r?"mover":"munder";else if(e.sub)if(e.sup){const r=e.base;i=r&&"op"===r.type&&r.limits&&t.style===S.DISPLAY||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(t.style===S.DISPLAY||r.limits)?"munderover":"msubsup"}else{const r=e.base;i=r&&"op"===r.type&&r.limits&&(t.style===S.DISPLAY||r.alwaysHandleSupSub)||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(r.limits||t.style===S.DISPLAY)?"munder":"msub"}else{const r=e.base;i=r&&"op"===r.type&&r.limits&&(t.style===S.DISPLAY||r.alwaysHandleSupSub)||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(r.limits||t.style===S.DISPLAY)?"mover":"msup"}return new Ct(i,s)}}),ut({type:"atom",htmlBuilder(e,t){return Ve(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){const r=new Ct("mo",[Ht(e.text,e.mode)]);if("bin"===e.family){const n=Dt(e,t);"bold-italic"===n&&r.setAttribute("mathvariant",n)}else"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false");return r}});const Pn={mi:"italic",mn:"normal",mtext:"normal"};ut({type:"mathord",htmlBuilder(e,t){return Ge(e,t,"mathord")},mathmlBuilder(e,t){const r=new Ct("mi",[Ht(e.text,e.mode,t)]),n=Dt(e,t)||"italic";return n!==Pn[r.type]&&r.setAttribute("mathvariant",n),r}}),ut({type:"textord",htmlBuilder(e,t){return Ge(e,t,"textord")},mathmlBuilder(e,t){const r=Ht(e.text,e.mode,t),n=Dt(e,t)||"normal";let o;return o="text"===e.mode?new Ct("mtext",[r]):/[0-9]/.test(e.text)?new Ct("mn",[r]):"\\prime"===e.text?new Ct("mo",[r]):new Ct("mi",[r]),n!==Pn[o.type]&&o.setAttribute("mathvariant",n),o}});const Fn={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Vn={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};ut({type:"spacing",htmlBuilder(e,t){if(Vn.hasOwnProperty(e.text)){const r=Vn[e.text].className||"";if("text"===e.mode){const n=Ge(e,t,"textord");return n.classes.push(r),n}return je(["mspace",r],[Ve(e.text,e.mode,t)],t)}if(Fn.hasOwnProperty(e.text))return je(["mspace",Fn[e.text]],[],t);throw new n('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){let r;if(!Vn.hasOwnProperty(e.text)){if(Fn.hasOwnProperty(e.text))return new Ct("mspace");throw new n('Unknown type of space "'+e.text+'"')}return r=new Ct("mtext",[new qt("\xa0")]),r}});const Gn=()=>{const e=new Ct("mtd",[]);return e.setAttribute("width","50%"),e};ut({type:"tag",mathmlBuilder(e,t){const r=new Ct("mtable",[new Ct("mtr",[Gn(),new Ct("mtd",[Ft(e.body,t)]),Gn(),new Ct("mtd",[Ft(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});const Un={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Xn={"\\textbf":"textbf","\\textmd":"textmd"},Yn={"\\textit":"textit","\\textup":"textup"},jn=(e,t)=>{const r=e.font;return r?Un[r]?t.withTextFontFamily(Un[r]):Xn[r]?t.withTextFontWeight(Xn[r]):"\\emph"===r?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(Yn[r]):t};mt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){let{parser:r,funcName:n}=e;const o=t[0];return{type:"text",mode:r.mode,body:dt(o),font:n}},htmlBuilder(e,t){const r=jn(e,t),n=xt(e.body,r,!0);return je(["mord","text"],n,r)},mathmlBuilder(e,t){const r=jn(e,t);return Ft(e.body,r)}}),mt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){let{parser:r}=e;return{type:"underline",mode:r.mode,body:t[0]}},htmlBuilder(e,t){const r=Mt(e.body,t),n=_e("underline-line",t),o=t.fontMetrics().defaultRuleThickness,s=Ke({positionType:"top",positionData:r.height,children:[{type:"kern",size:o},{type:"elem",elem:n},{type:"kern",size:3*o},{type:"elem",elem:r}]});return je(["mord","underline"],[s],t)},mathmlBuilder(e,t){const r=new Ct("mo",[new qt("\u203e")]);r.setAttribute("stretchy","true");const n=new Ct("munder",[Vt(e.body,t),r]);return n.setAttribute("accentunder","true"),n}}),mt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){let{parser:r}=e;return{type:"vcenter",mode:r.mode,body:t[0]}},htmlBuilder(e,t){const r=Mt(e.body,t),n=t.fontMetrics().axisHeight,o=.5*(r.height-n-(r.depth+n));return Ke({positionType:"shift",positionData:o,children:[{type:"elem",elem:r}]})},mathmlBuilder(e,t){const r=new Ct("mpadded",[Vt(e.body,t)],["vcenter"]);return new Ct("mrow",[r])}}),mt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new n("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){const r=Wn(e),n=[],o=t.havingStyle(t.style.text());for(let t=0;t<r.length;t++){let s=r[t];"~"===s&&(s="\\textasciitilde"),n.push(Fe(s,"Typewriter-Regular",e.mode,o,["mord","texttt"]))}return je(["mord","text"].concat(o.sizingClasses(t)),Xe(n),o)},mathmlBuilder(e,t){const r=new qt(Wn(e)),n=new Ct("mtext",[r]);return n.setAttribute("mathvariant","monospace"),n}});const Wn=e=>e.body.replace(/ /g,e.star?"\u2423":"\xa0");var _n=at;const $n="[ \r\n\t]",Zn="(\\\\[a-zA-Z@]+)"+$n+"*",Kn="[\u0300-\u036f]",Jn=new RegExp(Kn+"+$"),Qn="("+$n+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-\u2027\u202a-\ud7ff\uf900-\uffff]"+Kn+"*|[\ud800-\udbff][\udc00-\udfff]"+Kn+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+Zn+"|\\\\[^\ud800-\udfff])";class eo{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(Qn,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){const e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new an("EOF",new ln(this,t,t));const r=this.tokenRegex.exec(e);if(null===r||r.index!==t)throw new n("Unexpected character: '"+e[t]+"'",new an(e[t],new ln(this,t,t+1)));const o=r[6]||r[3]||(r[2]?"\\ ":" ");if(14===this.catcodes[o]){const t=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===t?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=t+1,this.lex()}return new an(o,new ln(this,t,this.tokenRegex.lastIndex))}}class to{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new n("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");const e=this.undefStack.pop();for(const t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,r){if(void 0===r&&(r=!1),r){for(let t=0;t<this.undefStack.length;t++)delete this.undefStack[t][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{const t=this.undefStack[this.undefStack.length-1];t&&!t.hasOwnProperty(e)&&(t[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}}var ro=on;sn("\\noexpand",function(e){const t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),sn("\\expandafter",function(e){const t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),sn("\\@firstoftwo",function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),sn("\\@secondoftwo",function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),sn("\\@ifnextchar",function(e){const t=e.consumeArgs(3);e.consumeSpaces();const r=e.future();return 1===t[0].length&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),sn("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),sn("\\TextOrMath",function(e){const t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});const no={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};sn("\\char",function(e){let t,r=e.popToken(),o=0;if("'"===r.text)t=8,r=e.popToken();else if('"'===r.text)t=16,r=e.popToken();else if("`"===r.text)if(r=e.popToken(),"\\"===r.text[0])o=r.text.charCodeAt(1);else{if("EOF"===r.text)throw new n("\\char` missing argument");o=r.text.charCodeAt(0)}else t=10;if(t){if(o=no[r.text],null==o||o>=t)throw new n("Invalid base-"+t+" digit "+r.text);let s;for(;null!=(s=no[e.future().text])&&s<t;)o*=t,o+=s,e.popToken()}return"\\@char{"+o+"}"});const oo=(e,t,r,o)=>{let s=e.consumeArg().tokens;if(1!==s.length)throw new n("\\newcommand's first argument must be a macro name");const i=s[0].text,l=e.isDefined(i);if(l&&!t)throw new n("\\newcommand{"+i+"} attempting to redefine "+i+"; use \\renewcommand");if(!l&&!r)throw new n("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");let a=0;if(s=e.consumeArg().tokens,1===s.length&&"["===s[0].text){let t="",r=e.expandNextToken();for(;"]"!==r.text&&"EOF"!==r.text;)t+=r.text,r=e.expandNextToken();if(!t.match(/^\s*[0-9]+\s*$/))throw new n("Invalid number of arguments: "+t);a=parseInt(t),s=e.consumeArg().tokens}return l&&o||e.macros.set(i,{tokens:s,numArgs:a}),""};sn("\\newcommand",e=>oo(e,!1,!0,!1)),sn("\\renewcommand",e=>oo(e,!0,!1,!1)),sn("\\providecommand",e=>oo(e,!0,!0,!0)),sn("\\message",e=>{const t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join("")),""}),sn("\\errmessage",e=>{const t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join("")),""}),sn("\\show",e=>{const t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),_n[r],ne.math[r],ne.text[r]),""}),sn("\\bgroup","{"),sn("\\egroup","}"),sn("~","\\nobreakspace"),sn("\\lq","`"),sn("\\rq","'"),sn("\\aa","\\r a"),sn("\\AA","\\r A"),sn("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xa9}"),sn("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),sn("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xae}"),sn("\u212c","\\mathscr{B}"),sn("\u2130","\\mathscr{E}"),sn("\u2131","\\mathscr{F}"),sn("\u210b","\\mathscr{H}"),sn("\u2110","\\mathscr{I}"),sn("\u2112","\\mathscr{L}"),sn("\u2133","\\mathscr{M}"),sn("\u211b","\\mathscr{R}"),sn("\u212d","\\mathfrak{C}"),sn("\u210c","\\mathfrak{H}"),sn("\u2128","\\mathfrak{Z}"),sn("\\Bbbk","\\Bbb{k}"),sn("\\llap","\\mathllap{\\textrm{#1}}"),sn("\\rlap","\\mathrlap{\\textrm{#1}}"),sn("\\clap","\\mathclap{\\textrm{#1}}"),sn("\\mathstrut","\\vphantom{(}"),sn("\\underbar","\\underline{\\text{#1}}"),sn("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}'),sn("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),sn("\\ne","\\neq"),sn("\u2260","\\neq"),sn("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),sn("\u2209","\\notin"),sn("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),sn("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),sn("\u225a","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225a}}"),sn("\u225b","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225b}}"),sn("\u225d","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225d}}"),sn("\u225e","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225e}}"),sn("\u225f","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225f}}"),sn("\u27c2","\\perp"),sn("\u203c","\\mathclose{!\\mkern-0.8mu!}"),sn("\u220c","\\notni"),sn("\u231c","\\ulcorner"),sn("\u231d","\\urcorner"),sn("\u231e","\\llcorner"),sn("\u231f","\\lrcorner"),sn("\xa9","\\copyright"),sn("\xae","\\textregistered"),sn("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),sn("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),sn("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),sn("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),sn("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),sn("\u22ee","\\vdots"),sn("\\varGamma","\\mathit{\\Gamma}"),sn("\\varDelta","\\mathit{\\Delta}"),sn("\\varTheta","\\mathit{\\Theta}"),sn("\\varLambda","\\mathit{\\Lambda}"),sn("\\varXi","\\mathit{\\Xi}"),sn("\\varPi","\\mathit{\\Pi}"),sn("\\varSigma","\\mathit{\\Sigma}"),sn("\\varUpsilon","\\mathit{\\Upsilon}"),sn("\\varPhi","\\mathit{\\Phi}"),sn("\\varPsi","\\mathit{\\Psi}"),sn("\\varOmega","\\mathit{\\Omega}"),sn("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),sn("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),sn("\\boxed","\\fbox{$\\displaystyle{#1}$}"),sn("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),sn("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),sn("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),sn("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),sn("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");const so={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},io=new Set(["bin","rel"]);sn("\\dots",function(e){let t="\\dotso";const r=e.expandAfterFuture().text;return r in so?t=so[r]:("\\not"===r.slice(0,4)||r in ne.math&&io.has(ne.math[r].group))&&(t="\\dotsb"),t});const lo={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};sn("\\dotso",function(e){return e.future().text in lo?"\\ldots\\,":"\\ldots"}),sn("\\dotsc",function(e){const t=e.future().text;return t in lo&&","!==t?"\\ldots\\,":"\\ldots"}),sn("\\cdots",function(e){return e.future().text in lo?"\\@cdots\\,":"\\@cdots"}),sn("\\dotsb","\\cdots"),sn("\\dotsm","\\cdots"),sn("\\dotsi","\\!\\cdots"),sn("\\dotsx","\\ldots\\,"),sn("\\DOTSI","\\relax"),sn("\\DOTSB","\\relax"),sn("\\DOTSX","\\relax"),sn("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),sn("\\,","\\tmspace+{3mu}{.1667em}"),sn("\\thinspace","\\,"),sn("\\>","\\mskip{4mu}"),sn("\\:","\\tmspace+{4mu}{.2222em}"),sn("\\medspace","\\:"),sn("\\;","\\tmspace+{5mu}{.2777em}"),sn("\\thickspace","\\;"),sn("\\!","\\tmspace-{3mu}{.1667em}"),sn("\\negthinspace","\\!"),sn("\\negmedspace","\\tmspace-{4mu}{.2222em}"),sn("\\negthickspace","\\tmspace-{5mu}{.277em}"),sn("\\enspace","\\kern.5em "),sn("\\enskip","\\hskip.5em\\relax"),sn("\\quad","\\hskip1em\\relax"),sn("\\qquad","\\hskip2em\\relax"),sn("\\tag","\\@ifstar\\tag@literal\\tag@paren"),sn("\\tag@paren","\\tag@literal{({#1})}"),sn("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new n("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),sn("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),sn("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),sn("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),sn("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),sn("\\newline","\\\\\\relax"),sn("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");const ao=O(K["Main-Regular"]["T".charCodeAt(0)][1]-.7*K["Main-Regular"]["A".charCodeAt(0)][1]);sn("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+ao+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),sn("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+ao+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),sn("\\hspace","\\@ifstar\\@hspacer\\@hspace"),sn("\\@hspace","\\hskip #1\\relax"),sn("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),sn("\\ordinarycolon",":"),sn("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),sn("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),sn("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),sn("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),sn("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),sn("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),sn("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),sn("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),sn("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),sn("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),sn("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),sn("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),sn("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),sn("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),sn("\u2237","\\dblcolon"),sn("\u2239","\\eqcolon"),sn("\u2254","\\coloneqq"),sn("\u2255","\\eqqcolon"),sn("\u2a74","\\Coloneqq"),sn("\\ratio","\\vcentcolon"),sn("\\coloncolon","\\dblcolon"),sn("\\colonequals","\\coloneqq"),sn("\\coloncolonequals","\\Coloneqq"),sn("\\equalscolon","\\eqqcolon"),sn("\\equalscoloncolon","\\Eqqcolon"),sn("\\colonminus","\\coloneq"),sn("\\coloncolonminus","\\Coloneq"),sn("\\minuscolon","\\eqcolon"),sn("\\minuscoloncolon","\\Eqcolon"),sn("\\coloncolonapprox","\\Colonapprox"),sn("\\coloncolonsim","\\Colonsim"),sn("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),sn("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),sn("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),sn("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),sn("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220c}}"),sn("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),sn("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),sn("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),sn("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),sn("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),sn("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),sn("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),sn("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),sn("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),sn("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),sn("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),sn("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),sn("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),sn("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),sn("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),sn("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),sn("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),sn("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),sn("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228a}"),sn("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2acb}"),sn("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228b}"),sn("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2acc}"),sn("\\imath","\\html@mathml{\\@imath}{\u0131}"),sn("\\jmath","\\html@mathml{\\@jmath}{\u0237}"),sn("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27e6}}"),sn("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27e7}}"),sn("\u27e6","\\llbracket"),sn("\u27e7","\\rrbracket"),sn("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),sn("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),sn("\u2983","\\lBrace"),sn("\u2984","\\rBrace"),sn("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29b5}}"),sn("\u29b5","\\minuso"),sn("\\darr","\\downarrow"),sn("\\dArr","\\Downarrow"),sn("\\Darr","\\Downarrow"),sn("\\lang","\\langle"),sn("\\rang","\\rangle"),sn("\\uarr","\\uparrow"),sn("\\uArr","\\Uparrow"),sn("\\Uarr","\\Uparrow"),sn("\\N","\\mathbb{N}"),sn("\\R","\\mathbb{R}"),sn("\\Z","\\mathbb{Z}"),sn("\\alef","\\aleph"),sn("\\alefsym","\\aleph"),sn("\\Alpha","\\mathrm{A}"),sn("\\Beta","\\mathrm{B}"),sn("\\bull","\\bullet"),sn("\\Chi","\\mathrm{X}"),sn("\\clubs","\\clubsuit"),sn("\\cnums","\\mathbb{C}"),sn("\\Complex","\\mathbb{C}"),sn("\\Dagger","\\ddagger"),sn("\\diamonds","\\diamondsuit"),sn("\\empty","\\emptyset"),sn("\\Epsilon","\\mathrm{E}"),sn("\\Eta","\\mathrm{H}"),sn("\\exist","\\exists"),sn("\\harr","\\leftrightarrow"),sn("\\hArr","\\Leftrightarrow"),sn("\\Harr","\\Leftrightarrow"),sn("\\hearts","\\heartsuit"),sn("\\image","\\Im"),sn("\\infin","\\infty"),sn("\\Iota","\\mathrm{I}"),sn("\\isin","\\in"),sn("\\Kappa","\\mathrm{K}"),sn("\\larr","\\leftarrow"),sn("\\lArr","\\Leftarrow"),sn("\\Larr","\\Leftarrow"),sn("\\lrarr","\\leftrightarrow"),sn("\\lrArr","\\Leftrightarrow"),sn("\\Lrarr","\\Leftrightarrow"),sn("\\Mu","\\mathrm{M}"),sn("\\natnums","\\mathbb{N}"),sn("\\Nu","\\mathrm{N}"),sn("\\Omicron","\\mathrm{O}"),sn("\\plusmn","\\pm"),sn("\\rarr","\\rightarrow"),sn("\\rArr","\\Rightarrow"),sn("\\Rarr","\\Rightarrow"),sn("\\real","\\Re"),sn("\\reals","\\mathbb{R}"),sn("\\Reals","\\mathbb{R}"),sn("\\Rho","\\mathrm{P}"),sn("\\sdot","\\cdot"),sn("\\sect","\\S"),sn("\\spades","\\spadesuit"),sn("\\sub","\\subset"),sn("\\sube","\\subseteq"),sn("\\supe","\\supseteq"),sn("\\Tau","\\mathrm{T}"),sn("\\thetasym","\\vartheta"),sn("\\weierp","\\wp"),sn("\\Zeta","\\mathrm{Z}"),sn("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),sn("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),sn("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),sn("\\bra","\\mathinner{\\langle{#1}|}"),sn("\\ket","\\mathinner{|{#1}\\rangle}"),sn("\\braket","\\mathinner{\\langle{#1}\\rangle}"),sn("\\Bra","\\left\\langle#1\\right|"),sn("\\Ket","\\left|#1\\right\\rangle");const co=e=>t=>{const r=t.consumeArg().tokens,n=t.consumeArg().tokens,o=t.consumeArg().tokens,s=t.consumeArg().tokens,i=t.macros.get("|"),l=t.macros.get("\\|");t.macros.beginGroup();const a=t=>r=>{e&&(r.macros.set("|",i),o.length&&r.macros.set("\\|",l));let s=t;if(!t&&o.length){"|"===r.future().text&&(r.popToken(),s=!0)}return{tokens:s?o:n,numArgs:0}};t.macros.set("|",a(!1)),o.length&&t.macros.set("\\|",a(!0));const c=t.consumeArg().tokens,h=t.expandTokens([...s,...c,...r]);return t.macros.endGroup(),{tokens:h.reverse(),numArgs:0}};sn("\\bra@ket",co(!1)),sn("\\bra@set",co(!0)),sn("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),sn("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),sn("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),sn("\\angln","{\\angl n}"),sn("\\blue","\\textcolor{##6495ed}{#1}"),sn("\\orange","\\textcolor{##ffa500}{#1}"),sn("\\pink","\\textcolor{##ff00af}{#1}"),sn("\\red","\\textcolor{##df0030}{#1}"),sn("\\green","\\textcolor{##28ae7b}{#1}"),sn("\\gray","\\textcolor{gray}{#1}"),sn("\\purple","\\textcolor{##9d38bd}{#1}"),sn("\\blueA","\\textcolor{##ccfaff}{#1}"),sn("\\blueB","\\textcolor{##80f6ff}{#1}"),sn("\\blueC","\\textcolor{##63d9ea}{#1}"),sn("\\blueD","\\textcolor{##11accd}{#1}"),sn("\\blueE","\\textcolor{##0c7f99}{#1}"),sn("\\tealA","\\textcolor{##94fff5}{#1}"),sn("\\tealB","\\textcolor{##26edd5}{#1}"),sn("\\tealC","\\textcolor{##01d1c1}{#1}"),sn("\\tealD","\\textcolor{##01a995}{#1}"),sn("\\tealE","\\textcolor{##208170}{#1}"),sn("\\greenA","\\textcolor{##b6ffb0}{#1}"),sn("\\greenB","\\textcolor{##8af281}{#1}"),sn("\\greenC","\\textcolor{##74cf70}{#1}"),sn("\\greenD","\\textcolor{##1fab54}{#1}"),sn("\\greenE","\\textcolor{##0d923f}{#1}"),sn("\\goldA","\\textcolor{##ffd0a9}{#1}"),sn("\\goldB","\\textcolor{##ffbb71}{#1}"),sn("\\goldC","\\textcolor{##ff9c39}{#1}"),sn("\\goldD","\\textcolor{##e07d10}{#1}"),sn("\\goldE","\\textcolor{##a75a05}{#1}"),sn("\\redA","\\textcolor{##fca9a9}{#1}"),sn("\\redB","\\textcolor{##ff8482}{#1}"),sn("\\redC","\\textcolor{##f9685d}{#1}"),sn("\\redD","\\textcolor{##e84d39}{#1}"),sn("\\redE","\\textcolor{##bc2612}{#1}"),sn("\\maroonA","\\textcolor{##ffbde0}{#1}"),sn("\\maroonB","\\textcolor{##ff92c6}{#1}"),sn("\\maroonC","\\textcolor{##ed5fa6}{#1}"),sn("\\maroonD","\\textcolor{##ca337c}{#1}"),sn("\\maroonE","\\textcolor{##9e034e}{#1}"),sn("\\purpleA","\\textcolor{##ddd7ff}{#1}"),sn("\\purpleB","\\textcolor{##c6b9fc}{#1}"),sn("\\purpleC","\\textcolor{##aa87ff}{#1}"),sn("\\purpleD","\\textcolor{##7854ab}{#1}"),sn("\\purpleE","\\textcolor{##543b78}{#1}"),sn("\\mintA","\\textcolor{##f5f9e8}{#1}"),sn("\\mintB","\\textcolor{##edf2df}{#1}"),sn("\\mintC","\\textcolor{##e0e5cc}{#1}"),sn("\\grayA","\\textcolor{##f6f7f7}{#1}"),sn("\\grayB","\\textcolor{##f0f1f2}{#1}"),sn("\\grayC","\\textcolor{##e3e5e6}{#1}"),sn("\\grayD","\\textcolor{##d6d8da}{#1}"),sn("\\grayE","\\textcolor{##babec2}{#1}"),sn("\\grayF","\\textcolor{##888d93}{#1}"),sn("\\grayG","\\textcolor{##626569}{#1}"),sn("\\grayH","\\textcolor{##3b3e40}{#1}"),sn("\\grayI","\\textcolor{##21242c}{#1}"),sn("\\kaBlue","\\textcolor{##314453}{#1}"),sn("\\kaGreen","\\textcolor{##71B307}{#1}");const ho={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class mo{constructor(e,t,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new to(ro,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new eo(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){let t,r,n;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:n,end:r}=this.consumeArg(["]"]))}else({tokens:n,start:t,end:r}=this.consumeArg());return this.pushToken(new an("EOF",r.loc)),this.pushTokens(n),new an("",ln.range(t,r))}consumeSpaces(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}}consumeArg(e){const t=[],r=e&&e.length>0;r||this.consumeSpaces();const o=this.future();let s,i=0,l=0;do{if(s=this.popToken(),t.push(s),"{"===s.text)++i;else if("}"===s.text){if(--i,-1===i)throw new n("Extra }",s)}else if("EOF"===s.text)throw new n("Unexpected end of input in a macro argument, expected '"+(e&&r?e[l]:"}")+"'",s);if(e&&r)if((0===i||1===i&&"{"===e[l])&&s.text===e[l]){if(++l,l===e.length){t.splice(-l,l);break}}else l=0}while(0!==i||r);return"{"===o.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:o,end:s}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new n("The length of delimiters doesn't match the number of args!");const r=t[0];for(let e=0;e<r.length;e++){const t=this.popToken();if(r[e]!==t.text)throw new n("Use of the macro doesn't match its definition",t)}}const r=[];for(let n=0;n<e;n++)r.push(this.consumeArg(t&&t[n+1]).tokens);return r}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new n("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){const t=this.popToken(),r=t.text,o=t.noexpand?null:this._getExpansion(r);if(null==o||e&&o.unexpandable){if(e&&null==o&&"\\"===r[0]&&!this.isDefined(r))throw new n("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);let s=o.tokens;const i=this.consumeArgs(o.numArgs,o.delimiters);if(o.numArgs){s=s.slice();for(let e=s.length-1;e>=0;--e){let t=s[e];if("#"===t.text){if(0===e)throw new n("Incomplete placeholder at end of macro body",t);if(t=s[--e],"#"===t.text)s.splice(e+1,1);else{if(!/^[1-9]$/.test(t.text))throw new n("Not a valid argument number",t);s.splice(e,2,...i[+t.text-1])}}}}return this.pushTokens(s),s.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){const e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new an(e)]):void 0}expandTokens(e){const t=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;)if(!1===this.expandOnce(!0)){const e=this.stack.pop();e.treatAsRelax&&(e.noexpand=!1,e.treatAsRelax=!1),t.push(e)}return this.countExpansion(t.length),t}expandMacroAsText(e){const t=this.expandMacro(e);return t?t.map(e=>e.text).join(""):t}_getExpansion(e){const t=this.macros.get(e);if(null==t)return t;if(1===e.length){const t=this.lexer.catcodes[e];if(null!=t&&13!==t)return}const r="function"==typeof t?t(this):t;if("string"==typeof r){let e=0;if(r.includes("#")){const t=r.replace(/##/g,"");for(;t.includes("#"+(e+1));)++e}const t=new eo(r,this.settings),n=[];let o=t.lex();for(;"EOF"!==o.text;)n.push(o),o=t.lex();n.reverse();return{tokens:n,numArgs:e}}return r}isDefined(e){return this.macros.has(e)||_n.hasOwnProperty(e)||ne.math.hasOwnProperty(e)||ne.text.hasOwnProperty(e)||ho.hasOwnProperty(e)}isExpandable(e){const t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:_n.hasOwnProperty(e)&&!_n[e].primitive}}const uo=/^[\u208a\u208b\u208c\u208d\u208e\u2080\u2081\u2082\u2083\u2084\u2085\u2086\u2087\u2088\u2089\u2090\u2091\u2095\u1d62\u2c7c\u2096\u2097\u2098\u2099\u2092\u209a\u1d63\u209b\u209c\u1d64\u1d65\u2093\u1d66\u1d67\u1d68\u1d69\u1d6a]/,po=Object.freeze({"\u208a":"+","\u208b":"-","\u208c":"=","\u208d":"(","\u208e":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1d62":"i","\u2c7c":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209a":"p","\u1d63":"r","\u209b":"s","\u209c":"t","\u1d64":"u","\u1d65":"v","\u2093":"x","\u1d66":"\u03b2","\u1d67":"\u03b3","\u1d68":"\u03c1","\u1d69":"\u03d5","\u1d6a":"\u03c7","\u207a":"+","\u207b":"-","\u207c":"=","\u207d":"(","\u207e":")","\u2070":"0","\xb9":"1","\xb2":"2","\xb3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1d2c":"A","\u1d2e":"B","\u1d30":"D","\u1d31":"E","\u1d33":"G","\u1d34":"H","\u1d35":"I","\u1d36":"J","\u1d37":"K","\u1d38":"L","\u1d39":"M","\u1d3a":"N","\u1d3c":"O","\u1d3e":"P","\u1d3f":"R","\u1d40":"T","\u1d41":"U","\u2c7d":"V","\u1d42":"W","\u1d43":"a","\u1d47":"b","\u1d9c":"c","\u1d48":"d","\u1d49":"e","\u1da0":"f","\u1d4d":"g","\u02b0":"h","\u2071":"i","\u02b2":"j","\u1d4f":"k","\u02e1":"l","\u1d50":"m","\u207f":"n","\u1d52":"o","\u1d56":"p","\u02b3":"r","\u02e2":"s","\u1d57":"t","\u1d58":"u","\u1d5b":"v","\u02b7":"w","\u02e3":"x","\u02b8":"y","\u1dbb":"z","\u1d5d":"\u03b2","\u1d5e":"\u03b3","\u1d5f":"\u03b4","\u1d60":"\u03d5","\u1d61":"\u03c7","\u1dbf":"\u03b8"}),go={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030c":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030a":{text:"\\r",math:"\\mathring"},"\u030b":{text:"\\H"},"\u0327":{text:"\\c"}},fo={"\xe1":"a\u0301","\xe0":"a\u0300","\xe4":"a\u0308","\u01df":"a\u0308\u0304","\xe3":"a\u0303","\u0101":"a\u0304","\u0103":"a\u0306","\u1eaf":"a\u0306\u0301","\u1eb1":"a\u0306\u0300","\u1eb5":"a\u0306\u0303","\u01ce":"a\u030c","\xe2":"a\u0302","\u1ea5":"a\u0302\u0301","\u1ea7":"a\u0302\u0300","\u1eab":"a\u0302\u0303","\u0227":"a\u0307","\u01e1":"a\u0307\u0304","\xe5":"a\u030a","\u01fb":"a\u030a\u0301","\u1e03":"b\u0307","\u0107":"c\u0301","\u1e09":"c\u0327\u0301","\u010d":"c\u030c","\u0109":"c\u0302","\u010b":"c\u0307","\xe7":"c\u0327","\u010f":"d\u030c","\u1e0b":"d\u0307","\u1e11":"d\u0327","\xe9":"e\u0301","\xe8":"e\u0300","\xeb":"e\u0308","\u1ebd":"e\u0303","\u0113":"e\u0304","\u1e17":"e\u0304\u0301","\u1e15":"e\u0304\u0300","\u0115":"e\u0306","\u1e1d":"e\u0327\u0306","\u011b":"e\u030c","\xea":"e\u0302","\u1ebf":"e\u0302\u0301","\u1ec1":"e\u0302\u0300","\u1ec5":"e\u0302\u0303","\u0117":"e\u0307","\u0229":"e\u0327","\u1e1f":"f\u0307","\u01f5":"g\u0301","\u1e21":"g\u0304","\u011f":"g\u0306","\u01e7":"g\u030c","\u011d":"g\u0302","\u0121":"g\u0307","\u0123":"g\u0327","\u1e27":"h\u0308","\u021f":"h\u030c","\u0125":"h\u0302","\u1e23":"h\u0307","\u1e29":"h\u0327","\xed":"i\u0301","\xec":"i\u0300","\xef":"i\u0308","\u1e2f":"i\u0308\u0301","\u0129":"i\u0303","\u012b":"i\u0304","\u012d":"i\u0306","\u01d0":"i\u030c","\xee":"i\u0302","\u01f0":"j\u030c","\u0135":"j\u0302","\u1e31":"k\u0301","\u01e9":"k\u030c","\u0137":"k\u0327","\u013a":"l\u0301","\u013e":"l\u030c","\u013c":"l\u0327","\u1e3f":"m\u0301","\u1e41":"m\u0307","\u0144":"n\u0301","\u01f9":"n\u0300","\xf1":"n\u0303","\u0148":"n\u030c","\u1e45":"n\u0307","\u0146":"n\u0327","\xf3":"o\u0301","\xf2":"o\u0300","\xf6":"o\u0308","\u022b":"o\u0308\u0304","\xf5":"o\u0303","\u1e4d":"o\u0303\u0301","\u1e4f":"o\u0303\u0308","\u022d":"o\u0303\u0304","\u014d":"o\u0304","\u1e53":"o\u0304\u0301","\u1e51":"o\u0304\u0300","\u014f":"o\u0306","\u01d2":"o\u030c","\xf4":"o\u0302","\u1ed1":"o\u0302\u0301","\u1ed3":"o\u0302\u0300","\u1ed7":"o\u0302\u0303","\u022f":"o\u0307","\u0231":"o\u0307\u0304","\u0151":"o\u030b","\u1e55":"p\u0301","\u1e57":"p\u0307","\u0155":"r\u0301","\u0159":"r\u030c","\u1e59":"r\u0307","\u0157":"r\u0327","\u015b":"s\u0301","\u1e65":"s\u0301\u0307","\u0161":"s\u030c","\u1e67":"s\u030c\u0307","\u015d":"s\u0302","\u1e61":"s\u0307","\u015f":"s\u0327","\u1e97":"t\u0308","\u0165":"t\u030c","\u1e6b":"t\u0307","\u0163":"t\u0327","\xfa":"u\u0301","\xf9":"u\u0300","\xfc":"u\u0308","\u01d8":"u\u0308\u0301","\u01dc":"u\u0308\u0300","\u01d6":"u\u0308\u0304","\u01da":"u\u0308\u030c","\u0169":"u\u0303","\u1e79":"u\u0303\u0301","\u016b":"u\u0304","\u1e7b":"u\u0304\u0308","\u016d":"u\u0306","\u01d4":"u\u030c","\xfb":"u\u0302","\u016f":"u\u030a","\u0171":"u\u030b","\u1e7d":"v\u0303","\u1e83":"w\u0301","\u1e81":"w\u0300","\u1e85":"w\u0308","\u0175":"w\u0302","\u1e87":"w\u0307","\u1e98":"w\u030a","\u1e8d":"x\u0308","\u1e8b":"x\u0307","\xfd":"y\u0301","\u1ef3":"y\u0300","\xff":"y\u0308","\u1ef9":"y\u0303","\u0233":"y\u0304","\u0177":"y\u0302","\u1e8f":"y\u0307","\u1e99":"y\u030a","\u017a":"z\u0301","\u017e":"z\u030c","\u1e91":"z\u0302","\u017c":"z\u0307","\xc1":"A\u0301","\xc0":"A\u0300","\xc4":"A\u0308","\u01de":"A\u0308\u0304","\xc3":"A\u0303","\u0100":"A\u0304","\u0102":"A\u0306","\u1eae":"A\u0306\u0301","\u1eb0":"A\u0306\u0300","\u1eb4":"A\u0306\u0303","\u01cd":"A\u030c","\xc2":"A\u0302","\u1ea4":"A\u0302\u0301","\u1ea6":"A\u0302\u0300","\u1eaa":"A\u0302\u0303","\u0226":"A\u0307","\u01e0":"A\u0307\u0304","\xc5":"A\u030a","\u01fa":"A\u030a\u0301","\u1e02":"B\u0307","\u0106":"C\u0301","\u1e08":"C\u0327\u0301","\u010c":"C\u030c","\u0108":"C\u0302","\u010a":"C\u0307","\xc7":"C\u0327","\u010e":"D\u030c","\u1e0a":"D\u0307","\u1e10":"D\u0327","\xc9":"E\u0301","\xc8":"E\u0300","\xcb":"E\u0308","\u1ebc":"E\u0303","\u0112":"E\u0304","\u1e16":"E\u0304\u0301","\u1e14":"E\u0304\u0300","\u0114":"E\u0306","\u1e1c":"E\u0327\u0306","\u011a":"E\u030c","\xca":"E\u0302","\u1ebe":"E\u0302\u0301","\u1ec0":"E\u0302\u0300","\u1ec4":"E\u0302\u0303","\u0116":"E\u0307","\u0228":"E\u0327","\u1e1e":"F\u0307","\u01f4":"G\u0301","\u1e20":"G\u0304","\u011e":"G\u0306","\u01e6":"G\u030c","\u011c":"G\u0302","\u0120":"G\u0307","\u0122":"G\u0327","\u1e26":"H\u0308","\u021e":"H\u030c","\u0124":"H\u0302","\u1e22":"H\u0307","\u1e28":"H\u0327","\xcd":"I\u0301","\xcc":"I\u0300","\xcf":"I\u0308","\u1e2e":"I\u0308\u0301","\u0128":"I\u0303","\u012a":"I\u0304","\u012c":"I\u0306","\u01cf":"I\u030c","\xce":"I\u0302","\u0130":"I\u0307","\u0134":"J\u0302","\u1e30":"K\u0301","\u01e8":"K\u030c","\u0136":"K\u0327","\u0139":"L\u0301","\u013d":"L\u030c","\u013b":"L\u0327","\u1e3e":"M\u0301","\u1e40":"M\u0307","\u0143":"N\u0301","\u01f8":"N\u0300","\xd1":"N\u0303","\u0147":"N\u030c","\u1e44":"N\u0307","\u0145":"N\u0327","\xd3":"O\u0301","\xd2":"O\u0300","\xd6":"O\u0308","\u022a":"O\u0308\u0304","\xd5":"O\u0303","\u1e4c":"O\u0303\u0301","\u1e4e":"O\u0303\u0308","\u022c":"O\u0303\u0304","\u014c":"O\u0304","\u1e52":"O\u0304\u0301","\u1e50":"O\u0304\u0300","\u014e":"O\u0306","\u01d1":"O\u030c","\xd4":"O\u0302","\u1ed0":"O\u0302\u0301","\u1ed2":"O\u0302\u0300","\u1ed6":"O\u0302\u0303","\u022e":"O\u0307","\u0230":"O\u0307\u0304","\u0150":"O\u030b","\u1e54":"P\u0301","\u1e56":"P\u0307","\u0154":"R\u0301","\u0158":"R\u030c","\u1e58":"R\u0307","\u0156":"R\u0327","\u015a":"S\u0301","\u1e64":"S\u0301\u0307","\u0160":"S\u030c","\u1e66":"S\u030c\u0307","\u015c":"S\u0302","\u1e60":"S\u0307","\u015e":"S\u0327","\u0164":"T\u030c","\u1e6a":"T\u0307","\u0162":"T\u0327","\xda":"U\u0301","\xd9":"U\u0300","\xdc":"U\u0308","\u01d7":"U\u0308\u0301","\u01db":"U\u0308\u0300","\u01d5":"U\u0308\u0304","\u01d9":"U\u0308\u030c","\u0168":"U\u0303","\u1e78":"U\u0303\u0301","\u016a":"U\u0304","\u1e7a":"U\u0304\u0308","\u016c":"U\u0306","\u01d3":"U\u030c","\xdb":"U\u0302","\u016e":"U\u030a","\u0170":"U\u030b","\u1e7c":"V\u0303","\u1e82":"W\u0301","\u1e80":"W\u0300","\u1e84":"W\u0308","\u0174":"W\u0302","\u1e86":"W\u0307","\u1e8c":"X\u0308","\u1e8a":"X\u0307","\xdd":"Y\u0301","\u1ef2":"Y\u0300","\u0178":"Y\u0308","\u1ef8":"Y\u0303","\u0232":"Y\u0304","\u0176":"Y\u0302","\u1e8e":"Y\u0307","\u0179":"Z\u0301","\u017d":"Z\u030c","\u1e90":"Z\u0302","\u017b":"Z\u0307","\u03ac":"\u03b1\u0301","\u1f70":"\u03b1\u0300","\u1fb1":"\u03b1\u0304","\u1fb0":"\u03b1\u0306","\u03ad":"\u03b5\u0301","\u1f72":"\u03b5\u0300","\u03ae":"\u03b7\u0301","\u1f74":"\u03b7\u0300","\u03af":"\u03b9\u0301","\u1f76":"\u03b9\u0300","\u03ca":"\u03b9\u0308","\u0390":"\u03b9\u0308\u0301","\u1fd2":"\u03b9\u0308\u0300","\u1fd1":"\u03b9\u0304","\u1fd0":"\u03b9\u0306","\u03cc":"\u03bf\u0301","\u1f78":"\u03bf\u0300","\u03cd":"\u03c5\u0301","\u1f7a":"\u03c5\u0300","\u03cb":"\u03c5\u0308","\u03b0":"\u03c5\u0308\u0301","\u1fe2":"\u03c5\u0308\u0300","\u1fe1":"\u03c5\u0304","\u1fe0":"\u03c5\u0306","\u03ce":"\u03c9\u0301","\u1f7c":"\u03c9\u0300","\u038e":"\u03a5\u0301","\u1fea":"\u03a5\u0300","\u03ab":"\u03a5\u0308","\u1fe9":"\u03a5\u0304","\u1fe8":"\u03a5\u0306","\u038f":"\u03a9\u0301","\u1ffa":"\u03a9\u0300"};class bo{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new mo(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new n("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{const e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){const t=this.nextToken;this.consume(),this.gullet.pushToken(new an("}")),this.gullet.pushTokens(e);const r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r}parseExpression(e,t){const r=[];for(;;){"math"===this.mode&&this.consumeSpaces();const n=this.fetch();if(bo.endOfExpression.has(n.text))break;if(t&&n.text===t)break;if(e&&_n[n.text]&&_n[n.text].infix)break;const o=this.parseAtom(t);if(!o)break;"internal"!==o.type&&r.push(o)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){let t,r=-1;for(let o=0;o<e.length;o++){const s=e[o];if("infix"===s.type){if(-1!==r)throw new n("only one infix operator per group",s.token);r=o,t=s.replaceWith}}if(-1!==r&&t){let n,o;const s=e.slice(0,r),i=e.slice(r+1);let l;return n=1===s.length&&"ordgroup"===s[0].type?s[0]:{type:"ordgroup",mode:this.mode,body:s},o=1===i.length&&"ordgroup"===i[0].type?i[0]:{type:"ordgroup",mode:this.mode,body:i},l="\\\\abovefrac"===t?this.callFunction(t,[n,e[r],o],[]):this.callFunction(t,[n,o],[]),[l]}return e}handleSupSubscript(e){const t=this.fetch(),r=t.text;let o;this.consume(),this.consumeSpaces();do{var s;o=this.parseGroup(e)}while("internal"===(null==(s=o)?void 0:s.type));if(!o)throw new n("Expected group after '"+r+"'",t);return o}formatUnsupportedCmd(e){const t=[];for(let r=0;r<e.length;r++)t.push({type:"textord",mode:"text",text:e[r]});const r={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[r]}}parseAtom(e){const t=this.parseGroup("atom",e);if("internal"===(null==t?void 0:t.type))return t;if("text"===this.mode)return t;let r,o;for(;;){this.consumeSpaces();const e=this.fetch();if("\\limits"===e.text||"\\nolimits"===e.text){if(t&&"op"===t.type){const r="\\limits"===e.text;t.limits=r,t.alwaysHandleSupSub=!0}else{if(!t||"operatorname"!==t.type)throw new n("Limit controls must follow a math operator",e);t.alwaysHandleSupSub&&(t.limits="\\limits"===e.text)}this.consume()}else if("^"===e.text){if(r)throw new n("Double superscript",e);r=this.handleSupSubscript("superscript")}else if("_"===e.text){if(o)throw new n("Double subscript",e);o=this.handleSupSubscript("subscript")}else if("'"===e.text){if(r)throw new n("Double superscript",e);const t={type:"textord",mode:this.mode,text:"\\prime"},o=[t];for(this.consume();"'"===this.fetch().text;)o.push(t),this.consume();"^"===this.fetch().text&&o.push(this.handleSupSubscript("superscript")),r={type:"ordgroup",mode:this.mode,body:o}}else{if(!po[e.text])break;{const t=uo.test(e.text),n=[];for(n.push(new an(po[e.text])),this.consume();;){const e=this.fetch().text;if(!po[e])break;if(uo.test(e)!==t)break;n.unshift(new an(po[e])),this.consume()}const s=this.subparse(n);t?o={type:"ordgroup",mode:"math",body:s}:r={type:"ordgroup",mode:"math",body:s}}}}return r||o?{type:"supsub",mode:this.mode,base:t,sup:r,sub:o}:t}parseFunction(e,t){const r=this.fetch(),o=r.text,s=_n[o];if(!s)return null;if(this.consume(),t&&"atom"!==t&&!s.allowedInArgument)throw new n("Got function '"+o+"' with no arguments"+(t?" as "+t:""),r);if("text"===this.mode&&!s.allowedInText)throw new n("Can't use function '"+o+"' in text mode",r);if("math"===this.mode&&!1===s.allowedInMath)throw new n("Can't use function '"+o+"' in math mode",r);const{args:i,optArgs:l}=this.parseArguments(o,s);return this.callFunction(o,i,l,r,e)}callFunction(e,t,r,o,s){const i={funcName:e,parser:this,token:o,breakOnTokenText:s},l=_n[e];if(l&&l.handler)return l.handler(i,t,r);throw new n("No function handler for "+e)}parseArguments(e,t){const r=t.numArgs+t.numOptionalArgs;if(0===r)return{args:[],optArgs:[]};const o=[],s=[];for(let i=0;i<r;i++){let r=t.argTypes&&t.argTypes[i];const l=i<t.numOptionalArgs;("primitive"in t&&t.primitive&&null==r||"sqrt"===t.type&&1===i&&null==s[0])&&(r="primitive");const a=this.parseGroupOfType("argument to '"+e+"'",r,l);if(l)s.push(a);else{if(null==a)throw new n("Null argument, please report this as a bug");o.push(a)}}return{args:o,optArgs:s}}parseGroupOfType(e,t,r){switch(t){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseArgumentGroup(r,t);case"hbox":{const e=this.parseArgumentGroup(r,"text");return null!=e?{type:"styling",mode:e.mode,body:[e],style:"text",resetFont:!0}:null}case"raw":{const e=this.parseStringGroup("raw",r);return null!=e?{type:"raw",mode:"text",string:e.text}:null}case"primitive":{if(r)throw new n("A primitive argument cannot be optional");const t=this.parseGroup(e);if(null==t)throw new n("Expected group as "+e,this.fetch());return t}case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new n("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e,t){const r=this.gullet.scanArgument(t);if(null==r)return null;let n,o="";for(;"EOF"!==(n=this.fetch()).text;)o+=n.text,this.consume();return this.consume(),r.text=o,r}parseRegexGroup(e,t){const r=this.fetch();let o,s=r,i="";for(;"EOF"!==(o=this.fetch()).text&&e.test(i+o.text);)s=o,i+=s.text,this.consume();if(""===i)throw new n("Invalid "+t+": '"+r.text+"'",r);return r.range(s,i)}parseColorGroup(e){const t=this.parseStringGroup("color",e);if(null==t)return null;const r=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!r)throw new n("Invalid color: '"+t.text+"'",t);let o=r[0];return/^[0-9a-f]{6}$/i.test(o)&&(o="#"+o),{type:"color-token",mode:this.mode,color:o}}parseSizeGroup(e){let t,r=!1;if(this.gullet.consumeSpaces(),t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"),!t)return null;e||0!==t.text.length||(t.text="0pt",r=!0);const o=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!o)throw new n("Invalid size: '"+t.text+"'",t);const s={number:+(o[1]+o[2]),unit:o[3]};if(!H(s))throw new n("Invalid unit: '"+s.unit+"'",t);return{type:"size",mode:this.mode,value:s,isBlank:r}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);const t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==t)return null;const r=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:r}}parseArgumentGroup(e,t){const r=this.gullet.scanArgument(e);if(null==r)return null;const n=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();const o=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();const s={type:"ordgroup",mode:this.mode,loc:r.loc,body:o};return t&&this.switchMode(n),s}parseGroup(e,t){const r=this.fetch(),o=r.text;let s;if("{"===o||"\\begingroup"===o){this.consume();const e="{"===o?"}":"\\endgroup";this.gullet.beginGroup();const t=this.parseExpression(!1,e),n=this.fetch();this.expect(e),this.gullet.endGroup(),s={type:"ordgroup",mode:this.mode,loc:ln.range(r,n),body:t,semisimple:"\\begingroup"===o||void 0}}else if(s=this.parseFunction(t,e)||this.parseSymbol(),null==s&&"\\"===o[0]&&!ho.hasOwnProperty(o)){if(this.settings.throwOnError)throw new n("Undefined control sequence: "+o,r);s=this.formatUnsupportedCmd(o),this.consume()}return s}formLigatures(e){let t=e.length-1;for(let r=0;r<t;++r){const n=e[r];if("textord"!==n.type)continue;const o=n.text,s=e[r+1];if(s&&"textord"===s.type){if("-"===o&&"-"===s.text){const o=e[r+2];r+1<t&&o&&"textord"===o.type&&"-"===o.text?(e.splice(r,3,{type:"textord",mode:"text",loc:ln.range(n,o),text:"---"}),t-=2):(e.splice(r,2,{type:"textord",mode:"text",loc:ln.range(n,s),text:"--"}),t-=1)}"'"!==o&&"`"!==o||s.text!==o||(e.splice(r,2,{type:"textord",mode:"text",loc:ln.range(n,s),text:o+o}),t-=1)}}}parseSymbol(){const e=this.fetch();let t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();let e=t.slice(5);const r="*"===e.charAt(0);if(r&&(e=e.slice(1)),e.length<2||e.charAt(0)!==e.slice(-1))throw new n("\\verb assertion failed --\n please report what input caused this bug");return e=e.slice(1,-1),{type:"verb",mode:"text",body:e,star:r}}fo.hasOwnProperty(t[0])&&!ne[this.mode][t[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=fo[t[0]]+t.slice(1));const r=Jn.exec(t);let o;if(r&&(t=t.substring(0,r.index),"i"===t?t="\u0131":"j"===t&&(t="\u0237")),ne[this.mode][t]){this.settings.strict&&"math"===this.mode&&Me.includes(t)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);const r=ne[this.mode][t].group,n=ln.range(e);let s;s=r in rr?{type:"atom",mode:this.mode,family:r,loc:n,text:t}:{type:r,mode:this.mode,loc:n,text:t},o=s}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(T(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),o={type:"textord",mode:"text",loc:ln.range(e),text:t}}if(this.consume(),r)for(let t=0;t<r[0].length;t++){const s=r[0][t];if(!go[s])throw new n("Unknown accent ' "+s+"'",e);const i=go[s][this.mode]||go[s].text;if(!i)throw new n("Accent "+s+" unsupported in "+this.mode+" mode",e);o={type:"accent",mode:this.mode,loc:ln.range(e),label:i,isStretchy:!1,isShifty:!0,base:o}}return o}}bo.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var yo=function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");const r=new bo(e,t);delete r.gullet.macros.current["\\df@tag"];let o=r.parse();if(delete r.gullet.macros.current["\\current@color"],delete r.gullet.macros.current["\\color"],r.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new n("\\tag works only in display equations");o=[{type:"tag",mode:"text",body:o,tag:r.subparse([new an("\\df@tag")])}]}return o};let xo=function(e,t,r){t.textContent="";const n=vo(e,r).toNode();t.appendChild(n)};"undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!=typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),xo=function(){throw new n("KaTeX doesn't work in quirks mode.")});const wo=function(e,t,r){if(r.throwOnError||!(e instanceof n))throw e;const o=je(["katex-error"],[new W(t)]);return o.setAttribute("title",e.toString()),o.setAttribute("style","color:"+r.errorColor),o},vo=function(e,t){const r=new g(t);try{const t=yo(e,r);return Zt(t,e,r)}catch(t){return wo(t,e,r)}};var ko={version:"0.16.47",render:xo,renderToString:function(e,t){return vo(e,t).toMarkup()},ParseError:n,SETTINGS_SCHEMA:u,__parse:function(e,t){const r=new g(t);return yo(e,r)},__renderToDomTree:vo,__renderToHTMLTree:function(e,t){const r=new g(t);try{return function(e,t,r){const n=Tt(e,_t(r)),o=je(["katex"],[n]);return $t(o,r)}(yo(e,r),0,r)}catch(t){return wo(t,e,r)}},__setFontMetrics:function(e,t){K[e]=t},__defineSymbol:oe,__defineFunction:mt,__defineMacro:sn,__domTree:{Span:U,Anchor:X,SymbolNode:W,SvgNode:_,PathNode:$,LineNode:Z}};return t=t.default}()});\ No newline at end of filediff --git a/scripts/minicpm-ocr-jev/renderer/check_renderer.py b/scripts/minicpm-ocr-jev/renderer/check_renderer.pynew file mode 100644index 0000000..349fdb4--- /dev/null+++ b/scripts/minicpm-ocr-jev/renderer/check_renderer.py@@ -0,0 +1,250 @@+"""Check your local renderer against the bundled reference images.++The model was trained on images produced by one specific renderer. Your local build+pins the same KaTeX and the same Chromium, but fonts come from your operating system,+so the output can differ. This script tells you how much.++It renders each bundled example's OCR candidate and compares the result with the+reference PNG shipped next to it, then prints a verdict per example:++ identical byte-for-byte equal to the reference.+ close a few percent of pixels differ. Normal: anti-aliasing and font+ hinting differ between builds of the same font.+ drifted noticeably different, but the layout still holds. Expected when your+ fonts or browser build differ from the reference environment. Scores+ move slightly; rankings normally do not.+ different large pixel differences at nearly the same size. Usually a missing+ font: text is drawn with a fallback face, or as empty boxes.+ mismatched the image geometry does not match. Something structural: wrong device+ scale factor, wrong KaTeX, or a failed render.++Only `different` and `mismatched` are treated as failures. Some drift is unavoidable:+the reference images were produced on a different machine, at a different date, from+the one you are running on, and body-text fonts come from the operating system.++A useful calibration point: formula renders tend to come out byte-identical anywhere,+because KaTeX ships its own fonts. Text and table renders drift, because they do not.+So if a formula example reports anything worse than `close`, suspect your KaTeX or+browser pin rather than your fonts.++What the verdicts do NOT tell you is how much your scores will move. That depends on+the model, not the pixels.++Run: python3 renderer/check_renderer.py+"""+from __future__ import annotations++import json+import sys+from pathlib import Path++HERE = Path(__file__).resolve().parent+ROOT = HERE.parent+sys.path.insert(0, str(ROOT))++from PIL import Image, ImageChops # noqa: E402++from rm_render import Candidate, RenderUnavailable, render_candidates # noqa: E402++#: Relative size difference past which the geometry is considered wrong rather than+#: drifted. Font shaping changes glyph advance widths, so a trimmed render can come+#: out a couple of percent narrower on a different machine; a wrong device scale+#: factor changes it by a whole multiple.+SIZE_DRIFT_LIMIT = 0.05++#: Fraction of pixels allowed to differ while still counting as "close", then as+#: "drifted". Anti-aliasing and hinting touch only glyph edges, a small share of a+#: mostly-white image. A missing font changes far more than the upper bound.+CLOSE_PIXEL_FRACTION = 0.03+DRIFT_PIXEL_FRACTION = 0.15+++def compare(rendered: Path, reference: Path) -> tuple[str, str]:+ """Return (verdict, human-readable detail)."""+ if rendered.read_bytes() == reference.read_bytes():+ return "identical", "byte-for-byte equal"++ with Image.open(rendered) as a_img, Image.open(reference) as b_img:+ a = a_img.convert("RGB")+ b = b_img.convert("RGB")++ (aw, ah), (bw, bh) = a.size, b.size+ size_drift = max(abs(aw - bw) / max(bw, 1), abs(ah - bh) / max(bh, 1))+ size_note = "" if a.size == b.size else f"size {aw}x{ah} vs {bw}x{bh} reference; "++ if size_drift > SIZE_DRIFT_LIMIT:+ return "mismatched", (+ f"{size_note}{size_drift * 100:.1f}% size difference, past the "+ f"{SIZE_DRIFT_LIMIT * 100:.0f}% that font shaping explains"+ )++ # Sizes are close but may not be equal, so compare on a shared canvas rather+ # than refusing to compare at all. Both are top-left aligned on white, which is+ # the renderer's own background, so the padding itself contributes no difference.+ width, height = max(aw, bw), max(ah, bh)+ canvas_a = Image.new("RGB", (width, height), "white")+ canvas_b = Image.new("RGB", (width, height), "white")+ canvas_a.paste(a, (0, 0))+ canvas_b.paste(b, (0, 0))++ diff = ImageChops.difference(canvas_a, canvas_b).convert("L")+ histogram = diff.histogram()+ total = width * height+ differing = total - histogram[0]+ fraction = differing / total if total else 0.0+ # Mean intensity of the difference, over differing pixels only.+ weighted = sum(i * n for i, n in enumerate(histogram))+ mean_over_differing = (weighted / differing) if differing else 0.0++ detail = (+ f"{size_note}{fraction * 100:.2f}% of pixels differ, "+ f"mean delta {mean_over_differing:.1f}/255 over those pixels"+ )+ if fraction <= CLOSE_PIXEL_FRACTION:+ verdict = "close"+ elif fraction <= DRIFT_PIXEL_FRACTION:+ verdict = "drifted"+ else:+ verdict = "different"+ return verdict, detail+++def main() -> int:+ import argparse++ ap = argparse.ArgumentParser(description=__doc__)+ ap.add_argument(+ "--render-python",+ help="interpreter to run the render driver with. Use this when Chromium "+ "needs a wrapper that sets LD_LIBRARY_PATH; defaults to this interpreter.",+ )+ ap.add_argument(+ "--work-dir",+ help="where to write the renders this check produces. Defaults to "+ ".render_check inside the repo, which needs the repo to be writable; "+ "point this elsewhere when it is mounted read-only.",+ )+ args = ap.parse_args()++ cases = sorted((ROOT / "examples").glob("*/case.json"))+ if not cases:+ print("No examples found; expected examples/*/case.json", file=sys.stderr)+ return 2++ work = Path(args.work_dir) if args.work_dir else ROOT / ".render_check"+ # Deployments that mount this tree read-only are reasonable; failing on them+ # with a bare OSError from inside the render driver is not.+ try:+ work.mkdir(parents=True, exist_ok=True)+ except OSError as exc:+ print(f"Cannot write renders to {work}: {exc}", file=sys.stderr)+ print("Pass --work-dir <writable path> (the repo itself is read-only here).",+ file=sys.stderr)+ return 2+ plan: list[tuple[str, Path, Candidate]] = []++ for case_path in cases:+ case = json.loads(case_path.read_text(encoding="utf-8"))+ case_dir = case_path.parent+ reference = case_dir / case["reference_render"]+ # The reference image is the render of one specific candidate; use that one.+ wanted_role = case.get("reference_render_of", "ocr_output")+ candidate = next(+ (c for c in case["candidates"] if c.get("role") == wanted_role),+ case["candidates"][-1],+ )+ plan.append((+ case["case_id"],+ reference,+ Candidate(+ case_id=case["case_id"],+ image_path=str(case_dir / case["block_image"]),+ text=candidate["text"],+ category=case["category"],+ ),+ ))++ print(f"Rendering {len(plan)} example(s) …")+ try:+ results = render_candidates(+ [c for _, _, c in plan],+ work_dir=work,+ # Checking the renderer should not depend on Node being installed.+ precheck=False,+ python_bin=args.render_python,+ )+ except RenderUnavailable as exc:+ print(f"\nThe renderer could not run:\n{exc}", file=sys.stderr)+ text = str(exc)+ if "error while loading shared libraries" in text or "cannot open shared object" in text:+ print(+ "\nChromium is present but its system libraries are not. This is the"+ "\nmost common first-run failure. Install them with:"+ "\n python3 -m playwright install --with-deps chromium"+ "\nIf you cannot install system packages, point --render-python at an"+ "\ninterpreter wrapper that sets LD_LIBRARY_PATH to a directory holding"+ "\nthe missing libraries.",+ file=sys.stderr,+ )+ return 2++ by_id = {r.case_id: r for r in results}+ verdicts: list[str] = []++ for case_id, reference, _cand in plan:+ result = by_id[case_id]+ print()+ print(f"=== {case_id}")+ if not result.ok or not result.render_image_path:+ print(f" FAILED to render: {result.reason} {result.detail or ''}")+ verdicts.append("failed")+ continue+ if not reference.is_file():+ print(f" no reference image at {reference}")+ verdicts.append("no-reference")+ continue++ verdict, detail = compare(Path(result.render_image_path), reference)+ verdicts.append(verdict)+ print(f" {verdict}: {detail}")+ print(f" rendered: {result.render_image_path}")+ print(f" reference: {reference}")++ print()+ print("=== summary")+ for verdict in ("identical", "close", "drifted", "different", "mismatched",+ "failed", "no-reference"):+ n = verdicts.count(verdict)+ if n:+ print(f" {verdict}: {n}")++ print(f"\nRendered images kept in {work} for inspection.")++ bad = [v for v in verdicts if v in ("different", "mismatched", "failed")]+ if bad:+ print(+ "\nSomething is off. In order of likelihood:"+ "\n 1. Browser build. Check `python3 -m playwright --version` is 1.62.0."+ "\n A different Playwright fetches a different Chromium, which shifts"+ "\n text layout and shows up as a size difference."+ "\n 2. Fonts. Run `fc-list :lang=zh | wc -l`; zero means Chinese is being"+ "\n drawn as empty boxes. Having *some* CJK font matters; which one"+ "\n matters far less."+ "\n 3. KaTeX. Confirm renderer/assets/katex-0.16.47 is intact. A formula"+ "\n example reporting worse than `close` points here."+ )+ return 1++ if "drifted" in verdicts:+ print(+ "\nSome renders drifted from the references. That is expected on a"+ "\ndifferent machine and does not mean the renderer is wrong -- but if you"+ "\nneed scores closely comparable to published ones, match the font set as"+ "\nwell as the pins."+ )+ print("\nRenderer is usable.")+ return 0+++if __name__ == "__main__":+ raise SystemExit(main())diff --git a/scripts/minicpm-ocr-jev/renderer/precheck/screen_v225_node.js b/scripts/minicpm-ocr-jev/renderer/precheck/screen_v225_node.jsnew file mode 100644index 0000000..d472e4d--- /dev/null+++ b/scripts/minicpm-ocr-jev/renderer/precheck/screen_v225_node.js@@ -0,0 +1,152 @@+#!/usr/bin/env node+// screen_v225_node.js -- Node port of the offline KaTeX screener, v2.2.5.+// The decision logic is a line-by-line copy of the evaluation-set screener+// screen_v22.js (frozen at v2.2.5, JXA/JavaScriptCore host):+// markdown-it-math-style span splitting (braces are not counted), escape+// checks for two-character delimiter tokens in hasAnyDelim, "strict throw+// means error class", single-$ currency exclusion, and whole-body parsing of+// a bare formula after implicitly adding delimiters.+// Host differences only: JXA readFile/eval replaced by node fs/require (katex+// pinned to 0.16.47), streaming line-by-line input, plus passing sample_id+// through and writing a summary.+// Usage: node screen_v225_node.js <in.jsonl> <out_hits.json> [textField] [idField] [summary.json]+'use strict';+var fs = require('fs');+var readline = require('readline');+var origLog = console.log.bind(console);+console.warn = function(){}; console.log = function(){}; console.error = function(){}; console.info = function(){};+var path = require('path');+// KaTeX is version-pinned and bundled next to the renderer; resolve it relative+// to this script so the screener and the renderer always agree on the version.+var katex = require(path.join(__dirname, '..', 'assets', 'katex-0.16.47', 'katex.min.js'));++var MATH_DELIMS = [["$$","$$",true,true],["\\[","\\]",true,true],["\\(","\\)",false,true],["$","$",false,false]];+var HTML_BOUNDARY_RE = /(?:<\s*\/?\s*[A-Za-z][A-Za-z0-9:-]*(?:\s+[^<>]*)?\s*\/?\s*>|<\s*\/?\s*[A-Za-z][A-Za-z0-9:-]*(?:\s+[^&<>]*)?\s*\/?\s*>)/i;+var STRONG_MATH_RE = /(\\|[_^{}=<>+*\/]|[A-Za-z]\s*'+\s*(?:\(|[A-Za-z0-9])|\b(?:alpha|beta|gamma|theta|lambda|mu|pi|sigma|omega|sqrt|frac|sum|int|lfloor|rfloor|mathrm|mathbb|operatorname|begin|end|times|cdot|leq|geq|pmod)\b)/;+var PROSE_WORD_RE = /\b(?:or|and|in|by|with|for|to|from|of|the|a|an)\b/i;+function isEscaped(text,pos){var n=0,i=pos-1;while(i>=0&&text[i]==='\\'){n++;i--;}return n%2===1;}+function unescapeHtml(s){return s.replace(/</g,'<').replace(/>/g,'>').replace(/"/g,'"').replace(/&#(\d+);/g,function(_,d){return String.fromCharCode(parseInt(d,10));}).replace(/&#x([0-9A-Fa-f]+);/g,function(_,h){return String.fromCharCode(parseInt(h,16));}).replace(/&/g,'&').replace(/ /g,' ');}+function acceptSingleDollar(inner){+ var body=inner.trim();+ if(!body)return false;+ if(STRONG_MATH_RE.test(body))return true;+ if(/[0-9]/.test(body[0])&&PROSE_WORD_RE.test(body))return false;+ return true;+}+function acceptSpan(inner,isDisp,left){+ if(HTML_BOUNDARY_RE.test(inner))return false;+ if(left==='$'&&!acceptSingleDollar(inner))return false;+ return true;+}+// v2.2.3: delimiter pairing is structurally identical to the markdown-it math+// plugin: braces are not counted; whatever pairs up is fed straight to KaTeX.+function splitMathSpans(text,isFormula){+ var spans=[],buf=[],i=0,n=text.length;+ while(i<n){+ var matched=false;+ for(var d=0;d<MATH_DELIMS.length;d++){+ var left=MATH_DELIMS[d][0],right=MATH_DELIMS[d][1],isDisp=MATH_DELIMS[d][2],allowNl=MATH_DELIMS[d][3];+ if(text.substr(i,left.length)!==left||isEscaped(text,i))continue;+ var j=i+left.length,end=-1;+ while(j<n){var k=text.indexOf(right,j);if(k<0)break;if(isEscaped(text,k)){j=k+1;continue;}end=k;break;}+ if(end<0)continue;+ var inner=text.slice(i+left.length,end);+ if(!inner.trim())continue;+ if(!allowNl&&inner.indexOf('\n')>=0)continue;+ var ok = isFormula ? !(left==='$'&&!acceptSingleDollar(inner)) : acceptSpan(inner,isDisp,left);+ if(!ok){buf.push(text.substr(i,left.length));i+=left.length;matched=true;break;}+ spans.push({display:isDisp,payload:inner});+ i=end+right.length;matched=true;break;+ }+ if(!matched){buf.push(text[i]);i++;}+ }+ return {spans:spans,residue:buf.join('')};+}+function hasAnyDelim(t){+ // v2.2.5: two-character tokens are escape-checked too, same as splitMathSpans+ var i=0;+ while(i<t.length){+ if(t[i]==='$'&&!isEscaped(t,i))return true;+ if((t.substr(i,2)==='\\['||t.substr(i,2)==='\\]'||t.substr(i,2)==='\\('||t.substr(i,2)==='\\)')&&!isEscaped(t,i))return true;+ i++;+ }+ return false;+}+function residueIssues(res){+ var issues=[];+ var i=0;+ while(i<res.length){+ if(res[i]==='$'&&!isEscaped(res,i)){issues.push('stray:$');break;}+ if((res.substr(i,2)==='\\['||res.substr(i,2)==='\\]'||res.substr(i,2)==='\\('||res.substr(i,2)==='\\)')&&!isEscaped(res,i)){issues.push('stray:'+res.substr(i,2));break;}+ i++;+ }+ var m=res.match(/\\[A-Za-z]{2,}/g);+ if(m)issues.push('naked:'+m.slice(0,5).join(','));+ return issues;+}+function tryParse(body,display){+ // v2.2.4: markdown-it-math semantics -- a throw in strict mode is an error class+ try{ katex.renderToString(body,{throwOnError:true,displayMode:display}); return null; }+ catch(e){ return String(e).slice(0,300); }+}+function screenRow(row,textField,idField){+ var cand=String(row[textField]||'');+ var cat=String(row.category||'');+ var rec={id:row[idField],category:cat,label:String(row.label),status:'pass',reasons:[],errors:[]};+ if(row.sample_id!==undefined)rec.sample_id=row.sample_id;+ if(cat==='formula'){+ var t=cand.trim();+ if(!hasAnyDelim(t)){+ // Bare formula body: implicitly add delimiters and parse the whole body+ var err=tryParse(t,true);+ if(err){rec.status='body_error';rec.errors.push(err);}+ else if(!t){rec.status='body_error';rec.errors.push('empty');}+ }else{+ // Real markdown semantics: split into math spans and parse each one+ var sr=splitMathSpans(t,true);+ for(var si=0;si<sr.spans.length;si++){+ var e2=tryParse(unescapeHtml(sr.spans[si].payload.trim()),sr.spans[si].display);+ if(e2)rec.errors.push(e2);+ }+ if(rec.errors.length)rec.status='span_error';+ var ri=residueIssues(sr.residue);+ if(ri.length){rec.reasons=ri;if(rec.status==='pass')rec.status='residue_error';}+ if(sr.spans.length===0&&rec.status==='pass'){rec.status='residue_error';rec.reasons.push('no_valid_span');}+ }+ }else{+ var sr2=splitMathSpans(cand,false);+ for(var sj=0;sj<sr2.spans.length;sj++){+ var e3=tryParse(unescapeHtml(sr2.spans[sj].payload.trim()),sr2.spans[sj].display);+ if(e3)rec.errors.push(e3);+ }+ if(rec.errors.length)rec.status='span_error';+ }+ return rec;+}+async function main(){+ var argv=process.argv.slice(2);+ var inPath=argv[0], outPath=argv[1], textField=argv[2]||'label_text', idField=argv[3]||'case_id', summaryPath=argv[4]||null;+ var rl=readline.createInterface({input:fs.createReadStream(inPath),crlfDelay:Infinity});+ var results=[],n=0;+ var summary={total:0,hits:0,by_status:{},by_cat_label:{}};+ for await (var line of rl){+ if(!line.trim())continue;+ var row=JSON.parse(line);+ var rec=screenRow(row,textField,idField);+ n++;summary.total++;+ var ck=rec.category+'/'+rec.label;+ if(!summary.by_cat_label[ck])summary.by_cat_label[ck]={total:0,hits:0};+ summary.by_cat_label[ck].total++;+ if(rec.status!=='pass'){+ results.push(rec);+ summary.hits++;+ summary.by_status[rec.status]=(summary.by_status[rec.status]||0)+1;+ summary.by_cat_label[ck].hits++;+ }+ if(n%20000===0)process.stderr.write('processed '+n+' hits '+results.length+'\n');+ }+ fs.writeFileSync(outPath,JSON.stringify(results,null,1));+ if(summaryPath)fs.writeFileSync(summaryPath,JSON.stringify(summary,null,2));+ origLog('screened '+n+' hits '+results.length);+}+main().catch(function(e){process.stderr.write('FATAL '+e.stack+'\n');process.exit(1);});diff --git a/scripts/minicpm-ocr-jev/renderer/render_module/render_label.py b/scripts/minicpm-ocr-jev/renderer/render_module/render_label.pynew file mode 100644index 0000000..fc47192--- /dev/null+++ b/scripts/minicpm-ocr-jev/renderer/render_module/render_label.py@@ -0,0 +1,1016 @@+#!/usr/bin/env python3+"""OCR label / text rendering utilities.++This module turns OCR output (Markdown, HTML or LaTeX) into PIL images so the+result can be compared visually against the source page image. The caller+supplies a Playwright browser context; all rasterisation happens in headless+Chromium.++Pipeline (see RENDER_PIPELINE_VERSION below)+--------------------------------------------+* One route for all three candidate classes. Plain text, tables and formulas+ are all rendered in the browser with KaTeX; there is no separate LaTeX /+ pdflatex route.+* KaTeX is pinned to KATEX_PINNED_VERSION (0.16.47): that is the version the+ annotation standard was produced with, and since a candidate is judged by+ whether KaTeX accepts it, the renderer has to use the same version as the+ labels. Asset lookup lives in _find_katex_assets / _KATEX_ASSET_DIR_CANDIDATES+ (the KATEX_ASSET_DIR environment variable overrides the bundled assets).+* Delimiter handling is a single left-to-right pass (_protect_math ->+ _split_math_spans). Converting in two passes is wrong: if a caller+ pre-converts `$...$` to `\\(...\\)` and this module then re-scans the text, a+ remaining currency `$` can pull an already-converted `\\(` into a new math+ span and manufacture a ParseError that the reference renderer never sees.+ Callers must therefore pass the raw text and let this module do the scanning.+* Math spans are rendered one by one with a direct katex.render call+ (_render_math_in_page) instead of KaTeX's auto-render. auto-render balances+ braces while pairing delimiters (and gives up on a span with unbalanced+ braces, printing it literally), which does not match the reference markdown+ renderer: that one pairs without counting braces and lets KaTeX raise a+ ParseError. Rendering span by span also avoids a second round of delimiter+ pairing between the restored wrapper and any `$` inside the span.+* throwOnError is true and the raised message is displayed: in the reference+ renderer both undefined commands and structural errors surface as an error+ message, there is no "render the rest and show the bad fragment in red".+* Error handling splits in two. If the page ends up with a `.katex-error`+ (a ParseError) and collect_errors=True, the rendered image becomes a picture+ of the error text itself. Without a ParseError the real markdown rendering is+ always emitted - literal commands and stray delimiters are shown as-is - and+ correctness is decided by comparing the rendered image with the source image.+* formula mode does not apply the HTML-boundary exemption used for the other+ classes: inside a formula candidate `<` and `>` are math symbols, not tags.+ A formula candidate with no delimiter at all is wrapped in `$$ ... $$` and+ rendered as a single display block.+* formula candidates are captured at a higher device_scale_factor than text and+ tables (see DEVICE_SCALE_FACTOR_BY_CLASS for the arithmetic): KaTeX applies+ `.katex {font-size: 1.21em}`, so at DPR 2 formula ink is noticeably smaller+ per em than the LaTeX-based rendering this pipeline replaced, and the formula+ factor compensates so formula images stay equally legible.+* Markdown quirks that are deliberately handled here: `N.` at the start of a+ line is escaped so OCR'd text is not renumbered as an ordered list, and runs+ of three or more underscores (fill-in-the-blank rules) are escaped character+ by character so Python-Markdown's legacy emphasis does not eat them.+"""++from __future__ import annotations++import base64+import html as html_lib+import io+import os+import re+from pathlib import Path+from typing import Any, Callable++import markdown as md_lib+from PIL import Image, ImageChops+++_MATH_PLACEHOLDER = "\x00MATH_%d\x00"+# Delimiters are scanned left to right in a single pass, in KaTeX auto-render's+# order ($$ MUST come before $, otherwise a display span is split into two+# empty inline ones).+# Tuple layout: (left, right, is_display, allow_newline)+_MATH_DELIMS: tuple[tuple[str, str, bool, bool], ...] = (+ ("$$", "$$", True, True),+ ("\\[", "\\]", True, True),+ ("\\(", "\\)", False, True),+ ("$", "$", False, False),+)+_FORMULA_PLAYWRIGHT_ONLY_RE = re.compile(+ r"[\u2460-\u24ff\u2776-\u2793\u3251-\u32bf\U0001f100-\U0001f2ff]"+)+_KATEX_WOFF2_URL_RE = re.compile(+ r"url\((?P<quote>['\"]?)(?P<path>fonts/[^)'\"]+\.woff2)(?P=quote)\)"+)+_HTML_BOUNDARY_IN_MATH_RE = re.compile(+ r"(?:<\s*/?\s*[A-Za-z][A-Za-z0-9:-]*(?:\s+[^<>]*)?\s*/?\s*>|"+ r"<\s*/?\s*[A-Za-z][A-Za-z0-9:-]*(?:\s+[^&<>]*)?\s*/?\s*>)",+ re.I,+)+# Heuristics that exclude currency amounts from single-$ math spans. The driver+# script (render_triple_rm_labels.py) keeps an identical copy of these rules, so+# both sides agree on what counts as math.+_STRONG_MATH_RE = re.compile(+ r"(\\|[_^{}=<>+*/]|[A-Za-z]\s*'+\s*(?:\(|[A-Za-z0-9])|"+ r"\b(?:alpha|beta|gamma|theta|lambda|mu|pi|sigma|omega|sqrt|frac|sum|int|"+ r"lfloor|rfloor|mathrm|mathbb|operatorname|begin|end|times|cdot|leq|geq|pmod)\b)"+)+_SIMPLE_MATH_IDENT_RE = re.compile(r"[A-Za-z][A-Za-z0-9]*(?:\s*[,;]\s*[A-Za-z][A-Za-z0-9]*)*")+_PROSE_WORD_RE = re.compile(r"\b(?:or|and|in|by|with|for|to|from|of|the|a|an)\b", re.I)+_KATEX_ASSET_DIR_CANDIDATES = (+ # KaTeX assets bundled with this package, pinned to KATEX_PINNED_VERSION.+ # Resolved relative to this file so a source checkout and an installed copy+ # behave the same. KATEX_ASSET_DIR (handled in _find_katex_assets) takes+ # precedence over this list.+ Path(__file__).resolve().parent.parent / "assets" / "katex-0.16.47",+)+RENDER_PIPELINE_VERSION = "v8.5"+KATEX_PINNED_VERSION = "0.16.47"+# device_scale_factor is chosen per candidate class rather than once for a shared+# browser context; the policy lives here and the driver only reads a value for+# the context it builds. Measured rationale:+# * formula: at DPR 2 the formula ink height was only 0.658 of the LaTeX+# rendering this pipeline replaced (xelatex 12pt at 400 DPI), because KaTeX+# ships `.katex {font-size: 1.21em}`: 18 * 1.21 * 2 = 43.6 px/em against+# 66.7 px/em. 2 / 0.658 ~= 3.0 restores the old legibility.+# * text/table: DPR 2 here was a side effect of sharing one context, not a+# decision - it blew the image area up by 3.5-4x and the judging prompt's+# token count by 58-67%. DPR 1 reproduces the earlier layout exactly (the+# main CSS, the width-search constants and target_width are all unchanged,+# so the only residual difference is glyph rasterisation).+DEVICE_SCALE_FACTOR_BY_CLASS = {"formula": 3.0, "default": 1.0}+++def device_scale_factor_for(formula_mode: bool) -> float:+ """Return the device_scale_factor for a candidate class.++ The driver calls this when creating the browser context.+ """+ return DEVICE_SCALE_FACTOR_BY_CLASS["formula" if formula_mode else "default"]+++_KATEX_CSS_CACHE: dict[Path, str] = {}++# document.fonts.ready only waits for fonts already queued, and KaTeX loads its+# glyphs lazily. Under load, composite glyphs such as \notin were laid out using+# the fallback font's metrics, which put the overstruck slash in the wrong place.+# Loading every family explicitly removes the race.+_KATEX_FONT_PRELOAD_SCRIPT = """async () => {+ if (typeof katex === 'undefined') return;+ const fams = ['KaTeX_Main','KaTeX_Math','KaTeX_AMS','KaTeX_Size1','KaTeX_Size2',+ 'KaTeX_Size3','KaTeX_Size4','KaTeX_Caligraphic','KaTeX_Fraktur',+ 'KaTeX_Script','KaTeX_SansSerif','KaTeX_Typewriter'];+ const jobs = [];+ for (const f of fams) for (const s of ['normal','italic']) for (const w of ['normal','bold'])+ jobs.push(document.fonts.load(s + ' ' + w + ' 16px "' + f + '"').catch(() => {}));+ await Promise.all(jobs);+}"""++# An over-wide display formula used to be cut off at the right edge of the+# capture area - content silently lost, no error. Shrinking font-size by the+# overflow ratio pulls it back inside the page width; KaTeX sizes everything in+# em, so the whole formula reflows proportionally.+_DISPLAY_MATH_FIT_SCRIPT = """() => {+ const area = document.getElementById('capture-area');+ if (!area) return;+ for (const d of area.querySelectorAll('.katex-display')) {+ const avail = d.clientWidth || area.clientWidth;+ const need = d.scrollWidth;+ if (need > avail + 1) {+ const scale = Math.max(0.3, avail / need);+ d.style.fontSize = (scale * 100).toFixed(1) + '%';+ }+ }+}"""+++def _is_escaped(text: str, pos: int) -> bool:+ """Return True if the character at `pos` is backslash-escaped.++ Escaped means an odd number of consecutive backslashes precede it.+ """+ n = 0+ i = pos - 1+ while i >= 0 and text[i] == "\\":+ n += 1+ i -= 1+ return n % 2 == 1+++def _split_math_spans(+ text: str,+ accept: "Callable[[str, bool, str], bool] | None" = None,+) -> list[tuple[bool, bool, str, str]]:+ """Split math spans in one left-to-right pass, like KaTeX's splitAtDelimiters.++ Why one pass: the earlier implementation ran four independent regexes+ ($$ / \\[ \\] / \\( \\) / $) that could not see each other. For adjacent+ inline formulas such as `$ A $ B $ C $`, where one `$` both closes and opens+ a span, the single-$ regex matched nothing at all (it demanded that neither+ neighbour of the closing `$` be a `$`, and excluded `$` from the body), so+ the whole run was printed literally. Worse, a placeholder emitted by the+ earlier `$$` substitution could be swallowed into another formula by the+ later single-$ rule, and _restore_math's single ordered pass cannot unwind a+ nested placeholder - the literal text MATH_0 ended up in the image. With one+ pass each delimiter is paired exactly once: no misses, no nesting.++ When accept(inner, is_display, left) returns False the span is treated as+ literal text **and the scan advances by only the length of the left+ delimiter** - it must not jump past the rejected right delimiter. KaTeX pairs+ delimiters inside a DOM text node, so a `$` cannot cross an element boundary+ like `</td><td>`; skipping to after the right delimiter would shift every+ later pairing by one and degrade a whole table's formulas to literal text+ (measured: 20 formulas collapsing into 1).++ Returns [(is_math, is_display, payload, raw), ...]. For a math span `payload`+ is the formula body and `raw` is the original text including its delimiters,+ so declining to protect a span can write it back byte for byte with its+ delimiter form intact.+ """+ spans: list[tuple[bool, bool, str, str]] = []+ buf: list[str] = []+ i = 0+ n = len(text)+ while i < n:+ matched = False+ for left, right, is_display, allow_newline in _MATH_DELIMS:+ if not text.startswith(left, i) or _is_escaped(text, i):+ continue+ j = i + len(left)+ end = -1+ while j < n:+ k = text.find(right, j)+ if k < 0:+ break+ if _is_escaped(text, k):+ j = k + 1+ continue+ end = k+ break+ if end < 0:+ continue+ inner = text[i + len(left):end]+ if not inner.strip():+ continue+ if not allow_newline and "\n" in inner:+ continue+ if accept is not None and not accept(inner, is_display, left):+ buf.append(text[i:i + len(left)])+ i += len(left)+ matched = True+ break+ if buf:+ spans.append((False, False, "".join(buf), "".join(buf)))+ buf = []+ spans.append((True, is_display, inner, text[i:end + len(right)]))+ i = end + len(right)+ matched = True+ break+ if not matched:+ buf.append(text[i])+ i += 1+ if buf:+ spans.append((False, False, "".join(buf), "".join(buf)))+ return spans+++def _accept_single_dollar_math(inner: str) -> bool:+ """Currency exclusion for single-$ spans: reject only obvious money, else math.++ The rule follows the "markdown reference" principle: stock KaTeX auto-render+ with single-$ enabled treats every `$X$` as math, so the only exception kept+ here is currency. The test has to stay narrow - an earlier version reused the+ driver's prose word list and misread ordinary variables as prose, printing+ `$a$` (the article "a") and `$A(0,0)$` (matching \\bA\\b) literally.+ """+ body = inner.strip()+ if not body:+ return False+ if _STRONG_MATH_RE.search(body):+ return True+ if body[0].isdigit() and _PROSE_WORD_RE.search(body):+ # `It costs $5 or $10`: starts with a digit and contains a prose+ # connective, so it is currency rather than math.+ return False+ return True+++def _protect_math(text: str, formula_mode: bool = False) -> tuple[str, list[tuple[str, bool]]]:+ """Replace math spans with placeholders so the Markdown parser cannot mangle them.++ With formula_mode=True the HTML-boundary exemption is switched off: that+ guard exists for HTML that has to survive the markdown pass, whereas inside a+ formula candidate `<` and `>` are math symbols. The single-$ currency+ exclusion applies in both modes.+ """+ store: list[tuple[str, bool]] = []++ def _normalize_math_source(latex: str) -> str:+ # Deliberately no repair of the source here (an earlier version inserted+ # `{}` after `\\` when followed by `[`). Neither the reference markdown+ # renderer nor the static checker repairs anything, and repairing in the+ # pipeline would "rescue" candidates that the reference renderer rejects,+ # which is exactly what the comparison is supposed to detect.+ return html_lib.unescape(latex.strip()).replace("\xa0", " ")++ def _accept(inner: str, is_display: bool, left: str) -> bool:+ if not formula_mode and _HTML_BOUNDARY_IN_MATH_RE.search(inner):+ return False+ if left == "$" and not _accept_single_dollar_math(inner):+ return False+ return True++ out: list[str] = []+ for is_math, is_display, payload, raw in _split_math_spans(text, _accept):+ if not is_math:+ out.append(payload)+ continue+ idx = len(store)+ store.append((_normalize_math_source(payload), is_display))+ out.append(_MATH_PLACEHOLDER % idx)+ return "".join(out), store+++def _restore_math(html: str, store: list[tuple[str, bool]]) -> str:+ """Turn math placeholders back into HTML markers that KaTeX can pick up."""+ for i, (latex, is_display) in enumerate(store):+ placeholder = _MATH_PLACEHOLDER % i+ safe_latex = (+ latex.replace("&", "&")+ .replace("<", "<")+ .replace(">", ">")+ )+ if is_display:+ tag = f'<span class="math-display">$${safe_latex}$$</span>'+ else:+ tag = f'<span class="math-inline">\\({safe_latex}\\)</span>'+ html = html.replace(placeholder, tag)+ return html+++def _markdown_to_html(text: str, formula_mode: bool = False) -> str:+ """Convert Markdown text to HTML while keeping LaTeX formulas intact."""+ if not text:+ return ""++ # Order matters: protect the math spans BEFORE escaping line-leading ordered+ # list markers. The other way round, a formula body whose first line starts+ # with a number - `\[ 1. 8x2 \]` - gets rewritten to `1\.` and then fails in+ # KaTeX (this produced 9 bogus error images in a full-set reconciliation).+ text, math_store = _protect_math(text, formula_mode=formula_mode)+ # "3. xxx" in OCR'd plain text is source content; Markdown must not treat it+ # as an ordered list and renumber it to "1. xxx".+ text = re.sub(r"(?m)^(\s*\d+)\.\s", r"\1\\. ", text)+ # Runs of three or more underscores are fill-in-the-blank rules. CommonMark+ # (the reference behaviour) leaves them literal because of its flanking+ # rules, but Python-Markdown's legacy emphasis pairs the underscores up into+ # bold/italic, eating the rule and inventing styling. Escape each underscore+ # individually to match the reference.+ text = re.sub(r"_{3,}", lambda m: "\\_" * len(m.group()), text)+ html = md_lib.markdown(+ text,+ extensions=["tables", "fenced_code", "nl2br"],+ )+ if math_store:+ html = _restore_math(html, math_store)+ return html+++def _is_html_content(text: str) -> bool:+ """Rough check for whether the text is already HTML."""+ return bool(re.search(r"<(?:table|div|p|h[1-6]|ul|ol|tr|td|th)\b", text, re.I))+++def clean_html_style(html: str) -> str:+ """Strip styles that cause huge whitespace or frozen layouts when rendered."""+ if not isinstance(html, str):+ return ""++ html = re.sub(r"margin:\s*auto;?", "", html, flags=re.I)+ html = re.sub(r"width:\s*max-content;?", "", html, flags=re.I)+ html = re.sub(r"text-align:\s*center;?", "", html, flags=re.I)+ html = re.sub(r"(?:min-)?height:\s*\d+[^;\"']*;?", "", html, flags=re.I)+ html = re.sub(+ r"(?:padding|margin)(?:-(?:top|bottom|left|right))?:\s*"+ r"(?:[5-9]\d{1,}|[1-9]\d{2,})px[^;\"']*;?",+ "",+ html,+ flags=re.I,+ )+ return html+++_MARKDOWN_SYNTAX_RE = re.compile("(?m)^#{1,6}[ \\t]|^[ \\t]*[-*+][ \\t]+\\S|\\*\\*[^*\\n]+\\*\\*|^[ \\t]*[0-9]+\\.[ \\t]+\\S")+++def has_any_math_delim(text: str) -> bool:+ """Does the candidate contain any unescaped math delimiter?++ Mirrors the hasAnyDelim check in the static screening script, so both agree+ on what counts as "already delimited".++ Two-character tokens are escape-checked as well, matching the splitter: a+ `\\(` formed by an array row break `\\\\` immediately followed by `(` is+ literal content, not a delimiter. Without the check such candidates look+ delimited and lose the bare-formula treatment (wrapping in `$$`).+ """+ i = 0+ n = len(text)+ while i < n:+ if text[i] == "$" and not _is_escaped(text, i):+ return True+ if text[i:i + 2] in (r"\[", r"\]", r"\(", r"\)") and not _is_escaped(text, i):+ return True+ i += 1+ return False+++def prepare_formula_candidate(text: str) -> str:+ """Normalise a formula candidate before browser/KaTeX rendering.++ - A bare formula body (no delimiter at all) is wrapped in `$$..$$` and+ rendered as one display block, matching the static checker's+ tryParse(t, display=True).+ - A candidate that already carries delimiters is returned unchanged and gets+ split by real markdown semantics (with the HTML-boundary exemption off, as+ formula_mode requires).+ """+ t = (text or "").strip()+ if not t:+ return t+ if not has_any_math_delim(t):+ return "$$\n" + t + "\n$$"+ return t+++def prepare_render_content(ocr_text: str, formula_mode: bool = False) -> str:+ """Turn OCR text into an HTML fragment that can be dropped into the page."""+ if not ocr_text:+ return ""++ if formula_mode:+ # Formula candidates always go through the markdown conversion; there is+ # no HTML passthrough test for them.+ return _markdown_to_html(ocr_text, formula_mode=True)++ if not _is_html_content(ocr_text):+ return _markdown_to_html(ocr_text)++ # whole-page fix: mixed markdown + embedded HTML (tables) must go through+ # the markdown converter (raw HTML blocks pass through untouched); the+ # plain HTML passthrough below would print ## / ** literally.+ if _MARKDOWN_SYNTAX_RE.search(ocr_text):+ return _markdown_to_html(ocr_text)++ html = clean_html_style(ocr_text)+ html = html.replace("\n", "<br>")+ html = re.sub(+ r"(</?(?:table|thead|tbody|tfoot|tr|th|td)[^>]*>)\s*(?:<br>)+\s*",+ r"\1",+ html,+ flags=re.I,+ )+ html = re.sub(+ r"(?:<br>)+\s*(</?(?:table|thead|tbody|tfoot|tr|th|td)[^>]*>)",+ r"\1",+ html,+ flags=re.I,+ )+ html, math_store = _protect_math(html)+ if math_store:+ html = _restore_math(html, math_store)+ return html+++def should_force_target_width(ocr_text: str) -> bool:+ """Only tables / block HTML should be stretched to the ground-truth width.++ Ordinary short text looks better sized to its own content.+ """+ if not isinstance(ocr_text, str):+ return False+ return bool(re.search(r"<(?:table|tr|td|th)\b", ocr_text, re.I))+++TABLE_LAYOUT_SCRIPT = r"""(targetWidth) => {+ const area = document.getElementById('capture-area');+ if (!area) return;+ const tables = Array.from(area.querySelectorAll('table'));++ const visualLength = (text) => {+ let score = 0;+ for (const ch of Array.from(text || '')) {+ score += /[\u2e80-\u9fff\uff00-\uffef]/.test(ch) ? 2 : 1;+ }+ return score;+ };++ if (!tables.length) {+ const MIN_TEXT_WIDTH = 480;+ const MAX_TEXT_WIDTH = 1200;+ const MAX_ASPECT_RATIO = 8;+ const MIN_MEANINGFUL_WIDTH = 1;++ const clearTextWidth = () => {+ area.classList.remove('long-text-wrap');+ area.style.width = '';+ area.style.maxWidth = '';+ area.style.whiteSpace = '';+ area.style.wordBreak = '';+ area.style.overflowWrap = '';+ area.style.boxSizing = '';+ for (const el of area.querySelectorAll('*')) {+ el.style.maxWidth = '';+ el.style.wordBreak = '';+ el.style.overflowWrap = '';+ }+ };++ const applyTextWidth = (width) => {+ const px = `${Math.round(width)}px`;+ area.classList.add('long-text-wrap');+ area.style.width = px;+ area.style.maxWidth = px;+ area.style.whiteSpace = 'normal';+ area.style.wordBreak = 'break-word';+ area.style.overflowWrap = 'anywhere';+ area.style.boxSizing = 'border-box';+ for (const el of area.querySelectorAll('*')) {+ const katexRoot = el.closest('.katex');+ if (katexRoot) {+ // Do not touch KaTeX's internal layout. Its zero-width+ // positioning boxes (.llap/.rlap/.clap > .inner, whose width+ // comes from the containing .llap having width:0) get clamped+ // to zero width by max-width:100%, which drops the overstruck+ // slash back into normal flow - \notin then renders as an+ // element-of sign followed by a loose slash. Keep max-width+ // on the .katex root only, to stop it overflowing.+ if (el === katexRoot) { el.style.maxWidth = '100%'; }+ continue;+ }+ el.style.maxWidth = '100%';+ if (!['PRE', 'CODE'].includes(el.tagName)) {+ el.style.wordBreak = 'break-word';+ el.style.overflowWrap = 'anywhere';+ }+ }+ };++ const taggedDisplays = Array.from(area.querySelectorAll('.katex-display')).filter(+ (display) => display.querySelector('.katex-html > .tag')+ );+ if (taggedDisplays.length) {+ clearTextWidth();+ let requiredWidth = 0;+ for (const display of taggedDisplays) {+ const katexHtml = display.querySelector('.katex-html');+ const tag = katexHtml?.querySelector(':scope > .tag');+ if (!katexHtml || !tag) continue;+ const bodyWidth = Array.from(katexHtml.children)+ .filter((child) => child !== tag)+ .reduce((sum, child) => sum + child.getBoundingClientRect().width, 0);+ const tagWidth = tag.getBoundingClientRect().width;+ requiredWidth = Math.max(requiredWidth, bodyWidth + 2 * tagWidth + 32);+ }++ const requestedWidth = Number(targetWidth);+ const boundedTarget = Number.isFinite(requestedWidth) && requestedWidth > 0+ ? Math.min(requestedWidth, MAX_TEXT_WIDTH)+ : 0;+ const width = Math.max(requiredWidth, boundedTarget);+ if (width > 0) {+ const px = `${Math.ceil(width)}px`;+ area.style.width = px;+ area.style.maxWidth = px;+ area.style.boxSizing = 'border-box';+ }+ return;+ }++ const measure = () => {+ const rect = area.getBoundingClientRect();+ const width = Math.max(MIN_MEANINGFUL_WIDTH, rect.width || area.scrollWidth || 0);+ const height = Math.max(MIN_MEANINGFUL_WIDTH, rect.height || area.scrollHeight || 0);+ return {width, height, ratio: width / height};+ };++ clearTextWidth();+ const natural = measure();+ if (natural.ratio <= MAX_ASPECT_RATIO || natural.width <= MIN_TEXT_WIDTH) return;++ let high = Math.min(MAX_TEXT_WIDTH, natural.width);+ applyTextWidth(high);+ const highMeasure = measure();+ if (highMeasure.ratio <= MAX_ASPECT_RATIO) return;++ let low = MIN_TEXT_WIDTH;+ applyTextWidth(low);+ const lowMeasure = measure();+ if (lowMeasure.ratio > MAX_ASPECT_RATIO) return;++ let best = low;+ for (let i = 0; i < 12; i += 1) {+ const mid = (low + high) / 2;+ applyTextWidth(mid);+ const current = measure();+ if (current.ratio <= MAX_ASPECT_RATIO) {+ best = mid;+ low = mid;+ } else {+ high = mid;+ }+ }+ applyTextWidth(best);+ return;+ }++ const maxWidth = Math.max(900, Math.min(Number(targetWidth) || 1200, 1200));+ area.style.width = `${maxWidth}px`;+ area.style.maxWidth = `${maxWidth}px`;++ const cellScore = (cell) => {+ const text = (cell.innerText || '').replace(/\s+/g, ' ').trim();+ if (!text) return 1;+ const tokens = text.split(/\s+/).filter(Boolean);+ const longestToken = tokens.reduce((m, token) => Math.max(m, visualLength(token)), 0);+ const total = visualLength(text);+ return Math.max(4, Math.min(80, Math.max(longestToken, Math.sqrt(total) * 6)));+ };++ for (const table of tables) {+ table.querySelectorAll('colgroup').forEach((el) => el.remove());+ table.removeAttribute('width');+ table.style.width = '100%';+ table.style.maxWidth = '100%';+ table.style.minWidth = '0';+ table.style.tableLayout = 'fixed';+ for (const cell of table.querySelectorAll('th, td')) {+ cell.removeAttribute('width');+ cell.style.width = '';+ cell.style.minWidth = '0';+ cell.style.maxWidth = '';+ cell.style.whiteSpace = 'normal';+ cell.style.wordBreak = 'break-word';+ cell.style.overflowWrap = 'anywhere';+ }++ const rows = Array.from(table.rows);+ const colCount = rows.reduce((maxCols, row) => {+ const cols = Array.from(row.cells).reduce((sum, cell) => sum + Math.max(1, cell.colSpan || 1), 0);+ return Math.max(maxCols, cols);+ }, 0);+ if (!colCount) continue;++ const weights = Array(colCount).fill(1);+ const pending = Array(colCount).fill(0); // rows still covered by a rowspan above+ for (const row of rows) {+ let col = 0;+ for (const cell of row.cells) {+ while (col < colCount && pending[col] > 0) col += 1; // skip columns held by a rowspan+ const span = Math.max(1, cell.colSpan || 1);+ const rspan = Math.max(1, cell.rowSpan || 1);+ const score = cellScore(cell) / span;+ for (let i = 0; i < span && col + i < colCount; i += 1) {+ weights[col + i] = Math.max(weights[col + i], score);+ if (rspan > 1) pending[col + i] = Math.max(pending[col + i], rspan);+ }+ col += span;+ }+ for (let i = 0; i < colCount; i += 1) if (pending[i] > 0) pending[i] -= 1;+ }++ const totalWeight = weights.reduce((sum, value) => sum + value, 0) || colCount;+ const colgroup = document.createElement('colgroup');+ colgroup.dataset.autoLayout = 'true';+ for (const weight of weights) {+ const col = document.createElement('col');+ col.style.width = `${(weight / totalWeight) * 100}%`;+ colgroup.appendChild(col);+ }+ table.prepend(colgroup);+ }+}"""+++def strip_formula_delimiters(latex: str) -> str:+ """Strip the usual formula wrappers from training text, keeping the body."""+ s = (latex or "").strip()+ wrappers = (+ (r"\[", r"\]"),+ (r"\(", r"\)"),+ ("$$", "$$"),+ ("$", "$"),+ )+ changed = True+ while changed:+ changed = False+ for left, right in wrappers:+ if s.startswith(left) and s.endswith(right) and len(s) >= len(left) + len(right):+ s = s[len(left): len(s) - len(right)].strip()+ changed = True+ return s+++def formula_requires_playwright(latex: str) -> bool:+ """Detect Unicode enclosed characters that a LaTeX toolchain drops silently."""+ return bool(_FORMULA_PLAYWRIGHT_ONLY_RE.search(strip_formula_delimiters(latex)))+++def _trim_white_border(img: Image.Image, padding: int = 8) -> Image.Image:+ """Crop the wide white border off a rendered page image."""+ bg = Image.new(img.mode, img.size, "white")+ diff = ImageChops.difference(img, bg)+ bbox = diff.getbbox()+ if not bbox:+ return img+ left = max(bbox[0] - padding, 0)+ top = max(bbox[1] - padding, 0)+ right = min(bbox[2] + padding, img.width)+ bottom = min(bbox[3] + padding, img.height)+ return img.crop((left, top, right, bottom))+++def _find_katex_asset_dir() -> Path | None:+ assets = _find_katex_assets()+ if assets:+ return assets[0].parent+ return None+++def _find_katex_assets() -> tuple[Path, Path, Path] | None:+ env_dir = os.environ.get("KATEX_ASSET_DIR")+ candidates = [Path(env_dir)] if env_dir else []+ candidates.extend(_KATEX_ASSET_DIR_CANDIDATES)+ for path in candidates:+ css = path / "katex.min.css"+ katex_js = path / "katex.min.js"+ auto_render_candidates = (+ path / "auto-render.min.js",+ path / "contrib" / "auto-render.min.js",+ )+ auto_render_js = next((p for p in auto_render_candidates if p.is_file()), None)+ if path.is_dir() and css.is_file() and katex_js.is_file() and auto_render_js:+ return css, katex_js, auto_render_js+ return None+++def _katex_css_with_inlined_fonts(css_path: Path) -> str:+ resolved_css = css_path.resolve()+ cached = _KATEX_CSS_CACHE.get(resolved_css)+ if cached is not None:+ return cached++ css = resolved_css.read_text(encoding="utf-8")++ def inline_font(match: re.Match[str]) -> str:+ font_path = resolved_css.parent / match.group("path")+ if not font_path.is_file():+ raise FileNotFoundError(f"KaTeX font not found: {font_path}")+ encoded = base64.b64encode(font_path.read_bytes()).decode("ascii")+ return f'url("data:font/woff2;base64,{encoded}")'++ inlined_css, count = _KATEX_WOFF2_URL_RE.subn(inline_font, css)+ if count == 0:+ raise ValueError(f"No KaTeX WOFF2 font URLs found in {resolved_css}")+ _KATEX_CSS_CACHE[resolved_css] = inlined_css+ return inlined_css+++def _cdn_katex_assets_html() -> str:+ """Return optional CDN KaTeX tags.++ Rendering jobs run in offline compute environments, so external resources are+ disabled by default. Set KATEX_ENABLE_CDN=1 for ad-hoc online debugging.+ """+ if _find_katex_assets():+ return ""+ if os.environ.get("KATEX_ENABLE_CDN", "").lower() not in {"1", "true", "yes"}:+ return ""+ return "\n".join(+ [+ '<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css">',+ '<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js"></script>',+ '<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js"></script>',+ ]+ )+++def wrap_html(content: str) -> str:+ """Wrap a fragment in a full HTML page for Playwright to screenshot."""+ return f"""<!DOCTYPE html><html><head><meta charset="UTF-8">+{_cdn_katex_assets_html()}+<style>+body {{ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",+ "Noto Sans CJK SC", "Source Han Sans SC", "WenQuanYi Micro Hei",+ "Microsoft YaHei", SimSun, sans-serif; padding: 0; margin: 0; background: #fff;+ font-size: 18px; line-height: 2.0; }}+h1 {{ font-size: 1.8em; margin: 0.8em 0 0.4em; }}+h2 {{ font-size: 1.5em; margin: 0.7em 0 0.4em; }}+h3 {{ font-size: 1.3em; margin: 0.5em 0 0.3em; }}+h4, h5, h6 {{ font-size: 1.1em; margin: 0.4em 0 0.3em; }}+p {{ margin: 0.2em 0; }}+table {{ border-collapse: collapse; margin: 0; width: 100%; max-width: 100%; table-layout: fixed; }}+th, td {{ border: 1px solid #999; box-sizing: border-box; padding: 12px; word-break: break-word; overflow-wrap: anywhere; text-align: left; }}+td, th {{ vertical-align: middle; }}+table td, table th {{ white-space: normal; }}+th {{ background-color: #f2f2f2; }}+pre {{ background: #f5f5f5; padding: 12px; border-radius: 4px; overflow-x: auto; }}+code {{ background: #f0f0f0; padding: 2px 4px; border-radius: 3px; font-size: 0.9em; }}+pre code {{ background: none; padding: 0; }}+blockquote {{ border-left: 4px solid #ddd; margin: 0.6em 0; padding: 0.4em 1em; color: #555; }}+ul, ol {{ margin: 0.5em 0; padding-left: 1.5em; }}+li {{ margin: 0.3em 0; }}+.math-display {{ display: block; text-align: center; margin: 0.8em 0; }}+#capture-area {{ display: inline-block; }}+</style></head><body><div id="capture-area">{content}</div>+<script>+document.addEventListener("DOMContentLoaded", function() {{+ if (typeof renderMathInElement !== 'undefined') {{+ renderMathInElement(document.getElementById("capture-area"), {{+ delimiters: [+ {{left: "$$", right: "$$", display: true}},+ {{left: "$", right: "$", display: false}},+ {{left: "\\\\(", right: "\\\\)", display: false}},+ {{left: "\\\\[", right: "\\\\]", display: true}}+ ],+ throwOnError: false+ }});+ }}+}});+</script></body></html>"""+++async def _load_local_katex_assets(page: Any) -> bool:+ """Inject the local KaTeX assets the way Omni/olmOCR does.++ The assets are added as inline style/script tags because the browser blocks+ file:// resources loaded from a set_content page.+ """+ assets = _find_katex_assets()+ if not assets:+ return False+ css, katex_js, auto_render_js = assets+ await page.add_style_tag(content=_katex_css_with_inlined_fonts(css))+ await page.add_script_tag(path=str(katex_js))+ await page.add_script_tag(path=str(auto_render_js))+ return True+++async def _render_math_in_page(page: Any) -> None:+ """Render each span protected by _protect_math with a direct katex.render call.++ KaTeX's auto-render is deliberately bypassed. Its findEndOfMath balances+ braces while pairing delimiters - with a net unclosed `{` it refuses to pair+ and prints the whole span literally - which disagrees with the reference+ renderer (the markdown-it math plugin): that one pairs without counting+ braces and hands the body straight to KaTeX, producing a ParseError. Going+ span by span makes the static checker, this pipeline and the reference+ renderer agree on where a span starts and ends, and removes a second round+ of delimiter pairing between the restored wrapper and any `$` inside it.+ """+ await page.evaluate(+ """() => {+ if (typeof katex === 'undefined') return false;+ const els = document.querySelectorAll(+ '#capture-area .math-display, #capture-area .math-inline');+ for (const el of els) {+ if (el.dataset.mathDone) continue;+ el.dataset.mathDone = '1';+ let body = el.textContent;+ const disp = el.classList.contains('math-display');+ if (disp && body.startsWith('$$') && body.endsWith('$$')) {+ body = body.slice(2, -2);+ } else if (!disp && body.startsWith('\\\\(') && body.endsWith('\\\\)')) {+ body = body.slice(2, -2);+ }+ // Same semantics as the reference renderer: KaTeX's default+ // throwOnError:true plus a catch that displays the message.+ // Both undefined commands and structural errors raise there;+ // there is no "keep rendering and show the bad fragment in red".+ try {+ katex.render(body, el, {throwOnError: true, displayMode: disp});+ } catch (e) {+ const span = document.createElement('span');+ span.className = 'katex-error';+ span.style.color = '#cc0000';+ span.title = String(e);+ span.textContent = String(e);+ el.replaceChildren(span);+ }+ }+ return true;+ }"""+ )+++def _katex_error_page_html(errors: list[str]) -> str:+ """Build the error image used for ParseError candidates.++ For a ParseError the rendered image is a picture of the error text itself.+ No heading line: only the error messages are shown.+ """+ items = "".join(+ '<li><pre class="err-msg">' + html_lib.escape(e) + "</pre></li>" for e in errors+ )+ return f"""<!DOCTYPE html><html><head><meta charset="UTF-8"><style>+body {{ margin: 0; padding: 0; background: #fff; font-family: -apple-system, "Segoe UI",+ "Noto Sans CJK SC", "Microsoft YaHei", sans-serif; }}+#capture-area {{ display: inline-block; max-width: 1100px; padding: 14px 18px;+ box-sizing: border-box; }}+ol {{ margin: 0; padding-left: 1.4em; }}+li {{ margin: 6px 0; }}+.err-msg {{ color: #cc0000; font-family: Menlo, Consolas, monospace; font-size: 15px;+ white-space: pre-wrap; word-break: break-word; margin: 0; }}+</style></head><body><div id="capture-area">+<ol>{items}</ol>+</div></body></html>"""+++async def _collect_katex_errors(page: Any) -> list[str]:+ try:+ errors = await page.evaluate(+ """() => Array.from(document.querySelectorAll('.katex-error')).map((el) => {+ const title = (el.getAttribute('title') || '').trim();+ if (title) return title;+ return 'KaTeX error: ' + (el.textContent || '').slice(0, 300);+ })"""+ )+ return [str(e) for e in (errors or [])]+ except Exception:+ return ["KaTeX error: <failed to collect error detail>"]+++async def _render_katex_error_image(page: Any, errors: list[str]) -> Image.Image | None:+ await page.set_content(+ _katex_error_page_html(errors), wait_until="domcontentloaded", timeout=15000+ )+ el = await page.query_selector("#capture-area")+ if not el:+ return None+ buf = await el.screenshot(type="png")+ return Image.open(io.BytesIO(buf)).convert("RGB")+++async def render_to_pil(+ context: Any,+ html: str,+ target_width: int | None = None,+ target_height: int | None = None,+ formula_mode: bool = False,+ collect_errors: bool = False,+) -> "Image.Image | None | tuple[Image.Image | None, list[str]]":+ """Render OCR output into a PIL Image.++ The width can be aligned with the source image; the height always follows+ the content.++ When the page ends up containing a `.katex-error` (i.e. a ParseError):+ - collect_errors=True: the returned image is the error-text image, as+ (image, error_list). Without an error it returns (normal image, []).+ Commands or stray delimiters that merely show up literally in the real+ rendering are not ParseErrors, so those still produce the normal image and+ are judged by comparing the rendered image with the source image.+ - collect_errors=False: returns None, which is the older behaviour kept for+ backwards compatibility with existing callers.+ """+ page = await context.new_page()+ try:+ rendered_content = prepare_render_content(html, formula_mode=formula_mode)+ await page.set_content(wrap_html(rendered_content), wait_until="domcontentloaded", timeout=15000)+ if await _load_local_katex_assets(page):+ await _render_math_in_page(page)+ await page.evaluate(_KATEX_FONT_PRELOAD_SCRIPT)++ await page.evaluate("() => document.fonts.ready")+ await page.evaluate(TABLE_LAYOUT_SCRIPT, target_width)++ try:+ await _render_math_in_page(page)+ await page.wait_for_function(+ """() => {+ if (typeof katex === 'undefined') return true;+ const mathText = document.getElementById('capture-area').innerText;+ return !mathText.includes('$$') && !mathText.includes('\\\\[') && !mathText.includes('\\\\(');+ }""",+ timeout=5000,+ )+ except Exception:+ pass++ await page.evaluate("() => document.fonts.ready")+ await page.evaluate(_DISPLAY_MATH_FIT_SCRIPT)+ await page.wait_for_timeout(300)+ if await page.query_selector(".katex-error"):+ if collect_errors:+ errors = await _collect_katex_errors(page)+ err_img = await _render_katex_error_image(page, errors)+ return err_img, errors+ print("[WARN] KaTeX failed to parse the formula")+ return None+ el = await page.query_selector("#capture-area")+ if not el:+ return (None, []) if collect_errors else None+ buf = await el.screenshot(type="png")+ img = _trim_white_border(Image.open(io.BytesIO(buf)).convert("RGB"), padding=16)+ return (img, []) if collect_errors else img+ except Exception as exc:+ print(f"[WARN] render failed: {exc}")+ return (None, []) if collect_errors else None+ finally:+ await page.close()+++def pil_to_b64(img: Image.Image) -> str:+ """Encode a PIL image as a base64 PNG, keeping its original size."""+ buf = io.BytesIO()+ img.convert("RGB").save(buf, format="PNG")+ return base64.b64encode(buf.getvalue()).decode()+++def bytes_to_pil(raw: bytes) -> Image.Image | None:+ """Decode image bytes into an RGB PIL Image."""+ try:+ return Image.open(io.BytesIO(raw)).convert("RGB")+ except Exception:+ return Nonediff --git a/scripts/minicpm-ocr-jev/renderer/render_triple_rm_labels.py b/scripts/minicpm-ocr-jev/renderer/render_triple_rm_labels.pynew file mode 100644index 0000000..9b03c35--- /dev/null+++ b/scripts/minicpm-ocr-jev/renderer/render_triple_rm_labels.py@@ -0,0 +1,740 @@+#!/usr/bin/env python3+"""Render OCR label text for triple-input OCR reward-model inference.++Rendering pipeline (v8 / v8.5 behaviour):+- Every category is rendered by headless Chromium + KaTeX (version pinned to+ 0.16.47). The old pdflatex/LaTeX toolchain for the `formula` category was+ dropped in v8, together with its "LaTeX is missing a glyph -> fall back to+ KaTeX" recovery chain: KaTeX is now the reference renderer, so the fallback+ direction is reversed and no longer needed.+- `formula` rows are rendered in `formula_mode`: math-span splitting does not+ grant the HTML-boundary exemption, and a bare formula body is mechanically+ wrapped in `$$..$$` (see render_label.prepare_formula_candidate).+- On a KaTeX ParseError the rendered image becomes an image of the error text+ instead of the markdown render. The manifest then carries `katex_errors` and+ the `render_method` gets a `_katex_error_image` suffix, so downstream code can+ reject the sample. Without a ParseError the real markdown render is written.+- v8.5 sets the device pixel ratio per class instead of a single shared value:+ formula ~3.0 (to match the sharpness of the retired pdflatex output) and+ text/table 1.0 (which restores the pre-v8 page layout).++Input JSONL rows must follow this fixed schema:++{+ "case_id": "unique sample id",+ "image_path": "/path/to/original.png",+ "label_text": "OCR label text to judge",+ "category": "text|formula|table|...",+ "meta": {},+ "render_image_path": "/optional/existing/rendered_label.png"+}++`meta` and `render_image_path` are optional. If `render_image_path` is present,+the image is reused directly and this script does not render that sample again.+"""++from __future__ import annotations++import argparse+import asyncio+from collections import Counter+import html as html_lib+import importlib.util+import json+import os+from pathlib import Path+import re+import shutil+import sys+import time+from typing import Any++from PIL import Image+from playwright.async_api import async_playwright+++DEFAULT_RENDER_MODULE_DIR = Path(__file__).resolve().parent / "render_module"+# Honour PLAYWRIGHT_BROWSERS_PATH when it is set; otherwise leave it unset so+# Playwright falls back to its own standard browser cache location.+_PLAYWRIGHT_BROWSERS_PATH_ENV = os.environ.get("PLAYWRIGHT_BROWSERS_PATH")+DEFAULT_PLAYWRIGHT_BROWSERS_PATH = (+ Path(_PLAYWRIGHT_BROWSERS_PATH_ENV) if _PLAYWRIGHT_BROWSERS_PATH_ENV else None+)++REQUIRED_INPUT_FIELDS = {"case_id", "image_path", "label_text", "category"}+OPTIONAL_INPUT_FIELDS = {"meta", "render_image_path"}+ALLOWED_INPUT_FIELDS = REQUIRED_INPUT_FIELDS | OPTIONAL_INPUT_FIELDS+FORMULA_CATEGORY_TOKENS = (+ "formula",+ "equation",+ "math",+ "公式",+)+FORMULA_GROUPS = {+ "formula",+ "equation_isolated",+ "equation_semantic",+ "display_formula",+ "inline_formula",+}++_HTML_TAG_PATTERN = r"</?[A-Za-z][A-Za-z0-9:-]*(?:\s+[^<>]*)?>"+_SINGLE_DOLLAR_RE = re.compile(+ rf"(?<!\$)\$(?!\$)((?:(?!{_HTML_TAG_PATTERN})(?!\$).)+?)(?<!\$)\$(?!\$)",+ re.S,+)+_HTML_BOUNDARY_IN_MATH_RE = re.compile(+ r"(?:<\s*/?\s*[A-Za-z][A-Za-z0-9:-]*(?:\s+[^<>]*)?\s*/?\s*>|"+ r"<\s*/?\s*[A-Za-z][A-Za-z0-9:-]*(?:\s+[^&<>]*)?\s*/?\s*>)",+ re.I,+)+_STRONG_MATH_RE = re.compile(+ r"(\\|[_^{}=<>+*/]|[A-Za-z]\s*'+\s*(?:\(|[A-Za-z0-9])|"+ r"\b(?:alpha|beta|gamma|theta|lambda|mu|pi|sigma|omega|sqrt|frac|sum|int|"+ r"lfloor|rfloor|mathrm|mathbb|operatorname|begin|end|times|cdot|leq|geq|pmod)\b)"+)+_SIMPLE_MATH_IDENT_RE = re.compile(r"[A-Za-z][A-Za-z0-9]*(?:\s*[,;]\s*[A-Za-z][A-Za-z0-9]*)*")+_PROSE_WORD_RE = re.compile(r"\b(?:or|and|in|by|with|for|to|from|of|the|a|an)\b", re.I)+++def read_jsonl(path: Path) -> list[dict[str, Any]]:+ rows: list[dict[str, Any]] = []+ with path.open(encoding="utf-8") as f:+ for line_no, line in enumerate(f, start=1):+ if not line.strip():+ continue+ row = json.loads(line)+ row["_source_line_no"] = line_no+ rows.append(row)+ return rows+++def write_jsonl(path: Path, rows: list[dict[str, Any]]) -> None:+ path.parent.mkdir(parents=True, exist_ok=True)+ with path.open("w", encoding="utf-8") as f:+ for row in rows:+ f.write(json.dumps(row, ensure_ascii=False, separators=(",", ":")) + "\n")+++def safe_name(value: str, max_len: int = 120) -> str:+ value = re.sub(r"[^\w.-]+", "_", value, flags=re.UNICODE).strip("._")+ return (value[:max_len] or "unknown").strip("._") or "unknown"+++def parse_path_remaps(values: list[str]) -> list[tuple[str, str]]:+ remaps: list[tuple[str, str]] = []+ for value in values:+ if "=" not in value:+ raise ValueError(f"Invalid --path-remap {value!r}; expected OLD=NEW")+ old, new = value.split("=", 1)+ if not old or not new:+ raise ValueError(f"Invalid --path-remap {value!r}; expected OLD=NEW")+ remaps.append((old.rstrip("/"), new.rstrip("/")))+ return remaps+++def resolve_path(path_text: str, remaps: list[tuple[str, str]]) -> Path:+ path = Path(path_text)+ if path.exists():+ return path+ for old, new in remaps:+ if path_text == old or path_text.startswith(old + "/"):+ candidate = Path(new + path_text[len(old):])+ if candidate.exists():+ return candidate+ return path+++def normalize_row(row: dict[str, Any], args: argparse.Namespace, remaps: list[tuple[str, str]]) -> dict[str, Any]:+ line_no = int(row.get("_source_line_no") or 0)+ public_keys = set(row) - {"_source_line_no"}+ missing = sorted(REQUIRED_INPUT_FIELDS - public_keys)+ extra = sorted(public_keys - ALLOWED_INPUT_FIELDS)+ if missing:+ raise ValueError(f"Line {line_no} missing required fields: {missing}")+ if extra:+ raise ValueError(+ f"Line {line_no} has unsupported top-level fields: {extra}. "+ "Put additional metadata under `meta`."+ )++ case_id = str(row["case_id"]).strip()+ if not case_id:+ raise ValueError(f"Line {line_no} has empty case_id")+ image_path = resolve_path(str(row["image_path"]), remaps)+ label_text = str(row["label_text"])+ category = str(row["category"]).strip()+ if not category:+ raise ValueError(f"Line {line_no} has empty category")+ meta = row.get("meta") or {}+ if not isinstance(meta, dict):+ raise ValueError(f"Line {line_no} field `meta` must be an object when present")++ provided_render_image_path = None+ if row.get("render_image_path"):+ render_path = resolve_path(str(row["render_image_path"]), remaps)+ if not render_path.is_file():+ raise FileNotFoundError(f"Line {line_no} render_image_path does not exist: {render_path}")+ provided_render_image_path = str(render_path)++ return {+ "case_id": case_id,+ "source_line_no": line_no,+ "source_index": line_no - 1,+ "image_path": str(image_path),+ "image_exists": image_path.is_file(),+ "candidate_label": label_text,+ "category": category,+ "meta": meta,+ "provided_render_image_path": provided_render_image_path,+ "_file_stem": f"{line_no:08d}_{safe_name(case_id)}",+ }+++def is_formula_category(category: str) -> bool:+ category_l = str(category or "").lower()+ return category_l in FORMULA_GROUPS or any(token in category_l for token in FORMULA_CATEGORY_TOKENS)+++def should_render_as_formula(row: dict[str, Any]) -> bool:+ """Decide whether a row goes through the browser's KaTeX `formula_mode`.++ Since v8 the routing looks at `category` only. Older versions additionally+ required a formula wrapper (delimiters) or a category keyword, because that+ decision also chose whether to hand the row to the LaTeX toolchain. With+ KaTeX as the single reference renderer, every formula row is rendered in+ `formula_mode` whether or not it carries delimiters; a bare formula body is+ wrapped in `$$..$$` by prepare_formula_candidate.+ """+ return is_formula_category(str(row.get("category") or ""))+++def should_treat_single_dollar_as_math(content: str) -> bool:+ """Must stay in sync with render_label._accept_single_dollar_math.++ The old implementation was a pile of heuristics (isdigit / simple-identifier+ / prose-word / character-class allowlist). It both emitted `$333$` literally+ instead of as math and, because of the prose-word list, misjudged `$a$` and+ `$A(0,0)$` as prose. Following the "markdown is the reference" principle this+ converged to: treat a single-dollar span as math by default, and reject only+ the narrow currency case.+ """+ text = content.strip()+ if not text:+ return False+ if _HTML_BOUNDARY_IN_MATH_RE.search(text):+ return False+ if _STRONG_MATH_RE.search(text):+ return True+ if text[0].isdigit() and _PROSE_WORD_RE.search(text):+ # e.g. `It costs $5 or $10`: starts with a digit and contains a prose+ # connective word -> treat as currency, not math.+ return False+ return True+++def _is_escaped(text: str, pos: int) -> bool:+ n = 0+ i = pos - 1+ while i >= 0 and text[i] == "\\":+ n += 1+ i -= 1+ return n % 2 == 1+++def normalize_single_dollar_math(text: str) -> str:+ """Rewrite single-`$` inline math as `\\( \\)` using a single left-to-right+ scan, matching how KaTeX auto-render pairs delimiters.++ Bug fix: the old implementation used one regex substitution that required+ the closing `$` to have no `$` on either side and excluded `$` from the span+ content. That paired unreliably for adjacent inline spans such as+ `$ A $ B $ C $`, where the same `$` is both a closing and an opening+ delimiter. It also did not skip `$$` display math first, so a `$$` block+ could be cut in half by the single-`$` rule. A single scan matches `$$`+ before `$`, which makes the pairing unambiguous.+ """+ if "$" not in text:+ return text+ out: list[str] = []+ i = 0+ n = len(text)+ while i < n:+ if text.startswith("$$", i) and not _is_escaped(text, i):+ end = text.find("$$", i + 2)+ if end >= 0:+ out.append(text[i:end + 2])+ i = end + 2+ continue+ if text[i] == "$" and not _is_escaped(text, i):+ j = i + 1+ end = -1+ while j < n:+ ch = text[j]+ if ch == "\n":+ break+ if ch == "$" and not _is_escaped(text, j):+ end = j+ break+ j += 1+ if end > i + 1:+ content = text[i + 1:end]+ if content.strip() and should_treat_single_dollar_as_math(content):+ out.append(r"\(" + content.strip() + r"\)")+ i = end + 1+ continue+ # When the span is rejected, advance by a single `$`: KaTeX pairs+ # delimiters inside one text node, so a `$` cannot cross+ # `</td><td>`. Skipping past the rejected closing delimiter would+ # make one stray `$` in a table shift every later pairing by one.+ out.append("$")+ i += 1+ continue+ out.append(text[i])+ i += 1+ return "".join(out)+++def load_render_module(module_dir: Path) -> Any:+ module_path = module_dir / "render_label.py"+ if not module_path.is_file():+ raise FileNotFoundError(f"Missing render_label.py under {module_dir}")+ spec = importlib.util.spec_from_file_location("render_label_for_rm_eval", module_path)+ if spec is None or spec.loader is None:+ raise ImportError(f"Cannot import render module from {module_path}")+ module = importlib.util.module_from_spec(spec)+ sys.modules[spec.name] = module+ spec.loader.exec_module(module)+ return module+++def ensure_dirs(output_dir: Path, clean: bool) -> None:+ if clean and output_dir.exists():+ shutil.rmtree(output_dir)+ for subdir in ("label_images", "label_text"):+ (output_dir / subdir).mkdir(parents=True, exist_ok=True)+++def render_image_path(output_dir: Path, row: dict[str, Any]) -> Path:+ return output_dir / "label_images" / f"{row['_file_stem']}.png"+++def label_text_path(output_dir: Path, row: dict[str, Any]) -> Path:+ return output_dir / "label_text" / f"{row['_file_stem']}.txt"+++def existing_render_result(path: Path, *, unlink_bad: bool = True) -> dict[str, Any] | None:+ if not path.exists():+ return None+ try:+ with Image.open(path) as img:+ return {"render_ok": True, "render_width": img.width, "render_height": img.height}+ except Exception:+ if unlink_bad:+ path.unlink(missing_ok=True)+ return None+++def previous_manifest(output_dir: Path) -> dict[str, dict[str, Any]]:+ """Load the previous manifest.jsonl indexed by case_id; empty if absent or unreadable.++ A resumed run needs this to recover the "image was produced, but KaTeX+ reported an error" verdict, which exists only in the manifest: the file on+ disk is an image of the error text and is indistinguishable from a normal+ render. Losing `katex_errors` would turn a block that should be rejected by+ the precheck into a scored one.+ """+ path = output_dir / "manifest.jsonl"+ if not path.exists():+ return {}+ try:+ return {str(row["case_id"]): row for row in read_jsonl(path) if row.get("case_id")}+ except (json.JSONDecodeError, KeyError, OSError) as exc:+ print(f"[WARN] previous manifest unreadable ({type(exc).__name__}: {exc}), re-rendering all", flush=True)+ return {}+++def provided_render_results(rows: list[dict[str, Any]]) -> dict[int, dict[str, Any]]:+ results: dict[int, dict[str, Any]] = {}+ for row in rows:+ render_path = Path(str(row.get("provided_render_image_path") or ""))+ cached = existing_render_result(render_path, unlink_bad=False)+ if cached:+ cached["render_method"] = "provided_cached"+ cached["render_image_path"] = str(render_path)+ results[int(row["source_line_no"])] = cached+ else:+ results[int(row["source_line_no"])] = {+ "render_ok": False,+ "render_method": "provided_cached",+ "render_error": "provided_render_image_invalid",+ "render_image_path": str(render_path),+ }+ return results+++def target_width_for_row(row: dict[str, Any]) -> int | None:+ image_path = Path(str(row.get("image_path") or ""))+ if not image_path.exists():+ return None+ try:+ with Image.open(image_path) as img:+ return img.width+ except Exception:+ return None+++def device_scale_factors(render_module: Any) -> dict[bool, float]:+ """Device pixel ratio per render class, keyed by `formula_mode`.++ v8.5 replaced the single shared value of 2 with a per-class setting:+ formula ~3.0 to match the sharpness of the retired pdflatex output, and+ text/table back to 1 to restore the pre-v8 page layout. The policy constant+ lives in the render module (DEVICE_SCALE_FACTOR_BY_CLASS); this function only+ reads it per formula_mode. Both contexts share one browser.+ """+ getter = getattr(render_module, "device_scale_factor_for", None)+ if getter is None: # render modules at v8.4 and older: keep the flat value of 2+ return {False: 2.0, True: 2.0}+ return {mode: float(getter(mode)) for mode in (False, True)}+++async def open_browser_contexts(browser: Any, render_module: Any) -> dict[bool, Any]:+ """Open one context per formula_mode on a shared browser, with DPR from the render module.++ This is a separate function so that the long-lived render pool and this+ script's own subprocess path construct contexts with the exact same code.+ The rendered bytes of the two paths must be byte-for-byte identical, and+ sharing the code is what guarantees it, instead of manually keeping two+ implementations aligned.+ """+ dsf = device_scale_factors(render_module)+ contexts: dict[bool, Any] = {}+ for _formula_mode in (False, True):+ contexts[_formula_mode] = await browser.new_context(+ viewport={"width": 1600, "height": 1200},+ device_scale_factor=dsf[_formula_mode],+ )+ print(f"[render] device_scale_factor text/table={dsf[False]} formula={dsf[True]}", flush=True)+ return contexts+++async def render_browser_rows(+ rows: list[dict[str, Any]],+ output_dir: Path,+ render_module: Any,+ concurrency: int,+ prior: dict[str, dict[str, Any]] | None = None,+ contexts: dict[bool, Any] | None = None,+ sem: asyncio.Semaphore | None = None,+) -> dict[int, dict[str, Any]]:+ """Render a batch of rows.++ Passing `contexts`/`sem` selects the long-lived pool path: the caller's+ already-built browser contexts and a semaphore shared across requests are+ used, and this function neither launches nor closes a browser. Passing+ neither selects the subprocess path, which starts its own+ playwright+browser and builds a per-call semaphore. The render semantics are+ fully shared between the two paths (the same holds below).+ """+ results: dict[int, dict[str, Any]] = {}+ if not rows:+ return results++ prior = prior or {}+ # A caller-provided `sem` is process-wide. In the pool, 32 concurrent+ # requests each building their own Semaphore(4) would yield 128 lanes, i.e.+ # no throttling at all, so the concurrency cap must be held by the pool.+ sem = sem if sem is not None else asyncio.Semaphore(max(1, concurrency))+ owns_browser = contexts is None+ playwright = browser = None+ if owns_browser:+ playwright = await async_playwright().start()+ browser = await playwright.chromium.launch(headless=True)+ contexts = await open_browser_contexts(browser, render_module)+ completed = 0++ async def render_candidate_text(+ text: str, target_width: int | None, formula_mode: bool+ ) -> tuple[Image.Image | None, list[str]]:+ ctx = contexts[bool(formula_mode)] # v8.5: DPR is per render class+ if formula_mode:+ # v8: let the render module normalize formula rows (wrap a bare body+ # in $$..$$; the single-$ currency rule lives in the module). Do not+ # use the driver-side normalize_single_dollar_math here, because its+ # HTML-boundary rejection does not apply to formula rows.+ normalized = render_module.prepare_formula_candidate(text)+ else:+ # v8.4: text/table rows get no driver-side $ -> \(..\) pre-conversion+ # either. Pre-converting and then letting the module rescan is a+ # double scan: a leftover currency `$` can enclose an+ # already-converted `\(` inside a new math span, which produced real+ # ParseErrors. The module's _protect_math handles all delimiters in a+ # single pass, structurally identical to the offline screener.+ normalized = text+ rendered, katex_errors = await render_module.render_to_pil(+ ctx,+ normalized,+ target_width=target_width,+ formula_mode=formula_mode,+ collect_errors=True,+ )+ if rendered is not None or not text.strip():+ return rendered, katex_errors+ if katex_errors:+ # ParseError case where even the error image failed to render:+ # report the failure honestly, do not fall back to a literal render.+ return None, katex_errors+ literal_html = '<div style="white-space: pre-wrap;">' + html_lib.escape(text) + "</div>"+ literal = await render_module.render_to_pil(ctx, literal_html, target_width=target_width)+ return literal, []++ async def work(row: dict[str, Any]) -> None:+ nonlocal completed+ formula_mode = should_render_as_formula(row)+ method = "browser_formula" if formula_mode else "browser"+ out_path = render_image_path(output_dir, row)+ cached = existing_render_result(out_path)+ if cached:+ cached["render_method"] = method + "_cached"+ # An error-text image and a normal render are indistinguishable on+ # disk; the KaTeX error is recorded only in the manifest. Losing it+ # would let a block that should be rejected through to scoring.+ previous = prior.get(str(row["case_id"])) or {}+ if previous.get("katex_errors"):+ cached["katex_errors"] = previous["katex_errors"]+ results[int(row["source_line_no"])] = cached+ completed += 1+ if completed % 200 == 0 or completed == len(rows):+ print(f"[browser] {completed}/{len(rows)}", flush=True)+ return++ async with sem:+ try:+ rendered, katex_errors = await render_candidate_text(+ str(row.get("candidate_label") or ""),+ target_width=target_width_for_row(row),+ formula_mode=formula_mode,+ )+ if rendered is None:+ result: dict[str, Any] = {+ "render_ok": False,+ "render_method": method,+ "render_error": "katex_error_image_failed" if katex_errors else "render_failed",+ }+ if katex_errors:+ result["katex_errors"] = katex_errors+ results[int(row["source_line_no"])] = result+ else:+ rendered.save(out_path)+ result = {+ "render_ok": True,+ "render_method": method + ("_katex_error_image" if katex_errors else ""),+ "render_width": rendered.width,+ "render_height": rendered.height,+ }+ if katex_errors:+ result["katex_errors"] = katex_errors+ results[int(row["source_line_no"])] = result+ except Exception as exc: # noqa: BLE001+ results[int(row["source_line_no"])] = {+ "render_ok": False,+ "render_method": method,+ "render_error": f"{type(exc).__name__}: {exc}",+ }+ finally:+ completed += 1+ if completed % 200 == 0 or completed == len(rows):+ print(f"[browser] {completed}/{len(rows)}", flush=True)++ try:+ await asyncio.gather(*(asyncio.create_task(work(row)) for row in rows))+ finally:+ if owns_browser: # on the pool path the browser belongs to the pool; never close it here+ for closer in [c.close for c in contexts.values()] + [browser.close, playwright.stop]:+ try:+ await asyncio.wait_for(closer(), timeout=10)+ except Exception as exc: # noqa: BLE001+ print(f"[WARN] Playwright cleanup failed: {type(exc).__name__}: {exc}", flush=True)+ return results+++def build_manifest_rows(+ rows: list[dict[str, Any]],+ output_dir: Path,+ render_results: dict[int, dict[str, Any]],+) -> list[dict[str, Any]]:+ manifest_rows: list[dict[str, Any]] = []+ for row in rows:+ text_path = label_text_path(output_dir, row)+ if not text_path.exists():+ text_path.write_text(str(row.get("candidate_label") or ""), encoding="utf-8")++ result = dict(render_results.get(int(row["source_line_no"]), {"render_ok": False, "render_error": "not_rendered"}))+ result_render_image_path = str(result.pop("render_image_path", "") or render_image_path(output_dir, row))+ if not row.get("image_exists"):+ result["render_ok"] = False+ result["render_error"] = "missing_original_image"+ manifest = {+ "case_id": row["case_id"],+ "source_line_no": row["source_line_no"],+ "source_index": row["source_index"],+ "image_path": row["image_path"],+ "render_image_path": result_render_image_path,+ "candidate_label_text_path": str(text_path),+ "candidate_label": row.get("candidate_label"),+ "category": row.get("category"),+ "image_exists": row.get("image_exists"),+ "meta": row.get("meta") or {},+ **result,+ }+ manifest_rows.append(manifest)+ return manifest_rows+++def count_eval_eligible(manifest_rows: list[dict[str, Any]]) -> int:+ """How many rows are actually usable for scoring.++ A row qualifies when it rendered and both of its images are present on disk.+ This is stricter than `rendered_ok`: a render can succeed and the file still be+ missing by the time the summary is written.+ """+ eligible = 0+ for row in manifest_rows:+ if not row.get("render_ok"):+ continue+ image_path = Path(str(row.get("image_path") or ""))+ render_path = Path(str(row.get("render_image_path") or ""))+ if image_path.exists() and render_path.exists():+ eligible += 1+ return eligible+++def write_summary(path: Path, args: argparse.Namespace, manifest_rows: list[dict[str, Any]], elapsed: float, render_module: Any = None) -> None:+ ok_rows = [row for row in manifest_rows if row.get("render_ok")]+ summary = {+ "input_jsonl": str(args.input_jsonl),+ "output_dir": str(args.output_dir),+ "render_pipeline_version": getattr(render_module, "RENDER_PIPELINE_VERSION", "unknown"),+ "device_scale_factor_by_class": getattr(render_module, "DEVICE_SCALE_FACTOR_BY_CLASS", {"default": 2.0}),+ "katex_pinned_version": getattr(render_module, "KATEX_PINNED_VERSION", "unknown"),+ "num_shards": args.num_shards,+ "shard_id": args.shard_id,+ "total": len(manifest_rows),+ "rendered_ok": len(ok_rows),+ "rendered_failed": len(manifest_rows) - len(ok_rows),+ "katex_error_image_count": sum(1 for row in manifest_rows if row.get("katex_errors")),+ "eval_eligible": count_eval_eligible(manifest_rows),+ "category_counts": dict(Counter(str(row.get("category")) for row in manifest_rows)),+ "render_method_counts": dict(Counter(str(row.get("render_method")) for row in manifest_rows)),+ "failed_error_counts": dict(Counter(str(row.get("render_error")) for row in manifest_rows if not row.get("render_ok"))),+ "formula_concurrency": args.formula_concurrency,+ "browser_concurrency": args.browser_concurrency,+ "elapsed_sec": round(elapsed, 3),+ }+ path.write_text(json.dumps(summary, ensure_ascii=False, indent=2), encoding="utf-8")+++def parse_args() -> argparse.Namespace:+ parser = argparse.ArgumentParser(description=__doc__)+ parser.add_argument("--input-jsonl", type=Path, required=True)+ parser.add_argument("--output-dir", type=Path, required=True)+ parser.add_argument("--render-module-dir", type=Path, default=DEFAULT_RENDER_MODULE_DIR)+ parser.add_argument("--playwright-browsers-path", type=Path, default=DEFAULT_PLAYWRIGHT_BROWSERS_PATH)+ parser.add_argument("--path-remap", action="append", default=[], metavar="OLD=NEW")+ parser.add_argument("--num-shards", type=int, default=1)+ parser.add_argument("--shard-id", type=int, default=0)+ parser.add_argument("--max-samples", type=int, default=None)+ parser.add_argument("--formula-concurrency", type=int, default=8)+ parser.add_argument("--browser-concurrency", type=int, default=8)+ parser.add_argument("--clean", action="store_true")+ return parser.parse_args()+++def validate_args(args: argparse.Namespace) -> None:+ if args.num_shards < 1:+ raise ValueError("--num-shards must be >= 1")+ if args.shard_id < 0 or args.shard_id >= args.num_shards:+ raise ValueError("--shard-id must satisfy 0 <= shard-id < num-shards")+ if not args.input_jsonl.is_file():+ raise FileNotFoundError(f"Missing input JSONL: {args.input_jsonl}")+++async def run_render_job(+ args: argparse.Namespace,+ *,+ contexts: dict[bool, Any] | None = None,+ sem: asyncio.Semaphore | None = None,+ render_module: Any | None = None,+) -> list[dict[str, Any]]:+ """Full orchestration of one render job: read -> render -> write manifest/triple/summary.++ This is an async function so the long-lived render pool can await the same+ orchestration inside the service's event loop, while the subprocess path+ still reaches it through an asyncio.run wrapper in main(). Both paths run+ this single copy of the code, so byte-identical output is a property of the+ construction rather than of manually aligning two implementations. Passing+ contexts/sem/render_module selects the pool; passing none selects the+ plain single-shot behaviour.+ """+ t0 = time.time()+ ensure_dirs(args.output_dir, clean=args.clean)+ prior = {} if args.clean else previous_manifest(args.output_dir)+ if render_module is None: # the pool loads it at startup; no need to exec the module per request+ render_module = load_render_module(args.render_module_dir)+ remaps = parse_path_remaps(args.path_remap)++ raw_rows = read_jsonl(args.input_jsonl)+ if args.max_samples is not None:+ raw_rows = raw_rows[: args.max_samples]+ normalized = [normalize_row(row, args, remaps) for row in raw_rows]+ shard_rows = [+ row for idx, row in enumerate(normalized)+ if idx % args.num_shards == args.shard_id+ ]+ provided_rows = [row for row in shard_rows if row.get("provided_render_image_path")]+ provided_source_lines = {int(row["source_line_no"]) for row in provided_rows}+ rows_to_render = [row for row in shard_rows if int(row["source_line_no"]) not in provided_source_lines]+ formula_count = sum(1 for row in rows_to_render if should_render_as_formula(row))++ print(+ f"[INFO] loaded={len(raw_rows)} shard={args.shard_id}/{args.num_shards} "+ f"shard_rows={len(shard_rows)} provided={len(provided_rows)} "+ f"formula_mode={formula_count} browser_total={len(rows_to_render)} "+ f"pipeline={getattr(render_module, 'RENDER_PIPELINE_VERSION', 'unknown')} "+ f"katex={getattr(render_module, 'KATEX_PINNED_VERSION', 'unknown')}",+ flush=True,+ )++ render_results: dict[int, dict[str, Any]] = {}+ render_results.update(provided_render_results(provided_rows))+ # v8: formula and text/table share the one browser+KaTeX path; formula_mode+ # is decided per row inside work().+ render_results.update(+ await render_browser_rows(rows_to_render, args.output_dir, render_module,+ args.browser_concurrency, prior=prior,+ contexts=contexts, sem=sem)+ )++ manifest_rows = build_manifest_rows(shard_rows, args.output_dir, render_results)+ write_jsonl(args.output_dir / "manifest.jsonl", manifest_rows)+ write_summary(args.output_dir / "summary.json", args, manifest_rows, time.time() - t0, render_module)++ ok = sum(1 for row in manifest_rows if row.get("render_ok"))+ print(f"[INFO] done ok={ok} failed={len(manifest_rows) - ok}", flush=True)+ return manifest_rows+++def main() -> None:+ args = parse_args()+ validate_args(args)++ if args.playwright_browsers_path is not None and args.playwright_browsers_path.exists():+ os.environ.setdefault("PLAYWRIGHT_BROWSERS_PATH", str(args.playwright_browsers_path))++ asyncio.run(run_render_job(args))+ print(f"[INFO] manifest={args.output_dir / 'manifest.jsonl'}", flush=True)+++if __name__ == "__main__":+ main()diff --git a/scripts/minicpm-ocr-jev/renderer/setup_renderer.sh b/scripts/minicpm-ocr-jev/renderer/setup_renderer.shnew file mode 100644index 0000000..759b646--- /dev/null+++ b/scripts/minicpm-ocr-jev/renderer/setup_renderer.sh@@ -0,0 +1,168 @@+#!/usr/bin/env bash+#+# Install what the renderer needs and report anything it cannot install for you.+#+# The renderer turns candidate OCR text into an image. The model was trained on+# images produced by one specific combination of browser, KaTeX and fonts, so this+# script pins the browser and KaTeX, and then reports on the fonts, which are the+# one part it cannot install for you: fonts come from your operating system. The+# README's font step pins those; this script tells you whether they are pinned.+#+# Run from anywhere: bash renderer/setup_renderer.sh+#+set -euo pipefail++HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"+ROOT="$(cd "$HERE/.." && pwd)"++say() { printf '\n==> %s\n' "$*"; }+warn() { printf '\n!! %s\n' "$*" >&2; }++problems=0++# ---------------------------------------------------------------------------+say "Python packages"+# ---------------------------------------------------------------------------+if ! python3 -c 'import sys; sys.exit(0 if sys.version_info >= (3, 10) else 1)'; then+ warn "Python 3.10 or newer is required (found $(python3 -V 2>&1))."+ problems=$((problems + 1))+fi++# Debian 12, Ubuntu 23.04 and newer mark the system Python "externally managed"+# (PEP 668), so installing into it fails outright. Say so before the pip error,+# because the pip error suggests --break-system-packages, and overwriting the+# system Pillow is a worse outcome than the one it is working around.+if python3 -c 'import sys; raise SystemExit(0 if sys.prefix == sys.base_prefix else 1)' \+ && python3 -c 'import os,sysconfig; raise SystemExit(0 if os.path.exists(os.path.join(sysconfig.get_path("stdlib"), "EXTERNALLY-MANAGED")) else 1)'; then+ warn "This Python is externally managed (PEP 668) and you are not in a+ virtualenv, so pip cannot install into it. Make one first:+ python3 -m venv .venv-render && . .venv-render/bin/activate+ bash renderer/setup_renderer.sh+ Do not reach for --break-system-packages: this script pins Pillow to the+ version the renderer was calibrated on, and forcing that pin onto the system+ Python changes it for everything else on the machine."+ exit 1+fi++python3 -m pip install -r "$ROOT/requirements.txt"++# ---------------------------------------------------------------------------+say "Chromium (via Playwright)"+# ---------------------------------------------------------------------------+# Playwright 1.62.0 ships a specific Chromium build. Pinning the Playwright version+# is how the browser version gets pinned -- there is no separate browser pin.+# --with-deps installs the shared libraries Chromium needs; it needs sudo on Linux+# and is a no-op on macOS. If it fails, plain `playwright install chromium` still+# downloads the browser and the error below tells you which libraries are missing.+#+# Playwright fetches the browser from its own CDN, which PIP_INDEX_URL does not+# cover: a mirror set for pip does nothing here. If that CDN is slow from where you+# are, this single 180 MB file is the longest step in the whole install, so say so+# before starting it rather than after.+if [ -z "${PLAYWRIGHT_DOWNLOAD_HOST:-}" ]; then+ printf 'downloading from the default CDN (cdn.playwright.dev).\n'+ printf 'If that is slow where you are, cancel and set PLAYWRIGHT_DOWNLOAD_HOST\n'+ printf 'to a mirror -- it is the same artefact, and can be 100x faster.\n'+else+ printf 'download host: %s\n' "$PLAYWRIGHT_DOWNLOAD_HOST"+fi+if ! python3 -m playwright install --with-deps chromium; then+ warn "playwright install --with-deps failed; retrying without system deps."+ python3 -m playwright install chromium+ warn "Chromium is installed but its system libraries may be incomplete. If+ rendering produces blank images, install the libraries Playwright listed above."+ problems=$((problems + 1))+fi++# ---------------------------------------------------------------------------+say "Node.js (for the KaTeX precheck)"+# ---------------------------------------------------------------------------+# The precheck stage screens candidates whose LaTeX KaTeX cannot parse. It is the+# only part of the pipeline that needs Node. You can skip it (--no-precheck), but+# then unparsable candidates get scored instead of rejected.+if command -v node >/dev/null 2>&1; then+ printf 'found node %s\n' "$(node --version)"+ if ! node --check "$HERE/precheck/screen_v225_node.js"; then+ warn "The precheck script failed to parse under this Node. It has been tested+ on Node 12 and Node 22; try one of those."+ problems=$((problems + 1))+ fi+else+ warn "node not found. Install Node.js to use the precheck stage (tested on 12, 18+ and 22; your distribution's default is almost certainly fine), or run inference+ with --no-precheck."+ problems=$((problems + 1))+fi++# ---------------------------------------------------------------------------+say "Fonts"+# ---------------------------------------------------------------------------+# KaTeX bundles its own math fonts, so formula glyphs are already reproducible.+# Body text is not: it uses whatever the operating system provides. Chinese and+# Japanese text is the case that actually breaks -- without a CJK font, the browser+# draws replacement boxes and the rendered image is meaningless.+if command -v fc-list >/dev/null 2>&1; then+ cjk_count="$(fc-list :lang=zh 2>/dev/null | wc -l | tr -d ' ')"+ printf 'fontconfig reports %s font(s) covering Chinese\n' "$cjk_count"+ if [ "$cjk_count" -eq 0 ]; then+ warn "No Chinese font found. Install one, for example:+ Debian/Ubuntu: sudo apt-get install fonts-noto-cjk+ Fedora: sudo dnf install google-noto-sans-cjk-fonts+ With none at all, Chinese blocks render as empty boxes and score meaninglessly.+ Which CJK font you install matters much less for pixels -- swapping font sets+ moved the bundled references by under half a percent -- but it does decide which+ candidate wins a close block; see the font step in README \"1. The renderer\"."+ problems=$((problems + 1))+ fi++ # Is this the face set the reference deployment renders with? Reported, not+ # enforced: an unpinned environment scores just as well in aggregate (AUROC is+ # unchanged), it just resolves close blocks differently. Only the pinned one+ # reproduces the reference bytes.+ pin_notes=""+ fc-list 2>/dev/null | grep -qi 'DroidSansFallback' \+ || pin_notes="${pin_notes} missing: DroidSansFallbackFull (fonts-droid-fallback)\n"+ extra="$(fc-list : family 2>/dev/null | grep -ciE 'WenQuanYi|Unifont|IPA.?Gothic' || true)"+ [ "${extra:-0}" -eq 0 ] \+ || pin_notes="${pin_notes} present but should not be: WenQuanYi / Unifont / IPAGothic faces\n"+ [ ! -e /etc/fonts/conf.d/10-sub-pixel-rgb.conf ] \+ || pin_notes="${pin_notes} present but should not be: /etc/fonts/conf.d/10-sub-pixel-rgb.conf\n"+ if [ -z "$pin_notes" ]; then+ printf 'Font environment matches the reference deployment.\n'+ else+ printf 'Font environment differs from the reference deployment:\n'+ printf "$pin_notes"+ printf ' Fine for measuring the model; pin it if you need the reference bytes\n'+ printf ' or the same best-of-N picks. Four commands, in README "1. The renderer".\n'+ fi+elif [ "$(uname -s)" = "Darwin" ]; then+ printf 'macOS: system CJK fonts are present by default (fc-list not installed).\n'+else+ warn "fontconfig (fc-list) not found, cannot check fonts. Make sure a CJK font+ such as Noto Sans CJK is installed."+ problems=$((problems + 1))+fi++# ---------------------------------------------------------------------------+say "Bundled assets"+# ---------------------------------------------------------------------------+katex_dir="$HERE/assets/katex-0.16.47"+for path in "$katex_dir/katex.min.js" "$katex_dir/katex.min.css" "$katex_dir/fonts" \+ "$HERE/render_triple_rm_labels.py" "$HERE/render_module/render_label.py" \+ "$HERE/precheck/screen_v225_node.js"; do+ if [ ! -e "$path" ]; then+ warn "missing: $path"+ problems=$((problems + 1))+ fi+done+printf 'KaTeX 0.16.47 and the render module are in place.\n'++# ---------------------------------------------------------------------------+if [ "$problems" -eq 0 ]; then+ say "Setup complete. Verify the renderer against the bundled references:"+ printf ' python3 renderer/check_renderer.py\n\n'+else+ warn "Setup finished with $problems problem(s) above. Fix them, then run:+ python3 renderer/check_renderer.py"+ exit 1+fidiff --git a/scripts/minicpm-ocr-jev/requirements.txt b/scripts/minicpm-ocr-jev/requirements.txtnew file mode 100644index 0000000..e067af1--- /dev/null+++ b/scripts/minicpm-ocr-jev/requirements.txt@@ -0,0 +1,21 @@+# Renderer. These three decide what the rendered image looks like, pixel for pixel,+# so they are pinned to the versions the model was trained and served with.+# Changing them changes the scores. See README, "Matching the reference renderer".+playwright==1.62.0+Pillow==12.3.0+Markdown==3.10.3++# Forward pass. vLLM is absent from this file on purpose, and not because it is+# unpinned: it belongs in a separate virtual environment. vLLM requires only+# "pillow>=12.3.0" while the pin above is exact, so in one shared environment a+# later `pip install -U vllm` would move Pillow forward and change every score,+# silently and with no error. Install it on its own:+#+# bash serve/setup_backend.sh <venv dir>+#+# See README, "Install / 2. vLLM". Any build that registers+# Qwen3_5ForConditionalGeneration serves this model; setup_backend.sh checks for+# that rather than for a version number. Verified with:+#+# vllm 0.32.0 (PyPI wheel) torch 2.13.0+cu130+# vllm 0.1.dev21951+g5ff3bbfb0 torch 2.13.0+cu130 (the serving environment)diff --git a/scripts/minicpm-ocr-jev/rm_render.py b/scripts/minicpm-ocr-jev/rm_render.pynew file mode 100644index 0000000..0d875eb--- /dev/null+++ b/scripts/minicpm-ocr-jev/rm_render.py@@ -0,0 +1,396 @@+"""Precheck and render: turn candidate OCR text into the image the reward model expects.++The reward model does not read candidate text as a string. It compares two images:+the original document block, and a rendered image of the candidate text. This module+produces the second one, using the exact renderer the model was trained with.++Two stages run here, both as subprocesses:++1. Precheck (Node + KaTeX). Screens each candidate for LaTeX that KaTeX cannot parse.+ A candidate that fails precheck is rejected without being rendered or scored.+2. Render (Python + Playwright Chromium + KaTeX). Converts candidate text to a PNG.++Both stages run out-of-process on purpose: it is the only way to guarantee that the+bytes produced here are identical to the bytes produced by the offline pipeline the+model was trained against. Reimplementing either stage in-process would silently+change the rendered pixels, and therefore the scores.++Rendering geometry is derived from the original block image, so `image_path` must+point at a readable file: the renderer uses the original image's width as the render+target width. Formula blocks additionally render at a higher device scale factor.+"""+from __future__ import annotations++import json+import os+import subprocess+import sys+import tempfile+from dataclasses import dataclass, field+from pathlib import Path+from typing import Any, Iterable, Sequence++HERE = Path(__file__).resolve().parent+RENDERER_DIR = HERE / "renderer"+PRECHECK_JS = RENDERER_DIR / "precheck" / "screen_v225_node.js"+RENDER_DRIVER = RENDERER_DIR / "render_triple_rm_labels.py"+RENDER_MODULE_DIR = RENDERER_DIR / "render_module"+KATEX_DIR = RENDERER_DIR / "assets" / "katex-0.16.47"++#: Block categories the renderer understands. The category selects the render mode,+#: so a formula sent as "text" renders as literal text and will score poorly.+CATEGORIES = ("text", "formula", "table")+++@dataclass+class Candidate:+ """One candidate text to be rendered and scored against one block image."""++ case_id: str+ image_path: str+ text: str+ category: str = "text"++ def __post_init__(self) -> None:+ if self.category not in CATEGORIES:+ raise ValueError(+ f"{self.case_id}: category must be one of {CATEGORIES}, got {self.category!r}"+ )+++@dataclass+class RenderResult:+ """Outcome of precheck + render for a single candidate."""++ case_id: str+ ok: bool+ render_image_path: str | None = None+ #: Why this candidate has no usable render. One of: "precheck_reject",+ #: "render_error", "missing_original_image". None when ok.+ reason: str | None = None+ #: KaTeX diagnostics. Non-empty means the render succeeded but shows an error+ #: message where the formula should be, which the model will score as wrong.+ katex_errors: list[str] = field(default_factory=list)+ detail: str | None = None+++class RenderUnavailable(RuntimeError):+ """A stage could not run at all (missing asset, missing node, crashed driver)."""+++# ---------------------------------------------------------------------------+# asset checks+# ---------------------------------------------------------------------------++def check_assets(*, require_node: bool = True) -> None:+ """Fail early and specifically, rather than deep inside a subprocess."""+ missing = [p for p in (PRECHECK_JS, RENDER_DRIVER, RENDER_MODULE_DIR, KATEX_DIR) if not p.exists()]+ if missing:+ raise RenderUnavailable(+ "renderer assets missing: " + ", ".join(str(p) for p in missing)+ )+ if require_node and _which("node") is None:+ raise RenderUnavailable(+ "`node` not found on PATH. The precheck stage needs Node.js. "+ "Install Node 18 or newer, or pass precheck=False to skip screening "+ "(candidates with unparsable LaTeX will then be scored instead of rejected)."+ )+++def _which(name: str) -> str | None:+ from shutil import which++ return which(name)+++# ---------------------------------------------------------------------------+# stage 1: precheck+# ---------------------------------------------------------------------------++def run_precheck(+ candidates: Sequence[Candidate],+ work: Path,+ *,+ node_bin: str = "node",+) -> dict[str, dict[str, Any]]:+ """Return {case_id: hit record} for candidates KaTeX cannot parse.++ A case_id absent from the result passed the screen.+ """+ if not candidates:+ return {}++ precheck_in = work / "precheck_input.jsonl"+ hits_path = work / "precheck_hits.json"+ summary_path = work / "precheck_summary.json"+ # `category` and `label` are read by the screen for its summary grouping. We have+ # no label at inference time, so it is sent empty rather than left absent, which+ # would show up as the string "undefined" in the summary.+ _write_jsonl(+ precheck_in,+ [{"case_id": c.case_id, "label_text": c.text, "category": c.category, "label": ""}+ for c in candidates],+ )++ # The script's argv is positional: input, hits out, text field, id field, summary out.+ _run(+ [node_bin, str(PRECHECK_JS), str(precheck_in), str(hits_path),+ "label_text", "case_id", str(summary_path)],+ tag="precheck",+ )++ hits = json.loads(hits_path.read_text(encoding="utf-8"))+ return {str(rec["id"]): rec for rec in hits}+++# ---------------------------------------------------------------------------+# stage 2: render+# ---------------------------------------------------------------------------++def run_render(+ candidates: Sequence[Candidate],+ work: Path,+ *,+ browser_concurrency: int = 4,+ python_bin: str | None = None,+) -> dict[str, dict[str, Any]]:+ """Render each candidate to a PNG. Returns {case_id: manifest row}."""+ if not candidates:+ return {}++ render_in = work / "render_input.jsonl"+ render_out = work / "render"+ # Only these top-level fields are accepted; the driver rejects anything else.+ _write_jsonl(+ render_in,+ [+ {+ "case_id": c.case_id,+ "image_path": str(Path(c.image_path).resolve()),+ "label_text": c.text,+ "category": c.category,+ }+ for c in candidates+ ],+ )++ env = dict(os.environ)+ env["KATEX_ASSET_DIR"] = str(KATEX_DIR)++ _run(+ [+ python_bin or sys.executable,+ str(RENDER_DRIVER),+ "--input-jsonl", str(render_in),+ "--output-dir", str(render_out),+ "--render-module-dir", str(RENDER_MODULE_DIR),+ "--browser-concurrency", str(browser_concurrency),+ "--clean",+ ],+ env=env,+ tag="render",+ )++ manifest = render_out / "manifest.jsonl"+ if not manifest.is_file():+ raise RenderUnavailable(f"render driver produced no manifest at {manifest}")+ return {str(row["case_id"]): row for row in _read_jsonl(manifest)}+++# ---------------------------------------------------------------------------+# both stages+# ---------------------------------------------------------------------------++def render_candidates(+ candidates: Sequence[Candidate],+ *,+ work_dir: str | Path | None = None,+ precheck: bool = True,+ browser_concurrency: int = 4,+ node_bin: str = "node",+ python_bin: str | None = None,+) -> list[RenderResult]:+ """Precheck, then render everything that survived.++ Results come back in the same order as `candidates`. A rejected or failed+ candidate still gets a result, with ok=False and a reason, so callers can+ score it as "definitely wrong" rather than dropping it.++ ⚠ The returned paths point at files on disk, and this function never deletes+ them -- deleting a directory whose paths you just handed out leaves the caller+ holding dangling filenames. Pass `work_dir` to put them where you want them;+ otherwise a temporary directory is created and **the caller owns it**.+ """+ if not candidates:+ return []++ seen: set[str] = set()+ for c in candidates:+ if c.case_id in seen:+ raise ValueError(f"duplicate case_id {c.case_id!r}; case ids must be unique")+ seen.add(c.case_id)++ check_assets(require_node=precheck)++ if work_dir is None:+ work = Path(tempfile.mkdtemp(prefix="rm_render_"))+ else:+ work = Path(work_dir)+ work.mkdir(parents=True, exist_ok=True)++ rejected: dict[str, dict[str, Any]] = {}+ if precheck:+ rejected = run_precheck(candidates, work, node_bin=node_bin)++ survivors = [c for c in candidates if c.case_id not in rejected]+ manifest = run_render(+ survivors, work,+ browser_concurrency=browser_concurrency,+ python_bin=python_bin,+ )++ return results_from_manifest(candidates, rejected, manifest)+++def results_from_manifest(+ candidates: Sequence[Candidate],+ rejected: dict[str, dict[str, Any]],+ manifest: dict[str, dict[str, Any]],+) -> list[RenderResult]:+ """Turn a precheck result and a render manifest into one verdict per candidate.++ Kept separate from `render_candidates` because there is more than one way to+ run the renderer -- a subprocess per batch, or a long-lived browser inside a+ service -- and the verdicts must not depend on which was used. A second copy+ of this mapping would be free to drift, and the drift would show up as+ candidates being rejected for different reasons on different deployments.+ """+ results: list[RenderResult] = []+ for c in candidates:+ hit = rejected.get(c.case_id)+ if hit is not None:+ results.append(RenderResult(+ case_id=c.case_id,+ ok=False,+ reason="precheck_reject",+ detail=_hit_detail(hit),+ ))+ continue++ row = manifest.get(c.case_id)+ if row is None:+ results.append(RenderResult(+ case_id=c.case_id, ok=False, reason="render_error",+ detail="case id absent from render manifest",+ ))+ continue++ katex_errors = list(row.get("katex_errors") or [])+ if row.get("render_ok"):+ results.append(RenderResult(+ case_id=c.case_id,+ ok=True,+ render_image_path=str(row.get("render_image_path") or ""),+ katex_errors=katex_errors,+ ))+ else:+ err = str(row.get("render_error") or "unknown")+ reason = "missing_original_image" if err == "missing_original_image" else "render_error"+ results.append(RenderResult(+ case_id=c.case_id, ok=False, reason=reason,+ detail=err, katex_errors=katex_errors,+ ))+ return results+++def _hit_detail(hit: dict[str, Any]) -> str:+ """The screen's own diagnosis, which is the useful part of a rejection.++ A hit looks like {"id", "status", "reasons": [...], "errors": [...]}, where+ `errors` carries KaTeX's parse error verbatim -- that string is what tells a+ caller which part of the candidate's LaTeX is malformed.+ """+ status = str(hit.get("status") or "rejected")+ errors = [str(e) for e in (hit.get("errors") or []) if e]+ reasons = [str(r) for r in (hit.get("reasons") or []) if r]+ parts = errors or reasons+ return f"{status}: {'; '.join(parts)}" if parts else status+++# ---------------------------------------------------------------------------+# small helpers+# ---------------------------------------------------------------------------++def _write_jsonl(path: Path, rows: Iterable[dict[str, Any]]) -> None:+ path.parent.mkdir(parents=True, exist_ok=True)+ with path.open("w", encoding="utf-8") as handle:+ for row in rows:+ handle.write(json.dumps(row, ensure_ascii=False) + "\n")+++def _read_jsonl(path: Path) -> list[dict[str, Any]]:+ rows = []+ with path.open(encoding="utf-8") as handle:+ for line in handle:+ if line.strip():+ rows.append(json.loads(line))+ return rows+++def _run(cmd: list[str], *, env: dict[str, str] | None = None, tag: str = "") -> None:+ proc = subprocess.run(+ cmd, env=env, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True+ )+ if proc.returncode != 0:+ # The driver prints progress to stdout, so the tail is the useful part.+ tail = (proc.stdout or "")[-4000:]+ raise RenderUnavailable(f"stage {tag!r} failed (exit {proc.returncode}):\n{tail}")+++# ---------------------------------------------------------------------------+# CLI: render without scoring+# ---------------------------------------------------------------------------++def main() -> None:+ import argparse++ ap = argparse.ArgumentParser(+ description="Render candidate OCR text to the PNG the reward model expects.",+ )+ ap.add_argument("--image", required=True, help="original document block image")+ ap.add_argument("--candidate", dest="candidates", action="append", default=[],+ metavar="TEXT", help="candidate text (repeat for several)")+ ap.add_argument("--category", default="text", choices=list(CATEGORIES))+ ap.add_argument("--out-dir", required=True, help="where to write renders")+ ap.add_argument("--no-precheck", action="store_true",+ help="skip the KaTeX screen (does not need Node)")+ ap.add_argument("--browser-concurrency", type=int, default=4)+ ap.add_argument("--render-python",+ help="interpreter to run the render driver with, when Chromium "+ "needs a wrapper that sets LD_LIBRARY_PATH")+ args = ap.parse_args()++ if not args.candidates:+ ap.error("at least one --candidate is required")++ cands = [+ Candidate(case_id=f"cand{i}", image_path=args.image, text=text, category=args.category)+ for i, text in enumerate(args.candidates)+ ]+ results = render_candidates(+ cands,+ work_dir=args.out_dir,+ precheck=not args.no_precheck,+ browser_concurrency=args.browser_concurrency,+ python_bin=args.render_python,+ )+ for r in results:+ if r.ok:+ note = f" katex_errors={r.katex_errors}" if r.katex_errors else ""+ print(f"{r.case_id}: {r.render_image_path}{note}")+ else:+ print(f"{r.case_id}: FAILED ({r.reason}) {r.detail or ''}")+++if __name__ == "__main__":+ main()diff --git a/scripts/minicpm-ocr-jev/sdk/README.md b/scripts/minicpm-ocr-jev/sdk/README.mdnew file mode 100644index 0000000..52717f4--- /dev/null+++ b/scripts/minicpm-ocr-jev/sdk/README.md@@ -0,0 +1,158 @@+# Local deployment without our image++`sdk/` is the second way to run this model. The first is the published image,+built from `serve/`, which carries a browser, a font set and a pinned Chromium so+that it reproduces the reference scores byte for byte. This one installs onto a+host you already have.++The trade is explicit: **you get your own renderer, and your own renderer draws+slightly different pixels.** Rendered text is model input here, so different+pixels mean different scores. On the machine this was built on, the three bundled+examples came out one byte-identical, one within 2.3% of pixels, one within+10.2% — and the end-to-end scores landed within 0.009 of the image's, with the+best candidate unchanged in all three blocks. Rankings are what this model is+for; the third decimal place is not promised. Run `renderer/check_renderer.py`+after installing and quote the number it gives you.++Use the image when you need the published numbers. Use this when you need the+model on a host of your own.++## Layers++```+render+score sdk/app.py original image + candidate text -> render -> prob_yes+score sdk/jev_score/ original + rendered image + text -> prob_1+engine vllm serve logits+```++Pick the layer by what you already have:++* **Renders made elsewhere, or no browser on the host** — run the engine and the+ score service. It needs `sdk/requirements-score.txt` and nothing else: no+ Chromium, no Node, no fonts.+* **Text in, score out** — run the engine and the render+score service. It+ imports the score layer in its own process; there is no socket between them,+ and you do not start the score service separately.++The score layer returns `prob_1` and only `prob_1`: no threshold, no label, no+logits. A probability is comparable across runs, a label is a probability plus+somebody's threshold, and a threshold shipped inside a library ends up applied to+runs it was never calibrated on. The render+score service keeps the published+field name `prob_yes` and the same endpoints as the image, so callers move+between the two without edits.++## Install++Two virtual environments, and that is a requirement rather than tidiness: the+renderer pins `Pillow==12.3.0` because that version decides what the rendered+image looks like, while vLLM asks only for `pillow>=12.3.0`. In one shared+environment a later `pip install -U vllm` moves Pillow forward and changes every+score, silently and with no error.++```bash+# 1. the forward pass+bash serve/setup_backend.sh /opt/venv-vllm++# 2. the renderer -- only if you want render+score+bash sdk/setup_render.sh /opt/venv-render+```++Behind a slow link, set both mirrors. `PLAYWRIGHT_DOWNLOAD_HOST` is not covered+by `PIP_INDEX_URL`, and Playwright's own CDN is where this install usually+stalls:++```bash+PIP_INDEX_URL=https://<mirror>/simple \+PLAYWRIGHT_DOWNLOAD_HOST=https://<mirror>/playwright \+ bash sdk/setup_render.sh /opt/venv-render+```++`gcc`, `g++` and `python3-dev` are run-time dependencies, not build-time ones:+Triton compiles a CPython extension on the first forward pass of every fresh+process. Removing them after installing produces a backend that loads the+weights, runs for two minutes and dies on a bare `CalledProcessError`.++## Run++```bash+# the engine -- note there is no --chat-template+PATH=/opt/venv-vllm/bin:$PATH bash sdk/start_engine.sh 0 18499 /path/to/weights++# then one of:+PATH=/opt/venv-render/bin:$PATH bash sdk/start_score.sh 18501 http://127.0.0.1:18499+PATH=/opt/venv-render/bin:$PATH bash sdk/start_render_score.sh 18500 http://127.0.0.1:18499+```++The render+score service renders in its own process, so it must run with the+renderer's interpreter.++### score++```+POST /v1/score {"items": [{"original_image": <b64>,+ "render_image": <b64>,+ "ocr_text": "..."}]}+ -> {"results": [{"prob_1": 0.00227, "error": null}]}+```++`ocr_text` goes to the model exactly as given. It is not stripped: whitespace is+in the rendered image too, and the model is being asked to compare the two.++### render+score++`/healthz`, `/v1/rm/score`, `/v1/rm/score_best`, `/v1/rm/score_best_batch` —+same request and response shapes as the image serves, including `stage_sec` and+the `throughput_rate` summary. `RM_THRESHOLD` (default 0.5) affects the summary+only; no item's `prob_yes` is ever rounded or decided for you.++## The startup check, and what it does not cover++Both services refuse to start if the engine does not assemble the prompt this+checkpoint was trained on. This matters more than it sounds, because the failure+has no symptom: a wrong prompt still returns 200, still returns a number in+range, still ranks candidates plausibly, and is on a different scale.++Three request keys are load-bearing, and `sdk/` sends all three explicitly rather+than relying on any default:++```python+"add_generation_prompt": True # /classify defaults to False+"chat_template_kwargs": {"enable_thinking": False} # at top level it is ignored+"use_activation": False # we softmax the two logits ourselves+```++Measured on vLLM 0.32.0, `/classify` and `/tokenize` **disagree** about+`add_generation_prompt`: the scoring endpoint defaults it to `False`, the+endpoint the check interrogates defaults it to `True`. That is why the check has+a half that reads the outgoing request rather than the engine's reply.++What the check covers depends on what is installed:++| | needs | catches |+|---|---|---|+| pooled position | engine only | the assistant turn being cut off (last token 198 instead of 271) |+| outgoing request | nothing | the adapter not sending the three keys above |+| token-for-token | `transformers` + the weights on this host | everything else: image/text ordering, a missing newline, any template change |++Without the weights reachable from the service, the third row is skipped and the+check keeps roughly half its discriminating power. Set `JEV_WEIGHTS` to the+checkpoint directory to get all of it.++`JEV_ALLOW_UNVERIFIED=1` starts anyway. It is for bringing up a new engine, where+the check failing is the thing being worked on. Scores produced that way are not+comparable to any published number.++## Backends++`sdk/backends/vllm.yaml` selects the engine and says where to reach it. Only vLLM+is implemented: SGLang and llama.cpp both need upstream work that has not landed,+so their adapters would be untested code shipped as if it worked. The interface+they will implement is `sdk/jev_score/backends/base.py`, and naming either engine+in the config gives you that message rather than a vague failure.++## What is not here++`serve/` is unchanged and stays the image's source. This directory is excluded+from the image build context (`.dockerignore`), so editing it cannot move the+image's digest — the two routes are meant to be independently verifiable, which+they stop being the moment one rebuilds when the other changes.diff --git a/scripts/minicpm-ocr-jev/sdk/app.py b/scripts/minicpm-ocr-jev/sdk/app.pynew file mode 100644index 0000000..a30723d--- /dev/null+++ b/scripts/minicpm-ocr-jev/sdk/app.py@@ -0,0 +1,525 @@+"""render+score: the high layer. Original image + candidate text in, prob_yes out.++The score layer is given a rendered image; this layer is the one that makes it. Precheck,+render, score -- the same three stages `infer_vllm.py` runs offline, served over+the same HTTP contract the published image serves, so a caller can move between+them without changing a field name.++What it is not is a second implementation of either half:++ * rendering and precheck come from `rm_render.py` and `serve/render_pool.py`,+ imported, not copied+ * scoring goes through `jev_score`, in this process -- not over HTTP. Running+ the score service separately is for deployments that want *only* scoring;+ putting a socket between two halves of one process would buy nothing and+ cost a hop.+ * `serve/app.py` is deliberately not imported. Importing it builds a second+ FastAPI application and reads the image deployment's environment as a side+ effect of the import.++Start it with sdk/start_render_score.sh, against an engine from sdk/start_engine.sh.+"""+from __future__ import annotations++import asyncio+import base64+import binascii+import os+import shutil+import sys+import tempfile+import time+import uuid+from contextlib import asynccontextmanager+from pathlib import Path+from typing import Any, Optional++from fastapi import FastAPI, HTTPException+from fastapi.responses import JSONResponse+from pydantic import BaseModel, Field, model_validator++HERE = Path(__file__).resolve().parent+ROOT = HERE.parent+for path in (str(ROOT), str(HERE), str(ROOT / "serve")):+ if path not in sys.path:+ sys.path.insert(0, path)++from rm_render import CATEGORIES, Candidate, RenderResult, render_candidates # noqa: E402++from jev_score import PROMPT_TEMPLATE_MD5, BackendError, ScoreInput, Scorer # noqa: E402+from jev_score.selfcheck import run_selfcheck # noqa: E402++# ── settings ─────────────────────────────────────────────────────────────────++BACKEND_URL = os.environ.get("JEV_BACKEND_URL") or None+BACKEND_CONFIG = os.environ.get("JEV_BACKEND_CONFIG") or None+WEIGHTS = os.environ.get("JEV_WEIGHTS") or None+#: Threshold for the throughput rate in the summary only. It is reported with+#: every response and never applied to an item's score: `prob_yes` leaves this+#: service unrounded and undecided, exactly as the score layer produces it.+THRESHOLD = float(os.environ.get("RM_THRESHOLD", "0.5"))+MAX_ITEMS = int(os.environ.get("RM_MAX_ITEMS", "64"))+RENDER_MODE = os.environ.get("RM_RENDER_MODE", "persistent")+RENDER_BROWSERS = int(os.environ.get("RM_RENDER_BROWSERS", "2"))+BROWSER_CONCURRENCY = int(os.environ.get("RM_BROWSER_CONCURRENCY", "8"))+WORK_ROOT = os.environ.get("RM_WORK_ROOT") or tempfile.gettempdir()+KEEP_WORK = os.environ.get("RM_KEEP_WORK", "0") == "1"+PRECHECK = os.environ.get("RM_PRECHECK", "1") == "1"+ALLOW_UNVERIFIED = os.environ.get("JEV_ALLOW_UNVERIFIED") == "1"++INPUT_FORMS = ("ternary",)++#: Scores for candidates that never reached the model. 0.0 rather than null: a+#: candidate whose LaTeX will not parse is not a plausible transcription, and a+#: caller ranking candidates wants it to lose rather than to be absent.+SENTINEL = 0.0++STATE: dict[str, Any] = {"scorer": None, "pool": None, "selfcheck": None}+++# ── schema ───────────────────────────────────────────────────────────────────+# Field names follow serve/app.py so callers do not change when they move.++class ScoreItem(BaseModel):+ case_id: str+ image: str = Field(..., description="original block image, base64 (PNG/JPEG)")+ ocr_text: str+ category: str = "text"+ render_image: Optional[str] = Field(+ default=None,+ description="rendered image, base64. Omit it and this service renders the "+ "candidate itself; supplying it skips precheck and rendering.")++ @model_validator(mode="after")+ def check_category(self) -> "ScoreItem":+ if self.category not in CATEGORIES:+ raise ValueError(f"category must be one of {CATEGORIES}")+ return self+++class ScoreRequest(BaseModel):+ input_form: str = Field(..., description=f"one of {INPUT_FORMS}")+ items: list[ScoreItem]+ threshold: Optional[float] = None++ @model_validator(mode="after")+ def check_form(self) -> "ScoreRequest":+ if self.input_form not in INPUT_FORMS:+ raise ValueError(f"input_form must be one of {INPUT_FORMS}")+ return self+++class ScoreResultItem(BaseModel):+ case_id: str+ category: str = "text"+ verdict: str+ prob_yes: float+ prob_no: Optional[float] = None+ detail: str = ""+++class CategoryStats(BaseModel):+ total: int+ scored: int+ precheck_reject: int+ render_error: int+ forward_error: int = 0+ pass_rate: float = Field(+ ..., description="scoring SUCCESS rate = scored / total. Independent of the "+ "threshold. This is NOT the throughput rate.")+ throughput_rate: float = Field(+ ..., description="(scored items with prob_yes >= threshold) / total. The test "+ "is >=, and only items with verdict=scored are counted.")+ mean_prob_yes: Optional[float] = None+++class ScoreSummary(BaseModel):+ total: int+ scored: int+ precheck_reject: int+ render_error: int+ forward_error: int = 0+ pass_rate: float+ throughput_rate: float+ threshold_used: float+ input_form: str = ""+ by_category: dict[str, CategoryStats] = {}+++class ScoreResponse(BaseModel):+ results: list[ScoreResultItem]+ summary: ScoreSummary+++class ScoreBestRequest(BaseModel):+ input_form: str = Field(..., description=f"one of {INPUT_FORMS}")+ case_id: str = Field(default_factory=lambda: str(uuid.uuid4()))+ image: str = Field(..., description="original block image, base64")+ candidates: list[str] = Field(..., min_length=1)+ category: str = "text"+ render_images: Optional[list[str]] = None+ threshold: Optional[float] = None++ @model_validator(mode="after")+ def check_fields(self) -> "ScoreBestRequest":+ if self.input_form not in INPUT_FORMS:+ raise ValueError(f"input_form must be one of {INPUT_FORMS}")+ if self.category not in CATEGORIES:+ raise ValueError(f"category must be one of {CATEGORIES}")+ if self.render_images is not None and len(self.render_images) != len(self.candidates):+ raise ValueError(+ f"render_images must be the same length as candidates: "+ f"{len(self.render_images)} vs {len(self.candidates)}")+ return self+++class ScoreBestResponse(BaseModel):+ best_index: int+ best_text: str+ #: prob_yes per candidate, in input order. See SENTINEL for failure values.+ scores: list[float]+ verdicts: list[str]+ #: Seconds per stage. Rendering dominates, so a caller tuning throughput needs+ #: to see the stages apart rather than one total.+ stage_sec: dict[str, float] = {}+ batch_size: int = 0+++class ScoreBestBatchRequest(BaseModel):+ input_form: str = Field(..., description=f"one of {INPUT_FORMS}")+ items: list[ScoreBestRequest] = Field(..., min_length=1)++ @model_validator(mode="after")+ def check_form(self) -> "ScoreBestBatchRequest":+ if self.input_form not in INPUT_FORMS:+ raise ValueError(f"input_form must be one of {INPUT_FORMS}")+ return self+++class ScoreBestBatchResponse(BaseModel):+ results: list[ScoreBestResponse]+ stage_sec: dict[str, float] = {}+ batch_size: int = 0+++# ── helpers ──────────────────────────────────────────────────────────────────++def _decode(b64: str) -> bytes:+ try:+ return base64.b64decode(b64, validate=False)+ except (ValueError, binascii.Error) as exc:+ raise ValueError(str(exc)) from None+++def _workdir() -> Path:+ path = Path(tempfile.mkdtemp(prefix="jev_l2_", dir=WORK_ROOT))+ return path+++def _cleanup(work: Path) -> None:+ if not KEEP_WORK:+ shutil.rmtree(work, ignore_errors=True)+++async def _render(items: list[ScoreItem], work: Path,+ originals: dict[str, Path],+ timings: dict[str, float] | None = None) -> dict[str, RenderResult]:+ """Render whatever has no render supplied. Returns {case_id: RenderResult}.++ The pool is used when it started; otherwise each batch gets its own browser+ through `render_candidates`, which is slower per request but needs nothing of+ this process to be healthy -- the thing to fall back to when the pool will+ not start.+ """+ todo = [i for i in items if i.render_image is None]+ if not todo:+ return {}++ candidates = [+ Candidate(case_id=i.case_id, image_path=str(originals[i.case_id]),+ text=i.ocr_text, category=i.category)+ for i in todo+ ]+ pool = STATE.get("pool")+ if pool is not None:+ results = await pool.render(candidates, work, timings)+ else:+ results = await asyncio.to_thread(+ render_candidates, candidates, work_dir=work, precheck=PRECHECK,+ browser_concurrency=BROWSER_CONCURRENCY,+ )+ return {r.case_id: r for r in results}+++def _stats_for(items: list[ScoreResultItem], thr: float) -> CategoryStats:+ total = len(items)+ scored = [i for i in items if i.verdict == "scored"]+ counts = {k: sum(1 for i in items if i.verdict == k)+ for k in ("precheck_reject", "render_error", "forward_error")}+ through = sum(1 for i in scored if i.prob_yes >= thr)+ return CategoryStats(+ total=total, scored=len(scored),+ precheck_reject=counts["precheck_reject"], render_error=counts["render_error"],+ forward_error=counts["forward_error"],+ pass_rate=len(scored) / total if total else 0.0,+ throughput_rate=through / total if total else 0.0,+ mean_prob_yes=(sum(i.prob_yes for i in scored) / len(scored)) if scored else None,+ )+++def _summarize(items: list[ScoreResultItem], thr: float, form: str) -> ScoreSummary:+ overall = _stats_for(items, thr)+ by_category = {+ cat: _stats_for([i for i in items if i.category == cat], thr)+ for cat in sorted({i.category for i in items})+ }+ return ScoreSummary(+ total=overall.total, scored=overall.scored,+ precheck_reject=overall.precheck_reject, render_error=overall.render_error,+ forward_error=overall.forward_error, pass_rate=overall.pass_rate,+ throughput_rate=overall.throughput_rate, threshold_used=thr,+ input_form=form, by_category=by_category,+ )+++async def _run(items: list[ScoreItem], thr: float,+ stage_sec: dict[str, float] | None = None) -> list[ScoreResultItem]:+ """precheck -> render -> score, for one batch. Every input gets a result."""+ scorer: Scorer = STATE["scorer"]+ work = _workdir()+ timings: dict[str, float] = {} if stage_sec is None else stage_sec+ t_start = time.perf_counter()+ try:+ # The original has to be on disk for the renderer, which takes a path.+ originals: dict[str, Path] = {}+ failed: dict[str, ScoreResultItem] = {}+ for item in items:+ try:+ raw = _decode(item.image)+ except ValueError as exc:+ failed[item.case_id] = ScoreResultItem(+ case_id=item.case_id, category=item.category,+ verdict="encode_error", prob_yes=SENTINEL,+ detail=f"image is not valid base64: {exc}")+ continue+ path = work / f"{uuid.uuid4().hex}.png"+ path.write_bytes(raw)+ originals[item.case_id] = path++ pending = [i for i in items if i.case_id not in failed]+ t_render = time.perf_counter()+ renders = await _render(pending, work, originals, timings)+ timings["render_sec"] = round(time.perf_counter() - t_render, 6)++ scorable: list[tuple[ScoreItem, bytes]] = []+ for item in pending:+ if item.render_image is not None:+ try:+ scorable.append((item, _decode(item.render_image)))+ except ValueError as exc:+ failed[item.case_id] = ScoreResultItem(+ case_id=item.case_id, category=item.category,+ verdict="encode_error", prob_yes=SENTINEL,+ detail=f"render_image is not valid base64: {exc}")+ continue+ result = renders.get(item.case_id)+ if result is None or not result.ok or not result.render_image_path:+ failed[item.case_id] = ScoreResultItem(+ case_id=item.case_id, category=item.category,+ verdict=(result.reason if result else "render_error") or "render_error",+ prob_yes=SENTINEL, detail=(result.detail if result else "") or "")+ continue+ render_path = Path(result.render_image_path)+ if not render_path.is_file():+ # The renderer reported success and the file is not there. Say so+ # here rather than letting it surface as a FileNotFoundError from+ # inside the image loader, where the cause is unrecognisable.+ failed[item.case_id] = ScoreResultItem(+ case_id=item.case_id, category=item.category,+ verdict="render_error", prob_yes=SENTINEL,+ detail=f"render reported ok but {render_path} is missing")+ continue+ scorable.append((item, render_path.read_bytes()))++ t_forward = time.perf_counter()+ settled = await asyncio.gather(*(+ scorer.score(ScoreInput(+ original=originals[item.case_id].read_bytes(),+ render=render, ocr_text=item.ocr_text))+ for item, render in scorable+ ), return_exceptions=True)+ timings["forward_sec"] = round(time.perf_counter() - t_forward, 6)+ timings["forward_rows"] = float(len(scorable))++ scored: dict[str, ScoreResultItem] = {}+ for (item, _), outcome in zip(scorable, settled):+ if isinstance(outcome, BaseException):+ if not isinstance(outcome, (BackendError, ValueError, OSError)):+ raise outcome+ scored[item.case_id] = ScoreResultItem(+ case_id=item.case_id, category=item.category,+ verdict="forward_error", prob_yes=SENTINEL, detail=str(outcome))+ else:+ scored[item.case_id] = ScoreResultItem(+ case_id=item.case_id, category=item.category, verdict="scored",+ prob_yes=outcome, prob_no=1.0 - outcome)++ return [scored.get(i.case_id) or failed[i.case_id] for i in items]+ finally:+ timings["total_sec"] = round(time.perf_counter() - t_start, 6)+ _cleanup(work)+++# ── app ──────────────────────────────────────────────────────────────────────++@asynccontextmanager+async def lifespan(app: FastAPI):+ scorer = Scorer(config=BACKEND_CONFIG, base_url=BACKEND_URL)+ STATE["scorer"] = scorer++ check = await run_selfcheck(scorer.backend, weights=WEIGHTS)+ STATE["selfcheck"] = check+ if not check.passed and not ALLOW_UNVERIFIED:+ await scorer.aclose()+ raise RuntimeError("\n".join([+ "refusing to start: the engine does not assemble the prompt this "+ "checkpoint was trained on.", *check.notes, "",+ "Set JEV_ALLOW_UNVERIFIED=1 to start anyway. Scores produced that way "+ "are not comparable to any published number.",+ ]))+ if not check.passed:+ print("!! starting UNVERIFIED: " + "; ".join(check.notes), flush=True)++ if RENDER_MODE == "persistent":+ from render_pool import RenderPool++ pool = RenderPool(browsers=RENDER_BROWSERS,+ pages_per_browser=BROWSER_CONCURRENCY, precheck=PRECHECK)+ try:+ await pool.start()+ STATE["pool"] = pool+ except Exception as exc: # noqa: BLE001+ # Falling back is right here and wrong for the prompt check above.+ # A browser that will not start costs latency; a prompt that is not+ # the training prompt costs correctness, invisibly.+ print(f"!! render pool did not start ({exc}); falling back to "+ f"one browser per batch", flush=True)+ STATE["pool"] = None+ try:+ yield+ finally:+ pool = STATE.get("pool")+ if pool is not None:+ await pool.close()+ await scorer.aclose()+++app = FastAPI(title="minicpm-ocr-jev render+score (SDK)", lifespan=lifespan)++[email protected]("/healthz")+async def healthz() -> JSONResponse:+ scorer: Scorer | None = STATE.get("scorer")+ check = STATE.get("selfcheck")+ served = await scorer.backend.served_name() if scorer else None+ pool = STATE.get("pool")+ body = {+ "status": "ok" if (served and check and check.passed) else "degraded",+ "served_model": served,+ "render": {"mode": "persistent" if pool else "subprocess",+ **(pool.describe() if pool else {})},+ "input_forms": {"supported": list(INPUT_FORMS),+ "template_md5": PROMPT_TEMPLATE_MD5},+ "prompt_selfcheck": {+ "passed": check.passed if check else None,+ "last_token": check.last_token if check else None,+ "token_equality": check.token_equality if check else None,+ "scoring_request": check.scoring_request if check else None,+ },+ "threshold_default": THRESHOLD,+ }+ return JSONResponse(body, status_code=200 if served else 503)++[email protected]("/v1/rm/score", response_model=ScoreResponse)+async def score(req: ScoreRequest) -> ScoreResponse:+ if not req.items:+ raise HTTPException(422, "items must not be empty")+ if len(req.items) > MAX_ITEMS:+ raise HTTPException(413, f"at most {MAX_ITEMS} items per request, got {len(req.items)}")+ seen = {i.case_id for i in req.items}+ if len(seen) != len(req.items):+ raise HTTPException(422, "case_id must be unique within a request")++ thr = THRESHOLD if req.threshold is None else req.threshold+ results = await _run(req.items, thr)+ return ScoreResponse(results=results,+ summary=_summarize(results, thr, req.input_form))+++def _expand(req: ScoreBestRequest, prefix: str = "") -> list[ScoreItem]:+ renders = req.render_images or [None] * len(req.candidates)+ return [+ ScoreItem(case_id=f"{prefix}{req.case_id}__{i}", image=req.image,+ ocr_text=text, category=req.category, render_image=renders[i])+ for i, text in enumerate(req.candidates)+ ]+++def _pick_best(req: ScoreBestRequest, results: list[ScoreResultItem],+ **extra: Any) -> ScoreBestResponse:+ """argmax over the candidates that actually scored.++ No threshold is involved: picking the best candidate is a ranking question,+ and the threshold only ever decides whether a block counts as passing. If+ every candidate failed, index 0 comes back -- a degraded answer the caller+ can detect from `verdicts`, rather than an error that loses the whole block.+ """+ scores = [r.prob_yes for r in results]+ verdicts = [r.verdict for r in results]+ ok = [i for i, v in enumerate(verdicts) if v == "scored"]+ best = max(ok, key=lambda i: scores[i]) if ok else 0+ return ScoreBestResponse(best_index=best, best_text=req.candidates[best],+ scores=scores, verdicts=verdicts, **extra)++[email protected]("/v1/rm/score_best", response_model=ScoreBestResponse)+async def score_best(req: ScoreBestRequest) -> ScoreBestResponse:+ """N candidates for one block, sharing one original image; returns the best."""+ items = _expand(req)+ if len(items) > MAX_ITEMS:+ raise HTTPException(400, f"at most {MAX_ITEMS} candidates per request")++ thr = THRESHOLD if req.threshold is None else req.threshold+ stage_sec: dict[str, float] = {}+ results = await _run(items, thr, stage_sec)+ return _pick_best(req, results, stage_sec=stage_sec,+ batch_size=int(stage_sec.get("forward_rows", 0)))++[email protected]("/v1/rm/score_best_batch", response_model=ScoreBestBatchResponse)+async def score_best_batch(req: ScoreBestBatchRequest) -> ScoreBestBatchResponse:+ """Several blocks in one request, flattened into a single pipeline run.++ Kept because callers already use it. Note that it no longer carries the+ advantage it used to: the backend batches across HTTP requests on its own,+ so separate `score_best` calls now reach the GPU in the same batch anyway.+ What this endpoint still saves is one render driver start-up per block.+ """+ items: list[ScoreItem] = []+ spans: list[tuple[int, int]] = []+ for n, sub in enumerate(req.items):+ expanded = _expand(sub, prefix=f"b{n}__")+ spans.append((len(items), len(items) + len(expanded)))+ items.extend(expanded)+ if len(items) > MAX_ITEMS:+ raise HTTPException(400, f"at most {MAX_ITEMS} candidates per request, got {len(items)}")++ thr = THRESHOLD if req.threshold is None else req.threshold+ stage_sec: dict[str, float] = {}+ results = await _run(items, thr, stage_sec)+ return ScoreBestBatchResponse(+ results=[_pick_best(sub, results[start:end])+ for sub, (start, end) in zip(req.items, spans)],+ stage_sec=stage_sec, batch_size=int(stage_sec.get("forward_rows", 0)),+ )diff --git a/scripts/minicpm-ocr-jev/sdk/backends/vllm.yaml b/scripts/minicpm-ocr-jev/sdk/backends/vllm.yamlnew file mode 100644index 0000000..a992ad2--- /dev/null+++ b/scripts/minicpm-ocr-jev/sdk/backends/vllm.yaml@@ -0,0 +1,27 @@+# Which engine runs the forward pass, and where to reach it.+#+# Start the engine with sdk/start_engine.sh, which omits --chat-template on+# purpose: this SDK sends an interleaved content list and relies on the model's+# own chat_template.jinja to render it into the training prompt. Point this file+# at an engine started any other way and the service will refuse to start --+# see sdk/jev_score/selfcheck.py.++engine: vllm++# Where `vllm serve` is listening. Host and port only; the adapter appends the+# endpoint paths (/classify, /tokenize, /v1/models).+base_url: http://127.0.0.1:18499++# What the engine calls the model. Leave it unset: the adapter asks /v1/models,+# and the only name that works is the one the engine was actually started with.+# Set it only when one engine serves more than one model.+# model: minicpm-ocr-jev++# Seconds to wait on one forward pass. Generous because a cold engine spends its+# first request compiling Triton kernels.+timeout_sec: 120++# Requests in flight toward the engine. vLLM queues past its own capacity, so+# this bounds our sockets and memory rather than the engine's throughput; it+# saturates around 16.+max_in_flight: 32diff --git a/scripts/minicpm-ocr-jev/sdk/jev_score/__init__.py b/scripts/minicpm-ocr-jev/sdk/jev_score/__init__.pynew file mode 100644index 0000000..c93de72--- /dev/null+++ b/scripts/minicpm-ocr-jev/sdk/jev_score/__init__.py@@ -0,0 +1,35 @@+"""score: score one OCR candidate against the block it came from.++ from jev_score import Scorer, ScoreInput++ scorer = Scorer() # reads sdk/backends/vllm.yaml+ p = await scorer.score(ScoreInput.from_paths("block.png", "render.png", text))++Inputs are the original block image, that candidate rendered back to an image,+and the candidate text. The output is `prob_1`: the probability that the text is+consistent with the image. Higher is better.++This layer does not render and does not decide. `sdk/app.py` is the layer that+renders; the threshold belongs to whoever is using the number.+"""+from .backends import Backend, BackendError, load_backend+from .prompt import INSTRUCTION, PROMPT_TEMPLATE_MD5, PromptParts, build_parts+from .scorer import ScoreInput, Scorer, softmax_prob_1+from .selfcheck import EXPECTED_LAST_TOKEN, SelfCheckFailed, SelfCheckResult, run_selfcheck++__all__ = [+ "Backend",+ "BackendError",+ "EXPECTED_LAST_TOKEN",+ "INSTRUCTION",+ "PROMPT_TEMPLATE_MD5",+ "PromptParts",+ "ScoreInput",+ "Scorer",+ "SelfCheckFailed",+ "SelfCheckResult",+ "build_parts",+ "load_backend",+ "run_selfcheck",+ "softmax_prob_1",+]diff --git a/scripts/minicpm-ocr-jev/sdk/jev_score/backends/__init__.py b/scripts/minicpm-ocr-jev/sdk/jev_score/backends/__init__.pynew file mode 100644index 0000000..65e70c5--- /dev/null+++ b/scripts/minicpm-ocr-jev/sdk/jev_score/backends/__init__.py@@ -0,0 +1,84 @@+"""Backend selection.++Which engine runs the forward pass is a deployment choice, not a code change, so+it is read from a file: `sdk/backends/<engine>.yaml`. The shipped one is+`vllm.yaml`; SGLang and llama.cpp get their own once the upstream work they+depend on lands.+"""+from __future__ import annotations++import os+from pathlib import Path+from typing import Any++from .base import Backend, BackendError++__all__ = ["Backend", "BackendError", "load_backend", "load_config", "DEFAULT_CONFIG"]++#: Shipped configs live in sdk/backends/, next to the sdk/ entry points -- one+#: directory up from this package.+CONFIG_DIR = Path(__file__).resolve().parents[2] / "backends"+DEFAULT_CONFIG = CONFIG_DIR / "vllm.yaml"++#: Engines that are implemented *and* have been run against the model. The two+#: absent ones are listed here rather than silently missing, because "not+#: supported yet" and "you spelled it wrong" are different problems for whoever+#: is reading the error.+KNOWN_ENGINES = {"vllm"}+PLANNED_ENGINES = {+ "sglang": "the classify path needs an upstream PR that is not merged yet",+ "llamacpp": "the classify path needs an upstream PR that is not merged yet",+}+++def load_config(path: str | Path | None = None) -> dict[str, Any]:+ """Read a backend config. `JEV_BACKEND_CONFIG` overrides the default path."""+ import yaml++ chosen = Path(path or os.environ.get("JEV_BACKEND_CONFIG") or DEFAULT_CONFIG)+ if not chosen.is_file():+ raise FileNotFoundError(+ f"backend config not found: {chosen}\n"+ f"Shipped configs: {', '.join(sorted(p.name for p in CONFIG_DIR.glob('*.yaml')))}"+ )+ config = yaml.safe_load(chosen.read_text(encoding="utf-8")) or {}+ if not isinstance(config, dict):+ raise ValueError(f"{chosen}: expected a mapping at the top level")+ config.setdefault("_source", str(chosen))+ return config+++def load_backend(path: str | Path | None = None, **overrides: Any) -> Backend:+ """Build the backend a config names.++ `overrides` win over the file, so a caller that already knows the base URL --+ a test, or `app.py` started with an explicit `--backend-url` -- does not have+ to write a config file to say so.+ """+ config = {**load_config(path), **{k: v for k, v in overrides.items() if v is not None}}+ engine = str(config.get("engine", "")).strip().lower()++ if engine not in KNOWN_ENGINES:+ if engine in PLANNED_ENGINES:+ raise NotImplementedError(+ f"backend '{engine}' is not implemented yet: {PLANNED_ENGINES[engine]}.\n"+ f"The adapter interface it will implement is in "+ f"{Path(__file__).parent / 'base.py'}."+ )+ raise ValueError(+ f"{config.get('_source')}: unknown engine {engine!r}. "+ f"Known: {', '.join(sorted(KNOWN_ENGINES))}."+ )++ base_url = config.get("base_url")+ if not base_url:+ raise ValueError(f"{config.get('_source')}: 'base_url' is required")++ from .vllm_backend import VLLMBackend++ return VLLMBackend(+ str(base_url),+ model=config.get("model") or None,+ timeout=float(config.get("timeout_sec", 120.0)),+ max_in_flight=int(config.get("max_in_flight", 32)),+ )diff --git a/scripts/minicpm-ocr-jev/sdk/jev_score/backends/base.py b/scripts/minicpm-ocr-jev/sdk/jev_score/backends/base.pynew file mode 100644index 0000000..ba9fb64--- /dev/null+++ b/scripts/minicpm-ocr-jev/sdk/jev_score/backends/base.py@@ -0,0 +1,73 @@+"""What a forward-pass backend has to provide.++The three engines this SDK targets agree on what they compute and on almost+nothing else. vLLM takes a chat content list and applies the model's template;+SGLang takes a finished prompt string and applies no template; llama.cpp is+different again. They also disagree about where the two class logits come back+(`data[0].probs` vs `embedding`).++So the adapter boundary is drawn at the narrowest place where they still agree:++ give me this candidate's prompt and its two images -> give me two raw logits++Everything above the line (softmax, probabilities, the HTTP shell) is written+once. Everything below it is per engine.++`logits`, not probabilities, is the contract on purpose. An engine that applies+its own activation returns numbers that look right, rank right, and are not the+published scale; asking for raw logits and doing the softmax ourselves is the+only version of this that cannot drift quietly.+"""+from __future__ import annotations++from typing import Protocol, runtime_checkable++from ..prompt import PromptParts++__all__ = ["Backend", "BackendError"]+++class BackendError(RuntimeError):+ """The engine could not be reached, or answered with something unusable."""+++@runtime_checkable+class Backend(Protocol):+ """One forward-pass engine."""++ async def forward(+ self,+ parts: PromptParts,+ original_data_url: str,+ render_data_url: str,+ ) -> list[float]:+ """Two raw class logits for one candidate, in class order [0, 1].++ Raises `BackendError` if the engine is unreachable, is still loading, or+ returns anything other than exactly two numbers.+ """+ ...++ async def served_name(self) -> str | None:+ """What the engine calls the model, or None while it is still loading.++ Asked rather than configured: the only name that works is the one the+ engine was started with. A constant here is wrong in exactly the case+ nobody is watching -- the two halves started from different revisions,+ startup looks fine, and the first real request comes back 404.+ """+ ...++ async def tokenize(self, parts: PromptParts) -> list[int] | None:+ """Token ids for the prompt as *this engine* would assemble it.++ None if the engine exposes no such endpoint. Used by `selfcheck.py` to+ prove, before the service accepts traffic, that the engine's assembly+ still equals the training prompt. An engine that cannot answer this+ cannot be checked, which is a fact worth surfacing rather than hiding.+ """+ ...++ async def aclose(self) -> None:+ """Release connections."""+ ...diff --git a/scripts/minicpm-ocr-jev/sdk/jev_score/backends/vllm_backend.py b/scripts/minicpm-ocr-jev/sdk/jev_score/backends/vllm_backend.pynew file mode 100644index 0000000..9cea081--- /dev/null+++ b/scripts/minicpm-ocr-jev/sdk/jev_score/backends/vllm_backend.py@@ -0,0 +1,209 @@+"""vLLM adapter: `vllm serve --runner pooling --convert classify`.++Three things about the request body are load-bearing, and all three fail+silently when they are wrong -- the server answers 200 with a number that is not+the score this checkpoint produces:++ 1. The content list interleaves image, text, image, text. The model's own+ `chat_template.jinja` renders exactly the training prompt from that shape.+ Putting both images first and the whole prompt in one text part is what the+ reference service does *with a pass-through template*; with the default+ template it is a different prompt.++ 2. `add_generation_prompt` must be True. vLLM's /classify path defaults it to+ False, which cuts off the empty assistant turn. The classify path pools the+ LAST token, so this moves the pooled position from token 271 to 198 -- the+ value head then reads a hidden state it never read during training.++ 3. `enable_thinking: False` must sit inside `chat_template_kwargs`. At the top+ level of the body it is accepted and ignored, which is the same failure as+ (2) and looks identical from the outside.++The server-side counterpart is just as narrow: start it *without*+`--chat-template`, so the model's own template is the one that runs.+"""+from __future__ import annotations++from typing import Any++import httpx++from ..prompt import PromptParts+from .base import BackendError++__all__ = ["VLLMBackend"]+++class VLLMBackend:+ """Talks to one `vllm serve` process over HTTP."""++ #: What the three request keys above are worth, in one place, so that the+ #: forward and tokenize paths cannot drift apart. `selfcheck` only proves the+ #: prompt is right if it asks the same question the scorer will ask.+ #:+ #: These are sent explicitly on every request, never left to a default, and+ #: that is not belt-and-braces. Measured on vLLM 0.32.0, the two endpoints+ #: disagree about `add_generation_prompt`:+ #:+ #: /tokenize default True+ #: /classify default False+ #:+ #: So the endpoint that scores is the one that defaults to the wrong value,+ #: and the endpoint the self-check interrogates is the one that defaults to+ #: the right one. Relying on either default would make the check agree with+ #: itself while the scores came out of a different prompt.+ TEMPLATE_KEYS: dict[str, Any] = {+ "add_generation_prompt": True,+ "chat_template_kwargs": {"enable_thinking": False},+ }++ def __init__(+ self,+ base_url: str,+ *,+ model: str | None = None,+ timeout: float = 120.0,+ max_in_flight: int = 32,+ ) -> None:+ self.base_url = base_url.rstrip("/")+ #: Set only to pin the name; otherwise discovered from /v1/models.+ self._model_override = model+ self._model: str | None = model+ self._client = httpx.AsyncClient(timeout=timeout)+ import asyncio++ # vLLM queues past its own capacity, so this bounds our sockets and+ # memory rather than the engine's throughput.+ self._gate = asyncio.Semaphore(max_in_flight)++ # ── identity ─────────────────────────────────────────────────────────────++ async def served_name(self) -> str | None:+ if self._model:+ return self._model+ try:+ resp = await self._client.get(f"{self.base_url}/v1/models", timeout=5.0)+ except httpx.HTTPError:+ return None+ if resp.status_code != 200:+ return None+ served = [m["id"] for m in resp.json().get("data", [])]+ if served:+ self._model = served[0]+ return self._model++ async def _require_model(self) -> str:+ model = await self.served_name()+ if model is None:+ raise BackendError(+ f"backend not ready: {self.base_url}/v1/models did not name a model"+ )+ return model++ # ── request shape ────────────────────────────────────────────────────────++ def _messages(+ self, parts: PromptParts, original_data_url: str, render_data_url: str+ ) -> list[dict[str, Any]]:+ return [{+ "role": "user",+ "content": [+ {"type": "image_url", "image_url": {"url": original_data_url}},+ {"type": "text", "text": parts.text_after_original},+ {"type": "image_url", "image_url": {"url": render_data_url}},+ {"type": "text", "text": parts.text_after_render},+ ],+ }]++ # ── the two calls ────────────────────────────────────────────────────────++ def _classify_body(+ self,+ model: str,+ parts: PromptParts,+ original_data_url: str,+ render_data_url: str,+ ) -> dict[str, Any]:+ """The exact body `forward` posts. Separate so the self-check can read it.++ The self-check cannot recover a prompt from /classify -- it answers with+ two numbers and nothing else -- so the only way to know the scoring call+ carries the template keys is to look at the call itself.+ """+ return {+ "model": model,+ "messages": self._messages(parts, original_data_url, render_data_url),+ # Raw logits. Letting the server apply its own activation would change+ # the numbers without changing the ranking, which is the kind of+ # difference that survives every smoke test and invalidates every+ # comparison against a published score.+ "use_activation": False,+ **self.TEMPLATE_KEYS,+ }++ def describe_scoring_request(self, parts: PromptParts) -> dict[str, Any]:+ """`_classify_body` with the image payloads elided, for the self-check."""+ body = self._classify_body(self._model or "<unresolved>", parts, "<original>", "<render>")+ return body++ async def forward(+ self,+ parts: PromptParts,+ original_data_url: str,+ render_data_url: str,+ ) -> list[float]:+ model = await self._require_model()+ body = self._classify_body(model, parts, original_data_url, render_data_url)+ try:+ async with self._gate:+ resp = await self._client.post(f"{self.base_url}/classify", json=body)+ except httpx.HTTPError as exc:+ raise BackendError(f"backend unreachable: {exc}") from exc+ if resp.status_code != 200:+ raise BackendError(f"backend HTTP {resp.status_code}: {resp.text[:300]}")++ try:+ logits = resp.json()["data"][0]["probs"]+ except (KeyError, IndexError, ValueError) as exc:+ raise BackendError(f"unreadable response: {resp.text[:300]}") from exc+ if len(logits) != 2:+ raise BackendError(+ f"expected 2 class logits from the value head, got {len(logits)}. "+ "This checkpoint may not be a 2-class sequence-classification model."+ )+ return [float(logits[0]), float(logits[1])]++ async def tokenize(self, parts: PromptParts) -> list[int] | None:+ """Ask the engine to render and tokenize the prompt, without running it.++ One-pixel placeholder images: /tokenize has to be given the same *shape*+ of request as /classify, because the number of tokens an image expands to+ depends on its size -- but the gate below only reads the tail of the+ sequence, where the assistant turn is, so the pixels themselves are+ irrelevant. A 1x1 PNG keeps the check fast and independent of any sample.+ """+ model = await self._require_model()+ body: dict[str, Any] = {+ "model": model,+ "messages": self._messages(parts, _PIXEL_PNG, _PIXEL_PNG),+ **self.TEMPLATE_KEYS,+ }+ try:+ resp = await self._client.post(f"{self.base_url}/tokenize", json=body)+ except httpx.HTTPError as exc:+ raise BackendError(f"backend unreachable: {exc}") from exc+ if resp.status_code == 404:+ return None+ if resp.status_code != 200:+ raise BackendError(f"/tokenize HTTP {resp.status_code}: {resp.text[:300]}")+ return list(resp.json()["tokens"])++ async def aclose(self) -> None:+ await self._client.aclose()+++#: 1x1 white PNG.+_PIXEL_PNG = (+ "data:image/png;base64,"+ "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg=="+)diff --git a/scripts/minicpm-ocr-jev/sdk/jev_score/images.py b/scripts/minicpm-ocr-jev/sdk/jev_score/images.pynew file mode 100644index 0000000..38a75b9--- /dev/null+++ b/scripts/minicpm-ocr-jev/sdk/jev_score/images.py@@ -0,0 +1,66 @@+"""Image bytes to the data URLs a backend accepts.++This is deliberately a near-copy of `serve/app.py::_data_url`, not an import of+it. Two reasons: importing `serve/app.py` builds a FastAPI application and reads+the service's environment as a side effect of the import, and `serve/` is frozen+-- the shipped image is built from it byte for byte, so it cannot grow a shared+module for this.++The behaviour it copies is the part that matters, and it is easy to get wrong in+a way nothing reports:++ an image that needs no padding is forwarded byte for byte.++Re-encoding everything through Pillow would be the obvious implementation and+would be wrong twice over. It costs CPU on the hot path, and it changes the+pixels the model sees -- a PNG round-trip is not the identity on an image that+arrived as JPEG, and the scores move without anything failing. The reference+service forwards untouched bytes, so this does too; `check_l1_parity.py` is what+proves the two still agree.+"""+from __future__ import annotations++import base64+import io+from pathlib import Path++from PIL import Image++from . import prompt as _prompt # noqa: F401 (its import puts the material root on sys.path)+from infer_vllm import MAX_ASPECT_RATIO # noqa: E402++__all__ = ["MAX_ASPECT_RATIO", "to_data_url", "read_data_url"]+++def to_data_url(raw: bytes) -> str:+ """Encode image bytes as a data URL, padding extreme aspect ratios with white.++ Qwen3.5-VL's preprocessor refuses images longer than 200:1, and document block+ crops are routinely a few pixels tall. Such an image is padded rather than+ resized: padding keeps the glyphs at the scale the model was trained to+ compare against, resizing would not.+ """+ with Image.open(io.BytesIO(raw)) as img:+ fmt = (img.format or "PNG").upper()+ width, height = img.size+ longest, shortest = max(width, height), max(1, min(width, height))+ if longest / shortest <= MAX_ASPECT_RATIO:+ mime = "image/jpeg" if fmt in ("JPEG", "JPG") else "image/png"+ return f"data:{mime};base64," + base64.b64encode(raw).decode("ascii")++ rgb = img.convert("RGB")+ if width >= height:+ new_w, new_h = width, max(height, int(width / MAX_ASPECT_RATIO + 0.999999))+ else:+ new_h, new_w = height, max(width, int(height / MAX_ASPECT_RATIO + 0.999999))+ canvas = Image.new("RGB", (new_w, new_h), "white")+ canvas.paste(rgb, ((new_w - width) // 2, (new_h - height) // 2))++ buf = io.BytesIO()+ canvas.save(buf, format="PNG")+ return "data:image/png;base64," + base64.b64encode(buf.getvalue()).decode("ascii")+++def read_data_url(path: str | Path) -> str:+ """`to_data_url` on a file's contents."""+ return to_data_url(Path(path).read_bytes())diff --git a/scripts/minicpm-ocr-jev/sdk/jev_score/prompt.py b/scripts/minicpm-ocr-jev/sdk/jev_score/prompt.pynew file mode 100644index 0000000..f29acfe--- /dev/null+++ b/scripts/minicpm-ocr-jev/sdk/jev_score/prompt.py@@ -0,0 +1,82 @@+"""The prompt, in the two shapes the backends need it.++The bytes themselves are not defined here. They live in `infer_vllm.py` at the+root of this material, which asserts their fingerprint at import time; a second+copy would be a second thing to keep in step, and the one that drifted would go+on producing plausible numbers. So this module only *arranges* them.++Two arrangements are needed, because the engines disagree about who applies the+chat template:++ parts vLLM's /classify applies the model's own `chat_template.jinja` to a+ content list. The interleaving -- image, text, image, text -- is what+ makes the rendered result equal the training prompt.++ raw SGLang's /classify takes the finished prompt string and applies no+ template at all. That is what `build_prompt()` already returns.++Both are built from the same source, so they cannot disagree about the words.+What they *can* disagree about is the handful of tokens a template adds at the+end, which is why `selfcheck.py` exists.+"""+from __future__ import annotations++import sys+from dataclasses import dataclass+from pathlib import Path++#: Material root: this file is <root>/sdk/jev_score/prompt.py.+MATERIAL_ROOT = Path(__file__).resolve().parents[2]+if str(MATERIAL_ROOT) not in sys.path:+ sys.path.insert(0, str(MATERIAL_ROOT))++from infer_vllm import ( # noqa: E402+ IMAGES_PER_PROMPT,+ INSTRUCTION,+ PROMPT_TEMPLATE_MD5,+ build_prompt,+)++__all__ = [+ "IMAGES_PER_PROMPT",+ "INSTRUCTION",+ "PROMPT_TEMPLATE_MD5",+ "PromptParts",+ "build_parts",+ "build_prompt",+]+++@dataclass(frozen=True)+class PromptParts:+ """One candidate's prompt, ready for either kind of backend.++ `text_after_original` and `text_after_render` are the two text segments that+ sit between and after the two image placeholders. `raw` is the same prompt as+ a finished string, for engines that do not apply a template.+ """++ text_after_original: str+ text_after_render: str+ raw: str+++def build_parts(ocr_text: str) -> PromptParts:+ """Arrange the prompt for one candidate's OCR text.++ `ocr_text` goes in exactly as given -- no strip, no newline normalisation.+ Whitespace at either end is part of what the model is being asked to judge:+ it is in the rendered image too, and the training data kept it.++ The leading newlines on both text segments are not cosmetic. The chat+ template emits an image placeholder with no trailing newline, while the+ training prompt has one after each; carrying it on the front of the following+ text segment is what closes that gap. Drop either and the prompt still+ renders, still scores, and is no longer the prompt this checkpoint was+ trained on -- see `selfcheck.py`, which is there to catch exactly that.+ """+ return PromptParts(+ text_after_original=f"\nOCR文本:\n{ocr_text}\n",+ text_after_render="\n" + INSTRUCTION,+ raw=build_prompt(ocr_text),+ )diff --git a/scripts/minicpm-ocr-jev/sdk/jev_score/scorer.py b/scripts/minicpm-ocr-jev/sdk/jev_score/scorer.pynew file mode 100644index 0000000..04800e3--- /dev/null+++ b/scripts/minicpm-ocr-jev/sdk/jev_score/scorer.py@@ -0,0 +1,100 @@+"""score: original image + rendered image + candidate text -> prob_1.++This is the whole of the score layer. It does three things -- arrange the prompt,+encode the two images, softmax the two logits the backend returns -- and+deliberately does not do a fourth.++What it does not do is decide. There is no threshold here, no `pred_label`, and+the raw logits do not leave the layer. A probability is a comparable quantity;+a label is a probability plus somebody's threshold, and a threshold that travels+inside a scoring library ends up applied to runs it was never calibrated on. The+caller owns that choice because only the caller knows what the number is for.++Rendering is not here either: this layer is given the rendered image. That keeps+it free of Chromium, Node and the font stack -- a deployment that renders+elsewhere, or has the renders already, installs none of it. `sdk/app.py` is the+layer that renders.+"""+from __future__ import annotations++import math+from dataclasses import dataclass+from pathlib import Path+from typing import Sequence++from .backends import Backend, BackendError, load_backend+from .images import to_data_url+from .prompt import PROMPT_TEMPLATE_MD5, build_parts++__all__ = ["Scorer", "ScoreInput", "BackendError", "PROMPT_TEMPLATE_MD5", "softmax_prob_1"]+++@dataclass(frozen=True)+class ScoreInput:+ """One candidate: the block as it was, the block as the candidate reads it."""++ original: bytes+ render: bytes+ ocr_text: str++ @classmethod+ def from_paths(+ cls, original: str | Path, render: str | Path, ocr_text: str+ ) -> "ScoreInput":+ return cls(Path(original).read_bytes(), Path(render).read_bytes(), ocr_text)+++def softmax_prob_1(logits: Sequence[float]) -> float:+ """P(class 1) from the two class logits.++ Shifted by the max before exponentiating -- the logits are unbounded and the+ naive form overflows on confident inputs, which are exactly the ones a reward+ model produces most.+ """+ if len(logits) != 2:+ raise ValueError(+ f"expected 2 class logits from the value head, got {len(logits)}. "+ "This checkpoint may not be a 2-class sequence-classification model."+ )+ a, b = float(logits[0]), float(logits[1])+ top = max(a, b)+ exp_a, exp_b = math.exp(a - top), math.exp(b - top)+ return exp_b / (exp_a + exp_b)+++class Scorer:+ """The score layer, as a library. `sdk/jev_score/server.py` is the thin HTTP shell over it."""++ def __init__(self, backend: Backend | None = None, *, config: str | Path | None = None,+ base_url: str | None = None) -> None:+ self.backend = backend or load_backend(config, base_url=base_url)++ async def score(self, item: ScoreInput) -> float:+ """`prob_1` for one candidate.++ Raises `BackendError` rather than returning a sentinel. A score of 0.0+ and "the engine was down" are different facts, and a library that+ conflates them hands its caller a number that looks like a judgement.+ """+ logits = await self.backend.forward(+ build_parts(item.ocr_text),+ to_data_url(item.original),+ to_data_url(item.render),+ )+ return softmax_prob_1(logits)++ async def score_many(self, items: Sequence[ScoreInput]) -> list[float]:+ """`score` over a batch, concurrently, results in input order.++ Concurrency is bounded by the backend adapter, not here: the engine's own+ queue is what actually sets throughput, and a second limit above it would+ only make the real one harder to find.+ """+ import asyncio++ if not items:+ return []+ return list(await asyncio.gather(*(self.score(i) for i in items)))++ async def aclose(self) -> None:+ await self.backend.aclose()diff --git a/scripts/minicpm-ocr-jev/sdk/jev_score/selfcheck.py b/scripts/minicpm-ocr-jev/sdk/jev_score/selfcheck.pynew file mode 100644index 0000000..c88987b--- /dev/null+++ b/scripts/minicpm-ocr-jev/sdk/jev_score/selfcheck.py@@ -0,0 +1,261 @@+"""Startup gate: does this engine still assemble the training prompt?++The shipped image answers this by construction -- it carries a pass-through chat+template whose fingerprint is asserted at import. A self-installed deployment+cannot: the prompt is assembled by the engine, from the model's own+`chat_template.jinja`, under request flags that this SDK sets. Any of those three+can change without this code changing.++And when they do change, nothing breaks. The engine answers 200. The number is+in range, the ranking across candidates still looks sane, and it is not the+scale the checkpoint was trained on, because the value head pooled a different+position. The failure has no symptom, so it needs a test rather than a reader.++Hence this gate, which runs before the service accepts traffic and refuses to+start if it fails. Two assertions:++ tail the last token id is 271 -- the final newline of the empty assistant+ turn, which is the position the classify path pools.+ whole the engine's token sequence equals the local tokenizer's rendering of+ `build_prompt()`, token for token.++`tail` is the cheap one and catches the two documented ways to get this wrong+(`add_generation_prompt` defaulting to False, `enable_thinking` at the wrong+level), both of which land on 198. `whole` is stricter and needs `transformers`+and the weights on the same host, so it is optional and skipped with a loud note+when they are absent.+"""+from __future__ import annotations++import os+from dataclasses import dataclass, field+from pathlib import Path++from .backends import Backend, BackendError+from .prompt import IMAGES_PER_PROMPT, PromptParts, build_parts, build_prompt++__all__ = ["EXPECTED_LAST_TOKEN", "SelfCheckResult", "run_selfcheck", "SelfCheckFailed"]++#: The final newline of `<|im_start|>assistant\n<think>\n\n</think>\n\n`. The+#: classify path pools the last token, so this id *is* the position the value+#: head reads. 198 is the near-miss: the same prompt with the assistant turn cut+#: short.+EXPECTED_LAST_TOKEN = 271++#: A text that exercises the parts of the prompt most likely to be mangled:+#: markup, a newline inside the text, and non-ASCII.+PROBE_TEXT = "<table><tr><td>参考</td><td>Accuracy (%)</td></tr></table>\nE = mc^2"+++class SelfCheckFailed(RuntimeError):+ """The engine does not assemble the prompt this checkpoint was trained on."""+++@dataclass+class SelfCheckResult:+ passed: bool+ last_token: int | None = None+ expected_last_token: int = EXPECTED_LAST_TOKEN+ n_tokens: int | None = None+ token_equality: str = "skipped" # "equal" | "differs" | "skipped"+ scoring_request: str = "skipped" # "carries the template keys" | "differs" | "skipped"+ notes: list[str] = field(default_factory=list)++ def raise_for_status(self) -> "SelfCheckResult":+ if not self.passed:+ raise SelfCheckFailed("\n".join(["prompt self-check failed:", *self.notes]))+ return self+++async def run_selfcheck(+ backend: Backend,+ *,+ weights: str | Path | None = None,+ probe_text: str = PROBE_TEXT,+) -> SelfCheckResult:+ """Run the gate against a live engine.++ `weights` is a local checkpoint directory, used only for the stricter+ token-for-token comparison; `JEV_WEIGHTS` is read when it is not passed.+ """+ parts: PromptParts = build_parts(probe_text)+ result = SelfCheckResult(passed=False)++ scoring_note = _check_scoring_request(backend, parts)+ if scoring_note is not None:+ result.scoring_request = "differs"+ result.notes.append(scoring_note)+ return result+ result.scoring_request = "carries the template keys"++ try:+ tokens = await backend.tokenize(parts)+ except BackendError as exc:+ result.notes.append(f"engine could not tokenize the probe: {exc}")+ return result++ if tokens is None:+ result.notes.append(+ "this engine exposes no /tokenize endpoint, so the prompt it assembles "+ "cannot be checked before traffic arrives. Scores from it are unverified."+ )+ return result++ result.n_tokens = len(tokens)+ result.last_token = tokens[-1] if tokens else None++ if result.last_token != EXPECTED_LAST_TOKEN:+ result.notes.append(+ f"last token is {result.last_token}, expected {EXPECTED_LAST_TOKEN}.\n"+ " The classify path pools the LAST token, so the value head is reading a\n"+ " position it never read during training, and every score is off scale.\n"+ " The usual causes, in order of likelihood:\n"+ " * the engine was started WITH --chat-template; it must use the\n"+ " model's own chat_template.jinja for this request shape\n"+ " * add_generation_prompt is not reaching the engine as True\n"+ " * enable_thinking was sent at the top level of the body instead of\n"+ " inside chat_template_kwargs, where it is accepted and ignored"+ )+ return result++ # ── stricter half ────────────────────────────────────────────────────────+ weights = weights or os.environ.get("JEV_WEIGHTS")+ if not weights:+ result.notes.append(+ "token-for-token comparison skipped: no weights path given "+ "(pass weights=... or set JEV_WEIGHTS). The tail check above passed."+ )+ result.passed = True+ return result++ try:+ from transformers import AutoTokenizer+ except ImportError:+ result.notes.append(+ "token-for-token comparison skipped: transformers is not installed in "+ "this environment. The tail check above passed."+ )+ result.passed = True+ return result++ tok = AutoTokenizer.from_pretrained(str(weights))+ reference = tok(build_prompt(probe_text), add_special_tokens=False)["input_ids"]++ # The two sequences cannot be compared element by element, and the reason is+ # not a defect in either of them. The engine has already expanded each image+ # placeholder into one pad token per visual patch -- a count that depends on+ # the image's dimensions -- while `build_prompt` still holds the single+ # unexpanded placeholder. Every correct deployment differs here.+ #+ # What must match is all the *text*: the OCR segment between the two images,+ # and the instruction plus assistant turn after the second. So both sequences+ # are cut at their image spans and only the text between the cuts is compared.+ vision_start = tok.convert_tokens_to_ids("<|vision_start|>")+ vision_end = tok.convert_tokens_to_ids("<|vision_end|>")++ engine_text, engine_images = _strip_image_spans(tokens, vision_start, vision_end)+ reference_text, reference_images = _strip_image_spans(reference, vision_start, vision_end)++ if engine_images != IMAGES_PER_PROMPT or reference_images != IMAGES_PER_PROMPT:+ result.token_equality = "differs"+ result.notes.append(+ f"expected {IMAGES_PER_PROMPT} image spans in the prompt, found "+ f"{engine_images} from the engine and {reference_images} locally. "+ "Ternary input is original + render, always two."+ )+ return result++ if engine_text == reference_text:+ result.token_equality = "equal"+ result.passed = True+ result.notes.append(+ f"text matches build_prompt() token for token "+ f"({len(engine_text)} tokens outside the two image spans)"+ )+ else:+ result.token_equality = "differs"+ first = next(+ (i for i in range(min(len(engine_text), len(reference_text)))+ if engine_text[i] != reference_text[i]),+ min(len(engine_text), len(reference_text)),+ )+ result.token_equality = "differs"+ result.notes.append(+ "the text the engine assembles differs from build_prompt():\n"+ f" first difference at text token {first} of "+ f"{len(engine_text)} (engine) / {len(reference_text)} (reference)\n"+ f" engine {engine_text[max(0, first - 8):first + 8]}\n"+ f" reference {reference_text[max(0, first - 8):first + 8]}\n"+ f" engine {tok.decode(engine_text[max(0, first - 8):first + 8])!r}\n"+ f" reference {tok.decode(reference_text[max(0, first - 8):first + 8])!r}\n"+ " The tail check passed, so the pooled position is right, but the prompt\n"+ " reaching the model is not the one it was trained on."+ )+ return result+++#: What the scoring request must say out loud rather than leave to a default.+#: `use_activation` is here for the same reason as the other two: its default+#: returns activated probabilities, which rank identically and are on a different+#: scale -- the one kind of wrongness that every smoke test passes.+REQUIRED_SCORING_KEYS: dict[str, object] = {+ "add_generation_prompt": True,+ "chat_template_kwargs": {"enable_thinking": False},+ "use_activation": False,+}+++def _check_scoring_request(backend: Backend, parts: PromptParts) -> str | None:+ """Does the body `forward` sends carry the keys it must? None if it does.++ This is the half of the check that the engine cannot answer. /classify+ replies with two numbers, so no amount of interrogating it reveals which+ prompt produced them; and the endpoint the token check *can* interrogate,+ /tokenize, defaults `add_generation_prompt` the other way. An adapter that+ quietly stopped sending the key would leave the token check green and every+ score wrong. So this one reads the outgoing request instead of the reply.+ """+ describe = getattr(backend, "describe_scoring_request", None)+ if describe is None:+ return None # an adapter that cannot show its request is not checked here++ body = describe(parts)+ wrong = {+ key: (body.get(key, "<missing>"), expected)+ for key, expected in REQUIRED_SCORING_KEYS.items()+ if body.get(key, "<missing>") != expected+ }+ if not wrong:+ return None+ lines = [+ "the scoring request does not carry the keys it must:",+ *(f" {key}: sends {got!r}, must send {want!r}" for key, (got, want) in wrong.items()),+ " These cannot be left to the endpoint's default. On vLLM 0.32.0 /classify",+ " defaults add_generation_prompt to False while /tokenize defaults it to",+ " True, so the prompt check below would pass while the scores came from a",+ " prompt with the assistant turn cut off.",+ ]+ return "\n".join(lines)+++def _strip_image_spans(+ tokens: list[int], vision_start: int, vision_end: int+) -> tuple[list[int], int]:+ """Drop every `<|vision_start|> … <|vision_end|>` run; count how many there were.++ The markers go with the run. They are identical on both sides by+ construction, so keeping them would only pad the comparison with tokens that+ cannot disagree.+ """+ out: list[int] = []+ spans, inside = 0, False+ for tid in tokens:+ if tid == vision_start:+ inside, spans = True, spans + 1+ continue+ if tid == vision_end:+ inside = False+ continue+ if not inside:+ out.append(tid)+ return out, spansdiff --git a/scripts/minicpm-ocr-jev/sdk/jev_score/server.py b/scripts/minicpm-ocr-jev/sdk/jev_score/server.pynew file mode 100644index 0000000..b37d745--- /dev/null+++ b/scripts/minicpm-ocr-jev/sdk/jev_score/server.py@@ -0,0 +1,162 @@+"""The score layer as an HTTP service: a thin shell over `Scorer`, and nothing else.++Thin is the design, not an apology for it. The render+score layer (`sdk/app.py`)+does not reach the model through this shell -- it imports `Scorer` directly, in+the same process -- so nothing here is on the hot path of a full deployment. This+exists for the deployment that wants scoring only: renders made elsewhere,+scores wanted over HTTP, no Chromium anywhere on the host.++The startup gate runs before the first request is served, and a failing gate+stops the process. Starting anyway and reporting "degraded" would mean answering+requests with numbers that are wrong in a way the caller cannot see.+"""+from __future__ import annotations++import base64+import binascii+import os+from contextlib import asynccontextmanager+from typing import Any++from fastapi import FastAPI, HTTPException+from fastapi.responses import JSONResponse+from pydantic import BaseModel, Field++from .backends import BackendError, load_backend+from .prompt import PROMPT_TEMPLATE_MD5+from .scorer import ScoreInput, Scorer+from .selfcheck import SelfCheckResult, run_selfcheck++__all__ = ["app", "create_app"]++#: Set to "1" to start even if the prompt gate fails. For bringing up a new+#: engine, where the gate failing is the thing being worked on -- never for+#: serving, where it means the scores are off scale.+ALLOW_UNVERIFIED = os.environ.get("JEV_ALLOW_UNVERIFIED") == "1"+MAX_ITEMS = int(os.environ.get("JEV_MAX_ITEMS", "64"))++STATE: dict[str, Any] = {"scorer": None, "selfcheck": None, "served": None}+++# ── wire types ───────────────────────────────────────────────────────────────++class ScoreItem(BaseModel):+ original_image: str = Field(..., description="base64 of the original block image")+ render_image: str = Field(..., description="base64 of the candidate rendered back to an image")+ ocr_text: str = Field(..., description="the candidate text, verbatim -- it is not stripped")+++class ScoreRequest(BaseModel):+ items: list[ScoreItem]+++class ScoreResultItem(BaseModel):+ prob_1: float | None = Field(+ None, description="P(the candidate is consistent with the original image)"+ )+ error: str | None = None+++class ScoreResponse(BaseModel):+ results: list[ScoreResultItem]+++def _decode(b64: str, field: str, index: int) -> bytes:+ try:+ return base64.b64decode(b64, validate=False)+ except (ValueError, binascii.Error) as exc:+ raise HTTPException(422, f"items[{index}].{field}: not valid base64 ({exc})")+++# ── app ──────────────────────────────────────────────────────────────────────++@asynccontextmanager+async def lifespan(app: FastAPI):+ scorer = Scorer(load_backend(os.environ.get("JEV_BACKEND_CONFIG") or None,+ base_url=os.environ.get("JEV_BACKEND_URL")))+ STATE["scorer"] = scorer+ STATE["served"] = await scorer.backend.served_name()++ result: SelfCheckResult = await run_selfcheck(scorer.backend)+ STATE["selfcheck"] = result+ if not result.passed:+ if not ALLOW_UNVERIFIED:+ await scorer.aclose()+ raise RuntimeError(+ "\n".join([+ "refusing to start: the engine does not assemble the prompt this "+ "checkpoint was trained on.",+ *result.notes,+ "",+ "Set JEV_ALLOW_UNVERIFIED=1 to start anyway. Scores produced that "+ "way are not comparable to any published number.",+ ])+ )+ print("!! starting UNVERIFIED: " + "; ".join(result.notes), flush=True)++ try:+ yield+ finally:+ await scorer.aclose()+++def create_app() -> FastAPI:+ app = FastAPI(title="minicpm-ocr-jev score (SDK)", lifespan=lifespan)++ @app.get("/healthz")+ async def healthz() -> JSONResponse:+ check: SelfCheckResult | None = STATE.get("selfcheck")+ scorer: Scorer | None = STATE.get("scorer")+ served = STATE.get("served")+ if scorer is not None and served is None:+ served = STATE["served"] = await scorer.backend.served_name()+ body = {+ "status": "ok" if (check and check.passed) else "unverified",+ "served_model": served,+ "prompt": {+ "template_md5": PROMPT_TEMPLATE_MD5,+ "last_token": check.last_token if check else None,+ "expected_last_token": check.expected_last_token if check else None,+ "token_equality": check.token_equality if check else None,+ "notes": check.notes if check else [],+ },+ }+ return JSONResponse(body, status_code=200 if served else 503)++ @app.post("/v1/score", response_model=ScoreResponse)+ async def score(req: ScoreRequest) -> ScoreResponse:+ if not req.items:+ return ScoreResponse(results=[])+ if len(req.items) > MAX_ITEMS:+ raise HTTPException(413, f"at most {MAX_ITEMS} items per request, got {len(req.items)}")++ scorer: Scorer = STATE["scorer"]+ inputs = [+ ScoreInput(+ original=_decode(it.original_image, "original_image", i),+ render=_decode(it.render_image, "render_image", i),+ ocr_text=it.ocr_text,+ )+ for i, it in enumerate(req.items)+ ]+ # One bad item must not take the batch down with it: a caller that sent+ # twenty candidates and one unreadable PNG wants the nineteen scores.+ import asyncio++ settled = await asyncio.gather(+ *(scorer.score(i) for i in inputs), return_exceptions=True+ )+ results = []+ for outcome in settled:+ if isinstance(outcome, BaseException):+ if not isinstance(outcome, (BackendError, ValueError, OSError)):+ raise outcome+ results.append(ScoreResultItem(error=str(outcome)))+ else:+ results.append(ScoreResultItem(prob_1=outcome))+ return ScoreResponse(results=results)++ return app+++app = create_app()diff --git a/scripts/minicpm-ocr-jev/sdk/requirements-score.txt b/scripts/minicpm-ocr-jev/sdk/requirements-score.txtnew file mode 100644index 0000000..a995728--- /dev/null+++ b/scripts/minicpm-ocr-jev/sdk/requirements-score.txt@@ -0,0 +1,25 @@+# The score layer (sdk/jev_score/): prompt assembly, the backend adapter, softmax, and the+# thin HTTP shell. Nothing here renders, so none of the renderer's pinned+# dependencies -- Chromium, Node, the font stack, Markdown -- belongs in this+# environment. That is the point of the layer: a host that scores pre-rendered+# images installs this file and nothing else.+#+# vLLM is absent on purpose. It runs as its own process, in its own virtual+# environment (bash serve/setup_backend.sh <venv>), and must not share one with+# this: vLLM requires only "pillow>=12.3.0" while the pin below is exact, so+# `pip install -U vllm` in a shared environment would move Pillow forward.+#+# Lower bounds, not pins, except where noted. Nothing here touches a prompt, so+# none of it can move a score.+fastapi>=0.110+uvicorn>=0.27+httpx>=0.27+pydantic>=2.6+PyYAML>=6.0++# Pinned, unlike the rest. Pillow only runs on this path for images whose aspect+# ratio exceeds 199:1, which are padded with white and re-encoded; for every+# other image the bytes are forwarded untouched. Those padded images do reach the+# model as Pillow drew them, so the version is held at the renderer's pin rather+# than left to float.+Pillow==12.3.0diff --git a/scripts/minicpm-ocr-jev/sdk/setup_render.sh b/scripts/minicpm-ocr-jev/sdk/setup_render.shnew file mode 100644index 0000000..64bc81e--- /dev/null+++ b/scripts/minicpm-ocr-jev/sdk/setup_render.sh@@ -0,0 +1,137 @@+#!/usr/bin/env bash+#+# Install the renderer for the SDK path: Chromium, Node, KaTeX and the font+# environment, in their own virtual environment.+#+# usage: bash sdk/setup_render.sh [venv dir] (default /opt/venv-render)+#+# PIP_INDEX_URL=https://mirrors.ustc.edu.cn/pypi/simple \+# PLAYWRIGHT_DOWNLOAD_HOST=https://cdn.npmmirror.com/binaries/playwright \+# bash sdk/setup_render.sh+#+# Only the render+score service needs this. The score service works on images+# that are already rendered, so a host that runs scoring alone installs none of+# it -- no browser, no Node, no fonts.+#+# What this script is, and is not:+#+# renderer/setup_renderer.sh already installs the pinned packages and Chromium+# and reports on the fonts. It is called below rather than reimplemented. What+# it deliberately does not do is *change* your font environment, because fonts+# belong to the operating system and it is not that script's place to purge+# packages. The image route does change them, in serve/Dockerfile. This script+# is the bare-metal equivalent of that Dockerfile, so it does too -- and that+# is the whole difference between the two files.+#+# ⚠ Expect a different score here than from the published image, and read+# "Matching the reference renderer" in the README before comparing numbers. Even+# with the font environment pinned, a self-installed Chromium on a different+# kernel and GPU draws subtly different pixels, and rendered text is model input.+# Rankings hold; the digits after the second decimal place are not promised.+set -euo pipefail++VENV="${1:-/opt/venv-render}"++HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"+ROOT="$(cd "$HERE/.." && pwd)"++say() { printf '\n==> %s\n' "$*"; }+warn() { printf '\n!! %s\n' "$*" >&2; }++# ---------------------------------------------------------------------------+say "System packages"+# ---------------------------------------------------------------------------+# fonts-noto-cjk is load-bearing, not cosmetic: without a CJK font the browser+# draws replacement boxes, the render is meaningless, and the model scores it as+# a mismatch with nothing to indicate that fonts were the cause.+#+# nodejs is only for the KaTeX precheck. Dropping it costs you the precheck+# stage, not the renderer.+if command -v apt-get >/dev/null 2>&1; then+ if [ "$(id -u)" -ne 0 ] && ! command -v sudo >/dev/null 2>&1; then+ warn "not root and no sudo; skipping apt. Install by hand:+ python3 python3-venv python3-pip nodejs fonts-noto-cjk fontconfig ca-certificates curl"+ else+ SUDO=""; [ "$(id -u)" -eq 0 ] || SUDO="sudo"+ $SUDO env DEBIAN_FRONTEND=noninteractive apt-get update -qq+ $SUDO env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends \+ python3 python3-venv python3-pip \+ nodejs fonts-noto-cjk fontconfig ca-certificates curl+ fi+else+ warn "no apt-get; install python3/venv, nodejs, a CJK font and fontconfig yourself."+fi++# ---------------------------------------------------------------------------+say "Virtual environment: $VENV"+# ---------------------------------------------------------------------------+# Separate from the backend's environment, and this is a hard requirement rather+# than tidiness. The renderer pins Pillow to the exact version the model was+# calibrated on because that version decides what the rendered image looks like;+# vLLM asks only for "pillow>=12.3.0", so one shared environment lets a later+# `pip install -U vllm` move Pillow forward and change every score, silently.+if [ ! -x "$VENV/bin/python" ]; then+ python3 -m venv "$VENV"+fi+"$VENV/bin/pip" install -q -U pip setuptools wheel+export PATH="$VENV/bin:$PATH"+printf '%s\n' "$("$VENV/bin/python" -V)"++# ---------------------------------------------------------------------------+say "Renderer (the material's own installer)"+# ---------------------------------------------------------------------------+# Installs the pinned playwright/Pillow/Markdown, downloads the matching+# Chromium, checks Node and the bundled KaTeX. It reports on fonts; the next+# step is what pins them.+bash "$ROOT/renderer/setup_renderer.sh"++# ---------------------------------------------------------------------------+say "Service dependencies"+# ---------------------------------------------------------------------------+"$VENV/bin/pip" install -q -r "$ROOT/serve/requirements-serve.txt"+"$VENV/bin/pip" install -q -r "$HERE/requirements-score.txt"++# ---------------------------------------------------------------------------+say "Pinning the font environment"+# ---------------------------------------------------------------------------+# This has to come after the Chromium install above, not before: Playwright's+# --with-deps pulls in its own set of fonts and would put the purged packages+# straight back.+#+# Rendered text is model input, so a different face is a different score. The CSS+# stack names three faces -- Noto Sans CJK Regular and Bold, and+# DroidSansFallbackFull -- and fontconfig fills everything else by substitution,+# where the three purged packages outrank the named ones for characters Noto does+# not cover. 10-sub-pixel-rgb.conf tints glyph edges per channel: same shapes,+# different pixels. In the reference deployment, skipping this step left 16.5% of+# blocks ranking a different candidate first, against a 1% floor from simply+# re-running one container.+if command -v apt-get >/dev/null 2>&1 && { [ "$(id -u)" -eq 0 ] || command -v sudo >/dev/null 2>&1; }; then+ SUDO=""; [ "$(id -u)" -eq 0 ] || SUDO="sudo"+ $SUDO env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq fonts-droid-fallback+ $SUDO env DEBIAN_FRONTEND=noninteractive apt-get purge -y -qq \+ fonts-wqy-zenhei fonts-unifont fonts-ipafont-gothic || true+ $SUDO rm -f /etc/fonts/conf.d/10-sub-pixel-rgb.conf+ $SUDO fc-cache -f+ printf 'font environment pinned\n'+else+ warn "cannot change fonts here. Four commands, as root:+ apt-get install -y fonts-droid-fallback+ apt-get purge -y fonts-wqy-zenhei fonts-unifont fonts-ipafont-gothic+ rm -f /etc/fonts/conf.d/10-sub-pixel-rgb.conf+ fc-cache -f+ Without them the renderer still works and still measures the model well; it+ just resolves close blocks differently than the reference deployment."+fi++# ---------------------------------------------------------------------------+say "Checking the renderer"+# ---------------------------------------------------------------------------+"$VENV/bin/python" -c \+ "import sys; sys.path.insert(0, '$ROOT'); import rm_render; \+ rm_render.check_assets(require_node=True); print('renderer assets OK')"++say "Renderer ready. Measure how far this machine drifts from the references:"+printf ' %s/bin/python %s/renderer/check_renderer.py\n' "$VENV" "$ROOT"+printf ' That number is the thing to quote when your scores differ from the\n'+printf ' published ones -- it is the part of the difference that is yours.\n\n'diff --git a/scripts/minicpm-ocr-jev/sdk/start_engine.sh b/scripts/minicpm-ocr-jev/sdk/start_engine.shnew file mode 100644index 0000000..1aaefa4--- /dev/null+++ b/scripts/minicpm-ocr-jev/sdk/start_engine.sh@@ -0,0 +1,74 @@+#!/usr/bin/env bash+# Start the forward-pass engine for the SDK path: a stock `vllm serve`.+#+# usage: ./start_engine.sh <GPU index> <port> <model path>+#+# The three arguments have no defaults. Picking the wrong GPU means evicting+# whatever already runs on it, so a missing argument stops the script instead of+# quietly falling back to card 0.+#+# This is NOT serve/start_vllm.sh with a different name. One flag differs, and it+# is the flag that decides whether the model sees the prompt it was trained on:+#+# serve/start_vllm.sh --chat-template chat_template_passthrough.jinja+# this script (no --chat-template at all)+#+# The image route hands vLLM a pass-through template and assembles the finished+# prompt itself. The SDK route does the opposite: it sends the message as an+# interleaved content list and lets the model's own chat_template.jinja render+# it. Both arrive at the same 86 tokens. Mixing them does not -- a pass-through+# template applied to an interleaved list, or the model's template applied to a+# pre-assembled prompt, both produce a plausible prompt that is not this one.+#+# `sdk/jev_score/selfcheck.py` is what catches that, and it runs before either+# service accepts traffic.+set -euo pipefail++GPU="${1:?GPU index required (check nvidia-smi first)}"+PORT="${2:?port required}"+MODEL="${3:?path to the checkpoint directory required}"++GPU_MEM_UTIL="${GPU_MEM_UTIL:-0.80}"+MAX_MODEL_LEN="${MAX_MODEL_LEN:-16384}"+SERVED_NAME="${SERVED_NAME:-minicpm-ocr-jev}"+HOST="${HOST:-127.0.0.1}"++[ -d "$MODEL" ] || { echo "[error] model directory not found: $MODEL" >&2; exit 1; }++# Triton compiles a small CPython extension on the first forward pass, so a+# missing compiler fails two minutes in, after the weights load, as a bare+# CalledProcessError. Checking here turns that into one actionable line.+command -v gcc >/dev/null 2>&1 || {+ echo "[error] no C compiler on PATH. Triton needs one at run time, on every" >&2+ echo " cold start. sudo apt-get install -y gcc g++ python3-dev" >&2+ exit 1; }+python3 -c 'import os,sysconfig; raise SystemExit(0 if os.path.exists(sysconfig.get_paths()["include"] + "/Python.h") else 1)' || {+ echo "[error] Python headers (Python.h) not found; Triton cannot build its" >&2+ echo " extension. sudo apt-get install -y python3-dev" >&2+ exit 1; }++echo "model=$MODEL gpu=$GPU port=$PORT util=$GPU_MEM_UTIL (model's own chat template)"++# --chat-template-content-format openai -- keep message.content as the list of+# parts. This one is not optional and its failure is silent: with "string",+# vLLM flattens the list and hoists both image placeholders to the front of the+# text, so the model gets original+render+text instead of the interleaving it+# was trained on, and still answers 200 with a number in range.+# --limit-mm-per-prompt image:2 -- ternary input is original + render, always two.+# --hf-overrides num_labels:2 -- the checkpoint's config.json omits num_labels and+# HF's default happens to be 2, which is right by coincidence rather than by+# declaration. Saying it out loud means a future 3-class head fails to load+# instead of loading a wrongly-shaped score layer.+exec env CUDA_VISIBLE_DEVICES="$GPU" \+ vllm serve "$MODEL" \+ --served-model-name "$SERVED_NAME" \+ --runner pooling \+ --convert classify \+ --dtype bfloat16 \+ --max-model-len "$MAX_MODEL_LEN" \+ --limit-mm-per-prompt '{"image":2}' \+ --hf-overrides '{"num_labels":2}' \+ --gpu-memory-utilization "$GPU_MEM_UTIL" \+ --chat-template-content-format openai \+ --host "$HOST" \+ --port "$PORT"diff --git a/scripts/minicpm-ocr-jev/sdk/start_render_score.sh b/scripts/minicpm-ocr-jev/sdk/start_render_score.shnew file mode 100644index 0000000..02add67--- /dev/null+++ b/scripts/minicpm-ocr-jev/sdk/start_render_score.sh@@ -0,0 +1,47 @@+#!/usr/bin/env bash+# Start the render+score service -- built-in renderer. Renders candidates, then+# scores them.+#+# usage: ./start_render_score.sh <port> <engine base url>+#+# Run it with the renderer's interpreter -- the environment sdk/setup_render.sh+# built -- because this process renders in-process through serve/render_pool.py.+# That environment pins Pillow to the version the model was calibrated on, which+# the backend's environment deliberately does not.+#+# PATH=/opt/venv-render/bin:$PATH bash sdk/start_render_score.sh 18500 http://127.0.0.1:18499+#+# Neither argument has a default: pointing this at the wrong engine produces+# scores rather than an error.+set -euo pipefail++PORT="${1:?port required}"+BACKEND="${2:?engine base url required, e.g. http://127.0.0.1:18499}"++HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"++export JEV_BACKEND_URL="$BACKEND"+export JEV_WEIGHTS="${JEV_WEIGHTS:-}"++# This service imports rm_render.py and serve/render_pool.py, and Python writes a+# __pycache__ next to whatever it imports. serve/ is the image's source and is+# meant to stay byte-verifiable, so the bytecode goes somewhere else instead of+# accumulating inside it. It also keeps the material installable on a read-only+# mount, where the default would be a warning on every start.+export PYTHONPYCACHEPREFIX="${PYTHONPYCACHEPREFIX:-${TMPDIR:-/tmp}/jev-pycache}"++# One worker. The render pool keeps browsers open for the life of the process, so+# a second worker is a second set of browsers competing for the same cores, not+# twice the throughput. Scale RM_RENDER_BROWSERS instead.+HOST="${HOST:-0.0.0.0}"++python3 -c 'import playwright' 2>/dev/null || {+ echo "[error] playwright is not importable with this python3. This service" >&2+ echo " renders in process; run it with the renderer environment:" >&2+ echo " PATH=/opt/venv-render/bin:\$PATH bash sdk/start_render_score.sh $PORT $BACKEND" >&2+ exit 1; }++echo "render+score service on $HOST:$PORT -> engine $BACKEND (render mode ${RM_RENDER_MODE:-persistent})"++cd "$HERE"+exec python3 -m uvicorn app:app --host "$HOST" --port "$PORT" --no-access-logdiff --git a/scripts/minicpm-ocr-jev/sdk/start_score.sh b/scripts/minicpm-ocr-jev/sdk/start_score.shnew file mode 100644index 0000000..ea49564--- /dev/null+++ b/scripts/minicpm-ocr-jev/sdk/start_score.sh@@ -0,0 +1,35 @@+#!/usr/bin/env bash+# Start the score service -- bring your own render image. Scores candidates that+# have already been rendered.+#+# usage: ./start_score.sh <port> <engine base url>+#+# Neither argument has a default. Pointing this at the wrong engine produces+# scores rather than an error, so a missing argument stops the script.+#+# This is the entry point for a deployment that renders elsewhere. It needs no+# browser, no Node and no fonts -- only sdk/requirements-score.txt. If you want+# the service to render for you, start sdk/app.py instead+# (sdk/start_render_score.sh); it imports this layer directly and does not talk+# to this port.+set -euo pipefail++PORT="${1:?port required}"+BACKEND="${2:?engine base url required, e.g. http://127.0.0.1:18499}"++HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"++export JEV_BACKEND_URL="$BACKEND"+# Optional. With the weights reachable here, the startup gate also compares the+# engine's prompt against the local tokenizer token for token; without them it+# can only check the pooled position. Both are described in jev_score/selfcheck.py.+export JEV_WEIGHTS="${JEV_WEIGHTS:-}"++WORKERS="${JEV_WORKERS:-1}"+HOST="${HOST:-0.0.0.0}"++echo "score service on $HOST:$PORT -> engine $BACKEND"++cd "$HERE"+exec python3 -m uvicorn jev_score.server:app \+ --host "$HOST" --port "$PORT" --workers "$WORKERS" --no-access-logdiff --git a/scripts/minicpm-ocr-jev/serve/Dockerfile b/scripts/minicpm-ocr-jev/serve/Dockerfilenew file mode 100644index 0000000..43d3c53--- /dev/null+++ b/scripts/minicpm-ocr-jev/serve/Dockerfile@@ -0,0 +1,132 @@+# One container, one port, two processes: `vllm serve` for the forward pass and+# app.py for precheck, rendering and the HTTP contract.+#+# It builds from a bare `ubuntu:24.04` and installs everything through the+# material's own scripts -- the same commands the README gives a reader with a+# fresh machine. That is deliberate: if this image builds, the documented install+# works, and there is no second, image-only path to drift out of step with the+# instructions.+#+# No weights. The checkpoint is a run-time argument, so one image serves any+# compatible checkpoint and the image itself stays something you can rebuild+# without 4 GB of context. Mount the weights and name them:+#+# docker build -f serve/Dockerfile -t minicpm-ocr-jev-1-0:latest .+#+# docker run -d --name minicpm-ocr-jev --gpus '"device=0"' \+# -p 127.0.0.1:8030:8030 \+# -v /path/to/checkpoint:/weights:ro \+# minicpm-ocr-jev-1-0:latest 8030 /weights+#+# Behind a slow link to pypi.org or to Playwright's CDN, pass mirrors -- without+# them this build takes hours rather than minutes, almost all of it in two+# downloads:+#+# docker build -f serve/Dockerfile -t minicpm-ocr-jev-1-0:latest \+# --build-arg PIP_INDEX_URL=https://<mirror>/simple \+# --build-arg PLAYWRIGHT_DOWNLOAD_HOST=https://<mirror> .+#+# A note on size: this image carries CUDA wheels, Chromium and CJK fonts, so it is+# not small. What it does not carry is a second copy of either -- the forward pass+# and the renderer share one base, and the weights stay outside.+FROM ubuntu:24.04++ARG PIP_INDEX_URL=""+ARG PLAYWRIGHT_DOWNLOAD_HOST=""++ENV DEBIAN_FRONTEND=noninteractive \+ PYTHONUNBUFFERED=1 \+ PIP_INDEX_URL=${PIP_INDEX_URL} \+ PIP_DISABLE_PIP_VERSION_CHECK=1++# README, "Install / 0. System packages", verbatim.+#+# gcc and python3-dev are not build-time conveniences to be removed afterwards:+# Triton compiles a CPython extension on the first forward pass of every fresh+# container, so they are needed on every cold start. Dropping them produces a+# container that loads the weights, runs for two minutes and dies on a bare+# CalledProcessError.+#+# fonts-noto-cjk is just as load-bearing for a different reason: without a CJK+# font the browser draws replacement boxes, the render is meaningless, and the+# model scores it as a mismatch with nothing to indicate fonts were the cause.+RUN apt-get update -qq \+ && apt-get install -y -qq --no-install-recommends \+ python3 python3-pip python3-venv python3-dev \+ gcc g++ nodejs fonts-noto-cjk fontconfig ca-certificates curl \+ && rm -rf /var/lib/apt/lists/*++WORKDIR /app++# Dependency manifests before the source, so editing app.py does not re-download+# Chromium or five gigabytes of CUDA wheels.+COPY requirements.txt /app/requirements.txt+COPY serve/requirements-serve.txt /app/serve/requirements-serve.txt+COPY renderer/setup_renderer.sh /app/renderer/setup_renderer.sh+COPY serve/setup_backend.sh /app/serve/setup_backend.sh++# The renderer half, in its own environment. setup_renderer.sh also checks Node+# and the fonts, so a missing one fails the build instead of the first request --+# but it needs the rest of renderer/ to check, which arrives with COPY . below;+# hence the pinned packages here and the full check further down.+RUN python3 -m venv /opt/venv-render \+ && /opt/venv-render/bin/pip install --no-cache-dir -q -U pip \+ && /opt/venv-render/bin/pip install --no-cache-dir -r /app/requirements.txt \+ && /opt/venv-render/bin/pip install --no-cache-dir -r /app/serve/requirements-serve.txt \+ && PLAYWRIGHT_DOWNLOAD_HOST="${PLAYWRIGHT_DOWNLOAD_HOST}" \+ /opt/venv-render/bin/python -m playwright install --with-deps chromium \+ && rm -rf /var/lib/apt/lists/*++# README, "Install / 1. The renderer / Pin the font environment", verbatim.+#+# This has to come after the playwright install above, not before: --with-deps+# pulls in its own set of fonts, and would put the purged packages back.+#+# Rendered text is model input here, so a different face is a different score.+# The CSS stack names three faces -- Noto Sans CJK Regular and Bold, and+# DroidSansFallbackFull -- and fontconfig fills everything else by substitution,+# where the three purged packages outrank the named ones for characters Noto does+# not cover. 10-sub-pixel-rgb.conf tints glyph edges per channel: same shapes,+# different pixels. Fixing both is what makes this image render byte-identical to+# the reference deployment; without it 16.5% of blocks rank a different candidate+# first, against a 1% floor from re-running one container.+RUN apt-get update -qq \+ && apt-get install -y -qq fonts-droid-fallback \+ && apt-get purge -y -qq fonts-wqy-zenhei fonts-unifont fonts-ipafont-gothic \+ && rm -f /etc/fonts/conf.d/10-sub-pixel-rgb.conf \+ && fc-cache -f \+ && rm -rf /var/lib/apt/lists/*++# The forward-pass half, in a second environment -- see setup_backend.sh for why+# the two are not one. The script also asserts that this vLLM registers the+# model's architecture, which is the real requirement; the version is not.+RUN bash /app/serve/setup_backend.sh /opt/venv-vllm++COPY . /app++# Fail the build rather than the first request if an asset went missing: this+# covers KaTeX, the render module, the precheck script and Node.+RUN /opt/venv-render/bin/python -c \+ "import sys; sys.path.insert(0, '/app'); import rm_render; \+ rm_render.check_assets(require_node=True); print('renderer assets OK')"++# RM_WORKERS is deliberately unset: start_app.sh sizes it from the core count and+# caps it where one GPU backend saturates. Set it explicitly when running under a+# CPU quota -- nproc inside a container reports the host's cores, not this+# container's share, so the default over-provisions on a quota-limited host.+ENV RM_RENDER_MODE=persistent \+ RM_RENDER_BROWSERS=2 \+ RM_BROWSER_CONCURRENCY=8 \+ RM_VLLM_PORT=8026++EXPOSE 8030++# /healthz reports the backend's reachability, so this covers both halves.+HEALTHCHECK --interval=30s --timeout=10s --start-period=600s --retries=3 \+ CMD curl -sf http://127.0.0.1:8030/healthz > /dev/null || exit 1++# Port and checkpoint are arguments, not environment: `docker run ... 8030 /weights`+# overrides them without --entrypoint, and a missing checkpoint stops the container+# instead of quietly serving nothing.+ENTRYPOINT ["bash", "/app/serve/start_all.sh"]+CMD ["8030", "/weights"]diff --git a/scripts/minicpm-ocr-jev/serve/app.py b/scripts/minicpm-ocr-jev/serve/app.pynew file mode 100644index 0000000..c8a7cf8--- /dev/null+++ b/scripts/minicpm-ocr-jev/serve/app.py@@ -0,0 +1,692 @@+"""HTTP service for the OCR reward model.++This is the thin half of a two-process deployment:++ client ──> app.py (this file) ──HTTP──> vllm serve+ precheck forward pass+ render++The split is the point. Scoring one candidate costs roughly 0.26s of precheck,+0.88s of rendering and 0.10s of forward pass, so nine tenths of the work is CPU+and a browser, and one tenth is the GPU. Keeping them in one process means the+two compete for the same interpreter, and the only way to add rendering capacity+is to add GPUs. Split apart, this process is stateless and can be run N times+against one `vllm serve`, and vLLM's own scheduler -- continuous batching,+prefix caching -- handles the GPU side without any engine code of ours.++A second consequence worth knowing: because the backend batches across HTTP+requests, candidates from different requests are batched together automatically.+The old service had a dedicated endpoint to flatten several blocks into one batch+for that reason; here it comes for free, and `score_best_batch` is kept only+because callers already speak it.++Input form: this checkpoint is ternary (original image + text + rendered image).+`input_form` stays in the request schema, and must be "ternary"; "binary" is+rejected rather than ignored, because a silently accepted wrong form produces+scores that look fine.+"""+from __future__ import annotations++import asyncio+import base64+import binascii+import hashlib+import io+import json+import os+import shutil+import sys+import tempfile+import time+import uuid+from contextlib import asynccontextmanager+from pathlib import Path+from typing import Any, Optional++import httpx+from fastapi import FastAPI, HTTPException+from fastapi.responses import JSONResponse+from PIL import Image+from pydantic import BaseModel, Field, model_validator++sys.path.insert(0, str(Path(__file__).resolve().parent.parent))++from infer_vllm import MAX_ASPECT_RATIO, PROMPT_TEMPLATE_MD5, build_prompt # noqa: E402+from render_pool import RenderPool # noqa: E402+from rm_render import CATEGORIES, Candidate, render_candidates # noqa: E402++# ── settings ─────────────────────────────────────────────────────────────────++VLLM_URL = os.environ.get("RM_VLLM_URL", "http://127.0.0.1:8026").rstrip("/")+#: What the backend calls this model. Asked for rather than assumed: the only+#: name that works is the one `vllm serve` was started with, so a constant here+#: is wrong in exactly the case nobody is watching -- the two halves started from+#: different revisions of this repo, start-up looking fine, and the first real+#: request coming back 404 from the backend. Set RM_VLLM_MODEL to pin it, which+#: you need only when the backend serves more than one model.+VLLM_MODEL_OVERRIDE = os.environ.get("RM_VLLM_MODEL") or None+VLLM_MODEL: str | None = VLLM_MODEL_OVERRIDE+THRESHOLD = float(os.environ.get("RM_THRESHOLD", "0.5"))+MAX_ITEMS = int(os.environ.get("RM_MAX_ITEMS", "64"))+#: "persistent" keeps one Chromium open for the life of the process; "subprocess"+#: starts a fresh one per batch. Persistent is the default because the fresh one+#: costs 2.28s before the first candidate is drawn, against 0.13s per candidate+#: after -- an overhead larger than the work on every realistic request. The+#: subprocess path stays reachable because it needs nothing of the service to be+#: healthy, which makes it the thing to fall back to when the pool will not start.+RENDER_MODE = os.environ.get("RM_RENDER_MODE", "persistent")+#: Persistent mode: how many Chromiums to keep open. This is the throughput knob+#: -- one browser is one set of processes and tops out well short of a busy+#: machine, however many pages it is allowed. Scale it with cores, not with+#: expected request rate.+RENDER_BROWSERS = int(os.environ.get("RM_RENDER_BROWSERS", "8"))+#: Pages rendering at once inside one browser. This is the per-request latency+#: knob: a request with twenty candidates renders them this many at a time. In+#: subprocess mode it is the same cap, applied per render driver.+BROWSER_CONCURRENCY = int(os.environ.get("RM_BROWSER_CONCURRENCY", "8"))+#: Subprocess mode only: how many render drivers may run at once, each with its+#: own Chromium. Ignored when the pool is in use, where one browser serves all.+RENDER_SLOTS = int(os.environ.get("RM_RENDER_SLOTS", "4"))+#: In-flight requests to the backend. vLLM queues past its own capacity, so this+#: only bounds our socket and memory use; the backend saturates around 16.+FORWARD_CONCURRENCY = int(os.environ.get("RM_FORWARD_CONCURRENCY", "32"))+WORK_ROOT = os.environ.get("RM_WORK_ROOT") or tempfile.gettempdir()+KEEP_WORK = os.environ.get("RM_KEEP_WORK", "0") == "1"+#: Interpreter used for the render driver. Set it when Playwright lives in a+#: different environment than this service -- in the reference image, a wrapper+#: script that also sets LD_LIBRARY_PATH and PLAYWRIGHT_BROWSERS_PATH.+RENDER_PYTHON = os.environ.get("RM_RENDER_PYTHON") or None++INPUT_FORMS = ("ternary",)+ENCODE_ERROR = "encode_error"+#: Failure kinds counted in `forward_error`. A new one must be added here, or the+#: four sub-counts stop adding up to `total` and blocks go missing silently.+FORWARD_FAILURES = {"forward_error", ENCODE_ERROR}++#: prob_yes for items that never reached the model. Two different values on+#: purpose, and callers must read `verdict` before the score:+#: 0.0 -- the candidate was judged unusable (bad LaTeX, render failed).+#: -1.0 -- we never found out (bad input bytes, backend error).+#: Both lose every argmax and fail every threshold, so a caller that ignores+#: `verdict` degrades safely rather than wrongly.+SENTINEL = {"precheck_reject": 0.0, "render_error": 0.0,+ "missing_original_image": 0.0, ENCODE_ERROR: -1.0, "forward_error": -1.0}++RENDER_GATE = asyncio.Semaphore(RENDER_SLOTS)+FORWARD_GATE = asyncio.Semaphore(FORWARD_CONCURRENCY)+HTTP: httpx.AsyncClient | None = None+POOL: RenderPool | None = None+++@asynccontextmanager+async def lifespan(app: FastAPI):+ global HTTP, POOL+ HTTP = httpx.AsyncClient(timeout=httpx.Timeout(600.0, connect=10.0),+ limits=httpx.Limits(max_connections=FORWARD_CONCURRENCY * 2))+ if RENDER_MODE == "persistent":+ # A browser that will not start is a configuration problem -- a missing+ # Chromium, missing system libraries -- and it will not fix itself on the+ # first request. Failing here states the cause once, at start-up, instead+ # of once per request in a stack trace from inside Playwright.+ POOL = RenderPool(browsers=RENDER_BROWSERS,+ pages_per_browser=BROWSER_CONCURRENCY)+ await POOL.start()+ try:+ yield+ finally:+ if POOL is not None:+ await POOL.close()+ await HTTP.aclose()+++app = FastAPI(title="minicpm-ocr-jev (native vLLM)", lifespan=lifespan)+++# ── schema ───────────────────────────────────────────────────────────────────+# Field names and semantics follow the existing service, so callers do not change.++class ScoreItem(BaseModel):+ case_id: str+ image: str = Field(..., description="original block image, base64 (PNG/JPEG)")+ ocr_text: str+ category: str = "text"+ render_image: Optional[str] = Field(+ default=None,+ description="rendered image, base64. Omit it and the service renders the "+ "candidate itself; supplying it skips precheck and rendering.")++ @model_validator(mode="after")+ def check_category(self) -> "ScoreItem":+ if self.category not in CATEGORIES:+ raise ValueError(f"category must be one of {CATEGORIES}")+ return self+++class ScoreRequest(BaseModel):+ input_form: str = Field(..., description=f"one of {INPUT_FORMS}")+ items: list[ScoreItem]+ threshold: Optional[float] = None++ @model_validator(mode="after")+ def check_form(self) -> "ScoreRequest":+ if self.input_form not in INPUT_FORMS:+ raise ValueError(f"input_form must be one of {INPUT_FORMS}")+ return self+++class ScoreResultItem(BaseModel):+ case_id: str+ category: str = "text"+ verdict: str+ prob_yes: float+ prob_no: Optional[float] = None+ detail: str = ""+++class CategoryStats(BaseModel):+ total: int+ scored: int+ precheck_reject: int+ render_error: int+ forward_error: int = 0+ pass_rate: float = Field(+ ..., description="scoring SUCCESS rate = scored / total. Independent of the "+ "threshold. This is NOT the throughput rate -- for that, "+ "read throughput_rate.")+ throughput_rate: float = Field(+ ..., description="throughput rate = (scored items with prob_yes >= threshold) "+ "/ total. The test is >=, not >, and only items with "+ "verdict=scored are counted.")+ mean_prob_yes: Optional[float] = None+++class ScoreSummary(BaseModel):+ total: int+ scored: int+ precheck_reject: int+ render_error: int+ forward_error: int = 0+ pass_rate: float = Field(..., description="scoring SUCCESS rate, not the throughput rate.")+ throughput_rate: float = Field(..., description="throughput rate; test is >=.")+ threshold_used: float+ input_form: str = ""+ by_category: dict[str, CategoryStats] = {}+++class ScoreResponse(BaseModel):+ results: list[ScoreResultItem]+ summary: ScoreSummary+++class ScoreBestRequest(BaseModel):+ input_form: str = Field(..., description=f"one of {INPUT_FORMS}")+ case_id: str = Field(default_factory=lambda: str(uuid.uuid4()))+ image: str = Field(..., description="original block image, base64")+ candidates: list[str] = Field(..., min_length=1)+ category: str = "text"+ #: One render per candidate -- each renders its own text -- so this is a list+ #: as long as `candidates`, not a single image.+ render_images: Optional[list[str]] = None++ @model_validator(mode="after")+ def check_fields(self) -> "ScoreBestRequest":+ if self.input_form not in INPUT_FORMS:+ raise ValueError(f"input_form must be one of {INPUT_FORMS}")+ if self.category not in CATEGORIES:+ raise ValueError(f"category must be one of {CATEGORIES}")+ if self.render_images is not None and len(self.render_images) != len(self.candidates):+ raise ValueError(+ f"render_images must be the same length as candidates: "+ f"{len(self.render_images)} vs {len(self.candidates)}")+ return self+++class ScoreBestResponse(BaseModel):+ best_index: int+ best_text: str+ #: prob_yes per candidate, in input order. See SENTINEL for failure values.+ scores: list[float]+ verdicts: list[str]+ #: Seconds per stage. Rendering dominates, so a caller tuning throughput needs+ #: to see the stages apart rather than one total.+ stage_sec: dict[str, float] = {}+ batch_size: int = 0+++class ScoreBestBatchRequest(BaseModel):+ input_form: str = Field(..., description=f"one of {INPUT_FORMS}")+ items: list[ScoreBestRequest] = Field(..., min_length=1)++ @model_validator(mode="after")+ def check_form(self) -> "ScoreBestBatchRequest":+ if self.input_form not in INPUT_FORMS:+ raise ValueError(f"input_form must be one of {INPUT_FORMS}")+ return self+++class ScoreBestBatchResponse(BaseModel):+ results: list[ScoreBestResponse]+ stage_sec: dict[str, float] = {}+ batch_size: int = 0+++# ── images ───────────────────────────────────────────────────────────────────++def _slot_id(index: int, case_id: str) -> str:+ """A short fixed-length id for filenames within one request.++ Caller case ids carry document paths and run to 250+ bytes; ext4 caps a single+ filename at 255 bytes, and a Chinese character costs three. Hashing here keeps+ the real case id in the response and out of every path.+ """+ return f"{index:04d}_{hashlib.sha1(case_id.encode('utf-8')).hexdigest()[:16]}"+++def _data_url(raw: bytes) -> str:+ """Bytes to a data URL the backend accepts, padding extreme aspect ratios.++ Qwen3.5-VL's preprocessor refuses images longer than 200:1, and document block+ crops are routinely a few pixels tall. Such an image is padded with white+ rather than resized: padding keeps the glyphs at their original scale, which+ is what the model was trained to compare against.++ Images that need no padding are forwarded byte for byte -- re-encoding every+ image would cost CPU on the hot path and change the pixels the model sees.+ """+ with Image.open(io.BytesIO(raw)) as img:+ fmt = (img.format or "PNG").upper()+ width, height = img.size+ longest, shortest = max(width, height), max(1, min(width, height))+ needs_pad = longest / shortest > MAX_ASPECT_RATIO+ if not needs_pad:+ mime = "image/jpeg" if fmt in ("JPEG", "JPG") else "image/png"+ return f"data:{mime};base64," + base64.b64encode(raw).decode("ascii")++ rgb = img.convert("RGB")+ if width >= height:+ new_w, new_h = width, max(height, int(width / MAX_ASPECT_RATIO + 0.999999))+ else:+ new_h, new_w = height, max(width, int(height / MAX_ASPECT_RATIO + 0.999999))+ canvas = Image.new("RGB", (new_w, new_h), "white")+ canvas.paste(rgb, ((new_w - width) // 2, (new_h - height) // 2))++ buf = io.BytesIO()+ canvas.save(buf, format="PNG")+ return "data:image/png;base64," + base64.b64encode(buf.getvalue()).decode("ascii")+++def _decode_b64(b64: str) -> bytes:+ """Decode caller-supplied base64, raising something we can turn into a verdict.++ Callers send malformed base64 often enough that this has to be per item: an+ exception escaping here would fail the whole request and throw away the+ results of every good item batched with it.+ """+ try:+ return base64.b64decode(b64, validate=False)+ except (ValueError, binascii.Error) as exc:+ raise ValueError(str(exc)) from None+++# ── pipeline ─────────────────────────────────────────────────────────────────++async def _served_model() -> str | None:+ """The name the backend answers to, asked once and then remembered.++ None while the backend is still loading its weights; callers report that as a+ backend error rather than guessing a name and getting a 404 instead.+ """+ global VLLM_MODEL+ if VLLM_MODEL:+ return VLLM_MODEL+ assert HTTP is not None+ try:+ resp = await HTTP.get(f"{VLLM_URL}/v1/models", timeout=5.0)+ served = [m["id"] for m in resp.json().get("data", [])] if resp.status_code == 200 else []+ except Exception:+ return None+ if served:+ VLLM_MODEL = served[0]+ return VLLM_MODEL+++async def _forward_one(prompt: str, original: str, render: str) -> dict[str, Any]:+ """Score one candidate. `original` and `render` are data URLs, in that order.++ The two images are listed before the text part because the backend binds the+ Nth image to the Nth placeholder in the rendered prompt, and build_prompt puts+ the original's placeholder first.+ """+ model = await _served_model()+ if model is None:+ return {"verdict": "forward_error", "prob_yes": SENTINEL["forward_error"],+ "detail": "backend not ready: /v1/models did not name a model"}+ body = {+ "model": model,+ "messages": [{+ "role": "user",+ "content": [+ {"type": "image_url", "image_url": {"url": original}},+ {"type": "image_url", "image_url": {"url": render}},+ {"type": "text", "text": prompt},+ ],+ }],+ # Raw logits: the softmax below weighs the two classes against each other,+ # which is what the reference setup does. Letting the server apply its own+ # activation would change the numbers without changing the ranking, and+ # silently break comparisons against published scores.+ "use_activation": False,+ "add_generation_prompt": False,+ }+ assert HTTP is not None+ async with FORWARD_GATE:+ resp = await HTTP.post(f"{VLLM_URL}/classify", json=body)+ if resp.status_code != 200:+ return {"verdict": "forward_error", "prob_yes": SENTINEL["forward_error"],+ "detail": f"backend HTTP {resp.status_code}: {resp.text[:300]}"}+ logits = resp.json()["data"][0]["probs"]+ if len(logits) != 2:+ return {"verdict": "forward_error", "prob_yes": SENTINEL["forward_error"],+ "detail": f"expected 2 class logits, got {len(logits)}"}+ import math++ a, b = float(logits[0]), float(logits[1])+ top = max(a, b)+ exp_a, exp_b = math.exp(a - top), math.exp(b - top)+ p_yes = exp_b / (exp_a + exp_b)+ return {"verdict": "scored", "prob_yes": p_yes, "prob_no": 1.0 - p_yes, "detail": ""}+++async def _run_pipeline(items: list[ScoreItem], work: Path,+ stage_sec: dict[str, float] | None = None) -> dict[str, dict[str, Any]]:+ """precheck -> render -> forward, for one batch of items.++ Returns {case_id: result}. Every input gets an entry, including the ones that+ never reached the model.+ """+ out: dict[str, dict[str, Any]] = {}+ originals: dict[str, str] = {} # case_id -> data URL+ renders: dict[str, str] = {} # case_id -> data URL+ to_render: list[Candidate] = []++ # --- decode the caller's images -----------------------------------------+ t0 = time.perf_counter()+ for i, item in enumerate(items):+ slot = _slot_id(i, item.case_id)+ try:+ raw = _decode_b64(item.image)+ originals[item.case_id] = _data_url(raw)+ except Exception as exc:+ out[item.case_id] = {"verdict": ENCODE_ERROR, "prob_yes": SENTINEL[ENCODE_ERROR],+ "detail": f"original image: {exc}"}+ continue++ if item.render_image is not None:+ try:+ renders[item.case_id] = _data_url(_decode_b64(item.render_image))+ except Exception as exc:+ out[item.case_id] = {"verdict": ENCODE_ERROR, "prob_yes": SENTINEL[ENCODE_ERROR],+ "detail": f"render image: {exc}"}+ continue++ # The renderer derives its geometry from the original image file, so the+ # bytes have to be on disk for it even though the forward pass uses the+ # data URL above.+ path = work / f"{slot}.img"+ path.write_bytes(raw)+ to_render.append(Candidate(case_id=item.case_id, image_path=str(path),+ text=item.ocr_text, category=item.category))+ if stage_sec is not None:+ stage_sec["decode_sec"] = round(time.perf_counter() - t0, 6)++ # --- precheck + render ---------------------------------------------------+ if to_render:+ t0 = time.perf_counter()+ if POOL is not None:+ # No gate here: the pool holds one process-wide semaphore of its own.+ # Adding a second cap around it would throttle requests rather than+ # pages, which is the wrong unit -- a request may carry one candidate+ # or thirty.+ results = await POOL.render(to_render, work / "render", timings=stage_sec)+ else:+ async with RENDER_GATE:+ results = await asyncio.to_thread(+ render_candidates, to_render,+ work_dir=work / "render",+ precheck=True,+ browser_concurrency=BROWSER_CONCURRENCY,+ python_bin=RENDER_PYTHON,+ )+ if stage_sec is not None:+ stage_sec["render_sec"] = round(time.perf_counter() - t0, 6)++ for r in results:+ if r.ok and r.render_image_path and Path(r.render_image_path).is_file():+ renders[r.case_id] = _data_url(Path(r.render_image_path).read_bytes())+ else:+ reason = r.reason or "render_error"+ out[r.case_id] = {"verdict": reason,+ "prob_yes": SENTINEL.get(reason, 0.0),+ "detail": r.detail or ""}++ # --- forward -------------------------------------------------------------+ pending = [item for item in items if item.case_id not in out]+ t0 = time.perf_counter()+ scored = await asyncio.gather(*[+ _forward_one(build_prompt(item.ocr_text),+ originals[item.case_id], renders[item.case_id])+ for item in pending+ ], return_exceptions=True)+ if stage_sec is not None:+ stage_sec["forward_sec"] = round(time.perf_counter() - t0, 6)+ stage_sec["forward_rows"] = len(pending)++ for item, result in zip(pending, scored):+ if isinstance(result, BaseException):+ out[item.case_id] = {"verdict": "forward_error",+ "prob_yes": SENTINEL["forward_error"],+ "detail": f"{type(result).__name__}: {result}"}+ else:+ out[item.case_id] = result+ return out+++def _workdir() -> Path:+ return Path(tempfile.mkdtemp(dir=WORK_ROOT, prefix="rm_"))+++def _cleanup(work: Path) -> None:+ if not KEEP_WORK:+ shutil.rmtree(work, ignore_errors=True)+++# ── summary ──────────────────────────────────────────────────────────────────++def _stats_for(items: list[ScoreResultItem], thr: float) -> CategoryStats:+ total = len(items)+ scored = [r for r in items if r.verdict == "scored"]+ n_pass = sum(1 for r in scored if r.prob_yes >= thr)+ return CategoryStats(+ total=total,+ scored=len(scored),+ precheck_reject=sum(1 for r in items if r.verdict == "precheck_reject"),+ render_error=sum(1 for r in items if r.verdict in ("render_error", "missing_original_image")),+ forward_error=sum(1 for r in items if r.verdict in FORWARD_FAILURES),+ pass_rate=len(scored) / total if total else 0.0,+ throughput_rate=n_pass / total if total else 0.0,+ mean_prob_yes=(sum(r.prob_yes for r in scored) / len(scored)) if scored else None,+ )+++def _summarize(items: list[ScoreResultItem], thr: float, form: str) -> ScoreSummary:+ overall = _stats_for(items, thr)+ by_category = {+ cat: _stats_for(group, thr)+ for cat in CATEGORIES+ if (group := [r for r in items if r.category == cat])+ }+ return ScoreSummary(+ total=overall.total, scored=overall.scored,+ precheck_reject=overall.precheck_reject, render_error=overall.render_error,+ forward_error=overall.forward_error, pass_rate=overall.pass_rate,+ throughput_rate=overall.throughput_rate, threshold_used=thr,+ input_form=form, by_category=by_category,+ )+++# ── routes ───────────────────────────────────────────────────────────────────+[email protected]("/healthz")+async def healthz() -> JSONResponse:+ """Readiness plus the identity of everything that decides a score.++ A service that answers 200 while pointed at the wrong weights or a different+ prompt produces numbers that look right, so the things that would make scores+ incomparable -- backend model, prompt fingerprint, renderer version -- are+ reported here rather than left to be inferred from the image tag.+ """+ global VLLM_MODEL+ backend: dict[str, Any] = {"url": VLLM_URL, "alive": False}+ try:+ assert HTTP is not None+ resp = await HTTP.get(f"{VLLM_URL}/v1/models", timeout=5.0)+ if resp.status_code == 200:+ backend["alive"] = True+ backend["served"] = [m["id"] for m in resp.json().get("data", [])]+ # Same discovery as the scoring path, so /healthz reports the name+ # that will actually be sent rather than one read from a constant.+ if VLLM_MODEL is None and backend["served"]:+ VLLM_MODEL = backend["served"][0]+ except Exception as exc:+ backend["error"] = f"{type(exc).__name__}: {exc}"+ backend["model"] = VLLM_MODEL++ body = {+ "status": "ok" if backend["alive"] else "loading",+ "backend": backend,+ "input_forms": {"supported": list(INPUT_FORMS), "template_md5": PROMPT_TEMPLATE_MD5},+ "scorer": {"model": VLLM_MODEL, "backend": "vllm-serve-classify",+ "template_md5": PROMPT_TEMPLATE_MD5},+ "render": ({"enabled": True, **POOL.describe()} if POOL is not None else+ {"enabled": True, "mode": "subprocess",+ "browser_concurrency": BROWSER_CONCURRENCY, "slots": RENDER_SLOTS}),+ "settings": {"threshold": THRESHOLD, "max_items": MAX_ITEMS,+ "forward_concurrency": FORWARD_CONCURRENCY},+ }+ return JSONResponse(body, status_code=200 if backend["alive"] else 503)++[email protected]("/v1/rm/score", response_model=ScoreResponse)+async def score(req: ScoreRequest) -> ScoreResponse:+ if not req.items:+ raise HTTPException(400, "items must not be empty")+ if len(req.items) > MAX_ITEMS:+ raise HTTPException(400, f"at most {MAX_ITEMS} items per request")++ thr = req.threshold if req.threshold is not None else THRESHOLD+ work = _workdir()+ try:+ raw = await _run_pipeline(list(req.items), work)+ finally:+ _cleanup(work)++ results = [+ ScoreResultItem(+ case_id=item.case_id, category=item.category,+ verdict=raw[item.case_id]["verdict"],+ prob_yes=raw[item.case_id]["prob_yes"],+ prob_no=raw[item.case_id].get("prob_no"),+ detail=raw[item.case_id].get("detail", ""),+ )+ for item in req.items+ ]+ return ScoreResponse(results=results, summary=_summarize(results, thr, req.input_form))+++def _expand(req: ScoreBestRequest, prefix: str = "") -> list[ScoreItem]:+ renders = req.render_images or [None] * len(req.candidates)+ return [+ ScoreItem(case_id=f"{prefix}{req.case_id}__{i}", image=req.image,+ ocr_text=text, category=req.category, render_image=renders[i])+ for i, text in enumerate(req.candidates)+ ]+++def _pick_best(req: ScoreBestRequest, items: list[ScoreItem],+ raw: dict[str, dict[str, Any]], **extra: Any) -> ScoreBestResponse:+ """argmax over the candidates that actually scored.++ No threshold is involved: picking the best candidate is a ranking question,+ and the threshold only ever decides whether a block counts as passing. If+ every candidate failed, index 0 comes back -- a degraded answer the caller can+ detect from `verdicts`, rather than an error that loses the whole block.+ """+ scores = [raw[i.case_id]["prob_yes"] for i in items]+ verdicts = [raw[i.case_id]["verdict"] for i in items]+ ok = [i for i, v in enumerate(verdicts) if v == "scored"]+ best = max(ok, key=lambda i: scores[i]) if ok else 0+ return ScoreBestResponse(best_index=best, best_text=req.candidates[best],+ scores=scores, verdicts=verdicts, **extra)++[email protected]("/v1/rm/score_best", response_model=ScoreBestResponse)+async def score_best(req: ScoreBestRequest) -> ScoreBestResponse:+ """N candidates for one block, sharing one original image; returns the best."""+ items = _expand(req)+ if len(items) > MAX_ITEMS:+ raise HTTPException(400, f"at most {MAX_ITEMS} candidates per request")++ work = _workdir()+ stage_sec: dict[str, float] = {}+ t0 = time.perf_counter()+ try:+ raw = await _run_pipeline(items, work, stage_sec=stage_sec)+ finally:+ _cleanup(work)+ stage_sec["total_sec"] = round(time.perf_counter() - t0, 6)++ return _pick_best(req, items, raw, stage_sec=stage_sec,+ batch_size=int(stage_sec.get("forward_rows", 0)))++[email protected]("/v1/rm/score_best_batch", response_model=ScoreBestBatchResponse)+async def score_best_batch(req: ScoreBestBatchRequest) -> ScoreBestBatchResponse:+ """Several blocks in one request, flattened into a single pipeline run.++ Kept because callers already use it. Note that it no longer carries the+ advantage it used to: the backend batches across HTTP requests on its own, so+ separate `score_best` calls now reach the GPU in the same batch anyway. What+ this endpoint still saves is one render driver start-up per block.++ `input_form` is taken from the batch; the per-block field is ignored, since+ one request is never half ternary.+ """+ per_block = [_expand(blk, prefix=f"b{bi}__") for bi, blk in enumerate(req.items)]+ items = [item for block in per_block for item in block]+ if len(items) > MAX_ITEMS:+ raise HTTPException(+ 400, f"{len(items)} candidates after flattening, over the per-request "+ f"limit of {MAX_ITEMS}; split the batch")++ work = _workdir()+ stage_sec: dict[str, float] = {}+ t0 = time.perf_counter()+ try:+ raw = await _run_pipeline(items, work, stage_sec=stage_sec)+ finally:+ _cleanup(work)+ stage_sec["total_sec"] = round(time.perf_counter() - t0, 6)++ # Per-block stage timings are left empty on purpose: one batch's wall clock+ # cannot be apportioned to the blocks inside it without inventing numbers.+ results = [_pick_best(blk, block_items, raw)+ for blk, block_items in zip(req.items, per_block)]+ return ScoreBestBatchResponse(results=results, stage_sec=stage_sec,+ batch_size=int(stage_sec.get("forward_rows", 0)))+++if __name__ == "__main__":+ import uvicorn++ uvicorn.run(app, host=os.environ.get("HOST", "0.0.0.0"),+ port=int(os.environ.get("PORT", "8030")))diff --git a/scripts/minicpm-ocr-jev/serve/bench_backend.py b/scripts/minicpm-ocr-jev/serve/bench_backend.pynew file mode 100644index 0000000..2a6ce12--- /dev/null+++ b/scripts/minicpm-ocr-jev/serve/bench_backend.py@@ -0,0 +1,150 @@+"""Find the forward pass's ceiling, with the renderer out of the way.++ python3 bench_backend.py --base-url http://127.0.0.1:8026 \+ --concurrency 1 4 8 16 32 64++Talks straight to `vllm serve`, sending the images that ship with the examples+rather than rendering anything. The number it reports is what the GPU can do, and+it is the ceiling the whole service is eventually limited by -- worth knowing+separately, because a service slower than this is slow for a reason you can fix,+and a service at this number is finished.++Every request is made unique by a single corner pixel. Without that, the backend's+multi-modal and prefix caches serve most of the traffic and the measurement+describes the cache rather than the model.++Saturation shows up as throughput going flat while latency keeps climbing in step+with concurrency: once throughput x p50 equals the concurrency, every extra+caller is queueing and nothing more is being served.+"""+from __future__ import annotations++import argparse+import base64+import io+import json+import threading+import time+import urllib.error+import urllib.request+from concurrent.futures import ThreadPoolExecutor+from pathlib import Path++from PIL import Image++HERE = Path(__file__).resolve().parent+EXAMPLES = HERE.parent / "examples"++import sys # noqa: E402++sys.path.insert(0, str(HERE.parent))+from infer_vllm import build_prompt # noqa: E402+++def unique_data_url(raw: bytes, seed: int) -> str:+ with Image.open(io.BytesIO(raw)) as img:+ rgb = img.convert("RGB")+ rgb.putpixel((0, 0), (seed % 251, (seed // 251) % 251, 11))+ buf = io.BytesIO()+ rgb.save(buf, format="PNG")+ return "data:image/png;base64," + base64.b64encode(buf.getvalue()).decode("ascii")+++def main() -> int:+ ap = argparse.ArgumentParser()+ ap.add_argument("--base-url", default="http://127.0.0.1:8026")+ ap.add_argument("--model", default=None)+ ap.add_argument("--concurrency", type=int, nargs="+", default=[1, 4, 8, 16, 32, 64])+ ap.add_argument("--requests", type=int, default=96)+ ap.add_argument("--example", default="01_text_putnam")+ ap.add_argument("--out", type=Path)+ args = ap.parse_args()++ base = args.base_url.rstrip("/")+ with urllib.request.urlopen(f"{base}/v1/models", timeout=30) as resp:+ served = args.model or json.loads(resp.read().decode("utf-8"))["data"][0]["id"]++ folder = EXAMPLES / args.example+ case = json.loads((folder / "case.json").read_text(encoding="utf-8"))+ block = (folder / case["block_image"]).read_bytes()+ render = (folder / case["reference_render"]).read_bytes()+ text = case["candidates"][0]["text"]++ def body(seed: int) -> dict:+ return {+ "model": served,+ "messages": [{"role": "user", "content": [+ {"type": "image_url", "image_url": {"url": unique_data_url(block, seed)}},+ {"type": "image_url", "image_url": {"url": unique_data_url(render, seed)}},+ {"type": "text", "text": build_prompt(text)},+ ]}],+ "use_activation": False,+ "add_generation_prompt": False,+ }++ def one(seed: int) -> tuple[bool, float]:+ data = json.dumps(body(seed)).encode("utf-8")+ req = urllib.request.Request(+ f"{base}/classify", data=data,+ headers={"Content-Type": "application/json"}, method="POST")+ t0 = time.perf_counter()+ try:+ with urllib.request.urlopen(req, timeout=600) as resp:+ resp.read()+ return True, time.perf_counter() - t0+ except Exception:+ return False, time.perf_counter() - t0++ # Warm up on seeds far outside the measured range, so the first level does+ # not pay for graph capture and does not get a cache hit either.+ for seed in range(10 ** 7, 10 ** 7 + 4):+ one(seed)++ offset = 0+ rows = []+ print(f"{'conc':>5} {'req/s':>9} {'p50 ms':>9} {'p90 ms':>9} "+ f"{'rps*p50':>9} {'fail':>5}")+ for conc in args.concurrency:+ total = max(args.requests, conc * 4)+ seeds = list(range(offset, offset + total))+ offset += total++ lock = threading.Lock()+ lat: list[float] = []+ fails = 0++ def run(seed: int) -> None:+ nonlocal fails+ ok, dt = one(seed)+ with lock:+ if ok:+ lat.append(dt)+ else:+ fails += 1++ t0 = time.perf_counter()+ with ThreadPoolExecutor(max_workers=conc) as pool:+ list(pool.map(run, seeds))+ wall = time.perf_counter() - t0++ lat.sort()+ rps = len(lat) / wall if wall else 0.0+ p50 = lat[len(lat) // 2] if lat else 0.0+ p90 = lat[int(len(lat) * 0.9)] if lat else 0.0+ # Little's law: at saturation this equals the concurrency, and every+ # caller beyond it is just waiting in line.+ row = {"concurrency": conc, "requests": total, "ok": len(lat), "failures": fails,+ "req_per_s": round(rps, 3), "p50_ms": round(p50 * 1000, 1),+ "p90_ms": round(p90 * 1000, 1), "little": round(rps * p50, 2)}+ rows.append(row)+ print(f"{conc:>5} {rps:>9.2f} {p50 * 1000:>9.1f} {p90 * 1000:>9.1f} "+ f"{rps * p50:>9.2f} {fails:>5}")++ if args.out:+ args.out.write_text(json.dumps(rows, indent=2), encoding="utf-8")+ print(f"\nwrote {args.out}")+ return 0+++if __name__ == "__main__":+ raise SystemExit(main())diff --git a/scripts/minicpm-ocr-jev/serve/bench_render.py b/scripts/minicpm-ocr-jev/serve/bench_render.pynew file mode 100644index 0000000..6988b1e--- /dev/null+++ b/scripts/minicpm-ocr-jev/serve/bench_render.py@@ -0,0 +1,155 @@+"""Find the renderer's ceiling, with the model out of the way.++ python3 bench_render.py --workers 1 2 4 8 --browsers 2 --pages 8++Renders candidates and nothing else, in the same shape the service uses: N worker+processes, each owning its own RenderPool. Reports candidates/s per shape, so the+renderer's capacity can be compared against the backend's (bench_backend.py) and+the two sized against each other.++The worker axis is the one that matters and the reason is not obvious: a process+drives all of its browsers over one Playwright connection from one asyncio loop,+and screenshots come back through it, so that pipe saturates before the browsers+do. Measuring workers and browsers separately is what makes that visible; a+single combined number would just look like "rendering is slow".+"""+from __future__ import annotations++import argparse+import asyncio+import json+import multiprocessing as mp+import shutil+import sys+import tempfile+import time+from pathlib import Path++HERE = Path(__file__).resolve().parent+MATERIAL = HERE.parent+sys.path.insert(0, str(MATERIAL))+sys.path.insert(0, str(HERE))+++def _worker(wid: int, browsers: int, pages: int, batches: int, per_batch: int,+ inflight: int, precheck: bool, result_q: "mp.Queue") -> None:+ from render_pool import RenderPool+ from rm_render import Candidate++ example = MATERIAL / "examples" / "01_text_putnam"+ case = json.loads((example / "case.json").read_text(encoding="utf-8"))+ image = str(example / case["block_image"])+ text = case["candidates"][0]["text"]++ async def run() -> tuple[int, int, float]:+ pool = RenderPool(browsers=browsers, pages_per_browser=pages, precheck=precheck)+ await pool.start()+ work = Path(tempfile.mkdtemp(prefix=f"benchr{wid}_"))+ try:+ # Warm the pool: the first batch on a fresh browser pays for font and+ # KaTeX loading, which is not what this is measuring.+ await pool.render([Candidate(case_id=f"w{wid}warm{i}", image_path=image,+ text=f"{text}\n\n<!-- warm {wid} {i} -->",+ category=case["category"])+ for i in range(per_batch)], work / "warm")++ async def one_batch(b: int) -> int:+ cands = [+ Candidate(case_id=f"w{wid}b{b}c{i}", image_path=image,+ # Unique text per candidate: identical text would+ # render to an identical file and could be served+ # from the driver's own on-disk cache.+ text=f"{text}\n\n<!-- {wid} {b} {i} -->",+ category=case["category"])+ for i in range(per_batch)+ ]+ results = await pool.render(cands, work / f"b{b}")+ return sum(1 for r in results if r.ok)++ # `inflight` batches at a time, because that is the shape a worker+ # actually sees: a service handles several requests at once, and a+ # pool rendering one batch at a time leaves most of its pages idle.+ # Measuring the sequential case and calling it the renderer's ceiling+ # understates it by whatever the concurrency would have been.+ gate = asyncio.Semaphore(max(1, inflight))++ async def gated(b: int) -> int:+ async with gate:+ return await one_batch(b)++ t0 = time.perf_counter()+ done = await asyncio.gather(*(gated(b) for b in range(batches)))+ elapsed = time.perf_counter() - t0+ return sum(done), batches * per_batch, elapsed+ finally:+ await pool.close()+ shutil.rmtree(work, ignore_errors=True)++ result_q.put((wid, *asyncio.run(run())))+++def main() -> int:+ ap = argparse.ArgumentParser()+ ap.add_argument("--workers", type=int, nargs="+", default=[1, 2, 4, 8])+ ap.add_argument("--browsers", type=int, nargs="+", default=[2])+ ap.add_argument("--pages", type=int, default=8)+ ap.add_argument("--batches", type=int, default=12, help="render batches per worker")+ ap.add_argument("--per-batch", type=int, default=4, help="candidates per batch")+ ap.add_argument("--inflight", type=int, default=4,+ help="batches a worker renders at once (its request concurrency)")+ ap.add_argument("--no-precheck", action="store_true")+ ap.add_argument("--out", type=Path)+ args = ap.parse_args()++ rows = []+ print(f"{'workers':>8} {'browsers':>9} {'pages':>6} {'inflight':>9} "+ f"{'cand/s':>9} {'s/batch':>9} {'chromiums':>10}")+ for browsers in args.browsers:+ for workers in args.workers:+ ctx = mp.get_context("spawn")+ q: "mp.Queue" = ctx.Queue()+ procs = [+ ctx.Process(target=_worker,+ args=(w, browsers, args.pages, args.batches,+ args.per_batch, args.inflight,+ not args.no_precheck, q))+ for w in range(workers)+ ]+ t0 = time.perf_counter()+ for p in procs:+ p.start()+ # Wall clock across all workers, not the sum of their own timers:+ # the workers overlap, and summing would count the overlap twice.+ collected = [q.get() for _ in procs]+ for p in procs:+ p.join()+ wall = time.perf_counter() - t0++ done = sum(c[1] for c in collected)+ total = sum(c[2] for c in collected)+ slowest = max(c[3] for c in collected)+ cand_s = done / slowest if slowest else 0.0+ # Batch latency with `inflight` of them in the air, so it is a+ # queueing-included figure, not a best case.+ sec_per_batch = slowest / (args.batches / max(1, args.inflight))+ row = {"workers": workers, "browsers": browsers, "pages": args.pages,+ "inflight": args.inflight, "per_batch": args.per_batch,+ "candidates": total, "rendered_ok": done,+ "cand_per_s": round(cand_s, 2),+ "sec_per_batch": round(sec_per_batch, 3),+ "chromiums": workers * browsers,+ "wall_sec": round(wall, 2)}+ rows.append(row)+ print(f"{workers:>8} {browsers:>9} {args.pages:>6} {args.inflight:>9} "+ f"{cand_s:>9.2f} {sec_per_batch:>9.3f} {workers * browsers:>10}")+ if done != total:+ print(f" ! only {done}/{total} candidates rendered ok")++ if args.out:+ args.out.write_text(json.dumps(rows, indent=2), encoding="utf-8")+ print(f"\nwrote {args.out}")+ return 0+++if __name__ == "__main__":+ raise SystemExit(main())diff --git a/scripts/minicpm-ocr-jev/serve/bench_service.py b/scripts/minicpm-ocr-jev/serve/bench_service.pynew file mode 100644index 0000000..928ca43--- /dev/null+++ b/scripts/minicpm-ocr-jev/serve/bench_service.py@@ -0,0 +1,167 @@+"""Measure what the service actually does under load.++ python3 bench_service.py --base-url http://127.0.0.1:8030 \+ --concurrency 1 2 4 8 --requests 32 --candidates 4++Two measurement rules matter more than the numbers, because getting either one+wrong inflates the result rather than erroring:++ * Every request must be unique. Both halves of this service cache: the backend+ reuses multi-modal encodings and prefixes, and identical candidate text+ renders to an identical image. Replaying one payload measures cache hits.+ So each request gets its own candidate text and its own original image,+ differing in one corner pixel.+ * Every concurrency level needs several waves. With `total = max(requests,+ concurrency * 4)` the ramp-up and drain at the edges stay a small share of+ the window; at one or two waves they dominate and the number is noise.++Reported per level: requests/s, candidates/s, and the latency distribution. The+stage breakdown the service returns is averaged too, because the question this+benchmark exists to answer -- render or forward -- is answered by that split and+not by the totals.+"""+from __future__ import annotations++import argparse+import base64+import io+import json+import statistics+import sys+import threading+import time+import urllib.error+import urllib.request+from concurrent.futures import ThreadPoolExecutor+from pathlib import Path++from PIL import Image++HERE = Path(__file__).resolve().parent+EXAMPLES = HERE.parent / "examples"+++def unique_image(raw: bytes, seed: int) -> str:+ """The same block image, with one corner pixel set from `seed`.++ One pixel is enough to miss every cache and little enough not to change what+ the model sees in any way that matters.+ """+ with Image.open(io.BytesIO(raw)) as img:+ rgb = img.convert("RGB")+ rgb.putpixel((0, 0), (seed % 251, (seed // 251) % 251, 7))+ buf = io.BytesIO()+ rgb.save(buf, format="PNG")+ return base64.b64encode(buf.getvalue()).decode("ascii")+++def post(url: str, payload: dict, timeout: float) -> tuple[int, dict | None, float]:+ data = json.dumps(payload).encode("utf-8")+ req = urllib.request.Request(url, data=data,+ headers={"Content-Type": "application/json"}, method="POST")+ t0 = time.perf_counter()+ try:+ with urllib.request.urlopen(req, timeout=timeout) as resp:+ body = json.loads(resp.read().decode("utf-8"))+ return 200, body, time.perf_counter() - t0+ except urllib.error.HTTPError as exc:+ exc.read()+ return exc.code, None, time.perf_counter() - t0+ except Exception:+ return 0, None, time.perf_counter() - t0+++def main() -> int:+ ap = argparse.ArgumentParser()+ ap.add_argument("--base-url", default="http://127.0.0.1:8030")+ ap.add_argument("--concurrency", type=int, nargs="+", default=[1, 2, 4, 8])+ ap.add_argument("--requests", type=int, default=32,+ help="requests per level, raised to concurrency*4 when lower")+ ap.add_argument("--candidates", type=int, default=4, help="candidates per request")+ ap.add_argument("--example", default="01_text_putnam")+ ap.add_argument("--timeout", type=float, default=600.0)+ ap.add_argument("--out", type=Path, help="write the rows as JSON here")+ args = ap.parse_args()++ base = args.base_url.rstrip("/")+ case = json.loads((EXAMPLES / args.example / "case.json").read_text(encoding="utf-8"))+ raw = (EXAMPLES / args.example / case["block_image"]).read_bytes()+ base_text = case["candidates"][0]["text"]++ def build(seed: int) -> dict:+ return {+ "input_form": "ternary",+ "case_id": f"bench{seed}",+ "image": unique_image(raw, seed),+ # A trailing marker keeps each candidate's render distinct without+ # changing the structure of what is rendered.+ "candidates": [f"{base_text}\n\n<!-- {seed}-{k} -->"+ for k in range(args.candidates)],+ "category": case["category"],+ }++ offset = 0+ rows = []+ # Warm-up uses seeds far from the measured range, so it cannot feed a cache+ # hit to the run that follows it.+ for seed in range(10 ** 6, 10 ** 6 + 2):+ post(f"{base}/v1/rm/score_best", build(seed), args.timeout)++ for conc in args.concurrency:+ total = max(args.requests, conc * 4)+ seeds = list(range(offset, offset + total))+ offset += total++ lock = threading.Lock()+ latencies: list[float] = []+ stages: list[dict] = []+ failures = 0++ def one(seed: int) -> None:+ nonlocal failures+ status, body, dt = post(f"{base}/v1/rm/score_best", build(seed), args.timeout)+ with lock:+ if status == 200 and body is not None:+ latencies.append(dt)+ stages.append(body.get("stage_sec", {}))+ else:+ failures += 1++ t0 = time.perf_counter()+ with ThreadPoolExecutor(max_workers=conc) as pool:+ list(pool.map(one, seeds))+ wall = time.perf_counter() - t0++ ok = len(latencies)+ lat = sorted(latencies)+ row = {+ "concurrency": conc,+ "requests": total,+ "ok": ok,+ "failures": failures,+ "wall_sec": round(wall, 3),+ "req_per_s": round(ok / wall, 3) if wall else 0.0,+ "cand_per_s": round(ok * args.candidates / wall, 3) if wall else 0.0,+ "p50_ms": round(lat[len(lat) // 2] * 1000, 1) if lat else None,+ "p90_ms": round(lat[int(len(lat) * 0.9)] * 1000, 1) if lat else None,+ "mean_render_sec": round(statistics.mean(+ [s.get("render_sec", 0.0) for s in stages]), 3) if stages else None,+ "mean_forward_sec": round(statistics.mean(+ [s.get("forward_sec", 0.0) for s in stages]), 3) if stages else None,+ }+ rows.append(row)+ print(f"conc={conc:<4} {row['req_per_s']:>7.2f} req/s "+ f"{row['cand_per_s']:>7.2f} cand/s "+ f"p50 {row['p50_ms']:>8.1f}ms p90 {row['p90_ms']:>8.1f}ms "+ f"render {row['mean_render_sec']}s forward {row['mean_forward_sec']}s "+ f"fail {failures}")+ sys.stdout.flush()++ if args.out:+ args.out.write_text(json.dumps(rows, indent=2), encoding="utf-8")+ print(f"\nwrote {args.out}")+ return 0+++if __name__ == "__main__":+ raise SystemExit(main())diff --git a/scripts/minicpm-ocr-jev/serve/chat_template_passthrough.jinja b/scripts/minicpm-ocr-jev/serve/chat_template_passthrough.jinjanew file mode 100644index 0000000..e826f57--- /dev/null+++ b/scripts/minicpm-ocr-jev/serve/chat_template_passthrough.jinja@@ -0,0 +1,35 @@+{#-+ Pass-through chat template.++ The reward model's prompt is not a chat template's business. Its exact bytes --+ image placeholders, newlines, the empty assistant turn -- are part of the model+ (see the note in infer_vllm.py), so the client builds them with build_prompt()+ and ships the result as a single text part. This template's only job is to hand+ those bytes back unchanged.++ Why it has to exist at all: vLLM's /classify endpoint accepts images only in the+ chat-messages form, and the chat form always runs a template. A template that+ assembles the prompt from the parts would put the authority for those bytes in a+ jinja file, where a stray newline silently shifts every score. This one cannot:+ it emits text parts verbatim and ignores everything else, so whatever Python+ produced is exactly what the model sees.++ Images still reach the model: vLLM collects them from the image_url parts, in+ the order they appear in the message, and binds the Nth image to the Nth+ placeholder in the rendered prompt. So the client must list the original image+ first and the rendered image second, matching build_prompt()'s placeholder order.++ Requires --chat-template-content-format openai, so that message.content arrives+ as the list of parts rather than pre-flattened into a string.+-#}+{%- for message in messages -%}+{%- if message.content is string -%}+{{- message.content -}}+{%- else -%}+{%- for part in message.content -%}+{%- if part.type == 'text' -%}+{{- part.text -}}+{%- endif -%}+{%- endfor -%}+{%- endif -%}+{%- endfor -%}diff --git a/scripts/minicpm-ocr-jev/serve/check_render_parity.py b/scripts/minicpm-ocr-jev/serve/check_render_parity.pynew file mode 100644index 0000000..4bdedc4--- /dev/null+++ b/scripts/minicpm-ocr-jev/serve/check_render_parity.py@@ -0,0 +1,107 @@+"""Check that the persistent browser renders the same bytes as a fresh one.++ python3 check_render_parity.py++The pool exists to avoid relaunching Chromium, and the whole argument for it is+that the pixels do not change. That argument rests on both paths calling one copy+of the render orchestration -- which is a good reason to believe it and not a+reason to skip checking it, because the two paths still differ in everything+around that call: process age, a browser that has rendered before, contexts that+other requests have used.++A browser that has been alive for a while is exactly where a difference would+appear, so each candidate is rendered twice through the pool as well: once on a+cold pool and once after it has done other work. Identical hashes across all+three renders is the result worth having.+"""+from __future__ import annotations++import asyncio+import hashlib+import json+import shutil+import sys+import tempfile+from pathlib import Path++HERE = Path(__file__).resolve().parent+MATERIAL = HERE.parent+sys.path.insert(0, str(MATERIAL))++from render_pool import RenderPool # noqa: E402+from rm_render import Candidate, render_candidates # noqa: E402++EXAMPLES = MATERIAL / "examples"+++def load_candidates() -> list[Candidate]:+ out = []+ for case_path in sorted(EXAMPLES.glob("*/case.json")):+ case = json.loads(case_path.read_text(encoding="utf-8"))+ folder = case_path.parent+ for i, cand in enumerate(case["candidates"]):+ out.append(Candidate(+ case_id=f"{case['case_id']}#{i}",+ image_path=str(folder / case["block_image"]),+ text=cand["text"],+ category=case["category"],+ ))+ return out+++def digest(path: str | None) -> str:+ if not path or not Path(path).is_file():+ return "<missing>"+ return hashlib.sha256(Path(path).read_bytes()).hexdigest()[:16]+++async def main() -> int:+ candidates = load_candidates()+ work = Path(tempfile.mkdtemp(prefix="parity_"))+ try:+ print(f"{len(candidates)} candidates\n")++ print("subprocess path (fresh Chromium per batch) …")+ sub = render_candidates(candidates, work_dir=work / "subprocess",+ precheck=True, browser_concurrency=8)+ sub_hash = {r.case_id: (r.reason or "ok", digest(r.render_image_path)) for r in sub}++ pool = RenderPool(browsers=2, pages_per_browser=8)+ await pool.start()+ try:+ print("pool path, first batch (cold browser) …")+ cold = await pool.render(candidates, work / "pool_cold")+ cold_hash = {r.case_id: (r.reason or "ok", digest(r.render_image_path)) for r in cold}++ print("pool path, second batch (same browser, after other work) …")+ warm = await pool.render(candidates, work / "pool_warm")+ warm_hash = {r.case_id: (r.reason or "ok", digest(r.render_image_path)) for r in warm}+ # Taken before close, so that "alive" and the restart count describe+ # the pool as it was while it did the work.+ pool_state = pool.describe()+ finally:+ await pool.close()++ print()+ failures = 0+ for c in candidates:+ s, cold_v, warm_v = sub_hash[c.case_id], cold_hash[c.case_id], warm_hash[c.case_id]+ same = s == cold_v == warm_v+ failures += 0 if same else 1+ print(f" [{'PASS' if same else 'FAIL'}] {c.case_id:<28} "+ f"subprocess {s[1]} / cold {cold_v[1]} / warm {warm_v[1]}"+ + ("" if s[0] == "ok" else f" ({s[0]})"))++ print()+ print(f"pool: {json.dumps(pool_state)}")+ if failures:+ print(f"FAILED: {failures} candidate(s) rendered differently")+ return 1+ print("all renders byte-identical across the three paths")+ return 0+ finally:+ shutil.rmtree(work, ignore_errors=True)+++if __name__ == "__main__":+ raise SystemExit(asyncio.run(main()))diff --git a/scripts/minicpm-ocr-jev/serve/check_server.py b/scripts/minicpm-ocr-jev/serve/check_server.pynew file mode 100644index 0000000..5921797--- /dev/null+++ b/scripts/minicpm-ocr-jev/serve/check_server.py@@ -0,0 +1,235 @@+"""Check that a `vllm serve` backend reproduces the reference scoring setup.++Three things can silently go wrong when the forward pass moves from an in-process+engine to an HTTP server, and each of them produces plausible-looking numbers+rather than an error. This script checks them in the order that isolates blame:++ 1. The template. Does the server turn our prompt back into our prompt?+ Tokenized, a chat request carrying only the text part must+ equal the same string sent as a completion. If this fails,+ nothing downstream is meaningful.+ 2. The images. Does /classify accept two images and bind them in order?+ 3. The scores. Do the bundled examples land where they landed on the+ reference setup?++Only the `ocr_output` candidate of each example is scored here: it is the one+whose rendered image ships with the material, so this check needs no renderer.++ python check_server.py --base-url http://127.0.0.1:8026+"""+from __future__ import annotations++import argparse+import base64+import json+import math+import sys+import urllib.error+import urllib.request+from pathlib import Path++sys.path.insert(0, str(Path(__file__).resolve().parent.parent))++from infer_vllm import build_prompt # noqa: E402++HERE = Path(__file__).resolve().parent+EXAMPLES = HERE.parent / "examples"++#: Scores here are checked by shape, not by equality, and the reason is worth+#: stating because a tolerance would look stricter and verify less.+#:+#: The `observed_prob_yes` in each example was measured with renders produced by+#: the reference setup's own renderer. The `reference_render.png` that ships+#: alongside is a different file: for the formula and table examples it matches+#: to five decimal places, but for the text example it does not, and the same+#: candidate scores 0.0070 self-rendered against 0.0022 with the shipped render+#: -- a 3x gap, measured independently on the existing service. Rendering+#: environment moves small scores by multiples; that is a known property of this+#: model, not a fault in the server.+#:+#: So a numeric tolerance wide enough to admit that gap would also admit a+#: genuinely broken prompt, and one narrow enough to catch a broken prompt would+#: fail on a correct server. What a broken prompt or a swapped image order+#: actually does is destroy the pattern: the consistent candidate stops scoring+#: high, or the inconsistent ones stop scoring low. That is what is checked.+#:+#: The strict equality check lives in check_end_to_end.py, which renders with our+#: own renderer and therefore has a like-for-like reference.+HIGH = 0.5 # a candidate the source data labels consistent must clear this+LOW = 0.05 # one labelled inconsistent must stay under it+#: The formula example is the exception: its shipped render does come from the+#: reference run, so it is held to equality and is the sharpest single signal+#: that prompt bytes and image order are right.+FORMULA_TOLERANCE = 1e-3+++def post(url: str, payload: dict, timeout: float = 300.0) -> dict:+ data = json.dumps(payload).encode("utf-8")+ req = urllib.request.Request(+ url, data=data, headers={"Content-Type": "application/json"}, method="POST"+ )+ try:+ with urllib.request.urlopen(req, timeout=timeout) as resp:+ return json.loads(resp.read().decode("utf-8"))+ except urllib.error.HTTPError as exc:+ body = exc.read().decode("utf-8", "replace")+ raise RuntimeError(f"HTTP {exc.code} from {url}: {body[:800]}") from None+++def get(url: str, timeout: float = 30.0) -> dict:+ with urllib.request.urlopen(url, timeout=timeout) as resp:+ return json.loads(resp.read().decode("utf-8"))+++def data_url(path: Path) -> str:+ return "data:image/png;base64," + base64.b64encode(path.read_bytes()).decode("ascii")+++def prob_yes(logits: list[float]) -> float:+ a, b = float(logits[0]), float(logits[1])+ top = max(a, b)+ return math.exp(b - top) / (math.exp(a - top) + math.exp(b - top))+++def main() -> int:+ ap = argparse.ArgumentParser()+ ap.add_argument("--base-url", default="http://127.0.0.1:8026")+ ap.add_argument("--model", default=None, help="served model name (default: ask the server)")+ args = ap.parse_args()++ base = args.base_url.rstrip("/")+ failures: list[str] = []++ def check(name: str, ok: bool, detail: str = "") -> None:+ print(f" [{'PASS' if ok else 'FAIL'}] {name}" + (f" {detail}" if detail else ""))+ if not ok:+ failures.append(name)++ # ---------------------------------------------------------------- server+ print("\n1. server")+ models = get(f"{base}/v1/models")+ served = args.model or models["data"][0]["id"]+ check("/v1/models reachable", bool(served), f"served model = {served!r}")++ # -------------------------------------------------------------- template+ # The prompt text is deliberately odd -- newlines, a trailing empty assistant+ # turn -- because that is exactly what a template is prone to "tidy up".+ print("\n2. prompt template is pass-through")+ prompt = build_prompt("TEMPLATE PROBE 模板探针")++ as_completion = post(f"{base}/tokenize", {+ "model": served, "prompt": prompt, "add_special_tokens": False,+ })+ as_chat = post(f"{base}/tokenize", {+ "model": served,+ "messages": [{"role": "user", "content": [{"type": "text", "text": prompt}]}],+ "add_special_tokens": False,+ "add_generation_prompt": False,+ })+ ids_completion = as_completion["tokens"]+ ids_chat = as_chat["tokens"]+ same = ids_completion == ids_chat+ check(+ "chat-rendered prompt == raw prompt (token for token)", same,+ f"{len(ids_completion)} tokens"+ if same else+ f"completion {len(ids_completion)} tok vs chat {len(ids_chat)} tok; "+ f"first difference at {_first_diff(ids_completion, ids_chat)}",+ )+ if not same:+ print(" -> the chat template is rewriting the prompt; scores below are "+ "not comparable to anything. Fix this before reading them.")++ # ---------------------------------------------------------------- scores+ print("\n3. scores on the bundled examples (ocr_output candidate)")+ for case_path in sorted(EXAMPLES.glob("*/case.json")):+ case = json.loads(case_path.read_text(encoding="utf-8"))+ folder = case_path.parent+ role = case.get("reference_render_of", "ocr_output")+ cand = next(c for c in case["candidates"] if c.get("role") == role)+ expected = case["observed_prob_yes"][role]++ body = {+ "model": served,+ "messages": [{+ "role": "user",+ "content": [+ {"type": "image_url",+ "image_url": {"url": data_url(folder / case["block_image"])}},+ {"type": "image_url",+ "image_url": {"url": data_url(folder / case["reference_render"])}},+ {"type": "text", "text": build_prompt(cand["text"])},+ ],+ }],+ # Raw logits; the softmax happens here so that both classes are+ # weighed against each other exactly as the reference setup does.+ "use_activation": False,+ "add_generation_prompt": False,+ }+ out = post(f"{base}/classify", body)+ got = prob_yes(out["data"][0]["probs"])+ delta = abs(got - expected)+ label = cand.get("label", "")++ if case["category"] == "formula":+ ok = delta <= FORMULA_TOLERANCE+ rule = f"== {expected:.5f} ± {FORMULA_TOLERANCE}"+ elif label == "consistent":+ ok = got >= HIGH+ rule = f">= {HIGH}"+ else:+ ok = got <= LOW+ rule = f"<= {LOW}"++ check(+ f"{case['case_id']} ({case['category']}, labelled {label or 'n/a'})",+ ok,+ f"got {got:.5f} [{rule}]; reference run {expected:.5f}, |Δ| {delta:.2e}",+ )++ # ------------------------------------------------------------- control+ # A test that only ever passes proves nothing. The formula check above is+ # the one carrying weight, so show that it can fail: send the same request+ # with the two images in the wrong order, which is the single most likely+ # way to wire this up incorrectly, and require the score to move.+ print("\n4. negative control (images swapped must NOT reproduce the score)")+ case_path = next(iter(sorted(EXAMPLES.glob("02_formula*/case.json"))))+ case = json.loads(case_path.read_text(encoding="utf-8"))+ folder = case_path.parent+ role = case.get("reference_render_of", "ocr_output")+ cand = next(c for c in case["candidates"] if c.get("role") == role)+ expected = case["observed_prob_yes"][role]+ swapped = post(f"{base}/classify", {+ "model": served,+ "messages": [{"role": "user", "content": [+ {"type": "image_url", "image_url": {"url": data_url(folder / case["reference_render"])}},+ {"type": "image_url", "image_url": {"url": data_url(folder / case["block_image"])}},+ {"type": "text", "text": build_prompt(cand["text"])},+ ]}],+ "use_activation": False,+ "add_generation_prompt": False,+ })+ got_swapped = prob_yes(swapped["data"][0]["probs"])+ check(+ "swapped image order changes the score",+ abs(got_swapped - expected) > FORMULA_TOLERANCE,+ f"swapped {got_swapped:.5f} vs correct-order reference {expected:.5f}",+ )++ print()+ if failures:+ print(f"FAILED: {len(failures)} check(s): {', '.join(failures)}")+ return 1+ print("all checks passed")+ return 0+++def _first_diff(a: list, b: list) -> int:+ for i, (x, y) in enumerate(zip(a, b)):+ if x != y:+ return i+ return min(len(a), len(b))+++if __name__ == "__main__":+ raise SystemExit(main())diff --git a/scripts/minicpm-ocr-jev/serve/check_service.py b/scripts/minicpm-ocr-jev/serve/check_service.pynew file mode 100644index 0000000..0e0fbd4--- /dev/null+++ b/scripts/minicpm-ocr-jev/serve/check_service.py@@ -0,0 +1,299 @@+"""Contract tests for the scoring service in app.py.++Run against a live service (and its backend):++ python3 check_service.py --base-url http://127.0.0.1:8030++What is asserted and what is only measured is a deliberate split.++Asserted: the things that are true of a correct service regardless of which+machine it runs on -- the four verdict counts add up, a bad item does not take+its batch down with it, unparsable LaTeX is rejected rather than scored, the+best candidate is the one with the highest score, the two rates mean what their+names say.++Measured but not asserted: the scores themselves. The renderer draws text with+the operating system's own font and text-shaping libraries, so a different Linux+produces slightly different pixels and therefore slightly different numbers. How+far they move is the thing worth knowing, so it is printed; turning it into a+pass/fail condition would just encode one machine's output as the specification.++Ranking is asserted because ranking is what the model is used for, and it is+what survives the pixel differences.+"""+from __future__ import annotations++import argparse+import base64+import json+import sys+import urllib.error+import urllib.request+from pathlib import Path++HERE = Path(__file__).resolve().parent+EXAMPLES = HERE.parent / "examples"++#: Printed as a warning when a score moves further than this from the reference+#: run. Not a failure -- see the module docstring.+DRIFT_NOTICE = 1e-3+++class Report:+ def __init__(self) -> None:+ self.failed: list[str] = []+ self.notes: list[str] = []++ def check(self, name: str, ok: bool, detail: str = "") -> bool:+ print(f" [{'PASS' if ok else 'FAIL'}] {name}" + (f" {detail}" if detail else ""))+ if not ok:+ self.failed.append(name)+ return ok++ def info(self, name: str, detail: str) -> None:+ print(f" [INFO] {name} {detail}")++ def note(self, text: str) -> None:+ self.notes.append(text)+++def post(url: str, payload: dict, timeout: float = 600.0) -> tuple[int, dict | str]:+ data = json.dumps(payload).encode("utf-8")+ req = urllib.request.Request(url, data=data,+ headers={"Content-Type": "application/json"}, method="POST")+ try:+ with urllib.request.urlopen(req, timeout=timeout) as resp:+ return resp.status, json.loads(resp.read().decode("utf-8"))+ except urllib.error.HTTPError as exc:+ body = exc.read().decode("utf-8", "replace")+ try:+ return exc.code, json.loads(body)+ except json.JSONDecodeError:+ return exc.code, body+++def get(url: str, timeout: float = 30.0) -> tuple[int, dict | str]:+ try:+ with urllib.request.urlopen(url, timeout=timeout) as resp:+ return resp.status, json.loads(resp.read().decode("utf-8"))+ except urllib.error.HTTPError as exc:+ return exc.code, exc.read().decode("utf-8", "replace")+++def b64(path: Path) -> str:+ return base64.b64encode(path.read_bytes()).decode("ascii")+++def load_examples() -> list[dict]:+ out = []+ for case_path in sorted(EXAMPLES.glob("*/case.json")):+ case = json.loads(case_path.read_text(encoding="utf-8"))+ case["_dir"] = case_path.parent+ out.append(case)+ return out+++def main() -> int:+ ap = argparse.ArgumentParser()+ ap.add_argument("--base-url", default="http://127.0.0.1:8030")+ args = ap.parse_args()+ base = args.base_url.rstrip("/")+ r = Report()+ cases = load_examples()++ # ---------------------------------------------------------------- health+ print("\nT1 /healthz")+ status, body = get(f"{base}/healthz")+ r.check("200 and backend alive", status == 200 and isinstance(body, dict)+ and body.get("backend", {}).get("alive") is True, f"status={status}")+ if isinstance(body, dict):+ r.info("identity", f"model={body.get('scorer', {}).get('model')} "+ f"template_md5={body.get('input_forms', {}).get('template_md5')} "+ f"forms={body.get('input_forms', {}).get('supported')}")++ # ------------------------------------------------------------ score_best+ # The service renders here: no render_image is supplied, which is the path+ # an ordinary caller takes.+ print("\nT2 /v1/rm/score_best on the bundled examples (service renders)")+ for case in cases:+ texts = [c["text"] for c in case["candidates"]]+ roles = [c.get("role", "") for c in case["candidates"]]+ status, body = post(f"{base}/v1/rm/score_best", {+ "input_form": "ternary",+ "case_id": case["case_id"],+ "image": b64(case["_dir"] / case["block_image"]),+ "candidates": texts,+ "category": case["category"],+ })+ if not r.check(f"{case['case_id']}: HTTP 200", status == 200, str(body)[:200]):+ continue+ assert isinstance(body, dict)++ scores = body["scores"]+ expected = case["observed_prob_yes"]+ # Ranking is the assertion. The reference run's own best candidate is+ # whichever role scored highest there.+ want_role = max(expected, key=lambda k: expected[k])+ want_index = roles.index(want_role)+ r.check(f"{case['case_id']}: best candidate is the reference run's best",+ body["best_index"] == want_index,+ f"got index {body['best_index']} ({roles[body['best_index']]}), "+ f"expected {want_index} ({want_role})")++ drift = []+ for role, got in zip(roles, scores):+ ref = expected.get(role)+ if ref is None:+ continue+ drift.append(f"{role} {got:.5f} vs {ref:.5f} (Δ{abs(got - ref):.1e})")+ if abs(got - ref) > DRIFT_NOTICE:+ r.note(f"{case['case_id']}/{role}: {got:.5f} vs reference {ref:.5f}")+ r.info(f"{case['case_id']}: scores", "; ".join(drift))+ r.info(f"{case['case_id']}: stages", json.dumps(body.get("stage_sec", {})))++ # ----------------------------------------------------------------- score+ print("\nT3 /v1/rm/score summary arithmetic and rate caliber")+ items = []+ for i, case in enumerate(cases):+ for j, cand in enumerate(case["candidates"]):+ items.append({"case_id": f"{case['case_id']}__{j}",+ "image": b64(case["_dir"] / case["block_image"]),+ "ocr_text": cand["text"], "category": case["category"]})+ status, body = post(f"{base}/v1/rm/score", {"input_form": "ternary", "items": items})+ if r.check("HTTP 200", status == 200, str(body)[:200]) and isinstance(body, dict):+ s = body["summary"]+ parts = s["scored"] + s["precheck_reject"] + s["render_error"] + s["forward_error"]+ r.check("scored + precheck_reject + render_error + forward_error == total",+ parts == s["total"], f"{parts} vs {s['total']}")++ got = [x["prob_yes"] for x in body["results"] if x["verdict"] == "scored"]+ if got:+ lo, hi = min(got), max(got)+ # Two thresholds that must give opposite answers. Picking them from+ # the observed scores is what makes this check mean something: a+ # fixed pair can land on the same side of every score and leave the+ # assertion true by accident.+ below = max(0.0, lo - 1e-6)+ above = min(1.0, hi + 1e-6)+ _, b_lo = post(f"{base}/v1/rm/score",+ {"input_form": "ternary", "items": items, "threshold": below})+ _, b_hi = post(f"{base}/v1/rm/score",+ {"input_form": "ternary", "items": items, "threshold": above})+ assert isinstance(b_lo, dict) and isinstance(b_hi, dict)+ r.check("throughput_rate responds to threshold",+ b_lo["summary"]["throughput_rate"] > b_hi["summary"]["throughput_rate"],+ f"τ={below:.6f} -> {b_lo['summary']['throughput_rate']:.3f}, "+ f"τ={above:.6f} -> {b_hi['summary']['throughput_rate']:.3f}")+ r.check("pass_rate does NOT respond to threshold (it is not the throughput rate)",+ b_lo["summary"]["pass_rate"] == b_hi["summary"]["pass_rate"],+ f"{b_lo['summary']['pass_rate']:.3f} both")+ # τ exactly equal to a score must count as passing: the test is >=.+ _, b_eq = post(f"{base}/v1/rm/score",+ {"input_form": "ternary", "items": items, "threshold": hi})+ assert isinstance(b_eq, dict)+ r.check("τ exactly equal to a score passes (>= not >)",+ b_eq["summary"]["throughput_rate"] > 0.0,+ f"τ={hi:.6f} -> {b_eq['summary']['throughput_rate']:.3f}")++ # ----------------------------------------------------- bad input in batch+ print("\nT4 one bad image does not take down its batch")+ good = cases[0]+ status, body = post(f"{base}/v1/rm/score", {"input_form": "ternary", "items": [+ {"case_id": "mix::good1", "image": b64(good["_dir"] / good["block_image"]),+ "ocr_text": good["candidates"][0]["text"], "category": good["category"]},+ # Not valid base64: length is not a multiple of four. This is the shape+ # that used to escape as an unhandled exception and fail the request.+ {"case_id": "mix::bad", "image": "AAAA" + "A", "ocr_text": "x", "category": "text"},+ {"case_id": "mix::good2", "image": b64(good["_dir"] / good["block_image"]),+ "ocr_text": good["candidates"][1]["text"], "category": good["category"]},+ ]})+ if r.check("HTTP 200 for a batch containing a bad item", status == 200, str(body)[:200]):+ assert isinstance(body, dict)+ by_id = {x["case_id"]: x for x in body["results"]}+ r.check("the bad item is reported per-item, not as a failed request",+ by_id["mix::bad"]["verdict"] == "encode_error",+ f"verdict={by_id['mix::bad']['verdict']}")+ r.check("the good items in the same batch still scored",+ by_id["mix::good1"]["verdict"] == "scored"+ and by_id["mix::good2"]["verdict"] == "scored")+ r.check("a failed item's prob_yes is a sentinel outside (0,1)",+ not (0.0 < by_id["mix::bad"]["prob_yes"] < 1.0),+ f"prob_yes={by_id['mix::bad']['prob_yes']}")++ # ------------------------------------------------------------- precheck+ print("\nT5 unparsable LaTeX is rejected, not scored")+ status, body = post(f"{base}/v1/rm/score", {"input_form": "ternary", "items": [+ {"case_id": "bad_latex", "image": b64(good["_dir"] / good["block_image"]),+ "ocr_text": r"$\frac{1}{$ \begin{nosuchenv} x \end{nosuchenv}",+ "category": "formula"},+ ]})+ if r.check("HTTP 200", status == 200, str(body)[:200]) and isinstance(body, dict):+ item = body["results"][0]+ r.check("verdict is precheck_reject", item["verdict"] == "precheck_reject",+ f"verdict={item['verdict']} detail={item['detail'][:120]}")+ r.check("rejected candidate scores 0.0, so it loses every argmax",+ item["prob_yes"] == 0.0, f"prob_yes={item['prob_yes']}")++ # --------------------------------------------------------- form rejected+ print("\nT6 binary input form is refused, not silently accepted")+ status, _ = post(f"{base}/v1/rm/score", {"input_form": "binary", "items": [+ {"case_id": "x", "image": b64(good["_dir"] / good["block_image"]),+ "ocr_text": "x", "category": "text"}]})+ r.check("binary is a 4xx", 400 <= status < 500, f"status={status}")++ # ------------------------------------------------- caller-supplied render+ print("\nT7 a caller-supplied render skips the renderer")+ role = good.get("reference_render_of", "ocr_output")+ cand = next(c for c in good["candidates"] if c.get("role") == role)+ status, body = post(f"{base}/v1/rm/score_best", {+ "input_form": "ternary", "case_id": "byo_render",+ "image": b64(good["_dir"] / good["block_image"]),+ "candidates": [cand["text"]],+ "render_images": [b64(good["_dir"] / good["reference_render"])],+ "category": good["category"],+ })+ if r.check("HTTP 200", status == 200, str(body)[:200]) and isinstance(body, dict):+ stages = body.get("stage_sec", {})+ r.check("no render stage ran", "render_sec" not in stages,+ f"stage_sec keys={sorted(stages)}")+ r.info("score with the shipped render", f"{body['scores'][0]:.5f} "+ f"(service-rendered reference run: {good['observed_prob_yes'][role]:.5f})")++ # ----------------------------------------------------------------- batch+ print("\nT8 /v1/rm/score_best_batch returns one result per block")+ status, body = post(f"{base}/v1/rm/score_best_batch", {+ "input_form": "ternary",+ "items": [{+ "input_form": "ternary", "case_id": c["case_id"],+ "image": b64(c["_dir"] / c["block_image"]),+ "candidates": [x["text"] for x in c["candidates"]],+ "category": c["category"],+ } for c in cases],+ })+ if r.check("HTTP 200", status == 200, str(body)[:300]) and isinstance(body, dict):+ r.check("one result per block", len(body["results"]) == len(cases),+ f"{len(body['results'])} vs {len(cases)}")+ r.check("every candidate has a verdict",+ all(len(res["verdicts"]) == len(c["candidates"])+ for res, c in zip(body["results"], cases)))+ r.info("batch", f"batch_size={body.get('batch_size')} "+ f"stage_sec={json.dumps(body.get('stage_sec', {}))}")++ # ---------------------------------------------------------------- report+ print()+ if r.notes:+ print(f"{len(r.notes)} score(s) moved more than {DRIFT_NOTICE} from the reference run:")+ for n in r.notes:+ print(f" - {n}")+ print(" (expected on a machine whose font and text-shaping libraries differ;")+ print(" measured, not asserted -- see the module docstring)")+ print()+ if r.failed:+ print(f"FAILED: {len(r.failed)} check(s): {', '.join(r.failed)}")+ return 1+ print("all checks passed")+ return 0+++if __name__ == "__main__":+ raise SystemExit(main())diff --git a/scripts/minicpm-ocr-jev/serve/render_pool.py b/scripts/minicpm-ocr-jev/serve/render_pool.pynew file mode 100644index 0000000..9e1b4df--- /dev/null+++ b/scripts/minicpm-ocr-jev/serve/render_pool.py@@ -0,0 +1,298 @@+"""A Chromium that stays open, so requests stop paying to start one.++Measured on the subprocess path, rendering a batch costs 2.28s before the first+candidate is drawn and 0.13s per candidate after that. The fixed part is a Python+process start, a Playwright import, a Chromium launch and the browser contexts --+all of it repeated for every request, and all of it reusable. This module does it+once at start-up and keeps it.++It does not reimplement rendering. The render driver already exposes the two+seams a long-lived caller needs -- `open_browser_contexts` to build the contexts,+and `run_render_job(contexts=, sem=, render_module=)` to run a batch against them+-- and both paths go through that one copy of the orchestration. So the pixels+produced here are identical to the subprocess path by construction, not by two+implementations being kept in step. check_render_parity.py checks that claim+rather than trusting it.++The pool holds several browsers, not one, and that detail is the whole+performance story. Measured on 128 cores: a single kept-open Chromium saturates+at 9.4 candidates/s no matter how many pages are allowed, because one browser is+one set of processes; the subprocess path reached 43.7 candidates/s purely by+having thirty-two separate Chromiums running at once. Keeping a browser open+removes the start-up cost, and having several of them is what uses the machine.+One without the other loses most of the benefit, and the single-browser version+was slower than the thing it replaced.++So there are two knobs, and they do different jobs:++ * `browsers` -- how many Chromiums. This is the throughput knob; it scales with+ cores.+ * `pages_per_browser` -- how many pages render at once inside one of them. This+ is the per-request latency knob: a request with twenty candidates renders+ them this many at a time.++Each browser carries its own semaphore. A single process-wide one would let a+burst pile every page onto whichever browser was picked first; a per-request one+would be no cap at all, since thirty concurrent requests would each build their+own.++Precheck still runs as a Node subprocess per batch. At 0.2s it is the smaller+fixed cost by a wide margin, and it has no equivalent seam to hold open, so it is+left alone until measured to matter.+"""+from __future__ import annotations++import argparse+import asyncio+import json+import logging+import os+import sys+import time+from pathlib import Path+from typing import Any, Sequence++MATERIAL_ROOT = Path(__file__).resolve().parent.parent+RENDERER_DIR = MATERIAL_ROOT / "renderer"++sys.path.insert(0, str(MATERIAL_ROOT))+sys.path.insert(0, str(RENDERER_DIR))++from rm_render import ( # noqa: E402+ KATEX_DIR,+ Candidate,+ RenderResult,+ check_assets,+ results_from_manifest,+ run_precheck,+)+++log = logging.getLogger("rm.render")+++def _driver() -> Any:+ """Import the render driver, with KaTeX assets pointed at the bundled copy.++ The render module resolves its assets at import time from KATEX_ASSET_DIR, so+ this has to be set before the import rather than before a render call.+ """+ os.environ.setdefault("KATEX_ASSET_DIR", str(KATEX_DIR))+ import render_triple_rm_labels as driver++ browsers = getattr(driver, "DEFAULT_PLAYWRIGHT_BROWSERS_PATH", None)+ if browsers is not None and Path(browsers).exists():+ os.environ.setdefault("PLAYWRIGHT_BROWSERS_PATH", str(browsers))++ # The driver prints its progress, which is right for a one-shot command and+ # wrong for a service: a few lines per request, interleaved across concurrent+ # requests, burying everything else in the log. Rebinding `print` in the+ # driver's own namespace sends those lines to a logger instead -- still+ # reachable at debug level, no longer the loudest thing in the output, and+ # done without editing the driver, which both paths share.+ #+ # `redirect_stdout` would not do: it is process-wide, and under concurrency+ # one request leaving the context would unredirect the others.+ driver.print = lambda *parts, **_: log.debug(" ".join(str(p) for p in parts))+ return driver+++class _Slot:+ """One Chromium, its contexts, and the cap on pages rendering inside it."""++ def __init__(self, index: int, pages: int) -> None:+ self.index = index+ self.browser: Any = None+ self.contexts: dict[bool, Any] | None = None+ self.sem = asyncio.Semaphore(pages)+ self.lock = asyncio.Lock() # serialises this slot's launches+ self.inflight = 0+ self.restarts = 0+++class RenderPool:+ """Several browsers, kept open, shared by every request this process handles."""++ def __init__(self, *, browsers: int = 4, pages_per_browser: int = 8,+ precheck: bool = True) -> None:+ self.browsers = max(1, browsers)+ self.pages_per_browser = max(1, pages_per_browser)+ self.precheck = precheck+ self._driver: Any = None+ self._render_module: Any = None+ self._playwright: Any = None+ self._slots: list[_Slot] = []+ self.started_at: float | None = None++ # -- lifecycle ----------------------------------------------------------++ async def start(self) -> None:+ check_assets(require_node=self.precheck)+ self._driver = _driver()+ self._render_module = self._driver.load_render_module(RENDERER_DIR / "render_module")++ from playwright.async_api import async_playwright++ # One Playwright host process drives every browser; only the browsers+ # themselves need to be separate.+ self._playwright = await async_playwright().start()+ self._slots = [_Slot(i, self.pages_per_browser) for i in range(self.browsers)]+ await asyncio.gather(*(self._launch(slot) for slot in self._slots))+ self.started_at = time.time()++ async def _launch(self, slot: _Slot) -> None:+ slot.browser = await self._playwright.chromium.launch(headless=True)+ slot.contexts = await self._driver.open_browser_contexts(+ slot.browser, self._render_module)++ async def _shutdown(self, slot: _Slot) -> None:+ for close in ([c.close for c in (slot.contexts or {}).values()]+ + [getattr(slot.browser, "close", None)]):+ if close is None:+ continue+ try:+ await asyncio.wait_for(close(), timeout=10)+ except Exception: # noqa: BLE001 - shutting down; nothing to recover+ pass+ slot.contexts = slot.browser = None++ async def close(self) -> None:+ await asyncio.gather(*(self._shutdown(slot) for slot in self._slots))+ if self._playwright is not None:+ try:+ await asyncio.wait_for(self._playwright.stop(), timeout=10)+ except Exception: # noqa: BLE001+ pass+ self._playwright = None++ async def _ensure_alive(self, slot: _Slot) -> None:+ """Relaunch a browser that has died.++ A dead Chromium otherwise turns into every subsequent request on that+ slot failing with an unrecognisable Playwright error, which reads like+ the model having gone wrong rather than a browser having gone away.++ The per-slot lock matters: without it, several requests noticing the same+ dead browser would each launch a replacement, and all but one would leak.+ """+ if slot.browser is not None and slot.browser.is_connected():+ return+ async with slot.lock:+ if slot.browser is not None and slot.browser.is_connected():+ return+ await self._shutdown(slot)+ await self._launch(slot)+ slot.restarts += 1++ def _pick(self) -> _Slot:+ """The least loaded browser, counted in candidates rather than requests.++ Requests carry anywhere from one candidate to a few dozen, so spreading+ requests evenly would not spread the work evenly.+ """+ return min(self._slots, key=lambda s: s.inflight)++ # -- work ---------------------------------------------------------------++ async def render(self, candidates: Sequence[Candidate], work_dir: Path,+ timings: dict[str, float] | None = None) -> list[RenderResult]:+ """Precheck, then render whatever survived. One result per candidate.++ `timings` is filled with the two stages separately, because they have+ different fixed costs and different cures: the browser is now shared,+ Node still starts per batch.+ """+ if not candidates:+ return []+ if not self._slots:+ raise RuntimeError("RenderPool.start() has not been called")++ seen: set[str] = set()+ for c in candidates:+ if c.case_id in seen:+ raise ValueError(f"duplicate case_id {c.case_id!r}; case ids must be unique")+ seen.add(c.case_id)++ work = Path(work_dir)+ work.mkdir(parents=True, exist_ok=True)++ rejected: dict[str, dict[str, Any]] = {}+ if self.precheck:+ # Node runs out of process and blocks; off the event loop it goes,+ # or it stalls every other request in flight.+ t0 = time.perf_counter()+ rejected = await asyncio.to_thread(run_precheck, list(candidates), work)+ if timings is not None:+ timings["precheck_sec"] = round(time.perf_counter() - t0, 6)++ survivors = [c for c in candidates if c.case_id not in rejected]+ manifest: dict[str, dict[str, Any]] = {}+ if survivors:+ slot = self._pick()+ slot.inflight += len(survivors)+ try:+ await self._ensure_alive(slot)+ t0 = time.perf_counter()+ rows = await self._run_job(survivors, work, slot)+ if timings is not None:+ timings["browser_sec"] = round(time.perf_counter() - t0, 6)+ timings["browser_slot"] = float(slot.index)+ finally:+ slot.inflight -= len(survivors)+ manifest = {str(row["case_id"]): row for row in rows}++ return results_from_manifest(candidates, rejected, manifest)++ async def _run_job(self, candidates: Sequence[Candidate], work: Path,+ slot: _Slot) -> list[dict[str, Any]]:+ render_in = work / "render_input.jsonl"+ # Only these four top-level fields are accepted; the driver rejects any+ # others rather than ignoring them.+ render_in.write_text("".join(+ json.dumps({+ "case_id": c.case_id,+ "image_path": str(Path(c.image_path).resolve()),+ "label_text": c.text,+ "category": c.category,+ }, ensure_ascii=False) + "\n"+ for c in candidates+ ), encoding="utf-8")+ # The driver takes its configuration as a parsed argv namespace. Building+ # one here keeps the pool on the same entry point as the CLI instead of+ # reaching past it into internals that the CLI does not use.+ args = argparse.Namespace(+ input_jsonl=render_in,+ output_dir=work / "render",+ render_module_dir=RENDERER_DIR / "render_module",+ playwright_browsers_path=None,+ path_remap=[],+ num_shards=1,+ shard_id=0,+ max_samples=None,+ formula_concurrency=self.pages_per_browser,+ browser_concurrency=self.pages_per_browser,+ clean=True,+ )+ return await self._driver.run_render_job(+ args,+ contexts=slot.contexts,+ sem=slot.sem,+ render_module=self._render_module,+ )++ # -- introspection ------------------------------------------------------++ def describe(self) -> dict[str, Any]:+ module = self._render_module+ return {+ "mode": "persistent",+ "browsers": self.browsers,+ "browsers_alive": sum(1 for s in self._slots+ if s.browser is not None and s.browser.is_connected()),+ "pages_per_browser": self.pages_per_browser,+ "precheck": self.precheck,+ "restarts": sum(s.restarts for s in self._slots),+ "uptime_sec": round(time.time() - self.started_at, 1) if self.started_at else None,+ "pipeline": getattr(module, "RENDER_PIPELINE_VERSION", "unknown"),+ "katex": getattr(module, "KATEX_PINNED_VERSION", "unknown"),+ }diff --git a/scripts/minicpm-ocr-jev/serve/requirements-serve.txt b/scripts/minicpm-ocr-jev/serve/requirements-serve.txtnew file mode 100644index 0000000..0f46288--- /dev/null+++ b/scripts/minicpm-ocr-jev/serve/requirements-serve.txt@@ -0,0 +1,14 @@+# Extra dependencies for the HTTP service in this directory. The renderer's own+# dependencies are in ../requirements.txt, and vLLM is installed separately+# (see README, "Install / 2. vLLM") -- it runs as its own process and must not+# share an environment with this service, because it would move the renderer's+# Pillow pin.+#+# These are lower bounds, not pins. Nothing here touches an image or a prompt, so+# none of it can move a score; pinning it would only make the service harder to+# install next to something else. The renderer's dependencies are pinned exactly,+# for the opposite reason.+fastapi>=0.110+uvicorn>=0.27+httpx>=0.27+pydantic>=2.6diff --git a/scripts/minicpm-ocr-jev/serve/setup_backend.sh b/scripts/minicpm-ocr-jev/serve/setup_backend.shnew file mode 100644index 0000000..e53af0b--- /dev/null+++ b/scripts/minicpm-ocr-jev/serve/setup_backend.sh@@ -0,0 +1,95 @@+#!/usr/bin/env bash+#+# Install the forward-pass backend: vLLM, in its own virtual environment.+#+# The backend is kept in a separate environment from the renderer on purpose. The+# renderer pins Pillow to the exact version the model was trained with, because+# that version decides what the rendered image looks like; vLLM only requires+# "pillow>=12.3.0", so a later `pip install -U vllm` in a shared environment would+# happily move Pillow forward and change every score without any error. Two+# environments make that impossible rather than merely discouraged.+#+# usage: bash serve/setup_backend.sh <venv dir>+#+# PIP_INDEX_URL=<mirror> bash serve/setup_backend.sh /opt/venv-vllm+#+# On a slow link to pypi.org this install is the longest step by far -- it pulls+# vLLM, torch and a dozen CUDA wheels, several gigabytes in total. If you have a+# nearby mirror, set PIP_INDEX_URL; it is routinely the difference between minutes+# and hours.+#+set -euo pipefail++VENV="${1:?target virtualenv directory required, e.g. /opt/venv-vllm}"++say() { printf '\n==> %s\n' "$*"; }+warn() { printf '\n!! %s\n' "$*" >&2; }++# ---------------------------------------------------------------------------+say "System packages"+# ---------------------------------------------------------------------------+# These cannot be installed from pip, and two of them are needed at *run* time,+# not just at install time: Triton compiles a small CPython extension on the+# first forward pass of every fresh container, so a missing compiler or missing+# Python headers surface minutes into startup -- after the weights have loaded --+# as a bare CalledProcessError. Checking here turns that into one apt line.+missing=()+command -v gcc >/dev/null 2>&1 || missing+=(gcc)+command -v g++ >/dev/null 2>&1 || missing+=(g++)+python3 -c 'import os,sysconfig; raise SystemExit(0 if os.path.exists(sysconfig.get_paths()["include"] + "/Python.h") else 1)' \+ || missing+=(python3-dev)+python3 -c 'import ensurepip' >/dev/null 2>&1 || missing+=(python3-venv)++if [ "${#missing[@]}" -gt 0 ]; then+ warn "missing system packages: ${missing[*]}+ Debian/Ubuntu: sudo apt-get install -y ${missing[*]}+ Fedora/RHEL: sudo dnf install -y gcc gcc-c++ python3-devel+ gcc and the Python headers are needed every time the backend starts, not only+ to install it: Triton builds a CPython extension on the first forward pass."+ exit 1+fi+printf 'gcc %s, Python headers present\n' "$(gcc -dumpversion)"++# ---------------------------------------------------------------------------+say "Virtual environment: $VENV"+# ---------------------------------------------------------------------------+if [ ! -x "$VENV/bin/python" ]; then+ python3 -m venv "$VENV"+fi+"$VENV/bin/pip" install -q -U pip setuptools wheel+printf '%s\n' "$("$VENV/bin/python" -V)"++# ---------------------------------------------------------------------------+say "vLLM"+# ---------------------------------------------------------------------------+# Not pinned. The model is an ordinary 2-class sequence classifier on a Qwen3.5-VL+# backbone, so any vLLM that registers Qwen3_5ForConditionalGeneration and supports+# runner="pooling" + convert="classify" serves it. The check below is the real+# requirement; the version number is not.+"$VENV/bin/pip" install vllm++# ---------------------------------------------------------------------------+say "Checking this vLLM can serve the model"+# ---------------------------------------------------------------------------+"$VENV/bin/python" - <<'PY'+import sys+import torch, transformers, vllm+from vllm.model_executor.models.registry import ModelRegistry++print(f"vllm {vllm.__version__}")+print(f"torch {torch.__version__} (CUDA {torch.version.cuda})")+print(f"transformers {transformers.__version__}")++arch = "Qwen3_5ForConditionalGeneration"+archs = ModelRegistry.get_supported_archs()+if arch not in archs:+ print(f"\n!! {arch} is not registered in this vLLM build.", file=sys.stderr)+ print(" This release cannot serve the model. Install a newer vLLM, or build",+ file=sys.stderr)+ print(" from upstream (see README, 'Install / 2. vLLM').", file=sys.stderr)+ raise SystemExit(1)+print(f"{arch} registered")+PY++say "Backend ready. Start it with:"+printf ' PATH=%s/bin:$PATH bash serve/start_vllm.sh <GPU> <port> <model path>\n\n' "$VENV"diff --git a/scripts/minicpm-ocr-jev/serve/start_all.sh b/scripts/minicpm-ocr-jev/serve/start_all.shnew file mode 100644index 0000000..1d022a7--- /dev/null+++ b/scripts/minicpm-ocr-jev/serve/start_all.sh@@ -0,0 +1,104 @@+#!/usr/bin/env bash+# Run both halves in one place: `vllm serve` for the forward pass, and app.py for+# precheck, rendering and the HTTP contract.+#+# usage: ./start_all.sh <app port> <model path> [vllm port]+#+# This is the shape to use when the service has to look like one endpoint to its+# callers -- a single container with a single port, replacing an older single-+# container service. The two halves are still two processes, and that is the whole+# point: a browser pool and a vLLM engine in one Python process share one asyncio+# loop, and the loop saturates at about a quarter of the throughput. Measured on+# one machine, four candidates per request, same GPU, same checkpoint:+#+# in-process engine + browser pool 13.0 candidates/s, p50 14.0s+# two processes, 16 workers x 2 54.3 candidates/s, p50 2.7s+#+# So: one container if you need one address, never one process.+#+# The GPU is chosen from outside (CUDA_VISIBLE_DEVICES, or docker's --gpus), so+# there is no GPU argument here: inside a container with one GPU assigned, the+# visible index is 0.+set -euo pipefail++APP_PORT="${1:?app port required}"+MODEL="${2:?path to the checkpoint directory required}"+VLLM_PORT="${3:-${RM_VLLM_PORT:-8026}}"++HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"++# Which interpreter runs which half. Two environments, because vLLM requires only+# pillow>=12.3.0 while the renderer pins it exactly: sharing one environment lets a+# vLLM upgrade move Pillow and change every score. Point these at one interpreter+# if you have deliberately installed both into it.+VLLM_PYTHON_BIN="${VLLM_PYTHON_BIN:-/opt/venv-vllm/bin}"+RENDER_PYTHON_BIN="${RENDER_PYTHON_BIN:-/opt/venv-render/bin}"++READY_TIMEOUT="${READY_TIMEOUT:-900}"++log() { printf '[start_all] %s\n' "$*"; }++backend_pid=""+app_pid=""++# Kill the other half on the way out. Without this, stopping the container leaves+# whichever process is not PID 1 to be killed by the runtime at timeout, and a+# vLLM holding 20 GB of GPU memory takes its time about it.+cleanup() {+ trap - EXIT INT TERM+ [ -n "$app_pid" ] && kill -TERM "$app_pid" 2>/dev/null || true+ [ -n "$backend_pid" ] && kill -TERM "$backend_pid" 2>/dev/null || true+ wait 2>/dev/null || true+}+trap cleanup EXIT INT TERM++# ---------------------------------------------------------------- backend+log "backend: vllm serve on 127.0.0.1:$VLLM_PORT (model $MODEL)"+PATH="$VLLM_PYTHON_BIN:$PATH" HOST=127.0.0.1 \+ bash "$HERE/start_vllm.sh" 0 "$VLLM_PORT" "$MODEL" &+backend_pid=$!++# Wait for the backend by asking it, not by sleeping. Loading weights, capturing+# CUDA graphs and warming the multi-modal path took 174s on the machine this was+# written on; a fixed sleep is either wrong or wasteful.+log "waiting for the backend (up to ${READY_TIMEOUT}s)"+t0=$(date +%s)+while :; do+ if ! kill -0 "$backend_pid" 2>/dev/null; then+ log "[error] the backend exited before becoming ready"+ exit 1+ fi+ if curl -sf -m 5 "http://127.0.0.1:$VLLM_PORT/v1/models" >/dev/null 2>&1; then+ log "backend ready after $(( $(date +%s) - t0 ))s"+ break+ fi+ if [ $(( $(date +%s) - t0 )) -ge "$READY_TIMEOUT" ]; then+ log "[error] the backend did not become ready within ${READY_TIMEOUT}s"+ exit 1+ fi+ sleep 5+done++# ---------------------------------------------------------------- service+log "service: app.py on 0.0.0.0:$APP_PORT"+PATH="$RENDER_PYTHON_BIN:$PATH" \+ bash "$HERE/start_app.sh" "$APP_PORT" "http://127.0.0.1:$VLLM_PORT" &+app_pid=$!++# ---------------------------------------------------------------- supervise+# Exit as soon as either half dies, so that a restart policy can act on it. A+# container whose backend has died but whose HTTP layer still answers -- with 503,+# correctly, forever -- is the failure mode worth avoiding here: it looks alive to+# everything except the caller reading the response body.+log "both halves up; supervising"+while :; do+ if ! kill -0 "$backend_pid" 2>/dev/null; then+ log "[error] the backend exited; stopping the service too"+ exit 1+ fi+ if ! kill -0 "$app_pid" 2>/dev/null; then+ log "[error] the service exited; stopping the backend too"+ exit 1+ fi+ sleep 5+donediff --git a/scripts/minicpm-ocr-jev/serve/start_app.sh b/scripts/minicpm-ocr-jev/serve/start_app.shnew file mode 100644index 0000000..4e4fc16--- /dev/null+++ b/scripts/minicpm-ocr-jev/serve/start_app.sh@@ -0,0 +1,71 @@+#!/usr/bin/env bash+# Start the scoring service: precheck + render here, forward pass over HTTP.+#+# Start `vllm serve` first (see start_vllm.sh) -- this process answers /healthz+# with 503 until the backend is up, rather than failing to start, so that a+# restart of either half does not require restarting the other.+#+# usage: ./start_app.sh <port> <vllm base url>+# e.g. ./start_app.sh 8030 http://127.0.0.1:8026+#+# Both arguments are required. A default backend URL would mean a typo in the+# port silently scores against whatever else happens to be listening.+set -euo pipefail++PORT="${1:?port required}"+export RM_VLLM_URL="${2:?vLLM base url required, e.g. http://127.0.0.1:8026}"++HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"++export PORT+export HOST="${HOST:-0.0.0.0}"+# Deliberately not defaulted. app.py asks the backend which model it serves, so+# the two halves cannot disagree about the name; defaulting it here would set the+# override on every start and put the hardcoded name straight back. Pass it+# through only when the caller actually chose one.+if [ -n "${RM_VLLM_MODEL:-}" ]; then export RM_VLLM_MODEL; fi+export RM_THRESHOLD="${RM_THRESHOLD:-0.5}"+export RM_MAX_ITEMS="${RM_MAX_ITEMS:-64}"+# Keep one Chromium open for the life of the process. The alternative,+# RM_RENDER_MODE=subprocess, starts one per batch and costs 2.3s before the first+# candidate is drawn; it is here as a fallback for environments where the pool+# will not start, not as a tuning choice.+export RM_RENDER_MODE="${RM_RENDER_MODE:-persistent}"+export RM_RENDER_BROWSERS="${RM_RENDER_BROWSERS:-2}"+export RM_BROWSER_CONCURRENCY="${RM_BROWSER_CONCURRENCY:-8}"+export RM_FORWARD_CONCURRENCY="${RM_FORWARD_CONCURRENCY:-32}"++# Workers, not browsers, are the throughput axis -- and the reason is not+# obvious, so it is worth writing down. Every browser a process owns is driven+# over one Playwright connection by one asyncio loop, and rendered screenshots+# come back through it; that one pipe saturates long before the browsers do.+# Measured on 128 cores, four candidates per request, at 32-way concurrency:+#+# 1 worker x 8 browsers 11.5 candidates/s, p50 5.5s+# 8 workers x 2 browsers 45.5 candidates/s, p50 2.5s+#+# Same sixteen Chromiums in the second row as eight in the first, four times the+# throughput and half the latency. So: scale workers first, keep browsers per+# worker small.+if [ -z "${RM_WORKERS:-}" ]; then+ cores="$( (nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 8) )"+ # One worker per 8 cores: a worker runs two browsers, a Node precheck and its+ # own Python. Capped at 16, which is where one GPU backend saturates --+ # measured end to end at 51 candidates/s, against 52 for the backend alone.+ # Past that the renderer is waiting on the GPU and more workers only cost+ # memory (16 workers hold 32 Chromiums in about 4.3 GB).+ #+ # Read with care inside a container: nproc reports the host's cores, not the+ # CPU quota. On a quota-limited container, set RM_WORKERS explicitly.+ WORKERS="$(( cores / 8 ))"+ [ "$WORKERS" -lt 1 ] && WORKERS=1+ [ "$WORKERS" -gt 16 ] && WORKERS=16+else+ WORKERS="$RM_WORKERS"+fi++echo "app port=$PORT backend=$RM_VLLM_URL workers=$WORKERS" \+ "render=$RM_RENDER_MODE browsers=$RM_RENDER_BROWSERS pages=$RM_BROWSER_CONCURRENCY"++cd "$HERE"+exec python3 -m uvicorn app:app --host "$HOST" --port "$PORT" --workers "$WORKERS"diff --git a/scripts/minicpm-ocr-jev/serve/start_vllm.sh b/scripts/minicpm-ocr-jev/serve/start_vllm.shnew file mode 100644index 0000000..1645b17--- /dev/null+++ b/scripts/minicpm-ocr-jev/serve/start_vllm.sh@@ -0,0 +1,71 @@+#!/usr/bin/env bash+# Start the forward-pass backend: a stock `vllm serve` in classification mode.+#+# There is no custom engine code here on purpose. The reward model is an ordinary+# 2-class sequence classifier over a Qwen3.5-VL backbone, so vLLM's own pooling+# runner serves it directly, and its scheduler -- continuous batching, prefix+# caching -- does the work a hand-written engine wrapper would otherwise have to+# reimplement badly.+#+# usage: ./start_vllm.sh <GPU index> <port> <model path>+#+# The three arguments have no defaults. Picking the wrong GPU means evicting+# whatever already runs on it, so a missing argument stops the script instead of+# quietly falling back to card 0.+set -euo pipefail++GPU="${1:?GPU index required (check nvidia-smi first)}"+PORT="${2:?port required}"+MODEL="${3:?path to the checkpoint directory required}"++HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"+CHAT_TEMPLATE="${CHAT_TEMPLATE:-$HERE/chat_template_passthrough.jinja}"++# Fraction of total GPU memory vLLM may take. The default leaves room for a+# co-tenant on the same card; raise it on a card you own outright.+GPU_MEM_UTIL="${GPU_MEM_UTIL:-0.80}"+MAX_MODEL_LEN="${MAX_MODEL_LEN:-16384}"+SERVED_NAME="${SERVED_NAME:-minicpm-ocr-jev}"+HOST="${HOST:-127.0.0.1}"++[ -f "$CHAT_TEMPLATE" ] || { echo "[error] chat template not found: $CHAT_TEMPLATE" >&2; exit 1; }+[ -d "$MODEL" ] || { echo "[error] model directory not found: $MODEL" >&2; exit 1; }++# Triton compiles a small CPython extension on the first forward pass, so a missing+# compiler or missing Python headers do not fail here -- they fail two minutes in,+# after the weights are loaded, as `CalledProcessError: returned non-zero exit+# status 1` with the real cause (`fatal error: Python.h: No such file`) buried sixty+# lines above it. Checking before the load turns that into one actionable line.+command -v gcc >/dev/null 2>&1 || {+ echo "[error] no C compiler on PATH. Triton needs one at run time, on every" >&2+ echo " cold start. sudo apt-get install -y gcc g++ python3-dev" >&2+ exit 1; }+python3 -c 'import os,sysconfig; raise SystemExit(0 if os.path.exists(sysconfig.get_paths()["include"] + "/Python.h") else 1)' || {+ echo "[error] Python headers (Python.h) not found; Triton cannot build its" >&2+ echo " extension. sudo apt-get install -y python3-dev" >&2+ exit 1; }++echo "model=$MODEL gpu=$GPU port=$PORT util=$GPU_MEM_UTIL"++# --limit-mm-per-prompt image:2 -- ternary input is original + render, always two.+# --chat-template-content-format openai -- keeps message.content as the list of+# parts, which is what the pass-through template needs; "string" would flatten+# it and move the image placeholders to the front of the text.+# --hf-overrides num_labels:2 -- the checkpoint's config.json omits num_labels and+# HF's default happens to be 2, which is the right answer by coincidence rather+# than by declaration. Saying it out loud means a future 3-class head fails to+# load instead of loading a wrongly-shaped score layer.+exec env CUDA_VISIBLE_DEVICES="$GPU" \+ vllm serve "$MODEL" \+ --served-model-name "$SERVED_NAME" \+ --runner pooling \+ --convert classify \+ --dtype bfloat16 \+ --max-model-len "$MAX_MODEL_LEN" \+ --limit-mm-per-prompt '{"image":2}' \+ --hf-overrides '{"num_labels":2}' \+ --gpu-memory-utilization "$GPU_MEM_UTIL" \+ --chat-template "$CHAT_TEMPLATE" \+ --chat-template-content-format openai \+ --host "$HOST" \+ --port "$PORT"diff --git a/scripts/prepare_cuda_nvcc.py b/scripts/prepare_cuda_nvcc.pynew file mode 100644index 0000000..d49f4bf--- /dev/null+++ b/scripts/prepare_cuda_nvcc.py@@ -0,0 +1,76 @@+"""Restore NVCC linking stubs omitted from NVIDIA's pip wheel."""++from __future__ import annotations++import hashlib+from importlib.metadata import version+import os+from pathlib import Path+import shutil+import sys+import tarfile+import tempfile+import tomllib+from urllib.parse import urlsplit+from urllib.request import urlopen+++def sha256(path: Path) -> str:+ digest = hashlib.sha256()+ with path.open("rb") as stream:+ for chunk in iter(lambda: stream.read(1024 * 1024), b""):+ digest.update(chunk)+ return digest.hexdigest()+++def main() -> None:+ cuda_dir = Path(sys.argv[1])+ stub_dir = cuda_dir / "bin/crt"+ names = ("link.stub", "prelink.stub")+ if all((stub_dir / name).is_file() for name in names):+ return+ if stub_dir.is_symlink():+ raise RuntimeError(f"Incomplete NVCC stub directory is a symlink: {stub_dir}")++ root = Path(__file__).resolve().parent.parent+ with (root / "pyproject.toml").open("rb") as stream:+ source = tomllib.load(stream)["tool"]["minicpm-ocr"]["cuda-nvcc"]+ nvcc_version = version("nvidia-cuda-nvcc")+ filename = Path(urlsplit(source["url"]).path).name+ if filename != f"cuda_nvcc-linux-x86_64-{nvcc_version}-archive.tar.xz":+ raise RuntimeError("The NVCC redistribution in pyproject.toml must match nvidia-cuda-nvcc.")++ cache = Path(os.environ.get("UV_CACHE_DIR", Path.home() / ".cache/uv")) / "minicpm-ocr"+ cache.mkdir(parents=True, exist_ok=True)+ archive_path = cache / filename+ if not archive_path.is_file() or sha256(archive_path) != source["sha256"]:+ print(f"Downloading matching NVCC linking stubs from NVIDIA ({nvcc_version}).", flush=True)+ with tempfile.NamedTemporaryFile(dir=cache, delete=False) as output:+ temporary_path = Path(output.name)+ try:+ with urlopen(source["url"], timeout=30) as response:+ shutil.copyfileobj(response, output)+ output.flush()+ if sha256(temporary_path) != source["sha256"]:+ raise RuntimeError("NVIDIA NVCC archive SHA-256 verification failed.")+ temporary_path.replace(archive_path)+ finally:+ temporary_path.unlink(missing_ok=True)++ stub_dir.mkdir(parents=True, exist_ok=True)+ prefix = f"cuda_nvcc-linux-x86_64-{nvcc_version}-archive/bin/crt"+ with tarfile.open(archive_path, "r:xz") as archive:+ for name in names:+ target = stub_dir / name+ if target.is_file():+ continue+ member = archive.getmember(f"{prefix}/{name}")+ if not member.isfile():+ raise RuntimeError(f"Expected a regular file in NVCC archive: {member.name}")+ with archive.extractfile(member) as source_file, target.open("xb") as output:+ shutil.copyfileobj(source_file, output)+ print(f"NVCC linking stubs ready: {stub_dir}", flush=True)+++if __name__ == "__main__":+ main()diff --git a/sdk/.gitignore b/sdk/.gitignorenew file mode 100644index 0000000..c56e685--- /dev/null+++ b/sdk/.gitignore@@ -0,0 +1,18 @@+__pycache__/+*.py[cod]+*.egg-info/+build/+dist/++runs/+webui/data/+webdemo/data/+.pytest_cache/++scripts/env.local.sh+.env++.idea/+.DS_Store++.venv/diff --git a/sdk/LICENSE b/sdk/LICENSEnew file mode 100644index 0000000..66dd626--- /dev/null+++ b/sdk/LICENSE@@ -0,0 +1,201 @@+Apache License+ Version 2.0, January 2004+ http://www.apache.org/licenses/++ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION++ 1. Definitions.++ "License" shall mean the terms and conditions for use, reproduction,+ and distribution as defined by Sections 1 through 9 of this document.++ "Licensor" shall mean the copyright owner or entity authorized by+ the copyright owner that is granting the License.++ "Legal Entity" shall mean the union of the acting entity and all+ other entities that control, are controlled by, or are under common+ control with that entity. For the purposes of this definition,+ "control" means (i) the power, direct or indirect, to cause the+ direction or management of such entity, whether by contract or+ otherwise, or (ii) ownership of fifty percent (50%) or more of the+ outstanding shares, or (iii) beneficial ownership of such entity.++ "You" (or "Your") shall mean an individual or Legal Entity+ exercising permissions granted by this License.++ "Source" form shall mean the preferred form for making modifications,+ including but not limited to software source code, documentation+ source, and configuration files.++ "Object" form shall mean any form resulting from mechanical+ transformation or translation of a Source form, including but+ not limited to compiled object code, generated documentation,+ and conversions to other media types.++ "Work" shall mean the work of authorship, whether in Source or+ Object form, made available under the License, as indicated by a+ copyright notice that is included in or attached to the work+ (an example is provided in the Appendix below).++ "Derivative Works" shall mean any work, whether in Source or Object+ form, that is based on (or derived from) the Work and for which the+ editorial revisions, annotations, elaborations, or other modifications+ represent, as a whole, an original work of authorship. For the purposes+ of this License, Derivative Works shall not include works that remain+ separable from, or merely link (or bind by name) to the interfaces of,+ the Work and Derivative Works thereof.++ "Contribution" shall mean any work of authorship, including+ the original version of the Work and any modifications or additions+ to that Work or Derivative Works thereof, that is intentionally+ submitted to Licensor for inclusion in the Work by the copyright owner+ or by an individual or Legal Entity authorized to submit on behalf of+ the copyright owner. For the purposes of this definition, "submitted"+ means any form of electronic, verbal, or written communication sent+ to the Licensor or its representatives, including but not limited to+ communication on electronic mailing lists, source code control systems,+ and issue tracking systems that are managed by, or on behalf of, the+ Licensor for the purpose of discussing and improving the Work, but+ excluding communication that is conspicuously marked or otherwise+ designated in writing by the copyright owner as "Not a Contribution."++ "Contributor" shall mean Licensor and any individual or Legal Entity+ on behalf of whom a Contribution has been received by Licensor and+ subsequently incorporated within the Work.++ 2. Grant of Copyright License. Subject to the terms and conditions of+ this License, each Contributor hereby grants to You a perpetual,+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable+ copyright license to reproduce, prepare Derivative Works of,+ publicly display, publicly perform, sublicense, and distribute the+ Work and such Derivative Works in Source or Object form.++ 3. Grant of Patent License. Subject to the terms and conditions of+ this License, each Contributor hereby grants to You a perpetual,+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable+ (except as stated in this section) patent license to make, have made,+ use, offer to sell, sell, import, and otherwise transfer the Work,+ where such license applies only to those patent claims licensable+ by such Contributor that are necessarily infringed by their+ Contribution(s) alone or by combination of their Contribution(s)+ with the Work to which such Contribution(s) was submitted. If You+ institute patent litigation against any entity (including a+ cross-claim or counterclaim in a lawsuit) alleging that the Work+ or a Contribution incorporated within the Work constitutes direct+ or contributory patent infringement, then any patent licenses+ granted to You under this License for that Work shall terminate+ as of the date such litigation is filed.++ 4. Redistribution. You may reproduce and distribute copies of the+ Work or Derivative Works thereof in any medium, with or without+ modifications, and in Source or Object form, provided that You+ meet the following conditions:++ (a) You must give any other recipients of the Work or+ Derivative Works a copy of this License; and++ (b) You must cause any modified files to carry prominent notices+ stating that You changed the files; and++ (c) You must retain, in the Source form of any Derivative Works+ that You distribute, all copyright, patent, trademark, and+ attribution notices from the Source form of the Work,+ excluding those notices that do not pertain to any part of+ the Derivative Works; and++ (d) If the Work includes a "NOTICE" text file as part of its+ distribution, then any Derivative Works that You distribute must+ include a readable copy of the attribution notices contained+ within such NOTICE file, excluding those notices that do not+ pertain to any part of the Derivative Works, in at least one+ of the following places: within a NOTICE text file distributed+ as part of the Derivative Works; within the Source form or+ documentation, if provided along with the Derivative Works; or,+ within a display generated by the Derivative Works, if and+ wherever such third-party notices normally appear. The contents+ of the NOTICE file are for informational purposes only and+ do not modify the License. You may add Your own attribution+ notices within Derivative Works that You distribute, alongside+ or as an addendum to the NOTICE text from the Work, provided+ that such additional attribution notices cannot be construed+ as modifying the License.++ You may add Your own copyright statement to Your modifications and+ may provide additional or different license terms and conditions+ for use, reproduction, or distribution of Your modifications, or+ for any such Derivative Works as a whole, provided Your use,+ reproduction, and distribution of the Work otherwise complies with+ the conditions stated in this License.++ 5. Submission of Contributions. Unless You explicitly state otherwise,+ any Contribution intentionally submitted for inclusion in the Work+ by You to the Licensor shall be under the terms and conditions of+ this License, without any additional terms or conditions.+ Notwithstanding the above, nothing herein shall supersede or modify+ the terms of any separate license agreement you may have executed+ with Licensor regarding such Contributions.++ 6. Trademarks. This License does not grant permission to use the trade+ names, trademarks, service marks, or product names of the Licensor,+ except as required for reasonable and customary use in describing the+ origin of the Work and reproducing the content of the NOTICE file.++ 7. Disclaimer of Warranty. Unless required by applicable law or+ agreed to in writing, Licensor provides the Work (and each+ Contributor provides its Contributions) on an "AS IS" BASIS,+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or+ implied, including, without limitation, any warranties or conditions+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A+ PARTICULAR PURPOSE. You are solely responsible for determining the+ appropriateness of using or redistributing the Work and assume any+ risks associated with Your exercise of permissions under this License.++ 8. Limitation of Liability. In no event and under no legal theory,+ whether in tort (including negligence), contract, or otherwise,+ unless required by applicable law (such as deliberate and grossly+ negligent acts) or agreed to in writing, shall any Contributor be+ liable to You for damages, including any direct, indirect, special,+ incidental, or consequential damages of any character arising as a+ result of this License or out of the use or inability to use the+ Work (including but not limited to damages for loss of goodwill,+ work stoppage, computer failure or malfunction, or any and all+ other commercial damages or losses), even if such Contributor+ has been advised of the possibility of such damages.++ 9. Accepting Warranty or Additional Liability. While redistributing+ the Work or Derivative Works thereof, You may choose to offer,+ and charge a fee for, acceptance of support, warranty, indemnity,+ or other liability obligations and/or rights consistent with this+ License. However, in accepting such obligations, You may act only+ on Your own behalf and on Your sole responsibility, not on behalf+ of any other Contributor, and only if You agree to indemnify,+ defend, and hold each Contributor harmless for any liability+ incurred by, or claims asserted against, such Contributor by reason+ of your accepting any such warranty or additional liability.++ END OF TERMS AND CONDITIONS++ APPENDIX: How to apply the Apache License to your work.++ To apply the Apache License to your work, attach the following+ boilerplate notice, with the fields enclosed by brackets "{}"+ replaced with your own identifying information. (Don't include+ the brackets!) The text should be enclosed in the appropriate+ comment syntax for the file format. We also recommend that a+ file or class name and description of purpose be included on the+ same "printed page" as the copyright notice for easier+ identification within third-party archives.++ Copyright 2026 MiniCPM-V-ocr-pip contributors++ Licensed under the Apache License, Version 2.0 (the "License");+ you may not use this file except in compliance with the License.+ You may obtain a copy of the License at++ http://www.apache.org/licenses/LICENSE-2.0++ Unless required by applicable law or agreed to in writing, software+ distributed under the License is distributed on an "AS IS" BASIS,+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ See the License for the specific language governing permissions and+ limitations under the License.diff --git a/sdk/MANIFEST.in b/sdk/MANIFEST.innew file mode 100644index 0000000..a661adf--- /dev/null+++ b/sdk/MANIFEST.in@@ -0,0 +1,8 @@+include LICENSE+recursive-include minicpmvocr *.py *.yaml py.typed+prune scripts+prune tests+prune webdemo+prune webui+exclude uv.lock+global-exclude __pycache__ *.py[cod] .DS_Storediff --git a/sdk/deploy_confidence_score.sh b/sdk/deploy_confidence_score.shnew file mode 100755index 0000000..0f1146f--- /dev/null+++ b/sdk/deploy_confidence_score.sh@@ -0,0 +1,11 @@+#!/usr/bin/env bash+set -euo pipefail+TARGET="${1:-local}"+SDK_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"+if [[ "$TARGET" == local ]]; then+ exec bash "$SDK_DIR/webui/scripts/start_webui.sh"+fi+: "${OCR_REMOTE_SDK_DIR:?Set OCR_REMOTE_SDK_DIR to the SDK directory on the remote host}"+printf -v quoted_remote '%q' "$OCR_REMOTE_SDK_DIR"+scp -C "$SDK_DIR/webui/static/index.html" "$TARGET:$OCR_REMOTE_SDK_DIR/webui/static/index.html"+ssh "$TARGET" "cd $quoted_remote && bash webui/scripts/start_webui.sh"diff --git a/sdk/minicpmvocr/__init__.py b/sdk/minicpmvocr/__init__.pynew file mode 100644index 0000000..53f96b1--- /dev/null+++ b/sdk/minicpmvocr/__init__.py@@ -0,0 +1,64 @@+'MiniCPM-OCR document parsing SDK.'+from __future__ import annotations++from typing import TYPE_CHECKING++from ._version import __version__+++_EXPORTS = {++ "DEFAULT_CONFIG": "minicpmvocr.config",+ "load_config": "minicpmvocr.config",++ "parse_layout_run": "minicpmvocr.pipeline",+ "prepare_run": "minicpmvocr.pipeline",+ "infer_run": "minicpmvocr.pipeline",+ "pipelined_run": "minicpmvocr.pipeline",++ "DEFAULT_PROMPT_MAP": "minicpmvocr.prompts",+ "load_prompt_map": "minicpmvocr.prompts",+ "get_element_cfg": "minicpmvocr.prompts",++ "create_backend": "minicpmvocr.backends",+ "create_layout_detector": "minicpmvocr.layouts",++ "assemble_markdown": "minicpmvocr.postprocess",+ "convert_otsl_to_html": "minicpmvocr.postprocess",+ "apply_cross_page_merge": "minicpmvocr.postprocess",+ "assemble_document_markdown": "minicpmvocr.postprocess",++ "UprightCorrector": "minicpmvocr.pipeline.upright",+}++__all__ = ["__version__", *sorted(_EXPORTS)]+++def __getattr__(name: str):+ module_path = _EXPORTS.get(name)+ if module_path is None:+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")+ from importlib import import_module++ value = getattr(import_module(module_path), name)+ globals()[name] = value+ return value+++def __dir__():+ return sorted(__all__)+++if TYPE_CHECKING:+ from .backends import create_backend+ from .config import DEFAULT_CONFIG, load_config+ from .layouts import create_layout_detector+ from .postprocess import (+ apply_cross_page_merge,+ assemble_document_markdown,+ assemble_markdown,+ convert_otsl_to_html,+ )+ from .pipeline import infer_run, parse_layout_run, pipelined_run, prepare_run+ from .prompts import DEFAULT_PROMPT_MAP, get_element_cfg, load_prompt_map+ from .pipeline.upright import UprightCorrectordiff --git a/sdk/minicpmvocr/__main__.py b/sdk/minicpmvocr/__main__.pynew file mode 100644index 0000000..bfdcd0c--- /dev/null+++ b/sdk/minicpmvocr/__main__.py@@ -0,0 +1,4 @@+from .cli import main++if __name__ == "__main__":+ raise SystemExit(main())diff --git a/sdk/minicpmvocr/_utils.py b/sdk/minicpmvocr/_utils.pynew file mode 100644index 0000000..6eb32ff--- /dev/null+++ b/sdk/minicpmvocr/_utils.py@@ -0,0 +1,94 @@+import json+import re+from datetime import datetime, timezone+from pathlib import Path+from typing import Any, Iterable, List, Optional, Tuple+++ENGINE_FAILURE_RE = re.compile(+ r"^\s*<!--\s*(?P<msg>.*?)\s*-->\s*$",+ re.DOTALL,+)+++_ENGINE_FAILURE_MARKERS = (+ "failed",+ "cuda out of memory",+ "outofmemoryerror",+ "enginecore",+ "traceback",+)+++def classify_engine_text(raw_text: str) -> Tuple[str, Optional[str]]:+ 'Split engine output into (text, error).'+ text = raw_text or ""+ match = ENGINE_FAILURE_RE.match(text)+ if not match:+ return text, None+ msg = match.group("msg").strip()+ lowered = msg.lower()+ if any(marker in lowered for marker in _ENGINE_FAILURE_MARKERS):+ return "", msg+ return text, None+++def now_iso() -> str:+ return datetime.now(timezone.utc).isoformat(timespec="seconds")+++def ensure_dir(path: Path) -> None:+ path.mkdir(parents=True, exist_ok=True)+++def read_json(path: Path, default: Any = None) -> Any:+ if not path.exists():+ return default+ with path.open("r", encoding="utf-8") as f:+ return json.load(f)+++def write_json(path: Path, payload: Any, indent: int = 2) -> None:+ ensure_dir(path.parent)+ with path.open("w", encoding="utf-8") as f:+ json.dump(payload, f, ensure_ascii=False, indent=indent)+ f.write("\n")+++def append_jsonl(path: Path, payload: Any) -> None:+ ensure_dir(path.parent)+ with path.open("a", encoding="utf-8") as f:+ f.write(json.dumps(payload, ensure_ascii=False) + "\n")+++def read_jsonl(path: Path) -> List[Any]:+ if not path.exists():+ return []+ rows: List[Any] = []+ with path.open("r", encoding="utf-8") as f:+ for line in f:+ line = line.strip()+ if not line:+ continue+ rows.append(json.loads(line))+ return rows+++def mean(values: Iterable[float]) -> float:+ vals = list(values)+ if not vals:+ return 0.0+ return sum(vals) / len(vals)+++def percentile(values: Iterable[float], pct: float) -> float:+ vals = sorted(values)+ if not vals:+ return 0.0+ if len(vals) == 1:+ return vals[0]+ idx = (len(vals) - 1) * pct+ lo = int(idx)+ hi = min(lo + 1, len(vals) - 1)+ frac = idx - lo+ return vals[lo] * (1 - frac) + vals[hi] * fracdiff --git a/sdk/minicpmvocr/_version.py b/sdk/minicpmvocr/_version.pynew file mode 100644index 0000000..5becc17--- /dev/null+++ b/sdk/minicpmvocr/_version.py@@ -0,0 +1 @@+__version__ = "1.0.0"diff --git a/sdk/minicpmvocr/backends/__init__.py b/sdk/minicpmvocr/backends/__init__.pynew file mode 100644index 0000000..d5352ba--- /dev/null+++ b/sdk/minicpmvocr/backends/__init__.py@@ -0,0 +1,106 @@+from __future__ import annotations++from pathlib import Path+from typing import Dict, List++from .client import PNG_COMPRESS_LEVEL, EngineError, VLMClient, encode_image_b64+from .dialects import DIALECTS, CropRequest, Dialect, DialectError+++BACKEND_TYPES = ("vllm", "llamacpp", "ollama", "openai")++BACKEND_ALIASES: Dict[str, str] = {++ "minicpm_vllm_openai_api": "vllm",+ "minicpm_vllm": "vllm",+ "vllm_openai_api": "vllm",+ "llama_cpp": "llamacpp",+ "llama-cpp": "llamacpp",+ "llama.cpp": "llamacpp",+ "llama_server": "llamacpp",+ "llama-server": "llamacpp",+ "gguf": "llamacpp",+ "openai_compatible": "openai",+ "openai_api": "openai",+ "sglang": "openai",+ "lmdeploy": "openai",+}++OPENAI_API_STYLES = ("openai", "openai_compat", "openai_compatible", "v1")+++def list_backends() -> List[str]:+ return sorted(BACKEND_TYPES)+++def normalize_backend_name(engine_type: str) -> str:+ key = str(engine_type or "").strip().lower()+ key = BACKEND_ALIASES.get(key, key)+ if key not in BACKEND_TYPES:+ raise ValueError(+ "Unsupported engine.type: {!r}. Available backends: {} (aliases: {})".format(+ engine_type, ", ".join(list_backends()), ", ".join(sorted(BACKEND_ALIASES))+ )+ )+ return key+++def resolve_dialect(engine_cfg: Dict) -> Dialect:+ name = normalize_backend_name(engine_cfg.get("type", ""))+ api_style = str(engine_cfg.get("api_style", "") or "").strip().lower()+ if name == "ollama" and api_style in OPENAI_API_STYLES:+ return DIALECTS["ollama_openai"]+ return DIALECTS[name]+++def validate_engine_config(engine_cfg: Dict, require_connection: bool = False) -> None:+ 'Config-time checks that do not need a live server.'+ backend = normalize_backend_name(engine_cfg.get("type", ""))++ if engine_cfg.get("auto_start"):+ raise ValueError(+ "engine.auto_start is no longer supported: the SDK connects to an already running "+ "server. Start it with scripts/start_%s.sh (or your own launcher) and point "+ "engine.server_url / engine.server_urls at it." % backend+ )++ if (require_connection or backend == "ollama") and not str(engine_cfg.get("model_name", "") or "").strip():+ raise ValueError("engine.model_name is required; specify --model NAME or configure the served model name")++ server_urls = engine_cfg.get("server_urls") or []+ if not isinstance(server_urls, list):+ raise ValueError("engine.server_urls must be a list of URLs")+ for url in server_urls:+ if not isinstance(url, str) or not url.strip():+ raise ValueError("engine.server_urls contains invalid URL value")+ if require_connection and not str(engine_cfg.get("server_url", "") or "").strip() and not server_urls and not engine_cfg.get("port"):+ raise ValueError("engine.server_url or engine.server_urls is required; specify --server-url URL")+++def create_backend(cfg: Dict, run_dir: Path | None = None) -> VLMClient:+ '`run_dir` is accepted and ignored; the client no longer writes engine logs.'+ validate_engine_config(cfg["engine"], require_connection=True)+ return VLMClient(cfg, resolve_dialect(cfg["engine"]))+++create_client = create_backend+++__all__ = [+ "BACKEND_ALIASES",+ "BACKEND_TYPES",+ "CropRequest",+ "DIALECTS",+ "Dialect",+ "DialectError",+ "EngineError",+ "PNG_COMPRESS_LEVEL",+ "VLMClient",+ "create_backend",+ "create_client",+ "encode_image_b64",+ "list_backends",+ "normalize_backend_name",+ "resolve_dialect",+ "validate_engine_config",+]diff --git a/sdk/minicpmvocr/backends/client.py b/sdk/minicpmvocr/backends/client.pynew file mode 100644index 0000000..6beab02--- /dev/null+++ b/sdk/minicpmvocr/backends/client.py@@ -0,0 +1,232 @@+from __future__ import annotations++import base64+import io+import random+import threading+import time+from typing import Dict, Optional++import requests++from .dialects import CropRequest, Dialect, DialectError+++class EngineError(RuntimeError):+ pass+++PNG_COMPRESS_LEVEL = 1+++def encode_image_b64(image, image_format: str = "PNG") -> str:+ buf = io.BytesIO()+ save_kwargs = {"compress_level": PNG_COMPRESS_LEVEL} if image_format == "PNG" else {}+ image.save(buf, format=image_format, **save_kwargs)+ return base64.b64encode(buf.getvalue()).decode()+++class VLMClient:+ def __init__(self, cfg: Dict, dialect: Dialect):+ self.cfg = cfg+ self.dialect = dialect+ self.name = dialect.name+ self.engine_cfg = cfg["engine"]+ self.mm_cfg = cfg.get("mm", {})+ self.decode_cfg = cfg.get("decode", {})++ server_urls = [str(u).strip() for u in (self.engine_cfg.get("server_urls") or []) if str(u).strip()]+ server_url_single = str(self.engine_cfg.get("server_url", "")).strip()+ if server_url_single:+ server_urls.insert(0, server_url_single)+ if not server_urls:+ port = self.engine_cfg.get("port")+ if not port:+ raise ValueError("engine.server_url or engine.server_urls is required; specify --server-url URL")+ server_urls = ["http://127.0.0.1:%s" % port]+ self.server_urls = [u.rstrip("/") for u in server_urls]+ self.server_url = self.server_urls[0]+++ self._local = threading.local()+++ def _url(self, base_url: str, configured: str, default_path: str) -> str:+ path = str(configured or "").strip() or default_path+ return "{}{}".format(base_url, path if path.startswith("/") else "/" + path)++ def chat_url(self, base_url: str) -> str:+ return self._url(base_url, self.engine_cfg.get("chat_path", ""), self.dialect.chat_path)++ def health_url(self, base_url: str) -> str:+ return self._url(base_url, self.engine_cfg.get("health_path", ""), self.dialect.health_path)++ def request_headers(self) -> Dict[str, str]:+ headers = {"Content-Type": "application/json"}+ api_key = str(self.engine_cfg.get("api_key", "") or "").strip()+ if api_key:+ headers["Authorization"] = "Bearer %s" % api_key+ for k, v in (self.engine_cfg.get("extra_headers") or {}).items():+ headers[str(k)] = str(v)+ return headers+++ def start(self) -> None:+ self.wait_ready(timeout_sec=int(self.engine_cfg.get("startup_timeout_sec", 1800)))++ def _session(self) -> requests.Session:+ session = getattr(self._local, "session", None)+ if session is None:+ session = requests.Session()++ session.trust_env = False+ self._local.session = session+ return session++ def stop(self) -> None:+++ session = getattr(self._local, "session", None)+ if session is not None:+ session.close()+ self._local.session = None+++ close = stop++ def check_ready(self, base_url: str) -> None:+ url = self.health_url(base_url)+ resp = self._session().get(url, headers=self.request_headers(), timeout=10)+ resp.raise_for_status()+ try:+ body = resp.json()+ except ValueError:+ body = None+ problem = self.dialect.check_health(self.engine_cfg, body)+ if problem:+ raise EngineError("{} not ready: {}".format(url, problem))++ def wait_ready(self, timeout_sec: int = 1800) -> None:+ deadline = time.time() + timeout_sec+ last_err = ""+ while True:+ for base_url in self.server_urls:+ try:+ self.check_ready(base_url)+ return+ except Exception as e:+ last_err = "{}: {}".format(base_url, e)+ if time.time() >= deadline:+ break+ time.sleep(5)+ raise EngineError(+ "no %s endpoint became ready within %ss (%s). Start the server first, e.g. scripts/start_%s.sh; "+ "last error: %s" % (self.name, timeout_sec, ", ".join(self.server_urls), self.name, last_err)+ )+++ def clamp_max_tokens(self, max_new_tokens: int) -> int:+ requested = int(max_new_tokens)+ model_max_len = int(self.engine_cfg.get("max_model_len", 0) or 0)+ if model_max_len <= 0:+ return requested+ prompt_reserve_tokens = int(self.engine_cfg.get("prompt_reserve_tokens", 512) or 512)+ return min(requested, max(256, model_max_len - max(1, prompt_reserve_tokens)))++ def _is_context_overflow(self, status_code: int, body: str) -> bool:+ if status_code not in self.dialect.context_overflow_codes:+ return False+ lowered = (body or "").lower()+ return any(marker in lowered for marker in self.dialect.context_overflow_markers)++ def recognize(self, image, prompt: str, max_new_tokens: int, slice_nums: Optional[int] = None,+ n: int = 1, decode_overrides: Optional[Dict] = None) -> Dict:+++ encode_t0 = time.time()+ image_b64 = encode_image_b64(image)+ encode_sec = time.time() - encode_t0+ max_tokens = self.clamp_max_tokens(max_new_tokens)++ ready_timeout_sec = float(self.engine_cfg.get("request_ready_timeout_sec", 600))+ retry_interval_sec = float(self.engine_cfg.get("request_retry_interval_sec", 2))+ request_timeout_sec = float(self.engine_cfg.get("request_timeout_sec", 300))+ deadline = time.time() + ready_timeout_sec+ headers = self.request_headers()+ last_err = ""+ queue_wait_sec = 0.0++ request_http = self._session()+ while True:+ request_urls = list(self.server_urls)+ random.shuffle(request_urls)++ last_endpoint_err = ""+ lowered_tokens = False+ for target_url in request_urls:+ req = CropRequest(+ image_b64=image_b64,+ prompt=prompt,+ max_tokens=max_tokens,+ slice_nums=slice_nums,+ n=n,+ decode_overrides=decode_overrides,+ )+ build_t0 = time.time()+ payload = self.dialect.build_payload(req, self.engine_cfg, self.mm_cfg, self.decode_cfg)+ build_sec = time.time() - build_t0+ try:+ started = time.time()+ resp = request_http.post(+ self.chat_url(target_url),+ json=payload,+ headers=headers,+ timeout=request_timeout_sec,+ )+ latency = time.time() - started++ if resp.status_code >= 400:+ body = resp.text or ""+ if self._is_context_overflow(resp.status_code, body) and max_tokens > 256:+ max_tokens = max(256, max_tokens // 2)+ last_endpoint_err = "{} context overflow, retry with max_tokens={}: {}".format(+ target_url, max_tokens, body[:300]+ )+ lowered_tokens = True+ break+ resp.raise_for_status()++ parse_t0 = time.time()+ result = self.dialect.parse_response(resp.json())+ parse_sec = time.time() - parse_t0+ metrics = result.setdefault("request_metrics", {})+ metrics["latency_sec"] = latency+ metrics["endpoint"] = target_url+ metrics["backend"] = self.name+ metrics["client_encode_sec"] = round(encode_sec, 6)+ metrics["client_payload_build_sec"] = round(build_sec, 6)+ metrics["client_post_sec"] = round(latency, 6)+ metrics["client_parse_sec"] = round(parse_sec, 6)+ metrics["client_queue_wait_sec"] = round(queue_wait_sec, 6)+ metrics["client_overhead_sec"] = round(encode_sec + build_sec + parse_sec, 6)+ metrics["image_b64_bytes"] = len(image_b64)+ return result+ except Exception as endpoint_err:+ last_endpoint_err = "{}: {}".format(target_url, endpoint_err)+ continue++ last_err = last_endpoint_err or "all endpoints failed"+ if lowered_tokens:+ continue+ if time.time() >= deadline:+ raise EngineError(+ "%s request failed until timeout (%ss): %s" % (self.name, ready_timeout_sec, last_err)+ )+ time.sleep(retry_interval_sec)+ queue_wait_sec += retry_interval_sec+++ predict_crop = recognize+++__all__ = ["EngineError", "DialectError", "VLMClient", "encode_image_b64"]diff --git a/sdk/minicpmvocr/backends/dialects.py b/sdk/minicpmvocr/backends/dialects.pynew file mode 100644index 0000000..7a02745--- /dev/null+++ b/sdk/minicpmvocr/backends/dialects.py@@ -0,0 +1,297 @@+from __future__ import annotations++from dataclasses import dataclass+from typing import Callable, Dict, List, Optional+++class DialectError(RuntimeError):+ pass+++@dataclass(frozen=True)+class CropRequest:+ 'The single internal request shape, independent of any backend.'++ image_b64: str+ prompt: str+ max_tokens: int+ slice_nums: Optional[int] = None+++ n: int = 1+ decode_overrides: Optional[Dict] = None+++@dataclass(frozen=True)+class Dialect:+ name: str+ default_port: int+ chat_path: str+ health_path: str+ build_payload: Callable[[CropRequest, Dict, Dict, Dict], Dict]+ parse_response: Callable[[Dict], Dict]++ check_health: Callable[[Dict, object], Optional[str]] = lambda cfg, body: None+ context_overflow_codes: tuple = (400,)+ context_overflow_markers: tuple = ("maximum context length",)+++def _data_uri(image_b64: str) -> str:+ return "data:image/png;base64,%s" % image_b64+++def _openai_messages(req: CropRequest) -> List[Dict]:+ return [+ {+ "role": "user",+ "content": [+ {"type": "image_url", "image_url": {"url": _data_uri(req.image_b64)}},+ {"type": "text", "text": req.prompt},+ ],+ }+ ]+++def _extra_body(engine_cfg: Dict) -> Dict:+ extra = engine_cfg.get("extra_body") or {}+ return dict(extra) if isinstance(extra, dict) else {}+++def _normalized(text: str, finish_reason, completion_tokens: int, extra_metrics: Dict, data: Dict,+ texts: Optional[List[str]] = None) -> Dict:+ return {+ "text": text or "",+++ "texts": texts if texts is not None else [text or ""],+ "finish_reason": finish_reason,+ "output_token_count": int(completion_tokens),+ "request_metrics": extra_metrics,+ "encoder_metrics": {},+ "raw_response": data,+ }+++def parse_openai_response(data: Dict) -> Dict:+ if "error" in data and data["error"]:+ raise DialectError(str(data["error"]))+ choices = data.get("choices")+ if not choices:+ raise DialectError("invalid OpenAI response shape: no choices; body=%s" % str(data)[:300])+ try:+ texts = [(c.get("message") or {}).get("content") or "" for c in choices]+ choice = choices[0]+ except (AttributeError, TypeError) as e:+ raise DialectError("invalid OpenAI response shape: %s; body=%s" % (e, str(data)[:300])) from e+ usage = data.get("usage") or {}+ return _normalized(+ text=(choice.get("message") or {}).get("content"),+ finish_reason=choice.get("finish_reason"),+ completion_tokens=usage.get("completion_tokens", 0),+ extra_metrics={+ "prompt_tokens": int(usage.get("prompt_tokens", 0)),+ "completion_tokens": int(usage.get("completion_tokens", 0)),+ "total_tokens": int(usage.get("total_tokens", 0)),+ },+ data=data,+ texts=texts,+ )+++def check_models_endpoint(engine_cfg: Dict, body) -> Optional[str]:+ ids = [item.get("id") for item in (body or {}).get("data", []) if item.get("id")]+ return None if ids else "model list is empty"+++def build_openai_payload(req: CropRequest, engine_cfg: Dict, mm_cfg: Dict, decode_cfg: Dict) -> Dict:+ payload = {+ "model": engine_cfg.get("model_name", ""),+ "messages": _openai_messages(req),+ "max_tokens": int(req.max_tokens),+ "stream": False,+ "temperature": decode_cfg.get("temperature", 0.01),+ "top_p": decode_cfg.get("top_p", 0.001),+ }+ payload.update(_extra_body(engine_cfg))+ return payload+++def build_vllm_payload(req: CropRequest, engine_cfg: Dict, mm_cfg: Dict, decode_cfg: Dict) -> Dict:+ slice_nums = req.slice_nums if req.slice_nums is not None else mm_cfg["max_slice_nums"]++ decode = dict(decode_cfg)+ if req.decode_overrides:+ decode.update(req.decode_overrides)+ payload = {+ "model": engine_cfg.get("model_name", ""),+ "messages": _openai_messages(req),+ "max_tokens": int(req.max_tokens),+ "mm_processor_kwargs": {+ "downsample_mode": mm_cfg["downsample_mode"],+ "max_slice_nums": int(slice_nums),+ },+ "chat_template_kwargs": {"enable_thinking": False},+ "temperature": decode["temperature"],+ "top_p": decode["top_p"],+ "top_k": decode["top_k"],+ "repetition_penalty": decode["repetition_penalty"],+ "no_repeat_ngram_size": decode["no_repeat_ngram_size"],+ }+++ if req.decode_overrides:+ for key, value in req.decode_overrides.items():+ if key not in payload and key not in ("max_tokens_map",):+ payload[key] = value+++ if req.n > 1:+ payload["n"] = int(req.n)+ payload.update(_extra_body(engine_cfg))+ return payload+++def build_llamacpp_payload(req: CropRequest, engine_cfg: Dict, mm_cfg: Dict, decode_cfg: Dict) -> Dict:+ payload = {+ "model": engine_cfg.get("model_name", ""),+ "messages": _openai_messages(req),+ "max_tokens": int(req.max_tokens),+ "stream": False,+ "temperature": decode_cfg.get("temperature", 0.01),+ "top_p": decode_cfg.get("top_p", 0.001),+ "top_k": decode_cfg.get("top_k", 1),++ "repeat_penalty": decode_cfg.get("repetition_penalty", 1.0),+ }+ payload.update(_extra_body(engine_cfg))+ return payload+++def check_llamacpp_health(engine_cfg: Dict, body) -> Optional[str]:+ status = (body or {}).get("status", "ok") if isinstance(body, dict) else "ok"+ return None if status in ("ok", "no slot available") else "status=%s" % status+++def build_ollama_payload(req: CropRequest, engine_cfg: Dict, mm_cfg: Dict, decode_cfg: Dict) -> Dict:+ options = {+ "temperature": decode_cfg.get("temperature", 0.01),+ "top_p": decode_cfg.get("top_p", 0.001),+ "top_k": decode_cfg.get("top_k", 1),+ "repeat_penalty": decode_cfg.get("repetition_penalty", 1.0),+ "num_predict": int(req.max_tokens),+ "num_ctx": int(engine_cfg.get("num_ctx", 8192) or 8192),+ }+ extra_options = engine_cfg.get("extra_options") or {}+ if isinstance(extra_options, dict):+ options.update(extra_options)++ payload = {+ "model": engine_cfg.get("model_name", ""),+ "stream": False,+ "messages": [{"role": "user", "content": req.prompt, "images": [req.image_b64]}],+ "options": options,+ }+ keep_alive = engine_cfg.get("keep_alive", "")+ if keep_alive:+ payload["keep_alive"] = keep_alive+ payload.update(_extra_body(engine_cfg))+ return payload+++def parse_ollama_response(data: Dict) -> Dict:+ if data.get("error"):+ raise DialectError(str(data["error"]))+ eval_count = int(data.get("eval_count", 0) or 0)+ prompt_eval = int(data.get("prompt_eval_count", 0) or 0)+ eval_duration_ns = float(data.get("eval_duration", 0) or 0)+ metrics = {+ "prompt_tokens": prompt_eval,+ "completion_tokens": eval_count,+ "total_tokens": prompt_eval + eval_count,+ }+ if eval_duration_ns > 0:+ metrics["tokens_per_sec"] = eval_count / (eval_duration_ns / 1e9)+ return _normalized(+ text=(data.get("message") or {}).get("content"),+ finish_reason=data.get("done_reason"),+ completion_tokens=eval_count,+ extra_metrics=metrics,+ data=data,+ )+++def check_ollama_health(engine_cfg: Dict, body) -> Optional[str]:+ wanted = _normalize_ollama_tag(engine_cfg.get("model_name", ""))+ if not wanted:+ return None+ available = [_normalize_ollama_tag(m.get("name", "")) for m in (body or {}).get("models", [])]+ if wanted in available:+ return None+ return (+ "model '{}' not found; available: {}. Create it with "+ "`ollama create {} -f <Modelfile>` (see scripts/start_ollama.sh)".format(+ engine_cfg.get("model_name", ""), ", ".join(available) or "<none>", engine_cfg.get("model_name", "")+ )+ )+++def _normalize_ollama_tag(name: str) -> str:+ name = str(name or "").strip()+ return name[: -len(":latest")] if name.endswith(":latest") else name+++DIALECTS: Dict[str, Dialect] = {+ "openai": Dialect(+ name="openai",+ default_port=8000,+ chat_path="/v1/chat/completions",+ health_path="/v1/models",+ build_payload=build_openai_payload,+ parse_response=parse_openai_response,+ check_health=check_models_endpoint,+ ),+ "vllm": Dialect(+ name="vllm",+ default_port=18499,+ chat_path="/v1/chat/completions",+ health_path="/v1/models",+ build_payload=build_vllm_payload,+ parse_response=parse_openai_response,+ check_health=check_models_endpoint,+ ),+ "llamacpp": Dialect(+ name="llamacpp",+ default_port=18600,+ chat_path="/v1/chat/completions",+ health_path="/health",+ build_payload=build_llamacpp_payload,+ parse_response=parse_openai_response,+ check_health=check_llamacpp_health,+ context_overflow_codes=(400, 413, 500),+ context_overflow_markers=(+ "maximum context length",+ "exceed the available context size",+ "exceeds the available context size",+ "context size",+ ),+ ),+ "ollama": Dialect(+ name="ollama",+ default_port=11434,+ chat_path="/api/chat",+ health_path="/api/tags",+ build_payload=build_ollama_payload,+ parse_response=parse_ollama_response,+ check_health=check_ollama_health,+ ),++ "ollama_openai": Dialect(+ name="ollama_openai",+ default_port=11434,+ chat_path="/v1/chat/completions",+ health_path="/api/tags",+ build_payload=build_llamacpp_payload,+ parse_response=parse_openai_response,+ check_health=check_ollama_health,+ ),+}diff --git a/sdk/minicpmvocr/cli.py b/sdk/minicpmvocr/cli.pynew file mode 100644index 0000000..59062ac--- /dev/null+++ b/sdk/minicpmvocr/cli.py@@ -0,0 +1,443 @@+from __future__ import annotations++import argparse+import json+import os+import re+import sys+from contextlib import redirect_stdout+from datetime import datetime+from pathlib import Path++import yaml++from .backends import BACKEND_ALIASES, list_backends+from .config import _deep_merge, load_config+from .constants import PARAMS_FILENAME, SUPPORTED_INPUT_SUFFIXES+from .layouts import LAYOUT_ALIASES, list_layout_providers, normalize_layout_provider+from .layouts.download import ensure_layout_model+from .pipeline import infer_run, parse_layout_run, pipelined_run, prepare_run+from ._utils import read_jsonl+++def _add_engine_args(p: argparse.ArgumentParser, require_connection: bool = False) -> None:+ p.add_argument(+ "--backend",+ default="",+ help="Override engine.type: %s" % " | ".join(list_backends()),+ )+ p.add_argument(+ "--server-url",+ action="append",+ default=[],+ required=require_connection,+ metavar="URL",+ help="Override the engine endpoint; repeat for a server pool",+ )+ p.add_argument("--model", default="", required=require_connection, help="Served model name / ollama tag")+ p.add_argument(+ "--layout",+ default="",+ help="Override layout.provider: %s" % " | ".join(list_layout_providers()),+ )+ p.add_argument(+ "--set",+ action="append",+ default=[],+ metavar="KEY=VALUE",+ dest="set_overrides",+ help="Override any config field by dotted path, e.g. --set engine.num_ctx=16384",+ )+++def _positive_int(value: str) -> int:+ result = int(value)+ if result < 1:+ raise argparse.ArgumentTypeError("must be greater than zero")+ return result+++def _build_parser() -> argparse.ArgumentParser:+ parser = argparse.ArgumentParser(prog="minicpmvocr", description="MiniCPMV-OCR SDK pipeline")+ sub = parser.add_subparsers(dest="command", required=True)++ for name in ("parse-layout", "prepare", "infer", "run", "show-config"):+ p = sub.add_parser(name)+ p.add_argument("--config", required=True, help="Path to pipeline YAML config")+ _add_engine_args(p)++ p_parse = sub.add_parser(+ "parse",+ help="Parse a PDF or image into Markdown",+ formatter_class=argparse.RawDescriptionHelpFormatter,+ epilog="Example:\n minicpmvocr parse doc.pdf -o doc.md --device cuda:0 "+ "--server-url http://127.0.0.1:18499 --model minicpm-ocr",+ )+ p_parse.add_argument("path", nargs="?", metavar="INPUT", help="PDF or image to parse")+ p_parse.add_argument("--config", default="", help="Custom YAML config; default uses the bundled quickstart settings")+ p_parse.add_argument("--input", default="", help="Alias for the INPUT positional argument")+ p_parse.add_argument("-o", "--output", default="", help="Output Markdown path; default is stdout")+ p_parse.add_argument("--device", default="", help="Layout detection device, e.g. cuda:0 (quickstart default)")+ p_parse.add_argument("--layout-model", default="", metavar="DIR", help="Local PP-DocLayoutV3 inference model directory")+ p_parse.add_argument("--workers", type=_positive_int, default=None, metavar="N", help="Number of concurrent recognition requests (quickstart default: 32)")+ p_parse.add_argument("--stdout", action="store_true", help="Print markdown to stdout")+ p_parse.add_argument("--run-tag", default="", help="Optional run tag for this one-shot run")+ p_parse.add_argument("--no-merge-pages", action="store_true", help="Do not merge pages into a single markdown")+ p_parse.add_argument("--page-delimiter", default="\n\n<!-- page-break -->\n\n", help="Delimiter between pages when merging")+ _add_engine_args(p_parse, require_connection=True)++ sub.add_parser("list-backends", help="List pluggable inference backends and layout providers")+++ sub.add_parser(+ "serve-layout",+ add_help=False,+ help="Run the standalone PP-DocLayoutV3 detection server (--help for its flags)",+ )++ return parser+++class _OverrideLoader(yaml.SafeLoader):+++ yaml_implicit_resolvers = {+ ch: [+ (tag, regexp)+ for tag, regexp in resolvers+ if tag+ not in (+ "tag:yaml.org,2002:timestamp",+ "tag:yaml.org,2002:bool",+ "tag:yaml.org,2002:int",+ )+ ]+ for ch, resolvers in yaml.SafeLoader.yaml_implicit_resolvers.items()+ }+++_OverrideLoader.add_implicit_resolver(+ "tag:yaml.org,2002:bool",+ re.compile(r"^(?:true|True|TRUE|false|False|FALSE)$"),+ list("tTfF"),+)+_OverrideLoader.add_implicit_resolver(+ "tag:yaml.org,2002:int",+ re.compile(r"^[-+]?(?:0|[1-9][0-9]*)$|^0o[0-7]+$|^0x[0-9a-fA-F]+$"),+ list("-+0123456789"),+)+++def parse_override_value(raw: str):+ 'Parse one `--set` right-hand side.'+ return yaml.load(raw, Loader=_OverrideLoader)+++def _deep_set(target: dict, dotted_key: str, value) -> None:+ parts = [p for p in dotted_key.split(".") if p]+ if not parts:+ raise ValueError("Empty override key")+ node = target+ for part in parts[:-1]:+ node = node.setdefault(part, {})+ if not isinstance(node, dict):+ raise ValueError("Cannot override nested key under scalar: %s" % dotted_key)+ node[parts[-1]] = value+++def _build_engine_overrides(args: argparse.Namespace) -> dict:+ overrides: dict = {}++ backend = getattr(args, "backend", "")+ if backend:+ _deep_set(overrides, "engine.type", backend)++ server_urls = [u.strip() for u in getattr(args, "server_url", []) or [] if u.strip()]+ if server_urls:++ _deep_set(overrides, "engine.server_url", "")+ _deep_set(overrides, "engine.server_urls", server_urls)++ model = getattr(args, "model", "")+ if model:+ _deep_set(overrides, "engine.model_name", model)++ layout = getattr(args, "layout", "")+ if layout:+ _deep_set(overrides, "layout.provider", layout)++ device = getattr(args, "device", "")+ if device:+ _deep_set(overrides, "layout.device", device)++ layout_model = getattr(args, "layout_model", "")+ if layout_model:+ _deep_set(overrides, "layout.model_dir", str(Path(layout_model).expanduser().resolve()))++ workers = getattr(args, "workers", None)+ if workers is not None:+ _deep_set(overrides, "pipeline.max_workers", workers)++ for item in getattr(args, "set_overrides", []) or []:+ if "=" not in item:+ raise ValueError("--set expects KEY=VALUE, got: %s" % item)+ key, raw_value = item.split("=", 1)+ _deep_set(overrides, key.strip(), parse_override_value(raw_value))++ return overrides+++def _build_parse_overrides(args: argparse.Namespace) -> dict:+ input_path = Path(args.input).resolve()+ run_tag = args.run_tag or f"minicpmvocr_parse_{input_path.stem}_{datetime.now().strftime('%Y%m%d_%H%M%S')}"+ return {+ "run": {+ "run_tag": run_tag,+ "mode": "oneshot_file",+ },+ "input": {+ "file_path": str(input_path),+ "manifest": "",+ "image_dir": "",+ "files_dir": "",+ "limit": 0,+ },+ "layout": {+ "enabled": True,+ },+ "logging": {++ "progress_log_every": 10**9,+ },+ }+++def _quickstart_layout_model() -> str:+ configured = os.environ.get("OCR_LAYOUT_MODEL_DIR", "").strip()+ if configured:+ return str(Path(configured).expanduser().resolve())+ assets = Path(os.environ.get("OCR_ASSETS_DIR") or Path.cwd() / "models").expanduser().resolve()+ candidates = [assets / "PP-DocLayoutV3_infer", assets / "PP-DocLayoutV3"]+ return str(next((path for path in candidates if (path / PARAMS_FILENAME).is_file()), candidates[0]))+++def _load_parse_config(args: argparse.Namespace) -> dict:+ if not args.server_url or any(not url.strip() for url in args.server_url):+ raise ValueError("--server-url URL is required and must not be empty")+ if not args.model.strip():+ raise ValueError("--model NAME is required and must not be empty")+ positional = args.path or ""+ if positional and args.input:+ raise ValueError("Specify INPUT or --input, not both")+ args.input = positional or args.input+ if not args.input:+ raise ValueError("An input PDF or image is required")+ if Path(args.input).is_dir():+ raise ValueError("INPUT must be a PDF or image file")+ input_path = Path(args.input)+ if not input_path.is_file():+ raise FileNotFoundError(f"Input file not found: {input_path}")+ if input_path.suffix.lower() not in SUPPORTED_INPUT_SUFFIXES:+ raise ValueError(f"Unsupported input file type: {input_path.suffix}")++ overrides = _build_parse_overrides(args)+ explicit_overrides = _build_engine_overrides(args)+ if not args.config:+ defaults = {+ "layout": {+ "model_dir": _quickstart_layout_model(),+ "device": os.environ.get("OCR_LAYOUT_DEVICE") or "cuda:0",+ },+ "engine": {"max_model_len": 40960},+ "pipeline": {"overlap_layout": True},+ }+ overrides = _deep_merge(defaults, overrides)+ overrides = _deep_merge(overrides, explicit_overrides)+ explicit_layout = explicit_overrides.get("layout") or {}+ if (+ not args.config+ and "model_dir" not in explicit_layout+ and not os.environ.get("OCR_LAYOUT_MODEL_DIR", "").strip()+ and normalize_layout_provider(overrides["layout"].get("provider", "ppdoclayout3_paddlex")) == "ppdoclayout3_paddlex"+ ):+ ensure_layout_model(Path(overrides["layout"]["model_dir"]))+ config = args.config or str(Path(__file__).parent / "configs" / "minicpmvocr.yaml")+ try:+ return load_config(config, overrides=overrides)+ except FileNotFoundError as exc:+ if "layout.model_dir" in str(exc):+ raise FileNotFoundError(+ f"{exc}. Place PP-DocLayoutV3 in ./models/PP-DocLayoutV3_infer, "+ "or set --layout-model DIR / OCR_LAYOUT_MODEL_DIR."+ ) from exc+ raise+++def _read_markdown_from_run(+ run_dir: Path, merge_pages: bool, page_delimiter: str, cfg: dict | None = None+) -> tuple[str, int]:+ tasks = read_jsonl(run_dir / "runtime" / "page_tasks.jsonl")+ if not tasks:+ raise RuntimeError("No page tasks found in run. parse-layout/prepare may have failed.")++ md_root = run_dir / "output"+ page_texts = []+ missing = []+ for task in tasks:+ image_id = task["image_id"]+ md_path = md_root / f"{image_id}.md"+ if not md_path.exists():+ missing.append(str(md_path))+ continue+ page_texts.append(md_path.read_text(encoding="utf-8"))++ if missing:+ raise RuntimeError("Missing markdown outputs: %s" % ", ".join(missing[:5]))++ if not merge_pages and len(page_texts) > 1:+ raise RuntimeError("Multiple pages generated; remove --no-merge-pages or parse a single-page input.")+++ if (+ merge_pages+ and cfg is not None+ and bool((cfg.get("pipeline") or {}).get("merge_cross_page_tables", False))+ ):+ from .postprocess.crosspage import assemble_document_markdown+ from .prompts import load_prompt_map++ markdown, pages, _ = assemble_document_markdown(+ run_dir, load_prompt_map(cfg), merge_tables=True, delimiter=page_delimiter+ )+ if pages:+ return markdown, pages++ if merge_pages:+ return page_delimiter.join(page_texts), len(page_texts)+ return page_texts[0], 1+++def main() -> int:+++ argv = sys.argv[1:]+ if argv and argv[0] == "serve-layout":+++ from .layouts.server_app import main as serve_layout_main++ return serve_layout_main(argv[1:])++ parser = _build_parser()+ args = parser.parse_args()++ if args.command == "list-backends":+ print(+ json.dumps(+ {+ "engine": {"backends": list_backends(), "aliases": BACKEND_ALIASES},+ "layout": {"providers": list_layout_providers(), "aliases": LAYOUT_ALIASES},+ },+ ensure_ascii=False,+ indent=2,+ )+ )+ return 0++ if args.command == "parse":+ try:+ cfg = _load_parse_config(args)+ except (ValueError, OSError) as exc:+ parser.error(str(exc))++ with redirect_stdout(sys.stderr):+ if bool(cfg["pipeline"].get("overlap_layout", False)):+ infer_summary = pipelined_run(cfg)+ layout_summary = {"overlapped": True, **infer_summary.get("pipelined", {})}+ else:+ layout_summary = parse_layout_run(cfg)+ prepare_run(cfg)+ infer_summary = infer_run(cfg)++ run_dir = Path(cfg["_meta"]["run_dir"])+ markdown, pages = _read_markdown_from_run(+ run_dir=run_dir,+ merge_pages=not args.no_merge_pages,+ page_delimiter=args.page_delimiter,+ cfg=cfg,+ )++ if args.stdout or not args.output:+ print(markdown)+ return 0++ output_path = Path(args.output).resolve()+ output_path.parent.mkdir(parents=True, exist_ok=True)+ output_path.write_text(markdown, encoding="utf-8")++ print(+ json.dumps(+ {+ "command": "parse",+ "input": str(Path(args.input).resolve()),+ "output_md": str(output_path),+ "pages": pages,+ "run_dir": str(run_dir),+ "layout_summary": layout_summary,+ "infer_summary": infer_summary,+ },+ ensure_ascii=False,+ indent=2,+ )+ )+ return 0++ cfg = load_config(args.config, overrides=_build_engine_overrides(args))++ if args.command == "show-config":+ print(json.dumps(cfg, ensure_ascii=False, indent=2))+ return 0++ if args.command == "parse-layout":+ summary = parse_layout_run(cfg)+ print(json.dumps({"command": "parse-layout", "run_dir": cfg["_meta"]["run_dir"], "summary": summary}, ensure_ascii=False, indent=2))+ return 0++ if args.command == "prepare":+ meta = prepare_run(cfg)+ print(json.dumps({"command": "prepare", "run_dir": cfg["_meta"]["run_dir"], "planned_pages": meta["counts"]["planned_pages"]}, ensure_ascii=False, indent=2))+ return 0++ if args.command == "infer":+ summary = infer_run(cfg)+ print(json.dumps({"command": "infer", "run_dir": cfg["_meta"]["run_dir"], "summary": summary}, ensure_ascii=False, indent=2))+ return 0++ if args.command == "run":+ if bool(cfg["pipeline"].get("overlap_layout", False)):+ infer_summary = pipelined_run(cfg)+ layout_summary = {"overlapped": True, **infer_summary.get("pipelined", {})}+ else:+ layout_summary = parse_layout_run(cfg)+ prepare_run(cfg)+ infer_summary = infer_run(cfg)+ print(+ json.dumps(+ {+ "command": "run",+ "run_dir": cfg["_meta"]["run_dir"],+ "layout_summary": layout_summary,+ "infer_summary": infer_summary,+ },+ ensure_ascii=False,+ indent=2,+ )+ )+ return 0++ parser.error(f"Unknown command: {args.command}")+ return 2+++if __name__ == "__main__":+ raise SystemExit(main())diff --git a/sdk/minicpmvocr/config.py b/sdk/minicpmvocr/config.pynew file mode 100644index 0000000..a06d27b--- /dev/null+++ b/sdk/minicpmvocr/config.py@@ -0,0 +1,509 @@+from __future__ import annotations++import logging+import os+import re+from copy import deepcopy+from datetime import datetime+from pathlib import Path+from typing import Any, Dict++import yaml++from .backends import normalize_backend_name, validate_engine_config+from .layouts import normalize_layout_provider, resolve_layout_provider_class+++LOGGER = logging.getLogger(__name__)++DEFAULT_CONFIG: Dict[str, Any] = {+ "run": {+ "run_tag": "",+ "run_root": "./runs",+ "mode": "smoke_1page",+ "seed": 42,+ },+ "input": {+ "manifest": "",+ "file_path": "",+ "image_dir": "",+ "files_dir": "",+ "limit": 0,+ },+++ "engine": {++ "type": "vllm",+ "model_name": "",+++ "server_url": "",+ "server_urls": [],+ "port": 0,++ "api_key": "",+ "api_style": "",+ "chat_path": "",+ "health_path": "",+ "extra_headers": {},+ "extra_body": {},+ "startup_timeout_sec": 1800,+ "request_timeout_sec": 300,+ "request_ready_timeout_sec": 600,+ "request_retry_interval_sec": 2,++ "max_model_len": 0,+ "prompt_reserve_tokens": 512,++ "num_ctx": 8192,+ "keep_alive": "",+ "extra_options": {},+ },+ "upright": {++ "enabled": False,++ "doc_gate": True,++ "gate_min_side": 500,+ "gate_min_lines": 6,++ "min_apply_deg": 0.3,++ "cls_long_side": 1600,++ "orientation_confirm": True,++ "vote_lines": 12,+ "vote_min_lines": 5,+ "vote_axis_margin": 1.5,+ "vote_flip_majority": 0.75,++ "model_dir": "",+ "det_model_dir": "",+ "textline_model_dir": "",+ },+ "layout": {+ "enabled": True,+++ "provider": "ppdoclayout3_paddlex",++ "model_dir": "",+ "device": "cuda",+++ "threshold": 0.3,+ "nms": True,+++ "use_chart_recognition": True,+ "use_seal_recognition": True,+ "use_ocr_for_image_block": False,+++ "skip_vlm_labels": None,+ },+ "pipeline": {+++ "max_workers": 32,+ "queue_mode": "concurrent",++ "page_workers": 1,+ "page_maxsize": 0,+ "region_maxsize": 0,+++ "layout_workers": 1,+++ "overlap_layout": False,+++ "save_crops": False,+++ "save_pages": False,+++ "render_workers": 0,+++ "merge_cross_page_tables": False,+ },+ "mm": {+++ "downsample_mode": "4x",+++ "max_slice_nums": 9,+ "image_limit": 36,+ },+ "prompt": {+ "override_mode": "legacy",+ "prompt_map": "",+ },+ "decode": {+ "temperature": 0.01,+ "top_p": 0.001,+ "top_k": 1,+ "repetition_penalty": 1.0,+ "no_repeat_ngram_size": 100,+ "max_tokens_map": {},+ },+++ "tts": {+ "enabled": False,+ "n": 4,+++ "sampling": {+ "temperature": 0.7,+ "top_p": 0.8,+ "top_k": 20,+ },+ "rm_url": "http://127.0.0.1:8000",+++ "rm_input_form": "",+ "timeout_sec": 120,+++ "dump_candidates": False,+++ "fallback_to_greedy": True,+++ "rm_batch": {+ "max_items": 4,+ "max_wait_ms": 50,+ },+++ "force_score": False,+++ "rm_anchor_min_side": None,+++ "adaptive": {+ "enabled": False,+++ "tau": 0.98,++ "n_max": None,+++ "rounds": [],+++ "seed_base": 20260918,+ },+ },+ "logging": {+ "level": "INFO",+ "progress_log_every": 20,+ },+}+++ALLOWED_FILE_SUFFIXES = {".pdf", ".png", ".jpg", ".jpeg", ".bmp", ".webp", ".tif", ".tiff"}+++REQUIRED_TTS_SAMPLING_KEYS = ("temperature", "top_k", "top_p")+++REQUIRED_ROUND_KEYS = ("temperature", "top_k", "top_p", "min_p")+++LEGACY_LAUNCH_KEYS = (+ "model_path",+ "vllm_python",+ "cuda_home",+ "gpu_id",+ "max_num_batched_tokens",+ "gpu_memory_utilization",+ "llama_server_bin",+ "gguf_model_path",+ "mmproj_path",+ "downsample_mode",+ "n_gpu_layers",+ "ctx_size",+ "host",+ "parallel",+ "ollama_bin",+ "ollama_models_dir",+ "modelfile",+ "extra_args",+ "extra_env",+ "wait_ready",+ "startup_sleep_sec",+ "auto_restart_on_engine_dead",+ "max_restart_attempts_per_request",+)+++_ENV_REF = re.compile(r"\$\{([A-Za-z_][A-Za-z0-9_]*)(?::-([^}]*))?\}")+++_BUILTIN_REF = re.compile(r"\$\{([A-Za-z_][A-Za-z0-9_]*)\}")++SDK_DIR = Path(__file__).resolve().parent.parent+++def builtin_vars(config_path: Path) -> Dict[str, str]:+ 'Resolve SDK, configuration, working, and asset directory variables.'+ return {+ "SDK_DIR": str(SDK_DIR),+ "CONFIG_DIR": str(config_path.parent),+ "CWD": str(Path.cwd()),+ "ASSETS_DIR": os.environ.get("OCR_ASSETS_DIR", "").strip() or str(SDK_DIR.parent),+ }+++def _expand_builtins(node: Any, builtins: Dict[str, str]) -> Any:+ if isinstance(node, str):+ return _BUILTIN_REF.sub(lambda m: builtins.get(m.group(1), m.group(0)), node)+ if isinstance(node, dict):+ return {k: _expand_builtins(v, builtins) for k, v in node.items()}+ if isinstance(node, list):+ return [_expand_builtins(v, builtins) for v in node]+ return node+++def _expand_env_str(value: str, key_path: str) -> str:+ def _replace(match: re.Match) -> str:+ name, fallback = match.group(1), match.group(2)+ if name in os.environ:+ return os.environ[name]+ if fallback is not None:+ return fallback+ raise ValueError(+ "config '{}' references undefined environment variable ${{{}}}; "+ "export it or give a fallback as ${{{}:-default}}".format(key_path, name, name)+ )++ return _ENV_REF.sub(_replace, value)+++def _expand_env(node: Any, key_path: str = "") -> Any:+ if isinstance(node, str):+ return _expand_env_str(node, key_path or "<root>")+ if isinstance(node, dict):+ return {k: _expand_env(v, "{}.{}".format(key_path, k) if key_path else str(k)) for k, v in node.items()}+ if isinstance(node, list):+ return [_expand_env(v, "{}[{}]".format(key_path, i)) for i, v in enumerate(node)]+ return node+++def _deep_merge(base: Dict[str, Any], override: Dict[str, Any]) -> Dict[str, Any]:+ out = deepcopy(base)+ for key, value in (override or {}).items():+ if isinstance(value, dict) and isinstance(out.get(key), dict):+ out[key] = _deep_merge(out[key], value)+ else:+ out[key] = value+ return out+++def _resolve_path(base_dir: Path, value: str) -> str:+ if not value:+ return ""+ p = Path(value)+ if p.is_absolute():+ return str(p)+ return str((base_dir / p).resolve())+++def _validate_tts_sampling(cfg: Dict[str, Any], raw: Dict[str, Any]) -> None:++ if not (cfg.get("tts") or {}).get("enabled"):+ return++ written = (raw.get("tts") or {}).get("sampling")+ written = written if isinstance(written, dict) else {}+ missing = [key for key in REQUIRED_TTS_SAMPLING_KEYS if key not in written]+ if missing:+ effective = dict(cfg["decode"])+ effective.update(cfg["tts"].get("sampling") or {})+ inherited = ", ".join(f"{key}={effective[key]!r}" for key in missing)+ raise ValueError(+ "tts.enabled is true but tts.sampling does not set: {}. "+ "tts.sampling overrides the decode section per key, so an unset key "+ "silently inherits one nobody picked for this run (here: {}) -- "+ "with top_k=1 / top_p=0.001 the sampled candidates come back "+ "identical to the greedy one whatever the temperature. "+ "Set them explicitly (vLLM disables the cutoffs at top_k: 0 / "+ "top_p: 1.0, not -1).".format(", ".join(missing), inherited)+ )++ if "seed" not in written:+ LOGGER.warning(+ "tts.sampling has no seed: vLLM then shares one unseeded param set "+ "across the candidates, so this run cannot be replayed or "+ "cross-checked candidate by candidate."+ )++ _validate_adaptive(cfg)+++def _validate_adaptive(cfg: Dict[str, Any]) -> None:++ ad = (cfg.get("tts") or {}).get("adaptive") or {}+ if not ad.get("enabled"):+ return++ rounds = ad.get("rounds")+ if not isinstance(rounds, list) or not rounds:+ raise ValueError(+ "tts.adaptive.enabled 为真但 tts.adaptive.rounds 是空的。"+ "轮次表是自适应重采的全部内容(第 k 轮用什么参数按序号查表),"+ "空表等于没有重采。")++ for idx, spec in enumerate(rounds, start=1):+ if not isinstance(spec, dict):+ raise ValueError("tts.adaptive.rounds[%d] 不是字典:%r" % (idx, spec))+ if idx == 1:+++ if spec.get("greedy") is not True:+ raise ValueError(+ "tts.adaptive.rounds[1] 必须是 {greedy: true}(贪心单候选)。"+ "第 1 轮若也采样,场景②@n=1 就不再等于场景①,"+ "那条逐位机检随之失效,离线复算也失去公共前缀。")+ continue+ if spec.get("prefilled"):+ raise ValueError(+ "tts.adaptive.rounds[%d] 标了 prefilled——先验候选只能顶替第 1 轮。"+ "第 2 轮之后的轮次是采样轮,拿先验文本顶替等于白跑一轮:"+ "该文本第 1 轮已入池,跨轮去重后净增 0 个候选。" % idx)+ if spec.get("greedy"):+ raise ValueError(+ "tts.adaptive.rounds[%d] 标了 greedy——贪心只能是第 1 轮。"+ "第 2 轮之后再来一次贪心会采出与第 1 轮逐字相同的文本,"+ "跨轮去重后该轮净增 0 个候选,白花一次 OCR 调用。" % idx)+ missing = [k for k in REQUIRED_ROUND_KEYS if k not in spec]+ if missing:+ raise ValueError(+ "tts.adaptive.rounds[%d] 没写全 %s。tts.sampling 是覆盖式的,"+ "漏写的键会继承 decode 段的贪心值(top_k=1 / top_p=0.001),"+ "于是这一轮无论 temperature 设多少都采回与贪心相同的文本——"+ "而且不报错。" % (idx, ", ".join(missing)))+ if "n" not in spec:+ raise ValueError(+ "tts.adaptive.rounds[%d] 没写 n(本轮采几个候选)。" % idx)++ n_max = ad.get("n_max")+ if n_max is not None:+ if not isinstance(n_max, int) or n_max < 1:+ raise ValueError("tts.adaptive.n_max 须为 >=1 的整数或 null,实得 %r" % (n_max,))+ if n_max > len(rounds):+ raise ValueError(+ "tts.adaptive.n_max=%d 超过轮次表长度 %d:第 %d 轮没有参数可查。"+ % (n_max, len(rounds), len(rounds) + 1))++ tau = ad.get("tau")+ if not isinstance(tau, (int, float)) or not 0.0 <= float(tau) <= 1.0:+ raise ValueError("tts.adaptive.tau 须为 [0,1] 内的数,实得 %r" % (tau,))+++def _validate_config(cfg: Dict[str, Any], raw: Dict[str, Any] | None = None) -> None:+ cfg["engine"]["backend"] = normalize_backend_name(cfg["engine"]["type"])+ validate_engine_config(cfg["engine"])++ input_cfg = cfg["input"]+ has_any_input = bool(input_cfg.get("image_dir") or input_cfg.get("files_dir") or input_cfg.get("file_path"))+ if not has_any_input:+ raise ValueError("At least one of input.image_dir / input.files_dir / input.file_path is required")++ if input_cfg.get("image_dir") and not Path(input_cfg["image_dir"]).exists():+ raise FileNotFoundError(f"input.image_dir not found: {input_cfg['image_dir']}")+ if input_cfg.get("files_dir") and not Path(input_cfg["files_dir"]).exists():+ raise FileNotFoundError(f"input.files_dir not found: {input_cfg['files_dir']}")+ if input_cfg.get("file_path"):+ file_path = Path(input_cfg["file_path"])+ if not file_path.exists():+ raise FileNotFoundError(f"input.file_path not found: {input_cfg['file_path']}")+ if file_path.suffix.lower() not in ALLOWED_FILE_SUFFIXES:+ raise ValueError(f"Unsupported input.file_path suffix: {file_path.suffix}")++ if not cfg["layout"].get("enabled", True):+ raise ValueError("layout.enabled must be true in SDK core pipeline")++ skip_labels = cfg["layout"].get("skip_vlm_labels")+ if skip_labels is not None:+ if isinstance(skip_labels, str) or not isinstance(skip_labels, (list, tuple, set)):+ raise ValueError(+ "layout.skip_vlm_labels must be a list of label names (or null to derive it "+ "from use_chart_recognition / use_seal_recognition / use_ocr_for_image_block), "+ "got %r" % (skip_labels,)+ )+ cleaned = [str(x).strip() for x in skip_labels if str(x).strip()]+++ cfg["layout"]["skip_vlm_labels"] = sorted(set(cleaned))++ layout_cls = resolve_layout_provider_class(cfg["layout"])+ cfg["layout"]["provider"] = normalize_layout_provider(cfg["layout"]["provider"])+ layout_cls.validate_config(cfg["layout"])++ server_urls = cfg["engine"].get("server_urls") or []+ cfg["engine"]["server_urls"] = [u.strip() for u in server_urls if isinstance(u, str) and u.strip()]++ if int(cfg["pipeline"].get("max_workers", 1) or 1) <= 0:+ raise ValueError("pipeline.max_workers must be >= 1")+ if int(cfg["pipeline"].get("page_workers", 1) or 1) <= 0:+ raise ValueError("pipeline.page_workers must be >= 1")+++ _validate_tts_sampling(cfg, cfg if raw is None else raw)+++def load_config(config_path: str, overrides: Dict[str, Any] | None = None) -> Dict[str, Any]:+ path = Path(config_path).resolve()+ with path.open("r", encoding="utf-8") as f:+ raw = yaml.safe_load(f) or {}++ if overrides:+ raw = _deep_merge(raw, overrides)++ raw = _expand_env(_expand_builtins(raw, builtin_vars(path)))+ ignored_engine_keys = sorted(k for k in LEGACY_LAUNCH_KEYS if k in (raw.get("engine") or {}))+ cfg = _deep_merge(DEFAULT_CONFIG, raw)+ base_dir = path.parent++ if not cfg["run"].get("run_tag"):+ cfg["run"]["run_tag"] = f"minicpmvocr_{datetime.now().strftime('%Y%m%d_%H%M%S')}"+ cfg["run"]["run_root"] = _resolve_path(base_dir, cfg["run"]["run_root"])++ cfg["input"]["manifest"] = _resolve_path(base_dir, cfg["input"].get("manifest", ""))+ cfg["input"]["file_path"] = _resolve_path(base_dir, cfg["input"].get("file_path", ""))+ cfg["input"]["image_dir"] = _resolve_path(base_dir, cfg["input"].get("image_dir", ""))+ cfg["input"]["files_dir"] = _resolve_path(base_dir, cfg["input"].get("files_dir", ""))++ cfg["prompt"]["prompt_map"] = _resolve_path(base_dir, cfg["prompt"].get("prompt_map", ""))+ cfg["layout"]["model_dir"] = _resolve_path(base_dir, cfg["layout"].get("model_dir", ""))++ run_dir = Path(cfg["run"]["run_root"]) / cfg["run"]["run_tag"]+ runtime_intermediate_dir = run_dir / "runtime" / "intermediate"+ cfg["_meta"] = {+ "config_path": str(path),+ "run_dir": str(run_dir),+ "runtime_dir": str(run_dir / "runtime"),+ "runtime_intermediate_dir": str(runtime_intermediate_dir),+ "output_dir": str(run_dir / "output"),+ "result_json_dir": str(run_dir / "results_json"),+ "log_dir": str(run_dir / "logs"),+ "active_intermediate_dir": str(runtime_intermediate_dir),++ "ignored_engine_keys": ignored_engine_keys,+ }++ _validate_config(cfg, raw)+ return cfgdiff --git a/sdk/minicpmvocr/configs/minicpmvocr.yaml b/sdk/minicpmvocr/configs/minicpmvocr.yamlnew file mode 100644index 0000000..86aa1a9--- /dev/null+++ b/sdk/minicpmvocr/configs/minicpmvocr.yaml@@ -0,0 +1,162 @@+run:+ run_tag: ''+ run_root: ${OCR_RUN_ROOT:-${CWD}/runs}++ mode: full+ seed: 42+++input:+ manifest: ''+ file_path: ''+ image_dir: ''+ files_dir: ${OCR_INPUT_DIR:-}+ limit: 0+++engine:++ type: vllm+ model_name: ${OCR_SERVED_NAME:-}+++ server_urls: []+ server_url: ${VLLM_URL:-}+ port: 0+++ api_key: ''+ api_style: ''+ chat_path: ''+ health_path: ''+ extra_headers: {}+ extra_body: {}+ startup_timeout_sec: 1800+ request_timeout_sec: 300+ request_ready_timeout_sec: 600+ request_retry_interval_sec: 2++ max_model_len: 16384+ prompt_reserve_tokens: 512++ num_ctx: 8192+ keep_alive: ''+ extra_options: {}+++upright:+ enabled: false+ doc_gate: true+ gate_min_side: 500+ gate_min_lines: 6+ min_apply_deg: 0.3+ cls_long_side: 1600+ orientation_confirm: true+ vote_lines: 12+ vote_min_lines: 5+ vote_axis_margin: 1.5+ vote_flip_majority: 0.75+++ model_dir: ${OCR_UPRIGHT_DIR:-${ASSETS_DIR}/paddle_upright}/PP-LCNet_x1_0_doc_ori+ det_model_dir: ${OCR_UPRIGHT_DIR:-${ASSETS_DIR}/paddle_upright}/PP-OCRv5_mobile_det+ textline_model_dir: ${OCR_UPRIGHT_DIR:-${ASSETS_DIR}/paddle_upright}/PP-LCNet_x1_0_textline_ori++layout:+ enabled: true+++ provider: ppdoclayout3_paddlex+ model_dir: ${OCR_LAYOUT_MODEL_DIR:-${ASSETS_DIR}/PP-DocLayoutV3}+ device: ${OCR_LAYOUT_DEVICE:-cuda}++ threshold: 0.3+ nms: true+++ use_chart_recognition: true+ use_seal_recognition: true+ use_ocr_for_image_block: false+++pipeline:+++ queue_mode: concurrent+++ max_workers: 32+ page_workers: 1+ page_maxsize: 0+ region_maxsize: 0+++ overlap_layout: false+++ layout_workers: 1+++ save_crops: false+++ save_pages: false++ render_workers: 0+++ merge_cross_page_tables: false+++mm:+++ downsample_mode: 4x+++ max_slice_nums: 9+ image_limit: 36++prompt:+++ override_mode: legacy+ prompt_map: ''+++decode:+ temperature: 0.01+ top_p: 0.001+ top_k: 1+ repetition_penalty: 1.0+ no_repeat_ngram_size: 100+ max_tokens_map: {}++logging:+ level: INFO+ progress_log_every: 20+++tts:+ enabled: false+ n: 4+ sampling:+ temperature: 0.7+ top_p: 0.8+ top_k: 20+ rm_url: http://127.0.0.1:8000+ rm_input_form: ''+ timeout_sec: 120+ dump_candidates: false+ fallback_to_greedy: true+ rm_batch:+ max_items: 4+ max_wait_ms: 50+ force_score: false+ rm_anchor_min_side: null+ adaptive:+ enabled: false+ tau: 0.98+ n_max: null+ rounds: []+ seed_base: 20260918diff --git a/sdk/minicpmvocr/constants.py b/sdk/minicpmvocr/constants.pynew file mode 100644index 0000000..32f8d50--- /dev/null+++ b/sdk/minicpmvocr/constants.py@@ -0,0 +1,55 @@+from __future__ import annotations++from typing import Dict, List, Set, Tuple+++MODEL_NAME = "PP-DocLayoutV3"+++PX_LABELS: List[str] = [+ "abstract", "algorithm", "aside_text", "chart", "content",+ "display_formula", "doc_title", "figure_title", "footer",+ "footer_image", "footnote", "formula_number", "header",+ "header_image", "image", "inline_formula", "number",+ "paragraph_title", "reference", "reference_content", "seal",+ "table", "text", "vertical_text", "vision_footnote",+]+++MERGE_BBOXES_MODE: Dict[int, str] = {+ 3: "large",+ 5: "large",+ 6: "large",+ 15: "large",+ 17: "large",+}+++NON_MERGE_LABELS: List[str] = [+ "image", "header_image", "footer_image", "chart", "seal", "table",+]+++LAYOUT_SHAPE_MODE = "auto"+++IMAGE_LABELS: Tuple[str, ...] = ("image", "header_image", "footer_image")+++PARAMS_FILENAME = "inference.pdiparams"+CONFIG_FILENAME = "inference.yml"+++SUPPORTED_IMAGE_SUFFIXES: Set[str] = {+ ".png", ".jpg", ".jpeg", ".bmp", ".webp", ".tif", ".tiff",+}+SUPPORTED_INPUT_SUFFIXES: Set[str] = SUPPORTED_IMAGE_SUFFIXES | {".pdf"}+++OTSL_LABELS: Set[str] = {"table", "chart"}+++PDF_RENDER_ZOOM = 2.0+++PDF_RENDER_PAGES_PER_JOB = 16diff --git a/sdk/minicpmvocr/layouts/__init__.py b/sdk/minicpmvocr/layouts/__init__.pynew file mode 100644index 0000000..7d6dbb3--- /dev/null+++ b/sdk/minicpmvocr/layouts/__init__.py@@ -0,0 +1,108 @@+from __future__ import annotations++import importlib+from typing import Dict, List, Type++from .base import (+ BaseLayoutDetector,+ LayoutError,+ DEFAULT_SKIP_VLM_LABELS,+ IMAGE_LABELS,+ resolve_skip_vlm_labels,+)++_DETECTORS = {+ "ppdoclayout3_paddlex": ("ppdoclayout3_paddlex", "PPDocLayoutV3PaddleXDetector"),+ "ppdoclayout3_server": ("ppdoclayout3_server", "PPDocLayoutV3ServerDetector"),+ "ppdoclayout3_torch": ("ppdoclayout3_torch", "PPDocLayoutV3TorchDetector"),+}+++def _load_detector(provider: str) -> Type[BaseLayoutDetector]:+ module_name, class_name = _DETECTORS[provider]+ module = importlib.import_module(f".{module_name}", __package__)+ return getattr(module, class_name)+++class _DetectorRegistry(dict):+ def __getitem__(self, provider: str) -> Type[BaseLayoutDetector]:+ detector = super().__getitem__(provider)+ if detector is None:+ detector = _load_detector(provider)+ super().__setitem__(provider, detector)+ return detector++ def get(self, provider: str, default=None):+ return self[provider] if provider in self else default+++LAYOUT_REGISTRY: Dict[str, Type[BaseLayoutDetector]] = _DetectorRegistry(+ {provider: None for provider in _DETECTORS}+)++LAYOUT_ALIASES: Dict[str, str] = {+ "paddlex": "ppdoclayout3_paddlex",+ "paddle": "ppdoclayout3_paddlex",+ "ppdoclayout3": "ppdoclayout3_paddlex",+ "ppdoclayoutv3": "ppdoclayout3_paddlex",+ "pp-doclayoutv3": "ppdoclayout3_paddlex",+ "ppdoclayoutv3_paddlex": "ppdoclayout3_paddlex",+ "ppdoclayout3_server": "ppdoclayout3_server",+ "server": "ppdoclayout3_server",+ "layout_server": "ppdoclayout3_server",+ "ppdoclayout3-torch": "ppdoclayout3_torch",+ "ppdoclayout3_torch": "ppdoclayout3_torch",+ "ppdoclayout3-t": "ppdoclayout3_torch",+ "torch": "ppdoclayout3_torch",+ "torch_layout": "ppdoclayout3_torch",+}+++def list_layout_providers() -> List[str]:+ return sorted(LAYOUT_REGISTRY)+++def normalize_layout_provider(provider: str) -> str:+ key = str(provider or "").strip().lower()+ key = LAYOUT_ALIASES.get(key, key)+ if key not in LAYOUT_REGISTRY:+ raise ValueError(+ "Unsupported layout.provider: {!r}. Available providers: {} (aliases: {})".format(+ provider, ", ".join(list_layout_providers()), ", ".join(sorted(LAYOUT_ALIASES))+ )+ )+ return key+++def resolve_layout_provider_class(layout_cfg: Dict) -> Type[BaseLayoutDetector]:+ return LAYOUT_REGISTRY[normalize_layout_provider(layout_cfg.get("provider", ""))]+++def create_layout_detector(layout_cfg: Dict) -> BaseLayoutDetector:+ return resolve_layout_provider_class(layout_cfg)(layout_cfg)+++def __getattr__(name: str):+ for module_name, class_name in _DETECTORS.values():+ if name == class_name:+ module = importlib.import_module(f".{module_name}", __package__)+ return getattr(module, class_name)+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")+++__all__ = [+ "DEFAULT_SKIP_VLM_LABELS",+ "IMAGE_LABELS",+ "resolve_skip_vlm_labels",+ "LAYOUT_ALIASES",+ "LAYOUT_REGISTRY",+ "BaseLayoutDetector",+ "LayoutError",+ "PPDocLayoutV3PaddleXDetector",+ "PPDocLayoutV3ServerDetector",+ "PPDocLayoutV3TorchDetector",+ "create_layout_detector",+ "list_layout_providers",+ "normalize_layout_provider",+ "resolve_layout_provider_class",+]diff --git a/sdk/minicpmvocr/layouts/base.py b/sdk/minicpmvocr/layouts/base.pynew file mode 100644index 0000000..a77fe07--- /dev/null+++ b/sdk/minicpmvocr/layouts/base.py@@ -0,0 +1,155 @@+from __future__ import annotations++import time+from abc import ABC, abstractmethod+from typing import Dict, List, Sequence++import numpy as np+++class LayoutError(RuntimeError):+ pass+++from ..constants import IMAGE_LABELS # noqa: E402+++DEFAULT_SKIP_VLM_LABELS = IMAGE_LABELS + ("chart", "seal")+++def resolve_skip_vlm_labels(layout_cfg: Dict | None) -> frozenset:+ 'The one rule for deciding which labels never reach the VLM.'+ cfg = layout_cfg or {}+ configured = cfg.get("skip_vlm_labels")+ if configured is not None:+ return frozenset(configured)++ labels = set() if cfg.get("use_ocr_for_image_block") else set(IMAGE_LABELS)+ if not cfg.get("use_chart_recognition"):+ labels.add("chart")+ if not cfg.get("use_seal_recognition"):+ labels.add("seal")+ return frozenset(labels)+++class BaseLayoutDetector(ABC):+ """A layout detector plugged into the `parse-layout` stage.++ The contract is plain data, deliberately independent of any framework's+ output format. `detect()` takes PIL images and returns, per image, the+ detections in reading order:++ {+ "index": int, # detection index within the page+ "label": str, # raw class name, already resolved+ "class_id": int, # numeric class id, kept for raw artifacts+ "score": float, # confidence+ "bbox": [x1, y1, x2, y2], # pixel coords in the input image+ "polygon": [[x, y], ...], # optional, [] when unavailable+ }++ `crop()` turns one page's detections into the blocks the OCR stage+ consumes, still in reading order:++ {+ "label": str,+ "class_id": int,+ "score": float,+ "bbox": [x1, y1, x2, y2], # int pixel coords+ "image": np.ndarray | None, # RGB crop; None = folded into the+ # previous block's image+ "polygon": [[x, y], ...],+ "skip_vlm": bool, # crop is kept but never sent to the VLM+ }++ Coordinates stay in input-image pixels rather than a normalized 0-1000+ range because the pipeline crops straight from those coordinates; rounding+ through a normalized form would shift crop edges and change OCR output.+ """++ name = "base"++ def __init__(self, config: Dict):+ self.config = config+++ self.skip_vlm_labels = resolve_skip_vlm_labels(config)+ self.device = "cpu"+ self.model_load_sec = 0.0+ self._started = False++ def start(self) -> None:+ if self._started:+ return+ started = time.time()+ self._start()+ self.model_load_sec = time.time() - started+ self._started = True++ def stop(self) -> None:+ return None++ @abstractmethod+ def _start(self) -> None:+ pass++ @abstractmethod+ def detect(self, images: Sequence) -> List[List[Dict]]:+ 'Batch-detect layout regions. One result list per input image.'++ def crop(self, image, detections: Sequence[Dict]) -> List[Dict]:+ 'Rectangle crop, one block per detection. Providers override to filter / mask / merge before cropping.'+ width, height = image.size+ pixels = np.asarray(image)+ blocks: List[Dict] = []+ for detection in detections:+ x1, y1, x2, y2 = clamp_bbox(detection["bbox"], width, height)+ blocks.append(+ {+ "label": detection["label"],+ "class_id": int(detection["class_id"]),+ "score": float(detection["score"]),+ "bbox": [x1, y1, x2, y2],+ "image": pixels[y1:y2, x1:x2].copy(),+ "polygon": list(detection.get("polygon") or []),+ "skip_vlm": detection["label"] in self.skip_vlm_labels,+ }+ )+ return blocks++ def model_ref(self) -> str:+ 'Human-readable pointer to the loaded weights, recorded in run summaries.'+ return ""++ def describe(self) -> Dict:+ return {+ "provider": self.name,+ "device": self.device,+ "model_ref": self.model_ref(),+ "model_load_sec": round(self.model_load_sec, 6),+ }++ @staticmethod+ def validate_config(layout_cfg: Dict) -> None:+ 'Optional per-provider config validation hook, called by config loading.'+ return None+++def clamp_bbox(bbox: Sequence[float], width: int, height: int) -> List[int]:+ 'Round to int pixels and keep at least a 1x1 box inside the image.'+ x1 = max(0, min(width - 1, int(round(float(bbox[0])))))+ y1 = max(0, min(height - 1, int(round(float(bbox[1])))))+ x2 = max(x1 + 1, min(width, int(round(float(bbox[2])))))+ y2 = max(y1 + 1, min(height, int(round(float(bbox[3])))))+ return [x1, y1, x2, y2]+++def polygon_to_list(polygon) -> List[List[float]]:+ if polygon is None:+ return []+ points = polygon.tolist() if hasattr(polygon, "tolist") else list(polygon)+ out: List[List[float]] = []+ for point in points:+ if isinstance(point, (list, tuple)) and len(point) >= 2:+ out.append([float(point[0]), float(point[1])])+ return outdiff --git a/sdk/minicpmvocr/layouts/download.py b/sdk/minicpmvocr/layouts/download.pynew file mode 100644index 0000000..e98e584--- /dev/null+++ b/sdk/minicpmvocr/layouts/download.py@@ -0,0 +1,153 @@+from contextlib import contextmanager+import hashlib+import json+import os+from pathlib import Path, PurePosixPath+import shutil+import sys+import tarfile+import tempfile++import requests+import yaml++from ..constants import CONFIG_FILENAME, MODEL_NAME, PARAMS_FILENAME+++LAYOUT_MODEL_URL = (+ "https://paddle-model-ecology.bj.bcebos.com/paddlex/official_inference_model/"+ "paddle3.0.0/PP-DocLayoutV3_infer.tar"+)+LAYOUT_MODEL_SHA256 = "98b9bac88c80f6bc0fda7e0bfc2cae180020371c0b2edbb1eb498a70ace751b1"+MODEL_FILES = (PARAMS_FILENAME, "inference.json", CONFIG_FILENAME)+_INSTALL_MARKER = ".minicpmvocr-installing"+++def layout_model_ready(directory: Path) -> bool:+ return not (directory / _INSTALL_MARKER).exists() and all(+ (directory / name).is_file() and (directory / name).stat().st_size > 0+ for name in MODEL_FILES+ )+++@contextmanager+def _model_lock(path: Path):+ with path.open("a+b") as handle:+ if os.name == "nt":+ import msvcrt++ if handle.tell() == 0:+ handle.write(b"\0")+ handle.flush()+ handle.seek(0)+ msvcrt.locking(handle.fileno(), msvcrt.LK_LOCK, 1)+ try:+ yield+ finally:+ handle.seek(0)+ msvcrt.locking(handle.fileno(), msvcrt.LK_UNLCK, 1)+ else:+ import fcntl++ fcntl.flock(handle.fileno(), fcntl.LOCK_EX)+ try:+ yield+ finally:+ fcntl.flock(handle.fileno(), fcntl.LOCK_UN)+++def _download_archive(archive: Path) -> str:+ checksum = hashlib.sha256()+ downloaded = 0+ try:+ with requests.get(LAYOUT_MODEL_URL, stream=True, timeout=(10, 120)) as response:+ response.raise_for_status()+ with archive.open("wb") as handle:+ for chunk in response.iter_content(chunk_size=1024 * 1024):+ if chunk:+ handle.write(chunk)+ checksum.update(chunk)+ downloaded += len(chunk)+ expected_size = response.headers.get("Content-Length")+ if expected_size is not None and downloaded != int(expected_size):+ raise OSError("Incomplete PP-DocLayoutV3 download; run the command again to retry")+ except requests.RequestException as exc:+ raise OSError(f"Cannot download PP-DocLayoutV3 from {LAYOUT_MODEL_URL}: {exc}") from exc+ digest = checksum.hexdigest()+ if LAYOUT_MODEL_SHA256 and digest != LAYOUT_MODEL_SHA256:+ raise OSError("PP-DocLayoutV3 archive checksum mismatch; existing model files were preserved")+ return digest+++def _unpack_model(archive: Path, destination: Path) -> None:+ found = set()+ try:+ with tarfile.open(archive) as source:+ for member in source:+ path = PurePosixPath(member.name)+ if path.is_absolute() or ".." in path.parts or "\\" in member.name:+ raise OSError("Unsafe path in PP-DocLayoutV3 model archive")+ if not member.isfile() and not member.isdir():+ raise OSError("Unsupported entry in PP-DocLayoutV3 model archive")+ parts = path.parts+ if len(parts) == 2 and parts[0] == "PP-DocLayoutV3_infer":+ name = parts[1]+ elif len(parts) == 1:+ name = parts[0]+ else:+ continue+ if name not in MODEL_FILES or member.isdir():+ continue+ if name in found or member.size <= 0:+ raise OSError(f"Invalid model file in PP-DocLayoutV3 archive: {name}")+ found.add(name)+ with source.extractfile(member) as incoming, (destination / name).open("wb") as outgoing:+ shutil.copyfileobj(incoming, outgoing)+ except tarfile.TarError as exc:+ raise OSError("Invalid PP-DocLayoutV3 model archive") from exc+ if found != set(MODEL_FILES):+ raise OSError("PP-DocLayoutV3 archive is missing required inference files")+ try:+ config = yaml.safe_load((destination / CONFIG_FILENAME).read_text(encoding="utf-8")) or {}+ if (config.get("Global") or {}).get("model_name") != MODEL_NAME:+ raise OSError("Downloaded layout model is not PP-DocLayoutV3")+ with (destination / "inference.json").open(encoding="utf-8") as handle:+ json.load(handle)+ except (yaml.YAMLError, ValueError, AttributeError) as exc:+ raise OSError("Invalid PP-DocLayoutV3 inference configuration") from exc+++def ensure_layout_model(directory: Path) -> Path:+ """Reuse or install the official PP-DocLayoutV3 Paddle inference model."""+ directory = directory.expanduser().resolve()+ if directory.exists() and not directory.is_dir():+ raise NotADirectoryError(f"Layout model path is not a directory: {directory}")+ if layout_model_ready(directory):+ return directory+ directory.parent.mkdir(parents=True, exist_ok=True)+ with _model_lock(directory.parent / f".{directory.name}.lock"):+ if layout_model_ready(directory):+ return directory+ print(f"Downloading PP-DocLayoutV3 layout model to {directory} ...", file=sys.stderr, flush=True)+ with tempfile.TemporaryDirectory(prefix=f".{directory.name}-", dir=directory.parent) as work:+ work = Path(work)+ archive = work / "model.tar"+ digest = _download_archive(archive)+ staged = work / "model"+ staged.mkdir()+ _unpack_model(archive, staged)+ directory.mkdir(exist_ok=True)+ marker = directory / _INSTALL_MARKER+ marker.touch()+ for name in MODEL_FILES:+ os.replace(staged / name, directory / name)+ metadata = {+ "model": MODEL_NAME,+ "source": LAYOUT_MODEL_URL,+ "archive_sha256": digest,+ }+ metadata_path = work / "model-source.json"+ metadata_path.write_text(json.dumps(metadata, indent=2) + "\n", encoding="utf-8")+ os.replace(metadata_path, directory / ".minicpmvocr-model.json")+ marker.unlink()+ return directorydiff --git a/sdk/minicpmvocr/layouts/ppdoclayout3_paddlex.py b/sdk/minicpmvocr/layouts/ppdoclayout3_paddlex.pynew file mode 100644index 0000000..ec5905a--- /dev/null+++ b/sdk/minicpmvocr/layouts/ppdoclayout3_paddlex.py@@ -0,0 +1,167 @@+from __future__ import annotations++from pathlib import Path+from typing import Dict, List, Sequence++import numpy as np++from .base import BaseLayoutDetector, LayoutError, polygon_to_list+++from ..constants import ( # noqa: E402+ CONFIG_FILENAME,+ LAYOUT_SHAPE_MODE,+ MERGE_BBOXES_MODE,+ MODEL_NAME,+ NON_MERGE_LABELS,+ PARAMS_FILENAME,+)+++def read_model_name(model_dir: str) -> str:+ '`Global.model_name` from the Paddle inference dir\'s inference.yml ("" if absent).'+ path = Path(model_dir) / CONFIG_FILENAME+ if not path.is_file():+ return ""+ try:+ import yaml++ data = yaml.safe_load(path.read_text(encoding="utf-8")) or {}+ return str((data.get("Global") or {}).get("model_name") or "").strip()+ except Exception:+ return ""+++def check_model_is_v3(model_dir: str, configured_name: str = "") -> None:+ 'Refuse anything but PP-DocLayoutV3.'+ for source, name in (("layout.model_name", configured_name), (CONFIG_FILENAME, read_model_name(model_dir))):+ name = str(name or "").strip()+ if name and name != MODEL_NAME:+ raise ValueError(+ "layout provider ppdoclayout3_paddlex only supports %s, but %s says %r (model_dir=%s)"+ % (MODEL_NAME, source, name, model_dir)+ )+++def to_paddle_device(device: str) -> str:+ "Translate the SDK's torch-style `layout.device` into PaddleX notation."+ device = str(device or "").strip().lower()+ if not device or device.startswith("cpu"):+ return "cpu"+ if device.startswith(("cuda", "gpu")):+ _, _, index = device.partition(":")+ return "gpu:%s" % (index if index.isdigit() else "0")+ return device+++class PPDocLayoutV3PaddleXDetector(BaseLayoutDetector):+ "PP-DocLayoutV3 through PaddleX, plus PaddleOCR-VL's box filtering, polygon-masked cropping and cross-column text merging."++ name = "ppdoclayout3_paddlex"++ def _start(self) -> None:+ try:+ from paddlex import create_model+ from paddlex.inference.pipelines.components.common.crop_image_regions import CropByBoxes+ from paddlex.inference.pipelines.paddleocr_vl.uilts import filter_overlap_boxes, merge_blocks+ except Exception as e:+ raise LayoutError(+ "provider ppdoclayout3_paddlex needs paddlepaddle + paddlex "+ "(pip install '.[layout]', paddlepaddle-gpu from Paddle's own index). Original error: %s" % e+ ) from e++ self.device = to_paddle_device(self.config.get("device", "cpu"))+ self._model_dir = str(self.config.get("model_dir", "") or "")+ check_model_is_v3(self._model_dir, self.config.get("model_name", ""))+ self._model = create_model(+ model_name=MODEL_NAME,+ model_dir=self._model_dir,+ device=self.device,+ threshold=float(self.config.get("threshold", 0.3)),+ layout_nms=bool(self.config.get("nms", True)),+ layout_merge_bboxes_mode=dict(MERGE_BBOXES_MODE),+ )+ self._crop_by_boxes = CropByBoxes()+ self._filter_overlap_boxes = filter_overlap_boxes+ self._merge_blocks = merge_blocks++ def detect(self, images: Sequence) -> List[List[Dict]]:+ return [self._detect_one(image) for image in images]++ def _detect_one(self, image) -> List[Dict]:+++ results = list(+ self._model.predict(+ np.asarray(image.convert("RGB")),+ batch_size=1,+ layout_shape_mode=LAYOUT_SHAPE_MODE,+ filter_overlap_boxes=False,+ )+ )+ boxes = list(results[0].get("boxes", [])) if results else []+ return [+ {+ "index": index,+ "label": str(box["label"]),+ "class_id": int(box["cls_id"]),+ "score": float(box["score"]),+ "bbox": [float(v) for v in box["coordinate"]],+ "polygon": polygon_to_list(box.get("polygon_points")),+ }+ for index, box in enumerate(boxes)+ ]++ def crop(self, image, detections: Sequence[Dict]) -> List[Dict]:+ boxes = []+ for d in detections:+ box = {+ "cls_id": int(d["class_id"]),+ "label": d["label"],+ "score": float(d["score"]),+ "coordinate": [float(v) for v in d["bbox"]],+ }++ if d.get("polygon"):+ box["polygon_points"] = np.asarray(d["polygon"], dtype=np.float64).reshape(-1, 2)+ boxes.append(box)+ boxes = self._filter_overlap_boxes({"boxes": boxes}, LAYOUT_SHAPE_MODE)["boxes"] if boxes else []+++ meta_by_box = {tuple(b["coordinate"]): (b["cls_id"], b["score"]) for b in boxes}+ cropped = self._crop_by_boxes(np.asarray(image.convert("RGB")), boxes, LAYOUT_SHAPE_MODE) if boxes else []+ merged = self._merge_blocks(cropped, non_merge_labels=NON_MERGE_LABELS, layout_shape_mode=LAYOUT_SHAPE_MODE)++ blocks: List[Dict] = []+ for block in merged:+ label = str(block["label"])+ class_id, score = meta_by_box.get(tuple(float(v) for v in block["box"]), (-1, 0.0))+ blocks.append(+ {+ "label": label,+ "class_id": class_id,+ "score": score,+ "bbox": [int(round(float(v))) for v in block["box"]],+ "image": block.get("img"),+ "polygon": polygon_to_list(block.get("polygon_points")),+ "skip_vlm": label in self.skip_vlm_labels,+++ "group_id": block.get("group_id"),+ }+ )+ return blocks++ def model_ref(self) -> str:+ return getattr(self, "_model_dir", "") or str(self.config.get("model_dir", "") or "")++ @staticmethod+ def validate_config(layout_cfg: Dict) -> None:+ model_dir = str(layout_cfg.get("model_dir", "") or "").strip()+ if not model_dir:+ raise ValueError("layout.model_dir is required for provider ppdoclayout3_paddlex (Paddle inference dir)")+ if not (Path(model_dir) / PARAMS_FILENAME).is_file():+ raise FileNotFoundError(+ "layout.model_dir is not a Paddle inference dir (missing %s): %s" % (PARAMS_FILENAME, model_dir)+ )+ check_model_is_v3(model_dir, layout_cfg.get("model_name", ""))diff --git a/sdk/minicpmvocr/layouts/ppdoclayout3_server.py b/sdk/minicpmvocr/layouts/ppdoclayout3_server.pynew file mode 100644index 0000000..d1318cd--- /dev/null+++ b/sdk/minicpmvocr/layouts/ppdoclayout3_server.py@@ -0,0 +1,96 @@+from __future__ import annotations++import base64+import io+import json+import time+from typing import Dict, List, Optional, Sequence+from urllib.error import URLError+from urllib.request import Request, urlopen++import numpy as np++from .base import BaseLayoutDetector, LayoutError+++def _image_to_b64(img) -> str:+ from PIL import Image++ if isinstance(img, np.ndarray):+ img = Image.fromarray(img)+ buf = io.BytesIO()+ img.save(buf, format="PNG")+ return base64.b64encode(buf.getvalue()).decode()+++class PPDocLayoutV3ServerDetector(BaseLayoutDetector):+ 'PP-DocLayoutV3 through a local HTTP detection server (pure torch).'++ name = "ppdoclayout3_server"++ def __init__(self, config: Dict):+ super().__init__(config)+ url = str(config.get("server_url", "http://localhost:8110")).rstrip("/")+ if not url.startswith(("http://", "https://")):+ url = "http://" + url+ self._server_url = url+ self._timeout = float(config.get("timeout", 60))++ def _start(self) -> None:+ self.device = "remote"+++ try:+ info = self._http("GET", "/info")+ except Exception:+ info = {}+ self._model_dir = str(info.get("data", {}).get("model_dir", "") or "")++ def detect(self, images: Sequence) -> List[List[Dict]]:+ return [self._detect_one(image) for image in images]++ def _detect_one(self, image) -> List[Dict]:+ payload = json.dumps({"image": _image_to_b64(image)}).encode()+ result = self._http("POST", "/detect", payload)+ boxes = list((result.get("data", {}) or {}).get("boxes", []))+ return [+ {+ "index": idx,+ "label": str(b["label"]),+ "class_id": int(b["class_id"]),+ "score": float(b["score"]),+ "bbox": [float(v) for v in b["bbox"]],+ "polygon": [],+ }+ for idx, b in enumerate(boxes)+ ]++ def crop(self, image, detections: Sequence[Dict]) -> List[Dict]:+ 'Rectangle crop — no server-side merge (use ppdoclayout3_paddlex for the full PaddleOCR-VL filter/merge chain).'+ return super().crop(image, detections)++ def model_ref(self) -> str:+ return self._model_dir+++ def _http(self, method: str, path: str, data: Optional[bytes] = None) -> Dict:+ url = self._server_url + path+ req = Request(url, data=data, method=method)+ req.add_header("Content-Type", "application/json")+ try:+ with urlopen(req, timeout=self._timeout) as resp:+ return json.loads(resp.read().decode())+ except URLError as e:+ raise LayoutError(+ "PP-DocLayoutV3 server unreachable at %s: %s. "+ "Start it with: minicpmvocr serve-layout --model-dir PATH"+ % (self._server_url, e)+ ) from e++ @staticmethod+ def validate_config(layout_cfg: Dict) -> None:+ url = str(layout_cfg.get("server_url", "") or "").strip()+ if not url:+ raise ValueError(+ "layout.server_url is required for provider ppdoclayout3_server"+ )diff --git a/sdk/minicpmvocr/layouts/ppdoclayout3_torch.py b/sdk/minicpmvocr/layouts/ppdoclayout3_torch.pynew file mode 100644index 0000000..3a48b88--- /dev/null+++ b/sdk/minicpmvocr/layouts/ppdoclayout3_torch.py@@ -0,0 +1,857 @@+from __future__ import annotations++import time+from pathlib import Path+from typing import Dict, List, Optional, Sequence, Tuple++import numpy as np+from PIL import Image++from .base import BaseLayoutDetector, LayoutError, polygon_to_list+++from ..constants import ( # noqa: E402+ LAYOUT_SHAPE_MODE,+ MERGE_BBOXES_MODE,+ NON_MERGE_LABELS,+ PX_LABELS,+)+++def _sigmoid_np(x: np.ndarray) -> np.ndarray:+ x = np.clip(x, -50, 50)+ return 1.0 / (1.0 + np.exp(-x))+++def _get_order_np(order_logits: np.ndarray) -> np.ndarray:++ if order_logits.ndim != 2 or order_logits.shape[0] != order_logits.shape[1]:+ raise ValueError(f"order_logits must be (N, N), got {order_logits.shape}")+++ os_np = _sigmoid_np(order_logits.astype(np.float32)).astype(np.float32)+ N = order_logits.shape[0]+ upper = np.triu(os_np, 1)+ lower = np.tril(np.float32(1.0) - os_np.T, -1)+++ votes = upper.sum(axis=0, dtype=np.float32) + lower.sum(axis=0, dtype=np.float32)+ ptrs = np.argsort(votes)+ seq = np.zeros(N, dtype=int)+ seq[ptrs] = np.arange(N)+ return seq+++def _postprocess_7col(+ logits: np.ndarray,+ pred_boxes: np.ndarray,+ order_logits: np.ndarray,+ img_w: int,+ img_h: int,+ topk: int = 300,+) -> np.ndarray:++ num_queries, num_classes = logits.shape++ scores_flat = _sigmoid_np(logits).flatten()+ top_idx = np.argpartition(-scores_flat, min(topk, len(scores_flat)))[:topk]+ top_scores = scores_flat[top_idx]++ sort_idx = np.argsort(-top_scores)+ top_idx = top_idx[sort_idx]+ top_scores = top_scores[sort_idx]++ labels = (top_idx % num_classes).astype(np.float32)+ qidx = top_idx // num_classes+++ cxcy = pred_boxes[:, :2]+ wh = pred_boxes[:, 2:]+ xyxy = np.concatenate([cxcy - 0.5 * wh, cxcy + 0.5 * wh], axis=-1)+ out_shape = np.array([img_w, img_h, img_w, img_h], dtype=np.float32)+ xyxy_scaled = xyxy * out_shape+ top_boxes = xyxy_scaled[qidx]+++ seq = _get_order_np(order_logits)+ order_col = seq[qidx].astype(np.float32)+++ return np.column_stack([+ labels, top_scores,+ top_boxes[:, 0], top_boxes[:, 1], top_boxes[:, 2], top_boxes[:, 3],+ order_col,+ ])+++def _iou_np(b1: np.ndarray, b2: np.ndarray) -> float:+ xi1 = max(b1[2], b2[2]); yi1 = max(b1[3], b2[3])+ xi2 = min(b1[4], b2[4]); yi2 = min(b1[5], b2[5])+ iw = xi2 - xi1 + 1; ih = yi2 - yi1 + 1+ if iw <= 0 or ih <= 0:+ return 0.0+ ia = iw * ih+ a1 = (b1[4] - b1[2] + 1) * (b1[5] - b1[3] + 1)+ a2 = (b2[4] - b2[2] + 1) * (b2[5] - b2[3] + 1)+ return float(ia / (a1 + a2 - ia))+++def _nms_np(boxes: np.ndarray, iou_same: float = 0.6, iou_diff: float = 0.95) -> List[int]:+ idx = np.argsort(-boxes[:, 1])+ sel: List[int] = []+ rem = list(idx)+ while rem:+ c = rem[0]+ sel.append(c)+ cb = boxes[c]+ rem = rem[1:]+ nr = []+ for r in rem:+ rb = boxes[r]+ t = iou_diff if cb[0] != rb[0] else iou_same+ if _iou_np(cb, rb) < t:+ nr.append(r)+ rem = nr+ return sel+++def _is_contained_np(b1: np.ndarray, b2: np.ndarray) -> bool:++ ix1 = max(b1[2], b2[2]); iy1 = max(b1[3], b2[3])+ ix2 = min(b1[4], b2[4]); iy2 = min(b1[5], b2[5])+ iw = max(0, ix2 - ix1); ih = max(0, iy2 - iy1)+ ia = iw * ih+ a1 = (b1[4] - b1[2]) * (b1[5] - b1[3])+ return bool(ia / a1 >= 0.9) if a1 > 0 else False+++def _check_containment_np(+ boxes: np.ndarray,+ formula_idx: Optional[int] = None,+ cat_idx: Optional[int] = None,+ mode: Optional[str] = None,+) -> Tuple[np.ndarray, np.ndarray]:++ n = len(boxes)+ co = np.zeros(n, dtype=int)+ cb_ = np.zeros(n, dtype=int)+ for i in range(n):+ for j in range(n):+ if i == j:+ continue+ if formula_idx is not None and boxes[i][0] == formula_idx and boxes[j][0] != formula_idx:+ continue+ if cat_idx is not None and mode:+ if mode == "large" and boxes[j][0] == cat_idx:+ if _is_contained_np(boxes[i], boxes[j]):+ cb_[i] = 1; co[j] = 1+ elif mode == "small" and boxes[i][0] == cat_idx:+ if _is_contained_np(boxes[i], boxes[j]):+ cb_[i] = 1; co[j] = 1+ else:+ if _is_contained_np(boxes[i], boxes[j]):+ cb_[i] = 1; co[j] = 1+ return co, cb_+++def _layout_analysis_postprocess(+ boxes_7col: np.ndarray,+ img_w: int,+ img_h: int,+ labels: List[str],+ threshold: float = 0.3,+ do_nms: bool = True,+ merge_bboxes_mode: Optional[dict] = None,+) -> List[Dict]:++ boxes = boxes_7col.copy()+ boxes[:, 2:6] = np.round(boxes[:, 2:6]).astype(int)+++ keep = (boxes[:, 1] > threshold) & (boxes[:, 0] > -1)+ boxes = boxes[keep]+ if len(boxes) == 0:+ return []+++ if do_nms:+ sel = _nms_np(boxes[:, :6], iou_same=0.6, iou_diff=0.98)+ boxes = boxes[sel]+ if len(boxes) == 0:+ return []+++ if len(boxes) > 1:+ img_idx = labels.index("image") if "image" in labels else None+ img_area = img_w * img_h+ area_thres = 0.82 if img_w > img_h else 0.93+ filtered = []+ for b in boxes:+ if b[0] == img_idx:+ x1 = int(max(0, b[2])); y1 = int(max(0, b[3]))+ x2 = int(min(img_w, b[4])); y2 = int(min(img_h, b[5]))+ ba = (x2 - x1) * (y2 - y1)+ if ba <= area_thres * img_area:+ filtered.append(b)+ else:+ filtered.append(b)+ if filtered:+ boxes = np.array(filtered, dtype=boxes.dtype)+ if len(boxes) == 0:+ return []+++ if merge_bboxes_mode and len(boxes) >= 2:+ formula_idx = labels.index("formula") if "formula" in labels else None+ if isinstance(merge_bboxes_mode, str):+ if merge_bboxes_mode != "union":+ co, cb = _check_containment_np(boxes[:, :6], formula_idx)+ if merge_bboxes_mode == "large":+ boxes = boxes[cb == 0]+ elif merge_bboxes_mode == "small":+ boxes = boxes[(co == 0) | (cb == 1)]+ elif isinstance(merge_bboxes_mode, dict):+ keep_mask = np.ones(len(boxes), dtype=bool)+ for cat_idx, layout_mode in merge_bboxes_mode.items():+ if layout_mode == "union":+ continue+ co, cb = _check_containment_np(boxes[:, :6], formula_idx, cat_idx, layout_mode)+ if layout_mode == "large":+ keep_mask &= (cb == 0)+ elif layout_mode == "small":+ keep_mask &= (co == 0) | (cb == 1)+ boxes = boxes[keep_mask]+ if len(boxes) == 0:+ return []+++ sorted_idx = np.argsort(boxes[:, 6])+ boxes = boxes[sorted_idx, :6]+++ result: List[Dict] = []+ for b in boxes:+ xmin = int(max(0, b[2]))+ ymin = int(max(0, b[3]))+ xmax = int(min(img_w, b[4]))+ ymax = int(min(img_h, b[5]))+ if xmax <= xmin or ymax <= ymin:+ continue+ result.append({+ "cls_id": int(b[0]),+ "label": labels[int(b[0])],+ "score": float(b[1]),+ "coordinate": [xmin, ymin, xmax, ymax],+ })+ return result+++try:+ from shapely.geometry import Polygon+ from shapely.validation import make_valid+ _HAS_SHAPELY = True+except ImportError:+ _HAS_SHAPELY = False+++def _bbox_area(bbox: List[float]) -> float:+ return max(0.0, float(bbox[2] - bbox[0]) * float(bbox[3] - bbox[1]))+++def _box_overlap_ratio(b1: List[float], b2: List[float], mode: str = "union") -> float:+ x1, y1, x2, y2 = max(b1[0], b2[0]), max(b1[1], b2[1]), min(b1[2], b2[2]), min(b1[3], b2[3])+ iw, ih = max(0.0, x2 - x1), max(0.0, y2 - y1)+ iarea = iw * ih+ a1, a2 = _bbox_area(b1), _bbox_area(b2)+ if mode == "union":+ ref = a1 + a2 - iarea+ elif mode == "small":+ ref = min(a1, a2)+ else:+ ref = max(a1, a2)+ return float(iarea / ref) if ref > 0 else 0.0+++def _polygon_overlap_ratio(poly1, poly2, mode: str = "small") -> float:+ if not _HAS_SHAPELY or not poly1 or not poly2:+ return 0.0+ try:+ p1 = make_valid(Polygon(poly1))+ p2 = make_valid(Polygon(poly2))+ inter = p1.intersection(p2).area+ if mode == "union":+ ref = p1.union(p2).area+ elif mode == "small":+ ref = min(p1.area, p2.area)+ else:+ ref = max(p1.area, p2.area)+ return float(inter / ref) if ref > 0 else 0.0+ except Exception:+ return 0.0+++def _compute_pairwise_overlap(coords: np.ndarray) -> Tuple[np.ndarray, np.ndarray]:+ x1, y1, x2, y2 = coords[:, 0], coords[:, 1], coords[:, 2], coords[:, 3]+ areas = np.abs((x2 - x1) * (y2 - y1))+ ix1 = np.maximum(x1[:, None], x1[None, :])+ iy1 = np.maximum(y1[:, None], y1[None, :])+ ix2 = np.minimum(x2[:, None], x2[None, :])+ iy2 = np.minimum(y2[:, None], y2[None, :])+ iw = np.maximum(0, ix2 - ix1)+ ih = np.maximum(0, iy2 - iy1)+ ia = iw * ih+ sa = np.minimum(areas[:, None], areas[None, :])+ with np.errstate(divide="ignore", invalid="ignore"):+ overlap = np.where(sa > 0, ia / sa, 0.0)+ return overlap, areas+++def _filter_overlap_boxes(+ boxes: List[Dict], layout_shape_mode: str = "auto"+) -> List[Dict]:++ boxes = [b for b in boxes if b.get("label") != "reference"]+ if not boxes:+ return boxes++ coords = np.array([b["coordinate"] for b in boxes], dtype=np.float64)+ widths = coords[:, 2] - coords[:, 0]+ heights = coords[:, 3] - coords[:, 1]+ overlap_matrix, areas = _compute_pairwise_overlap(coords)++ dropped = set()+ for i in range(len(boxes)):+ if widths[i] < 6 or heights[i] < 6:+ dropped.add(i)+ continue+ for j in range(i + 1, len(boxes)):+ if i in dropped or j in dropped:+ continue+ ratio = overlap_matrix[i, j]+ li = boxes[i]["label"]+ lj = boxes[j]["label"]+ if li == "inline_formula" or lj == "inline_formula":+ if ratio > 0.5:+ if li == "inline_formula":+ dropped.add(i)+ if lj == "inline_formula":+ dropped.add(j)+ continue+ if ratio > 0.7:+ if (+ layout_shape_mode != "rect"+ and "polygon_points" in boxes[i]+ and boxes[i]["polygon_points"] is not None+ and len(boxes[i]["polygon_points"]) > 0+ ):+ pr = _polygon_overlap_ratio(+ boxes[i]["polygon_points"],+ boxes[j]["polygon_points"],+ "small",+ )+ if pr > 0.9:+ if areas[i] >= areas[j]:+ dropped.add(j)+ else:+ dropped.add(i)+ else:+ if areas[i] >= areas[j]:+ dropped.add(j)+ else:+ dropped.add(i)+ return [b for idx, b in enumerate(boxes) if idx not in dropped]+++def _crop_by_boxes(+ img_rgb: np.ndarray, boxes: List[dict], layout_shape_mode: str = "auto"+) -> List[dict]:++ import cv2++ output: List[dict] = []+ for box_info in boxes:+ box = box_info["coordinate"]+ label = box_info.get("label", str(box_info.get("cls_id", -1)))+ xmin, ymin, xmax, ymax = [int(i) for i in box]+ img_crop = img_rgb[ymin:ymax, xmin:xmax].copy()+ out_info = {"img": img_crop, "box": box, "label": label}+ if layout_shape_mode != "rect" and "polygon_points" in box_info:+ polygon = np.array(box_info["polygon_points"], dtype=np.int32)+ polygon = polygon.reshape((-1, 1, 2))+ if polygon is not None and len(polygon) > 0:+ polygon = polygon - np.array([xmin, ymin])+ mask = np.zeros(img_crop.shape[:2], dtype=np.int32)+ cv2.fillPoly(mask, [polygon], 1)+ img_crop[~mask.astype(bool)] = 255+ out_info["img"] = img_crop+ out_info["polygon_points"] = box_info["polygon_points"]+ output.append(out_info)+ return output+++def _calculate_overlap_ratio(+ bbox1: np.ndarray | list | tuple,+ bbox2: np.ndarray | list | tuple,+ mode: str = "union",+) -> float:+ bbox1 = np.array(bbox1, dtype=np.float64)+ bbox2 = np.array(bbox2, dtype=np.float64)+ x_min_inter = max(bbox1[0], bbox2[0])+ y_min_inter = max(bbox1[1], bbox2[1])+ x_max_inter = min(bbox1[2], bbox2[2])+ y_max_inter = min(bbox1[3], bbox2[3])+ iw = max(0.0, x_max_inter - x_min_inter)+ ih = max(0.0, y_max_inter - y_min_inter)+ ia = iw * ih+ a1 = _bbox_area(bbox1.tolist())+ a2 = _bbox_area(bbox2.tolist())+ if mode == "union":+ ref = a1 + a2 - ia+ elif mode == "small":+ ref = min(a1, a2)+ else:+ ref = max(a1, a2)+ return float(ia / ref) if ref > 0 else 0.0+++def _calculate_projection_overlap_ratio(+ bbox1: List[float], bbox2: List[float],+ direction: str = "horizontal", mode: str = "union",+) -> float:+ si, ei = (0, 2) if direction == "horizontal" else (1, 3)+ overlap = min(bbox1[ei], bbox2[ei]) - max(bbox1[si], bbox2[si])+ if overlap <= 0:+ return 0.0+ if mode == "union":+ ref_w = max(bbox1[ei], bbox2[ei]) - min(bbox1[si], bbox2[si])+ elif mode == "small":+ ref_w = min(bbox1[ei] - bbox1[si], bbox2[ei] - bbox2[si])+ else:+ ref_w = max(bbox1[ei] - bbox1[si], bbox2[ei] - bbox2[si])+ return float(overlap / ref_w) if ref_w > 0 else 0.0+++def _merge_blocks(+ blocks: List[dict], non_merge_labels: List[str],+ layout_shape_mode: str = "auto",+) -> List[dict]:++ if not blocks:+ return blocks++ blocks_to_merge: List[Tuple[int, dict]] = []+ non_merge_blocks: Dict[int, dict] = {}+ for idx, block in enumerate(blocks):+ if block["label"] in non_merge_labels:+ non_merge_blocks[idx] = block+ else:+ blocks_to_merge.append((idx, block))++ merged_groups: List[Tuple[List[int], List[str]]] = []+ current_group: List[dict] = []+ current_indices: List[int] = []+ current_aligns: List[str] = []++ def _is_aligned(a1, a2):+ return abs(a1 - a2) <= 5++ def _get_alignment(bbox, prev_bbox):+ if _is_aligned(bbox[0], prev_bbox[0]):+ return "left"+ elif _is_aligned(bbox[2], prev_bbox[2]):+ return "right"+ return "center"++ def _overlapwith_other_box(bi, pi, blks_list):+ pi_bbox = blks_list[pi]["box"]+ bi_bbox = blks_list[bi]["box"]+ min_box = [+ min(pi_bbox[0], bi_bbox[0]), min(pi_bbox[1], bi_bbox[1]),+ max(pi_bbox[2], bi_bbox[2]), max(pi_bbox[3], bi_bbox[3]),+ ]+ for oi, ob in enumerate(blks_list):+ if oi in (bi, pi) or ob["label"] not in non_merge_labels:+ continue+ if _calculate_overlap_ratio(min_box, ob["box"]) > 0:+ return True+ return False++ for i, (idx, block) in enumerate(blocks_to_merge):+ if not current_group:+ current_group = [block]+ current_indices = [idx]+ current_aligns = []+ continue+ prev_idx, prev_block = blocks_to_merge[i - 1]+ prev_bbox = prev_block["box"]+ prev_label = prev_block["label"]+ block_bbox = block["box"]+ block_label = block["label"]++ iou_h = _calculate_projection_overlap_ratio(block_bbox, prev_bbox, "horizontal")+ is_cross = (+ iou_h == 0+ and block_label == "text"+ and block_label == prev_label+ and block_bbox[0] > prev_bbox[2]+ and block_bbox[1] < prev_bbox[3]+ and (block_bbox[0] - prev_bbox[2])+ < max(prev_bbox[2] - prev_bbox[0], block_bbox[2] - block_bbox[0]) * 0.3+ )+ is_updown_align = (+ iou_h > 0+ and block_label in ["text", "vertical_text"]+ and block_label == prev_label+ and block_bbox[3] >= prev_bbox[1]+ and abs(block_bbox[1] - prev_bbox[3])+ < max(prev_bbox[3] - prev_bbox[1], block_bbox[3] - block_bbox[1]) * 0.5+ and (_is_aligned(block_bbox[0], prev_bbox[0]) ^ _is_aligned(block_bbox[2], prev_bbox[2]))+ and _overlapwith_other_box(idx, prev_idx, blocks)+ )+ if is_cross:+ align_mode = "center"+ elif is_updown_align:+ align_mode = _get_alignment(block_bbox, prev_bbox)+ else:+ align_mode = None++ if is_cross or is_updown_align:+ current_group.append(block)+ current_indices.append(idx)+ current_aligns.append(align_mode)+ else:+ merged_groups.append((current_indices, current_aligns))+ current_group = [block]+ current_indices = [idx]+ current_aligns = []+ if current_group:+ merged_groups.append((current_indices, current_aligns))++ group_ranges = []+ for gidx, aligns in merged_groups:+ start, end = min(gidx), max(gidx)+ group_ranges.append((start, end, gidx, aligns))++ result: List[dict] = []+ used = set()+ idx = 0+ while idx < len(blocks):+ found = False+ for start, end, gidx, aligns in group_ranges:+ if idx == start and all(i not in used for i in gidx):+ found = True+ imgs = [blocks[i]["img"] for i in gidx]+ ma = aligns if aligns else []+ w, h = _calc_merged_wh(imgs)+ if h / w >= 3 if w != 0 else True:+ for j, bi in enumerate(gidx):+ b = blocks[bi].copy()+ b["img"] = blocks[bi]["img"]+ b["merge_aligns"] = None+ result.append(b)+ used.add(bi)+ else:+ merged_img = _merge_images(imgs, ma, layout_shape_mode)+ for j, bi in enumerate(gidx):+ b = blocks[bi].copy()+ b["img"] = merged_img if j == 0 else None+ b["merge_aligns"] = ma if j == 0 else None+ b["group_id"] = gidx[0]+ result.append(b)+ used.add(bi)+ insert_list = [ni for ni in range(start + 1, end) if ni in non_merge_blocks]+ for ni in insert_list:+ result.append(non_merge_blocks[ni])+ used.add(ni)+ idx = end + 1+ break+ if found:+ continue+ if idx in non_merge_blocks and idx not in used:+ result.append(non_merge_blocks[idx])+ used.add(idx)+ idx += 1+ return result+++def _to_pil(img) -> Image.Image:+ if isinstance(img, np.ndarray):+ return Image.fromarray(img)+ return img+++def _to_np(img) -> np.ndarray:+ if isinstance(img, Image.Image):+ return np.array(img)+ return img+++def _calc_merged_wh(images) -> Tuple[int, int]:+ w = max(_to_pil(im).width for im in images)+ h = sum(_to_pil(im).height for im in images)+ return w, h+++def _merge_images(images, aligns, layout_shape_mode="auto") -> np.ndarray:++ if not images:+ return None+ if len(images) == 1:+ return _to_np(images[0])+ if isinstance(aligns, str):+ aligns = [aligns] * (len(images) - 1)++ pil_images = [_to_pil(img) for img in images]+ x_offsets = [0] * len(pil_images)+ merged_w = pil_images[0].width++ for i in range(1, len(pil_images)):+ img2_w = pil_images[i].width+ step_w = max(merged_w, img2_w)+ align = aligns[i - 1]+ if align == "center":+ x1, x2 = (step_w - merged_w) // 2, (step_w - img2_w) // 2+ elif align == "right":+ x1, x2 = step_w - merged_w, step_w - img2_w+ else:+ x1, x2 = 0, 0+ for k in range(i):+ x_offsets[k] += x1+ x_offsets[i] = x2+ merged_w = step_w++ total_h = sum(img.height for img in pil_images)+ canvas = Image.new("RGB", (merged_w, total_h), (255, 255, 255))+ y_offset = 0+ for i, img in enumerate(pil_images):+ canvas.paste(img, (x_offsets[i], y_offset))+ y_offset += img.height+ return _to_np(canvas)+++class PPDocLayoutV3TorchDetector(BaseLayoutDetector):+ 'PP-DocLayoutV3 through pure transformers + numpy post-processing.'++ name = "ppdoclayout3_torch"++ def _start(self) -> None:+ import cv2+ import torch+ from transformers import AutoModelForObjectDetection++ self._cv2 = cv2+ self._labels = PX_LABELS++ self.device = str(self.config.get("device", "cpu") or "cpu")+ self._model_dir = str(self.config.get("model_dir", "") or "")+ if not self._model_dir:+ raise LayoutError(+ "layout.model_dir is required for provider ppdoclayout3_torch"+ )+ p = Path(self._model_dir)+ if not (p / "config.json").is_file():+ raise FileNotFoundError(+ "ppdoclayout3_torch needs a HuggingFace model dir with config.json + "+ "model.safetensors. For the Paddle inference format use "+ "ppdoclayout3_paddlex instead. Not found: %s" % self._model_dir+ )+++ import json+ cfg_data = json.loads((p / "config.json").read_text(encoding="utf-8"))+ model_type = cfg_data.get("model_type", "")+ if model_type != "pp_doclayout_v3":+ raise ValueError(+ "ppdoclayout3_torch only supports model_type=pp_doclayout_v3, "+ "but config.json says %r. Got the wrong model?" % model_type+ )++ self._threshold = float(self.config.get("threshold", 0.3))+ self._layout_nms = bool(self.config.get("nms", True))++ t0 = time.time()+ self._model = AutoModelForObjectDetection.from_pretrained(+ self._model_dir,+ dtype=torch.float32,+ local_files_only=True,+ ).eval()++ if self.device.startswith("cuda"):+ self._model = self._model.to(self.device)+ elif self.device.startswith("gpu"):+ idx = self.device.split(":")[-1] if ":" in self.device else "0"+ self._model = self._model.to("cuda:" + idx)++ self.model_load_sec = time.time() - t0++ def detect(self, images: Sequence) -> List[List[Dict]]:+ 'Batch-detect layout regions. Detections are coordinate-identical to the PaddleX reference pipeline for single-page input (batch_size=1). Batching multiple pages (len(images) > 1) triggers different CUDA kernel selection and may produce 1-pixel coordinate differences due to framework-level float precision; use single-page for verification.'+ if len(images) == 1:+ return [self._detect_one(images[0])]+++ import torch++ tensors = []+ sizes = []+ for image in images:+ img = image.convert("RGB") if hasattr(image, "convert") else image+ img_rgb = np.asarray(img)+ h0, w0 = img_rgb.shape[:2]+ sizes.append((w0, h0))+ img_bgr = self._cv2.cvtColor(img_rgb, self._cv2.COLOR_RGB2BGR)+ img_resized = self._cv2.resize(img_bgr, (800, 800), interpolation=self._cv2.INTER_CUBIC)+ sp = list(self._cv2.split(img_resized))+ for c in range(3):+ sp[c] = sp[c].astype(np.float32) * (1.0 / 255.0)+ img_norm = self._cv2.merge(sp).transpose(2, 0, 1)+ tensors.append(torch.from_numpy(img_norm))++ batch_tensor = torch.stack(tensors).to(self._model.device, dtype=torch.float32)+ with torch.no_grad():+ out = self._model(pixel_values=batch_tensor)++ results: List[List[Dict]] = []+ for i in range(len(images)):+ w, h = sizes[i]+ logits_np = out.logits[i].cpu().squeeze(0).numpy()+ pred_boxes_np = out.pred_boxes[i].cpu().squeeze(0).numpy()++ order_np = out.order_logits[i].cpu().numpy()+ boxes_7col = _postprocess_7col(logits_np, pred_boxes_np, order_np, w, h, topk=300)+ box_dicts = _layout_analysis_postprocess(+ boxes_7col, w, h, self._labels,+ threshold=self._threshold, do_nms=self._layout_nms,+ merge_bboxes_mode=MERGE_BBOXES_MODE,+ )+ page_dets: List[Dict] = []+ for index, b in enumerate(box_dicts):+ page_dets.append({+ "index": index,+ "label": b["label"],+ "class_id": b["cls_id"],+ "score": b["score"],+ "bbox": [float(v) for v in b["coordinate"]],+ "polygon": [],+ })+ results.append(page_dets)+ return results++ def _detect_one(self, image) -> List[Dict]:+ import torch++ img = image.convert("RGB") if hasattr(image, "convert") else image+ img_rgb = np.asarray(img)+ h0, w0 = img_rgb.shape[:2]+++ img_bgr = self._cv2.cvtColor(img_rgb, self._cv2.COLOR_RGB2BGR)+ img_resized = self._cv2.resize(img_bgr, (800, 800), interpolation=self._cv2.INTER_CUBIC)+ sp = list(self._cv2.split(img_resized))+ for c in range(3):+ sp[c] = sp[c].astype(np.float32) * (1.0 / 255.0)+ img_norm = self._cv2.merge(sp).transpose(2, 0, 1)+ tensor = torch.from_numpy(img_norm).unsqueeze(0).to(self._model.device, dtype=torch.float32)++ with torch.no_grad():+ out = self._model(pixel_values=tensor)++ logits_np = out.logits.cpu().squeeze(0).numpy()+ pred_boxes_np = out.pred_boxes.cpu().squeeze(0).numpy()+ order_np = out.order_logits.cpu().squeeze(0).numpy()++ boxes_7col = _postprocess_7col(logits_np, pred_boxes_np, order_np, w0, h0, topk=300)++ box_dicts = _layout_analysis_postprocess(+ boxes_7col, w0, h0, self._labels,+ threshold=self._threshold,+ do_nms=self._layout_nms,+ merge_bboxes_mode=MERGE_BBOXES_MODE,+ )++ result: List[Dict] = []+ for index, b in enumerate(box_dicts):+ result.append({+ "index": index,+ "label": b["label"],+ "class_id": b["cls_id"],+ "score": b["score"],+ "bbox": [float(v) for v in b["coordinate"]],+ "polygon": [],+ })+ return result++ def crop(self, image, detections: Sequence[Dict]) -> List[Dict]:+ 'Full filter → crop → merge chain, matching ppdoclayout3_paddlex.'+ img_rgb = np.array(image.convert("RGB"))+++ boxes = []+ for d in detections:+ box = {+ "cls_id": int(d["class_id"]),+ "label": d["label"],+ "score": float(d["score"]),+ "coordinate": [float(v) for v in d["bbox"]],+ }+ if d.get("polygon"):+ box["polygon_points"] = np.asarray(d["polygon"], dtype=np.float64).reshape(-1, 2)+ boxes.append(box)+++ boxes = _filter_overlap_boxes(boxes, LAYOUT_SHAPE_MODE)+ if not boxes:+ return []+++ meta_by_coord = {tuple(b["coordinate"]): (b["cls_id"], b["score"]) for b in boxes}+ cropped = _crop_by_boxes(img_rgb, boxes, LAYOUT_SHAPE_MODE)+++ merged = _merge_blocks(cropped, NON_MERGE_LABELS, LAYOUT_SHAPE_MODE)+++ blocks: List[Dict] = []+ for block in merged:+ label = str(block["label"])+ class_id, score = meta_by_coord.get(+ tuple(float(v) for v in block["box"]), (-1, 0.0)+ )+ blocks.append({+ "label": label,+ "class_id": int(class_id),+ "score": float(score),+ "bbox": [int(round(float(v))) for v in block["box"]],+ "image": block.get("img"),+ "polygon": polygon_to_list(block.get("polygon_points")),+ "skip_vlm": label in self.skip_vlm_labels,+++ "group_id": block.get("group_id"),+ })+ return blocks++ def model_ref(self) -> str:+ return getattr(self, "_model_dir", "") or str(self.config.get("model_dir", "") or "")++ @staticmethod+ def validate_config(layout_cfg: Dict) -> None:+ model_dir = str(layout_cfg.get("model_dir", "") or "").strip()+ if not model_dir:+ raise ValueError("layout.model_dir is required for provider ppdoclayout3_torch")+ p = Path(model_dir)+ if not (p / "config.json").is_file():+ raise FileNotFoundError(+ "ppdoclayout3_torch needs a HuggingFace model dir with config.json + "+ "model.safetensors. For the Paddle inference format use "+ "ppdoclayout3_paddlex instead. Not found: %s" % model_dir+ )++ import json+ cfg_data = json.loads((p / "config.json").read_text(encoding="utf-8"))+ model_type = cfg_data.get("model_type", "")+ if model_type != "pp_doclayout_v3":+ raise ValueError(+ "ppdoclayout3_torch only supports model_type=pp_doclayout_v3, "+ "but config.json says %r. Got the wrong model?" % model_type+ )diff --git a/sdk/minicpmvocr/layouts/server_app.py b/sdk/minicpmvocr/layouts/server_app.pynew file mode 100644index 0000000..34f85d7--- /dev/null+++ b/sdk/minicpmvocr/layouts/server_app.py@@ -0,0 +1,494 @@+#!/usr/bin/env python3+++from __future__ import annotations++import argparse+import base64+import io+import json+import os+import sys+import time+import traceback+from http.server import HTTPServer, BaseHTTPRequestHandler+from typing import Any, Dict, List, Optional, Tuple++import numpy as np+from PIL import Image+++_EMPTY_1X1_PNG = (+ "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk"+ "+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="+)+++def _b64_to_image(b64: str) -> Image.Image:+ raw = base64.b64decode(b64)+ return Image.open(io.BytesIO(raw)).convert("RGB")+++def _image_to_b64(img: Image.Image | np.ndarray, fmt: str = "PNG") -> str:+ if isinstance(img, np.ndarray):+ img = Image.fromarray(img)+ buf = io.BytesIO()+ img.save(buf, format=fmt)+ return base64.b64encode(buf.getvalue()).decode()+++def _is_json_request(h: BaseHTTPRequestHandler) -> bool:+ ct = h.headers.get("Content-Type", "")+ return ct.startswith("application/json")+++try:+ from shapely.geometry import Polygon+ from shapely.validation import make_valid # type: ignore[import-untyped]++ _HAS_SHAPELY = True+except ImportError:+ _HAS_SHAPELY = False+++def _bbox_area(bbox: List[float]) -> float:+ return max(0.0, float(bbox[2] - bbox[0]) * float(bbox[3] - bbox[1]))+++def _polygon_to_list(poly) -> List[List[float]]:+ if poly is None:+ return []+ points = poly.tolist() if hasattr(poly, "tolist") else list(poly)+ out: List[List[float]] = []+ for pt in points:+ if isinstance(pt, (list, tuple)) and len(pt) >= 2:+ out.append([float(pt[0]), float(pt[1])])+ return out+++def _polygon_overlap_ratio(poly1, poly2, mode: str = "small") -> float:+ if not _HAS_SHAPELY or not poly1 or not poly2:+ return 0.0+ try:+ p1 = make_valid(Polygon(poly1))+ p2 = make_valid(Polygon(poly2))+ inter = p1.intersection(p2).area+ if mode == "union":+ ref = p1.union(p2).area+ elif mode == "small":+ ref = min(p1.area, p2.area)+ else:+ ref = max(p1.area, p2.area)+ return float(inter / ref) if ref > 0 else 0.0+ except Exception:+ return 0.0+++def _compute_pairwise_overlap(coords: np.ndarray) -> Tuple[np.ndarray, np.ndarray]:+ x1, y1, x2, y2 = coords[:, 0], coords[:, 1], coords[:, 2], coords[:, 3]+ areas = np.abs((x2 - x1) * (y2 - y1))+ ix1 = np.maximum(x1[:, None], x1[None, :])+ iy1 = np.maximum(y1[:, None], y1[None, :])+ ix2 = np.minimum(x2[:, None], x2[None, :])+ iy2 = np.minimum(y2[:, None], y2[None, :])+ iw = np.maximum(0, ix2 - ix1)+ ih = np.maximum(0, iy2 - iy1)+ ia = iw * ih+ sa = np.minimum(areas[:, None], areas[None, :])+ with np.errstate(divide="ignore", invalid="ignore"):+ overlap = np.where(sa > 0, ia / sa, 0.0)+ return overlap, areas+++def _box_overlap_ratio(+ b1: List[float], b2: List[float], mode: str = "union"+) -> float:+ x1 = max(b1[0], b2[0])+ y1 = max(b1[1], b2[1])+ x2 = min(b1[2], b2[2])+ y2 = min(b1[3], b2[3])+ iw = max(0.0, x2 - x1)+ ih = max(0.0, y2 - y1)+ iarea = iw * ih+ a1 = _bbox_area(b1)+ a2 = _bbox_area(b2)+ if mode == "union":+ ref = a1 + a2 - iarea+ elif mode == "small":+ ref = min(a1, a2)+ else:+ ref = max(a1, a2)+ return float(iarea / ref) if ref > 0 else 0.0+++def filter_overlap_boxes(+ boxes: List[Dict], layout_shape_mode: str = "auto"+) -> List[Dict]:+ 'Drop overlapping & tiny boxes, same logic as PaddleOCR-VL.'+ boxes = [b for b in boxes if b["label"] != "reference"]+ if not boxes:+ return boxes++ coords = np.array([b["coordinate"] for b in boxes], dtype=np.float64)+ widths = coords[:, 2] - coords[:, 0]+ heights = coords[:, 3] - coords[:, 1]+ overlap_matrix, areas = _compute_pairwise_overlap(coords)++ dropped = set()+ for i in range(len(boxes)):+ if widths[i] < 6 or heights[i] < 6:+ dropped.add(i)+ continue+ for j in range(i + 1, len(boxes)):+ if i in dropped or j in dropped:+ continue+ ratio = overlap_matrix[i, j]+ li = boxes[i]["label"]+ lj = boxes[j]["label"]+ if li == "inline_formula" or lj == "inline_formula":+ if ratio > 0.5:+ if li == "inline_formula":+ dropped.add(i)+ if lj == "inline_formula":+ dropped.add(j)+ continue+ if ratio > 0.7:+ if (+ layout_shape_mode != "rect"+ and "polygon_points" in boxes[i]+ and boxes[i]["polygon_points"] is not None+ and len(boxes[i]["polygon_points"]) > 0+ ):+ pr = _polygon_overlap_ratio(+ boxes[i]["polygon_points"],+ boxes[j]["polygon_points"],+ "small",+ )+ if pr > 0.9:+ if areas[i] >= areas[j]:+ dropped.add(j)+ else:+ dropped.add(i)+ else:+ if areas[i] >= areas[j]:+ dropped.add(j)+ else:+ dropped.add(i)+ return [b for idx, b in enumerate(boxes) if idx not in dropped]+++class LayoutServer:+ def __init__(+ self,+ model_dir: str,+ device: str = "cpu",+ threshold: float = 0.3,+ layout_nms: bool = True,+ layout_shape_mode: str = "auto",+ ):+ self.model_dir = model_dir+ self.device = device+ self.threshold = threshold+ self.layout_nms = layout_nms+ self.layout_shape_mode = layout_shape_mode+ self._model = None+ self._processor = None+ self._id2label: Dict[int, str] = {}+ self._started_at = time.time()+ self._n_batches = 0++ def _ensure_loaded(self) -> None:+ if self._model is not None:+ return++ import torch+ from transformers import (+ AutoModelForObjectDetection,+ AutoImageProcessor,+ )++ t0 = time.time()+ sys.stderr.write(+ f"[layout_server] loading {self.model_dir} → {self.device}\n"+ )+ sys.stderr.flush()+++ if self.device.startswith("cuda") or self.device.startswith("gpu"):+ _idx = self.device.split(":")[-1] if ":" in self.device else "0"+ _idx = int(_idx) if _idx.isdigit() else 0+ if not torch.cuda.is_available():+ raise RuntimeError(+ "device=%s but CUDA is not available" % self.device+ )+ torch.zeros(4, device=f"cuda:{_idx}")++ self._processor = AutoImageProcessor.from_pretrained(+ self.model_dir, local_files_only=True+ )+ self._model = AutoModelForObjectDetection.from_pretrained(+ self.model_dir,+ torch_dtype=torch.float32,+ local_files_only=True,+ ).eval()++ if self.device.startswith("cuda"):+ self._model = self._model.to(self.device)+ elif self.device.startswith("gpu"):+ self._model = self._model.to(+ "cuda:" + (self.device.split(":")[-1] if ":" in self.device else "0")+ )++ self._id2label = {+ int(k): str(v)+ for k, v in self._model.config.id2label.items()+ }+ sys.stderr.write(+ f"[layout_server] ready ({self._model.config.model_type}, "+ f"{len(self._id2label)} labels, {time.time() - t0:.1f}s)\n"+ )+ sys.stderr.flush()++ def info(self) -> Dict:+ self._ensure_loaded()+ return {+ "model_dir": self.model_dir,+ "model_type": self._model.config.model_type,+ "device": self.device,+ "threshold": self.threshold,+ "layout_nms": self.layout_nms,+ "layout_shape_mode": self.layout_shape_mode,+ "n_labels": len(self._id2label),+ "id2label": self._id2label,+ "uptime_sec": round(time.time() - self._started_at, 1),+ "n_batches": self._n_batches,+ }++ def detect(self, image_b64: str, threshold: Optional[float] = None) -> List[Dict]:+ self._ensure_loaded()+ import torch++ thr = float(threshold) if threshold is not None else self.threshold+ img = _b64_to_image(image_b64)++ inputs = self._processor(images=img, return_tensors="pt")+ if self.device != "cpu":+ inputs = {k: v.to(self._model.device) for k, v in inputs.items()}++ with torch.no_grad():+ outputs = self._model(**inputs)++ h, w = img.size[::-1]+ result = self._processor.post_process_object_detection(+ outputs, target_sizes=[(h, w)], threshold=thr+ )[0]++ boxes: List[Dict] = []+ for box, label_id, score in zip(+ result["boxes"].tolist(), result["labels"].tolist(), result["scores"].tolist()+ ):+ boxes.append(+ {+ "label": self._id2label.get(int(label_id), str(label_id)),+ "class_id": int(label_id),+ "score": round(float(score), 6),+ "bbox": [round(float(v), 2) for v in box],+ }+ )++ self._n_batches += 1+ return boxes++ def detect_raw(self, image_b64: str, threshold: Optional[float] = None) -> List[Dict]:+ 'Raw detection only — no filter/merge/crop after.'+ return self.detect(image_b64, threshold)++ def detect_full(self, image_b64: str, threshold: Optional[float] = None) -> List[Dict]:+ 'Full pipeline: detect → filter_overlap_boxes → NMS → merge.'+ boxes = self.detect(image_b64, threshold)+++ pd_boxes = [+ {+ "cls_id": b["class_id"],+ "label": b["label"],+ "score": b["score"],+ "coordinate": b["bbox"],+ }+ for b in boxes+ ]+++ filtered_boxes = filter_overlap_boxes(pd_boxes, self.layout_shape_mode)+ if not filtered_boxes:+ filtered_boxes = pd_boxes+++ return [+ {+ "label": b["label"],+ "class_id": int(b["cls_id"]),+ "score": round(float(b["score"]), 6),+ "bbox": [round(float(v), 2) for v in b["coordinate"]],+ }+ for b in filtered_boxes+ ]+++class LayoutHandler(BaseHTTPRequestHandler):+ server_obj: LayoutServer++ def log_message(self, fmt, *args):+ sys.stderr.write("[%s] %s\n" % (self.log_date_time_string(), fmt % args))++ def _json(self, code: int, data: Dict):+ body = json.dumps(data, ensure_ascii=False).encode()+ self.send_response(code)+ self.send_header("Content-Type", "application/json; charset=utf-8")+ self.send_header("Content-Length", str(len(body)))+ self.end_headers()+ self.wfile.write(body)++ def _ok(self, data: Any):+ self._json(200, {"ok": True, "data": data})++ def _err(self, code: int, msg: str):+ self._json(code, {"ok": False, "error": msg})++ def do_GET(self):+ if self.path == "/health":+ try:+ self.server_obj._ensure_loaded()+ self._json(200, {"ok": True, "status": "healthy"})+ except Exception as e:+ self._err(503, str(e))+ elif self.path == "/info":+ try:+ self._ok(self.server_obj.info())+ except Exception as e:+ self._err(500, str(e))+ else:+ self._err(404, "not found")++ def do_POST(self):+ if not _is_json_request(self):+ self._err(400, "Content-Type must be application/json")+ return++ try:+ length = int(self.headers.get("Content-Length", "0"))+ raw = self.rfile.read(length)+ payload = json.loads(raw) if raw else {}+ except Exception:+ self._err(400, "invalid JSON body")+ return++ image_b64 = str(payload.get("image") or "")+ if not image_b64:++ img_path = str(payload.get("image_path") or "")+ if img_path and os.path.isfile(img_path):+ pil = Image.open(img_path).convert("RGB")+ image_b64 = _image_to_b64(pil)+ if not image_b64:+ self._err(400, "missing 'image' (base64) or 'image_path'")+ return++ threshold = payload.get("threshold")+ if threshold is not None:+ threshold = float(threshold)++ try:+ if self.path == "/detect":+ boxes = self.server_obj.detect(image_b64, threshold)+ elif self.path == "/detect_full":+ boxes = self.server_obj.detect_full(image_b64, threshold)+ else:++ boxes = self.server_obj.detect(image_b64, threshold)+ self._ok({"boxes": boxes})+ except Exception as e:+ traceback.print_exc(file=sys.stderr)+ self._err(500, str(e))+++def make_handler(srv: LayoutServer):+ class _Handler(LayoutHandler):+ pass+ _Handler.server_obj = srv+ return _Handler+++def _parse_args(argv=None):+ p = argparse.ArgumentParser(+ prog="minicpmvocr serve-layout",+ description="PP-DocLayoutV3 standalone detection server (pure torch)",+ formatter_class=argparse.ArgumentDefaultsHelpFormatter,+ )+ p.add_argument(+ "--model-dir",+ default=os.environ.get("LAYOUT_MODEL_DIR", ""),+ help="Model directory (config.json + model.safetensors)",+ )+ p.add_argument("--host", default="0.0.0.0")+ p.add_argument("--port", type=int, default=8110)+ p.add_argument("--device", default="cpu", help="cuda:0 / cpu / gpu:1 …")+ p.add_argument("--threshold", type=float, default=0.3)+ p.add_argument("--no-nms", action="store_true", help="disable layout NMS")+ p.add_argument("--shape-mode", default="auto", choices=["auto", "rect", "poly"])+ p.add_argument("--idle-ttl", type=float, default=0,+ help="auto-exit after N seconds of idle (0 = never)")+ return p.parse_args(argv)+++def main(argv=None):+ args = _parse_args(argv)++ if not args.model_dir:+ print("error: --model-dir is required (or set LAYOUT_MODEL_DIR)", file=sys.stderr)+ return 1++ if not os.path.isdir(args.model_dir):+ print(f"error: model-dir not found: {args.model_dir}", file=sys.stderr)+ return 1++ server = LayoutServer(+ model_dir=args.model_dir,+ device=args.device,+ threshold=args.threshold,+ layout_nms=not args.no_nms,+ layout_shape_mode=args.shape_mode,+ )+++ try:+ sys.stderr.write("[layout_server] pre-loading model...\n")+ sys.stderr.flush()+ server._ensure_loaded()+ except Exception as e:+ traceback.print_exc(file=sys.stderr)+ return 1++ httpd = HTTPServer((args.host, args.port), make_handler(server))++ msg = (+ f"[layout_server] listening on {args.host}:{args.port} "+ f"device={args.device} model={args.model_dir}"+ )+ sys.stderr.write(msg + "\n")+ sys.stderr.flush()+ if os.isatty(sys.stdout.fileno()):+ print(msg, flush=True)++ try:+ httpd.serve_forever()+ except KeyboardInterrupt:+ pass+ finally:+ httpd.server_close()++ return 0+++if __name__ == "__main__":+ sys.exit(main())diff --git a/sdk/minicpmvocr/pipeline/__init__.py b/sdk/minicpmvocr/pipeline/__init__.pynew file mode 100644index 0000000..86b0316--- /dev/null+++ b/sdk/minicpmvocr/pipeline/__init__.py@@ -0,0 +1,22 @@+from __future__ import annotations++__all__ = [+ "infer_run",+ "parse_layout_run",+ "pipelined_run",+ "prepare_run",+]+++def __getattr__(name: str):+ if name == "pipelined_run":+ from .overlapped import pipelined_run+ return pipelined_run+ if name in {"infer_run", "parse_layout_run", "prepare_run"}:+ from .staged import infer_run, parse_layout_run, prepare_run+ return {+ "infer_run": infer_run,+ "parse_layout_run": parse_layout_run,+ "prepare_run": prepare_run,+ }[name]+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")diff --git a/sdk/minicpmvocr/pipeline/_blocks.py b/sdk/minicpmvocr/pipeline/_blocks.pynew file mode 100644index 0000000..ff5563e--- /dev/null+++ b/sdk/minicpmvocr/pipeline/_blocks.py@@ -0,0 +1,567 @@+from __future__ import annotations++import time+from pathlib import Path+from typing import Dict, List, Optional++from PIL import Image++from ._text import _normalize_and_dedupe_blocks+from ._tts import _execute_block_adaptive, _execute_block_tts+from ..postprocess.markdown import (+ assemble_markdown,+ has_mixed_inline_formula_content,+ postprocess_content,+)+from ..prompts import get_element_cfg+from .._utils import classify_engine_text, ensure_dir, write_json+++def _resize_image(image: Image.Image, target_min_side) -> Image.Image:+ if target_min_side is None:+ return image+ w, h = image.size+ if min(w, h) >= target_min_side:+ return image+ scale = target_min_side / min(w, h)+ return image.resize((int(w * scale), int(h * scale)), Image.Resampling.LANCZOS)++def _block_priority(prompt_map: Dict, block: Dict) -> tuple:++ elem = get_element_cfg(prompt_map, block.get("label", ""))+ cap = int(elem["max_new_tokens"] or 0) if elem else 0+ area = int(block.get("crop_width", 0) or 0) * int(block.get("crop_height", 0) or 0)+ return (-cap, -area)++def _execute_block(engine, prompt_map: Dict, image_id: str, crop_dir: Path, block: Dict,+ crop_array=None, rm_client=None, tts_cfg: Optional[Dict] = None,+ submitted_at: Optional[float] = None,+ prior_candidate: Optional[Dict] = None) -> Dict:++ label = block.get("label", "")+ elem_cfg = get_element_cfg(prompt_map, label)+ crop_filename = block.get("crop_filename", "")+ crop_path = crop_dir / crop_filename if crop_filename else None+ crop_started = time.time()+++ queue_wait_sec = round(crop_started - submitted_at, 6) if submitted_at else 0.0++ if elem_cfg is None or block.get("skip_vlm", False):+ return {+ "result_block": {+ "label": label,+ "order": block.get("order", 0),+ "bbox": block.get("bbox"),+ "crop_filename": crop_filename,+ "status": "skipped_no_vlm",+ "content": "",+ "raw_content": "",+ },+ "crop_row": {+ "image_id": image_id,+ "label": label,+ "crop_filename": crop_filename,+ "status": "skipped_no_vlm",+ "duration_sec": 0.0,+ },+ "prep_sec": 0.0,+ "infer_sec": 0.0,+ "vlm_inc": 0,+ "failed_inc": 0,+ }++ vlm_inc = 1+ if crop_array is None and (not crop_path or not crop_path.exists()):+ return {+ "result_block": {+ "label": label,+ "order": block.get("order", 0),+ "bbox": block.get("bbox"),+ "crop_filename": crop_filename,+ "status": "missing_crop",+ "content": "",+ "raw_content": "",+ },+ "crop_row": {+ "image_id": image_id,+ "label": label,+ "crop_filename": crop_filename,+ "status": "missing_crop",+ "duration_sec": 0.0,+ },+ "prep_sec": 0.0,+ "infer_sec": 0.0,+ "vlm_inc": vlm_inc,+ "failed_inc": 1,+ }++ prep_t0 = time.time()+ if crop_array is not None:+ crop_image = Image.fromarray(crop_array).convert("RGB")+ else:+ crop_image = Image.open(crop_path).convert("RGB")+ model_input_image = _resize_image(crop_image, elem_cfg["resize_min_side"])+++ rm_anchor = (tts_cfg or {}).get("rm_anchor_min_side")+ rm_input_image = (model_input_image if rm_anchor is None+ else _resize_image(crop_image, rm_anchor))+ prep_sec = time.time() - prep_t0++ infer_status = "ok"+ raw_text = ""+ output_tokens = 0+ infer_sec = 0.0+ failed_inc = 0+ error_text = ""+ tts_info: Dict = {}+ request_metrics: Dict = {}+ try:+ infer_t0 = time.time()+ tts_on = bool(tts_cfg and tts_cfg.get("enabled") and rm_client is not None)+ n_total = int((tts_cfg or {}).get("n", 1)) if tts_on else 1+ adaptive_cfg = (tts_cfg or {}).get("adaptive") or {}+ adaptive_on = tts_on and bool(adaptive_cfg.get("enabled"))++ force_score = tts_on and bool((tts_cfg or {}).get("force_score"))+ case_id = "%s::%s" % (image_id, crop_filename or block.get("order", 0))++ if adaptive_on:+ raw_text, output_tokens, infer_sec, tts_info = _execute_block_adaptive(+ engine=engine,+ rm_client=rm_client,+ tts_cfg=tts_cfg,+ crop_image=crop_image,+ base_image=model_input_image,+ rm_image=rm_input_image,+ elem_cfg=elem_cfg,+ label=label,+ case_id=case_id,+ infer_t0=infer_t0,+ prior_candidate=prior_candidate,+ )+ elif not tts_on or (n_total <= 1 and not force_score):+ pred = engine.recognize(+ model_input_image,+ prompt=elem_cfg["prompt"],+ max_new_tokens=elem_cfg["max_new_tokens"],+ slice_nums=elem_cfg["slice_nums"],+ )+ infer_sec = time.time() - infer_t0+ raw_text = pred["text"]+ output_tokens = pred.get("output_token_count", 0)+++ request_metrics = dict(pred.get("request_metrics") or {})+ else:+ raw_text, output_tokens, infer_sec, tts_info = _execute_block_tts(+ engine=engine,+ rm_client=rm_client,+ tts_cfg=tts_cfg,+ image=model_input_image,+ rm_image=rm_input_image,+ elem_cfg=elem_cfg,+ label=label,+ case_id=case_id,+ infer_t0=infer_t0,+ )+++ raw_text, engine_error = classify_engine_text(raw_text)+ if engine_error is not None:+ infer_status = f"{engine.name}_error"+ failed_inc = 1+ error_text = engine_error+ output_tokens = 0+ except Exception as e:+ infer_status = f"{engine.name}_error"+ raw_text = ""+ failed_inc = 1+ error_text = str(e)+ finally:++ closed_ids = set()+ for img in (model_input_image, rm_input_image):+ if img is None or img is crop_image or id(img) in closed_ids:+ continue+ closed_ids.add(id(img))+ img.close()+ crop_image.close()++ post_t0 = time.time()+ content = postprocess_content(raw_text, elem_cfg["output_format"], label=label)+ post_sec = time.time() - post_t0+++ crop_row = {+ "image_id": image_id,+ "label": label,+ "crop_filename": crop_filename,+ "status": infer_status,+ "duration_sec": round(time.time() - crop_started, 6),+ "queue_wait_sec": queue_wait_sec,+ "prep_sec": round(prep_sec, 6),+ "infer_sec": round(infer_sec, 6),+ "post_sec": round(post_sec, 6),+ "client_encode_sec": request_metrics.get("client_encode_sec", 0.0),+ "client_payload_build_sec": request_metrics.get("client_payload_build_sec", 0.0),+ "client_post_sec": request_metrics.get("client_post_sec", 0.0),+ "client_parse_sec": request_metrics.get("client_parse_sec", 0.0),+ "client_queue_wait_sec": request_metrics.get("client_queue_wait_sec", 0.0),+ "image_b64_bytes": request_metrics.get("image_b64_bytes", 0),+ "prompt_tokens": request_metrics.get("prompt_tokens", 0),+ "completion_tokens": request_metrics.get("completion_tokens", 0),+ }+ if infer_status != "ok":+ crop_row["error"] = error_text+ if tts_info:+ crop_row.update({+ "raw_candidate_count": tts_info.get("raw_candidate_count"),+ "n_candidates": tts_info.get("n_candidates"),+ "best_index": tts_info.get("best_index"),+ "greedy_sec": tts_info.get("greedy_sec"),+ "sample_sec": tts_info.get("sample_sec"),+ "rm_sec": tts_info.get("rm_sec"),+ "rm_wait_sec": tts_info.get("rm_wait_sec"),+ "rm_call_sec": tts_info.get("rm_call_sec"),+ "rm_used": tts_info.get("rm_used"),+ "rm_error": tts_info.get("rm_error"),+ "scores": tts_info.get("scores"),+ "rm_stage_sec": tts_info.get("rm_stage_sec"),+ "rm_batch_size": tts_info.get("rm_batch_size"),+ "rm_batch_items": tts_info.get("rm_batch_items"),+ })+ if tts_info.get("adaptive"):+ crop_row.update({+ "rounds_used": tts_info.get("rounds_used"),+ "stop_reason": tts_info.get("stop_reason"),+ "exhausted": tts_info.get("exhausted"),+ "best_score": tts_info.get("best_score"),+ "rm_calls": tts_info.get("rm_calls"),+ "round_log": tts_info.get("round_log"),+ })+ if tts_info.get("prior_injected"):+ crop_row["prior_injected"] = True++ result_block = {+ "label": label,+ "order": block.get("order", 0),+ "bbox": block.get("bbox"),+ "crop_filename": crop_filename,+ "status": infer_status,+ "content": content,+ "raw_content": raw_text,+ "inline_formula_mixed": (+ label == "inline_formula" and has_mixed_inline_formula_content(raw_text)+ ),+ "output_token_count": output_tokens,+ }+ if tts_info:+ result_block["tts"] = {+ "n_candidates": tts_info.get("n_candidates"),+ "best_index": tts_info.get("best_index"),+ "rm_used": tts_info.get("rm_used"),+++ "rm_error": tts_info.get("rm_error"),+ "scores": tts_info.get("scores"),+ "verdicts": tts_info.get("verdicts"),+++ "greedy_sec": tts_info.get("greedy_sec"),+ "sample_sec": tts_info.get("sample_sec"),+ "rm_sec": tts_info.get("rm_sec"),+ "rm_wait_sec": tts_info.get("rm_wait_sec"),+ "rm_call_sec": tts_info.get("rm_call_sec"),+ "rm_batch_items": tts_info.get("rm_batch_items"),+++ "raw_candidate_count": tts_info.get("raw_candidate_count"),+ "rm_stage_sec": tts_info.get("rm_stage_sec"),+ "rm_batch_size": tts_info.get("rm_batch_size"),+ }+ if tts_info.get("adaptive"):+ result_block["tts"].update({+ "rounds_used": tts_info.get("rounds_used"),+ "stop_reason": tts_info.get("stop_reason"),+++ "exhausted": tts_info.get("exhausted"),+ "best_score": tts_info.get("best_score"),+ "rm_calls": tts_info.get("rm_calls"),+ })+ if tts_info.get("prior_injected"):+++ result_block["tts"]["prior_injected"] = True++ tts_dump = None+ if tts_info and (tts_cfg or {}).get("dump_candidates"):+++ tts_dump = {+ "image_id": image_id,+ "case_id": "%s::%s" % (image_id, crop_filename or block.get("order", 0)),+ "label": label,+ "raw_candidate_count": tts_info.get("raw_candidate_count"),+ "n_candidates": tts_info.get("n_candidates"),+ "candidates": tts_info.get("deduped"),+ "candidates_raw": tts_info.get("candidates"),+ "scores": tts_info.get("scores"),+ "verdicts": tts_info.get("verdicts"),+ "best_index": tts_info.get("best_index"),+ "rm_used": tts_info.get("rm_used"),+ "rm_error": tts_info.get("rm_error"),+ "greedy_sec": tts_info.get("greedy_sec"),+ "sample_sec": tts_info.get("sample_sec"),+ "rm_sec": tts_info.get("rm_sec"),+ "rm_wait_sec": tts_info.get("rm_wait_sec"),+ "rm_call_sec": tts_info.get("rm_call_sec"),+ "rm_stage_sec": tts_info.get("rm_stage_sec"),+ "rm_batch_size": tts_info.get("rm_batch_size"),+ "rm_batch_items": tts_info.get("rm_batch_items"),+ }+ if tts_info.get("adaptive"):+++ tts_dump.update({+ "adaptive": True,+ "rounds_used": tts_info.get("rounds_used"),+ "stop_reason": tts_info.get("stop_reason"),+ "exhausted": tts_info.get("exhausted"),+ "best_score": tts_info.get("best_score"),+ "tau": tts_info.get("tau"),+ "rm_calls": tts_info.get("rm_calls"),+ "round_log": tts_info.get("round_log"),+ "round_texts": tts_info.get("round_texts"),+ })+ if tts_info.get("prior_injected"):+ tts_dump["prior_injected"] = True++ return {+ "result_block": result_block,+ "crop_row": crop_row,+ "prep_sec": prep_sec,+ "infer_sec": infer_sec,+ "vlm_inc": vlm_inc,+ "failed_inc": failed_inc,+ "tts_dump": tts_dump,+ }++def _failed_block_output(image_id: str, block: Dict, error: str) -> Dict:+ label = block.get("label", "")+ crop_filename = block.get("crop_filename", "")+ return {+ "result_block": {+ "label": label,+ "order": block.get("order", 0),+ "bbox": block.get("bbox"),+ "crop_filename": crop_filename,+ "status": "failed",+ "content": "",+ "raw_content": "",+ },+ "crop_row": {+ "image_id": image_id,+ "label": label,+ "crop_filename": crop_filename,+ "status": "failed",+ "duration_sec": 0.0,+ "error": error,+ },+ "prep_sec": 0.0,+ "infer_sec": 0.0,+ "vlm_inc": 1,+ "failed_inc": 1,+ "tts_dump": None,+ }++def _skipped_page_result(image_id: str, page_started: float, layout_stage_sec: float, num_blocks: int, md_path: Path) -> Dict:+ row = {+ "image_id": image_id,+ "status": "ok",+ "page_total_wall_sec": round(time.time() - page_started, 6),+ "layout_stage_sec": round(layout_stage_sec, 6),+ "extract_prep_sec": 0.0,+ "extract_infer_sec": 0.0,+ "post_process_sec": 0.0,+ "num_blocks": num_blocks,+ "num_vlm_blocks": 0,+ "num_failed_blocks": 0,+ "output_chars": len(md_path.read_text(encoding="utf-8")),+ "error": "",+ }+ page_timing = {+ "image_id": image_id,+ "status": "skipped_existing",+ "duration_sec": row["page_total_wall_sec"],+ }+ return {"page_row": row, "page_timing": page_timing, "crop_rows": []}++def _failed_page_result(image_id: str, page_started: float, layout_stage_sec: float, error: str) -> Dict:+ row = {+ "image_id": image_id,+ "status": "failed",+ "page_total_wall_sec": round(time.time() - page_started, 6),+ "layout_stage_sec": round(layout_stage_sec, 6),+ "extract_prep_sec": 0.0,+ "extract_infer_sec": 0.0,+ "post_process_sec": 0.0,+ "num_blocks": 0,+ "num_vlm_blocks": 0,+ "num_failed_blocks": 1,+ "output_chars": 0,+ "error": error,+ }+ page_timing = {+ "image_id": image_id,+ "status": "failed",+ "duration_sec": row["page_total_wall_sec"],+ "error": error,+ }+ return {"page_row": row, "page_timing": page_timing, "crop_rows": []}++def _finalize_page(+ *,+ run_dir: Path,+ image_id: str,+ layout: Dict,+ blocks: List[Dict],+ block_outputs: List[Dict],+ prompt_map: Dict,+ page_started: float,+ layout_stage_sec: float,+) -> Dict:+ result_blocks = []+ crop_rows: List[Dict] = []+ tts_dumps: List[Dict] = []+ extract_prep_sec = 0.0+ extract_infer_sec = 0.0+ num_vlm_blocks = 0+ num_failed_blocks = 0+++ tts_blocks = 0+ tts_multi_candidate = 0+ tts_rm_used = 0+ tts_rm_changed = 0+ tts_rm_failed = 0+ tts_rm_sec = 0.0+ tts_rm_wait_sec = 0.0+ tts_sample_sec = 0.0+ tts_render_sec = 0.0+ tts_forward_sec = 0.0+ queue_wait_sec = 0.0++ adaptive_blocks = 0+ adaptive_rounds_total = 0+ adaptive_passed = 0+ adaptive_exhausted = 0+ adaptive_rm_calls = 0++ for item in block_outputs:+ result_blocks.append(item["result_block"])+ extract_prep_sec += float(item["prep_sec"])+ extract_infer_sec += float(item["infer_sec"])+ num_vlm_blocks += int(item["vlm_inc"])+ num_failed_blocks += int(item["failed_inc"])+ crop_rows.append(item["crop_row"])+ if item.get("tts_dump"):+ tts_dumps.append(item["tts_dump"])+ queue_wait_sec += float(item["crop_row"].get("queue_wait_sec", 0.0) or 0.0)+ tts = item["result_block"].get("tts")+ if tts:+ tts_blocks += 1+ if int(tts.get("n_candidates") or 0) > 1:+ tts_multi_candidate += 1+ if tts.get("rm_used"):+ tts_rm_used += 1+ if int(tts.get("best_index") or 0) != 0:+ tts_rm_changed += 1+ elif tts.get("rm_error"):+++ tts_rm_failed += 1+++ call_sec = tts.get("rm_call_sec")+ tts_rm_sec += float((call_sec if call_sec is not None else tts.get("rm_sec")) or 0.0)+ tts_rm_wait_sec += float(tts.get("rm_wait_sec") or 0.0)+ tts_sample_sec += float(tts.get("sample_sec") or 0.0)+ if tts.get("rounds_used") is not None:+ adaptive_blocks += 1+ adaptive_rounds_total += int(tts.get("rounds_used") or 0)+ adaptive_rm_calls += int(tts.get("rm_calls") or 0)+ if tts.get("stop_reason") == "passed":+ adaptive_passed += 1+ if tts.get("exhausted"):+ adaptive_exhausted += 1+++ stage = tts.get("rm_stage_sec") or {}+ tts_render_sec += float(stage.get("render_sec") or 0.0)+ tts_forward_sec += float(stage.get("forward_sec") or 0.0)++ post_t0 = time.time()+ final_blocks = _normalize_and_dedupe_blocks(result_blocks)+ markdown = assemble_markdown(final_blocks, prompt_map)+ post_process_sec = time.time() - post_t0++ md_path = run_dir / "output" / f"{image_id}.md"+ json_path = run_dir / "results_json" / f"{image_id}.json"+ ensure_dir(md_path.parent)+ ensure_dir(json_path.parent)+ md_path.write_text(markdown, encoding="utf-8")+ result_obj = {+ "image_id": image_id,+ "image_width": layout.get("image_width"),+ "image_height": layout.get("image_height"),+ "source": layout.get("source"),+ "crop_blocks": final_blocks,+ "markdown": markdown,+ "result_stage": "infer_final",+ }+ write_json(json_path, result_obj)++ status = "ok" if num_failed_blocks == 0 else "partial_failed"+ row = {+ "image_id": image_id,+ "status": status,+ "page_total_wall_sec": round(time.time() - page_started, 6),+ "layout_stage_sec": round(layout_stage_sec, 6),+ "extract_prep_sec": round(extract_prep_sec, 6),+ "extract_infer_sec": round(extract_infer_sec, 6),+ "post_process_sec": round(post_process_sec, 6),+ "num_blocks": len(blocks),+ "num_vlm_blocks": num_vlm_blocks,+ "num_failed_blocks": num_failed_blocks,+ "output_chars": len(markdown),+ "queue_wait_sec": round(queue_wait_sec, 6),+ "tts_blocks": tts_blocks,+ "tts_multi_candidate": tts_multi_candidate,+ "tts_rm_used": tts_rm_used,+ "tts_rm_changed": tts_rm_changed,+ "adaptive_blocks": adaptive_blocks,+ "adaptive_rounds_total": adaptive_rounds_total,+ "adaptive_passed": adaptive_passed,+ "adaptive_exhausted": adaptive_exhausted,+ "adaptive_rm_calls": adaptive_rm_calls,+ "tts_rm_failed": tts_rm_failed,+ "tts_rm_sec": round(tts_rm_sec, 6),+ "tts_rm_wait_sec": round(tts_rm_wait_sec, 6),+ "tts_sample_sec": round(tts_sample_sec, 6),+ "tts_render_sec": round(tts_render_sec, 6),+ "tts_forward_sec": round(tts_forward_sec, 6),+ "error": "",+ }+ page_timing = {+ "image_id": image_id,+ "status": status,+ "duration_sec": row["page_total_wall_sec"],+ "num_blocks": len(blocks),+ "num_vlm_blocks": num_vlm_blocks,+ "num_failed_blocks": num_failed_blocks,+ }+ return {"page_row": row, "page_timing": page_timing, "crop_rows": crop_rows,+ "tts_dumps": tts_dumps}diff --git a/sdk/minicpmvocr/pipeline/_inputs.py b/sdk/minicpmvocr/pipeline/_inputs.pynew file mode 100644index 0000000..b9ffc3d--- /dev/null+++ b/sdk/minicpmvocr/pipeline/_inputs.py@@ -0,0 +1,270 @@+from __future__ import annotations++import time+from pathlib import Path+from typing import Dict, List++from PIL import Image++from ..constants import (+ PDF_RENDER_PAGES_PER_JOB,+ PDF_RENDER_ZOOM,+ SUPPORTED_IMAGE_SUFFIXES,+ SUPPORTED_INPUT_SUFFIXES,+)+++def _mode_limit(cfg: Dict) -> int:+ input_limit = int(cfg["input"].get("limit") or 0)+ if input_limit > 0:+ return input_limit+ mode = cfg["run"]["mode"]+ if mode == "smoke_1page":+ return 1+ if mode == "pipeline_30pages":+ return 30+ return 0+++def _load_manifest_filter(manifest_path: str) -> set[str]:+ if not manifest_path:+ return set()+ names = set()+ with Path(manifest_path).open("r", encoding="utf-8") as f:+ for line in f:+ val = line.strip()+ if not val or val.startswith("#"):+ continue+ names.add(Path(val).stem)+ names.add(Path(val).name)+ names.add(val)+ return names+++def _match_manifest(path: Path, selected: set[str]) -> bool:+ if not selected:+ return True+ return path.stem in selected or path.name in selected or str(path) in selected+++def _collect_raw_inputs(cfg: Dict) -> List[Path]:+ selected = _load_manifest_filter(cfg["input"].get("manifest", ""))+ paths: List[Path] = []+ seen = set()++ file_path = cfg["input"].get("file_path", "")+ if file_path:+ p = Path(file_path)+ if p.is_file() and p.suffix.lower() in SUPPORTED_INPUT_SUFFIXES:+ rp = str(p.resolve())+ seen.add(rp)+ paths.append(p)++ image_dir = cfg["input"].get("image_dir", "")+ if image_dir:+ root = Path(image_dir)+ for p in sorted(root.rglob("*")):+ if not p.is_file() or p.suffix.lower() not in SUPPORTED_IMAGE_SUFFIXES:+ continue+ rp = str(p.resolve())+ if rp in seen:+ continue+ if not _match_manifest(p, selected):+ continue+ seen.add(rp)+ paths.append(p)++ files_dir = cfg["input"].get("files_dir", "")+ if files_dir:+ root = Path(files_dir)+ for p in sorted(root.rglob("*")):+ if not p.is_file() or p.suffix.lower() not in SUPPORTED_INPUT_SUFFIXES:+ continue+ rp = str(p.resolve())+ if rp in seen:+ continue+ if not _match_manifest(p, selected):+ continue+ seen.add(rp)+ paths.append(p)++ return paths+++def _render_pdf_chunk(args):++ pdf_path, first, last = args+ import fitz++ out = []+ doc = fitz.open(pdf_path)+ try:+ for index in range(first, last):+ page = doc.load_page(index)+ pix = page.get_pixmap(matrix=fitz.Matrix(PDF_RENDER_ZOOM, PDF_RENDER_ZOOM), alpha=False)+ out.append((index, pix.width, pix.height, pix.samples))+ finally:+ doc.close()+ return out+++def _render_pdf_pages(pdf_paths: List[Path], workers: int) -> Dict[tuple, tuple]:++ import fitz++ jobs = []+ for path in pdf_paths:+ doc = fitz.open(str(path))+ try:+ page_count = doc.page_count+ finally:+ doc.close()+ for first in range(0, page_count, PDF_RENDER_PAGES_PER_JOB):+ jobs.append((str(path), first, min(first + PDF_RENDER_PAGES_PER_JOB, page_count)))++ if not jobs:+ return {}++ chunks = []+ import concurrent.futures as cf+ import multiprocessing+ import os+++ if workers <= 0:+ workers = min(16, os.cpu_count() or 1)+ workers = max(1, min(workers, len(jobs)))++ if workers <= 1:+ chunks = [_render_pdf_chunk(job) for job in jobs]+ else:+++ ctx = multiprocessing.get_context("spawn")+ with cf.ProcessPoolExecutor(max_workers=workers, mp_context=ctx) as pool:+ chunks = list(pool.map(_render_pdf_chunk, jobs))++ rendered: Dict[tuple, tuple] = {}+ for job, chunk in zip(jobs, chunks):+ source = job[0]+ for index, width, height, samples in chunk:+ rendered[(source, index)] = (width, height, samples)+ return rendered+++def _iter_source_pages(cfg: Dict, runtime_intermediate: Path) -> List[Dict]:+ try:+ import fitz+ except Exception:+ fitz = None+++ render_workers_cfg = int((cfg.get("pipeline") or {}).get("render_workers", -1) or -1)++ source_files = _collect_raw_inputs(cfg)+ page_entries: List[Dict] = []++ pdf_files = [p for p in source_files if p.suffix.lower() == ".pdf"]+ if pdf_files and fitz is None:+ raise RuntimeError("PDF input requires PyMuPDF (fitz); install it in current environment.")++ if pdf_files and render_workers_cfg != 1:+ _t0 = time.time()+ rendered = _render_pdf_pages(pdf_files, render_workers_cfg)+ _render_sec = time.time() - _t0+ _render_workers = render_workers_cfg+ else:+ rendered = {}+ _render_sec = 0.0+ _render_workers = 1++ for path in source_files:+ suffix = path.suffix.lower()+ if suffix in SUPPORTED_IMAGE_SUFFIXES:+ page_entries.append(+ {+ "image_id": path.stem,+ "source_type": "image",+ "source_path": str(path),+ "page_index": None,+ "image_path": str(path),+ }+ )+ continue++ if suffix == ".pdf":+ doc = fitz.open(path)+ try:+ page_count = doc.page_count+ finally:+ doc.close()++ for idx in range(page_count):+ image_id = f"{path.stem}_page_{idx + 1:03d}"+ hit = rendered.get((str(path), idx))+ if hit is not None:+ width, height, samples = hit+ page_entries.append(+ {+ "image_id": image_id,+ "source_type": "pdf",+ "source_path": str(path),+ "page_index": idx,+ "image_path": "",+ "image_size": (width, height),+ "image_bytes": samples,+ }+ )+ continue+++ doc = fitz.open(path)+ try:+ page = doc.load_page(idx)+ pix = page.get_pixmap(matrix=fitz.Matrix(PDF_RENDER_ZOOM, PDF_RENDER_ZOOM), alpha=False)+ finally:+ doc.close()+++ page_entries.append(+ {+ "image_id": image_id,+ "source_type": "pdf",+ "source_path": str(path),+ "page_index": idx,+ "image_path": "",+ "image_size": (pix.width, pix.height),+ "image_bytes": pix.samples,+ }+ )+ continue++ meta = cfg.setdefault("_meta", {})+ meta["render_sec"] = round(_render_sec, 6)+ meta["render_workers"] = _render_workers++ limit = _mode_limit(cfg)+ if limit > 0:+ page_entries = page_entries[:limit]++ used = set()+ for item in page_entries:+ base = item["image_id"]+ name = base+ seq = 2+ while name in used:+ name = f"{base}_{seq}"+ seq += 1+ used.add(name)+ item["image_id"] = name++ return page_entries+++def _open_page_image(entry: Dict) -> Image.Image:++ buf = entry.get("image_bytes")+ if buf:+ width, height = entry["image_size"]+ return Image.frombytes("RGB", [width, height], buf)+ return Image.open(entry["image_path"]).convert("RGB")diff --git a/sdk/minicpmvocr/pipeline/_layout_record.py b/sdk/minicpmvocr/pipeline/_layout_record.pynew file mode 100644index 0000000..18901bc--- /dev/null+++ b/sdk/minicpmvocr/pipeline/_layout_record.py@@ -0,0 +1,245 @@+from __future__ import annotations++import time+from pathlib import Path+from typing import Dict, List++from PIL import Image++from ._inputs import _open_page_image+from ..backends import PNG_COMPRESS_LEVEL+from .._utils import ensure_dir, write_json+++def _to_polygon_points(raw_points) -> List[List[int]]:+ out = []+ for point in raw_points:+ if isinstance(point, (list, tuple)):+ x, y = point[0], point[1]+ else:+ x, y = point.tolist()+ out.append([int(x), int(y)])+ return out++def _build_layout_from_blocks(+ *,+ image: Image.Image,+ image_id: str,+ source_path: str,+ source_type: str,+ page_index: int | None,+ detections: List[Dict],+ blocks: List[Dict],+ crops_root: Path,+ crop_sink: Dict | None = None,+) -> tuple[Dict, Dict]:++ crop_dir = crops_root / image_id+ if crop_sink is None:+ ensure_dir(crop_dir)++ layout_blocks = []+ png_save_sec = 0.0+++ folded_by_leader: Dict[int, List[List[int]]] = {}+ leader_index: Dict[int, int] = {}+ last_leader: int | None = None+ for index, block in enumerate(blocks):+ if block.get("image") is not None:+ last_leader = index+ leader_index[index] = index+ continue+++ group_id = block.get("group_id")+ leader = group_id if group_id in leader_index else last_leader+ if leader is None:+ continue+ folded_by_leader.setdefault(leader, []).append(+ [int(v) for v in block["bbox"]]+ )+++ for order, block in enumerate(blocks):+ crop_image = block.get("image")+ if crop_image is None:+ continue+ label = block["label"]+ x1, y1, x2, y2 = (int(v) for v in block["bbox"])+ crop_filename = f"{order:03d}_{label}.png"+ if crop_sink is not None:+ crop_sink[crop_filename] = crop_image+ else:+ t_save = time.time()+++ Image.fromarray(crop_image).save(crop_dir / crop_filename, compress_level=PNG_COMPRESS_LEVEL)+ png_save_sec += time.time() - t_save+++ regions = [[x1, y1, x2, y2]] + folded_by_leader.get(order, [])+ layout_blocks.append(+ {+ "block_id": order,+ "label": label,+ "bbox": [x1, y1, x2, y2],+++ "regions": regions,+ "order": order,+ "score": round(float(block.get("score", 0.0) or 0.0), 6),+ "crop_filename": crop_filename,+ "crop_width": int(crop_image.shape[1]),+ "crop_height": int(crop_image.shape[0]),+ "skip_vlm": bool(block.get("skip_vlm", False)),+ }+ )++ layout = {+ "image_id": image_id,+ "image_width": image.width,+ "image_height": image.height,+ "num_blocks": len(layout_blocks),+ "png_save_sec": round(png_save_sec, 6),+ "blocks": layout_blocks,+ "source": {+ "type": source_type,+ "path": source_path,+ "relative_path": Path(source_path).name,+ "raw_image_id": image_id,+ "original_stem": Path(source_path).stem,+ "page_index": page_index,+ },+ }++ raw = {+ "input_path": source_path,+ "page_index": page_index,+ "boxes": [+ {+ "order": idx + 1,+ "cls_id": int(detection["class_id"]),+ "label": detection["label"],+ "score": round(float(detection["score"]), 6),+ "coordinate": [round(float(v), 2) for v in detection["bbox"]],+ "polygon_points": _to_polygon_points(detection.get("polygon") or []),+ }+ for idx, detection in enumerate(detections)+ ],+ }+ return layout, raw++def _parse_one_page(+ cfg: Dict, layout_detector, entry: Dict, runtime_intermediate: Path, crop_sink: Dict | None = None, upright_corrector=None,+ page_image=None, upright_ready=None, clock_start: float | None = None,+) -> Dict:++ image_id = entry["image_id"]+ page_t0 = time.time()+ layouts_dir = runtime_intermediate / "layouts"+ raw_result_dir = runtime_intermediate / "layout_raw"+ crops_root = runtime_intermediate / "crops"+ upright_dir = runtime_intermediate / "upright"+ pages_dir = runtime_intermediate / "pages"+ save_pages = bool((cfg.get("pipeline") or {}).get("save_pages", False))++ phase = {+ "image_load_sec": 0.0,+ "upright_sec": 0.0,+ "detect_sec": 0.0,+ "crop_sec": 0.0,+ "page_save_sec": 0.0,+ "write_sec": 0.0,+ }+ try:+ t0 = time.time()+ image = page_image if page_image is not None else _open_page_image(entry)+ phase["image_load_sec"] = 0.0 if page_image is not None else time.time() - t0+++ upright_record = None+ if upright_ready is not None:+ corrected_array, upright_record, upright_sec = upright_ready+ phase["upright_sec"] = float(upright_sec)+ if upright_record.get("applied", False):+ image.close()+ image = Image.fromarray(corrected_array)+ if upright_record:+ ensure_dir(upright_dir)+ write_json(upright_dir / f"{image_id}.json", upright_record)+ elif upright_corrector is not None:+ t0 = time.time()+ import numpy as np+ image_array = np.array(image)+ corrected_array, upright_record = upright_corrector.correct(image_array)+ if upright_record.get("applied", False):+ image.close()+ image = Image.fromarray(corrected_array)+ phase["upright_sec"] = time.time() - t0++ if upright_record:+ ensure_dir(upright_dir)+ write_json(upright_dir / f"{image_id}.json", upright_record)++ t0 = time.time()+ detections = layout_detector.detect([image])[0]+ phase["detect_sec"] = time.time() - t0++ t0 = time.time()+ blocks = layout_detector.crop(image, detections)+ phase["crop_sec"] = time.time() - t0+++ page_image_rel = ""+ if save_pages:+ t0 = time.time()+ ensure_dir(pages_dir)+ page_image_rel = f"pages/{image_id}.png"+ image.save(pages_dir / f"{image_id}.png", compress_level=PNG_COMPRESS_LEVEL)+ phase["page_save_sec"] = time.time() - t0++ t0 = time.time()+ layout, raw = _build_layout_from_blocks(+ image=image,+ image_id=image_id,+ source_path=entry["source_path"],+ source_type=entry["source_type"],+ page_index=entry["page_index"],+ detections=detections,+ blocks=blocks,+ crops_root=crops_root,+ crop_sink=crop_sink,+ )+ if page_image_rel:+ layout["page_image"] = page_image_rel+ if upright_record is not None:+ layout["upright"] = upright_record+++ phase["png_save_sec"] = float(layout.get("png_save_sec", 0.0))+ write_json(layouts_dir / f"{image_id}.json", layout)+ write_json(raw_result_dir / f"{image_id}.json", raw)+ phase["write_sec"] = time.time() - t0 - phase["png_save_sec"]+ image.close()++ return {+ "image_id": image_id,+ "status": "ok",+ "source_path": entry["source_path"],+ "page_index": entry["page_index"],+ "num_blocks": layout["num_blocks"],+ "duration_sec": round(time.time() - (clock_start if clock_start is not None else page_t0), 6),+ **{k: round(v, 6) for k, v in phase.items()},+ }+ except Exception as e:+ return {+ "image_id": image_id,+ "status": "failed",+ "source_path": entry["source_path"],+ "page_index": entry["page_index"],+ "num_blocks": 0,+ "duration_sec": round(time.time() - (clock_start if clock_start is not None else page_t0), 6),+ **{k: round(v, 6) for k, v in phase.items()},+ "error": str(e),+ }diff --git a/sdk/minicpmvocr/pipeline/_metrics.py b/sdk/minicpmvocr/pipeline/_metrics.pynew file mode 100644index 0000000..4415bb8--- /dev/null+++ b/sdk/minicpmvocr/pipeline/_metrics.py@@ -0,0 +1,160 @@+import csv+from pathlib import Path+from typing import Dict, List++from .._utils import mean, percentile, write_json+++PER_PAGE_FIELDS = [+ "image_id",+ "status",+ "page_total_wall_sec",+ "layout_stage_sec",+ "extract_prep_sec",+ "extract_infer_sec",+ "post_process_sec",+ "queue_wait_sec",+ "num_blocks",+ "num_vlm_blocks",+ "num_failed_blocks",+ "output_chars",+ "tts_blocks",+ "tts_multi_candidate",+ "tts_rm_used",+ "tts_rm_changed",+ "tts_rm_sec",+ "tts_sample_sec",+ "tts_render_sec",+ "tts_forward_sec",+ "adaptive_blocks",+ "adaptive_rounds_total",+ "adaptive_passed",+ "adaptive_exhausted",+ "adaptive_rm_calls",+ "error",+]+++def write_per_page_metrics(run_dir: Path, rows: List[Dict]) -> None:+ jsonl_path = run_dir / "per_page_metrics.jsonl"+ csv_path = run_dir / "per_page_metrics.csv"++ with jsonl_path.open("w", encoding="utf-8") as jf:+ for row in rows:+ jf.write(f"{__import__('json').dumps(row, ensure_ascii=False)}\n")++ with csv_path.open("w", encoding="utf-8", newline="") as cf:+ writer = csv.DictWriter(cf, fieldnames=PER_PAGE_FIELDS)+ writer.writeheader()+ for row in rows:+ writer.writerow({k: row.get(k, "") for k in PER_PAGE_FIELDS})+++def _tts_summary(rows: List[Dict]) -> Dict:++ blocks = sum(int(r.get("tts_blocks", 0) or 0) for r in rows)+ if not blocks:+ return {}+ multi = sum(int(r.get("tts_multi_candidate", 0) or 0) for r in rows)+ used = sum(int(r.get("tts_rm_used", 0) or 0) for r in rows)+ changed = sum(int(r.get("tts_rm_changed", 0) or 0) for r in rows)+ rm_sec = sum(float(r.get("tts_rm_sec", 0.0) or 0.0) for r in rows)+ render_sec = sum(float(r.get("tts_render_sec", 0.0) or 0.0) for r in rows)+ forward_sec = sum(float(r.get("tts_forward_sec", 0.0) or 0.0) for r in rows)+ out = {+ "blocks": blocks,+ "multi_candidate": multi,+ "multi_candidate_rate": round(multi / blocks, 6),+ "rm_used": used,+ "rm_used_rate": round(used / blocks, 6),+ "rm_changed": changed,+ "rm_changed_rate": round(changed / used, 6) if used else 0.0,+ "sample_sec_total": round(sum(float(r.get("tts_sample_sec", 0.0) or 0.0) for r in rows), 6),+ "rm_sec_total": round(rm_sec, 6),+++ "rm_render_sec_total": round(render_sec, 6),+ "rm_forward_sec_total": round(forward_sec, 6),+ "rm_render_share": round(render_sec / rm_sec, 6) if rm_sec else 0.0,+ }+ out.update(_adaptive_summary(rows))+ return out+++def _adaptive_summary(rows: List[Dict]) -> Dict:++ blocks = sum(int(r.get("adaptive_blocks", 0) or 0) for r in rows)+ if not blocks:+ return {}+ rounds_total = sum(int(r.get("adaptive_rounds_total", 0) or 0) for r in rows)+ passed = sum(int(r.get("adaptive_passed", 0) or 0) for r in rows)+ exhausted = sum(int(r.get("adaptive_exhausted", 0) or 0) for r in rows)+ rm_calls = sum(int(r.get("adaptive_rm_calls", 0) or 0) for r in rows)+ return {+ "adaptive_blocks": blocks,++ "adaptive_rounds_mean": round(rounds_total / blocks, 6),+ "adaptive_rounds_total": rounds_total,+ "adaptive_passed": passed,+ "adaptive_passed_rate": round(passed / blocks, 6),+ "adaptive_exhausted": exhausted,+ "adaptive_exhausted_rate": round(exhausted / blocks, 6),++ "adaptive_rm_calls": rm_calls,+ "adaptive_rm_calls_per_block": round(rm_calls / blocks, 6),+ }+++def build_summary(rows: List[Dict], planned_count: int, metric_definition: Dict) -> Dict:+ ok_rows = [r for r in rows if r.get("status") == "ok"]+ fail_rows = [r for r in rows if r.get("status") != "ok"]+ wall = [float(r.get("page_total_wall_sec", 0.0)) for r in ok_rows]+++ failed_blocks = sum(int(r.get("num_failed_blocks", 0) or 0) for r in rows)+ pages_with_failed_blocks = sum(+ 1 for r in rows if int(r.get("num_failed_blocks", 0) or 0) > 0+ )+ total_blocks = sum(int(r.get("num_blocks", 0) or 0) for r in rows)+ total_vlm_blocks = sum(int(r.get("num_vlm_blocks", 0) or 0) for r in rows)++ summary = {+ "counts": {+ "planned": planned_count,+ "ok": len(ok_rows),+ "failed": len(fail_rows),+ "blocks": total_blocks,+ "vlm_blocks": total_vlm_blocks,+ "failed_blocks": failed_blocks,+ "pages_with_failed_blocks": pages_with_failed_blocks,+ },+ "timing_sec": {+ "mean": round(mean(wall), 6),+ "median": round(percentile(wall, 0.5), 6),+ "p90": round(percentile(wall, 0.9), 6),+ },+ "stage_sec_total": {+++ "layout": round(sum(float(r.get("layout_stage_sec", 0.0) or 0.0) for r in rows), 6),+ "extract_prep": round(sum(float(r.get("extract_prep_sec", 0.0) or 0.0) for r in rows), 6),+ "extract_infer": round(sum(float(r.get("extract_infer_sec", 0.0) or 0.0) for r in rows), 6),+ "post_process": round(sum(float(r.get("post_process_sec", 0.0) or 0.0) for r in rows), 6),+ "queue_wait": round(sum(float(r.get("queue_wait_sec", 0.0) or 0.0) for r in rows), 6),+ },+ "extract": {+++ "ocr_calls": total_vlm_blocks,+ "chars": sum(int(r.get("output_chars", 0) or 0) for r in rows),+ },+ "metric_definition": metric_definition,+ }+ tts = _tts_summary(rows)+ if tts:+ summary["tts"] = tts+ return summary+++def write_summary(run_dir: Path, summary: Dict) -> None:+ write_json(run_dir / "summary.json", summary)diff --git a/sdk/minicpmvocr/pipeline/_text.py b/sdk/minicpmvocr/pipeline/_text.pynew file mode 100644index 0000000..3f6f189--- /dev/null+++ b/sdk/minicpmvocr/pipeline/_text.py@@ -0,0 +1,81 @@+from __future__ import annotations++import re+from typing import Dict, List++from ..constants import OTSL_LABELS+from ..postprocess.markdown import TEXT_BLOCK_LABELS, split_text_block++INLINE_LATEX_RE = re.compile(r"\\\((.+?)\\\)")+DISPLAY_BRACKET_SEP_RE = re.compile(re.escape(r"\]") + r"\s*" + re.escape(r"\["))+_CLOSING_TOKENS_RE = re.compile(r"\\end\{[^}]*\}|\\\]|\$\$|</(?:table|tr|td|th)>")+++def _truncate_repetitive_suffix(text: str) -> str:++ words = list(re.finditer(r"\S+", text))+ if len(words) < 18:+ return text++ normalized = [match.group(0).lower() for match in words]+ earliest_cut = len(text)+ max_window = min(64, len(words) // 3)+ for window in range(6, max_window + 1):+ limit = len(words) - (window * 3) + 1+ for start in range(limit):+ first = normalized[start : start + window]+ if (+ first == normalized[start + window : start + (window * 2)]+ and first == normalized[start + (window * 2) : start + (window * 3)]+ ):+ earliest_cut = min(earliest_cut, words[start].start())+ break++ if earliest_cut < len(text):+ truncated = text[:earliest_cut].rstrip()+++ tail = text[earliest_cut:]+ closing = _CLOSING_TOKENS_RE.findall(tail)+ if closing:+ truncated = truncated + " " + " ".join(closing)+ return truncated+ return text+++def _normalize_crop_text(text: str, label: str) -> str:+ if text is None:+ return ""+ out = _truncate_repetitive_suffix(text.strip())+ if label != "display_formula":+ out = INLINE_LATEX_RE.sub(lambda m: f"${m.group(1).strip()}$", out)+ else:+ out = DISPLAY_BRACKET_SEP_RE.sub("$$ $$", out)+ out = out.replace("\\[", "").replace("\\]", "")+ out = re.sub(r"[ \t]+", " ", out)+ out = re.sub(r"\n{3,}", "\n\n", out)+ if label in OTSL_LABELS:+ from minicpmvocr.postprocess.otsl import convert_otsl_to_html+ html = convert_otsl_to_html(out)+ if html:+ return html+ return out+++def _normalize_and_dedupe_blocks(blocks: List[Dict]) -> List[Dict]:+ out = []+ seen = set()+ for block in sorted(blocks, key=lambda x: x.get("order", 0)):+ item = dict(block)+ label = item.get("label", "")+ item["content"] = _normalize_crop_text(item.get("content", ""), label)+ if label in TEXT_BLOCK_LABELS:+ item["content"] = split_text_block(item["content"])+ elif label == "inline_formula" and item.get("inline_formula_mixed", False):+ item["content"] = split_text_block(item["content"], protect_inline_math=True)+ key = (item.get("order"), item.get("label"), item.get("content"))+ if key in seen:+ continue+ seen.add(key)+ out.append(item)+ return outdiff --git a/sdk/minicpmvocr/pipeline/_tts.py b/sdk/minicpmvocr/pipeline/_tts.pynew file mode 100644index 0000000..610ef10--- /dev/null+++ b/sdk/minicpmvocr/pipeline/_tts.py@@ -0,0 +1,396 @@+from __future__ import annotations++import hashlib+import logging+import time+from typing import Dict, List, Optional++from PIL import Image++LOGGER = logging.getLogger(__name__)++_ROUND_MIX = 0x9E3779B97F4A7C15+++def _round_seed(case_id: str, round_idx: int, seed_base: int) -> int:++ digest = hashlib.blake2b(case_id.encode("utf-8"), digest_size=8).digest()+ mixed = int.from_bytes(digest, "big") ^ (round_idx * _ROUND_MIX) ^ int(seed_base)++ return mixed & 0x7FFF_FFFF++def _best_scored(texts: List[str], score_by_text: Dict[str, float],+ verdict_by_text: Dict[str, str]):+++ use_verdict = bool(verdict_by_text)+ best_t, best_s = None, None+ for text in texts:+ if use_verdict and verdict_by_text.get(text) != "scored":+ continue+ score = score_by_text.get(text)+ if score is None:+ continue+ if best_s is None or score > best_s:+ best_t, best_s = text, score+ return best_t, best_s++def _execute_block_tts(*, engine, rm_client, tts_cfg: Dict, image, elem_cfg: Dict,+ label: str, case_id: str, infer_t0: float, rm_image=None):++ n_total = int(tts_cfg.get("n", 4))+ sampling = dict(tts_cfg.get("sampling") or {})+ force_score = bool(tts_cfg.get("force_score"))+ if rm_image is None:+ rm_image = image++ greedy_t0 = time.time()+ greedy = engine.recognize(+ image,+ prompt=elem_cfg["prompt"],+ max_new_tokens=elem_cfg["max_new_tokens"],+ slice_nums=elem_cfg["slice_nums"],+ )+ greedy_sec = time.time() - greedy_t0+ candidates = [greedy["text"]]+ output_tokens = greedy.get("output_token_count", 0)++ sample_sec = 0.0+ if n_total > 1:+ sample_t0 = time.time()+ try:+ sampled = engine.recognize(+ image,+ prompt=elem_cfg["prompt"],+ max_new_tokens=elem_cfg["max_new_tokens"],+ slice_nums=elem_cfg["slice_nums"],+ n=n_total - 1,+ decode_overrides=sampling,+ )+ candidates.extend(sampled.get("texts") or [])+ output_tokens += sampled.get("output_token_count", 0)+ except Exception as err:++ LOGGER.warning("TTS sampling failed (%s), continuing with greedy only", err)+ sample_sec = time.time() - sample_t0+++ deduped = [candidates[0]]+ for text in candidates[1:]:+ if text and text not in deduped:+ deduped.append(text)++ rm_sec = 0.0+ rm_wait_sec = 0.0+ rm_call_sec = 0.0+ best_index = 0+ rm_used = False+ rm_error = None+ scores: list = []+ verdicts: list = []+ rm_stage_sec: Dict = {}+ rm_batch_size = 0+ rm_batch_items = 0++ if len(deduped) > 1 or force_score:+ rm_t0 = time.time()+ picked = rm_client.score_best(rm_image, deduped, label,+ case_id=case_id, force=force_score)+ rm_sec = time.time() - rm_t0+ if picked is not None:+ best_index = picked["best_index"]+++ rm_wait_sec = float(picked.get("wait_sec") or 0.0)+ rm_call_sec = float(picked.get("call_sec") or 0.0)+ rm_error = picked.get("error")+ if rm_error:+++ LOGGER.warning("RM call failed for case_id=%s: %s", case_id, rm_error)+ else:+ scores = picked.get("scores") or []+ verdicts = picked.get("verdicts") or []+ rm_stage_sec = picked.get("stage_sec") or {}+ rm_batch_size = int(picked.get("batch_size") or 0)+ rm_batch_items = int(picked.get("batch_items") or 0)+ rm_used = True++ infer_sec = time.time() - infer_t0+ tts_info = {+ "raw_candidate_count": len(candidates),+ "n_candidates": len(deduped),+ "best_index": best_index,+ "greedy_sec": round(greedy_sec, 6),+ "sample_sec": round(sample_sec, 6),+ "rm_sec": round(rm_sec, 6),+ "rm_wait_sec": round(rm_wait_sec, 6),+ "rm_call_sec": round(rm_call_sec, 6),+ "rm_used": rm_used,+ "rm_error": rm_error,+ "scores": scores,+ "verdicts": verdicts,+++ "rm_stage_sec": rm_stage_sec,+ "rm_batch_size": rm_batch_size,+ "rm_batch_items": rm_batch_items,+++ "candidates": candidates,+ "deduped": deduped,+ }+ return deduped[best_index], output_tokens, infer_sec, tts_info++def _execute_block_adaptive(*, engine, rm_client, tts_cfg: Dict, crop_image,+ base_image, rm_image, elem_cfg: Dict, label: str,+ case_id: str, infer_t0: float,+ prior_candidate: Optional[Dict] = None):++ ad = dict(tts_cfg.get("adaptive") or {})+ rounds = list(ad.get("rounds") or [])+ n_max = ad.get("n_max") or len(rounds)+ n_max = max(1, min(int(n_max), len(rounds)))+ tau = float(ad.get("tau", 0.98))+ seed_base = int(ad.get("seed_base", 0))+++ prefilled_declared = any(bool(r.get("prefilled")) for r in rounds[:n_max]+ if isinstance(r, dict))+ if prefilled_declared:+ if not prior_candidate or not prior_candidate.get("text"):+ raise ValueError(+ "轮次表第 1 轮标了 prefilled,但 prior_candidate 没给文本。"+ "prefilled 轮不跑 OCR,先验候选就是这一轮的全部产出。")+ if prior_candidate.get("score") is None:+ raise ValueError(+ "prior_candidate 没给 score。先验分既是停止准则的输入,"+ "也是'返回分 ≥ 先验分'这条不劣化保证的基准,缺了就无从比较。")++ seen: List[str] = []+ seen_set = set()+ score_by_text: Dict[str, float] = {}+ verdict_by_text: Dict[str, str] = {}+ round_log: List[Dict] = []+ round_texts: List[List[str]] = []++ opened_images: List = []+ output_tokens = 0+ greedy_sec = 0.0+ sample_sec_total = 0.0+ rm_sec_total = rm_wait_total = rm_call_total = 0.0+ rm_used = False+ rm_error = None+ rm_calls = 0+ raw_candidate_count = 0+ last_stage_sec: Dict = {}+ last_batch_size = last_batch_items = 0+ best_text = best_score = None+ stop_reason = None+ rounds_used = 0++ try:+ for idx in range(1, n_max + 1):+ spec = dict(rounds[idx - 1])+ rounds_used = idx+ raw_texts: List[str] = []+ ocr_error = None+ r_t0 = time.time()++ prefilled = bool(spec.get("prefilled"))++ if prefilled:+++ raw_texts = [prior_candidate["text"]]+ elif spec.get("greedy"):++ try:+ pred = engine.recognize(+ base_image,+ prompt=elem_cfg["prompt"],+ max_new_tokens=elem_cfg["max_new_tokens"],+ slice_nums=elem_cfg["slice_nums"],+ )+ raw_texts = [pred["text"]]+ output_tokens += pred.get("output_token_count", 0)+ except Exception as err:+ ocr_error = "%s: %s" % (type(err).__name__, err)+ LOGGER.warning("greedy round failed for %s: %s", case_id, ocr_error)+ else:+++ scale = float(spec.get("scale", 1.0) or 1.0)+ ocr_img = base_image+ if scale != 1.0:+ width, height = base_image.size+ ocr_img = base_image.resize(+ (max(1, int(round(width * scale))),+ max(1, int(round(height * scale)))),+ Image.Resampling.LANCZOS)+ opened_images.append(ocr_img)+ overrides = {key: spec[key] for key in+ ("temperature", "top_k", "top_p", "min_p") if key in spec}+ overrides["seed"] = _round_seed(case_id, idx, seed_base)+ n_req = int(spec.get("n", 1))+ try:+ sampled = engine.recognize(+ ocr_img,+ prompt=elem_cfg["prompt"],+ max_new_tokens=elem_cfg["max_new_tokens"],+ slice_nums=elem_cfg["slice_nums"],+ n=n_req,+ decode_overrides=overrides,+ )+ raw_texts = list(sampled.get("texts") or [])+ output_tokens += sampled.get("output_token_count", 0)+ except Exception as err:+ ocr_error = "%s: %s" % (type(err).__name__, err)+ LOGGER.warning("sampling round %d failed for %s: %s",+ idx, case_id, ocr_error)+++ r_sample_sec = time.time() - r_t0+ if prefilled:++ r_sample_sec = 0.0+ greedy_sec = 0.0+ elif spec.get("greedy"):+ greedy_sec = r_sample_sec+ else:+ sample_sec_total += r_sample_sec+ raw_candidate_count += len(raw_texts)+++ new_texts: List[str] = []+ for text in raw_texts:+ if not text or text in seen_set:+ continue+ seen_set.add(text)+ seen.append(text)+ new_texts.append(text)+ round_texts.append(new_texts)+++ r_rm_sec = 0.0+ if prefilled:+++ for text in new_texts:+ score_by_text[text] = float(prior_candidate["score"])+ verdict_by_text[text] = prior_candidate.get("verdict") or "scored"+++ elif new_texts:+ rm_t0 = time.time()+ picked = rm_client.score_best(+ rm_image, new_texts, label,+ case_id="%s#r%d" % (case_id, idx), force=True)+ r_rm_sec = time.time() - rm_t0+ rm_sec_total += r_rm_sec+ if picked is not None:+ rm_calls += 1+ rm_wait_total += float(picked.get("wait_sec") or 0.0)+ rm_call_total += float(picked.get("call_sec") or 0.0)+ err = picked.get("error")+ if err:+ rm_error = err+ LOGGER.warning("RM call failed for case_id=%s#r%d: %s",+ case_id, idx, err)+ else:+ rm_used = True+ scores = picked.get("scores") or []+ verdicts = picked.get("verdicts") or []+ last_stage_sec = picked.get("stage_sec") or last_stage_sec+ last_batch_size = int(picked.get("batch_size") or 0) or last_batch_size+ last_batch_items = int(picked.get("batch_items") or 0) or last_batch_items+ for i, text in enumerate(new_texts):+ if i < len(scores):+ score_by_text[text] = float(scores[i])+ if i < len(verdicts):+ verdict_by_text[text] = verdicts[i]++ best_text, best_score = _best_scored(seen, score_by_text, verdict_by_text)+ entry = {+ "round": idx,+ "greedy": bool(spec.get("greedy")),+ "temperature": spec.get("temperature"),+ "scale": float(spec.get("scale", 1.0) or 1.0),+ "n_req": 1 if spec.get("greedy") else int(spec.get("n", 1)),+ "raw_n": len(raw_texts),+++ "new_n": len(new_texts),+ "cum_unique": len(seen),+ "rm_calls": 0 if prefilled else (1 if new_texts else 0),+ "best_score": best_score,+ "sample_sec": round(r_sample_sec, 6),+ "rm_sec": round(r_rm_sec, 6),+ "ocr_error": ocr_error,+ }+ if prefilled:+ entry["prefilled"] = True+ round_log.append(entry)++ if ocr_error and not seen:+ stop_reason = "ocr_error"+ break+ if best_score is not None and best_score >= tau:+ stop_reason = "passed"+ break+ else:+ stop_reason = "exhausted"+ finally:+ for img in opened_images:+ try:+ img.close()+ except Exception:+ pass++ if best_text is None:++ best_text = seen[0] if seen else ""+ best_index = 0+ if stop_reason not in ("ocr_error",):+ stop_reason = "no_scored"+ else:+ best_index = seen.index(best_text)++ infer_sec = time.time() - infer_t0+++ exhausted = stop_reason == "exhausted"+ tts_info = {+ "raw_candidate_count": raw_candidate_count,+ "n_candidates": len(seen),+ "best_index": best_index,+ "greedy_sec": round(greedy_sec, 6),+ "sample_sec": round(sample_sec_total, 6),+ "rm_sec": round(rm_sec_total, 6),+ "rm_wait_sec": round(rm_wait_total, 6),+ "rm_call_sec": round(rm_call_total, 6),+ "rm_used": rm_used,+ "rm_error": rm_error,+ "scores": [score_by_text.get(t) for t in seen],+ "verdicts": [verdict_by_text.get(t) for t in seen],+ "rm_stage_sec": last_stage_sec,+ "rm_batch_size": last_batch_size,+ "rm_batch_items": last_batch_items,+ "candidates": list(seen),+ "deduped": list(seen),++ "adaptive": True,+ "rounds_used": rounds_used,+ "round_log": round_log,+ "stop_reason": stop_reason,+ "exhausted": exhausted,+ "best_score": best_score,+ "tau": tau,+ "rm_calls": rm_calls,+ "round_texts": round_texts,+ }+ if prefilled_declared:+++ tts_info["prior_injected"] = True+ return best_text, output_tokens, infer_sec, tts_infodiff --git a/sdk/minicpmvocr/pipeline/overlapped.py b/sdk/minicpmvocr/pipeline/overlapped.pynew file mode 100644index 0000000..93aa601--- /dev/null+++ b/sdk/minicpmvocr/pipeline/overlapped.py@@ -0,0 +1,540 @@+from __future__ import annotations++import json+import logging+import os+import threading+import time+from collections import deque+from itertools import count+from queue import Empty, PriorityQueue, Queue+from pathlib import Path+from typing import Dict, List, Optional++from ._blocks import (+ _block_priority,+ _execute_block,+ _failed_block_output,+ _failed_page_result,+ _finalize_page,+ _skipped_page_result,+)+from ._inputs import _iter_source_pages, _open_page_image+from ._layout_record import _parse_one_page+from ._metrics import build_summary, write_per_page_metrics, write_summary+from .upright import build_upright_corrector, upright_enabled+from .._utils import append_jsonl, ensure_dir, now_iso, read_json, write_json+from ..backends import create_backend+from ..layouts import create_layout_detector+from ..prompts import load_prompt_map+from .rm_client import RMClient, build_rm_caller+++LOGGER = logging.getLogger(__name__)++_CROP_POOL = None+_CROP_POOL_LOCK = threading.Lock()+++class _CropPool:+++ def __init__(self, workers: int) -> None:+ self._queue: PriorityQueue = PriorityQueue()+ self._tie = count()+ for index in range(workers):+ threading.Thread(+ target=self._loop, name=f"crop-pool-{index}", daemon=True,+ ).start()++ def submit(self, priority: tuple, fn) -> None:+ self._queue.put((priority[0], priority[1], next(self._tie), fn))++ def _loop(self) -> None:+ while True:+ _, _, _, fn = self._queue.get()+ try:+ fn()+ except Exception:+ LOGGER.exception("crop pool worker failed")+++def shared_crop_pool() -> Optional[_CropPool]:+ 'OCR_SHARED_CROP_POOL=1 时才启用,命令行单次运行仍用自己的线程。'+ if os.environ.get("OCR_SHARED_CROP_POOL", "") != "1":+ return None+ global _CROP_POOL+ with _CROP_POOL_LOCK:+ if _CROP_POOL is None:+ workers = max(1, int(os.environ.get("OCR_CROP_WORKERS", "112") or 112))+ LOGGER.info("shared crop pool workers=%s", workers)+ _CROP_POOL = _CropPool(workers)+ return _CROP_POOL+++def _failed_layout_row(entry: Dict, error: str, started: float) -> Dict:+ return {+ "image_id": entry.get("image_id", ""),+ "status": "failed",+ "source_path": entry.get("source_path", ""),+ "page_index": entry.get("page_index"),+ "num_blocks": 0,+ "duration_sec": round(time.time() - started, 6),+ "image_load_sec": 0.0,+ "upright_sec": 0.0,+ "detect_sec": 0.0,+ "crop_sec": 0.0,+ "page_save_sec": 0.0,+ "write_sec": 0.0,+ "error": error,+ }+++def pipelined_run(cfg: Dict, resources: Dict | None = None, on_layout_idle=None) -> Dict:+ 'Run layout detection and VLM inference concurrently when pipeline.overlap_layout is enabled.'+ run_dir = Path(cfg["_meta"]["run_dir"])+ runtime_dir = run_dir / "runtime"+ runtime_intermediate = Path(cfg["_meta"]["runtime_intermediate_dir"])+ for d in (+ run_dir,+ runtime_dir,+ run_dir / "output",+ run_dir / "results_json",+ run_dir / "logs",+ runtime_intermediate / "layouts",+ runtime_intermediate / "crops",+ runtime_intermediate / "layout_raw",+ ):+ ensure_dir(d)++ prompt_map = load_prompt_map(cfg)+ request_workers = max(1, int(cfg["pipeline"].get("max_workers", 1) or 1))+ progress_every = max(1, int(cfg["logging"].get("progress_log_every", 20)))+++ save_crops = bool(cfg["pipeline"].get("save_crops", False))+ crop_timing_path = runtime_dir / "crop_timing.jsonl"+ page_timing_path = runtime_dir / "page_timing.jsonl"+ tasks_path = runtime_dir / "page_tasks.jsonl"+ tts_dump_path = runtime_dir / "tts_candidates.jsonl"++ _boot_t0 = time.time()+ resources = resources or {}+++ owns_detectors = not resources.get("detectors")+ owns_engine = resources.get("engine") is None+++ layout_workers = max(1, int(cfg["pipeline"].get("layout_workers", 1) or 1))+ _ld_t0 = time.time()+ if owns_detectors:+ detectors = [create_layout_detector(cfg["layout"]) for _ in range(layout_workers)]+ for detector in detectors:+ detector.start()+ else:+ detectors = list(resources["detectors"])++ layout_workers = len(detectors)+ layout_start_sec = time.time() - _ld_t0+++ upright_corrector = resources.get("upright")+ if upright_corrector is None:+ upright_corrector = build_upright_corrector(cfg)+ if not upright_enabled(cfg):++ upright_corrector = None++ engine = resources.get("engine") or create_backend(cfg)+ _en_t0 = time.time()+ if owns_engine:+ engine.start()+ engine_start_sec = time.time() - _en_t0+++ tts_cfg = cfg.get("tts") or {}+ rm_client = RMClient(tts_cfg) if tts_cfg.get("enabled") else None+++ rm_caller, rm_batcher = build_rm_caller(tts_cfg, rm_client) if rm_client is not None else (None, None)+ if rm_client is not None:+ LOGGER.info("TTS enabled: n=%s rm_url=%s rm_batch=%s",+ tts_cfg.get("n"), tts_cfg.get("rm_url"), tts_cfg.get("rm_batch") or "off")+++ _enum_t0 = time.time()+ page_entries = _iter_source_pages(cfg, runtime_intermediate)+ enumerate_sec = time.time() - _enum_t0+ boot_sec = time.time() - _boot_t0+ if not page_entries:+ raise ValueError("No input pages found. Provide input.file_path or input.image_dir or input.files_dir with png/jpg/pdf files.")++ events: Queue = Queue()+++ page_queue: Queue = Queue()+ for indexed_entry in enumerate(page_entries):+ page_queue.put(indexed_entry)+ parse_rows: Dict[int, Dict] = {}+ layout_wall = {"sec": 0.0}++ def _producer(detector) -> None:+++ if upright_corrector is not None and hasattr(upright_corrector, "submit"):+ _producer_prefetched(detector)+ return+ while True:+ try:+ index, entry = page_queue.get_nowait()+ except Empty:+ return+ crops: Dict | None = None if save_crops else {}+ row = _parse_one_page(cfg, detector, entry, runtime_intermediate, crop_sink=crops, upright_corrector=upright_corrector)+ parse_rows[index] = row+ events.put(("page", (row, crops)))++ def _producer_prefetched(detector) -> None:+ import numpy as np+ pending: deque = deque()+ exhausted = False++ def fill() -> None:+ nonlocal exhausted+ window = max(1, int(getattr(upright_corrector, "workers", 1)))+ while not exhausted and len(pending) < window:+ try:+ index, entry = page_queue.get_nowait()+ except Empty:+ exhausted = True+ return+ started = time.time()+ try:+ image = _open_page_image(entry)+ future = upright_corrector.submit(np.asarray(image))+ except Exception as exc:+ row = _failed_layout_row(entry, str(exc), started)+ parse_rows[index] = row+ events.put(("page", (row, {} if not save_crops else None)))+ continue+ pending.append((index, entry, image, started, future))++ fill()+ while pending:+ index, entry, image, started, future = pending.popleft()+ crops: Dict | None = None if save_crops else {}+ try:+ corrected, record, _wait = future.result()+ upright_sec = float(record.get("upright_sec", _wait))+ row = _parse_one_page(+ cfg, detector, entry, runtime_intermediate, crop_sink=crops,+ page_image=image,+ upright_ready=(corrected, record, upright_sec),+ clock_start=started,+ )+ except Exception as exc:+ image.close()+ row = _failed_layout_row(entry, str(exc), started)+ parse_rows[index] = row+ events.put(("page", (row, crops)))+ fill()++ layout_t0 = time.time()+ producers = [+ threading.Thread(target=_producer, args=(detector,), name=f"layout-producer-{i}", daemon=True)+ for i, detector in enumerate(detectors)+ ]+ started = time.time()+ for producer in producers:+ producer.start()++ def _await_layout() -> None:++ for producer in producers:+ producer.join()+ layout_wall["sec"] = time.time() - layout_t0++ if on_layout_idle is not None:+ on_layout_idle()+ events.put(("layout_done", None))++ threading.Thread(target=_await_layout, name="layout-done", daemon=True).start()++ page_states: List[Dict] = []+ per_page: List[Dict] = []+ pages_done = 0+ open_pages = 0+ layout_done = False++ def _finish(state_result: Dict) -> None:+ nonlocal pages_done+ per_page.append(state_result["page_row"])+ for crop_row in state_result.get("crop_rows", []):+ append_jsonl(crop_timing_path, crop_row)+ for dump in state_result.get("tts_dumps", []):+ append_jsonl(tts_dump_path, dump)+ append_jsonl(page_timing_path, state_result["page_timing"])+ pages_done += 1+ if pages_done % progress_every == 0:+ print(f"[pipelined] pages done {pages_done}", flush=True)+++ work_queue: PriorityQueue = PriorityQueue()+ tie = count()+ crop_pool = shared_crop_pool()+ pending_cv = threading.Condition()+ pending = [0]++ def _enqueue(item: tuple) -> None:+ if crop_pool is None:+ work_queue.put(item)+ return+ _, _, _, pos, bpos, work = item++ def _wrapped(pos=pos, bpos=bpos, work=work) -> None:+ try:+ try:+ output = work()+ except BaseException as exc:+ state = page_states[pos] if pos < len(page_states) else None+ block = {}+ image_id = "page"+ if state is not None and bpos < len(state["blocks"]):+ image_id = state["image_id"]+ block = state["blocks"][bpos]+ output = _failed_block_output(image_id, block, f"worker died: {exc}")+ events.put(("block", (pos, bpos, output)))+ finally:+ with pending_cv:+ pending[0] -= 1+ pending_cv.notify_all()++ with pending_cv:+ pending[0] += 1+ crop_pool.submit(item, _wrapped)++ def _consume() -> None:+ while True:+ item = work_queue.get()+ _, _, _, pos, bpos, work = item+ if work is None:+ return+ try:+ events.put(("block", (pos, bpos, work())))+ except BaseException as e:+++ events.put(("block", (pos, bpos, _failed_block_output(+ page_states[pos]["image_id"],+ page_states[pos]["blocks"][bpos],+ f"worker died: {e}",+ ))))+ raise++ workers = []+ if crop_pool is None:+ workers = [+ threading.Thread(target=_consume, name=f"ocr-worker-{i}", daemon=True)+ for i in range(request_workers)+ ]+ for worker in workers:+ worker.start()+ try:+ while not (layout_done and open_pages == 0):+ kind, payload = events.get()+ if kind == "layout_done":+ layout_done = True+ continue+ if kind == "page":+ row, crops = payload+ crops = crops or {}+ image_id = row["image_id"]+ page_started = time.time()+ layout_stage_sec = float(row.get("duration_sec", 0.0))+ if row["status"] != "ok":+ _finish(_failed_page_result(image_id, page_started, layout_stage_sec, row.get("error", "layout failed")))+ continue+ layout_path = runtime_intermediate / "layouts" / f"{image_id}.json"+ crop_dir = runtime_intermediate / "crops" / image_id+ append_jsonl(tasks_path, {+ "image_id": image_id,+ "layout_path": str(layout_path),+ "crop_dir": str(crop_dir),+ "source_path": row.get("source_path", ""),+ })+ try:+ layout = read_json(layout_path, default={}) or {}+ blocks = layout.get("blocks", [])+ md_path = run_dir / "output" / f"{image_id}.md"+ json_path = run_dir / "results_json" / f"{image_id}.json"+ if md_path.exists() and json_path.exists():+ _finish(_skipped_page_result(image_id, page_started, layout_stage_sec, len(blocks), md_path))+ continue+ if not blocks:+ _finish(_finalize_page(+ run_dir=run_dir, image_id=image_id, layout=layout, blocks=blocks,+ block_outputs=[], prompt_map=prompt_map,+ page_started=page_started, layout_stage_sec=layout_stage_sec,+ ))+ continue+ pos = len(page_states)++ def _make_work(block, image_id=image_id, crop_dir=crop_dir, crops=crops):+ crop_array = crops.get(block.get("crop_filename", ""))+++ submitted_at = time.time()++ def _work():+ try:+ return _execute_block(engine, prompt_map, image_id, crop_dir, block,+ crop_array, rm_client=rm_caller, tts_cfg=tts_cfg,+ submitted_at=submitted_at)+ except Exception as e:+ return _failed_block_output(image_id, block, str(e))++ return _work+++ items = [+ _block_priority(prompt_map, block)+ + (next(tie), pos, bpos, _make_work(block))+ for bpos, block in enumerate(blocks)+ ]+ page_states.append({+ "image_id": image_id, "layout": layout, "blocks": blocks,+ "crop_dir": crop_dir, "page_started": page_started,+ "layout_stage_sec": layout_stage_sec,+ "outputs": [None] * len(blocks), "remaining": len(blocks),+ })+ open_pages += 1+++ for item in items:+ _enqueue(item)+ except Exception as e:+ _finish(_failed_page_result(image_id, page_started, layout_stage_sec, str(e)))+ continue+ if kind == "block":+ pos, bpos, output = payload+ state = page_states[pos]+ state["outputs"][bpos] = output+ state["remaining"] -= 1+ if state["remaining"] > 0:+ continue+ try:+ result = _finalize_page(+ run_dir=run_dir, image_id=state["image_id"], layout=state["layout"],+ blocks=state["blocks"], block_outputs=state["outputs"], prompt_map=prompt_map,+ page_started=state["page_started"], layout_stage_sec=state["layout_stage_sec"],+ )+ except Exception as e:+ result = _failed_page_result(state["image_id"], state["page_started"], state["layout_stage_sec"], str(e))+ open_pages -= 1+ _finish(result)+ finally:++ if crop_pool is None:+ for _ in workers:+ work_queue.put((float("inf"), 0, 0, -1, -1, None))+ for worker in workers:+ worker.join()+ else:+ with pending_cv:+ while pending[0]:+ pending_cv.wait()+ if owns_engine:+ engine.stop()+ if owns_detectors:+ for detector in detectors:+ detector.stop()+ for producer in producers:+ producer.join(timeout=10)+ if rm_batcher is not None:+ rm_batcher.flush()+ if rm_client is not None:+ rm_client.close()++ layout_timing_path = runtime_dir / "layout_timing.jsonl"+ with layout_timing_path.open("w", encoding="utf-8") as f:+ for index in sorted(parse_rows):+ f.write(json.dumps(parse_rows[index], ensure_ascii=False) + "\n")++ metric_definition = {+ "pipeline_mode": cfg["run"]["mode"],+ "page_metric": ["page_total_wall_sec", "layout_stage_sec", "extract_prep_sec", "extract_infer_sec", "post_process_sec", "queue_wait_sec"],+ "crop_metric": ["label", "duration_sec", "status", "queue_wait_sec"],+ "ae_metric": ["image_encode_time_sec", "prefill_time_sec", "decode_time_sec", "decode_speed_tps", "output_token_count"],+ "tts_metric": ["raw_candidate_count", "n_candidates", "best_index", "rm_used", "rm_error", "greedy_sec", "sample_sec", "rm_sec", "rm_wait_sec", "rm_call_sec", "rm_stage_sec", "rm_batch_size", "rm_batch_items"],++ "adaptive_metric": ["rounds_used", "stop_reason", "exhausted", "best_score", "rm_calls", "round_log"],+ }+ write_per_page_metrics(run_dir, per_page)+ summary = build_summary(per_page, planned_count=len(page_entries), metric_definition=metric_definition)+++ phase_fields = ("image_load_sec", "upright_sec", "detect_sec", "crop_sec", "png_save_sec", "page_save_sec", "write_sec")+ page_work_sec = sum(float(r.get("duration_sec", 0.0)) for r in parse_rows.values())+ summary["layout_phase"] = {+ "pages": len(parse_rows),+ "layout_wall_sec": round(layout_wall["sec"], 3),+ "page_work_sec": round(page_work_sec, 3),+ "producer_overhead_sec": round(layout_wall["sec"] - page_work_sec, 3),+ "phase_totals": {+ k: round(sum(float(r.get(k, 0.0)) for r in parse_rows.values()), 3) for k in phase_fields+ },+ }+ summary["pipelined"] = {+ "overlap_layout": True,+ "save_crops": save_crops,+ "layout_workers": layout_workers,+ "total_wall_sec": round(time.time() - started, 2),+ "layout_wall_sec": round(layout_wall["sec"], 2),+++ "boot": {+ "boot_sec": round(boot_sec, 3),+ "layout_start_sec": round(layout_start_sec, 3),+ "engine_start_sec": round(engine_start_sec, 3),+ "enumerate_pages_sec": round(enumerate_sec, 3),+++ "render_sec": float(cfg["_meta"].get("render_sec", 0.0) or 0.0),+ "render_workers": cfg["_meta"].get("render_workers", 1),+ },+ }+ write_summary(run_dir, summary)++ run_meta = {+ "run_tag": cfg["run"]["run_tag"],+ "run_root": cfg["run"]["run_root"],+ "run_dir": str(run_dir),+ "created_at": now_iso(),+ "mode": cfg["run"]["mode"],+ "seed": cfg["run"]["seed"],+ "engine": cfg["engine"],+ "layout": cfg["layout"],+ "pipeline": cfg["pipeline"],+ "mm": cfg["mm"],+ "decode": cfg["decode"],+ "prompt": cfg["prompt"],+ "input": cfg["input"],+ "active_intermediate_dir": str(runtime_intermediate),+ "counts": {+ "planned_pages": len(page_entries),+ "ok_pages": sum(1 for x in per_page if x["status"] == "ok"),+ "failed_pages": sum(1 for x in per_page if x["status"] != "ok"),+ "blocks": sum(int(x.get("num_blocks", 0) or 0) for x in per_page),+ "vlm_blocks": sum(int(x.get("num_vlm_blocks", 0) or 0) for x in per_page),+ "failed_blocks": sum(int(x.get("num_failed_blocks", 0) or 0) for x in per_page),+ "pages_with_failed_blocks": sum(+ 1 for x in per_page if int(x.get("num_failed_blocks", 0) or 0) > 0+ ),+ },+ "metric_definition": metric_definition,+ "infer_finished_at": now_iso(),+ "infer_summary": summary,+ }+ write_json(run_dir / "run_meta.json", run_meta)+ return summarydiff --git a/sdk/minicpmvocr/pipeline/rm_client.py b/sdk/minicpmvocr/pipeline/rm_client.pynew file mode 100644index 0000000..0d6d56a--- /dev/null+++ b/sdk/minicpmvocr/pipeline/rm_client.py@@ -0,0 +1,284 @@+from __future__ import annotations++import base64+import io+import logging+import threading+import time+from typing import Dict, List, Optional++import requests+from requests.adapters import HTTPAdapter++LOGGER = logging.getLogger(__name__)+++_CATEGORY_BY_LABEL = {+ "text": "text",+ "title": "text",+ "plain_text": "text",+ "caption": "text",+ "footnote": "text",+ "header": "text",+ "footer": "text",+ "reference": "text",+ "formula": "formula",+++ "display_formula": "formula",+ "isolate_formula": "formula",+ "inline_formula": "formula",+ "interline_equation": "formula",+ "table": "table",+}+++def category_for_label(label: str) -> str:+ return _CATEGORY_BY_LABEL.get((label or "").strip().lower(), "text")+++def text_for_scoring(text: str, label: str) -> str:+ '打分用文本:table 块转成 HTML,其余类目一字不改。'+ if category_for_label(label) != "table":+ return text++ from ._text import _normalize_crop_text+ scored = _normalize_crop_text(text, "table")+ return scored if scored else text+++class RMClient:+ def __init__(self, tts_cfg: Dict):+ self.enabled = bool(tts_cfg.get("enabled", False))+ self.base_url = str(tts_cfg.get("rm_url", "")).rstrip("/")+ self.timeout_sec = float(tts_cfg.get("timeout_sec", 120))+ self.fallback_to_greedy = bool(tts_cfg.get("fallback_to_greedy", True))+++ self.input_form = str(tts_cfg.get("rm_input_form", "")).strip()+ if self.enabled and self.input_form not in ("binary", "ternary"):+ raise ValueError(+ "tts.rm_input_form 必须显式填 binary 或 ternary(实得 %r)。"+ "不给默认值是有意的:默认成 binary 会让三元部署静默降级,"+ "默认成 ternary 会让二元部署陪着渲染还被喂错模板。" % self.input_form)+ self.http = requests.Session()+ self.http.trust_env = False+++ pool = max(1, int(tts_cfg.get("http_pool_maxsize", 64)))+ adapter = HTTPAdapter(pool_connections=pool, pool_maxsize=pool, pool_block=True)+ self.http.mount("http://", adapter)+ self.http.mount("https://", adapter)+++ self.table_html_count = 0+ self._count_lock = threading.Lock()++ def close(self) -> None:+ if self.table_html_count:+ LOGGER.info("RM 打分前把 %d 个 table 候选由 OTSL 转成 HTML"+ "(落盘 candidates 仍为引擎原文)", self.table_html_count)+ self.http.close()++ def build_payload(self, image, candidates: List[str], label: str,+ case_id: str = "") -> Dict:+ 'Build the RM payload, converting table candidates to HTML for scoring.'+ scored = [text_for_scoring(text, label) for text in candidates]+ changed = sum(1 for a, b in zip(candidates, scored) if a != b)+ if changed:+ with self._count_lock:+ self.table_html_count += changed+ return {+ "input_form": self.input_form,+ "case_id": case_id,+ "image": _encode_png_b64(image),+ "candidates": scored,+ "category": category_for_label(label),+ }++ def score_best(self, image, candidates: List[str], label: str,+ case_id: str = "", force: bool = False) -> Optional[Dict]:+ 'Pick the best of ``candidates``.'+ if not self.enabled or not self.base_url or not candidates:+ return None+ if len(candidates) == 1 and not force:+ return {"best_index": 0, "best_text": candidates[0],+ "scores": [], "verdicts": []}++ payload = self.build_payload(image, candidates, label, case_id)+ t0 = time.time()+ try:+ resp = self.http.post(+ "%s/v1/rm/score_best" % self.base_url,+ json=payload,+ timeout=self.timeout_sec,+ )+ resp.raise_for_status()+ body = resp.json()+ except Exception as err:+ if not self.fallback_to_greedy:+ raise+ return _failure(candidates, err, call_sec=time.time() - t0)+ return _adopt(candidates, body, call_sec=time.time() - t0)++ def score_best_batch(self, payloads: List[Dict]) -> Dict:+ 'One HTTP call for several blocks. Returns the parsed body.'+ resp = self.http.post(+ "%s/v1/rm/score_best_batch" % self.base_url,+++ json={"input_form": self.input_form, "items": payloads},+ timeout=self.timeout_sec,+ )+ resp.raise_for_status()+ return resp.json()+++def _failure(candidates: List[str], reason, *, call_sec: float = 0.0) -> Dict:++ text = "%s: %s" % (type(reason).__name__, reason) if isinstance(reason, BaseException) else str(reason)+ LOGGER.warning("RM score_best failed (%s), keeping greedy candidate", text)+ return {"best_index": 0, "best_text": candidates[0], "scores": [], "verdicts": [],+ "error": text, "call_sec": call_sec}+++def _adopt(candidates: List[str], body: Dict, *, call_sec: float = 0.0) -> Dict:+ index = int(body.get("best_index", 0))+ if not 0 <= index < len(candidates):+ return _failure(candidates, "out-of-range best_index=%s" % index, call_sec=call_sec)+ return {+ "best_index": index,+ "best_text": candidates[index],+ "scores": body.get("scores", []),+ "verdicts": body.get("verdicts", []),+++ "stage_sec": body.get("stage_sec", {}),+ "batch_size": body.get("batch_size", 0),+ "call_sec": call_sec,+ }+++class _Slot:+++ __slots__ = ("payload", "candidates", "result", "done", "queued_at", "wait_sec")++ def __init__(self, payload: Dict, candidates: List[str]) -> None:+ self.payload = payload+ self.candidates = candidates+ self.result: Optional[Dict] = None+ self.done = threading.Event()+ self.queued_at = time.time()+ self.wait_sec = 0.0++ def settle(self, result: Dict) -> None:+ result["wait_sec"] = self.wait_sec+ self.result = result+ self.done.set()+++class RMBatcher:+ 'Blocking cross-block batcher: send when ``max_items`` pile up or a waiter has waited ``max_wait_sec``.'++ def __init__(self, client: "RMClient", max_items: int = 4, max_wait_sec: float = 0.05) -> None:+ self.client = client+ self.max_items = max(1, int(max_items))+ self.max_wait_sec = max(0.0, float(max_wait_sec))+ self._lock = threading.Lock()+ self._pending: List[_Slot] = []++ @property+ def enabled(self) -> bool:+ return self.client.enabled and bool(self.client.base_url)++ def score_best(self, image, candidates: List[str], label: str,+ case_id: str = "", force: bool = False) -> Optional[Dict]:+ 'Same contract as ``RMClient.score_best``, plus wait_sec/call_sec.'+ if not self.enabled or not candidates:+ return None+ if len(candidates) == 1 and not force:+ return {"best_index": 0, "best_text": candidates[0],+ "scores": [], "verdicts": []}++ slot = _Slot(self.client.build_payload(image, candidates, label, case_id), candidates)+ batch = None+ with self._lock:+ self._pending.append(slot)+ if len(self._pending) >= self.max_items:+ batch, self._pending = self._pending, []++ if batch is None and not slot.done.wait(self.max_wait_sec):++ with self._lock:+ if not slot.done.is_set() and slot in self._pending:+ batch, self._pending = self._pending, []++ if batch is not None:+ self._dispatch(batch)+ slot.done.wait()+ return slot.result++ def flush(self) -> None:+ with self._lock:+ batch, self._pending = self._pending, []+ if batch:+ self._dispatch(batch)++ def _dispatch(self, batch: List[_Slot]) -> None:+ now = time.time()+ for slot in batch:+ slot.wait_sec = now - slot.queued_at++ t0 = time.time()+ try:+ body = self.client.score_best_batch([slot.payload for slot in batch])+ results = body.get("results") or []+ if len(results) != len(batch):+ raise ValueError("batch returned %d results for %d items"+ % (len(results), len(batch)))+ except Exception as err:+++ call_sec = time.time() - t0+ for slot in batch:+ slot.settle(_failure(slot.candidates, err, call_sec=call_sec))+ if not self.client.fallback_to_greedy:+ raise+ return++ call_sec = time.time() - t0+ batch_size = int(body.get("batch_size") or 0)+ stage_sec = body.get("stage_sec") or {}+ for slot, result in zip(batch, results):+ adopted = _adopt(slot.candidates, result, call_sec=call_sec)+++ adopted["stage_sec"] = stage_sec+ adopted["batch_size"] = batch_size+ adopted["batch_items"] = len(batch)+ slot.settle(adopted)+++def _encode_png_b64(image) -> str:+ buf = io.BytesIO()+ image.save(buf, format="PNG")+ return base64.b64encode(buf.getvalue()).decode("ascii")+++def build_rm_caller(tts_cfg: Dict, client: "RMClient"):+ 'Pick the scoring entry point: batched when configured, else per-block.'+ batch_cfg = dict(tts_cfg.get("rm_batch") or {})+ max_items = int(batch_cfg.get("max_items", 1))+ if max_items <= 1:+ return client, None+ batcher = RMBatcher(+ client,+ max_items=max_items,+ max_wait_sec=float(batch_cfg.get("max_wait_ms", 50)) / 1000.0,+ )+ return batcher, batcher+++__all__ = ["RMClient", "RMBatcher", "build_rm_caller", "category_for_label",+ "text_for_scoring"]diff --git a/sdk/minicpmvocr/pipeline/staged.py b/sdk/minicpmvocr/pipeline/staged.pynew file mode 100644index 0000000..66ddddd--- /dev/null+++ b/sdk/minicpmvocr/pipeline/staged.py@@ -0,0 +1,493 @@+from __future__ import annotations++import json+import logging+import time+from concurrent.futures import ThreadPoolExecutor, as_completed+from pathlib import Path+from typing import Dict, List, Optional++from ..config import DEFAULT_CONFIG+from ._blocks import (+ _block_priority,+ _execute_block,+ _failed_block_output,+ _failed_page_result,+ _finalize_page,+ _skipped_page_result,+)+from ._inputs import _iter_source_pages, _load_manifest_filter, _mode_limit+from ._layout_record import _parse_one_page+from ..prompts import load_prompt_map+from ..backends import create_backend+from ..layouts import create_layout_detector+from ._metrics import build_summary, write_per_page_metrics, write_summary+from .upright import build_upright_corrector+from .rm_client import RMClient, build_rm_caller+from .._utils import (+ append_jsonl,+ ensure_dir,+ now_iso,+ read_json,+ read_jsonl,+ write_json,+)+++LOGGER = logging.getLogger(__name__)+++def _update_run_meta(run_meta_path: Path, updates: Dict) -> None:+ meta = read_json(run_meta_path, default={}) or {}+ meta.update(updates)+ write_json(run_meta_path, meta)+++def parse_layout_run(cfg: Dict) -> Dict:+ _stage_t0 = time.time()+ run_dir = Path(cfg["_meta"]["run_dir"])+ runtime_dir = run_dir / "runtime"+ runtime_intermediate = Path(cfg["_meta"]["runtime_intermediate_dir"])+ layouts_dir = runtime_intermediate / "layouts"+ crops_root = runtime_intermediate / "crops"++ ensure_dir(run_dir)+ ensure_dir(runtime_dir)+ ensure_dir(layouts_dir)+ ensure_dir(crops_root)+ ensure_dir(run_dir / "logs")++ layout_detector = create_layout_detector(cfg["layout"])+ layout_detector.start()+ provider = layout_detector.name++ upright_corrector = build_upright_corrector(cfg)++ page_entries = _iter_source_pages(cfg, runtime_intermediate)+ if not page_entries:+ raise ValueError("No input pages found. Provide input.file_path or input.image_dir or input.files_dir with png/jpg/pdf files.")++ parse_rows = []+ errors = []+ raw_result_dir = runtime_intermediate / "layout_raw"+ ensure_dir(raw_result_dir)++ layout_loop_t0 = time.time()+ for entry in page_entries:+ row = _parse_one_page(cfg, layout_detector, entry, runtime_intermediate, upright_corrector=upright_corrector)+ if row["status"] != "ok":+ errors.append({"image_id": row["image_id"], "error": row.get("error", "")})+ parse_rows.append(row)+ layout_loop_sec = time.time() - layout_loop_t0++ layout_detector.stop()++ layout_timing_path = runtime_dir / "layout_timing.jsonl"+ with layout_timing_path.open("w", encoding="utf-8") as f:+ for row in parse_rows:+ f.write(json.dumps(row, ensure_ascii=False) + "\n")++ cfg["_meta"]["active_intermediate_dir"] = str(runtime_intermediate)++ phase_fields = ("image_load_sec", "upright_sec", "detect_sec", "crop_sec", "png_save_sec", "page_save_sec", "write_sec")+ page_work_sec = sum(float(r.get("duration_sec", 0.0)) for r in parse_rows)+ phase_totals = {+ k: round(sum(float(r.get(k, 0.0)) for r in parse_rows), 3) for k in phase_fields+ }++ summary = {+ "status": "ok" if not errors else "partial_failed",+ "provider": provider,+ "device": layout_detector.device,+ "model_dir": cfg["layout"].get("model_dir", ""),+ "model_ref": layout_detector.model_ref(),+ "active_intermediate_dir": str(runtime_intermediate),+ "num_pages": len(page_entries),+ "ok_pages": sum(1 for x in parse_rows if x["status"] == "ok"),+ "failed_pages": sum(1 for x in parse_rows if x["status"] != "ok"),+ "model_load_sec": round(layout_detector.model_load_sec, 6),+++ "timing_sec": {+ "stage_sec": round(time.time() - _stage_t0, 3),+ "loop_sec": round(layout_loop_sec, 3),+ "page_work_sec": round(page_work_sec, 3),+ "loop_overhead_sec": round(layout_loop_sec - page_work_sec, 3),+ "phase_totals": phase_totals,+ },+ }+ if errors:+ summary["errors"] = errors[:20]++ _update_run_meta(+ run_dir / "run_meta.json",+ {+ "parse_layout_finished_at": now_iso(),+ "layout": cfg["layout"],+ "parse_layout_summary": summary,+ "active_intermediate_dir": str(runtime_intermediate),+ },+ )+ return summary+++def prepare_run(cfg: Dict) -> Dict:+ run_dir = Path(cfg["_meta"]["run_dir"])+ runtime_dir = run_dir / "runtime"+ ensure_dir(run_dir)+ ensure_dir(runtime_dir)+ ensure_dir(run_dir / "output")+ ensure_dir(run_dir / "results_json")+ ensure_dir(run_dir / "logs")++ active_intermediate = cfg["_meta"].get("active_intermediate_dir")+ if not active_intermediate:+ raise ValueError("No runtime intermediate dir available in config metadata")++ layouts_dir = Path(active_intermediate) / "layouts"+ if not layouts_dir.exists() or not list(layouts_dir.glob("*.json")):+ parse_layout_run(cfg)+ active_intermediate = cfg["_meta"].get("active_intermediate_dir")+ layouts_dir = Path(active_intermediate) / "layouts"++ if not layouts_dir.exists():+ raise FileNotFoundError(f"Layout dir not found: {layouts_dir}")++ layout_files = sorted(layouts_dir.glob("*.json"))+ selected = _load_manifest_filter(cfg["input"].get("manifest", ""))+ if selected:+ layout_files = [p for p in layout_files if p.stem in selected or p.name in selected]++ limit = _mode_limit(cfg)+ if limit > 0:+ layout_files = layout_files[:limit]++ tasks = []+ for layout_path in layout_files:+ image_id = layout_path.stem+ tasks.append(+ {+ "image_id": image_id,+ "layout_path": str(layout_path),+ "crop_dir": str(Path(active_intermediate) / "crops" / image_id),+ "source_path": "",+ }+ )++ tasks_path = runtime_dir / "page_tasks.jsonl"+ with tasks_path.open("w", encoding="utf-8") as f:+ for row in tasks:+ f.write(json.dumps(row, ensure_ascii=False) + "\n")++ metric_definition = {+ "pipeline_mode": cfg["run"]["mode"],+ "page_metric": ["page_total_wall_sec", "layout_stage_sec", "extract_prep_sec", "extract_infer_sec", "post_process_sec", "queue_wait_sec"],+ "crop_metric": ["label", "duration_sec", "status", "queue_wait_sec"],+ "ae_metric": ["image_encode_time_sec", "prefill_time_sec", "decode_time_sec", "decode_speed_tps", "output_token_count"],+ "tts_metric": ["raw_candidate_count", "n_candidates", "best_index", "rm_used", "rm_error", "greedy_sec", "sample_sec", "rm_sec", "rm_wait_sec", "rm_call_sec", "rm_stage_sec", "rm_batch_size", "rm_batch_items"],++ "adaptive_metric": ["rounds_used", "stop_reason", "exhausted", "best_score", "rm_calls", "round_log"],+ }++ prior_meta = read_json(run_dir / "run_meta.json", default={}) or {}+ run_meta = {+ "run_tag": cfg["run"]["run_tag"],+ "run_root": cfg["run"]["run_root"],+ "run_dir": str(run_dir),+ "created_at": prior_meta.get("created_at", now_iso()),+ "mode": cfg["run"]["mode"],+ "seed": cfg["run"]["seed"],+ "engine": cfg["engine"],+ "layout": cfg["layout"],+ "pipeline": cfg["pipeline"],+ "mm": cfg["mm"],+ "decode": cfg["decode"],+ "prompt": cfg["prompt"],+ "input": cfg["input"],+ "active_intermediate_dir": str(active_intermediate),+ "counts": {"planned_pages": len(tasks)},+ "metric_definition": metric_definition,+ }+ if "parse_layout_summary" in prior_meta:+ run_meta["parse_layout_summary"] = prior_meta["parse_layout_summary"]+ if "parse_layout_finished_at" in prior_meta:+ run_meta["parse_layout_finished_at"] = prior_meta["parse_layout_finished_at"]++ write_json(run_dir / "run_meta.json", run_meta)+ return run_meta+++def _infer_concurrent(+ *,+ run_dir: Path,+ tasks: List[Dict],+ engine,+ prompt_map: Dict,+ request_workers: int,+ progress_every: int,+ rm_client=None,+ tts_cfg: Optional[Dict] = None,+) -> Dict[int, Dict]:++ page_states: List[Dict] = []+ flat: List[tuple] = []++ for pos, task in enumerate(tasks):+ image_id = task["image_id"]+ page_started = time.time()+ layout_stage_sec = 0.0+ state: Dict = {"image_id": image_id, "result": None}+ try:+ layout_t0 = time.time()+ layout = read_json(Path(task["layout_path"]), default={}) or {}+ blocks = layout.get("blocks", [])+ layout_stage_sec = time.time() - layout_t0++ md_path = run_dir / "output" / f"{image_id}.md"+ json_path = run_dir / "results_json" / f"{image_id}.json"+ if md_path.exists() and json_path.exists():+ state["result"] = _skipped_page_result(image_id, page_started, layout_stage_sec, len(blocks), md_path)+ elif not blocks:+ state["result"] = _finalize_page(+ run_dir=run_dir,+ image_id=image_id,+ layout=layout,+ blocks=blocks,+ block_outputs=[],+ prompt_map=prompt_map,+ page_started=page_started,+ layout_stage_sec=layout_stage_sec,+ )+ else:+ state.update(+ {+ "layout": layout,+ "blocks": blocks,+ "crop_dir": Path(task["crop_dir"]),+ "page_started": page_started,+ "layout_stage_sec": layout_stage_sec,+ "outputs": [None] * len(blocks),+ "remaining": len(blocks),+ }+ )+ for bpos, block in enumerate(blocks):+ flat.append((pos, bpos, block))+ except Exception as e:+ state["result"] = _failed_page_result(image_id, page_started, layout_stage_sec, str(e))+ page_states.append(state)+++ flat.sort(key=lambda item: _block_priority(prompt_map, item[2]))++ total_pages = len(tasks)+ completed_pages = sum(1 for s in page_states if s["result"] is not None)++ def _run_one(pos: int, block: Dict, submitted_at: float = 0.0) -> Dict:+ state = page_states[pos]+ try:+ return _execute_block(engine, prompt_map, state["image_id"], state["crop_dir"], block,+ rm_client=rm_client, tts_cfg=tts_cfg,+ submitted_at=submitted_at or None)+ except Exception as e:+ return _failed_block_output(state["image_id"], block, str(e))++ if flat:+ with ThreadPoolExecutor(max_workers=min(request_workers, len(flat))) as executor:+ _now = time.time()+ futures = {executor.submit(_run_one, pos, block, _now): (pos, bpos) for pos, bpos, block in flat}+ for future in as_completed(futures):+ pos, bpos = futures[future]+ state = page_states[pos]+ state["outputs"][bpos] = future.result()+ state["remaining"] -= 1+ if state["remaining"] > 0:+ continue+ try:+ state["result"] = _finalize_page(+ run_dir=run_dir,+ image_id=state["image_id"],+ layout=state["layout"],+ blocks=state["blocks"],+ block_outputs=state["outputs"],+ prompt_map=prompt_map,+ page_started=state["page_started"],+ layout_stage_sec=state["layout_stage_sec"],+ )+ except Exception as e:+ state["result"] = _failed_page_result(+ state["image_id"], state["page_started"], state["layout_stage_sec"], str(e)+ )+ completed_pages += 1+ if completed_pages % progress_every == 0 or completed_pages == total_pages:+ print(f"[infer] progress {completed_pages}/{total_pages}")++ return {pos: state["result"] for pos, state in enumerate(page_states)}+++def infer_run(cfg: Dict) -> Dict:+ run_dir = Path(cfg["_meta"]["run_dir"])+ run_meta_path = run_dir / "run_meta.json"+ if not run_meta_path.exists():+ prepare_run(cfg)++ prompt_map = load_prompt_map(cfg)+ tasks = read_jsonl(run_dir / "runtime" / "page_tasks.jsonl")+ engine = create_backend(cfg)+ engine.start()++ per_page: List[Dict] = []+ progress_every = max(1, int(cfg["logging"].get("progress_log_every", 20)))+ runtime_dir = run_dir / "runtime"+ crop_timing_path = runtime_dir / "crop_timing.jsonl"+ page_timing_path = runtime_dir / "page_timing.jsonl"+ page_workers = max(1, int(cfg["pipeline"].get("page_workers", 1) or 1))+ block_workers = max(1, int(cfg["pipeline"].get("max_workers", 1) or 1))+++ queue_mode = str(+ cfg["pipeline"].get("queue_mode") or DEFAULT_CONFIG["pipeline"]["queue_mode"]+ ).lower()+++ tts_cfg = cfg.get("tts") or {}+ rm_client = RMClient(tts_cfg) if tts_cfg.get("enabled") else None+++ rm_caller, rm_batcher = build_rm_caller(tts_cfg, rm_client) if rm_client is not None else (None, None)+ if rm_client is not None:+ LOGGER.info("TTS enabled: n=%s rm_url=%s rm_batch=%s",+ tts_cfg.get("n"), tts_cfg.get("rm_url"), tts_cfg.get("rm_batch") or "off")++ try:+ def _process_page(task: Dict) -> Dict:+ image_id = task["image_id"]+ page_started = time.time()+ layout_stage_sec = 0.0+ try:+ layout_t0 = time.time()+ layout = read_json(Path(task["layout_path"]), default={}) or {}+ blocks = layout.get("blocks", [])+ layout_stage_sec = time.time() - layout_t0++ crop_dir = Path(task["crop_dir"])+ md_path = run_dir / "output" / f"{image_id}.md"+ json_path = run_dir / "results_json" / f"{image_id}.json"+ if md_path.exists() and json_path.exists():+ return _skipped_page_result(image_id, page_started, layout_stage_sec, len(blocks), md_path)++ if block_workers == 1 or len(blocks) <= 1:+ block_outputs = [+ _execute_block(engine, prompt_map, image_id, crop_dir, block,+ rm_client=rm_caller, tts_cfg=tts_cfg)+ for block in blocks+ ]+ else:+ block_outputs_by_idx = {}+ with ThreadPoolExecutor(max_workers=min(block_workers, len(blocks))) as executor:+ _now = time.time()+ futures = {+ executor.submit(_execute_block, engine, prompt_map, image_id, crop_dir, block,+ rm_client=rm_caller, tts_cfg=tts_cfg,+ submitted_at=_now): i+ for i, block in enumerate(blocks)+ }+ for future in as_completed(futures):+ block_outputs_by_idx[futures[future]] = future.result()+ block_outputs = [block_outputs_by_idx[i] for i in range(len(blocks))]++ return _finalize_page(+ run_dir=run_dir,+ image_id=image_id,+ layout=layout,+ blocks=blocks,+ block_outputs=block_outputs,+ prompt_map=prompt_map,+ page_started=page_started,+ layout_stage_sec=layout_stage_sec,+ )+ except Exception as e:+ return _failed_page_result(image_id, page_started, layout_stage_sec, str(e))++ page_results_by_idx = {}+ if queue_mode == "concurrent":+ page_results_by_idx = _infer_concurrent(+ run_dir=run_dir,+ tasks=tasks,+ engine=engine,+ prompt_map=prompt_map,+ request_workers=block_workers,+ progress_every=progress_every,+ rm_client=rm_caller,+ tts_cfg=tts_cfg,+ )+ elif page_workers == 1 or len(tasks) <= 1:+ for idx, task in enumerate(tasks, start=1):+ page_results_by_idx[idx - 1] = _process_page(task)+ if idx % progress_every == 0:+ print(f"[infer] progress {idx}/{len(tasks)}")+ else:+ completed = 0+ with ThreadPoolExecutor(max_workers=min(page_workers, len(tasks))) as executor:+ futures = {executor.submit(_process_page, task): i for i, task in enumerate(tasks)}+ for future in as_completed(futures):+ task_idx = futures[future]+ try:+ page_results_by_idx[task_idx] = future.result()+ except Exception as e:+ image_id = tasks[task_idx].get("image_id", f"task_{task_idx}")+ failed_row = {+ "image_id": image_id,+ "status": "failed",+ "page_total_wall_sec": 0.0,+ "layout_stage_sec": 0.0,+ "extract_prep_sec": 0.0,+ "extract_infer_sec": 0.0,+ "post_process_sec": 0.0,+ "num_blocks": 0,+ "num_vlm_blocks": 0,+ "num_failed_blocks": 1,+ "output_chars": 0,+ "error": str(e),+ }+ page_results_by_idx[task_idx] = {+ "page_row": failed_row,+ "page_timing": {"image_id": image_id, "status": "failed", "duration_sec": 0.0, "error": str(e)},+ "crop_rows": [],+ }+ completed += 1+ if completed % progress_every == 0 or completed == len(tasks):+ print(f"[infer] progress {completed}/{len(tasks)}")++ for idx in range(len(tasks)):+ result = page_results_by_idx[idx]+ per_page.append(result["page_row"])+ for crop_row in result.get("crop_rows", []):+ append_jsonl(crop_timing_path, crop_row)+ for dump in result.get("tts_dumps", []):+ append_jsonl(runtime_dir / "tts_candidates.jsonl", dump)+ append_jsonl(page_timing_path, result["page_timing"])+ finally:+ engine.stop()+ if rm_batcher is not None:+ rm_batcher.flush()+ if rm_client is not None:+ rm_client.close()++ metric_definition = read_json(run_meta_path, default={}).get("metric_definition", {})+ write_per_page_metrics(run_dir, per_page)+ summary = build_summary(per_page, planned_count=len(tasks), metric_definition=metric_definition)+ write_summary(run_dir, summary)++ _update_run_meta(+ run_meta_path,+ {+ "infer_finished_at": now_iso(),+ "counts": {+ "planned_pages": len(tasks),+ "ok_pages": sum(1 for x in per_page if x["status"] == "ok"),+ "failed_pages": sum(1 for x in per_page if x["status"] != "ok"),+ },+ "infer_summary": summary,+ },+ )+ return summarydiff --git a/sdk/minicpmvocr/pipeline/upright.py b/sdk/minicpmvocr/pipeline/upright.pynew file mode 100644index 0000000..fedcf41--- /dev/null+++ b/sdk/minicpmvocr/pipeline/upright.py@@ -0,0 +1,526 @@+from __future__ import annotations++import base64+import io+import json+import os+import queue+import threading+import time+import urllib.request+from concurrent.futures import Future+from pathlib import Path+from typing import Dict, List, Optional, Tuple++import numpy as np++SMALL = 1100+++def _cv2():+ import cv2++ return cv2+++def binarize(img_bgr, size=None):+ cv2 = _cv2()+ g = cv2.cvtColor(img_bgr, cv2.COLOR_BGR2GRAY)+ h, w = g.shape+ s = (size or SMALL) / max(h, w)+ if s < 1:+ g = cv2.resize(g, (int(w * s), int(h * s)), interpolation=cv2.INTER_AREA)++ m = int(0.02 * max(g.shape))+ g = g[m:g.shape[0] - m, m:g.shape[1] - m]+ b = cv2.adaptiveThreshold(g, 255, cv2.ADAPTIVE_THRESH_GAUSSIAN_C,+ cv2.THRESH_BINARY_INV, max(15, int((size or SMALL) / 35)) | 1, 15)++ b = cv2.morphologyEx(b, cv2.MORPH_OPEN, np.ones((2, 2), np.uint8))+ return b+++def rotate_keep(b, angle):+ cv2 = _cv2()+ h, w = b.shape+ c = (w / 2, h / 2)+ M = cv2.getRotationMatrix2D(c, angle, 1.0)+ cos, sin = abs(M[0, 0]), abs(M[0, 1])+ nw, nh = int(h * sin + w * cos), int(h * cos + w * sin)+ M[0, 2] += nw / 2 - c[0]+ M[1, 2] += nh / 2 - c[1]+ return cv2.warpAffine(b, M, (nw, nh), flags=cv2.INTER_NEAREST, borderValue=0)+++def profile_sharpness(b):+ "How 'line-like' each axis is: mean squared gradient of the profile, scale-normalized."+ cv2 = _cv2()+ out = []+ for ax in (1, 0):+ p = b.sum(axis=ax).astype(np.float64)+ p = cv2.GaussianBlur(p.reshape(-1, 1), (1, 5), 0).ravel()+ mu = p.mean()+ if mu < 1e-6:+ out.append(0.0)+ continue+ d = np.diff(p)+ out.append(float((d * d).mean() / (mu * mu)))+ return out+++_PROBE_ANGLES = (0.0, -1.0, 1.0, -2.0, 2.0, -4.0, 4.0)+++_NEAR_MARGIN = 2.0+_FAR_MARGIN = 4.0+++def _downscale_bin(b, limit):+ cv2 = _cv2()+ if max(b.shape) <= limit:+ return b+ s = limit / max(b.shape)+ return cv2.resize(b, (int(b.shape[1] * s), int(b.shape[0] * s)), interpolation=cv2.INTER_AREA)+++def _score_angles(small, angles):+ scores = {}+ best_a, best_s = 0.0, -1.0+ for angle in angles:+ score = max(profile_sharpness(rotate_keep(small, float(angle))))+ scores[float(angle)] = score+ if score > best_s:+ best_a, best_s = float(angle), score+ return best_a, scores+++def estimate_skew(b):+ 'Return skew in (-45,45]: rotating the image by the result (CCW) aligns text to the grid.'+ small = _downscale_bin(b, 700)+ _, probe = _score_angles(small, _PROBE_ANGLES)+ near = max(probe[-1.0], probe[1.0], 1e-9)+ far = max(probe[-2.0], probe[2.0], probe[-4.0], probe[4.0], 1e-9)+ if probe[0.0] >= _NEAR_MARGIN * near and probe[0.0] >= _FAR_MARGIN * far:+ return 0.0+ best, _ = _score_angles(small, np.arange(-44.0, 44.001, 2.0))+ best, _ = _score_angles(small, np.arange(best - 1.2, best + 1.2001, 0.2))+ return float(best)+++def refine_skew(b, span=1.0, step=0.05, res=1400):+ 'Local skew refinement at higher resolution; returns extra CCW rotation.'+ cv2 = _cv2()+ small = b+ if max(small.shape) > res:+ s = res / max(small.shape)+ small = cv2.resize(small, (int(small.shape[1] * s), int(small.shape[0] * s)),+ interpolation=cv2.INTER_AREA)+ angles = np.arange(-span, span + 1e-9, step)+ sc = [max(profile_sharpness(rotate_keep(small, a))) for a in angles]+ return float(angles[int(np.argmax(sc))])+++def segment_lines(b):+ 'Rows of text lines from the horizontal profile; returns list of (y0, y1).'+ cv2 = _cv2()+ p = b.sum(axis=1).astype(np.float64)+ p = cv2.GaussianBlur(p.reshape(-1, 1), (1, 5), 0).ravel()+ th = 0.15 * np.percentile(p, 95) if p.max() > 0 else 0+ on = p > th+ lines, y0 = [], None+ for i, v in enumerate(on):+ if v and y0 is None:+ y0 = i+ elif not v and y0 is not None:+ if i - y0 >= 4:+ lines.append((y0, i))+ y0 = None+ if y0 is not None and len(on) - y0 >= 4:+ lines.append((y0, len(on)))+ return lines+++def rotate_full(img, angle, interp=None):+ 'Rotate a full-resolution page by `angle` degrees CCW on a white canvas.'+ cv2 = _cv2()+ if interp is None:+ interp = cv2.INTER_CUBIC+ h, w = img.shape[:2]+ c = (w / 2, h / 2)+ M = cv2.getRotationMatrix2D(c, angle, 1.0)+ cos, sin = abs(M[0, 0]), abs(M[0, 1])+ nw, nh = int(h * sin + w * cos), int(h * cos + w * sin)+ M[0, 2] += nw / 2 - c[0]+ M[1, 2] += nh / 2 - c[1]+ return cv2.warpAffine(img, M, (nw, nh), flags=interp, borderValue=(255, 255, 255))+++class UprightCorrector:+ 'Stateful wrapper: loads the PP-LCNet doc-orientation classifier once.'++ def __init__(self, cfg: Dict):+ up = cfg["upright"]+ self.doc_gate = bool(up.get("doc_gate", True))+ self.min_apply = float(up.get("min_apply_deg", 0.3))+ self.cls_long_side = int(up.get("cls_long_side", 1600))+ self.gate_min_side = int(up.get("gate_min_side", 500))+ self.gate_min_lines = int(up.get("gate_min_lines", 6))+ model_dir = up.get("model_dir", "")+ try:+ from paddleocr import DocImgOrientationClassification+ except Exception as exc: # pragma: no cover+ raise RuntimeError(f"upright.enabled requires paddleocr: {exc}") from exc+ kwargs = _predictor_kwargs("PP-LCNet_x1_0_doc_ori", model_dir, up)+ self._model = DocImgOrientationClassification(**kwargs)+ self._lock = threading.Lock()++ self.confirm = bool(up.get("orientation_confirm", True))+ self.vote_lines = int(up.get("vote_lines", 12))+ self.vote_min_lines = int(up.get("vote_min_lines", 5))+ self.vote_axis_margin = float(up.get("vote_axis_margin", 1.5))+ self.vote_flip_majority = float(up.get("vote_flip_majority", 0.75))+ self._det = None+ self._textline = None+ if self.confirm:+ from paddleocr import TextDetection, TextLineOrientationClassification+ det_kwargs = _predictor_kwargs("PP-OCRv5_mobile_det", up.get("det_model_dir") or "", up)++ det_kwargs["enable_mkldnn"] = False+ self._det = TextDetection(**det_kwargs)+ tl_kwargs = _predictor_kwargs("PP-LCNet_x1_0_textline_ori", up.get("textline_model_dir") or "", up)+ self._textline = TextLineOrientationClassification(**tl_kwargs)++ def _horiz_lines(self, img):++ r = list(self._det.predict(img, batch_size=1))[0]+ out = []+ for poly, sc in zip(r["dt_polys"], r["dt_scores"]):+ p = np.asarray(poly)+ w = p[:, 0].max() - p[:, 0].min()+ h = p[:, 1].max() - p[:, 1].min()+ if sc < 0.5 or h <= 0:+ continue+ if w / h >= 2.0 and w >= 0.08 * img.shape[1]:+ out.append((int(w), int(p[:, 0].min()), int(p[:, 1].min()),+ int(p[:, 0].max()), int(p[:, 1].max())))+ out.sort(reverse=True)+ return out++ def _vote_orientation(self, img_bgr):++ cv2 = _cv2()+ img = img_bgr+ s = self.cls_long_side / max(img.shape[:2])+ if s < 1:+ img = cv2.resize(img, (int(img.shape[1] * s), int(img.shape[0] * s)),+ interpolation=cv2.INTER_AREA)+ img = np.ascontiguousarray(img)+ img90 = cv2.rotate(img, cv2.ROTATE_90_COUNTERCLOCKWISE)+ l0 = self._horiz_lines(img)+ l90 = self._horiz_lines(img90)+ if max(len(l0), len(l90)) < self.vote_min_lines:+ return None+ if len(l0) >= self.vote_axis_margin * max(len(l90), 1) and len(l0) > len(l90):+ base, lines, axis = img, l0, 0+ elif len(l90) >= self.vote_axis_margin * max(len(l0), 1) and len(l90) > len(l0):+ base, lines, axis = img90, l90, 90+ else:+ return None+ crops = []+ for _, x1, y1, x2, y2 in lines[:self.vote_lines]:+ c = base[max(0, y1 - 2):y2 + 2, max(0, x1 - 2):x2 + 2]+ if c.size:+ crops.append(np.ascontiguousarray(c))+ if len(crops) < self.vote_min_lines:+ return None+ n180 = 0+ for c in crops:+ r = list(self._textline.predict(c, batch_size=1))[0]+ if str(r["label_names"][0]).startswith("180"):+ n180 += 1+ frac = n180 / len(crops)+ if frac >= self.vote_flip_majority:+ return (axis + 180) % 360+ if frac <= 1 - self.vote_flip_majority:+ return axis+ return None++ def correct(self, image_rgb: np.ndarray) -> Tuple[np.ndarray, Dict]:+ 'Upright-correct one page.'+ cv2 = _cv2()+ img = image_rgb[:, :, ::-1]+ b = binarize(np.ascontiguousarray(img))+ if self.doc_gate:+ nlines = max(len(segment_lines(b)),+ len(segment_lines(cv2.rotate(b, cv2.ROTATE_90_CLOCKWISE))))+ if min(img.shape[:2]) < self.gate_min_side or nlines < self.gate_min_lines:+ return image_rgb, {"gated": True}++ deskew = estimate_skew(b)+++ if abs(deskew) >= self.min_apply:+ b_big = binarize(np.ascontiguousarray(img), size=2000)+ deskew += refine_skew(rotate_keep(b_big, deskew), step=0.2)+ deskew_search = "refined"+ else:+ deskew_search = "straight" if deskew == 0.0 else "coarse"+++ cls_img = img+ s = self.cls_long_side / max(img.shape[:2])+ if s < 1:+ cls_img = cv2.resize(img, (int(img.shape[1] * s), int(img.shape[0] * s)),+ interpolation=cv2.INTER_AREA)+ if deskew:+ cls_img = rotate_full(np.ascontiguousarray(cls_img), deskew, interp=cv2.INTER_LINEAR)+ else:+ cls_img = np.ascontiguousarray(cls_img)+ with self._lock:+ r = list(self._model.predict(cls_img, batch_size=1))[0]+ label, score = int(r["label_names"][0]), float(r["scores"][0])++ record = {+ "deskew": round(deskew, 3),+ "label": label,+ "score": round(score, 4),+ "deskew_search": deskew_search,+ }+ if label != 0 and self.confirm:+++ with self._lock:+ vote = self._vote_orientation(cls_img)+ record["vote"] = vote+ if vote != label:+ record["label_vetoed"] = label+ label = 0+ record["label"] = 0+ corr = deskew + label+ record["correction"] = round(corr, 3)+ resid = abs(corr) % 360+ if min(resid, 360 - resid) < self.min_apply:+ record["applied"] = False+ return image_rgb, record+ record["applied"] = True+ out = rotate_full(np.ascontiguousarray(img), corr)+ return np.ascontiguousarray(out[:, :, ::-1]), record+++def _predictor_kwargs(model_name: str, model_dir: str, up: Dict) -> Dict:++ kwargs = {"model_name": model_name}+ if model_dir:+ kwargs["model_dir"] = model_dir+ device = str(up.get("device") or os.environ.get("OCR_UPRIGHT_DEVICE") or "").strip()+ if device:+ kwargs["device"] = device+ if device == "cpu":+ kwargs["enable_mkldnn"] = False+ kwargs["cpu_threads"] = int(up.get("cpu_threads") or os.environ.get("OCR_UPRIGHT_CPU_THREADS") or 1)+ return kwargs+++def upright_enabled(cfg: Dict) -> bool:+ return bool(cfg.get("upright", {}).get("enabled", False))+++class UprightPool:+ '全局摆正队列。不同请求、不同文件的页都进同一条队列。'++ def __init__(self, cfg: Dict, workers: int):+ cv2 = _cv2()+ cv2.setNumThreads(max(1, int(os.environ.get("OCR_CV2_THREADS", "2"))))+ self.workers = max(1, int(workers))+ self._queue: "queue.Queue" = queue.Queue()+ self._correctors = [UprightCorrector(cfg) for _ in range(self.workers)]+ self._threads = [+ threading.Thread(+ target=self._loop,+ args=(corrector,),+ name=f"upright-{index}",+ daemon=True,+ )+ for index, corrector in enumerate(self._correctors)+ ]+ for thread in self._threads:+ thread.start()++ def submit(self, image_rgb: np.ndarray) -> Future:+ future: Future = Future()+ self._queue.put((image_rgb, future, time.perf_counter()))+ return future++ def correct(self, image_rgb: np.ndarray):+ corrected, record, _wait = self.submit(image_rgb).result()+ return corrected, record++ def _loop(self, corrector: UprightCorrector) -> None:+ while True:+ image, future, _queued = self._queue.get()+ if image is None:+ return+ started = time.perf_counter()+ try:+ corrected, record = corrector.correct(image)+ record["upright_sec"] = round(time.perf_counter() - started, 6)+ future.set_result((corrected, record, time.perf_counter() - _queued))+ except Exception as exc:+ future.set_exception(exc)+++def build_upright_pool(cfg: Dict, workers: int) -> "UprightPool | None":+ '共享队列。没打开摆正时返回 None,调用方就跳过这一步。'+ upright_cfg = dict(cfg)+ upright_cfg["upright"] = dict(cfg.get("upright") or {}, enabled=True)+ count = int(os.environ.get("OCR_UPRIGHT_WORKERS", str(workers)) or workers)+ return UprightPool(upright_cfg, count)+++class _FleetSlot:+ def __init__(self, name: str, capacity: int):+ self.name = name+ self.capacity = max(1, int(capacity))+ self.inflight = 0+ self.down_until = 0.0+++class UprightFleet:+ '本机工人和远程摆正服务合成一条队列。'++ def __init__(self, local: UprightPool, registry: str):+ self._local_pool = local+ self._registry = Path(registry) if registry else None+ self._local = _FleetSlot("local", local.workers)+ self._remotes: Dict[str, _FleetSlot] = {}+ self._cv = threading.Condition()+ self._refreshed_at = 0.0++ @property+ def workers(self) -> int:+ self._refresh()+ with self._cv:+ now = time.time()+ total = self._local.capacity+ for slot in self._remotes.values():+ if slot.down_until <= now:+ total += slot.capacity+ return total++ def submit(self, image_rgb: np.ndarray) -> Future:+ future: Future = Future()+ threading.Thread(+ target=self._dispatch, args=(image_rgb, future),+ name="upright-dispatch", daemon=True,+ ).start()+ return future++ def correct(self, image_rgb: np.ndarray):+ corrected, record, _wait = self.submit(image_rgb).result()+ return corrected, record++ def _dispatch(self, image_rgb: np.ndarray, future: Future) -> None:+ tried: List[str] = []+ last = "没有可用的摆正工人"+ while len(tried) < 6:+ slot = self._acquire(exclude=set(tried))+ if slot is None:+ break+ try:+ if slot.name == "local":+ result = self._local_pool.submit(image_rgb).result()+ else:+ result = _remote_correct(slot.name, image_rgb)+ future.set_result(result)+ return+ except Exception as exc:+ last = str(exc) or exc.__class__.__name__+ with self._cv:+ slot.down_until = time.time() + 30+ tried.append(slot.name)+ finally:+ with self._cv:+ slot.inflight = max(0, slot.inflight - 1)+ self._cv.notify_all()+ future.set_exception(RuntimeError(last))++ def _acquire(self, exclude: set) -> Optional[_FleetSlot]:+ with self._cv:+ deadline = time.time() + 120+ while time.time() < deadline:+ self._refresh_locked()+ now = time.time()+ choices = [+ slot for slot in [self._local] + list(self._remotes.values())+ if slot.name not in exclude and slot.down_until <= now+ ]+ if not choices:+ return None+ free = [slot for slot in choices if slot.inflight < slot.capacity]+ if free:+ slot = max(free, key=lambda item: item.capacity - item.inflight)+ slot.inflight += 1+ return slot+ self._cv.wait(timeout=0.5)+ return None++ def _refresh(self) -> None:+ with self._cv:+ self._refresh_locked()++ def _refresh_locked(self) -> None:+ now = time.time()+ if now - self._refreshed_at < 5:+ return+ self._refreshed_at = now+ found: Dict[str, int] = {}+ if self._registry and self._registry.is_dir():+ for path in self._registry.glob("*.json"):+ try:+ if now - path.stat().st_mtime > 90:+ continue+ row = json.loads(path.read_text(encoding="utf-8"))+ except Exception:+ continue+ url = str(row.get("url") or "").rstrip("/")+ if url:+ found[url] = max(1, int(row.get("workers") or 1))+ for url in list(self._remotes):+ if url not in found and self._remotes[url].inflight == 0:+ del self._remotes[url]+ for url, capacity in found.items():+ slot = self._remotes.get(url)+ if slot is None:+ self._remotes[url] = _FleetSlot(url, capacity)+ else:+ slot.capacity = capacity+++def _remote_correct(url: str, image_rgb: np.ndarray):+ from PIL import Image+ buf = io.BytesIO()+ Image.fromarray(image_rgb).save(buf, format="PNG")+ request = urllib.request.Request(+ url + "/v1/upright",+ data=buf.getvalue(),+ headers={"Content-Type": "image/png"},+ method="POST",+ )+ opener = urllib.request.build_opener(urllib.request.ProxyHandler({}))+ with opener.open(request, timeout=60) as response:+ body = json.loads(response.read().decode("utf-8"))+ record = body.get("record") or {}+ if body.get("applied") and body.get("image_png_b64"):+ raw = base64.b64decode(body["image_png_b64"])+ corrected = np.asarray(Image.open(io.BytesIO(raw)).convert("RGB"))+ return corrected, record, float(record.get("upright_sec") or 0)+ return image_rgb, record, float(record.get("upright_sec") or 0)+++def build_upright_fleet(local: UprightPool, registry: str) -> UprightFleet:+ return UprightFleet(local, registry)+++def build_upright_corrector(cfg: Dict) -> "UprightCorrector | None":+ 'A corrector when the config asks for one, else None.'+ return UprightCorrector(cfg) if upright_enabled(cfg) else Nonediff --git a/sdk/minicpmvocr/postprocess/__init__.py b/sdk/minicpmvocr/postprocess/__init__.pynew file mode 100644index 0000000..ea47741--- /dev/null+++ b/sdk/minicpmvocr/postprocess/__init__.py@@ -0,0 +1,10 @@+from .crosspage import apply_cross_page_merge, assemble_document_markdown+from .markdown import assemble_markdown+from .otsl import convert_otsl_to_html++__all__ = [+ "apply_cross_page_merge",+ "assemble_document_markdown",+ "assemble_markdown",+ "convert_otsl_to_html",+]diff --git a/sdk/minicpmvocr/postprocess/crosspage.py b/sdk/minicpmvocr/postprocess/crosspage.pynew file mode 100644index 0000000..d46ce79--- /dev/null+++ b/sdk/minicpmvocr/postprocess/crosspage.py@@ -0,0 +1,295 @@+"Cross-page table merging adapted from PaddleOCR-VL's paddlex/inference/pipelines/layout_parsing/merge_table.py (Apache-2.0), which credits MinerU for the logic."+from __future__ import annotations++import re+from copy import deepcopy+from typing import Dict, List, Sequence+++TRAILING_ALLOWED = {"footer", "vision_footnote", "number", "footnote", "footer_image", "seal"}++LEADING_ALLOWED = {"header", "header_image", "number", "seal"}++CONTINUE_KEYWORDS = ("continue", "continued", "cont'd", "cont‘d", "续", "續")++WIDTH_TOLERANCE = 0.1+MAX_HEADER_ROWS = 5+++def _soup(html: str):+ try:+ from bs4 import BeautifulSoup+ except ImportError as exc: # pragma: no cover+ raise RuntimeError(+ "cross-page table merge requires beautifulsoup4; install it with "+ "`pip install 'minicpmvocr[crosspage]'` or disable "+ "pipeline.merge_cross_page_tables"+ ) from exc+ return BeautifulSoup(html, "html.parser")+++def full_to_half(text: str) -> str:+ 'Fullwidth ASCII -> halfwidth, so "(a)" and "(a)" compare equal.'+ return "".join(+ chr(ord(c) - 0xFEE0) if 0xFF01 <= ord(c) <= 0xFF5E else c for c in text+ )+++def calculate_table_total_columns(soup) -> int:+ 'Column count with colspan *and* rowspan accounted for.'+ rows = soup.find_all("tr")+ if not rows:+ return 0+ max_cols = 0+ occupied: Dict[int, Dict[int, bool]] = {}+ for row_idx, row in enumerate(rows):+ col_idx = 0+ occupied.setdefault(row_idx, {})+ for cell in row.find_all(["td", "th"]):+ while col_idx in occupied[row_idx]:+ col_idx += 1+ colspan = _span(cell, "colspan")+ rowspan = _span(cell, "rowspan")+ for r in range(row_idx, row_idx + rowspan):+ occupied.setdefault(r, {})+ for c in range(col_idx, col_idx + colspan):+ occupied[r][c] = True+ col_idx += colspan+ max_cols = max(max_cols, col_idx)+ return max_cols+++def _span(cell, attr: str) -> int:++ try:+ value = int(cell.get(attr, 1))+ except (TypeError, ValueError):+ return 1+ return value if 1 <= value <= 1000 else 1+++def _row_columns(row) -> int:+ return sum(_span(cell, "colspan") for cell in row.find_all(["td", "th"]))+++def _visual_columns(row) -> int:++ return len(row.find_all(["td", "th"]))+++def detect_table_headers(soup1, soup2, max_header_rows: int = MAX_HEADER_ROWS) -> int:+ 'How many leading rows the two tables repeat verbatim.'+ rows1, rows2 = soup1.find_all("tr"), soup2.find_all("tr")+ header_rows = 0+ for i in range(min(len(rows1), len(rows2), max_header_rows)):+ cells1 = rows1[i].find_all(["td", "th"])+ cells2 = rows2[i].find_all(["td", "th"])+ if len(cells1) != len(cells2):+ break+ match = True+ for c1, c2 in zip(cells1, cells2):+ t1 = "".join(full_to_half(c1.get_text()).split())+ t2 = "".join(full_to_half(c2.get_text()).split())+ if t1 != t2 or _span(c1, "colspan") != _span(c2, "colspan"):+ match = False+ break+ if not match:+ break+ header_rows += 1+ return header_rows+++def check_rows_match(soup1, soup2) -> bool:+ 'Fallback when total column counts differ: compare the boundary rows.'+ rows1, rows2 = soup1.find_all("tr"), soup2.find_all("tr")+ if not rows1 or not rows2:+ return False+ header_count = detect_table_headers(soup1, soup2)+ if len(rows2) <= header_count:+ return False+ last_row, first_data_row = rows1[-1], rows2[header_count]+ return (+ _row_columns(last_row) == _row_columns(first_data_row)+ or _visual_columns(last_row) == _visual_columns(first_data_row)+ )+++def _has_continue_marker(block: Dict) -> bool:+ text = full_to_half(str(block.get("content") or "")).lower()+ return any(kw in text for kw in CONTINUE_KEYWORDS)+++def _is_skippable(block: Dict, allowed: set) -> bool:+ return block.get("label", "") in allowed or _has_continue_marker(block)+++def _widths_match(prev_block: Dict, curr_block: Dict) -> bool:+ try:+ prev_w = float(prev_block["bbox"][2]) - float(prev_block["bbox"][0])+ curr_w = float(curr_block["bbox"][2]) - float(curr_block["bbox"][0])+ except (KeyError, IndexError, TypeError, ValueError):+ return False+ if prev_w <= 0 or curr_w <= 0:+ return False+ return abs(curr_w - prev_w) / min(curr_w, prev_w) < WIDTH_TOLERANCE+++def _last_table_index(blocks: Sequence[Dict]) -> int | None:+ for i in range(len(blocks) - 1, -1, -1):+ if blocks[i].get("label") == "table":+ return i+ return None+++def _first_table_index(blocks: Sequence[Dict]) -> int | None:+ for i, block in enumerate(blocks):+ if block.get("label") == "table":+ return i+ return None+++def can_merge_tables(prev_page: Sequence[Dict], curr_page: Sequence[Dict]) -> tuple:+ 'Four gates, all of which must pass. Returns (ok, prev_idx, curr_idx).'+ prev_idx = _last_table_index(prev_page)+ curr_idx = _first_table_index(curr_page)+ if prev_idx is None or curr_idx is None:+ return False, None, None++ prev_block, curr_block = prev_page[prev_idx], curr_page[curr_idx]+ html_prev = str(prev_block.get("content") or "")+ html_curr = str(curr_block.get("content") or "")+ if "<table" not in html_prev.lower() or "<table" not in html_curr.lower():+ return False, None, None+++ if not _widths_match(prev_block, curr_block):+ return False, None, None++ if not all(b.get("label", "") in TRAILING_ALLOWED for b in prev_page[prev_idx + 1:]):+ return False, None, None++ if not all(_is_skippable(b, LEADING_ALLOWED) for b in curr_page[:curr_idx]):+ return False, None, None++ soup_prev, soup_curr = _soup(html_prev), _soup(html_curr)+ if not (+ calculate_table_total_columns(soup_prev) == calculate_table_total_columns(soup_curr)+ or check_rows_match(soup_prev, soup_curr)+ ):+ return False, None, None+ return True, prev_idx, curr_idx+++def perform_table_merge(html_prev: str, html_curr: str) -> str:+ "Append the later table's data rows to the earlier one, minus the repeated header."+ soup_prev, soup_curr = _soup(html_prev), _soup(html_curr)+ header_count = detect_table_headers(soup_prev, soup_curr)+ rows_prev = soup_prev.find_all("tr")+ if not rows_prev:+ return html_prev+ anchor = rows_prev[-1].parent+ for row in soup_curr.find_all("tr")[header_count:]:+ row.extract()+ anchor.append(row)+ return str(soup_prev)+++def merge_cross_page_tables(pages: List[List[Dict]]) -> tuple[List[List[Dict]], int]:+ 'Merge split tables across consecutive pages of one document.'+ merged = deepcopy(pages)+ count = 0+ for i in range(len(merged) - 1, 0, -1):+ ok, prev_idx, curr_idx = can_merge_tables(merged[i - 1], merged[i])+ if not ok:+ continue+ prev_block, curr_block = merged[i - 1][prev_idx], merged[i][curr_idx]+ prev_block["content"] = perform_table_merge(+ str(prev_block.get("content") or ""), str(curr_block.get("content") or "")+ )+++ curr_block["content"] = ""+ curr_block["merged_into_previous_page"] = True+ count += 1+ return merged, count+++def load_document_pages(run_dir) -> List[Dict]:+ "Read a run's per-page results back in document order."+ from pathlib import Path++ from .._utils import read_json++ results_dir = Path(run_dir) / "results_json"+ if not results_dir.is_dir():+ return []+ pages: List[Dict] = []+ for path in sorted(results_dir.glob("*.json")):+ data = read_json(path, default=None)+ if not data:+ continue+ source = data.get("source") or {}+ page_index = source.get("page_index")+ is_pdf = str(source.get("type") or "") == "pdf" or page_index is not None+ pages.append(+ {+ "image_id": data.get("image_id", path.stem),+ "document": str(source.get("path") or "") if is_pdf else "",++ "page_index": int(page_index) if page_index is not None else -1,+ "markdown": data.get("markdown", ""),+ "blocks": data.get("crop_blocks") or [],+ }+ )+ pages.sort(key=lambda p: (p["document"], p["page_index"], p["image_id"]))+ return pages+++def apply_cross_page_merge(pages: List[Dict], prompt_map: Dict) -> Dict[str, Dict]:+ 'Run the merge over already-loaded pages and report what changed.'+ from .markdown import assemble_markdown++ changes: Dict[str, Dict] = {}+ if not pages:+ return changes++ ordered = sorted(pages, key=lambda p: (p["document"], p["page_index"], p["image_id"]))+ groups: List[List[Dict]] = []+ for page in ordered:+ if groups and groups[-1][0]["document"] == page["document"]:+ groups[-1].append(page)+ else:+ groups.append([page])++ for group in groups:+ merged_blocks, merges = merge_cross_page_tables([p["blocks"] for p in group])+ if not merges:+ continue+ for page, blocks in zip(group, merged_blocks):+ absorbed = any(b.get("merged_into_previous_page") for b in blocks)+ extended = not absorbed and any(+ old.get("content") != new.get("content")+ for old, new in zip(page["blocks"], blocks)+ )+ if not (absorbed or extended):+ continue+ changes[page["image_id"]] = {+ "markdown": assemble_markdown(blocks, prompt_map),+ "blocks": blocks,+ "extended": extended,+ "absorbed": absorbed,+ }+ return changes+++def assemble_document_markdown(+ run_dir, prompt_map: Dict, *, merge_tables: bool, delimiter: str+) -> tuple[str, int, int]:+ "Join a run's pages into one markdown document."+ pages = load_document_pages(run_dir)+ if not pages:+ return "", 0, 0+ changes = apply_cross_page_merge(pages, prompt_map) if merge_tables else {}+ texts = [changes.get(p["image_id"], p)["markdown"] for p in pages]+ merges = sum(1 for c in changes.values() if c["absorbed"])+ return delimiter.join(texts), len(pages), mergesdiff --git a/sdk/minicpmvocr/postprocess/latex_repair.py b/sdk/minicpmvocr/postprocess/latex_repair.pynew file mode 100644index 0000000..7f8a9f5--- /dev/null+++ b/sdk/minicpmvocr/postprocess/latex_repair.py@@ -0,0 +1,273 @@+"""LaTeX formula post-processing repairs.++Ported and extended from MinerU (mineru/model/mfr/utils.py), adapted for the+MiniCPM-V-ocr-pip pipeline. Each function is a pure string → string transform+so it is safe to compose in any order and easy to unit-test.++Public entry point: ``repair_latex_formula(s, label)`` applies the full repair+chain. Individual helpers are exported so callers can compose selectively.+"""+from __future__ import annotations++import re+++_DELIM_TOKEN = (+ r"(?:"+ r"\\(?:lceil|rceil|lfloor|rfloor|backslash"+ r"|uparrow|downarrow|Uparrow|Downarrow)"+ r"|\\[{}|./]"+ r"|[()[\]{}/|]"+ r")?"+)+++_LEFT_PATTERN = re.compile(+ r"(\\left)(?![a-zA-Z])"+ r"(\\(?:lceil|rceil|lfloor|rfloor|backslash"+ r"|uparrow|downarrow|Uparrow|Downarrow"+ r"|langle|rangle)"+ r"|\\[{}|.]"+ r"|[()[\]{}/|.])?"+)+_RIGHT_PATTERN = re.compile(+ r"(\\right)(?![a-zA-Z])"+ r"(\\(?:lceil|rceil|lfloor|rfloor|backslash"+ r"|uparrow|downarrow|Uparrow|Downarrow"+ r"|langle|rangle)"+ r"|\\[{}|.]"+ r"|[()[\]{}/|.])?"+)+_LEFT_COUNT_PATTERN = re.compile(r"\\left(?![a-zA-Z])")+_RIGHT_COUNT_PATTERN = re.compile(r"\\right(?![a-zA-Z])")+_LEFT_RIGHT_REMOVE_PATTERN = re.compile(r"\\left(?![a-zA-Z])\.?|\\right(?![a-zA-Z])\.?")++_ENV_TYPES = [+ "array", "matrix", "pmatrix", "bmatrix", "vmatrix",+ "Bmatrix", "Vmatrix", "cases", "aligned", "gathered",+ "align", "align*",+]+_ENV_BEGIN = {e: re.compile(r"\\begin\{" + re.escape(e) + r"\}") for e in _ENV_TYPES}+_ENV_END = {e: re.compile(r"\\end\{" + re.escape(e) + r"\}") for e in _ENV_TYPES}+_ENV_FMT = {e: re.compile(r"\\begin\{" + re.escape(e) + r"\}\{([^}]*)\}") for e in _ENV_TYPES}++_MATHRING_PATTERN = re.compile(+ r"\\mathring(?!\s*\{)\s*(?P<argument>\\mathrm\s*\{[^{}]*\})"+)+_DUPLICATE_ARRAY_CLOSE = re.compile(r"(\\end\{array\}\s*\\right\.\s*){2,}")+_DUPLICATE_BRACKET_CLOSE = re.compile(r"(\\\]\s*){2,}")+_TRAILING_BACKSLASH = re.compile(r"\\+$")+++_VALID_DELIMS = {+ r"(", r")", r"[", r"]", r"{", r"}",+ r"/", r"|", r"\{", r"\}", r"\|", r"\.",+ r"\lceil", r"\rceil", r"\lfloor", r"\rfloor",+ r"\backslash", r"\uparrow", r"\downarrow",+ r"\Uparrow", r"\Downarrow",+}+++def _is_escaped(text: str, pos: int) -> bool:+ count = 0+ j = pos - 1+ while j >= 0 and text[j] == "\\":+ count += 1+ j -= 1+ return count % 2 == 1+++def _find_group_end(text: str, pos: int, depth: int) -> int:+ """Return index of the ``}`` that closes the brace group at *depth*."""+ current = depth+ i = pos+ while i < len(text):+ if text[i] == "{" and not _is_escaped(text, i):+ current += 1+ elif text[i] == "}" and not _is_escaped(text, i):+ current -= 1+ if current < depth:+ return i+ i += 1+ return -1+++def fix_unbalanced_braces(s: str) -> str:+ """Remove unmatched ``{`` / ``}`` characters.++ Walks the string keeping a stack; any ``{`` without a matching ``}`` (and+ vice-versa) is dropped from the output.+ """+ stack: list[int] = []+ unmatched: set[int] = set()+ for i, ch in enumerate(s):+ if ch in "{}" and not _is_escaped(s, i):+ if ch == "{":+ stack.append(i)+ else:+ if stack:+ stack.pop()+ else:+ unmatched.add(i)+ unmatched.update(stack)+ return "".join(ch for i, ch in enumerate(s) if i not in unmatched)+++def _fix_left_right_pairs(s: str) -> str:+ """Move ``\\right`` tokens that are in a different brace group from their+ matching ``\\left`` to sit just before the group's closing ``}``."""+ brace_stack: list[int] = []+ left_stack: list[tuple[int, int, str]] = []+ adjustments: list[tuple[int, int, int]] = []++ i = 0+ while i < len(s):+ if i > 0 and _is_escaped(s, i):+ i += 1+ continue++ if s[i: i + 5] == "\\left" and i + 5 < len(s) and not s[i + 5].isalpha():+ delim = s[i + 5] if i + 5 < len(s) else ""+ left_stack.append((i, len(brace_stack), delim))+ i += 6+ continue++ if s[i: i + 6] == "\\right" and i + 6 < len(s) and not s[i + 6].isalpha():+ if left_stack:+ left_pos, left_depth, _ = left_stack.pop()+ if left_depth != len(brace_stack):+ target = _find_group_end(s, left_pos, left_depth)+ if target != -1:+ adjustments.append((i, i + 7, target))+ i += 7+ continue++ if s[i] == "{" and not _is_escaped(s, i):+ brace_stack.append(i)+ elif s[i] == "}" and not _is_escaped(s, i):+ if brace_stack:+ brace_stack.pop()+ i += 1++ if not adjustments:+ return s++ result = list(s)+ for start, end, target in sorted(adjustments, reverse=True, key=lambda x: x[0]):+ right_part = result[start:end]+ del result[start:end]+ result.insert(target, "".join(right_part))+ return "".join(result)+++def fix_latex_left_right(s: str, *, fix_delimiter: bool = True) -> str:+ """Balance ``\\left`` / ``\\right`` pairs.++ Strategy+ --------+ 1. If *fix_delimiter* is True, ensure each ``\\left`` / ``\\right`` is+ followed by a recognised delimiter; append ``\\.`` when it is not.+ 2. Count bare ``\\left`` and ``\\right`` (excluding ``\\leftarrow`` etc.).+ 3. If counts differ → safest option: strip all ``\\left`` / ``\\right``.+ 4. If counts match → check they are in the same brace group; move any+ that are not.+ """+ def _fix_delim(match: re.Match) -> str:+ cmd = match.group(1)+ delim = match.group(2)+ if not delim:++ return cmd + "."++ return match.group(0)++ if fix_delimiter:+ s = _LEFT_PATTERN.sub(_fix_delim, s)+ s = _RIGHT_PATTERN.sub(_fix_delim, s)++ left_count = len(_LEFT_COUNT_PATTERN.findall(s))+ right_count = len(_RIGHT_COUNT_PATTERN.findall(s))++ if left_count == right_count:+ return _fix_left_right_pairs(s)++ return _LEFT_RIGHT_REMOVE_PATTERN.sub("", s)+++def fix_latex_environments(s: str) -> str:+ """Ensure every ``\\begin{env}`` has a matching ``\\end{env}`` and vice-versa.++ When *end* outnumbers *begin*, missing ``\\begin`` tags are prepended.+ When *begin* outnumbers *end*, missing ``\\end`` tags are appended.+ """+ for env in _ENV_TYPES:+ begin_count = len(_ENV_BEGIN[env].findall(s))+ end_count = len(_ENV_END[env].findall(s))+ if begin_count == end_count:+ continue+ if end_count > begin_count:+ fmt_match = _ENV_FMT[env].search(s)+ default_fmt = "{c}" if env == "array" else ""+ fmt_str = "{" + fmt_match.group(1) + "}" if fmt_match else default_fmt+ missing = end_count - begin_count+ s = (r"\begin{" + env + "}" + fmt_str + " ") * missing + s+ else:+ missing = begin_count - end_count+ s = s + (" \\end{" + env + "}") * missing+ return s+++def fix_mathring_font_arguments(s: str) -> str:+ """Wrap bare ``\\mathrm{...}`` arguments of ``\\mathring`` in braces."""+ return _MATHRING_PATTERN.sub(+ lambda m: "\\mathring{" + m.group("argument") + "}", s+ )+++def remove_duplicate_closures(s: str) -> str:+ """Remove runs of repeated ``\\end{array} \\right.`` or ``\\]``."""+ s = _DUPLICATE_ARRAY_CLOSE.sub(r"\\end{array} \\right.", s)+ s = _DUPLICATE_BRACKET_CLOSE.sub(r"\\]", s)+ return s+++def remove_trailing_backslashes(s: str) -> str:+ """Strip trailing lone backslashes that would break compilation."""+ return _TRAILING_BACKSLASH.sub("", s).rstrip()+++def repair_latex_formula(s: str, label: str = "") -> str:+ """Apply the full LaTeX repair chain.++ Safe to call on *any* formula string; returns the input unchanged when+ nothing is detected as broken.++ Parameters+ ----------+ s:+ Raw LaTeX string (no outer ``$`` / ``$$`` / ``\\[`` delimiters).+ label:+ Block label such as ``"display_formula"`` or ``"inline_formula"``.+ Currently used only for future label-specific paths; all repairs run+ regardless of label.+ """+ if not s or not s.strip():+ return s+++ s = fix_unbalanced_braces(s)+++ is_display = label in ("display_formula", "")+ s = fix_latex_left_right(s, fix_delimiter=is_display)+++ s = fix_latex_environments(s)+++ s = remove_duplicate_closures(s)+++ s = remove_trailing_backslashes(s)++ return sdiff --git a/sdk/minicpmvocr/postprocess/markdown.py b/sdk/minicpmvocr/postprocess/markdown.pynew file mode 100644index 0000000..6f5fc42--- /dev/null+++ b/sdk/minicpmvocr/postprocess/markdown.py@@ -0,0 +1,297 @@+from collections import Counter+import re+++DISPLAY_BRACKET_SEP_RE = re.compile(re.escape(r"\]") + r"\s*" + re.escape(r"\["))+EMPTY_BRACKET_MATH_RE = re.compile(r"\\\[\s*\\\]|\\\(\s*\\\)")+DISPLAY_SPAN_RE = re.compile(r"\\\[(.*?)\\\]|\$\$(.*?)\$\$", re.DOTALL)+BEGIN_RE = re.compile(r"\\begin\{")+END_RE = re.compile(r"\\end\{")+INLINE_MATH_RE = re.compile(r"(?<!\\)\$(?!\$)(?:[^$\n]|\\.)+?(?<!\\)\$(?!\$)|\\\([^\n]*?\\\)")++TEXT_BLOCK_LABELS = {+ "text",+ "content",+ "abstract",+ "reference",+ "reference_content",+ "vertical_text",+ "vision_footnote",+ "algorithm",+ "header",+ "footer",+ "footnote",+ "aside_text",+}+++def _strip_spacing_tokens(content: str) -> str:+ content = re.sub(+ r"\\(?:quad|qquad|enspace|thinspace|medspace|thickspace|"+ r"negthinspace|negmedspace|negthickspace)(?![A-Za-z])",+ "",+ content,+ )+ content = re.sub(r"\\[,;:!]", "", content)+ content = re.sub(r"\\ ", "", content)+ content = re.sub(r"\\(?:hspace|vspace)\s*\{[^{}]*\}", "", content)+ return re.sub(r"[\s{}]", "", content.replace("~", ""))+++def _repair_display_dollars(markdown: str) -> str:+ tokens = re.split(r"(\$\$)", markdown)+ output: list[str] = []+ in_display = False+ for index, token in enumerate(tokens):+ if token != "$$":+ output.append(token)+ continue+ next_segment = tokens[index + 1] if index + 1 < len(tokens) else ""+ next_is_delimiter = index + 2 < len(tokens) and tokens[index + 2] == "$$"+ has_later_delimiter = any(part == "$$" for part in tokens[index + 2:])+ if not in_display:+ if (not next_segment.strip() and next_is_delimiter) or not has_later_delimiter:+ continue+ output.append(token)+ in_display = True+ else:+ output.append(token)+ in_display = False+ if in_display:+ output.pop()+ return "".join(output)+++def repair_display_formula(content: str) -> str:+ 'Repair malformed display math without canonicalizing formula content.'+ content = _repair_display_dollars(content)+ content = EMPTY_BRACKET_MATH_RE.sub(" ", content)++ def clean_span(match: re.Match[str]) -> str:+ whole = match.group(0)+ is_bracket = whole.startswith(r"\[")+ body = match.group(1) if is_bracket else match.group(2)+ stripped = body.rstrip()+ trailing_whitespace = body[len(stripped):]+ if re.search(r"(?<!\\)\\$", stripped):+ body = stripped[:-1] + trailing_whitespace+ if body.strip() and not _strip_spacing_tokens(body):+ return " "+ return (r"\[" + body + r"\]") if is_bracket else f"$${body}$$"++ return DISPLAY_SPAN_RE.sub(clean_span, content)+++def has_mixed_inline_formula_content(content: str) -> bool:+ 'Whether an inline-formula crop also contains ordinary text.'+ stripped = (content or "").strip()+ if not stripped:+ return False+ if INLINE_MATH_RE.fullmatch(stripped):+ return False+ without_formulas = INLINE_MATH_RE.sub("", stripped)+ return bool(without_formulas.strip())+++def _is_pipe_table_row(line: str) -> bool:+ stripped = line.strip()+ return (stripped.count("|") >= 2 and stripped.startswith("|")) or (+ stripped.count("|") >= 2 and "---" in stripped+ )+++def split_text_block(content: str, *, protect_inline_math: bool = False) -> str:+ 'Split ordinary text lines while preserving Markdown and math structures.'+ lines = content.split("\n")+ output: list[str] = []+ in_code = in_dollar = in_bracket = in_html_table = False+ in_inline_dollar = in_inline_paren = False+ env_depth = 0++ def protected() -> bool:+ return (+ in_code+ or in_dollar+ or in_bracket+ or in_html_table+ or in_inline_dollar+ or in_inline_paren+ or env_depth > 0+ )++ for index, line in enumerate(lines):+ stripped = line.strip()+ if stripped.startswith("```"):+ output.append(line)+ in_code = not in_code+ continue+ if in_code:+ output.append(line)+ continue++ if "<table" in stripped.lower():+ in_html_table = True+ if in_html_table:+ output.append(line)+ if "</table>" in stripped.lower():+ in_html_table = False+ continue++ if _is_pipe_table_row(line):+ output.append(line)+ next_is_pipe_row = index + 1 < len(lines) and _is_pipe_table_row(lines[index + 1])+ if not next_is_pipe_row and output[-1].strip():+ output.append("")+ continue++ display_dollar_count = len(re.findall(r"(?<!\\)\$\$", line))+ bracket_opens = r"\[" in line and r"\]" not in line.split(r"\[", 1)[1]+ inline_dollar_count = len(re.findall(r"(?<!\\)(?<!\$)\$(?!\$)", line))+ inline_paren_opens = r"\(" in line and r"\)" not in line.split(r"\(", 1)[1]++ if protected():+ output.append(line)+ if in_dollar and display_dollar_count % 2:+ in_dollar = False+ if in_bracket and r"\]" in line:+ in_bracket = False+ if in_inline_dollar and inline_dollar_count % 2:+ in_inline_dollar = False+ if in_inline_paren and r"\)" in line:+ in_inline_paren = False+ env_depth = max(0, env_depth + len(BEGIN_RE.findall(line)) - len(END_RE.findall(line)))+ continue++ net_env = len(BEGIN_RE.findall(line)) - len(END_RE.findall(line))+ if display_dollar_count % 2 or bracket_opens or net_env > 0:+ output.append(line)+ in_dollar = display_dollar_count % 2 == 1+ in_bracket = bracket_opens+ env_depth = max(0, env_depth + net_env)+ continue+ if protect_inline_math and (inline_dollar_count % 2 or inline_paren_opens):+ output.append(line)+ in_inline_dollar = inline_dollar_count % 2 == 1+ in_inline_paren = inline_paren_opens+ continue++ if stripped:+ if output and output[-1].strip():+ output.append("")+ output.extend((stripped, ""))++ return re.sub(r"\n{3,}", "\n\n", "\n".join(output)).strip("\n")+++def truncate_repetitive_content(content: str, min_count: int = 50) -> str:+ if not content or len(content) < min_count:+ return content+ stripped = content.strip()+ if not stripped:+ return content++ if "\n" not in stripped and len(stripped) > 100:+ for unit_len in range(8, len(stripped) // 5 + 1):+ unit = stripped[-unit_len:]+ count = 0+ pos = len(stripped) - unit_len+ while pos >= 0 and stripped[pos:pos + unit_len] == unit:+ count += 1+ pos -= unit_len+ if count >= 5:+ start_index = len(stripped) - (count * unit_len)+ prefix = stripped[:start_index]+ if len(unit) * count > len(stripped) * 0.5:+ return prefix++ if "\n" not in stripped and len(stripped) > 10:+ for unit_len in range(1, len(stripped) // 2 + 1):+ unit = stripped[:unit_len]+ if unit * (len(stripped) // unit_len) == stripped[:unit_len * (len(stripped) // unit_len)]:+ count = len(stripped) // unit_len+ if count >= 10:+ return unit+ break++ lines = [line.strip() for line in stripped.split("\n") if line.strip()]+ if len(lines) >= 10:+ most_common, count = Counter(lines).most_common(1)[0]+ if count >= 10 and count / len(lines) >= 0.8:+ return most_common+ return content+++def postprocess_content(content: str, output_format: str, label: str = "") -> str:+ if content is None:+ return ""+ content = truncate_repetitive_content(content.strip(), min_count=5000 if label == "table" else 50)++ if output_format == "latex":+ if label == "display_formula":+ content = repair_display_formula(content)+ for left, right in (("$$", "$$"), ("$", "$"), ("\\(", "\\)"), ("\\[", "\\]")):+ if content.startswith(left) and content.endswith(right):+ content = content[len(left): len(content) - len(right)].strip()+++ if label == "display_formula":+ content = DISPLAY_BRACKET_SEP_RE.sub("$$ $$", content)+ content = content.replace("\\[", "").replace("\\]", "")++ if label in ("display_formula", "inline_formula"):+ from .latex_repair import repair_latex_formula+ content = repair_latex_formula(content, label=label)+ elif output_format == "html":+ if content.startswith("```html"):+ content = content[7:]+ if content.startswith("```"):+ content = content[3:]+ if content.endswith("```"):+ content = content[:-3]+ content = content.strip()+++ if label == "table":+ open_count = content.count("<table")+ close_count = content.count("</table>")+ if open_count > close_count:+ content = content + ("</table>" * (open_count - close_count))+ return content+++def assemble_markdown(blocks: list, prompt_cfg: dict) -> str:+ assembly = prompt_cfg.get("markdown_assembly", {})+ ignore_labels = set(assembly.get("ignore_labels", []))+ title_fmt = assembly.get("title_format", {})+ formula_fmt = assembly.get("formula_format", {})+ table_fmt = assembly.get("table_format", "{content}")+ image_fmt = assembly.get("image_format", "![image]()")+ chart_fmt = assembly.get("chart_format", "{content}")+ seal_fmt = assembly.get("seal_format", "{content}")++ parts = []+ for block in sorted(blocks, key=lambda x: x.get("order", 0)):+ label = block.get("label", "")+ content = block.get("content", "")+ if label in ignore_labels:+ continue+ if not content and label not in ("image", "header_image", "footer_image", "chart", "seal"):+ continue+ if label in title_fmt:+ parts.append(title_fmt[label].format(content=content))+ elif label in formula_fmt:+ if label == "inline_formula" and block.get("inline_formula_mixed", False):+ parts.append(content)+ else:+ parts.append(formula_fmt[label].format(content=content))+ elif label == "table":+ parts.append(table_fmt.format(content=content))+ elif label in ("image", "header_image", "footer_image"):+ parts.append(image_fmt)+ elif label == "chart":+ parts.append(chart_fmt.format(content=content) if content else image_fmt)+ elif label == "seal":+ parts.append(seal_fmt.format(content=content) if content else image_fmt)+ else:+ parts.append(content)+ return "\n\n".join(parts)diff --git a/sdk/minicpmvocr/postprocess/otsl/__init__.py b/sdk/minicpmvocr/postprocess/otsl/__init__.pynew file mode 100644index 0000000..f79e7f3--- /dev/null+++ b/sdk/minicpmvocr/postprocess/otsl/__init__.py@@ -0,0 +1,3 @@+from .converter import convert_otsl_to_html++__all__ = ["convert_otsl_to_html"]diff --git a/sdk/minicpmvocr/postprocess/otsl/converter.py b/sdk/minicpmvocr/postprocess/otsl/converter.pynew file mode 100644index 0000000..a4525bb--- /dev/null+++ b/sdk/minicpmvocr/postprocess/otsl/converter.py@@ -0,0 +1,193 @@+'OTSL to HTML conversion ported from PaddleX paddleocr_vl/uilts.py.'++from __future__ import annotations++import html+import itertools+import re+from typing import List, Tuple++from .types import TableCell, TableData, export_to_html+++OTSL_NL = "<nl>"+OTSL_FCEL = "<fcel>"+OTSL_ECEL = "<ecel>"+OTSL_LCEL = "<lcel>"+OTSL_UCEL = "<ucel>"+OTSL_XCEL = "<xcel>"++_NON_CAPTURING_TAG_GROUP = "(?:<fcel>|<ecel>|<nl>|<lcel>|<ucel>|<xcel>)"+_OTSL_FIND_PATTERN = re.compile(+ f"{_NON_CAPTURING_TAG_GROUP}.*?(?={_NON_CAPTURING_TAG_GROUP}|$)",+ flags=re.DOTALL,+)+_ALL_TAGS = {OTSL_NL, OTSL_FCEL, OTSL_ECEL, OTSL_LCEL, OTSL_UCEL, OTSL_XCEL}+++def otsl_pad_to_sqr_v2(otsl_str: str) -> str:+ 'Pad an OTSL string so every row contains the same number of cells.'+ assert isinstance(otsl_str, str)+ otsl_str = otsl_str.strip()+ if OTSL_NL not in otsl_str:+ return otsl_str + OTSL_NL++ lines = otsl_str.split(OTSL_NL)+ row_data = []+ for line in lines:+ if not line:+ continue+ raw_cells = _OTSL_FIND_PATTERN.findall(line)+ if not raw_cells:+ continue+ total_len = len(raw_cells)+ min_len = 0+ for i, cell_str in enumerate(raw_cells):+ if cell_str.startswith(OTSL_FCEL):+ min_len = i + 1+ row_data.append({"raw_cells": raw_cells, "total_len": total_len, "min_len": min_len})++ if not row_data:+ return OTSL_NL++ global_min_width = max(row["min_len"] for row in row_data)+ max_total_len = max(row["total_len"] for row in row_data)+ search_start = global_min_width+ search_end = max(global_min_width, max_total_len)++ min_total_cost = float("inf")+ optimal_width = search_end+ for width in range(search_start, search_end + 1):+ cost = sum(abs(row["total_len"] - width) for row in row_data)+ if cost < min_total_cost:+ min_total_cost = cost+ optimal_width = width++ repaired_lines = []+ for row in row_data:+ cells = row["raw_cells"]+ current_len = len(cells)+ if current_len > optimal_width:+ new_cells = cells[:optimal_width]+ else:+ new_cells = cells + [OTSL_ECEL] * (optimal_width - current_len)+ repaired_lines.append("".join(new_cells))+ return OTSL_NL.join(repaired_lines) + OTSL_NL+++def otsl_extract_tokens_and_text(s: str) -> Tuple[List[str], List[str]]:+ 'Split an OTSL string into a flat token list and a mixed text/tag list.'+ pattern = "(" + "|".join([OTSL_NL, OTSL_FCEL, OTSL_ECEL, OTSL_LCEL, OTSL_UCEL, OTSL_XCEL]) + ")"+ tokens = re.findall(pattern, s)+ text_parts = re.split(pattern, s)+ text_parts = [t for t in text_parts if t.strip()]+ return tokens, text_parts+++def otsl_parse_texts(+ texts: List[str], tokens: List[str]+) -> Tuple[List[TableCell], List[List[str]]]:+ 'Convert a flat OTSL token/text stream into a list of TableCell objects.'+ split_row_tokens = [+ list(y)+ for x, y in itertools.groupby(tokens, lambda z: z == OTSL_NL)+ if not x+ ]+++ if split_row_tokens:+ max_cols = max(len(row) for row in split_row_tokens)+ for row in split_row_tokens:+ while len(row) < max_cols:+ row.append(OTSL_ECEL)++ new_texts: List[str] = []+ text_idx = 0+ for row in split_row_tokens:+ for token in row:+ new_texts.append(token)+ if text_idx < len(texts) and texts[text_idx] == token:+ text_idx += 1+ if text_idx < len(texts) and texts[text_idx] not in _ALL_TAGS:+ new_texts.append(texts[text_idx])+ text_idx += 1+ new_texts.append(OTSL_NL)+ if text_idx < len(texts) and texts[text_idx] == OTSL_NL:+ text_idx += 1+ texts = new_texts++ def _count_right(tokens_2d: List[List[str]], c: int, r: int, which: List[str]) -> int:+ span = 0+ ci = c+ while ci < len(tokens_2d[r]) and tokens_2d[r][ci] in which:+ ci += 1+ span += 1+ return span++ def _count_down(tokens_2d: List[List[str]], c: int, r: int, which: List[str]) -> int:+ span = 0+ ri = r+ while ri < len(tokens_2d) and c < len(tokens_2d[ri]) and tokens_2d[ri][c] in which:+ ri += 1+ span += 1+ return span++ table_cells: List[TableCell] = []+ r_idx = 0+ c_idx = 0++ for i, text in enumerate(texts):+ if text in [OTSL_FCEL, OTSL_ECEL]:+ row_span = 1+ col_span = 1+ right_offset = 1+ cell_text = ""++ if text != OTSL_ECEL:+ cell_text = texts[i + 1] if i + 1 < len(texts) else ""+ right_offset = 2++ next_right = texts[i + right_offset] if i + right_offset < len(texts) else ""+ next_bottom = ""+ if r_idx + 1 < len(split_row_tokens) and c_idx < len(split_row_tokens[r_idx + 1]):+ next_bottom = split_row_tokens[r_idx + 1][c_idx]++ if next_right in [OTSL_LCEL, OTSL_XCEL]:+ col_span += _count_right(split_row_tokens, c_idx + 1, r_idx, [OTSL_LCEL, OTSL_XCEL])+ if next_bottom in [OTSL_UCEL, OTSL_XCEL]:+ row_span += _count_down(split_row_tokens, c_idx, r_idx + 1, [OTSL_UCEL, OTSL_XCEL])++ table_cells.append(+ TableCell(+ text=cell_text.strip(),+ row_span=row_span,+ col_span=col_span,+ start_row_offset_idx=r_idx,+ end_row_offset_idx=r_idx + row_span,+ start_col_offset_idx=c_idx,+ end_col_offset_idx=c_idx + col_span,+ )+ )++ if text in [OTSL_FCEL, OTSL_ECEL, OTSL_LCEL, OTSL_UCEL, OTSL_XCEL]:+ c_idx += 1+ if text == OTSL_NL:+ r_idx += 1+ c_idx = 0++ return table_cells, split_row_tokens+++def convert_otsl_to_html(otsl_content: str) -> str:+ 'Convert an OTSL-v1.0 string to an HTML ``<table>``.'+++ otsl_content = otsl_pad_to_sqr_v2(html.unescape(otsl_content))+ tokens, mixed_texts = otsl_extract_tokens_and_text(otsl_content)+ table_cells, split_row_tokens = otsl_parse_texts(mixed_texts, tokens)+ table_data = TableData(+ num_rows=len(split_row_tokens),+ num_cols=(max(len(row) for row in split_row_tokens) if split_row_tokens else 0),+ table_cells=table_cells,+ )+ return export_to_html(table_data)diff --git a/sdk/minicpmvocr/postprocess/otsl/types.py b/sdk/minicpmvocr/postprocess/otsl/types.pynew file mode 100644index 0000000..33f9f95--- /dev/null+++ b/sdk/minicpmvocr/postprocess/otsl/types.py@@ -0,0 +1,104 @@+'OTSL table data structures ported from PaddleX paddleocr_vl/uilts.py.'++from __future__ import annotations++import html+from typing import Any, Dict, List++from pydantic import BaseModel, computed_field, model_validator+++class TableCell(BaseModel):+ 'A single cell in a table, with optional row/col span.'++ row_span: int = 1+ col_span: int = 1+ start_row_offset_idx: int+ end_row_offset_idx: int+ start_col_offset_idx: int+ end_col_offset_idx: int+ text: str+ column_header: bool = False+ row_header: bool = False+ row_section: bool = False++ @model_validator(mode="before")+ @classmethod+ def _from_dict_format(cls, data: Any) -> Any:++ if isinstance(data, Dict):+ if "text" in data:+ return data+ text = data["bbox"].get("token", "")+ if not text:+ text_cells = data.pop("text_cell_bboxes", None)+ if text_cells:+ for el in text_cells:+ text += el["token"] + " "+ text = text.strip()+ data["text"] = text+ return data+++class TableData(BaseModel):+ 'Container for all cells in a table plus its row/column dimensions.'++ table_cells: List[TableCell] = []+ num_rows: int = 0+ num_cols: int = 0++ @computed_field # type: ignore[misc]+ @property+ def grid(self) -> List[List[TableCell]]:+ 'Return a 2-D grid of TableCell objects (num_rows × num_cols).'+ table_data: List[List[TableCell]] = [+ [+ TableCell(+ text="",+ start_row_offset_idx=i,+ end_row_offset_idx=i + 1,+ start_col_offset_idx=j,+ end_col_offset_idx=j + 1,+ )+ for j in range(self.num_cols)+ ]+ for i in range(self.num_rows)+ ]+ for cell in self.table_cells:+ for i in range(+ min(cell.start_row_offset_idx, self.num_rows),+ min(cell.end_row_offset_idx, self.num_rows),+ ):+ for j in range(+ min(cell.start_col_offset_idx, self.num_cols),+ min(cell.end_col_offset_idx, self.num_cols),+ ):+ table_data[i][j] = cell+ return table_data+++def export_to_html(table_data: TableData) -> str:+ 'Render a TableData object as an HTML ``<table>`` string.'+ if not table_data.table_cells:+ return ""++ nrows = table_data.num_rows+ ncols = table_data.num_cols+ grid = table_data.grid+ body = ""+ for i in range(nrows):+ body += "<tr>"+ for j in range(ncols):+ cell: TableCell = grid[i][j]+ if cell.start_row_offset_idx != i or cell.start_col_offset_idx != j:+ continue+ content = html.escape(cell.text.strip())+ celltag = "th" if cell.column_header else "td"+ opening = celltag+ if cell.row_span > 1:+ opening += f' rowspan="{cell.row_span}"'+ if cell.col_span > 1:+ opening += f' colspan="{cell.col_span}"'+ body += f"<{opening}>{content}</{celltag}>"+ body += "</tr>"+ return f"<table>{body}</table>"diff --git a/sdk/minicpmvocr/prompts.py b/sdk/minicpmvocr/prompts.pynew file mode 100644index 0000000..8978ec5--- /dev/null+++ b/sdk/minicpmvocr/prompts.py@@ -0,0 +1,105 @@+from __future__ import annotations++import json+from pathlib import Path+from typing import Dict++import yaml++DEFAULT_PROMPT_MAP = {+ "default": {+ "prompt": "Text Recognition:",+ "max_new_tokens": 8192,+ "output_format": "text",+ "resize_min_side": None,+ "slice_nums": 9,+ },+ "element_prompts": {+ "text": {"prompt": "Text Recognition:", "max_new_tokens": 4096, "output_format": "text"},+ "content": {"prompt": "Text Recognition:", "max_new_tokens": 4096, "output_format": "text"},+ "abstract": {"prompt": "Text Recognition:", "max_new_tokens": 4096, "output_format": "text"},+ "reference": {"prompt": "Text Recognition:", "max_new_tokens": 2048, "output_format": "text"},+ "reference_content": {"prompt": "Text Recognition:", "max_new_tokens": 2048, "output_format": "text"},+ "vertical_text": {"prompt": "Text Recognition:", "max_new_tokens": 2048, "output_format": "text"},+ "vision_footnote": {"prompt": "Text Recognition:", "max_new_tokens": 1024, "output_format": "text"},+ "algorithm": {"prompt": "Text Recognition:", "max_new_tokens": 4096, "output_format": "text"},+ "doc_title": {"prompt": "Text Recognition:", "max_new_tokens": 512, "output_format": "text"},+ "paragraph_title": {"prompt": "Text Recognition:", "max_new_tokens": 512, "output_format": "text"},+ "figure_title": {"prompt": "Text Recognition:", "max_new_tokens": 512, "output_format": "text"},+ "table": {"prompt": "Table Recognition:", "max_new_tokens": 8192, "output_format": "html"},+++ "display_formula": {"prompt": "Formula Recognition:", "max_new_tokens": 2048, "output_format": "latex"},+ "inline_formula": {"prompt": "Text Recognition:", "max_new_tokens": 1024, "output_format": "latex"},+ "formula_number": {"prompt": "Text Recognition:", "max_new_tokens": 256, "output_format": "text"},+ "header": {"prompt": "Text Recognition:", "max_new_tokens": 512, "output_format": "text"},+ "footer": {"prompt": "Text Recognition:", "max_new_tokens": 512, "output_format": "text"},+ "footnote": {"prompt": "Text Recognition:", "max_new_tokens": 1024, "output_format": "text"},+ "aside_text": {"prompt": "Text Recognition:", "max_new_tokens": 1024, "output_format": "text"},+ "number": {"prompt": "Text Recognition:", "max_new_tokens": 256, "output_format": "text"},+++ "chart": {"prompt": "Chart to Table:", "max_new_tokens": 4096, "output_format": "html"},+ "seal": {"prompt": "Seal Recognition:", "max_new_tokens": 256, "output_format": "text"},+++ },+ "markdown_assembly": {+ "ignore_labels": ["number", "footnote", "header", "footer", "aside_text"],+ "title_format": {"doc_title": "# {content}", "paragraph_title": "## {content}", "figure_title": "*{content}*"},+ "formula_format": {"display_formula": "$$\n{content}\n$$", "inline_formula": "${content}$"},+ "table_format": "{content}",+ "image_format": "![image]()",+ "chart_format": "{content}",+ "seal_format": "{content}",+ },+}+++def load_prompt_map(cfg: Dict) -> Dict:+ 'The effective prompt map for a run.'+ prompt_map_path = cfg["prompt"].get("prompt_map", "")+ prompt_map = json.loads(json.dumps(DEFAULT_PROMPT_MAP))+ if prompt_map_path and Path(prompt_map_path).is_file():+ with Path(prompt_map_path).open("r", encoding="utf-8") as f:+ external = yaml.safe_load(f) or {}+ prompt_map.update(external)+ prompt_map = apply_prompt_override_mode(prompt_map, cfg["prompt"].get("override_mode", "legacy"))+ from .layouts.base import resolve_skip_vlm_labels+ return apply_skip_vlm_labels(prompt_map, resolve_skip_vlm_labels(cfg.get("layout")))+++def get_element_cfg(prompt_map: Dict, label: str) -> Dict | None:+ "One label's recipe, or None when the label is skipped."+ default = prompt_map.get("default", {})+ elem = prompt_map.get("element_prompts", {}).get(label, {})+ if elem.get("skip", False):+ return None+ return {+ "prompt": elem.get("prompt", default.get("prompt", "Text Recognition:")),+ "max_new_tokens": elem.get("max_new_tokens", default.get("max_new_tokens", 4096)),+ "output_format": elem.get("output_format", default.get("output_format", "text")),+ "resize_min_side": elem.get("resize_min_side", default.get("resize_min_side", None)),+ "slice_nums": elem.get("slice_nums", default.get("slice_nums", 9)),+ }+++def apply_skip_vlm_labels(prompt_map: dict, skip_labels) -> dict:+ 'Mark `skip_labels` as skip in the prompt map.'+ if not skip_labels:+ return prompt_map+ elems = prompt_map.setdefault("element_prompts", {})+ for label in skip_labels:+ elems.setdefault(label, {})["skip"] = True+ return prompt_map+++def apply_prompt_override_mode(prompt_map: dict, mode: str) -> dict:+ normalized = (mode or "legacy").strip().lower()+ if normalized in ("legacy", "none"):+ return prompt_map+ if normalized in ("display_formula_v3", "formula_recognition"):+ elems = prompt_map.setdefault("element_prompts", {})+ elems.setdefault("display_formula", {})["prompt"] = "Formula Recognition:"+ return prompt_map+ raise ValueError(f"Unknown prompt override mode: {mode}")diff --git a/sdk/minicpmvocr/py.typed b/sdk/minicpmvocr/py.typednew file mode 100644index 0000000..e69de29diff --git a/sdk/pyproject.toml b/sdk/pyproject.tomlnew file mode 100644index 0000000..6516a19--- /dev/null+++ b/sdk/pyproject.toml@@ -0,0 +1,79 @@+[build-system]+requires = ["setuptools>=77"]+build-backend = "setuptools.build_meta"++[project]+name = "minicpm-ocr"+dynamic = ["version"]+description = "MiniCPM-V OCR SDK: document layout + VLM orchestration frontend with pluggable inference backends"+readme = { text = "MiniCPM-OCR SDK for document parsing with pluggable inference backends.", content-type = "text/plain" }+requires-python = ">=3.10"+license = "Apache-2.0"+license-files = ["LICENSE"]+classifiers = [+ "Development Status :: 4 - Beta",+ "Intended Audience :: Developers",+ "Programming Language :: Python :: 3",+ "Programming Language :: Python :: 3.10",+ "Programming Language :: Python :: 3.11",+ "Programming Language :: Python :: 3.12",+ "Topic :: Scientific/Engineering :: Image Recognition",+ "Topic :: Text Processing",+]+++dependencies = [+ "PyYAML>=6.0",+ "Pillow>=9.0",+ "requests>=2.28",+ "numpy>=1.26",+ "pydantic>=2.0",+]++[project.optional-dependencies]+++layout = [+ "paddlex>=3.4",+ "opencv-contrib-python>=4.10",+ "shapely>=2.0",+]+++pdf = [+ "PyMuPDF>=1.23",+]+++crosspage = [+ "beautifulsoup4>=4.12",+]+++upright = [+ "paddleocr>=3.0",+ "opencv-contrib-python>=4.10",+]+++all = ["minicpm-ocr[layout,pdf,crosspage,upright]"]++[project.urls]+Homepage = "https://github.com/OpenBMB/MiniCPM-OCR"+Source = "https://github.com/OpenBMB/MiniCPM-OCR/tree/main/sdk"+Documentation = "https://github.com/OpenBMB/MiniCPM-OCR/blob/main/docs/minicpmvocr_tutorial_en.md"+Issues = "https://github.com/OpenBMB/MiniCPM-OCR/issues"++[project.scripts]+minicpmvocr = "minicpmvocr.cli:main"++[tool.setuptools.dynamic]+version = { attr = "minicpmvocr._version.__version__" }++[tool.setuptools.packages.find]+include = ["minicpmvocr*"]++[tool.setuptools.package-data]+++minicpmvocr = ["py.typed", "configs/*.yaml"]diff --git a/sdk/scripts/demo_env.sh b/sdk/scripts/demo_env.shnew file mode 100644index 0000000..433dc48--- /dev/null+++ b/sdk/scripts/demo_env.sh@@ -0,0 +1,26 @@+#!/usr/bin/env bash++SDK_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"+PROJECT_ROOT="$(cd "$SDK_ROOT/.." && pwd)"+OCR_DEMO_DIR="$SDK_ROOT/${1:-webdemo}"+SDK_PROFILE="${SDK_PROFILE:-sdk-gpu}"+OCRWEB_ENV="${OCRWEB_ENV:-$PROJECT_ROOT/.venv-$SDK_PROFILE}"+OCRWEB_PYTHON="${OCRWEB_PYTHON:-$OCRWEB_ENV/bin/python}"+VLLM_PYTHON="${VLLM_PYTHON:-$PROJECT_ROOT/.venv-vllm/bin/python}"++export OCR_ASSETS_DIR="${OCR_ASSETS_DIR:-$PROJECT_ROOT/models}"+export OCR_MODEL_PATH="${OCR_MODEL_PATH:-$OCR_ASSETS_DIR/MiniCPM-OCR}"+export OCR_LAYOUT_MODEL_DIR="${OCR_LAYOUT_MODEL_DIR:-$OCR_ASSETS_DIR/PP-DocLayoutV3_infer}"+export OCR_UPRIGHT_DIR="${OCR_UPRIGHT_DIR:-$OCR_ASSETS_DIR/paddle_upright}"+export OCRWEB_DATA_DIR="${OCRWEB_DATA_DIR:-$OCR_DEMO_DIR/data}"+export OCR_PAGE_REGISTRY="${OCR_PAGE_REGISTRY:-$OCRWEB_DATA_DIR/page-workers}"+export OCR_UPRIGHT_REGISTRY="${OCR_UPRIGHT_REGISTRY-$OCRWEB_DATA_DIR/upright-workers}"+export PYTHONPATH="$SDK_ROOT${PYTHONPATH:+:$PYTHONPATH}"+export PYTHONNOUSERSITE=1++ocr_require_python() {+ [[ -x "$OCRWEB_PYTHON" ]] || {+ echo "Python not found: $OCRWEB_PYTHON. Run $OCR_DEMO_DIR/scripts/setup_env.sh or set OCRWEB_PYTHON." >&2+ return 1+ }+}diff --git a/sdk/scripts/env.example.sh b/sdk/scripts/env.example.shnew file mode 100644index 0000000..bf50345--- /dev/null+++ b/sdk/scripts/env.example.sh@@ -0,0 +1,82 @@+#!/usr/bin/env bash+++# export OCR_ASSETS_DIR=/path/to/ocr-sdk+++# export OCR_LAYOUT_MODEL_DIR=/path/to/PP-DocLayoutV3+++# export VLLM_URL=http://127.0.0.1:18499+# export VLLM_URLS=http://127.0.0.1:18499,http://127.0.0.1:18500++# export VLLM_PYTHON=/path/to/envs/vllm-env/bin/python+# export OCR_HF_MODEL=/path/to/merge_model+++# export LLAMA_SERVER_BIN=/path/to/llama-server+# export OCR_GGUF_MODEL=/path/to/ocr_model-F16.gguf+# export OCR_GGUF_MMPROJ=/path/to/ocr_mmproj-F16.gguf+# export LLAMA_HOST=127.0.0.1+# export LLAMA_PORT=18601+# export LLAMA_GPU=0+# export LLAMA_PARALLEL=0+++# export LLAMA_DOWNSAMPLE_MODE=none+++# export LLAMA_LIB_DIRS=/path/to/nccl/lib:/path/to/cuda/lib64+# export LLAMA_LD_PRELOAD=/path/to/lib/libstdc++.so.6+++# export OLLAMA_URL=http://127.0.0.1:11434+# export OLLAMA_HOST_ADDR=127.0.0.1:11434+# export OLLAMA_MODEL=minicpm-ocr+# export OLLAMA_BIN=/path/to/ollama+# export OLLAMA_MODELS_DIR=/path/to/models+# export OLLAMA_MODELFILE=/path/to/Modelfile+# export OLLAMA_GPU=0+++# export OPENAI_BASE_URL=http://127.0.0.1:30000+# export OPENAI_MODEL=minicpm-ocr+# export OPENAI_API_KEY=sk-...++# export SDK_PROFILE=sdk-cpu+# export OCRWEB_ENV=/path/to/sdk-env+# export OCRWEB_PYTHON=/path/to/sdk-env/bin/python+# export OCR_MODEL_PATH=/path/to/MiniCPM-OCR+# export OCR_SERVED_NAME=minicpm-ocr+# export OCR_UPRIGHT_DIR=/path/to/paddle_upright+# export OCRWEB_DATA_DIR=/path/to/demo-data+# export OCR_PAGE_REGISTRY=/path/to/shared/page-workers+# export OCR_UPRIGHT_REGISTRY=/path/to/shared/upright-workers+# export OCR_ADVERTISE_HOST=worker.example.com+# export OCR_REPLICA_GPUS="0 1"+# export CUDA_COMPAT_DIR=/path/to/cuda/compat+# export OCR_DOWNLOAD_UPRIGHT=1++# export BASE_IMAGE=your-registry/ocr-base:tag+# export IMAGE=minicpm-ocr-webdemo:latest+# export OCR_IMAGE=your-registry/ocr-vllm:tag+# export RM_IMAGE=your-registry/ocr-rm:tag+# export OCR_RM_MODEL_DIR=/path/to/rm-model+# export OCR_RM_SERVING_ROOT=/path/to/ocr-rm-serving+# export RM_NODE_BIN=/path/to/linux/node+# export SERVER_IMAGE=your-registry/ocr-vllm:tag+# export CLIENT_IMAGE=your-registry/ocr-sdk:tag+# export SCORE_IMAGE=your-registry/omnidocbench-eval:tag+# export IMAGES=/path/to/omnidocbench/images+# export EVAL_REPO=/path/to/evaluation-repository+# export OCR_REMOTE_SDK_DIR=/path/to/remote/sdk++# export OBSUTIL=/path/to/obsutil+# export OBS_ENDPOINT=https://obs.your-region.myhuaweicloud.com+# export OBS_BUCKET=your-bucket+# export OBS_AK=your-access-key+# export OBS_SK=your-secret-key+# export RM_BRIDGE_ENV=/path/to/rm_score.env+# export RM_SCORE_URL=https://rm.example.com/score+# export RM_SCORE_USER=your-user+# export RM_SCORE_PASSWORD=your-passworddiff --git a/sdk/scripts/eval_omnidocbench_v16_docker.sh b/sdk/scripts/eval_omnidocbench_v16_docker.shnew file mode 100755index 0000000..69146f3--- /dev/null+++ b/sdk/scripts/eval_omnidocbench_v16_docker.sh@@ -0,0 +1,174 @@+#!/usr/bin/env bash+++set -Eeuo pipefail++SDK_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"+MODEL_DIR="${1:-${OCR_MODEL_PATH:-}}"+: "${MODEL_DIR:?Pass a model directory as the first argument or set OCR_MODEL_PATH}"+RUN_NAME="${2:-omnidocbench_v16_$(date +%Y%m%d_%H%M)}"++: "${IMAGES:?Set IMAGES to the OmniDocBench image directory}"+: "${EVAL_REPO:?Set EVAL_REPO to the evaluation repository containing collect_scores.py}"+RUN_ROOT="${RUN_ROOT_BASE:-$SDK_DIR/runs/eval}/$RUN_NAME"+++CONFIG="${CONFIG:-$SDK_DIR/minicpmvocr/configs/minicpmvocr.yaml}"++: "${SERVER_IMAGE:?Set SERVER_IMAGE to a compatible OCR vLLM image}"+: "${CLIENT_IMAGE:?Set CLIENT_IMAGE to an image with the SDK layout dependencies}"+: "${SCORE_IMAGE:?Set SCORE_IMAGE to an OmniDocBench scorer image with ground truth}"++GPU_ID=0+PORT=18509+SMOKE_PAGES=8+SCORE_WORKERS=16+EXPECTED_PAGES=1651+SERVER_NAME="minicpmvocr-eval-vllm-${RUN_NAME}"+SERVED_MODEL="${OCR_SERVED_NAME:-minicpm-ocr}"++log() { printf '[%s] %s\n' "$(date -Is)" "$*"; }++stop_server() {+ if docker ps -a --format '{{.Names}}' | grep -Fxq "$SERVER_NAME"; then+ log "stopping vLLM server $SERVER_NAME"+ docker stop --time 30 "$SERVER_NAME" >/dev/null 2>&1 || true+ docker rm -f "$SERVER_NAME" >/dev/null 2>&1 || true+ fi+}+trap stop_server EXIT INT TERM++assert_environment() {+ [[ -f "$MODEL_DIR/config.json" && -f "$MODEL_DIR/model.safetensors" ]] || { echo "Bad MODEL_DIR: $MODEL_DIR" >&2; exit 1; }+ [[ -f "$CONFIG" && -d "$SDK_DIR/minicpmvocr" && -d "$IMAGES" ]] || { echo "Missing config / SDK / images" >&2; exit 1; }+ for image in "$SERVER_IMAGE" "$CLIENT_IMAGE" "$SCORE_IMAGE"; do docker image inspect "$image" >/dev/null; done+ [[ "$(nvidia-smi --query-gpu=memory.used --format=csv,noheader,nounits -i "$GPU_ID")" -lt 1024 ]] || { echo "GPU $GPU_ID is not idle" >&2; exit 1; }+ if curl --noproxy '*' -fsS --max-time 1 "http://127.0.0.1:$PORT/v1/models" >/dev/null 2>&1; then+ echo "Port $PORT already has a vLLM endpoint" >&2; exit 1+ fi+ mkdir -p "$RUN_ROOT/server_logs"+ cat >"$RUN_ROOT/run_meta.json" <<META+{+ "run_name": "$RUN_NAME",+ "model_dir": "$MODEL_DIR",+ "model_safetensors_sha256": "$(sha256sum "$MODEL_DIR/model.safetensors" | cut -d' ' -f1)",+ "protocol": "omnidocbench-v1.6-full: minicpmvocr run (paddlex layout + crop + infer) from raw images, scored with omnidocbench-eval:v1.6-with-gt",+ "sdk_commit": "$(git -C "$SDK_DIR" rev-parse HEAD 2>/dev/null || echo unknown)",+ "server_image": "$SERVER_IMAGE", "server_image_id": "$(docker image inspect "$SERVER_IMAGE" --format '{{.Id}}')",+ "client_image": "$CLIENT_IMAGE", "client_image_id": "$(docker image inspect "$CLIENT_IMAGE" --format '{{.Id}}')",+ "score_image": "$SCORE_IMAGE", "score_image_id": "$(docker image inspect "$SCORE_IMAGE" --format '{{.Id}}')",+ "vllm": {"max_model_len": 40960, "max_num_batched_tokens": 8192, "gpu_memory_utilization": 0.70, "batch_invariant": 1, "gpu_id": $GPU_ID},+ "sdk_config": "$CONFIG",+ "sdk_pipeline": $(python3 -c "import yaml,json,sys;print(json.dumps(yaml.safe_load(open(sys.argv[1]))['pipeline']))" "$CONFIG"),+ "started_at": "$(date -Is)"+}+META+}++start_server() {+ stop_server+ docker run -d --rm --name "$SERVER_NAME" \+ --gpus "device=$GPU_ID" --ipc host \+ -p "127.0.0.1:$PORT:$PORT" \+ -e VLLM_BATCH_INVARIANT=1 \+ -e "OCR_SERVED_NAME=$SERVED_MODEL" -e "SERVER_PORT=$PORT" -e "SERVER_LOG=/logs/vllm_gpu${GPU_ID}.log" \+ -v "$MODEL_DIR:/models/ocr:ro" \+ -v "$RUN_ROOT/server_logs:/logs" \+ --entrypoint bash "$SERVER_IMAGE" -lc '+ exec python -m vllm.entrypoints.openai.api_server \+ --model /models/ocr --served-model-name "$OCR_SERVED_NAME" --trust-remote-code \+ --host 0.0.0.0 --port "$SERVER_PORT" --tensor-parallel-size 1 \+ --max-model-len 40960 --max-num-batched-tokens 8192 \+ --limit-mm-per-prompt '"'"'{"image": 36}'"'"' \+ --gpu-memory-utilization 0.70 \+ --attention-backend FLASH_ATTN --uvicorn-log-level warning \+ >>"$SERVER_LOG" 2>&1+ ' >/dev/null+ local deadline=$((SECONDS + 1200))+ while ! curl --noproxy '*' -fsS --max-time 5 "http://127.0.0.1:$PORT/v1/models" >/dev/null 2>&1; do+ if ! docker ps --format '{{.Names}}' | grep -Fxq "$SERVER_NAME"; then+ echo "vLLM server exited" >&2; tail -120 "$RUN_ROOT/server_logs/vllm_gpu${GPU_ID}.log" >&2 || true; exit 1+ fi+ if ((SECONDS >= deadline)); then+ echo "Timed out waiting for vLLM port $PORT" >&2; tail -120 "$RUN_ROOT/server_logs/vllm_gpu${GPU_ID}.log" >&2 || true; exit 1+ fi+ sleep 5+ done+ log "vLLM endpoint $PORT ready"+}+++run_sdk() {+ local tag="$1" limit="$2" expected_pages="$3"+ if [[ -f "$RUN_ROOT/$tag/summary.json" ]]; then log "reuse completed run: $tag"; return; fi+ [[ ! -e "$RUN_ROOT/$tag" ]] || { echo "Refusing to mix with partial run dir: $RUN_ROOT/$tag" >&2; exit 1; }+++ docker run --rm --network host --gpus "device=$GPU_ID" --ipc host \+ -e PYTHONPATH=/work/pip -e "RUN_TAG=$tag" -e "LIMIT=$limit" \+ -e OCR_RUN_ROOT=/work/runs -e OCR_LAYOUT_MODEL_DIR=/models/layout_paddlex \+ -e "VLLM_URL=http://127.0.0.1:$PORT" -e "OCR_SERVED_NAME=$SERVED_MODEL" \+ -v "$IMAGES:/work/input:ro" -v "$SDK_DIR:/work/pip:ro" -v "$RUN_ROOT:/work/runs" -v "$CONFIG:/work/config.yaml:ro" \+ --entrypoint bash "$CLIENT_IMAGE" -lc '+ cd /work/pip && python -u -m minicpmvocr run --config /work/config.yaml \+ --set run.run_tag="$RUN_TAG" --set input.limit="$LIMIT" \+ --set input.image_dir=/work/input \+ --set layout.device=cuda:0 \+ --set engine.max_model_len=40960 \+ --set pipeline.overlap_layout=true --set pipeline.max_workers=32 \+ --set logging.progress_log_every=50+ ' 2>&1 | grep -v "Warning\|warnings.warn\|Connectivity check" | tee "$RUN_ROOT/$tag.log"+ local actual; actual="$(find "$RUN_ROOT/$tag/output" -maxdepth 1 -type f -name '*.md' | wc -l)"+ [[ "$actual" -eq "$expected_pages" ]] || { echo "Page count mismatch: $actual != $expected_pages" >&2; exit 1; }+}++score_run() {+ local prediction_dir="$RUN_ROOT/full/output" score_dir="$RUN_ROOT/score/omnidocbench_v16"+ local summary="$score_dir/output_quick_match_run_summary.json"+ if [[ -f "$summary" ]]; then log "reuse completed score"; return; fi+ mkdir -p "$score_dir"+ cat >"$score_dir/eval.yaml" <<YAML+end2end_eval:+ metrics:+ text_block: {metric: [Edit_dist]}+ display_formula: {metric: [Edit_dist, CDM], cdm_workers: $SCORE_WORKERS}+ table: {metric: [TEDS, Edit_dist], teds_workers: $SCORE_WORKERS}+ reading_order: {metric: [Edit_dist]}+ dataset:+ dataset_name: end2end_dataset+ ground_truth: {data_path: /opt/omnidocbench/gt/OmniDocBench_v1.6_full.json}+ prediction: {data_path: /output}+ match_method: quick_match+ match_executor: process+ match_workers: $SCORE_WORKERS+ quick_match_truncated_timeout_sec: 300+ match_timeout_sec: 420+YAML+ docker run --rm -v "$prediction_dir:/output:ro" -v "$score_dir:/score" \+ --entrypoint bash "$SCORE_IMAGE" -lc '+ set -euo pipefail+ test "$(find /output -maxdepth 1 -type f -name "*.md" | wc -l)" -eq 1651+ mkdir -p /tmp/omnidocbench-score && ln -sfn /score /tmp/omnidocbench-score/result+ cd /tmp/omnidocbench-score+ omnidocbench-eval --config /score/eval.yaml 2>&1 | tee /score/eval.log+ '+ [[ -f "$summary" ]] || { echo "Scoring did not produce $summary" >&2; exit 1; }+ python3 "$EVAL_REPO/evaluations/scripts/collect_scores.py" --output-root "$RUN_ROOT/score" --output "$RUN_ROOT/score_summary.json"+}++main() {+ assert_environment+ log "run_root=$RUN_ROOT model=$MODEL_DIR"+ if [[ ! -f "$RUN_ROOT/full/summary.json" ]]; then+ start_server+ run_sdk smoke "$SMOKE_PAGES" "$SMOKE_PAGES"+ log "smoke ok: $(ls "$RUN_ROOT/smoke/output" | head -3 | tr '\n' ' ')"+ run_sdk full 0 "$EXPECTED_PAGES"+ stop_server+ fi+ score_run+ log "DONE: $RUN_ROOT/score_summary.json"+ cat "$RUN_ROOT/score_summary.json"+}++main "$@"diff --git a/sdk/scripts/start_llamacpp.sh b/sdk/scripts/start_llamacpp.shnew file mode 100755index 0000000..6b17b0c--- /dev/null+++ b/sdk/scripts/start_llamacpp.sh@@ -0,0 +1,90 @@+#!/usr/bin/env bash+++set -euo pipefail++SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"+SDK_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"+ENV_LOCAL="${OCR_ENV_FILE:-$SDK_DIR/scripts/env.local.sh}"+# shellcheck disable=SC1090+[ -f "$ENV_LOCAL" ] && source "$ENV_LOCAL"++ASSETS_DIR="${OCR_ASSETS_DIR:-$(cd "$SDK_DIR/.." && pwd)}"++LLAMA_SERVER_BIN="${LLAMA_SERVER_BIN:-$ASSETS_DIR/llama.cpp-omni/build/bin/llama-server}"+OCR_GGUF_MODEL="${OCR_GGUF_MODEL:-$ASSETS_DIR/gguf/ocr_model-F16.gguf}"+OCR_GGUF_MMPROJ="${OCR_GGUF_MMPROJ:-$ASSETS_DIR/gguf/ocr_mmproj-F16.gguf}"+LLAMA_HOST="${LLAMA_HOST:-127.0.0.1}"+LLAMA_PORT="${LLAMA_PORT:-18601}"+LLAMA_GPU="${LLAMA_GPU:-${CUDA_VISIBLE_DEVICES:-0}}"+LLAMA_NGL="${LLAMA_NGL:-99}"+LLAMA_CTX="${LLAMA_CTX:-8192}"+LLAMA_PARALLEL="${LLAMA_PARALLEL:-0}"+++LLAMA_DOWNSAMPLE_MODE="${LLAMA_DOWNSAMPLE_MODE:-none}"++for f in "$LLAMA_SERVER_BIN" "$OCR_GGUF_MODEL" "$OCR_GGUF_MMPROJ"; do+ if [ ! -e "$f" ]; then+ echo "错误: 找不到 $f" >&2+ echo " ASSETS_DIR=$ASSETS_DIR(用 OCR_ASSETS_DIR 换根目录,或单独 export 对应变量)" >&2+ exit 1+ fi+done+++BIN_DIR="$(cd "$(dirname "$LLAMA_SERVER_BIN")" && pwd)"+export LD_LIBRARY_PATH="${BIN_DIR}${LLAMA_LIB_DIRS:+:$LLAMA_LIB_DIRS}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"+[ -n "${LLAMA_LD_PRELOAD:-}" ] && export LD_PRELOAD="$LLAMA_LD_PRELOAD"+export CUDA_VISIBLE_DEVICES="$LLAMA_GPU"+++preflight() {+ local ldd_out missing stale_symbols probe+ ldd_out="$(ldd "$LLAMA_SERVER_BIN" 2>&1 || true)"+++ missing="$(echo "$ldd_out" | awk '/=> *not found/ {print $1}' | sort -u)"+ if [ -n "$missing" ]; then+ echo "错误: 以下动态库找不到:" >&2+ echo "$missing" | sed 's/^/ /' >&2+ echo " 把它们所在目录加进 LLAMA_LIB_DIRS(冒号分隔)后重试,例如:" >&2+ echo " export LLAMA_LIB_DIRS=/path/to/nccl/lib:/path/to/cuda/lib64" >&2+ echo " 定位办法: ldd '$LLAMA_SERVER_BIN' | grep 'not found'" >&2+ return 1+ fi+++ probe="$("$LLAMA_SERVER_BIN" --help 2>&1 >/dev/null || true)"+ stale_symbols="$(printf '%s\n%s\n' "$ldd_out" "$probe" | grep -oE "(GLIBCXX|CXXABI)_[0-9.]+" | sort -u)"+ if [ -n "$stale_symbols" ]; then+ echo "错误: 依赖的 libstdc++ 太旧,缺少符号: $(echo "$stale_symbols" | tr '\n' ' ')" >&2+ echo "$probe" | head -2 | sed 's/^/ /' >&2+ echo " 找一个够新的 libstdc++.so.6 并设置(RPATH 压过 LD_LIBRARY_PATH,只有 LD_PRELOAD 有效):" >&2+ echo " export LLAMA_LD_PRELOAD=/path/to/lib/libstdc++.so.6" >&2+ echo " 挑选办法: strings <libstdc++.so.6> | grep -E '^(GLIBCXX|CXXABI)_' | tail" >&2+ return 1+ fi+ return 0+}++preflight || exit 1+if [ "${1:-}" = "--check" ]; then+ echo "自检通过: $LLAMA_SERVER_BIN 可加载"+ exit 0+fi++ARGS=(+ -m "$OCR_GGUF_MODEL"+ --mmproj "$OCR_GGUF_MMPROJ"+ --host "$LLAMA_HOST"+ --port "$LLAMA_PORT"+ -ngl "$LLAMA_NGL"+ -c "$LLAMA_CTX"+)+[ "$LLAMA_DOWNSAMPLE_MODE" != "none" ] && ARGS+=(--downsample-mode "$LLAMA_DOWNSAMPLE_MODE")+[ "$LLAMA_PARALLEL" -gt 0 ] && ARGS+=(--parallel "$LLAMA_PARALLEL")++echo "启动 llama-server: GPU=$LLAMA_GPU http://${LLAMA_HOST}:${LLAMA_PORT}"+echo " 健康检查: curl -s http://${LLAMA_HOST}:${LLAMA_PORT}/health"+exec "$LLAMA_SERVER_BIN" "${ARGS[@]}" "$@"diff --git a/sdk/scripts/start_ollama.sh b/sdk/scripts/start_ollama.shnew file mode 100755index 0000000..5fdb971--- /dev/null+++ b/sdk/scripts/start_ollama.sh@@ -0,0 +1,70 @@+#!/usr/bin/env bash+++set -euo pipefail++SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"+SDK_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"+ENV_LOCAL="${OCR_ENV_FILE:-$SDK_DIR/scripts/env.local.sh}"+# shellcheck disable=SC1090+[ -f "$ENV_LOCAL" ] && source "$ENV_LOCAL"++ASSETS_DIR="${OCR_ASSETS_DIR:-$(cd "$SDK_DIR/.." && pwd)}"++find_ollama() {+ if [ -n "${OLLAMA_BIN:-}" ]; then echo "$OLLAMA_BIN"; return; fi+ command -v ollama 2>/dev/null && return+ for candidate in "$HOME/projects/ollama/ollama" "$ASSETS_DIR/../ollama/ollama"; do+ [ -x "$candidate" ] && { echo "$candidate"; return; }+ done+ echo ""+}++OLLAMA_BIN="$(find_ollama)"+OLLAMA_MODELFILE="${OLLAMA_MODELFILE:-$ASSETS_DIR/ollama-ocr/Modelfile}"+OLLAMA_MODEL="${OLLAMA_MODEL:-surgery-ocr}"+OLLAMA_GPU="${OLLAMA_GPU:-${CUDA_VISIBLE_DEVICES:-0}}"+OLLAMA_HOST_ADDR="${OLLAMA_HOST_ADDR:-127.0.0.1:11434}"++if [ -z "$OLLAMA_BIN" ] || [ ! -x "$OLLAMA_BIN" ]; then+ echo "错误: 找不到 ollama 可执行文件。装好后放进 PATH,或 export OLLAMA_BIN=/path/to/ollama" >&2+ exit 1+fi+++[ -n "${OLLAMA_MODELS_DIR:-}" ] && export OLLAMA_MODELS="$OLLAMA_MODELS_DIR"+export OLLAMA_HOST="$OLLAMA_HOST_ADDR"+export CUDA_VISIBLE_DEVICES="$OLLAMA_GPU"++create_model() {+ if "$OLLAMA_BIN" list 2>/dev/null | awk '{print $1}' | grep -qx "${OLLAMA_MODEL}\(:latest\)\?"; then+ echo "模型 ${OLLAMA_MODEL} 已存在,跳过 create"+ return+ fi+ if [ ! -f "$OLLAMA_MODELFILE" ]; then+ echo "错误: 模型 ${OLLAMA_MODEL} 不存在,且找不到 Modelfile: $OLLAMA_MODELFILE" >&2+ echo " export OLLAMA_MODELFILE=/path/to/Modelfile 后重试" >&2+ exit 1+ fi+ echo "创建模型 ${OLLAMA_MODEL} <- ${OLLAMA_MODELFILE}"+ "$OLLAMA_BIN" create "$OLLAMA_MODEL" -f "$OLLAMA_MODELFILE"+}++if [ "${1:-}" = "--create-only" ]; then+ create_model+ exit 0+fi++echo "启动 ollama serve: GPU=$OLLAMA_GPU http://${OLLAMA_HOST_ADDR}"+"$OLLAMA_BIN" serve &+SERVE_PID=$!+trap 'kill "$SERVE_PID" 2>/dev/null || true' EXIT++for _ in $(seq 1 30); do+ curl -sf "http://${OLLAMA_HOST_ADDR}/api/tags" >/dev/null 2>&1 && break+ sleep 1+done++create_model+echo "就绪。模型列表: curl -s http://${OLLAMA_HOST_ADDR}/api/tags"+wait "$SERVE_PID"diff --git a/sdk/tests/test_adaptive_resample.py b/sdk/tests/test_adaptive_resample.pynew file mode 100644index 0000000..43709fe--- /dev/null+++ b/sdk/tests/test_adaptive_resample.py@@ -0,0 +1,316 @@+from __future__ import annotations++import sys+from pathlib import Path++from PIL import Image++sys.path.insert(0, str(Path(__file__).resolve().parents[1]))++from minicpmvocr.pipeline._tts import ( # noqa: E402+ _best_scored,+ _execute_block_adaptive,+ _round_seed,+)++ELEM_CFG = {+ "prompt": "p",+ "max_new_tokens": 64,+ "slice_nums": 1,+ "resize_min_side": 100,+ "output_format": "md",+}+++def _img():+ return Image.new("RGB", (120, 120), "white")+++class FakeEngine:+++ def __init__(self, greedy_text="G"):+ self.greedy_text = greedy_text+ self.calls = []++ def recognize(self, image, prompt=None, max_new_tokens=None, slice_nums=None,+ n=None, decode_overrides=None):+ if n is None:+ self.calls.append({"kind": "greedy", "seed": None})+ return {"text": self.greedy_text, "output_token_count": 1}+ seed = (decode_overrides or {}).get("seed")+ self.calls.append({+ "kind": "sample",+ "seed": seed,+ "n": n,+ "temperature": (decode_overrides or {}).get("temperature"),+ })++ return {"texts": ["S%s_%d" % (seed, i) for i in range(n)],+ "output_token_count": n}+++class FakeRM:+++ def __init__(self, table=None, default=0.1, verdict="scored"):+ self.table = table or {}+ self.default = default+ self.verdict = verdict+ self.calls = []++ def score_best(self, image, candidates, label, case_id="", force=False):+ self.calls.append({"case_id": case_id, "candidates": list(candidates),+ "force": force})+ scores = [self.table.get(c, self.default) for c in candidates]+ verdicts = [self.verdict] * len(candidates)+ best = max(range(len(scores)), key=lambda i: scores[i])+ return {"best_index": best, "best_text": candidates[best],+ "scores": scores, "verdicts": verdicts,+ "wait_sec": 0.0, "call_sec": 0.01,+ "stage_sec": {}, "batch_size": 1, "batch_items": 1}+++def _rounds(n_rounds=8):++ temps = [0.3, 0.5, 0.7, 1.0, 1.2, 1.35, 1.5]+ table = [{"greedy": True}]+ for t in temps[: n_rounds - 1]:+ table.append({"temperature": t, "top_k": 0, "top_p": 1.0, "min_p": 0.0,+ "n": 8, "scale": 1.0})+ return table+++def _run(*, engine, rm, n_max, tau, case_id="img::b0", rounds=None, seed_base=7):+ cfg = {+ "adaptive": {+ "enabled": True,+ "tau": tau,+ "n_max": n_max,+ "rounds": rounds if rounds is not None else _rounds(8),+ "seed_base": seed_base,+ }+ }+ crop = _img()+ try:+ return _execute_block_adaptive(+ engine=engine, rm_client=rm, tts_cfg=cfg,+ crop_image=crop, base_image=crop, rm_image=crop,+ elem_cfg=ELEM_CFG, label="text", case_id=case_id, infer_t0=0.0,+ )+ finally:+ crop.close()+++def test_prefix_property_seeds_and_texts():++ long_engine = FakeEngine()+ _run(engine=long_engine, rm=FakeRM(default=0.1), n_max=8, tau=0.98)++ for k in range(2, 9):+ short_engine = FakeEngine()+ _run(engine=short_engine, rm=FakeRM(default=0.1), n_max=k, tau=0.98)+ assert short_engine.calls == long_engine.calls[: len(short_engine.calls)], (+ "n_max=%d 的前 %d 次引擎调用与 n_max=8 不一致 ⇒ 轮次参数偷看了 n_max,"+ "前缀性质失效" % (k, len(short_engine.calls)))+++def test_prefix_property_independent_of_tau():++ e_hi = FakeEngine()+ _run(engine=e_hi, rm=FakeRM(default=0.1), n_max=8, tau=0.98)+ e_lo = FakeEngine()+ _run(engine=e_lo, rm=FakeRM(default=0.1), n_max=8, tau=0.50)++ assert e_hi.calls == e_lo.calls, "采样序列随 tau 改变 ⇒ 阈值扫描不可离线复算"+++def test_round_seed_is_deterministic_and_round_dependent():+ a1 = _round_seed("img::b0", 1, 7)+ a1_again = _round_seed("img::b0", 1, 7)+ a2 = _round_seed("img::b0", 2, 7)+ b1 = _round_seed("img::b1", 1, 7)+ assert a1 == a1_again, "同 (block, round) 两次派生不一致 ⇒ 不可复现"+ assert a1 != a2, "同块不同轮 seed 相同 ⇒ 各轮会采出一样的东西"+ assert a1 != b1, "不同块同轮 seed 相同 ⇒ 块间采样不独立"+ assert 0 <= a1 <= 0x7FFF_FFFF+++def test_stops_at_first_round_passing_tau():+ engine = FakeEngine()++ seed2 = _round_seed("img::b0", 2, 7)+ rm = FakeRM(table={"S%s_3" % seed2: 0.99}, default=0.1)+ text, _tokens, _sec, info = _run(engine=engine, rm=rm, n_max=8, tau=0.98)+ assert info["stop_reason"] == "passed"+ assert info["rounds_used"] == 2, "过阈了却没停在第 2 轮"+ assert info["exhausted"] is False+ assert text == "S%s_3" % seed2+ assert info["best_score"] == 0.99+++def test_greedy_alone_can_pass_and_skip_all_sampling():+ engine = FakeEngine(greedy_text="G")+ rm = FakeRM(table={"G": 0.995}, default=0.1)+ _text, _t, _s, info = _run(engine=engine, rm=rm, n_max=8, tau=0.98)+ assert info["rounds_used"] == 1+ assert info["stop_reason"] == "passed"++ assert all(c["kind"] == "greedy" for c in engine.calls), "过阈后仍继续采样"+++def test_exhausted_marks_and_takes_max():+ engine = FakeEngine()+ seed5 = _round_seed("img::b0", 5, 7)+ best_text = "S%s_2" % seed5+ rm = FakeRM(table={best_text: 0.77}, default=0.1)+ text, _t, _s, info = _run(engine=engine, rm=rm, n_max=8, tau=0.98)+ assert info["stop_reason"] == "exhausted"+ assert info["exhausted"] is True, "跑满未过阈却没打标记 ⇒ 上偏分数会混进直通率"+ assert info["rounds_used"] == 8+ assert text == best_text and info["best_score"] == 0.77+++class ConstEngine(FakeEngine):+++ def recognize(self, image, prompt=None, max_new_tokens=None, slice_nums=None,+ n=None, decode_overrides=None):+ if n is None:+ self.calls.append({"kind": "greedy", "seed": None})+ return {"text": "SAME", "output_token_count": 1}+ self.calls.append({"kind": "sample",+ "seed": (decode_overrides or {}).get("seed"), "n": n})+ return {"texts": ["SAME"] * n, "output_token_count": n}+++def test_cross_round_dedup_collapses_repeats():+ engine = ConstEngine()+ rm = FakeRM(default=0.1)+ _text, _t, _s, info = _run(engine=engine, rm=rm, n_max=8, tau=0.98)+ assert info["n_candidates"] == 1, "八轮全同,去重后该只剩 1 个候选"++ assert len(rm.calls) == 1, "跨轮去重没生效:重复文本被反复送去打分"+ assert info["rm_calls"] == 1+ assert sum(r["new_n"] for r in info["round_log"][1:]) == 0+ assert info["raw_candidate_count"] == 1 + 7 * 8, "raw 计数该记全部原始候选"+++def test_n1_equals_scenario_one():+ engine = FakeEngine(greedy_text="G")+ rm = FakeRM(table={"G": 0.42}, default=0.1)+ text, _t, _s, info = _run(engine=engine, rm=rm, n_max=1, tau=0.98)+ assert text == "G"+ assert info["n_candidates"] == 1+ assert info["scores"] == [0.42], "n=1 时该拿到贪心那一块的分数"+ assert info["rounds_used"] == 1++ assert rm.calls and rm.calls[0]["force"] is True, (+ "单候选没强制打分 ⇒ 场景① 拿不到分数,直通率无从算起")+ assert all(c["kind"] == "greedy" for c in engine.calls)+++def test_verdict_filter_excludes_unscored():++ score_by_text = {"a": 0.0, "b": -1.0}+ verdict_by_text = {"a": "precheck_reject", "b": "forward_oom"}+ best, score = _best_scored(["a", "b"], score_by_text, verdict_by_text)+ assert best is None and score is None, "未 scored 的候选被选中了"+++ score_by_text = {"a": 0.0, "b": 0.3}+ verdict_by_text = {"a": "precheck_reject", "b": "scored"}+ best, _ = _best_scored(["a", "b"], score_by_text, verdict_by_text)+ assert best == "b"+++ best, _ = _best_scored(["a", "b"], {"a": 0.2, "b": 0.9}, {})+ assert best == "b"+++def test_all_candidates_unscored_falls_back_to_greedy():+ engine = FakeEngine(greedy_text="G")+ rm = FakeRM(default=0.0, verdict="precheck_reject")+ text, _t, _s, info = _run(engine=engine, rm=rm, n_max=3, tau=0.98)+ assert text == "G", "全部打分失败时该退回贪心(与服务端降级同规则)"+ assert info["best_index"] == 0+ assert info["stop_reason"] == "no_scored"+++class SizeRecordingEngine(FakeEngine):+ def __init__(self, greedy_text="G"):+ super().__init__(greedy_text)+ self.sizes = []++ def recognize(self, image, prompt=None, max_new_tokens=None, slice_nums=None,+ n=None, decode_overrides=None):+ self.sizes.append(image.size)+ return super().recognize(image, prompt, max_new_tokens, slice_nums,+ n, decode_overrides)+++def test_scale_1_0_never_resizes():++ engine = SizeRecordingEngine()+ _run(engine=engine, rm=FakeRM(default=0.1), n_max=4, tau=0.98)+ assert set(engine.sizes) == {(120, 120)}, (+ "scale 全 1.0 却改了图的尺寸 ⇒ 与基线不再同条件")+++def test_scale_actually_upscales_the_ocr_input():++ rounds = [+ {"greedy": True},+ {"temperature": 0.5, "top_k": 0, "top_p": 1.0, "min_p": 0.0,+ "n": 2, "scale": 1.5},+ ]+ engine = SizeRecordingEngine()+ _run(engine=engine, rm=FakeRM(default=0.1), n_max=2, tau=0.98, rounds=rounds)+ assert engine.sizes[0] == (120, 120), "贪心轮不该被缩放"+ assert engine.sizes[1] == (180, 180), (+ "scale=1.5 没有真的放大 OCR 输入(实得 %r)" % (engine.sizes[1],))+++def test_rm_input_stays_anchored_while_ocr_scales():++ rounds = [+ {"greedy": True},+ {"temperature": 0.5, "top_k": 0, "top_p": 1.0, "min_p": 0.0,+ "n": 2, "scale": 2.0},+ ]+ engine = SizeRecordingEngine()+ rm = FakeRM(default=0.1)+ rm_seen = []+ orig = rm.score_best++ def spy(image, candidates, label, case_id="", force=False):+ rm_seen.append(image.size)+ return orig(image, candidates, label, case_id=case_id, force=force)++ rm.score_best = spy+ _run(engine=engine, rm=rm, n_max=2, tau=0.98, rounds=rounds)+ assert engine.sizes[1] == (240, 240), "OCR 侧没放大,这条测试就没意义了"+ assert set(rm_seen) == {(120, 120)}, (+ "RM 的输入图跟着 OCR 一起放大了 ⇒ 分数上升分不清是文本变好还是尺子变了")+++def _main():+ tests = [(k, v) for k, v in sorted(globals().items())+ if k.startswith("test_") and callable(v)]+ failed = 0+ for name, fn in tests:+ try:+ fn()+ print(" PASS %s" % name)+ except AssertionError as err:+ failed += 1+ print(" FAIL %s\n %s" % (name, err))+ except Exception as err: # noqa: BLE001+ failed += 1+ print(" ERROR %s\n %s: %s" % (name, type(err).__name__, err))+ print("\n%d/%d passed" % (len(tests) - failed, len(tests)))+ return 1 if failed else 0+++if __name__ == "__main__":+ raise SystemExit(_main())diff --git a/sdk/tests/test_block_prefilled.py b/sdk/tests/test_block_prefilled.pynew file mode 100644index 0000000..aee5aa1--- /dev/null+++ b/sdk/tests/test_block_prefilled.py@@ -0,0 +1,279 @@+from __future__ import annotations++import sys+from pathlib import Path++from PIL import Image++sys.path.insert(0, str(Path(__file__).resolve().parents[1]))++from minicpmvocr.config import _validate_adaptive # noqa: E402+from minicpmvocr.pipeline._tts import ( # noqa: E402+ _execute_block_adaptive,+ _round_seed,+)++ELEM_CFG = {+ "prompt": "p",+ "max_new_tokens": 64,+ "slice_nums": 1,+ "resize_min_side": 100,+ "output_format": "md",+}++PRIOR_TEXT = "PRIOR_GREEDY_TEXT"+PRIOR_SCORE = 0.4218375+++def _img():+ return Image.new("RGB", (120, 120), "white")+++class FakeEngine:+++ def __init__(self, greedy_text="G"):+ self.greedy_text = greedy_text+ self.calls = []++ def recognize(self, image, prompt=None, max_new_tokens=None, slice_nums=None,+ n=None, decode_overrides=None):+ if n is None:+ self.calls.append({"kind": "greedy", "seed": None})+ return {"text": self.greedy_text, "output_token_count": 1}+ seed = (decode_overrides or {}).get("seed")+ self.calls.append({"kind": "sample", "seed": seed, "n": n})+ return {"texts": ["S%s_%d" % (seed, i) for i in range(n)],+ "output_token_count": n}+++class FakeRM:+++ def __init__(self, table=None, default=0.1, verdict="scored"):+ self.table = table or {}+ self.default = default+ self.verdict = verdict+ self.calls = []++ def score_best(self, image, candidates, label, case_id="", force=False):+ self.calls.append({"case_id": case_id, "candidates": list(candidates),+ "force": force})+ scores = [self.table.get(c, self.default) for c in candidates]+ verdicts = [self.verdict] * len(candidates)+ best = max(range(len(scores)), key=lambda i: scores[i])+ return {"best_index": best, "best_text": candidates[best],+ "scores": scores, "verdicts": verdicts,+ "wait_sec": 0.0, "call_sec": 0.01,+ "stage_sec": {}, "batch_size": 1, "batch_items": 1}+++def _rounds(n_rounds=5, prefilled=True):++ temps = [0.3, 0.5, 0.7, 1.0]+ first = {"greedy": True}+ if prefilled:+ first["prefilled"] = True+ table = [first]+ for t in temps[: n_rounds - 1]:+ table.append({"temperature": t, "top_k": 0, "top_p": 1.0, "min_p": 0.0,+ "n": 8, "scale": 1.0})+ return table+++def _prior(text=PRIOR_TEXT, score=PRIOR_SCORE, verdict="scored"):+ return {"text": text, "score": score, "verdict": verdict}+++def _run(*, engine, rm, n_max=5, tau=0.98, case_id="img::b7",+ rounds=None, seed_base=7, prior=_prior()):+ cfg = {+ "adaptive": {+ "enabled": True,+ "tau": tau,+ "n_max": n_max,+ "rounds": rounds if rounds is not None else _rounds(5),+ "seed_base": seed_base,+ }+ }+ crop = _img()+ try:+ return _execute_block_adaptive(+ engine=engine, rm_client=rm, tts_cfg=cfg,+ crop_image=crop, base_image=crop, rm_image=crop,+ elem_cfg=ELEM_CFG, label="text", case_id=case_id, infer_t0=0.0,+ prior_candidate=prior,+ )+ finally:+ crop.close()+++def test_prefilled_round_never_calls_the_engine():+ engine = FakeEngine()+ _run(engine=engine, rm=FakeRM(default=0.1), n_max=5, tau=0.98)+ assert all(c["kind"] == "sample" for c in engine.calls), (+ "prefilled 轮仍然调了 engine.recognize ⇒ 白跑一次 OCR,"+ "本模式的全部时间收益归零")+ assert len(engine.calls) == 4, (+ "n_max=5 且第 1 轮注入 ⇒ 该只剩 4 个采样轮,实得 %d" % len(engine.calls))+++def test_greedy_sec_is_exactly_zero():++ _t, _tok, _sec, info = _run(engine=FakeEngine(), rm=FakeRM(default=0.1))+ assert info["greedy_sec"] == 0.0, (+ "prefilled 轮的 greedy_sec 不是 0(实得 %r)" % (info["greedy_sec"],))+ assert info["round_log"][0]["sample_sec"] == 0.0+++def test_prior_candidate_enters_the_pool_bitwise():+ _t, _tok, _sec, info = _run(engine=FakeEngine(), rm=FakeRM(default=0.1))+ assert info["candidates"][0] == PRIOR_TEXT, "先验文本不是候选池的第一个"+ assert info["scores"][0] == PRIOR_SCORE, (+ "注入分与页级那次不逐位相等(实得 %r)⇒ 两边分数不再可比" % (info["scores"][0],))+ assert info["verdicts"][0] == "scored"+ assert info["round_log"][0]["raw_n"] == 1+ assert info["round_log"][0]["new_n"] == 1+ assert info["round_log"][0]["prefilled"] is True+ assert info["prior_injected"] is True, (+ "没有 prior_injected 标记 ⇒ 下游分不出这块的分是注入的还是本次打的")+++def test_no_degradation_is_structural():++ text, _tok, _sec, info = _run(engine=FakeEngine(), rm=FakeRM(default=0.01))+ assert info["stop_reason"] == "exhausted"+ assert text == PRIOR_TEXT, "采样候选更差却没退回先验候选 ⇒ 块级重采会劣化页面"+ assert info["best_score"] == PRIOR_SCORE+ assert info["best_score"] >= PRIOR_SCORE+++def test_prefilled_round_never_calls_rm():++ engine = FakeEngine()+ rm = FakeRM(default=0.1)+ _t, _tok, _sec, info = _run(engine=engine, rm=rm, n_max=5, tau=0.98)+ assert info["round_log"][0]["rm_calls"] == 0, "prefilled 轮记了 RM 调用"+ assert info["round_log"][0]["rm_sec"] == 0.0+ assert all(PRIOR_TEXT not in c["candidates"] for c in rm.calls), (+ "先验文本被送去重打分 ⇒ 并发下会拿到与页级略不同的分数")+ assert info["rm_calls"] == 4, "4 个采样轮该各打一次分,实得 %d" % info["rm_calls"]+++def test_rm_used_stays_false_when_only_prior_scored():++ _t, _tok, _sec, info = _run(engine=FakeEngine(), rm=FakeRM(default=0.1),+ prior=_prior(score=0.995))+ assert info["rm_used"] is False, "没调过 RM 却把 rm_used 置真了"+ assert info["best_score"] == 0.995+ assert info["prior_injected"] is True+++def test_prior_above_tau_stops_at_round_one():+ engine = FakeEngine()+ rm = FakeRM(default=0.1)+ text, _tok, _sec, info = _run(engine=engine, rm=rm, prior=_prior(score=0.99))+ assert info["rounds_used"] == 1, "先验分已过阈却仍继续采样"+ assert info["stop_reason"] == "passed"+ assert info["exhausted"] is False+ assert text == PRIOR_TEXT+ assert engine.calls == [], "过阈了还调引擎 ⇒ 低分块才重采这条约束破了"+ assert rm.calls == [], "过阈了还调 RM"+++def _expect_value_error(fn, what):+ try:+ fn()+ except ValueError:+ return+ raise AssertionError(what)+++def test_missing_prior_raises():+ for bad in (None, {}, {"score": 0.5}, {"text": "", "score": 0.5}):+ _expect_value_error(+ lambda bad=bad: _run(engine=FakeEngine(), rm=FakeRM(), prior=bad),+ "prior_candidate=%r 没报错 ⇒ 第 1 轮静默空转,"+ "产物与'采样没采到东西'同形" % (bad,))+++def test_missing_prior_score_raises():+ _expect_value_error(+ lambda: _run(engine=FakeEngine(), rm=FakeRM(),+ prior={"text": PRIOR_TEXT, "score": None}),+ "先验候选没给分却放行 ⇒ '返回分 ≥ 先验分'无从比较")+++def test_prior_is_ignored_when_round_table_has_no_prefilled():++ engine = FakeEngine(greedy_text="G")+ rm = FakeRM(table={"G": 0.5}, default=0.1)+ text, _tok, _sec, info = _run(engine=engine, rm=rm, n_max=1,+ rounds=_rounds(5, prefilled=False), prior=None)+ assert text == "G"+ assert info["scores"] == [0.5]+ assert "prior_injected" not in info, "页级产物里多出了块级专有字段"+ assert "prefilled" not in info["round_log"][0]+ assert engine.calls[0]["kind"] == "greedy"+++def test_seed_derivation_matches_the_page_level_run():++ block = FakeEngine()+ _run(engine=block, rm=FakeRM(default=0.01), n_max=5, case_id="img::b7")++ page = FakeEngine()+ _run(engine=page, rm=FakeRM(default=0.01), n_max=5, case_id="img::b7",+ rounds=_rounds(5, prefilled=False), prior=None)++ page_sample_seeds = [c["seed"] for c in page.calls if c["kind"] == "sample"]+ block_sample_seeds = [c["seed"] for c in block.calls if c["kind"] == "sample"]+ assert block_sample_seeds == page_sample_seeds, (+ "注入改变了采样轮的 seed ⇒ 块级候选集与页级不同源")+ assert block_sample_seeds[0] == _round_seed("img::b7", 2, 7)+++def _cfg(rounds):+ return {"tts": {"adaptive": {"enabled": True, "tau": 0.98,+ "n_max": len(rounds), "rounds": rounds}}}+++def test_config_accepts_prefilled_on_round_one():+ _validate_adaptive(_cfg(_rounds(5)))+++def test_config_rejects_prefilled_after_round_one():+ rounds = _rounds(5)+ rounds[2]["prefilled"] = True+ _expect_value_error(+ lambda: _validate_adaptive(_cfg(rounds)),+ "prefilled 出现在第 3 轮却放行 ⇒ 该轮净增 0 个候选、白跑一轮")+++def test_config_still_requires_greedy_on_round_one():++ _expect_value_error(+ lambda: _validate_adaptive(_cfg([{"prefilled": True}] + _rounds(3)[1:])),+ "第 1 轮只写 prefilled 不写 greedy 却放行")+++def _main():+ tests = [(k, v) for k, v in sorted(globals().items())+ if k.startswith("test_") and callable(v)]+ failed = 0+ for name, fn in tests:+ try:+ fn()+ print(" PASS %s" % name)+ except AssertionError as err:+ failed += 1+ print(" FAIL %s\n %s" % (name, err))+ except Exception as err: # noqa: BLE001+ failed += 1+ print(" ERROR %s\n %s: %s" % (name, type(err).__name__, err))+ print("\n%d/%d passed" % (len(tests) - failed, len(tests)))+ return 1 if failed else 0+++if __name__ == "__main__":+ raise SystemExit(_main())diff --git a/sdk/tests/test_cli_overrides.py b/sdk/tests/test_cli_overrides.pynew file mode 100644index 0000000..b796057--- /dev/null+++ b/sdk/tests/test_cli_overrides.py@@ -0,0 +1,67 @@+import pytest++from minicpmvocr.cli import _build_engine_overrides, _build_parser, parse_override_value+++ "raw,expected",+ [++ ("off", "off"),+ ("on", "on"),+ ("yes", "yes"),+ ("no", "no"),+ ("Off", "Off"),++ ("true", True),+ ("false", False),+ ("True", True),+ ("FALSE", False),++ ("001", "001"),+ ("0755", "0755"),++ ("2026-10-18", "2026-10-18"),++ ("v1.6", "v1.6"),+ ("minicpm-ocr-1.0", "minicpm-ocr-1.0"),++ ("42", 42),+ ("-7", -7),+ ("3.5", 3.5),+ ("null", None),+ ("0x1f", 31),+ ],+)+def test_override_scalar_typing(raw, expected):+ assert parse_override_value(raw) == expected+ assert type(parse_override_value(raw)) is type(expected)+++def test_structured_overrides_still_parse():++ assert parse_override_value("[http://a:1,http://b:2]") == ["http://a:1", "http://b:2"]+ assert parse_override_value("{image: 4}") == {"image": 4}+++def test_importing_the_cli_does_not_change_global_yaml():++ import yaml++ import minicpmvocr.cli # noqa: F401++ assert yaml.safe_load("interp: 2")["interp"] == 2+ assert yaml.safe_load("flag: off")["flag"] is False+ assert yaml.safe_load("d: 2026-10-18")["d"].year == 2026+ assert yaml.safe_load("n: 001")["n"] == 1+++def test_run_tag_off_is_a_string_end_to_end():++ args = _build_parser().parse_args(+ ["run", "--config", "x.yaml", "--set", "run.run_tag=off",+ "--set", "layout.use_seal_recognition=true"]+ )+ overrides = _build_engine_overrides(args)+ assert overrides["run"]["run_tag"] == "off"+ assert overrides["layout"]["use_seal_recognition"] is Truediff --git a/sdk/tests/test_crop_priority.py b/sdk/tests/test_crop_priority.pynew file mode 100644index 0000000..8701c07--- /dev/null+++ b/sdk/tests/test_crop_priority.py@@ -0,0 +1,156 @@+import threading+from copy import deepcopy++import numpy as np+from PIL import Image++from minicpmvocr import pipeline, prompts+from minicpmvocr.pipeline import overlapped+from minicpmvocr.pipeline._blocks import _block_priority+from minicpmvocr.config import DEFAULT_CONFIG+from minicpmvocr.prompts import DEFAULT_PROMPT_MAP+++LABELS = ["doc_title", "text", "table", "header"]+++def _block(label, width=10, height=10):+ return {"label": label, "crop_width": width, "crop_height": height}+++def test_label_with_larger_token_cap_goes_first():+ table = _block_priority(DEFAULT_PROMPT_MAP, _block("table"))+ text = _block_priority(DEFAULT_PROMPT_MAP, _block("text"))+ title = _block_priority(DEFAULT_PROMPT_MAP, _block("doc_title"))+ assert table < text < title+++def test_bigger_crop_wins_within_one_label():+ big = _block_priority(DEFAULT_PROMPT_MAP, _block("text", 200, 100))+ small = _block_priority(DEFAULT_PROMPT_MAP, _block("text", 50, 50))+ assert big < small+++def test_label_cap_outranks_crop_area():++ tiny_table = _block_priority(DEFAULT_PROMPT_MAP, _block("table", 5, 5))+ huge_title = _block_priority(DEFAULT_PROMPT_MAP, _block("doc_title", 3000, 3000))+ assert tiny_table < huge_title+++def test_unknown_label_falls_back_to_the_default_cap():++ unknown = _block_priority(DEFAULT_PROMPT_MAP, _block("no_such_label"))+ default_cap = DEFAULT_PROMPT_MAP["default"]["max_new_tokens"]+ assert unknown[0] == -default_cap+++class _MultiLabelDetector:+++ name = "fake"++ def __init__(self, config):+ self.config = config+ self.device = "cpu"+ self.model_load_sec = 0.0++ def start(self):+ pass++ def stop(self):+ pass++ def model_ref(self):+ return "fake"++ def detect(self, images):+ return [[{"index": i, "label": lab, "class_id": i, "score": 0.9,+ "bbox": [0.0, 0.0, 10.0, 10.0], "polygon": None}+ for i, lab in enumerate(LABELS)]]++ def crop(self, image, detections):+ return [{"label": lab, "score": 0.9, "order": i,+ "bbox": [0, 0, 10, 10],+ "image": np.full((10, 10, 3), 200, dtype=np.uint8),+ "polygon": None}+ for i, lab in enumerate(LABELS)]+++class _OrderRecordingEngine:+++ name = "fake"++ def __init__(self):+ self.lock = threading.Lock()+ self.caps = []++ def start(self):+ pass++ def stop(self):+ pass++ def recognize(self, image, prompt, max_new_tokens, slice_nums=None):+ with self.lock:+ self.caps.append(max_new_tokens)+ return {"text": "x", "output_token_count": 1}+++def test_dispatch_order_is_longest_first(tmp_path, monkeypatch):++ src = tmp_path / "src"+ src.mkdir(parents=True, exist_ok=True)+ for i in range(3):+ Image.fromarray(np.full((40, 60, 3), 200, dtype=np.uint8)).save(src / f"p{i}.png")++ engine = _OrderRecordingEngine()+ monkeypatch.setattr(overlapped, "create_layout_detector", lambda c: _MultiLabelDetector(c))+ monkeypatch.setattr(overlapped, "create_backend", lambda c: engine)++ run_dir = tmp_path / "run"+ cfg = deepcopy(DEFAULT_CONFIG)+ cfg["run"].update({"run_tag": "t", "run_root": str(tmp_path), "mode": "full"})+ cfg["input"].update({"image_dir": str(src)})+ cfg["layout"].update({"provider": "fake", "device": "cpu"})++ cfg["pipeline"].update({"max_workers": 1, "layout_workers": 1, "overlap_layout": True})+ cfg["logging"]["progress_log_every"] = 1000+ cfg["_meta"] = {+ "run_dir": str(run_dir),+ "runtime_intermediate_dir": str(run_dir / "runtime" / "intermediate"),+ }+ summary = pipeline.pipelined_run(cfg)++ assert summary["counts"] == {+ "planned": 3,+ "ok": 3,+ "failed": 0,+ "blocks": len(LABELS) * 3,+ "vlm_blocks": len(LABELS) * 3,+ "failed_blocks": 0,+ "pages_with_failed_blocks": 0,+ }++ assert len(engine.caps) == len(LABELS) * 3+ caps = [DEFAULT_PROMPT_MAP["element_prompts"][lab]["max_new_tokens"] for lab in LABELS]+++ first = engine.caps[: len(LABELS)]+ assert first == sorted(caps, reverse=True)+++def test_skipped_labels_sort_to_the_back():++ prompt_map = prompts.load_prompt_map(+ {+ "prompt": {"prompt_map": "", "override_mode": "legacy"},+ "layout": dict(DEFAULT_CONFIG["layout"], use_chart_recognition=False),+ }+ )+ text = _block_priority(prompt_map, _block("text"))+ for label in ("image", "chart", "header_image", "footer_image"):+ skipped = _block_priority(prompt_map, _block(label))+ assert skipped[0] == 0, label+ assert text < skipped, labeldiff --git a/sdk/tests/test_crosspage_tables.py b/sdk/tests/test_crosspage_tables.pynew file mode 100644index 0000000..0b0f130--- /dev/null+++ b/sdk/tests/test_crosspage_tables.py@@ -0,0 +1,343 @@+"Tests for cross-page table merging ported from PaddleOCR-VL's merge_table.py."++import pytest++from minicpmvocr.postprocess.crosspage import (+ apply_cross_page_merge,+ assemble_document_markdown,+ calculate_table_total_columns,+ can_merge_tables,+ detect_table_headers,+ full_to_half,+ merge_cross_page_tables,+ perform_table_merge,+)++pytest.importorskip("bs4", reason="cross-page merge needs beautifulsoup4")++from bs4 import BeautifulSoup # noqa: E402+++def _table(rows, header=("Name", "Qty")):++ head = "<tr>" + "".join(f"<td>{c}</td>" for c in header) + "</tr>"+ body = "".join("<tr>" + "".join(f"<td>{c}</td>" for c in r) + "</tr>" for r in rows)+ return f"<table>{head}{body}</table>"+++def _block(label, content="", bbox=(0, 0, 100, 50)):+ return {"label": label, "content": content, "bbox": list(bbox)}+++def _table_block(rows, bbox=(0, 0, 100, 50), header=("Name", "Qty")):+ return _block("table", _table(rows, header), bbox)+++def _rows_of(html):+ return BeautifulSoup(html, "html.parser").find_all("tr")+++def test_full_to_half_normalizes_fullwidth_ascii():+ assert full_to_half("(A1)") == "(A1)"+ assert full_to_half("表格") == "表格"+++def test_total_columns_accounts_for_rowspan():++ html = (+ "<table>"+ '<tr><td rowspan="2">A</td><td>B</td><td>C</td></tr>'+ "<tr><td>D</td><td>E</td></tr>"+ "</table>"+ )+ assert calculate_table_total_columns(BeautifulSoup(html, "html.parser")) == 3+++def test_total_columns_survives_junk_spans():++ html = '<table><tr><td colspan="abc">A</td><td colspan="99999">B</td></tr></table>'+ assert calculate_table_total_columns(BeautifulSoup(html, "html.parser")) == 2+++def test_detect_headers_counts_repeated_leading_rows():+ t1 = _table([["a", "1"]])+ t2 = _table([["b", "2"]])+ s1, s2 = BeautifulSoup(t1, "html.parser"), BeautifulSoup(t2, "html.parser")+ assert detect_table_headers(s1, s2) == 1+++def test_detect_headers_is_zero_when_they_differ():+ t1 = _table([["a", "1"]], header=("Name", "Qty"))+ t2 = _table([["b", "2"]], header=("Other", "Cols"))+ s1, s2 = BeautifulSoup(t1, "html.parser"), BeautifulSoup(t2, "html.parser")+ assert detect_table_headers(s1, s2) == 0+++def test_merges_a_plain_split_table():+ prev = [_table_block([["a", "1"], ["b", "2"]])]+ curr = [_table_block([["c", "3"]])]+ ok, prev_idx, curr_idx = can_merge_tables(prev, curr)+ assert ok and prev_idx == 0 and curr_idx == 0+++def test_width_mismatch_blocks_the_merge():++ prev = [_table_block([["a", "1"]], bbox=(0, 0, 100, 50))]+ curr = [_table_block([["c", "3"]], bbox=(0, 0, 60, 50))]+ assert can_merge_tables(prev, curr)[0] is False+++def test_text_after_the_first_table_blocks_the_merge():+ prev = [_table_block([["a", "1"]]), _block("text", "A closing paragraph.")]+ curr = [_table_block([["c", "3"]])]+ assert can_merge_tables(prev, curr)[0] is False+++def test_footer_after_the_first_table_is_allowed():+ prev = [_table_block([["a", "1"]]), _block("footer", "page 3")]+ curr = [_table_block([["c", "3"]])]+ assert can_merge_tables(prev, curr)[0] is True+++def test_text_before_the_second_table_blocks_the_merge():+ prev = [_table_block([["a", "1"]])]+ curr = [_block("text", "A new section begins."), _table_block([["c", "3"]])]+ assert can_merge_tables(prev, curr)[0] is False+++def test_continued_caption_before_the_second_table_is_allowed():++ prev = [_table_block([["a", "1"]])]+ curr = [_block("figure_title", "Table 1 (continued)"), _table_block([["c", "3"]])]+ assert can_merge_tables(prev, curr)[0] is True+++def test_chinese_continued_marker_is_allowed():+ prev = [_table_block([["a", "1"]])]+ curr = [_block("figure_title", "表 1(续)"), _table_block([["c", "3"]])]+ assert can_merge_tables(prev, curr)[0] is True+++def test_incompatible_shapes_block_the_merge():+ prev = [_block("table", "<table><tr><td>a</td></tr></table>")]+ curr = [+ _block(+ "table",+ "<table><tr><td>b</td><td>c</td><td>d</td></tr>"+ "<tr><td>e</td><td>f</td><td>g</td></tr></table>",+ )+ ]+ assert can_merge_tables(prev, curr)[0] is False+++def test_non_table_content_is_rejected():++ prev = [_block("table", "just some text")]+ curr = [_table_block([["c", "3"]])]+ assert can_merge_tables(prev, curr)[0] is False+++def test_merge_drops_the_repeated_header():+ merged = perform_table_merge(_table([["a", "1"]]), _table([["b", "2"]]))+ rows = _rows_of(merged)+ assert len(rows) == 3+ assert merged.count("Name") == 1+ assert "a" in merged and "b" in merged+++def test_merge_keeps_all_rows_when_there_is_no_repeated_header():+ t1 = _table([["a", "1"]], header=("Name", "Qty"))+ t2 = _table([["b", "2"]], header=("X", "Y"))+ rows = _rows_of(perform_table_merge(t1, t2))+ assert len(rows) == 4+++def test_three_page_table_chains_into_one():++ pages = [+ [_table_block([["a", "1"]])],+ [_table_block([["b", "2"]])],+ [_table_block([["c", "3"]])],+ ]+ merged, count = merge_cross_page_tables(pages)+ assert count == 2+ rows = _rows_of(merged[0][0]["content"])+ assert len(rows) == 4+ for page in merged[1:]:+ assert page[0]["content"] == ""+ assert page[0]["merged_into_previous_page"] is True+++def test_merge_does_not_mutate_the_input():+ pages = [[_table_block([["a", "1"]])], [_table_block([["b", "2"]])]]+ before = pages[0][0]["content"]+ merge_cross_page_tables(pages)+ assert pages[0][0]["content"] == before+ assert "merged_into_previous_page" not in pages[1][0]+++def test_unrelated_pages_are_left_alone():+ pages = [[_block("text", "hello")], [_block("text", "world")]]+ merged, count = merge_cross_page_tables(pages)+ assert count == 0+ assert merged == pages+++def _write_run(tmp_path, pages):++ import json++ results = tmp_path / "results_json"+ results.mkdir(parents=True)+ for i, (source, page_index, blocks) in enumerate(pages):+ image_id = f"p{i:03d}"+ (results / f"{image_id}.json").write_text(+ json.dumps(+ {+ "image_id": image_id,+ "source": {"path": source, "page_index": page_index},+ "crop_blocks": blocks,+ "markdown": "\n\n".join(b["content"] for b in blocks if b["content"]),+ },+ ensure_ascii=False,+ ),+ encoding="utf-8",+ )+ return tmp_path+++def test_document_assembly_merges_only_when_asked(tmp_path):+ from minicpmvocr.prompts import DEFAULT_PROMPT_MAP++ run = _write_run(+ tmp_path,+ [+ ("/doc.pdf", 0, [_table_block([["a", "1"]])]),+ ("/doc.pdf", 1, [_table_block([["b", "2"]])]),+ ],+ )+ plain, pages, merges = assemble_document_markdown(+ run, DEFAULT_PROMPT_MAP, merge_tables=False, delimiter="\n---\n"+ )+ assert pages == 2 and merges == 0+ assert plain.count("<table") == 2++ merged, pages, merges = assemble_document_markdown(+ run, DEFAULT_PROMPT_MAP, merge_tables=True, delimiter="\n---\n"+ )+ assert pages == 2 and merges == 1+ assert merged.count("<table") == 1+ assert merged.count("Name") == 1+++def test_document_assembly_never_merges_across_two_sources(tmp_path):++ from minicpmvocr.prompts import DEFAULT_PROMPT_MAP++ run = _write_run(+ tmp_path,+ [+ ("/a.pdf", 0, [_table_block([["a", "1"]])]),+ ("/b.pdf", 0, [_table_block([["b", "2"]])]),+ ],+ )+ _, _, merges = assemble_document_markdown(+ run, DEFAULT_PROMPT_MAP, merge_tables=True, delimiter="\n---\n"+ )+ assert merges == 0+++def test_standalone_images_count_as_one_document(tmp_path):++ from minicpmvocr.prompts import DEFAULT_PROMPT_MAP++ run = _write_run(+ tmp_path,+ [+ ("/scan/page_001.png", None, [_table_block([["a", "1"]])]),+ ("/scan/page_002.png", None, [_table_block([["b", "2"]])]),+ ],+ )+ merged, pages, merges = assemble_document_markdown(+ run, DEFAULT_PROMPT_MAP, merge_tables=True, delimiter="\n---\n"+ )+ assert pages == 2 and merges == 1+ assert merged.count("<table") == 1+++def test_document_assembly_orders_by_page_index_not_filename(tmp_path):++ from minicpmvocr.prompts import DEFAULT_PROMPT_MAP++ import json++ results = tmp_path / "results_json"+ results.mkdir(parents=True)+ for image_id, page_index, text in [("zzz", 0, "first"), ("aaa", 1, "second")]:+ (results / f"{image_id}.json").write_text(+ json.dumps(+ {+ "image_id": image_id,+ "source": {"path": "/doc.pdf", "page_index": page_index},+ "crop_blocks": [],+ "markdown": text,+ }+ ),+ encoding="utf-8",+ )+ out, _, _ = assemble_document_markdown(+ tmp_path, DEFAULT_PROMPT_MAP, merge_tables=False, delimiter="|"+ )+ assert out == "first|second"+++def _page(image_id, blocks, document="/doc.pdf", page_index=0):+ return {+ "image_id": image_id,+ "document": document,+ "page_index": page_index,+ "markdown": "\n\n".join(b["content"] for b in blocks if b["content"]),+ "blocks": blocks,+ }+++def test_change_set_labels_extended_and_absorbed():++ from minicpmvocr.prompts import DEFAULT_PROMPT_MAP++ pages = [+ _page("p1", [_table_block([["a", "1"]])], page_index=0),+ _page("p2", [_table_block([["b", "2"]])], page_index=1),+ ]+ changes = apply_cross_page_merge(pages, DEFAULT_PROMPT_MAP)+ assert set(changes) == {"p1", "p2"}+ assert changes["p1"]["extended"] is True and changes["p1"]["absorbed"] is False+ assert changes["p2"]["absorbed"] is True and changes["p2"]["extended"] is False+ assert changes["p1"]["markdown"].count("<tr") == 3+ assert changes["p2"]["markdown"].strip() == ""++ assert any(b.get("merged_into_previous_page") for b in changes["p2"]["blocks"])+++def test_change_set_is_empty_when_nothing_merges():++ from minicpmvocr.prompts import DEFAULT_PROMPT_MAP++ pages = [+ _page("p1", [_block("text", "hello")], page_index=0),+ _page("p2", [_block("text", "world")], page_index=1),+ ]+ assert apply_cross_page_merge(pages, DEFAULT_PROMPT_MAP) == {}+++def test_change_set_does_not_mutate_input_pages():+ from minicpmvocr.prompts import DEFAULT_PROMPT_MAP++ pages = [+ _page("p1", [_table_block([["a", "1"]])], page_index=0),+ _page("p2", [_table_block([["b", "2"]])], page_index=1),+ ]+ before = [p["markdown"] for p in pages]+ apply_cross_page_merge(pages, DEFAULT_PROMPT_MAP)+ assert [p["markdown"] for p in pages] == before+ assert "merged_into_previous_page" not in pages[1]["blocks"][0]diff --git a/sdk/tests/test_deployment_config.py b/sdk/tests/test_deployment_config.pynew file mode 100644index 0000000..1ee2447--- /dev/null+++ b/sdk/tests/test_deployment_config.py@@ -0,0 +1,153 @@+import importlib+import json+import os+from pathlib import Path+import subprocess+import sys++import pytest++SDK = Path(__file__).resolve().parents[1]+PROJECT = SDK.parent+++def deployment_env(tmp_path):+ prefixes = ("OCR_", "OCRWEB_", "VLLM_", "OBS_", "RM_", "SDK_")+ env = {key: value for key, value in os.environ.items() if not key.startswith(prefixes)}+ for key in ("BASE_IMAGE", "SERVER_IMAGE", "CLIENT_IMAGE", "SCORE_IMAGE", "IMAGES", "EVAL_REPO"):+ env.pop(key, None)+ env["OCRWEB_DATA_DIR"] = str(tmp_path / "data")+ return env+++def test_demo_defaults_follow_checkout(deployment_env, tmp_path):+ result = subprocess.run(+ ["bash", "-c", 'source "$1" webdemo; printf "%s\\n" "$OCRWEB_PYTHON" "$OCR_MODEL_PATH" "$OCR_PAGE_REGISTRY"',+ "test", str(SDK / "scripts/demo_env.sh")],+ cwd=tmp_path, env=deployment_env, capture_output=True, text=True, check=True,+ )+ assert result.stdout.splitlines() == [+ str(PROJECT / ".venv-sdk-gpu/bin/python"),+ str(PROJECT / "models/MiniCPM-OCR"),+ str(tmp_path / "data/page-workers"),+ ]+++def test_gateway_preserves_configured_paths_and_port(deployment_env, tmp_path):+ python = tmp_path / "python stub"+ python.write_text('#!/bin/sh\nprintf "%s\\n" "$PWD" "$OCR_LAYOUT_MODEL_DIR" "$OCR_PAGE_REGISTRY" "$@"\n')+ python.chmod(0o755)+ deployment_env.update({+ "OCRWEB_PYTHON": str(python),+ "OCR_ASSETS_DIR": str(tmp_path / "model assets"),+ "OCR_PAGE_REGISTRY": str(tmp_path / "shared registry"),+ "PORT": "19001",+ })+ result = subprocess.run(+ ["bash", str(SDK / "webdemo/start_gateway.sh")], cwd=tmp_path,+ env=deployment_env, capture_output=True, text=True, check=True,+ )+ lines = result.stdout.splitlines()+ assert lines[:3] == [str(SDK / "webdemo"), str(tmp_path / "model assets/PP-DocLayoutV3_infer"), str(tmp_path / "shared registry")]+ assert lines[3:] == ["-s", "-m", "uvicorn", "server:app", "--host", "0.0.0.0", "--port", "19001", "--workers", "1"]++[email protected](("script", "required"), [+ ("webdemo/docker/build.sh", "BASE_IMAGE"),+ ("webdemo/scripts/start_single_gpu.sh", "OCR_IMAGE"),+ ("scripts/eval_omnidocbench_v16_docker.sh", "MODEL_DIR"),+ ("webdemo/start_replica.sh", "OCR_REPLICA_GPUS"),+])+def test_missing_deployment_configuration_fails_before_launch(script, required, deployment_env, tmp_path):+ deployment_env["OCRWEB_PYTHON"] = sys.executable+ result = subprocess.run(+ ["bash", str(SDK / script)], cwd=tmp_path,+ env=deployment_env, capture_output=True, text=True, timeout=5,+ )+ assert result.returncode != 0+ assert required in result.stderr+++def test_setup_installs_selected_profile_without_copying_an_environment(deployment_env, tmp_path):+ bin_dir = tmp_path / "bin"+ bin_dir.mkdir()+ uv = bin_dir / "uv"+ uv.write_text('#!/bin/sh\nprintf "%s\\n" "$@"\n')+ uv.chmod(0o755)+ env_dir = tmp_path / "custom env"+ (env_dir / "bin").mkdir(parents=True)+ (env_dir / "bin/python").symlink_to(sys.executable)+ deployment_env.update({+ "PATH": str(bin_dir) + os.pathsep + deployment_env["PATH"],+ "SDK_PROFILE": "sdk-cpu", "OCRWEB_ENV": str(env_dir),+ })+ result = subprocess.run(+ ["bash", str(SDK / "webui/scripts/setup_env.sh")], cwd=tmp_path,+ env=deployment_env, capture_output=True, text=True, check=True,+ )+ assert result.stdout.splitlines()[:11] == [+ "pip", "install", "--python", str(env_dir / "bin/python"),+ "-r", str(PROJECT / "pyproject.toml"), "--extra", "sdk-cpu", "fastapi", "uvicorn", "python-multipart",+ ]+++def test_obs_credentials_require_explicit_environment(monkeypatch):+ monkeypatch.syspath_prepend(str(SDK / "webdemo"))+ module = importlib.import_module("obs_jobs")+ monkeypatch.delenv("OBS_AK", raising=False)+ monkeypatch.delenv("OBS_SK", raising=False)+ with pytest.raises(RuntimeError, match="OBS_AK and OBS_SK"):+ module._credentials()+++def test_advertise_host_override(monkeypatch):+ monkeypatch.syspath_prepend(str(SDK / "webdemo"))+ monkeypatch.setenv("OCR_ADVERTISE_HOST", "worker.example.com")+ for name in ("page_fleet", "upright_server"):+ assert importlib.import_module(name)._own_ip() == "worker.example.com"+++def test_rm_bridge_accepts_environment_configuration(deployment_env, tmp_path):+ deployment_env.update({+ "RM_SCORE_URL": "https://rm.example.com/score",+ "RM_SCORE_USER": "test-user", "RM_SCORE_PASSWORD": "test-password",+ "RM_SCORE_TIMEOUT": "12", "RM_BRIDGE_ENV": str(tmp_path / "absent.env"),+ })+ code = 'import json,runpy,sys; cfg=runpy.run_path(sys.argv[1]); print(json.dumps([cfg["REMOTE"],cfg["TIMEOUT"]]))'+ result = subprocess.run(+ [sys.executable, "-c", code, str(SDK / "webdemo/rm_bridge.py")],+ env=deployment_env, capture_output=True, text=True, check=True,+ )+ assert json.loads(result.stdout) == ["https://rm.example.com/score", 12]+++def test_reference_config_uses_configured_service(monkeypatch, tmp_path):+ from minicpmvocr import create_backend, load_config++ monkeypatch.setenv("VLLM_URL", "http://localhost:19009")+ monkeypatch.setenv("OCR_SERVED_NAME", "custom-ocr")+ cfg = load_config(str(SDK / "minicpmvocr/configs/minicpmvocr.yaml"), {+ "input": {"files_dir": str(tmp_path)},+ "layout": {"provider": "ppdoclayout3_server", "server_url": "http://localhost:8110"},+ })+ assert create_backend(cfg).server_urls == ["http://localhost:19009"]+ assert cfg["engine"]["model_name"] == "custom-ocr"++[email protected]("relative", ["webdemo/model_manager.py", "webui/runner.py"])+def test_demo_request_uses_all_configured_replicas(relative, monkeypatch, tmp_path):+ from minicpmvocr import create_backend, load_config++ monkeypatch.syspath_prepend(str(SDK / "webdemo"))+ monkeypatch.setenv("VLLM_URL", "http://localhost:19009")+ monkeypatch.setenv("VLLM_URLS", "http://localhost:19010, http://localhost:19011")+ monkeypatch.setenv("OCR_SERVED_NAME", "replica-ocr")+ spec = importlib.util.spec_from_file_location("deployment_runner", SDK / relative)+ module = importlib.util.module_from_spec(spec)+ spec.loader.exec_module(module)+ cfg = load_config(str(SDK / "minicpmvocr/configs/minicpmvocr.yaml"), module._webui_overrides(+ input={"files_dir": str(tmp_path)},+ layout={"provider": "ppdoclayout3_server", "server_url": "http://localhost:8110"},+ ))+ assert create_backend(cfg).server_urls == ["http://localhost:19010", "http://localhost:19011"]diff --git a/sdk/tests/test_http_session_reuse.py b/sdk/tests/test_http_session_reuse.pynew file mode 100644index 0000000..82c932c--- /dev/null+++ b/sdk/tests/test_http_session_reuse.py@@ -0,0 +1,43 @@+import threading++from minicpmvocr.backends import create_backend+from minicpmvocr.config import DEFAULT_CONFIG+++def _client(tmp_path):+ cfg = {k: dict(v) if isinstance(v, dict) else v for k, v in DEFAULT_CONFIG.items()}+ cfg["engine"] = dict(cfg["engine"])+ cfg["engine"]["model_name"] = "test-ocr"+ cfg["engine"]["server_urls"] = ["http://127.0.0.1:18611"]+ return create_backend(cfg)+++def test_same_thread_gets_the_same_session(tmp_path):+ client = _client(tmp_path)+ assert client._session() is client._session()+++def test_each_thread_gets_its_own_session(tmp_path):+ client = _client(tmp_path)+ mine = client._session()+ theirs = []++ def grab():+ theirs.append(client._session())++ workers = [threading.Thread(target=grab) for _ in range(3)]+ for w in workers:+ w.start()+ for w in workers:+ w.join()++ assert len(theirs) == 3+ assert all(s is not mine for s in theirs)++ assert len({id(s) for s in theirs}) == 3+++def test_session_ignores_ambient_proxy_env(tmp_path):++ client = _client(tmp_path)+ assert client._session().trust_env is Falsediff --git a/sdk/tests/test_image_encoding.py b/sdk/tests/test_image_encoding.pynew file mode 100644index 0000000..dc0befb--- /dev/null+++ b/sdk/tests/test_image_encoding.py@@ -0,0 +1,43 @@+import base64+import io++import numpy as np+from PIL import Image++from minicpmvocr.backends import PNG_COMPRESS_LEVEL, encode_image_b64+++def _text_like_crop(width=520, height=70):++ rng = np.random.default_rng(0)+ pixels = np.full((height, width, 3), 245, dtype=np.uint8)+ top, bottom = height // 6, height - height // 6+ rows = bottom - top+ for x in range(4, max(width - 8, 5), 11):+ cols = min(6, width - x)+ pixels[top:bottom, x : x + cols] = rng.integers(0, 70, size=(rows, cols, 3), dtype=np.uint8)+ return Image.fromarray(pixels)+++def test_encode_image_b64_is_lossless():+ image = _text_like_crop()+ decoded = Image.open(io.BytesIO(base64.b64decode(encode_image_b64(image)))).convert("RGB")+ assert np.array_equal(np.asarray(decoded), np.asarray(image))+++def test_encode_image_b64_emits_png():+ image = _text_like_crop(64, 32)+ raw = base64.b64decode(encode_image_b64(image))+ assert raw[:8] == b"\x89PNG\r\n\x1a\n"+++def test_compress_level_stays_in_fast_lossless_range():++ assert 0 < PNG_COMPRESS_LEVEL <= 3+++def test_non_png_format_ignores_compress_level():++ image = _text_like_crop(64, 32)+ raw = base64.b64decode(encode_image_b64(image, image_format="JPEG"))+ assert raw[:2] == b"\xff\xd8"diff --git a/sdk/tests/test_infer_scheduling.py b/sdk/tests/test_infer_scheduling.pynew file mode 100644index 0000000..90892cc--- /dev/null+++ b/sdk/tests/test_infer_scheduling.py@@ -0,0 +1,133 @@+import json++import numpy as np+import pytest+from PIL import Image++from minicpmvocr import pipeline+from minicpmvocr.pipeline import staged+from minicpmvocr._utils import ensure_dir, write_json++PAGES = 3+BLOCKS_PER_PAGE = 4+++class RecordingEngine:+++ name = "fake"++ def __init__(self):+ self.calls = []++ def start(self):+ pass++ def stop(self):+ pass++ def recognize(self, image, prompt, max_new_tokens, slice_nums=None):+ width, height = image.size+ self.calls.append((width, height))++ return {"text": f"w{width}h{height}", "output_token_count": 3}+++def _build_run(tmp_path):++ run_dir = tmp_path / "run"+ intermediate = run_dir / "runtime" / "intermediate"+ for page in range(PAGES):+ image_id = f"page{page}"+ crop_dir = intermediate / "crops" / image_id+ ensure_dir(crop_dir)+ blocks = []+ for idx in range(BLOCKS_PER_PAGE):++ w, h = 40 + 10 * idx + page, 20 + page+ crop_name = f"{idx:03d}_text.png"+ Image.fromarray(np.full((h, w, 3), 200, dtype=np.uint8)).save(crop_dir / crop_name)+ blocks.append({+ "block_id": idx, "label": "text", "bbox": [0, idx * 30, w, idx * 30 + h],+ "order": idx, "crop_filename": crop_name,+ "crop_width": w, "crop_height": h, "skip_vlm": False,+ })+ write_json(intermediate / "layouts" / f"{image_id}.json", {+ "image_id": image_id, "image_width": 200, "image_height": 400,+ "num_blocks": len(blocks), "blocks": blocks,+ "source": {"type": "image", "path": f"{image_id}.png"},+ })++ ensure_dir(run_dir / "runtime")+ tasks_path = run_dir / "runtime" / "page_tasks.jsonl"+ with tasks_path.open("w", encoding="utf-8") as f:+ for page in range(PAGES):+ image_id = f"page{page}"+ f.write(json.dumps({+ "image_id": image_id,+ "layout_path": str(intermediate / "layouts" / f"{image_id}.json"),+ "crop_dir": str(intermediate / "crops" / image_id),+ "source_path": "",+ }) + "\n")++ write_json(run_dir / "run_meta.json", {"metric_definition": {}})+ return run_dir+++def _cfg(run_dir, queue_mode, page_workers, max_workers):+ return {+ "run": {"run_tag": "t", "run_root": str(run_dir.parent), "mode": "full", "seed": 42},+ "prompt": {"prompt_map": "", "override_mode": "legacy"},+ "pipeline": {"queue_mode": queue_mode, "page_workers": page_workers, "max_workers": max_workers},+ "logging": {"progress_log_every": 1000},+ "_meta": {"run_dir": str(run_dir)},+ }+++ "queue_mode,page_workers,max_workers",+ [("serial", 1, 1), ("serial", 1, 8), ("serial", 3, 2), ("concurrent", 1, 8)],+)+def test_queue_modes_agree(tmp_path, monkeypatch, queue_mode, page_workers, max_workers):+ run_dir = _build_run(tmp_path)+ engine = RecordingEngine()+ monkeypatch.setattr(staged, "create_backend", lambda cfg: engine)++ summary = pipeline.infer_run(_cfg(run_dir, queue_mode, page_workers, max_workers))++ assert summary["counts"] == {+ "planned": PAGES,+ "ok": PAGES,+ "failed": 0,+ "blocks": PAGES * BLOCKS_PER_PAGE,+ "vlm_blocks": PAGES * BLOCKS_PER_PAGE,+ "failed_blocks": 0,+ "pages_with_failed_blocks": 0,+ }+ assert len(engine.calls) == PAGES * BLOCKS_PER_PAGE++ for page in range(PAGES):+ text = (run_dir / "output" / f"page{page}.md").read_text(encoding="utf-8")+ expected = [f"w{40 + 10 * idx + page}h{20 + page}" for idx in range(BLOCKS_PER_PAGE)]++ assert [line for line in text.split("\n") if line.strip()] == expected+++def test_concurrent_mode_uses_the_full_worker_pool(tmp_path, monkeypatch):++ run_dir = _build_run(tmp_path)+ engine = RecordingEngine()+ monkeypatch.setattr(staged, "create_backend", lambda cfg: engine)++ seen = {}+ real_pool = staged.ThreadPoolExecutor++ def spy(max_workers, *a, **kw):+ seen["max_workers"] = max_workers+ return real_pool(max_workers, *a, **kw)++ monkeypatch.setattr(staged, "ThreadPoolExecutor", spy)+ pipeline.infer_run(_cfg(run_dir, "concurrent", 1, 8))+++ assert seen["max_workers"] == 8diff --git a/sdk/tests/test_kie_api.py b/sdk/tests/test_kie_api.pynew file mode 100644index 0000000..b881d82--- /dev/null+++ b/sdk/tests/test_kie_api.py@@ -0,0 +1,106 @@+import base64+import io+import sys+from pathlib import Path++import pytest+from PIL import Image++ROOT = Path(__file__).resolve().parents[1]+sys.path.insert(0, str(ROOT))+sys.path.insert(0, str(ROOT / "webdemo"))++import server # noqa: E402++pytest.importorskip("fastapi")+from fastapi.testclient import TestClient # noqa: E402+++def _png(width=12, height=8, color=(180, 20, 20)) -> str:+ buf = io.BytesIO()+ Image.new("RGB", (width, height), color).save(buf, format="PNG")+ return "data:image/png;base64," + base64.b64encode(buf.getvalue()).decode()+++def client(monkeypatch):+ calls = {}++ class FakeOcr:+ def recognize(self, image, prompt, max_new_tokens=4096, slice_nums=None, **kwargs):+ calls["image_size"] = image.size+ calls["prompt"] = prompt+ calls["max_new_tokens"] = max_new_tokens+ calls["slice_nums"] = slice_nums+ return {"text": calls.get("reply", '```json\n{"店名": "KEDAI"}\n```')}++ def health(self):+ return {"reachable": True, "model_match": True, "served": [], "error": None}++ def refuse_layout(*_args, **_kwargs):+ raise AssertionError("关键信息抽取不应借用版面")++ with TestClient(server.app) as test_client:+ monkeypatch.setattr(server, "OCR_SVC", FakeOcr())+ monkeypatch.setattr(server.RUNNER, "acquire", refuse_layout)+ test_client.calls = calls # type: ignore[attr-defined]+ yield test_client+++def test_kie_builds_prompt_and_strips_fence(client):+ before = {path.name for path in server.JOBS_DIR.iterdir()} if server.JOBS_DIR.exists() else set()+ response = client.post(+ "/api/image-parse",+ json={"model": "minicpm-ocr-kie", "image": _png(), "fields": [" 店名 ", "金额"], "upright": True},+ )+ assert response.status_code == 200, response.text+ body = response.json()+ prompt = 'Extract the "店名", "金额". Format the output as a JSON object with keys: "店名", "金额". If an item is not in the image, use "###".'+ assert client.calls["prompt"] == prompt+ assert client.calls["max_new_tokens"] == 1024+ assert client.calls["image_size"] == (12, 8)+ assert body["choices"][0]["message"]["content"] == '{"店名": "KEDAI"}'+ assert body["minicpm_ocr"]["mode"] == "kie"+ assert body["minicpm_ocr"]["prompt"] == prompt+ assert body["minicpm_ocr"]["fields"] == ["店名", "金额"]+ assert body["minicpm_ocr"]["blocks"][0]["content"] == '{"店名": "KEDAI"}'+ assert body["minicpm_ocr"]["blocks"][0]["status"] == "ok"+ assert "rotation" not in body["minicpm_ocr"]+ assert "map_ocr_source" not in body+ after = {path.name for path in server.JOBS_DIR.iterdir()} if server.JOBS_DIR.exists() else set()+ assert after == before+++def test_kie_rejects_bad_fields(client):+ image = _png()+ missing = client.post("/api/image-parse", json={"model": "minicpm-ocr-kie", "image": image})+ assert missing.status_code == 400+ blank = client.post("/api/image-parse", json={"model": "minicpm-ocr-kie", "image": image, "fields": [" "]})+ assert blank.status_code == 400+ quoted = client.post("/api/image-parse", json={"model": "minicpm-ocr-kie", "image": image, "fields": ['店"名']})+ assert quoted.status_code == 400+ duplicate = client.post("/api/image-parse", json={"model": "minicpm-ocr-kie", "image": image, "fields": ["金额", "金额"]})+ assert duplicate.status_code == 400+ too_many = client.post(+ "/api/image-parse",+ json={"model": "minicpm-ocr-kie", "image": image, "fields": [f"f{i}" for i in range(21)]},+ )+ assert too_many.status_code == 400+ assert client.calls == {}+++def test_kie_reports_recognition_failure(client, monkeypatch):+ def explode(*_args, **_kwargs):+ raise RuntimeError("vllm down")++ monkeypatch.setattr(server.OCR_SVC, "recognize", explode)+ failed = client.post("/api/image-parse", json={"model": "minicpm-ocr-kie", "image": _png(), "fields": ["金额"]})+ assert failed.status_code == 500+ assert "识别失败" in failed.json()["error"]+++def test_capabilities_advertise_kie_without_changing_modes(client):+ body = client.get("/api/image-parse/capabilities").json()+ assert body["kie"] is True+ assert body["seal"] is True+ assert "kie" not in body["modes"]diff --git a/sdk/tests/test_latex_repair.py b/sdk/tests/test_latex_repair.pynew file mode 100644index 0000000..5a48eb9--- /dev/null+++ b/sdk/tests/test_latex_repair.py@@ -0,0 +1,58 @@+import pytest++from minicpmvocr.postprocess.latex_repair import repair_latex_formula+from minicpmvocr.postprocess.markdown import postprocess_content+++ "formula",+ [+ r"\frac{a+b}{c}",+ r"\left(\frac{a}{b}\right)",+ r"\left\langle x,y\right\rangle",+ r"\{x\mid x>0\}",+ r"a\leftarrow b\rightarrow c\leftrightarrow d",+ r"\begin{pmatrix}a&b\\c&d\end{pmatrix}",+ ],+)[email protected]("label", ["display_formula", "inline_formula"])+def test_valid_formula_is_preserved(formula, label):+ assert repair_latex_formula(formula, label) == formula+++ "formula,expected",+ [+ (r"x_{1}}", r"x_{1}"),+ (r"{x+1", "x+1"),+ (r"\left(x+1", "(x+1"),+ (r"\begin{matrix}a&b", r"\begin{matrix}a&b \end{matrix}"),+ (r"a&b\end{matrix}", r"\begin{matrix} a&b\end{matrix}"),+ ("x+1\\", "x+1"),+ ],+)[email protected]("label", ["display_formula", "inline_formula"])+def test_formula_blocks_are_repaired_during_postprocessing(formula, expected, label):+ assert postprocess_content(formula, "latex", label) == expected+++ "formula,label",+ [("$$x_{1}}$$", "display_formula"), ("$x_{1}}$", "inline_formula")],+)+def test_outer_math_delimiters_are_removed_before_repair(formula, label):+ assert postprocess_content(formula, "latex", label) == r"x_{1}"+++ "output_format,label",+ [("text", "text"), ("html", "table"), ("latex", "custom_formula")],+)+def test_other_content_is_not_rewritten(output_format, label):+ content = r"{literal text \leftarrow"+ assert postprocess_content(content, output_format, label) == content++[email protected]("formula", ["", " "])+def test_empty_formula_is_preserved(formula):+ assert repair_latex_formula(formula) == formuladiff --git a/sdk/tests/test_layout_download.py b/sdk/tests/test_layout_download.pynew file mode 100644index 0000000..c4a9b6a--- /dev/null+++ b/sdk/tests/test_layout_download.py@@ -0,0 +1,184 @@+from concurrent.futures import ThreadPoolExecutor+import hashlib+import io+import json+from pathlib import Path+import tarfile+import time++import pytest+import requests++from minicpmvocr.layouts import download+++FILES = {+ "inference.pdiparams": b"test-model-weights",+ "inference.json": b'{"model": "test"}',+ "inference.yml": b"Global:\n model_name: PP-DocLayoutV3\n",+}+++def model_archive(files=None, extra=None):+ output = io.BytesIO()+ with tarfile.open(fileobj=output, mode="w") as archive:+ for name, content in (FILES if files is None else files).items():+ info = tarfile.TarInfo("PP-DocLayoutV3_infer/" + name)+ info.size = len(content)+ archive.addfile(info, io.BytesIO(content))+ if extra is not None:+ info, content = extra+ info.size = len(content)+ archive.addfile(info, io.BytesIO(content) if info.isfile() else None)+ return output.getvalue()+++def remote(monkeypatch):+ state = {"body": model_archive(), "calls": [], "failure": None, "size": None, "delay": 0}++ class Response:+ @property+ def headers(self):+ size = len(state["body"]) if state["size"] is None else state["size"]+ return {"Content-Length": str(size)}++ def __enter__(self):+ return self++ def __exit__(self, *args):+ pass++ def raise_for_status(self):+ pass++ def iter_content(self, chunk_size):+ time.sleep(state["delay"])+ yield state["body"][:100]+ if state["failure"]:+ raise state["failure"]+ yield state["body"][100:]++ def get(url, **kwargs):+ state["calls"].append(url)+ assert kwargs["stream"] is True+ return Response()++ monkeypatch.setattr(download.requests, "get", get)+ monkeypatch.setattr(download, "LAYOUT_MODEL_SHA256", hashlib.sha256(state["body"]).hexdigest())+ return state+++def write_local(directory, files=None):+ directory.mkdir(parents=True, exist_ok=True)+ for name, content in (FILES if files is None else files).items():+ (directory / name).write_bytes(content)+++def test_complete_local_model_is_reused_without_network(tmp_path, remote):+ model = tmp_path / "models/PP-DocLayoutV3_infer"+ write_local(model)+ assert download.ensure_layout_model(model) == model+ assert remote["calls"] == []+++def test_download_installs_all_files_and_records_source(tmp_path, remote):+ model = tmp_path / "models/PP-DocLayoutV3_infer"+ assert download.ensure_layout_model(model) == model+ assert {name: (model / name).read_bytes() for name in FILES} == FILES+ metadata = json.loads((model / ".minicpmvocr-model.json").read_text())+ assert metadata["source"] == download.LAYOUT_MODEL_URL+ assert metadata["archive_sha256"] == hashlib.sha256(remote["body"]).hexdigest()+ assert remote["calls"] == [download.LAYOUT_MODEL_URL]+ assert download.layout_model_ready(model)+ assert download.ensure_layout_model(model) == model+ assert len(remote["calls"]) == 1+++def test_partial_model_is_repaired_and_other_files_are_preserved(tmp_path, remote):+ model = tmp_path / "models/PP-DocLayoutV3_infer"+ write_local(model, {"inference.pdiparams": b"partial"})+ (model / "notes.txt").write_text("keep this file")+ download.ensure_layout_model(model)+ assert download.layout_model_ready(model)+ assert (model / "inference.pdiparams").read_bytes() == FILES["inference.pdiparams"]+ assert (model / "notes.txt").read_text() == "keep this file"+++def test_interrupted_download_keeps_existing_files_and_cleans_staging(tmp_path, remote):+ model = tmp_path / "PP-DocLayoutV3_infer"+ write_local(model, {"inference.pdiparams": b"partial"})+ remote["failure"] = requests.ConnectionError("interrupted")+ with pytest.raises(OSError, match="Cannot download"):+ download.ensure_layout_model(model)+ assert (model / "inference.pdiparams").read_bytes() == b"partial"+ assert not (model / "inference.json").exists()+ assert not list(tmp_path.glob(".PP-DocLayoutV3_infer-*"))++[email protected]("failure", ["size", "checksum"])+def test_invalid_download_is_not_installed(tmp_path, remote, monkeypatch, failure):+ model = tmp_path / "PP-DocLayoutV3_infer"+ if failure == "size":+ remote["size"] = len(remote["body"]) + 100+ else:+ monkeypatch.setattr(download, "LAYOUT_MODEL_SHA256", "0" * 64)+ with pytest.raises(OSError):+ download.ensure_layout_model(model)+ assert not model.exists()+ assert not list(tmp_path.glob(".PP-DocLayoutV3_infer-*"))++[email protected]("problem", ["missing", "wrong-model", "invalid-json", "traversal", "symlink"])+def test_invalid_archive_is_rejected_before_installation(tmp_path, remote, monkeypatch, problem):+ files = dict(FILES)+ extra = None+ if problem == "missing":+ files.pop("inference.json")+ elif problem == "wrong-model":+ files["inference.yml"] = b"Global:\n model_name: another-model\n"+ elif problem == "invalid-json":+ files["inference.json"] = b"not json"+ elif problem == "traversal":+ extra = (tarfile.TarInfo("../../escape.txt"), b"escape")+ else:+ info = tarfile.TarInfo("PP-DocLayoutV3_infer/link")+ info.type = tarfile.SYMTYPE+ info.linkname = "../../escape.txt"+ extra = (info, b"")+ remote["body"] = model_archive(files, extra)+ monkeypatch.setattr(download, "LAYOUT_MODEL_SHA256", hashlib.sha256(remote["body"]).hexdigest())+ model = tmp_path / "PP-DocLayoutV3_infer"+ with pytest.raises(OSError):+ download.ensure_layout_model(model)+ assert not model.exists()+ assert not (tmp_path.parent / "escape.txt").exists()+++def test_interrupted_installation_is_retried(tmp_path, remote, monkeypatch):+ model = tmp_path / "PP-DocLayoutV3_infer"+ replace = download.os.replace++ def interrupted(source, destination):+ if Path(destination).name == "inference.json":+ raise OSError("interrupted installation")+ replace(source, destination)++ monkeypatch.setattr(download.os, "replace", interrupted)+ with pytest.raises(OSError, match="interrupted installation"):+ download.ensure_layout_model(model)+ assert not download.layout_model_ready(model)+ monkeypatch.setattr(download.os, "replace", replace)+ download.ensure_layout_model(model)+ assert download.layout_model_ready(model)+ assert len(remote["calls"]) == 2+++def test_concurrent_callers_download_once(tmp_path, remote):+ model = tmp_path / "models/PP-DocLayoutV3_infer"+ remote["delay"] = 0.05+ with ThreadPoolExecutor(max_workers=4) as workers:+ results = list(workers.map(download.ensure_layout_model, [model] * 4))+ assert results == [model] * 4+ assert len(remote["calls"]) == 1+ assert download.layout_model_ready(model)diff --git a/sdk/tests/test_layout_parallelism.py b/sdk/tests/test_layout_parallelism.pynew file mode 100644index 0000000..588cdba--- /dev/null+++ b/sdk/tests/test_layout_parallelism.py@@ -0,0 +1,163 @@+import threading+from copy import deepcopy++import numpy as np+import pytest+from PIL import Image++from minicpmvocr import pipeline+from minicpmvocr.pipeline import overlapped+from minicpmvocr.config import DEFAULT_CONFIG++PAGES = 8+++class FakeDetector:+++ name = "fake"++ def __init__(self, config):+ self.config = config+ self.device = "cpu"+ self.model_load_sec = 0.0+ self.pages = []++ def start(self):+ pass++ def stop(self):+ pass++ def model_ref(self):+ return "fake"++ def detect(self, images):+ image = images[0]+ self.pages.append((image.width, image.height))+ return [[{+ "index": 0, "label": "text", "class_id": 0, "score": 0.9,+ "bbox": [0.0, 0.0, float(image.width), float(image.height)], "polygon": None,+ }]]++ def crop(self, image, detections):++ return [{+ "label": "text", "score": 0.9, "order": 0,+ "bbox": [0, 0, image.width, image.height],+ "image": np.asarray(image.convert("RGB")),+ "polygon": None,+ }]+++class RecordingEngine:+ name = "fake"++ def __init__(self):+ self.lock = threading.Lock()+ self.calls = []++ def start(self):+ pass++ def stop(self):+ pass++ def recognize(self, image, prompt, max_new_tokens, slice_nums=None):+ with self.lock:+ self.calls.append(image.size)+ return {"text": f"w{image.size[0]}", "output_token_count": 1}+++def _make_pages(tmp_path):+ src = tmp_path / "src"+ src.mkdir(parents=True, exist_ok=True)+ for i in range(PAGES):++ Image.fromarray(np.full((40, 60 + i, 3), 200, dtype=np.uint8)).save(src / f"p{i:02d}.png")+ return src+++def _cfg(tmp_path, src, layout_workers):++ run_dir = tmp_path / f"run{layout_workers}"+ cfg = deepcopy(DEFAULT_CONFIG)+ cfg["run"].update({"run_tag": "t", "run_root": str(tmp_path), "mode": "full"})+ cfg["input"].update({"image_dir": str(src)})+ cfg["layout"].update({"provider": "fake", "device": "cpu"})+ cfg["pipeline"].update({"max_workers": 4, "layout_workers": layout_workers, "overlap_layout": True})+ cfg["logging"]["progress_log_every"] = 1000+ cfg["_meta"] = {+ "run_dir": str(run_dir),+ "runtime_intermediate_dir": str(run_dir / "runtime" / "intermediate"),+ }+ return cfg+++def _run(tmp_path, monkeypatch, layout_workers):+ src = _make_pages(tmp_path)+ made = []++ def fake_factory(layout_cfg):+ det = FakeDetector(layout_cfg)+ made.append(det)+ return det++ engine = RecordingEngine()+ monkeypatch.setattr(overlapped, "create_layout_detector", fake_factory)+ monkeypatch.setattr(overlapped, "create_backend", lambda cfg: engine)++ cfg = _cfg(tmp_path, src, layout_workers)+ summary = pipeline.pipelined_run(cfg)+ return cfg, summary, made, engine++[email protected]("layout_workers", [1, 4])+def test_every_page_is_detected_exactly_once(tmp_path, monkeypatch, layout_workers):+ cfg, summary, made, engine = _run(tmp_path, monkeypatch, layout_workers)++ assert summary["counts"] == {+ "planned": PAGES,+ "ok": PAGES,+ "failed": 0,+ "blocks": PAGES,+ "vlm_blocks": PAGES,+ "failed_blocks": 0,+ "pages_with_failed_blocks": 0,+ }++ handled = [p for det in made for p in det.pages]+ assert sorted(handled) == sorted([(60 + i, 40) for i in range(PAGES)])+ assert len(engine.calls) == PAGES+++def test_parallel_layout_matches_serial_output(tmp_path, monkeypatch):++ cfg1, _, _, _ = _run(tmp_path / "a", monkeypatch, 1)+ cfg4, _, _, _ = _run(tmp_path / "b", monkeypatch, 4)++ for i in range(PAGES):+ one = (pytest.importorskip("pathlib").Path(cfg1["_meta"]["run_dir"]) / "output" / f"p{i:02d}.md").read_text()+ four = (pytest.importorskip("pathlib").Path(cfg4["_meta"]["run_dir"]) / "output" / f"p{i:02d}.md").read_text()+ assert one == four+++def test_layout_workers_controls_detector_count(tmp_path, monkeypatch):++ _, _, made_one, _ = _run(tmp_path / "a", monkeypatch, 1)+ _, _, made_four, _ = _run(tmp_path / "b", monkeypatch, 4)++ assert len(made_one) == 1+ assert len(made_four) == 4+++def test_layout_timing_keeps_input_order(tmp_path, monkeypatch):++ import json+ from pathlib import Path++ cfg, _, _, _ = _run(tmp_path, monkeypatch, 4)+ path = Path(cfg["_meta"]["run_dir"]) / "runtime" / "layout_timing.jsonl"+ ids = [json.loads(line)["image_id"] for line in path.read_text().splitlines() if line.strip()]++ assert ids == [f"p{i:02d}" for i in range(PAGES)]diff --git a/sdk/tests/test_lazy_imports.py b/sdk/tests/test_lazy_imports.pynew file mode 100644index 0000000..7a0adc9--- /dev/null+++ b/sdk/tests/test_lazy_imports.py@@ -0,0 +1,61 @@+import subprocess+import sys++import pytest+++ "statement",+ [+ "import minicpmvocr.layouts",+ "import minicpmvocr.prompts",+ "import minicpmvocr.pipeline._text",+ ],+)+def test_lightweight_imports_do_not_load_detectors_or_optional_frameworks(statement):+ code = f"""+import sys+{statement}+unexpected = [name for name in sys.modules if+ name.startswith('minicpmvocr.layouts.ppdoclayout3_') or+ name.split('.')[0] in {{'paddle', 'paddlex', 'torch', 'transformers'}}]+assert not unexpected, unexpected+"""+ result = subprocess.run([sys.executable, "-B", "-c", code], capture_output=True, text=True)+ assert result.returncode == 0, result.stderr+++ "provider,class_name",+ [+ ("ppdoclayout3_paddlex", "PPDocLayoutV3PaddleXDetector"),+ ("ppdoclayout3_server", "PPDocLayoutV3ServerDetector"),+ ("ppdoclayout3_torch", "PPDocLayoutV3TorchDetector"),+ ],+)+def test_detector_class_exports_still_resolve(provider, class_name):+ from minicpmvocr import layouts++ detector = layouts.resolve_layout_provider_class({"provider": provider})+ assert detector is getattr(layouts, class_name)+++def test_custom_detector_registration_still_works(monkeypatch):+ from minicpmvocr import layouts++ class CustomDetector:+ def __init__(self, config):+ self.config = config++ monkeypatch.setitem(layouts.LAYOUT_REGISTRY, "custom", CustomDetector)+ config = {"provider": "custom"}+ assert layouts.resolve_layout_provider_class(config) is CustomDetector+ assert layouts.create_layout_detector(config).config == config+++def test_registry_get_resolves_a_lazy_detector():+ from minicpmvocr import layouts++ assert layouts.LAYOUT_REGISTRY.get("ppdoclayout3_paddlex") is layouts.PPDocLayoutV3PaddleXDetector+ fallback = object()+ assert layouts.LAYOUT_REGISTRY.get("unknown", fallback) is fallbackdiff --git a/sdk/tests/test_merged_crop_regions.py b/sdk/tests/test_merged_crop_regions.pynew file mode 100644index 0000000..826f106--- /dev/null+++ b/sdk/tests/test_merged_crop_regions.py@@ -0,0 +1,93 @@+from pathlib import Path++import numpy as np+from PIL import Image++from minicpmvocr.pipeline._layout_record import _build_layout_from_blocks+++def _block(label, bbox, image=None, group_id=None):+ return {+ "label": label,+ "class_id": 0,+ "score": 0.9,+ "bbox": list(bbox),+ "image": image,+ "polygon": [],+ "skip_vlm": False,+ "group_id": group_id,+ }+++def _crop(h, w):+ return np.zeros((h, w, 3), dtype=np.uint8)+++def _layout(blocks, tmp_path=None):+ layout, _ = _build_layout_from_blocks(+ image=Image.new("RGB", (800, 1000)),+ image_id="t",+ source_path="t.png",+ source_type="image",+ page_index=None,+ detections=[],+ blocks=blocks,+ crops_root=Path("/tmp"),+ crop_sink={},+ )+ return layout+++def test_unmerged_block_has_one_region():+ layout = _layout([_block("text", [10, 10, 100, 40], _crop(30, 90))])+ block = layout["blocks"][0]+ assert block["regions"] == [[10, 10, 100, 40]]+ assert block["bbox"] == [10, 10, 100, 40]+++def test_cross_column_merge_keeps_both_boxes():++ blocks = [++ _block("text", [13, 820, 327, 852], _crop(77, 315)),++ _block("text", [335, 409, 650, 454], None, group_id=0),+ ]+ layout = _layout(blocks)+ assert len(layout["blocks"]) == 1+ regions = layout["blocks"][0]["regions"]+ assert regions == [[13, 820, 327, 852], [335, 409, 650, 454]]++ assert layout["blocks"][0]["bbox"] == [13, 820, 327, 852]+++def test_group_id_assigns_folded_boxes_to_the_right_leader():++ blocks = [+ _block("text", [0, 0, 100, 20], _crop(40, 100)),+ _block("text", [0, 30, 100, 50], None, group_id=0),+ _block("text", [200, 0, 300, 20], _crop(40, 100)),+ _block("text", [200, 30, 300, 50], None, group_id=2),+ ]+ out = {b["order"]: b["regions"] for b in _layout(blocks)["blocks"]}+ assert out[0] == [[0, 0, 100, 20], [0, 30, 100, 50]]+ assert out[2] == [[200, 0, 300, 20], [200, 30, 300, 50]]+++def test_missing_group_id_falls_back_to_preceding_leader():++ blocks = [+ _block("text", [0, 0, 100, 20], _crop(40, 100)),+ _block("text", [0, 30, 100, 50], None),+ ]+ block = _layout(blocks)["blocks"][0]+ assert block["regions"] == [[0, 0, 100, 20], [0, 30, 100, 50]]+++def test_three_way_merge_keeps_all_three():+ blocks = [+ _block("text", [0, 0, 100, 20], _crop(60, 100)),+ _block("text", [0, 30, 100, 50], None, group_id=0),+ _block("text", [0, 60, 100, 80], None, group_id=0),+ ]+ assert len(_layout(blocks)["blocks"][0]["regions"]) == 3diff --git a/sdk/tests/test_module_hygiene.py b/sdk/tests/test_module_hygiene.pynew file mode 100644index 0000000..7706aa7--- /dev/null+++ b/sdk/tests/test_module_hygiene.py@@ -0,0 +1,98 @@+import ast+import builtins+import pkgutil+from pathlib import Path++import pytest++import minicpmvocr++PACKAGE_DIR = Path(minicpmvocr.__file__).parent+REPO_ROOT = PACKAGE_DIR.parent+++def _module_files():+ return sorted(p for p in PACKAGE_DIR.rglob("*.py") if "__pycache__" not in p.parts)+++def _undefined_names(tree: ast.AST) -> set:++ defined = set(dir(builtins)) | {"__file__", "__name__", "__doc__"}+ for node in ast.walk(tree):+ if isinstance(node, (ast.Import, ast.ImportFrom)):+ for alias in node.names:+ defined.add(alias.asname or alias.name.split(".")[0])+ elif isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef, ast.ClassDef)):+ defined.add(node.name)+ elif isinstance(node, ast.Name) and isinstance(node.ctx, ast.Store):+ defined.add(node.id)+ elif isinstance(node, ast.arg):+ defined.add(node.arg)+ elif isinstance(node, ast.ExceptHandler) and node.name:+ defined.add(node.name)+ elif isinstance(node, ast.Global):+ defined.update(node.names)+ used = {+ node.id+ for node in ast.walk(tree)+ if isinstance(node, ast.Name) and isinstance(node.ctx, ast.Load)+ }+ return used - defined++[email protected]("path", _module_files(), ids=lambda p: p.name)+def test_no_undefined_names(path):+ assert _undefined_names(ast.parse(path.read_text(encoding="utf-8"))) == set()+++_REEXPORT_MODULES = {"__init__.py"}+++def _unused_imports(source: str) -> set:++ tree = ast.parse(source)+ imported = {}+ for node in ast.walk(tree):+ if isinstance(node, (ast.Import, ast.ImportFrom)):+ for alias in node.names:+ if alias.name == "*":+ continue+ imported[alias.asname or alias.name.split(".")[0]] = True+ mentioned = {n.id for n in ast.walk(tree) if isinstance(n, ast.Name)}+ mentioned |= {n.attr for n in ast.walk(tree) if isinstance(n, ast.Attribute)}+++ return {+ name+ for name in imported+ if name != "annotations"+ and name not in mentioned+ and source.count(name) <= 1+ }++[email protected]("path", _module_files(), ids=lambda p: p.name)+def test_no_unused_imports(path):+ if path.name in _REEXPORT_MODULES:+ pytest.skip("re-export surface")+ assert _unused_imports(path.read_text(encoding="utf-8")) == set()+++def test_every_module_imports_cleanly():++ failed = {}+ for info in pkgutil.walk_packages([str(PACKAGE_DIR)], prefix="minicpmvocr."):+ try:+ __import__(info.name)+ except ImportError as exc:++ failed[info.name] = str(exc)+ hard = {+ name: err+ for name, err in failed.items()+ if not any(+ dep in err+ for dep in ("fitz", "paddle", "bs4", "torch", "transformers", "cv2", "shapely")+ )+ }+ assert hard == {}diff --git a/sdk/tests/test_otsl_entities.py b/sdk/tests/test_otsl_entities.pynew file mode 100644index 0000000..7a4d798--- /dev/null+++ b/sdk/tests/test_otsl_entities.py@@ -0,0 +1,23 @@+from minicpmvocr.postprocess.otsl import convert_otsl_to_html+++def test_raw_special_chars_escaped_once():+ out = convert_otsl_to_html("<fcel>A & B<fcel>it's<nl>")+ assert "A & B" in out+ assert "it's" in out+++def test_model_emitted_entities_not_double_escaped():+ out = convert_otsl_to_html("<fcel>Children & Families<fcel>it's<nl>")+ assert "&amp;" not in out+ assert "&#x27;" not in out+ assert "Children & Families" in out+ assert "it's" in out+++def test_html_escaped_otsl_tags_convert():+ raw = "<fcel>A<fcel>B<nl><fcel>C<fcel>D<nl>"+ assert convert_otsl_to_html(raw) == (+ "<table><tr><td>A</td><td>B</td></tr>"+ "<tr><td>C</td><td>D</td></tr></table>"+ )diff --git a/sdk/tests/test_parse_quickstart.py b/sdk/tests/test_parse_quickstart.pynew file mode 100644index 0000000..eda6952--- /dev/null+++ b/sdk/tests/test_parse_quickstart.py@@ -0,0 +1,343 @@+from copy import deepcopy+import json+from pathlib import Path+import sys++from PIL import Image+import pytest+import yaml++from minicpmvocr import cli+from minicpmvocr.layouts.base import BaseLayoutDetector+from minicpmvocr.layouts import download+from minicpmvocr.pipeline import overlapped, staged+++SERVER_URL = "http://localhost:19991"+MODEL_NAME = "test-ocr"+++def _set_argv(monkeypatch, arguments):+ monkeypatch.setattr(sys, "argv", [*arguments, "--server-url", SERVER_URL, "--model", MODEL_NAME])+++class FakeDetector(BaseLayoutDetector):+ name = "fake"++ def _start(self):+ pass++ def detect(self, images):+ return [[{+ "index": 0, "label": "text", "class_id": 0, "score": 1.0,+ "bbox": [0, 0, image.width, image.height], "polygon": [],+ }] for image in images]+++class FakeEngine:+ name = "fake"++ def start(self):+ pass++ def stop(self):+ pass++ def recognize(self, image, prompt, max_new_tokens, slice_nums=None):+ return {"text": "Recognized page.", "output_token_count": 2}+++def quickstart(tmp_path, monkeypatch):+ for name in ("OCR_LAYOUT_MODEL_DIR", "OCR_ASSETS_DIR", "OCR_LAYOUT_DEVICE", "VLLM_URL", "OCR_SERVED_NAME", "OCR_INPUT_DIR", "OCR_RUN_ROOT"):+ monkeypatch.delenv(name, raising=False)+ monkeypatch.chdir(tmp_path)+ def reject_network(*args, **kwargs):+ raise AssertionError("Unexpected network request in CLI test")+ monkeypatch.setattr(download.requests, "get", reject_network)+ Image.new("RGB", (40, 30), "white").save("input.png")+ model = tmp_path / "models/PP-DocLayoutV3_infer"+ model.mkdir(parents=True)+ (model / "inference.pdiparams").write_bytes(b"test-weights")+ (model / "inference.json").write_text("{}")+ (model / "inference.yml").write_text("Global:\n model_name: PP-DocLayoutV3\n")+ seen = {"configs": [], "layouts": []}++ def build_detector(config):+ seen["layouts"].append(deepcopy(config))+ return FakeDetector(config)++ def build_engine(config):+ seen["configs"].append(deepcopy(config))+ return FakeEngine()++ for module in (staged, overlapped):+ monkeypatch.setattr(module, "create_layout_detector", build_detector)+ monkeypatch.setattr(module, "create_backend", build_engine)+ return tmp_path, model, seen++[email protected]("device", ["cpu", "cuda:0"])+def test_short_cpu_and_gpu_commands_write_markdown(quickstart, monkeypatch, capsys, device):+ root, model, seen = quickstart+ _set_argv(monkeypatch, ["minicpmvocr", "parse", "input.png", "-o", "result.md", "--device", device])+ assert cli.main() == 0+ assert (root / "result.md").read_text() == "Recognized page."+ cfg = seen["configs"][0]+ assert cfg["layout"]["device"] == device+ assert cfg["layout"]["model_dir"] == str(model)+ assert cfg["engine"]["max_model_len"] == 40960+ assert cfg["engine"]["model_name"] == MODEL_NAME+ assert cfg["engine"]["server_urls"] == [SERVER_URL]+ assert cfg["pipeline"]["max_workers"] == 32+ assert cfg["pipeline"]["merge_cross_page_tables"] is False+ summary = json.loads(capsys.readouterr().out)+ assert summary["pages"] == 1+ assert summary["layout_summary"]["overlapped"] is True+++def test_pdf_quickstart_renders_and_exports_all_pages(quickstart, monkeypatch, capsys):+ fitz = pytest.importorskip("fitz")+ root, _, _ = quickstart+ with fitz.open() as doc:+ for _ in range(2):+ doc.new_page(width=72, height=72)+ doc.save(root / "input.pdf")+ _set_argv(monkeypatch, ["minicpmvocr", "parse", "input.pdf", "-o", "result.md", "--device", "cpu"])+ assert cli.main() == 0+ assert (root / "result.md").read_text() == "Recognized page.\n\n<!-- page-break -->\n\nRecognized page."+ assert json.loads(capsys.readouterr().out)["pages"] == 2+++def test_no_output_option_writes_only_markdown_to_stdout(quickstart, monkeypatch, capsys):+ _set_argv(monkeypatch, ["minicpmvocr", "parse", "input.png", "--device", "cpu"])+ assert cli.main() == 0+ assert capsys.readouterr().out == "Recognized page.\n"+++def test_legacy_flags_and_explicit_config_preserve_values(quickstart, monkeypatch, capsys):+ root, model, seen = quickstart+ config = yaml.safe_load((Path(cli.__file__).parent / "configs/minicpmvocr.yaml").read_text())+ config["layout"].update(model_dir=str(model), device="cpu")+ config["engine"]["max_model_len"] = 12288+ config["pipeline"].update(max_workers=2, overlap_layout=False)+ (root / "custom.yaml").write_text(yaml.safe_dump(config))+ _set_argv(monkeypatch, [+ "minicpmvocr", "parse", "--config", "custom.yaml", "--input", "input.png", "--output", "result.md",+ ])+ assert cli.main() == 0+ assert (root / "result.md").read_text() == "Recognized page."+ cfg = seen["configs"][0]+ assert cfg["engine"]["max_model_len"] == 12288+ assert cfg["pipeline"]["max_workers"] == 2+ assert cfg["pipeline"]["overlap_layout"] is False+ assert "overlapped" not in json.loads(capsys.readouterr().out)["layout_summary"]+++def test_explicit_overlap_option_selects_the_overlapped_runner(quickstart, monkeypatch, capsys):+ _, model, _ = quickstart+ _set_argv(monkeypatch, [+ "minicpmvocr", "parse", "--config", str(Path(cli.__file__).parent / "configs/minicpmvocr.yaml"),+ "--input", "input.png", "--output", "result.md", "--layout-model", str(model),+ "--device", "cpu", "--set", "pipeline.overlap_layout=true",+ ])+ assert cli.main() == 0+ assert json.loads(capsys.readouterr().out)["layout_summary"]["overlapped"] is True+++def test_options_and_environment_override_quickstart_defaults(quickstart, monkeypatch, capsys):+ root, model, seen = quickstart+ custom_model = root / "custom model"+ model.rename(custom_model)+ monkeypatch.setenv("OCR_LAYOUT_MODEL_DIR", str(custom_model))+ monkeypatch.setenv("OCR_LAYOUT_DEVICE", "cpu")+ monkeypatch.setenv("VLLM_URL", "http://localhost:19001")+ monkeypatch.setenv("OCR_SERVED_NAME", "custom-ocr")+ _set_argv(monkeypatch, [+ "minicpmvocr", "parse", "input.png", "-o", "result.md", "--workers", "3",+ "--set", "pipeline.max_workers=2", "--set", "pipeline.overlap_layout=false",+ ])+ assert cli.main() == 0+ cfg = seen["configs"][0]+ assert cfg["layout"]["device"] == "cpu"+ assert cfg["layout"]["model_dir"] == str(custom_model)+ assert cfg["engine"]["server_url"] == ""+ assert cfg["engine"]["server_urls"] == [SERVER_URL]+ assert cfg["engine"]["model_name"] == MODEL_NAME+ assert cfg["pipeline"]["max_workers"] == 2+ assert cfg["pipeline"]["overlap_layout"] is False+++def test_layout_model_option_is_relative_to_working_directory(quickstart, monkeypatch, capsys):+ root, model, seen = quickstart+ custom_model = root / "custom model"+ model.rename(custom_model)+ _set_argv(monkeypatch, [+ "minicpmvocr", "parse", "input.png", "-o", "result.md", "--layout-model", "custom model", "--device", "cpu",+ ])+ assert cli.main() == 0+ assert seen["configs"][0]["layout"]["model_dir"] == str(custom_model)++[email protected](("arguments", "message"), [+ (["parse"], "input PDF or image is required"),+ (["parse", "input.png", "--input", "input.png"], "Specify INPUT or --input"),+ (["parse", "."], "must be a PDF or image file"),+ (["parse", "input.png", "--workers", "0"], "must be greater than zero"),+])+def test_invalid_short_commands_report_cli_errors(quickstart, monkeypatch, capsys, arguments, message):+ _set_argv(monkeypatch, ["minicpmvocr", *arguments])+ with pytest.raises(SystemExit) as error:+ cli.main()+ assert error.value.code == 2+ stderr = capsys.readouterr().err+ assert message in stderr+ assert "Traceback" not in stderr+++def test_missing_explicit_layout_model_explains_how_to_configure_it(quickstart, monkeypatch, capsys):+ _, model, _ = quickstart+ (model / "inference.pdiparams").unlink()+ _set_argv(monkeypatch, ["minicpmvocr", "parse", "input.png", "--device", "cpu", "--layout-model", str(model)])+ with pytest.raises(SystemExit) as error:+ cli.main()+ assert error.value.code == 2+ stderr = capsys.readouterr().err+ assert "--layout-model DIR" in stderr+ assert "OCR_LAYOUT_MODEL_DIR" in stderr+ assert "Traceback" not in stderr+++def test_missing_default_model_is_installed_before_parsing(quickstart, monkeypatch, capsys):+ import hashlib+ import io+ import tarfile++ root, model, _ = quickstart+ files = {name: (model / name).read_bytes() for name in download.MODEL_FILES}+ for name in files:+ (model / name).unlink()+ payload = io.BytesIO()+ with tarfile.open(fileobj=payload, mode="w") as archive:+ for name, content in files.items():+ info = tarfile.TarInfo("PP-DocLayoutV3_infer/" + name)+ info.size = len(content)+ archive.addfile(info, io.BytesIO(content))+ body = payload.getvalue()+ monkeypatch.setattr(download, "LAYOUT_MODEL_SHA256", hashlib.sha256(body).hexdigest())++ class Response:+ headers = {"Content-Length": str(len(body))}++ def __enter__(self):+ return self++ def __exit__(self, *args):+ pass++ def raise_for_status(self):+ pass++ def iter_content(self, chunk_size):+ yield body++ monkeypatch.setattr(download.requests, "get", lambda *args, **kwargs: Response())+ _set_argv(monkeypatch, ["minicpmvocr", "parse", "input.png", "-o", "result.md", "--device", "cpu"])+ assert cli.main() == 0+ assert download.layout_model_ready(model)+ assert (root / "result.md").read_text() == "Recognized page."+ assert json.loads(capsys.readouterr().out)["pages"] == 1+++def test_remote_layout_provider_does_not_download_paddle_weights(quickstart, monkeypatch, capsys):+ _, model, _ = quickstart+ for name in download.MODEL_FILES:+ (model / name).unlink()+ _set_argv(monkeypatch, [+ "minicpmvocr", "parse", "input.png", "-o", "result.md", "--layout", "server",+ "--set", "layout.server_url=http://localhost:8110",+ ])+ assert cli.main() == 0+ assert not download.layout_model_ready(model)+ assert json.loads(capsys.readouterr().out)["pages"] == 1++[email protected]("filename", ["missing.pdf", "unsupported.docx"])+def test_invalid_input_does_not_trigger_model_download(quickstart, monkeypatch, capsys, filename):+ root, model, _ = quickstart+ for name in download.MODEL_FILES:+ (model / name).unlink()+ if filename.endswith(".docx"):+ (root / filename).touch()+ _set_argv(monkeypatch, ["minicpmvocr", "parse", filename])+ with pytest.raises(SystemExit) as error:+ cli.main()+ assert error.value.code == 2+ assert "Unexpected network request" not in capsys.readouterr().err++[email protected](("connection_args", "missing"), [+ ([], ["--server-url", "--model"]),+ (["--server-url", SERVER_URL], ["--model"]),+ (["--model", MODEL_NAME], ["--server-url"]),+])+def test_service_arguments_are_required_even_when_environment_is_set(+ quickstart, monkeypatch, capsys, connection_args, missing,+):+ monkeypatch.setenv("VLLM_URL", "http://localhost:19001")+ monkeypatch.setenv("OCR_SERVED_NAME", "env-ocr")+ monkeypatch.setattr(sys, "argv", ["minicpmvocr", "parse", "input.png", *connection_args])+ with pytest.raises(SystemExit) as error:+ cli.main()+ assert error.value.code == 2+ stderr = capsys.readouterr().err+ assert "required" in stderr+ for flag in missing:+ assert flag in stderr++[email protected](("url", "model", "missing"), [+ ("", MODEL_NAME, "--server-url"),+ (SERVER_URL, " ", "--model"),+])+def test_empty_service_arguments_cannot_use_environment_fallback(+ quickstart, monkeypatch, capsys, url, model, missing,+):+ monkeypatch.setenv("VLLM_URL", SERVER_URL)+ monkeypatch.setenv("OCR_SERVED_NAME", MODEL_NAME)+ monkeypatch.setattr(sys, "argv", [+ "minicpmvocr", "parse", "input.png", "--server-url", url, "--model", model,+ ])+ with pytest.raises(SystemExit) as error:+ cli.main()+ assert error.value.code == 2+ assert missing in capsys.readouterr().err++[email protected](("engine", "missing"), [+ ({"type": "vllm", "model_name": MODEL_NAME}, "--server-url"),+ ({"type": "vllm", "server_url": SERVER_URL}, "--model"),+])+def test_backend_does_not_invent_service_connection(engine, missing):+ from minicpmvocr import create_backend++ with pytest.raises(ValueError, match=missing):+ create_backend({"engine": engine})+++def test_layout_stage_can_run_without_an_inference_connection(quickstart):+ from minicpmvocr import create_backend, load_config++ root, model, seen = quickstart+ config = Path(cli.__file__).parent / "configs/minicpmvocr.yaml"+ cfg = load_config(str(config), {+ "input": {"file_path": str(root / "input.png")},+ "layout": {"model_dir": str(model)},+ })+ assert cfg["engine"]["model_name"] == ""+ assert cfg["engine"]["server_url"] == ""+ staged.parse_layout_run(cfg)+ assert seen["layouts"]+ assert seen["configs"] == []+ with pytest.raises(ValueError, match="--model"):+ create_backend(cfg)diff --git a/sdk/tests/test_pdf_rendering.py b/sdk/tests/test_pdf_rendering.pynew file mode 100644index 0000000..e014032--- /dev/null+++ b/sdk/tests/test_pdf_rendering.py@@ -0,0 +1,92 @@+import numpy as np+import pytest+from PIL import Image++from minicpmvocr.pipeline._inputs import _iter_source_pages, _open_page_image+from minicpmvocr.constants import PDF_RENDER_PAGES_PER_JOB++fitz = pytest.importorskip("fitz", reason="PDF support needs PyMuPDF")++PAGES = 3+++def two_page_pdf(tmp_path):+ doc = fitz.open()+ for i in range(PAGES):+ page = doc.new_page(width=300, height=400)+ page.draw_rect(fitz.Rect(20, 20 + i * 10, 280, 120), color=(0, 0, 0), fill=(0.1, 0.2, 0.3))+ path = tmp_path / "sample.pdf"+ doc.save(path)+ doc.close()+ return path+++def many_page_pdf(tmp_path):++ doc = fitz.open()+ for i in range(PDF_RENDER_PAGES_PER_JOB + 4):+ page = doc.new_page(width=300, height=400)+ page.draw_rect(fitz.Rect(20, 20 + i * 5, 280, 120), color=(0, 0, 0), fill=(0.1, 0.2, 0.3))+ path = tmp_path / "many.pdf"+ doc.save(path)+ doc.close()+ return path+++def _cfg(pdf_path, **pipeline_overrides):+ return {+ "input": {"file_path": str(pdf_path), "manifest": "", "image_dir": "", "files_dir": "", "limit": 0},+ "run": {"mode": "full"},+ "pipeline": pipeline_overrides,+ }+++def test_pdf_pages_render_to_one_buffer_each(tmp_path, two_page_pdf):+ entries = _iter_source_pages(_cfg(two_page_pdf), tmp_path)++ assert len(entries) == PAGES+ for idx, entry in enumerate(entries):+ assert entry["source_type"] == "pdf"+ assert entry["page_index"] == idx+ width, height = entry["image_size"]+ assert len(entry["image_bytes"]) == width * height * 3+++def test_rendered_buffer_matches_the_rasteriser_output(tmp_path, two_page_pdf):++ entries = _iter_source_pages(_cfg(two_page_pdf), tmp_path)++ doc = fitz.open(two_page_pdf)+ try:+ for entry in entries:+ pix = doc.load_page(entry["page_index"]).get_pixmap(matrix=fitz.Matrix(2.0, 2.0), alpha=False)+ expected = np.frombuffer(pix.samples, dtype=np.uint8).reshape(pix.height, pix.width, 3)+ rendered = np.asarray(_open_page_image(entry))+ assert np.array_equal(rendered, expected)+ finally:+ doc.close()+++def test_no_page_image_directory_is_written(tmp_path, two_page_pdf):++ intermediate = tmp_path / "intermediate"+ entries = _iter_source_pages(_cfg(two_page_pdf), intermediate)++ assert all(entry["image_path"] == "" for entry in entries)+ assert not (intermediate / "page_images").exists()++[email protected]("render_workers", [2, 4])+def test_render_pool_agrees_with_the_serial_fallback(tmp_path, many_page_pdf, render_workers):++ serial_cfg = _cfg(many_page_pdf, render_workers=1)+ serial = _iter_source_pages(serial_cfg, tmp_path)+ pooled_cfg = _cfg(many_page_pdf, render_workers=render_workers)+ pooled = _iter_source_pages(pooled_cfg, tmp_path)++ assert serial_cfg["_meta"]["render_workers"] == 1+ assert pooled_cfg["_meta"]["render_workers"] == render_workers+ assert [e["image_size"] for e in serial] == [e["image_size"] for e in pooled]+ assert [e["image_bytes"] for e in serial] == [e["image_bytes"] for e in pooled]diff --git a/sdk/tests/test_pipeline_robustness.py b/sdk/tests/test_pipeline_robustness.pynew file mode 100644index 0000000..f715254--- /dev/null+++ b/sdk/tests/test_pipeline_robustness.py@@ -0,0 +1,100 @@+import threading+from copy import deepcopy++import numpy as np+import pytest+from PIL import Image++from minicpmvocr import pipeline+from minicpmvocr.pipeline import _blocks, overlapped, staged+from minicpmvocr.config import DEFAULT_CONFIG++from tests.test_crop_priority import ( # noqa: E402+ _MultiLabelDetector,+ _OrderRecordingEngine,+)+from tests.test_infer_scheduling import ( # noqa: E402+ BLOCKS_PER_PAGE,+ PAGES,+ RecordingEngine,+ _build_run,+)+++def _config(tmp_path, src, **pipeline_overrides):+ run_dir = tmp_path / "run"+ cfg = deepcopy(DEFAULT_CONFIG)+ cfg["run"].update({"run_tag": "t", "run_root": str(tmp_path), "mode": "full"})+ cfg["input"].update({"image_dir": str(src)})+ cfg["layout"].update({"provider": "fake", "device": "cpu"})+ cfg["pipeline"].update({"max_workers": 1, "layout_workers": 1})+ cfg["pipeline"].update(pipeline_overrides)+ cfg["logging"]["progress_log_every"] = 1000+ cfg["_meta"] = {+ "run_dir": str(run_dir),+ "runtime_intermediate_dir": str(run_dir / "runtime" / "intermediate"),+ }+ return cfg+++def _pages(tmp_path, count=2):+ src = tmp_path / "src"+ src.mkdir(parents=True, exist_ok=True)+ for i in range(count):+ Image.fromarray(np.full((40, 60, 3), 200, dtype=np.uint8)).save(src / f"p{i}.png")+ return src+++def test_the_non_overlapped_path_uses_the_shared_dispatch_key(tmp_path, monkeypatch):++ run_dir = _build_run(tmp_path)+ engine = RecordingEngine()+ monkeypatch.setattr(staged, "create_backend", lambda c: engine)++ seen = []+ real = _blocks._block_priority++ def _spy(prompt_map, block):+ seen.append(block)+ return real(prompt_map, block)++ monkeypatch.setattr(staged, "_block_priority", _spy)++ cfg = {+ "run": {"run_tag": "t", "run_root": str(tmp_path), "mode": "full", "seed": 42},+ "prompt": {"prompt_map": "", "override_mode": "legacy"},+ "pipeline": {"page_workers": 1, "max_workers": 8},+ "logging": {"progress_log_every": 1000},+ "_meta": {"run_dir": str(run_dir)},+ }+ summary = pipeline.infer_run(cfg)++ assert summary["counts"]["ok"] == PAGES+ assert seen, "the non-overlapped path did not use the shared dispatch key"++ assert len(seen) == PAGES * BLOCKS_PER_PAGE+++def test_a_failure_while_queueing_a_page_does_not_hang(tmp_path, monkeypatch):++ src = _pages(tmp_path)+ engine = _OrderRecordingEngine()+ monkeypatch.setattr(overlapped, "create_layout_detector", lambda c: _MultiLabelDetector(c))+ monkeypatch.setattr(overlapped, "create_backend", lambda c: engine)++ def _boom(prompt_map, block):+ raise ValueError("bad max_new_tokens")++ monkeypatch.setattr(overlapped, "_block_priority", _boom)++ cfg = _config(tmp_path, src, overlap_layout=True)+ box = {}++ def _run():+ box["summary"] = pipeline.pipelined_run(cfg)++ worker = threading.Thread(target=_run, daemon=True)+ worker.start()+ worker.join(timeout=60)+ assert not worker.is_alive(), "pipelined_run did not return; open_pages stranded"+ assert box["summary"]["counts"]["failed"] == 2diff --git a/sdk/tests/test_public_api.py b/sdk/tests/test_public_api.pynew file mode 100644index 0000000..52cf65d--- /dev/null+++ b/sdk/tests/test_public_api.py@@ -0,0 +1,91 @@+import ast+import importlib+from pathlib import Path++import pytest++import minicpmvocr++REPO_ROOT = Path(minicpmvocr.__file__).parent.parent+WEBUI_DIR = REPO_ROOT / "webui"+++OPTIONAL_DEPS = ("cv2", "paddle", "torch", "fitz", "bs4", "transformers", "shapely")+++def test_version_is_single_sourced():++ from minicpmvocr._version import __version__ as version_module_value++ assert minicpmvocr.__version__ == version_module_value++ pyproject = (REPO_ROOT / "pyproject.toml").read_text(encoding="utf-8")+ assert 'dynamic = ["version"]' in pyproject+ assert 'attr = "minicpmvocr._version.__version__"' in pyproject++ project_table = pyproject.split("[project]", 1)[1].split("\n[", 1)[0]+ assert "\nversion =" not in project_table++[email protected]("name", sorted(n for n in minicpmvocr.__all__ if n != "__version__"))+def test_every_exported_name_resolves(name):+ try:+ assert getattr(minicpmvocr, name) is not None+ except ImportError as exc:+ if not any(dep in str(exc) for dep in OPTIONAL_DEPS):+ raise+ pytest.skip(f"optional extra missing: {exc}")+++def test_exports_map_matches_all():+ assert set(minicpmvocr.__all__) == {"__version__", *minicpmvocr._EXPORTS}+++def test_unknown_attribute_raises_attribute_error():++ with pytest.raises(AttributeError):+ minicpmvocr.no_such_name+++def test_import_does_not_pull_heavy_optional_deps():++ import subprocess+ import sys++ code = (+ "import sys, minicpmvocr; "+ "print(','.join(m for m in ('torch','paddle','cv2','fitz') if m in sys.modules))"+ )+ out = subprocess.run([sys.executable, "-c", code], capture_output=True, text=True,+ cwd=str(REPO_ROOT))+ assert out.returncode == 0, out.stderr+ assert out.stdout.strip() == "", f"eagerly imported: {out.stdout.strip()}"+++def _minicpmvocr_imports(path: Path):++ tree = ast.parse(path.read_text(encoding="utf-8"))+ for node in ast.walk(tree):+ if isinstance(node, ast.ImportFrom) and (node.module or "").startswith("minicpmvocr"):+ for alias in node.names:+ yield node.module, alias.name+ elif isinstance(node, ast.Import):+ for alias in node.names:+ if alias.name.startswith("minicpmvocr"):+ yield alias.name, ""+++ "path",+ sorted(WEBUI_DIR.glob("*.py")) if WEBUI_DIR.is_dir() else [],+ ids=lambda p: p.name,+)+def test_webui_uses_only_public_symbols(path):++ offenders = [+ f"{module}.{name}"+ for module, name in _minicpmvocr_imports(path)+ if name.startswith("_")+ or any(part.startswith("_") for part in module.split("."))+ ]+ assert offenders == []diff --git a/sdk/tests/test_reference_config.py b/sdk/tests/test_reference_config.pynew file mode 100644index 0000000..1ab7167--- /dev/null+++ b/sdk/tests/test_reference_config.py@@ -0,0 +1,45 @@+from pathlib import Path++import pytest+import yaml++import minicpmvocr+from minicpmvocr.config import DEFAULT_CONFIG++REFERENCE = Path(minicpmvocr.__file__).parent / "configs" / "minicpmvocr.yaml"++[email protected](scope="module")+def reference():+++ return yaml.safe_load(REFERENCE.read_text(encoding="utf-8"))+++def test_reference_config_exists():+ assert REFERENCE.is_file()+++def test_every_section_is_present(reference):+ assert set(reference) == set(DEFAULT_CONFIG)++[email protected]("section", sorted(DEFAULT_CONFIG))+def test_every_key_is_present(reference, section):+ documented = set(reference[section] or {})+ expected = set(DEFAULT_CONFIG[section])+++ expected.discard("skip_vlm_labels")+ missing = expected - documented+ unknown = documented - set(DEFAULT_CONFIG[section])+ assert missing == set(), f"{section}: missing from reference config"+ assert unknown == set(), f"{section}: not a real config key"+++def test_reference_config_is_shipped_in_the_wheel():++ pyproject = (Path(minicpmvocr.__file__).parent.parent / "pyproject.toml").read_text(+ encoding="utf-8"+ )+ assert 'minicpmvocr = ["py.typed", "configs/*.yaml"]' in pyprojectdiff --git a/sdk/tests/test_rm_batching.py b/sdk/tests/test_rm_batching.pynew file mode 100644index 0000000..b932b70--- /dev/null+++ b/sdk/tests/test_rm_batching.py@@ -0,0 +1,190 @@+from __future__ import annotations++import sys+import threading+import time+from pathlib import Path+from typing import Dict, List++import pytest++SDK_DIR = Path(__file__).resolve().parent.parent+sys.path.insert(0, str(SDK_DIR))++from minicpmvocr.pipeline.rm_client import RMBatcher, build_rm_caller # noqa: E402+++class FakeImage:+ def save(self, buf, format="PNG"): # noqa: A002+ buf.write(b"png")+++class FakeClient:+++ enabled = True+ base_url = "http://rm"+ fallback_to_greedy = True++ def __init__(self, scores: Dict[str, float], *, fail: bool = False) -> None:+ self.scores = scores+ self.fail = fail+ self.calls: List[List[Dict]] = []+ self.lock = threading.Lock()++ def build_payload(self, image, candidates, label, case_id=""):+ return {"case_id": case_id, "candidates": list(candidates), "category": "text"}++ def score_best_batch(self, payloads):+ with self.lock:+ self.calls.append(payloads)+ if self.fail:+ raise RuntimeError("rm down")+ results = []+ for payload in payloads:+ scores = [self.scores[text] for text in payload["candidates"]]+ best = max(range(len(scores)), key=lambda i: scores[i])+ results.append({"best_index": best, "scores": scores,+ "verdicts": ["scored"] * len(scores)})+ return {"results": results, "batch_size": sum(len(p["candidates"]) for p in payloads),+ "stage_sec": {"render_sec": 1.0}}+++SCORES = {"a0": 0.1, "a1": 0.7, "a2": 0.2, "b0": 0.8, "b1": 0.4, "c0": 0.3, "c1": 0.9}+BLOCKS = [["a0", "a1", "a2"], ["b0", "b1"], ["c0", "c1"]]+++def run_blocks(batcher: RMBatcher, blocks: List[List[str]]) -> List[Dict]:++ out: List[Dict] = [None] * len(blocks)++ def work(i: int) -> None:+ try:+ out[i] = batcher.score_best(FakeImage(), blocks[i], "text", case_id="blk%d" % i)+ except Exception as err:+ out[i] = {"raised": err}++ threads = [threading.Thread(target=work, args=(i,)) for i in range(len(blocks))]+ for t in threads:+ t.start()+ for t in threads:+ t.join(timeout=10)+ assert all(not t.is_alive() for t in threads), "a caller never came back"+ return out+++def test_scores_land_on_the_right_block_and_candidate():+ client = FakeClient(SCORES)+ batcher = RMBatcher(client, max_items=3, max_wait_sec=5.0)++ results = run_blocks(batcher, BLOCKS)++ assert [r["scores"] for r in results] == [[0.1, 0.7, 0.2], [0.8, 0.4], [0.3, 0.9]]+ assert [r["best_text"] for r in results] == ["a1", "b0", "c1"]+++def test_three_blocks_go_out_as_one_call():++ client = FakeClient(SCORES)+ batcher = RMBatcher(client, max_items=3, max_wait_sec=5.0)++ run_blocks(batcher, BLOCKS)++ assert len(client.calls) == 1+ assert [len(p["candidates"]) for p in client.calls[0]] == [3, 2, 2]+++def test_a_lone_block_is_sent_after_the_wait_instead_of_waiting_forever():++ client = FakeClient(SCORES)+ batcher = RMBatcher(client, max_items=8, max_wait_sec=0.05)++ t0 = time.time()+ result = batcher.score_best(FakeImage(), ["a0", "a1"], "text", case_id="lone")++ assert result["best_text"] == "a1"+ assert len(client.calls) == 1+ assert time.time() - t0 < 5.0+++def test_flush_sends_what_is_still_queued():+ client = FakeClient(SCORES)+ batcher = RMBatcher(client, max_items=8, max_wait_sec=30.0)+ done = threading.Event()++ def work():+ batcher.score_best(FakeImage(), ["a0", "a1"], "text", case_id="tail")+ done.set()++ threading.Thread(target=work, daemon=True).start()+ time.sleep(0.05)+ batcher.flush()++ assert done.wait(5.0), "flush 没把尾批发出去"+ assert len(client.calls) == 1+++def test_batch_failure_reports_a_reason_for_every_member():+ client = FakeClient(SCORES, fail=True)+ batcher = RMBatcher(client, max_items=3, max_wait_sec=5.0)++ results = run_blocks(batcher, BLOCKS)++ for result, block in zip(results, BLOCKS):+ assert "rm down" in result["error"]+ assert result["best_index"] == 0+ assert result["best_text"] == block[0]+++def test_a_failing_batch_never_leaves_a_caller_parked():++ client = FakeClient(SCORES, fail=True)+ client.fallback_to_greedy = False+ batcher = RMBatcher(client, max_items=3, max_wait_sec=5.0)++ results = run_blocks(batcher, BLOCKS)+++ assert any(r.get("raised") for r in results)+ assert all(r.get("raised") or r.get("error") for r in results)+++def test_short_circuits_without_calling_the_rm():+ client = FakeClient(SCORES)+ batcher = RMBatcher(client, max_items=2, max_wait_sec=5.0)++ single = batcher.score_best(FakeImage(), ["only"], "text")++ assert single == {"best_index": 0, "best_text": "only", "scores": [], "verdicts": []}+ assert client.calls == []+++def test_wait_and_call_are_reported_separately():++ client = FakeClient(SCORES)+ batcher = RMBatcher(client, max_items=3, max_wait_sec=5.0)++ results = run_blocks(batcher, BLOCKS)++ for result in results:+ assert result["wait_sec"] >= 0.0+ assert result["call_sec"] >= 0.0+ assert "batch_items" in result and result["batch_items"] == 3+++def test_build_rm_caller_returns_the_client_when_batching_is_off():+ client = FakeClient(SCORES)++ caller, batcher = build_rm_caller({}, client)++ assert caller is client and batcher is None+++def test_build_rm_caller_returns_a_batcher_when_configured():+ client = FakeClient(SCORES)++ caller, batcher = build_rm_caller({"rm_batch": {"max_items": 4, "max_wait_ms": 20}}, client)++ assert caller is batcher and isinstance(batcher, RMBatcher)+ assert batcher.max_items == 4+ assert batcher.max_wait_sec == pytest.approx(0.02)diff --git a/sdk/tests/test_rm_input_form.py b/sdk/tests/test_rm_input_form.pynew file mode 100644index 0000000..583c293--- /dev/null+++ b/sdk/tests/test_rm_input_form.py@@ -0,0 +1,110 @@+from __future__ import annotations++import sys+from pathlib import Path+from typing import Dict, List++import pytest++SDK_DIR = Path(__file__).resolve().parent.parent+sys.path.insert(0, str(SDK_DIR))++from minicpmvocr.pipeline.rm_client import RMClient # noqa: E402+++class FakeImage:+ def save(self, buf, format="PNG"): # noqa: A002+ buf.write(b"png")+++class FakeResponse:+ def __init__(self, body: Dict) -> None:+ self._body = body++ def raise_for_status(self) -> None:+ pass++ def json(self) -> Dict:+ return self._body+++class FakeSession:+++ trust_env = True++ def __init__(self) -> None:+ self.posts: List[Dict] = []++ def post(self, url, json=None, timeout=None): # noqa: A002+ self.posts.append({"url": url, "json": json})+ n = len(json.get("candidates", [])) if "candidates" in json else 0+ if "score_best_batch" in url:+ return FakeResponse({"results": [+ {"best_index": 0, "scores": [], "verdicts": []}+ for _ in json["items"]]})+ return FakeResponse({"best_index": 0, "scores": [0.1] * n, "verdicts": ["scored"] * n})++ def close(self) -> None:+ pass+++def cfg(**over) -> Dict:+ base = {"enabled": True, "rm_url": "http://rm", "timeout_sec": 30,+ "fallback_to_greedy": True, "rm_input_form": "binary"}+ base.update(over)+ return base+++def make_client(**over) -> RMClient:+ client = RMClient(cfg(**over))+ client.http = FakeSession()+ return client+++def test_missing_input_form_fails_at_construction():+ with pytest.raises(ValueError, match="rm_input_form"):+ RMClient(cfg(rm_input_form=""))+++def test_unknown_input_form_fails_at_construction():+ with pytest.raises(ValueError, match="rm_input_form"):+ RMClient(cfg(rm_input_form="quaternary"))+++def test_tts_off_does_not_require_it():++ RMClient(cfg(enabled=False, rm_input_form=""))++[email protected]("form", ["binary", "ternary"])+def test_block_payload_carries_the_form(form):+ client = make_client(rm_input_form=form)++ client.score_best(FakeImage(), ["a", "b"], "text", case_id="blk")++ assert client.http.posts[0]["json"]["input_form"] == form+++def test_batch_body_carries_the_form_at_batch_level():++ client = make_client(rm_input_form="ternary")+ payloads = [client.build_payload(FakeImage(), ["a"], "text", "b0"),+ client.build_payload(FakeImage(), ["b"], "table", "b1")]++ client.score_best_batch(payloads)++ body = client.http.posts[0]["json"]+ assert body["input_form"] == "ternary"++ assert [item["input_form"] for item in body["items"]] == ["ternary", "ternary"]+++def test_single_candidate_shortcut_does_not_hit_the_server():++ client = make_client()++ out = client.score_best(FakeImage(), ["only"], "text", case_id="blk")++ assert out == {"best_index": 0, "best_text": "only", "scores": [], "verdicts": []}+ assert client.http.posts == []diff --git a/sdk/tests/test_rm_table_html.py b/sdk/tests/test_rm_table_html.pynew file mode 100644index 0000000..44be3a8--- /dev/null+++ b/sdk/tests/test_rm_table_html.py@@ -0,0 +1,167 @@+from __future__ import annotations++import sys+from pathlib import Path+from typing import Dict, List++import pytest++SDK_DIR = Path(__file__).resolve().parent.parent+sys.path.insert(0, str(SDK_DIR))++from minicpmvocr.pipeline.rm_client import ( # noqa: E402+ RMBatcher,+ RMClient,+ build_rm_caller,+ text_for_scoring,+)++OTSL = "<otsl><fcel>甲<fcel>乙<nl><fcel>1<ecel><nl></otsl>"+OTSL2 = "<otsl><fcel>甲<fcel>丙<nl><fcel>2<ecel><nl></otsl>"+++class FakeImage:+ def save(self, buf, format="PNG"): # noqa: A002+ buf.write(b"png")+++class FakeResponse:+ def __init__(self, body: Dict) -> None:+ self._body = body++ def raise_for_status(self) -> None:+ pass++ def json(self) -> Dict:+ return self._body+++class FakeSession:+++ trust_env = True++ def __init__(self, best_index: int = 0) -> None:+ self.posts: List[Dict] = []+ self.best_index = best_index++ def post(self, url, json=None, timeout=None): # noqa: A002+ self.posts.append({"url": url, "json": json})+ if "score_best_batch" in url:+ return FakeResponse({"results": [+ {"best_index": self.best_index,+ "scores": [0.9] * len(item["candidates"]),+ "verdicts": ["scored"] * len(item["candidates"])}+ for item in json["items"]]})+ n = len(json.get("candidates", []))+ return FakeResponse({"best_index": self.best_index,+ "scores": [0.9] * n, "verdicts": ["scored"] * n})++ def close(self) -> None:+ pass+++def cfg(**over) -> Dict:+ base = {"enabled": True, "rm_url": "http://rm", "timeout_sec": 30,+ "fallback_to_greedy": True, "rm_input_form": "binary"}+ base.update(over)+ return base+++def make_client(best_index: int = 0, **over) -> RMClient:+ client = RMClient(cfg(**over))+ client.http = FakeSession(best_index=best_index)+ return client+++def sent_candidates(client: RMClient, call: int = 0) -> List[str]:+ body = client.http.posts[call]["json"]+ if "items" in body:+ return [c for item in body["items"] for c in item["candidates"]]+ return body["candidates"]+++def test_table_candidate_reaches_rm_as_html():+ client = make_client()+ client.score_best(FakeImage(), [OTSL], "table", force=True)+ sent = sent_candidates(client)[0]+ assert "<table>" in sent and "<td>甲</td>" in sent+ assert "<fcel>" not in sent and "<otsl>" not in sent+++def test_non_table_labels_are_untouched():+ client = make_client()+ raw = "第一段 \\(x=1\\) 文本"+ client.score_best(FakeImage(), [raw], "text", force=True)+++ assert sent_candidates(client) == [raw]+++def test_returned_text_stays_engine_raw():++ client = make_client()+ out = client.score_best(FakeImage(), [OTSL], "table", force=True)+ assert out["best_text"] == OTSL+ assert out["verdicts"] == ["scored"]+++def test_best_index_still_maps_to_original_candidate():++ client = make_client(best_index=1)+ out = client.score_best(FakeImage(), [OTSL, OTSL2], "table")+ assert out["best_index"] == 1+ assert out["best_text"] == OTSL2+ assert len(sent_candidates(client)) == 2+++def test_batched_path_also_converts():+ client = make_client()+ batcher = RMBatcher(client, max_items=1, max_wait_sec=0.01)+ out = batcher.score_best(FakeImage(), [OTSL], "table", force=True)+ sent = sent_candidates(client)[0]+ assert "<table>" in sent, "合批路径漏转 ⇒ 跑批时整轮都在拿 OTSL 打分"+ assert out["best_text"] == OTSL+++def test_build_rm_caller_batched_is_the_same_object_path():++ client = make_client()+ caller, batcher = build_rm_caller(cfg(rm_batch={"max_items": 4}), client)+ assert isinstance(caller, RMBatcher) and batcher is caller+ caller.score_best(FakeImage(), [OTSL], "table", force=True)+ caller.flush()+ assert "<table>" in sent_candidates(client)[0]+++def test_already_html_is_idempotent_and_never_empty():++ html = "<table><tr><td>甲</td></tr></table>"+ assert text_for_scoring(html, "table") == html+ client = make_client()+ client.score_best(FakeImage(), [html], "table", force=True)+ assert sent_candidates(client)[0] == html++[email protected]("junk", ["", " ", "不是表格的一段话"])+def test_unparsable_table_text_falls_back_not_empty(junk):+ out = text_for_scoring(junk, "table")+ assert out == junk.strip() or out == junk+ assert out is not None+++def test_transform_count_is_recorded():++ client = make_client()+ assert client.table_html_count == 0+ client.score_best(FakeImage(), [OTSL, OTSL2], "table")+ assert client.table_html_count == 2+ client.score_best(FakeImage(), ["一段文本"], "text", force=True)+ assert client.table_html_count == 2+++def test_label_alias_goes_through_category_mapping():++ client = make_client()+ client.score_best(FakeImage(), [OTSL], "TABLE", force=True)+ assert "<table>" in sent_candidates(client)[0]diff --git a/sdk/tests/test_seal_api.py b/sdk/tests/test_seal_api.pynew file mode 100644index 0000000..aefdb33--- /dev/null+++ b/sdk/tests/test_seal_api.py@@ -0,0 +1,136 @@+import base64+import io+import sys+from pathlib import Path++import pytest+from PIL import Image++ROOT = Path(__file__).resolve().parents[1]+sys.path.insert(0, str(ROOT))+sys.path.insert(0, str(ROOT / "webdemo"))++import server # noqa: E402+from minicpmvocr.prompts import DEFAULT_PROMPT_MAP, get_element_cfg # noqa: E402++pytest.importorskip("fastapi")+from fastapi.testclient import TestClient # noqa: E402+++def _png(width=12, height=8, color=(180, 20, 20)) -> str:+ buf = io.BytesIO()+ Image.new("RGB", (width, height), color).save(buf, format="PNG")+ return "data:image/png;base64," + base64.b64encode(buf.getvalue()).decode()+++def client(monkeypatch):+ calls = {}++ class FakeOcr:+ def recognize(self, image, prompt, max_new_tokens=4096, slice_nums=None, **kwargs):+ calls["image_size"] = image.size+ calls["prompt"] = prompt+ calls["max_new_tokens"] = max_new_tokens+ calls["slice_nums"] = slice_nums+ calls["kwargs"] = kwargs+ return {"text": calls.get("reply", " 合同专用章 \n")}++ def health(self):+ return {"reachable": True, "model_match": True, "served": [], "error": None}++ def refuse_layout(*_args, **_kwargs):+ raise AssertionError("印章识别不应借用版面")++ with TestClient(server.app) as test_client:+ monkeypatch.setattr(server, "OCR_SVC", FakeOcr())+ monkeypatch.setattr(server.RUNNER, "acquire", refuse_layout)+ test_client.calls = calls # type: ignore[attr-defined]+ yield test_client+++def test_seal_sends_trained_prompt_and_skips_layout(client):+ elem = get_element_cfg(DEFAULT_PROMPT_MAP, "seal")+ before = {path.name for path in server.JOBS_DIR.iterdir()} if server.JOBS_DIR.exists() else set()+ response = client.post("/api/image-parse", json={"model": "minicpm-ocr-seal", "image": _png(), "upright": True, "page_index": 3})+ assert response.status_code == 200, response.text+ body = response.json()+ assert client.calls["prompt"] == elem["prompt"] == "Seal Recognition:"+ assert client.calls["max_new_tokens"] == elem["max_new_tokens"] == 256+ assert client.calls["slice_nums"] == elem["slice_nums"]+ assert client.calls["image_size"] == (12, 8)+ assert body["choices"][0]["message"]["content"] == "合同专用章"+ block = body["minicpm_ocr"]["blocks"][0]+ assert body["minicpm_ocr"]["mode"] == "seal"+ assert body["minicpm_ocr"]["image_width"] == 12+ assert body["minicpm_ocr"]["image_height"] == 8+ assert block == {+ "order": 0,+ "label": "seal",+ "bbox": [0, 0, 12, 8],+ "regions": [[0, 0, 12, 8]],+ "content": "合同专用章",+ "status": "ok",+ }+ assert "rotation" not in body["minicpm_ocr"]+ assert "score" not in block+ assert "map_ocr_source" not in body+ after = {path.name for path in server.JOBS_DIR.iterdir()} if server.JOBS_DIR.exists() else set()+ assert after == before+++def test_empty_seal_text_stays_empty(client):+ client.calls["reply"] = " \n"+ response = client.post("/api/image-parse", json={"model": "minicpm-ocr-seal", "image": _png()})+ assert response.status_code == 200+ body = response.json()+ assert body["choices"][0]["message"]["content"] == ""+ assert body["minicpm_ocr"]["blocks"][0]["content"] == ""+ assert body["minicpm_ocr"]["blocks"][0]["status"] == "ok"+++def test_seal_requires_image_and_reports_recognition_failure(client, monkeypatch):+ missing = client.post("/api/image-parse", json={"model": "minicpm-ocr-seal"})+ assert missing.status_code == 400++ def explode(*_args, **_kwargs):+ raise RuntimeError("vllm down")++ monkeypatch.setattr(server.OCR_SVC, "recognize", explode)+ failed = client.post("/api/image-parse", json={"model": "minicpm-ocr-seal", "image": _png()})+ assert failed.status_code == 500+ assert "识别失败" in failed.json()["error"]+++def test_existing_models_keep_their_handlers(client, monkeypatch):+ seen = {}++ def full(body, model):+ seen["full"] = model+ from fastapi.responses import JSONResponse+ return JSONResponse({"model": model, "route": "full"})++ def block(body):+ seen["block"] = True+ from fastapi.responses import JSONResponse+ return JSONResponse({"route": "block"})++ monkeypatch.setattr(server, "_handle_full_page", full)+ monkeypatch.setattr(server, "_handle_rerun_block", block)+ for model in ("minicpm-ocr", "minicpm-ocr-stp", "minicpm-ocr-tts"):+ response = client.post("/api/image-parse", json={"model": model, "image": _png()})+ assert response.status_code == 200+ assert response.json()["route"] == "full"+ assert seen["full"] == model+ block_response = client.post("/api/image-parse", json={"model": "minicpm-ocr-tts-block"})+ assert block_response.status_code == 200+ assert block_response.json()["route"] == "block"+ unknown = client.post("/api/image-parse", json={"model": "minicpm-ocr-unknown"})+ assert unknown.status_code == 400+++def test_capabilities_advertise_seal_without_changing_modes(client):+ body = client.get("/api/image-parse/capabilities").json()+ assert body["seal"] is True+ assert body["modes"][0] == "standard"+ assert "seal" not in body["modes"]diff --git a/sdk/tests/test_skip_vlm_labels.py b/sdk/tests/test_skip_vlm_labels.pynew file mode 100644index 0000000..3caa8c7--- /dev/null+++ b/sdk/tests/test_skip_vlm_labels.py@@ -0,0 +1,166 @@+import numpy as np+import pytest+from PIL import Image++from minicpmvocr import pipeline, prompts+from minicpmvocr.pipeline import _text+from minicpmvocr.config import DEFAULT_CONFIG+from minicpmvocr.layouts import (+ DEFAULT_SKIP_VLM_LABELS,+ IMAGE_LABELS,+ resolve_skip_vlm_labels,+)+from minicpmvocr.layouts.base import BaseLayoutDetector+++class _Detector(BaseLayoutDetector):+++ name = "test"++ def _start(self) -> None:+ return None++ def detect(self, images):+ return [[] for _ in images]++ def model_ref(self) -> str:+ return "test"+++def _detections():+ return [+ {"label": label, "class_id": i, "score": 0.9, "bbox": [0, 0, 10, 10], "polygon": []}+ for i, label in enumerate(["text", "image", "chart", "seal", "table"])+ ]+++def _crop_flags(layout_cfg):+ detector = _Detector(layout_cfg)+ image = Image.fromarray(np.zeros((20, 40, 3), dtype=np.uint8))+ blocks = detector.crop(image, _detections())+ return {b["label"]: b["skip_vlm"] for b in blocks}+++def _prompt_map(layout_cfg):+ return prompts.load_prompt_map(+ {"prompt": {"prompt_map": "", "override_mode": "legacy"}, "layout": layout_cfg}+ )+++def test_default_skips_match_between_both_gates():+ layout_cfg = DEFAULT_CONFIG["layout"]+ flags = _crop_flags(layout_cfg)+ prompt_map = _prompt_map(layout_cfg)+ skipped = resolve_skip_vlm_labels(layout_cfg)+ for label in DEFAULT_SKIP_VLM_LABELS:+ if label in flags:+ assert flags[label] is (label in skipped), label+ assert (prompts.get_element_cfg(prompt_map, label) is None) is (label in skipped), label+ assert flags["text"] is False+ assert prompts.get_element_cfg(prompt_map, "text") is not None+++def test_removing_a_label_enables_it_on_both_gates():++ layout_cfg = dict(DEFAULT_CONFIG["layout"])+ layout_cfg["skip_vlm_labels"] = [x for x in DEFAULT_SKIP_VLM_LABELS if x != "seal"]++ flags = _crop_flags(layout_cfg)+ assert flags["seal"] is False+ assert flags["image"] is True++ elem = prompts.get_element_cfg(_prompt_map(layout_cfg), "seal")+ assert elem is not None++ assert elem["prompt"] == "Seal Recognition:"+++def test_empty_list_sends_everything():+ layout_cfg = dict(DEFAULT_CONFIG["layout"])+ layout_cfg["skip_vlm_labels"] = []+ assert not any(_crop_flags(layout_cfg).values())+++def test_config_validation_rejects_a_bare_string(tmp_path):++ from minicpmvocr.config import _validate_config++ page = tmp_path / "x.png"+ Image.fromarray(np.zeros((8, 8, 3), dtype=np.uint8)).save(page)+ cfg = {+ "engine": dict(DEFAULT_CONFIG["engine"], type="vllm", model_name="test-ocr", server_urls=["http://x:1"]),+ "input": {"image_dir": "", "files_dir": "", "file_path": str(page)},+ "layout": dict(DEFAULT_CONFIG["layout"], skip_vlm_labels="seal"),+ "pipeline": DEFAULT_CONFIG["pipeline"],+ }+ with pytest.raises(ValueError, match="skip_vlm_labels"):+ _validate_config(cfg)+++ "switches,expected",+ [+ ({}, set(IMAGE_LABELS)),+ ({"use_chart_recognition": False}, set(IMAGE_LABELS) | {"chart"}),+ ({"use_seal_recognition": False}, set(IMAGE_LABELS) | {"seal"}),+ (+ {"use_chart_recognition": False, "use_seal_recognition": False},+ set(DEFAULT_SKIP_VLM_LABELS),+ ),+ ({"use_ocr_for_image_block": True}, set()),+ (+ {+ "use_chart_recognition": True,+ "use_seal_recognition": True,+ "use_ocr_for_image_block": True,+ },+ set(),+ ),+ ],+)+def test_switches_derive_the_skip_list(switches, expected):++ cfg = dict(DEFAULT_CONFIG["layout"], **switches)+ assert resolve_skip_vlm_labels(cfg) == frozenset(expected)++ flags = _crop_flags(cfg)+ for label, flag in flags.items():+ assert flag is (label in expected), label+++def test_defaults_recognize_chart_and_seal():++ assert resolve_skip_vlm_labels(DEFAULT_CONFIG["layout"]) == frozenset(IMAGE_LABELS)+++def test_explicit_list_overrides_the_switches():++ cfg = dict(+ DEFAULT_CONFIG["layout"],+ use_chart_recognition=True,+ use_seal_recognition=True,+ skip_vlm_labels=["table"],+ )+ assert resolve_skip_vlm_labels(cfg) == frozenset({"table"})++ cfg = dict(DEFAULT_CONFIG["layout"], skip_vlm_labels=[])+ assert resolve_skip_vlm_labels(cfg) == frozenset()+++def test_enabled_chart_and_seal_use_their_trained_prompts():++ cfg = dict(+ DEFAULT_CONFIG["layout"], use_chart_recognition=True, use_seal_recognition=True+ )+ prompt_map = _prompt_map(cfg)+ assert prompts.get_element_cfg(prompt_map, "chart")["prompt"] == "Chart to Table:"+ assert prompts.get_element_cfg(prompt_map, "seal")["prompt"] == "Seal Recognition:"+++def test_chart_otsl_is_converted_to_html():++ otsl = "<otsl><fcel>Region<fcel>Share<nl><fcel>Japan<fcel>7%<nl></otsl>"+ out = _text._normalize_crop_text(otsl, "chart")+ assert "<table" in out and "<fcel>" not in out+ assert "Japan" in out and "7%" in outdiff --git a/sdk/tests/test_truncate_repetitive_suffix.py b/sdk/tests/test_truncate_repetitive_suffix.pynew file mode 100644index 0000000..dfc9da1--- /dev/null+++ b/sdk/tests/test_truncate_repetitive_suffix.py@@ -0,0 +1,37 @@+from minicpmvocr.pipeline._text import _truncate_repetitive_suffix as f+++def test_no_truncation_when_no_loop():+ text = r"a = b + c \end{array}"+ assert f(text) == text+++def test_closing_env_preserved_after_qquad_loop():+ text = r"\frac{1}{2}" + r" \qquad" * 18 + r" \end{array}"+ assert r"\end{array}" in f(text)+++def test_closing_bracket_preserved_after_loop():+ text = "x = 1" + " abc" * 18 + r" \]"+ assert r"\]" in f(text)+++def test_display_dollar_preserved_after_loop():+ text = "E = mc^2" + " foo" * 18 + " $$"+ assert "$$" in f(text)+++def test_html_table_close_preserved_after_loop():+ text = "<table><tr><td>x</td></tr>" + " spam" * 18 + " </table>"+ assert "</table>" in f(text)+++def test_loop_without_closing_still_truncated():+ text = "hello world " + " abc" * 18+ result = f(text)+ assert len(result) < len(text)+ assert "hello" in result+++def test_short_text_untouched():+ assert f("short text") == "short text"diff --git a/sdk/tests/test_tts_orchestration.py b/sdk/tests/test_tts_orchestration.pynew file mode 100644index 0000000..aca5c34--- /dev/null+++ b/sdk/tests/test_tts_orchestration.py@@ -0,0 +1,296 @@+from __future__ import annotations++import sys+from pathlib import Path+from typing import Dict, List, Optional++import pytest+from PIL import Image++SDK_DIR = Path(__file__).resolve().parent.parent+sys.path.insert(0, str(SDK_DIR))++from minicpmvocr.backends.dialects import CropRequest, build_vllm_payload, parse_openai_response # noqa: E402+from minicpmvocr.pipeline.rm_client import category_for_label # noqa: E402+++DECODE_CFG = {+ "temperature": 0.01,+ "top_p": 0.001,+ "top_k": 1,+ "repetition_penalty": 1.0,+ "no_repeat_ngram_size": 100,+}+MM_CFG = {"downsample_mode": "4x", "max_slice_nums": 9}+ENGINE_CFG = {"model_name": "minicpm"}+++def test_n1_payload_has_no_n_key():++ req = CropRequest(image_b64="Zm9v", prompt="p", max_tokens=128)+ payload = build_vllm_payload(req, ENGINE_CFG, MM_CFG, DECODE_CFG)+ assert "n" not in payload+ assert payload["temperature"] == 0.01+ assert payload["top_k"] == 1+++def test_sampled_payload_carries_n_and_overrides():+ req = CropRequest(+ image_b64="Zm9v", prompt="p", max_tokens=128,+ n=3, decode_overrides={"temperature": 0.7, "top_p": 0.8, "top_k": 20},+ )+ payload = build_vllm_payload(req, ENGINE_CFG, MM_CFG, DECODE_CFG)+ assert payload["n"] == 3+ assert payload["temperature"] == 0.7+ assert payload["top_p"] == 0.8+ assert payload["top_k"] == 20++ assert payload["repetition_penalty"] == 1.0+++def test_decode_overrides_do_not_mutate_shared_cfg():++ before = dict(DECODE_CFG)+ req = CropRequest(image_b64="Zm9v", prompt="p", max_tokens=128,+ n=2, decode_overrides={"temperature": 0.9})+ build_vllm_payload(req, ENGINE_CFG, MM_CFG, DECODE_CFG)+ assert DECODE_CFG == before+++def _openai_body(texts: List[str]) -> Dict:+ return {+ "choices": [+ {"message": {"content": t}, "finish_reason": "stop"} for t in texts+ ],+ "usage": {"prompt_tokens": 10, "completion_tokens": 20, "total_tokens": 30},+ }+++def test_parse_response_returns_all_choices():+ parsed = parse_openai_response(_openai_body(["a", "b", "c"]))+ assert parsed["texts"] == ["a", "b", "c"]+ assert parsed["text"] == "a"+++def test_parse_response_single_choice_still_gives_list():+ parsed = parse_openai_response(_openai_body(["only"]))+ assert parsed["texts"] == ["only"]+ assert parsed["text"] == "only"+++def test_parse_response_empty_choices_raises():+ from minicpmvocr.backends.dialects import DialectError+ with pytest.raises(DialectError):+ parse_openai_response({"choices": []})++[email protected]("label,expected", [+ ("text", "text"),+ ("title", "text"),+ ("table", "table"),+ ("isolate_formula", "formula"),+ ("inline_formula", "formula"),+ ("interline_equation", "formula"),+ ("display_formula", "formula"),+ ("something_unknown", "text"),+ ("", "text"),+])+def test_category_for_label(label, expected):+ assert category_for_label(label) == expected+++_FORMULA_LABELS_FROM_LAYOUT = (+ "formula", "display_formula", "isolate_formula",+ "inline_formula", "interline_equation",+)++[email protected]("label", _FORMULA_LABELS_FROM_LAYOUT)+def test_formula_labels_are_explicit_keys_not_fallbacks(label):+ from minicpmvocr.pipeline.rm_client import _CATEGORY_BY_LABEL+ assert label in _CATEGORY_BY_LABEL, (+ f"{label!r} 不在映射表里 —— .get(..., 'text') 会把它静默路由成文本渲染"+ )+ assert _CATEGORY_BY_LABEL[label] == "formula"+++class FakeEngine:++ name = "vllm"++ def __init__(self, greedy_text: str, sampled_texts: Optional[List[str]] = None,+ sampled_raises: bool = False):+ self.greedy_text = greedy_text+ self.sampled_texts = sampled_texts or []+ self.sampled_raises = sampled_raises+ self.calls: List[Dict] = []++ def recognize(self, image, prompt, max_new_tokens, slice_nums=None,+ n=1, decode_overrides=None):+ self.calls.append({"n": n, "decode_overrides": decode_overrides})+ if n == 1:+ return {"text": self.greedy_text, "texts": [self.greedy_text],+ "output_token_count": 5}+ if self.sampled_raises:+ raise RuntimeError("sampling blew up")+ return {"text": self.sampled_texts[0] if self.sampled_texts else "",+ "texts": list(self.sampled_texts), "output_token_count": 7}+++class FakeRM:+ def __init__(self, best_index: Optional[int] = 0, scores=None, fail: bool = False):+ self.best_index = best_index+ self.scores = scores or []+ self.fail = fail+ self.calls: List[Dict] = []++ def score_best(self, image, candidates, label, case_id="", force=False):+++ self.calls.append({"candidates": list(candidates), "label": label,+ "force": force})+ if self.fail:+ return None+ return {"best_index": self.best_index, "best_text": candidates[self.best_index],+ "scores": self.scores, "verdicts": ["scored"] * len(candidates)}+++ELEM_CFG = {"prompt": "p", "max_new_tokens": 128, "slice_nums": 9, "output_format": "markdown"}+TTS_CFG = {"enabled": True, "n": 4, "sampling": {"temperature": 0.7, "top_p": 0.8, "top_k": 20},+ "rm_url": "http://rm", "timeout_sec": 30, "fallback_to_greedy": True}+++def _run_tts(engine, rm, tts_cfg=None):+ import time+ from minicpmvocr.pipeline._tts import _execute_block_tts+ img = Image.new("RGB", (8, 8))+ return _execute_block_tts(+ engine=engine, rm_client=rm, tts_cfg=tts_cfg or TTS_CFG,+ image=img, elem_cfg=ELEM_CFG, label="text",+ case_id="page::block", infer_t0=time.time(),+ )+++def test_tts_sends_two_requests_greedy_then_sampled():+ engine = FakeEngine("greedy", ["s1", "s2", "s3"])+ rm = FakeRM(best_index=0)+ _run_tts(engine, rm)++ assert len(engine.calls) == 2++ assert engine.calls[0]["n"] == 1+ assert engine.calls[0]["decode_overrides"] is None++ assert engine.calls[1]["n"] == 3+ assert engine.calls[1]["decode_overrides"]["temperature"] == 0.7+++def test_tts_picks_rm_choice():+ engine = FakeEngine("greedy", ["s1", "s2", "s3"])+ rm = FakeRM(best_index=2, scores=[0.1, 0.2, 0.9, 0.3])+ best_text, tokens, _sec, info = _run_tts(engine, rm)++ assert best_text == "s2"+ assert info["best_index"] == 2+ assert info["rm_used"] is True+ assert info["n_candidates"] == 4+ assert tokens == 12+++def test_tts_dedupes_candidates_keeping_greedy_first():+ engine = FakeEngine("same", ["same", "other", ""])+ rm = FakeRM(best_index=0)+ _best, _tokens, _sec, info = _run_tts(engine, rm)++ assert info["n_candidates"] == 2+ assert rm.calls[0]["candidates"] == ["same", "other"]+++def test_tts_falls_back_to_greedy_when_rm_unavailable():+ engine = FakeEngine("greedy", ["s1", "s2", "s3"])+ rm = FakeRM(fail=True)+ best_text, _tokens, _sec, info = _run_tts(engine, rm)+ assert best_text == "greedy"+ assert info["best_index"] == 0+ assert info["rm_used"] is False+++def test_tts_survives_sampling_failure():++ engine = FakeEngine("greedy", sampled_raises=True)+ rm = FakeRM(best_index=0)+ best_text, _tokens, _sec, info = _run_tts(engine, rm)+ assert best_text == "greedy"+ assert info["n_candidates"] == 1++ assert rm.calls == []+++def test_tts_records_stage_timings():+ engine = FakeEngine("greedy", ["s1"])+ rm = FakeRM(best_index=0)+ _best, _tokens, _sec, info = _run_tts(engine, rm)+ for key in ("greedy_sec", "sample_sec", "rm_sec"):+ assert key in info and info[key] >= 0.0+++def _run_execute_block(tmp_path, engine, rm, tts_cfg=None):+ from minicpmvocr.pipeline._blocks import _execute_block+ crop_dir = tmp_path+ crop_name = "000_text.png"+ Image.new("RGB", (16, 16)).save(crop_dir / crop_name)+ prompt_map = {"default": {"prompt": "p", "max_new_tokens": 128, "slice_nums": 9,+ "output_format": "markdown", "resize_min_side": None}}+ block = {"label": "text", "order": 0, "bbox": [0, 0, 16, 16], "crop_filename": crop_name}+ return _execute_block(engine, prompt_map, "page_001", crop_dir, block,+ rm_client=rm, tts_cfg=tts_cfg or TTS_CFG)+++def test_execute_block_with_tts_enabled_actually_runs(tmp_path):+ engine = FakeEngine("greedy", ["s1", "s2", "s3"])+ rm = FakeRM(best_index=1, scores=[0.1, 0.9, 0.2, 0.3])++ out = _run_execute_block(tmp_path, engine, rm)++ assert out["crop_row"]["status"] == "ok", (+ f"TTS 分支没跑通: {out['crop_row'].get('error')!r} —— "+ "宽 except 会把任何编排 bug 记成引擎错误,别被 'vllm_error' 误导"+ )+ assert out["result_block"]["status"] == "ok"+ assert out["result_block"]["raw_content"] == "s1", "应取 RM 选中的候选"+ assert engine.calls[0]["n"] == 1 and engine.calls[1]["n"] == 3, "贪心 1 次 + 采样 N-1 一次"+ assert rm.calls, "RM 必须被调到"+++def test_execute_block_tts_off_takes_single_request_path(tmp_path):+ engine = FakeEngine("greedy")+ out = _run_execute_block(tmp_path, engine, rm=None,+ tts_cfg={**TTS_CFG, "enabled": False})++ assert out["crop_row"]["status"] == "ok"+ assert out["result_block"]["raw_content"] == "greedy"+ assert len(engine.calls) == 1 and engine.calls[0]["n"] == 1+++def test_single_candidate_skips_rm_by_default():++ engine = FakeEngine("SAME", ["SAME", "SAME", "SAME"])+ rm = FakeRM()+ _text, _tokens, _sec, info = _run_tts(engine, rm)+ assert info["n_candidates"] == 1+ assert rm.calls == [], "单候选却调了 RM —— 老路径的成本形态被改变了"+ assert info["rm_used"] is False+++def test_force_score_scores_even_a_single_candidate():++ engine = FakeEngine("SAME", ["SAME", "SAME", "SAME"])+ rm = FakeRM(best_index=0, scores=[0.77])+ cfg = dict(TTS_CFG)+ cfg["force_score"] = True+ _text, _tokens, _sec, info = _run_tts(engine, rm, tts_cfg=cfg)+ assert info["n_candidates"] == 1+ assert len(rm.calls) == 1, "force_score 开着却没打分 ⇒ 直通率无从算起"+ assert rm.calls[0]["force"] is True+ assert info["scores"] == [0.77]+ assert info["rm_used"] is Truediff --git a/sdk/tests/test_tts_sampling_contract.py b/sdk/tests/test_tts_sampling_contract.pynew file mode 100644index 0000000..e332249--- /dev/null+++ b/sdk/tests/test_tts_sampling_contract.py@@ -0,0 +1,114 @@+from __future__ import annotations++import sys+from pathlib import Path+from typing import Any, Dict++import pytest+import yaml++SDK_DIR = Path(__file__).resolve().parent.parent+sys.path.insert(0, str(SDK_DIR))++from minicpmvocr.backends.dialects import CropRequest, build_vllm_payload # noqa: E402+from minicpmvocr.config import DEFAULT_CONFIG, _deep_merge, load_config # noqa: E402+++BASE_CONFIG: Dict[str, Any] = {+ "run": {"run_tag": "tts_contract", "run_root": "./runs"},+ "engine": {+ "type": "vllm",+ "model_name": "minicpm-v5",+ "server_urls": ["http://127.0.0.1:18509"],+ },+ "layout": {"model_dir": "", "device": "cuda:0"},+ "pipeline": {"max_workers": 4},+}++FULL_SAMPLING = {"temperature": 1.0, "top_k": 0, "top_p": 1.0, "min_p": 0, "seed": 20260911}+++def write_config(tmp_path: Path, tts: Dict[str, Any] | None) -> Path:+ cfg = {**BASE_CONFIG, "input": {"image_dir": str(tmp_path)}}+ if tts is not None:+ cfg["tts"] = tts+ path = tmp_path / "config.yaml"+ path.write_text(yaml.safe_dump(cfg), encoding="utf-8")+ return path++[email protected](autouse=True)+def stub_layout(monkeypatch):++ import minicpmvocr.config as config_module++ class _AnyLayout:+ @staticmethod+ def validate_config(_cfg):+ return None++ monkeypatch.setattr(config_module, "resolve_layout_provider_class", lambda _cfg: _AnyLayout)+++ "sampling",+ [+ pytest.param({"temperature": 1.0}, id="temperature_only"),+ pytest.param({"temperature": 1.0, "top_p": 1.0}, id="no_top_k"),+ pytest.param({}, id="empty"),+ pytest.param(None, id="null"),+ ],+)+def test_incomplete_sampling_is_refused(tmp_path, sampling):+ path = write_config(tmp_path, {"enabled": True, "n": 8, "sampling": sampling})+ with pytest.raises(ValueError, match="tts.sampling"):+ load_config(str(path))+++def test_missing_sampling_section_is_refused(tmp_path):+ path = write_config(tmp_path, {"enabled": True, "n": 8})+ with pytest.raises(ValueError, match="tts.sampling"):+ load_config(str(path))+++def test_explicit_sampling_loads(tmp_path):+ path = write_config(tmp_path, {"enabled": True, "n": 8, "sampling": dict(FULL_SAMPLING)})+ cfg = load_config(str(path))+ assert cfg["tts"]["sampling"] == FULL_SAMPLING+++def test_sampling_is_not_required_when_tts_is_off(tmp_path):+ path = write_config(tmp_path, {"enabled": False, "n": 8})+ assert load_config(str(path))["tts"]["enabled"] is False+++def test_cli_override_counts_as_explicit(tmp_path):++ path = write_config(tmp_path, {"enabled": True, "n": 8})+ cfg = load_config(str(path), overrides={"tts": {"sampling": dict(FULL_SAMPLING)}})+ assert cfg["tts"]["sampling"]["top_k"] == 0+++def test_seed_omission_warns_but_loads(tmp_path, caplog):+ sampling = {k: v for k, v in FULL_SAMPLING.items() if k != "seed"}+ path = write_config(tmp_path, {"enabled": True, "n": 8, "sampling": sampling})+ with caplog.at_level("WARNING"):+ load_config(str(path))+ assert "seed" in caplog.text+++def _payload_sampling(sampling: Dict[str, Any] | None) -> Dict[str, Any]:+ cfg = _deep_merge(DEFAULT_CONFIG, {"tts": {"enabled": True, "sampling": sampling}})+ req = CropRequest(image_b64="Zm9v", prompt="p", max_tokens=16,+ decode_overrides=dict(cfg["tts"]["sampling"] or {}), n=7)+ payload = build_vllm_payload(req, cfg["engine"], cfg["mm"], cfg["decode"])+ return {key: payload[key] for key in ("temperature", "top_k", "top_p")}+++def test_unset_keys_reach_the_engine_as_something_nobody_chose():+++ assert _payload_sampling(None) == {"temperature": 0.01, "top_k": 1, "top_p": 0.001}+++ assert _payload_sampling({"temperature": 1.0}) == {"temperature": 1.0, "top_k": 20, "top_p": 0.8}diff --git a/sdk/uv.lock b/sdk/uv.locknew file mode 100644index 0000000..c793104--- /dev/null+++ b/sdk/uv.lock@@ -0,0 +1,3426 @@+version = 1+revision = 3+requires-python = ">=3.10"+resolution-markers = [+ "python_full_version >= '3.14' and sys_platform == 'darwin'",+ "python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'darwin'",+ "python_full_version >= '3.14' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version >= '3.12' and python_full_version < '3.14' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version >= '3.14' and sys_platform == 'win32'",+ "python_full_version >= '3.14' and sys_platform == 'emscripten'",+ "(python_full_version >= '3.14' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.14' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux' and sys_platform != 'win32')",+ "python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'win32'",+ "python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'emscripten'",+ "(python_full_version >= '3.12' and python_full_version < '3.14' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux' and sys_platform != 'win32')",+ "python_full_version >= '3.11.5' and python_full_version < '3.12' and sys_platform == 'darwin'",+ "python_full_version >= '3.11' and python_full_version < '3.11.5' and sys_platform == 'darwin'",+ "python_full_version >= '3.11.5' and python_full_version < '3.12' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version >= '3.11' and python_full_version < '3.11.5' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version >= '3.11.5' and python_full_version < '3.12' and sys_platform == 'win32'",+ "python_full_version >= '3.11.5' and python_full_version < '3.12' and sys_platform == 'emscripten'",+ "(python_full_version >= '3.11.5' and python_full_version < '3.12' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.11.5' and python_full_version < '3.12' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux' and sys_platform != 'win32')",+ "python_full_version >= '3.11' and python_full_version < '3.11.5' and sys_platform == 'win32'",+ "python_full_version >= '3.11' and python_full_version < '3.11.5' and sys_platform == 'emscripten'",+ "(python_full_version >= '3.11' and python_full_version < '3.11.5' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.11' and python_full_version < '3.11.5' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux' and sys_platform != 'win32')",+ "python_full_version < '3.11' and sys_platform == 'darwin'",+ "python_full_version < '3.11' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "(python_full_version < '3.11' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform != 'darwin' and sys_platform != 'linux')",+]++[[package]]+name = "aiohappyeyeballs"+version = "2.7.1"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/ce/f4/eec0465c2f67b2664688d0240b3212d5196fd89e741df67ddb81f8d35658/aiohappyeyeballs-2.7.1.tar.gz", hash = "sha256:065665c041c42a5938ed220bdcd7230f22527fbec085e1853d2402c8a3615d9d", size = 24757, upload-time = "2026-07-01T17:11:55.501Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/71/43/1947f06babed6b3f1d7f38b0c767f52df66bfb2bc10b468c4a7de9eceff2/aiohappyeyeballs-2.7.1-py3-none-any.whl", hash = "sha256:9243213661e29250eb41368e5daa826fc017156c3b8a11440826b2e3ed376472", size = 15038, upload-time = "2026-07-01T17:11:54.055Z" },+]++[[package]]+name = "aiohttp"+version = "3.14.5"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "aiohappyeyeballs" },+ { name = "aiosignal" },+ { name = "async-timeout", marker = "python_full_version < '3.11'" },+ { name = "attrs" },+ { name = "frozenlist" },+ { name = "multidict" },+ { name = "propcache" },+ { name = "typing-extensions", marker = "python_full_version < '3.13'" },+ { name = "yarl" },+]+sdist = { url = "https://files.pythonhosted.org/packages/6c/4c/bdccd81e9ee225b69c60e7766c9a5b05364f118f4d383713b89a682d772d/aiohttp-3.14.5.tar.gz", hash = "sha256:5558a7f5a05af9ecf744af91e5baefc436f93c9333e656c27ec253f9a6bbe178", size = 8078052, upload-time = "2026-10-11T01:05:12.408Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/ca/82/f7f0652e3a845e095d8505a2807a0fe5782abb71f99b2f516c93ff0be492/aiohttp-3.14.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ef692a24087a699c0a4a26af45e746e0c1eae2116f6d8a5ff91d8aae2b867b45", size = 834351, upload-time = "2026-10-11T00:59:07.668Z" },+ { url = "https://files.pythonhosted.org/packages/95/c5/10cb0a5195bc3ec05a74ee494f8431a15e559800f2e869f3526ad4a16f04/aiohttp-3.14.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:1220353657ad49493551f089ce02f1a348fd57ffd585bfec77f2f3c4fe3a7346", size = 560663, upload-time = "2026-10-11T00:59:09.853Z" },+ { url = "https://files.pythonhosted.org/packages/32/dc/b7fefdd7dd64d080da2d69d609344191cc94b0e2eba70200c371014c9b36/aiohttp-3.14.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:330900acd0dc4cb8b27f9c127fbaad770964845338493e7906ae3822e82dbf8d", size = 553263, upload-time = "2026-10-11T00:59:11.5Z" },+ { url = "https://files.pythonhosted.org/packages/61/5f/3271cad1b34347e8bf27abee20d501ebdc56cec97e8ae59cd3fabb23d917/aiohttp-3.14.5-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0684952aeae1f5dbfe02d46039338513b94009baecd15d8e4098a357c4c4a2a6", size = 1843813, upload-time = "2026-10-11T00:59:13.143Z" },+ { url = "https://files.pythonhosted.org/packages/67/af/2011b30fe61889af112ad380e6fd44a93cca4b51296f612cac666c177882/aiohttp-3.14.5-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:d94e44be379e569758fee8a9a58431cfc3c2598c708b92b1cfe96c66b4c94aef", size = 1811243, upload-time = "2026-10-11T00:59:15.091Z" },+ { url = "https://files.pythonhosted.org/packages/e3/ba/72f3ac523ed48d38cdfb169f1b2a2e93ce06d9fcf4f46d0f5692e9539bcc/aiohttp-3.14.5-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5af42135fdfebdadbc2bcd9c0842a48ccf0d62794c36a260b21dc4b94d1e0119", size = 1898815, upload-time = "2026-10-11T00:59:17.224Z" },+ { url = "https://files.pythonhosted.org/packages/e6/69/bbf24f3b555ea1befa7db1e2510c728c8b0e80e61ce360beb7d94bc562b7/aiohttp-3.14.5-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4f07fe3ac408d8b3f768be471dc3f56d43843c47d97c66120534467a15ead197", size = 2022390, upload-time = "2026-10-11T00:59:19.244Z" },+ { url = "https://files.pythonhosted.org/packages/5d/38/01f5fc732d5373d6c099db0343279cd4e6607287d336bab6ff6ae9085a0d/aiohttp-3.14.5-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f375db73a39f5cf83696d500e21a67f418dc9a988955756f254be8f03b7b3651", size = 1856329, upload-time = "2026-10-11T00:59:21.19Z" },+ { url = "https://files.pythonhosted.org/packages/15/85/1f86fbd8fe34ad447c63e679404a1d5be435fe256a9d281b791fc1ed0d35/aiohttp-3.14.5-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:8df7d481654ac96fe1ba9a02a9f67770fdd367823e0d5ef01b922725c4bd2cfa", size = 1712763, upload-time = "2026-10-11T00:59:22.982Z" },+ { url = "https://files.pythonhosted.org/packages/39/1e/ced51cf47e427e7aa6142c3bf6f33022472703bc9061289329532d3c40c0/aiohttp-3.14.5-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:e95c8def4b81c5d68d5cf1f54c07acd7c0d2577af244e5b6da802120825737c6", size = 1812125, upload-time = "2026-10-11T00:59:25.032Z" },+ { url = "https://files.pythonhosted.org/packages/6a/f1/9610b4e263b554ca4191501ba72b952efe06556b647da74887abc5d41049/aiohttp-3.14.5-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:f2ebb54b3f932210503072f09974b4fb574d823e497a944adfdcd140a6a00255", size = 1829550, upload-time = "2026-10-11T00:59:27.078Z" },+ { url = "https://files.pythonhosted.org/packages/ac/8a/1d1fb27cf9fa99b13133de33044c4d10d7705be0d4173d6d56abad1b67f9/aiohttp-3.14.5-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:038c2c7e8caa26b6c8423779b5eaf1893904048a512c19b32fe841ffa5592b50", size = 1868179, upload-time = "2026-10-11T00:59:29.315Z" },+ { url = "https://files.pythonhosted.org/packages/24/9f/3cfafa86ff025623dcca0d30335db7b8a6f3fa348148441208147e827e04/aiohttp-3.14.5-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:b7806e804889231b0e06469fd4a5c06313d1c0a3377322b6d9237fa5e0fe4167", size = 1697721, upload-time = "2026-10-11T00:59:31.161Z" },+ { url = "https://files.pythonhosted.org/packages/62/1d/86439a23bf32296e715d8c75535f0cd701821d36719324baef65bcd6af9e/aiohttp-3.14.5-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:9bab2045550c4fe0f7baf89574db1b455c195750702ba96fef1f16972b146617", size = 1887000, upload-time = "2026-10-11T00:59:33.329Z" },+ { url = "https://files.pythonhosted.org/packages/1d/0f/6044f2d02b3874966d84cd119f9b8eda46aa2991230078aea4dd17750cc9/aiohttp-3.14.5-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:96a2e584f0b9ed8f1fa33211397dcf67bb7069866402cb405d191c2f0defb9a3", size = 1842020, upload-time = "2026-10-11T00:59:35.384Z" },+ { url = "https://files.pythonhosted.org/packages/18/64/b49d2a34428ff937631b07dde74d5879a7a2c8559aab39331d40769e8cb6/aiohttp-3.14.5-cp310-cp310-win32.whl", hash = "sha256:602c1e9b718a3275c580149f947e7fac65044c0a20e599553fb12e9700da9eca", size = 489282, upload-time = "2026-10-11T00:59:37.061Z" },+ { url = "https://files.pythonhosted.org/packages/a6/7c/1114e723f1c4a65597820b605a0ddcd7f3b28fdfde3ac8d520d517ca582c/aiohttp-3.14.5-cp310-cp310-win_amd64.whl", hash = "sha256:bea559ad70218d230663e4210875735076a9bfea5994cef34a55a25faeaf2544", size = 512021, upload-time = "2026-10-11T00:59:38.7Z" },+ { url = "https://files.pythonhosted.org/packages/48/97/e08c646f4bad63d77876b24591d013d7f33f02fda7c931eafe3224f38467/aiohttp-3.14.5-cp310-cp310-win_arm64.whl", hash = "sha256:dca3fa8d8a0a26679862eccb0b1a9151b2b9f1cd2c212e7a6335778faaff5833", size = 493016, upload-time = "2026-10-11T00:59:40.525Z" },+ { url = "https://files.pythonhosted.org/packages/d8/f3/8997f18890a92c79f77fcfbb4f78ca17c2d4ab109e9eb6d31b4e9de194a0/aiohttp-3.14.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:d51db97c96384fbfcaf8f4c65922183a68b94f891c3c10c862ef5f6df2adbb1f", size = 832358, upload-time = "2026-10-11T00:59:42.195Z" },+ { url = "https://files.pythonhosted.org/packages/8e/42/084651e9efb5cadb99265f786df60f2a7b353cead7bfd2c87003cb4867ad/aiohttp-3.14.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ae53924aa853a7a2ca20ed4142c7c6b56338e4d4cd999e2980075b9efc2e257a", size = 559636, upload-time = "2026-10-11T00:59:43.677Z" },+ { url = "https://files.pythonhosted.org/packages/3d/fe/92838944e601f0fe195fd3f3ada37e29fbee3d19bfd323fe15937ec79d36/aiohttp-3.14.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a2c473a355f9239efcb72c92d5abfd8fcdb0cc78c8e9af607e72ca12dbb36593", size = 552588, upload-time = "2026-10-11T00:59:45.592Z" },+ { url = "https://files.pythonhosted.org/packages/8f/b8/dd9b95c5c20ceae1b47738e656bd79e9883e3117a9cc8b143901eb604e9a/aiohttp-3.14.5-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:32e8fa6644e541fcd7e02430588c7fc93b602c1778ea0bc345505db76b61cfb4", size = 1928224, upload-time = "2026-10-11T00:59:47.294Z" },+ { url = "https://files.pythonhosted.org/packages/c6/47/70010cd2ba8746968d53d433ff328c33f06a66c99da5f3de759c64a6b2eb/aiohttp-3.14.5-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:579f97d5120f2971876d2ddca2968135f6944d00c44c3a6590ad7d86ca9b403f", size = 1877674, upload-time = "2026-10-11T00:59:49.472Z" },+ { url = "https://files.pythonhosted.org/packages/c5/a1/b026f071dbd87f0bdba86b92d47e46f3899e3ad7143b6e0fe7e7887090b4/aiohttp-3.14.5-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:24409db442e2fb6e766bc7f3943851a8381dec3098140e43bb2e843b79e31b12", size = 1985850, upload-time = "2026-10-11T00:59:51.296Z" },+ { url = "https://files.pythonhosted.org/packages/36/d1/f7b6f6f8c3cb5a71b53baeddc2e70c224c28b12a23a55c42994c504019b7/aiohttp-3.14.5-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5e8f97c0488ffda3082766ac0f2c8150a9a58c4d05788330e479cfd449b37939", size = 2105471, upload-time = "2026-10-11T00:59:53.191Z" },+ { url = "https://files.pythonhosted.org/packages/42/74/2a2b22953de15c6c8a80debf26db3047e4e8a5a5db6dd7c2c6c01eec0605/aiohttp-3.14.5-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:50a195903119008fe9cc68710535eb37f556ffffd6a7759afe70a2c145587045", size = 1929915, upload-time = "2026-10-11T00:59:55.609Z" },+ { url = "https://files.pythonhosted.org/packages/33/ad/f80e8d33933d0eacd0217efa3b7fb32c9f48ed480ed0db53cf9948bf474f/aiohttp-3.14.5-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0133c3c3b54a0bf1e71fa5c1ad95c93f07fd54e24ef1fe182f5122e1573d2bf1", size = 1773832, upload-time = "2026-10-11T00:59:57.611Z" },+ { url = "https://files.pythonhosted.org/packages/04/a4/0273d239f3e3bb69438f209c64c82e1f98dc60d5db264795e41f7dd05dcb/aiohttp-3.14.5-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c172db893e516e1358e65a95ee20b7ce7173963eefe318b6ab2a2220688b999e", size = 1901001, upload-time = "2026-10-11T01:00:00.605Z" },+ { url = "https://files.pythonhosted.org/packages/16/ed/7dd439d26c654645bc34ca3c9a822fc11c1c51801fed1cefdfe1cc41c1f6/aiohttp-3.14.5-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:f2a7966bda23dd85051f1661ce0ace38d6890e05ec6c357ecae9d2479cba377e", size = 1907218, upload-time = "2026-10-11T01:00:02.699Z" },+ { url = "https://files.pythonhosted.org/packages/32/dd/86249c3b8248562a17fd3e22ee0c164378d65766f01aceef62cf52783710/aiohttp-3.14.5-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:4887d130a7bbfed3a85493bb5a25e5b5b558d40c1d986dd16970d2bb26d63793", size = 1958650, upload-time = "2026-10-11T01:00:04.851Z" },+ { url = "https://files.pythonhosted.org/packages/bc/0b/ca4d53d68f683ce195807fd0aeb063bf6d1c6b39343fff234c9524e8d5a9/aiohttp-3.14.5-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:225c579c23b68b343cccea27a7e06e3bd8ec23a09c30b427eb3f1e4ca6239b20", size = 1760057, upload-time = "2026-10-11T01:00:06.978Z" },+ { url = "https://files.pythonhosted.org/packages/6b/42/005437ffd7fa56c2ce3347add40404b654a32754ce91f2e2a14b9e5ab2bc/aiohttp-3.14.5-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:ab52d8f1fc1b64821c1fbad64a647ed6203627004059a6d1ed4f0858a1499703", size = 1978081, upload-time = "2026-10-11T01:00:08.868Z" },+ { url = "https://files.pythonhosted.org/packages/03/71/3a5b66fe1b7b23d3c6524350817ed55de5feb7fbb4cccba7cbe044d118dd/aiohttp-3.14.5-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:cb131d775a1573c1aee66656bd78b023577bbdb6cb8349a07773bd4f73e68a6e", size = 1922954, upload-time = "2026-10-11T01:00:11.035Z" },+ { url = "https://files.pythonhosted.org/packages/69/84/d08a554f281d42fd7c6b2b6dd7738f3e3a7a9f657ddd87e11ca2091cdfe3/aiohttp-3.14.5-cp311-cp311-win32.whl", hash = "sha256:e87046c8ff77a8decdb6a41d8ab25824b47531b2da933aeab0c1e21c7acff329", size = 488101, upload-time = "2026-10-11T01:00:12.933Z" },+ { url = "https://files.pythonhosted.org/packages/0f/15/52b5e65f02b33686ae49f1518548ae4f5a7adaf31d9d3c54fa12a143137b/aiohttp-3.14.5-cp311-cp311-win_amd64.whl", hash = "sha256:6f275c11d1aa6d4c458e05a68be084efe3c55a113d99e3f46a318098e52948fc", size = 512575, upload-time = "2026-10-11T01:00:14.743Z" },+ { url = "https://files.pythonhosted.org/packages/b0/b9/bb75012635f3defb0f7cbb7c4ae391e36bb9cb3fbdca3b9944e2ebebf743/aiohttp-3.14.5-cp311-cp311-win_arm64.whl", hash = "sha256:b032a0023eb41d768ce77d83210ab2a3c389bc0b09313273c7e1eca48c10a755", size = 493179, upload-time = "2026-10-11T01:00:16.961Z" },+ { url = "https://files.pythonhosted.org/packages/d5/94/6ba86efddcb616c811b40e6a0dfdd862738f647e4e3860a961075d5e9ed8/aiohttp-3.14.5-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:df37b620684e19b5e25724412518ccafc3b1a49cdac706fdbd2f983fad943450", size = 817499, upload-time = "2026-10-11T01:00:18.901Z" },+ { url = "https://files.pythonhosted.org/packages/5e/e1/7bca6d84dabd228aa8eb4b7f9feac2586aaa9be5505d7d65bf287a615c43/aiohttp-3.14.5-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:ef60869969180ec2464f1349aff07138ae35ca2200f0946cb3552e49e8f301a8", size = 549467, upload-time = "2026-10-11T01:00:20.854Z" },+ { url = "https://files.pythonhosted.org/packages/64/91/11b89f45ca486252dd67dd5f3231fec04bf5518da39a95cb3997619f17fb/aiohttp-3.14.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d079c0a0135c36e7beb6f1c88087c8f108dc5891cdd0b5eafa778421bda70ed2", size = 548067, upload-time = "2026-10-11T01:00:22.659Z" },+ { url = "https://files.pythonhosted.org/packages/22/ff/c6615806c14aab34f82b9424ccde8ce6e417315fd57ce1c5b4d4747888e1/aiohttp-3.14.5-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:abfda5cb094a829f7bc25216a32f7db2e85cc65bd59910f8e7b40b3d9b224764", size = 1896245, upload-time = "2026-10-11T01:00:24.638Z" },+ { url = "https://files.pythonhosted.org/packages/39/b2/25a8c971ae6a92c8394d77e42422d7f38989e05cf41a5ceb92d73d67ab7e/aiohttp-3.14.5-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:9cc882cf8619109583c906b4d4a85d6a111a98afa34b7a450d1e08118d016820", size = 1872180, upload-time = "2026-10-11T01:00:26.838Z" },+ { url = "https://files.pythonhosted.org/packages/2f/d5/99f93ea36cc5205e47c1e5a803e087f2ad21b5430b5db2e942cb6e988a37/aiohttp-3.14.5-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:7457580535e019e1247ea35d6a02bf081ad30c26d0cbc210c93f6c3ab67a0835", size = 1937261, upload-time = "2026-10-11T01:00:28.74Z" },+ { url = "https://files.pythonhosted.org/packages/40/a6/9ac9c9e6695040bd73d2584a1b59a9388f6433c76d5294a7bf591e21ffe5/aiohttp-3.14.5-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c5ed596aedb9c42afd3fe0aae3117725378ac73d2cc5ddc735056fbdb96c5d02", size = 2064994, upload-time = "2026-10-11T01:00:30.623Z" },+ { url = "https://files.pythonhosted.org/packages/da/e4/aa172eb534b7f02f1f8ff1c3213347eaf3cf218db91a727c6863c22f1035/aiohttp-3.14.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:20f085697d7e911f1f73c43ed03fafbed1e7121797e2eb5428efa80398060584", size = 1919630, upload-time = "2026-10-11T01:00:32.548Z" },+ { url = "https://files.pythonhosted.org/packages/06/7d/4eedafc5bababa8932636c141e346806966eade12c0b7e5946d43bf8218b/aiohttp-3.14.5-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:74b0a9c8270f9b0a11410e124ff8d4f18bfc1f1837440ec84da5ae7b50927b5d", size = 1710016, upload-time = "2026-10-11T01:00:34.471Z" },+ { url = "https://files.pythonhosted.org/packages/b2/94/eee018537ba19da0ceb2ac79cab83faed4ac49568e08376e2799043f2538/aiohttp-3.14.5-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:19e2ba471507c34f8252402ab50f5ab512398b9ea8c8f1cb26beb3f75793ba30", size = 1858112, upload-time = "2026-10-11T01:00:36.581Z" },+ { url = "https://files.pythonhosted.org/packages/68/76/354653a306547238f3427283905972d796ba7c292ba9977abec9f2b6f260/aiohttp-3.14.5-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:d418ce2af40c6bb685b3f663e9e8de27cb0a22431d8e88a167348d7f01878073", size = 1896371, upload-time = "2026-10-11T01:00:38.478Z" },+ { url = "https://files.pythonhosted.org/packages/f2/ec/63e8c7136b570e356345ad3174e3820fdc973ea10712cb6c649bf875755a/aiohttp-3.14.5-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:70cb4008ac2ed1e0ca9e824deb4b53d3aa0d939109698ebf1e723a84337bd794", size = 1905836, upload-time = "2026-10-11T01:00:40.527Z" },+ { url = "https://files.pythonhosted.org/packages/57/d8/11365bda144b127928cd42533d0eff78a55613c9e28f81941bd6630ea887/aiohttp-3.14.5-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:a23fe35d776bc03cb495938b9594450d047e3bc08c5255315a82323e9cb7d2dd", size = 1696534, upload-time = "2026-10-11T01:00:42.686Z" },+ { url = "https://files.pythonhosted.org/packages/2f/3d/82df0461b18e00b2998f205c03e0d3010222478c43640aceb8e03dcd7e8f/aiohttp-3.14.5-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:3e0eb43bed3c6801a6cee315195377789e90b2a72c2277a475b578535312488d", size = 1933970, upload-time = "2026-10-11T01:00:44.71Z" },+ { url = "https://files.pythonhosted.org/packages/03/ad/6ddfe0aacd931c17b53533336d97e9d11a98b96d6ae815a9da0b19f82ccf/aiohttp-3.14.5-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3be7dd397d64ca3e1869626fa9318aaebb54b7bf93bc72d7a205448d83e4f748", size = 1899501, upload-time = "2026-10-11T01:00:46.629Z" },+ { url = "https://files.pythonhosted.org/packages/9e/8e/189bdd9ae4793059bb09f6dc880f211a6c6c7859cebcbf33912dbfab7dd7/aiohttp-3.14.5-cp312-cp312-win32.whl", hash = "sha256:eb324e2009fb54db30a071dad7caf6998ee2879c4704007efb244514dad1fec1", size = 480370, upload-time = "2026-10-11T01:00:48.468Z" },+ { url = "https://files.pythonhosted.org/packages/ae/ce/1f08114679d49655b30a6e0a29858375c94b82c1de1a0bd0a20c2fee8b02/aiohttp-3.14.5-cp312-cp312-win_amd64.whl", hash = "sha256:2cc38a4f2b516bef1714e690df87a0e043faf1a7693c82d860091684453d5111", size = 506141, upload-time = "2026-10-11T01:00:50.272Z" },+ { url = "https://files.pythonhosted.org/packages/79/d4/c7b4f60b16a1b7e43249fa9031ae05e7e8c341ba4b7d1866f914dafeaa0e/aiohttp-3.14.5-cp312-cp312-win_arm64.whl", hash = "sha256:a63afd1f757de949028387e65a7127b61ad0f775432dbb0e62816ae619fe69ac", size = 488108, upload-time = "2026-10-11T01:00:52.321Z" },+ { url = "https://files.pythonhosted.org/packages/d3/e1/2841e020ebb7aefae5513586193e011e06313d9a6bdbd296622afbbce204/aiohttp-3.14.5-cp313-cp313-android_24_arm64_v8a.whl", hash = "sha256:9ad7e6aa38c20da1be697874349c4c273c8a03b7887169665081706398d0439a", size = 538932, upload-time = "2026-10-11T01:00:54.3Z" },+ { url = "https://files.pythonhosted.org/packages/f7/a6/7fb8ea8fe96bcc7b7c7a36d10f021d99d01a8dc8a4b3f0ddacecfad9a80e/aiohttp-3.14.5-cp313-cp313-android_24_x86_64.whl", hash = "sha256:f59c7673465908cbe506117176156c127f29f917677afceada34957179221d91", size = 553329, upload-time = "2026-10-11T01:00:56.442Z" },+ { url = "https://files.pythonhosted.org/packages/de/64/d056e3c27647dc25af1a592cf356245382ea7c808171b9dac7677afedfc8/aiohttp-3.14.5-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:1b5416552740edf07234cc9437d0706f2acb67b93c198670b1a68e1b2b587dec", size = 521367, upload-time = "2026-10-11T01:00:58.345Z" },+ { url = "https://files.pythonhosted.org/packages/3e/e4/95226147e11d4db916fd1d495dcf85af8e3816e38333e42718241196e848/aiohttp-3.14.5-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:43351bdb5e4c3cb7d1772368e988534e869a74db7778079a83782c11c69535c7", size = 528322, upload-time = "2026-10-11T01:01:00.211Z" },+ { url = "https://files.pythonhosted.org/packages/17/cd/1d3c9192cafdb51cad62b2d3ded96cff9cc8af51893210aadd448a325389/aiohttp-3.14.5-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:c8c4478bef6d57fcfda15dae461ea3c9f06aa7b257c58df3f2300174ccbb185a", size = 539874, upload-time = "2026-10-11T01:01:02.06Z" },+ { url = "https://files.pythonhosted.org/packages/f6/0c/dfa33aecc7d4d1dc75e05248f5eac5a0edf4d09e7b44d93ab62529b0c1db/aiohttp-3.14.5-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:c2c30484dd1417ef98b51021ffa2cc0d7f3c78918adaaaab7e70817335ab3e02", size = 813836, upload-time = "2026-10-11T01:01:04.01Z" },+ { url = "https://files.pythonhosted.org/packages/33/17/4a63738052d20567d55529d6daa1b9480d906fd52930fbcf6d3fbed618f0/aiohttp-3.14.5-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:dab9ac5a67c8d1f070c00fa8fccb7cbd1b8dcc1a8d6b42f37540df9b3d4cc603", size = 548070, upload-time = "2026-10-11T01:01:06.035Z" },+ { url = "https://files.pythonhosted.org/packages/15/e5/b57e58695a757fd4c02497c033fced96a69c631b13866c43d336530c9670/aiohttp-3.14.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:e1cc2bfaee8c214f06080a7c7d5772419b8a1108e8e5349236189811823fb02a", size = 545786, upload-time = "2026-10-11T01:01:07.817Z" },+ { url = "https://files.pythonhosted.org/packages/9a/68/8c2c67a3aedf46e00f3c42f04fbc6983de80d4ed5786151e33681ba45883/aiohttp-3.14.5-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:74efb69332b85675b1eabd760a8cfc2e2cf42c60607c66f88014c1bdfb40942d", size = 1886492, upload-time = "2026-10-11T01:01:09.834Z" },+ { url = "https://files.pythonhosted.org/packages/ab/4b/74aab5e8d28c62e8f795b4fe8f38cf5586fd264a9a27bd2141ef6490333d/aiohttp-3.14.5-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:42b5e616946dbaf505e2bff18c9af2cd4ef9e7ef300ee58a6e951a5b7cf147ae", size = 1870057, upload-time = "2026-10-11T01:01:12.045Z" },+ { url = "https://files.pythonhosted.org/packages/a8/f7/eafc3b1988302b1815d9fd4a21071be5c360d616c0a430d02fd92dc97688/aiohttp-3.14.5-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f9033b43f511f27547c557dcaba0177649e10a3725336ccd2cce0fdc1dc4850d", size = 1925119, upload-time = "2026-10-11T01:01:14.09Z" },+ { url = "https://files.pythonhosted.org/packages/a1/04/78d8f294f74dd570f3898ff20402349fce524176045df98ba727d6846a68/aiohttp-3.14.5-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:15a310d3c71398e3d7bfc93a1a73fbe664315cd9e9016b8efc1cff85eeab7155", size = 2053137, upload-time = "2026-10-11T01:01:16.344Z" },+ { url = "https://files.pythonhosted.org/packages/32/51/395d225ef36f5a50d8e548dcd3141bfdbcd31fb6eed859022c573d2c4d66/aiohttp-3.14.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1ffa3a523a36d8628f98c06492ae16a31a23d14c0b4ec721757b477319f656d6", size = 1911038, upload-time = "2026-10-11T01:01:18.653Z" },+ { url = "https://files.pythonhosted.org/packages/ff/a4/2aec1aa06d82e8a244843b5dae31d78061e5e76744270a86dd0ee051c889/aiohttp-3.14.5-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:5fb6a6e919bfb703227bc1ce6579281b84b1a2ba57deb9794dfdbec7dcd1e40c", size = 1702205, upload-time = "2026-10-11T01:01:20.904Z" },+ { url = "https://files.pythonhosted.org/packages/16/27/6051bfde7b6f418f70edd60d655fa426abb3355fa0981764739d87ecf160/aiohttp-3.14.5-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:43e1b7994a8b038125f722bff07492ef501110722c2727c408995d9fb864c421", size = 1848588, upload-time = "2026-10-11T01:01:22.918Z" },+ { url = "https://files.pythonhosted.org/packages/9e/44/55efc06fc26c4e6e1c095f231b4c222bf2d86d64a8eebbc24b2bb5958ea8/aiohttp-3.14.5-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:5f3e96071686755d9cd3600c3880183eb94b012178e92746d68101800f0ed8a3", size = 1887540, upload-time = "2026-10-11T01:01:25.278Z" },+ { url = "https://files.pythonhosted.org/packages/48/dc/1502bfdc2a65760d386ac6a00090b0addaa8a3c9c60b3f8127fad3a9afb2/aiohttp-3.14.5-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:cd88b01f3d37b7a2a34f91d98f14720206f1ea3d540843fab2d649dd5fb91fec", size = 1895030, upload-time = "2026-10-11T01:01:27.316Z" },+ { url = "https://files.pythonhosted.org/packages/93/7e/44174bb6288264418c9eec07a5e35180969c0d5a796c7af544db3cb8a33a/aiohttp-3.14.5-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:f2ed8b64dc0c651c0f5a9c926777719770021251b8f336d97c4b80b660836ce1", size = 1693244, upload-time = "2026-10-11T01:01:29.39Z" },+ { url = "https://files.pythonhosted.org/packages/47/dd/b507d64e50db23888582fff08eda13998b12f9dea70c072edaac19218380/aiohttp-3.14.5-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:a9918e58faf62ba2c7147927d06057aec78f42475aff5048047ec47e7265a600", size = 1926308, upload-time = "2026-10-11T01:01:31.634Z" },+ { url = "https://files.pythonhosted.org/packages/98/4b/5b51b4f63e3f2793151f4aea49c48fe1e00baeb7cec9c7a206de499f8de0/aiohttp-3.14.5-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:42f320d4a5b00b9af0bddcfec5407dc6f2d9816f006b2f79ebbaa31f16895df3", size = 1888406, upload-time = "2026-10-11T01:01:33.715Z" },+ { url = "https://files.pythonhosted.org/packages/ff/13/d5e818a5eaba9f822016727299f41c0e1075799f82a6433ec508a93ab867/aiohttp-3.14.5-cp313-cp313-win32.whl", hash = "sha256:3ae800a20947e2c2e53088047d021e6bf7d51560cc49f6a0737a1f79d2e3a13c", size = 479970, upload-time = "2026-10-11T01:01:35.677Z" },+ { url = "https://files.pythonhosted.org/packages/8d/d0/8eca2c65aa467320990d78fb2005f38ed3588944280c39ff9deb6423fef1/aiohttp-3.14.5-cp313-cp313-win_amd64.whl", hash = "sha256:d05e94cdfe0d15d0206f970722d2554780ce562787b21b218b275447f8751319", size = 505985, upload-time = "2026-10-11T01:01:37.574Z" },+ { url = "https://files.pythonhosted.org/packages/7a/f8/4cdd65305d2fca14b886bea9ed2abb1fe726287872524e56e3d26692b47d/aiohttp-3.14.5-cp313-cp313-win_arm64.whl", hash = "sha256:f001b571ead90ca1770f1e616db255351a1703317f20374c361ef22f12c06d09", size = 487629, upload-time = "2026-10-11T01:01:39.477Z" },+ { url = "https://files.pythonhosted.org/packages/43/be/3184a1d34a8be665569eadb7e9e764b4629e4f3413e241cb2e4d6fecf3b3/aiohttp-3.14.5-cp314-cp314-android_24_arm64_v8a.whl", hash = "sha256:939042d5cda21d41a6f512e7cc8b8e33a2aebff863352251da495fbd91b673b5", size = 540673, upload-time = "2026-10-11T01:01:41.354Z" },+ { url = "https://files.pythonhosted.org/packages/60/2a/d35f3ba4cf157b072e3b674bf9983047ca5ea5173c995d32d877e1191d36/aiohttp-3.14.5-cp314-cp314-android_24_x86_64.whl", hash = "sha256:6da32b5ff3fd78d244e37300463434c7145162bfd2b6e9e915ab164da37f7343", size = 554087, upload-time = "2026-10-11T01:01:43.719Z" },+ { url = "https://files.pythonhosted.org/packages/fc/d2/61a33880ca4eaca95a9c60ca3f6beed15555af1028652dfaac601627787b/aiohttp-3.14.5-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:1b438b73c38111818d0c9d6a5c2bfed8584c8e503a49ef085d70e874ec846738", size = 522613, upload-time = "2026-10-11T01:01:46.154Z" },+ { url = "https://files.pythonhosted.org/packages/31/1d/de579b299d2225dc2c6fd99d579d91f16c02a913fb5af9a3cf2fe9bd88ba/aiohttp-3.14.5-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:755933b107ea7a6a9ac916f635a70595a5b1a32fac10a8ff0b9f2ab88555550c", size = 529682, upload-time = "2026-10-11T01:01:48.477Z" },+ { url = "https://files.pythonhosted.org/packages/f4/4a/ddb923564e15e053b6e060b0036e1694dcadcb13aa476c5a87dcad20e336/aiohttp-3.14.5-cp314-cp314-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:b3cc509327c7b27f6f4727a8830f4004f6df7766e179f2f4b8e54e65c0bec5d3", size = 540120, upload-time = "2026-10-11T01:01:50.474Z" },+ { url = "https://files.pythonhosted.org/packages/3d/36/a640fbecaa53727a5900b892bdbe17b5f3e8cc88903e22864fe41b654def/aiohttp-3.14.5-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:7bd8ac754ebd6733a3e2a0dd1674c4d8ab086196803fd8dcd776f07b4e2607d9", size = 818795, upload-time = "2026-10-11T01:01:52.665Z" },+ { url = "https://files.pythonhosted.org/packages/ef/b6/d52ca608859e271b5fa7944074802dc45f60e52c318a4ddc34edbf73586e/aiohttp-3.14.5-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:e724a7b6091f0b1ac064f9d1b15ff9ec52e6033a86cdae649e5f086e32a3c0db", size = 549667, upload-time = "2026-10-11T01:01:54.65Z" },+ { url = "https://files.pythonhosted.org/packages/ce/b5/05b8ac39a76ff4bca89f42a4c2471560c71f894ff6e4bc16158c951874e3/aiohttp-3.14.5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c32e26310cc10e547f53cd13d39a369034f69dcb7d749d5cb0e5f67bc196b6ba", size = 548922, upload-time = "2026-10-11T01:01:56.547Z" },+ { url = "https://files.pythonhosted.org/packages/19/b0/5aa186d56ce2334dabe29b70bd99dc8ae926ee44184c0de64a53d415a4f3/aiohttp-3.14.5-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1eb8167961ec4dfcc8cb9dd50bd0ee72519f7ef496be95203e49e27b01618382", size = 1882422, upload-time = "2026-10-11T01:01:59.258Z" },+ { url = "https://files.pythonhosted.org/packages/db/f7/7d5c91bb9620db300c8ddb05337a9014301acb626223faff3abcb8ea47d7/aiohttp-3.14.5-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c1d60eafd9c7e8e74abd03a5b00df44e7febfe6d9b89b559c0a6551eef0699d4", size = 1843621, upload-time = "2026-10-11T01:02:01.417Z" },+ { url = "https://files.pythonhosted.org/packages/30/0a/b208953b96d8f24b75f6da704f508e6c5cf3022f52b60c61933df082e89c/aiohttp-3.14.5-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:137351bf20bbed9a65e839f4a4452ac377389bdb2f2857d2acffef38f5e9f2d1", size = 1927915, upload-time = "2026-10-11T01:02:03.697Z" },+ { url = "https://files.pythonhosted.org/packages/f6/79/90ebcccb55e2d1e11a1fed581d83bb966e38fb35fb4b2577fdc980f8707a/aiohttp-3.14.5-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:fba47bc2c3d7303c3d027c6cf4d07626c37b1314ac81f5820c31032e0ca1f677", size = 2036339, upload-time = "2026-10-11T01:02:06.046Z" },+ { url = "https://files.pythonhosted.org/packages/a6/66/55a8904b3a129fafdf94f9cc0a2e4ca09a3c914650be52355db7ad0bbdb6/aiohttp-3.14.5-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:94684b879ac1d71e4238850c99b62dc1b28d9086b156a2555f082010b85a865c", size = 1888041, upload-time = "2026-10-11T01:02:08.384Z" },+ { url = "https://files.pythonhosted.org/packages/0b/b8/96b25da7329a52e42c812b1e8b076386039ec4fc312afa043d173d8147fc/aiohttp-3.14.5-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:56572c42e3ecd636de8d2c3dd54cf5fc939cb5c32eb56297f176a0d366fac622", size = 1703849, upload-time = "2026-10-11T01:02:10.903Z" },+ { url = "https://files.pythonhosted.org/packages/1b/43/fbf976e3ae4c038d6f5c84945ab2150298c2d71201674d4e53d158063e75/aiohttp-3.14.5-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:a95529a92a446db351675f4aab518feaf5e99842f63f5dd17160c2b74f382db3", size = 1849703, upload-time = "2026-10-11T01:02:13.15Z" },+ { url = "https://files.pythonhosted.org/packages/8b/7d/218e912f4c1d89bde7ac551409be57ad2f6121638e56942d395a7cb1fa58/aiohttp-3.14.5-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:3edbece0379b8b4aaa67619b8aa2399bb66fce372cd5911098a434ea77220aa0", size = 1852695, upload-time = "2026-10-11T01:02:15.295Z" },+ { url = "https://files.pythonhosted.org/packages/5a/42/252a1b9287e3b6e393a1c3bd1776f36af30f5f25f071bbf2b0cb7eba9116/aiohttp-3.14.5-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:56d9828f204331a5ca8850fcfe2bcce95a149f1f223f60cc7216e5524978e480", size = 1893493, upload-time = "2026-10-11T01:02:17.93Z" },+ { url = "https://files.pythonhosted.org/packages/78/97/71cae83d5100556fad1521684f7cd1e3e578432644f850245ed3bd969310/aiohttp-3.14.5-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:20064a177a070d789ee64a50b01a9161d3468e989baacfc6c714aa685c4b332f", size = 1693468, upload-time = "2026-10-11T01:02:20.666Z" },+ { url = "https://files.pythonhosted.org/packages/1f/69/73d88e97a8b5f0ca7a946d0011c0de99fb188b1687c7948ecd0553dc5bf0/aiohttp-3.14.5-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:81c2b3dfd56c62bee6108e4852d5970b4cf9086390b6983f52b666e878c1f115", size = 1915398, upload-time = "2026-10-11T01:02:23.011Z" },+ { url = "https://files.pythonhosted.org/packages/05/f0/881644bcb15d4b258daea9b720a0af9dc4330496cc8d6ade9090cdd0cffc/aiohttp-3.14.5-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:09ec102b4b8c9a920275733bbc11fdbb615efe6f9231a06007c0218d336fb77a", size = 1871470, upload-time = "2026-10-11T01:02:25.278Z" },+ { url = "https://files.pythonhosted.org/packages/7f/de/19d9ebbcce5aedaa3242d8a99ff8816a60bdb7629fb0084bf4a45bfd1f62/aiohttp-3.14.5-cp314-cp314-win32.whl", hash = "sha256:9c428eb2bd8817588d16a0ab898aa4eb5d141f896aa2b394cc79a4cf61d9a8e2", size = 485517, upload-time = "2026-10-11T01:02:27.579Z" },+ { url = "https://files.pythonhosted.org/packages/a9/74/8cdaf0e58c2588371670d5a9a8215bbb971d36940b6e5d051967dd05c07d/aiohttp-3.14.5-cp314-cp314-win_amd64.whl", hash = "sha256:6f967dde489ca6a8c02d093ab245d2cbf50ccb5c36adf0188b17b0ca39d24b67", size = 511755, upload-time = "2026-10-11T01:02:29.685Z" },+ { url = "https://files.pythonhosted.org/packages/1a/6b/e0100e25502430a531c7cf1482a378d0b65bf728ab60c01ee270e56bc469/aiohttp-3.14.5-cp314-cp314-win_arm64.whl", hash = "sha256:1d2d981b53dd09a319e3570ef8cc3bbc3ef86f5a7abef0f6b2bff3867db3a9e7", size = 495151, upload-time = "2026-10-11T01:02:32.163Z" },+ { url = "https://files.pythonhosted.org/packages/9d/c2/ca2ead7b655688c53c03aeeb6e96e6851c9ff08d6be7b13802f53a6ae8fd/aiohttp-3.14.5-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:9ce66feae6ac65327379460380549bf1b8df8e17c4e25df2a2bcf168272e3bed", size = 855396, upload-time = "2026-10-11T01:02:34.443Z" },+ { url = "https://files.pythonhosted.org/packages/a7/70/22206fea409255a240c926ce11de48de354ae2bb90ca44f709c05497585d/aiohttp-3.14.5-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:27c2322e03f66101acb09869ce1cf1efc04994ee95e1735b69827bf8c8b9d781", size = 567734, upload-time = "2026-10-11T01:02:36.644Z" },+ { url = "https://files.pythonhosted.org/packages/ce/e5/79a36c118308b56f8667d67e05d2fb6dc638ab45985704cdb199631bedaa/aiohttp-3.14.5-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:ff75a7537413a86e7cafe98e0e1d6e3dc4b15c6349896e7d5c6b881bfdb6d550", size = 567379, upload-time = "2026-10-11T01:02:38.757Z" },+ { url = "https://files.pythonhosted.org/packages/63/a3/2ebec7dece3b1f02c30d2e484647f6f7b13952b1bb40a4cb285b849e8432/aiohttp-3.14.5-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9c061aa954daaf57d2a4b8374f9fca621ef0e1b603584431c220c22458c59b6d", size = 2050686, upload-time = "2026-10-11T01:02:41.169Z" },+ { url = "https://files.pythonhosted.org/packages/3a/d2/7e4d093db2f4450482652e7ef19a9e19919028f5135aa52bc4078c3beb80/aiohttp-3.14.5-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:1612fa5857b37bf32e5c1eaeefb96e3b01e9c70679eec81f0934e8a600080863", size = 1915077, upload-time = "2026-10-11T01:02:43.563Z" },+ { url = "https://files.pythonhosted.org/packages/a6/88/bd40d09958442a0a1df67da81de496361d6e2afc04f9db2950d835da750b/aiohttp-3.14.5-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:adbeee7d6fd4cf5fe0aece2fb3edc4243615d3180430ba8149d01a90670cac99", size = 2027204, upload-time = "2026-10-11T01:02:46.185Z" },+ { url = "https://files.pythonhosted.org/packages/63/eb/3a601c1f8d3103c1a60ea981f20924855da9f575d2007fc38f8898b792fb/aiohttp-3.14.5-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b2966998927d7bed9db12c0a4647b0c7b179755878fc9c357fe1ffd3e3b0c1a5", size = 2149520, upload-time = "2026-10-11T01:02:48.812Z" },+ { url = "https://files.pythonhosted.org/packages/22/d0/4e41bfe1b1ce1cb6f6d2e59fa7a88ef5cf92c402b2d07e9018778ba9edbc/aiohttp-3.14.5-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8e317e0fb6b16212c881d2205a7d87414c29acd69320b3aa6dce9d9c7b86fe4f", size = 2002039, upload-time = "2026-10-11T01:02:51.293Z" },+ { url = "https://files.pythonhosted.org/packages/6f/5e/72067019545c502b881b031153c437752ecef48d7d213bc0218ccebb4bfb/aiohttp-3.14.5-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:50343c1757b4b6f6708eeaf24534b32f19dfb99fb1b762c00420867a62fc81e0", size = 1786164, upload-time = "2026-10-11T01:02:53.533Z" },+ { url = "https://files.pythonhosted.org/packages/d9/fe/7741efd6119bfb7a00827fe6f7b84b4409de58d888ae21adc5a9a6824992/aiohttp-3.14.5-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:083673c7a94c3ea035caaa5ca04288bdb44887abfe1f5ba23294e6a4b03efd2d", size = 1970689, upload-time = "2026-10-11T01:02:55.888Z" },+ { url = "https://files.pythonhosted.org/packages/43/e7/342a13bf67f34d269bf2f7e870ecd72b99c832cc6f0a271a9210c0ebfb84/aiohttp-3.14.5-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:2528cb4c6b92008c76ac9ac6298624069bb2db91ff4929905512d1d84485f658", size = 1951967, upload-time = "2026-10-11T01:02:58.467Z" },+ { url = "https://files.pythonhosted.org/packages/e7/d4/fdb3b27340617e5e64df18a70fa89097778652ea5c7c7e2f79def76999c3/aiohttp-3.14.5-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:b1b8ece1e71132d2afba4dbc0c3d62c766e25165990b25db1196c04969eb3d84", size = 1968511, upload-time = "2026-10-11T01:03:00.883Z" },+ { url = "https://files.pythonhosted.org/packages/83/b2/e8f88298de78d1a951f36f9f966d38ec6ed1d4721303ba02064a545e8aa6/aiohttp-3.14.5-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:fce9523df31cea6284f3e2c479876750d7687cf671d7b25d32b19effc0e86441", size = 1778497, upload-time = "2026-10-11T01:03:03.206Z" },+ { url = "https://files.pythonhosted.org/packages/22/68/9ccdb93d664345c546be7f34480b921774d8c0d98f47e70d7e03b115d475/aiohttp-3.14.5-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:09e0eb18c7e0c8777e2f9149de63799195b9b3ca1b5c81ba6f32f2c6b8628210", size = 1999676, upload-time = "2026-10-11T01:03:05.829Z" },+ { url = "https://files.pythonhosted.org/packages/57/4a/a33cfa6dcb00e94194ae4fe710432ca4ed111e016356b4ba4d2f4c3a124c/aiohttp-3.14.5-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:6774814fd5c338e72ee0da5cbb9432816df450e69c019f72b5d29bdec2a1792d", size = 1963437, upload-time = "2026-10-11T01:03:08.196Z" },+ { url = "https://files.pythonhosted.org/packages/f4/20/eacbecfea3b5c3dcbfc9b023e3a5460f43e5dda16d06a2877ebe7184c3f3/aiohttp-3.14.5-cp314-cp314t-win32.whl", hash = "sha256:33f706574e32c6e694f352a856e05caf18f7f2c871b3e87b41c55ea452b409ab", size = 503973, upload-time = "2026-10-11T01:03:10.481Z" },+ { url = "https://files.pythonhosted.org/packages/ff/78/18eec294f6c8c5dc845dcf6d730a0147d8d0f17e86138a7bdb85e43a30fa/aiohttp-3.14.5-cp314-cp314t-win_amd64.whl", hash = "sha256:5ba14a839fbe87cf7c12a6b5661c05f324a296eb8363141edb3944ba63d4c9d3", size = 531190, upload-time = "2026-10-11T01:03:12.716Z" },+ { url = "https://files.pythonhosted.org/packages/9d/39/e53f8169acc85271ebd12b5b32ad7f1541b35639ccbe0f49034c64785d10/aiohttp-3.14.5-cp314-cp314t-win_arm64.whl", hash = "sha256:1061b364556e8172e8d46b0b183adeeb73e8c42d30ebc745591e1bd89acad52e", size = 510360, upload-time = "2026-10-11T01:03:15.08Z" },+ { url = "https://files.pythonhosted.org/packages/f3/1c/06d89f58b2db3ee92dd377217659d587e06f973e57bf0a97a0d8a4586c0c/aiohttp-3.14.5-cp315-cp315-android_24_arm64_v8a.whl", hash = "sha256:788ecaa9c10533b786ce5ba70c4f2df78ad41819fd00a6c99d92b66f9a32e1da", size = 540674, upload-time = "2026-10-11T01:03:17.483Z" },+ { url = "https://files.pythonhosted.org/packages/18/39/5e822e038f496f0540ada91e27099d48f9e7f919b6c6deb4cf6db36cc706/aiohttp-3.14.5-cp315-cp315-android_24_x86_64.whl", hash = "sha256:5c76f1802bab718a68ac3cce447160605c734551f95c67ae90fa1132b215cb29", size = 554183, upload-time = "2026-10-11T01:03:19.71Z" },+ { url = "https://files.pythonhosted.org/packages/9b/ff/0cf2619d902b5b160762422a7e5e02091295766a7fe4fcf5b9a655e386c1/aiohttp-3.14.5-cp315-cp315-ios_13_0_arm64_iphoneos.whl", hash = "sha256:a6d02b4c38de03d9c7617813433e6a0fb6b522797974177d69d9dad431900833", size = 523160, upload-time = "2026-10-11T01:03:22.193Z" },+ { url = "https://files.pythonhosted.org/packages/86/99/3553abfc53a40849dbaacc3f54c730ec58410809ffa2d05885ae56108f2d/aiohttp-3.14.5-cp315-cp315-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:20726f9782d5c2744c1c66255842d1d163bb3edcf768b8de25216bf47f7b6ccf", size = 530311, upload-time = "2026-10-11T01:03:24.435Z" },+ { url = "https://files.pythonhosted.org/packages/fe/a4/5d25f73754bc1e8f983ba704e86d641aea290c967f195f2aeebdaed2bd84/aiohttp-3.14.5-cp315-cp315-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:248d779ad720b49d4fb355720e60c9e5f444f95887bc16974fea48fc56c41789", size = 540274, upload-time = "2026-10-11T01:03:26.698Z" },+ { url = "https://files.pythonhosted.org/packages/29/a4/07eda5db2e3ee017d9590f36c12a94ec6f1f50516e8df78672373dfc7185/aiohttp-3.14.5-cp315-cp315-macosx_10_15_universal2.whl", hash = "sha256:0a8ea271867e360ac985ae607f4a23ad9a38414b9aca1d49ec98839ae660e49f", size = 819239, upload-time = "2026-10-11T01:03:29.481Z" },+ { url = "https://files.pythonhosted.org/packages/cb/aa/a8723dd987a696dd48d4cf2f0088e589ce77caebff0b96f2a78c20424380/aiohttp-3.14.5-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:823c910f046f23f4c713b8d99a2242dc65f591cb45ee86418fa11762a3c2963c", size = 549832, upload-time = "2026-10-11T01:03:32.02Z" },+ { url = "https://files.pythonhosted.org/packages/29/5c/969a1b72692055fd2a419590c41847ec9144fefb97b75ff1cde5b6372891/aiohttp-3.14.5-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:9b42db919715e91eb76acf3bc492a9a7ccd8bd9adc6745c1412b689735269f14", size = 549234, upload-time = "2026-10-11T01:03:34.469Z" },+ { url = "https://files.pythonhosted.org/packages/38/05/8e3e07fd8a0d33d06955ff4e54a1cb92f4bce347ff55e441dc3e25a7b5e5/aiohttp-3.14.5-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d3112585250b199296c26ca6e0131640b6a8d01bab8b232d2eb3763ed469de11", size = 1891314, upload-time = "2026-10-11T01:03:36.899Z" },+ { url = "https://files.pythonhosted.org/packages/b6/b3/05a79ce2e25f024e93de30c94f39dc6aa6e2bc1e9c531a5c4b18dc61b7a4/aiohttp-3.14.5-cp315-cp315-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c147451b4a58e7050f7f7394e6c467867c84161560001f9ad4fb2d1446743946", size = 1884372, upload-time = "2026-10-11T01:03:39.334Z" },+ { url = "https://files.pythonhosted.org/packages/94/52/0fd8af0717db109eea258191b326b5cb5847fb88928bfa6c862fd78b9ad3/aiohttp-3.14.5-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:bf163cc701f3d4ac43ba7d97771bf5fd955220ef5500ef3ee847bc0ecfbf4ec1", size = 1930957, upload-time = "2026-10-11T01:03:42.172Z" },+ { url = "https://files.pythonhosted.org/packages/4e/b3/fa78733da88812bf9fb193913fb0ce1548f8b6912047633fdf88a758ff8c/aiohttp-3.14.5-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f8d40ce41991e9d56fab4f5dc4a51fe59bc3b5c77c27f4b148963064d00232e8", size = 2038886, upload-time = "2026-10-11T01:03:44.646Z" },+ { url = "https://files.pythonhosted.org/packages/cf/f5/2fcc5e30053a938286f17d0edf3f0850b8061b984256fa7c26850b9c8809/aiohttp-3.14.5-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:276a4fc00b1d9ae492b802763a789c5b86328b989c5ea169f2faa447d6a11c7c", size = 1894470, upload-time = "2026-10-11T01:03:47.304Z" },+ { url = "https://files.pythonhosted.org/packages/62/2a/f87feb42abe8e6a7c03814dbcb711540849a1e90aa392055f3183c643610/aiohttp-3.14.5-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:50983e3be33d8c0942ab88cec3905b10602f64c469b20153c48c5d4e558dd016", size = 1716273, upload-time = "2026-10-11T01:03:50.121Z" },+ { url = "https://files.pythonhosted.org/packages/81/b2/adf1f960dd977722ed1347d33da512a1624807114f57a3b91f5cc828e081/aiohttp-3.14.5-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:16c8abd5bca220a47efe667d26f8460124c81810787e79ee87b242677563d9dd", size = 1857513, upload-time = "2026-10-11T01:03:52.959Z" },+ { url = "https://files.pythonhosted.org/packages/d7/fd/ef8d910e641de4160026a513ace5888b7f92826bbc3fd90ced05d55a828e/aiohttp-3.14.5-cp315-cp315-musllinux_1_2_armv7l.whl", hash = "sha256:0790ec66fa4013e83c53b9025a45d454723da1a2fce28b3208c9b32d08af162f", size = 1887704, upload-time = "2026-10-11T01:03:55.641Z" },+ { url = "https://files.pythonhosted.org/packages/7e/db/6c9142f941cba8d35be8e1fae6ea2bd390e754fc14076b8147aee1a4592f/aiohttp-3.14.5-cp315-cp315-musllinux_1_2_ppc64le.whl", hash = "sha256:cb11a971a3aea10f9b8373be628f1df932964fc6c6b174516d318a48c3ac4412", size = 1895684, upload-time = "2026-10-11T01:03:58.18Z" },+ { url = "https://files.pythonhosted.org/packages/e6/7c/6a6bd9a72e576d376c668333b00c51c6147aba4fb863ed6c94996d497eca/aiohttp-3.14.5-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:932ce7e694bbc29b2bf6f64f2343c27d148d4997c771d01bdade4639b6749ff4", size = 1706299, upload-time = "2026-10-11T01:04:00.8Z" },+ { url = "https://files.pythonhosted.org/packages/69/ec/d2cc494242f8c4d3d1cd70baf591742818a74386dc3b84af3195c5c4fced/aiohttp-3.14.5-cp315-cp315-musllinux_1_2_s390x.whl", hash = "sha256:a7d470cf7b206e6359fc77b1b860632fde400d5a2ed59cd0181b93a686bc81ee", size = 1916645, upload-time = "2026-10-11T01:04:03.892Z" },+ { url = "https://files.pythonhosted.org/packages/a3/6e/e852c53647e815db09a1b6b5ab634f54bd736412397e11940feef4d2c89a/aiohttp-3.14.5-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:6e1d8637cf73eebc92eba2e11d4cfff98a3b562f2505bd75bba766d908926e8d", size = 1875408, upload-time = "2026-10-11T01:04:06.922Z" },+ { url = "https://files.pythonhosted.org/packages/fe/f6/72ab6ef20c332399be593bac543d2c24a6d241e39d3540ce9f95a63e4bd2/aiohttp-3.14.5-cp315-cp315-win32.whl", hash = "sha256:fbdc5ec49f9ca3cd24955cf3520b10a4d4c901ba2572094c84274e9e7eb30534", size = 485590, upload-time = "2026-10-11T01:04:09.626Z" },+ { url = "https://files.pythonhosted.org/packages/06/eb/e9de75b8c6d2170c42c08ff303abf857ea8a6d9d9b6e99b5aba40f15e962/aiohttp-3.14.5-cp315-cp315-win_amd64.whl", hash = "sha256:a9d3983bd6ab7aa1cfd573544ae98df9b6cb6912a5185a198263e024a636861d", size = 511740, upload-time = "2026-10-11T01:04:12.277Z" },+ { url = "https://files.pythonhosted.org/packages/fc/25/455f3c2785eb0d50748cffd0abd07500815f419a9495b14610b7622d8d2d/aiohttp-3.14.5-cp315-cp315-win_arm64.whl", hash = "sha256:e29347c142cf6e99e0dff5e2995ead1d50fa3b51bf37a7c726a7ccfe5419745a", size = 495171, upload-time = "2026-10-11T01:04:14.667Z" },+ { url = "https://files.pythonhosted.org/packages/e7/6c/497f0a98782eebfcf0f02a7fbdef5428148bd426027140cbad494cf842b5/aiohttp-3.14.5-cp315-cp315t-macosx_10_15_universal2.whl", hash = "sha256:9bf1d5dcc15204d9ec8b8ea4c18fd66e6b80e5de1f4ecbafb3a2f2740f8039d4", size = 855638, upload-time = "2026-10-11T01:04:17.154Z" },+ { url = "https://files.pythonhosted.org/packages/9a/c5/55c0cef2572af9b1ee81608f7c0a1bf74e6c9151a73b04915d933f192335/aiohttp-3.14.5-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:14f04769cfefe4734016a856a83af36133cd17779cef9ae817f812b8ba9d6d51", size = 567455, upload-time = "2026-10-11T01:04:19.702Z" },+ { url = "https://files.pythonhosted.org/packages/4d/47/e1a0e39f4a2b881f6071225afaf94a6547001b5aefc1566734d73c685934/aiohttp-3.14.5-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:6e4251c0ba4624a68a2c11471a1ac54c3306876c21f0ae86de085cc9241c8905", size = 567836, upload-time = "2026-10-11T01:04:22.235Z" },+ { url = "https://files.pythonhosted.org/packages/c3/1d/817d85836f52b687160064a326e62e037dc42f1ad5b6b5188a70e5c134b5/aiohttp-3.14.5-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e4f5cf4dc72a71c4cfa9751b4950be22f733626670230d46e7d606592aa22d59", size = 2051409, upload-time = "2026-10-11T01:04:24.821Z" },+ { url = "https://files.pythonhosted.org/packages/f7/25/e8ea6fc212a9aabce982917346ce8ecab0929c74b60232a056dd11c99da0/aiohttp-3.14.5-cp315-cp315t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:dbf53ae2601b7fd5a93c3944deea3a78d40f495226d582c35ef7a433425ce2b2", size = 1936493, upload-time = "2026-10-11T01:04:27.456Z" },+ { url = "https://files.pythonhosted.org/packages/24/33/de0517f71f1a19feea4aff78a2ec4ec2d98634129ec30ead78fce2f8f81b/aiohttp-3.14.5-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:657291433bf4dd3142f3abac495764cd47d0c7c92087751e6666c6447e65fcef", size = 2021405, upload-time = "2026-10-11T01:04:30.276Z" },+ { url = "https://files.pythonhosted.org/packages/c4/11/ddaf2e7930543e9f0cad3a1c54e1af0c1bd2fae3973d568c4263d3b010e9/aiohttp-3.14.5-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:3e51a27980c3788e6e6b3325d694fdd4898087fa8a86b2763af77b39353da41e", size = 2142017, upload-time = "2026-10-11T01:04:33.022Z" },+ { url = "https://files.pythonhosted.org/packages/1d/7b/58784353c06de8adc20f426daad3d85dd86fd55331c713a3f4b638c94573/aiohttp-3.14.5-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:82c7583cd3dfdc7dcc927835b4f6c7faae7ecc1ba3ca5879321621ae2e6f8e84", size = 2002482, upload-time = "2026-10-11T01:04:35.94Z" },+ { url = "https://files.pythonhosted.org/packages/b9/f0/417d9535caa9e165ffe6a53e2347a78107e7c87dcb0e10aca315c3af0344/aiohttp-3.14.5-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:6fdcd6af7e2e51d1ba1b4bea16e97b074bcb7b5dd0246a9d8201341bb28085a0", size = 1791774, upload-time = "2026-10-11T01:04:38.733Z" },+ { url = "https://files.pythonhosted.org/packages/98/01/25e49c2e8a01b9f0e19ca0a8448ad50aa2bdf96c8cd41e92bd45af044784/aiohttp-3.14.5-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:c8859a013ae0de1074660992139a1a440df3e6b219b86cf0d3f11c2692bb4fe3", size = 1970358, upload-time = "2026-10-11T01:04:41.66Z" },+ { url = "https://files.pythonhosted.org/packages/2d/fc/c132fd3465b6c7e4ce0193154f602c3e6c46b680e4da7eb3bd0d8a40d1c7/aiohttp-3.14.5-cp315-cp315t-musllinux_1_2_armv7l.whl", hash = "sha256:8966ecac808dd5f473c9c4cefd10cd3ffda71c18a4d3493b7c7d2ae1803bf2cc", size = 1969192, upload-time = "2026-10-11T01:04:44.66Z" },+ { url = "https://files.pythonhosted.org/packages/95/4e/d58b45e7dba4eb607eca11fc0a4aa77ae0f39c11afa804635a61ce18cff4/aiohttp-3.14.5-cp315-cp315t-musllinux_1_2_ppc64le.whl", hash = "sha256:3093b72c215bda16ce961a6d073f6e71d46e022962a9d5d457c5d4d421c78b57", size = 1963618, upload-time = "2026-10-11T01:04:47.505Z" },+ { url = "https://files.pythonhosted.org/packages/a2/d9/f6ac50946efb3490428ef52b56e62c1c6b7f9c6ff3ec6083535526c83e60/aiohttp-3.14.5-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:149fb56caf7acb67073126f675d0958d9c4b3125fcd3f6d4877df98aa8a97ce9", size = 1784817, upload-time = "2026-10-11T01:04:50.287Z" },+ { url = "https://files.pythonhosted.org/packages/d0/2f/f255eb63da788cd8a452fe350869c03266ccad7d884925f6963c87808f24/aiohttp-3.14.5-cp315-cp315t-musllinux_1_2_s390x.whl", hash = "sha256:293d3ae7c6a0ed176a42e59a1b5fde825ead65c835360f734148e96729f928d2", size = 1995956, upload-time = "2026-10-11T01:04:53.213Z" },+ { url = "https://files.pythonhosted.org/packages/d9/9b/241aa3393eaafda0034470add1625f82a4c252901108723b283a9b0b32ca/aiohttp-3.14.5-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:3f2dcc00191fd563e9075181a14ec31d7dd63223ced7582cc70a15a499de0c79", size = 1967794, upload-time = "2026-10-11T01:04:55.958Z" },+ { url = "https://files.pythonhosted.org/packages/5f/7f/a68e689288c9e4bfcf8d0979f2b12b774bf01861985420df6150eba5448e/aiohttp-3.14.5-cp315-cp315t-win32.whl", hash = "sha256:7779cd97e61ebe583ec2f1c5616cdd038aa08a4453b1848c67842176d054948e", size = 503876, upload-time = "2026-10-11T01:04:58.978Z" },+ { url = "https://files.pythonhosted.org/packages/a4/78/49b0299da6d54de19fc6fdc6889d50233ac47d192a461624f4fc010fde83/aiohttp-3.14.5-cp315-cp315t-win_amd64.whl", hash = "sha256:0e6f16f5e49c4b8267988c05ab07760d7064cea57d077c3d068d04b0fbb992cb", size = 530957, upload-time = "2026-10-11T01:05:02.23Z" },+ { url = "https://files.pythonhosted.org/packages/21/d4/b0afc936aeb6d2f93157e3408b069ec5d7934429ae7d023de5e0953b1887/aiohttp-3.14.5-cp315-cp315t-win_arm64.whl", hash = "sha256:1aead151c3abbac6b32942e452020cb66d7efc099d253cc6c20f748e926c858b", size = 510408, upload-time = "2026-10-11T01:05:05.362Z" },+ { url = "https://files.pythonhosted.org/packages/68/30/173960c42b05a6c59f7558e4b12a4b0d9ba376cf6aa9bde7f9e08a30ca8d/aiohttp-3.14.5-py3-none-any.whl", hash = "sha256:efc21a454892828368b11c2c780de0ff8bc991f73f6b99c6b66e56205470929b", size = 279517, upload-time = "2026-10-11T01:05:08.523Z" },+]++[[package]]+name = "aiosignal"+version = "1.4.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "frozenlist" },+ { name = "typing-extensions", marker = "python_full_version < '3.13'" },+]+sdist = { url = "https://files.pythonhosted.org/packages/61/62/06741b579156360248d1ec624842ad0edf697050bbaf7c3e46394e106ad1/aiosignal-1.4.0.tar.gz", hash = "sha256:f47eecd9468083c2029cc99945502cb7708b082c232f9aca65da147157b251c7", size = 25007, upload-time = "2025-07-03T22:54:43.528Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/fb/76/641ae371508676492379f16e2fa48f4e2c11741bd63c48be4b12a6b09cba/aiosignal-1.4.0-py3-none-any.whl", hash = "sha256:053243f8b92b990551949e63930a839ff0cf0b0ebbe0597b0f3fb19e1a0fe82e", size = 7490, upload-time = "2025-07-03T22:54:42.156Z" },+]++[[package]]+name = "aistudio-sdk"+version = "0.3.9"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "bce-python-sdk" },+ { name = "click" },+ { name = "prettytable" },+ { name = "psutil" },+ { name = "requests" },+ { name = "tqdm" },+]+wheels = [+ { url = "https://files.pythonhosted.org/packages/c2/56/ce14f76c1892f335fbcd82568d347fd1652e1a4b0b76ac4a4cd90e1ae202/aistudio_sdk-0.3.9-py3-none-any.whl", hash = "sha256:41621d052ddb7a58643438a7ca541f58ef0ab94a2acdfff0a71db81bf68dc027", size = 67186, upload-time = "2026-07-27T06:44:45.294Z" },+]++[[package]]+name = "annotated-types"+version = "0.8.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/5f/56/a8120250d128bed162cd73c76d45f6ef9991f3e068f62a8ee060afa3104a/annotated_types-0.8.0.tar.gz", hash = "sha256:13b2beaad985e05e2d6407ee4c4f35590b11f8d693a258a561055cac8f64cab7", size = 15893, upload-time = "2026-07-23T20:16:13.995Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/99/91/8acff4f5e50511b911bbccb72b8628a49c68ce14148cd9f6431094859a90/annotated_types-0.8.0-py3-none-any.whl", hash = "sha256:f072f4d804ea359e4eaf198b1af7a8b0943881a87f31bb764f8bf219bb9419e0", size = 13427, upload-time = "2026-07-23T20:16:12.938Z" },+]++[[package]]+name = "anyio"+version = "4.15.1"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "exceptiongroup", marker = "python_full_version < '3.11'" },+ { name = "idna" },+ { name = "typing-extensions", marker = "python_full_version < '3.15'" },+]+sdist = { url = "https://files.pythonhosted.org/packages/a9/d2/f4d173e22df740bc37b1db102b386ba719b66e95b0f0d751f556b387e6d2/anyio-4.15.1.tar.gz", hash = "sha256:9f28306018cbd6d329e64a36d58256edff76dd996fe423bc957326e578b82a94", size = 276966, upload-time = "2026-09-05T10:42:39.44Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/12/b8/4bd346e22b28902df4d651910f5242c28d84e4a5c2435ca5c3f797ed7e2e/anyio-4.15.1-py3-none-any.whl", hash = "sha256:6152fdbbf9a77fdec97731721bebf7c4c44f7c29b424b0065826173efc7ed101", size = 132079, upload-time = "2026-09-05T10:42:37.923Z" },+]++[[package]]+name = "async-timeout"+version = "5.0.1"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/a5/ae/136395dfbfe00dfc94da3f3e136d0b13f394cba8f4841120e34226265780/async_timeout-5.0.1.tar.gz", hash = "sha256:d9321a7a3d5a6a5e187e824d2fa0793ce379a202935782d555d6e9d2735677d3", size = 9274, upload-time = "2024-11-06T16:41:39.6Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/fe/ba/e2081de779ca30d473f21f5b30e0e737c438205440784c7dfc81efc2b029/async_timeout-5.0.1-py3-none-any.whl", hash = "sha256:39e3809566ff85354557ec2398b55e096c8364bacac9405a7a1fa429e77fe76c", size = 6233, upload-time = "2024-11-06T16:41:37.9Z" },+]++[[package]]+name = "attrs"+version = "26.1.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/9a/8e/82a0fe20a541c03148528be8cac2408564a6c9a0cc7e9171802bc1d26985/attrs-26.1.0.tar.gz", hash = "sha256:d03ceb89cb322a8fd706d4fb91940737b6642aa36998fe130a9bc96c985eff32", size = 952055, upload-time = "2026-03-19T14:22:25.026Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/64/b4/17d4b0b2a2dc85a6df63d1157e028ed19f90d4cd97c36717afef2bc2f395/attrs-26.1.0-py3-none-any.whl", hash = "sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309", size = 67548, upload-time = "2026-03-19T14:22:23.645Z" },+]++[[package]]+name = "bce-python-sdk"+version = "0.9.79"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "crc32c" },+ { name = "future" },+ { name = "pycryptodome" },+ { name = "six" },+]+sdist = { url = "https://files.pythonhosted.org/packages/9d/64/d31e61620ddaecb7039dc7b8f62eb75b95d2281f2d2016b6d6b22396e16f/bce_python_sdk-0.9.79.tar.gz", hash = "sha256:cd77476b43347ed28d0211d5ad557e524e1ec648bd093d57c6a6d3de075a7508", size = 322059, upload-time = "2026-09-01T05:48:52.013Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/ef/de/52b763b183e23f4dd73811a2dd2664824ae7fc6ceb1aa8dcd3f1102b1094/bce_python_sdk-0.9.79-py3-none-any.whl", hash = "sha256:71799ac8740505e0759d30873f6f1a478fa8f83aedf425d511f1419a5f30082e", size = 440268, upload-time = "2026-09-01T05:48:50.459Z" },+]++[[package]]+name = "beautifulsoup4"+version = "4.15.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "soupsieve", version = "2.10", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11.5'" },+ { name = "soupsieve", version = "3.0.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11.5'" },+ { name = "typing-extensions" },+]+sdist = { url = "https://files.pythonhosted.org/packages/43/65/318323f98dbee45d42dff61d8f047181bc6f2268a9068cfad035a46be5af/beautifulsoup4-4.15.0.tar.gz", hash = "sha256:288e3ca7d54b06f2ac191970bc275c1939cb46d450b255bf6718b04aa37ab4f7", size = 632571, upload-time = "2026-06-07T16:44:20.453Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/88/c6/92fcd42f1ba33e1184263f25bfabf3d27c383410470f169e4b8163bf9c17/beautifulsoup4-4.15.0-py3-none-any.whl", hash = "sha256:d6f88de62e1d4e38ecb1077eb9724cd0eff29d2a08ca16a401e9b9e93f117cf9", size = 109924, upload-time = "2026-06-07T16:44:21.566Z" },+]++[[package]]+name = "certifi"+version = "2026.10.18"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/7e/eb/a2aa1ac3ea30dd3f30ca57f40232138b6b0040719316ecb85daf61167771/certifi-2026.10.18.tar.gz", hash = "sha256:b9995d97b64d0431a5af837d8ca8cd6238104d1f319f04bd93ea43124d6c861e", size = 135227, upload-time = "2026-10-18T16:21:07.655Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/08/ba/95dd616042484f7c83a06974388b37b837732740ee70bc5dc715b5fcd55a/certifi-2026.10.18-py3-none-any.whl", hash = "sha256:73191c47aaa79da394e8fee2dbc2ec827432cab56311122c9e47abf79e390f62", size = 134093, upload-time = "2026-10-18T16:21:06.276Z" },+]++[[package]]+name = "cffi"+version = "2.1.1"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "pycparser", marker = "implementation_name != 'PyPy'" },+]+sdist = { url = "https://files.pythonhosted.org/packages/9e/ef/008a1939e372c06329a3fce4279c02f328488f3526744906eeec3da7ad5f/cffi-2.1.1.tar.gz", hash = "sha256:dd31f52ea1086513bb9df30f8fcee9b8918323ae067a3d5b78bc826a000712be", size = 530807, upload-time = "2026-08-03T21:21:18.939Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/b6/d2/2cde336b375f55c76ca670f0be3978cc048e31e24f3b4d7ce8473150a388/cffi-2.1.1-cp310-cp310-macosx_10_15_x86_64.whl", hash = "sha256:baed1e86cc735622097354b9d1281406caf42ff42a886d29faa8e8d1630333be", size = 183779, upload-time = "2026-08-03T21:19:15.602Z" },+ { url = "https://files.pythonhosted.org/packages/94/1a/4b2f7c92293ba05cbd4a9a1b28faaf0326272d9488e6354657571c48a7aa/cffi-2.1.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ca82be1a1d406ecfe1d25dc16cb33488e5a16bf4438c9fb590484ea29d92478b", size = 184178, upload-time = "2026-08-03T21:19:16.67Z" },+ { url = "https://files.pythonhosted.org/packages/17/0b/ba385d8ccedf926c3cd06e8e2f327027da5afe5f0eb30f1f7bc43ac55125/cffi-2.1.1-cp310-cp310-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:42e2f76b9455f5a9a844f770bf3e200ed3da0e15f5df3db9c31fe80b04b3d004", size = 211037, upload-time = "2026-08-03T21:19:17.705Z" },+ { url = "https://files.pythonhosted.org/packages/a3/b9/0f2e58b2cefa33255bff36935d42b13180fe559bba82596540eb404bde7d/cffi-2.1.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:5a59cc1c4442bc3d5c703bf720b51138d0bfc173618807c9ee2490a7541dd3d9", size = 218652, upload-time = "2026-08-03T21:19:18.735Z" },+ { url = "https://files.pythonhosted.org/packages/37/15/180e0dab27b9312c7479003d14c9e547634b7dcb934e2cc4650e1b131a7a/cffi-2.1.1-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:9f8d177621de5cb38ee3e731eda45d421db093ec0739f46a5594babda7987a98", size = 205422, upload-time = "2026-08-03T21:19:19.96Z" },+ { url = "https://files.pythonhosted.org/packages/18/d4/03026f0c850cbbaa9030750490225b4a7f4d524ea4df72c3cc740a90f4ef/cffi-2.1.1-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:75f80557d1389eddbd0de2681f6a390a0c5338c31ddaa821381c203fc3fd50d9", size = 205444, upload-time = "2026-08-03T21:19:21.246Z" },+ { url = "https://files.pythonhosted.org/packages/75/77/60bebf6f818bec84210ac5b6979ce4eeadce6fbbaabc9c7ab23e506d1ce5/cffi-2.1.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:194cffa889098ced9976c3fc6340305e43f6303657d298da55366907c05c22d6", size = 218742, upload-time = "2026-08-03T21:19:22.523Z" },+ { url = "https://files.pythonhosted.org/packages/b0/ae/679bf47e73fd77b352171727f07de559a003f14de5d02b904a6ec1fa73ca/cffi-2.1.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:5bb4e7ea95dcd6a014a6fef62e62467d67d8e582326443f3d68e71d6320a9fcf", size = 221054, upload-time = "2026-08-03T21:19:23.694Z" },+ { url = "https://files.pythonhosted.org/packages/09/b8/eefc0e06913b70aa153bf74c946094a18f58fd4aff11b7f372bfdfdca050/cffi-2.1.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:3d22a20b1fb1632cc72c22f95f7b0d2961c3e1c235f245ba4c606c4771035659", size = 213489, upload-time = "2026-08-03T21:19:24.922Z" },+ { url = "https://files.pythonhosted.org/packages/6f/13/4e56852824a03cdf68523a35686f1c28eacd4bd30a7b0a78e682e6e6e1d3/cffi-2.1.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:1dea0e4d7d4f11f619fe8c1d76caf49e24405b4b5743c0e3be16a500ecd930c9", size = 220241, upload-time = "2026-08-03T21:19:26.214Z" },+ { url = "https://files.pythonhosted.org/packages/99/7f/040f9e163e4acac3ee3d85b02d00b2576e7ca980d8785f0a3a5f1a9bf7f5/cffi-2.1.1-cp310-cp310-win32.whl", hash = "sha256:7ce713ace7c0e4520535b42b77eaa742c16dab813978064913e5a3cf82973b41", size = 174578, upload-time = "2026-08-03T21:19:27.338Z" },+ { url = "https://files.pythonhosted.org/packages/ba/0b/644a2ec1a4eaba49c2939410bb1eb1d25b09d6d0582f5d2f95c537043725/cffi-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:a48d62ab9d6f4f98c983223a547af44be6ca3691074c31cecced6facd3ba2dc1", size = 185082, upload-time = "2026-08-03T21:19:28.409Z" },+ { url = "https://files.pythonhosted.org/packages/70/d2/16d99a0c4948febc0ebd133a13b2f688ff7f8cb04da971e1128872ce0c03/cffi-2.1.1-cp311-cp311-macosx_10_15_x86_64.whl", hash = "sha256:c8d2c9fd1f2d16f780d15127abb050d13d1a76c03a4bd87d7e4980e45e511e12", size = 183838, upload-time = "2026-08-03T21:19:29.637Z" },+ { url = "https://files.pythonhosted.org/packages/cd/95/31b535a9f0220ae9f357de4a08d57ce89cb417653c2fd9f075f50822a388/cffi-2.1.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:398aff33cee2767e3e781d2554c54bd0dff386bb437581e0d8011fde1a942ec1", size = 184168, upload-time = "2026-08-03T21:19:30.764Z" },+ { url = "https://files.pythonhosted.org/packages/ad/5a/4707a0dc1f203f5dde5a907b0d4e3c25d71120241048bd5bc6f1bb9d4e71/cffi-2.1.1-cp311-cp311-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:154852545011f779917b11c78db2358d095da62a9a172b78ad0a583ee5adc0d0", size = 211805, upload-time = "2026-08-03T21:19:31.867Z" },+ { url = "https://files.pythonhosted.org/packages/ad/66/c19feabb28485b6e0bbaaafa90837a1ef5d302e90f2178bd33f17a49879b/cffi-2.1.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:3311ed60d36f83378794e1009ac6258bafbf81f7888b4caa7b35a521e3f95813", size = 218716, upload-time = "2026-08-03T21:19:32.896Z" },+ { url = "https://files.pythonhosted.org/packages/a7/92/500760486c8baab49a7a8a58ba7fc3355ec3974b454b8a09e528efde9e1d/cffi-2.1.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:6e192623c49c94421616a5778fba35cf0d5a8d000650c1967ef4448ee5cdd990", size = 205569, upload-time = "2026-08-03T21:19:34.142Z" },+ { url = "https://files.pythonhosted.org/packages/a5/a7/a67c733254d6e7373f7822f8082d8d6beade791e0cf12a7611f376fa61c7/cffi-2.1.1-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:a6e721d4b0e45d5b65e87534470e67b18dcd092c83f68fba09f152b9cbc061af", size = 204907, upload-time = "2026-08-03T21:19:35.174Z" },+ { url = "https://files.pythonhosted.org/packages/f7/a4/4399daaf8f7dfee9d7c3327fdb0426ee041cc63edc358b93911ceb2bfc7a/cffi-2.1.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:34e261f78cb6ceaaa36f42f2613f4380d94d9c759a9c73c769ee6e0247364632", size = 217807, upload-time = "2026-08-03T21:19:36.286Z" },+ { url = "https://files.pythonhosted.org/packages/28/f7/dabe6da2466ecbd82dc62e7342dc6b1065dad990c06f00f0ede9ebf2a0ed/cffi-2.1.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:7225e4514edb64eb6740324353e0da0711954fd8d7da4576755b1c6e09b697cd", size = 221252, upload-time = "2026-08-03T21:19:37.416Z" },+ { url = "https://files.pythonhosted.org/packages/ce/87/616202d8e51342c07d2534c510111c4cc37201775ce8f60802c9335d1edd/cffi-2.1.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:df913725b79db7bcf03448f36b7bf8815363417d5b58deecf9305e3e30f0f21a", size = 214214, upload-time = "2026-08-03T21:19:38.507Z" },+ { url = "https://files.pythonhosted.org/packages/b4/c6/ab025d75d2c26c19b087c0124e75ee31cb65032f4fe345d356d8c507ab97/cffi-2.1.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f5cfbc5fe74540d335175b656c725d74d90e3730c626d92575eea35029d9afaa", size = 219408, upload-time = "2026-08-03T21:19:39.809Z" },+ { url = "https://files.pythonhosted.org/packages/db/e2/7e8109f65445bdc673a7b54f02c677de462db75674220fd1335efc8eb598/cffi-2.1.1-cp311-cp311-win32.whl", hash = "sha256:f8ec5e643a9a937f64e1999eb9f75d072263751912dc5cd06d3c85f8f44be7c3", size = 174470, upload-time = "2026-08-03T21:19:41.246Z" },+ { url = "https://files.pythonhosted.org/packages/73/c0/77ba02423c2f7d7091143c45cd49e0e6575c4c1967394bb542bd923a9b74/cffi-2.1.1-cp311-cp311-win_amd64.whl", hash = "sha256:42f6930c31dc7f50732c9ae793c2786c7b6b044195967bbdde40bb9be81c4cc0", size = 185096, upload-time = "2026-08-03T21:19:42.615Z" },+ { url = "https://files.pythonhosted.org/packages/7c/47/9f1f85f9672ceda4984dc6c4f8824e8558992a2972c3d3c81fb8eb28d4ba/cffi-2.1.1-cp311-cp311-win_arm64.whl", hash = "sha256:c7659f22557c5a0bc4855cd635f55edec690cc008a40768527762cb9fb263455", size = 179941, upload-time = "2026-08-03T21:19:43.747Z" },+ { url = "https://files.pythonhosted.org/packages/10/69/43965eccfdead3b9220015fd1320e117be8c6ed01a62ffab76eeb752f5d5/cffi-2.1.1-cp312-cp312-macosx_10_15_x86_64.whl", hash = "sha256:c8c69575568085ba0b1b10c0249d779a214aea6f6522e949a0fc9fb0fcb449d0", size = 184821, upload-time = "2026-08-03T21:19:44.887Z" },+ { url = "https://files.pythonhosted.org/packages/54/7d/16e5a096677b5e313ca80cd5e5170efa3ea44624a82bb111925522da64b1/cffi-2.1.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f81b3b8f3d4e343550fa4baa0e479bba9f2d29ce9c2e9b51d1ce1718d7442fcf", size = 184719, upload-time = "2026-08-03T21:19:46.129Z" },+ { url = "https://files.pythonhosted.org/packages/56/e6/8941622732edec876dd17d0453dce07317ae96db34f2ec1436c9d3785986/cffi-2.1.1-cp312-cp312-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:811bd1e21d32de12efca32393a0ab3f5133b54fce9bd44b8bd77ab07da14bf6a", size = 214799, upload-time = "2026-08-03T21:19:47.218Z" },+ { url = "https://files.pythonhosted.org/packages/44/de/f98430906df1545ffde0d543dd124a7a439bc2cd32b36b9c53f805df7333/cffi-2.1.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:68e62fe11f30d5ca8289242866f0a5291402d8529ca2178ab8afc5c9694ae890", size = 222389, upload-time = "2026-08-03T21:19:48.331Z" },+ { url = "https://files.pythonhosted.org/packages/6a/5b/717f1526b9957b34456313c31645c5b82b8fb5c3fe9e4752999be7128bfc/cffi-2.1.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:4a7c934f7360e8cd64fe9efadcbd10c7c6364f531e432b9a4bf5ccbc9e0e8b50", size = 210249, upload-time = "2026-08-03T21:19:49.543Z" },+ { url = "https://files.pythonhosted.org/packages/64/b3/f8aa4f3e34986c7e4ec45072d1b1b9dd295b6b18007b45518d79726dd725/cffi-2.1.1-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:3143d81e29e1e20a9ce10901ec369012947876596f75a222235965f2b7ae832e", size = 208775, upload-time = "2026-08-03T21:19:50.918Z" },+ { url = "https://files.pythonhosted.org/packages/b1/db/dceb9dd5b231e1da801793f8acc9f3c52a7e1afe40bb1aae37e02b0faad5/cffi-2.1.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c1453022f490d2459a11819d83ad1d586e9ff65a12ac3e705ffebd46d3685dcf", size = 221822, upload-time = "2026-08-03T21:19:52.054Z" },+ { url = "https://files.pythonhosted.org/packages/a0/d2/6cd24ae3be000a634109c247d1475d62e5616d0dc78c82770942ec384248/cffi-2.1.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:208f941bb9d18e768138677f0a6d2ce01f590df56043dda1df1535ac57c88517", size = 225232, upload-time = "2026-08-03T21:19:53.109Z" },+ { url = "https://files.pythonhosted.org/packages/cb/52/3fa190537004dd7f0ab860a6dc7c0175b8667f68d1e618a46f5498d30250/cffi-2.1.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:210019b6c7cf07f081b4c54635c8cf744377001350e29cc0f81c4377b4797735", size = 223597, upload-time = "2026-08-03T21:19:54.515Z" },+ { url = "https://files.pythonhosted.org/packages/80/fb/0bb75b7039588c074b37ae99f40d9bfddf990ecb2fbc346ebccd2e56b9be/cffi-2.1.1-cp312-cp312-win32.whl", hash = "sha256:046bfc24911b37851ee1b51aab8bffe713d89c68c6a057b09484ce9fd5f69b4e", size = 175292, upload-time = "2026-08-03T21:19:55.566Z" },+ { url = "https://files.pythonhosted.org/packages/d9/79/615cc094e2fb508cade7de88d3b4f6c4ec2bab695c97bce9153dc65aadf5/cffi-2.1.1-cp312-cp312-win_amd64.whl", hash = "sha256:f53e442b08449d42821fa4a4fba000095af9f62742a500f978a9f557ec44339a", size = 185919, upload-time = "2026-08-03T21:19:56.89Z" },+ { url = "https://files.pythonhosted.org/packages/70/c6/d0ea84713fe46b243a436a18fcd47d639732747e21635c8a27191b06dc30/cffi-2.1.1-cp312-cp312-win_arm64.whl", hash = "sha256:7bde5e4cc5c10140859842b9d383af292b22639a4dffb725314baf45968cef80", size = 180093, upload-time = "2026-08-03T21:19:58.155Z" },+ { url = "https://files.pythonhosted.org/packages/9d/f4/035513d4117049066b4779dc3b7c0c0fdad175fa13731c9f4003f1cd1478/cffi-2.1.1-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:b5bdfd1c873d4e093aabc0ca84c4ca6dbc4f752afb5c86f146d9742580c9da2e", size = 194248, upload-time = "2026-08-03T21:19:59.399Z" },+ { url = "https://files.pythonhosted.org/packages/76/af/2aeb4dbb5fc41a04161ae9ff1518de7cec08e164f44a8ce6a4cf7fd2cd1d/cffi-2.1.1-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:31348097ff5bbe827ccc41795d4dd099d9f0625e7def00ee653c137a490c2a6c", size = 196908, upload-time = "2026-08-03T21:20:00.746Z" },+ { url = "https://files.pythonhosted.org/packages/a7/46/2e5fdde8555706dd98139a910ca11be02809f3f605ce956f655d0214e100/cffi-2.1.1-cp313-cp313-macosx_10_15_x86_64.whl", hash = "sha256:9d2055050ea716bd38b7f7f1579c275386646b4894c155a3e2f3cd62ed41b7c6", size = 184805, upload-time = "2026-08-03T21:20:02.02Z" },+ { url = "https://files.pythonhosted.org/packages/55/41/4c7042f317b9217502988f0873af87e16ad606dc20f84e546e3e6ce9764c/cffi-2.1.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:19ee6127ee34de7d83ce3d371ebc5ed91addbdcc39f9ab15ce4eb35a4e534971", size = 184764, upload-time = "2026-08-03T21:20:03.141Z" },+ { url = "https://files.pythonhosted.org/packages/43/1f/1c3d90d91811c8f86ced9ed637956c54bfe5b79ca98fe976d7f8c8979f6b/cffi-2.1.1-cp313-cp313-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:6a8dddef476fab96d066d578fc88526767b836ab5ab21754e1d5bf3879c31c7c", size = 214722, upload-time = "2026-08-03T21:20:04.377Z" },+ { url = "https://files.pythonhosted.org/packages/37/6f/3b5ce4c3b2192d250f04908f2bfd91ef34552ec8f7716a5d4abdb8d67bb2/cffi-2.1.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:f16c709686a78c727bbbf059f92b0bf41c6fc60deec706d2dc19f529175a6125", size = 222369, upload-time = "2026-08-03T21:20:05.544Z" },+ { url = "https://files.pythonhosted.org/packages/02/10/4b3c75dde3d9663c9e02ba05c2668b954f671d4bbe346413ca8c696b295a/cffi-2.1.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:fcd22650c908d7b7da162bbfaab594a1227a15d1643a98c68b122ac642fa2264", size = 210175, upload-time = "2026-08-03T21:20:06.75Z" },+ { url = "https://files.pythonhosted.org/packages/df/62/14f74b9543e605d17701dc797b815958b8bb70b7624ce1b832ddad48ed6c/cffi-2.1.1-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:aa9511c62d14da7aacc9b4bf51f3f697a621e83b2d6919008243c3aad168eea3", size = 208670, upload-time = "2026-08-03T21:20:08.04Z" },+ { url = "https://files.pythonhosted.org/packages/95/95/86342356ff5953b3fb06f7ef7c5bee212d45e770abc7218d451b9148313c/cffi-2.1.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:a931079504ecc49efed7744c476a5c343a92fabf66dec2db95edb1b2fdc770e2", size = 221824, upload-time = "2026-08-03T21:20:09.274Z" },+ { url = "https://files.pythonhosted.org/packages/eb/ff/7b3429ff53aafe931ed8a5fc69f481bbef7ba6de87ddcbb63d08f483f613/cffi-2.1.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a2d7755bef5a12ed488f4ef1f1b69ee9191d7396083b755a5d2295f6edb4768b", size = 225148, upload-time = "2026-08-03T21:20:10.7Z" },+ { url = "https://files.pythonhosted.org/packages/34/34/a95870b9221e09cf4f2ce3178b1a210abdfe63a1bd357da940418d7b8d15/cffi-2.1.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e0bcb7e0f677f543555d2adff3bf19c05f66cdb4796e5ff602442ab2fe3c4ef7", size = 223564, upload-time = "2026-08-03T21:20:12.165Z" },+ { url = "https://files.pythonhosted.org/packages/70/ea/839b50531021a647fb5e929f72cf97bc1ff702b5472166164b5b6e76b851/cffi-2.1.1-cp313-cp313-win32.whl", hash = "sha256:334644fbac4eff73d985a17a91226df55d0f394160c4cfb880e084c8f7161cac", size = 175263, upload-time = "2026-08-03T21:20:13.559Z" },+ { url = "https://files.pythonhosted.org/packages/60/a6/8b149b2c3f2e11aaa1618ef64500b45f50f22c57a977a4dff1aff1f91042/cffi-2.1.1-cp313-cp313-win_amd64.whl", hash = "sha256:1aa5645c30469b09530c4ebca77ebf8f17618293c58f8549cb1a543a50236e7d", size = 185688, upload-time = "2026-08-03T21:20:14.69Z" },+ { url = "https://files.pythonhosted.org/packages/01/9a/11f687cb39d6a3504060d5242f04f48c735afb4d3d533958a20594890cb2/cffi-2.1.1-cp313-cp313-win_arm64.whl", hash = "sha256:63bbfd5ded17c4840ac07cd8f1c21ba9d9708141f840b324f422f41b207e3973", size = 180078, upload-time = "2026-08-03T21:20:15.917Z" },+ { url = "https://files.pythonhosted.org/packages/d3/7b/d6bbf82b8b96e7391438898c42f5bd96dd02030fd5b64937d248220003e2/cffi-2.1.1-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:7dbb61fe3a7699468030f71bbe5f8a0e326a151daa91beb11a6fc1f980c55e1c", size = 194064, upload-time = "2026-08-03T21:20:17.148Z" },+ { url = "https://files.pythonhosted.org/packages/94/e6/bcc91b283be94735e268487a054004f0aa19947b6348fa367db53230abc8/cffi-2.1.1-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:f24fb43132a4c6b4cb4eb029492919b2db645be6808d738f244fd146c03c32cb", size = 196720, upload-time = "2026-08-03T21:20:18.268Z" },+ { url = "https://files.pythonhosted.org/packages/d9/99/c4b0c17cacdc9c3b8f280026286a9826d6a208c0f047591a3c3ce99b91fd/cffi-2.1.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:d28630f5854ab07ab1fd4aba756de52326c82e6be15d414b12793f1975048b54", size = 184964, upload-time = "2026-08-03T21:20:19.708Z" },+ { url = "https://files.pythonhosted.org/packages/b3/a9/9db617d05d7367c1ad0ab00b3aa6e6f9281edd689b4ee9ea0e5a84e89c97/cffi-2.1.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:661c298b4821edebead0c91edd2b00374d67ad7c5a1f7a91d4442633b79d6a72", size = 184962, upload-time = "2026-08-03T21:20:20.833Z" },+ { url = "https://files.pythonhosted.org/packages/67/b8/b42132ca113dc567d37684437b46ca1dafc885902b02a110a02d5b511857/cffi-2.1.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:58acb8ab8e295e6c5ea12f888cbb13cf21511ef2a3303a23f4325c29d17fe5c1", size = 222328, upload-time = "2026-08-03T21:20:22.118Z" },+ { url = "https://files.pythonhosted.org/packages/80/10/c5c0cbf0a657aecf59ef511409734230bf556f05a0d6c9eed7aa5c0a0166/cffi-2.1.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:456a61fa52d579ebf9df2e9552ead5129855dbaff6c1e5a9b1bc408809bdc062", size = 209985, upload-time = "2026-08-03T21:20:23.401Z" },+ { url = "https://files.pythonhosted.org/packages/d5/6c/bfa0b87b03b9238148beca990292843c9396ba069b54496596594173de7b/cffi-2.1.1-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:a4f00aa42f75d6e4595e8866e748cc1705adc0cddfeb2ca86d0d03993d63ba03", size = 208530, upload-time = "2026-08-03T21:20:24.628Z" },+ { url = "https://files.pythonhosted.org/packages/e9/02/4e7d553a7ac4b4238b38b3c1b80d486e9d4436f8d2acbf87a0997fe3f402/cffi-2.1.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:b0431303acaea1089ad4b3e9ce4e6518193def1118d4073ca848635ee4ea2e96", size = 221525, upload-time = "2026-08-03T21:20:25.758Z" },+ { url = "https://files.pythonhosted.org/packages/82/1d/a4aaf9babd75acb4d5f223bff71533bee748dd770a382619a798960ee9ba/cffi-2.1.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:64faea20f4e2613363a1a9b9c7dd73058f3ecd00133a511e72ad7c511658f527", size = 225053, upload-time = "2026-08-03T21:20:26.985Z" },+ { url = "https://files.pythonhosted.org/packages/81/10/5dc0e7bdd18e22107054288283380fc97a06ae3f1656a106908d666a3c88/cffi-2.1.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:5c58fe613dc5e5336357eff555824a314d8e43282600435c8d1cb6a7a2fedd13", size = 223213, upload-time = "2026-08-03T21:20:28.277Z" },+ { url = "https://files.pythonhosted.org/packages/0b/e9/d0061c364cde06ee43168a0d076ac1da512cbc380d44767b844ba34fe2b6/cffi-2.1.1-cp314-cp314-win32.whl", hash = "sha256:1a18a57b58cfb21fc28d72e876acf10eaed67a1ed96226f92af4df681d571c4c", size = 177682, upload-time = "2026-08-03T21:20:44.288Z" },+ { url = "https://files.pythonhosted.org/packages/a7/06/1c3e01e3ba14c39f6d10bfbac52753b7e22259e38088e5cfe1d704918690/cffi-2.1.1-cp314-cp314-win_amd64.whl", hash = "sha256:3222ba5d678f80a030e6afbcc33dc1ae5cb45facabb61cee2c7016b8432fde48", size = 187949, upload-time = "2026-08-03T21:20:45.623Z" },+ { url = "https://files.pythonhosted.org/packages/87/5b/da4e39efe18eeb89cf580ea9cfc66b6a7c3eadb808fc0cc1d3a295cb5a5d/cffi-2.1.1-cp314-cp314-win_arm64.whl", hash = "sha256:ab36d55f9ed2d067327667c2fea18dda018eb628dd6347aa01dda6cf1f5d3836", size = 182947, upload-time = "2026-08-03T21:20:46.955Z" },+ { url = "https://files.pythonhosted.org/packages/23/59/40338bf421c5accea1d45158170c87006ef1cd371b05c077e76476949728/cffi-2.1.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:7750c6449dff7864bb9bb27ddfb0267756189201a3afc911d82b3caacd70dfc3", size = 188504, upload-time = "2026-08-03T21:20:29.495Z" },+ { url = "https://files.pythonhosted.org/packages/7d/47/5ecf1023850036e674c77ec4de86182d309ae344e39e7cba984b7df5d647/cffi-2.1.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:0beceaabe56af686895136a2de78db54ecd8e4046b236b8fd6d6cb61389e9bf2", size = 188259, upload-time = "2026-08-03T21:20:31.291Z" },+ { url = "https://files.pythonhosted.org/packages/2a/9c/92934c3bea9f785b23eba304538c0b4d37a2a96d2431eb3a1bc87a11aa19/cffi-2.1.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:49cbc70e6542d4ccccb936558d1064a8012541e78f821f955cff24e357776c94", size = 223864, upload-time = "2026-08-03T21:20:32.571Z" },+ { url = "https://files.pythonhosted.org/packages/4d/45/ba4c93527bc38616a8bd36488acb69a2212d60486794f0c1f318949bbb76/cffi-2.1.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:e2d65b31f36619cda3999b78b2aa9632e76b78448e7a56fc4240824200e7c4fc", size = 211538, upload-time = "2026-08-03T21:20:33.808Z" },+ { url = "https://files.pythonhosted.org/packages/80/e9/b6ef565e452acb932fb0cb5443f44a78efbd1233e566f02b5a83855e9115/cffi-2.1.1-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:28907ab9bfb6aa13184cfc17c6b8e1023c5ab6fd7076d8c20a35e59fe04f8f29", size = 210688, upload-time = "2026-08-03T21:20:34.974Z" },+ { url = "https://files.pythonhosted.org/packages/9a/95/eff5f0cee78d2eabc7eebffec40d3fc1876b5f3c95582e018bb4b99601f2/cffi-2.1.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:51b31d1c98274844cfd7838ce00bfc27c7423a4dc00fc0772fc3331c2cc90676", size = 223803, upload-time = "2026-08-03T21:20:36.564Z" },+ { url = "https://files.pythonhosted.org/packages/fa/01/579d39fb8bef00a335a23d83757b44feb24cd6345a2c451b64cb67b9c362/cffi-2.1.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:5e7cecbaadb83884793e05828cee59b210b24583b9c7425d0ba6a754fe22eb4e", size = 226763, upload-time = "2026-08-03T21:20:37.816Z" },+ { url = "https://files.pythonhosted.org/packages/8d/b0/0b44f47c60b01b57b6e2bbd92343f13a85a1d93bc46ccf6e47e244acd99c/cffi-2.1.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:25792eac27877609e7bb06d42ff88278a6624fff2ba9bbb523c09616b117e80f", size = 225688, upload-time = "2026-08-03T21:20:38.959Z" },+ { url = "https://files.pythonhosted.org/packages/eb/d2/3b7176cb570a1d3e27faf67b72f591af508036e0d8b2be2ef9af9e8c84bb/cffi-2.1.1-cp314-cp314t-win32.whl", hash = "sha256:8ef53b2de9bcb9197d31854256575d59dbac0cba72ac627bb291ef5eceb74be4", size = 182868, upload-time = "2026-08-03T21:20:40.388Z" },+ { url = "https://files.pythonhosted.org/packages/56/78/31f00c1bcd97c9bbf55f1bfdf5bc809a5de8887473e90bb9960dca825e80/cffi-2.1.1-cp314-cp314t-win_amd64.whl", hash = "sha256:616f097f2fe415bc92a247f02e11f634e1f9e9a83d327e3c915c15089c87869e", size = 194104, upload-time = "2026-08-03T21:20:41.725Z" },+ { url = "https://files.pythonhosted.org/packages/7b/1b/58496f2ed0a35de575250c02a43ab3cc2c04d494a88fed31c1cabc0fd176/cffi-2.1.1-cp314-cp314t-win_arm64.whl", hash = "sha256:ad2c86c495b899d862ea0f4b42891b8713a3bd45dd4105c7fd51c2a72f39f3a5", size = 186402, upload-time = "2026-08-03T21:20:43.042Z" },+ { url = "https://files.pythonhosted.org/packages/c1/8f/9ebe220eab48a093d1a5a5e339ab0dc7316eef3bb04d63c42f0251b61f50/cffi-2.1.1-cp315-cp315-ios_13_0_arm64_iphoneos.whl", hash = "sha256:dddad92b554513a31f272570678ba307fb9f618f05e3d4a5eacafff9eae03e1d", size = 194043, upload-time = "2026-08-03T21:20:48.179Z" },+ { url = "https://files.pythonhosted.org/packages/ff/69/844bad3ece306c4782c2ecb93597035b6690d48704b803914c199da1e8b3/cffi-2.1.1-cp315-cp315-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:da0e573f9f97159390c89d9f1a9e41908b66d408cc5b58d08cf3847d844c531b", size = 196737, upload-time = "2026-08-03T21:20:49.457Z" },+ { url = "https://files.pythonhosted.org/packages/1b/8a/af668013284634733f02d683458a0728739c7d6ddb5e14cb0c20832266fe/cffi-2.1.1-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:fb92203a88b3d3053034db775110081c49d28be6551923805e039924093761e4", size = 184933, upload-time = "2026-08-03T21:20:50.639Z" },+ { url = "https://files.pythonhosted.org/packages/0c/75/2f5207ff6d1a613133b23a5203cc0c2a628313b5eb3974d7956ae3c57950/cffi-2.1.1-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:2ae64be792b8966f2c69538199728b290e34726562896df1e5dc8ffd8d8188e8", size = 185002, upload-time = "2026-08-03T21:20:52.173Z" },+ { url = "https://files.pythonhosted.org/packages/e2/31/9e1313b0a6e30e91b3b3d3fff51ae99c857c07738e3afcce1f7334e1b7ab/cffi-2.1.1-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:507a24c282e0f42f8ed737cf048572cbf580468da5555764a8331735e9c736b6", size = 222271, upload-time = "2026-08-03T21:20:53.462Z" },+ { url = "https://files.pythonhosted.org/packages/50/e3/f6234a833e6e08c7007003074723c406559eecf9b48dfc97471e5a8eb7a0/cffi-2.1.1-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:246fa40ce8645a614ff682e0b70f37134e460eaf93a775e0cbe3cca585a67a80", size = 209919, upload-time = "2026-08-03T21:20:54.783Z" },+ { url = "https://files.pythonhosted.org/packages/0d/fc/5f74e293fced6edb51af3a46c4ccf6c23c9943774ecb375ddbd522c76add/cffi-2.1.1-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:471cee653ae88de62096552e6d24ccb4a5adb8c8c9f10b5054d0122c15bf2779", size = 208529, upload-time = "2026-08-03T21:20:56.066Z" },+ { url = "https://files.pythonhosted.org/packages/44/16/29e6d01b388bef055ecd6ca8244b3f4d336bd09e92d5d892187b9601084e/cffi-2.1.1-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:aeae0e330c9f6acd681f647d46cefd30c29f93e3392882e792e82080c9691399", size = 221630, upload-time = "2026-08-03T21:20:57.336Z" },+ { url = "https://files.pythonhosted.org/packages/a4/18/fa7f1f6857d5eb88a4ca99ffcbfb7c387a287ccc154c64a73e86314745d7/cffi-2.1.1-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:42a494cee34437f05546455144f2b5d9ac09b1face62bcfce597d2e521066688", size = 225134, upload-time = "2026-08-03T21:20:58.675Z" },+ { url = "https://files.pythonhosted.org/packages/e0/9f/e8e3dfa04a1b4c241f8c91faacad872b4d4efd051d49764ad4e2fd4b9fea/cffi-2.1.1-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:cc572dace3f60ef98d7b12ff411d20f5362feb31a0439eab0085bbfd349982d7", size = 223197, upload-time = "2026-08-03T21:20:59.968Z" },+ { url = "https://files.pythonhosted.org/packages/f8/7e/8debeb04f1ab9fe2a6963964cd6f1aaf7192627b83926586a6a4e089c9fa/cffi-2.1.1-cp315-cp315-win32.whl", hash = "sha256:4f42141fc14250de6dde5ee7ea4432be017252d91f19c5ad043c084cea629cac", size = 177683, upload-time = "2026-08-03T21:21:14.901Z" },+ { url = "https://files.pythonhosted.org/packages/e0/31/5158704cc474ab65c1647932e88be78dc0873f47130e253be38bcaf13d01/cffi-2.1.1-cp315-cp315-win_amd64.whl", hash = "sha256:e6e8cff14d6fb0be70a09c0bdc58096f501952d04624ebf867e0e56da2df8960", size = 187897, upload-time = "2026-08-03T21:21:16.108Z" },+ { url = "https://files.pythonhosted.org/packages/cc/4b/b3a2da8570c704ffc0f9762cdc3ec0f02c8573798e0b5cf7f11c82bbb70f/cffi-2.1.1-cp315-cp315-win_arm64.whl", hash = "sha256:27350daa11d4f10c540e6e89dada4c54feb7256ad03e9a4dc075ebad7ba360d1", size = 182935, upload-time = "2026-08-03T21:21:17.271Z" },+ { url = "https://files.pythonhosted.org/packages/d0/ef/5443574510a1207e6f6bc38ba6e1f1de36cb48fef07b2728bb896a21f430/cffi-2.1.1-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:c26608d2222fb1e94487e4a387d85f13eb55d5ed725cb25a0c589ac4ee60e7bc", size = 188464, upload-time = "2026-08-03T21:21:01.163Z" },+ { url = "https://files.pythonhosted.org/packages/7e/ae/a56fa8c4686ad50e148fcbc8d3ae0d03915ff5c30d795058988c24118cef/cffi-2.1.1-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:4be96343e422f2dfcd12ab5c9f5aebe03f82f737c6bffeca6830b3875cb44aab", size = 188262, upload-time = "2026-08-03T21:21:02.382Z" },+ { url = "https://files.pythonhosted.org/packages/53/b2/6187f46f2912276a3ae284076109cc5c8680482f11f766ccf26db4a86427/cffi-2.1.1-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:937c0052c05a31ca1daf18de3158eed4dbfcb9cc107adbea227728d647be701e", size = 223779, upload-time = "2026-08-03T21:21:03.553Z" },+ { url = "https://files.pythonhosted.org/packages/8a/f6/c3ad28bd19f77047a03084424fbd4cbe997303267c14423737324be0385d/cffi-2.1.1-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:df423d40ee8654634421812bc3b196da3f9bd7d32929da813f8394c4348a5358", size = 211520, upload-time = "2026-08-03T21:21:04.863Z" },+ { url = "https://files.pythonhosted.org/packages/a0/cd/ccac9013a5bd9fd764de118674ab9c805b5ca10c19270d90ee273f8b2240/cffi-2.1.1-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:a730a083190634c65cca36ba5f489531576ebd79bcd5c8e172130f6453127231", size = 210673, upload-time = "2026-08-03T21:21:06.223Z" },+ { url = "https://files.pythonhosted.org/packages/52/86/2976131c639aead931c5bee5aba67e4b09fbeb8018b6f282f70803f923a7/cffi-2.1.1-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:363e05fa78e15116c3c32c210ee36884fd6b9afa6d440e47112c3bd511d64cb6", size = 223835, upload-time = "2026-08-03T21:21:07.539Z" },+ { url = "https://files.pythonhosted.org/packages/ac/0c/33a7aeab2f9c76918c52e084beb39c570db3588133412929e8ec06fab90b/cffi-2.1.1-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:770de9db11e84213beec501cfcaa013b019820ca881e03344dea5844f7876d94", size = 226705, upload-time = "2026-08-03T21:21:08.774Z" },+ { url = "https://files.pythonhosted.org/packages/e3/26/2cde30fdde421130bfc18f70395731a6e6b2053c6a1978a5258ff04e72fa/cffi-2.1.1-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:7da0c5eff80f0197f3b3d1232ec5a682a9325f4ae9016a78f5f5ca35f9ced1f5", size = 225539, upload-time = "2026-08-03T21:21:09.911Z" },+ { url = "https://files.pythonhosted.org/packages/6d/cd/a361394c94b2129d604bb846f624a8e88255a3ee33129c434a00d715e64f/cffi-2.1.1-cp315-cp315t-win32.whl", hash = "sha256:06c72bb76605a4b0cd0aad6930b69d4baf7dd5d806cfc409b824191099700e66", size = 182707, upload-time = "2026-08-03T21:21:11.226Z" },+ { url = "https://files.pythonhosted.org/packages/9b/b5/ba2b299993c26577d529b6ae29841f9e15b9fcf004d65f423f4fcf94ade9/cffi-2.1.1-cp315-cp315t-win_amd64.whl", hash = "sha256:d9c275eaacd24aa73f94ffd6de08fc3f932424d8b6c376f4bed7cde376fe7bc3", size = 193772, upload-time = "2026-08-03T21:21:12.39Z" },+ { url = "https://files.pythonhosted.org/packages/aa/29/35e016098c814cd93de9cd320c66b5bfba14dc6ecedd3cb518fa7c408c69/cffi-2.1.1-cp315-cp315t-win_arm64.whl", hash = "sha256:d18e5ac0f2f03f4f518d3e23db0f0cad7faa1da8620e9c09461d443bbf6e6692", size = 186360, upload-time = "2026-08-03T21:21:13.636Z" },+]++[[package]]+name = "chardet"+version = "7.7.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/47/92/3d893ac5d338b9a9af34c5b517d77492dcea8a10254254eead4215a96f3f/chardet-7.7.0.tar.gz", hash = "sha256:0ba38a05201b0abf7570c12d8af45c30b2af835bd5cc52bfc7105082eda82c1e", size = 1008480, upload-time = "2026-10-18T00:06:25.352Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/73/a3/0d2bfd4fa93998f59ee58610eb2fe146713a8ef69d155335974c622d1780/chardet-7.7.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9c6f07e70b4f1ebf7208807fe8b3ce1ea292f15c221dd4c95db21f4fa0a1fa50", size = 1215584, upload-time = "2026-10-18T00:05:17.21Z" },+ { url = "https://files.pythonhosted.org/packages/09/5d/e810044bd970d6ad04bb970b33374fb83b2853d6d82c84103ef709667bce/chardet-7.7.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1aaa8238c91698ed3edcec4fd58eb091f765cc000b39e27fd7665511124d8555", size = 1192609, upload-time = "2026-10-18T00:05:19.168Z" },+ { url = "https://files.pythonhosted.org/packages/18/ef/7da372a88118ea12efb9017ed63aaa760dc72f3bee6f6cdf481370e79f7b/chardet-7.7.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f8783b6e24a044ed9b53aa130ffafac4286aaf4a953f7843a3c1a261d7c77971", size = 1607238, upload-time = "2026-10-18T00:05:20.496Z" },+ { url = "https://files.pythonhosted.org/packages/6b/86/dab3e18fed8b07a5a4640f7e3fc8bf20594b6d4f4852b9661213a3940d15/chardet-7.7.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2a990ca38150936cc8f63d66f360ba8c50310632f159ef482008f033185fb004", size = 1632102, upload-time = "2026-10-18T00:05:22.111Z" },+ { url = "https://files.pythonhosted.org/packages/00/ba/99af529ba04fea5407fd45639bfe9f224f8c424d15bec85bd5b2b954951a/chardet-7.7.0-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:1acce82c37595dce747cea9798d1094d91d9ea328519f31b1bbc96eb54f5179a", size = 1593515, upload-time = "2026-10-18T00:05:23.74Z" },+ { url = "https://files.pythonhosted.org/packages/b8/c9/f5637fd4987ca04408fcea017f53980276e4cacc4a6fd06742ac4dc4e81c/chardet-7.7.0-cp310-cp310-win_amd64.whl", hash = "sha256:9bd2e0e48900acc62fe82de2b3386f65a4be21d1015dca34a8958410d37e39a9", size = 1306524, upload-time = "2026-10-18T00:05:25.334Z" },+ { url = "https://files.pythonhosted.org/packages/b0/23/c607e55b2c00fd383803a20dfdaa964e966df0472645902b9cde64d50519/chardet-7.7.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:0d7dfd38f9061226fc6b79732d8fcc6f3af070dc757a421cab7025d2a780a74c", size = 1206347, upload-time = "2026-10-18T00:05:26.954Z" },+ { url = "https://files.pythonhosted.org/packages/bd/f7/a561c39b0b697757f27c7bd14e71cd30887a70bde4b76f0f18eb5a97d347/chardet-7.7.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:074a5b6efd46bd35059f53a3b385349e9b9e38111063c8d2c5b36923e2e07de6", size = 1183911, upload-time = "2026-10-18T00:05:28.554Z" },+ { url = "https://files.pythonhosted.org/packages/a3/81/7044323a1952245ecf0b5535fd3b21de92b805f34f093005e9ff5d4469c0/chardet-7.7.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1292aedb9e9da26435f7972f7efa145e773140068238888c6a533c1b5f17b88b", size = 1625048, upload-time = "2026-10-18T00:05:30.07Z" },+ { url = "https://files.pythonhosted.org/packages/e2/75/df325fbfe77140e1c8dfc4915b23425bc47a55e3132bd004c4064cf132e9/chardet-7.7.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7f13de78af5da07ddd813ff5a564c3aa8a113f05cba202be649e061c431a0e9a", size = 1648612, upload-time = "2026-10-18T00:05:31.53Z" },+ { url = "https://files.pythonhosted.org/packages/44/c3/4c5e2993a4bda9a432cc1094f89f1ef22fca8f0a9526673bdfaa39e5d317/chardet-7.7.0-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:78608fdf8eced38643b5e0813c2bfc969cd13b393f025a838e976fee20f74dbc", size = 1599230, upload-time = "2026-10-18T00:05:32.954Z" },+ { url = "https://files.pythonhosted.org/packages/0c/f0/ce33a549471c4b408d40b2ed061be5d4f12265934fc4ef100e3cbaa1bf68/chardet-7.7.0-cp311-cp311-win_amd64.whl", hash = "sha256:6f70dbc2dd14145d9b4011bce5a207f7ecc26e6bea49b5e87f6cac3b84261089", size = 1303330, upload-time = "2026-10-18T00:05:34.457Z" },+ { url = "https://files.pythonhosted.org/packages/d3/78/d6b54ac2b0623565e30ef920acb9f5b5db150d11963d9cab24931aa122ce/chardet-7.7.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:14a7a67fc65b44346c8cd9a84b3a209f9b84a2f3984c0d56a7809815c657664e", size = 1214345, upload-time = "2026-10-18T00:05:36.144Z" },+ { url = "https://files.pythonhosted.org/packages/49/d2/c920557bd0a621dcf6fb7a96e8746dd70c6b83e7bd6c03036b2c824a59de/chardet-7.7.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7df40e5267a4e9952ecb39cc23109c389fca61fc27a6e807ec9ea894a41e83d7", size = 1185195, upload-time = "2026-10-18T00:05:37.826Z" },+ { url = "https://files.pythonhosted.org/packages/88/7d/f2aede138fe124daad8a6dd8a0c593cdad117429af5d734f7bc8ec290084/chardet-7.7.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:68db376d4bb403dc282a6d2ed5b4c4b45a7a21dc7537e79699f8be669a9e88ef", size = 1623002, upload-time = "2026-10-18T00:05:39.295Z" },+ { url = "https://files.pythonhosted.org/packages/28/af/8cf3a99fe518abbc314f873cc5aeaa412b4817c927b643cbe3fcf8b30122/chardet-7.7.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:feb66c96264e3e6a9ff0c7318ce0028800b6c18ad07c8000d2404a108d1ef767", size = 1658969, upload-time = "2026-10-18T00:05:41.13Z" },+ { url = "https://files.pythonhosted.org/packages/ca/08/c8d96d4c1d6a9c8ba252937bf13db1ae6e6f1f89504ea75c84c74cbb681a/chardet-7.7.0-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:169d8e5f621bec1979e351f5ade8cfca3b53da85756888bbf39094fa764bde84", size = 1589745, upload-time = "2026-10-18T00:05:42.648Z" },+ { url = "https://files.pythonhosted.org/packages/06/cb/f236829ccedb665fa0b187339d12ee8ac6c3bf5fae37a4433aa08e1e69ce/chardet-7.7.0-cp312-cp312-win_amd64.whl", hash = "sha256:e3fa9ea40e766b26b10360edbb4742cfef9e52728b644b39aae7fa39e89df767", size = 1308542, upload-time = "2026-10-18T00:05:44.308Z" },+ { url = "https://files.pythonhosted.org/packages/4e/73/0c434bc65adc411e49b1bbebee24ebb36a3511c80a058f1fde17f43fb537/chardet-7.7.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:11263887c082c3d8c32026aeddbdef37ac8feccd1faece5a22b2ff00a29b115a", size = 1202232, upload-time = "2026-10-18T00:05:45.657Z" },+ { url = "https://files.pythonhosted.org/packages/9d/be/222e5628af10d6b80750ccdda7f6d2610646dddb082c37947623d5e55bf7/chardet-7.7.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:e8c718e6961981fe1685e1243742f326ac553f0fa0dfd0c6d3d17dd4f92cd3ff", size = 1173273, upload-time = "2026-10-18T00:05:46.984Z" },+ { url = "https://files.pythonhosted.org/packages/70/ff/889cf390db3748918789818d93ba9a7d712b326030199698432fc50bf8cd/chardet-7.7.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a76f4d1f769b4ae8888cefd46e604cf1f5769f1176b55e78b90eaeefa888ce92", size = 1616968, upload-time = "2026-10-18T00:05:48.457Z" },+ { url = "https://files.pythonhosted.org/packages/ca/04/0b5fd38375ae182cec6446dd3121aaff5ae18fd12b98b10161a58b720db9/chardet-7.7.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c519c10c315a675bcfd4b55c0e0de1859ca5a39881d8f69750500102c2fc5d2f", size = 1658830, upload-time = "2026-10-18T00:05:49.938Z" },+ { url = "https://files.pythonhosted.org/packages/99/c0/7e642d7bc6aca242ef41b4aa5f5be27dbb57912e8ce0f38043d8d1999cd1/chardet-7.7.0-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:46a044166fe0d99931884dc28405faac558d5eabf28316a2b3d2a1a6c7dc439a", size = 1583300, upload-time = "2026-10-18T00:05:51.567Z" },+ { url = "https://files.pythonhosted.org/packages/30/ee/53147716ced6d43837682a2acfb09dd45add8bc496107f21051c5aeae1f6/chardet-7.7.0-cp313-cp313-win_amd64.whl", hash = "sha256:113bbd3ab85835e3e99499ae66829915ed3b4cf5c69525ab1742260f77638449", size = 1308030, upload-time = "2026-10-18T00:05:52.997Z" },+ { url = "https://files.pythonhosted.org/packages/1a/61/800a9442f352912c86f2a00de84fd6914dd9353d29091b1e223e7c08850e/chardet-7.7.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:ad286a0654ae7477bc454a1dee4f396cb28adffeacc6bc7d4412f607c73de0c3", size = 1200940, upload-time = "2026-10-18T00:05:54.59Z" },+ { url = "https://files.pythonhosted.org/packages/fb/92/3c6ce24dd68c626cc6aa0b5953c2aebb1d853c7b07d3535f0300b7428288/chardet-7.7.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4f67f20c9ad3f3024bf71d4aae1d25722b12da921ca9586f3cce7a4639695aa0", size = 1173087, upload-time = "2026-10-18T00:05:56.257Z" },+ { url = "https://files.pythonhosted.org/packages/4d/32/5a952b376c00dda01465b396958a8985916d9a9293a772d6bda2c37f2cc5/chardet-7.7.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a05667635c0496dab47eca8c845c044d1da6d74d34a9bf687199c9c53a38119d", size = 1624001, upload-time = "2026-10-18T00:05:57.832Z" },+ { url = "https://files.pythonhosted.org/packages/04/f7/09296ca1d4621c9c2766d074822035eee6aebb79eff80c0af3bd96283d05/chardet-7.7.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:79eec5af9d7715334695254234c8d7c29165841526c11083951d9b9f6458e372", size = 1653785, upload-time = "2026-10-18T00:05:59.379Z" },+ { url = "https://files.pythonhosted.org/packages/cb/08/80571baad57db2962d6931b3ee1828c82e3e14e9b3464f80532f536e23ac/chardet-7.7.0-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:4167165812219e70f311083a8e06e3b627ed5b27aa8c15c3fdd56f350fd3213e", size = 1582280, upload-time = "2026-10-18T00:06:00.825Z" },+ { url = "https://files.pythonhosted.org/packages/18/82/3c07070fdcf3c4263e16680c90e9af7c2cd2e5e59cfb1d372efa60fde8cc/chardet-7.7.0-cp314-cp314-win_amd64.whl", hash = "sha256:546180f6170da39778069d16130449a9cff49a8fe144535947d1ef26f5330b96", size = 1310108, upload-time = "2026-10-18T00:06:02.342Z" },+ { url = "https://files.pythonhosted.org/packages/1b/b0/d703d408c7f8931b1564110078fc3dcff9825a159990fa69b80da52be160/chardet-7.7.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:a4c2e83b09a540a4d33279d2bee8ed3bfd57ac6645b359ae8b8afd5b4578c3c2", size = 1237782, upload-time = "2026-10-18T00:06:03.763Z" },+ { url = "https://files.pythonhosted.org/packages/d8/3e/0eafeebd53eb096400f75138ab18614ab5be12b8794b76dd4b35ef1a8e05/chardet-7.7.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:259dd55b1ba05a66868151a42663483763046a3e6579bde6b0aa65d834635b5a", size = 1207710, upload-time = "2026-10-18T00:06:05.221Z" },+ { url = "https://files.pythonhosted.org/packages/b8/8d/3c200098027def56be1b6443a10c72efe013a42eb76444d889c809890ca5/chardet-7.7.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:56e5a5c782548b301b44371de327115d13a08de391ddaf9db4ac420d8511c5d7", size = 1660832, upload-time = "2026-10-18T00:06:06.619Z" },+ { url = "https://files.pythonhosted.org/packages/08/81/02f98389fa72345f40d23d69c2d857511d11a0911779a7cf8ed1cecb5037/chardet-7.7.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d227d2aa329fcf848f4640ed9a4d99e1753840c1cfa19f7ca5a48f30c03982ad", size = 1678291, upload-time = "2026-10-18T00:06:08.196Z" },+ { url = "https://files.pythonhosted.org/packages/5e/24/0ae866b759a148d0f6087ffb30920a2b956653d0d455b4be93026edbee95/chardet-7.7.0-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:c4a591b2dbfc0a047f8d60331c2fbfb4c3589911000406666a3085fa7d5da69f", size = 1200696, upload-time = "2026-10-18T00:06:09.701Z" },+ { url = "https://files.pythonhosted.org/packages/e0/a6/5e0a1f56aca6c44b562d05d9e360f31b5a8f4b311d940a324fa337d277ba/chardet-7.7.0-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:eb625c3ab2386ca7f3be9ac2b9b822f4c5b792595c8bb8100b3b6ea68120e92c", size = 1172821, upload-time = "2026-10-18T00:06:11.04Z" },+ { url = "https://files.pythonhosted.org/packages/89/05/868f52672cde7e188a7333f3f65deaa62f5acbfcf0f81f3582013776e8ad/chardet-7.7.0-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ddedfb252d05c86c2d6e9a3090f8bd574876bbd39679e7c588ed57d21595c097", size = 1625481, upload-time = "2026-10-18T00:06:12.499Z" },+ { url = "https://files.pythonhosted.org/packages/f9/12/2b3a006ae31a7ab4ccac11a00abb27af23b4a5d57ddb00e937375e747a2a/chardet-7.7.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:42c4d8a2dc8abcc067417adc13c2f64f48482e48ce48e3af769b5a44214e5a5c", size = 1660352, upload-time = "2026-10-18T00:06:13.977Z" },+ { url = "https://files.pythonhosted.org/packages/b6/f0/f995a2873a78aa3ec8308f02e61f0717deb4b01c8f1a74c2da329f325925/chardet-7.7.0-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:78db6186c1e73d38a2106cdcbbc8f43612eaed9ef8bc4adaf0fe67b6e8a2049d", size = 1597363, upload-time = "2026-10-18T00:06:15.492Z" },+ { url = "https://files.pythonhosted.org/packages/4a/7b/22b916b52c7bc4eb076ba1736ea9b99cf1065ebb7b56d356409144887c73/chardet-7.7.0-cp315-cp315-win_amd64.whl", hash = "sha256:8f1d611f15530e1642856d91b7aa259851466d7e961f27b888921e7e29718edb", size = 1309528, upload-time = "2026-10-18T00:06:16.845Z" },+ { url = "https://files.pythonhosted.org/packages/02/2f/ccaf5ffa0c8adca280e2687d75524cc07113a0df70cbf542da3445f2b300/chardet-7.7.0-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:1db39957379a801cf1798a5e50cdb3d3fc32683e23c4166ecfa157b980d1931e", size = 1236698, upload-time = "2026-10-18T00:06:18.191Z" },+ { url = "https://files.pythonhosted.org/packages/0d/7e/32f45f7ddeb27d94feb529a1a23e5a38a6d3614d12e23f0c89a9eb89098b/chardet-7.7.0-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:7f3b2ca3bac2bdbe42c4dfe7a2888c4b98e2e86a83ddb631960b229d1980979e", size = 1207247, upload-time = "2026-10-18T00:06:19.751Z" },+ { url = "https://files.pythonhosted.org/packages/26/40/8c1ab360c39a0bb823786e8934984cbc3e83076dfce2a7f3760086ef778c/chardet-7.7.0-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:80db1c109e6e3c102ac589897449437ea2edf26dda1042a3ff669368e21d90e5", size = 1653659, upload-time = "2026-10-18T00:06:21.189Z" },+ { url = "https://files.pythonhosted.org/packages/1b/3e/bd5c25f525ff2466e6365cbfb098f928761357331b884eebc92ac50f8878/chardet-7.7.0-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:091f50d3567b1a066f797835ee5367dbcf3cb77c5e56993b3f61b28264b8e6f8", size = 1677031, upload-time = "2026-10-18T00:06:22.564Z" },+ { url = "https://files.pythonhosted.org/packages/cc/75/88a3eb36264375ff951bd2f9397c409727ab6aa6a18e1bd933851571d421/chardet-7.7.0-py3-none-any.whl", hash = "sha256:11cf9b719ea3675a2a7d8a3071bbe4d7ea24b26bfe39a51588d515ddd05cacad", size = 706680, upload-time = "2026-10-18T00:06:24.018Z" },+]++[[package]]+name = "charset-normalizer"+version = "3.5.2"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/33/1c/f41d4e74c28ab327ff3acd36053f7ea506c55872d7a90b0fa71aa3ab0c89/charset_normalizer-3.5.2.tar.gz", hash = "sha256:39de2a259fc954455c57274dc94c79d5842774e1247a016aff30bc0efed0f4ef", size = 172659, upload-time = "2026-09-30T04:39:23.398Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/98/77/46e87bcfc45d25ab4db7cfc9bb544bfa3ffd302289ed31ae93f5433eb899/charset_normalizer-3.5.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:195c26fb65950f8fce54e26349852b7bdd7c5f120aeefbcc440b8a20faaed4a3", size = 373348, upload-time = "2026-09-30T04:34:42.843Z" },+ { url = "https://files.pythonhosted.org/packages/52/fc/e518013affcc43c9f919c3ba41bffe9b4ee4aceb0a6462a6243efcca5f2d/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9373ad13ef0d2c0fb761e04e55bfdee5a08b52cef2c882c8fbe9935b1517152e", size = 260860, upload-time = "2026-09-30T04:34:44.817Z" },+ { url = "https://files.pythonhosted.org/packages/d5/ad/2a895c945ee61988dfd9ccee64f0b78dc09f29c9b34d1dd545246d78e0ad/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:ddf19c062bea7a0cc80f519243d2c01dd091be0cf952a0750d4ad576709559f5", size = 246491, upload-time = "2026-09-30T04:34:46.227Z" },+ { url = "https://files.pythonhosted.org/packages/c9/05/5d958bc8ea503e26be25ada5430fd409cfb45dc22ff33f9f96e649613c99/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3d14b50de6bf4d0edf857a9386836846f982b8f524e188e2e68b96d702bcf4aa", size = 290875, upload-time = "2026-09-30T04:34:47.691Z" },+ { url = "https://files.pythonhosted.org/packages/55/e2/06bad57dfdb49cad92c0ba85b6b4fa5827a67df37897287cfef0553843c2/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:28a15fdad492a99b6eccfaaed66ef3f74050680545ea61ec8b2f4c538f1f1320", size = 286987, upload-time = "2026-09-30T04:34:49.356Z" },+ { url = "https://files.pythonhosted.org/packages/c4/9f/9f52d2886d52645987d603425482c63c5045a3005db1354a7097e5ed1ae9/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8a893cc101149f80a653f82062ebc95b34525a2614382e1da5458fe7c6997249", size = 271105, upload-time = "2026-09-30T04:34:50.957Z" },+ { url = "https://files.pythonhosted.org/packages/4a/41/e05e19578b7b87e7db2c3ecb884bd09d065274ab41e1f535542e8bae9b06/charset_normalizer-3.5.2-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:619799369eeef6366ed3e8755a5670f4f2f0fb6b30a0fd7264dc0fdc2357058e", size = 269833, upload-time = "2026-09-30T04:34:52.623Z" },+ { url = "https://files.pythonhosted.org/packages/c2/cd/fc7152414561ff78f9c61a4a627025f65fd244abaefc99ac4e75c6169b33/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:447441e76ec720b15e64418d32e092297340387053047c7c694f579efb0ee1d9", size = 263048, upload-time = "2026-09-30T04:34:54.013Z" },+ { url = "https://files.pythonhosted.org/packages/71/71/fb379e399b1013962716a059d551e03bd80b3e02f05d81246886af6c0958/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:62588a277bfb59def052abd940703fa35107152bf479781a878617d60faf8fb5", size = 249237, upload-time = "2026-09-30T04:34:55.373Z" },+ { url = "https://files.pythonhosted.org/packages/33/4f/aeadccd6d20882909eb2597ec40eccc05d505e2262f14dc76d7620700657/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:44bd4fbb29dfbeba60e7d2bd000c59e4b21ddb3cc53912b14048d37092706d7c", size = 290756, upload-time = "2026-09-30T04:34:56.867Z" },+ { url = "https://files.pythonhosted.org/packages/b9/7b/e8a92613236b257d3b75d532496eb21f68ad8231d7d56df94497e460112e/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:30fcd120b732aa79317f08dee04d7de0847822e4cf7ee0e9f445bb958832252c", size = 269026, upload-time = "2026-09-30T04:34:58.278Z" },+ { url = "https://files.pythonhosted.org/packages/ff/ac/21d5c6b972285c5f095ff78afdc99f3539e3985dfcf7ff1cfbe9e772f529/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:50e3adfb96fc189eb27b1cf62d3b598b89b4bb0420d93a3d3e42e137409011be", size = 287601, upload-time = "2026-09-30T04:34:59.703Z" },+ { url = "https://files.pythonhosted.org/packages/59/72/263491ec1494a194b16fcbff88a0220f2af633738c79e92b4d7189226322/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b736353c0a625bbd5fcec108576e2385db3496f4f771f785ff32e108d3c3bc45", size = 272660, upload-time = "2026-09-30T04:35:01.26Z" },+ { url = "https://files.pythonhosted.org/packages/38/7a/81f1186c57e406233969ae96b5fd0c907254ab8b6e47da8ae24cd20fb9d7/charset_normalizer-3.5.2-cp310-cp310-win32.whl", hash = "sha256:f5833ad231be5eb6553de524a70f48d71b2c8563101750531e0b80184e175cd4", size = 187301, upload-time = "2026-09-30T04:35:02.659Z" },+ { url = "https://files.pythonhosted.org/packages/ae/ab/fb8b5178fdf7bf68efa61cbe892286bc9f73846f26147d4725fb89388475/charset_normalizer-3.5.2-cp310-cp310-win_amd64.whl", hash = "sha256:1461ac396c4fdb983a675f20aa555624f0ee18ac83d832b9244ffff3d8055275", size = 215446, upload-time = "2026-09-30T04:35:04.011Z" },+ { url = "https://files.pythonhosted.org/packages/36/40/e270b74e0d3f583d78d902960845a149e80eb7c737ee5613ccc6efc7264b/charset_normalizer-3.5.2-cp310-cp310-win_arm64.whl", hash = "sha256:c6708715abcf3c73b99508253e961a9967f02fe536532834149574eda6de0d1c", size = 203389, upload-time = "2026-09-30T04:35:05.577Z" },+ { url = "https://files.pythonhosted.org/packages/22/67/6a0b94a7960d5e1b5eacd2fb529f3fccc47db4644f7f0a7cfdcfc3be578a/charset_normalizer-3.5.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:3d21b8b13c7592db2ac5e544a6d83187b995257472b0c9e8351b6d507ae37ed6", size = 370642, upload-time = "2026-09-30T04:35:06.91Z" },+ { url = "https://files.pythonhosted.org/packages/fb/94/01009e13b94041599004edf32e56e382c24e570f60f79bab8efe45cfe1eb/charset_normalizer-3.5.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d760fe2a4d7c3b226cb9026d6a842868d52a7901bd98420e1baf14e80da85cf5", size = 259280, upload-time = "2026-09-30T04:35:08.448Z" },+ { url = "https://files.pythonhosted.org/packages/66/85/3b5358f60a13210f0b67d3755c168ef758701b021e655d88d4da28554467/charset_normalizer-3.5.2-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c9790464842f85f437dbbb54417eda1e0e6bfc52dd8d22d6fd1c994b73b2dc74", size = 245335, upload-time = "2026-09-30T04:35:10.104Z" },+ { url = "https://files.pythonhosted.org/packages/74/75/77c1c479b09ecd751d1e767b251ea5c14d4d50ff757bf404afab2692f600/charset_normalizer-3.5.2-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4685902cf26edf013ed7a3da0f426ebba7a00ebb9541386d835afbf002c11cab", size = 291707, upload-time = "2026-09-30T04:35:11.575Z" },+ { url = "https://files.pythonhosted.org/packages/0b/0d/363f78cacb70f58f15f4b083961bbd9d292f335d3f5c66fc4f1cfe69cb90/charset_normalizer-3.5.2-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4495c5002a7b28557e7e222e77e0b661183e432b7d6d2e788101e3f240e05b8c", size = 286747, upload-time = "2026-09-30T04:35:13.022Z" },+ { url = "https://files.pythonhosted.org/packages/e4/ed/cf505d3011ffceb12c2067a7a5d3cfe92b875d4d44bb0ff0d69375e2c184/charset_normalizer-3.5.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:211d5a3eb6af8f513b8d4ca19a8c1b7accab1b5f0d3175f9826b03c1a920dc1f", size = 269972, upload-time = "2026-09-30T04:35:14.606Z" },+ { url = "https://files.pythonhosted.org/packages/15/d8/f0a93a431d170e7ca681d4f6650fee3de934d18560e474e7267eb4b0f987/charset_normalizer-3.5.2-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ef4fcbf3327382cd4c9f540babd61248208af7b93eec4de397b4d5f58a09e288", size = 269339, upload-time = "2026-09-30T04:35:16.087Z" },+ { url = "https://files.pythonhosted.org/packages/86/bd/9b2bd1c5b7af02462c9752d33994834ff972a96b4c483eefde9e594488e2/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:bd16aabe4a02a297c23417aa17ac6299dbd8c49f673bcd645b4929b11f5a4400", size = 261683, upload-time = "2026-09-30T04:35:17.488Z" },+ { url = "https://files.pythonhosted.org/packages/76/a5/cac540ab0fd61f3fec88ad3dbb64509e71424593d73cfdfff5ab3e4db279/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:fb9e68df06293761f9fe66ade60a9bc6d0f5e42b8acf2939a9158af86ab0e5bd", size = 248143, upload-time = "2026-09-30T04:35:18.849Z" },+ { url = "https://files.pythonhosted.org/packages/71/7a/ff467301deef2089fad87f72df9e000a26a78fec7acbb18e1999371b8369/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:59f63901b0031c3136cf64704dcb21de0bbae62ce2c9529bc39d27665463de37", size = 292358, upload-time = "2026-09-30T04:35:20.326Z" },+ { url = "https://files.pythonhosted.org/packages/ad/77/22d7e785d1e210afc2e2f58600dd1799d17a35665faf84383f002826c5f8/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:304d5463e65a35d7bb0850550e0780395395f6fcf452f04db7d5ca7cecc425ac", size = 268766, upload-time = "2026-09-30T04:35:21.72Z" },+ { url = "https://files.pythonhosted.org/packages/ae/91/e8e946267f1c2d9e2bd651726e2fbd2addf02c4d36cea5069e32ca9d7bb5/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:9cf9b1a857e25c4baceeb3624e92a56df3668f398c4acba74e174d81fb4d1d3a", size = 287432, upload-time = "2026-09-30T04:35:23.273Z" },+ { url = "https://files.pythonhosted.org/packages/4e/88/7561d8a88d555e7df6623abe7c0070b4baf47549b9408783a2ae0a1a6cf7/charset_normalizer-3.5.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:114e4d0c92d618409ed82a99e22b5c5e768fe995f2973f78265f4524f49d4640", size = 272470, upload-time = "2026-09-30T04:35:24.655Z" },+ { url = "https://files.pythonhosted.org/packages/35/7e/578c702301ec036f01455f30744a08d2b42f6ab35b9b2d4bf8cae0ef2a80/charset_normalizer-3.5.2-cp311-cp311-win32.whl", hash = "sha256:2625388c6c754520c37abaf3b41eb34d1cc4a373f457898f08606c8e362b891d", size = 186688, upload-time = "2026-09-30T04:35:26.225Z" },+ { url = "https://files.pythonhosted.org/packages/e8/fc/fdf8cf52ff21cd5bf158f20978991cf985325842f74283eb6df26c8a39d8/charset_normalizer-3.5.2-cp311-cp311-win_amd64.whl", hash = "sha256:87e50a3e7cb90af586b6c5faf23e302a970415ac73bd7bd90a515a04b427ef96", size = 214932, upload-time = "2026-09-30T04:35:27.796Z" },+ { url = "https://files.pythonhosted.org/packages/97/66/3e45a506d8110b632541faf9a9470185aa9878f1ed44020f31346c1c5e5b/charset_normalizer-3.5.2-cp311-cp311-win_arm64.whl", hash = "sha256:254eb48b9fa5ee9898a3c445825a1f340fe53712a098904b39b0bddba8ea3cb1", size = 202828, upload-time = "2026-09-30T04:35:29.259Z" },+ { url = "https://files.pythonhosted.org/packages/e7/c8/693809898870237d82785a03f3b2b58fe4c9f14669f84a7d4e623c92a59e/charset_normalizer-3.5.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:ed2a239c0ea213acc1908150a3037257083c7c083128f1a4cec2ec4b97dca491", size = 367780, upload-time = "2026-09-30T04:35:30.888Z" },+ { url = "https://files.pythonhosted.org/packages/c9/87/2fea8c13dc24b3ca9c6f803a5b2dfdeae73eb4f9e12c7885ed908ff0433c/charset_normalizer-3.5.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b91363207bd9dc966a691e959bb47f64b30f7ac4b072be9968b366982f7db77c", size = 246730, upload-time = "2026-09-30T04:35:32.286Z" },+ { url = "https://files.pythonhosted.org/packages/a8/9e/09efac30b937722f46d3110ba30b875b24b2e3a266ed746cc4e376a94d80/charset_normalizer-3.5.2-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:38a873987f3be698494da8b2e3085e29da02da7b633dce73e79c699a113d7bf0", size = 237707, upload-time = "2026-09-30T04:35:33.709Z" },+ { url = "https://files.pythonhosted.org/packages/9e/18/70d76670b13686237863a379928d60bd10e021f17d243ab3d7014c4a5f4e/charset_normalizer-3.5.2-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:355ad8011081dec5412240c087a9a0c9d4d5039f3ed11a3f13e18c2b29b56c51", size = 273050, upload-time = "2026-09-30T04:35:35.138Z" },+ { url = "https://files.pythonhosted.org/packages/54/e2/77a8b09d5adc013ed07b95b01b8b8fa5441c4e810e83ee7e4aae2fa4d91a/charset_normalizer-3.5.2-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:ee21e28f0430bd6dc9086c6e525d5e818a44a5ad19720c8a0ef766792f3eb5e5", size = 270345, upload-time = "2026-09-30T04:35:36.502Z" },+ { url = "https://files.pythonhosted.org/packages/7f/c5/38806a25ab5e65fc178f39affeda20858efafede2fce1ffc2556cfc9fe73/charset_normalizer-3.5.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3d31298449090ab8d47b7b1b2a555ff73cac7ed438a08b7ac160980c7ebed649", size = 257601, upload-time = "2026-09-30T04:35:37.919Z" },+ { url = "https://files.pythonhosted.org/packages/ae/8d/213565184708fdb263ae55e2c04ee1ff748129dd65d48ed0e3502da9c85a/charset_normalizer-3.5.2-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:5cde776b7cc66e4f6c99612cea4aa7269aa65863f7a15841b2c264f103822f4e", size = 252222, upload-time = "2026-09-30T04:35:39.544Z" },+ { url = "https://files.pythonhosted.org/packages/7e/24/76d2cefc25472531e4c5c7dfff68865eb1c39b78482f0fdc15b46f047830/charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:ae4f5fea5b8b8ccff88238cc8569303e5ee95efae67fa62922a311397a71f346", size = 248482, upload-time = "2026-09-30T04:35:41.088Z" },+ { url = "https://files.pythonhosted.org/packages/7d/dc/65a801b66ab4c197e22c433ab25e7ac24324ac6f45a2269aca42cce309bf/charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:f7d486c83842422badd511868fd8a9a20e9407ace71564b6af47ce7e60a336c1", size = 241206, upload-time = "2026-09-30T04:35:42.59Z" },+ { url = "https://files.pythonhosted.org/packages/a7/95/ca9b5eabde673002c6f1e7ada1b223916fe18f6d661da7aabd4d643718f1/charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:11a4d68a6ecda3292cb1e50239e111543ba5d709bb62a6b4ea1afcfa729d8875", size = 273190, upload-time = "2026-09-30T04:35:44.347Z" },+ { url = "https://files.pythonhosted.org/packages/2d/8b/803b4d2a3f6e1740f63f1e87b04d14b42f3d4fdfe6ed7d4db2d34102b14f/charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:d6734d2ef8a50fbf8445c139477da401f50d62a0606bf00e20ec6d87773fefb1", size = 253527, upload-time = "2026-09-30T04:35:45.915Z" },+ { url = "https://files.pythonhosted.org/packages/a9/55/93c0e5dbd085ae0471346026abbe7e0db9ea2d6fea74e51f0b5a46f233a7/charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:a815775b6c38d4e0ff7bcffbeba67feded90202bb6a226b8dd35f1c855217413", size = 271285, upload-time = "2026-09-30T04:35:47.49Z" },+ { url = "https://files.pythonhosted.org/packages/95/69/0dbd0e0b9b16cfa816cdfcb3e2e3854a1f680dc07fb1245ea125e7448060/charset_normalizer-3.5.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:23851fb4e1b85ed3f6c2a27b777cdfe2e19fb5b38429a8faf38c7542b7665869", size = 260010, upload-time = "2026-09-30T04:35:48.996Z" },+ { url = "https://files.pythonhosted.org/packages/58/9d/e7b88e7b1bf403590c3b573277b5e1e488c68c7a6fbacca310a2c324e90c/charset_normalizer-3.5.2-cp312-cp312-win32.whl", hash = "sha256:db19d07e2e0129e974a0e65d0064fc222a446cd5122c2fd4184d2af9fc734a9e", size = 184125, upload-time = "2026-09-30T04:35:50.777Z" },+ { url = "https://files.pythonhosted.org/packages/eb/e6/e6e083884cbcfd49c64865af05027fe7011be7b2d9179524f099a1b611f3/charset_normalizer-3.5.2-cp312-cp312-win_amd64.whl", hash = "sha256:780fbe7cab297b81dad9fb8dc5eb003c0468ffb0d9e5f65068c53a34661a96bc", size = 207486, upload-time = "2026-09-30T04:35:52.194Z" },+ { url = "https://files.pythonhosted.org/packages/c4/e3/017aea0911ada7405a825c7d937eb3a13009664e2f5b38e8c4bbf2abf894/charset_normalizer-3.5.2-cp312-cp312-win_arm64.whl", hash = "sha256:e2af3aad578aa6bd1384bcf4750fc285e5a9de53f40b7d41e5a0bf748edeb2b3", size = 196734, upload-time = "2026-09-30T04:35:53.636Z" },+ { url = "https://files.pythonhosted.org/packages/c5/34/68292d68512768591aaff07c59bb53ee31341c87759433a859c4641a50c2/charset_normalizer-3.5.2-cp313-cp313-android_24_arm64_v8a.whl", hash = "sha256:ed905975ab14056a2e5eb1c376cb2e1ebc5396baf84163939c518556fccde9f5", size = 225946, upload-time = "2026-09-30T04:35:55.313Z" },+ { url = "https://files.pythonhosted.org/packages/e3/80/bee0b01b90ccd5322ae1d0abb33fab1bd95b7c2eadaf02aeccf22e04ee83/charset_normalizer-3.5.2-cp313-cp313-android_24_x86_64.whl", hash = "sha256:a66c3bc5ab1f0ff2164fc9965ddd611ff0802173f4b9d24554c563f6ab7e1d6e", size = 238619, upload-time = "2026-09-30T04:35:56.863Z" },+ { url = "https://files.pythonhosted.org/packages/78/6e/60ce52a85a7fd631ae8482ae6d74521014ca2f255892679484dc04d7ef56/charset_normalizer-3.5.2-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:d2374b62878abb00cd8309b32af6c0b715cd02dec0ca74ef12e5069bdc64144a", size = 206701, upload-time = "2026-09-30T04:35:58.639Z" },+ { url = "https://files.pythonhosted.org/packages/36/8c/71aafad23f971afc84c2b295bc0c560739ce1dac558aad9fec22e39f3639/charset_normalizer-3.5.2-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:d376bbd28b3a8999db1a103b3b388aee6f1ddeb3e51bc2172993efdcd86e064d", size = 210506, upload-time = "2026-09-30T04:36:00.147Z" },+ { url = "https://files.pythonhosted.org/packages/91/da/3c5a7798c046df7d2d68ad653cf5b6c5a8bfee225055a843c6f2f42aac1a/charset_normalizer-3.5.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:6045373d5a89a5ec71afde535db987ca28e76dfa276c2d4c818265b375d4b055", size = 366626, upload-time = "2026-09-30T04:36:01.77Z" },+ { url = "https://files.pythonhosted.org/packages/e1/16/710ac3de2ee354e2bd1a9c94efe45a2d27b5c6ad39b2d6a905be2c094b6c/charset_normalizer-3.5.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:849df64e889b2e17230d58410a03dba311a65b163508fd33679b2b737d4b7858", size = 244624, upload-time = "2026-09-30T04:36:03.389Z" },+ { url = "https://files.pythonhosted.org/packages/d6/39/45c7439f5b63d24f7d5b2a1d760f34af7628782d7144b4cc8ded45c2d4bc/charset_normalizer-3.5.2-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:15c44f7edfd477b06f517a5cc317fc1707edb9de2c865f43d4b6513907473234", size = 235731, upload-time = "2026-09-30T04:36:04.987Z" },+ { url = "https://files.pythonhosted.org/packages/4d/34/38f3154785ce92e9f56eb226f4d35bdfae6b008480dd055f58837a89c810/charset_normalizer-3.5.2-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a89012d6d5476ee112d20d998570ed58df2260a852afb1758809cd6900411d21", size = 270352, upload-time = "2026-09-30T04:36:06.412Z" },+ { url = "https://files.pythonhosted.org/packages/04/f3/859f74e7babc977705026b30593b3be04049632a522fb7000f83c033d747/charset_normalizer-3.5.2-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0c951d5e6dd9c2ff60609476752bee49da4206adde960ebc247766937f72e718", size = 267393, upload-time = "2026-09-30T04:36:07.865Z" },+ { url = "https://files.pythonhosted.org/packages/4b/85/41d27f234b82e47c167a5f6c0f62501dc0c640585ff4aba79e08a390336a/charset_normalizer-3.5.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7218e8f32b0956cfcd048fd42d9d5779809745ca1d86113ca56f66e7ae1549c4", size = 254660, upload-time = "2026-09-30T04:36:09.248Z" },+ { url = "https://files.pythonhosted.org/packages/58/ca/5d1a997587febe5b26d8daffe363b5c1a091cece19828eec6502fd09c5ef/charset_normalizer-3.5.2-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a19a731138fc27d5682277d3b9df22855cea1239bce7fcec5f78f42ef2d1f3c3", size = 249996, upload-time = "2026-09-30T04:36:10.73Z" },+ { url = "https://files.pythonhosted.org/packages/b3/1f/d1e78246f7ed60c8c8d606b4ac27f66ce49cc3e95f24893ccbeba9f77302/charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:62603db9a7caa0802eaa28c1c46fecd7b3a263a774069c24c3c28c302448721c", size = 247028, upload-time = "2026-09-30T04:36:12.294Z" },+ { url = "https://files.pythonhosted.org/packages/8e/37/eba316edd4f0c4d3a5d945924c4eeeae59abac4056aa815d8a4268f863a2/charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:b6856554c4f44d79fc2307d5768854310a8f0096e501c75637542c82292b0429", size = 240562, upload-time = "2026-09-30T04:36:13.887Z" },+ { url = "https://files.pythonhosted.org/packages/c8/8e/aaa037d40ca9ef045977f1a661048b1aa33f223adfce3452fe9be9f79d14/charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:1bc0baf5ef96b6ede57d47f4b8fe4d9d84019c3bfcbeb20a41edc6a6ee341f1f", size = 271699, upload-time = "2026-09-30T04:36:15.41Z" },+ { url = "https://files.pythonhosted.org/packages/26/19/1c1c9f75974adf523b87f34b8a2adc5a435cd65916812bcbd0dfa45f9a29/charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:56bc200a365efb37383b7852e4cc5898d3b2da5987289b543956cf8cad71018a", size = 252030, upload-time = "2026-09-30T04:36:16.839Z" },+ { url = "https://files.pythonhosted.org/packages/bc/90/0660ef18e18df0a4d2a1a0edff7dfbba42d4e50ef2425557a5bb7051f77b/charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:2c9ad19a6cfcd5ea5c0d41161d22f9df1dcc277e9bef2751391334546a314c00", size = 268565, upload-time = "2026-09-30T04:36:18.468Z" },+ { url = "https://files.pythonhosted.org/packages/79/ba/57adc269824e8658f1a0f97a9e514c247445a9632b3419b97e0ba37f16dc/charset_normalizer-3.5.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e243bd13217235fc7290c621941c3f5cc8b66e4872495be821d7436ba2fb838d", size = 257627, upload-time = "2026-09-30T04:36:19.938Z" },+ { url = "https://files.pythonhosted.org/packages/9a/85/33abd4315c052d3d4f54c92b1ee49bfbc0dc7115a981e462a793b6d2ab87/charset_normalizer-3.5.2-cp313-cp313-pyemscripten_2025_0_wasm32.whl", hash = "sha256:a090bb2c68df85450502e3e20d665e3a5af9c65a84d6508ed477badd49166fd3", size = 143407, upload-time = "2026-09-30T04:36:21.376Z" },+ { url = "https://files.pythonhosted.org/packages/4f/de/6435e18d1aaa5d910b896d551411c96af1f42a0c56c29afc2016c61ccc2e/charset_normalizer-3.5.2-cp313-cp313-win32.whl", hash = "sha256:2b7b3bbfb4fe8ef40600792d762fbaa9057559f9d3fad209525b7a22b99e91fd", size = 183207, upload-time = "2026-09-30T04:36:22.776Z" },+ { url = "https://files.pythonhosted.org/packages/9c/76/b8ec57f4e9ee3253541abf95e4a462c0175fe8032dcd070f1f2421240942/charset_normalizer-3.5.2-cp313-cp313-win_amd64.whl", hash = "sha256:78456a747de8dc58360ffa581f30a002baf5aa28cb262536545e91f113ed7639", size = 206489, upload-time = "2026-09-30T04:36:24.306Z" },+ { url = "https://files.pythonhosted.org/packages/3e/60/c647c6ae47480221e875ea5d743ff94946f7416e3c69415ab772928e8d32/charset_normalizer-3.5.2-cp313-cp313-win_arm64.whl", hash = "sha256:11912e4bb14baae7c5d8791aa55ba0a3a03ec6729073307b0f57270abaa713d3", size = 195501, upload-time = "2026-09-30T04:36:25.846Z" },+ { url = "https://files.pythonhosted.org/packages/58/ca/7aa91362a2f77ac8e9e28a9b902a74f7d0e11a851ef0d27a74308da8cd90/charset_normalizer-3.5.2-cp314-cp314-android_24_arm64_v8a.whl", hash = "sha256:1afb975bd5d68d5ce9f6b6d44fdf2f7e34b895a35e95708a7a91b20a3b51d187", size = 226010, upload-time = "2026-09-30T04:36:27.669Z" },+ { url = "https://files.pythonhosted.org/packages/a8/cf/ac8878d0322cf88a1aad4c7b147db32ca0bd806eb0060957b2e31486dbe6/charset_normalizer-3.5.2-cp314-cp314-android_24_x86_64.whl", hash = "sha256:bbbfc8e28816f19d7c0f1816664980c0a9875d01b27cdf8eedddb639d9e108ad", size = 239266, upload-time = "2026-09-30T04:36:29.434Z" },+ { url = "https://files.pythonhosted.org/packages/c9/6d/9a08d7e0b29b7208e2c6c01dc56c8e0520e7c7beadbbfb024b58fd69c8a5/charset_normalizer-3.5.2-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:7967d08cf06dee78443b874f98c98036f624f3a4e73e11f9f64f5be4d25393cf", size = 206783, upload-time = "2026-09-30T04:36:30.872Z" },+ { url = "https://files.pythonhosted.org/packages/82/44/b0aa350280e6ff5a5492d17cf10460dd39d5ee848f872f7ba2df10607f60/charset_normalizer-3.5.2-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:4c2b5031f63e331e3839b40aed2dd6f191e9c07edbde303e7876846ea1946995", size = 210449, upload-time = "2026-09-30T04:36:32.625Z" },+ { url = "https://files.pythonhosted.org/packages/7c/8a/40db9aa9f5907bb0e6f8b6d64064bf8852fb33d4b813ff9414911df7647c/charset_normalizer-3.5.2-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:fcff63213e8e6e47770541a4607175404f47cbb3ebea7b6058cc82d524a0e424", size = 367815, upload-time = "2026-09-30T04:36:34.197Z" },+ { url = "https://files.pythonhosted.org/packages/7f/72/9c5e7707b57c8ddfa9ddf7b0b1d009d7fbab9e9e887d5b721060f37e307d/charset_normalizer-3.5.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8d86d6fc60743dc916eb79e2eb1ec4818e21e427731543af40a3021851174a13", size = 247095, upload-time = "2026-09-30T04:36:35.803Z" },+ { url = "https://files.pythonhosted.org/packages/83/09/71e453691e927de4ddf792770cfaab3f49d494e222f66ea5e404bbd5e39c/charset_normalizer-3.5.2-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:7a881931aa470808df94a8c380eed2bbbc76cd9dc622310f99665658c821eb6d", size = 233942, upload-time = "2026-09-30T04:36:37.407Z" },+ { url = "https://files.pythonhosted.org/packages/9f/86/85c84e4da8b27dd409577d9437926ff581c5f9d3c66038dc68c1a526de51/charset_normalizer-3.5.2-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8024d00c3faf3fc0c16e07a69f4405e8eac7cc0ab15f65fe6cf43827c4cf72b4", size = 273762, upload-time = "2026-09-30T04:36:38.904Z" },+ { url = "https://files.pythonhosted.org/packages/92/08/564955a4b5f2ccb410ab480bbe8c6a18063ff27f2d35458731c4a5335df9/charset_normalizer-3.5.2-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4d48f2d08b9de5864e2c8744d4461b862fb149a18274abc8b698c45975573438", size = 269514, upload-time = "2026-09-30T04:36:40.469Z" },+ { url = "https://files.pythonhosted.org/packages/18/24/bad3ac4271589df29cf5ce2f5ae490518a5739358052bd0d61209e6fea54/charset_normalizer-3.5.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:34276fd796040bf0993ab33a369aa572e6979c7aab225a88893667ad8eac8f7a", size = 255056, upload-time = "2026-09-30T04:36:42.02Z" },+ { url = "https://files.pythonhosted.org/packages/d6/3e/350d89ad49916b86554d6f5f2d03ec1152148f87e5ff735106c6a03b1a36/charset_normalizer-3.5.2-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0521c5665880b33d603717defa76c094048900010897909952397feb3039da56", size = 251311, upload-time = "2026-09-30T04:36:43.577Z" },+ { url = "https://files.pythonhosted.org/packages/56/5b/4970a2d154df502e133402906dd04e3ae7cada7b3011283c88d0479a2585/charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:eff0ac9dbe711a4aee69bf04a83896aa9b85f19641264053a9f6d48573abb7dd", size = 250190, upload-time = "2026-09-30T04:36:45.185Z" },+ { url = "https://files.pythonhosted.org/packages/88/8c/f1a91bddc8fb47c2889e29ea7ea49a194eb0d9868675d786806519c00d76/charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:1503bccbeb36d5527790c3930327704c39af22de3112f1b1666a9f3ce15ee204", size = 237098, upload-time = "2026-09-30T04:36:46.689Z" },+ { url = "https://files.pythonhosted.org/packages/24/0e/bb5dace3cc7e79068425386a6589c19b5a2ab5fefc2a46abea6919683332/charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:52aa6992700996af31f375de0c6bacd402b0097fe40b53c426b9f51a90ebabc7", size = 274228, upload-time = "2026-09-30T04:36:48.31Z" },+ { url = "https://files.pythonhosted.org/packages/9d/79/b849ad523017ea9f5a45581bbebed91439e0cf42fd2860a6f64e358eb5a6/charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:e09a3942ecbdee5cce73ea9d42da82b81b72ac1bf031ce069b93b5adf4eac8cd", size = 252401, upload-time = "2026-09-30T04:36:50.091Z" },+ { url = "https://files.pythonhosted.org/packages/89/8c/75469d690cf47200bce8f6cad7655724fc23148e147abfc5ce78b5f65863/charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:c7c9ab723cde841fefb34efbad91e87f00a674b1fe1cd0784fde742bf2c154dc", size = 271846, upload-time = "2026-09-30T04:36:51.719Z" },+ { url = "https://files.pythonhosted.org/packages/26/cd/6d52d3c7437cdcf2e310ce9f28f282e733d4ef60ed19105d1819c356255f/charset_normalizer-3.5.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:ddc7dacc8ece3a182e7f15cb862d1fd616b46d076cb1ae9dd232b2c38b655874", size = 258151, upload-time = "2026-09-30T04:36:53.234Z" },+ { url = "https://files.pythonhosted.org/packages/f7/4c/070b38bdb5f49a70199fce923ec0726a49536a63ab262abbfcaaf351110b/charset_normalizer-3.5.2-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:ee43c17b173d46a3212baa6ead3ae258eeabdae48c263a01ccf0218c366dd655", size = 143570, upload-time = "2026-09-30T04:36:54.816Z" },+ { url = "https://files.pythonhosted.org/packages/81/84/9ebfc8ed6c8c4fcd8e726ff6bf220cc8deb3966e31dce9be8dd8aa017e64/charset_normalizer-3.5.2-cp314-cp314-win32.whl", hash = "sha256:4f87960d57feabfb618e4e0af6e7371645fa26a277860739d6e5d6e0012c92f0", size = 186412, upload-time = "2026-09-30T04:36:56.643Z" },+ { url = "https://files.pythonhosted.org/packages/d1/78/5ed86f743d4bc350db307e7636419a0a5ee1d91806d30c7f667bd5c80dae/charset_normalizer-3.5.2-cp314-cp314-win_amd64.whl", hash = "sha256:e4e81e09c1578b8df602e3db08b0b3ea0a6947ad612f52bf8dc5ea8d47691f0c", size = 210965, upload-time = "2026-09-30T04:36:58.205Z" },+ { url = "https://files.pythonhosted.org/packages/53/94/a3a7698e9b1a395e1eb99ccd9a324be9347973bff4e72db2a06496d7cd27/charset_normalizer-3.5.2-cp314-cp314-win_arm64.whl", hash = "sha256:80d02b6f04e92601a081dd97b23d3128033098bff5d35d392ddcc0476ea11253", size = 200406, upload-time = "2026-09-30T04:36:59.764Z" },+ { url = "https://files.pythonhosted.org/packages/c1/48/c5dd00d5ef7791f02666de250a5bb6071e29b7e133cf4b835800b6d3bc27/charset_normalizer-3.5.2-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:dca9ab98072a5a54ebacebdc45f53e645336b320c667410b061be1ca588ae709", size = 396871, upload-time = "2026-09-30T04:37:01.543Z" },+ { url = "https://files.pythonhosted.org/packages/12/c8/8379554b42e8368161d898476686947a0fdbd3e8865170d7909dcabfdee8/charset_normalizer-3.5.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f0aa869112ef88429ae17820d99c3dd9504c9e9c671d3c246f3d7442cb051084", size = 249711, upload-time = "2026-09-30T04:37:03.111Z" },+ { url = "https://files.pythonhosted.org/packages/4a/eb/2ddb1035d17320caa9f41682935123a9a250277b261c3efc86b2d2a21343/charset_normalizer-3.5.2-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c0afc6800ba57ccc350374c5bd6150419915d95ce93cdbab2d783d75eaf30ecb", size = 231146, upload-time = "2026-09-30T04:37:04.721Z" },+ { url = "https://files.pythonhosted.org/packages/4a/24/2ecb4bde104322cd7859d6594fcfa74649f8d90b3221c9feecbef149875b/charset_normalizer-3.5.2-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:7dcd882da75ef9adf94903b1e3b9419e8aa8fb4c7396822b834b9ef7fb96954f", size = 271552, upload-time = "2026-09-30T04:37:06.295Z" },+ { url = "https://files.pythonhosted.org/packages/3f/98/9d5f6ebc3aee9fef5d30b4aff11fb2ab7a1222b4064f8ef2c7c87cde217a/charset_normalizer-3.5.2-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2e06a3a98f916dd41d27f3105e02e7a40181c98c94b9158733d03a6f80506c09", size = 269810, upload-time = "2026-09-30T04:37:07.905Z" },+ { url = "https://files.pythonhosted.org/packages/09/e1/a3b06a10461b1b7628853c934c644e03bc28e42767116afb52f19a56519b/charset_normalizer-3.5.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6bd128f206a7752ae1f2ab6c61bf8a24ba28913a10df8b14c2637b973ff97a80", size = 259845, upload-time = "2026-09-30T04:37:09.554Z" },+ { url = "https://files.pythonhosted.org/packages/fd/d3/6f561f74a296cf27d61775a1dc665ad13f3bff6a798810ca05907f37a7c4/charset_normalizer-3.5.2-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c8f3d67aeaf55f017982b73683f0e7342ba2f6635a78f69ce89ebb26aa411e5c", size = 252825, upload-time = "2026-09-30T04:37:11.274Z" },+ { url = "https://files.pythonhosted.org/packages/26/9f/69e13ca3b18f43e0eafcd34c04a45b732ae22a43b54a5fc9e119103356eb/charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:fe9753dfee015c570d73df76f899f18444d41388bffcde097deba51c4fadbb9f", size = 252659, upload-time = "2026-09-30T04:37:12.941Z" },+ { url = "https://files.pythonhosted.org/packages/73/a9/ace29806a0dae18939919c76ba526472d83214afa101105fabff2cf30625/charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:92888bb3187c5ba50500b00b3b310c9f2c651709d28036077680cb5255450a03", size = 238819, upload-time = "2026-09-30T04:37:14.659Z" },+ { url = "https://files.pythonhosted.org/packages/f8/c1/6116d52a2e3311ec80f21f5fb5e17b27405f10b9608af8f6e69516841a1b/charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:d008d90a7f2471519aef0c90dfbe73b3e6e4d5e66ac48e19154c17e89e98b604", size = 272973, upload-time = "2026-09-30T04:37:16.346Z" },+ { url = "https://files.pythonhosted.org/packages/19/aa/9955c7e93bba10a9c7e8f7a5031b7ced66f3a1883a55c00712b8d5850ff3/charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:31f3930700408d211f13378ccbe1c40845d8da54bd0681fac3a9b5aae81c7aa8", size = 253692, upload-time = "2026-09-30T04:37:18.212Z" },+ { url = "https://files.pythonhosted.org/packages/bb/33/2a6ae7fdc1b10cb581cef91addd8cdfc5f40d50abb5702309369d5834579/charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:2a925889534b3748302dae5dead07cc13480de1dac3aea80a941b729b471ef93", size = 268757, upload-time = "2026-09-30T04:37:19.877Z" },+ { url = "https://files.pythonhosted.org/packages/a2/22/80992720a0282cd39bba1db35868e6b9c22f41281160143a836544bc1d8a/charset_normalizer-3.5.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:f5ec61164adcec446f8969a3358ec3f9b26bbda3b9213e5586d219afa8df2915", size = 262220, upload-time = "2026-09-30T04:37:21.583Z" },+ { url = "https://files.pythonhosted.org/packages/92/9f/181fd07e1bffea1d95cd80c84ac537354f50699c22cfc4d3c02b6fc16208/charset_normalizer-3.5.2-cp314-cp314t-win32.whl", hash = "sha256:598a11a2c7ebaa5334bf698bf29568c9c390abac6a154d8170fedecd1cea38c5", size = 197797, upload-time = "2026-09-30T04:37:23.235Z" },+ { url = "https://files.pythonhosted.org/packages/49/1c/25d8415ec1c4f2f41f1680435e4c87cfb378ff2f677d950946f2a45d0632/charset_normalizer-3.5.2-cp314-cp314t-win_amd64.whl", hash = "sha256:7fdde2c9fd9e3eca40631e024664cf2584272cc8f96308cbe5fdfc930f51d8bc", size = 222765, upload-time = "2026-09-30T04:37:24.891Z" },+ { url = "https://files.pythonhosted.org/packages/3e/b4/46b48f013dadfc0d0d33b375438e31bdf5a989dc68389c6bf627054d4df9/charset_normalizer-3.5.2-cp314-cp314t-win_arm64.whl", hash = "sha256:d1befeed746d247c81127bb14de9dc3d30edb6e5976d34f83f86ed262b1d9105", size = 210985, upload-time = "2026-09-30T04:37:26.634Z" },+ { url = "https://files.pythonhosted.org/packages/ca/e9/34e597dee616d0b8ee4b34d29399e85c2204ade174157a48505d42baa4ff/charset_normalizer-3.5.2-cp315-cp315-macosx_10_15_universal2.whl", hash = "sha256:87475fabc8d9996fd9c27debb395e642e8c838d78a00b6e932227a0e06b81e26", size = 367676, upload-time = "2026-09-30T04:37:28.329Z" },+ { url = "https://files.pythonhosted.org/packages/60/9f/a5d1c91c0263745e2cd344c5a4415d787c575501ab1d449f1148ac6b495d/charset_normalizer-3.5.2-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9409a8bf35cf78353942504b24a57de3d75b708997a1e4bd8db71ac8633ce364", size = 248414, upload-time = "2026-09-30T04:37:30.167Z" },+ { url = "https://files.pythonhosted.org/packages/26/79/e697f77464748a3ee3cf490c83d592459400d4898380d66c38366b03080c/charset_normalizer-3.5.2-cp315-cp315-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:498dc3188ca05a68231ac3fdbfc7f57eb67e1343c30e0fea17f8218c1599b253", size = 244775, upload-time = "2026-09-30T04:37:31.964Z" },+ { url = "https://files.pythonhosted.org/packages/ca/87/3d42a42e18ea066e2513936fd678a00696e77878b5ae04528976abdbcb83/charset_normalizer-3.5.2-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e242bb1c5e76e97dfa9e7f209a71e93a01d7f19ffdd5cfbb2e2d55b4f08f8ab0", size = 273877, upload-time = "2026-09-30T04:37:33.661Z" },+ { url = "https://files.pythonhosted.org/packages/c3/76/8a28136f3938ba9836f84280ce0c4d61ed1cf15a036b2034900c62634162/charset_normalizer-3.5.2-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:def79fa35ef0cef8d2accec024f4fdc7ead3012ff02f5215c783f39f03ef8cfc", size = 269455, upload-time = "2026-09-30T04:37:35.573Z" },+ { url = "https://files.pythonhosted.org/packages/a0/a1/4fbf5d0f0f1b2a080474c1cf9a2f12c4c6531bb0e8ba591055e846d2b4e9/charset_normalizer-3.5.2-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3df041de8887954562c9b261cba85ca0e9ded74048daf125f45edcfaa4832229", size = 257336, upload-time = "2026-09-30T04:37:37.397Z" },+ { url = "https://files.pythonhosted.org/packages/ba/a2/8b50aa320adb880ad579518e6f718f24944804b42a88b83d267d5d444125/charset_normalizer-3.5.2-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:04851f73ae72b8413dddadb16a49dfee95263553741fd42d546f7d66907e6be5", size = 257584, upload-time = "2026-09-30T04:37:39.522Z" },+ { url = "https://files.pythonhosted.org/packages/a5/57/50e3fed84e175f40349bd0da7a4fce94c87f0378f52d74f511d89e0bdc20/charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:183b88127acdb4fabe59d951ab424faf1af7b63cdbb5f776186c1ea2ffcaed98", size = 251854, upload-time = "2026-09-30T04:37:41.23Z" },+ { url = "https://files.pythonhosted.org/packages/d6/54/f7fbb3493c9f49091213b9c2d6dd65800696f1ce1a3f196a4205f50417b1/charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_armv7l.whl", hash = "sha256:16fa0eccf81304b79c5cd87f9271c3b85dd9dd99245e4422ae9c0dd45e0f99d3", size = 248767, upload-time = "2026-09-30T04:37:42.883Z" },+ { url = "https://files.pythonhosted.org/packages/d9/37/b3a6385acc5a1e45b39ae9c90bfb9cf838a09b9dd37ef2740ab4c6b4a2eb/charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_ppc64le.whl", hash = "sha256:7441d755b7ab94f8d4eb3e43ec05482d760842fd263d003a99102d742cd835e2", size = 274479, upload-time = "2026-09-30T04:37:44.658Z" },+ { url = "https://files.pythonhosted.org/packages/89/44/809913e2cfd279e635a9294fdbbfb1b1dc62a8189d473d561f649fce98d8/charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:ca403d7e4798f525fdfc78e258820419cbbd0f0ecbab9de7840e3c017cf6b8cf", size = 258310, upload-time = "2026-09-30T04:37:46.529Z" },+ { url = "https://files.pythonhosted.org/packages/af/a2/f28400ab13359d91bd39179df8e149376b9bf36588e739a3a4f9de2b84b2/charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_s390x.whl", hash = "sha256:df29a0a7107f7011e77f4eebdddec4c7331e24d787a0b21a46d63bdf7445da95", size = 271100, upload-time = "2026-09-30T04:37:48.399Z" },+ { url = "https://files.pythonhosted.org/packages/e9/89/9bab37955edf0adb3b66f8a3a6617d9f2f487e0d56f295a6a286cb640aa6/charset_normalizer-3.5.2-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:f3c96f633825733f735c5a9cf21d21a257d8e1edf0b1cee0a064b9c424ca0f7d", size = 259936, upload-time = "2026-09-30T04:37:50.023Z" },+ { url = "https://files.pythonhosted.org/packages/23/b5/4459e08d45a679f903d50fea08bc52cfa728cca4d7bd02c757b5e5abda2e/charset_normalizer-3.5.2-cp315-cp315-win32.whl", hash = "sha256:281cb91036248400f4cc957495cccd44c275c2e0c5854f7e45ac5cf7dc193847", size = 186301, upload-time = "2026-09-30T04:37:51.722Z" },+ { url = "https://files.pythonhosted.org/packages/98/e8/55d5fd3935b4bce6da4fe0df61898e8c82653e317e677bd58aceb9c60f13/charset_normalizer-3.5.2-cp315-cp315-win_amd64.whl", hash = "sha256:89b53f3cda69831909888e0494f4fa0bcd3537e3e138dabeb620bd6ad946bae8", size = 210858, upload-time = "2026-09-30T04:37:53.427Z" },+ { url = "https://files.pythonhosted.org/packages/a9/5b/974423c2fd8e524c7a7f64318c1e02240ef954912fa2b4d70344107b9c68/charset_normalizer-3.5.2-cp315-cp315-win_arm64.whl", hash = "sha256:6be488a102b8cf28d0391d8c4ba7748938ae28b78ad901f8585520fca33ead1a", size = 200309, upload-time = "2026-09-30T04:37:55.015Z" },+ { url = "https://files.pythonhosted.org/packages/ee/f9/00ee0195db1013d8f7c416fd770fbeb560bb46eb2e36b054d05cb56f6cfa/charset_normalizer-3.5.2-cp315-cp315t-macosx_10_15_universal2.whl", hash = "sha256:915563965d418f986e7e145accc592eae9e1a1be3566ff98a05d7a9ec42a76e1", size = 395343, upload-time = "2026-09-30T04:37:56.743Z" },+ { url = "https://files.pythonhosted.org/packages/04/3a/c00b50e94c964cf934c7899cd47c97952fc11dad71cc5884b3c61795b09b/charset_normalizer-3.5.2-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:65cd72beeeca9d3aaea1201e5923859f308f952f9c71de93f06063c79f0f7a3b", size = 250114, upload-time = "2026-09-30T04:37:58.607Z" },+ { url = "https://files.pythonhosted.org/packages/50/27/d102dc880bbcffd0479ab64dfc1fb96777a854355a55e2bda72a71efadcb/charset_normalizer-3.5.2-cp315-cp315t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:b7fd005a73d9e657273b7a10dc71a9e03c8fb9ee6999798d6918ce095b81ac7f", size = 239997, upload-time = "2026-09-30T04:38:00.511Z" },+ { url = "https://files.pythonhosted.org/packages/a5/4a/bf7ef45794dd293fab5f98a9309817977fbb845b9998f171b8cc5d8437a3/charset_normalizer-3.5.2-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e54da4baf05720032d527874d40b65fa4d7e5c6c6a43d0c3adbeffcaf275a2b3", size = 272313, upload-time = "2026-09-30T04:38:02.509Z" },+ { url = "https://files.pythonhosted.org/packages/e8/ee/008a2837737991474c5754bb3191010007663860979701990982a502cbaf/charset_normalizer-3.5.2-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:124fbf1a8ff966d87ae05bb8bd45a71f966055ed8bba320d0c7cf450bc5f4d0e", size = 269986, upload-time = "2026-09-30T04:38:04.435Z" },+ { url = "https://files.pythonhosted.org/packages/93/ad/bd74a283940dc910c5b14f8e4f80a248082bc9c0fcbe1f54530cb6d9cc5e/charset_normalizer-3.5.2-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:28b4f0d66fb834ff90f28209ac7bce77868c45d8c93e26f906709d9b7c2e1af9", size = 260202, upload-time = "2026-09-30T04:38:06.549Z" },+ { url = "https://files.pythonhosted.org/packages/8a/7b/ed341c66f69f688723501fac752be3d63c7159ca0d0d4174fc611e5710bb/charset_normalizer-3.5.2-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:58ca3755ee7ff7f59b57789ec9833c9de9ea275405cdd240eda1f193112e398a", size = 259083, upload-time = "2026-09-30T04:38:08.311Z" },+ { url = "https://files.pythonhosted.org/packages/cc/9d/e41588b777965e5031a43128a1e96173ebb35ac75fc53ec3b517e7c21cd4/charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:443eae2bf318abeaf6f15d785138f71fd6de770e99a92158b8b814265e079115", size = 253081, upload-time = "2026-09-30T04:38:10.402Z" },+ { url = "https://files.pythonhosted.org/packages/81/35/b761eb6d8c1eb218b9b42b9b4d5ac902afdc399fb6dac6f9a9aac7bda589/charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_armv7l.whl", hash = "sha256:58f361dcbab699cf8f42db3f47c8e7fd1036f138c23a5d08de9fde5f425a730c", size = 248712, upload-time = "2026-09-30T04:38:12.317Z" },+ { url = "https://files.pythonhosted.org/packages/4d/2c/147169a041b747759f37405c0a97157e8e92de967968373101ff14915cba/charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_ppc64le.whl", hash = "sha256:1b4cbc7c3491ccb4aa17fcd8165649d01cf39f76de1696da8631b5f71b85401d", size = 274176, upload-time = "2026-09-30T04:38:14.138Z" },+ { url = "https://files.pythonhosted.org/packages/f0/2d/0ff8db0d373ba8538db686db11cd7e8912031490b9e4f383b41912e8d594/charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:ba0b1d2620edf869789c3879223f52bf2afc5d31b3cb47cc57b3a12c05e2aa9d", size = 259413, upload-time = "2026-09-30T04:38:15.841Z" },+ { url = "https://files.pythonhosted.org/packages/8a/8e/b4a085fb47c9d3a7e43576a4784fdd8fe23f907514a972de8086edaf7a48/charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_s390x.whl", hash = "sha256:5e2b6b57e9733d39f0c9fd3185efa6b8e29652c4cd8fe94180272cf6ed9a78c4", size = 269434, upload-time = "2026-09-30T04:38:17.626Z" },+ { url = "https://files.pythonhosted.org/packages/83/1c/d8d8d7322a7c3eecdf3237a4a419cf41d2eaad8e006ce7dfdd9d4c8fa2eb/charset_normalizer-3.5.2-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:51cf45226a9b588d0d2b4880c62d686934b63ab0bd79ca23ab0e9762eb27441b", size = 262716, upload-time = "2026-09-30T04:38:19.214Z" },+ { url = "https://files.pythonhosted.org/packages/a0/16/0e4c6ba9b44e97a2da150e52d331e8f9c968b21b358fbffa6c856cebcd89/charset_normalizer-3.5.2-cp315-cp315t-win32.whl", hash = "sha256:5fb29fb8cd1a46c27a1bf9613ad5ec2599310d46b4025d9556404a6b6a292800", size = 197159, upload-time = "2026-09-30T04:38:21.037Z" },+ { url = "https://files.pythonhosted.org/packages/be/33/e90bc2b1374f7f36ef106f56620de5a783907e19ca857efe2277e31cac3e/charset_normalizer-3.5.2-cp315-cp315t-win_amd64.whl", hash = "sha256:a192e2c40070d92c3ccf777e3a5c4ff515573cd2bb7ed0c537fdadbbec5bbf21", size = 221322, upload-time = "2026-09-30T04:38:22.886Z" },+ { url = "https://files.pythonhosted.org/packages/66/89/dfa6dcb08c200b7830ab56439e8c1890f2971d51aafbb3937894a2e7fcfc/charset_normalizer-3.5.2-cp315-cp315t-win_arm64.whl", hash = "sha256:749e97e1b32313717a565abbe321bc2190bc8b35f1a67e4cdbc7c56c8d8ffe58", size = 209192, upload-time = "2026-09-30T04:38:24.648Z" },+ { url = "https://files.pythonhosted.org/packages/8c/ab/176fbfd5b64939c55d652366aa5b9ef1d767af207a3aa6ebeb0d226c484d/charset_normalizer-3.5.2-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:4275811936e2f06feff5e598fb42a1b7ae852da8e39605211892b56b81a34efd", size = 331815, upload-time = "2026-09-30T04:38:26.216Z" },+ { url = "https://files.pythonhosted.org/packages/7e/84/371eac6b30bdbcbf2d632a1a01809103459216fcaae61b8b8d922c1bfb8a/charset_normalizer-3.5.2-cp37-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:1c50fe28bbc2ced33386f298650d91218076c05420e6cbd790b913adc41659e7", size = 253276, upload-time = "2026-09-30T04:38:28.032Z" },+ { url = "https://files.pythonhosted.org/packages/43/6f/c4fbae58febff71709c51bc7e18fdfa55341dc382704740f9f0cbf03817b/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d19fbd981a488e22cd04883659ca6b08f50b5974f9fd7c95655ef6a043e5893f", size = 241239, upload-time = "2026-09-30T04:38:29.732Z" },+ { url = "https://files.pythonhosted.org/packages/61/71/458c3f42164a07d0c5210798e9e704b39e540a6793b05aba67f3a35243a9/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:0fed1d06615f022ee3b13caf5e8b180cfea32bb2c5aded8a9d44277afc040f93", size = 231121, upload-time = "2026-09-30T04:38:31.462Z" },+ { url = "https://files.pythonhosted.org/packages/09/54/ab9e89367076f6331bb6c65c4bf14a5361fa5191cb6561bf534f18504e1b/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:838dcc90063569a0448120554591a1d6c4a4ffe11babf048908793154ab86ade", size = 260350, upload-time = "2026-09-30T04:38:33.239Z" },+ { url = "https://files.pythonhosted.org/packages/7c/c1/061431ecc688d9d76602502cb57cc01e691e682c18f1beb45f9673b5bbd2/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2ce45c6627b22c47e390bc91a41c3d13032192e699fa0bea96e9671b373d69b0", size = 255430, upload-time = "2026-09-30T04:38:34.865Z" },+ { url = "https://files.pythonhosted.org/packages/8d/1f/20c8949f0676f7ab811abdeb7f4d7f1cbc6e61ff20bef08b44edeb092bc8/charset_normalizer-3.5.2-cp37-abi3-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0774bf9bf620249fee3e0b8b9fd3065de213be30f3aa94ce2494b3b638949e26", size = 250612, upload-time = "2026-09-30T04:38:36.649Z" },+ { url = "https://files.pythonhosted.org/packages/2b/9e/46f2fa4c431fc98c4ae76a8cb5bdca54e0341e3cfc3fcfd8e82740250818/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:1db38f4c5496827c1a501846d64d14c3b80c7e6714e406cd7dc36a9899fa1011", size = 242083, upload-time = "2026-09-30T04:38:38.26Z" },+ { url = "https://files.pythonhosted.org/packages/bd/39/559be29a0c0f086e0bba6922babd38916cc5e0b58ced4de13ee01ea05508/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:304d8e4d493af723536393eee0c689eb7813f4a474c8b479dee63f1fdd98f621", size = 232738, upload-time = "2026-09-30T04:38:39.81Z" },+ { url = "https://files.pythonhosted.org/packages/ff/6c/387b0e4f756a282831c1d9fc6aeb6c51ca4507ca202767c8de15ce9b12e2/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_ppc64le.whl", hash = "sha256:9b7f416ff0978e2f2249330527f0ad6fa02f4932e6199692d3b52da2048c19e4", size = 260703, upload-time = "2026-09-30T04:38:41.346Z" },+ { url = "https://files.pythonhosted.org/packages/96/92/1fdf015f09ef449f50d3ac4b67c90887c9c318b727daa95cc4f866e6521d/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_riscv64.whl", hash = "sha256:01077390b03f7988f11d700a2194e69b119741a86b1a638b1db88891e3eced8e", size = 247622, upload-time = "2026-09-30T04:38:42.937Z" },+ { url = "https://files.pythonhosted.org/packages/dc/3c/8e7b8a5671ad5d433669fb2a76f1a0164df2d9b1718b0206bc2a16d840cc/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_s390x.whl", hash = "sha256:7e841fb9010836c992c9f12fcbd43a831de93a5f726fc1ccd8ca1d0268c5014c", size = 257500, upload-time = "2026-09-30T04:38:44.604Z" },+ { url = "https://files.pythonhosted.org/packages/b4/f0/45b579df5cabc1d5d53ea1cc35e8437d3ca768c0acccc7041517cb6fbb32/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:9cae88599c7219005d879f98e5ed53341e9a122af585e1091200358a3003d2a0", size = 255100, upload-time = "2026-09-30T04:38:46.289Z" },+ { url = "https://files.pythonhosted.org/packages/31/68/fdec18a343f5fb3f310588dd478b09ac4799e0b187dbade3a8cd776f03ef/charset_normalizer-3.5.2-cp37-abi3-win32.whl", hash = "sha256:01b0c0d2262a9e28e8484a278c7e1b5d650e3ac8cf2683d2967e25899f208bdf", size = 174499, upload-time = "2026-09-30T04:38:47.999Z" },+ { url = "https://files.pythonhosted.org/packages/9d/8a/b618149cc5207943a0242068d7a27897f56a62947b5a039085f2a22029f8/charset_normalizer-3.5.2-cp37-abi3-win_amd64.whl", hash = "sha256:9f56f72050826f63dcee7a7f55b0a77168cb3bfc553fd405e7f8f9ece75a4036", size = 200092, upload-time = "2026-09-30T04:38:49.707Z" },+ { url = "https://files.pythonhosted.org/packages/03/cf/4c66866fa9e2b1c78e3c911516d1de497a677b7ac60f1eceda74ce777ca3/charset_normalizer-3.5.2-cp37-abi3-win_arm64.whl", hash = "sha256:40ab6bffa02ae10a0581e6c198be7d2d8ca5c2a0c64e4ed3465d766df457573e", size = 294363, upload-time = "2026-09-30T04:38:51.312Z" },+ { url = "https://files.pythonhosted.org/packages/fc/ad/d07d7862a62ffa6d79d68074d14823243dd235a77c45262acbf6adeb28bf/charset_normalizer-3.5.2-py3-none-any.whl", hash = "sha256:b6b751274acb69d77b3323d6b7dbaa3c7fdfc1eb829b7eb61d262f32e1af9685", size = 68872, upload-time = "2026-09-30T04:39:21.828Z" },+]++[[package]]+name = "click"+version = "8.5.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/c7/0e/7fa0ef50764b67090eca4114772a2abf8b6148198475e54c660b97caeee6/click-8.5.0.tar.gz", hash = "sha256:ba0d2089de75ea0310e2dde03160e6ca10009947fb95a182f9b54021bb272e34", size = 382235, upload-time = "2026-08-26T13:33:14.56Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/58/50/6c0d534c5f134586a8e1ba4e330569e32f057e33372ae556463212fb4cd3/click-8.5.0-py3-none-any.whl", hash = "sha256:255bc9599cf7748b4b1a446ccc735421bd08a2ae529a8b88597d3de5664ee360", size = 125251, upload-time = "2026-08-26T13:33:12.928Z" },+]++[[package]]+name = "colorama"+version = "0.4.6"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" },+]++[[package]]+name = "colorlog"+version = "6.12.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "colorama", marker = "sys_platform == 'win32'" },+]+sdist = { url = "https://files.pythonhosted.org/packages/8c/55/ba79756cb90c8d69d599d57785398ac87bba7b19c80e87f4e8a562197c93/colorlog-6.12.0.tar.gz", hash = "sha256:2a7924c1dadf18b22a0eb8b06d1c7b01d5341707ec1641eb6fcc4fde0c3e8e5f", size = 18151, upload-time = "2026-07-23T13:40:40.71Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/d4/19/0b6647bf5e331521e55d2b63bfbdc210bd9cd605189273f03614a05f702d/colorlog-6.12.0-py3-none-any.whl", hash = "sha256:30d392604e9110045a2c2aeefc27d7a017abbab63f3a8aee594eac0801df784e", size = 12239, upload-time = "2026-07-23T13:40:39.562Z" },+]++[[package]]+name = "crc32c"+version = "2.9.post0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/f6/07/b5fabe88654f5eded3e4b6d84cde572dd0280a7362a6a5b698bbd77be5df/crc32c-2.9.post0.tar.gz", hash = "sha256:6a089e0340de8438e836a09e613c6b541675d0f3aa92b3fe34295aaba62f014f", size = 48258, upload-time = "2026-09-11T04:30:26.845Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/41/36/fb23b08bb32be72558707f37bfc8cfe463f164ad5fe458aa5ef9154f35b1/crc32c-2.9.post0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e778dac7547ea388ecbf141300ee65bb249b4ed2c2eb57356866b9bf94902d13", size = 66505, upload-time = "2026-09-11T04:28:43.139Z" },+ { url = "https://files.pythonhosted.org/packages/03/e8/e876170090b012faa74a516a58f286f6d218fb3226d222e4370131bc58aa/crc32c-2.9.post0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e6af2f97f840ed1664212ab20085b011bf38b06b3efbcc00342fc4f9eeb25662", size = 63167, upload-time = "2026-09-11T04:28:44.151Z" },+ { url = "https://files.pythonhosted.org/packages/f3/be/1044d7f6f5e7c97877e06fcc7a1b5d3f6c9eda9a1d9c4493e3b017d085a6/crc32c-2.9.post0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6f73a4c5f8a13cc09c73a5a8e69ea7738937a6ada86dcb9b2f580e28dab0feac", size = 61701, upload-time = "2026-09-11T04:28:44.93Z" },+ { url = "https://files.pythonhosted.org/packages/c9/84/bd3cb4390f3a90648192450d8c8688e6ef8311a52e375e659faad82fcf8f/crc32c-2.9.post0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:a9c54dad573fc6ee1860f75e1cd934dae688be068a4c4a23d405ca0fcec9d880", size = 79573, upload-time = "2026-09-11T04:28:45.96Z" },+ { url = "https://files.pythonhosted.org/packages/f6/42/46e07c12eec7e52184123662ac1d3bc88959caf41f7652b0150d87ebc1c8/crc32c-2.9.post0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0fc2fb005f421bacf9fc03f3fb0602dd763944cae8e97b0d50c6130ce2b7f92d", size = 81142, upload-time = "2026-09-11T04:28:46.91Z" },+ { url = "https://files.pythonhosted.org/packages/eb/20/44a97d0fc04283a7821bb23c2c4f6d1c36af75e092567eaffa6c70be6a50/crc32c-2.9.post0-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:7adea7020694164fe08953daac84818668a8a2994ff00634c08b20cf383d676d", size = 71598, upload-time = "2026-09-11T04:28:47.726Z" },+ { url = "https://files.pythonhosted.org/packages/8f/58/f59ab038297a4b4f7b6be0767ce58b6339df9e3e0d02bf4e472149af6303/crc32c-2.9.post0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:9bc9ca4780e3e1c9a1d95229d0a4b9d7010dd876936e599cd7987d4f41bcdf95", size = 80175, upload-time = "2026-09-11T04:28:48.759Z" },+ { url = "https://files.pythonhosted.org/packages/66/d8/15da93689d2acfa430dabeeff3933307a13977abc7836d9c9887651c3da6/crc32c-2.9.post0-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:7cfa8a57e8cd0658bf4d196a8879aa258f24e2228f685645f23a626f1f74b52c", size = 71868, upload-time = "2026-09-11T04:28:49.544Z" },+ { url = "https://files.pythonhosted.org/packages/88/1b/a85635f57daa2e47b23fe2c4f5fbcb668ff850b877af1b12127e51b822af/crc32c-2.9.post0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:4ad43760e242e04144037dd1877d74ddd4c6c2c68f95f0e9bb6cf1e1d9268f77", size = 79426, upload-time = "2026-09-11T04:28:50.435Z" },+ { url = "https://files.pythonhosted.org/packages/67/e0/fd768fc400f9d3b09095996e9284ce2d50d2657f9a5c9a5112fa11f26f04/crc32c-2.9.post0-cp310-cp310-win32.whl", hash = "sha256:0a28081e681462aeae4c2e57de453dc54caf2899ef64626dfe97a80b2891cb7c", size = 64514, upload-time = "2026-09-11T04:28:51.274Z" },+ { url = "https://files.pythonhosted.org/packages/56/1b/96a6bdc14650eda04077d67ac29c4e0fec1a2325ebcf4ca12ba489db9777/crc32c-2.9.post0-cp310-cp310-win_amd64.whl", hash = "sha256:6e8038ab5a9755d10395d2929a6f14b12129b64a64aa70bc29eed9b6f96c1214", size = 65897, upload-time = "2026-09-11T04:28:52.104Z" },+ { url = "https://files.pythonhosted.org/packages/92/45/b156e2910154ddb28e7d5c6010d1df950ffb2375606444b11372cbfe1f58/crc32c-2.9.post0-cp310-cp310-win_arm64.whl", hash = "sha256:ad1d99186d6a33226a51bf2a5c972045e63d1a8d2ad01bae05fa5f6c1694f30a", size = 63467, upload-time = "2026-09-11T04:28:52.898Z" },+ { url = "https://files.pythonhosted.org/packages/da/02/766b793ec0199aa51f912dea8c52e0f54aad11a04c959eea5ce3a513d97d/crc32c-2.9.post0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6c72fdf3ed34aefe7230a0400200d945244c26335041e9e1fe288a88911d742d", size = 66510, upload-time = "2026-09-11T04:28:53.688Z" },+ { url = "https://files.pythonhosted.org/packages/99/9a/2c7fd0851f05ab898d63a5e2da786865cdf0b43ba7ffaf7cb5dc44e62fff/crc32c-2.9.post0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f9d838e95284eee955e50c75c806b5c566c3206c731c4b47e6af5bc136eaee38", size = 63172, upload-time = "2026-09-11T04:28:54.448Z" },+ { url = "https://files.pythonhosted.org/packages/59/ee/9a8920b25432e2835ab02fad15ec8982517ce9bc11b614baff1f8333d239/crc32c-2.9.post0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:942ff6c3a229bb03c91d098fe7ff2b8bb472889a0de14b4ac174463db6b54327", size = 61705, upload-time = "2026-09-11T04:28:55.33Z" },+ { url = "https://files.pythonhosted.org/packages/6c/41/a6d07ebb7a714bd3f100f7bf2a20fbe0a45e43c7f87ddf3976281e103d9d/crc32c-2.9.post0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:bece7e666065dd5e5c5f36886b4d8f765216e6c043b346e772e2e94aa701bd5c", size = 80387, upload-time = "2026-09-11T04:28:56.153Z" },+ { url = "https://files.pythonhosted.org/packages/90/a0/04fe78dad7906a8fd7d81ccd4d1f9b32b3c8c6589acbecb1fa3b1bb341e1/crc32c-2.9.post0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7aedd6517ae6e060fe90893104f92c5debf2b81119d0472d89a9381b5c53200a", size = 81935, upload-time = "2026-09-11T04:28:57.145Z" },+ { url = "https://files.pythonhosted.org/packages/6b/c4/b0308b3a5dd546eaa5a6df4d4b3433181d4154926590d9c3a94fea305592/crc32c-2.9.post0-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:db05944f42d1ca8f7df76b69be562a41b9ab792f1bc77475f1839bb894a4fd64", size = 72386, upload-time = "2026-09-11T04:28:58.007Z" },+ { url = "https://files.pythonhosted.org/packages/83/45/67cb321ff158d542492e378831d15dfbe8ee7753d832c4b41ed1e53876cc/crc32c-2.9.post0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:116d2e6b92d043be6ecb1d29fdde3048df9d5f211c0d55f7d60123fd224cfd6f", size = 81014, upload-time = "2026-09-11T04:28:58.865Z" },+ { url = "https://files.pythonhosted.org/packages/61/56/605fa1f83b5380b86b3e1099d8099eccb382821564d0d70e9b6895537ba9/crc32c-2.9.post0-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:f6623de5ee2a4d7ae1fa823a4c4c324bf0c33ec93aad526aef603a9d3e040509", size = 72669, upload-time = "2026-09-11T04:28:59.627Z" },+ { url = "https://files.pythonhosted.org/packages/a9/ee/709684e4820a0da52a21cbd88a808bd6c9f16feaedaaf53f202b363dfa68/crc32c-2.9.post0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:6bb1cc9fa3459fa96cb3af8f79da524f7bf40f1af5dcee59e8dbdea9999d6a5c", size = 80274, upload-time = "2026-09-11T04:29:00.446Z" },+ { url = "https://files.pythonhosted.org/packages/78/8a/00e5ccf7eb9b21568b0d9b17b2d890aa5a2dc37308d6d84795b2d34528a7/crc32c-2.9.post0-cp311-cp311-win32.whl", hash = "sha256:0006c8b71066c81fed655bd24ef7f2749a7a58c1457ac228f9cc928467f8d1c2", size = 64506, upload-time = "2026-09-11T04:29:01.207Z" },+ { url = "https://files.pythonhosted.org/packages/74/e6/94949ed561313422b15c8a4065a5b6cf8777c6e4b3a1d8fb991ac8132210/crc32c-2.9.post0-cp311-cp311-win_amd64.whl", hash = "sha256:7e18fe7151234cd06dc4c29a9ed82fc2cf5e3d5b5569a08e2706ef91e1329ce9", size = 65895, upload-time = "2026-09-11T04:29:02.131Z" },+ { url = "https://files.pythonhosted.org/packages/6d/f3/d4a787e90e53555804075334b854616d1b3bc1458bbe684d1e887785febd/crc32c-2.9.post0-cp311-cp311-win_arm64.whl", hash = "sha256:c9ce5c80291ee6062529c8630e3c30f02a9de633bbd03386ed069f7d54b2f687", size = 63464, upload-time = "2026-09-11T04:29:03.087Z" },+ { url = "https://files.pythonhosted.org/packages/2e/bb/3722551220c88abd83e6a9f443e1384d8d28b183531c7b49c674c6b8ff79/crc32c-2.9.post0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:1354f16ae91002d5daa3dfdb73aa601b882d7fbeb9ca698861b79b2bc1252628", size = 66574, upload-time = "2026-09-11T04:29:03.902Z" },+ { url = "https://files.pythonhosted.org/packages/02/e5/43f03a9e74e8f3f58d61b88267e3053056a43d83a26d64d97b6b14208c4a/crc32c-2.9.post0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:c3450e86ac96e06d1a82a9380de479b4f709d5d8494b6f0a824fda397cc758de", size = 63223, upload-time = "2026-09-11T04:29:04.735Z" },+ { url = "https://files.pythonhosted.org/packages/70/75/054cb44545f84e63589e76329b220f4fb95a6933bd2c7b8c0fda15babff8/crc32c-2.9.post0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b789d6b69c94fed1e119d81905955b9f218434b39e0c197d599a7256e8af7435", size = 61714, upload-time = "2026-09-11T04:29:05.498Z" },+ { url = "https://files.pythonhosted.org/packages/7f/84/e3572078595648bb20cf99f9d5ac7781ec4757ada611444e781b03b4a5ba/crc32c-2.9.post0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:0a56531e7e965eb3382a8a89e9cf3f134059c53ba1d59788bf27d27ad16cc378", size = 80209, upload-time = "2026-09-11T04:29:06.493Z" },+ { url = "https://files.pythonhosted.org/packages/45/fd/1ee8156310b6e7725a9e98aa3511a3b0817d8e469e32e49150ca1a065cc3/crc32c-2.9.post0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:dd14f10ebd3a71a0e7418f46c143c494621b5d9f328c527af96f7399c7b8c171", size = 81711, upload-time = "2026-09-11T04:29:07.445Z" },+ { url = "https://files.pythonhosted.org/packages/93/c0/479609d1838c5c437a03834daa77d47e03b3494d2a84c4a0a3cc220174e2/crc32c-2.9.post0-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:8a730f0e115c1982955b868c06515557d92c0b6025ed980ae5a43d845a8a31ca", size = 72066, upload-time = "2026-09-11T04:29:08.306Z" },+ { url = "https://files.pythonhosted.org/packages/67/f2/bfd65e2a6bc0cb309b5abc410d670ea3c1eb828569cc3bc8f50fcc77d529/crc32c-2.9.post0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:ab3efbf901d1252ffa7dd9375af055690e6a50c24e767ba8b1b1ccd52a867b2b", size = 80790, upload-time = "2026-09-11T04:29:09.125Z" },+ { url = "https://files.pythonhosted.org/packages/e0/a0/2baa4ed07f18935d0142ca0a0c61b28e3ea9c2ecdfed8be4f8cea4d00242/crc32c-2.9.post0-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:9e37e104f39739905daa2a053cdcbbd85a5c2b28014056034df74dfffabd6691", size = 72372, upload-time = "2026-09-11T04:29:09.946Z" },+ { url = "https://files.pythonhosted.org/packages/1e/03/d23171193931d2e16a30627f3cc427d5ba794b0a7e45990fb6146815743e/crc32c-2.9.post0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:a29447ec8ac69ab01a1aae53192611722727faf393f968c0a6ecb20025374944", size = 80068, upload-time = "2026-09-11T04:29:10.727Z" },+ { url = "https://files.pythonhosted.org/packages/ea/42/39c9662f810ef59ef4adfd10266fc7b66bc8694e215fb4fc280a7ab2b98b/crc32c-2.9.post0-cp312-cp312-win32.whl", hash = "sha256:f4c0c00ad16897f3341619c534b9cb416793f7ada7366966ec6d72f655f2f5a6", size = 64524, upload-time = "2026-09-11T04:29:11.573Z" },+ { url = "https://files.pythonhosted.org/packages/35/d3/e09941282dc84cc740937745757edd668e7ee64d8801b3ea8aeef544eaed/crc32c-2.9.post0-cp312-cp312-win_amd64.whl", hash = "sha256:0284bc548f361d9c66f6e844f2ec6e7a92b86f39ff0fd292a45878c160391230", size = 65911, upload-time = "2026-09-11T04:29:12.502Z" },+ { url = "https://files.pythonhosted.org/packages/99/55/e4cb6a991f354cffa67965321454a3b1640f9bad92d56dadb69bb0580585/crc32c-2.9.post0-cp312-cp312-win_arm64.whl", hash = "sha256:6326a8f1720caa823a83ae552565dc067bd7cc0c586ad707b319c9ec79c0a841", size = 63476, upload-time = "2026-09-11T04:29:13.494Z" },+ { url = "https://files.pythonhosted.org/packages/60/a7/5a61e20d6ab2ff4c3f65d5836492c35a93e092ac6a526159c40d7fef1b77/crc32c-2.9.post0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ecb6e6000f8283312d841eeb2e7b0f85e8518057542c32c27501ad338b6ddb30", size = 66574, upload-time = "2026-09-11T04:29:14.498Z" },+ { url = "https://files.pythonhosted.org/packages/52/28/0ca9c8d0cf48306024da4dcdd41d54bfadba624cf9a405eb1f22aedcc5d2/crc32c-2.9.post0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8fccc4d04a2e42daeaac2d42c13ffcd875fa2e66f46e4e9da8967ea4eb9e7f42", size = 63229, upload-time = "2026-09-11T04:29:15.437Z" },+ { url = "https://files.pythonhosted.org/packages/42/96/ca65a975827648c7a9b3e1a83a987750c77fee554072a59350c421270181/crc32c-2.9.post0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:ce32097180ad77f80cfb3994e3bf8a4fb07a3875916b13a3b8167717343664e6", size = 61712, upload-time = "2026-09-11T04:29:16.246Z" },+ { url = "https://files.pythonhosted.org/packages/40/bc/662e5bde677c6aeb176c258d524ff720c5a40daea1e4318f572538b23eca/crc32c-2.9.post0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:ca44675cf3afe5eae2f8c65faf7cceb4057a30d2b4aa9f883278393b0643f510", size = 80196, upload-time = "2026-09-11T04:29:17.139Z" },+ { url = "https://files.pythonhosted.org/packages/02/92/933d94cc61d0b311eef188ab394fe5613d9d26e3d092b008189505b78176/crc32c-2.9.post0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3bd3546600bbcb5eba3584ac6b087c93df45d6efe7001b89f4d5930ca0cea5a6", size = 81753, upload-time = "2026-09-11T04:29:17.913Z" },+ { url = "https://files.pythonhosted.org/packages/cf/32/808cd12078d3d7916969d47970e832262df6fbac66053e3128b50d52ecf8/crc32c-2.9.post0-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:b315b6e48657dc501a7d01fc05ce1ed25104e8b706049ae46064a3bc32df6745", size = 72118, upload-time = "2026-09-11T04:29:18.777Z" },+ { url = "https://files.pythonhosted.org/packages/24/73/cacaf59920023802d48ab53858131d02a56df5068acbf4362b34270fdf91/crc32c-2.9.post0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:397128854a5f5c2e00c20383e7841707b8a6ec127de6e829b9c4b7da1fc1d17e", size = 80836, upload-time = "2026-09-11T04:29:19.629Z" },+ { url = "https://files.pythonhosted.org/packages/28/c4/5f7499cca00a396d959c5451a58565222e3e03bc03c719e74eb33902ac07/crc32c-2.9.post0-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:4bec4186a18393ef7375b3d70b8690357f586cb8689fee72ec8d900d6a9eeb80", size = 72455, upload-time = "2026-09-11T04:29:20.59Z" },+ { url = "https://files.pythonhosted.org/packages/c9/40/4dc87477b943be0fe03ad4b021651311c23d1a523ce7207dcf6ad08014d2/crc32c-2.9.post0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:264f8f40ccd4f06ceb077c19e7fa5ca8ce9dc31990ed138af08376f6c67cae52", size = 80121, upload-time = "2026-09-11T04:29:21.429Z" },+ { url = "https://files.pythonhosted.org/packages/fc/7c/28ccd86c2d7006513530225869aa69b6da531e2235a08c5ecf1257ab248f/crc32c-2.9.post0-cp313-cp313-win32.whl", hash = "sha256:9c85ed848526345754f0a7c2f4a54eb0e0232ece9ee61cdcc7e631640684b304", size = 64526, upload-time = "2026-09-11T04:29:22.245Z" },+ { url = "https://files.pythonhosted.org/packages/0e/dd/cff1ac23c868962c6515b769c1d0217373086d5b98dbc4eca7832cb2295c/crc32c-2.9.post0-cp313-cp313-win_amd64.whl", hash = "sha256:ec93306e36242e1883de21d68a2a536e0b9603dfe0035ec9b6d7f2341075152f", size = 65912, upload-time = "2026-09-11T04:29:23.139Z" },+ { url = "https://files.pythonhosted.org/packages/0a/3e/22651ed1b8209b7dbb3332edb319b2fc8950a47ace581a0d80c0ab155a61/crc32c-2.9.post0-cp313-cp313-win_arm64.whl", hash = "sha256:299c10170023aa4c9fc48116d00da0c5d9483819f8c8f6f14939e1a3e39c52dd", size = 63479, upload-time = "2026-09-11T04:29:23.93Z" },+ { url = "https://files.pythonhosted.org/packages/a1/a1/348dc119bb567ccfd48b22dfaea3b642bbb12efa338caf939399dabdf910/crc32c-2.9.post0-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:e376826a374692706135a7121f62e68cfcf5c05990d29056aa14e26adc94d577", size = 75743, upload-time = "2026-09-11T04:29:24.784Z" },+ { url = "https://files.pythonhosted.org/packages/cd/86/18711ff82e1d28ad26a43296ecb89c3a23636f304ae7f550ad0f0afd1aff/crc32c-2.9.post0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:cadb2503f0f750391458c857432d6632ffdb5d6490b3482f0286638652598647", size = 63298, upload-time = "2026-09-11T04:29:25.803Z" },+ { url = "https://files.pythonhosted.org/packages/00/91/c2b8441d4034e95be025f63df1fc2411e662935a0c6d57dc6df181109fcc/crc32c-2.9.post0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:2ca2279ba5f10a7ddedc7540a3efb41b1e9d3daf063221870d895c6d0195406a", size = 61727, upload-time = "2026-09-11T04:29:26.648Z" },+ { url = "https://files.pythonhosted.org/packages/7e/a4/5f353ab2a6e9c5f22f13a35561790d4c04096a22a18797150a2d4f432ba6/crc32c-2.9.post0-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:7d71b4470167636d06a2e6c892e6eac1efa5bc7b451bb8c2961c8a23f73f5f9b", size = 80348, upload-time = "2026-09-11T04:29:27.601Z" },+ { url = "https://files.pythonhosted.org/packages/08/9b/b4f752495dd1d24478623d3a5eff37728db7314e606483f67c9bb0142ace/crc32c-2.9.post0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:eb7154f345b295ddab2677298784529f8dbab04c45741069d7ef90e61213e153", size = 81938, upload-time = "2026-09-11T04:29:28.478Z" },+ { url = "https://files.pythonhosted.org/packages/87/75/f676481ff96c043e4aca641aed8e0201e90cad34be26d5e21ddd857906be/crc32c-2.9.post0-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ec59e3a287a8f5468975adc4d5b46bc92d282cb24e6b6e841f413fab627ec7ec", size = 72315, upload-time = "2026-09-11T04:29:29.358Z" },+ { url = "https://files.pythonhosted.org/packages/19/5d/df344cc6eef166dfd4ca1faaa804151e33a2e20ca9c1d9dcd7357a254af6/crc32c-2.9.post0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:f56cae76babd525838c3edc2dd05fd564aac010b5e345b7121d6ef2f85b937d9", size = 81000, upload-time = "2026-09-11T04:29:30.234Z" },+ { url = "https://files.pythonhosted.org/packages/17/74/3f1c38fae8a43c36aa964fd983e0df28bd4673262e7637384ea5461c9ace/crc32c-2.9.post0-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:78f0f6c199ec41ca4a3c15c7d7799ea354ba71e5a1714576dc555831f9e94284", size = 72576, upload-time = "2026-09-11T04:29:31.131Z" },+ { url = "https://files.pythonhosted.org/packages/ed/3f/a9b0614aed9027c9c723714050af58506796ff0e4586f04751ea15593c3b/crc32c-2.9.post0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:029545e21637e154da334999dde7fe9d96f25058ccfa852cafc4690e8d7d0aec", size = 80231, upload-time = "2026-09-11T04:29:31.983Z" },+ { url = "https://files.pythonhosted.org/packages/da/a1/3b2dc717d7b0b7ca5edaa81097f6094226c40e32aced8a227ef9ddff8ce5/crc32c-2.9.post0-cp314-cp314-win32.whl", hash = "sha256:cd370f1a0538dabcf061ea6e005a851c6085d5cda128c9b064e9c4ca0a0e1c80", size = 64508, upload-time = "2026-09-11T04:29:33.012Z" },+ { url = "https://files.pythonhosted.org/packages/30/6f/3e218aa896252e8907dff38f243c47077dfdf4eadd988e09483aeef2e924/crc32c-2.9.post0-cp314-cp314-win_amd64.whl", hash = "sha256:fb8bab3a7c63353a5d904e71a4bbb1d3c4584830f634b448cd62fd3b0ba97d66", size = 65975, upload-time = "2026-09-11T04:29:33.833Z" },+ { url = "https://files.pythonhosted.org/packages/28/d7/8966a662bb2088653f7a1c40d7424222733d35e54e178b6e4170adccd432/crc32c-2.9.post0-cp314-cp314-win_arm64.whl", hash = "sha256:e5b78532f9c534f6d29cacd0390d87c133532ee261d459e51817ea427ddbf978", size = 63450, upload-time = "2026-09-11T04:29:34.662Z" },+ { url = "https://files.pythonhosted.org/packages/75/7c/3b34a0276147d161c87f1f5e959d3a40f02795b2096707d0371bcc938138/crc32c-2.9.post0-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:7152c67221bb3cbb6e6445233011953670e5ca881058a24d9088b2b4c93341ea", size = 75546, upload-time = "2026-09-11T04:29:35.664Z" },+ { url = "https://files.pythonhosted.org/packages/98/56/449b8b83f612038b0d6441d05ff71e5c19c9220cdcb70259bea72d16898f/crc32c-2.9.post0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:fe2baba912a8aa2e73567b2559c4343e1a205b316c200358223ec5bd860ca1ab", size = 63205, upload-time = "2026-09-11T04:29:36.489Z" },+ { url = "https://files.pythonhosted.org/packages/83/5f/4a26a2d398388365a45dca1af113f46cb5389d98348d98b45dae1e889a13/crc32c-2.9.post0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:15d4a040a7e215d23bf8be4c8786d80c538b4987ecf9c7111526e14666d55f44", size = 61625, upload-time = "2026-09-11T04:29:37.367Z" },+ { url = "https://files.pythonhosted.org/packages/a7/92/851e20991afcb26744ec2da9b5ebda5c76a99712af7531248105a009c548/crc32c-2.9.post0-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:87e8658d3a8e7dee9cf3cf57d7b50e61611da2b8f8b8bd75e43f74fa4f337044", size = 79303, upload-time = "2026-09-11T04:29:38.229Z" },+ { url = "https://files.pythonhosted.org/packages/fd/b4/d0969d6571c77d6f3c6f883b8cb29a390655b2e980a0c57bcc32015e48bd/crc32c-2.9.post0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:efa501cdf75689a4822508a0cd4f217078251b6ef5587f84050bf08e72fa3e4b", size = 81165, upload-time = "2026-09-11T04:29:39.298Z" },+ { url = "https://files.pythonhosted.org/packages/76/87/784724032318bcd3e573f8da31a9ca88ef057a031bda5579e18e270b6083/crc32c-2.9.post0-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e40bf0cfff2ba037d0dc63d2e55abef34de53f4c9ecc7895640bceef907033f7", size = 71336, upload-time = "2026-09-11T04:29:40.246Z" },+ { url = "https://files.pythonhosted.org/packages/bd/a5/c505e475c83049f4c790529fe952c79fa0e925893c1043e36d319ddef8b8/crc32c-2.9.post0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:86c2ad3b711107f1886300ec116f006869716ccd71d4df3f98dcaad59be84f69", size = 80194, upload-time = "2026-09-11T04:29:41.208Z" },+ { url = "https://files.pythonhosted.org/packages/f6/3c/fac5a8e8102806227a996987a704d129eeb9c4539cf829d599d3bada14e4/crc32c-2.9.post0-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:ca7d58c558b4759207d1acb00242e3a826b89f75fbcf7b996c02fa08b7a579bc", size = 71617, upload-time = "2026-09-11T04:29:42.125Z" },+ { url = "https://files.pythonhosted.org/packages/d1/4c/3236ab37df547ce328315ee8a4dc3e9d0aa31d2096a0e642fb13ab957c03/crc32c-2.9.post0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:2bf5a5363cff2abe8574fbb3c312e7d6692746e49c31237a523496dafd152e72", size = 79248, upload-time = "2026-09-11T04:29:42.979Z" },+ { url = "https://files.pythonhosted.org/packages/20/5f/affe4493237c92307003efd30f8982acd89ece1ee5cf5d28c5c6787761f3/crc32c-2.9.post0-cp314-cp314t-win32.whl", hash = "sha256:97f2259002750e2f243c85566981d4c471aa67a2c9fb6d2ac2944b80c5e6eec3", size = 64442, upload-time = "2026-09-11T04:29:43.906Z" },+ { url = "https://files.pythonhosted.org/packages/3a/92/3c41289afc911624aef69823c07080ac4a59e7296466921cf807bb5f92e5/crc32c-2.9.post0-cp314-cp314t-win_amd64.whl", hash = "sha256:e7cdb878d14a814963e2f0c996189d969dfce3db84f08b96839285f405d8b018", size = 65856, upload-time = "2026-09-11T04:29:44.809Z" },+ { url = "https://files.pythonhosted.org/packages/b4/c5/1cf964eb00e2246981d1f6041108323eecad7d55c8bc2436c9d34217ae28/crc32c-2.9.post0-cp314-cp314t-win_arm64.whl", hash = "sha256:40e6978fdeb333c3d13b3d48e5efefa47358b279aa772cce6bdd1e5409355434", size = 63376, upload-time = "2026-09-11T04:29:45.732Z" },+ { url = "https://files.pythonhosted.org/packages/03/c4/7ea24e8e6e289e9a2cdc458b807fda87f3eb5072495341e4339841b8be43/crc32c-2.9.post0-cp315-cp315-macosx_10_15_universal2.whl", hash = "sha256:77f3934dd1b8eddc70589fc526905f242e36cee1cae925b7e6a718a2c283e4c8", size = 75773, upload-time = "2026-09-11T04:29:46.631Z" },+ { url = "https://files.pythonhosted.org/packages/48/18/2bda72d776484663328b652a3b5961ace917bd04853cacfb8d59734bfeb1/crc32c-2.9.post0-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:42fe846b7c9f12c13755f51872692e40e82923f5751284bc8ba1a73afa72ea07", size = 63303, upload-time = "2026-09-11T04:29:47.542Z" },+ { url = "https://files.pythonhosted.org/packages/4a/a8/a50bb7a662e04c15de6e7d5151ab0de5a773012c819ef522d132943e7723/crc32c-2.9.post0-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:d3868e154477fa094722aeaf1f3dbb67e76f3b4f24f677aeec314965f63af844", size = 61748, upload-time = "2026-09-11T04:29:48.433Z" },+ { url = "https://files.pythonhosted.org/packages/db/03/2df342e99291ac43101639f7cccf2b44374853b550621bdfdc9944b7f09a/crc32c-2.9.post0-cp315-cp315-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:4fc0cdd298c0058663c853674eb44e41e96c558f384d7586ed7552b2a1579cfb", size = 80494, upload-time = "2026-09-11T04:29:49.325Z" },+ { url = "https://files.pythonhosted.org/packages/f5/e9/50a9452b5d4e3af77087595e6cc5a4dfde71c6a532322c3e326883f458f0/crc32c-2.9.post0-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ab7b88bea6d29ec456cd1aa0a643fa87723e824551a63042ee657a0db22133ae", size = 82334, upload-time = "2026-09-11T04:29:50.251Z" },+ { url = "https://files.pythonhosted.org/packages/7e/7f/4d6918938a9b1488b684fdf8d701ea0adb2b80a5dd7d1effefa5d0b57606/crc32c-2.9.post0-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bce246060f6454a5054948d4446c29ff0195c26635118213bb46c7337c5d60f3", size = 72792, upload-time = "2026-09-11T04:29:51.275Z" },+ { url = "https://files.pythonhosted.org/packages/0a/50/cdd17ec08f3e2d36467fcc8f49114e01ffbef67a1977cebaee8f63090788/crc32c-2.9.post0-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:e3fac09e9dd1361fe1bf36ccc34ae13fb59111da033bcafd41805a5dbece8912", size = 81460, upload-time = "2026-09-11T04:29:52.185Z" },+ { url = "https://files.pythonhosted.org/packages/65/ea/8f1570d98735fb7baf75bc34b04bb89fdf9b4a681af6d465f82f4e667cc0/crc32c-2.9.post0-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:9c6254ccf8c3c55896d37096a5f4cca691b1cc8dfba1e199f105a939d0be1b27", size = 73062, upload-time = "2026-09-11T04:29:53.079Z" },+ { url = "https://files.pythonhosted.org/packages/87/ed/a96daf768c87b3cd0e96b300cd221e18e2737b5d9faef9a5cd13c1645a4e/crc32c-2.9.post0-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:77dff96185a0c63baa1f3d60bf8dc4862475f603fe7b187779d9eff3c0b91914", size = 80393, upload-time = "2026-09-11T04:29:54.033Z" },+ { url = "https://files.pythonhosted.org/packages/9d/cb/5149e676a97406c18da3c5b50fbafcad2211b4c6f24d27aa03b0d5ab6c57/crc32c-2.9.post0-cp315-cp315-win32.whl", hash = "sha256:c115bb20a0e69eb6358f2e12a18ba3ae836d617efce1b604a0e5f93ca7e651d7", size = 64505, upload-time = "2026-09-11T04:29:54.924Z" },+ { url = "https://files.pythonhosted.org/packages/d9/09/3e7284a564d244595706c4cc894e978f08ff038cd62731db8f714eec09f2/crc32c-2.9.post0-cp315-cp315-win_amd64.whl", hash = "sha256:88c551955bdb35abd4ddbff5492d2d1e82bc7295f751b3cc4a7811ab24f099e1", size = 65968, upload-time = "2026-09-11T04:29:55.808Z" },+ { url = "https://files.pythonhosted.org/packages/e5/e5/9288ed7c8bce934c9506ccb2aeb67330b1aaeb3cca5633bcf4eebf226937/crc32c-2.9.post0-cp315-cp315-win_arm64.whl", hash = "sha256:01a47fe1149c649a44ec63a3934b468d2561a96e80aad65cfcac90fd3a759c46", size = 63454, upload-time = "2026-09-11T04:29:56.703Z" },+ { url = "https://files.pythonhosted.org/packages/47/6a/d6bddf90115f60463963545d45abae38eab5ce15e7bb3d62d2fcedd2e032/crc32c-2.9.post0-cp315-cp315t-macosx_10_15_universal2.whl", hash = "sha256:36b0314617f5f39d2edcb032e943d0d0adc77928e561e95b81bc773e0ab1cfa9", size = 75572, upload-time = "2026-09-11T04:29:57.626Z" },+ { url = "https://files.pythonhosted.org/packages/c6/84/59d69d9d97c3067b33e6309478d9faf59a151538fcfbe93bc51fd413dd97/crc32c-2.9.post0-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:edc9d4f0a4e7cdf4cfd5ecf6a941461b4d4806d937985cc5547c1cb1add1306a", size = 63205, upload-time = "2026-09-11T04:29:58.495Z" },+ { url = "https://files.pythonhosted.org/packages/47/d0/a3143f40084f837b9b5bfd881058aec4456cab5017130c817749ca412b6d/crc32c-2.9.post0-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:38f2f534c34fcd0221be97d64b8ff5cfe4918883384d962567d960c3fc00c93d", size = 61648, upload-time = "2026-09-11T04:29:59.417Z" },+ { url = "https://files.pythonhosted.org/packages/ae/ea/fe29cb53e3f6e1eeafe60d4d1a50e71c8c2802b125f8d80977371281ecd4/crc32c-2.9.post0-cp315-cp315t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:a6292f8d7387f965ed137d43f8ef662b08089e4e5d77f67b8e0bc1cdb5efe4ef", size = 79254, upload-time = "2026-09-11T04:30:00.34Z" },+ { url = "https://files.pythonhosted.org/packages/5d/64/2f0a8af15795356706cfc6f0f8070f9a3c15111f780f479517306c229f86/crc32c-2.9.post0-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:06771182e2b16d2d59528d2c690e2ca010e1c113b7330cfbbaa566fb44e47d6a", size = 81405, upload-time = "2026-09-11T04:30:01.329Z" },+ { url = "https://files.pythonhosted.org/packages/e6/3b/3a4821be63b8d77853f5899966d8d0e17b550cab53f9131534bdd0fb0d37/crc32c-2.9.post0-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:2e44d6a81188b381a9572274b005ae06a78a75a121129c78b757b9f3bc357fb2", size = 71591, upload-time = "2026-09-11T04:30:02.347Z" },+ { url = "https://files.pythonhosted.org/packages/11/86/1ef72e94a31c5b4dd4f14c79b89953075aa39f946ba8742581508f3715e8/crc32c-2.9.post0-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:474e185466ae2cc09799cb9147c32b2aa530e06a7b160429009c29a9c7cf7aa6", size = 80462, upload-time = "2026-09-11T04:30:03.292Z" },+ { url = "https://files.pythonhosted.org/packages/f2/ed/e863301bd6cc84809681a2c2258c12f56b80a40691b7988575ea07aa7e7d/crc32c-2.9.post0-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:01d2d2e00da4c77f3e499b5c8f951face5b71e6f98df223096f2220b586da227", size = 71917, upload-time = "2026-09-11T04:30:04.26Z" },+ { url = "https://files.pythonhosted.org/packages/a7/fc/8f7a39ec3d6c44f145a53ae312d2f2ef0e1eab60dcfa9dcc80971dfe4223/crc32c-2.9.post0-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:ae7381ab9091558a56dcb5006c0739a0e1d78851e3672067af62b14be8d17afe", size = 79200, upload-time = "2026-09-11T04:30:05.184Z" },+ { url = "https://files.pythonhosted.org/packages/7c/5f/4b38316f980d1734a2b882bdb2afae1e88f9b26a6821721dec1cd41ca278/crc32c-2.9.post0-cp315-cp315t-win32.whl", hash = "sha256:d6e2bf35b4d3848a7588e91ac39e96800ca0398645954e86f5596ffd17754f9d", size = 64444, upload-time = "2026-09-11T04:30:06.063Z" },+ { url = "https://files.pythonhosted.org/packages/b6/28/0d9055cc38e965fd057be66e844d1fde5951e0437b514da4acac3003c5ef/crc32c-2.9.post0-cp315-cp315t-win_amd64.whl", hash = "sha256:50cdd9191a6cecd3587785d02693359d07d150e83112462f5a7a5dd029cd391c", size = 65852, upload-time = "2026-09-11T04:30:07.157Z" },+ { url = "https://files.pythonhosted.org/packages/5f/c4/b3fa5d59a62cb0c1baa93916b4a0f1916eb59c72a8de6e08ed4952308966/crc32c-2.9.post0-cp315-cp315t-win_arm64.whl", hash = "sha256:21578cd5e29f9b34756bdae1267dd7efe68d7b391c2918f270b12c9e8d452d07", size = 63374, upload-time = "2026-09-11T04:30:08.068Z" },+ { url = "https://files.pythonhosted.org/packages/8e/c8/f0dab04c5f8f3b670b0ffef16d7c40fa4936f5a1f40ce3e2831e6ce66ed2/crc32c-2.9.post0-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:6090ed11aad49d2860018f2cae0b22af122c1f9f68562e05ba0e9f9c39785b5e", size = 62525, upload-time = "2026-09-11T04:30:21.29Z" },+ { url = "https://files.pythonhosted.org/packages/74/cb/06150537d8049f311ee4443663d219b28c64bb012949bed7411bc8de4365/crc32c-2.9.post0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:5a53125710a8972201b0b5ef6019a49a7fe61029040d3018bf400a701a7502b5", size = 61410, upload-time = "2026-09-11T04:30:22.355Z" },+ { url = "https://files.pythonhosted.org/packages/1c/e0/f5ec81122e727aabb716dc8a9b676233768c5d794182ff9fec99353892c1/crc32c-2.9.post0-pp311-pypy311_pp73-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:b71959cca384ba743deb120b84f157e759bba6b2cb36fb8420cebd7e5a106375", size = 64291, upload-time = "2026-09-11T04:30:23.505Z" },+ { url = "https://files.pythonhosted.org/packages/46/b1/37487436e9355e3765242729ec9509485f58228965f5c1ee9422d052d44e/crc32c-2.9.post0-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:64f889385e30af38860c401e307fbe435828380a608a9f84a5f65d146bf63bf3", size = 65000, upload-time = "2026-09-11T04:30:24.726Z" },+ { url = "https://files.pythonhosted.org/packages/40/52/2141d95217f66676556207805b2f2f88a7531b2b1e05d3d871c725dbed8b/crc32c-2.9.post0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:9cc2fed80e48454426e1c451ccdb67fa33eecd73ff66c1d6a1050ca8b0030fc6", size = 65930, upload-time = "2026-09-11T04:30:25.789Z" },+]++[[package]]+name = "cryptography"+version = "50.0.2"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "cffi", marker = "platform_python_implementation != 'PyPy'" },+ { name = "typing-extensions", marker = "python_full_version < '3.11'" },+]+sdist = { url = "https://files.pythonhosted.org/packages/9d/af/182eb91b0df3fe75c4d9f26fe70684569566745f6ba7e5c9c73a862c5252/cryptography-50.0.2.tar.gz", hash = "sha256:7b46165bb56eb4704e2eaaf86f3c940d19154535d9b0ca7d6d590b04060e00d5", size = 880623, upload-time = "2026-09-30T15:30:04.884Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/e5/56/d194340cc4a57535e82e1bee9e89667ac4b7c13b5d3f59686deae3094dd5/cryptography-50.0.2-cp311-abi3-macosx_11_0_arm64.whl", hash = "sha256:fa8f5efb344d6908a1ce62f4a24e2e5780f825d6f53f5f50ec5ffacac72936cb", size = 3914904, upload-time = "2026-09-30T14:43:44.339Z" },+ { url = "https://files.pythonhosted.org/packages/d9/69/c9bd862c3bf43d6399c433caf002df16e2dffd4be49bdf515cda38038711/cryptography-50.0.2-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:79def8d059362e7831389ed3be0ecdf58a89386e1271e35dd9f5af84e81bffd0", size = 4731146, upload-time = "2026-09-30T14:43:47.113Z" },+ { url = "https://files.pythonhosted.org/packages/21/69/64cef1f702bf6657e0cc186ed1a2891d50d29fb41586b254e1c07adea261/cryptography-50.0.2-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:630ebfea3bf689d075f82316324ff7433dc447fe6bc1bfc76524b74b4a9567d2", size = 4719841, upload-time = "2026-09-30T14:43:49.01Z" },+ { url = "https://files.pythonhosted.org/packages/38/6b/61a3f8d8c5e1e49a6cddccafc4015cc1c0021360ab0acb4080e7a423644a/cryptography-50.0.2-cp311-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:f9f6143a8c75945eb960d9eb98905a441394abfa24afaae239d514ffb2586480", size = 4738340, upload-time = "2026-09-30T14:43:50.932Z" },+ { url = "https://files.pythonhosted.org/packages/7b/2e/7212ca32fd43dc91f2f41db20160b268098874b4c9a0e7be94d6835f5b2e/cryptography-50.0.2-cp311-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:a582ab2ae1d34f67112cadc86702774c9ea4374df6bca6afe672817203c99134", size = 5367029, upload-time = "2026-09-30T14:43:52.911Z" },+ { url = "https://files.pythonhosted.org/packages/1a/f1/b474e930c4d910328780e3940da76f5aa5cbc48ce1fc14e44d239d9ea9db/cryptography-50.0.2-cp311-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:4061c0079120205fb760c58acab6443e217307dcf05e3702cf970e0689972856", size = 4753050, upload-time = "2026-09-30T14:43:55.272Z" },+ { url = "https://files.pythonhosted.org/packages/7c/52/9af10e80ac16b0fcc2123f9cbd5e7afbd0fd5075bb7a607c592258a39cda/cryptography-50.0.2-cp311-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:ac9ed99d81760c62fe89d5f0815cdfa1ba9a35141cf30f1c2d044f04b4803d2e", size = 4376724, upload-time = "2026-09-30T14:43:57.24Z" },+ { url = "https://files.pythonhosted.org/packages/71/37/6202e488cc1eb625ea110c292c6bda92823176e023f427d8d5660ce8d632/cryptography-50.0.2-cp311-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:87e9ce85beb6b328ba370cc6e6aea483c92617b4c95b1d33a49297eb662bfb04", size = 4737859, upload-time = "2026-09-30T14:43:59.541Z" },+ { url = "https://files.pythonhosted.org/packages/8f/30/e86d7d518489b0ae2497091a35287abcb1a2ce4037837a34afbe9b1d6964/cryptography-50.0.2-cp311-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:f265528741e048bce55c3463ed721fb0aa45a5888d8add8cfeccb3035451bbdc", size = 5324103, upload-time = "2026-09-30T14:44:01.901Z" },+ { url = "https://files.pythonhosted.org/packages/d3/69/2c833a049475e0a3444e94c7d0aca0aa51d166374a449b09e92ac98138de/cryptography-50.0.2-cp311-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:9dab55f57c74c3cad24c323bacbbd04be4705ba6eb0d92e920b1fc4837ed5079", size = 4752576, upload-time = "2026-09-30T14:44:04.545Z" },+ { url = "https://files.pythonhosted.org/packages/6c/5d/906970b83bbfc1f5bbfb677a143c181f2801f23b6a7204a3b47c42c97e65/cryptography-50.0.2-cp311-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:25784ce8b9621c90c643efb9e1e2162ab3b0224cae446ad5e70e7fcb1ce18b51", size = 4870819, upload-time = "2026-09-30T14:44:06.884Z" },+ { url = "https://files.pythonhosted.org/packages/68/e3/f2298d3bb55e0c4a91841ec4d01b3f020ba8c5fbf15ccdcc6dcf03f97025/cryptography-50.0.2-cp311-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:85d0d9a31b9098e98534226d5686b47264b95e62ce459dc2e62fdfc809f9fe93", size = 5030152, upload-time = "2026-09-30T14:44:09.443Z" },+ { url = "https://files.pythonhosted.org/packages/9a/4f/adfc442765721292fff86d314ce385d3249d22db42295c0dd057727b60f3/cryptography-50.0.2-cp311-abi3-win_amd64.whl", hash = "sha256:7afa5a6602a9f29af1f3a2965f831bae7c9d5d597b7cbb716d41ab3b7d89879c", size = 3824692, upload-time = "2026-09-30T14:44:11.671Z" },+ { url = "https://files.pythonhosted.org/packages/ce/cb/52eb3770c0d0be2702a98c6e96065ddc0a2877cf0845aa9c23397c142cd4/cryptography-50.0.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:f785f6161f202ab04d8ca194158968798e480ca058943907972da5f12e2881e8", size = 3892731, upload-time = "2026-09-30T14:44:13.485Z" },+ { url = "https://files.pythonhosted.org/packages/19/8e/aa1fc533d4546b127b45de8aa024eb5933d23eff9debfe25931e56861095/cryptography-50.0.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:0ecbc5652bdb6fc9eaf89a7d196e20941adfe812f43bc4ca05d9150496821047", size = 4710431, upload-time = "2026-09-30T14:44:15.427Z" },+ { url = "https://files.pythonhosted.org/packages/6a/64/72bc3f75176e7e406b748a3e3830432b8c51297b38368713df04dc04898a/cryptography-50.0.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ab50ee449bf968271e820086f10a33d101dd060370abc10bcd22279be2656539", size = 4694824, upload-time = "2026-09-30T14:44:17.69Z" },+ { url = "https://files.pythonhosted.org/packages/4e/c6/62c77550edfa5ca3f14bf44a1e6739b9fa09d6e998a11d97ed8213bccc98/cryptography-50.0.2-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:a9f7355e6fab51f6c369b86fb7571cffa05edee2c2121e0380a37fb9ac1cd5c1", size = 4716967, upload-time = "2026-09-30T14:44:19.661Z" },+ { url = "https://files.pythonhosted.org/packages/f4/37/cce70f150c432914460157a6ecc161752e053aa5ec0ef3b3f7dc6e31039a/cryptography-50.0.2-cp314-cp314t-manylinux_2_28_ppc64le.whl", hash = "sha256:94e5e9f108ee10471288214d3d233fbfbb492840a8457eb85178d643ddeb32c7", size = 5328676, upload-time = "2026-09-30T14:44:21.744Z" },+ { url = "https://files.pythonhosted.org/packages/aa/9a/6f2f0304d634ceafdeaf23e84537336664ac419b5d07611675c2ad3f6b7a/cryptography-50.0.2-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:241449bf940a5d27309bd317e6f9a2af6932113818bb2b8f5c59ddc7ef16da18", size = 4727698, upload-time = "2026-09-30T14:44:24.178Z" },+ { url = "https://files.pythonhosted.org/packages/1d/de/66bcf9244d118663b2e1aaded8990f4640e3d7b7411870a5765f252074d2/cryptography-50.0.2-cp314-cp314t-manylinux_2_31_armv7l.whl", hash = "sha256:d8947001be83df1394050758ce0e745dd74fb134eef0a4b5124208dfc3a68c37", size = 4354821, upload-time = "2026-09-30T14:44:26.263Z" },+ { url = "https://files.pythonhosted.org/packages/bd/e6/db28a28c7b6c676addce89136de3d8db49ea825a8c863472e36e42ead4ad/cryptography-50.0.2-cp314-cp314t-manylinux_2_34_aarch64.whl", hash = "sha256:4a20ce1e5cb4284a86692fdcba7cb8754185c6b2e5c56fcef3751cf451d3cdc2", size = 4716748, upload-time = "2026-09-30T14:44:28.447Z" },+ { url = "https://files.pythonhosted.org/packages/30/96/01546c7f69ea0e2ab790a2e4f0934a4052fb9b388147fbf83c2fd72f1e57/cryptography-50.0.2-cp314-cp314t-manylinux_2_34_ppc64le.whl", hash = "sha256:84f964e537f916e2cc85199e5a88742e964939b575ac8598b3f9d6cc416cdaf1", size = 5285085, upload-time = "2026-09-30T14:44:30.704Z" },+ { url = "https://files.pythonhosted.org/packages/6c/01/03263395f74d50b071e9e66daace3f8bef80493e5d410726f2ba8554736b/cryptography-50.0.2-cp314-cp314t-manylinux_2_34_x86_64.whl", hash = "sha256:828d49b0ff5a0e3975865571c5d91dbbdd0d38d8289b249a163e9425413a5e05", size = 4727268, upload-time = "2026-09-30T14:44:32.92Z" },+ { url = "https://files.pythonhosted.org/packages/eb/94/2bfe8f29ec0cc9c0d99359c4161adf32858e4934b72c6d100d2ac0bbe962/cryptography-50.0.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:deb9fde5c60e437ee4821bc9bc39ff31b42135c27e1dc61ef0a629389c1de62e", size = 4849503, upload-time = "2026-09-30T14:44:34.969Z" },+ { url = "https://files.pythonhosted.org/packages/54/44/e80651ecbf0e42b62e2bb5f5768916e07eea72e1297338956a61df361f88/cryptography-50.0.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:8c71ba2cd31fc93748c38e1b613200ff1c2665cbfd5341fe3a61cfde35a1430e", size = 5004057, upload-time = "2026-09-30T14:44:37.064Z" },+ { url = "https://files.pythonhosted.org/packages/f8/cc/1d33befb3cd7ea7e77d2d73f43f2066471da1b21f24a6156efcaabf6d2e8/cryptography-50.0.2-cp314-cp314t-win_amd64.whl", hash = "sha256:78198641e5be9521beea5aa782bb551a58068d10e6eb04c9c680c1b69f2e7d45", size = 3795868, upload-time = "2026-09-30T14:44:39.71Z" },+ { url = "https://files.pythonhosted.org/packages/2d/49/93f6a6e7a87c9aa68d44d3e1cdb5fe8f60c90d5d2f46acae9a56892816b8/cryptography-50.0.2-cp315-abi3.abi3t-macosx_11_0_arm64.whl", hash = "sha256:edc3342adf8f697fc5f59c887a304356f147b397809440ed64e2fa6af2f50f37", size = 4133708, upload-time = "2026-09-30T14:44:41.807Z" },+ { url = "https://files.pythonhosted.org/packages/8c/75/32ac2a56243d778805c16ca6a32b8f74fb757df7e28d7ecb560afafb59cf/cryptography-50.0.2-cp315-abi3.abi3t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d370b8d1dfcdf7130178137f6fbee6140774a1acc6cacefc4b42643ec11d0a3a", size = 4956267, upload-time = "2026-09-30T14:44:43.693Z" },+ { url = "https://files.pythonhosted.org/packages/aa/a4/2c8d734e43d97f0842ee9f1b7b4bfb3d0cf5e19edebf43c2afe6675c2320/cryptography-50.0.2-cp315-abi3.abi3t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:f2f9bd7f90c64fe89253f0a2c05e3c4856072660429ce8831b4235bf29403a67", size = 4966465, upload-time = "2026-09-30T14:44:45.769Z" },+ { url = "https://files.pythonhosted.org/packages/c2/58/ee288c829a6f41f6235ae9dd33d82fd19b45442b65b4c8a3da36963d9f7a/cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_28_aarch64.whl", hash = "sha256:e275096ea1e60cc595cda2836fd4a6c725d1125108b868be17f53684d164e2cc", size = 4959356, upload-time = "2026-09-30T14:44:48.211Z" },+ { url = "https://files.pythonhosted.org/packages/92/20/9ded6d51ddd9897f6b6e81fb9ebea7951d7cc5d6c890b0ed8abf77a51a80/cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_28_ppc64le.whl", hash = "sha256:b13478603dcd0a2479ff8e87e2c19a7d525734686fe3c49542472293a204212d", size = 5548822, upload-time = "2026-09-30T14:44:50.86Z" },+ { url = "https://files.pythonhosted.org/packages/02/a8/8df951850d6b31d2a00218f19e2b3f999523437ed7a819df7fa427942fca/cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_28_x86_64.whl", hash = "sha256:58a0c478eeca76fe5e07993c5a0703def34a6dc6a0cda4f5564639b33112ffe7", size = 5001199, upload-time = "2026-09-30T14:44:53.379Z" },+ { url = "https://files.pythonhosted.org/packages/8b/f9/36b3022218ce75b7cdf068fb95f809f9bd0d820e4955ef43b90c255cc7ac/cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_31_armv7l.whl", hash = "sha256:d38cdff612d06fa6a32840d5e1b1f7a27cee4a349aa9085d94a67789d6bfd408", size = 4629333, upload-time = "2026-09-30T14:44:55.635Z" },+ { url = "https://files.pythonhosted.org/packages/8c/72/20f99a219f6af47cdd1cbd978c243b92d71496e168a746138af44ded4f29/cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_34_aarch64.whl", hash = "sha256:fdd28f912fccfec1846a94e2e1e8f9b0012f557f0c46fe4f3eb0d7a87afcf90b", size = 4958822, upload-time = "2026-09-30T14:44:59.639Z" },+ { url = "https://files.pythonhosted.org/packages/f2/20/196f112617fb08eb4d608a2a6c422373d46f9cc2857f38fc0667033c0899/cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_34_ppc64le.whl", hash = "sha256:cbc8738fd8526d80f35cb3a40d41f41a2e7030bb3b18b09a6778ef63d291c2fd", size = 5506351, upload-time = "2026-09-30T14:45:02.267Z" },+ { url = "https://files.pythonhosted.org/packages/24/95/83378121ef3eaaaf71d4b781577ff794acb39b9e1b87a3f156898c8497ed/cryptography-50.0.2-cp315-abi3.abi3t-manylinux_2_34_x86_64.whl", hash = "sha256:e105ab60406787da31fccc883fc0f733af1efd78f0136a4599692c4083a73d0c", size = 5000859, upload-time = "2026-09-30T14:45:05.009Z" },+ { url = "https://files.pythonhosted.org/packages/22/f7/70fd7ae4d1dbfa7ba29b02e1b9068771519a86027756510b700ce81086a8/cryptography-50.0.2-cp315-abi3.abi3t-musllinux_1_2_aarch64.whl", hash = "sha256:6f8700550aa1474a91e5dc07049c46f98b423b5b1ddd0483e0b51362eeeaf5be", size = 5092151, upload-time = "2026-09-30T15:29:15.932Z" },+ { url = "https://files.pythonhosted.org/packages/d4/be/688367b74de86984bd58d8efacfc7c9e68b89a6a22ced0fb4f38db50254a/cryptography-50.0.2-cp315-abi3.abi3t-musllinux_1_2_x86_64.whl", hash = "sha256:c71be1cbfa5cd9a41ee452acf1eccd82b2c05950358b106ec8ceb83411d1a020", size = 5286120, upload-time = "2026-09-30T15:29:18.309Z" },+ { url = "https://files.pythonhosted.org/packages/39/d1/55f8a3f2ef5d1529e16835ef10cf0fe3d559ce237b46dddc440c0bba3649/cryptography-50.0.2-cp315-abi3.abi3t-win_amd64.whl", hash = "sha256:c423ab384a46c4dff7217b2ea5ba2e11cffdeab6441acd04cf65a369caf0366c", size = 4111557, upload-time = "2026-09-30T15:29:20.155Z" },+ { url = "https://files.pythonhosted.org/packages/23/ad/ac987755d00e1e64273760228d2635ae38dae2be83e3c6e0d3289d91dec3/cryptography-50.0.2-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:0ec5f09541743261e66e291b4a0cbf0fb2997aeaab6d9e9c740b9dba1b58d1c2", size = 3943588, upload-time = "2026-09-30T15:29:22.265Z" },+ { url = "https://files.pythonhosted.org/packages/d5/8d/6d585339bedf85d45044c85d8412dac53f2bb6f918e8b7777efba1787844/cryptography-50.0.2-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:c5e67125c7dca78d199ec4e116aa93dbb83494808ecbb8211a2cb09b1bf41dbd", size = 4756166, upload-time = "2026-09-30T15:29:24.58Z" },+ { url = "https://files.pythonhosted.org/packages/bf/f1/1c1f6874e8550cfddd4b688ceb38cefb6ed15ceed224d56f133f3d88c214/cryptography-50.0.2-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ee247f5c245c9a2fe7c8e2214e295918838e44e00a45a6718451e4004219e767", size = 4749145, upload-time = "2026-09-30T15:29:26.807Z" },+ { url = "https://files.pythonhosted.org/packages/c1/63/61b15dc1a8de03fe0adbe3fd7608b3ad5c73bf50993bbcb1faaa930afe33/cryptography-50.0.2-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:dfe9763530994147d9af1def057a5b9658b00e8f8fe8743d144d1e0911c2e454", size = 4763638, upload-time = "2026-09-30T15:29:28.588Z" },+ { url = "https://files.pythonhosted.org/packages/fc/35/b345bdfa40c9126df1a9d33236aa98418367931b8725f84fc3ae2b98dc59/cryptography-50.0.2-cp39-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:58ddb5a8e3179d12f19e4ea34d2d32e9d63a4baa142c875c1eb59f41b7243acd", size = 5382217, upload-time = "2026-09-30T15:29:30.589Z" },+ { url = "https://files.pythonhosted.org/packages/4f/87/ef344a9e616871f2519c22d6afcda79ddd5d35e9592d95eb6e677608d055/cryptography-50.0.2-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:f21e8a22c8605750c7af886bab299a363721264061b4ac0a30efb73cfd58efc5", size = 4781387, upload-time = "2026-09-30T15:29:32.605Z" },+ { url = "https://files.pythonhosted.org/packages/90/5b/f2fdb13cd0b96f6f932c8627bb292a45f11c64d21620a8e120aee9a3b848/cryptography-50.0.2-cp39-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:9c8402a82ea0dc4ceeab793db05f0fafa8ca139ca34fcde5df0f596103c74107", size = 4403790, upload-time = "2026-09-30T15:29:34.374Z" },+ { url = "https://files.pythonhosted.org/packages/bc/ce/7e4f662b1e3c393513569e402cfc85ac7da0bd3d5435e122a3140219eb2d/cryptography-50.0.2-cp39-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:0ddc924c04591c2811ca024d62ecad4f7f6f08af8939c211438f48a16bd23602", size = 4764319, upload-time = "2026-09-30T15:29:36.149Z" },+ { url = "https://files.pythonhosted.org/packages/3c/3f/86ff33ce34cc0de6847fb96e035a1a760d81652e38643f617c02ad32ef7a/cryptography-50.0.2-cp39-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:a6557e5f38e065ca9fbdaf7cfc7435ecb1d113aa81a022d1b51921ee7432e227", size = 5338560, upload-time = "2026-09-30T15:29:39.053Z" },+ { url = "https://files.pythonhosted.org/packages/40/cf/6b5c8e2fd9202d98988ab7cb5cc5c991704c4ad55f492ff408e4969f83f1/cryptography-50.0.2-cp39-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:1981f1db4630889b9ef7803fadef12b056f428cb6b85c27ba57b774793b6093c", size = 4780973, upload-time = "2026-09-30T15:29:41.251Z" },+ { url = "https://files.pythonhosted.org/packages/10/bf/8d6ebc7dded797bd0f0160d52188021211f011a2b164ef0ae1dac4587465/cryptography-50.0.2-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:7a8701d6b584d76e909e3d305b7d126b41439876a5aaf76cddc67fc230eafa2e", size = 4897738, upload-time = "2026-09-30T15:29:43.106Z" },+ { url = "https://files.pythonhosted.org/packages/d4/aa/f3f6e0de7e6253b8baa8b2d8fb9d50924fa75cee3d4624bd4bc1208ee923/cryptography-50.0.2-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:ce47f66801c20ec6c6632453bb5960fe38939e9306970b48b3a5a26de7745d94", size = 5058280, upload-time = "2026-09-30T15:29:44.827Z" },+ { url = "https://files.pythonhosted.org/packages/f6/b6/a1faf3a27ae9405fb34b1713cc73b2d8a26b04d5c561578fa2e6ef3e5bb9/cryptography-50.0.2-cp39-abi3-win_amd64.whl", hash = "sha256:4e81d95e5bafc2d6e34e4bed780e53e4d5b9a2f928573428aa4d35fbec1eb0de", size = 3854095, upload-time = "2026-09-30T15:29:46.782Z" },+ { url = "https://files.pythonhosted.org/packages/1d/7a/f08d34ce09d60f89ebd391e2ebc6ba2b995e6dd7552f41820f8085f94e53/cryptography-50.0.2-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:92e665960f25fcdc73725b9cec7a3824f279ba97a98653afe9ffac2e43668f67", size = 4716035, upload-time = "2026-09-30T15:29:48.681Z" },+ { url = "https://files.pythonhosted.org/packages/45/67/e18fb65592451a2acb76e9f2fbe14e0f47a8318b4c5430f1633851d03daa/cryptography-50.0.2-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:eef4c2f3423810b3070ab391f85436d2f8bbfcb286ac15cbc73190b3563b1f1a", size = 4726917, upload-time = "2026-09-30T15:29:50.608Z" },+ { url = "https://files.pythonhosted.org/packages/83/28/38fdce17e60f6b825e69fc3b7f75e70a6612759980704697e1de4cbfaf6e/cryptography-50.0.2-pp311-pypy311_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:7c6d0330c472d96f6a6afe24d80dfdf15176c33096f0a4397ae4c60f3dd3be48", size = 4715341, upload-time = "2026-09-30T15:29:52.522Z" },+ { url = "https://files.pythonhosted.org/packages/b6/b1/d9121a717e0f893c64bd6ca7702614778d7df2a5c309128a002421788516/cryptography-50.0.2-pp311-pypy311_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:1ba34f04897fcdaa73f74145c25f3ec146fbd56593853e88adc2e811303c5f42", size = 4726322, upload-time = "2026-09-30T15:29:54.263Z" },+ { url = "https://files.pythonhosted.org/packages/36/8b/e6d153808bf353e152abd2fd4d8f09670d956ac78379ac46e60d7efbf04c/cryptography-50.0.2-pp311-pypy311_pp80-macosx_11_0_arm64.whl", hash = "sha256:3dc4fd8058cea1644971207d530e1a03a184a805ffc8ebdddf0599d78a331b81", size = 3873097, upload-time = "2026-09-30T15:29:56.097Z" },+ { url = "https://files.pythonhosted.org/packages/ca/1d/1271f287ff7170ddafc2aad36260c4eec20ccd2fea70f38455e9d56d427b/cryptography-50.0.2-pp311-pypy311_pp80-win_amd64.whl", hash = "sha256:7b75de3c8b3be1cdb1052747c929440c3eea46c1bc2cb8a6e3a48388e9b7b452", size = 3805376, upload-time = "2026-09-30T15:29:58.729Z" },+]++[[package]]+name = "exceptiongroup"+version = "1.3.1"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "typing-extensions" },+]+sdist = { url = "https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219", size = 30371, upload-time = "2025-11-21T23:01:54.787Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598", size = 16740, upload-time = "2025-11-21T23:01:53.443Z" },+]++[[package]]+name = "filelock"+version = "4.1.0"+source = { registry = "https://pypi.org/simple" }+resolution-markers = [+ "python_full_version < '3.11' and sys_platform == 'darwin'",+ "python_full_version < '3.11' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "(python_full_version < '3.11' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform != 'darwin' and sys_platform != 'linux')",+]+sdist = { url = "https://files.pythonhosted.org/packages/4c/58/6fd434bec86eff7c38a3168454cb132b762b2bea9b3ac094101a2f7bc32a/filelock-4.1.0.tar.gz", hash = "sha256:ad7f724afef953e731b1cc39bcd3a09166d72ed7fcdf29e6e88b1c3235c6715d", size = 561277, upload-time = "2026-10-09T19:57:20.34Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/ee/86/032133892a5de43b5a98200b01aadcad68cc255e274a762f08b8a76d2912/filelock-4.1.0-py3-none-any.whl", hash = "sha256:2ce9818e3e2d8f284c1a964414447ef148d42a5fd5e2a477a7118e574b293ec1", size = 133003, upload-time = "2026-10-09T19:57:18.716Z" },+]++[[package]]+name = "filelock"+version = "4.2.4"+source = { registry = "https://pypi.org/simple" }+resolution-markers = [+ "python_full_version >= '3.14' and sys_platform == 'darwin'",+ "python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'darwin'",+ "python_full_version >= '3.14' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version >= '3.12' and python_full_version < '3.14' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version >= '3.14' and sys_platform == 'win32'",+ "python_full_version >= '3.14' and sys_platform == 'emscripten'",+ "(python_full_version >= '3.14' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.14' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux' and sys_platform != 'win32')",+ "python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'win32'",+ "python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'emscripten'",+ "(python_full_version >= '3.12' and python_full_version < '3.14' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux' and sys_platform != 'win32')",+ "python_full_version >= '3.11.5' and python_full_version < '3.12' and sys_platform == 'darwin'",+ "python_full_version >= '3.11' and python_full_version < '3.11.5' and sys_platform == 'darwin'",+ "python_full_version >= '3.11.5' and python_full_version < '3.12' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version >= '3.11' and python_full_version < '3.11.5' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version >= '3.11.5' and python_full_version < '3.12' and sys_platform == 'win32'",+ "python_full_version >= '3.11.5' and python_full_version < '3.12' and sys_platform == 'emscripten'",+ "(python_full_version >= '3.11.5' and python_full_version < '3.12' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.11.5' and python_full_version < '3.12' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux' and sys_platform != 'win32')",+ "python_full_version >= '3.11' and python_full_version < '3.11.5' and sys_platform == 'win32'",+ "python_full_version >= '3.11' and python_full_version < '3.11.5' and sys_platform == 'emscripten'",+ "(python_full_version >= '3.11' and python_full_version < '3.11.5' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.11' and python_full_version < '3.11.5' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux' and sys_platform != 'win32')",+]+sdist = { url = "https://files.pythonhosted.org/packages/d8/28/3893324bcadf8f89b1616637468d766af3f625008c0735bf704fdfa86617/filelock-4.2.4.tar.gz", hash = "sha256:c6d8663535e1650ee430507b4ffbac7b464dd64b7647ea0112a9f406499d163d", size = 652444, upload-time = "2026-10-19T01:57:51.001Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/e0/1b/5e74289a1878e666bb4b65fe5805a04cafcac2aa5f519ef1ead67ef91c56/filelock-4.2.4-py3-none-any.whl", hash = "sha256:301241438c57936ef93f4243a94f2559022268bfcf9b375a9a72eb0f8db8358e", size = 162475, upload-time = "2026-10-19T01:57:49.419Z" },+]++[[package]]+name = "frozenlist"+version = "1.8.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/2d/f5/c831fac6cc817d26fd54c7eaccd04ef7e0288806943f7cc5bbf69f3ac1f0/frozenlist-1.8.0.tar.gz", hash = "sha256:3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad", size = 45875, upload-time = "2025-10-06T05:38:17.865Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/83/4a/557715d5047da48d54e659203b9335be7bfaafda2c3f627b7c47e0b3aaf3/frozenlist-1.8.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:b37f6d31b3dcea7deb5e9696e529a6aa4a898adc33db82da12e4c60a7c4d2011", size = 86230, upload-time = "2025-10-06T05:35:23.699Z" },+ { url = "https://files.pythonhosted.org/packages/a2/fb/c85f9fed3ea8fe8740e5b46a59cc141c23b842eca617da8876cfce5f760e/frozenlist-1.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ef2b7b394f208233e471abc541cc6991f907ffd47dc72584acee3147899d6565", size = 49621, upload-time = "2025-10-06T05:35:25.341Z" },+ { url = "https://files.pythonhosted.org/packages/63/70/26ca3f06aace16f2352796b08704338d74b6d1a24ca38f2771afbb7ed915/frozenlist-1.8.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a88f062f072d1589b7b46e951698950e7da00442fc1cacbe17e19e025dc327ad", size = 49889, upload-time = "2025-10-06T05:35:26.797Z" },+ { url = "https://files.pythonhosted.org/packages/5d/ed/c7895fd2fde7f3ee70d248175f9b6cdf792fb741ab92dc59cd9ef3bd241b/frozenlist-1.8.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:f57fb59d9f385710aa7060e89410aeb5058b99e62f4d16b08b91986b9a2140c2", size = 219464, upload-time = "2025-10-06T05:35:28.254Z" },+ { url = "https://files.pythonhosted.org/packages/6b/83/4d587dccbfca74cb8b810472392ad62bfa100bf8108c7223eb4c4fa2f7b3/frozenlist-1.8.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:799345ab092bee59f01a915620b5d014698547afd011e691a208637312db9186", size = 221649, upload-time = "2025-10-06T05:35:29.454Z" },+ { url = "https://files.pythonhosted.org/packages/6a/c6/fd3b9cd046ec5fff9dab66831083bc2077006a874a2d3d9247dea93ddf7e/frozenlist-1.8.0-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:c23c3ff005322a6e16f71bf8692fcf4d5a304aaafe1e262c98c6d4adc7be863e", size = 219188, upload-time = "2025-10-06T05:35:30.951Z" },+ { url = "https://files.pythonhosted.org/packages/ce/80/6693f55eb2e085fc8afb28cf611448fb5b90e98e068fa1d1b8d8e66e5c7d/frozenlist-1.8.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8a76ea0f0b9dfa06f254ee06053d93a600865b3274358ca48a352ce4f0798450", size = 231748, upload-time = "2025-10-06T05:35:32.101Z" },+ { url = "https://files.pythonhosted.org/packages/97/d6/e9459f7c5183854abd989ba384fe0cc1a0fb795a83c033f0571ec5933ca4/frozenlist-1.8.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c7366fe1418a6133d5aa824ee53d406550110984de7637d65a178010f759c6ef", size = 236351, upload-time = "2025-10-06T05:35:33.834Z" },+ { url = "https://files.pythonhosted.org/packages/97/92/24e97474b65c0262e9ecd076e826bfd1d3074adcc165a256e42e7b8a7249/frozenlist-1.8.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:13d23a45c4cebade99340c4165bd90eeb4a56c6d8a9d8aa49568cac19a6d0dc4", size = 218767, upload-time = "2025-10-06T05:35:35.205Z" },+ { url = "https://files.pythonhosted.org/packages/ee/bf/dc394a097508f15abff383c5108cb8ad880d1f64a725ed3b90d5c2fbf0bb/frozenlist-1.8.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:e4a3408834f65da56c83528fb52ce7911484f0d1eaf7b761fc66001db1646eff", size = 235887, upload-time = "2025-10-06T05:35:36.354Z" },+ { url = "https://files.pythonhosted.org/packages/40/90/25b201b9c015dbc999a5baf475a257010471a1fa8c200c843fd4abbee725/frozenlist-1.8.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:42145cd2748ca39f32801dad54aeea10039da6f86e303659db90db1c4b614c8c", size = 228785, upload-time = "2025-10-06T05:35:37.949Z" },+ { url = "https://files.pythonhosted.org/packages/84/f4/b5bc148df03082f05d2dd30c089e269acdbe251ac9a9cf4e727b2dbb8a3d/frozenlist-1.8.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:e2de870d16a7a53901e41b64ffdf26f2fbb8917b3e6ebf398098d72c5b20bd7f", size = 230312, upload-time = "2025-10-06T05:35:39.178Z" },+ { url = "https://files.pythonhosted.org/packages/db/4b/87e95b5d15097c302430e647136b7d7ab2398a702390cf4c8601975709e7/frozenlist-1.8.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:20e63c9493d33ee48536600d1a5c95eefc870cd71e7ab037763d1fbb89cc51e7", size = 217650, upload-time = "2025-10-06T05:35:40.377Z" },+ { url = "https://files.pythonhosted.org/packages/e5/70/78a0315d1fea97120591a83e0acd644da638c872f142fd72a6cebee825f3/frozenlist-1.8.0-cp310-cp310-win32.whl", hash = "sha256:adbeebaebae3526afc3c96fad434367cafbfd1b25d72369a9e5858453b1bb71a", size = 39659, upload-time = "2025-10-06T05:35:41.863Z" },+ { url = "https://files.pythonhosted.org/packages/66/aa/3f04523fb189a00e147e60c5b2205126118f216b0aa908035c45336e27e4/frozenlist-1.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:667c3777ca571e5dbeb76f331562ff98b957431df140b54c85fd4d52eea8d8f6", size = 43837, upload-time = "2025-10-06T05:35:43.205Z" },+ { url = "https://files.pythonhosted.org/packages/39/75/1135feecdd7c336938bd55b4dc3b0dfc46d85b9be12ef2628574b28de776/frozenlist-1.8.0-cp310-cp310-win_arm64.whl", hash = "sha256:80f85f0a7cc86e7a54c46d99c9e1318ff01f4687c172ede30fd52d19d1da1c8e", size = 39989, upload-time = "2025-10-06T05:35:44.596Z" },+ { url = "https://files.pythonhosted.org/packages/bc/03/077f869d540370db12165c0aa51640a873fb661d8b315d1d4d67b284d7ac/frozenlist-1.8.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:09474e9831bc2b2199fad6da3c14c7b0fbdd377cce9d3d77131be28906cb7d84", size = 86912, upload-time = "2025-10-06T05:35:45.98Z" },+ { url = "https://files.pythonhosted.org/packages/df/b5/7610b6bd13e4ae77b96ba85abea1c8cb249683217ef09ac9e0ae93f25a91/frozenlist-1.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:17c883ab0ab67200b5f964d2b9ed6b00971917d5d8a92df149dc2c9779208ee9", size = 50046, upload-time = "2025-10-06T05:35:47.009Z" },+ { url = "https://files.pythonhosted.org/packages/6e/ef/0e8f1fe32f8a53dd26bdd1f9347efe0778b0fddf62789ea683f4cc7d787d/frozenlist-1.8.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:fa47e444b8ba08fffd1c18e8cdb9a75db1b6a27f17507522834ad13ed5922b93", size = 50119, upload-time = "2025-10-06T05:35:48.38Z" },+ { url = "https://files.pythonhosted.org/packages/11/b1/71a477adc7c36e5fb628245dfbdea2166feae310757dea848d02bd0689fd/frozenlist-1.8.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:2552f44204b744fba866e573be4c1f9048d6a324dfe14475103fd51613eb1d1f", size = 231067, upload-time = "2025-10-06T05:35:49.97Z" },+ { url = "https://files.pythonhosted.org/packages/45/7e/afe40eca3a2dc19b9904c0f5d7edfe82b5304cb831391edec0ac04af94c2/frozenlist-1.8.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:957e7c38f250991e48a9a73e6423db1bb9dd14e722a10f6b8bb8e16a0f55f695", size = 233160, upload-time = "2025-10-06T05:35:51.729Z" },+ { url = "https://files.pythonhosted.org/packages/a6/aa/7416eac95603ce428679d273255ffc7c998d4132cfae200103f164b108aa/frozenlist-1.8.0-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:8585e3bb2cdea02fc88ffa245069c36555557ad3609e83be0ec71f54fd4abb52", size = 228544, upload-time = "2025-10-06T05:35:53.246Z" },+ { url = "https://files.pythonhosted.org/packages/8b/3d/2a2d1f683d55ac7e3875e4263d28410063e738384d3adc294f5ff3d7105e/frozenlist-1.8.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:edee74874ce20a373d62dc28b0b18b93f645633c2943fd90ee9d898550770581", size = 243797, upload-time = "2025-10-06T05:35:54.497Z" },+ { url = "https://files.pythonhosted.org/packages/78/1e/2d5565b589e580c296d3bb54da08d206e797d941a83a6fdea42af23be79c/frozenlist-1.8.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c9a63152fe95756b85f31186bddf42e4c02c6321207fd6601a1c89ebac4fe567", size = 247923, upload-time = "2025-10-06T05:35:55.861Z" },+ { url = "https://files.pythonhosted.org/packages/aa/c3/65872fcf1d326a7f101ad4d86285c403c87be7d832b7470b77f6d2ed5ddc/frozenlist-1.8.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:b6db2185db9be0a04fecf2f241c70b63b1a242e2805be291855078f2b404dd6b", size = 230886, upload-time = "2025-10-06T05:35:57.399Z" },+ { url = "https://files.pythonhosted.org/packages/a0/76/ac9ced601d62f6956f03cc794f9e04c81719509f85255abf96e2510f4265/frozenlist-1.8.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:f4be2e3d8bc8aabd566f8d5b8ba7ecc09249d74ba3c9ed52e54dc23a293f0b92", size = 245731, upload-time = "2025-10-06T05:35:58.563Z" },+ { url = "https://files.pythonhosted.org/packages/b9/49/ecccb5f2598daf0b4a1415497eba4c33c1e8ce07495eb07d2860c731b8d5/frozenlist-1.8.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:c8d1634419f39ea6f5c427ea2f90ca85126b54b50837f31497f3bf38266e853d", size = 241544, upload-time = "2025-10-06T05:35:59.719Z" },+ { url = "https://files.pythonhosted.org/packages/53/4b/ddf24113323c0bbcc54cb38c8b8916f1da7165e07b8e24a717b4a12cbf10/frozenlist-1.8.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:1a7fa382a4a223773ed64242dbe1c9c326ec09457e6b8428efb4118c685c3dfd", size = 241806, upload-time = "2025-10-06T05:36:00.959Z" },+ { url = "https://files.pythonhosted.org/packages/a7/fb/9b9a084d73c67175484ba2789a59f8eebebd0827d186a8102005ce41e1ba/frozenlist-1.8.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:11847b53d722050808926e785df837353bd4d75f1d494377e59b23594d834967", size = 229382, upload-time = "2025-10-06T05:36:02.22Z" },+ { url = "https://files.pythonhosted.org/packages/95/a3/c8fb25aac55bf5e12dae5c5aa6a98f85d436c1dc658f21c3ac73f9fa95e5/frozenlist-1.8.0-cp311-cp311-win32.whl", hash = "sha256:27c6e8077956cf73eadd514be8fb04d77fc946a7fe9f7fe167648b0b9085cc25", size = 39647, upload-time = "2025-10-06T05:36:03.409Z" },+ { url = "https://files.pythonhosted.org/packages/0a/f5/603d0d6a02cfd4c8f2a095a54672b3cf967ad688a60fb9faf04fc4887f65/frozenlist-1.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:ac913f8403b36a2c8610bbfd25b8013488533e71e62b4b4adce9c86c8cea905b", size = 44064, upload-time = "2025-10-06T05:36:04.368Z" },+ { url = "https://files.pythonhosted.org/packages/5d/16/c2c9ab44e181f043a86f9a8f84d5124b62dbcb3a02c0977ec72b9ac1d3e0/frozenlist-1.8.0-cp311-cp311-win_arm64.whl", hash = "sha256:d4d3214a0f8394edfa3e303136d0575eece0745ff2b47bd2cb2e66dd92d4351a", size = 39937, upload-time = "2025-10-06T05:36:05.669Z" },+ { url = "https://files.pythonhosted.org/packages/69/29/948b9aa87e75820a38650af445d2ef2b6b8a6fab1a23b6bb9e4ef0be2d59/frozenlist-1.8.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:78f7b9e5d6f2fdb88cdde9440dc147259b62b9d3b019924def9f6478be254ac1", size = 87782, upload-time = "2025-10-06T05:36:06.649Z" },+ { url = "https://files.pythonhosted.org/packages/64/80/4f6e318ee2a7c0750ed724fa33a4bdf1eacdc5a39a7a24e818a773cd91af/frozenlist-1.8.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:229bf37d2e4acdaf808fd3f06e854a4a7a3661e871b10dc1f8f1896a3b05f18b", size = 50594, upload-time = "2025-10-06T05:36:07.69Z" },+ { url = "https://files.pythonhosted.org/packages/2b/94/5c8a2b50a496b11dd519f4a24cb5496cf125681dd99e94c604ccdea9419a/frozenlist-1.8.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f833670942247a14eafbb675458b4e61c82e002a148f49e68257b79296e865c4", size = 50448, upload-time = "2025-10-06T05:36:08.78Z" },+ { url = "https://files.pythonhosted.org/packages/6a/bd/d91c5e39f490a49df14320f4e8c80161cfcce09f1e2cde1edd16a551abb3/frozenlist-1.8.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:494a5952b1c597ba44e0e78113a7266e656b9794eec897b19ead706bd7074383", size = 242411, upload-time = "2025-10-06T05:36:09.801Z" },+ { url = "https://files.pythonhosted.org/packages/8f/83/f61505a05109ef3293dfb1ff594d13d64a2324ac3482be2cedc2be818256/frozenlist-1.8.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:96f423a119f4777a4a056b66ce11527366a8bb92f54e541ade21f2374433f6d4", size = 243014, upload-time = "2025-10-06T05:36:11.394Z" },+ { url = "https://files.pythonhosted.org/packages/d8/cb/cb6c7b0f7d4023ddda30cf56b8b17494eb3a79e3fda666bf735f63118b35/frozenlist-1.8.0-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3462dd9475af2025c31cc61be6652dfa25cbfb56cbbf52f4ccfe029f38decaf8", size = 234909, upload-time = "2025-10-06T05:36:12.598Z" },+ { url = "https://files.pythonhosted.org/packages/31/c5/cd7a1f3b8b34af009fb17d4123c5a778b44ae2804e3ad6b86204255f9ec5/frozenlist-1.8.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c4c800524c9cd9bac5166cd6f55285957fcfc907db323e193f2afcd4d9abd69b", size = 250049, upload-time = "2025-10-06T05:36:14.065Z" },+ { url = "https://files.pythonhosted.org/packages/c0/01/2f95d3b416c584a1e7f0e1d6d31998c4a795f7544069ee2e0962a4b60740/frozenlist-1.8.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d6a5df73acd3399d893dafc71663ad22534b5aa4f94e8a2fabfe856c3c1b6a52", size = 256485, upload-time = "2025-10-06T05:36:15.39Z" },+ { url = "https://files.pythonhosted.org/packages/ce/03/024bf7720b3abaebcff6d0793d73c154237b85bdf67b7ed55e5e9596dc9a/frozenlist-1.8.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:405e8fe955c2280ce66428b3ca55e12b3c4e9c336fb2103a4937e891c69a4a29", size = 237619, upload-time = "2025-10-06T05:36:16.558Z" },+ { url = "https://files.pythonhosted.org/packages/69/fa/f8abdfe7d76b731f5d8bd217827cf6764d4f1d9763407e42717b4bed50a0/frozenlist-1.8.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:908bd3f6439f2fef9e85031b59fd4f1297af54415fb60e4254a95f75b3cab3f3", size = 250320, upload-time = "2025-10-06T05:36:17.821Z" },+ { url = "https://files.pythonhosted.org/packages/f5/3c/b051329f718b463b22613e269ad72138cc256c540f78a6de89452803a47d/frozenlist-1.8.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:294e487f9ec720bd8ffcebc99d575f7eff3568a08a253d1ee1a0378754b74143", size = 246820, upload-time = "2025-10-06T05:36:19.046Z" },+ { url = "https://files.pythonhosted.org/packages/0f/ae/58282e8f98e444b3f4dd42448ff36fa38bef29e40d40f330b22e7108f565/frozenlist-1.8.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:74c51543498289c0c43656701be6b077f4b265868fa7f8a8859c197006efb608", size = 250518, upload-time = "2025-10-06T05:36:20.763Z" },+ { url = "https://files.pythonhosted.org/packages/8f/96/007e5944694d66123183845a106547a15944fbbb7154788cbf7272789536/frozenlist-1.8.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:776f352e8329135506a1d6bf16ac3f87bc25b28e765949282dcc627af36123aa", size = 239096, upload-time = "2025-10-06T05:36:22.129Z" },+ { url = "https://files.pythonhosted.org/packages/66/bb/852b9d6db2fa40be96f29c0d1205c306288f0684df8fd26ca1951d461a56/frozenlist-1.8.0-cp312-cp312-win32.whl", hash = "sha256:433403ae80709741ce34038da08511d4a77062aa924baf411ef73d1146e74faf", size = 39985, upload-time = "2025-10-06T05:36:23.661Z" },+ { url = "https://files.pythonhosted.org/packages/b8/af/38e51a553dd66eb064cdf193841f16f077585d4d28394c2fa6235cb41765/frozenlist-1.8.0-cp312-cp312-win_amd64.whl", hash = "sha256:34187385b08f866104f0c0617404c8eb08165ab1272e884abc89c112e9c00746", size = 44591, upload-time = "2025-10-06T05:36:24.958Z" },+ { url = "https://files.pythonhosted.org/packages/a7/06/1dc65480ab147339fecc70797e9c2f69d9cea9cf38934ce08df070fdb9cb/frozenlist-1.8.0-cp312-cp312-win_arm64.whl", hash = "sha256:fe3c58d2f5db5fbd18c2987cba06d51b0529f52bc3a6cdc33d3f4eab725104bd", size = 40102, upload-time = "2025-10-06T05:36:26.333Z" },+ { url = "https://files.pythonhosted.org/packages/2d/40/0832c31a37d60f60ed79e9dfb5a92e1e2af4f40a16a29abcc7992af9edff/frozenlist-1.8.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:8d92f1a84bb12d9e56f818b3a746f3efba93c1b63c8387a73dde655e1e42282a", size = 85717, upload-time = "2025-10-06T05:36:27.341Z" },+ { url = "https://files.pythonhosted.org/packages/30/ba/b0b3de23f40bc55a7057bd38434e25c34fa48e17f20ee273bbde5e0650f3/frozenlist-1.8.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:96153e77a591c8adc2ee805756c61f59fef4cf4073a9275ee86fe8cba41241f7", size = 49651, upload-time = "2025-10-06T05:36:28.855Z" },+ { url = "https://files.pythonhosted.org/packages/0c/ab/6e5080ee374f875296c4243c381bbdef97a9ac39c6e3ce1d5f7d42cb78d6/frozenlist-1.8.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f21f00a91358803399890ab167098c131ec2ddd5f8f5fd5fe9c9f2c6fcd91e40", size = 49417, upload-time = "2025-10-06T05:36:29.877Z" },+ { url = "https://files.pythonhosted.org/packages/d5/4e/e4691508f9477ce67da2015d8c00acd751e6287739123113a9fca6f1604e/frozenlist-1.8.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:fb30f9626572a76dfe4293c7194a09fb1fe93ba94c7d4f720dfae3b646b45027", size = 234391, upload-time = "2025-10-06T05:36:31.301Z" },+ { url = "https://files.pythonhosted.org/packages/40/76/c202df58e3acdf12969a7895fd6f3bc016c642e6726aa63bd3025e0fc71c/frozenlist-1.8.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:eaa352d7047a31d87dafcacbabe89df0aa506abb5b1b85a2fb91bc3faa02d822", size = 233048, upload-time = "2025-10-06T05:36:32.531Z" },+ { url = "https://files.pythonhosted.org/packages/f9/c0/8746afb90f17b73ca5979c7a3958116e105ff796e718575175319b5bb4ce/frozenlist-1.8.0-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:03ae967b4e297f58f8c774c7eabcce57fe3c2434817d4385c50661845a058121", size = 226549, upload-time = "2025-10-06T05:36:33.706Z" },+ { url = "https://files.pythonhosted.org/packages/7e/eb/4c7eefc718ff72f9b6c4893291abaae5fbc0c82226a32dcd8ef4f7a5dbef/frozenlist-1.8.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f6292f1de555ffcc675941d65fffffb0a5bcd992905015f85d0592201793e0e5", size = 239833, upload-time = "2025-10-06T05:36:34.947Z" },+ { url = "https://files.pythonhosted.org/packages/c2/4e/e5c02187cf704224f8b21bee886f3d713ca379535f16893233b9d672ea71/frozenlist-1.8.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:29548f9b5b5e3460ce7378144c3010363d8035cea44bc0bf02d57f5a685e084e", size = 245363, upload-time = "2025-10-06T05:36:36.534Z" },+ { url = "https://files.pythonhosted.org/packages/1f/96/cb85ec608464472e82ad37a17f844889c36100eed57bea094518bf270692/frozenlist-1.8.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ec3cc8c5d4084591b4237c0a272cc4f50a5b03396a47d9caaf76f5d7b38a4f11", size = 229314, upload-time = "2025-10-06T05:36:38.582Z" },+ { url = "https://files.pythonhosted.org/packages/5d/6f/4ae69c550e4cee66b57887daeebe006fe985917c01d0fff9caab9883f6d0/frozenlist-1.8.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:517279f58009d0b1f2e7c1b130b377a349405da3f7621ed6bfae50b10adf20c1", size = 243365, upload-time = "2025-10-06T05:36:40.152Z" },+ { url = "https://files.pythonhosted.org/packages/7a/58/afd56de246cf11780a40a2c28dc7cbabbf06337cc8ddb1c780a2d97e88d8/frozenlist-1.8.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:db1e72ede2d0d7ccb213f218df6a078a9c09a7de257c2fe8fcef16d5925230b1", size = 237763, upload-time = "2025-10-06T05:36:41.355Z" },+ { url = "https://files.pythonhosted.org/packages/cb/36/cdfaf6ed42e2644740d4a10452d8e97fa1c062e2a8006e4b09f1b5fd7d63/frozenlist-1.8.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:b4dec9482a65c54a5044486847b8a66bf10c9cb4926d42927ec4e8fd5db7fed8", size = 240110, upload-time = "2025-10-06T05:36:42.716Z" },+ { url = "https://files.pythonhosted.org/packages/03/a8/9ea226fbefad669f11b52e864c55f0bd57d3c8d7eb07e9f2e9a0b39502e1/frozenlist-1.8.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:21900c48ae04d13d416f0e1e0c4d81f7931f73a9dfa0b7a8746fb2fe7dd970ed", size = 233717, upload-time = "2025-10-06T05:36:44.251Z" },+ { url = "https://files.pythonhosted.org/packages/1e/0b/1b5531611e83ba7d13ccc9988967ea1b51186af64c42b7a7af465dcc9568/frozenlist-1.8.0-cp313-cp313-win32.whl", hash = "sha256:8b7b94a067d1c504ee0b16def57ad5738701e4ba10cec90529f13fa03c833496", size = 39628, upload-time = "2025-10-06T05:36:45.423Z" },+ { url = "https://files.pythonhosted.org/packages/d8/cf/174c91dbc9cc49bc7b7aab74d8b734e974d1faa8f191c74af9b7e80848e6/frozenlist-1.8.0-cp313-cp313-win_amd64.whl", hash = "sha256:878be833caa6a3821caf85eb39c5ba92d28e85df26d57afb06b35b2efd937231", size = 43882, upload-time = "2025-10-06T05:36:46.796Z" },+ { url = "https://files.pythonhosted.org/packages/c1/17/502cd212cbfa96eb1388614fe39a3fc9ab87dbbe042b66f97acb57474834/frozenlist-1.8.0-cp313-cp313-win_arm64.whl", hash = "sha256:44389d135b3ff43ba8cc89ff7f51f5a0bb6b63d829c8300f79a2fe4fe61bcc62", size = 39676, upload-time = "2025-10-06T05:36:47.8Z" },+ { url = "https://files.pythonhosted.org/packages/d2/5c/3bbfaa920dfab09e76946a5d2833a7cbdf7b9b4a91c714666ac4855b88b4/frozenlist-1.8.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:e25ac20a2ef37e91c1b39938b591457666a0fa835c7783c3a8f33ea42870db94", size = 89235, upload-time = "2025-10-06T05:36:48.78Z" },+ { url = "https://files.pythonhosted.org/packages/d2/d6/f03961ef72166cec1687e84e8925838442b615bd0b8854b54923ce5b7b8a/frozenlist-1.8.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:07cdca25a91a4386d2e76ad992916a85038a9b97561bf7a3fd12d5d9ce31870c", size = 50742, upload-time = "2025-10-06T05:36:49.837Z" },+ { url = "https://files.pythonhosted.org/packages/1e/bb/a6d12b7ba4c3337667d0e421f7181c82dda448ce4e7ad7ecd249a16fa806/frozenlist-1.8.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:4e0c11f2cc6717e0a741f84a527c52616140741cd812a50422f83dc31749fb52", size = 51725, upload-time = "2025-10-06T05:36:50.851Z" },+ { url = "https://files.pythonhosted.org/packages/bc/71/d1fed0ffe2c2ccd70b43714c6cab0f4188f09f8a67a7914a6b46ee30f274/frozenlist-1.8.0-cp313-cp313t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:b3210649ee28062ea6099cfda39e147fa1bc039583c8ee4481cb7811e2448c51", size = 284533, upload-time = "2025-10-06T05:36:51.898Z" },+ { url = "https://files.pythonhosted.org/packages/c9/1f/fb1685a7b009d89f9bf78a42d94461bc06581f6e718c39344754a5d9bada/frozenlist-1.8.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:581ef5194c48035a7de2aefc72ac6539823bb71508189e5de01d60c9dcd5fa65", size = 292506, upload-time = "2025-10-06T05:36:53.101Z" },+ { url = "https://files.pythonhosted.org/packages/e6/3b/b991fe1612703f7e0d05c0cf734c1b77aaf7c7d321df4572e8d36e7048c8/frozenlist-1.8.0-cp313-cp313t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3ef2d026f16a2b1866e1d86fc4e1291e1ed8a387b2c333809419a2f8b3a77b82", size = 274161, upload-time = "2025-10-06T05:36:54.309Z" },+ { url = "https://files.pythonhosted.org/packages/ca/ec/c5c618767bcdf66e88945ec0157d7f6c4a1322f1473392319b7a2501ded7/frozenlist-1.8.0-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5500ef82073f599ac84d888e3a8c1f77ac831183244bfd7f11eaa0289fb30714", size = 294676, upload-time = "2025-10-06T05:36:55.566Z" },+ { url = "https://files.pythonhosted.org/packages/7c/ce/3934758637d8f8a88d11f0585d6495ef54b2044ed6ec84492a91fa3b27aa/frozenlist-1.8.0-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:50066c3997d0091c411a66e710f4e11752251e6d2d73d70d8d5d4c76442a199d", size = 300638, upload-time = "2025-10-06T05:36:56.758Z" },+ { url = "https://files.pythonhosted.org/packages/fc/4f/a7e4d0d467298f42de4b41cbc7ddaf19d3cfeabaf9ff97c20c6c7ee409f9/frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:5c1c8e78426e59b3f8005e9b19f6ff46e5845895adbde20ece9218319eca6506", size = 283067, upload-time = "2025-10-06T05:36:57.965Z" },+ { url = "https://files.pythonhosted.org/packages/dc/48/c7b163063d55a83772b268e6d1affb960771b0e203b632cfe09522d67ea5/frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_armv7l.whl", hash = "sha256:eefdba20de0d938cec6a89bd4d70f346a03108a19b9df4248d3cf0d88f1b0f51", size = 292101, upload-time = "2025-10-06T05:36:59.237Z" },+ { url = "https://files.pythonhosted.org/packages/9f/d0/2366d3c4ecdc2fd391e0afa6e11500bfba0ea772764d631bbf82f0136c9d/frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:cf253e0e1c3ceb4aaff6df637ce033ff6535fb8c70a764a8f46aafd3d6ab798e", size = 289901, upload-time = "2025-10-06T05:37:00.811Z" },+ { url = "https://files.pythonhosted.org/packages/b8/94/daff920e82c1b70e3618a2ac39fbc01ae3e2ff6124e80739ce5d71c9b920/frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:032efa2674356903cd0261c4317a561a6850f3ac864a63fc1583147fb05a79b0", size = 289395, upload-time = "2025-10-06T05:37:02.115Z" },+ { url = "https://files.pythonhosted.org/packages/e3/20/bba307ab4235a09fdcd3cc5508dbabd17c4634a1af4b96e0f69bfe551ebd/frozenlist-1.8.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:6da155091429aeba16851ecb10a9104a108bcd32f6c1642867eadaee401c1c41", size = 283659, upload-time = "2025-10-06T05:37:03.711Z" },+ { url = "https://files.pythonhosted.org/packages/fd/00/04ca1c3a7a124b6de4f8a9a17cc2fcad138b4608e7a3fc5877804b8715d7/frozenlist-1.8.0-cp313-cp313t-win32.whl", hash = "sha256:0f96534f8bfebc1a394209427d0f8a63d343c9779cda6fc25e8e121b5fd8555b", size = 43492, upload-time = "2025-10-06T05:37:04.915Z" },+ { url = "https://files.pythonhosted.org/packages/59/5e/c69f733a86a94ab10f68e496dc6b7e8bc078ebb415281d5698313e3af3a1/frozenlist-1.8.0-cp313-cp313t-win_amd64.whl", hash = "sha256:5d63a068f978fc69421fb0e6eb91a9603187527c86b7cd3f534a5b77a592b888", size = 48034, upload-time = "2025-10-06T05:37:06.343Z" },+ { url = "https://files.pythonhosted.org/packages/16/6c/be9d79775d8abe79b05fa6d23da99ad6e7763a1d080fbae7290b286093fd/frozenlist-1.8.0-cp313-cp313t-win_arm64.whl", hash = "sha256:bf0a7e10b077bf5fb9380ad3ae8ce20ef919a6ad93b4552896419ac7e1d8e042", size = 41749, upload-time = "2025-10-06T05:37:07.431Z" },+ { url = "https://files.pythonhosted.org/packages/f1/c8/85da824b7e7b9b6e7f7705b2ecaf9591ba6f79c1177f324c2735e41d36a2/frozenlist-1.8.0-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:cee686f1f4cadeb2136007ddedd0aaf928ab95216e7691c63e50a8ec066336d0", size = 86127, upload-time = "2025-10-06T05:37:08.438Z" },+ { url = "https://files.pythonhosted.org/packages/8e/e8/a1185e236ec66c20afd72399522f142c3724c785789255202d27ae992818/frozenlist-1.8.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:119fb2a1bd47307e899c2fac7f28e85b9a543864df47aa7ec9d3c1b4545f096f", size = 49698, upload-time = "2025-10-06T05:37:09.48Z" },+ { url = "https://files.pythonhosted.org/packages/a1/93/72b1736d68f03fda5fdf0f2180fb6caaae3894f1b854d006ac61ecc727ee/frozenlist-1.8.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4970ece02dbc8c3a92fcc5228e36a3e933a01a999f7094ff7c23fbd2beeaa67c", size = 49749, upload-time = "2025-10-06T05:37:10.569Z" },+ { url = "https://files.pythonhosted.org/packages/a7/b2/fabede9fafd976b991e9f1b9c8c873ed86f202889b864756f240ce6dd855/frozenlist-1.8.0-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:cba69cb73723c3f329622e34bdbf5ce1f80c21c290ff04256cff1cd3c2036ed2", size = 231298, upload-time = "2025-10-06T05:37:11.993Z" },+ { url = "https://files.pythonhosted.org/packages/3a/3b/d9b1e0b0eed36e70477ffb8360c49c85c8ca8ef9700a4e6711f39a6e8b45/frozenlist-1.8.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:778a11b15673f6f1df23d9586f83c4846c471a8af693a22e066508b77d201ec8", size = 232015, upload-time = "2025-10-06T05:37:13.194Z" },+ { url = "https://files.pythonhosted.org/packages/dc/94/be719d2766c1138148564a3960fc2c06eb688da592bdc25adcf856101be7/frozenlist-1.8.0-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:0325024fe97f94c41c08872db482cf8ac4800d80e79222c6b0b7b162d5b13686", size = 225038, upload-time = "2025-10-06T05:37:14.577Z" },+ { url = "https://files.pythonhosted.org/packages/e4/09/6712b6c5465f083f52f50cf74167b92d4ea2f50e46a9eea0523d658454ae/frozenlist-1.8.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:97260ff46b207a82a7567b581ab4190bd4dfa09f4db8a8b49d1a958f6aa4940e", size = 240130, upload-time = "2025-10-06T05:37:15.781Z" },+ { url = "https://files.pythonhosted.org/packages/f8/d4/cd065cdcf21550b54f3ce6a22e143ac9e4836ca42a0de1022da8498eac89/frozenlist-1.8.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:54b2077180eb7f83dd52c40b2750d0a9f175e06a42e3213ce047219de902717a", size = 242845, upload-time = "2025-10-06T05:37:17.037Z" },+ { url = "https://files.pythonhosted.org/packages/62/c3/f57a5c8c70cd1ead3d5d5f776f89d33110b1addae0ab010ad774d9a44fb9/frozenlist-1.8.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:2f05983daecab868a31e1da44462873306d3cbfd76d1f0b5b69c473d21dbb128", size = 229131, upload-time = "2025-10-06T05:37:18.221Z" },+ { url = "https://files.pythonhosted.org/packages/6c/52/232476fe9cb64f0742f3fde2b7d26c1dac18b6d62071c74d4ded55e0ef94/frozenlist-1.8.0-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:33f48f51a446114bc5d251fb2954ab0164d5be02ad3382abcbfe07e2531d650f", size = 240542, upload-time = "2025-10-06T05:37:19.771Z" },+ { url = "https://files.pythonhosted.org/packages/5f/85/07bf3f5d0fb5414aee5f47d33c6f5c77bfe49aac680bfece33d4fdf6a246/frozenlist-1.8.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:154e55ec0655291b5dd1b8731c637ecdb50975a2ae70c606d100750a540082f7", size = 237308, upload-time = "2025-10-06T05:37:20.969Z" },+ { url = "https://files.pythonhosted.org/packages/11/99/ae3a33d5befd41ac0ca2cc7fd3aa707c9c324de2e89db0e0f45db9a64c26/frozenlist-1.8.0-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:4314debad13beb564b708b4a496020e5306c7333fa9a3ab90374169a20ffab30", size = 238210, upload-time = "2025-10-06T05:37:22.252Z" },+ { url = "https://files.pythonhosted.org/packages/b2/60/b1d2da22f4970e7a155f0adde9b1435712ece01b3cd45ba63702aea33938/frozenlist-1.8.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:073f8bf8becba60aa931eb3bc420b217bb7d5b8f4750e6f8b3be7f3da85d38b7", size = 231972, upload-time = "2025-10-06T05:37:23.5Z" },+ { url = "https://files.pythonhosted.org/packages/3f/ab/945b2f32de889993b9c9133216c068b7fcf257d8595a0ac420ac8677cab0/frozenlist-1.8.0-cp314-cp314-win32.whl", hash = "sha256:bac9c42ba2ac65ddc115d930c78d24ab8d4f465fd3fc473cdedfccadb9429806", size = 40536, upload-time = "2025-10-06T05:37:25.581Z" },+ { url = "https://files.pythonhosted.org/packages/59/ad/9caa9b9c836d9ad6f067157a531ac48b7d36499f5036d4141ce78c230b1b/frozenlist-1.8.0-cp314-cp314-win_amd64.whl", hash = "sha256:3e0761f4d1a44f1d1a47996511752cf3dcec5bbdd9cc2b4fe595caf97754b7a0", size = 44330, upload-time = "2025-10-06T05:37:26.928Z" },+ { url = "https://files.pythonhosted.org/packages/82/13/e6950121764f2676f43534c555249f57030150260aee9dcf7d64efda11dd/frozenlist-1.8.0-cp314-cp314-win_arm64.whl", hash = "sha256:d1eaff1d00c7751b7c6662e9c5ba6eb2c17a2306ba5e2a37f24ddf3cc953402b", size = 40627, upload-time = "2025-10-06T05:37:28.075Z" },+ { url = "https://files.pythonhosted.org/packages/c0/c7/43200656ecc4e02d3f8bc248df68256cd9572b3f0017f0a0c4e93440ae23/frozenlist-1.8.0-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:d3bb933317c52d7ea5004a1c442eef86f426886fba134ef8cf4226ea6ee1821d", size = 89238, upload-time = "2025-10-06T05:37:29.373Z" },+ { url = "https://files.pythonhosted.org/packages/d1/29/55c5f0689b9c0fb765055629f472c0de484dcaf0acee2f7707266ae3583c/frozenlist-1.8.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:8009897cdef112072f93a0efdce29cd819e717fd2f649ee3016efd3cd885a7ed", size = 50738, upload-time = "2025-10-06T05:37:30.792Z" },+ { url = "https://files.pythonhosted.org/packages/ba/7d/b7282a445956506fa11da8c2db7d276adcbf2b17d8bb8407a47685263f90/frozenlist-1.8.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:2c5dcbbc55383e5883246d11fd179782a9d07a986c40f49abe89ddf865913930", size = 51739, upload-time = "2025-10-06T05:37:32.127Z" },+ { url = "https://files.pythonhosted.org/packages/62/1c/3d8622e60d0b767a5510d1d3cf21065b9db874696a51ea6d7a43180a259c/frozenlist-1.8.0-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:39ecbc32f1390387d2aa4f5a995e465e9e2f79ba3adcac92d68e3e0afae6657c", size = 284186, upload-time = "2025-10-06T05:37:33.21Z" },+ { url = "https://files.pythonhosted.org/packages/2d/14/aa36d5f85a89679a85a1d44cd7a6657e0b1c75f61e7cad987b203d2daca8/frozenlist-1.8.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:92db2bf818d5cc8d9c1f1fc56b897662e24ea5adb36ad1f1d82875bd64e03c24", size = 292196, upload-time = "2025-10-06T05:37:36.107Z" },+ { url = "https://files.pythonhosted.org/packages/05/23/6bde59eb55abd407d34f77d39a5126fb7b4f109a3f611d3929f14b700c66/frozenlist-1.8.0-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:2dc43a022e555de94c3b68a4ef0b11c4f747d12c024a520c7101709a2144fb37", size = 273830, upload-time = "2025-10-06T05:37:37.663Z" },+ { url = "https://files.pythonhosted.org/packages/d2/3f/22cff331bfad7a8afa616289000ba793347fcd7bc275f3b28ecea2a27909/frozenlist-1.8.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:cb89a7f2de3602cfed448095bab3f178399646ab7c61454315089787df07733a", size = 294289, upload-time = "2025-10-06T05:37:39.261Z" },+ { url = "https://files.pythonhosted.org/packages/a4/89/5b057c799de4838b6c69aa82b79705f2027615e01be996d2486a69ca99c4/frozenlist-1.8.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:33139dc858c580ea50e7e60a1b0ea003efa1fd42e6ec7fdbad78fff65fad2fd2", size = 300318, upload-time = "2025-10-06T05:37:43.213Z" },+ { url = "https://files.pythonhosted.org/packages/30/de/2c22ab3eb2a8af6d69dc799e48455813bab3690c760de58e1bf43b36da3e/frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:168c0969a329b416119507ba30b9ea13688fafffac1b7822802537569a1cb0ef", size = 282814, upload-time = "2025-10-06T05:37:45.337Z" },+ { url = "https://files.pythonhosted.org/packages/59/f7/970141a6a8dbd7f556d94977858cfb36fa9b66e0892c6dd780d2219d8cd8/frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:28bd570e8e189d7f7b001966435f9dac6718324b5be2990ac496cf1ea9ddb7fe", size = 291762, upload-time = "2025-10-06T05:37:46.657Z" },+ { url = "https://files.pythonhosted.org/packages/c1/15/ca1adae83a719f82df9116d66f5bb28bb95557b3951903d39135620ef157/frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:b2a095d45c5d46e5e79ba1e5b9cb787f541a8dee0433836cea4b96a2c439dcd8", size = 289470, upload-time = "2025-10-06T05:37:47.946Z" },+ { url = "https://files.pythonhosted.org/packages/ac/83/dca6dc53bf657d371fbc88ddeb21b79891e747189c5de990b9dfff2ccba1/frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:eab8145831a0d56ec9c4139b6c3e594c7a83c2c8be25d5bcf2d86136a532287a", size = 289042, upload-time = "2025-10-06T05:37:49.499Z" },+ { url = "https://files.pythonhosted.org/packages/96/52/abddd34ca99be142f354398700536c5bd315880ed0a213812bc491cff5e4/frozenlist-1.8.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:974b28cf63cc99dfb2188d8d222bc6843656188164848c4f679e63dae4b0708e", size = 283148, upload-time = "2025-10-06T05:37:50.745Z" },+ { url = "https://files.pythonhosted.org/packages/af/d3/76bd4ed4317e7119c2b7f57c3f6934aba26d277acc6309f873341640e21f/frozenlist-1.8.0-cp314-cp314t-win32.whl", hash = "sha256:342c97bf697ac5480c0a7ec73cd700ecfa5a8a40ac923bd035484616efecc2df", size = 44676, upload-time = "2025-10-06T05:37:52.222Z" },+ { url = "https://files.pythonhosted.org/packages/89/76/c615883b7b521ead2944bb3480398cbb07e12b7b4e4d073d3752eb721558/frozenlist-1.8.0-cp314-cp314t-win_amd64.whl", hash = "sha256:06be8f67f39c8b1dc671f5d83aaefd3358ae5cdcf8314552c57e7ed3e6475bdd", size = 49451, upload-time = "2025-10-06T05:37:53.425Z" },+ { url = "https://files.pythonhosted.org/packages/e0/a3/5982da14e113d07b325230f95060e2169f5311b1017ea8af2a29b374c289/frozenlist-1.8.0-cp314-cp314t-win_arm64.whl", hash = "sha256:102e6314ca4da683dca92e3b1355490fed5f313b768500084fbe6371fddfdb79", size = 42507, upload-time = "2025-10-06T05:37:54.513Z" },+ { url = "https://files.pythonhosted.org/packages/9a/9a/e35b4a917281c0b8419d4207f4334c8e8c5dbf4f3f5f9ada73958d937dcc/frozenlist-1.8.0-py3-none-any.whl", hash = "sha256:0c18a16eab41e82c295618a77502e17b195883241c563b00f0aa5106fc4eaa0d", size = 13409, upload-time = "2025-10-06T05:38:16.721Z" },+]++[[package]]+name = "fsspec"+version = "2026.9.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/77/cd/9be253869fc42e764de7f3dedd6969af7d44ff9c3375214a3442a6f3fc08/fsspec-2026.9.0.tar.gz", hash = "sha256:0f08147951c8cb31d844c3547d631053b127863b60be04cf06e121333ee0e2fe", size = 333545, upload-time = "2026-09-18T17:50:42.825Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/6c/c0/a98505f18594f1bce828bb159cec0fcf9860562f1a2c85913409fc8f3d9e/fsspec-2026.9.0-py3-none-any.whl", hash = "sha256:8dd6e646e99ea382bd85f97a45e6b526a442d79423a7dc673f1e2756d05fcb5f", size = 221738, upload-time = "2026-09-18T17:50:41.341Z" },+]++[[package]]+name = "future"+version = "1.0.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/a7/b2/4140c69c6a66432916b26158687e821ba631a4c9273c474343badf84d3ba/future-1.0.0.tar.gz", hash = "sha256:bd2968309307861edae1458a4f8a4f3598c03be43b97521076aebf5d94c07b05", size = 1228490, upload-time = "2024-02-21T11:52:38.461Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/da/71/ae30dadffc90b9006d77af76b393cb9dfbfc9629f339fc1574a1c52e6806/future-1.0.0-py3-none-any.whl", hash = "sha256:929292d34f5872e70396626ef385ec22355a1fae8ad29e1a734c3e43f9fbc216", size = 491326, upload-time = "2024-02-21T11:52:35.956Z" },+]++[[package]]+name = "h11"+version = "0.16.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1", size = 101250, upload-time = "2025-04-24T03:35:25.427Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86", size = 37515, upload-time = "2025-04-24T03:35:24.344Z" },+]++[[package]]+name = "hf-xet"+version = "1.7.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/9e/27/06d899ea7bd721d272f84aac98bdb238de98af4cc767a69056d967d68c71/hf_xet-1.7.0.tar.gz", hash = "sha256:d406ec79053c0871817f700c2ac8c36ba0d87f9c34b7458b0f0063bb218b0466", size = 985689, upload-time = "2026-10-06T20:18:43.89Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/9f/7c/3e45174942e6793adde6cba4daa7fb037275cf02a944d9eadfcf9ff33b86/hf_xet-1.7.0-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:fa029678be1ba7f953c409b0b27bf15cc69cd1c9b3a674fbd78856ebefca1052", size = 3803919, upload-time = "2026-10-06T20:18:09.844Z" },+ { url = "https://files.pythonhosted.org/packages/ff/3a/5e8b363391adcbb002e191dbf924dab31464ea9c45adfeb73502afc36d35/hf_xet-1.7.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:57bc157b8b7fe3bee9dcb9af7f3da8de41801c3b31a9ef68a77a33c6a6be382f", size = 3553588, upload-time = "2026-10-06T20:18:13.376Z" },+ { url = "https://files.pythonhosted.org/packages/e5/c2/0d1eaa5da13bbf9c896badc7f380601c7d973a87a6ffb4d100267c4536c1/hf_xet-1.7.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:87dab080f8f7d32781c2586904e3603f4e60d09bfc727706c3ae419e0829beeb", size = 4201962, upload-time = "2026-10-06T20:18:16.11Z" },+ { url = "https://files.pythonhosted.org/packages/23/2d/225d5b11a9ca7d31b9470a57f2b2be1a5cef8b84325a2146aeb4589e226c/hf_xet-1.7.0-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:b01fe18dbbd151a2403d2c64ed30dc6547b00d6babab9a617d77c7acdb81ee66", size = 3982978, upload-time = "2026-10-06T20:18:18.092Z" },+ { url = "https://files.pythonhosted.org/packages/93/34/9d681f0e3dac0b5dae0d7dea748429266f24e52415446523f464fbaa828e/hf_xet-1.7.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:4ee5e05a627f5ab5bad7a86582277d645556ea1e199903aae19e033a392aa13a", size = 4181558, upload-time = "2026-10-06T20:18:20.082Z" },+ { url = "https://files.pythonhosted.org/packages/de/f0/277f039b7d72027bc2ed277f1b62a2f70f740a5aac2a3e7243e5b6854c5d/hf_xet-1.7.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:19c0e64f14175ccb6a1aff69e0d2ab9ec5269a560e6687abaf2b3fa4f73de7cd", size = 4411546, upload-time = "2026-10-06T20:18:21.999Z" },+ { url = "https://files.pythonhosted.org/packages/3d/7f/832d3ddb49326114175b7bcc50daea8565c09fd21ac03a02b211c09fefb7/hf_xet-1.7.0-cp314-cp314t-win_amd64.whl", hash = "sha256:757168feb5679647c0bb13ee5d0faebe799c4dff9051419885a566ebd79f949d", size = 3812809, upload-time = "2026-10-06T20:18:24.288Z" },+ { url = "https://files.pythonhosted.org/packages/3d/c4/310c3c29e5beae7c049e63947bd1923d597883b41c9ec4718589920812c4/hf_xet-1.7.0-cp314-cp314t-win_arm64.whl", hash = "sha256:b91569d5f1b61c34b043687da02c05dd3604f3d329e7868510bf3f7971599006", size = 3646174, upload-time = "2026-10-06T20:18:26.279Z" },+ { url = "https://files.pythonhosted.org/packages/9c/0b/b03be21ffaada749ba0d3197d8aefbf1aa698bac149580421c15239b299e/hf_xet-1.7.0-cp38-abi3-macosx_10_12_x86_64.whl", hash = "sha256:e3e88a7a75d7d95cbee1f37dc31341d6201124cf21c6c4b1dfab8ccba9b09e0f", size = 3796096, upload-time = "2026-10-06T20:18:28.43Z" },+ { url = "https://files.pythonhosted.org/packages/c3/47/a26ebdce7056a61e931f228439bc0ab08cbec239d1690f965e5e637cba79/hf_xet-1.7.0-cp38-abi3-macosx_11_0_arm64.whl", hash = "sha256:59fba37039233c7fcbe196817d6cdcf1b40dfb17b410f229d85b0cf0a1848da4", size = 3560352, upload-time = "2026-10-06T20:18:30.365Z" },+ { url = "https://files.pythonhosted.org/packages/a3/4c/2bf3b66c215d409655f28de1622393dde04c9461280d48c7924bb3b2decd/hf_xet-1.7.0-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:2814a6e999d13464c4d679b788cc5d784eb5a4edfc638a31f10e9a11ab531ef8", size = 4212180, upload-time = "2026-10-06T20:18:32.292Z" },+ { url = "https://files.pythonhosted.org/packages/49/0c/a2f703a5a78267556e89e03316fa0805c86b72b50829bc67665746e8ebf0/hf_xet-1.7.0-cp38-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:fcfd6c22418e57dd5b3aea649e813b2e2cfb2aebf317b210d90f1fe4b3018b52", size = 3990011, upload-time = "2026-10-06T20:18:34.21Z" },+ { url = "https://files.pythonhosted.org/packages/a4/77/e52e4201b1cbf571530a61cc57f70182045a39a230089ee5f1df182a4de2/hf_xet-1.7.0-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:80f79dae613ce9e0ea1fd1ae15616ca9ac74aed4c770aabc199c4f03ebecc863", size = 4190628, upload-time = "2026-10-06T20:18:36.062Z" },+ { url = "https://files.pythonhosted.org/packages/6c/dc/03a21b89f118664a0926ff25b0f8e44a519bf22724a6a8fc7a9abbc188b6/hf_xet-1.7.0-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:0a9e802f33bf50c851abe45fc5380e61f959e2d369647d6742b79ad9d6c27cab", size = 4418814, upload-time = "2026-10-06T20:18:37.888Z" },+ { url = "https://files.pythonhosted.org/packages/4d/59/b35106dfa71b6eef605dc88bd038fe99c7f86fb132a15b60d0bf2f235b2c/hf_xet-1.7.0-cp38-abi3-win_amd64.whl", hash = "sha256:2b7bb5727889b0f2436dbaaad8fc4c3e66b8240d992716989e0c086b4278b1bc", size = 3822644, upload-time = "2026-10-06T20:18:40.052Z" },+ { url = "https://files.pythonhosted.org/packages/48/cd/072313585f74fe9d441e2eb5e0a4703c30586cd709810ea369675f61b74e/hf_xet-1.7.0-cp38-abi3-win_arm64.whl", hash = "sha256:acc3851cf2576a8fb2ae926da863f4efabe21303cf292e9a44332802ab0dcc6a", size = 3662436, upload-time = "2026-10-06T20:18:42.205Z" },+]++[[package]]+name = "httpcore2"+version = "2.14.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "h11" },+ { name = "truststore" },+]+sdist = { url = "https://files.pythonhosted.org/packages/30/ff/b53af1b49bb2cb5fa97c92215614b173ca5c1a99ded80e2d52f15a94fa6d/httpcore2-2.14.0.tar.gz", hash = "sha256:4f57a1a8249fe6af589d935cfd456f1d13bbdcb0f0fc72af9142368fc94811d7", size = 69096, upload-time = "2026-10-18T16:29:21.898Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/02/06/a8d6a8f90d11b76d9086242b6bb0ee4b503473bfc8be34c2d5b067275c22/httpcore2-2.14.0-py3-none-any.whl", hash = "sha256:4c4f64f4b544afeb778c42c0ffb5941b29e671157e90ed3f6dc787c4bca90cd1", size = 84291, upload-time = "2026-10-18T16:29:19.743Z" },+]++[[package]]+name = "httpx2"+version = "2.14.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "anyio", marker = "sys_platform != 'emscripten'" },+ { name = "httpcore2", marker = "sys_platform != 'emscripten'" },+ { name = "httpx2-jsfetch", marker = "python_full_version >= '3.12' and sys_platform == 'emscripten'" },+ { name = "idna" },+ { name = "truststore", marker = "sys_platform != 'emscripten'" },+ { name = "typing-extensions", marker = "python_full_version < '3.13'" },+]+sdist = { url = "https://files.pythonhosted.org/packages/e8/67/58353f1848b4ba568e1ec22ea1e0d8e039f0bca5fde7e2d1f07739fd83e7/httpx2-2.14.0.tar.gz", hash = "sha256:47ad61a3c40282cd8d0dc96311531f00f5bfc71a066c6fe3b36d8f63fb9e4f6e", size = 102036, upload-time = "2026-10-18T16:29:22.627Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/69/5a/469616aa8c2cbb0bb9dd67a3c18d07c01ab604cc0b236ee1c47d260c7f6e/httpx2-2.14.0-py3-none-any.whl", hash = "sha256:9d20c13a10bae1773a0be3b0f1e5beeb4bdd549bc3a2ba18efa32897c65403e4", size = 96901, upload-time = "2026-10-18T16:29:20.819Z" },+]++[[package]]+name = "httpx2-jsfetch"+version = "1.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/cd/c4/0e5636363151a2a1795e0a77617168b9ca438e1748ec05fc9b5687f93d64/httpx2_jsfetch-1.0.tar.gz", hash = "sha256:70a0e3eabfef7cce5ad9c629f7d01ca05e418f586646f4ddf14782e4c1454c60", size = 6872, upload-time = "2026-08-07T00:13:07.492Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/9b/43/832f631d32e4f1211caa2ba368317739fe71f0b8530e4c9d15dc454bac2a/httpx2_jsfetch-1.0-py3-none-any.whl", hash = "sha256:cb916b707601e69a07721aabc8f3f6659be3a6893bc1ff5c6f9e02241df2da32", size = 6382, upload-time = "2026-08-07T00:13:06.567Z" },+]++[[package]]+name = "huggingface-hub"+version = "2.2.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "click" },+ { name = "filelock", version = "4.1.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },+ { name = "filelock", version = "4.2.4", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },+ { name = "fsspec" },+ { name = "hf-xet", marker = "platform_machine == 'AMD64' or platform_machine == 'ARM64' or platform_machine == 'aarch64' or platform_machine == 'amd64' or platform_machine == 'arm64' or platform_machine == 'x86_64'" },+ { name = "httpx2" },+ { name = "packaging" },+ { name = "pyyaml" },+ { name = "tomli", marker = "python_full_version < '3.11'" },+ { name = "tqdm" },+ { name = "typing-extensions" },+]+sdist = { url = "https://files.pythonhosted.org/packages/12/47/6858d63643e66fb4f6585c3cfd4029c0b2bc1ae21688cee9b3335f20a10d/huggingface_hub-2.2.0.tar.gz", hash = "sha256:5d1b47537394e4215cb858aa12fd493d0f7ef7f58990f5dcd24bc173107b2871", size = 1041026, upload-time = "2026-10-08T15:30:59.971Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/eb/b0/0f7b430fd100b3a3b037fdbb314878200241082e607b3383c63d91a13a72/huggingface_hub-2.2.0-py3-none-any.whl", hash = "sha256:1667f145dc56dc210d60966069397df9ecfca9607a5d43db88b308c89dae56b3", size = 839884, upload-time = "2026-10-08T15:30:57.914Z" },+]++[[package]]+name = "idna"+version = "3.20"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/f5/08/8eea9d4b8302028f3abb2c0813953f7aec26d33b7a8960ed760e65ff29fa/idna-3.20.tar.gz", hash = "sha256:a7db850025b95ded1eae8a46181a1a6c56c92c96f0e2b005d9ff8dc0210cab44", size = 216463, upload-time = "2026-09-17T14:11:04.752Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/58/a2/bb081bab032533a855d44de1d56f8e8426114ff1ba5d1f07a438a0a654f8/idna-3.20-py3-none-any.whl", hash = "sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c", size = 69583, upload-time = "2026-09-17T14:11:03.168Z" },+]++[[package]]+name = "imagesize"+version = "2.0.1"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/fb/5e/513ff06670c84e7b9887c1fdf61b2d42b4f574a831f2f1d2222023049d8a/imagesize-2.0.1.tar.gz", hash = "sha256:b2ba6a4dea487a7ebcd53248d3476aca449d30db12a2dde5e0c5ca9624fd77e5", size = 1883774, upload-time = "2026-08-24T12:35:19.13Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/01/f9/575c8d760eae1fc99651b7cc5efd96ad5379ca4d6b53750b0fb4fe983f34/imagesize-2.0.1-py3-none-any.whl", hash = "sha256:ea0c9a0384df69ed86a943a15cde37d0360b82491b3910dc2215e202e62b5b02", size = 14794, upload-time = "2026-08-24T12:35:12.548Z" },+]++[[package]]+name = "minicpm-ocr"+source = { editable = "." }+dependencies = [+ { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },+ { name = "numpy", version = "2.3.5", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },+ { name = "pillow", version = "12.3.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },+ { name = "pillow", version = "13.0.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },+ { name = "pydantic" },+ { name = "pyyaml" },+ { name = "requests" },+]++[package.optional-dependencies]+all = [+ { name = "beautifulsoup4" },+ { name = "opencv-contrib-python" },+ { name = "paddleocr" },+ { name = "paddlex" },+ { name = "pymupdf" },+ { name = "shapely", version = "2.1.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },+ { name = "shapely", version = "2.2.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },+]+crosspage = [+ { name = "beautifulsoup4" },+]+layout = [+ { name = "opencv-contrib-python" },+ { name = "paddlex" },+ { name = "shapely", version = "2.1.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },+ { name = "shapely", version = "2.2.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },+]+pdf = [+ { name = "pymupdf" },+]+upright = [+ { name = "opencv-contrib-python" },+ { name = "paddleocr" },+]++[package.metadata]+requires-dist = [+ { name = "beautifulsoup4", marker = "extra == 'crosspage'", specifier = ">=4.12" },+ { name = "minicpm-ocr", extras = ["crosspage", "layout", "pdf", "upright"], marker = "extra == 'all'" },+ { name = "numpy", specifier = ">=1.26" },+ { name = "opencv-contrib-python", marker = "extra == 'layout'", specifier = ">=4.10" },+ { name = "opencv-contrib-python", marker = "extra == 'upright'", specifier = ">=4.10" },+ { name = "paddleocr", marker = "extra == 'upright'", specifier = ">=3.0" },+ { name = "paddlex", marker = "extra == 'layout'", specifier = ">=3.4" },+ { name = "pillow", specifier = ">=9.0" },+ { name = "pydantic", specifier = ">=2.0" },+ { name = "pymupdf", marker = "extra == 'pdf'", specifier = ">=1.23" },+ { name = "pyyaml", specifier = ">=6.0" },+ { name = "requests", specifier = ">=2.28" },+ { name = "shapely", marker = "extra == 'layout'", specifier = ">=2.0" },+]+provides-extras = ["layout", "pdf", "crosspage", "upright", "all"]++[[package]]+name = "modelscope"+version = "1.40.2"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "filelock", version = "4.1.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },+ { name = "filelock", version = "4.2.4", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },+ { name = "modelscope-hub" },+ { name = "packaging" },+ { name = "requests" },+ { name = "setuptools" },+ { name = "tqdm" },+ { name = "urllib3" },+]+sdist = { url = "https://files.pythonhosted.org/packages/d7/af/f92c9824db46757dd1b0b5cbf3778daf54e7e44f0e1e6934d0b1bedfb286/modelscope-1.40.2.tar.gz", hash = "sha256:7a642cef8c144c28c4ddcc37db5fd803f5481f0d78a7f26c2b9e0e2a225b528c", size = 4566951, upload-time = "2026-10-09T09:09:10.747Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/b9/8a/e85b79ee1c541f7bbf208fd7a6185c9b11e50c192b1071b0750db26b09e9/modelscope-1.40.2-py3-none-any.whl", hash = "sha256:ea03e0ec4a73398a488d3d240cda4f0c5b62390377a134756d4074a3036cb909", size = 6062299, upload-time = "2026-10-09T09:09:07.486Z" },+]++[[package]]+name = "modelscope-hub"+version = "0.4.6"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "cryptography" },+ { name = "filelock", version = "4.1.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },+ { name = "filelock", version = "4.2.4", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },+ { name = "requests" },+ { name = "tqdm" },+ { name = "urllib3" },+]+sdist = { url = "https://files.pythonhosted.org/packages/08/d9/ac46c39b957ff44b55c550c641ad5c625ffe3eb5c0b6f20a849b591e9d14/modelscope_hub-0.4.6.tar.gz", hash = "sha256:c54de09be2ccb27b9214f7c3ebe5751121f335f5016643f789589d0547e78c52", size = 298574, upload-time = "2026-10-09T08:08:21.468Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/4d/74/8872ae511d8a336ca918a8d0234cfbccfff0e2304de672882b2768ff628f/modelscope_hub-0.4.6-py3-none-any.whl", hash = "sha256:361bcec229bfbed645a9291ec5b167d76cd94b795207dc2eceba628108f4023a", size = 237177, upload-time = "2026-10-09T08:08:19.861Z" },+]++[[package]]+name = "multidict"+version = "7.1.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "typing-extensions", marker = "python_full_version < '3.11'" },+]+sdist = { url = "https://files.pythonhosted.org/packages/f9/79/84ddb5ba16c4eb2c69c71db76ae3c579fe546e511f7170c7e27eedbab7c1/multidict-7.1.0.tar.gz", hash = "sha256:61a4e5d81b8d4e4ad61964b230129e7a2b914793d96289029078fc9009f074ec", size = 362341, upload-time = "2026-10-09T20:31:38.279Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/9c/27/77366104f779d883f1a13ef3e8e274cbc2adf75847afecdee0970ace37ed/multidict-7.1.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:24ad4921135a1410d95b1f1504f4901e1c64cea680014ce2c3c7a825f4f259fc", size = 166031, upload-time = "2026-10-09T13:58:50.692Z" },+ { url = "https://files.pythonhosted.org/packages/02/c0/dd8df25b15560bd6dcb1d844150ed72af8fc2f2b52e29b4362b22c91383d/multidict-7.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:8b8429361241da973e594d15344a0989f44fd288ea58d33a6221fb7cc0daf27e", size = 95884, upload-time = "2026-10-09T13:58:52.034Z" },+ { url = "https://files.pythonhosted.org/packages/0b/31/e759ae1d3a44db8af1c6f37e1a0d290122b455ee4ebce4b989705b5a8787/multidict-7.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5c6455f2c11daeee40665c67494cedb426f67dba7375710524071c0c56d739a6", size = 99026, upload-time = "2026-10-09T13:58:53.365Z" },+ { url = "https://files.pythonhosted.org/packages/cb/ee/898d2a18bd1ef8b2adc20c7d8ab8f027f2b9e5da9cb40675133778e26215/multidict-7.1.0-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:6120aab922bb3e15800b6655558cf8e0a5cc79518e954d457f064e5b3d5e9bf6", size = 436692, upload-time = "2026-10-09T13:58:54.57Z" },+ { url = "https://files.pythonhosted.org/packages/7d/c2/2a6994dff5c01685ab08db1a88bad2579fa1db3e74e568cba632118242f8/multidict-7.1.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:14b1ce8579a43dfc0e592d93fb1d63dea693e4977980ac4166f26d494cc7a358", size = 455754, upload-time = "2026-10-09T13:58:56.159Z" },+ { url = "https://files.pythonhosted.org/packages/48/27/353916a8c627067b54723792f172813025f87f9f70f9771c27214f748b01/multidict-7.1.0-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:71acdc6eded0f4b86b5e16c96314887cf2572a8eb5d8038b78583d0c0eb3aa1c", size = 427471, upload-time = "2026-10-09T13:58:57.569Z" },+ { url = "https://files.pythonhosted.org/packages/62/f4/08993b1ee8e208dbf6cdcb5b536f4dd261211cde2c864cdcc2b527eb974b/multidict-7.1.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:6b7cd1cb0b363cd43ebf499beca26d201dd8b89eee49fae60205c82ba13ee03a", size = 477087, upload-time = "2026-10-09T13:58:58.879Z" },+ { url = "https://files.pythonhosted.org/packages/ba/02/31f6890cc54c83de25df712fab9300ef7b13edef463aa7e0f68e5afe40dc/multidict-7.1.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:dd8a6b3e8f9edb07fe671b02d8c3241c8b641fecce7eb1e36432db3e55e243da", size = 488933, upload-time = "2026-10-09T13:59:00.632Z" },+ { url = "https://files.pythonhosted.org/packages/5a/9c/598d765e98aa02ff7204b6f11cf790e5840f5e8252d7b1d955ed0043bb94/multidict-7.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9a8c826caeb7c08264e0a556df1267531c6ed90cc70506e7e5f4119e2d09f3d7", size = 464425, upload-time = "2026-10-09T13:59:01.955Z" },+ { url = "https://files.pythonhosted.org/packages/eb/07/b6b3508ba72bb82944f985cdd9c4d398c442c07270e5179ea03262b9bf03/multidict-7.1.0-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c44ced5e5168cdf677f0ae39900863bf2bda7d14a5e13502014005cfe040b8b4", size = 420397, upload-time = "2026-10-09T13:59:03.61Z" },+ { url = "https://files.pythonhosted.org/packages/8c/81/596582dfcf8d3c2d41ec03f24849be9e53c8a44aebd40cf45a31720112f5/multidict-7.1.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:b57d4d7021bfd159db9f8f6f862a85a7a6027934643c512f028d6e5c60c4cbd2", size = 445983, upload-time = "2026-10-09T13:59:04.941Z" },+ { url = "https://files.pythonhosted.org/packages/f6/aa/600a68f29c2b027c2000e4ec6f51824790ff9a13a3828487716e31ac3277/multidict-7.1.0-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:7fac4250b37d994e3fe42b46ba3c8bfa1614d1d7d8cf1cf23f303099082a9565", size = 421056, upload-time = "2026-10-09T13:59:06.469Z" },+ { url = "https://files.pythonhosted.org/packages/c1/82/006ef3fb5f2b798e9e538125667ba1b90ed8967bc862d7b9103297b2bcb7/multidict-7.1.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:966ae0588ac9959a040220063733b33f321d04eaf4e60349b42cd855d232202f", size = 436830, upload-time = "2026-10-09T13:59:07.882Z" },+ { url = "https://files.pythonhosted.org/packages/3b/6e/ffa1117db64d4be681f908cb7f38877c70cd06bbbdf29c8685839dcff7d2/multidict-7.1.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:50acd7ee7096949b04482cd7720cb6b85eb9cd9dd5d7ffb6704bfda250261a22", size = 465434, upload-time = "2026-10-09T13:59:09.272Z" },+ { url = "https://files.pythonhosted.org/packages/44/8b/f3ab95a4fb591467c0d2a3c0876f38c17aa0b5c2cd60b4c53bc0c9867c7d/multidict-7.1.0-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:ed6b7f402f3dabd1d72c798b96cf947005ddd796a5bea7b041bccbd517859a42", size = 417108, upload-time = "2026-10-09T13:59:10.595Z" },+ { url = "https://files.pythonhosted.org/packages/fc/2c/3e929884b0f3fd4ae96572d62952e18a76048115832835fb11075295590a/multidict-7.1.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:fadcc96cd6155f35e6d85845fa4fcd37b35885dc8fda77b9f851cdfa538194c1", size = 471643, upload-time = "2026-10-09T13:59:12.082Z" },+ { url = "https://files.pythonhosted.org/packages/32/7b/0c3451ada3a85c1232b04ed0209d5421b07ecad1f69d1b55939b3be0cef4/multidict-7.1.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:c6b67f08014bfc4aedc22cf6a21010c2530cd5fbeb655730406827fe196296be", size = 459115, upload-time = "2026-10-09T13:59:13.613Z" },+ { url = "https://files.pythonhosted.org/packages/ee/d9/aa3b846e69c3730bd999f4f95943301ac26d999d9e285e75b9759c340a45/multidict-7.1.0-cp310-cp310-win32.whl", hash = "sha256:0604ff025497a050a2b2dcc4ae0e5cb6477c525e57b89825152c707e88d74d28", size = 81811, upload-time = "2026-10-09T13:59:14.941Z" },+ { url = "https://files.pythonhosted.org/packages/f0/2d/f4907e688463dedc1e644777851c0aaf2b814f37278436f9d3f4d3225a0e/multidict-7.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:36b14886aa3e0b8786ecdaa196374422c7b1c1dcc8764d02b2409f74d47914bc", size = 92126, upload-time = "2026-10-09T13:59:16.222Z" },+ { url = "https://files.pythonhosted.org/packages/16/b8/5f438830119ab1979245c07bf61038813d2f7509f38d1031d6b8e2114bcc/multidict-7.1.0-cp310-cp310-win_arm64.whl", hash = "sha256:a2e575129c048bc286d696ed8e49ca148591768b2d77debcc6569f6fb64d0668", size = 92561, upload-time = "2026-10-09T13:59:17.47Z" },+ { url = "https://files.pythonhosted.org/packages/29/72/c68c86c078a3b3cfa254bce218fbeaf1f6617d4ace811558154ae63d2c20/multidict-7.1.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:41ff3202cc23c800507777df5a4805b402f262b31008c60fdc652aeb6db2f278", size = 165442, upload-time = "2026-10-09T13:59:19.146Z" },+ { url = "https://files.pythonhosted.org/packages/7c/af/988c71ec3a6fe143b2971ac8d57cd5aca7cc6da970bccd1e4c2254997a09/multidict-7.1.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:e50f7775b66c7802f4cb697e986c5acf30ec07301efee95b396c08114e890d67", size = 95611, upload-time = "2026-10-09T13:59:20.591Z" },+ { url = "https://files.pythonhosted.org/packages/30/5e/7d18eb5a75cf4bacb6b3ee689929dcb27d7ed8ca2d245e80e9b8056fcbf5/multidict-7.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:85cb3ced4fa84949cee12bfe78208b6ece7baf3cbd242b26dcaf773efff8d206", size = 98743, upload-time = "2026-10-09T13:59:21.841Z" },+ { url = "https://files.pythonhosted.org/packages/72/38/2aeff3de6ddf235094aad6f833e3df14d1b3175e328748508443cb2b5458/multidict-7.1.0-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:2128f3358335e0c83688ecb40c19d9d6606cd60784dfbf2e24e980ac2ba87b0d", size = 452832, upload-time = "2026-10-09T13:59:23.131Z" },+ { url = "https://files.pythonhosted.org/packages/eb/1f/94d8b7fc7d47bb43be1fc041bccc2784383d352258d4d0dd90ef55d1a2e5/multidict-7.1.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e2e718fa9d1d900decbc240a533d5d0baf0947ef464c78a8cd4fa32b4e8f590c", size = 475378, upload-time = "2026-10-09T13:59:24.661Z" },+ { url = "https://files.pythonhosted.org/packages/93/86/78f431ef2735fae7a773261ea26cff11e37cbbb4520bf3caed56ece006f1/multidict-7.1.0-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:ecc68f5e47bc6f6f889bbed5bc657b22bb2237ad9ccab8229cb5a0d64f4cb536", size = 442847, upload-time = "2026-10-09T13:59:26.276Z" },+ { url = "https://files.pythonhosted.org/packages/45/d3/1c5af82fe42f677f7c4dcaf487449511d754b84fc29f11a6d190cfb01836/multidict-7.1.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5f21fda91bd6c34455bd5c312e42aa1334da46cdafb4c533ecd01e0f7f19250b", size = 493652, upload-time = "2026-10-09T13:59:28.162Z" },+ { url = "https://files.pythonhosted.org/packages/c4/bc/414b4a83a12811329c046a7c1954d6f08a5eda63f8466939a6cb612da22b/multidict-7.1.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:7a90453a79423cd7145cc08fc92322dcd7aca4862258f533e03f473226d4b835", size = 506991, upload-time = "2026-10-09T13:59:29.701Z" },+ { url = "https://files.pythonhosted.org/packages/ec/ac/a91709d7153489a3b53661b62af371112b96fb083d10443e22d54665a1e1/multidict-7.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c54ae1b89e582aa25f213cd8b5eac0bda1724e79299f486baeb3f562bbf82ca5", size = 480392, upload-time = "2026-10-09T13:59:31.179Z" },+ { url = "https://files.pythonhosted.org/packages/72/63/a4fc53b6da419876f363fc6860f9fbaa48eb8066f458e907eb2989e9510b/multidict-7.1.0-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:7ff8dd079e7b5f3438332499233a2a5acfca0741fd0eb3d4ddba0c2d9bc04d19", size = 431248, upload-time = "2026-10-09T13:59:32.899Z" },+ { url = "https://files.pythonhosted.org/packages/3d/78/08af4a624b3b9d2f48af730c173394135d14afbf4b3de5ae6c80e0900fd1/multidict-7.1.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:e4ef15d0a29fc2da67fe8ba2301ecabd6f8733696cc2bf0a0cf96a144a20328c", size = 463657, upload-time = "2026-10-09T13:59:34.721Z" },+ { url = "https://files.pythonhosted.org/packages/58/ef/06e5c75b88506972c880d228fe96702cf0fa058ea31f157f5fcd5efcf006/multidict-7.1.0-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:5fa296f14068538fced53c6eec86520a2ef3d3d27a0fb134640d03e067986d5f", size = 436120, upload-time = "2026-10-09T13:59:36.135Z" },+ { url = "https://files.pythonhosted.org/packages/23/8d/a917004a1e8ceb325c4cf0583e418a40b7ff9519cbfe759bc6982cd3b4c1/multidict-7.1.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:6ab323f0c5490abaf35a78563e1043c7a772eb86d93f359ecc0fd286d1cd3807", size = 453859, upload-time = "2026-10-09T13:59:37.878Z" },+ { url = "https://files.pythonhosted.org/packages/1f/0b/d1cc417355625152b611790aa1f0bc780983ed8c0752f44087fc7dbe66c9/multidict-7.1.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:88ec4d16e9f58071c9896ea01c4da97cce9d01418fe844ff06eebb00e0a1386a", size = 481768, upload-time = "2026-10-09T13:59:39.39Z" },+ { url = "https://files.pythonhosted.org/packages/94/0b/8e79adf65cf5430497d1020504b7d86ebe90e3289a95bb6b252a630d761f/multidict-7.1.0-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:9161eb81b8062da824426d3700d4b0d287f0cb0b05923713adfe3bd25e7937ac", size = 426973, upload-time = "2026-10-09T13:59:40.932Z" },+ { url = "https://files.pythonhosted.org/packages/ae/4c/e84d6e05943600b16cd2745587e65a407f89b3a4a1f77081d456c5a07011/multidict-7.1.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:c564d0758748f38aec56a6b98c6801a427b3a63f39b7cac538b2b2d18ca32740", size = 489681, upload-time = "2026-10-09T13:59:42.663Z" },+ { url = "https://files.pythonhosted.org/packages/eb/98/01951236a01b3e15c037a4a796f329b5099374e46365d0bc65bb4a7b325d/multidict-7.1.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:c5e4a362a95b85301d262ef6bed06cc8e4a144ac7e2be874cb4c3c46ae89d754", size = 475655, upload-time = "2026-10-09T13:59:44.508Z" },+ { url = "https://files.pythonhosted.org/packages/d3/72/52be318cdb46732da8eb118c2e4212fe570724eaef817901f8b702af2016/multidict-7.1.0-cp311-cp311-win32.whl", hash = "sha256:5d19bb1ec12e385c09215d5d53a243c060c7e8a0aacdba16d933e22902ee380d", size = 81719, upload-time = "2026-10-09T13:59:46.158Z" },+ { url = "https://files.pythonhosted.org/packages/37/fd/1ed7b7d206ef7a6918ac3de515543ca4b49bc50131325ca1814c005daf3f/multidict-7.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:396ba9917fe489ec3a5942ae3e29e91324c8b9956f371f7e124c971c71379e7a", size = 93586, upload-time = "2026-10-09T13:59:47.618Z" },+ { url = "https://files.pythonhosted.org/packages/d8/1e/837877d218bfd2b656ca899ec9dd83e6eb82d8e1ef16e896d5abf3cb60cd/multidict-7.1.0-cp311-cp311-win_arm64.whl", hash = "sha256:b5ed78742502b8d90ff2816688d407a097c8b5cc6af4343fc5ad7a98df53a7cd", size = 92446, upload-time = "2026-10-09T13:59:48.996Z" },+ { url = "https://files.pythonhosted.org/packages/03/e1/215e7df354e2907f3af9d910c8136653cfec94796012a776359bc802a326/multidict-7.1.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:ccfb950359a80de0fcd2030ad60ac1b1a861462de3e2ef746697c9256659af21", size = 165426, upload-time = "2026-10-09T13:59:50.564Z" },+ { url = "https://files.pythonhosted.org/packages/a4/ec/461ba588b308ada2cd16907d6ea425ca4d417596b88c12814ad9a0bb7325/multidict-7.1.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:939d8cd2d8c35e3956f6bc858390b6ccb611e6152b4920d64ab5e98f3fcf39e4", size = 95943, upload-time = "2026-10-09T13:59:52.381Z" },+ { url = "https://files.pythonhosted.org/packages/c9/84/31444ef07ec13a33c42c2772d986129e137e69c4beb89ca64f2138988145/multidict-7.1.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f8e95c95039eab6a2dad8c83c38ab87fc5431d28849e0c8a7e2a4e70ba38710d", size = 98294, upload-time = "2026-10-09T13:59:54.066Z" },+ { url = "https://files.pythonhosted.org/packages/dc/10/aca13806d73d88b5b01e35e828e23a346cb1abad710a49dff0507702efc9/multidict-7.1.0-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:05d12b4bac53abe0c65f3163af2b45894e2e1c0cc55493ac784d52a350047d88", size = 453301, upload-time = "2026-10-09T13:59:55.397Z" },+ { url = "https://files.pythonhosted.org/packages/96/8c/382d771bfb3a9282d98332d0e1f27fd1f8b4ae0e7175bd7e008ebf934900/multidict-7.1.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0e79ed92b1dece6bb57e9b46effd74d7a5d3d00187c85466d880ed184239a698", size = 478570, upload-time = "2026-10-09T13:59:56.899Z" },+ { url = "https://files.pythonhosted.org/packages/52/9c/e81b0c92449da3a1950a575c520d957d7be618777d170717a71e00558d7f/multidict-7.1.0-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:fab380fcff8b3555eb2bd04304fa4330909a771a9a9b0dc07666cfc23148a711", size = 443699, upload-time = "2026-10-09T13:59:58.465Z" },+ { url = "https://files.pythonhosted.org/packages/63/72/f8f5fee6960d1b580a7b046c7c5abccf67aa26fa5647927a91c9c835c2f8/multidict-7.1.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4b5c41e44da74383c924cc5d75ef0a268f301d69305b3c42bd17af685d55e412", size = 497332, upload-time = "2026-10-09T14:08:01.88Z" },+ { url = "https://files.pythonhosted.org/packages/e2/92/a25d7db3ca451b588e743e067ee80f2b475edf6467a56908454faf6a714c/multidict-7.1.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:3dbaa7f7c2f0ca8578895fc61fb8c8e50ebb405dad8982f92f4343285c7a3fda", size = 512457, upload-time = "2026-10-09T14:08:25.465Z" },+ { url = "https://files.pythonhosted.org/packages/7a/f3/374c0ab122bb98b1a62a8742b1e3f59563e4d609942005a4041861a0df67/multidict-7.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fed6b7705d49dd07e5e0dd5f5c873fc44047e92d714299b13245b5fecac49d01", size = 483000, upload-time = "2026-10-09T14:08:27.132Z" },+ { url = "https://files.pythonhosted.org/packages/46/1f/01c8522859771dc3cee840d5852233fe84c91aa982a1cd8ad594306d25cc/multidict-7.1.0-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:53daa47dd176db64bb35170e3d5d0ae2388c060121201883696278f055a0e70c", size = 430746, upload-time = "2026-10-09T14:08:28.715Z" },+ { url = "https://files.pythonhosted.org/packages/ab/f3/af90affc8cca6b4ee59b2ec354a20839005e829d14d155451009810ef1ce/multidict-7.1.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:542429c796430de924d03b68a6173bb6d79d5c4967d4e9a18de3e501cad55593", size = 466859, upload-time = "2026-10-09T20:27:24.139Z" },+ { url = "https://files.pythonhosted.org/packages/f8/97/1b6762f37f6331449e164af9d5500f0abb0f23670e81ba543441e0a6be1d/multidict-7.1.0-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:c44ca6d3cdf4cfcbcd4f928fdcbe87af5fd7319f6ad4169617b7fd6b4527c33c", size = 441952, upload-time = "2026-10-09T20:27:26.559Z" },+ { url = "https://files.pythonhosted.org/packages/bf/d2/4908177fbf22438799c04ba11a2853a99c69d028fccefe61f19e68caba0c/multidict-7.1.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:eb0228c809b2e7eb47921876050af0bc4214b351bad8d8112f70b6ed4288763c", size = 452810, upload-time = "2026-10-09T20:27:28.347Z" },+ { url = "https://files.pythonhosted.org/packages/8d/05/5031f44f680ec54fc182c4d71c9ab7c07216983946aa64ce6fdd56a52692/multidict-7.1.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:6ad60de1f4c702448fc8f1449f05e810f6b7957c08a5b3950c8a792dfb13b50a", size = 483934, upload-time = "2026-10-09T20:27:30.14Z" },+ { url = "https://files.pythonhosted.org/packages/da/3b/9b21d107dbe96fa7e6966ff9e5e10b9ac0d2d1c2cf1633098e4c700f865e/multidict-7.1.0-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:f79def86aee67b5ba01b2565f1610f262bf88ae53c379f93e5fa29c50fe793be", size = 427042, upload-time = "2026-10-09T20:27:32.433Z" },+ { url = "https://files.pythonhosted.org/packages/53/ce/5b01b1041580072866b30e39c6380bff269e72fb5ca41a7f2fb828ede943/multidict-7.1.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:248dabb89b5aa90b2f7e43e045f048f7e5392ec77b6446d80853ba7117d7bbdf", size = 492543, upload-time = "2026-10-09T20:27:34.459Z" },+ { url = "https://files.pythonhosted.org/packages/1e/6f/6508a23fcc7b1122e4f18409d7900ffeb3cd020cd080fe98aba3eabf9486/multidict-7.1.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:0747a83e7ae617793181a4763ee8b84863cec5c0bbbde70c4394e4c0276c36de", size = 475796, upload-time = "2026-10-09T20:27:36.289Z" },+ { url = "https://files.pythonhosted.org/packages/8f/b6/ebb6433f4aa55ac1fea4bf11e860e99611640d07cc92d21cb3f35608de22/multidict-7.1.0-cp312-cp312-win32.whl", hash = "sha256:1df055e51fe7491120cc84f3362bd43db186be78d0e4c476acad45e435af9ffb", size = 81250, upload-time = "2026-10-09T20:27:38.229Z" },+ { url = "https://files.pythonhosted.org/packages/61/0a/11240e5e7d2e986e288f4a6090f569ad00225b7c2c513d4096b36643f9ab/multidict-7.1.0-cp312-cp312-win_amd64.whl", hash = "sha256:10202ba98cfb3f7eb60da7ca87a2c458a69b7d0d6e4d4388cd6773ebbce89085", size = 93817, upload-time = "2026-10-09T20:27:39.739Z" },+ { url = "https://files.pythonhosted.org/packages/e9/9b/a04ffd76db7cca2a60d347e839315e1ada63017c6c343fa90a23a5a55433/multidict-7.1.0-cp312-cp312-win_arm64.whl", hash = "sha256:0aa1ba3ff7cdda05a1242490612976b2ae1c90fc6200903ef8f53815dcb35c5d", size = 92312, upload-time = "2026-10-09T20:27:41.285Z" },+ { url = "https://files.pythonhosted.org/packages/60/34/22ee5f60d704e8edfe6e0a37ca1e2d1efe276560dc8f6f8caee35ea7a4f5/multidict-7.1.0-cp313-cp313-android_24_x86_64.whl", hash = "sha256:51d7f33be9a4a1a2801430846d72841deea0894eae8381a07e7d90e0f71b3c4b", size = 101454, upload-time = "2026-10-09T20:27:43.102Z" },+ { url = "https://files.pythonhosted.org/packages/3b/6d/7652943397171fd624de163d25fc6d2807852931c40c24776cfee3f857cc/multidict-7.1.0-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:2a964dfeb2aba3663f0536c809aa1ff385f065e89fae57e883fb7edfb4067c2f", size = 95823, upload-time = "2026-10-09T20:27:44.912Z" },+ { url = "https://files.pythonhosted.org/packages/a2/57/717d1aa4e901f58a7e93b945ed741c860d950f456b75be47123fef507ac2/multidict-7.1.0-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:d02cd23b5af182a49d635ee72be38053767711987a9fd82625b16b93828a0d8c", size = 97841, upload-time = "2026-10-09T20:27:46.616Z" },+ { url = "https://files.pythonhosted.org/packages/a8/74/d2d22d306225f3c53ea5a682abb8a43bc30057d6c78b5c94a74035450bfd/multidict-7.1.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:0179698c3c913eb64f32397083747fad20ed0f0a2b7469a08cd1a8a95d14d90e", size = 164661, upload-time = "2026-10-09T20:27:48.495Z" },+ { url = "https://files.pythonhosted.org/packages/55/f4/1e63fea41ba86768e18dbc1743e6780f75ad32d7a45e418740c6fb64589e/multidict-7.1.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:ccf98ee859fe29f874ddd8e637f14ba59108a333492b521acb885a9095244a9c", size = 95489, upload-time = "2026-10-09T20:27:50.055Z" },+ { url = "https://files.pythonhosted.org/packages/8c/55/477c351b21b34fe948ffffa8b64cd0c246efd998fed3de922b217e632e59/multidict-7.1.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5fa1484f74d011addf2e5f5a0378ec41521989839a05d6051d8067d8ce732423", size = 97931, upload-time = "2026-10-09T20:27:51.598Z" },+ { url = "https://files.pythonhosted.org/packages/cc/dd/288508d7deb9489dd7c8e0b172d62dc1da8f3cb24877293ead42e6cc2047/multidict-7.1.0-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:1fed3d721f75c25a9fcdd0e362af53f4b20acbcdc63081112f85419ba0ce3444", size = 453816, upload-time = "2026-10-09T20:27:53.217Z" },+ { url = "https://files.pythonhosted.org/packages/60/ed/172447dd09f06111f69d2cf22a018020b34a93a39ddf72cddfdb48323449/multidict-7.1.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:df03e392cae1e05462918abbae06d6100f1e53f67db971ff0ac6c07d9edf7321", size = 477779, upload-time = "2026-10-09T20:27:54.972Z" },+ { url = "https://files.pythonhosted.org/packages/e4/7d/e5b7755e84611ee846f0dc830cb1363ce10764b29247a01b857722fda653/multidict-7.1.0-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:379f477b98a1e9a77ddc3ccaa8c709d3fb4a288ff54b96e171e637b55b4adbae", size = 441299, upload-time = "2026-10-09T20:27:56.901Z" },+ { url = "https://files.pythonhosted.org/packages/1b/d6/e9c93da1644491610f09258349283421a279fdb3b383929b4d963698691c/multidict-7.1.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:40f586bc8a084a3671ddcae9e5fbd3228a596bfb63d9f0380f153f9a65b69f08", size = 496193, upload-time = "2026-10-09T20:27:58.788Z" },+ { url = "https://files.pythonhosted.org/packages/22/49/7fe19efed1b1c73e2f6ae65eba4e6528eeb26e10c970dc0bb0fc009a2aae/multidict-7.1.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:6e7f70d912a589e30290ed926f90ddbc3160998359cbad7c9ede1bcee481748c", size = 511469, upload-time = "2026-10-09T20:28:00.689Z" },+ { url = "https://files.pythonhosted.org/packages/4d/2e/7b708a72001323dc6b2930834d63e355870ea5b1ee8d1450e0fe1a24752b/multidict-7.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5129cc1f5fec6888e2db0be936dab67242e32c738811c8769aeea93aab4257a8", size = 481377, upload-time = "2026-10-09T20:28:03.011Z" },+ { url = "https://files.pythonhosted.org/packages/8b/60/3d23e7d2ebc7e7e6b1b205de0d5c2ce0652a9b2edef65eea3528758b5699/multidict-7.1.0-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:1401caec21fd7f002e79ab6806bbfd1f54bb3de6d5e12bd91c6685dce16ad2be", size = 429992, upload-time = "2026-10-09T20:28:04.846Z" },+ { url = "https://files.pythonhosted.org/packages/f6/e6/8e3bef78ea1929a3f2c395aa292799d4effd6ce1b5cfce42c1986a33e2b5/multidict-7.1.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:c81062e947f4b5a624135a843f6ac4b3c7fe6508300c9fb27347f022ba0c513d", size = 465635, upload-time = "2026-10-09T20:28:06.527Z" },+ { url = "https://files.pythonhosted.org/packages/44/6a/55fe5dd90c0e9ce60f5c4fa8ace27eeb1190d9cbb151929b04412f0c673a/multidict-7.1.0-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:c53be0dd676484a660acc56e4f1cd0dd74bc1255d12fa285e86a3fa9d5f22bf9", size = 441693, upload-time = "2026-10-09T20:28:08.443Z" },+ { url = "https://files.pythonhosted.org/packages/c2/a9/628913f71537dce7dbd6c4ee1ae5019976264427c55354ecc593b4b921b9/multidict-7.1.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:41e0c3350d08994ee8640c39884e16514e282f70ba40f5b2299582509a327774", size = 453808, upload-time = "2026-10-09T20:28:10.871Z" },+ { url = "https://files.pythonhosted.org/packages/25/d0/3ae3af653b5776d045f460582006d0b4d7dd41b078b3ab2e874bf4d1e22f/multidict-7.1.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:abeec7a89d698aa1c9b4c36bd5e3c746faef0867076e6a2ca27fa5077c4ece26", size = 483160, upload-time = "2026-10-09T20:28:12.892Z" },+ { url = "https://files.pythonhosted.org/packages/56/3e/2c13e111b9f4c6216aee0ac57ac39c53db7f97e42bb8490e60a06eaca352/multidict-7.1.0-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:23f6d325241b0db006ca2841309ed17622137e134930a740a8f1331ec4404791", size = 425896, upload-time = "2026-10-09T20:28:14.65Z" },+ { url = "https://files.pythonhosted.org/packages/45/13/15b4d614cf0d6838a7d89eb14f4820fdecfd1b7f529061d172a674912d41/multidict-7.1.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:034b0dc1b7fb8279599c5d8563f86abb4d2454735b06544ecab23c54572ad2bd", size = 491674, upload-time = "2026-10-09T20:28:16.508Z" },+ { url = "https://files.pythonhosted.org/packages/4f/97/3a6f8c75f12a607ff047e3db9a45dff6a558b1e31b89b2f0f27da0fedb6f/multidict-7.1.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:5c8074ad4d67067c87bd0663dfda654f786336078c8fd7d2f6c1aa41de8494cc", size = 473989, upload-time = "2026-10-09T20:28:18.284Z" },+ { url = "https://files.pythonhosted.org/packages/3f/20/5e7726631e50b6afd26324a234851a06104b8ee30f01bc209140788b76c6/multidict-7.1.0-cp313-cp313-win32.whl", hash = "sha256:7b25c335fc53acf29d4d21dbc19fe39d2824201cdda0448623152cc5917bd259", size = 80952, upload-time = "2026-10-09T20:28:20.044Z" },+ { url = "https://files.pythonhosted.org/packages/4f/19/b26bdbef5bf5071ea5a3ba37c963af187fddb8b0a925bd39c0c5dd0ad04a/multidict-7.1.0-cp313-cp313-win_amd64.whl", hash = "sha256:7de54b49e6da811b0321e412d14efdaa1ee0c0b6609296ea5b9022bc5b2bd843", size = 93554, upload-time = "2026-10-09T20:28:21.657Z" },+ { url = "https://files.pythonhosted.org/packages/35/d5/e9a8600d3868e3fdc4a4be1d15e594048508511c0398423df0ed18c11b5a/multidict-7.1.0-cp313-cp313-win_arm64.whl", hash = "sha256:aeba2c750102051aa51e087c2ccbc79f2724a41c94168f8731e36f54c453551a", size = 92039, upload-time = "2026-10-09T20:28:23.464Z" },+ { url = "https://files.pythonhosted.org/packages/2c/a7/c9f5c08348a6f903143b631546e22becf1b704a1304b17f7e1b9850308d2/multidict-7.1.0-cp314-cp314-android_24_x86_64.whl", hash = "sha256:128ea4142f81a79d430f3d0eb55206093e5eda03a12abbc7b03c34748ff6116b", size = 100435, upload-time = "2026-10-09T20:28:26.111Z" },+ { url = "https://files.pythonhosted.org/packages/82/60/92fe617008c74cc019483b1c59202c48738c6f637ad5b12b36f01e21db43/multidict-7.1.0-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:439a19f7fbbff232ce96682c57e27030b8ac3a4b8121484c94f04bf99d08bfff", size = 95267, upload-time = "2026-10-09T20:28:27.856Z" },+ { url = "https://files.pythonhosted.org/packages/17/78/82182f311d673f17de15bc7f7465c7ea5cbd2987ca3a6bf6546fa721e9d8/multidict-7.1.0-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:8090c35199d6b7bc6426bb8bdaf341e64f295cc2624a1fda7860c0837f1acc03", size = 97233, upload-time = "2026-10-09T20:28:29.817Z" },+ { url = "https://files.pythonhosted.org/packages/63/25/af4e482d053fd73b4b1d60de3ff5578c6cb1d319d39d3f2a454d65409835/multidict-7.1.0-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:b7cc5333fcbfb27327d12612ed72322f221b61c2b69deb1155078c964f86e1a1", size = 163070, upload-time = "2026-10-09T20:28:31.495Z" },+ { url = "https://files.pythonhosted.org/packages/df/d5/eaed52e199451dac445305fb2631d3f4e7ac9536aeef01f23622a1d93f90/multidict-7.1.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:b0e0040b0d8dd89bd0af9ab18901981e344ffba68bb30b8eabb4eab6c303279b", size = 94582, upload-time = "2026-10-09T20:28:33.263Z" },+ { url = "https://files.pythonhosted.org/packages/6b/e3/ff58ecad5161baa98dec05716e2745449446f2424a9c727464bf452f7fd1/multidict-7.1.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:33376418ab2846b931a72b36cfa16810befc4f49485d0b3f4dc054a4d6d00038", size = 97406, upload-time = "2026-10-09T20:28:34.981Z" },+ { url = "https://files.pythonhosted.org/packages/ac/a2/ae4eadf02d4bc035baa7cadf5548ca4fa441517193f76ce1aeb5ed276ae3/multidict-7.1.0-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:1101aea5c3eb1d26e090b931c693488af0db9f3d52e68be8d4cdd807dad9841d", size = 449908, upload-time = "2026-10-09T20:28:36.659Z" },+ { url = "https://files.pythonhosted.org/packages/91/55/bd5101ef760d1af4c3f246330b29b48ee22bfdd5a83150b713dd93b431e2/multidict-7.1.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f996b19ac89e0dae65821ce65f788619e4286f78c62d005ecd3b75b5d9c0892b", size = 471605, upload-time = "2026-10-09T20:28:38.561Z" },+ { url = "https://files.pythonhosted.org/packages/4d/8f/3dea8a28b0416ab71d47c8ce274bb3cacedde2d9838647ac67cdaa3d48e6/multidict-7.1.0-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e0d91a4bcb59ac0d7af0d8e0da737332e1b7fe6831e53e47819b1b5349d431b2", size = 433523, upload-time = "2026-10-09T20:28:40.913Z" },+ { url = "https://files.pythonhosted.org/packages/24/97/805d2aa4f746cc43cf4b206f1b1bfe2566add95bbb145abd3d9cf61858bf/multidict-7.1.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e96d67914ddbf5466e4476a1cd7ff30a332cbab85ed895207acc3e58c979b6a7", size = 488277, upload-time = "2026-10-09T20:28:42.851Z" },+ { url = "https://files.pythonhosted.org/packages/dd/7b/eac247b7e76f6010071c7c2401da5255eeffd1b2ac981925e533413d21ec/multidict-7.1.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:170ba61761f59ab92afcc86ce5534a3f3d0b07c38b339b950a83213f22dd86ec", size = 501888, upload-time = "2026-10-09T20:28:44.75Z" },+ { url = "https://files.pythonhosted.org/packages/87/58/de62e27b09dd15756265765945f68f1c0d1e23eaba09e2e109fbb4112425/multidict-7.1.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:33389fe084e5426d9fd85d7d9ca91a29cd0d88a83c7c96e411aca49a3f9967bc", size = 474883, upload-time = "2026-10-09T20:28:46.704Z" },+ { url = "https://files.pythonhosted.org/packages/21/fd/afb4e50ce3b44707b5ee39c6b5fa1573bdb50c4be660bb35b040362b5170/multidict-7.1.0-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:77024596b9046572c4e90b34c1ff212346756dc48933f90c53cf6e233660788d", size = 424327, upload-time = "2026-10-09T20:28:48.681Z" },+ { url = "https://files.pythonhosted.org/packages/23/70/96c9abf933c4edae53b8a1c8d3f038120a3a60d363f16c6d94eee9b04851/multidict-7.1.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:ff15531a376dc6f35984443fd1429e4b150c36ce27633e7cc52a9e5318546e20", size = 459255, upload-time = "2026-10-09T20:28:50.562Z" },+ { url = "https://files.pythonhosted.org/packages/24/37/dbc1dba26dc1c9e42aa07ee01908131a67fee0e79ebe5c1d0e7fc00aad55/multidict-7.1.0-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:544f2642a456fa264614e975d921540ee8c3b368b04d5aa1ddbec33241b13e08", size = 432476, upload-time = "2026-10-09T20:28:52.361Z" },+ { url = "https://files.pythonhosted.org/packages/9c/0a/eac70cc1461668bad8253a2da727670a56293eaba112aeb4079af8cd37d9/multidict-7.1.0-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:08834fb8b20e1a985c70e8380a10940234b4162de62694458727330376e58b33", size = 450030, upload-time = "2026-10-09T20:28:54.252Z" },+ { url = "https://files.pythonhosted.org/packages/23/2d/eb40652ea74f96df859c7c5d38f9997f420b9dc404300dda0c5745327a6f/multidict-7.1.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:b4908e17867930b7ac77f89a18dc67308c67c511f037d8580489be86fb585912", size = 476169, upload-time = "2026-10-09T20:28:56.819Z" },+ { url = "https://files.pythonhosted.org/packages/44/d0/7454ab8335bc4ec9f8abcc4c83a314bab060f22db6da8436b396e07ed21a/multidict-7.1.0-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:9b24e1f93b9b586ec03bc7bea1bf021ec90bf2528c729195028a3ca1c266b3f9", size = 420459, upload-time = "2026-10-09T20:28:58.744Z" },+ { url = "https://files.pythonhosted.org/packages/60/7a/cedb46b287b720a2c4eda2448faf162612d0b718beb32581e35ccd9219b3/multidict-7.1.0-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:5c93473d0d7cd9bbb370973a9679a62f381c7050d7dff4ad6aaa92e8650f5a79", size = 483071, upload-time = "2026-10-09T20:29:01.114Z" },+ { url = "https://files.pythonhosted.org/packages/9a/11/e7ded22b008546dd30ae8c979aa5ac3282cad98876f7d5bbe93c1f2409a0/multidict-7.1.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:bf14cfcc30b097583d698a6e2b8b68c9bcffab277c485d481881958360c2938d", size = 467470, upload-time = "2026-10-09T20:29:03.388Z" },+ { url = "https://files.pythonhosted.org/packages/1d/f3/0136144cb0b1731fd93475cea75d974a55009358d3bf61dd55e2709a3dca/multidict-7.1.0-cp314-cp314-win32.whl", hash = "sha256:86bc779a0896e59e4be30a5be5cd6eeffd0b40b6f0e75e730218736b7bfc6f5c", size = 80205, upload-time = "2026-10-09T20:29:05.736Z" },+ { url = "https://files.pythonhosted.org/packages/74/d9/a62a690d780febc171026d3e3c5700fc8387aa3e5f77cd04ada33d23d3f4/multidict-7.1.0-cp314-cp314-win_amd64.whl", hash = "sha256:6c9fd50f636a8fa9cb6324cd3eac962fec2bc5bb432452a3b583583a1059acfc", size = 92923, upload-time = "2026-10-09T20:29:07.337Z" },+ { url = "https://files.pythonhosted.org/packages/84/08/eb7a1c34dc37c5f2c6aef52e6861e6f1cdfc6c685dcb72581eb218c00953/multidict-7.1.0-cp314-cp314-win_arm64.whl", hash = "sha256:e6906aa4bc62cde2c8aeb8a99a7b4401b241e274ae7b11df67d863d61ab3d5de", size = 92851, upload-time = "2026-10-09T20:29:09.15Z" },+ { url = "https://files.pythonhosted.org/packages/ff/3a/019abd746e8fbed9edd74b81259f20b278c011cef918868506d9b5bd6566/multidict-7.1.0-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:fabfdd4cf97db033196b51af46b8a681d4785c2a66347f2a5af1b4bbb1182629", size = 177429, upload-time = "2026-10-09T20:29:10.989Z" },+ { url = "https://files.pythonhosted.org/packages/f7/41/c8dda935231305d9b83c4a4cc5b5b9e323615328d4704f00ba2cf6d89916/multidict-7.1.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:a177a0ee5cf19931dcaeb3f662bc562754cfa4f4ace2351d9da24a954ef7db94", size = 102003, upload-time = "2026-10-09T20:29:12.78Z" },+ { url = "https://files.pythonhosted.org/packages/af/23/3c3e79a222eaaa59a32648cec34709d848657be5339f96876075731e7f8e/multidict-7.1.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:0ae91de396d5c4ac97cb24dbada3d5c91a51454781e0a70476b008f4e879e4f0", size = 104861, upload-time = "2026-10-09T20:29:14.591Z" },+ { url = "https://files.pythonhosted.org/packages/cd/5b/04637e7cea5729466fb89048520fde167c5404df1beedcc86f18aeabed7c/multidict-7.1.0-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:160bdb3520fdadcaa21e1b98aab2e011265070814ecab3804eb61674becbd400", size = 463221, upload-time = "2026-10-09T20:29:16.697Z" },+ { url = "https://files.pythonhosted.org/packages/2d/42/b121767de213a9774399c200cb877b19c2e1e5a0b0a6bc8407c7325fa37e/multidict-7.1.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6c2144785e42527404bbd5cfd11981fee4abe59a22aded0e498eb711a831d3f3", size = 502241, upload-time = "2026-10-09T20:29:18.657Z" },+ { url = "https://files.pythonhosted.org/packages/47/0a/1cccd17ebf39776df7d8a6c99d066fc3ac1823d044cfe86a22ebbf42b841/multidict-7.1.0-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:7d0b4fec6a8d02d7e95de5cfa913261820f1ce04bd4c0381924de0da523179b8", size = 457128, upload-time = "2026-10-09T20:29:20.589Z" },+ { url = "https://files.pythonhosted.org/packages/19/a9/0616d20dee16255f8737d9017288d9304dabf3695ac0071baca25d00c713/multidict-7.1.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:943a9bce22180ad0f4d32d1b402a0949a4ecfe5a1257b47f54a1b51981d81b86", size = 511842, upload-time = "2026-10-09T20:29:22.569Z" },+ { url = "https://files.pythonhosted.org/packages/91/68/5a406b82ecfeee50c097c05fd519c836a61815d81c4a9a8c523d90fb4b35/multidict-7.1.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f76ceb623f7ff50df46ac57e1587c479d87a5766319c4f43d0c0a5158896afab", size = 519852, upload-time = "2026-10-09T20:29:24.527Z" },+ { url = "https://files.pythonhosted.org/packages/d5/da/d42234f9d4f0e33885c70149112bf62aa4436045090c15cec0810ada0b2f/multidict-7.1.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:98beff85392ce435b28a0971ec21cade61ce8be8b632c9d855475a28ef92d31a", size = 500322, upload-time = "2026-10-09T20:29:26.569Z" },+ { url = "https://files.pythonhosted.org/packages/fb/c6/323e921a9812a6ea82978d4e1d9713e0b709023be037e6e4c14efe5472eb/multidict-7.1.0-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:71196ebb8d523148e5975396a444de02367f204b53b14e26794c96b2be0ed742", size = 444070, upload-time = "2026-10-09T20:29:28.52Z" },+ { url = "https://files.pythonhosted.org/packages/93/87/109b7170de2168294f3e562f9d10caaaf946628d614b5a57246279acc1a6/multidict-7.1.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:35534b366410a36bb3d6f788691e37a76e4d1da48326b0ada3e5032580dd76af", size = 484862, upload-time = "2026-10-09T20:29:30.504Z" },+ { url = "https://files.pythonhosted.org/packages/51/cf/7f1f63c9cf13f47036c0c64c607e6eee87c94076e3c6876abb6990ee62ad/multidict-7.1.0-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:b4674b12701c3fcbdf7f88b9e4479701c93bec5da9eb576140d5fcc0092990af", size = 457314, upload-time = "2026-10-09T20:29:32.6Z" },+ { url = "https://files.pythonhosted.org/packages/93/ce/7de8b4ee6a847cc951915c279fc388127ec32a7c14aa7a01c4ad692be575/multidict-7.1.0-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:0ead852a5e906a43fcb6784eeac480f6a67919a51d480c1f80d32ddf9d615475", size = 462672, upload-time = "2026-10-09T20:29:34.776Z" },+ { url = "https://files.pythonhosted.org/packages/f6/6c/02dd089475983b1f5b8729319caa0b02fa3a60b527f27c86b2d53c24ca11/multidict-7.1.0-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:afe36ca503c2ffe30fb6df82b20389fa3c4035b5d65888a61310921cf3ae91c5", size = 498109, upload-time = "2026-10-09T20:29:36.763Z" },+ { url = "https://files.pythonhosted.org/packages/47/d9/b9bdc59aa8e3eaf1f9e5d2460bbe0c428a01250d44417f8ccf965a8f6fa6/multidict-7.1.0-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:a5f0bebb10aae010d3c9ee3abaf83ab2069c718457aea09c15532355dd7e061f", size = 442260, upload-time = "2026-10-09T20:29:38.872Z" },+ { url = "https://files.pythonhosted.org/packages/fa/83/21b044885ab81bf5c03ec5c4c16aa449977e428c5c122e38969481cec1df/multidict-7.1.0-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:b9d9b7d72975521434368fe8aed3f6b522060bf271adabaa5ca6c87c0c08e168", size = 498916, upload-time = "2026-10-09T20:29:41.091Z" },+ { url = "https://files.pythonhosted.org/packages/95/8b/31686730092e349ee2255fa630945ca344fc62e76f0b18d65b0f3dbb0ecf/multidict-7.1.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:274023bf952f849e0d05eba28a4c1f65f9796430d2b09ec16539386c0f76554c", size = 493525, upload-time = "2026-10-09T20:29:43.192Z" },+ { url = "https://files.pythonhosted.org/packages/c7/d0/c9fddcd7ac42b70a46ac9cf15e21eb527874164e14d418fcb50ce7190a4b/multidict-7.1.0-cp314-cp314t-win32.whl", hash = "sha256:7e0bfa161df365ba3c88899ee3b7c94755200967284bdedef8c1b8b43e2c0f2b", size = 86481, upload-time = "2026-10-09T20:29:45.188Z" },+ { url = "https://files.pythonhosted.org/packages/24/ab/ce727c06680e72b5d381caa8587f561cb6fea1bfab6ba20c877019768a6f/multidict-7.1.0-cp314-cp314t-win_amd64.whl", hash = "sha256:34a35be8fb82d37087e8176aba907b9459f03d0e293c80f574c6337a436f4eaa", size = 99676, upload-time = "2026-10-09T20:29:47.441Z" },+ { url = "https://files.pythonhosted.org/packages/fa/e7/d116d7ce514d04d9bf63774ed55e8033e2ce15ab5655a597bb947c53dfb8/multidict-7.1.0-cp314-cp314t-win_arm64.whl", hash = "sha256:d7dd46a8fcd7653c09ebe67eae9d4cb6636c7a905d9cbaf587dabcbd4eca6013", size = 98726, upload-time = "2026-10-09T20:29:49.365Z" },+ { url = "https://files.pythonhosted.org/packages/28/42/963e2e38ffd79487b24775841cfe2abb85aa1fa08ee152afc4a9b64e1cdd/multidict-7.1.0-cp315-cp315-android_24_x86_64.whl", hash = "sha256:852c921217f330b3e81a822647ebadeae7e42cf503ec1992d0bfbc90121c09fb", size = 100450, upload-time = "2026-10-09T20:29:51.486Z" },+ { url = "https://files.pythonhosted.org/packages/b3/6e/fbc4721aa0eaea2dff3274ff44e94f60a89841bbb4cdaecd9faa4eb64aa7/multidict-7.1.0-cp315-cp315-ios_13_0_arm64_iphoneos.whl", hash = "sha256:cbec738d2ad551c6f70955d7eec95e339380ee1564e2afe86bfee05fed52ceec", size = 95440, upload-time = "2026-10-09T20:29:53.929Z" },+ { url = "https://files.pythonhosted.org/packages/76/66/045aee749b599560d5348bb1bee5c9d61d8b12f31d16e0594778ef3472de/multidict-7.1.0-cp315-cp315-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:a5f721a2437390ab69c10c6df5c142478d399af8dfb02e6d823cf2358e8a4748", size = 97496, upload-time = "2026-10-09T20:29:55.808Z" },+ { url = "https://files.pythonhosted.org/packages/97/79/f2916b81324d629eba363f760fba26cafef5cb437489c24969ada979508d/multidict-7.1.0-cp315-cp315-macosx_10_15_universal2.whl", hash = "sha256:99cf27791129d37e191ff013bfc29bf6631c29edb21680c00978567b91fc5d6b", size = 163241, upload-time = "2026-10-09T20:29:57.813Z" },+ { url = "https://files.pythonhosted.org/packages/ce/f6/2aab2b2d7bf2d69204bde0cdabfefe4df3d1954f3f156bfc53714917e757/multidict-7.1.0-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:2ba6611fc93c4b169d0e0ea376ebf4b8a529933d1f5f2c2ec7d8f8b93ef58ec2", size = 94586, upload-time = "2026-10-09T20:30:00.201Z" },+ { url = "https://files.pythonhosted.org/packages/b6/83/cf690ab80a0db0f50b300a7141f45dbf1bbbb6b32457f74bb55f47d38f5c/multidict-7.1.0-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:c45629c0049fbdef932dbe408ac2b271fdc8c7d9962ca31160f4a0fc3455fe4f", size = 97573, upload-time = "2026-10-09T20:30:02.675Z" },+ { url = "https://files.pythonhosted.org/packages/ce/2e/951c1412c9803e8f87c8673305be1e448761c940cd867ccfdd3e6a551dfd/multidict-7.1.0-cp315-cp315-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:cf606cfe3f67984b4064ac605d71e1eba12515fbabf5bd5a34a8952b8800dc66", size = 453476, upload-time = "2026-10-09T20:30:04.622Z" },+ { url = "https://files.pythonhosted.org/packages/a1/55/12f9f95fc65470bf481ad3d1c0e0fc20094720d0af1985119656f2b4be25/multidict-7.1.0-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:50fdfcb03be719d9573597b095b1175d2e9d0b30d065791dfd9fca727c499442", size = 473078, upload-time = "2026-10-09T20:30:06.986Z" },+ { url = "https://files.pythonhosted.org/packages/87/31/ebe216194a68934de7053d582cde62c839bef4dbc4ae67e9bbccf80a61d2/multidict-7.1.0-cp315-cp315-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:a8bba9d1f6db4ef2a6ebfc937a65d36e80e3aada00b382eaf56fea8f639322d5", size = 435633, upload-time = "2026-10-09T20:30:09.021Z" },+ { url = "https://files.pythonhosted.org/packages/46/e5/4aea764cd6a1d326d91f2bb92b1c8c39c3f5a8da624e7b20b88179dffb72/multidict-7.1.0-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:46d4af0afc6eb9867b3ae50605787c80b868e2f52eac3801246034925fe578b8", size = 488656, upload-time = "2026-10-09T20:30:11.119Z" },+ { url = "https://files.pythonhosted.org/packages/6e/f8/b1e5935233fa4b504b1a58b584fcdf03526635e4b5f268f716be9108a1a4/multidict-7.1.0-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5cc58ebb731200ddb64d55f1b345630fb5f7a8138cdbd242af9dce964a7cb03d", size = 502311, upload-time = "2026-10-09T20:30:13.396Z" },+ { url = "https://files.pythonhosted.org/packages/9a/8e/cde07147b6fc56b9ae0fe01d9c0bebd730b2be2c3052d3a5a117e13f561e/multidict-7.1.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4b87ad54e8d4adeb0a1f04889504d6ec7f04fb02609220810f51f1b6c66bc1cc", size = 477470, upload-time = "2026-10-09T20:30:15.894Z" },+ { url = "https://files.pythonhosted.org/packages/68/a1/11ac1880eacddcf698aa227ba9387cda60128e38034eda182cf4585109ee/multidict-7.1.0-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:44f7e5dd83a615636b80182bdf446ece57ed61d5d51854acc5d9840631136d4e", size = 430088, upload-time = "2026-10-09T20:30:18.972Z" },+ { url = "https://files.pythonhosted.org/packages/6a/5a/09926de0ec910704507a21c4f1ad76026aab9a5657ced868c57bbbe9324b/multidict-7.1.0-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:9bc5e7f843d14a167cdc26fe2d22f6f3aa2feb57919cf3ff034262a57d8d95d0", size = 460632, upload-time = "2026-10-09T20:30:21.45Z" },+ { url = "https://files.pythonhosted.org/packages/ed/36/cc51eb3ffb09f475326bbf868c6af2805fbbe9175122ce6d7a65aa06d6c1/multidict-7.1.0-cp315-cp315-musllinux_1_2_armv7l.whl", hash = "sha256:0631eb5f49f67de10bbdc3f64141326dbc62e8d319900966648381ce0845d8ca", size = 434056, upload-time = "2026-10-09T20:30:23.679Z" },+ { url = "https://files.pythonhosted.org/packages/6d/f4/9e0e4dce595573eba1555495ac9ca6b5f7f6e14cf6c3a5cd87ce5bd33d6f/multidict-7.1.0-cp315-cp315-musllinux_1_2_i686.whl", hash = "sha256:d1b1b32f3c32f734dde8f36ac1df8e275e768a7b333241cd637cb2538628a4b4", size = 453014, upload-time = "2026-10-09T20:30:26.192Z" },+ { url = "https://files.pythonhosted.org/packages/96/14/993a7ac9f3592f5628a12f6bc2495f5cce5814b883170e06f487dede6969/multidict-7.1.0-cp315-cp315-musllinux_1_2_ppc64le.whl", hash = "sha256:159976f9c40f96e3fe0952b708846a43a76bacb114e9cc828816f5080bddd5ec", size = 476343, upload-time = "2026-10-09T20:30:28.532Z" },+ { url = "https://files.pythonhosted.org/packages/b0/da/c2147c1e225a676ee0c97f97bb935fb8a70821bc12df240491bf9f140801/multidict-7.1.0-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:81a0e08c64dfdad27dab687b96f572b23bafa1999a39d1b6f70b3ddbb73e8bd0", size = 426813, upload-time = "2026-10-09T20:30:31.015Z" },+ { url = "https://files.pythonhosted.org/packages/5f/fa/8858b260a6662035670759e7b3a7da9decc227296491749073e76202de93/multidict-7.1.0-cp315-cp315-musllinux_1_2_s390x.whl", hash = "sha256:4e11e7299079718c78f8147e7206c22fe35bab4466d38992420795288a0b8096", size = 483882, upload-time = "2026-10-09T20:30:33.509Z" },+ { url = "https://files.pythonhosted.org/packages/c2/43/d42dc515d56d506f437e8a19c4f604719a306f8d2b60f70a14be34ac9231/multidict-7.1.0-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:34d2ee98e15d5cfe782a431bc913fce3b58cf3fdb34fcb437aeb275cdf9007ab", size = 469953, upload-time = "2026-10-09T20:30:35.996Z" },+ { url = "https://files.pythonhosted.org/packages/5e/bd/1b6fb52f7e082b4d49b069d362169a2e6dbc43800f152f33c8f0e8933117/multidict-7.1.0-cp315-cp315-win32.whl", hash = "sha256:f376224572d1f5da1c871f969ab04765727f180e70d012d93e07bfc08442c64b", size = 80202, upload-time = "2026-10-09T20:30:38.121Z" },+ { url = "https://files.pythonhosted.org/packages/f2/26/5dec513dec950825529037703da89a597dc0b157e7b1b8d0304dd9e672cc/multidict-7.1.0-cp315-cp315-win_amd64.whl", hash = "sha256:67fcf28db77b385820881521db7435e9f1c607cfaf07db6eb78aa9d1146bde86", size = 92921, upload-time = "2026-10-09T20:30:40.507Z" },+ { url = "https://files.pythonhosted.org/packages/dd/eb/fd62025f8cd3dad6f936df8bd7ff2642e2fe3fe0166ef2fc75699ee57cac/multidict-7.1.0-cp315-cp315-win_arm64.whl", hash = "sha256:c7aafa4dd2f702ee2198005d6cba4309c1e25ed1c201d77beddefa47411bead8", size = 92848, upload-time = "2026-10-09T20:30:43.026Z" },+ { url = "https://files.pythonhosted.org/packages/42/f4/2dcd45731d2f57b87211a1dab1c29a72c6a4a527f370851c3e4cef5c4445/multidict-7.1.0-cp315-cp315t-macosx_10_15_universal2.whl", hash = "sha256:1348ddc076251cd542f4a99ccda4b7c1f8444e8ab489d3541a978ca5901c7c1f", size = 177634, upload-time = "2026-10-09T20:30:45.125Z" },+ { url = "https://files.pythonhosted.org/packages/6d/d6/d57b12a5bb19396a99ae66ec48ff69f764cc2c83e83bd9a003bd5ed5802a/multidict-7.1.0-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:9267bf8261a779abb2a6eab5f107f5db85b2d1745f2494081c731aaf28738ce3", size = 101954, upload-time = "2026-10-09T20:30:47.416Z" },+ { url = "https://files.pythonhosted.org/packages/46/8b/374e3f6e4581b8f8425712214cad854ff9370019483aaa49e6207c160adf/multidict-7.1.0-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:8a844b8b1685f38a2e8b2f3213b286e2a7abfe67508381780a0d4599ac337c1c", size = 105056, upload-time = "2026-10-09T20:30:49.618Z" },+ { url = "https://files.pythonhosted.org/packages/9e/0a/6c89e2179a84eaa78eec658b9a05f10d3e22654708d7b2e3ebdf0faa0614/multidict-7.1.0-cp315-cp315t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:18a447d46a3a2f1e61b365cbf5627db7030fdb707dad70c4f2760e5144166ecc", size = 467374, upload-time = "2026-10-09T20:30:51.933Z" },+ { url = "https://files.pythonhosted.org/packages/c5/62/431ed831b5e9b94c75ed0a410786d07176e879603601570eb25594039200/multidict-7.1.0-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:88811f890db240a1c82bf0bcd52973763707a552c8113ac3fcebca183afb2fa8", size = 504024, upload-time = "2026-10-09T20:30:54.701Z" },+ { url = "https://files.pythonhosted.org/packages/d4/dc/52e4204538a7824e407e531b742ff6f7a2ff614dd40382d29a62755699cb/multidict-7.1.0-cp315-cp315t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:a60b720c329c0007feae692b7bf91cf17b3f9bd3727be96cc6f9a3336651041b", size = 460139, upload-time = "2026-10-09T20:30:57.193Z" },+ { url = "https://files.pythonhosted.org/packages/22/4c/0228d61a8fee69a7ac4d8d0426aa1810b9c36b679a8c51844de701230073/multidict-7.1.0-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:b117ed1cd1a23df0902461c38093408b95971833dcee629112acda25b603c8d0", size = 513162, upload-time = "2026-10-09T20:30:59.662Z" },+ { url = "https://files.pythonhosted.org/packages/56/50/a0b28bf4f036897bbd44c8761fbb384c014c34f621687799d07345b62820/multidict-7.1.0-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:bbcae7a54050b7ad7bc7bf425ba63dea7d2cd31a92246ba787a2ce69a9b98dbc", size = 520312, upload-time = "2026-10-09T20:31:02.515Z" },+ { url = "https://files.pythonhosted.org/packages/4f/1d/ba96f77c24174eff9f6521cc7c83958f27598b924a9f7b6aca5d11c73f35/multidict-7.1.0-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4cba2b0b9235fe10e12301d6b4cfba0f353fa668d635f6e988b03623c2cd42ba", size = 502953, upload-time = "2026-10-09T20:31:05.187Z" },+ { url = "https://files.pythonhosted.org/packages/59/f2/14c3ffb649cf45a629ec38ca757a493f0caf729e3f3580816dc7779e4caa/multidict-7.1.0-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:535173fbcc3933d84f9929d49d7a59a0faec259ee07d07c34c7d2a980b4e3683", size = 451497, upload-time = "2026-10-09T20:31:07.597Z" },+ { url = "https://files.pythonhosted.org/packages/55/df/fa4f8f6ee2314bdd3e4bc830c25f1d8a737188198abeaf105c73454f0b95/multidict-7.1.0-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:ea027bdeca1d7e498237634ee4e3a852e2723eef39996dec0ff0f77dff8a2336", size = 486212, upload-time = "2026-10-09T20:31:10.178Z" },+ { url = "https://files.pythonhosted.org/packages/32/5e/3227762b04a8ff1a90359ee2c04af9ed095fe3892e101705fa4233b51514/multidict-7.1.0-cp315-cp315t-musllinux_1_2_armv7l.whl", hash = "sha256:507151e1e3dee95e9e8159e329aed4f75aa5205ecd6505a4f6be546890eafbe1", size = 459864, upload-time = "2026-10-09T20:31:13.044Z" },+ { url = "https://files.pythonhosted.org/packages/5e/04/58524c7e82176438a48704a687fb383cc943dd7075c67b5bea288043b504/multidict-7.1.0-cp315-cp315t-musllinux_1_2_i686.whl", hash = "sha256:9c10791e9f5ef132effc8fdce2009482c1cfb26618c5fc1b7952a47dd5eb632e", size = 465861, upload-time = "2026-10-09T20:31:15.503Z" },+ { url = "https://files.pythonhosted.org/packages/f8/d6/28e549b6ec0c829647de4c75cf32e4c7ea0d0e87b91dfb399292f630c365/multidict-7.1.0-cp315-cp315t-musllinux_1_2_ppc64le.whl", hash = "sha256:f16ac8af2804855d3cae5fc3c5ab609c9fd0fc8ecacd92579c05ed3c173396fd", size = 498865, upload-time = "2026-10-09T20:31:18.548Z" },+ { url = "https://files.pythonhosted.org/packages/eb/ac/3006640586b4d33442c53989b78fc290c8eae5fab5b62a31ac7a4c220e69/multidict-7.1.0-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:b78de22bae456a976f33df34d598dfd16edc9a03df8f4cc8b7c17bdba4c97b4a", size = 449885, upload-time = "2026-10-09T20:31:21.03Z" },+ { url = "https://files.pythonhosted.org/packages/80/7e/1ece407cee9f9aff9ace9e44379ed937bccb790936ae448feb79a82c362e/multidict-7.1.0-cp315-cp315t-musllinux_1_2_s390x.whl", hash = "sha256:db77888081431aaa69f3fd3480891746ddce6c2a571f6201869a24e2f06cf423", size = 500237, upload-time = "2026-10-09T20:31:23.611Z" },+ { url = "https://files.pythonhosted.org/packages/9a/4c/c052b700ffcf689454848ee81ba87bedfdc10caff592c0d2a327c43939a5/multidict-7.1.0-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:c39dfcaa0bf23443474c0cb58d8d8aea9529c1841d99654cb38e4dada7b1948a", size = 495143, upload-time = "2026-10-09T20:31:26.237Z" },+ { url = "https://files.pythonhosted.org/packages/0a/ef/9ddad94c32fb0bdfc5ad0942d06ae6699bd30d261b0ff59b94810a133238/multidict-7.1.0-cp315-cp315t-win32.whl", hash = "sha256:16b21164797bde6f417066d02775975cc2e15ab8abf80efa55fe85e0b4894020", size = 86526, upload-time = "2026-10-09T20:31:28.734Z" },+ { url = "https://files.pythonhosted.org/packages/b3/ce/2efa1f32a07adfe041d48c6d04c08b6f9db66b8512c765983172399b2855/multidict-7.1.0-cp315-cp315t-win_amd64.whl", hash = "sha256:55392202cb374dd1a1f89a8ce1586644870d9e936752059d053e576acc50bc89", size = 99671, upload-time = "2026-10-09T20:31:31.282Z" },+ { url = "https://files.pythonhosted.org/packages/a9/b3/a44c301fe13716c5f2c08afd89a481018988cde4b337b36e28a2b0fcf3a3/multidict-7.1.0-cp315-cp315t-win_arm64.whl", hash = "sha256:f979a077d1c0a9a36dd4fab0d3a36b8de7b593bf935e13df85a380395b2c11ad", size = 98893, upload-time = "2026-10-09T20:31:33.62Z" },+ { url = "https://files.pythonhosted.org/packages/d0/86/a3de309c5e28ee85b314d0e3ba0e0dea6fd361c313322a05e67be4656e1e/multidict-7.1.0-py3-none-any.whl", hash = "sha256:d9ef29cfd98e17085b4f91bba8fa1570bec6787d5c52ce653ed33a58785585d0", size = 28087, upload-time = "2026-10-09T20:31:35.945Z" },+]++[[package]]+name = "numpy"+version = "2.2.6"+source = { registry = "https://pypi.org/simple" }+resolution-markers = [+ "python_full_version < '3.11' and sys_platform == 'darwin'",+ "python_full_version < '3.11' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "(python_full_version < '3.11' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform != 'darwin' and sys_platform != 'linux')",+]+sdist = { url = "https://files.pythonhosted.org/packages/76/21/7d2a95e4bba9dc13d043ee156a356c0a8f0c6309dff6b21b4d71a073b8a8/numpy-2.2.6.tar.gz", hash = "sha256:e29554e2bef54a90aa5cc07da6ce955accb83f21ab5de01a62c8478897b264fd", size = 20276440, upload-time = "2025-05-17T22:38:04.611Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/9a/3e/ed6db5be21ce87955c0cbd3009f2803f59fa08df21b5df06862e2d8e2bdd/numpy-2.2.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b412caa66f72040e6d268491a59f2c43bf03eb6c96dd8f0307829feb7fa2b6fb", size = 21165245, upload-time = "2025-05-17T21:27:58.555Z" },+ { url = "https://files.pythonhosted.org/packages/22/c2/4b9221495b2a132cc9d2eb862e21d42a009f5a60e45fc44b00118c174bff/numpy-2.2.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8e41fd67c52b86603a91c1a505ebaef50b3314de0213461c7a6e99c9a3beff90", size = 14360048, upload-time = "2025-05-17T21:28:21.406Z" },+ { url = "https://files.pythonhosted.org/packages/fd/77/dc2fcfc66943c6410e2bf598062f5959372735ffda175b39906d54f02349/numpy-2.2.6-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:37e990a01ae6ec7fe7fa1c26c55ecb672dd98b19c3d0e1d1f326fa13cb38d163", size = 5340542, upload-time = "2025-05-17T21:28:30.931Z" },+ { url = "https://files.pythonhosted.org/packages/7a/4f/1cb5fdc353a5f5cc7feb692db9b8ec2c3d6405453f982435efc52561df58/numpy-2.2.6-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:5a6429d4be8ca66d889b7cf70f536a397dc45ba6faeb5f8c5427935d9592e9cf", size = 6878301, upload-time = "2025-05-17T21:28:41.613Z" },+ { url = "https://files.pythonhosted.org/packages/eb/17/96a3acd228cec142fcb8723bd3cc39c2a474f7dcf0a5d16731980bcafa95/numpy-2.2.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:efd28d4e9cd7d7a8d39074a4d44c63eda73401580c5c76acda2ce969e0a38e83", size = 14297320, upload-time = "2025-05-17T21:29:02.78Z" },+ { url = "https://files.pythonhosted.org/packages/b4/63/3de6a34ad7ad6646ac7d2f55ebc6ad439dbbf9c4370017c50cf403fb19b5/numpy-2.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc7b73d02efb0e18c000e9ad8b83480dfcd5dfd11065997ed4c6747470ae8915", size = 16801050, upload-time = "2025-05-17T21:29:27.675Z" },+ { url = "https://files.pythonhosted.org/packages/07/b6/89d837eddef52b3d0cec5c6ba0456c1bf1b9ef6a6672fc2b7873c3ec4e2e/numpy-2.2.6-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:74d4531beb257d2c3f4b261bfb0fc09e0f9ebb8842d82a7b4209415896adc680", size = 15807034, upload-time = "2025-05-17T21:29:51.102Z" },+ { url = "https://files.pythonhosted.org/packages/01/c8/dc6ae86e3c61cfec1f178e5c9f7858584049b6093f843bca541f94120920/numpy-2.2.6-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8fc377d995680230e83241d8a96def29f204b5782f371c532579b4f20607a289", size = 18614185, upload-time = "2025-05-17T21:30:18.703Z" },+ { url = "https://files.pythonhosted.org/packages/5b/c5/0064b1b7e7c89137b471ccec1fd2282fceaae0ab3a9550f2568782d80357/numpy-2.2.6-cp310-cp310-win32.whl", hash = "sha256:b093dd74e50a8cba3e873868d9e93a85b78e0daf2e98c6797566ad8044e8363d", size = 6527149, upload-time = "2025-05-17T21:30:29.788Z" },+ { url = "https://files.pythonhosted.org/packages/a3/dd/4b822569d6b96c39d1215dbae0582fd99954dcbcf0c1a13c61783feaca3f/numpy-2.2.6-cp310-cp310-win_amd64.whl", hash = "sha256:f0fd6321b839904e15c46e0d257fdd101dd7f530fe03fd6359c1ea63738703f3", size = 12904620, upload-time = "2025-05-17T21:30:48.994Z" },+ { url = "https://files.pythonhosted.org/packages/da/a8/4f83e2aa666a9fbf56d6118faaaf5f1974d456b1823fda0a176eff722839/numpy-2.2.6-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f9f1adb22318e121c5c69a09142811a201ef17ab257a1e66ca3025065b7f53ae", size = 21176963, upload-time = "2025-05-17T21:31:19.36Z" },+ { url = "https://files.pythonhosted.org/packages/b3/2b/64e1affc7972decb74c9e29e5649fac940514910960ba25cd9af4488b66c/numpy-2.2.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c820a93b0255bc360f53eca31a0e676fd1101f673dda8da93454a12e23fc5f7a", size = 14406743, upload-time = "2025-05-17T21:31:41.087Z" },+ { url = "https://files.pythonhosted.org/packages/4a/9f/0121e375000b5e50ffdd8b25bf78d8e1a5aa4cca3f185d41265198c7b834/numpy-2.2.6-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:3d70692235e759f260c3d837193090014aebdf026dfd167834bcba43e30c2a42", size = 5352616, upload-time = "2025-05-17T21:31:50.072Z" },+ { url = "https://files.pythonhosted.org/packages/31/0d/b48c405c91693635fbe2dcd7bc84a33a602add5f63286e024d3b6741411c/numpy-2.2.6-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:481b49095335f8eed42e39e8041327c05b0f6f4780488f61286ed3c01368d491", size = 6889579, upload-time = "2025-05-17T21:32:01.712Z" },+ { url = "https://files.pythonhosted.org/packages/52/b8/7f0554d49b565d0171eab6e99001846882000883998e7b7d9f0d98b1f934/numpy-2.2.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b64d8d4d17135e00c8e346e0a738deb17e754230d7e0810ac5012750bbd85a5a", size = 14312005, upload-time = "2025-05-17T21:32:23.332Z" },+ { url = "https://files.pythonhosted.org/packages/b3/dd/2238b898e51bd6d389b7389ffb20d7f4c10066d80351187ec8e303a5a475/numpy-2.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba10f8411898fc418a521833e014a77d3ca01c15b0c6cdcce6a0d2897e6dbbdf", size = 16821570, upload-time = "2025-05-17T21:32:47.991Z" },+ { url = "https://files.pythonhosted.org/packages/83/6c/44d0325722cf644f191042bf47eedad61c1e6df2432ed65cbe28509d404e/numpy-2.2.6-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:bd48227a919f1bafbdda0583705e547892342c26fb127219d60a5c36882609d1", size = 15818548, upload-time = "2025-05-17T21:33:11.728Z" },+ { url = "https://files.pythonhosted.org/packages/ae/9d/81e8216030ce66be25279098789b665d49ff19eef08bfa8cb96d4957f422/numpy-2.2.6-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:9551a499bf125c1d4f9e250377c1ee2eddd02e01eac6644c080162c0c51778ab", size = 18620521, upload-time = "2025-05-17T21:33:39.139Z" },+ { url = "https://files.pythonhosted.org/packages/6a/fd/e19617b9530b031db51b0926eed5345ce8ddc669bb3bc0044b23e275ebe8/numpy-2.2.6-cp311-cp311-win32.whl", hash = "sha256:0678000bb9ac1475cd454c6b8c799206af8107e310843532b04d49649c717a47", size = 6525866, upload-time = "2025-05-17T21:33:50.273Z" },+ { url = "https://files.pythonhosted.org/packages/31/0a/f354fb7176b81747d870f7991dc763e157a934c717b67b58456bc63da3df/numpy-2.2.6-cp311-cp311-win_amd64.whl", hash = "sha256:e8213002e427c69c45a52bbd94163084025f533a55a59d6f9c5b820774ef3303", size = 12907455, upload-time = "2025-05-17T21:34:09.135Z" },+ { url = "https://files.pythonhosted.org/packages/82/5d/c00588b6cf18e1da539b45d3598d3557084990dcc4331960c15ee776ee41/numpy-2.2.6-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:41c5a21f4a04fa86436124d388f6ed60a9343a6f767fced1a8a71c3fbca038ff", size = 20875348, upload-time = "2025-05-17T21:34:39.648Z" },+ { url = "https://files.pythonhosted.org/packages/66/ee/560deadcdde6c2f90200450d5938f63a34b37e27ebff162810f716f6a230/numpy-2.2.6-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:de749064336d37e340f640b05f24e9e3dd678c57318c7289d222a8a2f543e90c", size = 14119362, upload-time = "2025-05-17T21:35:01.241Z" },+ { url = "https://files.pythonhosted.org/packages/3c/65/4baa99f1c53b30adf0acd9a5519078871ddde8d2339dc5a7fde80d9d87da/numpy-2.2.6-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:894b3a42502226a1cac872f840030665f33326fc3dac8e57c607905773cdcde3", size = 5084103, upload-time = "2025-05-17T21:35:10.622Z" },+ { url = "https://files.pythonhosted.org/packages/cc/89/e5a34c071a0570cc40c9a54eb472d113eea6d002e9ae12bb3a8407fb912e/numpy-2.2.6-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:71594f7c51a18e728451bb50cc60a3ce4e6538822731b2933209a1f3614e9282", size = 6625382, upload-time = "2025-05-17T21:35:21.414Z" },+ { url = "https://files.pythonhosted.org/packages/f8/35/8c80729f1ff76b3921d5c9487c7ac3de9b2a103b1cd05e905b3090513510/numpy-2.2.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f2618db89be1b4e05f7a1a847a9c1c0abd63e63a1607d892dd54668dd92faf87", size = 14018462, upload-time = "2025-05-17T21:35:42.174Z" },+ { url = "https://files.pythonhosted.org/packages/8c/3d/1e1db36cfd41f895d266b103df00ca5b3cbe965184df824dec5c08c6b803/numpy-2.2.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd83c01228a688733f1ded5201c678f0c53ecc1006ffbc404db9f7a899ac6249", size = 16527618, upload-time = "2025-05-17T21:36:06.711Z" },+ { url = "https://files.pythonhosted.org/packages/61/c6/03ed30992602c85aa3cd95b9070a514f8b3c33e31124694438d88809ae36/numpy-2.2.6-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:37c0ca431f82cd5fa716eca9506aefcabc247fb27ba69c5062a6d3ade8cf8f49", size = 15505511, upload-time = "2025-05-17T21:36:29.965Z" },+ { url = "https://files.pythonhosted.org/packages/b7/25/5761d832a81df431e260719ec45de696414266613c9ee268394dd5ad8236/numpy-2.2.6-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fe27749d33bb772c80dcd84ae7e8df2adc920ae8297400dabec45f0dedb3f6de", size = 18313783, upload-time = "2025-05-17T21:36:56.883Z" },+ { url = "https://files.pythonhosted.org/packages/57/0a/72d5a3527c5ebffcd47bde9162c39fae1f90138c961e5296491ce778e682/numpy-2.2.6-cp312-cp312-win32.whl", hash = "sha256:4eeaae00d789f66c7a25ac5f34b71a7035bb474e679f410e5e1a94deb24cf2d4", size = 6246506, upload-time = "2025-05-17T21:37:07.368Z" },+ { url = "https://files.pythonhosted.org/packages/36/fa/8c9210162ca1b88529ab76b41ba02d433fd54fecaf6feb70ef9f124683f1/numpy-2.2.6-cp312-cp312-win_amd64.whl", hash = "sha256:c1f9540be57940698ed329904db803cf7a402f3fc200bfe599334c9bd84a40b2", size = 12614190, upload-time = "2025-05-17T21:37:26.213Z" },+ { url = "https://files.pythonhosted.org/packages/f9/5c/6657823f4f594f72b5471f1db1ab12e26e890bb2e41897522d134d2a3e81/numpy-2.2.6-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0811bb762109d9708cca4d0b13c4f67146e3c3b7cf8d34018c722adb2d957c84", size = 20867828, upload-time = "2025-05-17T21:37:56.699Z" },+ { url = "https://files.pythonhosted.org/packages/dc/9e/14520dc3dadf3c803473bd07e9b2bd1b69bc583cb2497b47000fed2fa92f/numpy-2.2.6-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:287cc3162b6f01463ccd86be154f284d0893d2b3ed7292439ea97eafa8170e0b", size = 14143006, upload-time = "2025-05-17T21:38:18.291Z" },+ { url = "https://files.pythonhosted.org/packages/4f/06/7e96c57d90bebdce9918412087fc22ca9851cceaf5567a45c1f404480e9e/numpy-2.2.6-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:f1372f041402e37e5e633e586f62aa53de2eac8d98cbfb822806ce4bbefcb74d", size = 5076765, upload-time = "2025-05-17T21:38:27.319Z" },+ { url = "https://files.pythonhosted.org/packages/73/ed/63d920c23b4289fdac96ddbdd6132e9427790977d5457cd132f18e76eae0/numpy-2.2.6-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:55a4d33fa519660d69614a9fad433be87e5252f4b03850642f88993f7b2ca566", size = 6617736, upload-time = "2025-05-17T21:38:38.141Z" },+ { url = "https://files.pythonhosted.org/packages/85/c5/e19c8f99d83fd377ec8c7e0cf627a8049746da54afc24ef0a0cb73d5dfb5/numpy-2.2.6-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f92729c95468a2f4f15e9bb94c432a9229d0d50de67304399627a943201baa2f", size = 14010719, upload-time = "2025-05-17T21:38:58.433Z" },+ { url = "https://files.pythonhosted.org/packages/19/49/4df9123aafa7b539317bf6d342cb6d227e49f7a35b99c287a6109b13dd93/numpy-2.2.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1bc23a79bfabc5d056d106f9befb8d50c31ced2fbc70eedb8155aec74a45798f", size = 16526072, upload-time = "2025-05-17T21:39:22.638Z" },+ { url = "https://files.pythonhosted.org/packages/b2/6c/04b5f47f4f32f7c2b0e7260442a8cbcf8168b0e1a41ff1495da42f42a14f/numpy-2.2.6-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:e3143e4451880bed956e706a3220b4e5cf6172ef05fcc397f6f36a550b1dd868", size = 15503213, upload-time = "2025-05-17T21:39:45.865Z" },+ { url = "https://files.pythonhosted.org/packages/17/0a/5cd92e352c1307640d5b6fec1b2ffb06cd0dabe7d7b8227f97933d378422/numpy-2.2.6-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:b4f13750ce79751586ae2eb824ba7e1e8dba64784086c98cdbbcc6a42112ce0d", size = 18316632, upload-time = "2025-05-17T21:40:13.331Z" },+ { url = "https://files.pythonhosted.org/packages/f0/3b/5cba2b1d88760ef86596ad0f3d484b1cbff7c115ae2429678465057c5155/numpy-2.2.6-cp313-cp313-win32.whl", hash = "sha256:5beb72339d9d4fa36522fc63802f469b13cdbe4fdab4a288f0c441b74272ebfd", size = 6244532, upload-time = "2025-05-17T21:43:46.099Z" },+ { url = "https://files.pythonhosted.org/packages/cb/3b/d58c12eafcb298d4e6d0d40216866ab15f59e55d148a5658bb3132311fcf/numpy-2.2.6-cp313-cp313-win_amd64.whl", hash = "sha256:b0544343a702fa80c95ad5d3d608ea3599dd54d4632df855e4c8d24eb6ecfa1c", size = 12610885, upload-time = "2025-05-17T21:44:05.145Z" },+ { url = "https://files.pythonhosted.org/packages/6b/9e/4bf918b818e516322db999ac25d00c75788ddfd2d2ade4fa66f1f38097e1/numpy-2.2.6-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:0bca768cd85ae743b2affdc762d617eddf3bcf8724435498a1e80132d04879e6", size = 20963467, upload-time = "2025-05-17T21:40:44Z" },+ { url = "https://files.pythonhosted.org/packages/61/66/d2de6b291507517ff2e438e13ff7b1e2cdbdb7cb40b3ed475377aece69f9/numpy-2.2.6-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:fc0c5673685c508a142ca65209b4e79ed6740a4ed6b2267dbba90f34b0b3cfda", size = 14225144, upload-time = "2025-05-17T21:41:05.695Z" },+ { url = "https://files.pythonhosted.org/packages/e4/25/480387655407ead912e28ba3a820bc69af9adf13bcbe40b299d454ec011f/numpy-2.2.6-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:5bd4fc3ac8926b3819797a7c0e2631eb889b4118a9898c84f585a54d475b7e40", size = 5200217, upload-time = "2025-05-17T21:41:15.903Z" },+ { url = "https://files.pythonhosted.org/packages/aa/4a/6e313b5108f53dcbf3aca0c0f3e9c92f4c10ce57a0a721851f9785872895/numpy-2.2.6-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:fee4236c876c4e8369388054d02d0e9bb84821feb1a64dd59e137e6511a551f8", size = 6712014, upload-time = "2025-05-17T21:41:27.321Z" },+ { url = "https://files.pythonhosted.org/packages/b7/30/172c2d5c4be71fdf476e9de553443cf8e25feddbe185e0bd88b096915bcc/numpy-2.2.6-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e1dda9c7e08dc141e0247a5b8f49cf05984955246a327d4c48bda16821947b2f", size = 14077935, upload-time = "2025-05-17T21:41:49.738Z" },+ { url = "https://files.pythonhosted.org/packages/12/fb/9e743f8d4e4d3c710902cf87af3512082ae3d43b945d5d16563f26ec251d/numpy-2.2.6-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f447e6acb680fd307f40d3da4852208af94afdfab89cf850986c3ca00562f4fa", size = 16600122, upload-time = "2025-05-17T21:42:14.046Z" },+ { url = "https://files.pythonhosted.org/packages/12/75/ee20da0e58d3a66f204f38916757e01e33a9737d0b22373b3eb5a27358f9/numpy-2.2.6-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:389d771b1623ec92636b0786bc4ae56abafad4a4c513d36a55dce14bd9ce8571", size = 15586143, upload-time = "2025-05-17T21:42:37.464Z" },+ { url = "https://files.pythonhosted.org/packages/76/95/bef5b37f29fc5e739947e9ce5179ad402875633308504a52d188302319c8/numpy-2.2.6-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8e9ace4a37db23421249ed236fdcdd457d671e25146786dfc96835cd951aa7c1", size = 18385260, upload-time = "2025-05-17T21:43:05.189Z" },+ { url = "https://files.pythonhosted.org/packages/09/04/f2f83279d287407cf36a7a8053a5abe7be3622a4363337338f2585e4afda/numpy-2.2.6-cp313-cp313t-win32.whl", hash = "sha256:038613e9fb8c72b0a41f025a7e4c3f0b7a1b5d768ece4796b674c8f3fe13efff", size = 6377225, upload-time = "2025-05-17T21:43:16.254Z" },+ { url = "https://files.pythonhosted.org/packages/67/0e/35082d13c09c02c011cf21570543d202ad929d961c02a147493cb0c2bdf5/numpy-2.2.6-cp313-cp313t-win_amd64.whl", hash = "sha256:6031dd6dfecc0cf9f668681a37648373bddd6421fff6c66ec1624eed0180ee06", size = 12771374, upload-time = "2025-05-17T21:43:35.479Z" },+ { url = "https://files.pythonhosted.org/packages/9e/3b/d94a75f4dbf1ef5d321523ecac21ef23a3cd2ac8b78ae2aac40873590229/numpy-2.2.6-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:0b605b275d7bd0c640cad4e5d30fa701a8d59302e127e5f79138ad62762c3e3d", size = 21040391, upload-time = "2025-05-17T21:44:35.948Z" },+ { url = "https://files.pythonhosted.org/packages/17/f4/09b2fa1b58f0fb4f7c7963a1649c64c4d315752240377ed74d9cd878f7b5/numpy-2.2.6-pp310-pypy310_pp73-macosx_14_0_x86_64.whl", hash = "sha256:7befc596a7dc9da8a337f79802ee8adb30a552a94f792b9c9d18c840055907db", size = 6786754, upload-time = "2025-05-17T21:44:47.446Z" },+ { url = "https://files.pythonhosted.org/packages/af/30/feba75f143bdc868a1cc3f44ccfa6c4b9ec522b36458e738cd00f67b573f/numpy-2.2.6-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ce47521a4754c8f4593837384bd3424880629f718d87c5d44f8ed763edd63543", size = 16643476, upload-time = "2025-05-17T21:45:11.871Z" },+ { url = "https://files.pythonhosted.org/packages/37/48/ac2a9584402fb6c0cd5b5d1a91dcf176b15760130dd386bbafdbfe3640bf/numpy-2.2.6-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:d042d24c90c41b54fd506da306759e06e568864df8ec17ccc17e9e884634fd00", size = 12812666, upload-time = "2025-05-17T21:45:31.426Z" },+]++[[package]]+name = "numpy"+version = "2.3.5"+source = { registry = "https://pypi.org/simple" }+resolution-markers = [+ "python_full_version >= '3.14' and sys_platform == 'darwin'",+ "python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'darwin'",+ "python_full_version >= '3.14' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version >= '3.12' and python_full_version < '3.14' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version >= '3.14' and sys_platform == 'win32'",+ "python_full_version >= '3.14' and sys_platform == 'emscripten'",+ "(python_full_version >= '3.14' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.14' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux' and sys_platform != 'win32')",+ "python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'win32'",+ "python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'emscripten'",+ "(python_full_version >= '3.12' and python_full_version < '3.14' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux' and sys_platform != 'win32')",+ "python_full_version >= '3.11.5' and python_full_version < '3.12' and sys_platform == 'darwin'",+ "python_full_version >= '3.11' and python_full_version < '3.11.5' and sys_platform == 'darwin'",+ "python_full_version >= '3.11.5' and python_full_version < '3.12' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version >= '3.11' and python_full_version < '3.11.5' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version >= '3.11.5' and python_full_version < '3.12' and sys_platform == 'win32'",+ "python_full_version >= '3.11.5' and python_full_version < '3.12' and sys_platform == 'emscripten'",+ "(python_full_version >= '3.11.5' and python_full_version < '3.12' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.11.5' and python_full_version < '3.12' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux' and sys_platform != 'win32')",+ "python_full_version >= '3.11' and python_full_version < '3.11.5' and sys_platform == 'win32'",+ "python_full_version >= '3.11' and python_full_version < '3.11.5' and sys_platform == 'emscripten'",+ "(python_full_version >= '3.11' and python_full_version < '3.11.5' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.11' and python_full_version < '3.11.5' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux' and sys_platform != 'win32')",+]+sdist = { url = "https://files.pythonhosted.org/packages/76/65/21b3bc86aac7b8f2862db1e808f1ea22b028e30a225a34a5ede9bf8678f2/numpy-2.3.5.tar.gz", hash = "sha256:784db1dcdab56bf0517743e746dfb0f885fc68d948aba86eeec2cba234bdf1c0", size = 20584950, upload-time = "2025-11-16T22:52:42.067Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/43/77/84dd1d2e34d7e2792a236ba180b5e8fcc1e3e414e761ce0253f63d7f572e/numpy-2.3.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:de5672f4a7b200c15a4127042170a694d4df43c992948f5e1af57f0174beed10", size = 17034641, upload-time = "2025-11-16T22:49:19.336Z" },+ { url = "https://files.pythonhosted.org/packages/2a/ea/25e26fa5837106cde46ae7d0b667e20f69cbbc0efd64cba8221411ab26ae/numpy-2.3.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:acfd89508504a19ed06ef963ad544ec6664518c863436306153e13e94605c218", size = 12528324, upload-time = "2025-11-16T22:49:22.582Z" },+ { url = "https://files.pythonhosted.org/packages/4d/1a/e85f0eea4cf03d6a0228f5c0256b53f2df4bc794706e7df019fc622e47f1/numpy-2.3.5-cp311-cp311-macosx_14_0_arm64.whl", hash = "sha256:ffe22d2b05504f786c867c8395de703937f934272eb67586817b46188b4ded6d", size = 5356872, upload-time = "2025-11-16T22:49:25.408Z" },+ { url = "https://files.pythonhosted.org/packages/5c/bb/35ef04afd567f4c989c2060cde39211e4ac5357155c1833bcd1166055c61/numpy-2.3.5-cp311-cp311-macosx_14_0_x86_64.whl", hash = "sha256:872a5cf366aec6bb1147336480fef14c9164b154aeb6542327de4970282cd2f5", size = 6893148, upload-time = "2025-11-16T22:49:27.549Z" },+ { url = "https://files.pythonhosted.org/packages/f2/2b/05bbeb06e2dff5eab512dfc678b1cc5ee94d8ac5956a0885c64b6b26252b/numpy-2.3.5-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3095bdb8dd297e5920b010e96134ed91d852d81d490e787beca7e35ae1d89cf7", size = 14557282, upload-time = "2025-11-16T22:49:30.964Z" },+ { url = "https://files.pythonhosted.org/packages/65/fb/2b23769462b34398d9326081fad5655198fcf18966fcb1f1e49db44fbf31/numpy-2.3.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8cba086a43d54ca804ce711b2a940b16e452807acebe7852ff327f1ecd49b0d4", size = 16897903, upload-time = "2025-11-16T22:49:34.191Z" },+ { url = "https://files.pythonhosted.org/packages/ac/14/085f4cf05fc3f1e8aa95e85404e984ffca9b2275a5dc2b1aae18a67538b8/numpy-2.3.5-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:6cf9b429b21df6b99f4dee7a1218b8b7ffbbe7df8764dc0bd60ce8a0708fed1e", size = 16341672, upload-time = "2025-11-16T22:49:37.2Z" },+ { url = "https://files.pythonhosted.org/packages/6f/3b/1f73994904142b2aa290449b3bb99772477b5fd94d787093e4f24f5af763/numpy-2.3.5-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:396084a36abdb603546b119d96528c2f6263921c50df3c8fd7cb28873a237748", size = 18838896, upload-time = "2025-11-16T22:49:39.727Z" },+ { url = "https://files.pythonhosted.org/packages/cd/b9/cf6649b2124f288309ffc353070792caf42ad69047dcc60da85ee85fea58/numpy-2.3.5-cp311-cp311-win32.whl", hash = "sha256:b0c7088a73aef3d687c4deef8452a3ac7c1be4e29ed8bf3b366c8111128ac60c", size = 6563608, upload-time = "2025-11-16T22:49:42.079Z" },+ { url = "https://files.pythonhosted.org/packages/aa/44/9fe81ae1dcc29c531843852e2874080dc441338574ccc4306b39e2ff6e59/numpy-2.3.5-cp311-cp311-win_amd64.whl", hash = "sha256:a414504bef8945eae5f2d7cb7be2d4af77c5d1cb5e20b296c2c25b61dff2900c", size = 13078442, upload-time = "2025-11-16T22:49:43.99Z" },+ { url = "https://files.pythonhosted.org/packages/6d/a7/f99a41553d2da82a20a2f22e93c94f928e4490bb447c9ff3c4ff230581d3/numpy-2.3.5-cp311-cp311-win_arm64.whl", hash = "sha256:0cd00b7b36e35398fa2d16af7b907b65304ef8bb4817a550e06e5012929830fa", size = 10458555, upload-time = "2025-11-16T22:49:47.092Z" },+ { url = "https://files.pythonhosted.org/packages/44/37/e669fe6cbb2b96c62f6bbedc6a81c0f3b7362f6a59230b23caa673a85721/numpy-2.3.5-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:74ae7b798248fe62021dbf3c914245ad45d1a6b0cb4a29ecb4b31d0bfbc4cc3e", size = 16733873, upload-time = "2025-11-16T22:49:49.84Z" },+ { url = "https://files.pythonhosted.org/packages/c5/65/df0db6c097892c9380851ab9e44b52d4f7ba576b833996e0080181c0c439/numpy-2.3.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ee3888d9ff7c14604052b2ca5535a30216aa0a58e948cdd3eeb8d3415f638769", size = 12259838, upload-time = "2025-11-16T22:49:52.863Z" },+ { url = "https://files.pythonhosted.org/packages/5b/e1/1ee06e70eb2136797abe847d386e7c0e830b67ad1d43f364dd04fa50d338/numpy-2.3.5-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:612a95a17655e213502f60cfb9bf9408efdc9eb1d5f50535cc6eb365d11b42b5", size = 5088378, upload-time = "2025-11-16T22:49:55.055Z" },+ { url = "https://files.pythonhosted.org/packages/6d/9c/1ca85fb86708724275103b81ec4cf1ac1d08f465368acfc8da7ab545bdae/numpy-2.3.5-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:3101e5177d114a593d79dd79658650fe28b5a0d8abeb8ce6f437c0e6df5be1a4", size = 6628559, upload-time = "2025-11-16T22:49:57.371Z" },+ { url = "https://files.pythonhosted.org/packages/74/78/fcd41e5a0ce4f3f7b003da85825acddae6d7ecb60cf25194741b036ca7d6/numpy-2.3.5-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8b973c57ff8e184109db042c842423ff4f60446239bd585a5131cc47f06f789d", size = 14250702, upload-time = "2025-11-16T22:49:59.632Z" },+ { url = "https://files.pythonhosted.org/packages/b6/23/2a1b231b8ff672b4c450dac27164a8b2ca7d9b7144f9c02d2396518352eb/numpy-2.3.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0d8163f43acde9a73c2a33605353a4f1bc4798745a8b1d73183b28e5b435ae28", size = 16606086, upload-time = "2025-11-16T22:50:02.127Z" },+ { url = "https://files.pythonhosted.org/packages/a0/c5/5ad26fbfbe2012e190cc7d5003e4d874b88bb18861d0829edc140a713021/numpy-2.3.5-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:51c1e14eb1e154ebd80e860722f9e6ed6ec89714ad2db2d3aa33c31d7c12179b", size = 16025985, upload-time = "2025-11-16T22:50:04.536Z" },+ { url = "https://files.pythonhosted.org/packages/d2/fa/dd48e225c46c819288148d9d060b047fd2a6fb1eb37eae25112ee4cb4453/numpy-2.3.5-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:b46b4ec24f7293f23adcd2d146960559aaf8020213de8ad1909dba6c013bf89c", size = 18542976, upload-time = "2025-11-16T22:50:07.557Z" },+ { url = "https://files.pythonhosted.org/packages/05/79/ccbd23a75862d95af03d28b5c6901a1b7da4803181513d52f3b86ed9446e/numpy-2.3.5-cp312-cp312-win32.whl", hash = "sha256:3997b5b3c9a771e157f9aae01dd579ee35ad7109be18db0e85dbdbe1de06e952", size = 6285274, upload-time = "2025-11-16T22:50:10.746Z" },+ { url = "https://files.pythonhosted.org/packages/2d/57/8aeaf160312f7f489dea47ab61e430b5cb051f59a98ae68b7133ce8fa06a/numpy-2.3.5-cp312-cp312-win_amd64.whl", hash = "sha256:86945f2ee6d10cdfd67bcb4069c1662dd711f7e2a4343db5cecec06b87cf31aa", size = 12782922, upload-time = "2025-11-16T22:50:12.811Z" },+ { url = "https://files.pythonhosted.org/packages/78/a6/aae5cc2ca78c45e64b9ef22f089141d661516856cf7c8a54ba434576900d/numpy-2.3.5-cp312-cp312-win_arm64.whl", hash = "sha256:f28620fe26bee16243be2b7b874da327312240a7cdc38b769a697578d2100013", size = 10194667, upload-time = "2025-11-16T22:50:16.16Z" },+ { url = "https://files.pythonhosted.org/packages/db/69/9cde09f36da4b5a505341180a3f2e6fadc352fd4d2b7096ce9778db83f1a/numpy-2.3.5-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:d0f23b44f57077c1ede8c5f26b30f706498b4862d3ff0a7298b8411dd2f043ff", size = 16728251, upload-time = "2025-11-16T22:50:19.013Z" },+ { url = "https://files.pythonhosted.org/packages/79/fb/f505c95ceddd7027347b067689db71ca80bd5ecc926f913f1a23e65cf09b/numpy-2.3.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:aa5bc7c5d59d831d9773d1170acac7893ce3a5e130540605770ade83280e7188", size = 12254652, upload-time = "2025-11-16T22:50:21.487Z" },+ { url = "https://files.pythonhosted.org/packages/78/da/8c7738060ca9c31b30e9301ee0cf6c5ffdbf889d9593285a1cead337f9a5/numpy-2.3.5-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:ccc933afd4d20aad3c00bcef049cb40049f7f196e0397f1109dba6fed63267b0", size = 5083172, upload-time = "2025-11-16T22:50:24.562Z" },+ { url = "https://files.pythonhosted.org/packages/a4/b4/ee5bb2537fb9430fd2ef30a616c3672b991a4129bb1c7dcc42aa0abbe5d7/numpy-2.3.5-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:afaffc4393205524af9dfa400fa250143a6c3bc646c08c9f5e25a9f4b4d6a903", size = 6622990, upload-time = "2025-11-16T22:50:26.47Z" },+ { url = "https://files.pythonhosted.org/packages/95/03/dc0723a013c7d7c19de5ef29e932c3081df1c14ba582b8b86b5de9db7f0f/numpy-2.3.5-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9c75442b2209b8470d6d5d8b1c25714270686f14c749028d2199c54e29f20b4d", size = 14248902, upload-time = "2025-11-16T22:50:28.861Z" },+ { url = "https://files.pythonhosted.org/packages/f5/10/ca162f45a102738958dcec8023062dad0cbc17d1ab99d68c4e4a6c45fb2b/numpy-2.3.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:11e06aa0af8c0f05104d56450d6093ee639e15f24ecf62d417329d06e522e017", size = 16597430, upload-time = "2025-11-16T22:50:31.56Z" },+ { url = "https://files.pythonhosted.org/packages/2a/51/c1e29be863588db58175175f057286900b4b3327a1351e706d5e0f8dd679/numpy-2.3.5-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ed89927b86296067b4f81f108a2271d8926467a8868e554eaf370fc27fa3ccaf", size = 16024551, upload-time = "2025-11-16T22:50:34.242Z" },+ { url = "https://files.pythonhosted.org/packages/83/68/8236589d4dbb87253d28259d04d9b814ec0ecce7cb1c7fed29729f4c3a78/numpy-2.3.5-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:51c55fe3451421f3a6ef9a9c1439e82101c57a2c9eab9feb196a62b1a10b58ce", size = 18533275, upload-time = "2025-11-16T22:50:37.651Z" },+ { url = "https://files.pythonhosted.org/packages/40/56/2932d75b6f13465239e3b7b7e511be27f1b8161ca2510854f0b6e521c395/numpy-2.3.5-cp313-cp313-win32.whl", hash = "sha256:1978155dd49972084bd6ef388d66ab70f0c323ddee6f693d539376498720fb7e", size = 6277637, upload-time = "2025-11-16T22:50:40.11Z" },+ { url = "https://files.pythonhosted.org/packages/0c/88/e2eaa6cffb115b85ed7c7c87775cb8bcf0816816bc98ca8dbfa2ee33fe6e/numpy-2.3.5-cp313-cp313-win_amd64.whl", hash = "sha256:00dc4e846108a382c5869e77c6ed514394bdeb3403461d25a829711041217d5b", size = 12779090, upload-time = "2025-11-16T22:50:42.503Z" },+ { url = "https://files.pythonhosted.org/packages/8f/88/3f41e13a44ebd4034ee17baa384acac29ba6a4fcc2aca95f6f08ca0447d1/numpy-2.3.5-cp313-cp313-win_arm64.whl", hash = "sha256:0472f11f6ec23a74a906a00b48a4dcf3849209696dff7c189714511268d103ae", size = 10194710, upload-time = "2025-11-16T22:50:44.971Z" },+ { url = "https://files.pythonhosted.org/packages/13/cb/71744144e13389d577f867f745b7df2d8489463654a918eea2eeb166dfc9/numpy-2.3.5-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:414802f3b97f3c1eef41e530aaba3b3c1620649871d8cb38c6eaff034c2e16bd", size = 16827292, upload-time = "2025-11-16T22:50:47.715Z" },+ { url = "https://files.pythonhosted.org/packages/71/80/ba9dc6f2a4398e7f42b708a7fdc841bb638d353be255655498edbf9a15a8/numpy-2.3.5-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:5ee6609ac3604fa7780e30a03e5e241a7956f8e2fcfe547d51e3afa5247ac47f", size = 12378897, upload-time = "2025-11-16T22:50:51.327Z" },+ { url = "https://files.pythonhosted.org/packages/2e/6d/db2151b9f64264bcceccd51741aa39b50150de9b602d98ecfe7e0c4bff39/numpy-2.3.5-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:86d835afea1eaa143012a2d7a3f45a3adce2d7adc8b4961f0b362214d800846a", size = 5207391, upload-time = "2025-11-16T22:50:54.542Z" },+ { url = "https://files.pythonhosted.org/packages/80/ae/429bacace5ccad48a14c4ae5332f6aa8ab9f69524193511d60ccdfdc65fa/numpy-2.3.5-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:30bc11310e8153ca664b14c5f1b73e94bd0503681fcf136a163de856f3a50139", size = 6721275, upload-time = "2025-11-16T22:50:56.794Z" },+ { url = "https://files.pythonhosted.org/packages/74/5b/1919abf32d8722646a38cd527bc3771eb229a32724ee6ba340ead9b92249/numpy-2.3.5-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1062fde1dcf469571705945b0f221b73928f34a20c904ffb45db101907c3454e", size = 14306855, upload-time = "2025-11-16T22:50:59.208Z" },+ { url = "https://files.pythonhosted.org/packages/a5/87/6831980559434973bebc30cd9c1f21e541a0f2b0c280d43d3afd909b66d0/numpy-2.3.5-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ce581db493ea1a96c0556360ede6607496e8bf9b3a8efa66e06477267bc831e9", size = 16657359, upload-time = "2025-11-16T22:51:01.991Z" },+ { url = "https://files.pythonhosted.org/packages/dd/91/c797f544491ee99fd00495f12ebb7802c440c1915811d72ac5b4479a3356/numpy-2.3.5-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:cc8920d2ec5fa99875b670bb86ddeb21e295cb07aa331810d9e486e0b969d946", size = 16093374, upload-time = "2025-11-16T22:51:05.291Z" },+ { url = "https://files.pythonhosted.org/packages/74/a6/54da03253afcbe7a72785ec4da9c69fb7a17710141ff9ac5fcb2e32dbe64/numpy-2.3.5-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:9ee2197ef8c4f0dfe405d835f3b6a14f5fee7782b5de51ba06fb65fc9b36e9f1", size = 18594587, upload-time = "2025-11-16T22:51:08.585Z" },+ { url = "https://files.pythonhosted.org/packages/80/e9/aff53abbdd41b0ecca94285f325aff42357c6b5abc482a3fcb4994290b18/numpy-2.3.5-cp313-cp313t-win32.whl", hash = "sha256:70b37199913c1bd300ff6e2693316c6f869c7ee16378faf10e4f5e3275b299c3", size = 6405940, upload-time = "2025-11-16T22:51:11.541Z" },+ { url = "https://files.pythonhosted.org/packages/d5/81/50613fec9d4de5480de18d4f8ef59ad7e344d497edbef3cfd80f24f98461/numpy-2.3.5-cp313-cp313t-win_amd64.whl", hash = "sha256:b501b5fa195cc9e24fe102f21ec0a44dffc231d2af79950b451e0d99cea02234", size = 12920341, upload-time = "2025-11-16T22:51:14.312Z" },+ { url = "https://files.pythonhosted.org/packages/bb/ab/08fd63b9a74303947f34f0bd7c5903b9c5532c2d287bead5bdf4c556c486/numpy-2.3.5-cp313-cp313t-win_arm64.whl", hash = "sha256:a80afd79f45f3c4a7d341f13acbe058d1ca8ac017c165d3fa0d3de6bc1a079d7", size = 10262507, upload-time = "2025-11-16T22:51:16.846Z" },+ { url = "https://files.pythonhosted.org/packages/ba/97/1a914559c19e32d6b2e233cf9a6a114e67c856d35b1d6babca571a3e880f/numpy-2.3.5-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:bf06bc2af43fa8d32d30fae16ad965663e966b1a3202ed407b84c989c3221e82", size = 16735706, upload-time = "2025-11-16T22:51:19.558Z" },+ { url = "https://files.pythonhosted.org/packages/57/d4/51233b1c1b13ecd796311216ae417796b88b0616cfd8a33ae4536330748a/numpy-2.3.5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:052e8c42e0c49d2575621c158934920524f6c5da05a1d3b9bab5d8e259e045f0", size = 12264507, upload-time = "2025-11-16T22:51:22.492Z" },+ { url = "https://files.pythonhosted.org/packages/45/98/2fe46c5c2675b8306d0b4a3ec3494273e93e1226a490f766e84298576956/numpy-2.3.5-cp314-cp314-macosx_14_0_arm64.whl", hash = "sha256:1ed1ec893cff7040a02c8aa1c8611b94d395590d553f6b53629a4461dc7f7b63", size = 5093049, upload-time = "2025-11-16T22:51:25.171Z" },+ { url = "https://files.pythonhosted.org/packages/ce/0e/0698378989bb0ac5f1660c81c78ab1fe5476c1a521ca9ee9d0710ce54099/numpy-2.3.5-cp314-cp314-macosx_14_0_x86_64.whl", hash = "sha256:2dcd0808a421a482a080f89859a18beb0b3d1e905b81e617a188bd80422d62e9", size = 6626603, upload-time = "2025-11-16T22:51:27Z" },+ { url = "https://files.pythonhosted.org/packages/5e/a6/9ca0eecc489640615642a6cbc0ca9e10df70df38c4d43f5a928ff18d8827/numpy-2.3.5-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:727fd05b57df37dc0bcf1a27767a3d9a78cbbc92822445f32cc3436ba797337b", size = 14262696, upload-time = "2025-11-16T22:51:29.402Z" },+ { url = "https://files.pythonhosted.org/packages/c8/f6/07ec185b90ec9d7217a00eeeed7383b73d7e709dae2a9a021b051542a708/numpy-2.3.5-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fffe29a1ef00883599d1dc2c51aa2e5d80afe49523c261a74933df395c15c520", size = 16597350, upload-time = "2025-11-16T22:51:32.167Z" },+ { url = "https://files.pythonhosted.org/packages/75/37/164071d1dde6a1a84c9b8e5b414fa127981bad47adf3a6b7e23917e52190/numpy-2.3.5-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:8f7f0e05112916223d3f438f293abf0727e1181b5983f413dfa2fefc4098245c", size = 16040190, upload-time = "2025-11-16T22:51:35.403Z" },+ { url = "https://files.pythonhosted.org/packages/08/3c/f18b82a406b04859eb026d204e4e1773eb41c5be58410f41ffa511d114ae/numpy-2.3.5-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:2e2eb32ddb9ccb817d620ac1d8dae7c3f641c1e5f55f531a33e8ab97960a75b8", size = 18536749, upload-time = "2025-11-16T22:51:39.698Z" },+ { url = "https://files.pythonhosted.org/packages/40/79/f82f572bf44cf0023a2fe8588768e23e1592585020d638999f15158609e1/numpy-2.3.5-cp314-cp314-win32.whl", hash = "sha256:66f85ce62c70b843bab1fb14a05d5737741e74e28c7b8b5a064de10142fad248", size = 6335432, upload-time = "2025-11-16T22:51:42.476Z" },+ { url = "https://files.pythonhosted.org/packages/a3/2e/235b4d96619931192c91660805e5e49242389742a7a82c27665021db690c/numpy-2.3.5-cp314-cp314-win_amd64.whl", hash = "sha256:e6a0bc88393d65807d751a614207b7129a310ca4fe76a74e5c7da5fa5671417e", size = 12919388, upload-time = "2025-11-16T22:51:45.275Z" },+ { url = "https://files.pythonhosted.org/packages/07/2b/29fd75ce45d22a39c61aad74f3d718e7ab67ccf839ca8b60866054eb15f8/numpy-2.3.5-cp314-cp314-win_arm64.whl", hash = "sha256:aeffcab3d4b43712bb7a60b65f6044d444e75e563ff6180af8f98dd4b905dfd2", size = 10476651, upload-time = "2025-11-16T22:51:47.749Z" },+ { url = "https://files.pythonhosted.org/packages/17/e1/f6a721234ebd4d87084cfa68d081bcba2f5cfe1974f7de4e0e8b9b2a2ba1/numpy-2.3.5-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:17531366a2e3a9e30762c000f2c43a9aaa05728712e25c11ce1dbe700c53ad41", size = 16834503, upload-time = "2025-11-16T22:51:50.443Z" },+ { url = "https://files.pythonhosted.org/packages/5c/1c/baf7ffdc3af9c356e1c135e57ab7cf8d247931b9554f55c467efe2c69eff/numpy-2.3.5-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:d21644de1b609825ede2f48be98dfde4656aefc713654eeee280e37cadc4e0ad", size = 12381612, upload-time = "2025-11-16T22:51:53.609Z" },+ { url = "https://files.pythonhosted.org/packages/74/91/f7f0295151407ddc9ba34e699013c32c3c91944f9b35fcf9281163dc1468/numpy-2.3.5-cp314-cp314t-macosx_14_0_arm64.whl", hash = "sha256:c804e3a5aba5460c73955c955bdbd5c08c354954e9270a2c1565f62e866bdc39", size = 5210042, upload-time = "2025-11-16T22:51:56.213Z" },+ { url = "https://files.pythonhosted.org/packages/2e/3b/78aebf345104ec50dd50a4d06ddeb46a9ff5261c33bcc58b1c4f12f85ec2/numpy-2.3.5-cp314-cp314t-macosx_14_0_x86_64.whl", hash = "sha256:cc0a57f895b96ec78969c34f682c602bf8da1a0270b09bc65673df2e7638ec20", size = 6724502, upload-time = "2025-11-16T22:51:58.584Z" },+ { url = "https://files.pythonhosted.org/packages/02/c6/7c34b528740512e57ef1b7c8337ab0b4f0bddf34c723b8996c675bc2bc91/numpy-2.3.5-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:900218e456384ea676e24ea6a0417f030a3b07306d29d7ad843957b40a9d8d52", size = 14308962, upload-time = "2025-11-16T22:52:01.698Z" },+ { url = "https://files.pythonhosted.org/packages/80/35/09d433c5262bc32d725bafc619e095b6a6651caf94027a03da624146f655/numpy-2.3.5-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:09a1bea522b25109bf8e6f3027bd810f7c1085c64a0c7ce050c1676ad0ba010b", size = 16655054, upload-time = "2025-11-16T22:52:04.267Z" },+ { url = "https://files.pythonhosted.org/packages/7a/ab/6a7b259703c09a88804fa2430b43d6457b692378f6b74b356155283566ac/numpy-2.3.5-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:04822c00b5fd0323c8166d66c701dc31b7fbd252c100acd708c48f763968d6a3", size = 16091613, upload-time = "2025-11-16T22:52:08.651Z" },+ { url = "https://files.pythonhosted.org/packages/c2/88/330da2071e8771e60d1038166ff9d73f29da37b01ec3eb43cb1427464e10/numpy-2.3.5-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:d6889ec4ec662a1a37eb4b4fb26b6100841804dac55bd9df579e326cdc146227", size = 18591147, upload-time = "2025-11-16T22:52:11.453Z" },+ { url = "https://files.pythonhosted.org/packages/51/41/851c4b4082402d9ea860c3626db5d5df47164a712cb23b54be028b184c1c/numpy-2.3.5-cp314-cp314t-win32.whl", hash = "sha256:93eebbcf1aafdf7e2ddd44c2923e2672e1010bddc014138b229e49725b4d6be5", size = 6479806, upload-time = "2025-11-16T22:52:14.641Z" },+ { url = "https://files.pythonhosted.org/packages/90/30/d48bde1dfd93332fa557cff1972fbc039e055a52021fbef4c2c4b1eefd17/numpy-2.3.5-cp314-cp314t-win_amd64.whl", hash = "sha256:c8a9958e88b65c3b27e22ca2a076311636850b612d6bbfb76e8d156aacde2aaf", size = 13105760, upload-time = "2025-11-16T22:52:17.975Z" },+ { url = "https://files.pythonhosted.org/packages/2d/fd/4b5eb0b3e888d86aee4d198c23acec7d214baaf17ea93c1adec94c9518b9/numpy-2.3.5-cp314-cp314t-win_arm64.whl", hash = "sha256:6203fdf9f3dc5bdaed7319ad8698e685c7a3be10819f41d32a0723e611733b42", size = 10545459, upload-time = "2025-11-16T22:52:20.55Z" },+ { url = "https://files.pythonhosted.org/packages/c6/65/f9dea8e109371ade9c782b4e4756a82edf9d3366bca495d84d79859a0b79/numpy-2.3.5-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:f0963b55cdd70fad460fa4c1341f12f976bb26cb66021a5580329bd498988310", size = 16910689, upload-time = "2025-11-16T22:52:23.247Z" },+ { url = "https://files.pythonhosted.org/packages/00/4f/edb00032a8fb92ec0a679d3830368355da91a69cab6f3e9c21b64d0bb986/numpy-2.3.5-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:f4255143f5160d0de972d28c8f9665d882b5f61309d8362fdd3e103cf7bf010c", size = 12457053, upload-time = "2025-11-16T22:52:26.367Z" },+ { url = "https://files.pythonhosted.org/packages/16/a4/e8a53b5abd500a63836a29ebe145fc1ab1f2eefe1cfe59276020373ae0aa/numpy-2.3.5-pp311-pypy311_pp73-macosx_14_0_arm64.whl", hash = "sha256:a4b9159734b326535f4dd01d947f919c6eefd2d9827466a696c44ced82dfbc18", size = 5285635, upload-time = "2025-11-16T22:52:29.266Z" },+ { url = "https://files.pythonhosted.org/packages/a3/2f/37eeb9014d9c8b3e9c55bc599c68263ca44fdbc12a93e45a21d1d56df737/numpy-2.3.5-pp311-pypy311_pp73-macosx_14_0_x86_64.whl", hash = "sha256:2feae0d2c91d46e59fcd62784a3a83b3fb677fead592ce51b5a6fbb4f95965ff", size = 6801770, upload-time = "2025-11-16T22:52:31.421Z" },+ { url = "https://files.pythonhosted.org/packages/7d/e4/68d2f474df2cb671b2b6c2986a02e520671295647dad82484cde80ca427b/numpy-2.3.5-pp311-pypy311_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ffac52f28a7849ad7576293c0cb7b9f08304e8f7d738a8cb8a90ec4c55a998eb", size = 14391768, upload-time = "2025-11-16T22:52:33.593Z" },+ { url = "https://files.pythonhosted.org/packages/b8/50/94ccd8a2b141cb50651fddd4f6a48874acb3c91c8f0842b08a6afc4b0b21/numpy-2.3.5-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:63c0e9e7eea69588479ebf4a8a270d5ac22763cc5854e9a7eae952a3908103f7", size = 16729263, upload-time = "2025-11-16T22:52:36.369Z" },+ { url = "https://files.pythonhosted.org/packages/2d/ee/346fa473e666fe14c52fcdd19ec2424157290a032d4c41f98127bfb31ac7/numpy-2.3.5-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:f16417ec91f12f814b10bafe79ef77e70113a2f5f7018640e7425ff979253425", size = 12967213, upload-time = "2025-11-16T22:52:39.38Z" },+]++[[package]]+name = "opencv-contrib-python"+version = "4.10.0.84"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },+ { name = "numpy", version = "2.3.5", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },+]+sdist = { url = "https://files.pythonhosted.org/packages/1d/33/7b8ec6c4d45e678b26297e4a5e76464a93033a9adcc8c17eac01097065f6/opencv-contrib-python-4.10.0.84.tar.gz", hash = "sha256:4a3eae0ed9cadf1abe9293a6938a25a540e2fd6d7fc308595caa5896c8b36a0c", size = 150433857, upload-time = "2024-06-17T18:30:50.217Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/92/64/c1194510eaed272d86b53a08c790ca6ed1c450f06d401c49c8145fc46d40/opencv_contrib_python-4.10.0.84-cp37-abi3-macosx_11_0_arm64.whl", hash = "sha256:ee4b0919026d8c533aeb69b16c6ec4a891a2f6844efaa14121bf68838753209c", size = 63667391, upload-time = "2024-06-18T04:57:54.718Z" },+ { url = "https://files.pythonhosted.org/packages/09/94/d077c4c976c2d7a88812fd55396e92edae0e0c708689dbd8c8f508920e47/opencv_contrib_python-4.10.0.84-cp37-abi3-macosx_12_0_x86_64.whl", hash = "sha256:dea80d4db73b8acccf9e16b5744bf3654f47b22745074263f0a6c10de26c5ef5", size = 66278032, upload-time = "2024-06-17T19:34:23.718Z" },+ { url = "https://files.pythonhosted.org/packages/f8/76/f76fe74b864f3cfa737173ca12e8890aad8369e980006fb8a0b6cd14c6c7/opencv_contrib_python-4.10.0.84-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:040575b69e4f3aa761676bace4e3d1b8485fbfaf77ef77b266ab6bda5a3b5e9b", size = 47384495, upload-time = "2024-06-17T20:00:39.027Z" },+ { url = "https://files.pythonhosted.org/packages/b0/e0/8f5d065ebb2e5941d289c5f653f944318f9e418bc5167bc6a346ab5e0f6a/opencv_contrib_python-4.10.0.84-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a261223db41f6e512d76deaf21c8fcfb4fbbcbc2de62ca7f74a05f2c9ee489ef", size = 68681489, upload-time = "2024-06-17T18:30:32.918Z" },+ { url = "https://files.pythonhosted.org/packages/36/30/7041bd7350cb1a26fa80415a7664b6f04f7ccbf0c12b9318d564cdf35932/opencv_contrib_python-4.10.0.84-cp37-abi3-win32.whl", hash = "sha256:2a36257ec1375d1bec2a62177ea39828ff9804de6831ee39646bdc875c343cec", size = 34506122, upload-time = "2024-06-17T18:28:29.922Z" },+ { url = "https://files.pythonhosted.org/packages/a7/9e/7110d2c5d543ab03b9581dbb1f8e2429863e44e0c9b4960b766f230c1279/opencv_contrib_python-4.10.0.84-cp37-abi3-win_amd64.whl", hash = "sha256:47ec3160dae75f70e099b286d1a2e086d20dac8b06e759f60eaf867e6bdecba7", size = 45541421, upload-time = "2024-06-17T18:28:46.012Z" },+]++[[package]]+name = "packaging"+version = "26.3"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/7d/fa/3944b40b07da9ce895c0e6303a5ab7d53da063554f534556b134a54d6093/packaging-26.3.tar.gz", hash = "sha256:94edc256424af38762eb31306eed28beb9f0efc50a8837492c9d6fd6004aed79", size = 313412, upload-time = "2026-08-04T18:15:28.737Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/63/34/ba1c580383c9eada3711951fef0795c80b829a078d72188184bcab9dd527/packaging-26.3-py3-none-any.whl", hash = "sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c", size = 129956, upload-time = "2026-08-04T18:15:27.159Z" },+]++[[package]]+name = "paddleocr"+version = "3.7.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "aiohttp" },+ { name = "paddlex", extra = ["ocr-core"] },+ { name = "pyyaml" },+ { name = "requests" },+ { name = "typing-extensions" },+]+sdist = { url = "https://files.pythonhosted.org/packages/97/b1/9454e886afa925067ce51de2e513d146524645888de299d51ddc1caa3100/paddleocr-3.7.0.tar.gz", hash = "sha256:9b81eb62cf37e590d4873e60262ff56f968ff9de6ce1f565749760ceb1c422e2", size = 3082862, upload-time = "2026-06-11T12:09:52.545Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/d2/79/2ade66cf72074a3d2a013e2ba1f256d6116fec797b908fc1b4f9c320d8c4/paddleocr-3.7.0-py3-none-any.whl", hash = "sha256:c0f0a81ad4112727f30c6fcf986ac0ef6a120d31ee0991a01fae0357ee32d338", size = 146750, upload-time = "2026-06-11T12:09:51.204Z" },+]++[[package]]+name = "paddlex"+version = "3.7.2"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "aistudio-sdk" },+ { name = "chardet" },+ { name = "colorlog" },+ { name = "filelock", version = "4.1.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },+ { name = "filelock", version = "4.2.4", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },+ { name = "huggingface-hub" },+ { name = "modelscope" },+ { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },+ { name = "numpy", version = "2.3.5", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },+ { name = "packaging" },+ { name = "pandas", version = "2.3.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },+ { name = "pandas", version = "3.0.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },+ { name = "pillow", version = "12.3.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },+ { name = "pillow", version = "13.0.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },+ { name = "prettytable" },+ { name = "py-cpuinfo" },+ { name = "pydantic" },+ { name = "pyyaml" },+ { name = "requests" },+ { name = "ruamel-yaml" },+ { name = "typing-extensions" },+ { name = "ujson" },+]+sdist = { url = "https://files.pythonhosted.org/packages/dd/96/1e86d4056ffc1e494c53aebab7e2faf08dcf8b929180f9872ae46632e9bd/paddlex-3.7.2.tar.gz", hash = "sha256:6a60b4595e2d51460f7f51326672adca86b89ff9ecfd02ac348fb69739e0093c", size = 4415130, upload-time = "2026-06-25T05:50:53.34Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/40/52/9bbb9cd5f4fbbbefc7391c7d1ee61df8d511017a31e6933f6744b063fdab/paddlex-3.7.2-py3-none-any.whl", hash = "sha256:f1678bf650bbaccfd8f0d4e49d0ae631b4685c829fdae6e802ccd90d4fcb9a7f", size = 2239708, upload-time = "2026-06-25T05:50:51.196Z" },+]++[package.optional-dependencies]+ocr-core = [+ { name = "imagesize" },+ { name = "opencv-contrib-python" },+ { name = "pyclipper" },+ { name = "pypdfium2" },+ { name = "python-bidi" },+ { name = "shapely", version = "2.1.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },+ { name = "shapely", version = "2.2.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },+]++[[package]]+name = "pandas"+version = "2.3.3"+source = { registry = "https://pypi.org/simple" }+resolution-markers = [+ "python_full_version < '3.11' and sys_platform == 'darwin'",+ "python_full_version < '3.11' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "(python_full_version < '3.11' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform != 'darwin' and sys_platform != 'linux')",+]+dependencies = [+ { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" } },+ { name = "python-dateutil" },+ { name = "pytz" },+ { name = "tzdata" },+]+sdist = { url = "https://files.pythonhosted.org/packages/33/01/d40b85317f86cf08d853a4f495195c73815fdf205eef3993821720274518/pandas-2.3.3.tar.gz", hash = "sha256:e05e1af93b977f7eafa636d043f9f94c7ee3ac81af99c13508215942e64c993b", size = 4495223, upload-time = "2025-09-29T23:34:51.853Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/3d/f7/f425a00df4fcc22b292c6895c6831c0c8ae1d9fac1e024d16f98a9ce8749/pandas-2.3.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:376c6446ae31770764215a6c937f72d917f214b43560603cd60da6408f183b6c", size = 11555763, upload-time = "2025-09-29T23:16:53.287Z" },+ { url = "https://files.pythonhosted.org/packages/13/4f/66d99628ff8ce7857aca52fed8f0066ce209f96be2fede6cef9f84e8d04f/pandas-2.3.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e19d192383eab2f4ceb30b412b22ea30690c9e618f78870357ae1d682912015a", size = 10801217, upload-time = "2025-09-29T23:17:04.522Z" },+ { url = "https://files.pythonhosted.org/packages/1d/03/3fc4a529a7710f890a239cc496fc6d50ad4a0995657dccc1d64695adb9f4/pandas-2.3.3-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5caf26f64126b6c7aec964f74266f435afef1c1b13da3b0636c7518a1fa3e2b1", size = 12148791, upload-time = "2025-09-29T23:17:18.444Z" },+ { url = "https://files.pythonhosted.org/packages/40/a8/4dac1f8f8235e5d25b9955d02ff6f29396191d4e665d71122c3722ca83c5/pandas-2.3.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dd7478f1463441ae4ca7308a70e90b33470fa593429f9d4c578dd00d1fa78838", size = 12769373, upload-time = "2025-09-29T23:17:35.846Z" },+ { url = "https://files.pythonhosted.org/packages/df/91/82cc5169b6b25440a7fc0ef3a694582418d875c8e3ebf796a6d6470aa578/pandas-2.3.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:4793891684806ae50d1288c9bae9330293ab4e083ccd1c5e383c34549c6e4250", size = 13200444, upload-time = "2025-09-29T23:17:49.341Z" },+ { url = "https://files.pythonhosted.org/packages/10/ae/89b3283800ab58f7af2952704078555fa60c807fff764395bb57ea0b0dbd/pandas-2.3.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:28083c648d9a99a5dd035ec125d42439c6c1c525098c58af0fc38dd1a7a1b3d4", size = 13858459, upload-time = "2025-09-29T23:18:03.722Z" },+ { url = "https://files.pythonhosted.org/packages/85/72/530900610650f54a35a19476eca5104f38555afccda1aa11a92ee14cb21d/pandas-2.3.3-cp310-cp310-win_amd64.whl", hash = "sha256:503cf027cf9940d2ceaa1a93cfb5f8c8c7e6e90720a2850378f0b3f3b1e06826", size = 11346086, upload-time = "2025-09-29T23:18:18.505Z" },+ { url = "https://files.pythonhosted.org/packages/c1/fa/7ac648108144a095b4fb6aa3de1954689f7af60a14cf25583f4960ecb878/pandas-2.3.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:602b8615ebcc4a0c1751e71840428ddebeb142ec02c786e8ad6b1ce3c8dec523", size = 11578790, upload-time = "2025-09-29T23:18:30.065Z" },+ { url = "https://files.pythonhosted.org/packages/9b/35/74442388c6cf008882d4d4bdfc4109be87e9b8b7ccd097ad1e7f006e2e95/pandas-2.3.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:8fe25fc7b623b0ef6b5009149627e34d2a4657e880948ec3c840e9402e5c1b45", size = 10833831, upload-time = "2025-09-29T23:38:56.071Z" },+ { url = "https://files.pythonhosted.org/packages/fe/e4/de154cbfeee13383ad58d23017da99390b91d73f8c11856f2095e813201b/pandas-2.3.3-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b468d3dad6ff947df92dcb32ede5b7bd41a9b3cceef0a30ed925f6d01fb8fa66", size = 12199267, upload-time = "2025-09-29T23:18:41.627Z" },+ { url = "https://files.pythonhosted.org/packages/bf/c9/63f8d545568d9ab91476b1818b4741f521646cbdd151c6efebf40d6de6f7/pandas-2.3.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b98560e98cb334799c0b07ca7967ac361a47326e9b4e5a7dfb5ab2b1c9d35a1b", size = 12789281, upload-time = "2025-09-29T23:18:56.834Z" },+ { url = "https://files.pythonhosted.org/packages/f2/00/a5ac8c7a0e67fd1a6059e40aa08fa1c52cc00709077d2300e210c3ce0322/pandas-2.3.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d37b5848ba49824e5c30bedb9c830ab9b7751fd049bc7914533e01c65f79791", size = 13240453, upload-time = "2025-09-29T23:19:09.247Z" },+ { url = "https://files.pythonhosted.org/packages/27/4d/5c23a5bc7bd209231618dd9e606ce076272c9bc4f12023a70e03a86b4067/pandas-2.3.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:db4301b2d1f926ae677a751eb2bd0e8c5f5319c9cb3f88b0becbbb0b07b34151", size = 13890361, upload-time = "2025-09-29T23:19:25.342Z" },+ { url = "https://files.pythonhosted.org/packages/8e/59/712db1d7040520de7a4965df15b774348980e6df45c129b8c64d0dbe74ef/pandas-2.3.3-cp311-cp311-win_amd64.whl", hash = "sha256:f086f6fe114e19d92014a1966f43a3e62285109afe874f067f5abbdcbb10e59c", size = 11348702, upload-time = "2025-09-29T23:19:38.296Z" },+ { url = "https://files.pythonhosted.org/packages/9c/fb/231d89e8637c808b997d172b18e9d4a4bc7bf31296196c260526055d1ea0/pandas-2.3.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:6d21f6d74eb1725c2efaa71a2bfc661a0689579b58e9c0ca58a739ff0b002b53", size = 11597846, upload-time = "2025-09-29T23:19:48.856Z" },+ { url = "https://files.pythonhosted.org/packages/5c/bd/bf8064d9cfa214294356c2d6702b716d3cf3bb24be59287a6a21e24cae6b/pandas-2.3.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3fd2f887589c7aa868e02632612ba39acb0b8948faf5cc58f0850e165bd46f35", size = 10729618, upload-time = "2025-09-29T23:39:08.659Z" },+ { url = "https://files.pythonhosted.org/packages/57/56/cf2dbe1a3f5271370669475ead12ce77c61726ffd19a35546e31aa8edf4e/pandas-2.3.3-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ecaf1e12bdc03c86ad4a7ea848d66c685cb6851d807a26aa245ca3d2017a1908", size = 11737212, upload-time = "2025-09-29T23:19:59.765Z" },+ { url = "https://files.pythonhosted.org/packages/e5/63/cd7d615331b328e287d8233ba9fdf191a9c2d11b6af0c7a59cfcec23de68/pandas-2.3.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b3d11d2fda7eb164ef27ffc14b4fcab16a80e1ce67e9f57e19ec0afaf715ba89", size = 12362693, upload-time = "2025-09-29T23:20:14.098Z" },+ { url = "https://files.pythonhosted.org/packages/a6/de/8b1895b107277d52f2b42d3a6806e69cfef0d5cf1d0ba343470b9d8e0a04/pandas-2.3.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a68e15f780eddf2b07d242e17a04aa187a7ee12b40b930bfdd78070556550e98", size = 12771002, upload-time = "2025-09-29T23:20:26.76Z" },+ { url = "https://files.pythonhosted.org/packages/87/21/84072af3187a677c5893b170ba2c8fbe450a6ff911234916da889b698220/pandas-2.3.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:371a4ab48e950033bcf52b6527eccb564f52dc826c02afd9a1bc0ab731bba084", size = 13450971, upload-time = "2025-09-29T23:20:41.344Z" },+ { url = "https://files.pythonhosted.org/packages/86/41/585a168330ff063014880a80d744219dbf1dd7a1c706e75ab3425a987384/pandas-2.3.3-cp312-cp312-win_amd64.whl", hash = "sha256:a16dcec078a01eeef8ee61bf64074b4e524a2a3f4b3be9326420cabe59c4778b", size = 10992722, upload-time = "2025-09-29T23:20:54.139Z" },+ { url = "https://files.pythonhosted.org/packages/cd/4b/18b035ee18f97c1040d94debd8f2e737000ad70ccc8f5513f4eefad75f4b/pandas-2.3.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:56851a737e3470de7fa88e6131f41281ed440d29a9268dcbf0002da5ac366713", size = 11544671, upload-time = "2025-09-29T23:21:05.024Z" },+ { url = "https://files.pythonhosted.org/packages/31/94/72fac03573102779920099bcac1c3b05975c2cb5f01eac609faf34bed1ca/pandas-2.3.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:bdcd9d1167f4885211e401b3036c0c8d9e274eee67ea8d0758a256d60704cfe8", size = 10680807, upload-time = "2025-09-29T23:21:15.979Z" },+ { url = "https://files.pythonhosted.org/packages/16/87/9472cf4a487d848476865321de18cc8c920b8cab98453ab79dbbc98db63a/pandas-2.3.3-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e32e7cc9af0f1cc15548288a51a3b681cc2a219faa838e995f7dc53dbab1062d", size = 11709872, upload-time = "2025-09-29T23:21:27.165Z" },+ { url = "https://files.pythonhosted.org/packages/15/07/284f757f63f8a8d69ed4472bfd85122bd086e637bf4ed09de572d575a693/pandas-2.3.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:318d77e0e42a628c04dc56bcef4b40de67918f7041c2b061af1da41dcff670ac", size = 12306371, upload-time = "2025-09-29T23:21:40.532Z" },+ { url = "https://files.pythonhosted.org/packages/33/81/a3afc88fca4aa925804a27d2676d22dcd2031c2ebe08aabd0ae55b9ff282/pandas-2.3.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4e0a175408804d566144e170d0476b15d78458795bb18f1304fb94160cabf40c", size = 12765333, upload-time = "2025-09-29T23:21:55.77Z" },+ { url = "https://files.pythonhosted.org/packages/8d/0f/b4d4ae743a83742f1153464cf1a8ecfafc3ac59722a0b5c8602310cb7158/pandas-2.3.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:93c2d9ab0fc11822b5eece72ec9587e172f63cff87c00b062f6e37448ced4493", size = 13418120, upload-time = "2025-09-29T23:22:10.109Z" },+ { url = "https://files.pythonhosted.org/packages/4f/c7/e54682c96a895d0c808453269e0b5928a07a127a15704fedb643e9b0a4c8/pandas-2.3.3-cp313-cp313-win_amd64.whl", hash = "sha256:f8bfc0e12dc78f777f323f55c58649591b2cd0c43534e8355c51d3fede5f4dee", size = 10993991, upload-time = "2025-09-29T23:25:04.889Z" },+ { url = "https://files.pythonhosted.org/packages/f9/ca/3f8d4f49740799189e1395812f3bf23b5e8fc7c190827d55a610da72ce55/pandas-2.3.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:75ea25f9529fdec2d2e93a42c523962261e567d250b0013b16210e1d40d7c2e5", size = 12048227, upload-time = "2025-09-29T23:22:24.343Z" },+ { url = "https://files.pythonhosted.org/packages/0e/5a/f43efec3e8c0cc92c4663ccad372dbdff72b60bdb56b2749f04aa1d07d7e/pandas-2.3.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:74ecdf1d301e812db96a465a525952f4dde225fdb6d8e5a521d47e1f42041e21", size = 11411056, upload-time = "2025-09-29T23:22:37.762Z" },+ { url = "https://files.pythonhosted.org/packages/46/b1/85331edfc591208c9d1a63a06baa67b21d332e63b7a591a5ba42a10bb507/pandas-2.3.3-cp313-cp313t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6435cb949cb34ec11cc9860246ccb2fdc9ecd742c12d3304989017d53f039a78", size = 11645189, upload-time = "2025-09-29T23:22:51.688Z" },+ { url = "https://files.pythonhosted.org/packages/44/23/78d645adc35d94d1ac4f2a3c4112ab6f5b8999f4898b8cdf01252f8df4a9/pandas-2.3.3-cp313-cp313t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:900f47d8f20860de523a1ac881c4c36d65efcb2eb850e6948140fa781736e110", size = 12121912, upload-time = "2025-09-29T23:23:05.042Z" },+ { url = "https://files.pythonhosted.org/packages/53/da/d10013df5e6aaef6b425aa0c32e1fc1f3e431e4bcabd420517dceadce354/pandas-2.3.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:a45c765238e2ed7d7c608fc5bc4a6f88b642f2f01e70c0c23d2224dd21829d86", size = 12712160, upload-time = "2025-09-29T23:23:28.57Z" },+ { url = "https://files.pythonhosted.org/packages/bd/17/e756653095a083d8a37cbd816cb87148debcfcd920129b25f99dd8d04271/pandas-2.3.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:c4fc4c21971a1a9f4bdb4c73978c7f7256caa3e62b323f70d6cb80db583350bc", size = 13199233, upload-time = "2025-09-29T23:24:24.876Z" },+ { url = "https://files.pythonhosted.org/packages/04/fd/74903979833db8390b73b3a8a7d30d146d710bd32703724dd9083950386f/pandas-2.3.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:ee15f284898e7b246df8087fc82b87b01686f98ee67d85a17b7ab44143a3a9a0", size = 11540635, upload-time = "2025-09-29T23:25:52.486Z" },+ { url = "https://files.pythonhosted.org/packages/21/00/266d6b357ad5e6d3ad55093a7e8efc7dd245f5a842b584db9f30b0f0a287/pandas-2.3.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1611aedd912e1ff81ff41c745822980c49ce4a7907537be8692c8dbc31924593", size = 10759079, upload-time = "2025-09-29T23:26:33.204Z" },+ { url = "https://files.pythonhosted.org/packages/ca/05/d01ef80a7a3a12b2f8bbf16daba1e17c98a2f039cbc8e2f77a2c5a63d382/pandas-2.3.3-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6d2cefc361461662ac48810cb14365a365ce864afe85ef1f447ff5a1e99ea81c", size = 11814049, upload-time = "2025-09-29T23:27:15.384Z" },+ { url = "https://files.pythonhosted.org/packages/15/b2/0e62f78c0c5ba7e3d2c5945a82456f4fac76c480940f805e0b97fcbc2f65/pandas-2.3.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ee67acbbf05014ea6c763beb097e03cd629961c8a632075eeb34247120abcb4b", size = 12332638, upload-time = "2025-09-29T23:27:51.625Z" },+ { url = "https://files.pythonhosted.org/packages/c5/33/dd70400631b62b9b29c3c93d2feee1d0964dc2bae2e5ad7a6c73a7f25325/pandas-2.3.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:c46467899aaa4da076d5abc11084634e2d197e9460643dd455ac3db5856b24d6", size = 12886834, upload-time = "2025-09-29T23:28:21.289Z" },+ { url = "https://files.pythonhosted.org/packages/d3/18/b5d48f55821228d0d2692b34fd5034bb185e854bdb592e9c640f6290e012/pandas-2.3.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:6253c72c6a1d990a410bc7de641d34053364ef8bcd3126f7e7450125887dffe3", size = 13409925, upload-time = "2025-09-29T23:28:58.261Z" },+ { url = "https://files.pythonhosted.org/packages/a6/3d/124ac75fcd0ecc09b8fdccb0246ef65e35b012030defb0e0eba2cbbbe948/pandas-2.3.3-cp314-cp314-win_amd64.whl", hash = "sha256:1b07204a219b3b7350abaae088f451860223a52cfb8a6c53358e7948735158e5", size = 11109071, upload-time = "2025-09-29T23:32:27.484Z" },+ { url = "https://files.pythonhosted.org/packages/89/9c/0e21c895c38a157e0faa1fb64587a9226d6dd46452cac4532d80c3c4a244/pandas-2.3.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:2462b1a365b6109d275250baaae7b760fd25c726aaca0054649286bcfbb3e8ec", size = 12048504, upload-time = "2025-09-29T23:29:31.47Z" },+ { url = "https://files.pythonhosted.org/packages/d7/82/b69a1c95df796858777b68fbe6a81d37443a33319761d7c652ce77797475/pandas-2.3.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:0242fe9a49aa8b4d78a4fa03acb397a58833ef6199e9aa40a95f027bb3a1b6e7", size = 11410702, upload-time = "2025-09-29T23:29:54.591Z" },+ { url = "https://files.pythonhosted.org/packages/f9/88/702bde3ba0a94b8c73a0181e05144b10f13f29ebfc2150c3a79062a8195d/pandas-2.3.3-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a21d830e78df0a515db2b3d2f5570610f5e6bd2e27749770e8bb7b524b89b450", size = 11634535, upload-time = "2025-09-29T23:30:21.003Z" },+ { url = "https://files.pythonhosted.org/packages/a4/1e/1bac1a839d12e6a82ec6cb40cda2edde64a2013a66963293696bbf31fbbb/pandas-2.3.3-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2e3ebdb170b5ef78f19bfb71b0dc5dc58775032361fa188e814959b74d726dd5", size = 12121582, upload-time = "2025-09-29T23:30:43.391Z" },+ { url = "https://files.pythonhosted.org/packages/44/91/483de934193e12a3b1d6ae7c8645d083ff88dec75f46e827562f1e4b4da6/pandas-2.3.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:d051c0e065b94b7a3cea50eb1ec32e912cd96dba41647eb24104b6c6c14c5788", size = 12699963, upload-time = "2025-09-29T23:31:10.009Z" },+ { url = "https://files.pythonhosted.org/packages/70/44/5191d2e4026f86a2a109053e194d3ba7a31a2d10a9c2348368c63ed4e85a/pandas-2.3.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:3869faf4bd07b3b66a9f462417d0ca3a9df29a9f6abd5d0d0dbab15dac7abe87", size = 13202175, upload-time = "2025-09-29T23:31:59.173Z" },+]++[[package]]+name = "pandas"+version = "3.0.6"+source = { registry = "https://pypi.org/simple" }+resolution-markers = [+ "python_full_version >= '3.14' and sys_platform == 'darwin'",+ "python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'darwin'",+ "python_full_version >= '3.14' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version >= '3.12' and python_full_version < '3.14' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version >= '3.14' and sys_platform == 'win32'",+ "python_full_version >= '3.14' and sys_platform == 'emscripten'",+ "(python_full_version >= '3.14' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.14' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux' and sys_platform != 'win32')",+ "python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'win32'",+ "python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'emscripten'",+ "(python_full_version >= '3.12' and python_full_version < '3.14' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux' and sys_platform != 'win32')",+ "python_full_version >= '3.11.5' and python_full_version < '3.12' and sys_platform == 'darwin'",+ "python_full_version >= '3.11' and python_full_version < '3.11.5' and sys_platform == 'darwin'",+ "python_full_version >= '3.11.5' and python_full_version < '3.12' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version >= '3.11' and python_full_version < '3.11.5' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version >= '3.11.5' and python_full_version < '3.12' and sys_platform == 'win32'",+ "python_full_version >= '3.11.5' and python_full_version < '3.12' and sys_platform == 'emscripten'",+ "(python_full_version >= '3.11.5' and python_full_version < '3.12' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.11.5' and python_full_version < '3.12' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux' and sys_platform != 'win32')",+ "python_full_version >= '3.11' and python_full_version < '3.11.5' and sys_platform == 'win32'",+ "python_full_version >= '3.11' and python_full_version < '3.11.5' and sys_platform == 'emscripten'",+ "(python_full_version >= '3.11' and python_full_version < '3.11.5' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.11' and python_full_version < '3.11.5' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux' and sys_platform != 'win32')",+]+dependencies = [+ { name = "numpy", version = "2.3.5", source = { registry = "https://pypi.org/simple" } },+ { name = "python-dateutil" },+ { name = "tzdata", marker = "sys_platform == 'emscripten' or sys_platform == 'win32'" },+]+sdist = { url = "https://files.pythonhosted.org/packages/e2/17/d7b106e05bfa642e8694451e7d3d759c6a241c5386a5d962e4f66c047e06/pandas-3.0.6.tar.gz", hash = "sha256:66b07ef7315a31bfe1089cd3d71a7de781c9dca986762d0b4fe7c0ef17465d10", size = 4667686, upload-time = "2026-09-17T23:23:18.345Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/7d/48/88e8d250d28efa8163294f6809a71683c7ee67f63ac7c33021c0503b3547/pandas-3.0.6-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:085e3786ae6b2e82b406266bce36690f72b9dc1421903ba9296b2981a9fcf586", size = 10391798, upload-time = "2026-09-17T23:20:20.96Z" },+ { url = "https://files.pythonhosted.org/packages/55/a6/39db5d41f3eb5d7846626312cb30e0cea48e988fc47a3725698bc931ad3c/pandas-3.0.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d7564d86a94c2eb8ab290b07f63ddaae5c032fa53897c29a2ff2197d43aee8af", size = 10023718, upload-time = "2026-09-17T23:20:25.094Z" },+ { url = "https://files.pythonhosted.org/packages/54/b7/707e966129f77ee8a39d41a41bbd989b790b3fef581c6e26b821315cba6b/pandas-3.0.6-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1e7c0afdcaf6661d795fcefc2f647ddd1136f62cdc153fba177c685d97a87808", size = 10612800, upload-time = "2026-09-17T23:20:27.99Z" },+ { url = "https://files.pythonhosted.org/packages/63/be/dfb6cc9329d0bbe76dadda8a1113d026bb996ec76c509221368dc68349f4/pandas-3.0.6-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:47121f9571503f724c9b93e297ab6254ac99c77adf5e9ed085ea419fd585c258", size = 11108900, upload-time = "2026-09-17T23:20:30.65Z" },+ { url = "https://files.pythonhosted.org/packages/1a/6f/3d58f15bbe972f3d7bfa13ee06d731785a76fe8d232c92b2655a8de14127/pandas-3.0.6-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:994a79608263fe1c14cc48ffa7300e2b834b7d1cb406ffe96a08828cb0cdd79b", size = 11630226, upload-time = "2026-09-17T23:20:33.582Z" },+ { url = "https://files.pythonhosted.org/packages/58/54/9b494de4a3dd92fc6eb19187db1b21afb50fdc21962f32ea1aca9f270cb2/pandas-3.0.6-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:a3a22e07fe75347eaacc75b0e85297947af4fba6b4aae23916bd8b6828d0bba3", size = 12146942, upload-time = "2026-09-17T23:20:36.792Z" },+ { url = "https://files.pythonhosted.org/packages/d3/dc/d2df02854aec5d47659acfb2be352eecc691845b2f86e99c84f1010a8671/pandas-3.0.6-cp311-cp311-win_amd64.whl", hash = "sha256:2e5fa32ff162dfdbc280157d664f44d23049ae414725af9676df339c501d82cd", size = 9859246, upload-time = "2026-09-17T23:20:43.976Z" },+ { url = "https://files.pythonhosted.org/packages/79/1e/2a30df0d7dede5c195300a1820b0bc21cea3aa24e4c8b6c4431565ecc79a/pandas-3.0.6-cp311-cp311-win_arm64.whl", hash = "sha256:5e75072773c1b2f7cb63faa3a6f562aede11f3976f68ed34cb538bc091a28171", size = 9106923, upload-time = "2026-09-17T23:20:46.611Z" },+ { url = "https://files.pythonhosted.org/packages/77/4c/597d588c055d4373cff19cbbc32d4dd046c7be8fadee957585b5ba9e5b24/pandas-3.0.6-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7dac2d65e9087e8e7b5a45fe15c4920911a221df061ab629943ce016489145c7", size = 10397411, upload-time = "2026-09-17T23:20:49.465Z" },+ { url = "https://files.pythonhosted.org/packages/18/8f/48907c7c707b61a8e5018c32e1a3f70623209bfb59020a2f6196159d3aa7/pandas-3.0.6-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9dab635a549e58a053c7b0fa054dc0bd7be22f0ed9a720f4a85d5fb993276172", size = 10051279, upload-time = "2026-09-17T23:20:52.409Z" },+ { url = "https://files.pythonhosted.org/packages/67/fa/613d867c3d9554a61bafdec6f79565c8a3e73235feb52cc4a72ad2e0fa6a/pandas-3.0.6-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e3dccb584123b399c07562ac4d62543e90ede49ddf8ce3c13ffc64cbe828c281", size = 10303429, upload-time = "2026-09-17T23:20:55.597Z" },+ { url = "https://files.pythonhosted.org/packages/cb/67/0c0f18e38d7f2d2af8c24b3315bc4046e73bbdd4a5540405506671ad0c0d/pandas-3.0.6-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0704044b676496b8350e023b09f174a26772456c974a2b11c36bebb558c9490d", size = 10788193, upload-time = "2026-09-17T23:20:58.617Z" },+ { url = "https://files.pythonhosted.org/packages/39/53/1b57f3162501fe36687e4870e1b918a6458ca7386b173af75663ace95857/pandas-3.0.6-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e7c1905ef02c3d6d43d9dbd5b6ccb4da4870a0b0c821bbc103fbdb6f3ad2707b", size = 11323501, upload-time = "2026-09-17T23:21:01.911Z" },+ { url = "https://files.pythonhosted.org/packages/f2/d2/b1182e8d39100369d7f13f4a125a3fb6b096fef112c46d0566c25781ff68/pandas-3.0.6-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:569e114072b24fc4970c12e2b4bab252671668a40b324318903380cab0254c0c", size = 11838173, upload-time = "2026-09-17T23:21:04.85Z" },+ { url = "https://files.pythonhosted.org/packages/c7/33/5b717af24d2f27995e51e0875a269dddd373045216e34cf62e3aa764eaa1/pandas-3.0.6-cp312-cp312-pyemscripten_2024_0_wasm32.whl", hash = "sha256:2a8fc94be2ee5f1d86f97aacd8cc566f81680b6498e76f3007421bb5d98151bf", size = 7118499, upload-time = "2026-09-17T23:21:07.661Z" },+ { url = "https://files.pythonhosted.org/packages/bd/2a/14b3b17cd75cef4a1ee1af4234eb41cc1afe4103b98c2d80e8916abfd42b/pandas-3.0.6-cp312-cp312-win_amd64.whl", hash = "sha256:3ef908d28590b3f42d7070e7ad8f9b34b442b260b7f3c1afb57e0040c58cdb1b", size = 9661439, upload-time = "2026-09-17T23:21:10.959Z" },+ { url = "https://files.pythonhosted.org/packages/3b/11/3d580a604a1e35d69f6676847bd12db7d14344bc677b717f4413e79c5d0d/pandas-3.0.6-cp312-cp312-win_arm64.whl", hash = "sha256:f4e7c52eb108d752e7592268108fd3e98efd76d83a3125cdd06c621c2e44359b", size = 8959806, upload-time = "2026-09-17T23:21:13.851Z" },+ { url = "https://files.pythonhosted.org/packages/8e/1c/143605a1f6443ad50ebda78a31e5a3a10147fec2590e931584aaa5ff0a09/pandas-3.0.6-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:9ae8073aed8e21d1a7fe263dcdc6840743549722a6738198a0a46000fa9476f2", size = 10418900, upload-time = "2026-09-17T23:21:16.594Z" },+ { url = "https://files.pythonhosted.org/packages/ea/ca/87f8548f73d452aab35e4a90f8b39ae303295e0f2ef0b4055c44d6b3f1be/pandas-3.0.6-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:60d81f9e1799b36f3739e7fff44d1fbb2e8fd5a271b3863e03de9715fccda0fa", size = 10064785, upload-time = "2026-09-17T23:21:19.677Z" },+ { url = "https://files.pythonhosted.org/packages/43/1a/d951442e5607c6e3b2462eff8f420797d428aa74b87c6ecfe4f48553626e/pandas-3.0.6-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:097090508a1dd335013d39106fc10b20f4fd4a171638e47b77d55798ed9dab6c", size = 10245290, upload-time = "2026-09-17T23:21:22.797Z" },+ { url = "https://files.pythonhosted.org/packages/50/fa/96d50e1e6cd0b08b5e2b7c838f65ae644940f75a124063380b5ef73b6866/pandas-3.0.6-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1e92d9fa834c7d877130027cddc0cad8dcff97c1f6cca26bd6310f847228b658", size = 10757657, upload-time = "2026-09-17T23:21:25.673Z" },+ { url = "https://files.pythonhosted.org/packages/7b/12/f82d13a2cb703e1a8acee7e01fdc2b898d9cd0c00f07d1dfce63af43e350/pandas-3.0.6-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:b27c8d890e4aa2171437ae2a39de1d215e674158e4865c4023a8b31c932513b2", size = 11249114, upload-time = "2026-09-17T23:21:28.898Z" },+ { url = "https://files.pythonhosted.org/packages/1a/ce/8aef2e561a2f2c8b38c913c67373c65ba6748174e763d27c80271b24bd17/pandas-3.0.6-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:f8029ec0f1f89e4f985929ce1f6626dabf3140d61a4e9c1215afdab34eaf9a5d", size = 11820511, upload-time = "2026-09-17T23:21:32.11Z" },+ { url = "https://files.pythonhosted.org/packages/c0/bd/63cb67e6903ef6d9c2871916dbcbc09d254da0fe8b870cf62e16b21945f2/pandas-3.0.6-cp313-cp313-win_amd64.whl", hash = "sha256:f3ce8a6968045481e91a3990e797e348ce13db45ee164a7095bbc824e26c09dd", size = 9638092, upload-time = "2026-09-17T23:21:34.883Z" },+ { url = "https://files.pythonhosted.org/packages/75/2e/e7b35b712edb068d382ddc8b2bea8a04974100515ba2daa22b478b265842/pandas-3.0.6-cp313-cp313-win_arm64.whl", hash = "sha256:cc39303913e2ea129915670de5d1c9fbd647f543bb72e5543bac8baa94e9e42f", size = 8952032, upload-time = "2026-09-17T23:21:37.729Z" },+ { url = "https://files.pythonhosted.org/packages/75/55/1a8875395b05ccd572cbca0b9255dcd2db6e6508e632a558c1a6884b39ad/pandas-3.0.6-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:ee913a91669056c1de1a6b733fbfeab711de9e54e3bee2dfa5fe79d9457247d1", size = 10492213, upload-time = "2026-09-17T23:21:40.746Z" },+ { url = "https://files.pythonhosted.org/packages/35/61/47ae13476995cc8a40cd609e93e7cf11f273d8692925c2903cb6d38aa0d1/pandas-3.0.6-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:ff51a4459ed036e93d1eb1bb5e6e7b28685d3cb6b7c12b91c05b31024e234729", size = 10156618, upload-time = "2026-09-17T23:21:44.142Z" },+ { url = "https://files.pythonhosted.org/packages/bc/f2/cc5f2adb8d6e86a85d9fb5128f8cf205a61189336f70d1f7faf0d1b53ec9/pandas-3.0.6-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:654aae059295dbba6ecd2328ca12712a2cf1676214c8699f1c29213f7ccf9c34", size = 10375479, upload-time = "2026-09-17T23:21:47.159Z" },+ { url = "https://files.pythonhosted.org/packages/ca/ba/ffdcb19be4ff6bfe7d969e7cef2c567c633df5a3a1cc1053394ad053bca8/pandas-3.0.6-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:62f51d7f651c8054c5e82a69265c98082e795d1442df7ca6edc3a545d61214b1", size = 10783244, upload-time = "2026-09-17T23:21:50.367Z" },+ { url = "https://files.pythonhosted.org/packages/77/5b/e150075b2c6eb69fae896f2d9239bc6ed07db97735971d53d66de6553460/pandas-3.0.6-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:22172a92e7ee678ec0140c7af4fc9366b55413834a1cd86af78b3caa0b0574de", size = 11382223, upload-time = "2026-09-17T23:21:53.355Z" },+ { url = "https://files.pythonhosted.org/packages/d6/8a/b441c587dc7355bf6e1f68a91b4f76a6c29740f0c23be3acc5d4ebbeea6d/pandas-3.0.6-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:583be68728a31d0d750d5b8d9e00f02b153df0d4655f858bde93cb84cfc4227c", size = 11854881, upload-time = "2026-09-17T23:21:56.342Z" },+ { url = "https://files.pythonhosted.org/packages/b7/e9/f43410fada510b43fec09993c08f552086c3d247d3ee801a678f3cb10ea5/pandas-3.0.6-cp314-cp314-win_amd64.whl", hash = "sha256:77ccbe5057aece6fc172b9b77f19c04335af6882bc2e10c8f3ee4e6bfb3da553", size = 9791672, upload-time = "2026-09-17T23:21:59.332Z" },+ { url = "https://files.pythonhosted.org/packages/8b/9e/db14c059c21f9baa1907d436f8bf30e0c76c6288225c5e8b79a08ba8b2c5/pandas-3.0.6-cp314-cp314-win_arm64.whl", hash = "sha256:fb625f426b375bcc96e3a04c5d5d266cd7be6ae5d6866e0e703382ab5164068c", size = 9121246, upload-time = "2026-09-17T23:22:02.123Z" },+ { url = "https://files.pythonhosted.org/packages/67/ba/bad0f8dac020ab38a8637fddab01a57a82da7a496a6e6f19590aad53ab62/pandas-3.0.6-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:9e492cd4bdba6778de4fe0df7f4590c012161ebcf9902dce01b01dc683105514", size = 10920612, upload-time = "2026-09-17T23:22:05.404Z" },+ { url = "https://files.pythonhosted.org/packages/c4/a9/b500982e9aac6d52a58da4ad3f11e14168a315b06906b3f397c427878065/pandas-3.0.6-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:d7dcd21238cbb4828ff148481ba01cac8946dc5121457b5aeba28636f8f99a60", size = 10570213, upload-time = "2026-09-17T23:22:08.44Z" },+ { url = "https://files.pythonhosted.org/packages/4b/fa/e6ecd0073c98be8f840ac3125b955272835d7d9fd69f5944383b164deb5e/pandas-3.0.6-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6ff482fa91fa2bafd92e8fe66ce3645c851824310f295c1f0a2f96e928fc4541", size = 10252356, upload-time = "2026-09-17T23:22:11.302Z" },+ { url = "https://files.pythonhosted.org/packages/04/f5/001e230a7a7803590d9275a1a3f7e1bb605e3a495cfe5e8d3a532090621b/pandas-3.0.6-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:db7ec631f26223beee8e5c9e0b8f23c24d8197bbd1d982421d4e3188bea51965", size = 10655952, upload-time = "2026-09-17T23:22:14.283Z" },+ { url = "https://files.pythonhosted.org/packages/ca/ab/bab587148a3852c96aae26c4b5f9e04ce2221801ad94e166b4fbf969ede0/pandas-3.0.6-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:bd75ed0c840f709fc2ae26ddd9534ac77ca1a48ac0cce521a74acaa85f3340a7", size = 11274177, upload-time = "2026-09-17T23:22:17.352Z" },+ { url = "https://files.pythonhosted.org/packages/f3/32/74b48d87df2b80892d713c149abfe36d5db4de41b4eccb042a2bc07dafc1/pandas-3.0.6-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:ef738d71d1059245b6bb03e312be06d8b3821326a83486c1ad03b9aba3710e44", size = 11719041, upload-time = "2026-09-17T23:22:20.227Z" },+ { url = "https://files.pythonhosted.org/packages/f6/c6/d64b72d64d7eb0fad9fe424d34138e45dee70ddbea1360dcd0adf30e28f6/pandas-3.0.6-cp314-cp314t-win_amd64.whl", hash = "sha256:429d9df32731ab01383ed98f2baa7a60368090d1a94fc06019a12062510e8630", size = 10191388, upload-time = "2026-09-17T23:22:23.524Z" },+ { url = "https://files.pythonhosted.org/packages/7a/30/5e5b2ccabeca73ae2b03fc82bca3eabb7466cf43737f05ac08d591665d47/pandas-3.0.6-cp314-cp314t-win_arm64.whl", hash = "sha256:a4dbd4dc65cbe645b92b8785d0f96dd7311010dc6606cf620e51b07b8788a12a", size = 9387796, upload-time = "2026-09-17T23:22:26.64Z" },+ { url = "https://files.pythonhosted.org/packages/b6/77/47c5fb0be8bdd00116814c2c40d9ec42dbeb943865ef95130fe58a898226/pandas-3.0.6-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:50c44cbf5820b6b91a5f74aae04972472aefadd3cd9fbd1010409d85528bd570", size = 10483960, upload-time = "2026-09-17T23:22:30.071Z" },+ { url = "https://files.pythonhosted.org/packages/09/08/a310cb2fefe6d2b4623ab2150da818d93d4e73e33b58e4d163bb74243c5a/pandas-3.0.6-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:eb6900de08ac85f93ac4948aa6b80842eba555875337b8359035ac9c43e92d34", size = 10149432, upload-time = "2026-09-17T23:22:32.818Z" },+ { url = "https://files.pythonhosted.org/packages/54/36/6af478ec3a26d7754555cd62c3101c589c0931b1d85398e4fa5403910a1c/pandas-3.0.6-cp315-cp315-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4e25e2e1adee99ddfada6f7206a79ae8e9c8a8861b0e3eaaba165006d3eef18e", size = 10360981, upload-time = "2026-09-17T23:22:35.621Z" },+ { url = "https://files.pythonhosted.org/packages/43/20/5ece0e9cb79a6473216620db6a90546f578001c2bd857b77c444b27acad1/pandas-3.0.6-cp315-cp315-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4ff44b2cb51cbd691c91f92c4ea6c71e34003f239ebd67c2e857dc898466b49c", size = 10776585, upload-time = "2026-09-17T23:22:38.427Z" },+ { url = "https://files.pythonhosted.org/packages/2f/b6/cd3038f31ade5e8d2b4e1c9549d4b31e4d598469562f47142b2ad9171c0a/pandas-3.0.6-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:5edd0a7abb0986ecce1ac81f56d99b6763f86aa6946dceb6c661224f90af5a19", size = 11385249, upload-time = "2026-09-17T23:22:41.18Z" },+ { url = "https://files.pythonhosted.org/packages/0a/87/05bb3003737f80375d7311774916a24d161e2e591abe8c672aed7813defc/pandas-3.0.6-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:1bcb3e9ed29e74a7439cedff9e2aefd3ea65de84d7de9ccb6c194192541bd60e", size = 11848595, upload-time = "2026-09-17T23:22:44.207Z" },+ { url = "https://files.pythonhosted.org/packages/c0/30/1c0d46acf236d19ef975e9cdd5d1e0dd54924b03f0ed8287096ad4a18152/pandas-3.0.6-cp315-cp315-win_amd64.whl", hash = "sha256:253e12cb9081b0afbac607920f6142975966bc315135e09de275fdbaa415d2de", size = 9783810, upload-time = "2026-09-17T23:22:47.097Z" },+ { url = "https://files.pythonhosted.org/packages/87/03/df3304a9c2833c4810e7f1c887b04105b24731f9deef8b5d5d04522a375b/pandas-3.0.6-cp315-cp315-win_arm64.whl", hash = "sha256:97274c9adf6255bb48c620cd6959805efa7f09ea2167f0e0ae006a448cd2fca7", size = 9116820, upload-time = "2026-09-17T23:22:50.149Z" },+ { url = "https://files.pythonhosted.org/packages/47/25/d5f6cce5efa17c38e4f752a875b4a26d66cfadd529cb8c81672f0376d6a6/pandas-3.0.6-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:265f562fdd1079f69f3de96dd425c3405224038c0af4f920c54bd240ee2c4640", size = 10894614, upload-time = "2026-09-17T23:22:53.223Z" },+ { url = "https://files.pythonhosted.org/packages/ea/8b/e1876bfdc1df06bafc022d33202b5663bd86c81df2a6140aacafd0344669/pandas-3.0.6-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:c6e4aae3e9bea26c6c9a20d88d96c86ec4a99b4db5fd516bcb4e829ab2c0ee36", size = 10546973, upload-time = "2026-09-17T23:22:56.155Z" },+ { url = "https://files.pythonhosted.org/packages/e9/27/e0a27a5a5c27f7db66657b44def9e93121fd0ad4f0808355b9898fcbf204/pandas-3.0.6-cp315-cp315t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a77a1a44e4d88f1c6a2a64d3eb12efec8420875722e14279800b173a7c7c2804", size = 10239717, upload-time = "2026-09-17T23:22:59.603Z" },+ { url = "https://files.pythonhosted.org/packages/d5/4f/4eadb7d86a921c1e8bc70916cfe601ed667c4169118d17d69958611c21f8/pandas-3.0.6-cp315-cp315t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:86fa853a12e0b70927e2b1ee00d56d2224ec9cbb4b9d58348b5ad52d2f21150e", size = 10641275, upload-time = "2026-09-17T23:23:02.81Z" },+ { url = "https://files.pythonhosted.org/packages/c7/d1/eba72e9d905e84e79aefeefdcc6bc1abe15d9077973566643f4211636966/pandas-3.0.6-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:c826e9babb7790142c399f58599d8de679bea059d7b39c5b6efa2096fac37266", size = 11262919, upload-time = "2026-09-17T23:23:06.038Z" },+ { url = "https://files.pythonhosted.org/packages/9d/8a/1c5bd2642b450e374b6191189f47c49538fe41f82348a66de6f647e6ab59/pandas-3.0.6-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:8fe77b408d82e2615674dfed62533b95e18a03610573877422aada4f625d4947", size = 11709148, upload-time = "2026-09-17T23:23:09.082Z" },+ { url = "https://files.pythonhosted.org/packages/73/3d/1b142bd0d0f1326a5d98c91c955b923cd1e06b5eecb428cd9d8817fa01c0/pandas-3.0.6-cp315-cp315t-win_amd64.whl", hash = "sha256:83e91d15738d7783c050197cef2f2cf82fc6353dae9865aa87ed1fa16aa4d55a", size = 10161518, upload-time = "2026-09-17T23:23:12.365Z" },+ { url = "https://files.pythonhosted.org/packages/0b/a3/6419c14da2adc1f09a6a183b8f91d7494d325b287f4ca984ac04f663638a/pandas-3.0.6-cp315-cp315t-win_arm64.whl", hash = "sha256:963ca21199097a84c7827c4678b04e30833084fbf8ef44fde3fa7180a29f8fa0", size = 9364529, upload-time = "2026-09-17T23:23:15.274Z" },+]++[[package]]+name = "pillow"+version = "12.3.0"+source = { registry = "https://pypi.org/simple" }+resolution-markers = [+ "python_full_version < '3.11' and sys_platform == 'darwin'",+ "python_full_version < '3.11' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "(python_full_version < '3.11' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform != 'darwin' and sys_platform != 'linux')",+]+sdist = { url = "https://files.pythonhosted.org/packages/1c/3d/bb7fca845737cf9d7dbde16ed1843984665ff2e0a518f5db43e77ec540b9/pillow-12.3.0.tar.gz", hash = "sha256:3b8182a766685eaa002637e28b4ec8d6b18819a0c71f579bf0dbaa5830297cce", size = 47025035, upload-time = "2026-07-01T11:56:38.965Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/25/c2/669d88644cddb1485bd9534e63e8cf476c8e51cb3c3a1297677023505c0e/pillow-12.3.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:6c0016e7b354317c4e9e525b937ac8596c38d2d232b419529b9cd7a1cd46e39a", size = 5392418, upload-time = "2026-07-01T11:53:27.808Z" },+ { url = "https://files.pythonhosted.org/packages/6b/ba/3762f376a2948e3036488d773a146e0ae6ecc2ca03ac20e2615bd0b2ba02/pillow-12.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:bcc33feacfaefce60c12fd500a277533bdc02b10a19f7f6d348763d8140bbba7", size = 4785287, upload-time = "2026-07-01T11:53:29.761Z" },+ { url = "https://files.pythonhosted.org/packages/07/50/b5d688cc9c52d4482f3d5bcab6ce20bc2a74a85d2343841c907444a3be2c/pillow-12.3.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5594fc43d548a7ed94949d139aa1341b270f1863f11cfd37f5a6c8b778a6b67f", size = 6253754, upload-time = "2026-07-01T11:53:32.298Z" },+ { url = "https://files.pythonhosted.org/packages/4e/89/36f4cd76cf4baf05c50ababb976249153f18c959171c7f6ba09a6f217260/pillow-12.3.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f0606c8bf2cdefea14a43530f7657cbbb7ecf1c4222512492ef4a4434a9501ec", size = 6925605, upload-time = "2026-07-01T11:53:34.487Z" },+ { url = "https://files.pythonhosted.org/packages/eb/c0/4de58cf6633b9e3a6061ef4be6fb91fc3c90b812ece886f531e3c523d777/pillow-12.3.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:85f998ea1848bc6757289e739cfbdda3a04adfd58b02fc018ce54d754a5ce468", size = 6327788, upload-time = "2026-07-01T11:53:36.433Z" },+ { url = "https://files.pythonhosted.org/packages/87/3c/14d53682a19550dbbaf3b598f807d5457646c510805a44c7d7891cd1cd1a/pillow-12.3.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:25b9b82bb22e6e2b3cd07b39c68b7b862001226cb3dff7130d1cb914121b39ed", size = 7036288, upload-time = "2026-07-01T11:53:38.712Z" },+ { url = "https://files.pythonhosted.org/packages/38/1d/36279e3c77efe034e4cc2b0393ee74ffdb5a62391dacbf9b916154f5f0b8/pillow-12.3.0-cp310-cp310-win32.whl", hash = "sha256:37dc8f7bbb66efe481bb60defacef820c950c24713fb44962ed6aa2a50966de1", size = 6472396, upload-time = "2026-07-01T11:53:40.781Z" },+ { url = "https://files.pythonhosted.org/packages/48/7c/8fa0039574c476d7c6fa57dd7c32a130436877c6ec1e5ce1cc8ec44878c1/pillow-12.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:300557495eb45ebb8aec96c2da9c4be642fbf7cd937278b4013ba894ea8eb0eb", size = 7226887, upload-time = "2026-07-01T11:53:42.764Z" },+ { url = "https://files.pythonhosted.org/packages/fa/17/e324be141d173c1c919428066c3259f21c1b8982e564e01a4a81e96dbdcf/pillow-12.3.0-cp310-cp310-win_arm64.whl", hash = "sha256:514435a37670e3e5e08f3945b68718b6ed329bb84367777e16f9f4dfe1e61a0f", size = 2568039, upload-time = "2026-07-01T11:53:45.372Z" },+ { url = "https://files.pythonhosted.org/packages/fb/c8/0a78b0e02d7ac54bc03e5321c9220da52f0c2ea83b21f7c40e7f3169c502/pillow-12.3.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:00808c5e14ef63ac5161091d242999076604ff74b883423a11e5d7bbb38bf756", size = 5392415, upload-time = "2026-07-01T11:53:47.162Z" },+ { url = "https://files.pythonhosted.org/packages/b2/5b/a02d30018abd97ced9f5a6c63d28597694a00d066516b9c1c6de45859fc9/pillow-12.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:37d6d0a00072fd2948eb22bce7e1475f34569d90c87c59f7a2ec59541b77f7a6", size = 4785266, upload-time = "2026-07-01T11:53:49.079Z" },+ { url = "https://files.pythonhosted.org/packages/c8/98/766667a4be768150a202836acd9fad19c06824ca86c4286d3cf6b274964e/pillow-12.3.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bcb46e2f9feff8d06323983bd83ed00c201fdcab3d74973e7072a889b3979fcd", size = 6263814, upload-time = "2026-07-01T11:53:51.32Z" },+ { url = "https://files.pythonhosted.org/packages/3b/2d/ede717bc1144f63886c21fd349bb95860b0d1a21149ff16f2bb362b612b6/pillow-12.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:23d27a3e0307ec2244cc51e7287b919aa68d097504ebe19df4e76a98a3eea5bd", size = 6934408, upload-time = "2026-07-01T11:53:53.487Z" },+ { url = "https://files.pythonhosted.org/packages/a3/48/9c58b685e69d49c31af6c8eb9012055fab7e665785165c84796e2c73ce72/pillow-12.3.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:4f883547d4b7f0495ebe7056b0cc2aea76094e7a4abc8e933540f3271df27d9c", size = 6337160, upload-time = "2026-07-01T11:53:55.457Z" },+ { url = "https://files.pythonhosted.org/packages/ff/fa/dc2a5c0ba6df93f67c31d34b808b7ce440b40cdbf96f0b81cde1d1e6fa93/pillow-12.3.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:236ff70b9312fb68943c703aa842ca6a758abfa45ac187a5e7c1452e96ef72b5", size = 7045172, upload-time = "2026-07-01T11:53:57.736Z" },+ { url = "https://files.pythonhosted.org/packages/86/a5/444817a4d4c4c2417df00513086ca196f388d8f9ef40c2e4ccd1ad1af54b/pillow-12.3.0-cp311-cp311-win32.whl", hash = "sha256:10e41f0fbf1eec8cfd234b8fe17a4caac7c9d0db4c204d3c173a8f9f6ef3232b", size = 6472232, upload-time = "2026-07-01T11:53:59.767Z" },+ { url = "https://files.pythonhosted.org/packages/63/c6/4bad1b18d132a50b27e1365e1ab163616f7a5bb56d330f66f9d1d9d4f9d4/pillow-12.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:8e95e1385e4998ae9694eeaa4730ba5457ff61185b3a55e2e7bea0880aef452a", size = 7233653, upload-time = "2026-07-01T11:54:02.066Z" },+ { url = "https://files.pythonhosted.org/packages/fd/16/00f91ab7760dc842f5aad55217e80fc4a7067a0604535249bc8a2d6d9870/pillow-12.3.0-cp311-cp311-win_arm64.whl", hash = "sha256:ebaea975e03d3141d9d3a507df75c9b3ec90fa9d2ffd07567b3a978d9d790b26", size = 2568195, upload-time = "2026-07-01T11:54:04.622Z" },+ { url = "https://files.pythonhosted.org/packages/37/bf/fb3ebff8ddcb76aac5a01389251bbbb9519922a9b520d8247c1ca864a25d/pillow-12.3.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:ba09209fbe443b4acccebe845d8a138b89a8f4fbaeedd44953490b5315d5e965", size = 5345969, upload-time = "2026-07-01T11:54:06.397Z" },+ { url = "https://files.pythonhosted.org/packages/d8/66/9a386a92561f402389a4fc70c18838bf6d35eb5eb5c6850b4b2dc64f5048/pillow-12.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ffd0c5368496f41b0944be820fcb7a838aa6e623d250b01acf2643939c3f99d7", size = 4780323, upload-time = "2026-07-01T11:54:09.351Z" },+ { url = "https://files.pythonhosted.org/packages/25/27/ac8f99618ffd3dde21db0f4d4b1d2ab00c0880595bfd17df103f7f39fd0c/pillow-12.3.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d9c7f76c0673154f044e9d78c8655fb4213f6ca31a836df48b40fe5d187717b9", size = 6266838, upload-time = "2026-07-01T11:54:11.71Z" },+ { url = "https://files.pythonhosted.org/packages/84/21/a35af28dcc61f37ed850a2d64c65c701321dfbf25085e469d5559360cbbf/pillow-12.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:78cb2c6865a35ab8ff8b75fd122f6033b92a62c82801110e48ddd6c936a45d91", size = 6940830, upload-time = "2026-07-01T11:54:13.732Z" },+ { url = "https://files.pythonhosted.org/packages/eb/51/8b08617af3ad95e33ce6d7dd2c99ed6c8298f7fb131636303956be022e25/pillow-12.3.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e491916b378fba47242221bb9ead245211b70d504f495d105d17b14a24b4907c", size = 6344383, upload-time = "2026-07-01T11:54:15.756Z" },+ { url = "https://files.pythonhosted.org/packages/1d/72/cf78ac9780bb93c28328f408973845a309d4d145041665f734572ced1b52/pillow-12.3.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:0dd2064cbc55aaec028ef5fbb60fa47bb6c3e7918e07ff17935284b227a9d2df", size = 7052934, upload-time = "2026-07-01T11:54:17.721Z" },+ { url = "https://files.pythonhosted.org/packages/20/20/25e0f4dc178a6bc0696793720055519a0de89e7661dae886992decbd2f81/pillow-12.3.0-cp312-cp312-win32.whl", hash = "sha256:dbce0b29841537a2fa4a214c2bbf14de3587c9680caa9b4e217568472490b28f", size = 6472684, upload-time = "2026-07-01T11:54:19.839Z" },+ { url = "https://files.pythonhosted.org/packages/45/89/da2f7971a317f83d807fdd4065c0af40208e59e692cc43d315a71a0e96d1/pillow-12.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:a2b55dd6b2a4c4b7d87ffa56bdb33fdc5fdb9a462173861a7bc097f17d91cb09", size = 7227137, upload-time = "2026-07-01T11:54:22.025Z" },+ { url = "https://files.pythonhosted.org/packages/de/47/4845a0a6c0dbf1db8456bd9fc791f13c5ced7ced20606d08a0aacfd25b49/pillow-12.3.0-cp312-cp312-win_arm64.whl", hash = "sha256:331b624368d4f1d069149002f25f44bc61c8919ce8ddb3c45bdad8f6e2d89510", size = 2568267, upload-time = "2026-07-01T11:54:24.051Z" },+ { url = "https://files.pythonhosted.org/packages/9d/ac/31fb64e1e7efb5a4b50cd3d92049ba89ac6e4d8d3bb6a74e15048ca3353e/pillow-12.3.0-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:21900ce7ba264168cd50defae43cd75d25c833ad4ad6e73ffc5596d12e25ac89", size = 4161684, upload-time = "2026-07-01T11:54:25.934Z" },+ { url = "https://files.pythonhosted.org/packages/87/b4/9805e23d2b4d77842b468513841fda254ee42f0289d25088340e4ff46e2d/pillow-12.3.0-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:4e8c2a84d977f50b9daed6eeaf3baef67d00d5d74d932288f02cb94518ee3ace", size = 4255487, upload-time = "2026-07-01T11:54:27.935Z" },+ { url = "https://files.pythonhosted.org/packages/df/39/ecf519435a200c693fe053a6ee4d835b41cf963a4dfc2551c4e637cb2a71/pillow-12.3.0-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:ae26d61dfa7a47befdc7572b521024e8745f3d809bd95ca9505a7bba9ef849ec", size = 3696433, upload-time = "2026-07-01T11:54:29.813Z" },+ { url = "https://files.pythonhosted.org/packages/42/92/2fc3ffad878ae8dd5469ec1bc8eb83b71f48e13efdf68f02709003982a32/pillow-12.3.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:7a743ff716f746fc19a9557f60dab1600d4613255f8a7aeb3cdde4db7eb15a66", size = 5345889, upload-time = "2026-07-01T11:54:31.97Z" },+ { url = "https://files.pythonhosted.org/packages/10/76/8803c13605b763d33d156c4678fc77f8443389c0c51c8aef707bb02015f4/pillow-12.3.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:d69141514cc30b774ceea5e3ed3a6635c8d8a96edf664689b890f4089111fb35", size = 4780109, upload-time = "2026-07-01T11:54:34.026Z" },+ { url = "https://files.pythonhosted.org/packages/1f/01/e18aff37cb0b4aac47ac90f016d347a49aca667ef97f190b06ac2aabc928/pillow-12.3.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f7401aebd7f581d7f83a439d87d474999317ee099218e5ad25d125290990ba65", size = 6263736, upload-time = "2026-07-01T11:54:36.131Z" },+ { url = "https://files.pythonhosted.org/packages/f7/62/de5bdd77d935331f4f802edc11e4d82950f642caad6cb2f949837b8560e2/pillow-12.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0847a763afefb695bc912d7c131e7e0632d4edc1d8698f58ddabec8e46b8b6d3", size = 6937129, upload-time = "2026-07-01T11:54:38.216Z" },+ { url = "https://files.pythonhosted.org/packages/70/4d/105627a13300c5e0df1d174230b32fd1273062c96f7745fd552b945d1e1d/pillow-12.3.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:571b9fcb07b97ef3a492028fb3d2dc0993ca23a06138b0315286566d29ef718a", size = 6339562, upload-time = "2026-07-01T11:54:40.354Z" },+ { url = "https://files.pythonhosted.org/packages/6b/1d/f13de01a553988ab895ba1c722e06cf3144d4f57656fd5b81b6d881f1179/pillow-12.3.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:756c768d0c9c2955feb7a56c37ea24aea2e369f8d36a88da270b6a9f19e62b5e", size = 7049439, upload-time = "2026-07-01T11:54:42.489Z" },+ { url = "https://files.pythonhosted.org/packages/c9/f9/066794cca041b969964f779ee5fa66a9498bbf34248ac39c5d7954e4198f/pillow-12.3.0-cp313-cp313-win32.whl", hash = "sha256:a876864214e136f0eb367788dbd7df045f4806801518e2cfe9e13229cfe06d8f", size = 6473287, upload-time = "2026-07-01T11:54:44.9Z" },+ { url = "https://files.pythonhosted.org/packages/a6/9b/7a58e61d62be561da3a356fe2384d4059a6345fc130e23ef1c36a5b81d24/pillow-12.3.0-cp313-cp313-win_amd64.whl", hash = "sha256:1cca606cd25738df4ed873d5ad46bbdb3d83b5cbca291f6b4ff13a4df6b0bbe8", size = 7239691, upload-time = "2026-07-01T11:54:47.141Z" },+ { url = "https://files.pythonhosted.org/packages/aa/b0/c4ed4f0ef8f8fa5ee8351537db6650bb8189f7e118842978dd6589065692/pillow-12.3.0-cp313-cp313-win_arm64.whl", hash = "sha256:b629de27fda84b42cde7edef0d85f13b958b47f6e9bbcbba9b673c562a89bd8b", size = 2568185, upload-time = "2026-07-01T11:54:49.137Z" },+ { url = "https://files.pythonhosted.org/packages/dc/01/001f65b68192f0228cc1dbbc8d2530ab5d58b61037ba0587f946fea607cd/pillow-12.3.0-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:9cf95fe4d0f84c82d282745d9bb08ad9f926efa00be4697e767b814ce40d4330", size = 4161736, upload-time = "2026-07-01T11:54:51.156Z" },+ { url = "https://files.pythonhosted.org/packages/1a/d2/0219746d0fd16fc8a84498e79452375be3797d3ce4044596ce565164b84f/pillow-12.3.0-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:8728f216dcdb6e6d555cf971cb34076139ad74b31fc2c14da4fafc741c5f6217", size = 4255435, upload-time = "2026-07-01T11:54:53.414Z" },+ { url = "https://files.pythonhosted.org/packages/c8/02/8d0bc62ef0302318c46ff2a512822d2610e81c7aa46c9b3abe6cbaca5ad0/pillow-12.3.0-cp314-cp314-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:a45650e8ce7fafffd731db8550230db6b0d306d181a90b67d3e6bca2f1990930", size = 3696262, upload-time = "2026-07-01T11:54:55.739Z" },+ { url = "https://files.pythonhosted.org/packages/85/e2/73c77d218410b14f5f2d565e8a998d5317b7b9c75368d29985139f7a46f0/pillow-12.3.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:ba54cfebe86920a559a7c4d6b9050791c20513650a1952ebe3368c7dc70306f8", size = 5350344, upload-time = "2026-07-01T11:54:57.657Z" },+ { url = "https://files.pythonhosted.org/packages/c7/da/32c752228ae345f489e3a42499d817b6c3996da7e8a3bc7a04fc806b243b/pillow-12.3.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:e158cb00350dc278f3b91551101aa7d12415a66ebf2c91d8d5ac14e56ddd3ad0", size = 4780131, upload-time = "2026-07-01T11:54:59.713Z" },+ { url = "https://files.pythonhosted.org/packages/b1/9d/8b2c807dbef61a5197c047afe99823787eb66f63daf9fb2432f91d6f0462/pillow-12.3.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e9aeb04d6aef139de265b29683e119b638208f88cf73cdd1658aa07221165321", size = 6263757, upload-time = "2026-07-01T11:55:01.778Z" },+ { url = "https://files.pythonhosted.org/packages/5c/44/c85361f65dbe00eea8576ee467c768d25129989efb76e94f205e9ca9bb46/pillow-12.3.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:251bf95b67017e27b13d82f5b326234ca62d70f9cf4c2b9032de2358a3b12c7b", size = 6936962, upload-time = "2026-07-01T11:55:03.93Z" },+ { url = "https://files.pythonhosted.org/packages/18/7e/e483414b35800b86b6f08dbbc7803fb5cd52c4d6f897f47d53ea2c7e6f65/pillow-12.3.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:fe3cca2e4e8a592be0f269a1ca4835c25199d9f3ce815c8491048f785b0a0198", size = 6339171, upload-time = "2026-07-01T11:55:05.989Z" },+ { url = "https://files.pythonhosted.org/packages/f0/f4/68c491844841ede6bed70189546b3ee9731cf9f2cbad396faff5e1ccba45/pillow-12.3.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:23aceaa007d6172b02c277f0cd359c79492bbb14f7072b4ede9fbcaf20648130", size = 7048116, upload-time = "2026-07-01T11:55:08.131Z" },+ { url = "https://files.pythonhosted.org/packages/a3/34/77f3f793fed8efc7d243f21b33c5a3f0d1c97ee70346d3db855587e155ff/pillow-12.3.0-cp314-cp314-win32.whl", hash = "sha256:af8d94b0db561cf68b88a267c5c44b49e134f525d0dc2cb7ed413a66bc23559a", size = 6467209, upload-time = "2026-07-01T11:55:10.408Z" },+ { url = "https://files.pythonhosted.org/packages/f1/e0/492879f69d94f91f60fc8cd05ba03650e9520afebb2fb7aa12777d7c7f38/pillow-12.3.0-cp314-cp314-win_amd64.whl", hash = "sha256:fdafc9cce40277e0f7a0feabce0ee50dd2fa1800f3b38015e51296b5e814048d", size = 7237707, upload-time = "2026-07-01T11:55:12.745Z" },+ { url = "https://files.pythonhosted.org/packages/c9/ac/6b11f2875f1c2ac040d84e1bbf9cf22a88038f901ca1037898b280b38365/pillow-12.3.0-cp314-cp314-win_arm64.whl", hash = "sha256:e91206ee562682b51b98ef4b26a6ef48fd84e15fd4c4bc5ec768eb641d206838", size = 2565995, upload-time = "2026-07-01T11:55:14.736Z" },+ { url = "https://files.pythonhosted.org/packages/52/69/c2208e56af9bfc1913afb24020297a691eb1d4ef688474c8a04913f65e04/pillow-12.3.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:164b31cd1a0490ab6efae01aa5df49da7061be0af1b30e035b6e9a1bfe34ee6e", size = 5352503, upload-time = "2026-07-01T11:55:17.076Z" },+ { url = "https://files.pythonhosted.org/packages/07/70/e5686d753e898a45d778ff1718dba8516ead6ab6b95d85fc8c4b70650cf2/pillow-12.3.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:5afb51d599ea772b8365ae807ae557f18bccfe46ab261fd1c2a9ed700fc6eb17", size = 4782956, upload-time = "2026-07-01T11:55:19.448Z" },+ { url = "https://files.pythonhosted.org/packages/d5/37/25c6692f06927ee973ff18c8d9ee98ad0b4d84ee67a09610c2dd1447958e/pillow-12.3.0-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3edce1d53195db527e0191f84b71d02022de0540bf43a16ed734ed7537b07385", size = 6322855, upload-time = "2026-07-01T11:55:21.613Z" },+ { url = "https://files.pythonhosted.org/packages/cc/91/420637fcb8f1bc11029e403b4538e6694744428d8246118e45719f944556/pillow-12.3.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bf16ba1b4d0b6b7c8e534936632270cf70eb00dbe09005bc345b2677b726855c", size = 6989642, upload-time = "2026-07-01T11:55:24.006Z" },+ { url = "https://files.pythonhosted.org/packages/10/08/b94d7811281ccf0d143a1cf768d1c49e1e54af63e7b708ab2ee3eb87face/pillow-12.3.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:24870b09b224f7ae3c39ed07d10e819d06f8720bc551847b1d623832b5b0e28d", size = 6391281, upload-time = "2026-07-01T11:55:26.252Z" },+ { url = "https://files.pythonhosted.org/packages/d2/87/24233f785f55474dc02ce3e739c5528a77e3a862e9333d1dd7a25cc31f70/pillow-12.3.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:30f2aa603c41533cc25c05acd0da21636e84a315768feb631c937177db558931", size = 7096716, upload-time = "2026-07-01T11:55:28.318Z" },+ { url = "https://files.pythonhosted.org/packages/23/26/fcb2f6e37175b04f53570b59937867e2b80ee1685e744023153028fc14f9/pillow-12.3.0-cp314-cp314t-win32.whl", hash = "sha256:4b0a7fe987b14c31ebda6083f74f22b561fd3739bc0ac51e019622e3d72668c7", size = 6474125, upload-time = "2026-07-01T11:55:30.956Z" },+ { url = "https://files.pythonhosted.org/packages/90/de/3634abee5f1c9e13c56787b7d5517b0ba8d6de51700b95578cf338349c9f/pillow-12.3.0-cp314-cp314t-win_amd64.whl", hash = "sha256:962864dc93511324d51ddbb5b9f8731bf71675b93ca612a07441896f4688fb8c", size = 7242939, upload-time = "2026-07-01T11:55:34.044Z" },+ { url = "https://files.pythonhosted.org/packages/ce/2a/fd13f8eb24de5714a6eb444a3d67e2842c6c576e159a43793adf23051351/pillow-12.3.0-cp314-cp314t-win_arm64.whl", hash = "sha256:0740a512dc522224c77d9aa5a8d70d8b7d73fb91f2c21125d8d025d3b8990e45", size = 2567506, upload-time = "2026-07-01T11:55:35.988Z" },+ { url = "https://files.pythonhosted.org/packages/5d/dc/8fdce34ec725a33c81c6ba122b904d6b9024e50ea9ac7bede62fab54506c/pillow-12.3.0-cp315-cp315-ios_13_0_arm64_iphoneos.whl", hash = "sha256:0feb2e9d6ad6c9e3c06effe9d00f3f1e618a6643273576b016f591e9315a7139", size = 4162063, upload-time = "2026-07-01T11:55:37.941Z" },+ { url = "https://files.pythonhosted.org/packages/76/66/2044b9a63d3b84ff048228dfcb7cd9bf0df983e8470971bf7d4c57b693de/pillow-12.3.0-cp315-cp315-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:9e881fca225083806662a5c43d627d215f258ff43c890f831966c7d7ba9c7402", size = 4255549, upload-time = "2026-07-01T11:55:40.022Z" },+ { url = "https://files.pythonhosted.org/packages/52/7e/1f67e6f4ece6b582ee4b539decbcc9f848dc245a93ed8cd7338bafef72f1/pillow-12.3.0-cp315-cp315-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:4998562bf62a445225f22e07c896bb04b35b1b1f2eb6d760584c9c51d7a5f78c", size = 3696331, upload-time = "2026-07-01T11:55:41.98Z" },+ { url = "https://files.pythonhosted.org/packages/12/40/d306fc2c8e4d45d7f175c77edca7063be7b86fe7fe6e68f4353bf71d808c/pillow-12.3.0-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:dc624f6bc473dacdf7ef7eb8678d0d08edf15cd94fad6ae5c7d6cc67a4e4902f", size = 5350370, upload-time = "2026-07-01T11:55:44.028Z" },+ { url = "https://files.pythonhosted.org/packages/dd/44/668fb1437e8ce420f62d6106eb66e44a5971602a4d794615bdf79315d82d/pillow-12.3.0-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:71d6097b330eea8fd15097780c8e89cb1a8ce7838669f48c5bacd6f663dd4701", size = 4780147, upload-time = "2026-07-01T11:55:46.073Z" },+ { url = "https://files.pythonhosted.org/packages/0c/08/93fa2e70e30a2d81547e481b6ee2bb9522117221fb1e0ce4b5df70967677/pillow-12.3.0-cp315-cp315-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:28ce87c5ab450a9dd970b52e5aca5fe63ed432d18a2eaddd1979a00a1ba24ace", size = 6273659, upload-time = "2026-07-01T11:55:48.264Z" },+ { url = "https://files.pythonhosted.org/packages/f8/6d/043e96ff814fc31a33077e4cba86082167db520c93632afdf2042febbb0c/pillow-12.3.0-cp315-cp315-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6b02afb9b97f65fbca5f31db6a2a3ba21aa93030225f150fa3f249717e938fb4", size = 6947439, upload-time = "2026-07-01T11:55:50.503Z" },+ { url = "https://files.pythonhosted.org/packages/af/92/ba71d2ee2ac0edf3fa33bd9d5ee9ee080da70b1766f3ca3934f9938ddac9/pillow-12.3.0-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:1182d52bc2d5e5d7d0949503aa7e36d12f42205dc287e4883f407b1988820d39", size = 6353577, upload-time = "2026-07-01T11:55:52.697Z" },+ { url = "https://files.pythonhosted.org/packages/0f/ce/e63064e2122923ff687c8ad792d0d736a7b3920a56a46982e81a7fdd25d6/pillow-12.3.0-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:e795b7eb908249c4e43c7c99fac7c2c75dab0c43566e37db472a355f63693d71", size = 7060394, upload-time = "2026-07-01T11:55:55.149Z" },+ { url = "https://files.pythonhosted.org/packages/54/76/a09cc3ccc8d773a7283d34c38bec1708f9e3cc932093cbc4c5e71ac4060b/pillow-12.3.0-cp315-cp315-win32.whl", hash = "sha256:57b3d78c95ba9059768b10e28b813002261d3f3dfc55cc48b0c988f625175827", size = 6467375, upload-time = "2026-07-01T11:55:57.769Z" },+ { url = "https://files.pythonhosted.org/packages/3e/03/1846c49ba3b1d5550392a4bbd06d6fb4578e1cd91a803198b5c90f5f7d53/pillow-12.3.0-cp315-cp315-win_amd64.whl", hash = "sha256:fa4ecea169a355be7a3ade2c783e2ed12f0e40d2c5621cda8b3297faf7fbb9f5", size = 7237048, upload-time = "2026-07-01T11:55:59.975Z" },+ { url = "https://files.pythonhosted.org/packages/fb/bb/89f35dcc79610423f9f195504d7def7f0d1416a711541b42867e25fe3412/pillow-12.3.0-cp315-cp315-win_arm64.whl", hash = "sha256:877c3f311ff35410f690861c4409e7ccbf0cd2f878e50628a28e5a0bb689e658", size = 2566006, upload-time = "2026-07-01T11:56:02.143Z" },+ { url = "https://files.pythonhosted.org/packages/30/88/707027ba09942dfa2c28759b5c222d769290a41c6d20ea60ec250801941f/pillow-12.3.0-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:e9871b1ffbfa9656b60aeee92ed5136a5742696006fa322b29ea3d8da0ecc9cf", size = 5352509, upload-time = "2026-07-01T11:56:04.2Z" },+ { url = "https://files.pythonhosted.org/packages/b0/6d/00352fa25332c2569cd387851f568cc5a4b75a9adbfb37ac4fbce4c02eec/pillow-12.3.0-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:53aa02d20d10c3d814d536aa4e5ac9b84ca0ff5a88377963b085ad6822f93e64", size = 4783167, upload-time = "2026-07-01T11:56:06.631Z" },+ { url = "https://files.pythonhosted.org/packages/13/4f/9e049dfa21af7c22427275720e2490267ba8138120add5c4c574deb69782/pillow-12.3.0-cp315-cp315t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:446c34dcc4324b084a53b705127dc15717b22c5e140ae0a3c38349d4efec071e", size = 6329237, upload-time = "2026-07-01T11:56:08.868Z" },+ { url = "https://files.pythonhosted.org/packages/36/16/cf6eeaae8d0fce8dd390a33437cf68c5d5bd73834a2bc6e2f14efda0ab45/pillow-12.3.0-cp315-cp315t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cf1845d02ad822a369a49f2bb9345b1614744267682e7a03527dc3bf6eea1777", size = 6997047, upload-time = "2026-07-01T11:56:11.379Z" },+ { url = "https://files.pythonhosted.org/packages/1e/69/dbf769bdd55f48bf5733cac28edc6364ffaa072ec9ba336266e4fe66be55/pillow-12.3.0-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:186941b6aef820ad110fb01fb06eb925374dc3a21b17e37ec9a53b250c6fe2d1", size = 6400440, upload-time = "2026-07-01T11:56:13.908Z" },+ { url = "https://files.pythonhosted.org/packages/a0/e1/ffc9cfc2eea0d178da8018e18e959301ad9d6bc9f3edb7181e748a474b97/pillow-12.3.0-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:f13c32a3abd6079a66d9526e18dad9b6d280384d49d7c54040cd57b6424041d9", size = 7105895, upload-time = "2026-07-01T11:56:16.575Z" },+ { url = "https://files.pythonhosted.org/packages/18/f0/a5595c1e8c3ae44b9828cb2f0fa8155e5095ef04d6327b8f61cf44a3df85/pillow-12.3.0-cp315-cp315t-win32.whl", hash = "sha256:1657923d2d45afb66526e5b933e5b3052e6bdea196c90d3abb2424e18c77dae8", size = 6474384, upload-time = "2026-07-01T11:56:18.855Z" },+ { url = "https://files.pythonhosted.org/packages/e4/04/62bcd9f844984c5938d3b05264a61d797a29d3e0812341a8204af70bbdee/pillow-12.3.0-cp315-cp315t-win_amd64.whl", hash = "sha256:8cd2f7bdda092d99c9fc2fb7391354f306d01443d22785d0cbfafa2e2c8bb418", size = 7243537, upload-time = "2026-07-01T11:56:21.214Z" },+ { url = "https://files.pythonhosted.org/packages/3d/68/1f3066acedf37673694a7141381d8f811ae97f30d34413d236abe7d489f1/pillow-12.3.0-cp315-cp315t-win_arm64.whl", hash = "sha256:06ff022112bc9cbf83b60f8e028d94ad87b60621706487e65f673de61610ab59", size = 2567491, upload-time = "2026-07-01T11:56:23.506Z" },+ { url = "https://files.pythonhosted.org/packages/75/18/2e8b40223153ccbc60df07f9e8928dc0c76202aa4e55ae9f53962b6510d6/pillow-12.3.0-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:b3c777e849237620b022f7f297dd67705f9f5cf1685f09f02e46f93e92725468", size = 5302510, upload-time = "2026-07-01T11:56:25.736Z" },+ { url = "https://files.pythonhosted.org/packages/46/3e/51fabf59d5ab801ceab709453d3ab6b180083496579549de4c45ced6528a/pillow-12.3.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:b343699e8308bdc51978310e1c959c584e7869cc8c40780058c87da7781a1e94", size = 4736058, upload-time = "2026-07-01T11:56:28.041Z" },+ { url = "https://files.pythonhosted.org/packages/bf/20/22fe9384b7949e25fb1293bcfc84fb82590ff4ea6b37c95b24d26d793d86/pillow-12.3.0-pp311-pypy311_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:fbd139c8447d25dd750ab79ee274cc5e1fe80fc56340ab10b18a195e1b6eca3e", size = 5237776, upload-time = "2026-07-01T11:56:30.263Z" },+ { url = "https://files.pythonhosted.org/packages/08/14/f6ba68107680ffa74b39985f3f30884e41318fbc4250caa423c79b4788bb/pillow-12.3.0-pp311-pypy311_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e7e480451b9fa137494bccd3a7d69adbe8ac65a87d97be61e11f1b1050a5bac3", size = 5860358, upload-time = "2026-07-01T11:56:32.68Z" },+ { url = "https://files.pythonhosted.org/packages/36/54/0169bc772ec491108b62f644f8ecf1fe5d8ae5ebafde2ee2142210166903/pillow-12.3.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:04f01d28a6aaff387bf842a13be313df23ba0597a44f1a976c9feb3c6ff4711a", size = 7231786, upload-time = "2026-07-01T11:56:35.046Z" },+]++[[package]]+name = "pillow"+version = "13.0.0"+source = { registry = "https://pypi.org/simple" }+resolution-markers = [+ "python_full_version >= '3.14' and sys_platform == 'darwin'",+ "python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'darwin'",+ "python_full_version >= '3.14' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version >= '3.12' and python_full_version < '3.14' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version >= '3.14' and sys_platform == 'win32'",+ "python_full_version >= '3.14' and sys_platform == 'emscripten'",+ "(python_full_version >= '3.14' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.14' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux' and sys_platform != 'win32')",+ "python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'win32'",+ "python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'emscripten'",+ "(python_full_version >= '3.12' and python_full_version < '3.14' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux' and sys_platform != 'win32')",+ "python_full_version >= '3.11.5' and python_full_version < '3.12' and sys_platform == 'darwin'",+ "python_full_version >= '3.11' and python_full_version < '3.11.5' and sys_platform == 'darwin'",+ "python_full_version >= '3.11.5' and python_full_version < '3.12' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version >= '3.11' and python_full_version < '3.11.5' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version >= '3.11.5' and python_full_version < '3.12' and sys_platform == 'win32'",+ "python_full_version >= '3.11.5' and python_full_version < '3.12' and sys_platform == 'emscripten'",+ "(python_full_version >= '3.11.5' and python_full_version < '3.12' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.11.5' and python_full_version < '3.12' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux' and sys_platform != 'win32')",+ "python_full_version >= '3.11' and python_full_version < '3.11.5' and sys_platform == 'win32'",+ "python_full_version >= '3.11' and python_full_version < '3.11.5' and sys_platform == 'emscripten'",+ "(python_full_version >= '3.11' and python_full_version < '3.11.5' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.11' and python_full_version < '3.11.5' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux' and sys_platform != 'win32')",+]+sdist = { url = "https://files.pythonhosted.org/packages/ce/a4/9cc30690a394a8305e8be4c9036aa16d0dfddadd09079860b582f562496d/pillow-13.0.0.tar.gz", hash = "sha256:cdcd1ba258178f7356d74170c9a81ba4eab6a5d55748bc402a5a2a6fe6be3510", size = 47058631, upload-time = "2026-10-16T22:18:09.718Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/6c/d7/af6af1b8cc55e07cb0489d5b0950bf5a9bb1461eeba825700b6d8d0e26ea/pillow-13.0.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:6f38f3f885a09cafc93fd667b1173a92f379e43785d635e7983c893f0da319fb", size = 5592324, upload-time = "2026-10-16T22:15:24.672Z" },+ { url = "https://files.pythonhosted.org/packages/0b/d2/2c12cb4fbb5d95f38d1001ff3d95fafcb830077018cba40e56a8f932dfbc/pillow-13.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:37290fbef0c73e2d51d594eb78fded7dc7170d1c3ad0a890269e6fd8c8c4e061", size = 4856298, upload-time = "2026-10-16T22:15:27.669Z" },+ { url = "https://files.pythonhosted.org/packages/5c/ee/229b27472483a4801ea94990815e710391836afdf987b4b722b62bd75db6/pillow-13.0.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7c88c10dd432f3b39ccdafc9ed81d0c21b8fd634502574da76d1bfa4fe2c76d0", size = 6517304, upload-time = "2026-10-16T22:15:29.43Z" },+ { url = "https://files.pythonhosted.org/packages/36/46/f509b74787f40ce0627501089d630b2c741b63b244c1f40b640b3b01e181/pillow-13.0.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a625df9a2a5597fa5e5266e01aefc82604bb85d291e3547981e863560d75da6c", size = 7140667, upload-time = "2026-10-16T22:15:31.368Z" },+ { url = "https://files.pythonhosted.org/packages/aa/a4/5a398b8ec2c37145397d6461c0b551c23ec03072aa64f357aed25e582b00/pillow-13.0.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:10b5019883c98f1dd819ca48ffc6f33a91cee04948fe637c605f4345c7cafd6f", size = 6610583, upload-time = "2026-10-16T22:15:34.025Z" },+ { url = "https://files.pythonhosted.org/packages/4f/7b/f2f1109b230fd4e2d57ab2305de31adc37ea9b4ff8719436c623cb484415/pillow-13.0.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f391dc92a015c478745192fe4f2e120c2af2aba18d9fe0616341cbf537599806", size = 7218241, upload-time = "2026-10-16T22:15:36.214Z" },+ { url = "https://files.pythonhosted.org/packages/ab/d3/069edb9083b267746baf59756282cacef904d3475c5288c7216fb5195a98/pillow-13.0.0-cp311-cp311-win32.whl", hash = "sha256:6a0920cb55df5a4d3f6862964908078c0bd59332bdd1bcd20d14e8c70ef27cc5", size = 6515278, upload-time = "2026-10-16T22:15:38.129Z" },+ { url = "https://files.pythonhosted.org/packages/7d/f6/6e2d96413e4c9dbec12ea584d9e646d602877d4cce3ea669099f959deac6/pillow-13.0.0-cp311-cp311-win_amd64.whl", hash = "sha256:d7710eb676e9bb68965cb045be0d333b4c0d7f9dfbaa7fbf121385b1588683d3", size = 7278471, upload-time = "2026-10-16T22:15:40.286Z" },+ { url = "https://files.pythonhosted.org/packages/70/e7/baff21f8cb60496c8c250609501b88919eeedb4088d3da106f6c62f3f3c0/pillow-13.0.0-cp311-cp311-win_arm64.whl", hash = "sha256:12fbb851cf323cc19aac3eea1df5ad17b57e91e9fe3cfd06100dba7bb8208c13", size = 2698981, upload-time = "2026-10-16T22:15:42.637Z" },+ { url = "https://files.pythonhosted.org/packages/7a/b8/58d79332229482eb0d27c82973850808c19d37e5bdc14443d3417bd373f5/pillow-13.0.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:67c8d44ad89fa7eb88de5d6ef6199b1e03dd24974f85a67639fc8badb801fe79", size = 5568643, upload-time = "2026-10-16T22:15:44.474Z" },+ { url = "https://files.pythonhosted.org/packages/39/4b/f2ed53d83aa44ac19599ac0a54897f867fafb95f406980d1e24083f8cbe3/pillow-13.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:fc481f742ccda20e9ed760b8f978dff50f2a4e9bc253ac167fb0a05b0783ef52", size = 4852329, upload-time = "2026-10-16T22:15:46.284Z" },+ { url = "https://files.pythonhosted.org/packages/3b/bb/9e30e8ed18c20800ee327a12107d5249ad8dc444867b3adfcc21654e3c71/pillow-13.0.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8bf295fe459343bc6093c8e5e0df60bfa189e0fcb775a22e2c2488fdeccc6c0d", size = 6519309, upload-time = "2026-10-16T22:15:48.14Z" },+ { url = "https://files.pythonhosted.org/packages/e6/99/fdf65cc539e266ab93546c261bdf98411fe165c6e4e13f9dbf597097192b/pillow-13.0.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:42d63be3af4f9b951b199b0a9d23365d37ab14687e6d77b74940432c8515c4ca", size = 7144542, upload-time = "2026-10-16T22:15:50.093Z" },+ { url = "https://files.pythonhosted.org/packages/26/9b/f38b7c4d8f599537e2d1a6d546cec9beef7536ff8f5c49a3f9c78179d8ac/pillow-13.0.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:4bd024d567eca931b668978d672dba914d4b8e2628e2c3073a2ad178de8a2620", size = 6618042, upload-time = "2026-10-16T22:15:52.054Z" },+ { url = "https://files.pythonhosted.org/packages/a8/7c/45ee28531f89ee4582967d8a17f7a26d71ca64cd902b93c269590cd60a00/pillow-13.0.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:23edf4ec4b6f4f240e8df6e4985e9ee2ced86474632433e55fb1e2548744bf40", size = 7228137, upload-time = "2026-10-16T22:15:54.009Z" },+ { url = "https://files.pythonhosted.org/packages/01/bc/9c2a969cb1b70201d04fa17fd5aedf02a732870b8da86bceaaa30b0ca385/pillow-13.0.0-cp312-cp312-win32.whl", hash = "sha256:02464da86f561f410e13b061ec37c3068a9cb557a095494157742d07b3c24a27", size = 6515423, upload-time = "2026-10-16T22:15:56.25Z" },+ { url = "https://files.pythonhosted.org/packages/ff/cd/73a79ecdc822076002eb24b5e1e4a530b0bb5310fcb6d239abbec877110b/pillow-13.0.0-cp312-cp312-win_amd64.whl", hash = "sha256:ff3fe9eb621fbb9db4c4be33ab946f6bac5f98ab50ca8d3260503653656c961b", size = 7272166, upload-time = "2026-10-16T22:15:58.597Z" },+ { url = "https://files.pythonhosted.org/packages/4a/a3/be5a1236efd085b3984e4305da8f179ae9dab80c991d2ad78f2bd5c4c843/pillow-13.0.0-cp312-cp312-win_arm64.whl", hash = "sha256:c3bc8ee0271387e0b1e3ad0ff893645990a656e79bf9c42f4f734a3642b11d51", size = 2698943, upload-time = "2026-10-16T22:16:00.637Z" },+ { url = "https://files.pythonhosted.org/packages/82/e2/9132d38df320e8099e2642d9fa538f18a7dfebf68a875a31725dc2a115aa/pillow-13.0.0-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:e98b4f91f99b24b1da72e10621ba181f7281922384a7403094debb4199de6c00", size = 4190620, upload-time = "2026-10-16T22:16:02.527Z" },+ { url = "https://files.pythonhosted.org/packages/cb/be/436dac0996876f65ef1916ffb711c5ef4af2ebc57414b6f16642e07f6b47/pillow-13.0.0-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:34fb3db1149c879343861831728c243c432d4a5afc8f1878ca7612ef8de2a033", size = 4290286, upload-time = "2026-10-16T22:16:04.861Z" },+ { url = "https://files.pythonhosted.org/packages/60/16/7c1007162e4169ea0d5bec47e2e0b2174f56c50cf5b8c02a1dc23e41037e/pillow-13.0.0-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:2d50500a4a3bc6469adcdb319cf05d688b08ca3bf0f22a05339f3b25b433a599", size = 3723169, upload-time = "2026-10-16T22:16:06.956Z" },+ { url = "https://files.pythonhosted.org/packages/08/bc/578ab2eaa04705a8978bd9be0fe15c3d43a8fc95097c4f7e39540e79e4fa/pillow-13.0.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:ef5fe6b7db3f501c56000ba8fe7c7e1a35ca1d45824fbeb95a67daa85cff4dbe", size = 5568469, upload-time = "2026-10-16T22:16:08.664Z" },+ { url = "https://files.pythonhosted.org/packages/98/c8/ccede3dcc4f274b80fb49199eed1ef34ba05566c8b71976b9d1f111da2e3/pillow-13.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f11a3c1358bb3c68012a7b1f41b223c3db9f7bfde90b481df028cfe1c3363313", size = 4852187, upload-time = "2026-10-16T22:16:10.693Z" },+ { url = "https://files.pythonhosted.org/packages/fb/3c/cd0770e96d20bfd990db024bcbd43897ff3e88da1f4782cf90ea231b1d4f/pillow-13.0.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:19b66ca0a4d25cc0200b381ce824c7ea090db61427315e73cfb05dbf1b35c369", size = 6515908, upload-time = "2026-10-16T22:16:12.896Z" },+ { url = "https://files.pythonhosted.org/packages/ef/fe/f5cdaa2d1c4086e757430f368c271a58ee29cfe7378e7ae7b9d964015c25/pillow-13.0.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5f56499c1a74d2b862beb0c33b8016f99d095858455df9d21583bbbc1c15b582", size = 7142544, upload-time = "2026-10-16T22:16:14.844Z" },+ { url = "https://files.pythonhosted.org/packages/fb/b5/a54f6d44adbcd23737c8c12953f42be107e4cca64e247c0ca3a5b563061c/pillow-13.0.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a2a14cd73d5e6c927f644b0110ee81f59c4ef506259ec9183904747f2caacc81", size = 6613097, upload-time = "2026-10-16T22:16:16.893Z" },+ { url = "https://files.pythonhosted.org/packages/e6/b4/9e6c1207c21b2e91db0d15c16d30f3701ce5add1bd4da0e787761e66cb6e/pillow-13.0.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:08b826a9bf1265c76de04a42061d61ea6b109418b7826f28ff1ecdfaa26c5502", size = 7224846, upload-time = "2026-10-16T22:16:19.195Z" },+ { url = "https://files.pythonhosted.org/packages/78/9f/d3c3cb0518f3dd1eee0ef501535f53d15597a53c5c4118d178086143397a/pillow-13.0.0-cp313-cp313-win32.whl", hash = "sha256:12b0fa15879fe5a9d9eebe66e4e2d74128a773b1a4448010c9c714f45e04b9d8", size = 6516013, upload-time = "2026-10-16T22:16:21.389Z" },+ { url = "https://files.pythonhosted.org/packages/d7/ed/1b16fb66a37e1b9e41370b93b2c614c7da761a5b2a41dc333f7af4639962/pillow-13.0.0-cp313-cp313-win_amd64.whl", hash = "sha256:9dda0788a9932776a75d8bcc020076edc308ce2508b51f6739a45e3158b3fc42", size = 7284777, upload-time = "2026-10-16T22:16:23.393Z" },+ { url = "https://files.pythonhosted.org/packages/87/7d/8d02eba9f7ecc87f8e90f731e032cc4773802f2a843763afd0c66a535ff4/pillow-13.0.0-cp313-cp313-win_arm64.whl", hash = "sha256:40a266371ece581e5de13b6635ef78d7487824af80561b6ca27694a88c19bc0f", size = 2698826, upload-time = "2026-10-16T22:16:25.382Z" },+ { url = "https://files.pythonhosted.org/packages/8e/45/fbad9c7f5e2f1745c373a434d46072bc84eddfefaa28b852425ac957fda6/pillow-13.0.0-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:44629d4498c9cb6b2051806155f22141df0d8a929c56134b166655232dfb2f8c", size = 4190721, upload-time = "2026-10-16T22:16:27.524Z" },+ { url = "https://files.pythonhosted.org/packages/a2/bf/2074902a259a90692c5dbf132885d21671644cbbd3f690047516243a55db/pillow-13.0.0-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:bf97ba1b5542050e9b0c74e632323b6d8136cc99d64e193abebee22fe6013c76", size = 4290236, upload-time = "2026-10-16T22:16:29.562Z" },+ { url = "https://files.pythonhosted.org/packages/ff/a5/3d1bb93b8ea38d15d21356c1b8e9f50971ac592aaa248f7fb71739094c0e/pillow-13.0.0-cp314-cp314-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:aa694c49787040943570d61c9b8fc01271bd2a2cfdd55f0d896f8aecdce1a981", size = 3723093, upload-time = "2026-10-16T22:16:31.249Z" },+ { url = "https://files.pythonhosted.org/packages/84/a1/be060135d85187b25fa8b2573786c0e45c62ae27527fff5257675eb97f4a/pillow-13.0.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:49c12af515073e9bf511e4ef736743bf70d531a643668722279314b937742ba4", size = 5572253, upload-time = "2026-10-16T22:16:33.103Z" },+ { url = "https://files.pythonhosted.org/packages/b5/f4/0bf6f1ac9ba7ee2ffe9914aeb410a1035a0c1a3c42f122388d7fc950bc4b/pillow-13.0.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:d9b0a2bee3f3e03e9f29057aedb807dbf1e1d96ee1b9d0f422d9db6c8583271d", size = 4852269, upload-time = "2026-10-16T22:16:35.102Z" },+ { url = "https://files.pythonhosted.org/packages/83/16/b603274617b3e6728da3a0133d4fba1ea8d7fbe0c4ea5fef9cbffa398b8b/pillow-13.0.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5933fcea5a5ba64c686f55c886a115cbfd92f2900460784a1e79909fdbafd7b6", size = 6516058, upload-time = "2026-10-16T22:16:37.228Z" },+ { url = "https://files.pythonhosted.org/packages/1d/f2/1371707ce438ba9a43f9d24089828494ec6f9396e28cd7903aa704dd6306/pillow-13.0.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e91c2b1cbeae768c98752e67e717e283d68dae45717b41f2d91eaee648e37b7d", size = 7142574, upload-time = "2026-10-16T22:16:39.172Z" },+ { url = "https://files.pythonhosted.org/packages/b9/a9/62cf68587f910bc87c5951bcb6e9430c7643a65076adf5f18b4bf350e2bd/pillow-13.0.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7f6299e494e46253d40c34653cac369412f44ca53b5f85d848d3f95b1ed0546c", size = 6614295, upload-time = "2026-10-16T22:16:41.117Z" },+ { url = "https://files.pythonhosted.org/packages/6c/c9/9e9b48178649730299be0bafbf5f810a5b6977538f5a92d47e4ba5f5d608/pillow-13.0.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:f9bd7d260d986f3553518c5d723544346fa48031f8aef3265d786aeb59845bc0", size = 7224841, upload-time = "2026-10-16T22:16:43.118Z" },+ { url = "https://files.pythonhosted.org/packages/8f/48/c44e91384b1b6c072a714a63d00608acc16a6a968735e478e4be4384e5ac/pillow-13.0.0-cp314-cp314-win32.whl", hash = "sha256:2e31c4e68cffd7b1f116127626813b82fcba19edf6b940a7b0c266d6484d0055", size = 6508694, upload-time = "2026-10-16T22:16:45.883Z" },+ { url = "https://files.pythonhosted.org/packages/50/e2/7ad17747517e4c813dca78257d6bb593466f8231baf1384bc98d92745edb/pillow-13.0.0-cp314-cp314-win_amd64.whl", hash = "sha256:f7cbb7a64e7ec664775195e4f81923bc8a93d9451b963f844e59118f63147a7a", size = 7281830, upload-time = "2026-10-16T22:16:47.725Z" },+ { url = "https://files.pythonhosted.org/packages/41/9f/e5b51f2ce8ef4563215334035403ce61a244f93a2e65c24a940131618f87/pillow-13.0.0-cp314-cp314-win_arm64.whl", hash = "sha256:a6aaa7871aebca081eb5c45f83e845bbd9712ae99fa9286dbfdcee835e63f4b4", size = 2695468, upload-time = "2026-10-16T22:16:49.515Z" },+ { url = "https://files.pythonhosted.org/packages/97/73/a53502f731f6c84805a4ce87a8881e86d07a65aee64728b900d112dc703e/pillow-13.0.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:7b999816b5850a35ada08443e6e03945f1f6488144a83afe2d37b240a552aafa", size = 5578196, upload-time = "2026-10-16T22:16:51.291Z" },+ { url = "https://files.pythonhosted.org/packages/21/50/7e949959a56b5559c78ef172b70fc6025706acb289f3f648a15329e4fa6f/pillow-13.0.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:67871a13cf47275201553b536c025da777f997fa562a19eb798af4ad4b97c18f", size = 4857276, upload-time = "2026-10-16T22:16:53.399Z" },+ { url = "https://files.pythonhosted.org/packages/c9/52/43ded0ac08e77e39d17bd6d894162572201b5e8fdc4a022b14c55a1960a4/pillow-13.0.0-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e8ca8f69b7c77fa96dad99f8638c1fc4f1c0bed4acaa1baf7a3c31bdb80a0ab1", size = 6607008, upload-time = "2026-10-16T22:16:55.525Z" },+ { url = "https://files.pythonhosted.org/packages/0d/2e/4a57ed216d5bf877387cba4d44c02aa87abe51ad2e06404aa6b597c4da39/pillow-13.0.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6bce6a29c3898191f4c9998e4d4e8f69790caeabde46e54da4bc235ce5bde683", size = 7224281, upload-time = "2026-10-16T22:16:57.738Z" },+ { url = "https://files.pythonhosted.org/packages/5c/3d/2929b248e135752d63aaeabf53f6de797e905b7b6263f9c1e2adade20aba/pillow-13.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:816752a5ef76a80484c8c441c85593b7ea9304f6231fc5776ad1fbff7e773058", size = 6695600, upload-time = "2026-10-16T22:16:59.842Z" },+ { url = "https://files.pythonhosted.org/packages/bc/33/fb0da992cf084ed1ee6ee05e96b6191e35c351eb707ca2df874feb24ce47/pillow-13.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:5bdb38ba220b61b4ec31dd1046dea6b016d3c6850a23f43ed8b58332b2fc668e", size = 7300589, upload-time = "2026-10-16T22:17:01.686Z" },+ { url = "https://files.pythonhosted.org/packages/bb/af/c30dd9ef6a3dce84ecb1b2393cac629047a32e66279056c6cb46c3ffd65c/pillow-13.0.0-cp314-cp314t-win32.whl", hash = "sha256:06903aac074d00c988e77a1fc435286dc498506d4ca8d6f69df9babddf4ecc15", size = 6517204, upload-time = "2026-10-16T22:17:03.722Z" },+ { url = "https://files.pythonhosted.org/packages/85/d5/ef3a8ae7609c8ab26570abf18194882534b480d245a9148b895a2262c004/pillow-13.0.0-cp314-cp314t-win_amd64.whl", hash = "sha256:9a635068d9793c7f0d929f39f18b58f1bd86c236e8e7b64167b86af9232ebca0", size = 7286695, upload-time = "2026-10-16T22:17:05.543Z" },+ { url = "https://files.pythonhosted.org/packages/84/3c/0861db0c69a03689ebe3e7599d35668a414deb5aaafd8255215e4e62e3d3/pillow-13.0.0-cp314-cp314t-win_arm64.whl", hash = "sha256:0d1a9cf7bc6917538b20f8d06b9ab2147e542f68849e96fc58eb66bdf6acc692", size = 2698098, upload-time = "2026-10-16T22:17:07.674Z" },+ { url = "https://files.pythonhosted.org/packages/6e/eb/e86a41962a3a31ad495a3d6a912d9002b01bba4a6fa71c28703abdca7f69/pillow-13.0.0-cp315-cp315-ios_13_0_arm64_iphoneos.whl", hash = "sha256:7d5e097eabd5d4915c27ac9f6e9325bb1e01a7c94d7348b5c4451d3fc30e8521", size = 4191213, upload-time = "2026-10-16T22:17:09.449Z" },+ { url = "https://files.pythonhosted.org/packages/dd/04/7e7445e706afec84ef06dc25b2c77f9cecff242c23730c62928ad1089d4a/pillow-13.0.0-cp315-cp315-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:51ebb529fc5e8abdd55302f6c3f8943037348ec2384329a3e55677f69ae2fdfc", size = 4290650, upload-time = "2026-10-16T22:17:11.196Z" },+ { url = "https://files.pythonhosted.org/packages/46/85/d534089068ac40c0f61f650389a296c812eab745a8a733f81feec39ae955/pillow-13.0.0-cp315-cp315-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:c87a04e7f152ee4db5dbe15f0bfa3fe628a1aeedbe66b81c43b87f52c813f9ac", size = 3723078, upload-time = "2026-10-16T22:17:12.772Z" },+ { url = "https://files.pythonhosted.org/packages/ce/2b/00b5c3b401df538b5dbe311d3899730fae5ba1e21cb8b80a128887ac6747/pillow-13.0.0-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:20722cd5375533ad754053363a80b8fb30c79d37930a6f7228030e237ce3bd5d", size = 5572292, upload-time = "2026-10-16T22:17:14.539Z" },+ { url = "https://files.pythonhosted.org/packages/72/f5/a6b0610f946e9b54ae888ba7ad29d6e2f8d9b11f69e212d70416b7186c09/pillow-13.0.0-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:04a63720f79e22fd54d897c233a68314c50ca0603360f54ce2bd5db8f0f43782", size = 4852222, upload-time = "2026-10-16T22:17:16.521Z" },+ { url = "https://files.pythonhosted.org/packages/1e/d0/c0ff25bb0427ec70f32aac995453321fc3c4494a46c7292ff02d9d260b04/pillow-13.0.0-cp315-cp315-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4f8db54177035a2b5f717f94475b74907e12a96dc74f6d487f3966b0a4694071", size = 6527349, upload-time = "2026-10-16T22:17:18.534Z" },+ { url = "https://files.pythonhosted.org/packages/85/11/e46fa0bcc0fc117f1eacc206b3d51f04d583fab328b4b740672d0438d83f/pillow-13.0.0-cp315-cp315-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8f36aa77f74b14a2103622b196402c71330e4e7cf4122ee45c854e9a01e0eecf", size = 7152873, upload-time = "2026-10-16T22:17:20.415Z" },+ { url = "https://files.pythonhosted.org/packages/7c/53/2bdeca705f3a58679fa9201233193c86a30238340ca29b3a152c3fcc719b/pillow-13.0.0-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:149a1c323ba366f90b48e6f1a6db6582eb50512df374588de56fc909abc0f0f3", size = 6626871, upload-time = "2026-10-16T22:17:22.361Z" },+ { url = "https://files.pythonhosted.org/packages/14/de/3829030f209722ade3753bb456b805a0e7f885cf885b483407365c82e9ca/pillow-13.0.0-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:e892354a424b1e82a78ba16785822bdd40de06f19446a3d4a28047df1a4f8932", size = 7236439, upload-time = "2026-10-16T22:17:24.352Z" },+ { url = "https://files.pythonhosted.org/packages/44/b1/67fc37388382bc036a74f04da5bb6fcbf90ec3ac1f45893e06176c373fd3/pillow-13.0.0-cp315-cp315-win32.whl", hash = "sha256:8e459b613cf31f8980f584387b4fe47bf08e076e288d61aa8eba1f7fd4ddbb81", size = 6508688, upload-time = "2026-10-16T22:17:26.314Z" },+ { url = "https://files.pythonhosted.org/packages/44/05/fdb6a79aee10861165526b41b7b440e36ee1ff58613b2fbefe3acbf06d4f/pillow-13.0.0-cp315-cp315-win_amd64.whl", hash = "sha256:d4737f50d23ddd11d6685faacbb9252887dde0bc7997127757247983d74399d6", size = 7281107, upload-time = "2026-10-16T22:17:28.198Z" },+ { url = "https://files.pythonhosted.org/packages/e6/9c/6c6f7dc2a566467baf121394e83de25ac287cffe34cc030726beb4be0224/pillow-13.0.0-cp315-cp315-win_arm64.whl", hash = "sha256:2310e2adfc13c6d457d7d0f2ffdd5c56a74a317650cf765887df8d515a647ac0", size = 2695513, upload-time = "2026-10-16T22:17:30.013Z" },+ { url = "https://files.pythonhosted.org/packages/23/16/e9120defdb8bff693b582d035312acc6f530cdc2bc5238a87f410efccd82/pillow-13.0.0-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:21c32061a5512dc13f87cc7303e120e4d77c2f70df89a35af0e3ce246e5ac57f", size = 5578129, upload-time = "2026-10-16T22:17:31.642Z" },+ { url = "https://files.pythonhosted.org/packages/47/22/76faf2bb2448f48a84cf894c1e2bb1090d7d2b1aa521ece131cb2f05d631/pillow-13.0.0-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:1c774b9c0ba0d0b356f71530677b39028878a2cae5a93e0a13779cfd17120f88", size = 4857428, upload-time = "2026-10-16T22:17:33.43Z" },+ { url = "https://files.pythonhosted.org/packages/b3/64/0861ea4e03c50b14af9ed9dd8b9f388ab42f445c623a9fcbab19aef7aa55/pillow-13.0.0-cp315-cp315t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:20822140c9a2ba9c5e42df342b0a892ab2e102fc0e3db967a133bb9ce3f898bb", size = 6612582, upload-time = "2026-10-16T22:17:35.415Z" },+ { url = "https://files.pythonhosted.org/packages/5c/20/cd1e9b3f60a9f3d5ebe46da36955c26004092a501f7f2c42f9fcc26611bc/pillow-13.0.0-cp315-cp315t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ffea6b2986a797c84b6d1d27d4f43e0b83c73fc16281a930891cd237cf0d08fe", size = 7230176, upload-time = "2026-10-16T22:17:37.362Z" },+ { url = "https://files.pythonhosted.org/packages/b6/ef/ffb0a2fc85690714fb7ac662956949645d57f15bf4426f520da361e7b6e3/pillow-13.0.0-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:05cd2cd39055d0b9650060e4513ef4a9a0aea870083950bd046a0d6490f93a22", size = 6703640, upload-time = "2026-10-16T22:17:39.313Z" },+ { url = "https://files.pythonhosted.org/packages/e0/c2/6402ee3ccb3363aeed8fdb3f9fe56703ac5377a539f0b81b53999d7e121f/pillow-13.0.0-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:c6fd031333dedcad7ce3e03d244093f43504f209e86925ebdb2b868fa4037630", size = 7309231, upload-time = "2026-10-16T22:17:41.021Z" },+ { url = "https://files.pythonhosted.org/packages/fc/96/d6b82e8b8c06ad143b66b12e0b31051e4bf489b4fabca1f390a14fe1ebde/pillow-13.0.0-cp315-cp315t-win32.whl", hash = "sha256:c50c80e3591e5cf9a8dfa6007d4f10732f02e32263850999286e56ccd650cfb2", size = 6517200, upload-time = "2026-10-16T22:17:42.886Z" },+ { url = "https://files.pythonhosted.org/packages/60/d4/0062e6005e9b270b165015aafd343364ac378ec5a685431ea42baad33357/pillow-13.0.0-cp315-cp315t-win_amd64.whl", hash = "sha256:adb3c2124c68e480f4632d06cb7caa3b48a51678475f483b4edb1c6dee29ea43", size = 7287488, upload-time = "2026-10-16T22:17:45.56Z" },+ { url = "https://files.pythonhosted.org/packages/e4/81/b8eb349746be7bce47dd95337c6634e84910af91b59aaa9159c034c614fa/pillow-13.0.0-cp315-cp315t-win_arm64.whl", hash = "sha256:4a25756244bdcce3b50580baadf320fa48297f0eeb8e114ba64139a40d4d0fc8", size = 2698073, upload-time = "2026-10-16T22:17:47.556Z" },+ { url = "https://files.pythonhosted.org/packages/68/c0/fb7b1caf25ed5ac5d46116f09b8b0706b9559833c65c667cecb1a53153f2/pillow-13.0.0-pp311-pypy311_pp80-macosx_10_15_x86_64.whl", hash = "sha256:405be6058e206a86fedce2f715ecc2343f94072d7925251632dffa2c05f70dca", size = 5521630, upload-time = "2026-10-16T22:17:50.008Z" },+ { url = "https://files.pythonhosted.org/packages/1a/e6/4d11d5b1137f4fc080605cce410cfaae4f303ad400bdec75d27d3083fa29/pillow-13.0.0-pp311-pypy311_pp80-macosx_11_0_arm64.whl", hash = "sha256:b84be41387fc00db28c13c02e30d42b02d8d8f6a4a741a1aee6012ca7f1f6039", size = 4806023, upload-time = "2026-10-16T22:17:51.932Z" },+ { url = "https://files.pythonhosted.org/packages/f1/45/0923202a658e8ff6aafd72c1a4395ebadcdebaa182c437d8595d3dd3db32/pillow-13.0.0-pp311-pypy311_pp80-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a192360d512305fe92d3053e4f7627bbad1f7708f1f4ad38cccd9336acabe9ad", size = 5464831, upload-time = "2026-10-16T22:17:53.742Z" },+ { url = "https://files.pythonhosted.org/packages/07/52/d3e38f0cad1dadea2a658b9a7d6ba8a04048f5ae14f011b806e5c3bd6bcb/pillow-13.0.0-pp311-pypy311_pp80-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:83b37abd87b590acd8f47ca8a61f70893322b11834d36e07c2298dacad4d14d2", size = 6043133, upload-time = "2026-10-16T22:17:55.625Z" },+ { url = "https://files.pythonhosted.org/packages/c4/f9/2ed7685980c1d64f8131a7d87a19c369424747577152622b73ddeff163b7/pillow-13.0.0-pp311-pypy311_pp80-win_amd64.whl", hash = "sha256:73ee25cf8cf8b75d5a5aeed7cb6588f5e5dbfbb0fde51707b630bbb23897645c", size = 7365208, upload-time = "2026-10-16T22:17:57.509Z" },+ { url = "https://files.pythonhosted.org/packages/60/da/f6d644e631c5b370c5d0b899f3ccadd2780aab070b29a110527cf4e1fd2c/pillow-13.0.0-pp312-pypy312_pp80-macosx_10_15_x86_64.whl", hash = "sha256:8619685cad8efc4c38c66d3b36aad854523297c43d748b3b6f0cc03c90ba3463", size = 5523188, upload-time = "2026-10-16T22:17:59.334Z" },+ { url = "https://files.pythonhosted.org/packages/e4/b0/2594f202d743a35d4fe80682bfd96f277e5ca7aecb27cf64ef5bfc1d000b/pillow-13.0.0-pp312-pypy312_pp80-macosx_11_0_arm64.whl", hash = "sha256:7e91e97a929232cdb828889ee6ad0e48d7f40f4ec38818f4e4a8968b2b1af22e", size = 4806808, upload-time = "2026-10-16T22:18:01.188Z" },+ { url = "https://files.pythonhosted.org/packages/8e/ed/d504165ef79af6fafe25c76726cf30f544cc236002f7ed054f1d51adc4ff/pillow-13.0.0-pp312-pypy312_pp80-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:93ff9c9c3663ce23aaa5d0b6b6abac55359e2a0c06c7e30f3771829af816be63", size = 5464358, upload-time = "2026-10-16T22:18:02.779Z" },+ { url = "https://files.pythonhosted.org/packages/7b/fe/a10aba5503ca13e9e009b8bd0a1a4ce5584bdce246245fd6f3a83701369c/pillow-13.0.0-pp312-pypy312_pp80-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e65dd6e75de67b2362a4fa3e16aa627595f65054dc4ec73d64680c84d592fa61", size = 6043514, upload-time = "2026-10-16T22:18:04.538Z" },+ { url = "https://files.pythonhosted.org/packages/c0/37/66b12dc476041fe523bca29c9d58fbf1ea92a4eaf73acfb9e993948f1191/pillow-13.0.0-pp312-pypy312_pp80-win_amd64.whl", hash = "sha256:567f20f1c75897d7663830da6ea8af719e03d712b1d9ee7f813319f9ece42e5a", size = 7366030, upload-time = "2026-10-16T22:18:06.638Z" },+]++[[package]]+name = "prettytable"+version = "3.18.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "wcwidth" },+]+sdist = { url = "https://files.pythonhosted.org/packages/81/74/ba08d81e668ccfe8658d7520a307e63c19862c08eb4ccb26f356c5239a7a/prettytable-3.18.0.tar.gz", hash = "sha256:439217116152244369caf3d9f1caf2f9fe29b03bd79e88d2928c8e718c95d680", size = 76373, upload-time = "2026-06-22T16:07:50.174Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/fe/be/2e6798ace5cc036f5d05d36b7b2fd85346f1a708c87060890b070d0ec607/prettytable-3.18.0-py3-none-any.whl", hash = "sha256:b3346e0e6f79180833aebaac088ae926340586cf6d7d991b9eb125b65f72313a", size = 37357, upload-time = "2026-06-22T16:07:48.595Z" },+]++[[package]]+name = "propcache"+version = "0.5.4"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/b3/9a/9fbf4e4ec0c2d7f1c32519fff782ef467859b8faa9fbc5331a96f6395d43/propcache-0.5.4.tar.gz", hash = "sha256:ff6b113f50bc066a698db5d944d2c6dc7507168dd3341e255a8892fd0715a558", size = 61545, upload-time = "2026-09-16T00:17:14.386Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/ec/dd/997704118aea215cc5f65c277f5323657b4ba44c1f9a32fb11c8064e4997/propcache-0.5.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:b77c313314524ca9c38fbd70f73515d04597ac58c40c939bc0e71eeb4abff680", size = 87225, upload-time = "2026-09-16T00:13:43.864Z" },+ { url = "https://files.pythonhosted.org/packages/3e/6d/ceeca1762ed51230c08d557591404f844ecef5e294550136155572f7faae/propcache-0.5.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:8f911c395cef73c510bac566da9507bb6a43e7763d0c79138dc60ee53f11207e", size = 50809, upload-time = "2026-09-16T00:13:45.33Z" },+ { url = "https://files.pythonhosted.org/packages/ff/9a/6be90814d8762952594a9e380161802541bff690f3a2e011dcc28ec193ce/propcache-0.5.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d83b12902eb8bce151259c86c03ba746600b2d994543de46e370cecf96c452f2", size = 52552, upload-time = "2026-09-16T00:13:46.48Z" },+ { url = "https://files.pythonhosted.org/packages/bf/d1/7fd3ffb5ca0e669a8fbf55d9fbb17c50ff5f44becfefcab27a9b9b67908f/propcache-0.5.4-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c9281e922c072158c91974d4589f1dbe0fee6d467f284c28e463f9f5a4d933f4", size = 226804, upload-time = "2026-09-16T00:13:47.739Z" },+ { url = "https://files.pythonhosted.org/packages/74/87/a3e199c45b26587f073db655d19c30d2144b0f883827ba6ab77acf5c7d45/propcache-0.5.4-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:9f3551b8a35c1df3e7ea4d2d86edee15f0dde1bddd434a71744048683544d0ef", size = 234452, upload-time = "2026-09-16T00:13:48.98Z" },+ { url = "https://files.pythonhosted.org/packages/12/7c/08c15c7df256f94a6b4563f74165c3242fb554cdd1909b661d093c31b976/propcache-0.5.4-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:ec6a85f424afa8d23e0d9a094e5dbb6eda01da91c92b9183cd433768247ffc97", size = 240399, upload-time = "2026-09-16T00:13:50.416Z" },+ { url = "https://files.pythonhosted.org/packages/f0/51/5adee15e12a7e314cece4543fbf295b0fe1b504dc78b32dff4c8eb1e29b0/propcache-0.5.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f574e460d1c8a08384a016fdb09ccf3543433263ed6b2f97104f979e64ea57c2", size = 224251, upload-time = "2026-09-16T00:13:51.874Z" },+ { url = "https://files.pythonhosted.org/packages/9d/53/54bd510bb5d473edf66914602885226187218b4e3a5017e9dd80bceea41f/propcache-0.5.4-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:d8e017eeb7482bed34cdb0d61cf2bcfc88d104bbab296a17cd16a6af8aabc70e", size = 202721, upload-time = "2026-09-16T00:13:53.524Z" },+ { url = "https://files.pythonhosted.org/packages/6f/b4/a468700d0526dfb2ca6af5d790125de5894acc7d8ecd99243ecedfa4c4cc/propcache-0.5.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:f273dcf7149a50527c4fd1f55cfe9eac0f60753f5af544b4c9352578e20c0874", size = 219148, upload-time = "2026-09-16T00:13:55.068Z" },+ { url = "https://files.pythonhosted.org/packages/6b/d4/bf563e19ac9a5cc47113431337fdf2ee3573859f3f3e0a58e59833e9b75d/propcache-0.5.4-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:fc2461ecc45f17893f8207e73b46ea8ba93e33630e51cf4af3fbc21d47462b1a", size = 211011, upload-time = "2026-09-16T00:13:56.588Z" },+ { url = "https://files.pythonhosted.org/packages/4b/3d/0189b6537f4a8cd795e685a130a6f47aeda78a5b7b062574705cffc685ca/propcache-0.5.4-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:279655a16973f1ee2bd2fe79973137681642fd9ae0d89215bba263726eb0dc3a", size = 228148, upload-time = "2026-09-16T00:13:57.913Z" },+ { url = "https://files.pythonhosted.org/packages/ce/b7/59c16e245a549df202b4ebe2de91fa58a67dc4373df9840e372a64224dee/propcache-0.5.4-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:e9f165403b81fea7e89c932d89046a1e3d9a3a60e8d7ef2f249dccdcb0982bf5", size = 201432, upload-time = "2026-09-16T00:13:59.453Z" },+ { url = "https://files.pythonhosted.org/packages/41/0b/7b19eb20bb0b1f9476d08f6e387ae094dc6870fc06d459ea1f35f28b25d3/propcache-0.5.4-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:1783582065a1f07f9d9ee1e992e13f15d7dc8fb1eb3a7476d43eb3f2e69d26bb", size = 228923, upload-time = "2026-09-16T00:14:00.731Z" },+ { url = "https://files.pythonhosted.org/packages/3a/f9/b1a0bd47218216b935d019912d6fec1676ae7c07f15fa82bfb54b8d58976/propcache-0.5.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:3d605bb239b796e82a81c6709548b2bd460ab73b4590cb0c83de8a2dd9694d0f", size = 218327, upload-time = "2026-09-16T00:14:02.091Z" },+ { url = "https://files.pythonhosted.org/packages/55/c0/51e5d1ad504e9529831606534c48e272db751072eee9ff07e4abe37e50bd/propcache-0.5.4-cp310-cp310-win32.whl", hash = "sha256:141fdbd73748db0cf7636035030aaac383d2efde8f34e7bc24594cc776d225b8", size = 43096, upload-time = "2026-09-16T00:14:03.427Z" },+ { url = "https://files.pythonhosted.org/packages/80/57/0a0b4b1122f4ed5bcd1c626d910003cdf5282c2a12f8a1cfa17970b3ded2/propcache-0.5.4-cp310-cp310-win_amd64.whl", hash = "sha256:146f48a9e4812611a7581003b1a39de56c34967046310c4171a68ef908c9a745", size = 46589, upload-time = "2026-09-16T00:14:04.581Z" },+ { url = "https://files.pythonhosted.org/packages/66/87/e71b24adc8ece61782ba3d6f3879e6a07fdb85bce21a9c529524184e3ec6/propcache-0.5.4-cp310-cp310-win_arm64.whl", hash = "sha256:6c7599df2b57ebeea8de011b5f2f7b85de95e76037d43d34b95e328430275487", size = 43982, upload-time = "2026-09-16T00:14:05.728Z" },+ { url = "https://files.pythonhosted.org/packages/1e/40/14b21e505b7921617466576423f188a5c9caddfdaa1cf4b2b8a83d8fe216/propcache-0.5.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:897d1ddf6716e8f47200f7aad9a0efa6cc7586df66c6defa572f9eab379c078e", size = 86393, upload-time = "2026-09-16T00:14:06.9Z" },+ { url = "https://files.pythonhosted.org/packages/e7/4b/5a52e1a7b43563f7d408814194bb23cc8bf214eb6b86639b667a33a8d0d0/propcache-0.5.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:9cbfff4423eef4cc6cafc021469641a2b835f610b2647a6c5281903e21b8670d", size = 50431, upload-time = "2026-09-16T00:14:08.025Z" },+ { url = "https://files.pythonhosted.org/packages/05/cf/b5248180bf056cc76acc60c9c6e8c0ebbfdbd1c6cffd31fd14996927b7c8/propcache-0.5.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3fc24f209c1b7f7f688b66b98293954f5504279760999b58920ee12dd8471c1d", size = 52116, upload-time = "2026-09-16T00:14:09.114Z" },+ { url = "https://files.pythonhosted.org/packages/86/a8/7c6cd6bfead1a11f2e411e688640e6d26574cb0bde7dcaa7423b0b65ed7a/propcache-0.5.4-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:62530ca89187827e4a4fe733f971abe81a7542eeea48ff61995f19b64d7199c8", size = 238729, upload-time = "2026-09-16T00:14:10.357Z" },+ { url = "https://files.pythonhosted.org/packages/5c/b4/442715b2e980df51be52d203549279e027728f24c80b00b5e525e31cd5ea/propcache-0.5.4-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:56fc3f7599528db40b1efa0889a620116e2704144495273d66066e8164e45838", size = 246121, upload-time = "2026-09-16T00:14:11.735Z" },+ { url = "https://files.pythonhosted.org/packages/bc/5d/df0684fc2b1732a01a7bec26d7897369022712422d25b09c37ce7dbc88a2/propcache-0.5.4-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4f2d880ff60f45898f4acfa152aac8d04e3ee627d90ff4003491bf92239d5757", size = 251735, upload-time = "2026-09-16T00:14:13.053Z" },+ { url = "https://files.pythonhosted.org/packages/c7/06/519a5ebb48b6f94beb48396e55c905f12246a25c3a3608a7ec7bceabf50e/propcache-0.5.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6e9368e87a3efc285e559131092c5db643eb8e56de4ee42064d5baec22ef2bb5", size = 235381, upload-time = "2026-09-16T00:14:14.398Z" },+ { url = "https://files.pythonhosted.org/packages/3c/07/1e0a9bb310830f2245edbd5cd3c6d24a783c053c4efd8e08e386e513c940/propcache-0.5.4-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:004e685b315646c410771836e72a44f143bbe624f29653a42687815069a303d5", size = 208973, upload-time = "2026-09-16T00:14:15.715Z" },+ { url = "https://files.pythonhosted.org/packages/62/5c/9324fab27d6088eecc47fe4332bf7aaf8c1ded93c36f558391e8a06d41a7/propcache-0.5.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:594eb4c6ec35e7179b058481f4e9f02521b56de16fa577c4b85c76fb1bf8a9f8", size = 233897, upload-time = "2026-09-16T00:14:17.25Z" },+ { url = "https://files.pythonhosted.org/packages/9c/a3/570d92fc952eae93b676f3a1568f4b89264102abd3c982ab6a9ebec58dcf/propcache-0.5.4-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:2dba2f02d2d5c09ef8a0e6c1a42aeaa451f4be9898cb00b04fe98717da2eb23b", size = 223512, upload-time = "2026-09-16T00:14:18.87Z" },+ { url = "https://files.pythonhosted.org/packages/65/47/26810d889d89bba31db397e6a88f8984af775f5ed6bad0a29dce84324cff/propcache-0.5.4-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:c3ef2818d63bc86071e9d2989ae75a1bc32b8f7059cfd9f5abbbee70c32e2ed6", size = 239043, upload-time = "2026-09-16T00:14:20.366Z" },+ { url = "https://files.pythonhosted.org/packages/89/2d/f9c47691aa024c8299a3afacd78d22a01ab57eb627b481b6089708e71017/propcache-0.5.4-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:dd2ac8f5b643454c2cc6b6118b13da16e88f4a6434fc3ba61aca384029f04f36", size = 208218, upload-time = "2026-09-16T00:14:21.801Z" },+ { url = "https://files.pythonhosted.org/packages/74/6b/d510c0c378cabbf9d0ac7b663af6d00f2e9074073d93b20c85f24aa5c071/propcache-0.5.4-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:4054acf80d40456a0537f2913b349718649d8d6458a14ab7f48d0ce28c30869d", size = 240301, upload-time = "2026-09-16T00:14:23.121Z" },+ { url = "https://files.pythonhosted.org/packages/3d/80/c80f6adaaa1e51f0db2dce8c9b3714d94ec45e358a21f9a1910b10b40a80/propcache-0.5.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:40e94adb1e7d39ff28a8bd8d8b8fbd1df6b9f40976dbe379134f1ce058e532dd", size = 230785, upload-time = "2026-09-16T00:14:24.458Z" },+ { url = "https://files.pythonhosted.org/packages/d9/e2/c32a7df3f39caa7f11b2eb37ea5b6960a6946f2bc7c4b8ff97bbdf6d6b6e/propcache-0.5.4-cp311-cp311-win32.whl", hash = "sha256:9f86f7259efe2c951f43e57d471c9b41daa5bfc7db9f67189059cf1ae6d77fd9", size = 42747, upload-time = "2026-09-16T00:14:25.715Z" },+ { url = "https://files.pythonhosted.org/packages/0a/8a/3db6a3543d8101263b4c52978b6276a04ead2caff2c5ab880d934f47bd89/propcache-0.5.4-cp311-cp311-win_amd64.whl", hash = "sha256:e904d4d01f36bd6e197590be1533c44e06058771e0746dd073a8ebb3ef880858", size = 46268, upload-time = "2026-09-16T00:14:26.996Z" },+ { url = "https://files.pythonhosted.org/packages/41/07/5222e2665bbf6e45847492ecbf3b9f3e4975a0ae300e5fd465df7d48ce55/propcache-0.5.4-cp311-cp311-win_arm64.whl", hash = "sha256:d42a9a856a4a6e2f6c10f1318c07e7daa498d6593abe745c71dae4521a26ca39", size = 43547, upload-time = "2026-09-16T00:14:28.143Z" },+ { url = "https://files.pythonhosted.org/packages/71/cd/348d58f142aebc4873345c6b31087629182ca6e0f2b3caeaa528cf882eba/propcache-0.5.4-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:b28f41fa3b8c6900457f858ec5b03998f3a6d535fbc1bb2edec5961ea05ec429", size = 87285, upload-time = "2026-09-16T00:14:29.362Z" },+ { url = "https://files.pythonhosted.org/packages/df/f4/f3ffaee281b276da854ac1d7a6a506d26cbc62ea2e623756f1d0a4a1ba1a/propcache-0.5.4-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:dcbf346a318a5e30063f547630b02bb787ce2f45b6368d5da143660b6a3835d8", size = 50984, upload-time = "2026-09-16T00:14:30.473Z" },+ { url = "https://files.pythonhosted.org/packages/25/88/1d7df7201750b37765ef2b23bc1c526c028dadde80afa0f57a118fc01182/propcache-0.5.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:87a3caecf8095e48dc72f84bfa42e23a848cf410cc9cc13031fba4869b706a21", size = 52460, upload-time = "2026-09-16T00:14:31.692Z" },+ { url = "https://files.pythonhosted.org/packages/83/4f/48865bd02a16ee5236bc46166b2946f37b93e07b0eae355dac0be0b216ca/propcache-0.5.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:60a64cbccaa11b7760ce705a14ada17ba459e7ca9f23ba587eb013821032d7ef", size = 251768, upload-time = "2026-09-16T00:14:32.908Z" },+ { url = "https://files.pythonhosted.org/packages/b0/19/3742a5eed62317b03b4002ee865dc9fd720308bdd0da1f29a5786c630311/propcache-0.5.4-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a74bfa37147cc08fb29df10bd9c16f40fa7f860cd3a6d2fff853323a94f6e17f", size = 257723, upload-time = "2026-09-16T00:14:34.267Z" },+ { url = "https://files.pythonhosted.org/packages/cb/d5/ee6350fb0be9122bb6c67082a876d34b90d980d100c106af4b81023e04f4/propcache-0.5.4-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a4d7a54719b67338a305dca2ce6aafe366817df94ddfd4b5514374356f5ca546", size = 265597, upload-time = "2026-09-16T00:14:35.56Z" },+ { url = "https://files.pythonhosted.org/packages/85/9f/83a07b6ec0e043c050cfdd35fb0cf1b7897b91d554d6eea293740309afe7/propcache-0.5.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2814ecd8e818f487bee4b0f921bc4d1c176cc5fc71ac0f072d0fa67eda4ac14b", size = 250424, upload-time = "2026-09-16T00:14:36.894Z" },+ { url = "https://files.pythonhosted.org/packages/33/2c/a763a8251f50fba042af0fb1f02bfec4b31381e40aff760db2be7b2e1f84/propcache-0.5.4-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:6af4693716bfb03f1752ef1b30faa593db2c01d5272e9b8564a1549452a979ab", size = 216748, upload-time = "2026-09-16T00:14:38.369Z" },+ { url = "https://files.pythonhosted.org/packages/6a/e2/4d11bea8fd6a777149c6c20645f873952eab5de3a2497aa11648ec9ab6ab/propcache-0.5.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:4fbc1a15dc8cd1689508758d626b372b1f09d28d9577667feaf9e6bfcd8efcbc", size = 246533, upload-time = "2026-09-16T00:14:39.82Z" },+ { url = "https://files.pythonhosted.org/packages/9f/36/6683597de4907e70c717e3588c541202c66086a72ff3db58be49de66e72c/propcache-0.5.4-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:cdee8205a44d0be91bbac4c41b95d86641b72dfc7aef1279400e4fda3f26a937", size = 238173, upload-time = "2026-09-16T00:14:41.259Z" },+ { url = "https://files.pythonhosted.org/packages/85/84/cb08d79f1762daafeb2b030c470cd0c725c97b8ad67412457c6f35c53e9d/propcache-0.5.4-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:9a2a8a50a93dee0268a860a07fa3b4bd968f8ce4dbd794957da772f395368526", size = 251128, upload-time = "2026-09-16T00:14:42.652Z" },+ { url = "https://files.pythonhosted.org/packages/c2/0d/41b848036db6621370c1f2e5471a7da8149c730f8552a5257567721f4576/propcache-0.5.4-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:7ffafcbfc7b549ab940047e505c831eabac5e67de53e1bc174adbc5285c55944", size = 214821, upload-time = "2026-09-16T00:14:44.112Z" },+ { url = "https://files.pythonhosted.org/packages/f1/b7/adfae4bf9c63bccf12e2d9690a175c6579047a6eec3b5a6a5f51428c15e2/propcache-0.5.4-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:d1f5a500bfcbb2c0ab85e98a0dcd70f5899d34efe365a0187700369a79603031", size = 254793, upload-time = "2026-09-16T00:14:45.429Z" },+ { url = "https://files.pythonhosted.org/packages/51/6f/eeca9647245d5f92e87d53e5f14335bb42fce1a7e6842c8045b364eded8b/propcache-0.5.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:8a235f73d6e020855dc29dff012d920c02ee0feab8d73a24185a7569f4be1161", size = 247134, upload-time = "2026-09-16T00:14:46.976Z" },+ { url = "https://files.pythonhosted.org/packages/5d/a9/424e38838793d37160b4379c702f61c74c598fc6cd17204adbe3c554f7a8/propcache-0.5.4-cp312-cp312-win32.whl", hash = "sha256:b3083bfe87f95c756e610bd8025f26cbd1cd4aaa03a422f2d65efb7a97cd53d8", size = 43073, upload-time = "2026-09-16T00:14:48.338Z" },+ { url = "https://files.pythonhosted.org/packages/58/7b/6e8ef26f6d510a7916064fec68d55fcbfbdf7eb01e377480d66a122152d8/propcache-0.5.4-cp312-cp312-win_amd64.whl", hash = "sha256:98914de2c4d7f0f9f4a8c6ea4bf05841f4175796941e3ef7d47eb718f22311fb", size = 46190, upload-time = "2026-09-16T00:14:49.99Z" },+ { url = "https://files.pythonhosted.org/packages/08/b9/72028c5b56ced97f456de6aefa79435ca64d7f77af78ea8cf3c76fc5195f/propcache-0.5.4-cp312-cp312-win_arm64.whl", hash = "sha256:8876b39961e33d912afe3c1bee18ee564fdad0206f873cc15d522756b7f50737", size = 43075, upload-time = "2026-09-16T00:14:51.155Z" },+ { url = "https://files.pythonhosted.org/packages/78/4c/3b1365d58a667689e067e13d055fcd92bdf8d9a2fca3d9201b47ed5b3631/propcache-0.5.4-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:36c0d9db44b523ef93d03341b1c42d69ff01d673c053d1b1c6c3a363bcaa39ba", size = 85290, upload-time = "2026-09-16T00:14:52.342Z" },+ { url = "https://files.pythonhosted.org/packages/8f/61/5f9c29c3aa67c30238c4eadf95149b1d983a48f69b86b0cff927a7d6df13/propcache-0.5.4-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e1d52a05dc417279f7e5c7618c5dfbbc29923aaf9bc0a5c1802ddcebf54c61a0", size = 50027, upload-time = "2026-09-16T00:14:53.67Z" },+ { url = "https://files.pythonhosted.org/packages/25/7d/c1ab1ef09e9d4d835be5d58c0a32a1e1de8397abaa4e502a9d4141328cad/propcache-0.5.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:44149f46500a0a41b95b4d99c2e586a77319539730607b9892974a092788b111", size = 51425, upload-time = "2026-09-16T00:14:54.826Z" },+ { url = "https://files.pythonhosted.org/packages/73/36/0093091ebb270fcd1bc1f6e095f93b2e0ed7f1011c28837dc2dbe5f96b99/propcache-0.5.4-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:dbab5f5ff6897c81f355d079010cdae85b02e5a0b518b5251523b8ad8ae9ac3c", size = 233595, upload-time = "2026-09-16T00:14:56.09Z" },+ { url = "https://files.pythonhosted.org/packages/ae/8f/0de9d4c8e05ce0be71b436919a216bd7fc5cc6e2691c0602295efb22b9ed/propcache-0.5.4-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c3e98c55bde2bcf7db3c70d1aed7ae9aa8aebbf19a250c66645cde44cdb8b867", size = 240318, upload-time = "2026-09-16T00:14:57.674Z" },+ { url = "https://files.pythonhosted.org/packages/7d/71/2b35e91455209b85ee98f7859583e0814fab57d3af0f2381aaee34c37304/propcache-0.5.4-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:db3ae52ccc150dbc84704e9d642743897f3e1c54742ff34cacb661e52e3818a9", size = 246649, upload-time = "2026-09-16T00:14:59.352Z" },+ { url = "https://files.pythonhosted.org/packages/ed/74/08e6c1faf26ee2732023a3828787ba535557122774f4a386b1f715cbd8e0/propcache-0.5.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f85915e00dcb1cd9f2f890ead064ed40a27df06f0db65be427b29482ae357572", size = 234316, upload-time = "2026-09-16T00:15:00.696Z" },+ { url = "https://files.pythonhosted.org/packages/5c/9a/08385733c9321c9bb78039d3ff31045e4fca962d9665023c4eb70f998819/propcache-0.5.4-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c2ba30a89035b57b73e00475de948521602f543d79ce01db10b04b36c4c76fc8", size = 204666, upload-time = "2026-09-16T00:15:02.019Z" },+ { url = "https://files.pythonhosted.org/packages/1d/f4/e87bc7629af9a14a752b218764a78742d73c2c563ac58315da6841f0cbe4/propcache-0.5.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ae58f361bd5dae942717c65d3413b478c70aea9c462599e7b9adad3731db3894", size = 225900, upload-time = "2026-09-16T00:15:03.394Z" },+ { url = "https://files.pythonhosted.org/packages/d9/6d/11014938d3fe9bea2ea2dcf930f26ed565bfb2f5be3c756362ea48c92636/propcache-0.5.4-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:96f7c5c15656040ddcbc51e56dc59b58aa25999d743c126abd425b9766ab43e9", size = 219988, upload-time = "2026-09-16T00:15:04.811Z" },+ { url = "https://files.pythonhosted.org/packages/dc/72/fbf17c589f92c0b3bbf6709a425661f8ef2ed0d46b38985a7d7b5a0f6b91/propcache-0.5.4-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:7cc528e760a8af06f2b13e9b9f362cd90c7c718ea61228a96dbd31ba16ed7f47", size = 233611, upload-time = "2026-09-16T00:15:06.498Z" },+ { url = "https://files.pythonhosted.org/packages/55/7e/dbd637572a279692e5518d117274a9331bf5faac59f191d30e82521a3ec7/propcache-0.5.4-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:425f8cc86ab5018b4b8d4a23bc8e74d964bd3d757c3702e301aa79be76c53f6c", size = 204333, upload-time = "2026-09-16T00:15:07.961Z" },+ { url = "https://files.pythonhosted.org/packages/ba/5a/f99c92068f1e0f5c886899ce0e4a619db376ca98c5279d93f95bd86906af/propcache-0.5.4-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:a5793c7698a53f56f4a1889a4737c7eeb1b7ad0842fa6b1abca22913ff79c8c1", size = 235177, upload-time = "2026-09-16T00:15:09.334Z" },+ { url = "https://files.pythonhosted.org/packages/ee/28/95456fabd2daf6be89049a13fbf03341756014d2959c83d12957d4c49694/propcache-0.5.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:c02c0e570c5c7e077b0181a9f3cdb7d4c3617d1cda6b5c95bd5d34022923d82c", size = 228982, upload-time = "2026-09-16T00:15:10.729Z" },+ { url = "https://files.pythonhosted.org/packages/b1/bb/df90f62c9cf7c93ea235f6f9405143bba802914607317266dd81fc8d737e/propcache-0.5.4-cp313-cp313-win32.whl", hash = "sha256:3e413d7a4a9b4866b7a761d6060d434b64d23cd35122eda3b026a0bbe8196b25", size = 42611, upload-time = "2026-09-16T00:15:12.111Z" },+ { url = "https://files.pythonhosted.org/packages/01/bc/e0a7b84af04ec02d73a48aa71f091e1e4a2107e3074b7ce12195b66901f4/propcache-0.5.4-cp313-cp313-win_amd64.whl", hash = "sha256:0c889f6fa84957bc7e8b4eab71fd16a0455068d5045e3aa40c733071d2b2fd77", size = 45342, upload-time = "2026-09-16T00:15:13.519Z" },+ { url = "https://files.pythonhosted.org/packages/9a/70/50b031cafe72a5c1878b903ee87303f71313345566bf3d6ec202e5ddc9ec/propcache-0.5.4-cp313-cp313-win_arm64.whl", hash = "sha256:69fc35c0779522da366c563e5faf203ffc1f8ff0021d5b1337fa4efa5be73177", size = 42408, upload-time = "2026-09-16T00:15:14.788Z" },+ { url = "https://files.pythonhosted.org/packages/33/c9/07e227b930c8ae513b8ef1aae3793499be097bffcdf7aee4fb8b33db4cd1/propcache-0.5.4-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:e6720ba44ad7e72174314d0e1fb0172494cff5c73a3a8a2159c3d2402ff15565", size = 85933, upload-time = "2026-09-16T00:15:16.073Z" },+ { url = "https://files.pythonhosted.org/packages/e4/e1/6710bb44510c4e4a8e0f004bbaf3cecfd048141309c77bae56d4e5a6ebc1/propcache-0.5.4-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:4cfe0a92ae30151869e67a4b5f5e105e4e03ad30b3f38e5211b5bf77d0881993", size = 50179, upload-time = "2026-09-16T00:15:17.377Z" },+ { url = "https://files.pythonhosted.org/packages/e2/22/b533b493d7025456f44518b33e53e000021a20fe7c27b88cf3d341df7186/propcache-0.5.4-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1d759d05634f1b038fb625a66662a8c85e5a8fec912da381b5149ddac107482b", size = 51942, upload-time = "2026-09-16T00:15:18.589Z" },+ { url = "https://files.pythonhosted.org/packages/f1/74/70ac8430e28f21e442c7bcb964eb46c4363f6881ade4aa0e978bfd8d503a/propcache-0.5.4-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:251c63dd46a0659bb875cb254dc4c1e79ee91a847c737cd62373295afc2235dc", size = 232647, upload-time = "2026-09-16T00:15:19.905Z" },+ { url = "https://files.pythonhosted.org/packages/72/95/f222f13b6fe623310be0eb61a673bf26df439ce27e563ca8e422d0818777/propcache-0.5.4-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:7a8d5ff04eb1f85698a78d20c62a14676e7b960dcafde09a388d60ad377d355d", size = 241541, upload-time = "2026-09-16T00:15:21.3Z" },+ { url = "https://files.pythonhosted.org/packages/a2/3e/763e370340db16115c5e63ad46e21ef0770a7f06928b3d3b62d8f8edfca4/propcache-0.5.4-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:7b9100a93b372418d8688f3f2a3e5b45c64d70ca4d6176e121aca1e3bfc1e32f", size = 245332, upload-time = "2026-09-16T00:15:22.802Z" },+ { url = "https://files.pythonhosted.org/packages/96/d3/e97cd6f5de2176bd90ed4076c7a9b5e09d0f0b9687d00a576507988bb62c/propcache-0.5.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cc07876cfb079b6f6f36d21ce75784ad6c2c6b563eeac0ed26c2fa2669b85df9", size = 232757, upload-time = "2026-09-16T00:15:24.374Z" },+ { url = "https://files.pythonhosted.org/packages/f9/4c/6766e5f60bcda26d244333aa71d0a702c1c9b21b251d543c7af5953d1eee/propcache-0.5.4-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0951315a6b3142ee2167404d707743f0157c110091342b1aa0accac5cf0e4acf", size = 204389, upload-time = "2026-09-16T00:15:25.667Z" },+ { url = "https://files.pythonhosted.org/packages/b8/5e/ec4bb09a70b26ea99d76a8292c3383b960b296de2b347ac9986678f1761c/propcache-0.5.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:bee7d3aed13d56f54e681df38c3a23031bc9e3863f687d9d598825c9146acd7d", size = 228217, upload-time = "2026-09-16T00:15:27.11Z" },+ { url = "https://files.pythonhosted.org/packages/e1/7d/b53922ba7d9e5bf797324e63aa05906ec240871899f779628df068743e2d/propcache-0.5.4-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:4e985382be6d15da8d0c2710a6fa7b9070fc9ecdeefb7f580e88373984ec8be3", size = 216947, upload-time = "2026-09-16T00:15:28.532Z" },+ { url = "https://files.pythonhosted.org/packages/ff/39/b62eee45e5ea4de094a258cbb3b01c1e856ca51ddfd95b43135c5effd1eb/propcache-0.5.4-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:9e9ab13760aa8b6d0881ae7cb04fd891d8d490cd2554ea8e79bb278399169bcc", size = 233457, upload-time = "2026-09-16T00:15:29.977Z" },+ { url = "https://files.pythonhosted.org/packages/cc/a9/feec61ed296d993db9dd097e0f6723e3f576a647722367547495e4c5b05c/propcache-0.5.4-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:1b2f3bec4261a94019575481c726c29850f72e27907773c75b1de421e20e9f9d", size = 204131, upload-time = "2026-09-16T00:15:31.74Z" },+ { url = "https://files.pythonhosted.org/packages/92/4d/411ef380cddad28dc001f1c6d75ec72c76cd3817030f68ec1ccfba0ec6c1/propcache-0.5.4-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:720cf832eb2d0b0dfee129cb3335a26f6ce3cc45ee1187e8f0731758caa16792", size = 234820, upload-time = "2026-09-16T00:15:33.087Z" },+ { url = "https://files.pythonhosted.org/packages/15/37/c988229753629ef1cfd5198337a83e624780ea2b3787efe9e747c05aad2d/propcache-0.5.4-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:9fb0a5be8d9aa213150e8d8148a42aca4984b285bcad1e69587dc4298edd929b", size = 228350, upload-time = "2026-09-16T00:15:34.533Z" },+ { url = "https://files.pythonhosted.org/packages/12/49/5ef1c5cf98591da3c5b952b39e6a298084cc1ce353bc70f85e82397a5036/propcache-0.5.4-cp314-cp314-win32.whl", hash = "sha256:30cc1cebaf9aef49db06357a50398323ae04d70460c0491837d026ab7d6452ea", size = 43578, upload-time = "2026-09-16T00:15:35.957Z" },+ { url = "https://files.pythonhosted.org/packages/1e/9e/a0ac821a2229186af5e2e3c3635a78abb23cfddca57f38513ab5d70420f3/propcache-0.5.4-cp314-cp314-win_amd64.whl", hash = "sha256:0a095db8e15a6020db149ecbed6461939fe74f6acaa3ae8b702a1fe8c38cd983", size = 46304, upload-time = "2026-09-16T00:15:37.655Z" },+ { url = "https://files.pythonhosted.org/packages/a1/19/c8d0d36a9d16cba5dcee67d389c9333b988c8986a653a61c00a451817a46/propcache-0.5.4-cp314-cp314-win_arm64.whl", hash = "sha256:45488d1a5f9ab5bd90aaa1ca20f50fe1922b8ffad71a2009d2adf41355897aac", size = 43440, upload-time = "2026-09-16T00:15:39.091Z" },+ { url = "https://files.pythonhosted.org/packages/2c/e9/42f1da77cacfc184e6ec929557ef653b7961bbf6f1da460b9221273948b3/propcache-0.5.4-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:53eaa697c4d0422ff4cb714d00231b43352064d97b944033b30c1d57cc506ec0", size = 90672, upload-time = "2026-09-16T00:15:40.306Z" },+ { url = "https://files.pythonhosted.org/packages/cf/2f/4b79940908c6ab8c795097c102999d7bc1f7e0b8604dfd1c232f9d99d67a/propcache-0.5.4-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:886b59c4d28ca97dd23b025fdfc50a0356be934efbbbca89ad26230067f86fe5", size = 52586, upload-time = "2026-09-16T00:15:41.575Z" },+ { url = "https://files.pythonhosted.org/packages/eb/07/02196ae6320c110235bb343f90dbd34be41f8b8964a3ee30db84ec12579e/propcache-0.5.4-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:3fa15757fea1dfcd5b7745cad9f4638929605531bd4018ab2adff7955f1a403d", size = 54335, upload-time = "2026-09-16T00:15:43.027Z" },+ { url = "https://files.pythonhosted.org/packages/6f/44/f48b9a131985659924df5fa5093f68fe72c7ee375329802989ba3126efc6/propcache-0.5.4-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6f0093ac3e9daada202c2082439d414a625c57184727a46e112a3fb2a81cb788", size = 297567, upload-time = "2026-09-16T00:15:44.373Z" },+ { url = "https://files.pythonhosted.org/packages/04/a1/418d956d2735139f77fc35262179f1f52c23aa666de5a8ab3819c1ae7854/propcache-0.5.4-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3cd3a7edb6b95b9b33998135ebfa18d709da82290fb8f27c858970b5a12c8b56", size = 297477, upload-time = "2026-09-16T00:15:46.048Z" },+ { url = "https://files.pythonhosted.org/packages/69/fd/ff811fdb6d3d3e67fd9bbfb75881675d34a42d0ef29a45d33e3e233dde07/propcache-0.5.4-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c174bfd1c48a1b51a3078e95586dde718374bac79719ab3541ec9e74aec40574", size = 302669, upload-time = "2026-09-16T00:15:47.458Z" },+ { url = "https://files.pythonhosted.org/packages/fc/57/527910c455b5ec62f6871bef45d4f79fea16cb8c966ba0d4a07f0339ddc4/propcache-0.5.4-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a219f0ac59817a9114dd2aa57c13180f993e819ba658c7ddab4b66ed1ee0d370", size = 287908, upload-time = "2026-09-16T00:15:48.99Z" },+ { url = "https://files.pythonhosted.org/packages/1d/86/f69ab82707534a0cb2057bdca04f9200a71214c7551800f9d34d6ac39e4f/propcache-0.5.4-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:17a7400cec0256f0a71ae71f9da398f9894c956ff6668a1c9d317b3367316320", size = 249804, upload-time = "2026-09-16T00:15:50.486Z" },+ { url = "https://files.pythonhosted.org/packages/27/19/60677af50d93be4256213de7cd487f056944c048b9c0b6f2e45b3a30f666/propcache-0.5.4-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:978f28401afbc76cdc3df9e1717b4229a06b626a1dcc75db4e1f2beb3884c3e9", size = 282344, upload-time = "2026-09-16T00:15:52.029Z" },+ { url = "https://files.pythonhosted.org/packages/7c/f7/a0057808a91fb3b6a5f3602b528f0cdcb3d53e0ff8315d73fabdfdf8fec4/propcache-0.5.4-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:4a1f4f5ffa55dce6307631f3cb2948e117e665966ea512e0d502b16c24f567e7", size = 270167, upload-time = "2026-09-16T00:15:53.466Z" },+ { url = "https://files.pythonhosted.org/packages/83/c8/f4a865490df0dc0c8531d4e59ac411cb6dc24bb255d2396a6f1c60a368f4/propcache-0.5.4-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:213bb68d9ced5cf2bf717b1071bf2b09b4b04c426256f9fe6d054c60318424c4", size = 286551, upload-time = "2026-09-16T00:15:54.995Z" },+ { url = "https://files.pythonhosted.org/packages/b0/67/b4faebde9da4e8173d0e5a30e8cd31335914af7ef350b988f27fec588cfd/propcache-0.5.4-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:286867fb156488c251a3721766e380ac4495e4fd6b51aaa1403d89ce7f4359d9", size = 249595, upload-time = "2026-09-16T00:15:56.505Z" },+ { url = "https://files.pythonhosted.org/packages/f6/40/52e1dd5636e9f5a27f6b5a4b4e2f33c322fd72afe956c397d82523ec4a80/propcache-0.5.4-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:445ee3bfb46e85838387fb3c536a73cc0b994dc192b004e40e170adc54aa2a7e", size = 286700, upload-time = "2026-09-16T00:15:57.985Z" },+ { url = "https://files.pythonhosted.org/packages/d5/0e/30b2b324b93ff31a0bab539c102aae59e84e444031b2742150a7646aa1bb/propcache-0.5.4-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:48cb48c5346a97de792254af77715aa2529c2a1ebc5f586aa0aae44a02f1fe57", size = 280500, upload-time = "2026-09-16T00:15:59.487Z" },+ { url = "https://files.pythonhosted.org/packages/64/36/721bb59f682ff060d0c8df64274fca8cd0521b1a54506c2eedaef795b7f5/propcache-0.5.4-cp314-cp314t-win32.whl", hash = "sha256:03b229037d25b801e7af53fd52b9fc49d9439b036fca1e087e02780631adfa97", size = 46121, upload-time = "2026-09-16T00:16:01.349Z" },+ { url = "https://files.pythonhosted.org/packages/c1/86/0b1b80fa1ac3a0aac44e2922a6964fbe9cd52af5eab8fa933bf9e90b030c/propcache-0.5.4-cp314-cp314t-win_amd64.whl", hash = "sha256:8a1fc236528c457cd739c88abe823da851b7ab645d72792f88658114cc340c12", size = 49154, upload-time = "2026-09-16T00:16:02.901Z" },+ { url = "https://files.pythonhosted.org/packages/69/4f/9fe6f05a47cb550c823155052116f710064b6be5c6e8ec4e9faae7e18115/propcache-0.5.4-cp314-cp314t-win_arm64.whl", hash = "sha256:135036c5cfc93864affb0f9af9a27e5d7a71cb7bd745e7b6dbfc2d56cc30e827", size = 46005, upload-time = "2026-09-16T00:16:04.266Z" },+ { url = "https://files.pythonhosted.org/packages/58/25/895a11d1e4c5c2acc6d816e2bece34e02d9dc92f2182ae276cd819e9e804/propcache-0.5.4-cp315-cp315-macosx_10_15_universal2.whl", hash = "sha256:45bf2e730ab8905d0527fe05a86500f406e64305c34cc81ebe64b4617cab9760", size = 85634, upload-time = "2026-09-16T00:16:05.599Z" },+ { url = "https://files.pythonhosted.org/packages/58/41/c0acd69271de7a1cf439e77d5d60c18575fd09bad56e798b95fa23458ea4/propcache-0.5.4-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:31eb43ba2edc704ab2ec27815315dd8a19def0fb16215be4cfe8d32fe78ffd51", size = 50084, upload-time = "2026-09-16T00:16:07.384Z" },+ { url = "https://files.pythonhosted.org/packages/a5/1a/ad561f99f90884089e6403b76c220610809429ba868a81a2e7ce115d32e0/propcache-0.5.4-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:174507f82d3594622acb1dd2dafecf2d899d6d506335494e7107767bf05f3aae", size = 51692, upload-time = "2026-09-16T00:16:08.956Z" },+ { url = "https://files.pythonhosted.org/packages/e9/07/057bdd3a9609ffad59b06239cceee784b047f6c720247bfaa36d2103e138/propcache-0.5.4-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:50e337653721d20ead710da33bf44487fbe8a0db8782714b60306481e9f95b51", size = 232947, upload-time = "2026-09-16T00:16:10.466Z" },+ { url = "https://files.pythonhosted.org/packages/fa/dd/d36ad35986718530498a65e45e3713f9f0e6a580f192ef02d2ef7cae9b52/propcache-0.5.4-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:0d21d0d2c82bbfeb1677a9711f38df968f9837576102bb4add1bd449d28d88f1", size = 241250, upload-time = "2026-09-16T00:16:12.056Z" },+ { url = "https://files.pythonhosted.org/packages/fb/81/f1459415cdb6c10d46942779de39bb59a77b38e5a76bb1def9227962eb45/propcache-0.5.4-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:ccf4f7a79e26bb7efb06ecd50c177833b71df05cbc748701372325e6bcc17f6f", size = 245150, upload-time = "2026-09-16T00:16:13.596Z" },+ { url = "https://files.pythonhosted.org/packages/ce/4e/58b9b1460afc97a4c0b17ee89af701c4011d4d7f46470eba3aaff76a8069/propcache-0.5.4-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:23278f808cd81d5ada7184a76606b925fb3389c60e1077b2cd7da7b1fcf0553c", size = 232166, upload-time = "2026-09-16T00:16:15.126Z" },+ { url = "https://files.pythonhosted.org/packages/b9/c6/5a79e0eda3e7b6987d03d8c622ff6d52a42165a12e8418eb37694b9cc4b4/propcache-0.5.4-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e738ab81179510ce79b2eac9a6ecf47feffd9e76d1c72e403005dddb6e36c06c", size = 206085, upload-time = "2026-09-16T00:16:16.713Z" },+ { url = "https://files.pythonhosted.org/packages/4e/72/940aed42c73f9da345ca2de0f6e835c726498159abca5f1ef14fb0a2af8a/propcache-0.5.4-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:a419ee85e654927baabda3929c03c0cc1112bf472ff0dfd6142f4e3a81ca4162", size = 228460, upload-time = "2026-09-16T00:16:18.352Z" },+ { url = "https://files.pythonhosted.org/packages/85/71/3f54e1535c8f323d91ba566044d7c2b39ff6f6a2f1d0bd9071779d07b9b3/propcache-0.5.4-cp315-cp315-musllinux_1_2_armv7l.whl", hash = "sha256:b61805357d966680acf68b3b6d49772631ed9df44ebece10ff1460e117a7da8a", size = 218350, upload-time = "2026-09-16T00:16:20.064Z" },+ { url = "https://files.pythonhosted.org/packages/a8/f4/025890cc389ac3ec485ecec607d4a7ca47e15bfa2a465746ab98af602536/propcache-0.5.4-cp315-cp315-musllinux_1_2_ppc64le.whl", hash = "sha256:58134228927cee6c047d626c08e60a81be604a20578a12ce752cc5c9a84d4826", size = 233156, upload-time = "2026-09-16T00:16:21.624Z" },+ { url = "https://files.pythonhosted.org/packages/04/29/b39cae08c87c140d3d274f0a2c058cb5588e836175c3309e260b230ab07d/propcache-0.5.4-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:350b272b2279f4135a64fc0c304a5d08e28a137c9573442c606152446638a831", size = 206206, upload-time = "2026-09-16T00:16:23.204Z" },+ { url = "https://files.pythonhosted.org/packages/18/61/e16462ef18a87247dc9ebbd5c606f46d5ce67e708bd9cc734dd0d9222564/propcache-0.5.4-cp315-cp315-musllinux_1_2_s390x.whl", hash = "sha256:45bebbe252550fec975ba3b62bc6f931643cfd3b5464ef47619cf3fef154e01c", size = 234469, upload-time = "2026-09-16T00:16:24.841Z" },+ { url = "https://files.pythonhosted.org/packages/9f/84/b6a1490922427204fc47df920ed002eec709621de6b79b11592bf45c623a/propcache-0.5.4-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:ada748108a43d29b7c328ba7db3755327cd94f028bcc1a7ee3f0addcfacd9c38", size = 227311, upload-time = "2026-09-16T00:16:26.549Z" },+ { url = "https://files.pythonhosted.org/packages/ff/5c/5a59527582e9bcb694b2f08b9894134b65a0f5f79dbff174f054f5f74ed0/propcache-0.5.4-cp315-cp315-win32.whl", hash = "sha256:ee19113bce2f3acd46432050688b70f61acd6857d75abb9ec96341b7e9ced123", size = 43512, upload-time = "2026-09-16T00:16:28.313Z" },+ { url = "https://files.pythonhosted.org/packages/26/07/93cf699ed363681e754d7c3fad587fb09ef6b65618ee193332ad16a68d7b/propcache-0.5.4-cp315-cp315-win_amd64.whl", hash = "sha256:ceb3e879afac028f93d272c957814695dc5569e4904262dbee92f6c41bd5e4a3", size = 46264, upload-time = "2026-09-16T00:16:29.751Z" },+ { url = "https://files.pythonhosted.org/packages/65/10/fef04fbdcd44a4a163cb5ff5674599c6d6fdefd64a5a459438f9ad2ba042/propcache-0.5.4-cp315-cp315-win_arm64.whl", hash = "sha256:c83acbce9f2b5e3f5f5eda9e53d2001fed22fcdfef81274a9e02d8fd53b70a30", size = 43395, upload-time = "2026-09-16T00:16:31.5Z" },+ { url = "https://files.pythonhosted.org/packages/70/f6/7e2f4dab0b92ab46111bd48cee9ee1e5f519514c44e3779ede5358d7ada0/propcache-0.5.4-cp315-cp315t-macosx_10_15_universal2.whl", hash = "sha256:a5e8ef588c109725dc713ba69aadcac00a1ef90c2ce9c0a8c7075128f569f47f", size = 89825, upload-time = "2026-09-16T00:16:43.115Z" },+ { url = "https://files.pythonhosted.org/packages/9f/8b/dfeff925cb6ced97ede701d5c6a99998da963c6f2e06abbf879c9dac5b54/propcache-0.5.4-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:4d86476a935c88963d9b8e1a9a0d38188790e9622169bfbafa173046846709d3", size = 52159, upload-time = "2026-09-16T00:16:44.754Z" },+ { url = "https://files.pythonhosted.org/packages/24/6c/924c810be5b7cf218ef47e707cf06d34adb4e3f3a31e3c24c55c6d945a88/propcache-0.5.4-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:f5470694918830da62fac9e69133b53d23b736d7070e587b27a4a2be37e08e68", size = 53956, upload-time = "2026-09-16T00:16:46.762Z" },+ { url = "https://files.pythonhosted.org/packages/3f/b6/9ed0a5c939b58b6bed740a05b5d0f919f0b318d03284b4b6d81a0fe8a29a/propcache-0.5.4-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:10ef33a68a61ce317e095fd2e202a592ea92392b90944a78c993f0d9a73ab06c", size = 295235, upload-time = "2026-09-16T00:16:48.577Z" },+ { url = "https://files.pythonhosted.org/packages/5a/eb/5ce886e902a2e781dddf110993d5329458a9b1a8626b876c65e5e25bf413/propcache-0.5.4-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:5cacf3c9efd09df409dc33654dd077e1c245ba8fb747b0f0236ef41b7c49b589", size = 294463, upload-time = "2026-09-16T00:16:50.539Z" },+ { url = "https://files.pythonhosted.org/packages/f2/88/c98f49183ecd3e5b204a556f0ca47baa02c2206a500fe8c7ec1726297b0a/propcache-0.5.4-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:770e8209d018175fc0063936fa9583b6d27e88c5ad31543f3383d66080efdd62", size = 300081, upload-time = "2026-09-16T00:16:52.423Z" },+ { url = "https://files.pythonhosted.org/packages/27/0d/c5090f9e6f67cbc30a2b744c7bb0f8006dcba5ec1b0d82f866ae1cc7c5c4/propcache-0.5.4-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:03969626faf0783a592dfa17e28eac06018bd0b44dafae6943d53b92421a7f72", size = 285360, upload-time = "2026-09-16T00:16:54.141Z" },+ { url = "https://files.pythonhosted.org/packages/ac/9c/34a55396910583ed07926669ab309dde2213a2dec05a7e946bb90ad66908/propcache-0.5.4-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ef3b928d9c984322b5c44e6964d8dbc653da87d2d8ee1647fa6da43072e650a9", size = 248014, upload-time = "2026-09-16T00:16:56.062Z" },+ { url = "https://files.pythonhosted.org/packages/cd/b5/c0a142b656093ca397039dd3fe166cbb87c945712b534546514a24cd2611/propcache-0.5.4-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:7177c43eddf10a0893c4fec52ebb408fdcd7f7d63962caace9180d8f81b14ece", size = 280662, upload-time = "2026-09-16T00:16:58.044Z" },+ { url = "https://files.pythonhosted.org/packages/54/28/fab2809c2e337fe26becea9648e84d5cef46075c91b826acb13e4f9dd04e/propcache-0.5.4-cp315-cp315t-musllinux_1_2_armv7l.whl", hash = "sha256:420162a77f94eb1cf5ef7893f500016dabd548e73de956785a1dd899cc73006a", size = 266149, upload-time = "2026-09-16T00:16:59.702Z" },+ { url = "https://files.pythonhosted.org/packages/3a/11/7ddf336288b2678a5f054f8da2e2bd1a719f5d4b7de714d9c6bd588a2313/propcache-0.5.4-cp315-cp315t-musllinux_1_2_ppc64le.whl", hash = "sha256:3eb2e820e8e2101407da93f17c57cbb7d225461955fc60105daaba14cd421ee2", size = 283097, upload-time = "2026-09-16T00:17:01.459Z" },+ { url = "https://files.pythonhosted.org/packages/1a/ae/351b1a5225f5473c411d9a612a229ae147cf0cf65c72ad838b87219ea8e8/propcache-0.5.4-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:13e52b6e0bde97dee98ab66552dbff2931649c96f1ac432eac299fe689ec373b", size = 248160, upload-time = "2026-09-16T00:17:03.298Z" },+ { url = "https://files.pythonhosted.org/packages/3f/d0/7f79f061e30d135bb615c9782c94a74652033d00b49254edbbf35a9165a8/propcache-0.5.4-cp315-cp315t-musllinux_1_2_s390x.whl", hash = "sha256:12682126712ddc19b70ff819debbd279e58adf1f0c8f8f8138c18ade2044b284", size = 283036, upload-time = "2026-09-16T00:17:05.238Z" },+ { url = "https://files.pythonhosted.org/packages/53/3c/016f1cad8bf4c428d748cf399b2bac603026fbfd6966e6a5579b5c5b6956/propcache-0.5.4-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:3af0c8642b2da4815d86e631232ac8286e17644fad907c19508aa8e7cb4ba8ad", size = 279350, upload-time = "2026-09-16T00:17:06.881Z" },+ { url = "https://files.pythonhosted.org/packages/ea/60/d8f72cb24b412487ed4c397f539117d3b74c3c33dd32020e91fe00a958a8/propcache-0.5.4-cp315-cp315t-win32.whl", hash = "sha256:1df8d8561b21465c5dd56110a01caf897e026d065b4b84e98a488209094272ec", size = 45874, upload-time = "2026-09-16T00:17:08.567Z" },+ { url = "https://files.pythonhosted.org/packages/d4/ef/8bae0a316d406644450522f2f3d44a4e19632f5f3bb60d1d0e6c53842616/propcache-0.5.4-cp315-cp315t-win_amd64.whl", hash = "sha256:02c0a34f16889cf800f10f0247a564d8ce6eeab6ffcd7c87198f769067eb8432", size = 48574, upload-time = "2026-09-16T00:17:10.077Z" },+ { url = "https://files.pythonhosted.org/packages/57/be/bcc053f66a97355683884b448198e79580fae8e8fa4d96b9bb01614e9913/propcache-0.5.4-cp315-cp315t-win_arm64.whl", hash = "sha256:dc4242ca653c9b30ab51c5f8193323e7bc0928f897ee9103201e59a43abcb72e", size = 45625, upload-time = "2026-09-16T00:17:11.377Z" },+ { url = "https://files.pythonhosted.org/packages/f5/cd/785c64ed382f3f04201870267b02783f63b4678c2acfddc177a3ebcc2727/propcache-0.5.4-py3-none-any.whl", hash = "sha256:62c60aec739ed00124573cce1178138fd690c7676352d67a37328c1cf51d7468", size = 16338, upload-time = "2026-09-16T00:17:13.106Z" },+]++[[package]]+name = "psutil"+version = "7.2.2"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/aa/c6/d1ddf4abb55e93cebc4f2ed8b5d6dbad109ecb8d63748dd2b20ab5e57ebe/psutil-7.2.2.tar.gz", hash = "sha256:0746f5f8d406af344fd547f1c8daa5f5c33dbc293bb8d6a16d80b4bb88f59372", size = 493740, upload-time = "2026-01-28T18:14:54.428Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/51/08/510cbdb69c25a96f4ae523f733cdc963ae654904e8db864c07585ef99875/psutil-7.2.2-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:2edccc433cbfa046b980b0df0171cd25bcaeb3a68fe9022db0979e7aa74a826b", size = 130595, upload-time = "2026-01-28T18:14:57.293Z" },+ { url = "https://files.pythonhosted.org/packages/d6/f5/97baea3fe7a5a9af7436301f85490905379b1c6f2dd51fe3ecf24b4c5fbf/psutil-7.2.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:e78c8603dcd9a04c7364f1a3e670cea95d51ee865e4efb3556a3a63adef958ea", size = 131082, upload-time = "2026-01-28T18:14:59.732Z" },+ { url = "https://files.pythonhosted.org/packages/37/d6/246513fbf9fa174af531f28412297dd05241d97a75911ac8febefa1a53c6/psutil-7.2.2-cp313-cp313t-manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1a571f2330c966c62aeda00dd24620425d4b0cc86881c89861fbc04549e5dc63", size = 181476, upload-time = "2026-01-28T18:15:01.884Z" },+ { url = "https://files.pythonhosted.org/packages/b8/b5/9182c9af3836cca61696dabe4fd1304e17bc56cb62f17439e1154f225dd3/psutil-7.2.2-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:917e891983ca3c1887b4ef36447b1e0873e70c933afc831c6b6da078ba474312", size = 184062, upload-time = "2026-01-28T18:15:04.436Z" },+ { url = "https://files.pythonhosted.org/packages/16/ba/0756dca669f5a9300d0cbcbfae9a4c30e446dfc7440ffe43ded5724bfd93/psutil-7.2.2-cp313-cp313t-win_amd64.whl", hash = "sha256:ab486563df44c17f5173621c7b198955bd6b613fb87c71c161f827d3fb149a9b", size = 139893, upload-time = "2026-01-28T18:15:06.378Z" },+ { url = "https://files.pythonhosted.org/packages/1c/61/8fa0e26f33623b49949346de05ec1ddaad02ed8ba64af45f40a147dbfa97/psutil-7.2.2-cp313-cp313t-win_arm64.whl", hash = "sha256:ae0aefdd8796a7737eccea863f80f81e468a1e4cf14d926bd9b6f5f2d5f90ca9", size = 135589, upload-time = "2026-01-28T18:15:08.03Z" },+ { url = "https://files.pythonhosted.org/packages/81/69/ef179ab5ca24f32acc1dac0c247fd6a13b501fd5534dbae0e05a1c48b66d/psutil-7.2.2-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:eed63d3b4d62449571547b60578c5b2c4bcccc5387148db46e0c2313dad0ee00", size = 130664, upload-time = "2026-01-28T18:15:09.469Z" },+ { url = "https://files.pythonhosted.org/packages/7b/64/665248b557a236d3fa9efc378d60d95ef56dd0a490c2cd37dafc7660d4a9/psutil-7.2.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:7b6d09433a10592ce39b13d7be5a54fbac1d1228ed29abc880fb23df7cb694c9", size = 131087, upload-time = "2026-01-28T18:15:11.724Z" },+ { url = "https://files.pythonhosted.org/packages/d5/2e/e6782744700d6759ebce3043dcfa661fb61e2fb752b91cdeae9af12c2178/psutil-7.2.2-cp314-cp314t-manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1fa4ecf83bcdf6e6c8f4449aff98eefb5d0604bf88cb883d7da3d8d2d909546a", size = 182383, upload-time = "2026-01-28T18:15:13.445Z" },+ { url = "https://files.pythonhosted.org/packages/57/49/0a41cefd10cb7505cdc04dab3eacf24c0c2cb158a998b8c7b1d27ee2c1f5/psutil-7.2.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e452c464a02e7dc7822a05d25db4cde564444a67e58539a00f929c51eddda0cf", size = 185210, upload-time = "2026-01-28T18:15:16.002Z" },+ { url = "https://files.pythonhosted.org/packages/dd/2c/ff9bfb544f283ba5f83ba725a3c5fec6d6b10b8f27ac1dc641c473dc390d/psutil-7.2.2-cp314-cp314t-win_amd64.whl", hash = "sha256:c7663d4e37f13e884d13994247449e9f8f574bc4655d509c3b95e9ec9e2b9dc1", size = 141228, upload-time = "2026-01-28T18:15:18.385Z" },+ { url = "https://files.pythonhosted.org/packages/f2/fc/f8d9c31db14fcec13748d373e668bc3bed94d9077dbc17fb0eebc073233c/psutil-7.2.2-cp314-cp314t-win_arm64.whl", hash = "sha256:11fe5a4f613759764e79c65cf11ebdf26e33d6dd34336f8a337aa2996d71c841", size = 136284, upload-time = "2026-01-28T18:15:19.912Z" },+ { url = "https://files.pythonhosted.org/packages/e7/36/5ee6e05c9bd427237b11b3937ad82bb8ad2752d72c6969314590dd0c2f6e/psutil-7.2.2-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:ed0cace939114f62738d808fdcecd4c869222507e266e574799e9c0faa17d486", size = 129090, upload-time = "2026-01-28T18:15:22.168Z" },+ { url = "https://files.pythonhosted.org/packages/80/c4/f5af4c1ca8c1eeb2e92ccca14ce8effdeec651d5ab6053c589b074eda6e1/psutil-7.2.2-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:1a7b04c10f32cc88ab39cbf606e117fd74721c831c98a27dc04578deb0c16979", size = 129859, upload-time = "2026-01-28T18:15:23.795Z" },+ { url = "https://files.pythonhosted.org/packages/b5/70/5d8df3b09e25bce090399cf48e452d25c935ab72dad19406c77f4e828045/psutil-7.2.2-cp36-abi3-manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:076a2d2f923fd4821644f5ba89f059523da90dc9014e85f8e45a5774ca5bc6f9", size = 155560, upload-time = "2026-01-28T18:15:25.976Z" },+ { url = "https://files.pythonhosted.org/packages/63/65/37648c0c158dc222aba51c089eb3bdfa238e621674dc42d48706e639204f/psutil-7.2.2-cp36-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b0726cecd84f9474419d67252add4ac0cd9811b04d61123054b9fb6f57df6e9e", size = 156997, upload-time = "2026-01-28T18:15:27.794Z" },+ { url = "https://files.pythonhosted.org/packages/8e/13/125093eadae863ce03c6ffdbae9929430d116a246ef69866dad94da3bfbc/psutil-7.2.2-cp36-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:fd04ef36b4a6d599bbdb225dd1d3f51e00105f6d48a28f006da7f9822f2606d8", size = 148972, upload-time = "2026-01-28T18:15:29.342Z" },+ { url = "https://files.pythonhosted.org/packages/04/78/0acd37ca84ce3ddffaa92ef0f571e073faa6d8ff1f0559ab1272188ea2be/psutil-7.2.2-cp36-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:b58fabe35e80b264a4e3bb23e6b96f9e45a3df7fb7eed419ac0e5947c61e47cc", size = 148266, upload-time = "2026-01-28T18:15:31.597Z" },+ { url = "https://files.pythonhosted.org/packages/b4/90/e2159492b5426be0c1fef7acba807a03511f97c5f86b3caeda6ad92351a7/psutil-7.2.2-cp37-abi3-win_amd64.whl", hash = "sha256:eb7e81434c8d223ec4a219b5fc1c47d0417b12be7ea866e24fb5ad6e84b3d988", size = 137737, upload-time = "2026-01-28T18:15:33.849Z" },+ { url = "https://files.pythonhosted.org/packages/8c/c7/7bb2e321574b10df20cbde462a94e2b71d05f9bbda251ef27d104668306a/psutil-7.2.2-cp37-abi3-win_arm64.whl", hash = "sha256:8c233660f575a5a89e6d4cb65d9f938126312bca76d8fe087b947b3a1aaac9ee", size = 134617, upload-time = "2026-01-28T18:15:36.514Z" },+]++[[package]]+name = "py-cpuinfo"+version = "9.0.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/37/a8/d832f7293ebb21690860d2e01d8115e5ff6f2ae8bbdc953f0eb0fa4bd2c7/py-cpuinfo-9.0.0.tar.gz", hash = "sha256:3cdbbf3fac90dc6f118bfd64384f309edeadd902d7c8fb17f02ffa1fc3f49690", size = 104716, upload-time = "2022-10-25T20:38:06.303Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/e0/a9/023730ba63db1e494a271cb018dcd361bd2c917ba7004c3e49d5daf795a2/py_cpuinfo-9.0.0-py3-none-any.whl", hash = "sha256:859625bc251f64e21f077d099d4162689c762b5d6a4c3c97553d56241c9674d5", size = 22335, upload-time = "2022-10-25T20:38:27.636Z" },+]++[[package]]+name = "pyclipper"+version = "1.4.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/f6/21/3c06205bb407e1f79b73b7b4dfb3950bd9537c4f625a68ab5cc41177f5bc/pyclipper-1.4.0.tar.gz", hash = "sha256:9882bd889f27da78add4dd6f881d25697efc740bf840274e749988d25496c8e1", size = 54489, upload-time = "2025-12-01T13:15:35.015Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/8a/9f/a10173d32ecc2ce19a04d018163f3ca22a04c0c6ad03b464dcd32f9152a8/pyclipper-1.4.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:bafad70d2679c187120e8c44e1f9a8b06150bad8c0aecf612ad7dfbfa9510f73", size = 264510, upload-time = "2025-12-01T13:14:46.551Z" },+ { url = "https://files.pythonhosted.org/packages/e0/c2/5490ddc4a1f7ceeaa0258f4266397e720c02db515b2ca5bc69b85676f697/pyclipper-1.4.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0b74a9dd44b22a7fd35d65fb1ceeba57f3817f34a97a28c3255556362e491447", size = 139498, upload-time = "2025-12-01T13:14:48.31Z" },+ { url = "https://files.pythonhosted.org/packages/3b/0a/bea9102d1d75634b1a5702b0e92982451a1eafca73c4845d3dbe27eba13d/pyclipper-1.4.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:0a4d2736fb3c42e8eb1d38bf27a720d1015526c11e476bded55138a977c17d9d", size = 970974, upload-time = "2025-12-01T13:14:49.799Z" },+ { url = "https://files.pythonhosted.org/packages/8b/1b/097f8776d5b3a10eb7b443b632221f4ed825d892e79e05682f4b10a1a59c/pyclipper-1.4.0-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b3b3630051b53ad2564cb079e088b112dd576e3d91038338ad1cc7915e0f14dc", size = 943315, upload-time = "2025-12-01T13:14:51.266Z" },+ { url = "https://files.pythonhosted.org/packages/fd/4d/17d6a3f1abf0f368d58f2309e80ee3761afb1fd1342f7780ab32ba4f0b1d/pyclipper-1.4.0-cp310-cp310-win32.whl", hash = "sha256:8d42b07a2f6cfe2d9b87daf345443583f00a14e856927782fde52f3a255e305a", size = 95286, upload-time = "2025-12-01T13:14:52.922Z" },+ { url = "https://files.pythonhosted.org/packages/53/ca/b30138427ed122ec9b47980b943164974a2ec606fa3f71597033b9a9f9a6/pyclipper-1.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:6a97b961f182b92d899ca88c1bb3632faea2e00ce18d07c5f789666ebb021ca4", size = 104227, upload-time = "2025-12-01T13:14:54.013Z" },+ { url = "https://files.pythonhosted.org/packages/de/e3/64cf7794319b088c288706087141e53ac259c7959728303276d18adc665d/pyclipper-1.4.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:adcb7ca33c5bdc33cd775e8b3eadad54873c802a6d909067a57348bcb96e7a2d", size = 264281, upload-time = "2025-12-01T13:14:55.47Z" },+ { url = "https://files.pythonhosted.org/packages/34/cd/44ec0da0306fa4231e76f1c2cb1fa394d7bde8db490a2b24d55b39865f69/pyclipper-1.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:fd24849d2b94ec749ceac7c34c9f01010d23b6e9d9216cf2238b8481160e703d", size = 139426, upload-time = "2025-12-01T13:14:56.683Z" },+ { url = "https://files.pythonhosted.org/packages/ad/88/d8f6c6763ea622fe35e19c75d8b39ed6c55191ddc82d65e06bc46b26cb8e/pyclipper-1.4.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1b6c8d75ba20c6433c9ea8f1a0feb7e4d3ac06a09ad1fd6d571afc1ddf89b869", size = 989649, upload-time = "2025-12-01T13:14:58.28Z" },+ { url = "https://files.pythonhosted.org/packages/ff/e9/ea7d68c8c4af3842d6515bedcf06418610ad75f111e64c92c1d4785a1513/pyclipper-1.4.0-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:58e29d7443d7cc0e83ee9daf43927730386629786d00c63b04fe3b53ac01462c", size = 962842, upload-time = "2025-12-01T13:15:00.044Z" },+ { url = "https://files.pythonhosted.org/packages/4e/b7/0b4a272d8726e51ab05e2b933d8cc47f29757fb8212e38b619e170e6015c/pyclipper-1.4.0-cp311-cp311-win32.whl", hash = "sha256:a8d2b5fb75ebe57e21ce61e79a9131edec2622ff23cc665e4d1d1f201bc1a801", size = 95098, upload-time = "2025-12-01T13:15:01.359Z" },+ { url = "https://files.pythonhosted.org/packages/3a/76/4901de2919198bb2bd3d989f86d4a1dff363962425bb2d63e24e6c990042/pyclipper-1.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:e9b973467d9c5fa9bc30bb6ac95f9f4d7c3d9fc25f6cf2d1cc972088e5955c01", size = 104362, upload-time = "2025-12-01T13:15:02.439Z" },+ { url = "https://files.pythonhosted.org/packages/90/1b/7a07b68e0842324d46c03e512d8eefa9cb92ba2a792b3b4ebf939dafcac3/pyclipper-1.4.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:222ac96c8b8281b53d695b9c4fedc674f56d6d4320ad23f1bdbd168f4e316140", size = 265676, upload-time = "2025-12-01T13:15:04.15Z" },+ { url = "https://files.pythonhosted.org/packages/6b/dd/8bd622521c05d04963420ae6664093f154343ed044c53ea260a310c8bb4d/pyclipper-1.4.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:f3672dbafbb458f1b96e1ee3e610d174acb5ace5bd2ed5d1252603bb797f2fc6", size = 140458, upload-time = "2025-12-01T13:15:05.76Z" },+ { url = "https://files.pythonhosted.org/packages/7a/06/6e3e241882bf7d6ab23d9c69ba4e85f1ec47397cbbeee948a16cf75e21ed/pyclipper-1.4.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d1f807e2b4760a8e5c6d6b4e8c1d71ef52b7fe1946ff088f4fa41e16a881a5ca", size = 978235, upload-time = "2025-12-01T13:15:06.993Z" },+ { url = "https://files.pythonhosted.org/packages/cf/f4/3418c1cd5eea640a9fa2501d4bc0b3655fa8d40145d1a4f484b987990a75/pyclipper-1.4.0-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ce1f83c9a4e10ea3de1959f0ae79e9a5bd41346dff648fee6228ba9eaf8b3872", size = 961388, upload-time = "2025-12-01T13:15:08.467Z" },+ { url = "https://files.pythonhosted.org/packages/ac/94/c85401d24be634af529c962dd5d781f3cb62a67cd769534df2cb3feee97a/pyclipper-1.4.0-cp312-cp312-win32.whl", hash = "sha256:3ef44b64666ebf1cb521a08a60c3e639d21b8c50bfbe846ba7c52a0415e936f4", size = 95169, upload-time = "2025-12-01T13:15:10.098Z" },+ { url = "https://files.pythonhosted.org/packages/97/77/dfea08e3b230b82ee22543c30c35d33d42f846a77f96caf7c504dd54fab1/pyclipper-1.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:d1e5498d883b706a4ce636247f0d830c6eb34a25b843a1b78e2c969754ca9037", size = 104619, upload-time = "2025-12-01T13:15:11.592Z" },+ { url = "https://files.pythonhosted.org/packages/67/d0/cbce7d47de1e6458f66a4d999b091640134deb8f2c7351eab993b70d2e10/pyclipper-1.4.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:d49df13cbb2627ccb13a1046f3ea6ebf7177b5504ec61bdef87d6a704046fd6e", size = 264342, upload-time = "2025-12-01T13:15:12.697Z" },+ { url = "https://files.pythonhosted.org/packages/ce/cc/742b9d69d96c58ac156947e1b56d0f81cbacbccf869e2ac7229f2f86dc4e/pyclipper-1.4.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:37bfec361e174110cdddffd5ecd070a8064015c99383d95eb692c253951eee8a", size = 139839, upload-time = "2025-12-01T13:15:13.911Z" },+ { url = "https://files.pythonhosted.org/packages/db/48/dd301d62c1529efdd721b47b9e5fb52120fcdac5f4d3405cfc0d2f391414/pyclipper-1.4.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:14c8bdb5a72004b721c4e6f448d2c2262d74a7f0c9e3076aeff41e564a92389f", size = 972142, upload-time = "2025-12-01T13:15:15.477Z" },+ { url = "https://files.pythonhosted.org/packages/07/bf/d493fd1b33bb090fa64e28c1009374d5d72fa705f9331cd56517c35e381e/pyclipper-1.4.0-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f2a50c22c3a78cb4e48347ecf06930f61ce98cf9252f2e292aa025471e9d75b1", size = 952789, upload-time = "2025-12-01T13:15:17.042Z" },+ { url = "https://files.pythonhosted.org/packages/cf/88/b95ea8ea21ddca34aa14b123226a81526dd2faaa993f9aabd3ed21231604/pyclipper-1.4.0-cp313-cp313-win32.whl", hash = "sha256:c9a3faa416ff536cee93417a72bfb690d9dea136dc39a39dbbe1e5dadf108c9c", size = 94817, upload-time = "2025-12-01T13:15:18.724Z" },+ { url = "https://files.pythonhosted.org/packages/ba/42/0a1920d276a0e1ca21dc0d13ee9e3ba10a9a8aa3abac76cd5e5a9f503306/pyclipper-1.4.0-cp313-cp313-win_amd64.whl", hash = "sha256:d4b2d7c41086f1927d14947c563dfc7beed2f6c0d9af13c42fe3dcdc20d35832", size = 104007, upload-time = "2025-12-01T13:15:19.763Z" },+ { url = "https://files.pythonhosted.org/packages/1a/20/04d58c70f3ccd404f179f8dd81d16722a05a3bf1ab61445ee64e8218c1f8/pyclipper-1.4.0-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:7c87480fc91a5af4c1ba310bdb7de2f089a3eeef5fe351a3cedc37da1fcced1c", size = 265167, upload-time = "2025-12-01T13:15:20.844Z" },+ { url = "https://files.pythonhosted.org/packages/bd/2e/a570c1abe69b7260ca0caab4236ce6ea3661193ebf8d1bd7f78ccce537a5/pyclipper-1.4.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:81d8bb2d1fb9d66dc7ea4373b176bb4b02443a7e328b3b603a73faec088b952e", size = 139966, upload-time = "2025-12-01T13:15:22.036Z" },+ { url = "https://files.pythonhosted.org/packages/e8/3b/e0859e54adabdde8a24a29d3f525ebb31c71ddf2e8d93edce83a3c212ffc/pyclipper-1.4.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:773c0e06b683214dcfc6711be230c83b03cddebe8a57eae053d4603dd63582f9", size = 968216, upload-time = "2025-12-01T13:15:23.18Z" },+ { url = "https://files.pythonhosted.org/packages/f6/6b/e3c4febf0a35ae643ee579b09988dd931602b5bf311020535fd9e5b7e715/pyclipper-1.4.0-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9bc45f2463d997848450dbed91c950ca37c6cf27f84a49a5cad4affc0b469e39", size = 954198, upload-time = "2025-12-01T13:15:24.522Z" },+ { url = "https://files.pythonhosted.org/packages/fc/74/728efcee02e12acb486ce9d56fa037120c9bf5b77c54bbdbaa441c14a9d9/pyclipper-1.4.0-cp314-cp314-win32.whl", hash = "sha256:0b8c2105b3b3c44dbe1a266f64309407fe30bf372cf39a94dc8aaa97df00da5b", size = 96951, upload-time = "2025-12-01T13:15:25.79Z" },+ { url = "https://files.pythonhosted.org/packages/e3/d7/7f4354e69f10a917e5c7d5d72a499ef2e10945312f5e72c414a0a08d2ae4/pyclipper-1.4.0-cp314-cp314-win_amd64.whl", hash = "sha256:6c317e182590c88ec0194149995e3d71a979cfef3b246383f4e035f9d4a11826", size = 106782, upload-time = "2025-12-01T13:15:26.945Z" },+ { url = "https://files.pythonhosted.org/packages/63/60/fc32c7a3d7f61a970511ec2857ecd09693d8ac80d560ee7b8e67a6d268c9/pyclipper-1.4.0-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:f160a2c6ba036f7eaf09f1f10f4fbfa734234af9112fb5187877efed78df9303", size = 269880, upload-time = "2025-12-01T13:15:28.117Z" },+ { url = "https://files.pythonhosted.org/packages/49/df/c4a72d3f62f0ba03ec440c4fff56cd2d674a4334d23c5064cbf41c9583f6/pyclipper-1.4.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:a9f11ad133257c52c40d50de7a0ca3370a0cdd8e3d11eec0604ad3c34ba549e9", size = 141706, upload-time = "2025-12-01T13:15:30.134Z" },+ { url = "https://files.pythonhosted.org/packages/c5/0b/cf55df03e2175e1e2da9db585241401e0bc98f76bee3791bed39d0313449/pyclipper-1.4.0-cp314-cp314t-win32.whl", hash = "sha256:bbc827b77442c99deaeee26e0e7f172355ddb097a5e126aea206d447d3b26286", size = 105308, upload-time = "2025-12-01T13:15:31.225Z" },+ { url = "https://files.pythonhosted.org/packages/8f/dc/53df8b6931d47080b4fe4ee8450d42e660ee1c5c1556c7ab73359182b769/pyclipper-1.4.0-cp314-cp314t-win_amd64.whl", hash = "sha256:29dae3e0296dff8502eeb7639fcfee794b0eec8590ba3563aee28db269da6b04", size = 117608, upload-time = "2025-12-01T13:15:32.69Z" },+ { url = "https://files.pythonhosted.org/packages/18/59/81050abdc9e5b90ffc2c765738c5e40e9abd8e44864aaa737b600f16c562/pyclipper-1.4.0-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:98b2a40f98e1fc1b29e8a6094072e7e0c7dfe901e573bf6cfc6eb7ce84a7ae87", size = 126495, upload-time = "2025-12-01T13:15:33.743Z" },+]++[[package]]+name = "pycparser"+version = "3.11"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/da/a8/c5fdbeee588bb8ada9458774f43adf1bdd30bd59157055142183e769a024/pycparser-3.11.tar.gz", hash = "sha256:d875f09c3507d00e1aba0eecc6dcadc1352f30fff09dc6bff2f1c2935e97c2bc", size = 113796, upload-time = "2026-10-09T12:56:59.539Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/90/11/0e6f11117525ff0eec40ebac3d313376f102df93ca44ad9e893ee85e4f89/pycparser-3.11-py3-none-any.whl", hash = "sha256:51d5a8ba2be0bbe440b99d2112604c95bbbc3c2748a64260186c541e1729cd80", size = 51178, upload-time = "2026-10-09T12:56:58.131Z" },+]++[[package]]+name = "pycryptodome"+version = "4.0.1"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/bb/95/65a9c0556d5982eaebf433ed3d608ca0e0583f8a723eddfe4497c4fdbca6/pycryptodome-4.0.1.tar.gz", hash = "sha256:9981c68e717db5e841a74c4b33016d25f7d9beb8f7dd55c4dc844b9b42c08150", size = 1500840, upload-time = "2026-10-17T18:11:36.738Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/71/67/2d17bca0727a316144fa72371b03052ba1ac8d51a7587ffeec9ce450cf38/pycryptodome-4.0.1-cp315-cp315t-macosx_10_15_universal2.whl", hash = "sha256:9bcc7bbc803c9d1751a286337c99f18466c6e921222485107cc8c070200c5b19", size = 1358642, upload-time = "2026-10-17T18:10:48.87Z" },+ { url = "https://files.pythonhosted.org/packages/84/76/edb70e6894baa28f17d590d6547cd9d646c31c10a4efd07e1f43842ec263/pycryptodome-4.0.1-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:fabaf99d8a107a9a926e097cdc1aba9528ba0373ce2f0ee757adb563c19a145f", size = 1203353, upload-time = "2026-10-17T18:10:50.744Z" },+ { url = "https://files.pythonhosted.org/packages/d8/6e/9bda6d6f9d2f1a7660369a7a69fcf28c2998c6dbba39d31e195eb730c5a3/pycryptodome-4.0.1-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:f8ffcce0f8306622a40cb2e9736f89af27c53b6f183c434adaf99057843770b6", size = 1872558, upload-time = "2026-10-17T18:10:52.485Z" },+ { url = "https://files.pythonhosted.org/packages/2f/83/57f25d0072759a1fe384b8a0c4894cd0639a6a59cefa0887d7d7f0bcb6a6/pycryptodome-4.0.1-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:a9781d1850e054529748364c3d0970db50a315ade42532ed4d9a2b97eff981a8", size = 2532459, upload-time = "2026-10-17T18:10:54.963Z" },+ { url = "https://files.pythonhosted.org/packages/3a/34/981568c3acdacfe96d999cdb423b148f6d94b171e87de5ca89457cb1fc75/pycryptodome-4.0.1-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:fe0004b59789e25bd455a9153643716b1fb9b10d09704210f8bb27e9a82dd973", size = 1881933, upload-time = "2026-10-17T18:10:57.001Z" },+ { url = "https://files.pythonhosted.org/packages/4d/c9/620741d1c8edf6105a70d21ad4f487d4971ebcdf5ccc4ed0e0fd14404f79/pycryptodome-4.0.1-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:da3798eed41b040a12e673d96b291385f656b516a7938aff19c6865ab3417c0e", size = 2611599, upload-time = "2026-10-17T18:10:59.236Z" },+ { url = "https://files.pythonhosted.org/packages/8a/69/850f0d175dff53040362111a5f2272e691d3bc9c4560eaeb6a19b99d5fb4/pycryptodome-4.0.1-cp315-cp315t-win32.whl", hash = "sha256:34ed0e4c77398242ded2a4ddf6587c2b27773f3a68bd58af4fc2cfdde153347a", size = 1180351, upload-time = "2026-10-17T18:11:01.503Z" },+ { url = "https://files.pythonhosted.org/packages/f7/00/01f169d03916ff2d5771c2c8000a4b242d1620204343fbc2a4c070f1c7db/pycryptodome-4.0.1-cp315-cp315t-win_amd64.whl", hash = "sha256:42e09589f7254fe51e42dd0e4328518bfb4ca5105f18574bd2d9ad2fc7e54da5", size = 1349675, upload-time = "2026-10-17T18:11:03.198Z" },+ { url = "https://files.pythonhosted.org/packages/e2/05/179d9bcce20766636dc00da562601cba04d513cb140cbf4a49aa8b2e9c89/pycryptodome-4.0.1-cp315-cp315t-win_arm64.whl", hash = "sha256:15dcc5e26a874931ca48b0ac43a1c5c0cb5a4106d7d9fee8d5ae0c9343e59f09", size = 1174732, upload-time = "2026-10-17T18:11:04.796Z" },+ { url = "https://files.pythonhosted.org/packages/22/5c/a8a903c48ab726e8a72d4ab750e0a7fe0ace0dcd6fb426ce5b004ff618c6/pycryptodome-4.0.1-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:1e9ec908360f26087724b03cd582b24063eecdf21c43c48a01828f3555ac54df", size = 1359321, upload-time = "2026-10-17T18:11:06.478Z" },+ { url = "https://files.pythonhosted.org/packages/d9/51/de781feb00782e3301d92179b6253d1b7e4ecd41111aed52664b6a3c2cf4/pycryptodome-4.0.1-cp39-abi3-macosx_10_9_x86_64.whl", hash = "sha256:e5be3ea806afdc71890e53d20ead92ef2ca9fdfa49c1a4892bc788136bb72c1e", size = 1201290, upload-time = "2026-10-17T18:11:08.068Z" },+ { url = "https://files.pythonhosted.org/packages/3b/7e/e72be1be5879001d922ce66d54e940fdf1bf6ce19bd6521e130ad26fe58d/pycryptodome-4.0.1-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:33b1a327ad08afc3c74bf0b7f36885149dade11c81758eabed0bf6b8e7bf4da4", size = 1869567, upload-time = "2026-10-17T18:11:10.191Z" },+ { url = "https://files.pythonhosted.org/packages/ca/f6/1d91d5cbe2f3acd0ba6f596d54466ab8703485d4edf84ca28d9507db8d43/pycryptodome-4.0.1-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:71d7e3b83bf0ffc2c00dee1f7a7283914d0e406a55220f979b82a89baf2a19b0", size = 2521167, upload-time = "2026-10-17T18:11:12.418Z" },+ { url = "https://files.pythonhosted.org/packages/0b/28/a64c0e7fa3fb1cb4ed1d466bfe29c96bc5cbc180b144258e813caba0ff03/pycryptodome-4.0.1-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:6f63aa01f63ff411f9fd14dff54c54126add97e000a53372b211da191919957b", size = 1873251, upload-time = "2026-10-17T18:11:14.294Z" },+ { url = "https://files.pythonhosted.org/packages/c3/1c/200317925065b1a212ae1ad4478654cc637c44a4957d5070cb786548b0a5/pycryptodome-4.0.1-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:d326d1f4d8e4935daecba88fab32672229ee6d47ed599663a1dfbb93934cfccd", size = 2602523, upload-time = "2026-10-17T18:11:16.236Z" },+ { url = "https://files.pythonhosted.org/packages/42/91/47d6d2a1c6cd11fe81568be1ed1f722f5ddd3fd35e9182c929399a5a6ff0/pycryptodome-4.0.1-cp39-abi3-win32.whl", hash = "sha256:190a06fe7651bd9aab35cc87205d5ac0ec5c956b76988629edb671a43cba2406", size = 1168613, upload-time = "2026-10-17T18:11:17.897Z" },+ { url = "https://files.pythonhosted.org/packages/f2/a0/d9a422a4cbced931a2dd64a29f5fc7f5a82c12e3a66783652970745e6687/pycryptodome-4.0.1-cp39-abi3-win_amd64.whl", hash = "sha256:c4c0447cf70e6fa2914657959548eb50ba594a1a1c198698f8c96abbc6ca3c89", size = 1330493, upload-time = "2026-10-17T18:11:19.799Z" },+ { url = "https://files.pythonhosted.org/packages/e1/7a/6b258d79e4df1c125349c6d26e9bff42188883001e9cee1983ea65236678/pycryptodome-4.0.1-cp39-abi3-win_arm64.whl", hash = "sha256:875b166daa4fb9fa3ba0bbeaad96072b24f4a2a32d365da49a10998972a0673d", size = 1157043, upload-time = "2026-10-17T18:11:21.649Z" },+ { url = "https://files.pythonhosted.org/packages/cb/32/0ce35401e14b80d535a9eb267fbed38ae05436bd2e1791d3c480a117e6be/pycryptodome-4.0.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:f5f3fafb47d780232c7c02bfc711834829f1156570bc032a5c4a13eab65e9310", size = 1168484, upload-time = "2026-10-17T18:11:23.12Z" },+ { url = "https://files.pythonhosted.org/packages/83/21/c2aae36746db5b72982544866bc65c5b2167f1df8a4fa0af6f07ca3fb997/pycryptodome-4.0.1-pp310-pypy310_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c01b29ff0c8cc1cfb98e817a16fcf455e2f7bc6929d838f4b45a1ea9d7aff50e", size = 1122053, upload-time = "2026-10-17T18:11:24.937Z" },+ { url = "https://files.pythonhosted.org/packages/86/4d/a2ccf4ce601c9802c4cca13a6d7f9c36f1d498d5e55bf5c38e95c67e7f0a/pycryptodome-4.0.1-pp310-pypy310_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:84f75be111bc4b295d6594d4e00d2065c3926f3f73dd14a8b1f6529b1dba01e5", size = 1242026, upload-time = "2026-10-17T18:11:26.826Z" },+ { url = "https://files.pythonhosted.org/packages/bb/af/d019258cd9b52638d4ef7abf4e9b3675a659aebb3a0d31280b85a6d851b3/pycryptodome-4.0.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:00b89b0bcce6d8cc3b9a05adb67df09b9d72c7dfe2da4560d253e266eb940a45", size = 1333809, upload-time = "2026-10-17T18:11:28.607Z" },+ { url = "https://files.pythonhosted.org/packages/c5/82/c29790848200a326bc7c1bd1e4d14ae3df298644bfd416a59bdeebaf2c68/pycryptodome-4.0.1-pp311-pypy311_pp80-macosx_10_15_x86_64.whl", hash = "sha256:b7c2e42157174768a39814ec3d900e4bd7b70bbca5046e0b463c5ca76a87bd89", size = 1164168, upload-time = "2026-10-17T18:11:30.248Z" },+ { url = "https://files.pythonhosted.org/packages/d6/16/55074542f8713f5d3cca7763d0f56071c77aa3c6e73355e2e1149f2e9572/pycryptodome-4.0.1-pp311-pypy311_pp80-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b22e6bafde4ace4a25230505435025dc99c9747e97838a5ec9253fa886612d7d", size = 1122051, upload-time = "2026-10-17T18:11:31.781Z" },+ { url = "https://files.pythonhosted.org/packages/42/00/ceecfe950ebaa4987d895d9699ee9c0498170b38722810072ed3f3dfe0fe/pycryptodome-4.0.1-pp311-pypy311_pp80-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:178ff9f30ba2d00d8f48eb33834fc9ace091d5a6b339caa0fff4dacd1b2448ca", size = 1242027, upload-time = "2026-10-17T18:11:33.431Z" },+ { url = "https://files.pythonhosted.org/packages/9f/73/a0d32806fad83e13f8a2f46c06277c213d2207195260db6d5d119e90e7c2/pycryptodome-4.0.1-pp311-pypy311_pp80-win_amd64.whl", hash = "sha256:c9cc0d5358bd72ccd1cfed5ecaecd5939e4c93b160e1ca03d2d4617d302fd892", size = 1333790, upload-time = "2026-10-17T18:11:35.183Z" },+]++[[package]]+name = "pydantic"+version = "2.14.1"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "annotated-types" },+ { name = "pydantic-core" },+ { name = "typing-extensions" },+ { name = "typing-inspection" },+]+sdist = { url = "https://files.pythonhosted.org/packages/7c/0b/8e10b2e693af8ec54346a14caf36221334775975a747c9ceaa3f8371d96d/pydantic-2.14.1.tar.gz", hash = "sha256:94f478203dd03404682a1ada216965651dd74b1d2d5ffd62e00e0837caab5c26", size = 900362, upload-time = "2026-10-11T18:37:55.396Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/35/ea/a56b9fe5066f3537b7882f77e9c5dfb26d8c2eefdaed9b5fc73d57b4dc22/pydantic-2.14.1-py3-none-any.whl", hash = "sha256:9195d967ec791692a04438115466764fb8b9a27b31f14a760437694f40d6b454", size = 488106, upload-time = "2026-10-11T18:37:53.437Z" },+]++[[package]]+name = "pydantic-core"+version = "2.50.1"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "typing-extensions" },+]+sdist = { url = "https://files.pythonhosted.org/packages/a6/24/af4ec4be49fbc810f35b0bdcacc3d433b56bbfa469fd3bfd4ae116cd9bf1/pydantic_core-2.50.1.tar.gz", hash = "sha256:e50d7b94baac6c7d09927fa5ca5800a0c7ee5015c7fcff65beb3a1931b5a6e09", size = 513515, upload-time = "2026-10-11T18:35:44.82Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/09/db/c9cc34707ba2c23ce90d54e8a4ee9307583ad054b9df2ce570ba550cb576/pydantic_core-2.50.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:b281a3b0f0822618fe5e3e0d8a2048b6356b14388505dc9374ccffeb69989713", size = 2154222, upload-time = "2026-10-11T18:31:38.345Z" },+ { url = "https://files.pythonhosted.org/packages/c1/17/6963f4ee55b7df7658f5c036c0f90baf8cd3d413f5d8b551f227e8467afc/pydantic_core-2.50.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1fa4c8bc12c1354c5550c0c35c1852c8c1901e89e06561724e03f8d0342e1f87", size = 2048126, upload-time = "2026-10-11T18:31:41.061Z" },+ { url = "https://files.pythonhosted.org/packages/bf/be/f75637e222085d29a3076edbc5cfd0dd9b77d145e310ff7dc1150f07558a/pydantic_core-2.50.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3aa9de446b793de2beb6fa2d9d0961803126c4e2a99c2f25ab59b9fd6ea125c0", size = 2052460, upload-time = "2026-10-11T18:31:42.321Z" },+ { url = "https://files.pythonhosted.org/packages/7a/1e/3d192ffa39ce3bd0e98e988fb5c055cfbf4af6e6e155a4ca5baa86d1f2cc/pydantic_core-2.50.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:de531ce1e2a3364e8767878b58f4ff728a434b4fde089781fe30b1e08e2396e0", size = 2190750, upload-time = "2026-10-11T18:31:43.572Z" },+ { url = "https://files.pythonhosted.org/packages/b2/7e/12ea94df5220ab316ee5bb498ebcf710cff2db352653039fb6033f6997d1/pydantic_core-2.50.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a7c58106de36ac6a56314182958de20db8d3a29dfd5db527192cc754e4f8e7fb", size = 2390043, upload-time = "2026-10-11T18:31:44.745Z" },+ { url = "https://files.pythonhosted.org/packages/f6/bc/4fbb6dc90af038628ec824434a9841be9d46854f9267bb658f09e315024d/pydantic_core-2.50.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8b4c3df25bd323bf1d36a648d563cf1fc69d717451569927151bdad7cad07a77", size = 2432397, upload-time = "2026-10-11T18:31:46.186Z" },+ { url = "https://files.pythonhosted.org/packages/1b/1a/21a58791021397d9ca35295e3f4291c16e319155c5904334b89eb07e97e1/pydantic_core-2.50.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f77ac30b19221cd9bd3fcfa3d4614eff93140d0572ab730cded17b64adca05f3", size = 2160719, upload-time = "2026-10-11T18:31:47.557Z" },+ { url = "https://files.pythonhosted.org/packages/73/6a/d5b2c5876162fd2c444eaed0064b5d9d9d0ef0d31530fc6a7997e8685ad8/pydantic_core-2.50.1-cp310-cp310-manylinux_2_31_riscv64.whl", hash = "sha256:d939de9c82e2126f7f48a7e658f8a85ed46d57662d53f44c49b8895fe94a3eb7", size = 2256164, upload-time = "2026-10-11T18:31:48.797Z" },+ { url = "https://files.pythonhosted.org/packages/af/e8/1a6625d6e99250388dd0ae817c5d75839cd6103e7b790f59e0ffff74955d/pydantic_core-2.50.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:30ddf019d082c117b5d309e5b86710c2a78909907ec1a9381feec3eec02eca0b", size = 2271176, upload-time = "2026-10-11T18:31:49.987Z" },+ { url = "https://files.pythonhosted.org/packages/19/9f/bbdd137d7ec41284701dab4d1489ea597d401dff2f5f3e6b41ea872e0b12/pydantic_core-2.50.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:2ab756b72bd5054e4c7ef3ded331b35786cbd3cf931531a508f79a9537517064", size = 2304637, upload-time = "2026-10-11T18:31:51.251Z" },+ { url = "https://files.pythonhosted.org/packages/49/5d/7bd322e649b41b45130bc00bfa34dc57498c853aa8e6fc9604e33bc7087c/pydantic_core-2.50.1-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:b087b1c5be7ac687cf22eabfe4b6b608d40df23610651e93611e1f49118baf84", size = 2467374, upload-time = "2026-10-11T18:31:52.587Z" },+ { url = "https://files.pythonhosted.org/packages/53/48/41a91111590eb7ba68a7c64c03139235a4b8349930abcb87931aa80da796/pydantic_core-2.50.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:a44101320cfe99432db74237545a63057dc7a88dfe792cbcad0647f2af56cb81", size = 2480832, upload-time = "2026-10-11T18:31:54.06Z" },+ { url = "https://files.pythonhosted.org/packages/2a/02/4ac93a3d3f0ff412df1a36a9619743336fe6eec68c0df8a914163a3d22b4/pydantic_core-2.50.1-cp310-cp310-win32.whl", hash = "sha256:a4aaaa791bdae1c972a7e81765f4f3571c926b8e0b9b6e47346499fb80079665", size = 2123154, upload-time = "2026-10-11T18:31:55.396Z" },+ { url = "https://files.pythonhosted.org/packages/6d/ba/3a7af3dcd480c4739aa82cd9fedee79a5531a7c553346abcf095bd05f0de/pydantic_core-2.50.1-cp310-cp310-win_amd64.whl", hash = "sha256:2eedf82ee4753cdab8e50044c6bd569577eebc3859b11fecf4eb9223761ff966", size = 2179366, upload-time = "2026-10-11T18:31:56.697Z" },+ { url = "https://files.pythonhosted.org/packages/45/1b/ca81811da3d2aea724fb3c4ba6b83f50ab8f210576306ccd601973142d35/pydantic_core-2.50.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:c531166c42ea7bdfecc8c50049581f05dd1993b09cc7c52bb36a14e96deaec7d", size = 2152145, upload-time = "2026-10-11T18:31:58.046Z" },+ { url = "https://files.pythonhosted.org/packages/59/20/938ef7e0541af0a314e2f9d63848dbd1656ba2ebfe5ca0469f7ebee00d5e/pydantic_core-2.50.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b6d0c2183008c188e19f4906d426b293bdc4f67ab17df8e180fe16cda208fa71", size = 2045761, upload-time = "2026-10-11T18:31:59.35Z" },+ { url = "https://files.pythonhosted.org/packages/2f/4b/456497fe2affa18f49b226e89bde31e8a204751ee343dd9beaac5438123e/pydantic_core-2.50.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:94be440c03fede26969a5ce75468e0e6a9927a1b46d9b679ee8adc1b057b0350", size = 2049557, upload-time = "2026-10-11T18:32:01.121Z" },+ { url = "https://files.pythonhosted.org/packages/a5/9d/cd5dfe13928f55e236dff3a1bee06721d318ca6c955d9ca993b0a5d09f39/pydantic_core-2.50.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:36c426eac0af8d1529ff8467e612b933346caec1fdc0d774f78f67a1a11e16c1", size = 2188153, upload-time = "2026-10-11T18:32:02.442Z" },+ { url = "https://files.pythonhosted.org/packages/fb/8d/d0b25bc484f8d9136ea76ece69e0b2d24ab370cc2e7bbd1b79e61723b763/pydantic_core-2.50.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:028e2f212273d4a39b1ec1e0de8166b1165a65fc0f1111452a9d94fc7c625c63", size = 2388308, upload-time = "2026-10-11T18:32:03.767Z" },+ { url = "https://files.pythonhosted.org/packages/c5/64/6513cac7c9f78492abafa01d57a69de1d246bf3085fd7b0330bf14b025b3/pydantic_core-2.50.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e6f0cc1bb9900dc558960894adeb30b0c083366fc1d69b856209fb2ca5c36fe5", size = 2431187, upload-time = "2026-10-11T18:32:05.159Z" },+ { url = "https://files.pythonhosted.org/packages/ed/60/7f2ae89c37e69a3dc0da9ff57b0388c285542c688d05f36767770429de85/pydantic_core-2.50.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8812592c85d0edf423f10eadcef42716d71e8219085ad9e85b775057b7306133", size = 2157623, upload-time = "2026-10-11T18:32:06.616Z" },+ { url = "https://files.pythonhosted.org/packages/87/02/e3a71373b85a7973099b9a229a4302c7792262717e0b4997e41c01f7dd16/pydantic_core-2.50.1-cp311-cp311-manylinux_2_31_riscv64.whl", hash = "sha256:bbce99252ba3167b2b6277f1829d5bf4b43b754524bddf7f944707c3db7d2253", size = 2254539, upload-time = "2026-10-11T18:32:07.968Z" },+ { url = "https://files.pythonhosted.org/packages/3f/d5/5b620aaf40dc631d911565b64d49d3fa8422027c046a7a96dc4e4921ae98/pydantic_core-2.50.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:476f6ed8e43cd1e0b460920e23571700872b284e77331cb30c4faf459cf48a4b", size = 2267344, upload-time = "2026-10-11T18:32:09.399Z" },+ { url = "https://files.pythonhosted.org/packages/e0/48/f46baf4580d8a56ca4782aa65842e16d3cf39736b29fcce8e9c0521b3422/pydantic_core-2.50.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:2cbd1b75b09e976ed0d6b6ca297675632ca35df86130088457cdc60ef36970ae", size = 2300877, upload-time = "2026-10-11T18:32:10.903Z" },+ { url = "https://files.pythonhosted.org/packages/2b/9d/e7d28505e6092c1fe075838a4f793ccbe6dd676e44ab16175815ee06cfe0/pydantic_core-2.50.1-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:5958c72adb417c39b12ac87525ac60b0d73315fcdc59e21f44ee4a5e2512c9ef", size = 2464270, upload-time = "2026-10-11T18:32:12.329Z" },+ { url = "https://files.pythonhosted.org/packages/22/b1/3bf63b82efd93ebc9968f9c12fc46037a28bcb452c88e4688f33e5ff7dca/pydantic_core-2.50.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d8f9e8a6c4ab04b78d61f78627370d834eb004b2869dcb28cfffa647b4ea1980", size = 2478653, upload-time = "2026-10-11T18:32:13.735Z" },+ { url = "https://files.pythonhosted.org/packages/28/17/26d1e4b9c2ba6a92b7dc75bbcb99ef44456b7e3af1bced868403667ea7d3/pydantic_core-2.50.1-cp311-cp311-win32.whl", hash = "sha256:4be846f55c9477f5f3ddde8f2ce941137e16862a56d018ed885d422bb6ae02f2", size = 2120246, upload-time = "2026-10-11T18:32:15.591Z" },+ { url = "https://files.pythonhosted.org/packages/24/65/3e875e7991eaecd4d70686293ff0d8a99aa8f93dc295e6a21c3d702912fb/pydantic_core-2.50.1-cp311-cp311-win_amd64.whl", hash = "sha256:0048b6dddc8ef4b64fccaad878bd143b0c3882ea9936279dc11d613f6b7dd1bc", size = 2176332, upload-time = "2026-10-11T18:32:17.153Z" },+ { url = "https://files.pythonhosted.org/packages/ab/5c/58dbd17c61f209d91c70f549eb7a3bbec7023e89ea12dead091462d6d658/pydantic_core-2.50.1-cp311-cp311-win_arm64.whl", hash = "sha256:6a733778df2f7087ec1100ed0b41533e4f3001976e99570fa34f57c66e7f8e3e", size = 2182471, upload-time = "2026-10-11T18:32:18.49Z" },+ { url = "https://files.pythonhosted.org/packages/ee/94/101b49a6c63f99586755690696eae14532772587d9e39e93f7b8d28a49da/pydantic_core-2.50.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:704075d10b74f2f3c6e15407c696d88701df35fc8953f434a431add0d0074db0", size = 2222428, upload-time = "2026-10-11T18:32:20.228Z" },+ { url = "https://files.pythonhosted.org/packages/db/a3/f8b1b39349c33037c73d7a1b794c9c29d8f07d5bd2b74399c1375a529cc6/pydantic_core-2.50.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:e8e1d6ce820aa23317e8209a86bd65a540973c12dc7552b48a4f6c8e9926815e", size = 2025779, upload-time = "2026-10-11T18:32:21.723Z" },+ { url = "https://files.pythonhosted.org/packages/d2/2d/862a7d115305cc621358e51ba13f296e0ffdf4fbd984be9f63bc7862730b/pydantic_core-2.50.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c18db21573bd2c6489f9a544b7499f0df2853958c568e5e783536ee1f690af41", size = 2048429, upload-time = "2026-10-11T18:32:23.3Z" },+ { url = "https://files.pythonhosted.org/packages/c0/7d/fed95d18bf2b5abe2d5ab2bbec4184bfc22b6805994a33ccdae8edffd25a/pydantic_core-2.50.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:cb57f304525a5e3c13333b772bf9a473f36326e9c821b2e8e1b2fd36f80ae2c3", size = 2173274, upload-time = "2026-10-11T18:32:24.697Z" },+ { url = "https://files.pythonhosted.org/packages/93/1e/c6f22ceac65dc3d291ff79bea0eb74cbd1de8b128f01fee48af03bcea1e1/pydantic_core-2.50.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a27c09d86600f1bf2fe3f37e1ae697faf3143931c09322cd799da94deee923b5", size = 2360403, upload-time = "2026-10-11T18:32:26.281Z" },+ { url = "https://files.pythonhosted.org/packages/2c/97/190b5b6bfe4c72f265feb657913eb30749193927a5ad7b83cfa7866a25a2/pydantic_core-2.50.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:46b3301d3b5c886f77de7546e47274a5842c622ea2020b8c6524c6b66913b4a6", size = 2439799, upload-time = "2026-10-11T18:32:27.844Z" },+ { url = "https://files.pythonhosted.org/packages/90/24/48cd98388e4ac2c08d0800af36d15413db15e20387f1038123a2c86cb2f6/pydantic_core-2.50.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:93ba4e9d8210d941c200431a56b2c0400b131865947903937ed3ec5404307d2e", size = 2160157, upload-time = "2026-10-11T18:32:29.553Z" },+ { url = "https://files.pythonhosted.org/packages/00/86/d909133d0b9979ed14c20f110f21124a0e346caf071bd66ac5af3009062b/pydantic_core-2.50.1-cp312-cp312-manylinux_2_31_riscv64.whl", hash = "sha256:e5faeaee74a57d32b3ab3aebad2e348f06d3ba946fc5d28c1728455f00a3d13a", size = 2229523, upload-time = "2026-10-11T18:32:31.027Z" },+ { url = "https://files.pythonhosted.org/packages/90/31/4b43f08131b2098e73a852fd932063385f3103b33839fd9d1abdb89e673d/pydantic_core-2.50.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a3cda0e538208e5d722bbf3698b24f19c0a7d05bc8d5f8a7f9b121ea7fa243d9", size = 2242700, upload-time = "2026-10-11T18:32:32.622Z" },+ { url = "https://files.pythonhosted.org/packages/88/77/de39658569dc7a4c293d110a89629f61145e7538f00d1e4280c28debefd3/pydantic_core-2.50.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:57f51b31ff826e2859120cf4737c5a758a48d96f3e97da40ccee1796d58078ff", size = 2278452, upload-time = "2026-10-11T18:32:34.165Z" },+ { url = "https://files.pythonhosted.org/packages/46/bd/1eeb9e4e791e81210ef9096f58080b32ba15b5b13c108d50aaa3f8ce9f73/pydantic_core-2.50.1-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:8daa7ee75245d43ad7d747e5c9ecc1b1d06552f72b14887e9276f787d57375f4", size = 2450098, upload-time = "2026-10-11T18:32:35.547Z" },+ { url = "https://files.pythonhosted.org/packages/1c/e6/b2accfdff17e5a88d6358536702146de00f9339adaa4d5bbe1ee93cb4832/pydantic_core-2.50.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:acbf31f37c53a5ac0c34706c80b4f5107ba20b05fdd3816124bf236ef0c57dd2", size = 2476839, upload-time = "2026-10-11T18:32:37.119Z" },+ { url = "https://files.pythonhosted.org/packages/3b/7e/c8a83eb5d2cd42c2e13507150fb777b1edea5a018adc9cbf2858a1d08285/pydantic_core-2.50.1-cp312-cp312-win32.whl", hash = "sha256:45b11cac094aa25725581d9304eee93c9028516b9ea80dd9e175e13a5a2c840e", size = 2101425, upload-time = "2026-10-11T18:32:38.593Z" },+ { url = "https://files.pythonhosted.org/packages/c5/17/8bbd530b8659e9d963f5b16f6cb8e159f4cd174b4d6304e48969ab12dba8/pydantic_core-2.50.1-cp312-cp312-win_amd64.whl", hash = "sha256:132529c83901437ff642f585216831bf5fd7a91df66829907e155192ead62498", size = 2172522, upload-time = "2026-10-11T18:32:40.112Z" },+ { url = "https://files.pythonhosted.org/packages/af/9f/a79d690b127e4e3cff143d031538ab9aa715f6b2fbeecbd07cd6f2bf9fb7/pydantic_core-2.50.1-cp312-cp312-win_arm64.whl", hash = "sha256:4e834f6a8e4ff772dcc34f58ef5504147a3ea5b0f4eeb13b0f8eb2ca75ac57f1", size = 2161366, upload-time = "2026-10-11T18:32:41.606Z" },+ { url = "https://files.pythonhosted.org/packages/ae/57/0e237d7091d2cd44a35d243b7344227f90440166860469cd036afc23a04d/pydantic_core-2.50.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:d5e062c01286d861fd6a1c4ff6e063547b3e713067f2df033c0ff97ac2ca006b", size = 2222774, upload-time = "2026-10-11T18:32:43.103Z" },+ { url = "https://files.pythonhosted.org/packages/f7/b9/c720e56858d4e1539503297ed37063e0c08e0f3541c41b777f6a800f75fa/pydantic_core-2.50.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0c003c3b7f49debb893d2d85ae099ac5959c9839e2f330fadb1fcdf7a6594482", size = 2024738, upload-time = "2026-10-11T18:32:44.587Z" },+ { url = "https://files.pythonhosted.org/packages/4d/b8/fbfc25875219cc060e613170ff10e850c6d8924beb4910da57c2ee3ba1d2/pydantic_core-2.50.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:409e0ea40ec30d9158f33574fd758e689f6045a0f2596701828c27816ca9687d", size = 2047049, upload-time = "2026-10-11T18:32:46.164Z" },+ { url = "https://files.pythonhosted.org/packages/d7/43/34210124d504c553688f2f04b48500b131237528ac545b445e0d6d30e0d5/pydantic_core-2.50.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:131059670f1d2444269b8585cb888963994871932447c08b39ac6a51fcfef658", size = 2173415, upload-time = "2026-10-11T18:32:47.722Z" },+ { url = "https://files.pythonhosted.org/packages/65/cf/6e178e8fdc11da5965bef980983bf46326a42f436871dd51ba0a57f39df1/pydantic_core-2.50.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6dbcbee53bf17196a7f745aa9bf5a9603953a1e365b1f020be3207c676a3e7c4", size = 2361719, upload-time = "2026-10-11T18:32:49.217Z" },+ { url = "https://files.pythonhosted.org/packages/11/14/bd5169d356aa91bf777e28ba0b281c192d286d03c2812c9c9db023a2f00e/pydantic_core-2.50.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:325c23f3e35cfbf0fe3486fa5f7260d1e45885173002d30a28ca019994124255", size = 2439803, upload-time = "2026-10-11T18:32:51.025Z" },+ { url = "https://files.pythonhosted.org/packages/1c/bc/d79d000e5203ebef39af839f2ce77a777fcad6e08ad26af9a2fcd114ffc8/pydantic_core-2.50.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:17e722e156d0444ecaefbe640bdb60928752bf2013e2b7a11cdb099aaae19bec", size = 2158402, upload-time = "2026-10-11T18:32:52.714Z" },+ { url = "https://files.pythonhosted.org/packages/1b/a5/4902cb5fd599422c130bd3124ab31ee8b771199bd56662702eed07d3fec7/pydantic_core-2.50.1-cp313-cp313-manylinux_2_31_riscv64.whl", hash = "sha256:aa8224f10880d9bf1b5993988ba153d42a8b4f3f4f511f93b1f09c93ff613c72", size = 2229755, upload-time = "2026-10-11T18:32:54.126Z" },+ { url = "https://files.pythonhosted.org/packages/1a/f5/c1481f8669f6060d89110c9b1374173fc8767ca276b84f4870bd8acd5e3f/pydantic_core-2.50.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:41bc8237121bd8dc8d888dfd6279fc166ffc88c1f1bf3a8bf00869680533ca4c", size = 2242303, upload-time = "2026-10-11T18:32:55.641Z" },+ { url = "https://files.pythonhosted.org/packages/04/f9/77fc3c7653ba9b6e42049e17e96b25388187d4a7c274ab1cb07f58ac8419/pydantic_core-2.50.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:45c6266d071c241f2a168d45bf8c54344f0effce35e7e6b73afdec11f3687568", size = 2278345, upload-time = "2026-10-11T18:32:57.38Z" },+ { url = "https://files.pythonhosted.org/packages/95/9b/0579c5d12e7f2b16b27e6782427987341fcce07b0725e02ddb0b74add0c4/pydantic_core-2.50.1-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:1deeacb112d14d3f4fcb16b165f7dbaf76c70ba6e82f37ba042bdab51970a0b8", size = 2449947, upload-time = "2026-10-11T18:32:58.896Z" },+ { url = "https://files.pythonhosted.org/packages/a8/ac/1b677db91eba54cc5922f4de6edc46ba45c2bd712dfdc0130382d158e214/pydantic_core-2.50.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:1c96fd793b73d1b92e65570132505498fe7b21eaef73cdf74e67e5dfba7ac9e4", size = 2476889, upload-time = "2026-10-11T18:33:00.665Z" },+ { url = "https://files.pythonhosted.org/packages/4d/2a/3a9f6624ee3ea9ccba5249dde11418bb4c35780a7a92608f8768bd3fea39/pydantic_core-2.50.1-cp313-cp313-win32.whl", hash = "sha256:06ead20d39ffd6f2f6f2a8f8a6de67ff8bb1b4f14a8a30e058502514ee2ac685", size = 2101118, upload-time = "2026-10-11T18:33:02.329Z" },+ { url = "https://files.pythonhosted.org/packages/2d/1f/323f78ddd9d9938aac420c1abb4e8ba799fc8bdab0acc67c0593b837c979/pydantic_core-2.50.1-cp313-cp313-win_amd64.whl", hash = "sha256:7816e98acc08119dc0f340ab167048ecc54126316330c1f0caf7c6756c88e28f", size = 2170840, upload-time = "2026-10-11T18:33:03.919Z" },+ { url = "https://files.pythonhosted.org/packages/cb/09/8497c52a739ae425c3ac2f7f56414cbc711c67d374346174f40fe2062644/pydantic_core-2.50.1-cp313-cp313-win_arm64.whl", hash = "sha256:c17799a62c142d61b8a3c51752a7cbc87fe2ad4ccfab10e628a77b405075c662", size = 2161633, upload-time = "2026-10-11T18:33:05.518Z" },+ { url = "https://files.pythonhosted.org/packages/49/33/28b96e81677153715e3eafb9f26663a80841e859fde282a380359b0d3fa1/pydantic_core-2.50.1-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:1cf41f1ae3fa155cf167a72689ad044bcc1e3c97e064123677149bdfb5dafc4a", size = 2224428, upload-time = "2026-10-11T18:33:07.153Z" },+ { url = "https://files.pythonhosted.org/packages/94/40/15c06410c9b7b8da5805d27b64e09bd3f900e986728106db2689dbc51513/pydantic_core-2.50.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4df197990c15b5a37c5a277d131d9f2c67de6133f2e5dafd80d9bba4b99f46f9", size = 2023740, upload-time = "2026-10-11T18:33:08.763Z" },+ { url = "https://files.pythonhosted.org/packages/a1/4e/5eb629f6efc2a27e421d789dd4bfacbb5f6d09c80c28b13d1e87d73163d5/pydantic_core-2.50.1-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0036473f5583e6a60e50b8b21651511564277a3f05cc5dab8cf579f552cd5f6c", size = 2049435, upload-time = "2026-10-11T18:33:10.366Z" },+ { url = "https://files.pythonhosted.org/packages/ba/8e/f195aebec49ad12318876ac2368c197a7939f5d52f8e156d2238ef8a4588/pydantic_core-2.50.1-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:992c3514ec891fa7858099183e4d64e6bd5a5d4ff452fae29df22faa77a006bb", size = 2172975, upload-time = "2026-10-11T18:33:12.368Z" },+ { url = "https://files.pythonhosted.org/packages/e0/f5/7ad9fb83010cd5ea0948409db105676ed779c4e709e2d3d89b9fe2558794/pydantic_core-2.50.1-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:739dc730e6be3bd5ec2f4ab5cfc7eb047cc45fc1497b3bafec74ff2ed07df597", size = 2364197, upload-time = "2026-10-11T18:33:14.244Z" },+ { url = "https://files.pythonhosted.org/packages/ca/fb/bf0aab3e78301d202b82a0322ec968cd703b11fc0623fde9a28708936f62/pydantic_core-2.50.1-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:32fad3a91e51b6d2039c572db04a5a873260b399f6bd62c3552671fa7a4a2899", size = 2444259, upload-time = "2026-10-11T18:33:15.79Z" },+ { url = "https://files.pythonhosted.org/packages/45/35/38f6d6564fae57d9b12e5676dfa947e0e7d5c46dbeaa7eb3352261d6d299/pydantic_core-2.50.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42b54c2c90ad348b5e3a85e03e715d572c1fde357ef104cdfe3b03b697a404ea", size = 2159857, upload-time = "2026-10-11T18:33:17.51Z" },+ { url = "https://files.pythonhosted.org/packages/65/a0/fb0a3ca10f139dcf765b2d312d10cf0f65c57c59993229d00ad12b14ceff/pydantic_core-2.50.1-cp314-cp314-manylinux_2_31_riscv64.whl", hash = "sha256:2df1ff41884de2bc4b307bafd7c40a691094fad2ff8e767e5b45a319257bcf4e", size = 2233954, upload-time = "2026-10-11T18:33:19.591Z" },+ { url = "https://files.pythonhosted.org/packages/8c/6a/e63842252702aa4ec6e6b7178ca85e541a77459076592c23ebe2d9840b33/pydantic_core-2.50.1-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:fe90228920fd8ff2be62622b6bb8a2b11acd65046d50c6b130614b5879605a20", size = 2243876, upload-time = "2026-10-11T18:33:21.393Z" },+ { url = "https://files.pythonhosted.org/packages/39/25/5991cf8318b37e0dfab47b87541619a1df8501a793cba0d978846cba37a7/pydantic_core-2.50.1-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:844b869f118e22a41a091bdcedda8a71bc1b0f62c38d1a0c3211cece47e1d8fc", size = 2277908, upload-time = "2026-10-11T18:33:23.324Z" },+ { url = "https://files.pythonhosted.org/packages/a7/3e/3ee8baaa6cc25a6961c69168cf9ff0f002d56f4e0d541ad6724c18fb61f3/pydantic_core-2.50.1-cp314-cp314-musllinux_1_1_armv7l.whl", hash = "sha256:2eb75304506894a281d346220a4f7481a1b8729577c5ed2a05395991966a8396", size = 2449285, upload-time = "2026-10-11T18:33:24.942Z" },+ { url = "https://files.pythonhosted.org/packages/c0/c7/acbec6deac13fe697a80c275a9b6661db62c4d323bac8a47347b1f39c7cd/pydantic_core-2.50.1-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:6b20a4bffabdad0db2927ac034ae3b8a681b1f7a0182f3e60b479ad2fde21ebb", size = 2479013, upload-time = "2026-10-11T18:33:26.925Z" },+ { url = "https://files.pythonhosted.org/packages/10/08/21a3f237b264389f6219d053ee78fc1b5c2fd402c1b1cb2b6cb8b85f9834/pydantic_core-2.50.1-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:99ba9bc2b8062ea0c326a990f7f00e6530c23579de66dd246e72c4cafef950a5", size = 1484400, upload-time = "2026-10-11T18:33:28.693Z" },+ { url = "https://files.pythonhosted.org/packages/09/ce/077a6d262d12ef09108377ac0717f029f420d773ace63cafd6143af75568/pydantic_core-2.50.1-cp314-cp314-win32.whl", hash = "sha256:cf356f70551d40374eaffb1aa63f1eb6d2006681cbd7a9faea173ce0f4dd7cd2", size = 2103222, upload-time = "2026-10-11T18:33:30.326Z" },+ { url = "https://files.pythonhosted.org/packages/14/4c/350a2415209c43d670eb71d3c040f332c04a30583d39e311b05c7ac15762/pydantic_core-2.50.1-cp314-cp314-win_amd64.whl", hash = "sha256:d32f3acc081cc3923386d88f422cde8892335e95f034e0104bb4cf9310d9915f", size = 2171586, upload-time = "2026-10-11T18:33:32.139Z" },+ { url = "https://files.pythonhosted.org/packages/bf/92/9bea6ca96580a0902fed366f064f0829e404f41889b34543279a1162b888/pydantic_core-2.50.1-cp314-cp314-win_arm64.whl", hash = "sha256:bed5163e03b98bc1fa2eb05d74c63d9c5c95d8ed6254985481640fbf5e237dea", size = 2155773, upload-time = "2026-10-11T18:33:33.896Z" },+ { url = "https://files.pythonhosted.org/packages/86/8c/f121f073cf32bdd5cba7e6230b1ce0ac845b0cf43e44dd597d95af272db2/pydantic_core-2.50.1-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:9572c1369e9c9da2d64a7b7992c786d90ff295abc93964cfe3125e4290768070", size = 2234017, upload-time = "2026-10-11T18:33:35.588Z" },+ { url = "https://files.pythonhosted.org/packages/a4/69/2bb2bcd6146cffe98d760a46c42ae71efd5151d9b2f9c9bf6619a3b32083/pydantic_core-2.50.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:2005207aafe1231315718bf6ed5d064a7300fb4772754af35ee72fc68159492e", size = 2001016, upload-time = "2026-10-11T18:33:37.57Z" },+ { url = "https://files.pythonhosted.org/packages/20/b3/fbf854c7d07ec114260c26e9e2071a4381740f9ae09641dbfcbdf2a18c45/pydantic_core-2.50.1-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:64f6047f62a6c5ae08d0a6afb035667aa2d97c3d20d69762e034c5ea144d92a5", size = 2023015, upload-time = "2026-10-11T18:33:39.433Z" },+ { url = "https://files.pythonhosted.org/packages/65/20/6de55b2f92cdb614b745c6e9ced639fc4fd7e1e77604825a88bdece6fcbd/pydantic_core-2.50.1-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:1ef800dd7d85bcdadf4c3076e4c94e43939493558a3b69a1ea830c706d4617bb", size = 2192543, upload-time = "2026-10-11T18:33:41.381Z" },+ { url = "https://files.pythonhosted.org/packages/0c/d9/19e91c94bd5c405945ce2f15526808aea37e162c253160de8ed7bf70b406/pydantic_core-2.50.1-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b0135bcdcaa0f23573f286e4cb5e0fd2962700964ed13df085b85f2b97aeab9e", size = 2388704, upload-time = "2026-10-11T18:33:43.167Z" },+ { url = "https://files.pythonhosted.org/packages/b6/bc/2e24c8415eae1a25ee5a5484946a917123bad2e9d01689a759236928175a/pydantic_core-2.50.1-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0b3a6f334c6a2345ca15318ff894502a90012536404b37c844a976c76c846e0b", size = 2464118, upload-time = "2026-10-11T18:33:44.856Z" },+ { url = "https://files.pythonhosted.org/packages/bd/1f/945b8053cb061c64e102bcaf7bfb9ed740c0bd4349f9bb978a7d4ddff4ab/pydantic_core-2.50.1-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:06e01fbbfdb9be777b316a71b6c49efaf4a08b615d0a98d678cda3023f79d019", size = 2150142, upload-time = "2026-10-11T18:33:46.661Z" },+ { url = "https://files.pythonhosted.org/packages/2b/78/96a3e50bf0d64aaae781107eb9335b7529d05a85793ed6e7241c4cd1d931/pydantic_core-2.50.1-cp314-cp314t-manylinux_2_31_riscv64.whl", hash = "sha256:a29a061fec0b4e2d714f277e70a3a18125ecff803f2fea6eade2f2e53711d112", size = 2245577, upload-time = "2026-10-11T18:33:48.574Z" },+ { url = "https://files.pythonhosted.org/packages/7a/5d/a6038a0322232758a6ebfa709f4ca14a60bf5b93940cd0b345056a557da4/pydantic_core-2.50.1-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f5187624823423e1d1b82b1072ac41dc837389e18d3d0572cc19bbee46cd550a", size = 2263728, upload-time = "2026-10-11T18:33:50.527Z" },+ { url = "https://files.pythonhosted.org/packages/0d/4b/76ded3333a457a9344c4f2d63f2d82d0101654b05178fa4ddfe7d3627674/pydantic_core-2.50.1-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:3e46a9eb0a0901dd6275e6b06ac3a464885ef350ec4121fe486869de8053e4bb", size = 2293630, upload-time = "2026-10-11T18:33:52.362Z" },+ { url = "https://files.pythonhosted.org/packages/a9/00/9eca378335c9c1b72bc779bf6e4c2a82ce784f14ec48a0e87102c9870e05/pydantic_core-2.50.1-cp314-cp314t-musllinux_1_1_armv7l.whl", hash = "sha256:756d669f04e62ec4148ecfe22be6a4484d9b1181a6ef32e205ebfd200540858b", size = 2468048, upload-time = "2026-10-11T18:33:54.118Z" },+ { url = "https://files.pythonhosted.org/packages/35/ca/e3832e9cf93651251de43c8c5c029ed680a3c1a0a1b17ee26c81bed08cbd/pydantic_core-2.50.1-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:c516cc5367ca3448995d42cb994bf3f4c9002d2a7c22eac9622551269ad1b807", size = 2512159, upload-time = "2026-10-11T18:33:55.99Z" },+ { url = "https://files.pythonhosted.org/packages/4b/f2/773469b5a10a39116a2cb17edaf6d722f017dd8da07161b371465311c542/pydantic_core-2.50.1-cp314-cp314t-win32.whl", hash = "sha256:9d1bed94af6a63835461f3cf7502058eb166c58c4778e11d0f433cfb1bd69e19", size = 2098406, upload-time = "2026-10-11T18:33:58.043Z" },+ { url = "https://files.pythonhosted.org/packages/ee/42/0bb74f8f25204b259b11ab7c12dc7f180893b6bd706118b385147fb6efd5/pydantic_core-2.50.1-cp314-cp314t-win_amd64.whl", hash = "sha256:c8dce1f1e0e5358b682a6ad3fa5e31b31d4560997b8e61417e9217c8d60f8a0c", size = 2148481, upload-time = "2026-10-11T18:33:59.913Z" },+ { url = "https://files.pythonhosted.org/packages/47/0d/d801646c9679a4e630e15cf521d4108b93854b42a6e6e02391bd4c6b1095/pydantic_core-2.50.1-cp314-cp314t-win_arm64.whl", hash = "sha256:ceff0acc940be2715bd6ad17b24c0e5304abf44f6efd0f81ee8499e640f9dc86", size = 2174972, upload-time = "2026-10-11T18:34:01.875Z" },+ { url = "https://files.pythonhosted.org/packages/b2/84/23984b763d8862a02a13d27a44b6e8169428fd85ecfed88f54c29108604d/pydantic_core-2.50.1-cp315-cp315-macosx_10_12_x86_64.whl", hash = "sha256:8a6791afa2245e6c6b180122d105941644f5bd410bb18623b408808cc41a3102", size = 2224599, upload-time = "2026-10-11T18:34:04.016Z" },+ { url = "https://files.pythonhosted.org/packages/4d/90/a63cf8586abc1d1a3f6d9b18f0224789ebf003851f092ebda3c7c863fd32/pydantic_core-2.50.1-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:84f34323a61a365b4e9295de6028474754829aaddd59c7bf1a040e7487ef8f3c", size = 2024191, upload-time = "2026-10-11T18:34:05.901Z" },+ { url = "https://files.pythonhosted.org/packages/a6/6a/f34bff9808ffb4907fbf5f5040457d253cacf2da7fce9efbc99ca1b1a44d/pydantic_core-2.50.1-cp315-cp315-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:23edad659e8dbd8ca7e4e877fe6c81573abbdf215bd25a68b53e1272f58b80c7", size = 2048252, upload-time = "2026-10-11T18:34:07.757Z" },+ { url = "https://files.pythonhosted.org/packages/b2/54/13f419bf1eb59852003818e25935aaf175687d978f4c4bca70e08fe40a3b/pydantic_core-2.50.1-cp315-cp315-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3a5fce22f1e87d181e924e12da7d81cfe031fb3881a5ddf26ad28f141756ca43", size = 2173376, upload-time = "2026-10-11T18:34:09.592Z" },+ { url = "https://files.pythonhosted.org/packages/6d/6c/b5a34d24cd0c81669d8f8339d74e6815abcf2f8fb48ab4b49b84c09be1d5/pydantic_core-2.50.1-cp315-cp315-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c73622ef819328873b53109ee4f77ceb598bffedd02daf916102be3228866b78", size = 2364559, upload-time = "2026-10-11T18:34:11.534Z" },+ { url = "https://files.pythonhosted.org/packages/eb/8d/d64d6216a8df365082665927ff923f183056f9049fee08e9777c9ac05296/pydantic_core-2.50.1-cp315-cp315-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ce8c25ca38cc0e3d7753ba180808de2c0c8cb24eae0df64491e40921454e9831", size = 2444697, upload-time = "2026-10-11T18:34:13.535Z" },+ { url = "https://files.pythonhosted.org/packages/b8/0d/1b1149f60a00ea21ba5f70e28acbd40feb4598af414f80f53c921fac07c9/pydantic_core-2.50.1-cp315-cp315-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7689580e72a642ab5ec64d5f55b2e33636fa43b4ebe63c0c2c965ef307c7d1aa", size = 2159961, upload-time = "2026-10-11T18:34:15.56Z" },+ { url = "https://files.pythonhosted.org/packages/1e/35/f236549299dcc78e71e945495d7ec67e78d20844d0999c60601685003031/pydantic_core-2.50.1-cp315-cp315-manylinux_2_31_riscv64.whl", hash = "sha256:d5c0e32fdbce7f1e8ef4d11f655694bf5f4175c757a9f1dc2be09b8864e5bcf5", size = 2234581, upload-time = "2026-10-11T18:34:17.502Z" },+ { url = "https://files.pythonhosted.org/packages/6a/85/26901a490522b7f75ef9bb9a7afb73e5bb550f0e1cb5b99a0069183e2eb9/pydantic_core-2.50.1-cp315-cp315-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:40f523349960fa30f3ea51404308ff50f9997a90df639590f47a057c1f32b415", size = 2244090, upload-time = "2026-10-11T18:34:19.402Z" },+ { url = "https://files.pythonhosted.org/packages/ca/2c/481bcfc70ceeb77a778ca6e5b705fe592cb64735c108157f81b7dd9c280e/pydantic_core-2.50.1-cp315-cp315-musllinux_1_1_aarch64.whl", hash = "sha256:d4193206b6587047437f6f11d7e776df23e1c1e23af2a54d9347275614791e10", size = 2277948, upload-time = "2026-10-11T18:34:21.317Z" },+ { url = "https://files.pythonhosted.org/packages/24/eb/f1e09333faa7ba447cde967310f758430cc7c5e987bdab5228816c70030d/pydantic_core-2.50.1-cp315-cp315-musllinux_1_1_armv7l.whl", hash = "sha256:84bc765b282a9d5b7fe0348b8648904f25a6a04b2139da52b1dd30c8ac3a2c8f", size = 2449688, upload-time = "2026-10-11T18:34:23.321Z" },+ { url = "https://files.pythonhosted.org/packages/d1/b3/036bde636db8f76d92996e81aefc75678ab5cec4a07eea1ad0c72a893fc3/pydantic_core-2.50.1-cp315-cp315-musllinux_1_1_x86_64.whl", hash = "sha256:ed1e728b39a383c81035b2459cfcb35d99dfb01f7d6ebe3a913bc1cc5b81e459", size = 2479286, upload-time = "2026-10-11T18:34:25.214Z" },+ { url = "https://files.pythonhosted.org/packages/d0/a3/07f018294ee18d144afeb6df1a47d9e92960f014be45c5ed13519fa5af95/pydantic_core-2.50.1-cp315-cp315-win32.whl", hash = "sha256:bc94f474417604bd383d2cd445d071b07dd55fedceed3ce33407bf1fcc107290", size = 2103683, upload-time = "2026-10-11T18:34:27.42Z" },+ { url = "https://files.pythonhosted.org/packages/5f/98/f9bd7e1f9b6709f155acb9ef826d9c3884fe925f811fd8e55b9b52280bad/pydantic_core-2.50.1-cp315-cp315-win_amd64.whl", hash = "sha256:983a662de2571cb2502fc8ff47b6770b03d025d2eb314c92f77b3f07c74720ed", size = 2171681, upload-time = "2026-10-11T18:34:29.508Z" },+ { url = "https://files.pythonhosted.org/packages/10/87/4bb3e1e7f385c076ab5af4d6dd0571b22042cd8207eb810d5b9fef15ae31/pydantic_core-2.50.1-cp315-cp315-win_arm64.whl", hash = "sha256:94845ff54dc5193f228cab81b2662a04bfbb892e95bdc15edf7399000ce57d54", size = 2156251, upload-time = "2026-10-11T18:34:31.455Z" },+ { url = "https://files.pythonhosted.org/packages/47/47/83643225b08f2aef6c8cc4bbe6e3f79c5e139c4364a6e450d0f399d87774/pydantic_core-2.50.1-cp315-cp315t-macosx_10_12_x86_64.whl", hash = "sha256:4a53d13cdfbedbfa87f08b83c1a0a5efcc767d785a4b41934fa9cb672670493a", size = 2234363, upload-time = "2026-10-11T18:34:33.65Z" },+ { url = "https://files.pythonhosted.org/packages/5e/66/127ca649ba2f2462039dc1e694c6c01e00a3689f023a617364d3507e6d97/pydantic_core-2.50.1-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:efbecf43d321f7b9281441f1f213f7c21c66988b0e06c2730ba13ed47a46bb08", size = 2000972, upload-time = "2026-10-11T18:34:36.037Z" },+ { url = "https://files.pythonhosted.org/packages/5e/4f/e421e0a5d653b1203b090b2e48745976988d7338a647940704b5b9c2b399/pydantic_core-2.50.1-cp315-cp315t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bc1f08f68dac9f9e83845a8039880aba2ab553eb9b2259c3243a313182c253fe", size = 2022925, upload-time = "2026-10-11T18:34:37.972Z" },+ { url = "https://files.pythonhosted.org/packages/d5/4e/ea5568e2491e1a71100f15ae8c2d01ef52db42a184a2d4e716bc79e5eb8f/pydantic_core-2.50.1-cp315-cp315t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5dfe41f232befddb9c4377f6cfc702b51595e2d78ed082672adf8758d2c4619f", size = 2192867, upload-time = "2026-10-11T18:34:39.921Z" },+ { url = "https://files.pythonhosted.org/packages/ae/5e/3b8c3a35acbe219909ada5defad5d7d9fed845fb2b37bd5ec518f453c119/pydantic_core-2.50.1-cp315-cp315t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:adc06d218a1cadfd2ec4628424d7d79ce4eba69c2965e7e7b55106f0da5208c8", size = 2388687, upload-time = "2026-10-11T18:34:42.184Z" },+ { url = "https://files.pythonhosted.org/packages/b6/aa/7889b4e515f91a2e8c0ae6b5081fec0feb30c4398d1434e14793c60f173a/pydantic_core-2.50.1-cp315-cp315t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2cf91809d0721ab81592ba67bea7694821679c10b1a2e3c3460082b286c1918a", size = 2464415, upload-time = "2026-10-11T18:34:44.384Z" },+ { url = "https://files.pythonhosted.org/packages/08/78/93449e628eb8a6fdcce3eff9043081179d1bc7ce6f1bff32dc5006f41e00/pydantic_core-2.50.1-cp315-cp315t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:23923ab9292c40da026330b1ecf4dc2618c8e86e0422e5d1fbf50d94d64ca4f8", size = 2150823, upload-time = "2026-10-11T18:34:46.392Z" },+ { url = "https://files.pythonhosted.org/packages/f4/f1/72c5bc129fceb0d00f05dc1e67f518c1728de1928c55f81fc13d7690de39/pydantic_core-2.50.1-cp315-cp315t-manylinux_2_31_riscv64.whl", hash = "sha256:f3377c8c2b3ce898423c5e5dd94c7982e30aa7717a7e6ab2470b9de364963709", size = 2245806, upload-time = "2026-10-11T18:34:48.805Z" },+ { url = "https://files.pythonhosted.org/packages/28/2a/922a0e78f3aa6ab837b59f88190233fb8dad546c17995fde9bb3ed3b9b49/pydantic_core-2.50.1-cp315-cp315t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:455a773617b5913bf5c20d0692e5787b119e52c4d40ea644ca31f5758fd31be2", size = 2264160, upload-time = "2026-10-11T18:34:50.876Z" },+ { url = "https://files.pythonhosted.org/packages/52/a8/0f1449e3e1b20941c9372faa18e7b6a092e30cdfa841902473f7989532ac/pydantic_core-2.50.1-cp315-cp315t-musllinux_1_1_aarch64.whl", hash = "sha256:1a9006395dece0e32e704c315eff8a00bede494f6108546cfc5539c89fef4f9a", size = 2294031, upload-time = "2026-10-11T18:34:52.876Z" },+ { url = "https://files.pythonhosted.org/packages/d1/d0/1031f492857de70355fb16524bbb03efce5fd34c93ed4a1ec60be07e0d4b/pydantic_core-2.50.1-cp315-cp315t-musllinux_1_1_armv7l.whl", hash = "sha256:d2d82aa62521c55ddfb000ae70f88cdd8de974078f6024e821dfe5addd0c818f", size = 2468423, upload-time = "2026-10-11T18:34:54.995Z" },+ { url = "https://files.pythonhosted.org/packages/46/52/269ffffa645b8e47906395a39cf9db1151ae9fa4bcd7f47b960bc31baf37/pydantic_core-2.50.1-cp315-cp315t-musllinux_1_1_x86_64.whl", hash = "sha256:009634b83993777ddcd69cad0ffcace43dabde692109528e35f0fde91e386a8b", size = 2512598, upload-time = "2026-10-11T18:34:57.149Z" },+ { url = "https://files.pythonhosted.org/packages/31/5c/e47e28281f20326ff6f3c31d626f0a83e615d2d94ba41bb0ad6ec237184a/pydantic_core-2.50.1-cp315-cp315t-win32.whl", hash = "sha256:3fde4fdc6487a58d944ca87cf5adc95d5f266e872c19599f5f4c0a8a1b1f9f9f", size = 2098535, upload-time = "2026-10-11T18:34:59.313Z" },+ { url = "https://files.pythonhosted.org/packages/03/ad/759e181e69c1b472c60b2049e5f61d5da1deefdd5ce1df4bb2ebcf771f25/pydantic_core-2.50.1-cp315-cp315t-win_amd64.whl", hash = "sha256:1c8632d4ac04e6f91128fca584b3a8a507d81604c24eeaaad00d4be42765c32b", size = 2148645, upload-time = "2026-10-11T18:35:01.571Z" },+ { url = "https://files.pythonhosted.org/packages/6d/56/8a702c27e5be9f47e5f19d8669227424290e4c024e7c370279cbaf244b4e/pydantic_core-2.50.1-cp315-cp315t-win_arm64.whl", hash = "sha256:c3ede305158e75510be50869b319550ab072008c13d64d4ab1e094fb286b6f44", size = 2175297, upload-time = "2026-10-11T18:35:04.079Z" },+ { url = "https://files.pythonhosted.org/packages/e7/73/a23a327237d9bb985298ce47702e196f995ce850224c12c70886bd66bb5c/pydantic_core-2.50.1-graalpy311-graalpy242_311_native-macosx_10_12_x86_64.whl", hash = "sha256:062e891facce5ca296a1c37098e5e466780457f86413894b399f0cf22934f769", size = 2162560, upload-time = "2026-10-11T18:35:06.274Z" },+ { url = "https://files.pythonhosted.org/packages/df/b2/33b37b5e82408f402a5e82649a43e7c95cd5dab7beaeef2c35cedbfd18f2/pydantic_core-2.50.1-graalpy311-graalpy242_311_native-macosx_11_0_arm64.whl", hash = "sha256:49c2cbb2397fe4d0987e84606e691af6cb87bc0ee1bd3e7b737f7e10b4c142f9", size = 2075250, upload-time = "2026-10-11T18:35:08.455Z" },+ { url = "https://files.pythonhosted.org/packages/04/62/c7d5b9249466ccab90f3ce4790c2399dbfb8172ae9e74a7753dd295fe65a/pydantic_core-2.50.1-graalpy311-graalpy242_311_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9e4472072de0137ee0d8e72d6620e85939c271d2f90f6bbb4b15c24638b79f92", size = 2107891, upload-time = "2026-10-11T18:35:10.918Z" },+ { url = "https://files.pythonhosted.org/packages/d4/7e/28d29bc1657195933147f772dee0558d9e0f045bbc11db7f992f40c37bb5/pydantic_core-2.50.1-graalpy311-graalpy242_311_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6ed4f3cef55164b026fefb41341b7754cc6b624c75dfe7142d2ecceb5ad21c87", size = 2268026, upload-time = "2026-10-11T18:35:13.336Z" },+ { url = "https://files.pythonhosted.org/packages/a5/09/1bcf160f3cd6333e2a76982fae5963e5032de0bcaaba38464223dc266bfe/pydantic_core-2.50.1-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:76e2e83fa6ec8cdc972d438dafc2522b3a47bee4ec0ae668b29cfb1977ab5242", size = 2217070, upload-time = "2026-10-11T18:35:15.688Z" },+ { url = "https://files.pythonhosted.org/packages/3d/81/f02de95eec7794dfc7a5bc69a834f0e834b31b3009014ce6de903855f775/pydantic_core-2.50.1-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:a51eee75939cf811ac09b278745a6cee7dc873ccfbc8b9af3cc88fe4b7ce25b5", size = 2039027, upload-time = "2026-10-11T18:35:18.07Z" },+ { url = "https://files.pythonhosted.org/packages/4d/16/227746ed3771d9bf2304568b55134849ece34e13b38b1d76de763015c77f/pydantic_core-2.50.1-graalpy312-graalpy250_312_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ae28183297fb0d2b8dc46a1f01d51f5e45825fc5afe76a835a6cb7fb34821295", size = 2109009, upload-time = "2026-10-11T18:35:20.218Z" },+ { url = "https://files.pythonhosted.org/packages/e5/b9/7664d1592a0e5a74903f357cd5b28ceb7336f3473256c5a4e8c8432f1881/pydantic_core-2.50.1-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:88e492e8b9d0312e7dc13667c30222abf284dc3b79b5302b3607b41a5784ce61", size = 2269883, upload-time = "2026-10-11T18:35:22.48Z" },+ { url = "https://files.pythonhosted.org/packages/bd/35/002a378302ff91d2a7f149bc8d22363faf581ba40ac39d0123444315a32d/pydantic_core-2.50.1-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:7456d699b13954e9c0164dcb267250a10ae0dfb03e6e26d6796ab0d46e189c84", size = 2154076, upload-time = "2026-10-11T18:35:24.743Z" },+ { url = "https://files.pythonhosted.org/packages/4b/5c/7a034330082c00f3c9795052bd9b161aaaf6e1951e897ac00a094823ef7e/pydantic_core-2.50.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:b0d955195bbbe489ad343fcc956eacea9357b79cb22192c66cacdefcbc14b32f", size = 2085850, upload-time = "2026-10-11T18:35:27.009Z" },+ { url = "https://files.pythonhosted.org/packages/57/fa/d5b44a7d3d4eceed6ef8713a0003af56fefde6ec75915513bcdd5d730cd9/pydantic_core-2.50.1-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2c634642694e6a0dad2ab1d375589fa671fd442edd5caf7d9737b8f6ca22906", size = 2259754, upload-time = "2026-10-11T18:35:29.763Z" },+ { url = "https://files.pythonhosted.org/packages/b6/88/e01dd37301710bd8b3b2daf34ec9e2a6e83a333130831c0d468b0292a48c/pydantic_core-2.50.1-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ee6db2fbed51a7991302e8fac498cd67e336246026d0dfa84cf5166ce1412760", size = 2268712, upload-time = "2026-10-11T18:35:32.654Z" },+ { url = "https://files.pythonhosted.org/packages/3e/43/5bb80d4a4d2b2d84612a30205662cc521a20d209c94abc079ea48b4e0df2/pydantic_core-2.50.1-pp311-pypy311_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:79490e33c4c0fcb933bbbcfc3a62184d8803b99f535863dfbb925e1bcb6945ad", size = 2305049, upload-time = "2026-10-11T18:35:35.392Z" },+ { url = "https://files.pythonhosted.org/packages/e8/7b/e3ef76b269cfe4a5bd3bdcf5d7124cf05e5a8909d443b91639307116bdae/pydantic_core-2.50.1-pp311-pypy311_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:48569b0ade9edfbe065cad1d700175546592aebbb42f02adcebcc26e75b896fe", size = 2466001, upload-time = "2026-10-11T18:35:37.791Z" },+ { url = "https://files.pythonhosted.org/packages/8f/7a/ea0947aadc1d9f72d4be00d2e19939611ec17363bcb5e6eb9ec7d8221c34/pydantic_core-2.50.1-pp311-pypy311_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:5f3cae32fc46121f787cb2486de9cf95a8bf72aec5cc78f64c606fa1735a6ef5", size = 2481777, upload-time = "2026-10-11T18:35:40.287Z" },+ { url = "https://files.pythonhosted.org/packages/24/f3/d15bc0b1fb0c4f1e07b3326ffb7489f7ae70da2b56a0884d22641b0eb47c/pydantic_core-2.50.1-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:7f476456ac2bb0d937f75191494a09c83a30765fea4f70f3b404942fe25f6cdf", size = 2336787, upload-time = "2026-10-11T18:35:42.558Z" },+]++[[package]]+name = "pymupdf"+version = "1.28.2"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/a3/fb/b6761fa2d5266f2cdb24c3b91f4023070ab7848381417678e7a289a1d52a/pymupdf-1.28.2.tar.gz", hash = "sha256:5e0be7908a715aa20333caddd73f1d6f01e4cd0c26e869fa2dd0b7f344da2249", size = 87903557, upload-time = "2026-08-06T21:43:23.321Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/b4/51/550c9a75c4ff3245cb4ecb7bb95cbe2ab7374230b8e2b7a1f7259444150b/pymupdf-1.28.2-cp310-abi3-macosx_10_15_x86_64.whl", hash = "sha256:5fc315b425ff1f7afdd1ea2f348205cb19b806767daae7ce4d64115799c2bae1", size = 24645079, upload-time = "2026-08-06T21:37:25.001Z" },+ { url = "https://files.pythonhosted.org/packages/fa/01/3591f781b417b382a8487a2356e927acfe858b1043bab0ec47f6805bb109/pymupdf-1.28.2-cp310-abi3-macosx_11_0_arm64.whl", hash = "sha256:7113846b35dbf0a033f088e4f4fb543dabeb4b0b12c112966a1ca1ee2d5eacae", size = 23875605, upload-time = "2026-08-06T21:37:40.369Z" },+ { url = "https://files.pythonhosted.org/packages/d2/86/4a68f080b71b46802178346af46486e1697508e760855ff5f3b218a6dff7/pymupdf-1.28.2-cp310-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:3050a233dde1211efe89ada74e2add6238436434159f46097a1423aad2842545", size = 25095554, upload-time = "2026-08-06T21:37:58.485Z" },+ { url = "https://files.pythonhosted.org/packages/c7/06/dace3e27af26690cb20bead80dbac42941b0841eb689b8aabbd67dde16f0/pymupdf-1.28.2-cp310-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:397d6715c1f0df7548a92d0afd8ce370fc48fa47aeefac16be2bc04a16a8227f", size = 25762500, upload-time = "2026-08-06T21:38:17.438Z" },+ { url = "https://files.pythonhosted.org/packages/e5/61/4146dfa1d8172a1ce8d59f0eed94896ddefb8deb2274534d0522fbb8abf5/pymupdf-1.28.2-cp310-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:f89fb2d86d07d643a269f17a093105057e20c79c1d06c103b53600067b6d2b01", size = 25986309, upload-time = "2026-08-06T21:38:35.472Z" },+ { url = "https://files.pythonhosted.org/packages/52/60/1fb6e64676f7500ebe89054b9e5bbbe14d3101c92d5f1a40ac9a35227673/pymupdf-1.28.2-cp310-abi3-win32.whl", hash = "sha256:530ef543a3885b3b81cb72a854e7c5a625a9233201221132bb6c31698c6a2bdb", size = 18525353, upload-time = "2026-08-06T21:38:47.697Z" },+ { url = "https://files.pythonhosted.org/packages/4a/61/d563bbccba262f9dd6d2d35ccb72593648184d886188efb12d9ce8f34dd6/pymupdf-1.28.2-cp310-abi3-win_amd64.whl", hash = "sha256:ebd244918798502d7b4504c90410d1711a4d7675a32584ca30f1bab419ecbffe", size = 19826532, upload-time = "2026-08-06T21:39:00.213Z" },+ { url = "https://files.pythonhosted.org/packages/e2/93/08f404a1f0155fe24137cf2d3aabd3e2b4b08c62053ed89c60f2611be3e9/pymupdf-1.28.2-cp310-abi3-win_arm64.whl", hash = "sha256:ffe91a24edc75c80da2a4b62f50fc0f54632d34fc8fe4cbc48e5c7ff07cf8fb4", size = 19759252, upload-time = "2026-08-06T21:39:12.937Z" },+ { url = "https://files.pythonhosted.org/packages/58/8c/d897dcd32a25b58186c968b15ce4324ca029e9d96460de12325314e390be/pymupdf-1.28.2-cp313-abi3-pyemscripten_2025_0_wasm32.whl", hash = "sha256:2e1b574c0fd2cb238021033fd3c0f9c4388816638df064e4bfb56d9d81736dc8", size = 18399403, upload-time = "2026-08-06T21:39:25.008Z" },+ { url = "https://files.pythonhosted.org/packages/f6/f1/de34a1c53fe2bf8c6e71db84b0ced782d408970c9810d2b456a2ae96814c/pymupdf-1.28.2-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:fd481ed48bef56305c41fb7e05a055c03345c899c7b101dad086258b438f8168", size = 25802333, upload-time = "2026-08-06T21:39:41.426Z" },+]++[[package]]+name = "pypdfium2"+version = "5.14.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/95/d0/c81d3a7c2a9af37b817ace1de0acd40cf44d15f12407c5e86b3668364a5c/pypdfium2-5.14.0.tar.gz", hash = "sha256:c5f009b3157f10e97dceb55963f5910eff92feb00587ba10a76f12b87ce1a4b6", size = 376498, upload-time = "2026-10-04T15:19:19.835Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/91/03/79e89eac9d811e83d606342e129f5f39e168442ddf23b024fea4a7ee4762/pypdfium2-5.14.0-py3-none-android_23_arm64_v8a.whl", hash = "sha256:bed597b2cea3990164e43f9003f71db18959d0abd5d73adc9c176e7be2d84b98", size = 3453370, upload-time = "2026-10-04T15:18:40.79Z" },+ { url = "https://files.pythonhosted.org/packages/cc/68/369b80e408017b18eaecaa3c730bded07d90bfb65562215df200b56fb8e2/pypdfium2-5.14.0-py3-none-android_23_armeabi_v7a.whl", hash = "sha256:1951f0aed469150b13c62eabd501a9839e608ab9983ca8579be9eb73213b72b6", size = 2889924, upload-time = "2026-10-04T15:18:42.825Z" },+ { url = "https://files.pythonhosted.org/packages/d1/ea/14673bc9d8b7beeaa1eb46e9951b22543edaf2a4676c586e3b1e032ff6ee/pypdfium2-5.14.0-py3-none-macosx_13_0_arm64.whl", hash = "sha256:2de384df66ba55fcaab0775f30f28ec1090af3dfa60276a07821efc96d993118", size = 3542294, upload-time = "2026-10-04T15:18:44.345Z" },+ { url = "https://files.pythonhosted.org/packages/a6/11/b720097b01fa0874854f2f6669cbea4e4ea4e075769687714fac64d68964/pypdfium2-5.14.0-py3-none-macosx_13_0_x86_64.whl", hash = "sha256:e4e203ea9710fd00e5448edb6f1615dc8587035357f75f40b432dde0c33e8da1", size = 3735845, upload-time = "2026-10-04T15:18:45.975Z" },+ { url = "https://files.pythonhosted.org/packages/92/b4/0c31aa51887cd6cd032191dfe010a6d01ed43cf03204cfbd2184ebe4b715/pypdfium2-5.14.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f1b696e6901e16f114a2ec6332e5e3f8f5033a901614ead28499ab18ca6024f5", size = 3719672, upload-time = "2026-10-04T15:18:47.455Z" },+ { url = "https://files.pythonhosted.org/packages/93/a8/ae6ef96bf66559328d07b9e402ea704352ea00c49b6a73573da57e1fb378/pypdfium2-5.14.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:593f2c952ae3ffdca0efcbb3d9464fbccb876254386114ff900cabef21157c3f", size = 3435593, upload-time = "2026-10-04T15:18:49.131Z" },+ { url = "https://files.pythonhosted.org/packages/59/ff/a78405fab4c8bad0ec25b49c5efba2c85ed14609ec73645f95220560bd81/pypdfium2-5.14.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d436ee9e024f981e68f5775f5a9d115f93ea14ee6c2c6efd35dd17d83edf4942", size = 3868604, upload-time = "2026-10-04T15:18:51.304Z" },+ { url = "https://files.pythonhosted.org/packages/5d/6e/09e9b62ab66c9acef5ad14f8a8c0d7b4d8d6ea6492e4e65b612ef146d373/pypdfium2-5.14.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f6f13bbcc5f4adabc2676e52f662c6cb375de86b314790b0ae08f3ab62eb116a", size = 4279333, upload-time = "2026-10-04T15:18:52.948Z" },+ { url = "https://files.pythonhosted.org/packages/4f/a3/c9cc797fc8bdfb8f37b9b0f8b9d02a5fc196b2015f408d53624cab5b0519/pypdfium2-5.14.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11f281613fa22313d9c7ab89947665e84eccf8ebe40e1198a84a88352305648d", size = 3799581, upload-time = "2026-10-04T15:18:54.913Z" },+ { url = "https://files.pythonhosted.org/packages/b9/76/54355a4bbd88bdd5ed3f4405bdc345eb593df9995daf90d285cbdf5c1410/pypdfium2-5.14.0-py3-none-manylinux_2_27_s390x.manylinux_2_28_s390x.whl", hash = "sha256:51d9e9b64ebc34effaf57f9b6d4511b3f66ad3744bd1690d2cc6700853173dcf", size = 4113022, upload-time = "2026-10-04T15:18:56.774Z" },+ { url = "https://files.pythonhosted.org/packages/7d/bc/ea461961ed0e0c4866df7a5610e76f769ef468bff28cd007e2aeecc8b882/pypdfium2-5.14.0-py3-none-manylinux_2_34_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:605ab9d0d4c5e223599c9065b88d16b2c1f131c807c80dea8adbb16f1433e95b", size = 4062832, upload-time = "2026-10-04T15:18:58.471Z" },+ { url = "https://files.pythonhosted.org/packages/32/30/dde99bc8cb3f8ace1d856095c2b4a29c80eecf9089b186a3b0845d0abc69/pypdfium2-5.14.0-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:382de7fe20d32c42993a274d7b6c555a5623a97570dfc1d2f5e0a16fe0d5d482", size = 5058436, upload-time = "2026-10-04T15:18:59.993Z" },+ { url = "https://files.pythonhosted.org/packages/ec/16/5314182dda2695fdf5bd414a450ee866087068cca4725703932770d4be04/pypdfium2-5.14.0-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:dbfd6deff68cc46b134acd6be380d98d694a9f018fbb622c07229225c85db389", size = 4595505, upload-time = "2026-10-04T15:19:01.835Z" },+ { url = "https://files.pythonhosted.org/packages/63/3f/474c42e726f0020095c7d5f3fb88cfd4e5d39c1361105a72899ada0ecd1b/pypdfium2-5.14.0-py3-none-musllinux_1_2_i686.whl", hash = "sha256:9f4d77db5232826dd03a63481f32164331b96c21fd68f0667b2e43dbae141a93", size = 5309775, upload-time = "2026-10-04T15:19:03.564Z" },+ { url = "https://files.pythonhosted.org/packages/6b/0c/723a6cf11cff00f125310d8c2c08362dc6c100d05fff8f92285a4df1bd41/pypdfium2-5.14.0-py3-none-musllinux_1_2_ppc64le.whl", hash = "sha256:b40a0913196a1483f0fdc22a53f8719c3aef87f1c4d8d9c38d2ad4e207500fdf", size = 5224565, upload-time = "2026-10-04T15:19:05.264Z" },+ { url = "https://files.pythonhosted.org/packages/5c/c5/86ab02a41e77a7aa962af6545a406815aeb9abaecd9f25dec34dbc336b72/pypdfium2-5.14.0-py3-none-musllinux_1_2_riscv64.whl", hash = "sha256:790e2cac1641a65912b73bd7243f45195d36f1663c85a3e1a126a8f5867c82a3", size = 4704416, upload-time = "2026-10-04T15:19:07.05Z" },+ { url = "https://files.pythonhosted.org/packages/ac/de/fb75013f924c5a4dde4a4a41ec13e7495f9b80022bf35dd51baa54e05910/pypdfium2-5.14.0-py3-none-musllinux_1_2_s390x.whl", hash = "sha256:09b99c8f0cb427eb17fec13c0862ed598bba34b4843df153f70fff806a2820bc", size = 5163621, upload-time = "2026-10-04T15:19:09.021Z" },+ { url = "https://files.pythonhosted.org/packages/cd/77/e59c814f10b533bc4565abe90ccef888ba29be45ada4627ebbf710961f0d/pypdfium2-5.14.0-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:e70d87cb0577eab38f2106f9c9606b458930beef612a1b5f298772ed259f5ec0", size = 5121606, upload-time = "2026-10-04T15:19:10.609Z" },+ { url = "https://files.pythonhosted.org/packages/21/25/e067396b4bdd26c19f0997bfa3422d3975a49ceec2c59668e7599f2adcba/pypdfium2-5.14.0-py3-none-pyemscripten_2026_0_wasm32.whl", hash = "sha256:c73be14076bedebd9bcaf9b062579c95c668580043bccd29eb0db502101d5716", size = 2675501, upload-time = "2026-10-04T15:19:12.588Z" },+ { url = "https://files.pythonhosted.org/packages/7f/0c/6c21f68a57d0c4c506b9e5f72506ba91d8dde47eef699f3fd9561f7bff0e/pypdfium2-5.14.0-py3-none-win32.whl", hash = "sha256:9fd5cc94a389d50298e4d8cb79af6b9b8e0d785606e2a937725dc6e271c9c6e6", size = 3805374, upload-time = "2026-10-04T15:19:14.357Z" },+ { url = "https://files.pythonhosted.org/packages/00/dc/ca7874924c9cfd701ad53f89529968523790e70473e0b71e834668316148/pypdfium2-5.14.0-py3-none-win_amd64.whl", hash = "sha256:149fd5c6397b8df8bf7911a93506eff0be874f877afe7ac936cf5d37d21a6a06", size = 3947280, upload-time = "2026-10-04T15:19:16.302Z" },+ { url = "https://files.pythonhosted.org/packages/46/ab/35f2276deeeebb781925e2647dd88a39f8ea1a910104a0dbb28218473502/pypdfium2-5.14.0-py3-none-win_arm64.whl", hash = "sha256:eb8aeca157808f323e39ea298cc6d6c8e080c192ea2efb1ca81daa0f0ff4d095", size = 3745021, upload-time = "2026-10-04T15:19:18.276Z" },+]++[[package]]+name = "python-bidi"+version = "0.6.11"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/ce/e7/f168f2c3151aa05b9f9c9b2f7767bc8e06a133ea822c231ab497d4f36833/python_bidi-0.6.11.tar.gz", hash = "sha256:034090c597af250d699299d7e7f1e83eb016f9e47b3b707bd89ab2bdec77bce0", size = 57647, upload-time = "2026-06-30T14:23:42.626Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/c7/54/439befffac4b2d14c965928175cdf45586680824adf01fc19a6bcc7b0342/python_bidi-0.6.11-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:a9aa2890661b238730e680ccd6eb06f4da625b2dbc1730052dae6f2d88957192", size = 269604, upload-time = "2026-06-30T14:22:41.007Z" },+ { url = "https://files.pythonhosted.org/packages/77/fc/723f92efcbfb326b9091a6acc1385bbec4e0a3f5850fc360ee048ad9c9ab/python_bidi-0.6.11-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:41c7d1914c1f33954aa2ab0e2c309be5d1d4afc75ce524762eaab4dd825c5ab8", size = 269850, upload-time = "2026-06-30T14:22:30.786Z" },+ { url = "https://files.pythonhosted.org/packages/36/9a/8dc0e4613acdcca5f14efe327f6fc0f5f0908288a3c6fc7d1d368ee96c52/python_bidi-0.6.11-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:57aa56b1eca5f63ebdd25fe8fad02eab7797fc45ad1efc5eed2a830e2bd2038d", size = 295625, upload-time = "2026-06-30T14:21:27.876Z" },+ { url = "https://files.pythonhosted.org/packages/a8/66/812b9c6ed40021c5e1a04d5a65c347c339f89057642e48bc2b8bead0c83a/python_bidi-0.6.11-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d5695d87969fed5b3799b8a98848cb04fe2873fded46efe9f3f2f341efd1b829", size = 300843, upload-time = "2026-06-30T14:21:39.289Z" },+ { url = "https://files.pythonhosted.org/packages/27/78/f6aedee9fdafd59faba64bc053efcee2ac9ad7d3971311095bb36d542c00/python_bidi-0.6.11-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:da51a3a2940478219f19249fcf7cd45e8ddc197982be22efa43c4763e9d2eb57", size = 418888, upload-time = "2026-06-30T14:21:49.447Z" },+ { url = "https://files.pythonhosted.org/packages/47/32/cdb85b5aca0c5055a351aee768816ac43bbde6a0f9d2b71866ed41e93211/python_bidi-0.6.11-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:56807e0dde88d5ab96880c9d668bda7bca1df83cd30d20cbff5d6b6e6c1e9276", size = 321304, upload-time = "2026-06-30T14:21:59.874Z" },+ { url = "https://files.pythonhosted.org/packages/ae/6f/c4c4c790d697464c77f87e7741c2bc438d761d7783950415d6e238f7a7c0/python_bidi-0.6.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a1115f3f02eb836b39e0c986a6b9e92c4377a1e5a680409650b02ec6b1a795e6", size = 299426, upload-time = "2026-06-30T14:22:20.634Z" },+ { url = "https://files.pythonhosted.org/packages/69/5e/84ea7bb7dfdc232f0bc2a58f957320b289a01ad6010098c245d4abad092a/python_bidi-0.6.11-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1ad5f712a32be30d28eb96e119e85818747a43cea253de6c3160b464b62a5619", size = 316772, upload-time = "2026-06-30T14:22:10.044Z" },+ { url = "https://files.pythonhosted.org/packages/18/8e/295372d9d17160d74babae10014a67527917bbb7cde1905d01174d6efc1f/python_bidi-0.6.11-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:8013c1e6267a929be98d10c3a617171709c8226bd33c6180ec65e560c35b6df8", size = 471770, upload-time = "2026-06-30T14:22:52.148Z" },+ { url = "https://files.pythonhosted.org/packages/3f/78/28623ac1401586cc469f67c1fa7254ba1e1507c1a34a6c75b90dd5e8fc3a/python_bidi-0.6.11-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:ff675d036823bff05a2e0f8cdb13f5414274ff517d13b0d57c15527015eb6acb", size = 576384, upload-time = "2026-06-30T14:23:04.545Z" },+ { url = "https://files.pythonhosted.org/packages/5f/d4/36e34e27181df73ef9ed7091aa710ca052df2e76bc20cdfca87f3be67c5c/python_bidi-0.6.11-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:fa2848c3116d619870d114471fcd4a9f1aa43587a002111d7af1e6582f1b57e9", size = 537321, upload-time = "2026-06-30T14:23:16.754Z" },+ { url = "https://files.pythonhosted.org/packages/f6/61/6db9deaa5f8213506be2ea79279fdf9397e4bda7be42c6f8d638ef334a86/python_bidi-0.6.11-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:493655043ebea6fec0edb76053bdad46f1f7352a759ca4deb733f13b3c09839c", size = 503988, upload-time = "2026-06-30T14:23:29.455Z" },+ { url = "https://files.pythonhosted.org/packages/6d/65/9b1bc1b056b31bdd658906c95ea40e188ae74c61b1ce89e978fe587a7bb1/python_bidi-0.6.11-cp310-cp310-win32.whl", hash = "sha256:62a6b700f3d7a2c4d52a5dccca765711a2414e734360b00365e155698a26e461", size = 158574, upload-time = "2026-06-30T14:23:52.599Z" },+ { url = "https://files.pythonhosted.org/packages/98/f2/7507dc1b0e513e46de273875099bdc83a18f50f9da176d02dbc25612bc22/python_bidi-0.6.11-cp310-cp310-win_amd64.whl", hash = "sha256:fccd1808bb427d6a6d34168461bef551faa93ce3dda489fcef9073bcd9b34a5e", size = 163124, upload-time = "2026-06-30T14:23:43.648Z" },+ { url = "https://files.pythonhosted.org/packages/71/4b/7f942cdb3cc948a369bfe2530343f2d650aa17bb04b0b959834919f699a4/python_bidi-0.6.11-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:56f27c1edfd15c12c9c348378ccd79166930d720cf316b1181a0a0ade2146253", size = 269449, upload-time = "2026-06-30T14:22:42.207Z" },+ { url = "https://files.pythonhosted.org/packages/ee/6e/af3e17cb48b87176c209ac4271c8a9aaad8c33f5535739b58336222e69af/python_bidi-0.6.11-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a52f7ad9ef9091e81869e5d255e796755ccf542ade14dda17647cb7d7ffe1b9c", size = 269840, upload-time = "2026-06-30T14:22:31.833Z" },+ { url = "https://files.pythonhosted.org/packages/91/62/f7303a11e8286b2219088bb863974398a1a9f117444e78bbfcefaef7bc14/python_bidi-0.6.11-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e4ebc24ac38e50676f65daf7ba6c568789660cb60d6dcf2606d4310dba826721", size = 295322, upload-time = "2026-06-30T14:21:29.37Z" },+ { url = "https://files.pythonhosted.org/packages/29/38/930e63c374133760f69159da36a7aba98368ade44ae708215addc4079d91/python_bidi-0.6.11-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:969ee7db3e169fcc0b2d2d094826e03cc5798dfd6b3571a340ea883672396cb1", size = 300777, upload-time = "2026-06-30T14:21:40.302Z" },+ { url = "https://files.pythonhosted.org/packages/8d/af/f92408a2882ed7c94c3df9038df48400a5adc345e963d488bf716ad25358/python_bidi-0.6.11-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0d496f9fc21b7457e12395e54088ab99776966c663b4cd4a74770c7a6418ab59", size = 419532, upload-time = "2026-06-30T14:21:50.531Z" },+ { url = "https://files.pythonhosted.org/packages/24/0c/5fb11159f50e9a898862fa40fe98b8994eccd224189bb1c805ecfae66977/python_bidi-0.6.11-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ad5d9b8e8a6c330208eba413db506de58f21dbf88a1f1d5d75ef5f9e0e714adf", size = 320985, upload-time = "2026-06-30T14:22:01.157Z" },+ { url = "https://files.pythonhosted.org/packages/16/d3/6bd8b189219ec128263b7277b1cdaed0cf014199c61e05793be2d9cb0456/python_bidi-0.6.11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:acccb6d90e694684db2d314db2e2b0d3b8949bf1cfaec6d9808a8889f548add7", size = 299186, upload-time = "2026-06-30T14:22:21.702Z" },+ { url = "https://files.pythonhosted.org/packages/36/9e/b7da9c128f5ed867a62cb8112602bc7a6b6af783bbac18ca303a8a09b868/python_bidi-0.6.11-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a1b5ee069001bf7f4fff109598a9396caa96bb35e1b906b2c6d1bab9f9b2c4bd", size = 316856, upload-time = "2026-06-30T14:22:11.328Z" },+ { url = "https://files.pythonhosted.org/packages/72/a9/f5e4c286ae22fff569eb7aeeec7a5342e26e0ed1ac8202c48cf273932b28/python_bidi-0.6.11-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:619ee3fe03daec8d3ce12239f0c22455676a063b2bcde361caecd788fae5b8d5", size = 471488, upload-time = "2026-06-30T14:22:53.429Z" },+ { url = "https://files.pythonhosted.org/packages/22/29/47d84a333ee00db0cff74fde2aa39e01953abb360d14ffed70ad9195af26/python_bidi-0.6.11-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:af7711cc6eeeadcb1aae877e0736a68e111c73a29562da6106c5e2fbb4dd83b2", size = 576451, upload-time = "2026-06-30T14:23:05.961Z" },+ { url = "https://files.pythonhosted.org/packages/50/b1/1c158a64d745e4916fbc39c6ad700c5b2cf3b4456f710a62f625fba0694f/python_bidi-0.6.11-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:b2c759e13ebb81edaac3041697328bb1ca8433b55281723879f6b54e74881240", size = 537476, upload-time = "2026-06-30T14:23:18.118Z" },+ { url = "https://files.pythonhosted.org/packages/a9/7c/eeaad2247b29f736cda2632d14c5959940a4b4e8e098559cd2a4065356eb/python_bidi-0.6.11-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b433840a924c8788f0abbda15d22c71dc636e2078d7d3ba39369cebe4bef74b8", size = 503885, upload-time = "2026-06-30T14:23:31.134Z" },+ { url = "https://files.pythonhosted.org/packages/ad/d0/ec71ea3e29cc745580ac5477bbf3c9235782ab0c7bc08ac065e4c7cb12ec/python_bidi-0.6.11-cp311-cp311-win32.whl", hash = "sha256:8b6b7fce8f47578be9aebf5a0b6b2d6c157b4e97af7586ecf13bfca5d128deea", size = 158704, upload-time = "2026-06-30T14:23:53.754Z" },+ { url = "https://files.pythonhosted.org/packages/d7/98/0458bf0adcf09f1766e069f6d1265d83b8354146e689927f0d14451bf4e2/python_bidi-0.6.11-cp311-cp311-win_amd64.whl", hash = "sha256:555cdf9303c40bae1ab512ca427f1f0316a574bc0a48db22eec76ec0fd1213cf", size = 163236, upload-time = "2026-06-30T14:23:44.741Z" },+ { url = "https://files.pythonhosted.org/packages/bd/ad/e2ff0e5077de577211d7d4fd6a436a97d903d6c65e8deb4c958de901b0eb/python_bidi-0.6.11-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:83ee87feb5eafc0442e1db0014dad20d52a2a7a140b6cddc8f7bc65918f0a7b4", size = 267279, upload-time = "2026-06-30T14:22:43.34Z" },+ { url = "https://files.pythonhosted.org/packages/08/19/776b39e47e0bde27000fc2e68c2dd0bad023d4c470dcd5ec9c98779a62c8/python_bidi-0.6.11-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2d6970b09f5a3102c0aa192f5258c585742ab4ebd94f637a635ad3448ccba567", size = 265032, upload-time = "2026-06-30T14:22:32.901Z" },+ { url = "https://files.pythonhosted.org/packages/cb/fc/87f3b820bbee3620bdd89047ee617db49700719a632d149e1c8a8c6ec59b/python_bidi-0.6.11-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:495a76c881d78ab87b57c5270679c9bc3c1de36d8c6596d5e3a5a1b5f9c57471", size = 292228, upload-time = "2026-06-30T14:21:30.411Z" },+ { url = "https://files.pythonhosted.org/packages/d2/2b/e48c592fcd01409bd09eb1a181c31702f7c048d06bca004b8840d101f69a/python_bidi-0.6.11-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9af2b5c26a3eb960699dff040535a86dc2c0f708087b2d63bcfd6452fe9d0664", size = 297708, upload-time = "2026-06-30T14:21:41.536Z" },+ { url = "https://files.pythonhosted.org/packages/77/68/9da530ac64b961f5dcdcaad03d90b35becb43dd7d244241809da11acca34/python_bidi-0.6.11-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f99162d6c6c9522c46eb213f1bc932829c2602131676c92f081cb865b8ef6784", size = 415289, upload-time = "2026-06-30T14:21:51.919Z" },+ { url = "https://files.pythonhosted.org/packages/9d/8e/ce62bfec64769c28d537ef0481a36dd9ee42795b2975b41846f1aa82f7cc/python_bidi-0.6.11-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:caee7ee3662eab1411b44fef8571b87273cb5235061d7463ebd10e412ac07986", size = 318361, upload-time = "2026-06-30T14:22:02.282Z" },+ { url = "https://files.pythonhosted.org/packages/09/fb/57a496606a4faf051a3e851cc05a5bab2a1cd37b14fc738a707a5a51bba8/python_bidi-0.6.11-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3611d13b53d4c899c4f2a7cd8eb897064e8b5546c3c5d1037dd6209c82858a27", size = 296198, upload-time = "2026-06-30T14:22:22.914Z" },+ { url = "https://files.pythonhosted.org/packages/7e/e9/31fbe166932d34860271ec5e0e0ecf0bc4166bddb889a260962a448d8617/python_bidi-0.6.11-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6ca92a4e460f7e25e434a6d7982d94a4765ca242f527995da70abb5a32003b8a", size = 313188, upload-time = "2026-06-30T14:22:12.589Z" },+ { url = "https://files.pythonhosted.org/packages/c5/ea/0c2ae4a316ea919698ede4201da1c07dc1c2f9a86bd3bce3f9b94b0ce7e6/python_bidi-0.6.11-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:539d99efe02f4981171ed57bbc085094ef780405ca14663550a56c6c3e265c34", size = 468437, upload-time = "2026-06-30T14:22:54.946Z" },+ { url = "https://files.pythonhosted.org/packages/17/6c/4795fb7f3ddca33a981158437ff6bd4c532d1011b9d887f47cff45d035e8/python_bidi-0.6.11-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:9435acc52438c3c8f5142b9a17a622927618e80a32eed707343bc375cb51cebe", size = 573566, upload-time = "2026-06-30T14:23:07.133Z" },+ { url = "https://files.pythonhosted.org/packages/6e/79/8e707fb95cec1afed3fbffbf5eee93f2a73cad6f1445e17e32c6256cf397/python_bidi-0.6.11-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:239a00b2adb5f897d11d7b7a491d759fb9883e71a71cfd90c4147a733b4df4d3", size = 533591, upload-time = "2026-06-30T14:23:19.389Z" },+ { url = "https://files.pythonhosted.org/packages/fb/4c/5e8d01ed3d2f8ca1116e1e21085a5ca97450b4035138988e5a82ea2db916/python_bidi-0.6.11-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:51915502898c45e9cb36636e974aca068fc5cdb9f06b794f49abea5b12f02016", size = 500360, upload-time = "2026-06-30T14:23:32.445Z" },+ { url = "https://files.pythonhosted.org/packages/b0/77/86bf9c4a95f363451e7c322ef76afbe56034da23a2b5532bd774751022ff/python_bidi-0.6.11-cp312-cp312-win32.whl", hash = "sha256:6c92d1cad16f9ec2f2a3ae439a0bc3a8e4189ec227987bed03d5b4056d5eb9c5", size = 157049, upload-time = "2026-06-30T14:23:54.895Z" },+ { url = "https://files.pythonhosted.org/packages/04/e3/8912d05e04575a60a0481cc222805331b74154940528a6f419fc5bbba744/python_bidi-0.6.11-cp312-cp312-win_amd64.whl", hash = "sha256:0608bddcc1c53dfa5293499de13ca9935b31aa46d1c722c404a88c703d1a4e47", size = 161243, upload-time = "2026-06-30T14:23:45.819Z" },+ { url = "https://files.pythonhosted.org/packages/c4/13/38f195e9d9a144747a2ca5ed6ec922df50534e6bacb2188a27154c9f9400/python_bidi-0.6.11-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:1b41cc6bc9ad78a12da5f987da15e931c771f18ceca58f2fe8ed50f253490a97", size = 266692, upload-time = "2026-06-30T14:22:44.497Z" },+ { url = "https://files.pythonhosted.org/packages/a6/a0/4a29e0bfa45038edeeac9397c0c91aee674efbbaa962f0c32c17aaf1a2c4/python_bidi-0.6.11-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:4d00757ef7bbbf14d8628f9bdb6b0e168d5e7b03fec20da3226624f11bffce89", size = 264510, upload-time = "2026-06-30T14:22:34.029Z" },+ { url = "https://files.pythonhosted.org/packages/6c/12/0c599f95cfd3433bb773dba3624fb0f00e74ee4d9f7c0c0455d935cf938d/python_bidi-0.6.11-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:302f4ca7dabfe447e707d40e98520551181036c15750bdd1e73292ad8b3d8e75", size = 291878, upload-time = "2026-06-30T14:21:31.721Z" },+ { url = "https://files.pythonhosted.org/packages/78/7d/ca9f710b5bc279decae719041795a0ab2fbc02f85a5231cf2e3f4195ed1f/python_bidi-0.6.11-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:721697187f4da67dafc26f63488f463fa35ff2de8668d959fda773cccdbef0eb", size = 297428, upload-time = "2026-06-30T14:21:42.745Z" },+ { url = "https://files.pythonhosted.org/packages/0c/0c/626a2fde3ba831ace3e092544617974dfb99d3a225cf7445987b1fd68b3e/python_bidi-0.6.11-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3da9e536546f7c62c0da595c8f71a096e0b9a80e94cfd0f329b7b200ef81e7d5", size = 414583, upload-time = "2026-06-30T14:21:53.006Z" },+ { url = "https://files.pythonhosted.org/packages/0d/93/23daba3a074f3b181fbeeef559735cd21ab55a8bad46934ed311696812b5/python_bidi-0.6.11-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d52ec8ccdc2fd5c61749d876a9d1eb0ea6543c1676722e1e3fb9d7800852131c", size = 318441, upload-time = "2026-06-30T14:22:03.41Z" },+ { url = "https://files.pythonhosted.org/packages/66/60/569132a43fff4e52abbdd640b76b761a773c1c1b07f5bf3576be5049e8da/python_bidi-0.6.11-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:74457b43db34f984252e915828b5d1a4042a771f44e853a5643506d01562eccb", size = 295716, upload-time = "2026-06-30T14:22:24.117Z" },+ { url = "https://files.pythonhosted.org/packages/7c/cd/a7ffa9ae8dd1903f3c17a9a2af6c531c92c3f7f7789f5c304ef77f94bd06/python_bidi-0.6.11-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:397f7f289eba6ce25d99dbea99f873d699bf9aa030074e7fb746d8f93c2fb6f9", size = 313112, upload-time = "2026-06-30T14:22:13.691Z" },+ { url = "https://files.pythonhosted.org/packages/dd/e0/f252c15167d7b175e37514cf7d52cab3a244bfb0b64a5973c9ce6b33e191/python_bidi-0.6.11-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:946b7dbec4e64017680f1a66b3a8534659d889018ac83bd2abf958278e6f62b0", size = 468245, upload-time = "2026-06-30T14:22:56.534Z" },+ { url = "https://files.pythonhosted.org/packages/f9/06/7404eac40f2be2148cd0497251438e7690f553c5a09916d13d9803f8d32b/python_bidi-0.6.11-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:380b70d615647646dbe06f7d95dc30b8fdc9b596dbfa1cd3814feb9805c0c8f2", size = 573246, upload-time = "2026-06-30T14:23:08.653Z" },+ { url = "https://files.pythonhosted.org/packages/4c/3e/49ca8310bdad3adedd6265da5c4877368ed528a0095348aa32edd8a0299e/python_bidi-0.6.11-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:1ffd728f1f7866ff7399906bbc17ef5cf010b90ce56a1e94937b28a1a4cf5a7d", size = 533495, upload-time = "2026-06-30T14:23:20.695Z" },+ { url = "https://files.pythonhosted.org/packages/53/60/47cea7de2ebad67e30e5154d846f4d6a49347ca0dffcb76136be57a08226/python_bidi-0.6.11-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:36f23f12d9b1c56ed8d82e11f56c6cba7bc3f614ee73374bc7772bb2270e0966", size = 499825, upload-time = "2026-06-30T14:23:33.846Z" },+ { url = "https://files.pythonhosted.org/packages/58/bb/94c89a185d9c5c6154a72583eff91448f48f5f776567af217326d839d8b3/python_bidi-0.6.11-cp313-cp313-win32.whl", hash = "sha256:79df1099a08e53edb678236d4d76d8de4e3901bafc84ce1788b71f9b96547325", size = 156754, upload-time = "2026-06-30T14:23:56.033Z" },+ { url = "https://files.pythonhosted.org/packages/85/0a/7ac8da3629ca8d93a419f5250c240fc13f7d34b7c04f279c8f9a474a2be9/python_bidi-0.6.11-cp313-cp313-win_amd64.whl", hash = "sha256:f563d20481f7d316adf605bb94d5b7182acecdbc4d431d60473e9b1d526d0210", size = 160888, upload-time = "2026-06-30T14:23:46.872Z" },+ { url = "https://files.pythonhosted.org/packages/1a/dc/8d088a648845e60ee8d3d758251909320d6a51774181d2a3e72e985af0b8/python_bidi-0.6.11-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:5f3e1743b2d43377c4da5d687a03430a27f5769e158a9f75a50b05e7e82f4d21", size = 267877, upload-time = "2026-06-30T14:22:45.785Z" },+ { url = "https://files.pythonhosted.org/packages/ce/53/9c3e47a0579e5a3f168bb18ecfa197d494577ac19a1dd4557ecff99e2870/python_bidi-0.6.11-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:6d9ef69c108b31f38e1f281a55fdedad7774bc1e952a45c8c14a18e891eee397", size = 265786, upload-time = "2026-06-30T14:22:35.254Z" },+ { url = "https://files.pythonhosted.org/packages/f6/51/3fc218678ac34a99065e45fdcc0209d2dd5e1f7766132fc4c58989a96d7d/python_bidi-0.6.11-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:30d543b5baf9fca5ef5ec95647aa07c5e38fc7fa0f18be0c61d1d6c0a1032c6c", size = 293177, upload-time = "2026-06-30T14:21:32.962Z" },+ { url = "https://files.pythonhosted.org/packages/47/71/f359cfa65a6716f23c069d17b6e2b87a8c673f499753c7f9712979096f6a/python_bidi-0.6.11-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d14f2d400c75e07d1154299463a3d4d14aa5565b05088b2d9b314ccd9fd6dc3a", size = 297983, upload-time = "2026-06-30T14:21:43.731Z" },+ { url = "https://files.pythonhosted.org/packages/63/76/624bf0155d2b4fc2aa73e1276c22b66545a8d1f7280286c7e4dc443202db/python_bidi-0.6.11-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a4f4a0cd24c09df748bfdc207b089c00e7af19f3151063f4cd74ac658290186b", size = 418424, upload-time = "2026-06-30T14:21:54.25Z" },+ { url = "https://files.pythonhosted.org/packages/28/cf/4a919e5be87a352ccb48b0ad2c01e2bca5d1f804d927e17df67904af62dd/python_bidi-0.6.11-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2ff75d1befc335cbe85f834e81554a024f94d9b5d1dd75a5bd99af81a1cb783c", size = 319005, upload-time = "2026-06-30T14:22:04.514Z" },+ { url = "https://files.pythonhosted.org/packages/fa/25/2d9a3b0c4982ac60b8bc94b273eb7768cca18e92c5041807058fe81f4485/python_bidi-0.6.11-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:959335cd3814cb767fb832c5c71cbc838ccd9231a812ef2cb43092a216a91d5b", size = 296830, upload-time = "2026-06-30T14:22:25.187Z" },+ { url = "https://files.pythonhosted.org/packages/61/d9/1798bf13b0e8167fee6a1bd0c2ec374c8d49a6de34a205a1a67bb8d45fb2/python_bidi-0.6.11-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:20ab47a4098577fc9a82816c330c89ff597c31ba69c98bc6a1b6a5737b03de05", size = 313852, upload-time = "2026-06-30T14:22:14.793Z" },+ { url = "https://files.pythonhosted.org/packages/25/aa/56a51fed9718e751a93ea3a4b894217a04cfaef0704159b400dee5fa5b4a/python_bidi-0.6.11-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:60d9bf6c60c022657637f64897e63dc3f5b1c07cb7f0e1ead6150aff5150c5ab", size = 469382, upload-time = "2026-06-30T14:22:57.838Z" },+ { url = "https://files.pythonhosted.org/packages/c5/8b/82979c858cba237355aee8a2a35c317ba412c4bce494e8a51ccb1c9e5321/python_bidi-0.6.11-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:cd564b8c583eba2d230d02d0467fd840045f08856b6524555cfff7f32af63c72", size = 573783, upload-time = "2026-06-30T14:23:10.012Z" },+ { url = "https://files.pythonhosted.org/packages/0f/55/a88d71d784144283f4e53a9849c4788c8a5fcce56a1690e073c014fa34fe/python_bidi-0.6.11-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:fc3b0a6e2460f68de9ab98f71e3098bb21bb984563417ad104dec7ab08ebcadc", size = 534229, upload-time = "2026-06-30T14:23:22.108Z" },+ { url = "https://files.pythonhosted.org/packages/1c/f1/c50692fd2cfccb563fecac7c53af00c141bd9bed09fb9cd626e0d765c53d/python_bidi-0.6.11-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:3bdb64ee0a74951465cd4a761e1029e73806ff43b2fe5be98643e52da5cabb66", size = 501275, upload-time = "2026-06-30T14:23:35.379Z" },+ { url = "https://files.pythonhosted.org/packages/ad/0f/4a83866615b86572d0854b9623e7c44de51a7d3e21b16880cfeb0fdc1b49/python_bidi-0.6.11-cp314-cp314-win32.whl", hash = "sha256:f237ebb570fd8bbe479b6967374d82b7f0b26f9452c276bdd5f793d83e7062bd", size = 157398, upload-time = "2026-06-30T14:23:57.202Z" },+ { url = "https://files.pythonhosted.org/packages/90/78/bf20f1ab2cafaf744df006691e0f7d292f95f7c01fbaced92f5970ab3f8a/python_bidi-0.6.11-cp314-cp314-win_amd64.whl", hash = "sha256:8fbb6d222b50324fb9d49b6ff0f8566fa97b907a68c00e6622fcf34463104f4a", size = 161347, upload-time = "2026-06-30T14:23:47.921Z" },+ { url = "https://files.pythonhosted.org/packages/4d/da/cabfc8c055b53d845de46a78b641996a8ca2e4b9f7c9667fc8a54e7c9030/python_bidi-0.6.11-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:43f3e81bdd36f49171b7de6cf471086df503c29555f6f7f035ebe8f8ec1da779", size = 267716, upload-time = "2026-06-30T14:22:46.973Z" },+ { url = "https://files.pythonhosted.org/packages/b7/0e/2839f8671a2201c5e1776e04ac48170e9b8a6c989147fe1b656d19603c7a/python_bidi-0.6.11-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:d7291e13496cb74fc1b71f7f1e3628586afefa531102bb4fa7af9c2d543efc3c", size = 265337, upload-time = "2026-06-30T14:22:36.426Z" },+ { url = "https://files.pythonhosted.org/packages/7c/b8/561bfe22ac7ad3de4017542c4c6c192d0fa83a416ab2e0a66728c898e937/python_bidi-0.6.11-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4ccf1fe9ecb3b02a1a11b103cd2557e2653d82c141b6e2dccec8177e6af5c4bb", size = 292362, upload-time = "2026-06-30T14:21:34.19Z" },+ { url = "https://files.pythonhosted.org/packages/45/ae/2b1159ac11e4516f566d83572481a0ca453abe132a43db4c048931676bfd/python_bidi-0.6.11-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f400a30573774a1e90c0d50d43c35d9c004afcf53de801bbfd259f84ea80f31c", size = 297068, upload-time = "2026-06-30T14:21:44.769Z" },+ { url = "https://files.pythonhosted.org/packages/b6/d1/cf4c90a99d54ac01aeb186335dbf5a9cb89b3afbd5adc0b77b5c6f826134/python_bidi-0.6.11-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:788c11c84b520ea973992cc95751d56b783ff5857df504c1347d99cacd2fcfe7", size = 416236, upload-time = "2026-06-30T14:21:55.374Z" },+ { url = "https://files.pythonhosted.org/packages/ed/89/526f2b7be7c2e0d72dee52955538f816b7855e20d4a8e092516c13cbef78/python_bidi-0.6.11-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:879c3fba3e7511c7d01020449d970ca7d6a593f20cfc47c014d3d229a38930b2", size = 318604, upload-time = "2026-06-30T14:22:05.574Z" },+ { url = "https://files.pythonhosted.org/packages/67/a7/779464d0a6a96566f77bf8b76ec3d83cefadd8210ac758f4492942192357/python_bidi-0.6.11-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6dc112e2239f69913273cbb0c050ca816b145b32037d4266c430159c5ddcdab2", size = 296857, upload-time = "2026-06-30T14:22:26.36Z" },+ { url = "https://files.pythonhosted.org/packages/8e/bf/cba41041e3a4369be495011bd773aaedefbfef59d6c21e121e61f8ac1e2b/python_bidi-0.6.11-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:19bae96ff1ee76b3a7dc962598b69426538e3021460cf85a4017437548ab6947", size = 313478, upload-time = "2026-06-30T14:22:15.968Z" },+ { url = "https://files.pythonhosted.org/packages/be/88/a4cd8dea27cab1eee8ee33be1ee2a948a7a53d37beb071811d2a0aa328d1/python_bidi-0.6.11-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:565d819fddb2bbc58c42ca5c97d73da7567f181115011e8f04c76b9d08378dcd", size = 468573, upload-time = "2026-06-30T14:22:59.11Z" },+ { url = "https://files.pythonhosted.org/packages/a5/f3/9d8954d038e876386bb36fce4f0df61c6cf5b0664e69ab4c1914420d397e/python_bidi-0.6.11-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:e6c474618a7b6a50c10007f8a9edb50def6d98d297a07a34dc2fb82c344f2b8b", size = 572916, upload-time = "2026-06-30T14:23:11.277Z" },+ { url = "https://files.pythonhosted.org/packages/ae/02/a5f8763031912748e17e0f0e06e7056b377754c3a084432f6c7f32847acd/python_bidi-0.6.11-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:73c38c604bfc01647c69ce38e5cf8b4206e2ede91ca3eb8e5d79b7409f17e0b3", size = 533968, upload-time = "2026-06-30T14:23:24.072Z" },+ { url = "https://files.pythonhosted.org/packages/fe/5c/823d93e8ea9e05e77eb76eace84ea9879fe876890da616a41077b8c7ffd5/python_bidi-0.6.11-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:c26cd9d81f820159026b1c99905ca12bf13892e3f6a9303359fef42fe6f39e50", size = 500671, upload-time = "2026-06-30T14:23:36.907Z" },+ { url = "https://files.pythonhosted.org/packages/a1/00/9d16556d2e0bb4a4b2132fa37fc6235e333c6bf5bccd1375ce0a15ea1db1/python_bidi-0.6.11-cp314-cp314t-win32.whl", hash = "sha256:dfbb9ba8343a60daf4ced67c11d551dafe9a3c94892c326e4c216fa2e6eca802", size = 157355, upload-time = "2026-06-30T14:23:58.321Z" },+ { url = "https://files.pythonhosted.org/packages/9a/b6/13ea093c161da232a6eb534d420fe575ad802b0c8184860fe4f3881fbc08/python_bidi-0.6.11-cp314-cp314t-win_amd64.whl", hash = "sha256:6623683fe39b9fbf508e3069f17e8e9cab26143f9d9f89c8a8f45424c052df4f", size = 161439, upload-time = "2026-06-30T14:23:49.011Z" },+ { url = "https://files.pythonhosted.org/packages/29/27/b4878ebed0c75833629aefe0b9cbff588df86efe6068d4c100ee8d0df27b/python_bidi-0.6.11-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:8eb09af209cd660fa9689f6ce9e61e73c8afa4829ae61801deea7f6e32263800", size = 271411, upload-time = "2026-06-30T14:22:50.789Z" },+ { url = "https://files.pythonhosted.org/packages/f9/d5/080a6acda54809d12736eaf58cd71b930eba431eab78b2920727204f8a94/python_bidi-0.6.11-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:f7a8429d0d65232e314b4f494825c1205abcc3039f42bf7da80424a15b731709", size = 271915, upload-time = "2026-06-30T14:22:39.907Z" },+ { url = "https://files.pythonhosted.org/packages/2b/33/a076031a95627bef4e051d94ac90ff44dac687e988da4417a387e226555d/python_bidi-0.6.11-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c6b3c853f99172ef22e5a16c8114cf243e351c8e70f72a894164088c2c99d9cb", size = 296494, upload-time = "2026-06-30T14:21:38.138Z" },+ { url = "https://files.pythonhosted.org/packages/3d/dd/dcb312034d421f99b00d2d2b37b1a4b6ce919a3f0c70ed3aa5570b4d1bef/python_bidi-0.6.11-pp311-pypy311_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:69d1f4ee17644e8aeac93a7238ee2f28d79b0180815441eb511b77e6585aa971", size = 302105, upload-time = "2026-06-30T14:21:48.328Z" },+ { url = "https://files.pythonhosted.org/packages/8a/e2/25192b48e4bedf7491daa7aa50e196d06b46ffa495b039d492845173bffb/python_bidi-0.6.11-pp311-pypy311_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:80cfe97e2d65981be877ae5bd2338c6919a7cc1171fc308c8b8c7c306ba6ffd8", size = 419597, upload-time = "2026-06-30T14:21:58.598Z" },+ { url = "https://files.pythonhosted.org/packages/45/c0/1fb868cf41aab7e22cf01e8a4717c8447a43eadda8ccf367f3660c9005d8/python_bidi-0.6.11-pp311-pypy311_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:83c780f7e4c3dd3f020db75dc425567981e65c6d5571b3c0372203d0df92c834", size = 322465, upload-time = "2026-06-30T14:22:08.965Z" },+ { url = "https://files.pythonhosted.org/packages/27/41/a7903ff2829d16eae2b11dff1cffeb9739373b8fe12c27ab04dda7c5c45d/python_bidi-0.6.11-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4ac819cac1abb15486c48af3399a5c726e89f0977a3aff205ac162533186e756", size = 300467, upload-time = "2026-06-30T14:22:29.729Z" },+ { url = "https://files.pythonhosted.org/packages/29/eb/16f4fb6acaf5d381da8faf26a306a255e54417450674d4c004a0ba0545ae/python_bidi-0.6.11-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:63d9dcc714d549a5118ebc93b7a7c903a0c1feec8e57f5fcacf98d984b76325b", size = 318422, upload-time = "2026-06-30T14:22:19.416Z" },+ { url = "https://files.pythonhosted.org/packages/86/04/ef0ba9e878bb5169e32bbd96e3e39ab60e947ae1757b7dd645eb4fc2e7a4/python_bidi-0.6.11-pp311-pypy311_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:d73a821873c52635321196cfb8d3a231d7917ca284cf2bcd9422f6deb19db7ca", size = 473278, upload-time = "2026-06-30T14:23:03.142Z" },+ { url = "https://files.pythonhosted.org/packages/be/93/b3aa2631c4801ddd5c22f93e430ed1d570bcb634c4a217e864195cbe7574/python_bidi-0.6.11-pp311-pypy311_pp73-musllinux_1_2_armv7l.whl", hash = "sha256:bde89739a979d9eb3ac48c4882c8a42dd528a7708b0faa99b90b551588bd5f8d", size = 577704, upload-time = "2026-06-30T14:23:15.336Z" },+ { url = "https://files.pythonhosted.org/packages/87/b0/f5b755e1e4807bb403ccad09b1ca4faca52e260f384595e9362a68e378a6/python_bidi-0.6.11-pp311-pypy311_pp73-musllinux_1_2_i686.whl", hash = "sha256:7738cfc7ee9fcdff3fef76b40007982ce7704010a51df307c4a51d378f5ff1ba", size = 538805, upload-time = "2026-06-30T14:23:28.158Z" },+ { url = "https://files.pythonhosted.org/packages/c7/f0/f6b9d17e3426e7b54c18d05d917982647a976233ed9348a2ef40f1a17f85/python_bidi-0.6.11-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:cf4e88a6fec81b7155a487cbbea7753a3d9a76dc4d391b4f8958b37227ef2c12", size = 505204, upload-time = "2026-06-30T14:23:41.222Z" },+]++[[package]]+name = "python-dateutil"+version = "2.9.0.post0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "six" },+]+sdist = { url = "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3", size = 342432, upload-time = "2024-03-01T18:36:20.211Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427", size = 229892, upload-time = "2024-03-01T18:36:18.57Z" },+]++[[package]]+name = "pytz"+version = "2026.5"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/14/21/d83d6ef28c4c912c4bb4d1dcf591f7b8c6bde87b9c66f9f454677314e16d/pytz-2026.5.tar.gz", hash = "sha256:fa23724b9c486543b9ff54a327ee7569ac83ade54bb9afd0fc18676620401c86", size = 318572, upload-time = "2026-10-04T02:37:58.719Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/4f/ef/c66110d46fb800dda0bf33164182dfadabe26a90e4476844d502a23dca8e/pytz-2026.5-py2.py3-none-any.whl", hash = "sha256:e658af3757f9e26a9d25dd2aff38335acd92bc9104f890a894b2c1ba28311b03", size = 506342, upload-time = "2026-10-04T02:37:56.814Z" },+]++[[package]]+name = "pyyaml"+version = "6.0.2"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz", hash = "sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e", size = 130631, upload-time = "2024-08-06T20:33:50.674Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/9b/95/a3fac87cb7158e231b5a6012e438c647e1a87f09f8e0d123acec8ab8bf71/PyYAML-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086", size = 184199, upload-time = "2024-08-06T20:31:40.178Z" },+ { url = "https://files.pythonhosted.org/packages/c7/7a/68bd47624dab8fd4afbfd3c48e3b79efe09098ae941de5b58abcbadff5cb/PyYAML-6.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf", size = 171758, upload-time = "2024-08-06T20:31:42.173Z" },+ { url = "https://files.pythonhosted.org/packages/49/ee/14c54df452143b9ee9f0f29074d7ca5516a36edb0b4cc40c3f280131656f/PyYAML-6.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8824b5a04a04a047e72eea5cec3bc266db09e35de6bdfe34c9436ac5ee27d237", size = 718463, upload-time = "2024-08-06T20:31:44.263Z" },+ { url = "https://files.pythonhosted.org/packages/4d/61/de363a97476e766574650d742205be468921a7b532aa2499fcd886b62530/PyYAML-6.0.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7c36280e6fb8385e520936c3cb3b8042851904eba0e58d277dca80a5cfed590b", size = 719280, upload-time = "2024-08-06T20:31:50.199Z" },+ { url = "https://files.pythonhosted.org/packages/6b/4e/1523cb902fd98355e2e9ea5e5eb237cbc5f3ad5f3075fa65087aa0ecb669/PyYAML-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ec031d5d2feb36d1d1a24380e4db6d43695f3748343d99434e6f5f9156aaa2ed", size = 751239, upload-time = "2024-08-06T20:31:52.292Z" },+ { url = "https://files.pythonhosted.org/packages/b7/33/5504b3a9a4464893c32f118a9cc045190a91637b119a9c881da1cf6b7a72/PyYAML-6.0.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:936d68689298c36b53b29f23c6dbb74de12b4ac12ca6cfe0e047bedceea56180", size = 695802, upload-time = "2024-08-06T20:31:53.836Z" },+ { url = "https://files.pythonhosted.org/packages/5c/20/8347dcabd41ef3a3cdc4f7b7a2aff3d06598c8779faa189cdbf878b626a4/PyYAML-6.0.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:23502f431948090f597378482b4812b0caae32c22213aecf3b55325e049a6c68", size = 720527, upload-time = "2024-08-06T20:31:55.565Z" },+ { url = "https://files.pythonhosted.org/packages/be/aa/5afe99233fb360d0ff37377145a949ae258aaab831bde4792b32650a4378/PyYAML-6.0.2-cp310-cp310-win32.whl", hash = "sha256:2e99c6826ffa974fe6e27cdb5ed0021786b03fc98e5ee3c5bfe1fd5015f42b99", size = 144052, upload-time = "2024-08-06T20:31:56.914Z" },+ { url = "https://files.pythonhosted.org/packages/b5/84/0fa4b06f6d6c958d207620fc60005e241ecedceee58931bb20138e1e5776/PyYAML-6.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:a4d3091415f010369ae4ed1fc6b79def9416358877534caf6a0fdd2146c87a3e", size = 161774, upload-time = "2024-08-06T20:31:58.304Z" },+ { url = "https://files.pythonhosted.org/packages/f8/aa/7af4e81f7acba21a4c6be026da38fd2b872ca46226673c89a758ebdc4fd2/PyYAML-6.0.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cc1c1159b3d456576af7a3e4d1ba7e6924cb39de8f67111c735f6fc832082774", size = 184612, upload-time = "2024-08-06T20:32:03.408Z" },+ { url = "https://files.pythonhosted.org/packages/8b/62/b9faa998fd185f65c1371643678e4d58254add437edb764a08c5a98fb986/PyYAML-6.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1e2120ef853f59c7419231f3bf4e7021f1b936f6ebd222406c3b60212205d2ee", size = 172040, upload-time = "2024-08-06T20:32:04.926Z" },+ { url = "https://files.pythonhosted.org/packages/ad/0c/c804f5f922a9a6563bab712d8dcc70251e8af811fce4524d57c2c0fd49a4/PyYAML-6.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d225db5a45f21e78dd9358e58a98702a0302f2659a3c6cd320564b75b86f47c", size = 736829, upload-time = "2024-08-06T20:32:06.459Z" },+ { url = "https://files.pythonhosted.org/packages/51/16/6af8d6a6b210c8e54f1406a6b9481febf9c64a3109c541567e35a49aa2e7/PyYAML-6.0.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ac9328ec4831237bec75defaf839f7d4564be1e6b25ac710bd1a96321cc8317", size = 764167, upload-time = "2024-08-06T20:32:08.338Z" },+ { url = "https://files.pythonhosted.org/packages/75/e4/2c27590dfc9992f73aabbeb9241ae20220bd9452df27483b6e56d3975cc5/PyYAML-6.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ad2a3decf9aaba3d29c8f537ac4b243e36bef957511b4766cb0057d32b0be85", size = 762952, upload-time = "2024-08-06T20:32:14.124Z" },+ { url = "https://files.pythonhosted.org/packages/9b/97/ecc1abf4a823f5ac61941a9c00fe501b02ac3ab0e373c3857f7d4b83e2b6/PyYAML-6.0.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4", size = 735301, upload-time = "2024-08-06T20:32:16.17Z" },+ { url = "https://files.pythonhosted.org/packages/45/73/0f49dacd6e82c9430e46f4a027baa4ca205e8b0a9dce1397f44edc23559d/PyYAML-6.0.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:797b4f722ffa07cc8d62053e4cff1486fa6dc094105d13fea7b1de7d8bf71c9e", size = 756638, upload-time = "2024-08-06T20:32:18.555Z" },+ { url = "https://files.pythonhosted.org/packages/22/5f/956f0f9fc65223a58fbc14459bf34b4cc48dec52e00535c79b8db361aabd/PyYAML-6.0.2-cp311-cp311-win32.whl", hash = "sha256:11d8f3dd2b9c1207dcaf2ee0bbbfd5991f571186ec9cc78427ba5bd32afae4b5", size = 143850, upload-time = "2024-08-06T20:32:19.889Z" },+ { url = "https://files.pythonhosted.org/packages/ed/23/8da0bbe2ab9dcdd11f4f4557ccaf95c10b9811b13ecced089d43ce59c3c8/PyYAML-6.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:e10ce637b18caea04431ce14fabcf5c64a1c61ec9c56b071a4b7ca131ca52d44", size = 161980, upload-time = "2024-08-06T20:32:21.273Z" },+ { url = "https://files.pythonhosted.org/packages/86/0c/c581167fc46d6d6d7ddcfb8c843a4de25bdd27e4466938109ca68492292c/PyYAML-6.0.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:c70c95198c015b85feafc136515252a261a84561b7b1d51e3384e0655ddf25ab", size = 183873, upload-time = "2024-08-06T20:32:25.131Z" },+ { url = "https://files.pythonhosted.org/packages/a8/0c/38374f5bb272c051e2a69281d71cba6fdb983413e6758b84482905e29a5d/PyYAML-6.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ce826d6ef20b1bc864f0a68340c8b3287705cae2f8b4b1d932177dcc76721725", size = 173302, upload-time = "2024-08-06T20:32:26.511Z" },+ { url = "https://files.pythonhosted.org/packages/c3/93/9916574aa8c00aa06bbac729972eb1071d002b8e158bd0e83a3b9a20a1f7/PyYAML-6.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f71ea527786de97d1a0cc0eacd1defc0985dcf6b3f17bb77dcfc8c34bec4dc5", size = 739154, upload-time = "2024-08-06T20:32:28.363Z" },+ { url = "https://files.pythonhosted.org/packages/95/0f/b8938f1cbd09739c6da569d172531567dbcc9789e0029aa070856f123984/PyYAML-6.0.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9b22676e8097e9e22e36d6b7bda33190d0d400f345f23d4065d48f4ca7ae0425", size = 766223, upload-time = "2024-08-06T20:32:30.058Z" },+ { url = "https://files.pythonhosted.org/packages/b9/2b/614b4752f2e127db5cc206abc23a8c19678e92b23c3db30fc86ab731d3bd/PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:80bab7bfc629882493af4aa31a4cfa43a4c57c83813253626916b8c7ada83476", size = 767542, upload-time = "2024-08-06T20:32:31.881Z" },+ { url = "https://files.pythonhosted.org/packages/d4/00/dd137d5bcc7efea1836d6264f049359861cf548469d18da90cd8216cf05f/PyYAML-6.0.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:0833f8694549e586547b576dcfaba4a6b55b9e96098b36cdc7ebefe667dfed48", size = 731164, upload-time = "2024-08-06T20:32:37.083Z" },+ { url = "https://files.pythonhosted.org/packages/c9/1f/4f998c900485e5c0ef43838363ba4a9723ac0ad73a9dc42068b12aaba4e4/PyYAML-6.0.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8b9c7197f7cb2738065c481a0461e50ad02f18c78cd75775628afb4d7137fb3b", size = 756611, upload-time = "2024-08-06T20:32:38.898Z" },+ { url = "https://files.pythonhosted.org/packages/df/d1/f5a275fdb252768b7a11ec63585bc38d0e87c9e05668a139fea92b80634c/PyYAML-6.0.2-cp312-cp312-win32.whl", hash = "sha256:ef6107725bd54b262d6dedcc2af448a266975032bc85ef0172c5f059da6325b4", size = 140591, upload-time = "2024-08-06T20:32:40.241Z" },+ { url = "https://files.pythonhosted.org/packages/0c/e8/4f648c598b17c3d06e8753d7d13d57542b30d56e6c2dedf9c331ae56312e/PyYAML-6.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:7e7401d0de89a9a855c839bc697c079a4af81cf878373abd7dc625847d25cbd8", size = 156338, upload-time = "2024-08-06T20:32:41.93Z" },+ { url = "https://files.pythonhosted.org/packages/ef/e3/3af305b830494fa85d95f6d95ef7fa73f2ee1cc8ef5b495c7c3269fb835f/PyYAML-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba", size = 181309, upload-time = "2024-08-06T20:32:43.4Z" },+ { url = "https://files.pythonhosted.org/packages/45/9f/3b1c20a0b7a3200524eb0076cc027a970d320bd3a6592873c85c92a08731/PyYAML-6.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:50187695423ffe49e2deacb8cd10510bc361faac997de9efef88badc3bb9e2d1", size = 171679, upload-time = "2024-08-06T20:32:44.801Z" },+ { url = "https://files.pythonhosted.org/packages/7c/9a/337322f27005c33bcb656c655fa78325b730324c78620e8328ae28b64d0c/PyYAML-6.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ffe8360bab4910ef1b9e87fb812d8bc0a308b0d0eef8c8f44e0254ab3b07133", size = 733428, upload-time = "2024-08-06T20:32:46.432Z" },+ { url = "https://files.pythonhosted.org/packages/a3/69/864fbe19e6c18ea3cc196cbe5d392175b4cf3d5d0ac1403ec3f2d237ebb5/PyYAML-6.0.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:17e311b6c678207928d649faa7cb0d7b4c26a0ba73d41e99c4fff6b6c3276484", size = 763361, upload-time = "2024-08-06T20:32:51.188Z" },+ { url = "https://files.pythonhosted.org/packages/04/24/b7721e4845c2f162d26f50521b825fb061bc0a5afcf9a386840f23ea19fa/PyYAML-6.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70b189594dbe54f75ab3a1acec5f1e3faa7e8cf2f1e08d9b561cb41b845f69d5", size = 759523, upload-time = "2024-08-06T20:32:53.019Z" },+ { url = "https://files.pythonhosted.org/packages/2b/b2/e3234f59ba06559c6ff63c4e10baea10e5e7df868092bf9ab40e5b9c56b6/PyYAML-6.0.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:41e4e3953a79407c794916fa277a82531dd93aad34e29c2a514c2c0c5fe971cc", size = 726660, upload-time = "2024-08-06T20:32:54.708Z" },+ { url = "https://files.pythonhosted.org/packages/fe/0f/25911a9f080464c59fab9027482f822b86bf0608957a5fcc6eaac85aa515/PyYAML-6.0.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:68ccc6023a3400877818152ad9a1033e3db8625d899c72eacb5a668902e4d652", size = 751597, upload-time = "2024-08-06T20:32:56.985Z" },+ { url = "https://files.pythonhosted.org/packages/14/0d/e2c3b43bbce3cf6bd97c840b46088a3031085179e596d4929729d8d68270/PyYAML-6.0.2-cp313-cp313-win32.whl", hash = "sha256:bc2fa7c6b47d6bc618dd7fb02ef6fdedb1090ec036abab80d4681424b84c1183", size = 140527, upload-time = "2024-08-06T20:33:03.001Z" },+ { url = "https://files.pythonhosted.org/packages/fa/de/02b54f42487e3d3c6efb3f89428677074ca7bf43aae402517bc7cca949f3/PyYAML-6.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:8388ee1976c416731879ac16da0aff3f63b286ffdd57cdeb95f3f2e085687563", size = 156446, upload-time = "2024-08-06T20:33:04.33Z" },+]++[[package]]+name = "requests"+version = "2.34.2"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "certifi" },+ { name = "charset-normalizer" },+ { name = "idna" },+ { name = "urllib3" },+]+sdist = { url = "https://files.pythonhosted.org/packages/ac/c3/e2a2b89f2d3e2179abd6d00ebd70bff6273f37fb3e0cc209f48b39d00cbf/requests-2.34.2.tar.gz", hash = "sha256:f288924cae4e29463698d6d60bc6a4da69c89185ad1e0bcc4104f584e960b9ed", size = 142856, upload-time = "2026-05-14T19:25:27.735Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/a0/f4/c67b0b3f1b9245e8d266f0f112c500d50e5b4e83cb6f3b71b6528104182a/requests-2.34.2-py3-none-any.whl", hash = "sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0", size = 73075, upload-time = "2026-05-14T19:25:26.443Z" },+]++[[package]]+name = "ruamel-yaml"+version = "0.19.1"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/c7/3b/ebda527b56beb90cb7652cb1c7e4f91f48649fbcd8d2eb2fb6e77cd3329b/ruamel_yaml-0.19.1.tar.gz", hash = "sha256:53eb66cd27849eff968ebf8f0bf61f46cdac2da1d1f3576dd4ccee9b25c31993", size = 142709, upload-time = "2026-01-02T16:50:31.84Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/b8/0c/51f6841f1d84f404f92463fc2b1ba0da357ca1e3db6b7fbda26956c3b82a/ruamel_yaml-0.19.1-py3-none-any.whl", hash = "sha256:27592957fedf6e0b62f281e96effd28043345e0e66001f97683aa9a40c667c93", size = 118102, upload-time = "2026-01-02T16:50:29.201Z" },+]++[[package]]+name = "setuptools"+version = "84.0.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/6d/44/f5da03a8ef95d369145c5bb53050e7877c9f3d312e128605fd9504829143/setuptools-84.0.0.tar.gz", hash = "sha256:f4695c21257f0d9b537ec2692c941d02ee143b7cc1276941349a546573b2ef73", size = 1168449, upload-time = "2026-08-08T18:27:58.365Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/95/9c/c510029fc6ef33a6275cd2c5d3cecd6613dfd6aa401d57c54f1c18852ccf/setuptools-84.0.0-py3-none-any.whl", hash = "sha256:51a52592b3b99e102b609654876bd65f19f999935166d1352678931132b0c670", size = 818216, upload-time = "2026-08-08T18:27:56.719Z" },+]++[[package]]+name = "shapely"+version = "2.1.2"+source = { registry = "https://pypi.org/simple" }+resolution-markers = [+ "python_full_version < '3.11' and sys_platform == 'darwin'",+ "python_full_version < '3.11' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "(python_full_version < '3.11' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform != 'darwin' and sys_platform != 'linux')",+]+dependencies = [+ { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" } },+]+sdist = { url = "https://files.pythonhosted.org/packages/4d/bc/0989043118a27cccb4e906a46b7565ce36ca7b57f5a18b78f4f1b0f72d9d/shapely-2.1.2.tar.gz", hash = "sha256:2ed4ecb28320a433db18a5bf029986aa8afcfd740745e78847e330d5d94922a9", size = 315489, upload-time = "2025-09-24T13:51:41.432Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/05/89/c3548aa9b9812a5d143986764dededfa48d817714e947398bdda87c77a72/shapely-2.1.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7ae48c236c0324b4e139bea88a306a04ca630f49be66741b340729d380d8f52f", size = 1825959, upload-time = "2025-09-24T13:50:00.682Z" },+ { url = "https://files.pythonhosted.org/packages/ce/8a/7ebc947080442edd614ceebe0ce2cdbd00c25e832c240e1d1de61d0e6b38/shapely-2.1.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:eba6710407f1daa8e7602c347dfc94adc02205ec27ed956346190d66579eb9ea", size = 1629196, upload-time = "2025-09-24T13:50:03.447Z" },+ { url = "https://files.pythonhosted.org/packages/c8/86/c9c27881c20d00fc409e7e059de569d5ed0abfcec9c49548b124ebddea51/shapely-2.1.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:ef4a456cc8b7b3d50ccec29642aa4aeda959e9da2fe9540a92754770d5f0cf1f", size = 2951065, upload-time = "2025-09-24T13:50:05.266Z" },+ { url = "https://files.pythonhosted.org/packages/50/8a/0ab1f7433a2a85d9e9aea5b1fbb333f3b09b309e7817309250b4b7b2cc7a/shapely-2.1.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:e38a190442aacc67ff9f75ce60aec04893041f16f97d242209106d502486a142", size = 3058666, upload-time = "2025-09-24T13:50:06.872Z" },+ { url = "https://files.pythonhosted.org/packages/bb/c6/5a30ffac9c4f3ffd5b7113a7f5299ccec4713acd5ee44039778a7698224e/shapely-2.1.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:40d784101f5d06a1fd30b55fc11ea58a61be23f930d934d86f19a180909908a4", size = 3966905, upload-time = "2025-09-24T13:50:09.417Z" },+ { url = "https://files.pythonhosted.org/packages/9c/72/e92f3035ba43e53959007f928315a68fbcf2eeb4e5ededb6f0dc7ff1ecc3/shapely-2.1.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:f6f6cd5819c50d9bcf921882784586aab34a4bd53e7553e175dece6db513a6f0", size = 4129260, upload-time = "2025-09-24T13:50:11.183Z" },+ { url = "https://files.pythonhosted.org/packages/42/24/605901b73a3d9f65fa958e63c9211f4be23d584da8a1a7487382fac7fdc5/shapely-2.1.2-cp310-cp310-win32.whl", hash = "sha256:fe9627c39c59e553c90f5bc3128252cb85dc3b3be8189710666d2f8bc3a5503e", size = 1544301, upload-time = "2025-09-24T13:50:12.521Z" },+ { url = "https://files.pythonhosted.org/packages/e1/89/6db795b8dd3919851856bd2ddd13ce434a748072f6fdee42ff30cbd3afa3/shapely-2.1.2-cp310-cp310-win_amd64.whl", hash = "sha256:1d0bfb4b8f661b3b4ec3565fa36c340bfb1cda82087199711f86a88647d26b2f", size = 1722074, upload-time = "2025-09-24T13:50:13.909Z" },+ { url = "https://files.pythonhosted.org/packages/8f/8d/1ff672dea9ec6a7b5d422eb6d095ed886e2e523733329f75fdcb14ee1149/shapely-2.1.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:91121757b0a36c9aac3427a651a7e6567110a4a67c97edf04f8d55d4765f6618", size = 1820038, upload-time = "2025-09-24T13:50:15.628Z" },+ { url = "https://files.pythonhosted.org/packages/4f/ce/28fab8c772ce5db23a0d86bf0adaee0c4c79d5ad1db766055fa3dab442e2/shapely-2.1.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:16a9c722ba774cf50b5d4541242b4cce05aafd44a015290c82ba8a16931ff63d", size = 1626039, upload-time = "2025-09-24T13:50:16.881Z" },+ { url = "https://files.pythonhosted.org/packages/70/8b/868b7e3f4982f5006e9395c1e12343c66a8155c0374fdc07c0e6a1ab547d/shapely-2.1.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:cc4f7397459b12c0b196c9efe1f9d7e92463cbba142632b4cc6d8bbbbd3e2b09", size = 3001519, upload-time = "2025-09-24T13:50:18.606Z" },+ { url = "https://files.pythonhosted.org/packages/13/02/58b0b8d9c17c93ab6340edd8b7308c0c5a5b81f94ce65705819b7416dba5/shapely-2.1.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:136ab87b17e733e22f0961504d05e77e7be8c9b5a8184f685b4a91a84efe3c26", size = 3110842, upload-time = "2025-09-24T13:50:21.77Z" },+ { url = "https://files.pythonhosted.org/packages/af/61/8e389c97994d5f331dcffb25e2fa761aeedfb52b3ad9bcdd7b8671f4810a/shapely-2.1.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:16c5d0fc45d3aa0a69074979f4f1928ca2734fb2e0dde8af9611e134e46774e7", size = 4021316, upload-time = "2025-09-24T13:50:23.626Z" },+ { url = "https://files.pythonhosted.org/packages/d3/d4/9b2a9fe6039f9e42ccf2cb3e84f219fd8364b0c3b8e7bbc857b5fbe9c14c/shapely-2.1.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:6ddc759f72b5b2b0f54a7e7cde44acef680a55019eb52ac63a7af2cf17cb9cd2", size = 4178586, upload-time = "2025-09-24T13:50:25.443Z" },+ { url = "https://files.pythonhosted.org/packages/16/f6/9840f6963ed4decf76b08fd6d7fed14f8779fb7a62cb45c5617fa8ac6eab/shapely-2.1.2-cp311-cp311-win32.whl", hash = "sha256:2fa78b49485391224755a856ed3b3bd91c8455f6121fee0db0e71cefb07d0ef6", size = 1543961, upload-time = "2025-09-24T13:50:26.968Z" },+ { url = "https://files.pythonhosted.org/packages/38/1e/3f8ea46353c2a33c1669eb7327f9665103aa3a8dfe7f2e4ef714c210b2c2/shapely-2.1.2-cp311-cp311-win_amd64.whl", hash = "sha256:c64d5c97b2f47e3cd9b712eaced3b061f2b71234b3fc263e0fcf7d889c6559dc", size = 1722856, upload-time = "2025-09-24T13:50:28.497Z" },+ { url = "https://files.pythonhosted.org/packages/24/c0/f3b6453cf2dfa99adc0ba6675f9aaff9e526d2224cbd7ff9c1a879238693/shapely-2.1.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:fe2533caae6a91a543dec62e8360fe86ffcdc42a7c55f9dfd0128a977a896b94", size = 1833550, upload-time = "2025-09-24T13:50:30.019Z" },+ { url = "https://files.pythonhosted.org/packages/86/07/59dee0bc4b913b7ab59ab1086225baca5b8f19865e6101db9ebb7243e132/shapely-2.1.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ba4d1333cc0bc94381d6d4308d2e4e008e0bd128bdcff5573199742ee3634359", size = 1643556, upload-time = "2025-09-24T13:50:32.291Z" },+ { url = "https://files.pythonhosted.org/packages/26/29/a5397e75b435b9895cd53e165083faed5d12fd9626eadec15a83a2411f0f/shapely-2.1.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:0bd308103340030feef6c111d3eb98d50dc13feea33affc8a6f9fa549e9458a3", size = 2988308, upload-time = "2025-09-24T13:50:33.862Z" },+ { url = "https://files.pythonhosted.org/packages/b9/37/e781683abac55dde9771e086b790e554811a71ed0b2b8a1e789b7430dd44/shapely-2.1.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1e7d4d7ad262a48bb44277ca12c7c78cb1b0f56b32c10734ec9a1d30c0b0c54b", size = 3099844, upload-time = "2025-09-24T13:50:35.459Z" },+ { url = "https://files.pythonhosted.org/packages/d8/f3/9876b64d4a5a321b9dc482c92bb6f061f2fa42131cba643c699f39317cb9/shapely-2.1.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e9eddfe513096a71896441a7c37db72da0687b34752c4e193577a145c71736fc", size = 3988842, upload-time = "2025-09-24T13:50:37.478Z" },+ { url = "https://files.pythonhosted.org/packages/d1/a0/704c7292f7014c7e74ec84eddb7b109e1fbae74a16deae9c1504b1d15565/shapely-2.1.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:980c777c612514c0cf99bc8a9de6d286f5e186dcaf9091252fcd444e5638193d", size = 4152714, upload-time = "2025-09-24T13:50:39.9Z" },+ { url = "https://files.pythonhosted.org/packages/53/46/319c9dc788884ad0785242543cdffac0e6530e4d0deb6c4862bc4143dcf3/shapely-2.1.2-cp312-cp312-win32.whl", hash = "sha256:9111274b88e4d7b54a95218e243282709b330ef52b7b86bc6aaf4f805306f454", size = 1542745, upload-time = "2025-09-24T13:50:41.414Z" },+ { url = "https://files.pythonhosted.org/packages/ec/bf/cb6c1c505cb31e818e900b9312d514f381fbfa5c4363edfce0fcc4f8c1a4/shapely-2.1.2-cp312-cp312-win_amd64.whl", hash = "sha256:743044b4cfb34f9a67205cee9279feaf60ba7d02e69febc2afc609047cb49179", size = 1722861, upload-time = "2025-09-24T13:50:43.35Z" },+ { url = "https://files.pythonhosted.org/packages/c3/90/98ef257c23c46425dc4d1d31005ad7c8d649fe423a38b917db02c30f1f5a/shapely-2.1.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:b510dda1a3672d6879beb319bc7c5fd302c6c354584690973c838f46ec3e0fa8", size = 1832644, upload-time = "2025-09-24T13:50:44.886Z" },+ { url = "https://files.pythonhosted.org/packages/6d/ab/0bee5a830d209adcd3a01f2d4b70e587cdd9fd7380d5198c064091005af8/shapely-2.1.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:8cff473e81017594d20ec55d86b54bc635544897e13a7cfc12e36909c5309a2a", size = 1642887, upload-time = "2025-09-24T13:50:46.735Z" },+ { url = "https://files.pythonhosted.org/packages/2d/5e/7d7f54ba960c13302584c73704d8c4d15404a51024631adb60b126a4ae88/shapely-2.1.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:fe7b77dc63d707c09726b7908f575fc04ff1d1ad0f3fb92aec212396bc6cfe5e", size = 2970931, upload-time = "2025-09-24T13:50:48.374Z" },+ { url = "https://files.pythonhosted.org/packages/f2/a2/83fc37e2a58090e3d2ff79175a95493c664bcd0b653dd75cb9134645a4e5/shapely-2.1.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:7ed1a5bbfb386ee8332713bf7508bc24e32d24b74fc9a7b9f8529a55db9f4ee6", size = 3082855, upload-time = "2025-09-24T13:50:50.037Z" },+ { url = "https://files.pythonhosted.org/packages/44/2b/578faf235a5b09f16b5f02833c53822294d7f21b242f8e2d0cf03fb64321/shapely-2.1.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a84e0582858d841d54355246ddfcbd1fce3179f185da7470f41ce39d001ee1af", size = 3979960, upload-time = "2025-09-24T13:50:51.74Z" },+ { url = "https://files.pythonhosted.org/packages/4d/04/167f096386120f692cc4ca02f75a17b961858997a95e67a3cb6a7bbd6b53/shapely-2.1.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:dc3487447a43d42adcdf52d7ac73804f2312cbfa5d433a7d2c506dcab0033dfd", size = 4142851, upload-time = "2025-09-24T13:50:53.49Z" },+ { url = "https://files.pythonhosted.org/packages/48/74/fb402c5a6235d1c65a97348b48cdedb75fb19eca2b1d66d04969fc1c6091/shapely-2.1.2-cp313-cp313-win32.whl", hash = "sha256:9c3a3c648aedc9f99c09263b39f2d8252f199cb3ac154fadc173283d7d111350", size = 1541890, upload-time = "2025-09-24T13:50:55.337Z" },+ { url = "https://files.pythonhosted.org/packages/41/47/3647fe7ad990af60ad98b889657a976042c9988c2807cf322a9d6685f462/shapely-2.1.2-cp313-cp313-win_amd64.whl", hash = "sha256:ca2591bff6645c216695bdf1614fca9c82ea1144d4a7591a466fef64f28f0715", size = 1722151, upload-time = "2025-09-24T13:50:57.153Z" },+ { url = "https://files.pythonhosted.org/packages/3c/49/63953754faa51ffe7d8189bfbe9ca34def29f8c0e34c67cbe2a2795f269d/shapely-2.1.2-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:2d93d23bdd2ed9dc157b46bc2f19b7da143ca8714464249bef6771c679d5ff40", size = 1834130, upload-time = "2025-09-24T13:50:58.49Z" },+ { url = "https://files.pythonhosted.org/packages/7f/ee/dce001c1984052970ff60eb4727164892fb2d08052c575042a47f5a9e88f/shapely-2.1.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:01d0d304b25634d60bd7cf291828119ab55a3bab87dc4af1e44b07fb225f188b", size = 1642802, upload-time = "2025-09-24T13:50:59.871Z" },+ { url = "https://files.pythonhosted.org/packages/da/e7/fc4e9a19929522877fa602f705706b96e78376afb7fad09cad5b9af1553c/shapely-2.1.2-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:8d8382dd120d64b03698b7298b89611a6ea6f55ada9d39942838b79c9bc89801", size = 3018460, upload-time = "2025-09-24T13:51:02.08Z" },+ { url = "https://files.pythonhosted.org/packages/a1/18/7519a25db21847b525696883ddc8e6a0ecaa36159ea88e0fef11466384d0/shapely-2.1.2-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:19efa3611eef966e776183e338b2d7ea43569ae99ab34f8d17c2c054d3205cc0", size = 3095223, upload-time = "2025-09-24T13:51:04.472Z" },+ { url = "https://files.pythonhosted.org/packages/48/de/b59a620b1f3a129c3fecc2737104a0a7e04e79335bd3b0a1f1609744cf17/shapely-2.1.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:346ec0c1a0fcd32f57f00e4134d1200e14bf3f5ae12af87ba83ca275c502498c", size = 4030760, upload-time = "2025-09-24T13:51:06.455Z" },+ { url = "https://files.pythonhosted.org/packages/96/b3/c6655ee7232b417562bae192ae0d3ceaadb1cc0ffc2088a2ddf415456cc2/shapely-2.1.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:6305993a35989391bd3476ee538a5c9a845861462327efe00dd11a5c8c709a99", size = 4170078, upload-time = "2025-09-24T13:51:08.584Z" },+ { url = "https://files.pythonhosted.org/packages/a0/8e/605c76808d73503c9333af8f6cbe7e1354d2d238bda5f88eea36bfe0f42a/shapely-2.1.2-cp313-cp313t-win32.whl", hash = "sha256:c8876673449f3401f278c86eb33224c5764582f72b653a415d0e6672fde887bf", size = 1559178, upload-time = "2025-09-24T13:51:10.73Z" },+ { url = "https://files.pythonhosted.org/packages/36/f7/d317eb232352a1f1444d11002d477e54514a4a6045536d49d0c59783c0da/shapely-2.1.2-cp313-cp313t-win_amd64.whl", hash = "sha256:4a44bc62a10d84c11a7a3d7c1c4fe857f7477c3506e24c9062da0db0ae0c449c", size = 1739756, upload-time = "2025-09-24T13:51:12.105Z" },+ { url = "https://files.pythonhosted.org/packages/fc/c4/3ce4c2d9b6aabd27d26ec988f08cb877ba9e6e96086eff81bfea93e688c7/shapely-2.1.2-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:9a522f460d28e2bf4e12396240a5fc1518788b2fcd73535166d748399ef0c223", size = 1831290, upload-time = "2025-09-24T13:51:13.56Z" },+ { url = "https://files.pythonhosted.org/packages/17/b9/f6ab8918fc15429f79cb04afa9f9913546212d7fb5e5196132a2af46676b/shapely-2.1.2-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1ff629e00818033b8d71139565527ced7d776c269a49bd78c9df84e8f852190c", size = 1641463, upload-time = "2025-09-24T13:51:14.972Z" },+ { url = "https://files.pythonhosted.org/packages/a5/57/91d59ae525ca641e7ac5551c04c9503aee6f29b92b392f31790fcb1a4358/shapely-2.1.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:f67b34271dedc3c653eba4e3d7111aa421d5be9b4c4c7d38d30907f796cb30df", size = 2970145, upload-time = "2025-09-24T13:51:16.961Z" },+ { url = "https://files.pythonhosted.org/packages/8a/cb/4948be52ee1da6927831ab59e10d4c29baa2a714f599f1f0d1bc747f5777/shapely-2.1.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:21952dc00df38a2c28375659b07a3979d22641aeb104751e769c3ee825aadecf", size = 3073806, upload-time = "2025-09-24T13:51:18.712Z" },+ { url = "https://files.pythonhosted.org/packages/03/83/f768a54af775eb41ef2e7bec8a0a0dbe7d2431c3e78c0a8bdba7ab17e446/shapely-2.1.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:1f2f33f486777456586948e333a56ae21f35ae273be99255a191f5c1fa302eb4", size = 3980803, upload-time = "2025-09-24T13:51:20.37Z" },+ { url = "https://files.pythonhosted.org/packages/9f/cb/559c7c195807c91c79d38a1f6901384a2878a76fbdf3f1048893a9b7534d/shapely-2.1.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:cf831a13e0d5a7eb519e96f58ec26e049b1fad411fc6fc23b162a7ce04d9cffc", size = 4133301, upload-time = "2025-09-24T13:51:21.887Z" },+ { url = "https://files.pythonhosted.org/packages/80/cd/60d5ae203241c53ef3abd2ef27c6800e21afd6c94e39db5315ea0cbafb4a/shapely-2.1.2-cp314-cp314-win32.whl", hash = "sha256:61edcd8d0d17dd99075d320a1dd39c0cb9616f7572f10ef91b4b5b00c4aeb566", size = 1583247, upload-time = "2025-09-24T13:51:23.401Z" },+ { url = "https://files.pythonhosted.org/packages/74/d4/135684f342e909330e50d31d441ace06bf83c7dc0777e11043f99167b123/shapely-2.1.2-cp314-cp314-win_amd64.whl", hash = "sha256:a444e7afccdb0999e203b976adb37ea633725333e5b119ad40b1ca291ecf311c", size = 1773019, upload-time = "2025-09-24T13:51:24.873Z" },+ { url = "https://files.pythonhosted.org/packages/a3/05/a44f3f9f695fa3ada22786dc9da33c933da1cbc4bfe876fe3a100bafe263/shapely-2.1.2-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:5ebe3f84c6112ad3d4632b1fd2290665aa75d4cef5f6c5d77c4c95b324527c6a", size = 1834137, upload-time = "2025-09-24T13:51:26.665Z" },+ { url = "https://files.pythonhosted.org/packages/52/7e/4d57db45bf314573427b0a70dfca15d912d108e6023f623947fa69f39b72/shapely-2.1.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:5860eb9f00a1d49ebb14e881f5caf6c2cf472c7fd38bd7f253bbd34f934eb076", size = 1642884, upload-time = "2025-09-24T13:51:28.029Z" },+ { url = "https://files.pythonhosted.org/packages/5a/27/4e29c0a55d6d14ad7422bf86995d7ff3f54af0eba59617eb95caf84b9680/shapely-2.1.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:b705c99c76695702656327b819c9660768ec33f5ce01fa32b2af62b56ba400a1", size = 3018320, upload-time = "2025-09-24T13:51:29.903Z" },+ { url = "https://files.pythonhosted.org/packages/9f/bb/992e6a3c463f4d29d4cd6ab8963b75b1b1040199edbd72beada4af46bde5/shapely-2.1.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:a1fd0ea855b2cf7c9cddaf25543e914dd75af9de08785f20ca3085f2c9ca60b0", size = 3094931, upload-time = "2025-09-24T13:51:32.699Z" },+ { url = "https://files.pythonhosted.org/packages/9c/16/82e65e21070e473f0ed6451224ed9fa0be85033d17e0c6e7213a12f59d12/shapely-2.1.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:df90e2db118c3671a0754f38e36802db75fe0920d211a27481daf50a711fdf26", size = 4030406, upload-time = "2025-09-24T13:51:34.189Z" },+ { url = "https://files.pythonhosted.org/packages/7c/75/c24ed871c576d7e2b64b04b1fe3d075157f6eb54e59670d3f5ffb36e25c7/shapely-2.1.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:361b6d45030b4ac64ddd0a26046906c8202eb60d0f9f53085f5179f1d23021a0", size = 4169511, upload-time = "2025-09-24T13:51:36.297Z" },+ { url = "https://files.pythonhosted.org/packages/b1/f7/b3d1d6d18ebf55236eec1c681ce5e665742aab3c0b7b232720a7d43df7b6/shapely-2.1.2-cp314-cp314t-win32.whl", hash = "sha256:b54df60f1fbdecc8ebc2c5b11870461a6417b3d617f555e5033f1505d36e5735", size = 1602607, upload-time = "2025-09-24T13:51:37.757Z" },+ { url = "https://files.pythonhosted.org/packages/9a/f6/f09272a71976dfc138129b8faf435d064a811ae2f708cb147dccdf7aacdb/shapely-2.1.2-cp314-cp314t-win_amd64.whl", hash = "sha256:0036ac886e0923417932c2e6369b6c52e38e0ff5d9120b90eef5cd9a5fc5cae9", size = 1796682, upload-time = "2025-09-24T13:51:39.233Z" },+]++[[package]]+name = "shapely"+version = "2.2.0"+source = { registry = "https://pypi.org/simple" }+resolution-markers = [+ "python_full_version >= '3.14' and sys_platform == 'darwin'",+ "python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'darwin'",+ "python_full_version >= '3.14' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version >= '3.12' and python_full_version < '3.14' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version >= '3.14' and sys_platform == 'win32'",+ "python_full_version >= '3.14' and sys_platform == 'emscripten'",+ "(python_full_version >= '3.14' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.14' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux' and sys_platform != 'win32')",+ "python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'win32'",+ "python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'emscripten'",+ "(python_full_version >= '3.12' and python_full_version < '3.14' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux' and sys_platform != 'win32')",+ "python_full_version >= '3.11.5' and python_full_version < '3.12' and sys_platform == 'darwin'",+ "python_full_version >= '3.11' and python_full_version < '3.11.5' and sys_platform == 'darwin'",+ "python_full_version >= '3.11.5' and python_full_version < '3.12' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version >= '3.11' and python_full_version < '3.11.5' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version >= '3.11.5' and python_full_version < '3.12' and sys_platform == 'win32'",+ "python_full_version >= '3.11.5' and python_full_version < '3.12' and sys_platform == 'emscripten'",+ "(python_full_version >= '3.11.5' and python_full_version < '3.12' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.11.5' and python_full_version < '3.12' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux' and sys_platform != 'win32')",+ "python_full_version >= '3.11' and python_full_version < '3.11.5' and sys_platform == 'win32'",+ "python_full_version >= '3.11' and python_full_version < '3.11.5' and sys_platform == 'emscripten'",+ "(python_full_version >= '3.11' and python_full_version < '3.11.5' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.11' and python_full_version < '3.11.5' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux' and sys_platform != 'win32')",+]+dependencies = [+ { name = "numpy", version = "2.3.5", source = { registry = "https://pypi.org/simple" } },+]+sdist = { url = "https://files.pythonhosted.org/packages/f3/ab/924b6e202f796d270a3041a230151f7908db5ea48c74effe6f8023e9bd05/shapely-2.2.0.tar.gz", hash = "sha256:e8865e553d874a1ec4a032057ea81fca9def37b188cd8fb550af3b3480b3f88c", size = 380326, upload-time = "2026-10-07T09:18:01.001Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/a5/43/11bfb01afed47a77540dc4075c7c9ad1ba6323a698fcdb01795df62f55b2/shapely-2.2.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:596b7994ceafa526b6e0522ca29fbc41d19f86459161d6efe1f251d0acd49f3f", size = 1786155, upload-time = "2026-10-07T09:15:56.158Z" },+ { url = "https://files.pythonhosted.org/packages/55/23/e3502c9312e0cd0dcee9e382ad90d0d3039144015b22de87084be20fffec/shapely-2.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7c0b262116bb75b86751440b42e19673911bc0a8f0d5ce723ce294c3d6e4d5c0", size = 1582454, upload-time = "2026-10-07T09:15:58.042Z" },+ { url = "https://files.pythonhosted.org/packages/11/97/dd0ce3bcc03b317298dec0f66e8b404e50cdb126dcb0a27f1c4801371ba5/shapely-2.2.0-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7765e0e5d51d63eae0a911861cbda87165a01677bc9bce6ed20d06858ccde99f", size = 2184352, upload-time = "2026-10-07T09:15:59.87Z" },+ { url = "https://files.pythonhosted.org/packages/dc/20/56289b91914b62a0849de3c1efe5f0cfd5b5d7ba168568567900087615be/shapely-2.2.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5d61088e2ef71dafad0dd4fae8a521cc1f20da4a89d3096bab5b3260b39b3052", size = 2307874, upload-time = "2026-10-07T09:16:01.748Z" },+ { url = "https://files.pythonhosted.org/packages/a4/a8/95a81840efdfc49902cdfceb91e0972563489acda5e92d93bce7fdabea5d/shapely-2.2.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0edec813c81effaf4e20c18b1aa86827925ce27c0315621f2a1a080e22e0de5e", size = 3251822, upload-time = "2026-10-07T09:16:04.238Z" },+ { url = "https://files.pythonhosted.org/packages/ab/f1/23aa57dd931a361d7a77512a32fbaedd2eb62ede201192c2ff391bf1d28a/shapely-2.2.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:8d6ffe94710f37535a47161120cd5f7f0f0d9bb800c2fddebbd089cb7f1b3453", size = 3397542, upload-time = "2026-10-07T09:16:06.52Z" },+ { url = "https://files.pythonhosted.org/packages/9a/8b/b812edc45ab4096d4dd3696e614fbe44207c916da16f26be3fe2305ed4e4/shapely-2.2.0-cp311-cp311-win32.whl", hash = "sha256:ce858295be3947143a3f44f145fa6dbacd5dcc5c4103801d42cd3be4a2034614", size = 1618880, upload-time = "2026-10-07T09:16:08.56Z" },+ { url = "https://files.pythonhosted.org/packages/1f/bc/1b4246004806869c1d420c0a53e97244c9b538a7175e10f5e30012bbeab7/shapely-2.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:806d399418b23eee7241736d572ad1e0b784782f9241d7c8e2cfceb00787831d", size = 1795293, upload-time = "2026-10-07T09:16:10.332Z" },+ { url = "https://files.pythonhosted.org/packages/e7/8b/aa11e4f696fbcda4e06f1a49c95fabe82f28a93265d1b9d0cc2c596f03df/shapely-2.2.0-cp311-cp311-win_arm64.whl", hash = "sha256:5b740c9a197e5feb30bdc6e64a5eb3ca2a7324d11498844136dfc317daac6a99", size = 1880736, upload-time = "2026-10-07T09:16:11.949Z" },+ { url = "https://files.pythonhosted.org/packages/63/af/ac371511dbf0f0a172544a647246f746ceb2b5d12b3e1238224bec3a3796/shapely-2.2.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:626fe4c0d32860a98e75ecffabf5a62254c6168eac96b633ad313cd62a38bb2b", size = 1785072, upload-time = "2026-10-07T09:16:13.707Z" },+ { url = "https://files.pythonhosted.org/packages/02/96/5c48977168f32de067bfafce7f584dd04becf152152bf088636cc034828e/shapely-2.2.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c36ccbff5c3374c349c370bfdac22c7676b268b4a707c98e9031f498965aa02d", size = 1584868, upload-time = "2026-10-07T09:16:15.795Z" },+ { url = "https://files.pythonhosted.org/packages/ae/34/b90723043091161f636fde302e850583dcebd610e798f9edd6e3245f5a2a/shapely-2.2.0-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a9a380624cdd7a7e661bf15a4d1625082766f07ccd2540cb0a9e0df1ad4f6c11", size = 2176960, upload-time = "2026-10-07T09:16:17.965Z" },+ { url = "https://files.pythonhosted.org/packages/ad/87/6842e4c996914a47b6bfd3ef14a543e67e993f86a9ea5679c34efc9314ab/shapely-2.2.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:650a5f4d8a8e3c96982079d8c99b6ddbe6602bbd1e34c75c2b95dbc0d28ac997", size = 2300970, upload-time = "2026-10-07T09:16:20.191Z" },+ { url = "https://files.pythonhosted.org/packages/54/ea/06295d871f0befc3eafa96b7bb87a31e848f042d03ba80c5938b12eb68dd/shapely-2.2.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a851e077f0f02a3383923e02eca5447a29ddbf234e39593b91c8b7ac75218133", size = 3244534, upload-time = "2026-10-07T09:16:22.36Z" },+ { url = "https://files.pythonhosted.org/packages/8b/2a/ab017941b2014f29b8fca233e3f5a75e5fe109a1f27d316ba85d95a515ff/shapely-2.2.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:dc5faa593948aa64d9afae48331b80f43f7aacc68425d99064a4d6772f53f1ad", size = 3391336, upload-time = "2026-10-07T09:16:24.226Z" },+ { url = "https://files.pythonhosted.org/packages/63/ee/4ccaa854f3b7ecd9181920b913c2d2f4b15053331457b7f615139a9774cc/shapely-2.2.0-cp312-cp312-win32.whl", hash = "sha256:da47a0cc9e630b4dff0db46e8972b29d2d27f337425ce9d4c77fd046ce48eabd", size = 1617174, upload-time = "2026-10-07T09:16:26.277Z" },+ { url = "https://files.pythonhosted.org/packages/f6/26/ba9192f0a72c830aa8cc1c61e207ada57cc54b7de81668b1836f575ee717/shapely-2.2.0-cp312-cp312-win_amd64.whl", hash = "sha256:90895df6542ae039fc6557dec6194e3509e883fbd6f5788e3c3e7a38fe46b257", size = 1791280, upload-time = "2026-10-07T09:16:27.94Z" },+ { url = "https://files.pythonhosted.org/packages/8e/92/4e4f93d7b7db9af2a77126c6c96af2c0c422635e2276f5abb533f67b42df/shapely-2.2.0-cp312-cp312-win_arm64.whl", hash = "sha256:7cf5b3a801b9b4febf774efde2e31280e647388deae8452693d8e6420b3a1ff2", size = 1879393, upload-time = "2026-10-07T09:16:29.684Z" },+ { url = "https://files.pythonhosted.org/packages/28/b6/9ba2a62ab6e831b911a248f0752f0f4120be7637a33ab33d8649ed4ede4d/shapely-2.2.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:c037369c35510f51100dd6d386ee3203bac32f164d53e27ca12c3cea5bb643b1", size = 1785102, upload-time = "2026-10-07T09:16:31.662Z" },+ { url = "https://files.pythonhosted.org/packages/e9/8a/d7c11c2d1beef99a4df4183b255ea2d8669f3bcf7d049bb17fe56bf7cd72/shapely-2.2.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:d75957716368f919c63016dae1977a0d007e15f06861cd178701edb91b08d2b0", size = 1584542, upload-time = "2026-10-07T09:16:33.413Z" },+ { url = "https://files.pythonhosted.org/packages/f0/bd/21ed8bfd340455ede2df0d25d896acf4e4bab2ed9b582bb67389e97b2250/shapely-2.2.0-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4ed79beb8d4b6cc7c67780fd381feed25848a5f9b8a2385ac5711eccd115647a", size = 2175369, upload-time = "2026-10-07T09:16:35.507Z" },+ { url = "https://files.pythonhosted.org/packages/5d/df/d67d5c56efddf9b8c2e6913c917c8eca78fdd9e7c6fb73b541dd56b1ce1d/shapely-2.2.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f340e7f99aaee3df5acd6b247cddf723051a7c93d1e1ef09025b80d84e4c0ded", size = 2299018, upload-time = "2026-10-07T09:16:37.246Z" },+ { url = "https://files.pythonhosted.org/packages/58/dd/6e2b5ac83edb4afb540925092feee393a15970216e711a8b211f5abe4478/shapely-2.2.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:17434cb9819c9974c3331333a3b878fa5bf8f85dd69cc3fb7ff5d260f6fbc102", size = 3243663, upload-time = "2026-10-07T09:16:39.093Z" },+ { url = "https://files.pythonhosted.org/packages/0c/dc/7c0461549c212b0d663f99383fe846eb082f4b06cd1fba3bb786b9927d22/shapely-2.2.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:b2338ac40e6652c8bfb857936ea9be9a16f43a362c6f67eb3bad741b05fd5683", size = 3388136, upload-time = "2026-10-07T09:16:41.287Z" },+ { url = "https://files.pythonhosted.org/packages/1c/58/ac8f7de528c125ab41a001523ada72e95e2d5f746917487e723b25e1c5c4/shapely-2.2.0-cp313-cp313-win32.whl", hash = "sha256:40871d7135cd723f965d200181aa28418e9ec029fd85bdd010488259d1c01906", size = 1616372, upload-time = "2026-10-07T09:16:43.094Z" },+ { url = "https://files.pythonhosted.org/packages/25/ed/7fcd625c9796e61d815ca9545d4e44a16f075f83869c1532206de88f23f1/shapely-2.2.0-cp313-cp313-win_amd64.whl", hash = "sha256:1eaa2cb64cdedaf65d6bc86f2819c9cd7d6d68f969aa3ebfdc93743ab581f437", size = 1790191, upload-time = "2026-10-07T09:16:44.852Z" },+ { url = "https://files.pythonhosted.org/packages/23/c9/947fcd5665e1945dd54f6e8890bc6dd04613dd169a5fbb4ba7497754b3a8/shapely-2.2.0-cp313-cp313-win_arm64.whl", hash = "sha256:f79b3b34ad2d067207f21f821489c720b14ce40f3bfda931987a193165f80133", size = 1878351, upload-time = "2026-10-07T09:16:46.656Z" },+ { url = "https://files.pythonhosted.org/packages/eb/a9/83531b7a5349568c507c5701179b1727e21f238af318ac55ba8d0800e764/shapely-2.2.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:000c0ce2a3ba49427e6288b7add9de5d8525d4e65d6ebc8840103040d4d57b86", size = 1785489, upload-time = "2026-10-07T09:16:48.795Z" },+ { url = "https://files.pythonhosted.org/packages/a2/c8/e8117528eb96feafcd5fced50a939ecfdc6242b3782959d202755536bb9e/shapely-2.2.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:0a63e6b68ec785ef3aae3935c4aa9fb8edccced94e23c79d5d85276442c60859", size = 1585345, upload-time = "2026-10-07T09:16:50.527Z" },+ { url = "https://files.pythonhosted.org/packages/53/66/289a7055e3a383680771ba59764712db822fa406bbf52971a76e51d160d6/shapely-2.2.0-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:770d4db5cf0bfeed931a1c4aaf4f4eadad0f43f5fc72c27c88fe1f07904ae767", size = 2177801, upload-time = "2026-10-07T09:16:52.393Z" },+ { url = "https://files.pythonhosted.org/packages/d2/54/8f3d60050a703dcab48f7991ec4fb111772731d20ce6a1bf649465033476/shapely-2.2.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:74f4313af38d6e49ea83532d6cedfb4fe5e6c5485d7c40202bd61b19d6ff09bf", size = 2299593, upload-time = "2026-10-07T09:16:54.462Z" },+ { url = "https://files.pythonhosted.org/packages/cf/ec/3389afd3919494f479347a83db7b5672c3c73a339173426a902d9d295152/shapely-2.2.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:9ee11aeba1759d15a525ded58e17916d3edfa60d52110fd8df6a7609a871f066", size = 3246048, upload-time = "2026-10-07T09:16:56.477Z" },+ { url = "https://files.pythonhosted.org/packages/6f/b5/d0d4e3eaf232425a11be7af1a24aaf9c6792bc7a17dd17d722e42892f91a/shapely-2.2.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:24b175c570efc91d1180ac6cd527dc80e863bb7de37f8b2771703d822c65e023", size = 3389241, upload-time = "2026-10-07T09:16:59.055Z" },+ { url = "https://files.pythonhosted.org/packages/3a/3d/b9626c58982a3cf4278ad978644c7a315968c7e03cd7a8a6aaadde911074/shapely-2.2.0-cp314-cp314-win32.whl", hash = "sha256:4e5830637c080bdc646c5982ad6f7cc296b93038879649f7a6acd8e0f1c4db04", size = 1658287, upload-time = "2026-10-07T09:17:00.857Z" },+ { url = "https://files.pythonhosted.org/packages/0a/c1/b3acc1c764dff7e47485dd47fc7ff5fdc230257f02006fec049bf2b9449c/shapely-2.2.0-cp314-cp314-win_amd64.whl", hash = "sha256:48dd1d961391f314ab7fa8812c86ca2a727bee2bdca1478730eacaea007da18e", size = 1843568, upload-time = "2026-10-07T09:17:02.662Z" },+ { url = "https://files.pythonhosted.org/packages/53/12/3b4977cec6bbaee5d4538d8fbd8ffc75bf764fe3519aafb09d5eefb41daa/shapely-2.2.0-cp314-cp314-win_arm64.whl", hash = "sha256:c4127c064bc71f8b7f9b3f341d6627ed39977fd0b61a17c68d09179f5e0089ae", size = 1936825, upload-time = "2026-10-07T09:17:04.886Z" },+ { url = "https://files.pythonhosted.org/packages/cb/0c/8a8f59e344dc3b53c77d99e35e3eb81b8c46cceeb3ffcd44b41ed8d17d7e/shapely-2.2.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:c2915ae1b858e73d5832be7fb5e89497cc5140fa505da40a45223029dc6deace", size = 1793948, upload-time = "2026-10-07T09:17:07.07Z" },+ { url = "https://files.pythonhosted.org/packages/af/1e/76728b192507909866d7eaa398c9a558d326ca9a7dd14bc929362cce99c9/shapely-2.2.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:74028f468e05e461b30a479b08c1fb5094fa45062abeeec8e7905a6711761436", size = 1596025, upload-time = "2026-10-07T09:17:09.141Z" },+ { url = "https://files.pythonhosted.org/packages/11/be/e4b4219ab6414fe17f60d064693f31d5acd25bd8c98def75c4c2a1108b18/shapely-2.2.0-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6ec5178a39803fa8626322f69d298037f182461dd28e3ae96c2c7a4309a6bf30", size = 2177914, upload-time = "2026-10-07T09:17:11.011Z" },+ { url = "https://files.pythonhosted.org/packages/f4/36/c007a564ddfeda1aff3c79435d4beb2c0baf41b37d1ec212269ef62f8da8/shapely-2.2.0-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:593e51cd04fe1122f1ab3fae87b306c36b2be0184a5e0d9c26849c55ff4580dc", size = 2297494, upload-time = "2026-10-07T09:17:13.089Z" },+ { url = "https://files.pythonhosted.org/packages/cf/74/dd289ba822b8c50a2b47dc70f87a6f4933a6402f5fe4cc5cb999fdf1ea4a/shapely-2.2.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:3575a323b7665d7a2e391b16a626caa6b6f6348f399183aca3fc656febd7cf04", size = 3245678, upload-time = "2026-10-07T09:17:15.165Z" },+ { url = "https://files.pythonhosted.org/packages/04/d8/bd58de9c4f325369bbc7edc4f7cce1a56cfab61e2b1c534176ea58d89db4/shapely-2.2.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:776cc8571d53e42be8fa6d42ad52a599b8e2186dd0c752922831508099af71e2", size = 3387773, upload-time = "2026-10-07T09:17:17.685Z" },+ { url = "https://files.pythonhosted.org/packages/69/4a/6d6e41cab51bb8aa1256ddc28d94d74d016683312e6e0e874afc8b874f3b/shapely-2.2.0-cp314-cp314t-win32.whl", hash = "sha256:f8cd733a66a2a10f461a70dde9fad7b2b62c6a48c7a66cea57ee6f1cd9f2bd2f", size = 1676626, upload-time = "2026-10-07T09:17:19.523Z" },+ { url = "https://files.pythonhosted.org/packages/22/06/6ab21f86fc08aa95b6eb3dc8f8d64701359ce89aae471c15b896e5be5afe/shapely-2.2.0-cp314-cp314t-win_amd64.whl", hash = "sha256:7f68c1fbacab81c0c066d1c3051eeb0f680b7a7a2c511e741f77741640187896", size = 1868388, upload-time = "2026-10-07T09:17:21.376Z" },+ { url = "https://files.pythonhosted.org/packages/07/85/5c0452ee08cfd72b8945ac26fbd5ae559a7af7184aa989a0d83f68f07cf9/shapely-2.2.0-cp314-cp314t-win_arm64.whl", hash = "sha256:9147ebc3b116a0511dca043937f85caf1a41690815643d5b89c8bc472f51c850", size = 1946897, upload-time = "2026-10-07T09:17:23.413Z" },+ { url = "https://files.pythonhosted.org/packages/1d/d0/c994c26df87119e530b715f7109960036242861dba37db17a1b9f44b6e56/shapely-2.2.0-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:715561ceda03b09ca1c6baf9922179392d8c2bc53a1b877965225f0dfb487a58", size = 1785017, upload-time = "2026-10-07T09:17:25.31Z" },+ { url = "https://files.pythonhosted.org/packages/0b/60/2a8975ee00697cb33b17e140def38f2600323760e52eaa6423183a522f06/shapely-2.2.0-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:556f20346a7d96fefbb71b74640d84ca14041703d60f0d2ff47b29d9b3e0093d", size = 1585001, upload-time = "2026-10-07T09:17:27.622Z" },+ { url = "https://files.pythonhosted.org/packages/26/07/45cd192ede49dd821c804fd53177ba5fa2739867ceeb542cfeb259ca4314/shapely-2.2.0-cp315-cp315-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ff9e87b534edf35af65758fafb31ad3b797354cba9323899e263f450c69a2ff2", size = 2177659, upload-time = "2026-10-07T09:17:29.501Z" },+ { url = "https://files.pythonhosted.org/packages/f1/7f/55a7f6ae91c10aa58005e985d01756048b6e4ff82e731ea39003e1eeda3e/shapely-2.2.0-cp315-cp315-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fdb599ec540cea5b635ac47bf24fca4cdfd1c39730ffc0b6cf0d2666b0dd9a33", size = 2299128, upload-time = "2026-10-07T09:17:31.352Z" },+ { url = "https://files.pythonhosted.org/packages/58/2f/49eb352f7c0c0c6ec17bc0bee33f9f449d397f8bfc9c2694c384e752f25e/shapely-2.2.0-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:b8cb04906b74db26f848f76744fa995cd6abeae9145d27cc405277de1f949660", size = 3245354, upload-time = "2026-10-07T09:17:33.291Z" },+ { url = "https://files.pythonhosted.org/packages/1a/c6/3f4f736d615013b2c117cec4d716e775659b2452bb039643c0411d131750/shapely-2.2.0-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:d9b11d712ac72f1d869f2b6964dea5bd9f20b89901adcd796d6712496144ab22", size = 3388587, upload-time = "2026-10-07T09:17:35.261Z" },+ { url = "https://files.pythonhosted.org/packages/27/ea/cb26677d3e34e1663a00a1395fc17c4a2acb5fef638297f94d5cdb9a63f0/shapely-2.2.0-cp315-cp315-win32.whl", hash = "sha256:1af6935acde1db0b6a1bcbea30cbad5ae900723dfd398367ae1488470dc53667", size = 1658324, upload-time = "2026-10-07T09:17:37.362Z" },+ { url = "https://files.pythonhosted.org/packages/14/7d/351c43d812b94197fe279dc3e0defc6886e4be5a144fc191b8635b0fd839/shapely-2.2.0-cp315-cp315-win_amd64.whl", hash = "sha256:96e5101ad2d73df869255bae4c55537f372d32066e2328c376e09841f0f66800", size = 1843506, upload-time = "2026-10-07T09:17:39.336Z" },+ { url = "https://files.pythonhosted.org/packages/82/de/9b62659a23fe8b9d590cf8e4698051d8eab5c5cdddfd86c531019e9d0d2d/shapely-2.2.0-cp315-cp315-win_arm64.whl", hash = "sha256:446b2d5a323bddd1c2a27f41325fdb3a3e8e33c1f8f0f840bdb63e8c1515b29e", size = 1936521, upload-time = "2026-10-07T09:17:41.121Z" },+ { url = "https://files.pythonhosted.org/packages/91/c9/5e16b2ac8853ec587406496a85cbeb1f3465b53c5e8bf0f222b4a39a44a1/shapely-2.2.0-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:c88b21a0e9599ebb741e08f71a95c8f07a434af909efb088828a9874d234d06d", size = 1792605, upload-time = "2026-10-07T09:17:43.211Z" },+ { url = "https://files.pythonhosted.org/packages/19/87/ebaf70f25565ed82d75ab84b1d0eb3a8b803302020c16bb98234f67c0477/shapely-2.2.0-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:cbe184e1946cfe115a9dfeadd2effd88ab4a237ab1a4335d106defa80fbc2d82", size = 1594776, upload-time = "2026-10-07T09:17:44.972Z" },+ { url = "https://files.pythonhosted.org/packages/e6/a1/e6210ff8aa7d065c2a94d2a3486342675bcb3f4d740ec686a414ace0c3b9/shapely-2.2.0-cp315-cp315t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8bc985ad731da2f2cedde9c3cfb3c3d946fe6fc63d2ca557673dc33dd1e389b9", size = 2175890, upload-time = "2026-10-07T09:17:46.92Z" },+ { url = "https://files.pythonhosted.org/packages/96/19/4df2a474cdc24beb06ef557d433dbe936fa274600d4846ea19877ae47094/shapely-2.2.0-cp315-cp315t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c3caa4c6308e7eaf18f4661134a1575eb290a56df78d0ae1b02f919a4cc7bd9d", size = 2296432, upload-time = "2026-10-07T09:17:48.895Z" },+ { url = "https://files.pythonhosted.org/packages/c5/29/2b38bbe8b9b2dba0838b7718819e8751490e3d946cff232049d0e707f98e/shapely-2.2.0-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:2fd87e55d7a7d310553b527378545cdc6ef8702473ed9294926b892c3cfb2ba0", size = 3243397, upload-time = "2026-10-07T09:17:50.885Z" },+ { url = "https://files.pythonhosted.org/packages/e8/1c/5430d8d6559c944ac673984f25989121abfd2bac4254ec3fff1d7673b7bc/shapely-2.2.0-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:7416db8ff3a1003687d4118e741343b3cf9ac2a4a925a59d44d98a865ac4e9e7", size = 3386299, upload-time = "2026-10-07T09:17:52.969Z" },+ { url = "https://files.pythonhosted.org/packages/5b/00/feaeb392e96063717387ec09e6c8e38b29fe4088ddfe976470255c69792e/shapely-2.2.0-cp315-cp315t-win32.whl", hash = "sha256:778421a19085bef1fb38bc0699db1ee9b08fdd0e30a8768788d601a4371f2de0", size = 1675823, upload-time = "2026-10-07T09:17:55.022Z" },+ { url = "https://files.pythonhosted.org/packages/0e/30/0b77618f33fecbc2209c767cecca58bbf83947fc0018571542bf2b859865/shapely-2.2.0-cp315-cp315t-win_amd64.whl", hash = "sha256:287ec7602f7a114b862ae0123880e57160cebe059843a4c7028aaee9e74287f6", size = 1866197, upload-time = "2026-10-07T09:17:56.991Z" },+ { url = "https://files.pythonhosted.org/packages/06/2b/9837e94408335520f778b09067fced0a5d4b2feffa5ebf7119412eb18b00/shapely-2.2.0-cp315-cp315t-win_arm64.whl", hash = "sha256:e414c78bc81aadd76a429111a350f4ef3d05fc13019805617b524951258468e5", size = 1945749, upload-time = "2026-10-07T09:17:59.116Z" },+]++[[package]]+name = "six"+version = "1.17.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81", size = 34031, upload-time = "2024-12-04T17:35:28.174Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", size = 11050, upload-time = "2024-12-04T17:35:26.475Z" },+]++[[package]]+name = "soupsieve"+version = "2.10"+source = { registry = "https://pypi.org/simple" }+resolution-markers = [+ "python_full_version >= '3.11' and python_full_version < '3.11.5' and sys_platform == 'darwin'",+ "python_full_version >= '3.11' and python_full_version < '3.11.5' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version >= '3.11' and python_full_version < '3.11.5' and sys_platform == 'win32'",+ "python_full_version >= '3.11' and python_full_version < '3.11.5' and sys_platform == 'emscripten'",+ "(python_full_version >= '3.11' and python_full_version < '3.11.5' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.11' and python_full_version < '3.11.5' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux' and sys_platform != 'win32')",+ "python_full_version < '3.11' and sys_platform == 'darwin'",+ "python_full_version < '3.11' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "(python_full_version < '3.11' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version < '3.11' and sys_platform != 'darwin' and sys_platform != 'linux')",+]+sdist = { url = "https://files.pythonhosted.org/packages/71/c3/1b817965ac12dc002d7c9cd7dfffdd7d4fbf9b45763ef2ffe7b86ee94670/soupsieve-2.10.tar.gz", hash = "sha256:49e9380d7d2905463583bafe285e818c7366a9ed7b3aee221c1ac79c905d8bc0", size = 124337, upload-time = "2026-09-24T02:36:35.048Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/66/87/5ed59e1d0290564e2027ed066c52b059892c4637741337fc0967183c8d4d/soupsieve-2.10-py3-none-any.whl", hash = "sha256:8596eb8967d744174820280fa62b4542a2e955bfaccca73ed8a13c6eb8e9b502", size = 38019, upload-time = "2026-09-24T02:36:33.709Z" },+]++[[package]]+name = "soupsieve"+version = "3.0.3"+source = { registry = "https://pypi.org/simple" }+resolution-markers = [+ "python_full_version >= '3.14' and sys_platform == 'darwin'",+ "python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'darwin'",+ "python_full_version >= '3.14' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version >= '3.12' and python_full_version < '3.14' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version >= '3.14' and sys_platform == 'win32'",+ "python_full_version >= '3.14' and sys_platform == 'emscripten'",+ "(python_full_version >= '3.14' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.14' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux' and sys_platform != 'win32')",+ "python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'win32'",+ "python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'emscripten'",+ "(python_full_version >= '3.12' and python_full_version < '3.14' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux' and sys_platform != 'win32')",+ "python_full_version >= '3.11.5' and python_full_version < '3.12' and sys_platform == 'darwin'",+ "python_full_version >= '3.11.5' and python_full_version < '3.12' and platform_machine == 'aarch64' and sys_platform == 'linux'",+ "python_full_version >= '3.11.5' and python_full_version < '3.12' and sys_platform == 'win32'",+ "python_full_version >= '3.11.5' and python_full_version < '3.12' and sys_platform == 'emscripten'",+ "(python_full_version >= '3.11.5' and python_full_version < '3.12' and platform_machine != 'aarch64' and sys_platform == 'linux') or (python_full_version >= '3.11.5' and python_full_version < '3.12' and sys_platform != 'darwin' and sys_platform != 'emscripten' and sys_platform != 'linux' and sys_platform != 'win32')",+]+sdist = { url = "https://files.pythonhosted.org/packages/5e/77/2dcfa996b01702ab8fd0763d84098f6a640d6162a328f1c04c2697579a1a/soupsieve-3.0.3.tar.gz", hash = "sha256:7dcf6022eed0399eb9934a75e020148f7a2024c37b7dfcd3cf2c5505d69c364e", size = 115923, upload-time = "2026-10-12T13:21:17.696Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/49/ca/f639c80449997b88aba7bc9705d25dd76cc0844f45f187862fd8f8bb18fa/soupsieve-3.0.3-py3-none-any.whl", hash = "sha256:fa30e3ba4809cb81ce1f3209f2fbe3e779fc445f0439bc147a0d7c4601743f21", size = 41705, upload-time = "2026-10-12T13:21:16.474Z" },+]++[[package]]+name = "tomli"+version = "2.5.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/b0/78/9ad63712633ed3ab5cc1a648d863d7e7da371e9425e209555a0fe711b695/tomli-2.5.0.tar.gz", hash = "sha256:264507556cd8b8c8e7c6ee037cdf443a463f03f4c958e57195e3d369711b8ff6", size = 17662, upload-time = "2026-10-07T12:23:37.892Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/22/a6/ab99b60ee52acd949684febabc3005d0045d0f66bebd9cdebd67372d26dd/tomli-2.5.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c4dc1c1781f2f716de763d1e9a7b34c6a894e167e291c7c5d16c72f7a9538545", size = 163901, upload-time = "2026-10-07T12:22:15.601Z" },+ { url = "https://files.pythonhosted.org/packages/bc/00/ee01b7ed4579180fff07142d290257f25ba786f23f3ec6005f620933c2f5/tomli-2.5.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:eff8babca5a7999bc137acbc7482a8b7e17ffca5075ab41f5d770ab408c7bfef", size = 163756, upload-time = "2026-10-07T12:22:16.957Z" },+ { url = "https://files.pythonhosted.org/packages/72/c2/4efebf65372f6583185f79799312109dddb61102d47e5c33dcfd1a297aca/tomli-2.5.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:86665cee9c4835b7a7f1e8ec2c719b5258d4dc782887aded5a8ae7352a96843b", size = 268038, upload-time = "2026-10-07T12:22:18.135Z" },+ { url = "https://files.pythonhosted.org/packages/53/07/5850468e925d898abb36038666f9c333a94d2a223e802a8ba5b6d319d23f/tomli-2.5.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d7e369fd63331746182360977b1892bfc215476a30d61612d732425311639f56", size = 276422, upload-time = "2026-10-07T12:22:19.567Z" },+ { url = "https://files.pythonhosted.org/packages/b4/87/f293984cdcf83c054196d4fd3dad44fc68ae55b4b8c44bc76cef360c3150/tomli-2.5.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:7ad1ea345759240d6463efa0ed1c704402752e49aa21476620738d74d72d8aa1", size = 272616, upload-time = "2026-10-07T12:22:20.794Z" },+ { url = "https://files.pythonhosted.org/packages/ce/ce/db582886b3c1219d3fec93ebd669332482e5aee7a91e0f7838d84f2d1759/tomli-2.5.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:96243987194634bd411066ce40c952e108f86af04db533ecd8ac3ff2a85b1885", size = 276593, upload-time = "2026-10-07T12:22:22.12Z" },+ { url = "https://files.pythonhosted.org/packages/bf/72/7619b87dea4261fc27dd7b54c4461c129c1f7d9bb7ba3aec89c797a431b8/tomli-2.5.0-cp311-cp311-win32.whl", hash = "sha256:610b27d99f28ec5f191c7064a48f3ddb179a1fe6ca73d571483ae859f57b605e", size = 101830, upload-time = "2026-10-07T12:22:23.651Z" },+ { url = "https://files.pythonhosted.org/packages/1e/74/220106da34502304b6751a2a9b8a9fbca6c3fd47e737a2e2e3da7c61c9db/tomli-2.5.0-cp311-cp311-win_amd64.whl", hash = "sha256:c804ae44fe7b4bab5da295e4f980a1ff04670bca9d23fe0a4e887e08ebd741a8", size = 112742, upload-time = "2026-10-07T12:22:24.972Z" },+ { url = "https://files.pythonhosted.org/packages/27/99/7d9c8b41837a7773613e169504147375c157a290167aa59ad74a085f521f/tomli-2.5.0-cp311-cp311-win_arm64.whl", hash = "sha256:cfac177ebd6236003846ea339981f71457cb6eb748f23381eb257e45092e3980", size = 109332, upload-time = "2026-10-07T12:22:26.117Z" },+ { url = "https://files.pythonhosted.org/packages/52/ed/7baa86f87493646a594de388c7c1c40a39dd0461f7e9c0359cbeefc91fe8/tomli-2.5.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:1f4a40d03fb9f63424f0979855bdeaf44dd7696b8d59501822c10ed30ba532df", size = 164854, upload-time = "2026-10-07T12:22:27.444Z" },+ { url = "https://files.pythonhosted.org/packages/a5/b1/44c0341f2224397855723c7a8a39f718ea6fcbcc3dacc66e5aeca0f334e3/tomli-2.5.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:9ebf8d19b17bd0daeb7b7dec81a946a439b753942fd0210d6e96c532249eea6b", size = 164074, upload-time = "2026-10-07T12:22:28.679Z" },+ { url = "https://files.pythonhosted.org/packages/23/04/e2d5b7d3fba47adedb23de616c16d428ea076c79a3d8e1d95d649ffe197e/tomli-2.5.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bf0b5e8e0f68ebb494356e577c06c139161efd8d3b9050f93b39b7c26cc54ff0", size = 274274, upload-time = "2026-10-07T12:22:29.804Z" },+ { url = "https://files.pythonhosted.org/packages/43/90/6090e706ff27a6f89f4a40578e3324b95c3cd8c4150868aabf33a8f414c3/tomli-2.5.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6cf74416bdc94ae458b14e37286c1073081850ac8459a00d0c5efef5d44294c6", size = 286435, upload-time = "2026-10-07T12:22:31.297Z" },+ { url = "https://files.pythonhosted.org/packages/0a/9e/a2c40768df16c408f22430afb0a73e9d7e5f79c950884954649d1146b74d/tomli-2.5.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:61ea1ebe1e55a34ea8199cc8dbff398d35027b82271c8ac4802fd3a1fd5b1bcc", size = 278119, upload-time = "2026-10-07T12:22:32.601Z" },+ { url = "https://files.pythonhosted.org/packages/12/25/3c0cb485b98e9cfac495629b1c93c87ccf0b72fbe9d2689fd8fe62c6d5a3/tomli-2.5.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ed53f7e89bb04f6d9e8e7799112360b0c4d5cbff067de0814c98c37c39b920f7", size = 286177, upload-time = "2026-10-07T12:22:33.745Z" },+ { url = "https://files.pythonhosted.org/packages/77/8b/0144c65f0e37e51c18d04ae15c21b19431c165002d0131fe9aa8b0b8b1e8/tomli-2.5.0-cp312-cp312-win32.whl", hash = "sha256:e7ad033e27a516a233bea839cdb77b80146facb3b4f40bf02cd0cac165cdd5c2", size = 102760, upload-time = "2026-10-07T12:22:34.887Z" },+ { url = "https://files.pythonhosted.org/packages/de/32/5d6d8f42fc9a05fce69354e00ff256484192f5f2fc9a2165718fa0de61ec/tomli-2.5.0-cp312-cp312-win_amd64.whl", hash = "sha256:bd05de8c1698f8413dd7d869492693a0bf2211543b787ac78cd5e7536af1a6d7", size = 112722, upload-time = "2026-10-07T12:22:36.162Z" },+ { url = "https://files.pythonhosted.org/packages/30/65/df18032218db0fb9b769fb23c8039a051f15c811993995ea04c350273a32/tomli-2.5.0-cp312-cp312-win_arm64.whl", hash = "sha256:069435bd5480429b98c5e5afb02ab21c219b6f0064680671c6dc0d46817346ea", size = 109534, upload-time = "2026-10-07T12:22:37.296Z" },+ { url = "https://files.pythonhosted.org/packages/42/e5/51736d70da209350969e15aca5c5ab6e2ce1ea87a0a892a6c13aec172a86/tomli-2.5.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:943276cf269e0071948d9ff697159c1735e623c1151d88abb09b74659ef0cbea", size = 163328, upload-time = "2026-10-07T12:22:38.373Z" },+ { url = "https://files.pythonhosted.org/packages/ec/55/086f80dab4ab497602644274e6dea7ec5dd0b4e262e443a8ad3bb7edee2d/tomli-2.5.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:463b16086865b97facd8d0b3fb4cb7c544e3f58d2a69dc3113d6db9653fdb043", size = 162246, upload-time = "2026-10-07T12:22:39.673Z" },+ { url = "https://files.pythonhosted.org/packages/aa/eb/3ecc94459f3635c92321f4e7bde571323fdb2267c50e19e3188a281eae3b/tomli-2.5.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1245a6638fc4bb0a60af38a7d45413db34a13842027c77597c712c998c62fdf0", size = 272655, upload-time = "2026-10-07T12:22:41.08Z" },+ { url = "https://files.pythonhosted.org/packages/c0/d7/494fd1f0c37a621f1ad9975c2efadb523e8101f144ed6edb2e7fe64738f2/tomli-2.5.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5d8bac3d603c97e6854424e5b2b5b741bdbde387e09f162fb0446812b4a8362b", size = 283595, upload-time = "2026-10-07T12:22:42.222Z" },+ { url = "https://files.pythonhosted.org/packages/70/51/bb8d62b1317e6640866f6949b2d5855e5300f2c99d46de1cd245570bba65/tomli-2.5.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:21e4cae4114aba25aa0d4f85cdf486d290fb35c0954d7bba536248da64d43066", size = 276253, upload-time = "2026-10-07T12:22:43.625Z" },+ { url = "https://files.pythonhosted.org/packages/66/f4/f46bd7f0763cd47de2db697dca9257c6a4adfd1a93b018cc75c8190ed5a8/tomli-2.5.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:bbaefc84548d754be821bba7c4141c4787dda182f9e77f2f87b71213529efa7b", size = 283582, upload-time = "2026-10-07T12:22:44.983Z" },+ { url = "https://files.pythonhosted.org/packages/ac/03/70f2bcb2923a6db37818d917e124270a7f4cfd38ea576f5aa753a91c0ef5/tomli-2.5.0-cp313-cp313-win32.whl", hash = "sha256:abdbf6313b8d9efe157edeb7ab6eae4de064b1300ad31abf73755154b30abe68", size = 102628, upload-time = "2026-10-07T12:22:46.508Z" },+ { url = "https://files.pythonhosted.org/packages/dc/98/d52024bb5b0ff68b4f0d276d867f634c84a67319a7e9f6b7708a37742333/tomli-2.5.0-cp313-cp313-win_amd64.whl", hash = "sha256:fd4dc129784e0c5335bd4e61dfcc4487499a013419e655cf2da1d091b7e0efdc", size = 113301, upload-time = "2026-10-07T12:22:47.647Z" },+ { url = "https://files.pythonhosted.org/packages/6f/f2/540db3a70572a8c23a28aba3e9c358ce0ffffbafc990905c1343aa265b31/tomli-2.5.0-cp313-cp313-win_arm64.whl", hash = "sha256:69491c143d2fe063046e0301e62a810bed338fa4d1ce0fd870c27dc1e09b0d84", size = 109744, upload-time = "2026-10-07T12:22:48.925Z" },+ { url = "https://files.pythonhosted.org/packages/e4/49/caf6b307766eb9567664a8707e9d6be5fcc0e8903f18781c6677a60d80c7/tomli-2.5.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:d3182ee2d887e507bd67319a0a61105d1dd33facc111329559a233b772c1a105", size = 162899, upload-time = "2026-10-07T12:22:50.088Z" },+ { url = "https://files.pythonhosted.org/packages/d3/c8/68cfce773a2733a49c74f99d627fb461bd990756860099eac25617889585/tomli-2.5.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:521345fd1f19d45b8df87657aaa38b6f2ca3800059fadf428e7ebf479a383646", size = 162080, upload-time = "2026-10-07T12:22:51.558Z" },+ { url = "https://files.pythonhosted.org/packages/7e/b2/e5bb8651fdad593f670501a7d718b1a7f73f064d44dea15e04c04dfef45d/tomli-2.5.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6e95c7614e705bfe2b04b27aa124adec59752d15813df37e2156747cab3a006b", size = 273380, upload-time = "2026-10-07T12:22:52.918Z" },+ { url = "https://files.pythonhosted.org/packages/8d/d2/9e2d7f8b1dfe0e2b34c245986ebd55c4c553ea4ce6c47c443b332673253f/tomli-2.5.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7ac2027d37c3afbdf4bdd377f2676f6f1d2122a5be1f1137b49dced590b37e75", size = 283228, upload-time = "2026-10-07T12:22:54.173Z" },+ { url = "https://files.pythonhosted.org/packages/ba/df/ec7b876b7b1a2718bd74a3743c076fff565b04029ba33e8f61fac262739f/tomli-2.5.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:c414be4ed9d3cac80c42e348fa5a956117d1a48227f48026e31f59cb4a7671eb", size = 277189, upload-time = "2026-10-07T12:22:55.342Z" },+ { url = "https://files.pythonhosted.org/packages/7d/7b/e192d9eed0b9cb80da799f4d77052297fb9a2c3cc9b19f571f56ea88add6/tomli-2.5.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:9b03d7dc168353b4132965bde20feceabaa470e570c6f59660dfae59b1f9eeb3", size = 283632, upload-time = "2026-10-07T12:22:56.735Z" },+ { url = "https://files.pythonhosted.org/packages/84/50/ff94454e75461d75623e47401ed323d65c10aab8fe9033242c20cd2fdf32/tomli-2.5.0-cp314-cp314-win32.whl", hash = "sha256:6f041843c4d3a37245c0c056fd955b186bf8b1fb85690cbe40b81230891dc34b", size = 103535, upload-time = "2026-10-07T12:22:58.084Z" },+ { url = "https://files.pythonhosted.org/packages/54/0b/bdacf05f963bd6026ebf6eeb0beda847d1d60e03e440725c64a4e08a0afd/tomli-2.5.0-cp314-cp314-win_amd64.whl", hash = "sha256:f4b653094e18f9031102d3a1da5c729c8f222d85225b18037dac621695e46e1a", size = 114621, upload-time = "2026-10-07T12:22:59.2Z" },+ { url = "https://files.pythonhosted.org/packages/61/99/53f438fa6ae4f9d4ed0ddde3e7242b3bdc34b48c8f9948b72b9e9b127676/tomli-2.5.0-cp314-cp314-win_arm64.whl", hash = "sha256:3f89d10c1ff6a38d992c27fc8a4816af71a909e08a40ec66934240b1e74347c3", size = 111572, upload-time = "2026-10-07T12:23:00.479Z" },+ { url = "https://files.pythonhosted.org/packages/b9/20/1f88f19427d380a40e90a770e087489eaafe4aeee070ae88ed2bbec00acd/tomli-2.5.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:e9e15b4a6c7dd6b85b5fbab29488a73f1f70de516942308daa266bf0e0aeb0d4", size = 171814, upload-time = "2026-10-07T12:23:01.914Z" },+ { url = "https://files.pythonhosted.org/packages/d0/56/cbe5079c9f9a54b9b3e27fc82f08f3cb36edee75561679f53d2380c801d6/tomli-2.5.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:e12bbcd32897272fb05929110362ae9ff4c1b9bb26bd9e971e71dcd3275b4c3d", size = 171324, upload-time = "2026-10-07T12:23:03.18Z" },+ { url = "https://files.pythonhosted.org/packages/2b/30/1d53fd3b0f1cb3ba542e345ec32c26aefdddc4e829e4f3429af8a4f27782/tomli-2.5.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:20aa36de8f2cf87237143bc1fa1aae8d6612c09118f4da21c6a684db5dd1f6f9", size = 297441, upload-time = "2026-10-07T12:23:04.345Z" },+ { url = "https://files.pythonhosted.org/packages/66/d9/0800acb6a111686f764c1b91ef15cc42a20a66a46013bb42220f1d2c61c1/tomli-2.5.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:22185fad8a1e622f064e78008018a0dd3323550dcb479cb7a1d296888d74024f", size = 307476, upload-time = "2026-10-07T12:23:05.671Z" },+ { url = "https://files.pythonhosted.org/packages/e8/63/30a8f3cd51b5bec37f04744bad0b0dc6160df84aad4f27b0e9283d66f221/tomli-2.5.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:984012f71908165449a951de2050d52f276bfe3aa5d5f570f63ddad814370374", size = 296113, upload-time = "2026-10-07T12:23:07.202Z" },+ { url = "https://files.pythonhosted.org/packages/ab/18/0b9ffc597e69c5a1e20a7823cb60d54b39a9f54e91edcb8574f022186758/tomli-2.5.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:f79203b3965b4000e91808aaa7c040206093f2b8bf86f455982f2274c9ccf442", size = 307725, upload-time = "2026-10-07T12:23:08.508Z" },+ { url = "https://files.pythonhosted.org/packages/ab/c7/18f8baae0b5607a60e8e19b4a7fedee43a8ff6458e3896dcbbadeeac9c22/tomli-2.5.0-cp314-cp314t-win32.whl", hash = "sha256:91294a9fb94a75542f6e46e4a2ae709bd8d9b51134098cae5cf3bea5478b6d03", size = 108546, upload-time = "2026-10-07T12:23:09.956Z" },+ { url = "https://files.pythonhosted.org/packages/72/34/4cca9739254130627bde87500b3f2b512154fe2f278efa7e2a5e10ad4bcb/tomli-2.5.0-cp314-cp314t-win_amd64.whl", hash = "sha256:f15e3e0b835a6d68b10c86bf80a3149780498d6911c93c3ffd1861d19f9200f1", size = 117814, upload-time = "2026-10-07T12:23:11.486Z" },+ { url = "https://files.pythonhosted.org/packages/7d/fb/afa530d47dd80a78fce43beac6bc6e00f84558eafcffbc6f37b21e80d056/tomli-2.5.0-cp314-cp314t-win_arm64.whl", hash = "sha256:6664b7ae7af7294256c53960a6103077f4914cec8ff98479c352f622c6f6b2f0", size = 115188, upload-time = "2026-10-07T12:23:12.728Z" },+ { url = "https://files.pythonhosted.org/packages/66/98/316fdc00f8c0939e6fe50461dd343c162d3ad51d1286eb25b7db54361d50/tomli-2.5.0-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:a525685c2f97da40762b8695eb7aa0af4c8344ca1905c73e4e29cb04d34607dc", size = 162775, upload-time = "2026-10-07T12:23:13.941Z" },+ { url = "https://files.pythonhosted.org/packages/c5/22/7b10fa5bb01c9539f53f69b619361b19350acc73657772ea7ac70ba309a8/tomli-2.5.0-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:9dbb18c1cfb2f6517942fc9314437f66aa06d94436ffb1f06102ef3572f35276", size = 161406, upload-time = "2026-10-07T12:23:15.215Z" },+ { url = "https://files.pythonhosted.org/packages/9c/e7/1a069d86dfd20f1f84f71c63faed9f83c1d890bc06c27d82dc7d888fb573/tomli-2.5.0-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:752e8b1aa6a4367ef8bf6a1a1e005540f7ed055ba36d7193796812ca5404eb52", size = 273855, upload-time = "2026-10-07T12:23:16.471Z" },+ { url = "https://files.pythonhosted.org/packages/ae/83/d1ef43d1687d092ab9c235455c76e6e709483b346b056f086095c7c263a5/tomli-2.5.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c47300f9bf791808f77d82747691c4bb09cb14bdf3060cca99b42cdc4361d5a7", size = 284910, upload-time = "2026-10-07T12:23:18.166Z" },+ { url = "https://files.pythonhosted.org/packages/cc/05/f4d9cf7de61822ece0c3873f30d291e324911c71a378b8bfe5ced13fd9f5/tomli-2.5.0-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:19b0dd8749f4ea2f112c5fcfb3c5248390c899d7e2e173f1d91abee1fa0ff391", size = 277723, upload-time = "2026-10-07T12:23:19.355Z" },+ { url = "https://files.pythonhosted.org/packages/42/28/78262493141fa543151cf005760c3cb01d09fc28a11f993c05109902cb8c/tomli-2.5.0-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:57b1c3b01fab802e2899bc3d168dca320e14165e2fd9fd584760fb4ca5826859", size = 285115, upload-time = "2026-10-07T12:23:20.698Z" },+ { url = "https://files.pythonhosted.org/packages/1a/b9/e1dab9a30bcb677b5cc5cee810609cfd64f24306a3055767dd3fda00b1e0/tomli-2.5.0-cp315-cp315-win32.whl", hash = "sha256:667e521b37a6c5ccaa044202c235b530f90177ffe2cd4a64ecc213c7dd535feb", size = 103475, upload-time = "2026-10-07T12:23:21.941Z" },+ { url = "https://files.pythonhosted.org/packages/4c/bd/31a3790c11d6ea95fcf5e6022ac0f8d0543c9b61120b730fc481bd43d3b4/tomli-2.5.0-cp315-cp315-win_amd64.whl", hash = "sha256:d747252933c8a65ef6bd8da0fbb7ce28a90eb6119d8cd00772cd528aa07b68d5", size = 114589, upload-time = "2026-10-07T12:23:23.098Z" },+ { url = "https://files.pythonhosted.org/packages/47/a2/4f6310fa699364f0e3af7ee3af88dddd9af066d33e716a0265bbe2b3ea84/tomli-2.5.0-cp315-cp315-win_arm64.whl", hash = "sha256:75dbcde8751b0a960aa3de173aa5e894d590755c6d7758b7e774c06f1dc3cbdd", size = 111493, upload-time = "2026-10-07T12:23:24.233Z" },+ { url = "https://files.pythonhosted.org/packages/68/14/00853f0b396d8971107ae1921bb5b322fdee1650d2f16bf06c20adb532e5/tomli-2.5.0-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:2419c2a189551987b59d80e63ec355671283336f41c6b9b89462df679c7d0c57", size = 171380, upload-time = "2026-10-07T12:23:25.512Z" },+ { url = "https://files.pythonhosted.org/packages/89/ad/fa6949321dadee46b27363974fb197b94c911c3b0f7a5fd26d7dc18fc2a0/tomli-2.5.0-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:0dc598040da8d42cf20f0be588ed7004f46db12a0ac6c32e03a59dccedaaadcd", size = 170553, upload-time = "2026-10-07T12:23:26.855Z" },+ { url = "https://files.pythonhosted.org/packages/53/aa/3056c919eb3e084df3752b2cf5f865dcc04af0b27dba2f66d7b28af4633a/tomli-2.5.0-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:49096930c8d886c9bbdab62d2d0d17ce823ddeea522309a190b36245d5b49e01", size = 294428, upload-time = "2026-10-07T12:23:28.132Z" },+ { url = "https://files.pythonhosted.org/packages/96/b2/faeeb5d8769ea3832021d73e892c8391eae7b4b4f8b55a789127bd8b18a9/tomli-2.5.0-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b8ade5023067f99fe72b88accd30d0ea05a158e9e32a11f124e731ea9695313f", size = 304909, upload-time = "2026-10-07T12:23:29.381Z" },+ { url = "https://files.pythonhosted.org/packages/f6/52/f094c09e73fb654b621716d019acb5d29bdfd1be01df80c281d552bda48d/tomli-2.5.0-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:b69564772b5c8f22ea5f498dff08cfa825045b4d4c4400529000bdf818aa3b2a", size = 293220, upload-time = "2026-10-07T12:23:30.608Z" },+ { url = "https://files.pythonhosted.org/packages/86/f5/0c30541078ca4b505ce3bd76ed931facbfec524dd018535d691d1af0a6d2/tomli-2.5.0-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:8ff3a2ca028c7eee0c777f9a092038d0a594a9fa04e215f929a22c329e2cb142", size = 305705, upload-time = "2026-10-07T12:23:32.181Z" },+ { url = "https://files.pythonhosted.org/packages/05/74/590e7d19d6a118fc5cc5704ff358e21d95b8573f6b9443b1519f29ca8825/tomli-2.5.0-cp315-cp315t-win32.whl", hash = "sha256:62fc1bc8eb03e3a9cadfca713d65614ed8e09d974a283295ffe3a831976b4dc5", size = 108432, upload-time = "2026-10-07T12:23:33.496Z" },+ { url = "https://files.pythonhosted.org/packages/1c/b8/63a75cfb27a17c38550e44025d3a6e7be64516fd8608a3b75703bf37d81b/tomli-2.5.0-cp315-cp315t-win_amd64.whl", hash = "sha256:f3fcbc57b1791fa6cbe5d8434179d51de12be1a4811469529f47f6e7487a2571", size = 117281, upload-time = "2026-10-07T12:23:34.648Z" },+ { url = "https://files.pythonhosted.org/packages/72/01/e8c1debb2173973372934c68fc8e46170ab60ef23ed4592dff4dec6e8993/tomli-2.5.0-cp315-cp315t-win_arm64.whl", hash = "sha256:d2ba24db8a9376921b5e87b4762b9adb0f3f1deaea68f2b8b0bb2c11efb9c3e7", size = 115069, upload-time = "2026-10-07T12:23:35.77Z" },+ { url = "https://files.pythonhosted.org/packages/60/3f/3e3f8fd0919249b0200c80fbc4f9a1e70be19f9883da71dfb7f8b9ab8aca/tomli-2.5.0-py3-none-any.whl", hash = "sha256:32a7b79ac57a2e83670ce329ccf675798bc5a2094783a63676866b70503f2e2b", size = 14765, upload-time = "2026-10-07T12:23:36.875Z" },+]++[[package]]+name = "tqdm"+version = "4.70.1"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "colorama", marker = "sys_platform == 'win32'" },+]+sdist = { url = "https://files.pythonhosted.org/packages/0d/ea/b2a5bd54b28a324dae8211928b2d730b6547500342c7e6c6dea08bd0a485/tqdm-4.70.1.tar.gz", hash = "sha256:cefd0eca11b2a37a3aee776544d4f4ae913f02688135b5556b8788dfa474afc4", size = 171846, upload-time = "2026-09-11T07:25:16.601Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/a7/03/921a3d3c75785aca9ebfbfcabfbc3a1be12e2ab5265deb026d55a5a3f83e/tqdm-4.70.1-py3-none-any.whl", hash = "sha256:c293e525e6fef9c20e8728fd4612df02a0aa31bb5fe91ecd93e123b1b7bffa73", size = 80199, upload-time = "2026-09-11T07:25:14.599Z" },+]++[[package]]+name = "truststore"+version = "0.10.5"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/ee/9f/c5201d42a484c061e528825fc8e2d565f5abd50a4ced6fb7d29c4ec99b2b/truststore-0.10.5.tar.gz", hash = "sha256:30d36967ccaded5cbb38d602c433f53600036c79d502f4533a49b60a03bbefcd", size = 28091, upload-time = "2026-10-12T22:27:31.808Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/51/e9/3a7820be2bb0fe53b6bc9c3be26d3d1158004e4c3ab953aa6840b955b1e9/truststore-0.10.5-py3-none-any.whl", hash = "sha256:9aaaedaefaf06d8b206278cf8b5012bc897f485a874503501e12d776df78951c", size = 19017, upload-time = "2026-10-12T22:27:30.377Z" },+]++[[package]]+name = "typing-extensions"+version = "4.16.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/f6/cc/6253133b5bb138fc3306cebfbda2c520f545d36b5be2c7255cc528bb45d6/typing_extensions-4.16.0.tar.gz", hash = "sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5", size = 113555, upload-time = "2026-07-02T08:40:05.92Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/49/d3/b8441a820a491ddfc024b0b0cf0393375b75ea13866d9c66727e54c2fc80/typing_extensions-4.16.0-py3-none-any.whl", hash = "sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8", size = 45571, upload-time = "2026-07-02T08:40:04.659Z" },+]++[[package]]+name = "typing-inspection"+version = "0.4.4"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "typing-extensions" },+]+sdist = { url = "https://files.pythonhosted.org/packages/a3/26/b09b8010994eccc3c09092e6b34058f36a460eea2d4c3e8b910c695975a0/typing_inspection-0.4.4.tar.gz", hash = "sha256:547274fa6b0a561ccf549cc9524b999a578e737d015d8709d021f9d0d13bea47", size = 76928, upload-time = "2026-08-12T12:37:25.997Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/67/81/4add07e5172b7ac40d8ed5ff580409a7801a4fe26d529bdd915401dabfbe/typing_inspection-0.4.4-py3-none-any.whl", hash = "sha256:65b8397ba37ccbce054456aaccddfc91e6e3083c92824df348d96ca832f3f147", size = 14750, upload-time = "2026-08-12T12:37:24.648Z" },+]++[[package]]+name = "tzdata"+version = "2026.5"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/d9/68/f1b440335057bfce71b6e50a9d09445aa2ecbd08359a337976627b8409e7/tzdata-2026.5.tar.gz", hash = "sha256:8cc73c0a0bfca7dbfa59235d60b2eff82231dee33f53d206db1acd9173cfc0a7", size = 200404, upload-time = "2026-10-03T09:23:14.143Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/94/21/1e5995a1c920cce14e4bffae20c665ec10e7ed03ab25e006cd741092b718/tzdata-2026.5-py2.py3-none-any.whl", hash = "sha256:b683bd1b6659ddcd810ff02ad09ba821d4bf1065072805063eb35c49617905ac", size = 347996, upload-time = "2026-10-03T09:23:12.535Z" },+]++[[package]]+name = "ujson"+version = "6.0.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/64/7c/e1fa3fb70b53192436d751b5cb671f0ee960baa188b8351a7fec735223d3/ujson-6.0.0.tar.gz", hash = "sha256:80e23393feb707582e0ad495c397a4477b646d08094d2df64f7316f9fafd8aae", size = 7169158, upload-time = "2026-09-04T03:55:42.983Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/d2/0e/37251c324a2b8799a22b5354b8edd4b867b91f0e68fb74423772c377bd7f/ujson-6.0.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:cca83e86a300db6c72847bc7acc259bf86481063aea408b07c8a96d649797b7f", size = 54947, upload-time = "2026-09-04T03:53:06.967Z" },+ { url = "https://files.pythonhosted.org/packages/f6/e6/988d06bf5e46c992397d93123012bdd1e84bd829afe8181d8334a98ba7e0/ujson-6.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:dc8510c8b5b8373e0789ca05ebffc0aaab6e8a8f86d67956c91bc37f43d4f989", size = 54239, upload-time = "2026-09-04T03:53:08.176Z" },+ { url = "https://files.pythonhosted.org/packages/b4/78/ac325bada531de2fa2623e7dca1f690ae2314f9fb790ebad64dd41571298/ujson-6.0.0-cp310-cp310-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:1080587042cb19f9cfb08f289498d866ac5f93393b21006321dea331dbf62375", size = 58298, upload-time = "2026-09-04T03:53:09.41Z" },+ { url = "https://files.pythonhosted.org/packages/76/67/0e6a2ee29000cdde7a8fb931bf2fdd941a8c0deef18451e3e9c936dbfece/ujson-6.0.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:b8d019e935e4f8d6493690036161e62fae033891b71f20d238342ae266fec852", size = 52397, upload-time = "2026-09-04T03:53:10.631Z" },+ { url = "https://files.pythonhosted.org/packages/49/9a/cce4d9f023bc3213a17ceab844c597399f1e65c6654ba3ba178aff28683e/ujson-6.0.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:83194e213d9df2f2aed1edb821689f99c0f7789bdee173125fda510282f61070", size = 53487, upload-time = "2026-09-04T03:53:11.648Z" },+ { url = "https://files.pythonhosted.org/packages/15/bd/d1652f9e1ff16b1324c0715d97c8c295d845aba2766d69dab8a2cd90de9c/ujson-6.0.0-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:108a9f3a635913d38a856e05007afc9b243929938939cd11576a3f5484925145", size = 57182, upload-time = "2026-09-04T03:53:12.731Z" },+ { url = "https://files.pythonhosted.org/packages/f3/ec/ed610aff77e0f060d0abb6e1d5ad8f07b2b6e4a0c5e765225ccc5f229ef4/ujson-6.0.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0e94f0b95459caa6cb5e333baf6763bf1e7a96ea5e4f1ea7fbb0ad88e81a88ab", size = 56232, upload-time = "2026-09-04T03:53:13.848Z" },+ { url = "https://files.pythonhosted.org/packages/0f/bb/4e37fb0c4593870684f848ba0e3f06f17695596df3311fd4ccf0185db2de/ujson-6.0.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:bde35c0d6b5a204990f43e4ab43b6e3e4d5a1de773246e11d518945e3ba789ed", size = 1037432, upload-time = "2026-09-04T03:53:15.084Z" },+ { url = "https://files.pythonhosted.org/packages/eb/40/7db01714718c4324d3641061b12cce285ef906f750c09157f65dfc5c16fa/ujson-6.0.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:666a91606eeb47c997927ff294f3a9f8f930a02d0d2293ec7b19da5ed688f7ec", size = 1196188, upload-time = "2026-09-04T03:53:16.611Z" },+ { url = "https://files.pythonhosted.org/packages/51/2b/a445456fdca0a4bd6c691861d66a7c226f015a543d9f6b2f5537e1b734cc/ujson-6.0.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:03a385e523f67dec6d4dad0970f20a080cad045b56d9a3564d07807090a9c106", size = 1088475, upload-time = "2026-09-04T03:53:17.848Z" },+ { url = "https://files.pythonhosted.org/packages/fc/79/e7ee510705fd030e94f8a0a2fcdec19b82e25373e9e5d2087b1ba7afb396/ujson-6.0.0-cp310-cp310-win32.whl", hash = "sha256:a41209acca3ade45d27ed665a20f8d174d5bb10c3bf0881802f5215e3269fadb", size = 229053, upload-time = "2026-09-04T03:53:19.376Z" },+ { url = "https://files.pythonhosted.org/packages/15/62/837d0830b9be78dd01f2e6744b0ab2a614130b75da7061e9fa808f670b04/ujson-6.0.0-cp310-cp310-win_amd64.whl", hash = "sha256:83ed82fe4a17fd30796e65edeb46409f49e2794a33c0b6649d5194347f2412f0", size = 227241, upload-time = "2026-09-04T03:53:20.551Z" },+ { url = "https://files.pythonhosted.org/packages/ed/b1/bff8c59dce8eefc94e2323c93e30e2a94bcef6c7725e39ea8bc334aaf00e/ujson-6.0.0-cp310-cp310-win_arm64.whl", hash = "sha256:c3e26771a0759d213e60c885012e1f75ad84897f3d6b56b65092fbc93615bc24", size = 400354, upload-time = "2026-09-04T03:53:21.789Z" },+ { url = "https://files.pythonhosted.org/packages/8d/c3/170109078742892cf5ca19b0c8df517e5945f5b7141782235c2cb6124518/ujson-6.0.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4a69419253e9367281db03355eb55b5231eef5ff338bb816eb5926ee788faf48", size = 54948, upload-time = "2026-09-04T03:53:23.106Z" },+ { url = "https://files.pythonhosted.org/packages/4a/f8/4b927dc315819479058551d9b18307460a5e1a07ff0e7470a82aedf63c1a/ujson-6.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ff3b33d8c8dbbe32936d2056296324371a07ed0b29177e2eb8ec46569436817f", size = 54233, upload-time = "2026-09-04T03:53:24.334Z" },+ { url = "https://files.pythonhosted.org/packages/84/52/bf7a055ae58f13933500906a937b58b7e9052ea881c1159c1ad5bfdb17d3/ujson-6.0.0-cp311-cp311-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:d4a731cc7cd513bf4c4016a24a060fb1aa8475e8682e1f8b1bfb836f8d3f50f0", size = 58323, upload-time = "2026-09-04T03:53:25.357Z" },+ { url = "https://files.pythonhosted.org/packages/fb/42/878078293fcb394f3da724e6cfee089d57202365846a3b2e3ace2f112405/ujson-6.0.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:20eff4f1ea3b970b998bf111036404eb18e976d4919783f793e539370b8627cb", size = 52433, upload-time = "2026-09-04T03:53:26.449Z" },+ { url = "https://files.pythonhosted.org/packages/35/de/fba3d2c547622e66dfa0aca869a61a457df64d6a29867b9a5c7279336902/ujson-6.0.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:7e747c535d4ca9afdde31e034484a1020717fb18fa8a8faa789171abeb2ad1ff", size = 53503, upload-time = "2026-09-04T03:53:27.467Z" },+ { url = "https://files.pythonhosted.org/packages/1f/09/23ed92a4f03d44598775709fcbf7930021353ed17d98a992c62ad6a29b29/ujson-6.0.0-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2f3c0a77235d7ffcce5c54b872fa25de4f14e6ffc159c62ad93b0a9ca98a1d20", size = 57189, upload-time = "2026-09-04T03:53:28.738Z" },+ { url = "https://files.pythonhosted.org/packages/86/b5/68e1eeee2c35f79a0d720ac066236f0ddfb9a29864cec5dbe9ec006a0f74/ujson-6.0.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fd26d4b182b7138fc948cda55fe2e91b70d987731e169e628f42ba22cc6e3cce", size = 56248, upload-time = "2026-09-04T03:53:30.171Z" },+ { url = "https://files.pythonhosted.org/packages/db/66/e5edd446495ede37491da219779b762d1877c9a3d69f87aadbddafe0cdb2/ujson-6.0.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0a4edbeb091b195031a0e96fab005150340e383c095cac6b5c2b7dc8f55040b5", size = 1037453, upload-time = "2026-09-04T03:53:31.421Z" },+ { url = "https://files.pythonhosted.org/packages/40/11/6335f73db7f59e54f574adf226e94b7c148c1b492cf4fbfd95d853504d4f/ujson-6.0.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:d2e29a0dd1d33e49623d4c69bfa7e6d3d5c7530cf42bebe612cff965acffd1a9", size = 1196209, upload-time = "2026-09-04T03:53:32.737Z" },+ { url = "https://files.pythonhosted.org/packages/fc/03/76c7213a59dd0f21a984f3422e14f7955e97a67e159890b29f3a2c5c0e30/ujson-6.0.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:5919fe3109a08f8bd682a2ad1cec5cdeff7c1f563b812aba26e86b8b0ab05558", size = 1088502, upload-time = "2026-09-04T03:53:34.125Z" },+ { url = "https://files.pythonhosted.org/packages/3f/fb/31163721b2ccdbf9bf2d3fe8f588be9409eeae4432c6c0789f365991ab79/ujson-6.0.0-cp311-cp311-win32.whl", hash = "sha256:212191672712e5c40219d568c495a8a0bec526934eb87f16f30da78d962fe5ca", size = 229051, upload-time = "2026-09-04T03:53:35.521Z" },+ { url = "https://files.pythonhosted.org/packages/02/f4/79333d12eb64ef0b41c0a576449d3c84ac2e36263943b4ae92179cdb7b42/ujson-6.0.0-cp311-cp311-win_amd64.whl", hash = "sha256:bbe0374e18beadac588f47e10cd14cf8b06395dc982062b643c5e3690355bfe3", size = 227242, upload-time = "2026-09-04T03:53:36.773Z" },+ { url = "https://files.pythonhosted.org/packages/dc/f5/25c2c98489c0d827f9aba0c48bdee8f319b81bba44f14aef929f7756bd15/ujson-6.0.0-cp311-cp311-win_arm64.whl", hash = "sha256:2c5a1b422ebe9919a39c183543dff29edce76bac90080af5ceed51aeb6b60d0d", size = 400344, upload-time = "2026-09-04T03:53:38.189Z" },+ { url = "https://files.pythonhosted.org/packages/ef/d1/6a5526d896ead68746997a95f0ae9077e5a438c1574ecb6ea031e72cb75b/ujson-6.0.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:02148bd4706f42b063bb95f6cc309e16554fb4c250db4683688c0a3eb83048ad", size = 55112, upload-time = "2026-09-04T03:53:39.569Z" },+ { url = "https://files.pythonhosted.org/packages/84/b0/454f4a6aea48fd580eaaceb9d692cfa219b41e197c6bbfd534ee8945dad9/ujson-6.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b305657e2ddc29a50b333053e7c7f431a8c24c92b7dcbbf7a420f2330152b486", size = 54240, upload-time = "2026-09-04T03:53:40.597Z" },+ { url = "https://files.pythonhosted.org/packages/e0/39/4536f25a8c47fb78a12b5253929ce4b41a121fcd4e1b34d02634b6939e4d/ujson-6.0.0-cp312-cp312-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:a054959ec07f2fd63b6e8a63019a6879262c4f1983a100545c5a0206eefe993e", size = 58494, upload-time = "2026-09-04T03:53:41.561Z" },+ { url = "https://files.pythonhosted.org/packages/e7/e7/870f261071662573c6e0d74f28ed3e6d4ed8c604ced85df3a1e404c679d8/ujson-6.0.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:c51915961a51e37403fd94114e293d580dd916ddd1961b229217a87193d2454e", size = 52376, upload-time = "2026-09-04T03:53:42.67Z" },+ { url = "https://files.pythonhosted.org/packages/d6/7d/cd5139cbdab193562713851e751249e2981c90c275c57584403351d7d70c/ujson-6.0.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:aa03ac78c7806c6a391c037e0a63552e11532210b719bc062cddc00671a7577f", size = 53714, upload-time = "2026-09-04T03:53:43.89Z" },+ { url = "https://files.pythonhosted.org/packages/46/3d/066537298a91738f2f598ebea58baf0a612a65fad92a522ddac31d8191fd/ujson-6.0.0-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0aa247eb50a52bb2190871ca8c2e0a96f8190bfdb1ebd68c70d1bf422f640b73", size = 57184, upload-time = "2026-09-04T03:53:44.999Z" },+ { url = "https://files.pythonhosted.org/packages/09/be/4ddd61b3d4beb21eced10d0d100a4dca26f13303d4952e48fb5e89167869/ujson-6.0.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e9359bfd0efd12593f0db40ccb2d1497284401da207f1d6a1783718313201b21", size = 56411, upload-time = "2026-09-04T03:53:46.079Z" },+ { url = "https://files.pythonhosted.org/packages/21/18/8835fce508f89f20409b1ba336ffe5cde18e4ef66889aeafaf3e9a73ce4d/ujson-6.0.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:921408c159b01d39d70e90252b8ab17f16594fc91f229e6f881642fb0ed24ae7", size = 1037444, upload-time = "2026-09-04T03:53:47.21Z" },+ { url = "https://files.pythonhosted.org/packages/7f/b1/58a77bf3939317a679474d9e0cca62ce87f0c299689aadf2940ba6a5acc5/ujson-6.0.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:8141cade37dabc5f090eb5e6a267eabb6b193078becdc82aaf10433196715c33", size = 1196452, upload-time = "2026-09-04T03:53:48.631Z" },+ { url = "https://files.pythonhosted.org/packages/3d/8d/39cd22f388524daa0155e78ab64232711e7331fe31ae3074f9e6593b7685/ujson-6.0.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:dd55ca435d6c3c7e4cb6d8a0a98a133d4fd1b67d9abf90449442d9f5a728a9ff", size = 1088719, upload-time = "2026-09-04T03:53:50.032Z" },+ { url = "https://files.pythonhosted.org/packages/70/82/0380bc0636ff366ea8666fd072cd31dbfd10947cab34f4eb06b2f299c93d/ujson-6.0.0-cp312-cp312-win32.whl", hash = "sha256:2a09d4ea9ee60c023220195b229ce2688479dbdcf51630acdd54ee75b27c0c00", size = 229127, upload-time = "2026-09-04T03:53:51.465Z" },+ { url = "https://files.pythonhosted.org/packages/30/32/03a2ad4b3c6ebddaee2dc157f8342a9147dbafba0817c3452252749b0478/ujson-6.0.0-cp312-cp312-win_amd64.whl", hash = "sha256:8cd9f7203c0b2aaed66809edf7e66aa3ab0fe3402e87b69a43b9dfd8d33125ab", size = 227516, upload-time = "2026-09-04T03:53:52.629Z" },+ { url = "https://files.pythonhosted.org/packages/03/78/50dac7c077e60c1277615bce2b25eddd6312e769d425a00e6fe3cf603fe5/ujson-6.0.0-cp312-cp312-win_arm64.whl", hash = "sha256:9b59ead8dd9a96399cc38994d19720443a3cc626b730cbb4f414fb768b3e2816", size = 400243, upload-time = "2026-09-04T03:53:54.05Z" },+ { url = "https://files.pythonhosted.org/packages/bd/32/c67df85215ba0ebcdca8f8b1b3a856fd2434da87f84f9757e275ef99bd40/ujson-6.0.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:fb37ec7d7542e2f23fd7ca8fd034c8db7221c5e86d6a6a3a170711f993eecf15", size = 55113, upload-time = "2026-09-04T03:53:55.285Z" },+ { url = "https://files.pythonhosted.org/packages/b7/a0/e5c7ae933fab41be06f0ff7976e3483519cbbf9e2492a217a5550af95c18/ujson-6.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:ad11c9153c775087d261634410da7cfaac2743d79bc9ab573177d9e3398f00c6", size = 54247, upload-time = "2026-09-04T03:53:56.383Z" },+ { url = "https://files.pythonhosted.org/packages/9a/10/0993497a08f9fcff34cbcdcd6da46491f415e711a459c5d81f594e89769c/ujson-6.0.0-cp313-cp313-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:2dbe0b6d417b458164ccf1f59e081d6bd65c1fb2f626e0daeb6fb88c436f9643", size = 58497, upload-time = "2026-09-04T03:53:57.791Z" },+ { url = "https://files.pythonhosted.org/packages/70/55/06a578dd00551b10bc94d68889387e5de11977ee92cc53921eb02713146f/ujson-6.0.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:455e6ae6c925eca6358110e665a31e5bbcf0a93dfe9822a26b954c9351de2c3f", size = 52377, upload-time = "2026-09-04T03:53:58.859Z" },+ { url = "https://files.pythonhosted.org/packages/06/9a/cc0d306e93d1a8f1d48d54f52cb2cae39b56a4c990e2cd8cf328697bbc80/ujson-6.0.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:5376a8c14d0eaf80789bdb10e21ae12582cdf526eb921a47f57053ef08c63f8c", size = 53718, upload-time = "2026-09-04T03:53:59.962Z" },+ { url = "https://files.pythonhosted.org/packages/15/48/0462149003b03afe83450f6bdad3ebff9ac9aee315690eb0670bf2a6e342/ujson-6.0.0-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b8bd6743ad58fe6067ea1677d5df4674bd7de143b038bcd4129c3a6ced483ae8", size = 57191, upload-time = "2026-09-04T03:54:01.005Z" },+ { url = "https://files.pythonhosted.org/packages/45/ad/26f40cdffaebd1158b1083d6c89efd9e056badd706022386a0e9567ae499/ujson-6.0.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b3967550c8952bc516c79c40726a54313aceeb3162a8d5cc655362ab83d0957c", size = 56413, upload-time = "2026-09-04T03:54:02.019Z" },+ { url = "https://files.pythonhosted.org/packages/62/60/7f0d5da6198fcad7037dafc68e6c76aebb6536b323c07a2d1f82bf692099/ujson-6.0.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:619b2152aa77c57a535e3e7eaf88ec8e25beac6d380378b2ade10362cce50f75", size = 1037442, upload-time = "2026-09-04T03:54:03.104Z" },+ { url = "https://files.pythonhosted.org/packages/83/bf/21cd9110b8b33ff1530d854f38b7bd2b8d2be41af67590fccffb418fb29f/ujson-6.0.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2e36269e715c8deea036d263557042e2598e79d52110233c1a623ed9e7c1cf0a", size = 1196458, upload-time = "2026-09-04T03:54:04.39Z" },+ { url = "https://files.pythonhosted.org/packages/ed/51/2e3b3a19b36862f72300a306051fb7a265ba0f5a72d6e2eebd30f2722b44/ujson-6.0.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:c626f68524a19f50d9a9babc17f9c379d1b2a9f2a3da5ac3c40a205cc736259f", size = 1088718, upload-time = "2026-09-04T03:54:05.787Z" },+ { url = "https://files.pythonhosted.org/packages/6d/f5/faeb3439f844e61040dc4bd2744c58745541ec1a94e68f08994fe4f41ee1/ujson-6.0.0-cp313-cp313-win32.whl", hash = "sha256:cea0a63173e4ae98cd960f484096233da76a62550ac10c53312a69ad9f3545b1", size = 229128, upload-time = "2026-09-04T03:54:07.5Z" },+ { url = "https://files.pythonhosted.org/packages/05/19/55a89733b9078a88605f5884763e0457409fd8d04d2e47d4d761052e28d6/ujson-6.0.0-cp313-cp313-win_amd64.whl", hash = "sha256:88b237680c705fd37bacbaaa335106fecb234a47e1df0737d949b8e32c7eb5f9", size = 227518, upload-time = "2026-09-04T03:54:08.653Z" },+ { url = "https://files.pythonhosted.org/packages/d5/cb/807314a66fb495d600718b11f7639af07138a25ea301b91234a18a43af59/ujson-6.0.0-cp313-cp313-win_arm64.whl", hash = "sha256:ec570979304a529a8be1bf9ea28889742a2ff5de9af1c6734584dfe1645da3e6", size = 400244, upload-time = "2026-09-04T03:54:10.006Z" },+ { url = "https://files.pythonhosted.org/packages/7c/40/c22e49f786f5a0a71bae6323d0e6fa9a4a47b7b68c9f00631fdd78f147f7/ujson-6.0.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:63eefaa34abbe14167493710619b840d3fc167ba86e5fbe0c4a5eb01686aa3a0", size = 55208, upload-time = "2026-09-04T03:54:11.403Z" },+ { url = "https://files.pythonhosted.org/packages/86/40/90a47580ae4246134a080b0f76637e038476271461d7ab227c1c4431822d/ujson-6.0.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:af85ae40c71d422fad944aa8666d59374e4fa92f77899fce34b984037db41420", size = 54303, upload-time = "2026-09-04T03:54:12.467Z" },+ { url = "https://files.pythonhosted.org/packages/62/63/a275e218f7c5f49c0e31b446e9eb581267b7d3393d4dfbc25f397967e51b/ujson-6.0.0-cp314-cp314-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:2145005321a4b175486dd890946b036bb8730e4e8e17744f5abce23ea014e024", size = 58509, upload-time = "2026-09-04T03:54:13.472Z" },+ { url = "https://files.pythonhosted.org/packages/cd/3b/11fc8994c579a325c5c2075f03c70c967849d2c63cf97197507f31aaa739/ujson-6.0.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:c2c670cd7aaad2a3bff450addb32b26aa831f82a8b6c2c875ec19bb282a6c45d", size = 52422, upload-time = "2026-09-04T03:54:14.475Z" },+ { url = "https://files.pythonhosted.org/packages/37/73/a7ecfa39bb08cfe57d35064b4be21712fe671bae47574a4c9901a9a1ad2a/ujson-6.0.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:63b56e3fcccc339e2c1332e75adc779bd145964e1a47a39a229fa01b2e25618a", size = 53707, upload-time = "2026-09-04T03:54:15.657Z" },+ { url = "https://files.pythonhosted.org/packages/d6/c3/e6d76ff353d179dd0dca2e5df6afdd170874031eb73284acb9a327dd7f52/ujson-6.0.0-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ab7b316bba31be494635dcc5db87e429f2478073d15d2c54925c32fd9e1947f4", size = 57234, upload-time = "2026-09-04T03:54:16.793Z" },+ { url = "https://files.pythonhosted.org/packages/cf/b4/c52aa5b797b76a2ca10da513010120809d70bb12acdfc27ad7875a652fee/ujson-6.0.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f9d26982045b28db1937ac60682a9940fdb72f9cab3421a5d56c03f2207c99e9", size = 56411, upload-time = "2026-09-04T03:54:17.979Z" },+ { url = "https://files.pythonhosted.org/packages/a9/ad/5e2dd3fbbadee85811279e57dee23f346d8cc099809c14f7bb01d1a5a879/ujson-6.0.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:fc115cca04dbdfd98a67ec89ba5ffd8a87f3201171af54980cfd550997611c41", size = 1037485, upload-time = "2026-09-04T03:54:19.215Z" },+ { url = "https://files.pythonhosted.org/packages/b8/61/73d5ef4020716e08de4992519d090785908bf229a3d464abf0a067f06c21/ujson-6.0.0-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:90f766c5f8e55de2fe65e4241e3e2e46ed7528e7931255a7ed0dfcb5ce622b15", size = 1196525, upload-time = "2026-09-04T03:54:20.759Z" },+ { url = "https://files.pythonhosted.org/packages/ed/4d/d63aafdf83ecb52a76ab46b0450e5431462b713e0b2576539a1b80ed6afb/ujson-6.0.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:dfceda99f3105e9e6fce8dfd157f80894ad20247dc9ffce368c8b7883e7a2aac", size = 1088718, upload-time = "2026-09-04T03:54:22.056Z" },+ { url = "https://files.pythonhosted.org/packages/c5/92/504ccce4f8b56612dd5ebb1f221b5cb6435bc33d357dafbdedfe5b0b691f/ujson-6.0.0-cp314-cp314-win32.whl", hash = "sha256:22eafdd4f8ee6fe2db0737285c75b15f7486dc53c07b09a4b3699c92c407c3e5", size = 235844, upload-time = "2026-09-04T03:54:23.399Z" },+ { url = "https://files.pythonhosted.org/packages/e0/11/c897b08e00d9778a0dea895d5e88031180812941e3cd7fc63fa26034767a/ujson-6.0.0-cp314-cp314-win_amd64.whl", hash = "sha256:9d522e95bffac7338178757a7931b81639b9e0f2a3ee6e8c7ffdf867f2bfed36", size = 235353, upload-time = "2026-09-04T03:54:24.587Z" },+ { url = "https://files.pythonhosted.org/packages/99/cc/69a625656d73634af2e7bb8854b05f0d47a4650954e0876e28515965a522/ujson-6.0.0-cp314-cp314-win_arm64.whl", hash = "sha256:bc6df52a60b521c7b7d69de0c14856397d3cce1e39aa22cfe439c350d6f52524", size = 415010, upload-time = "2026-09-04T03:54:25.781Z" },+ { url = "https://files.pythonhosted.org/packages/bd/53/cdc879e035a9b67e50fa34aa13d2d9160a826801a5fcf2993f48b9768944/ujson-6.0.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:222389a616f6407eb40e1efa80a35c1ba468903e50a305faf425c26e3c32bdb9", size = 55660, upload-time = "2026-09-04T03:54:26.996Z" },+ { url = "https://files.pythonhosted.org/packages/51/29/33891cfee86cc13e00a1de6fa326378a637dad786078aaf56ab6336c60cf/ujson-6.0.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:593acfa0f36ada24e89c07147441fe364081fa1631db73ee55f40893c196e0b9", size = 54730, upload-time = "2026-09-04T03:54:28.106Z" },+ { url = "https://files.pythonhosted.org/packages/16/f6/2d4bd6fb364f8ded5840854bdda58032c8cd11614d70ce0c125a52dfb7a9/ujson-6.0.0-cp314-cp314t-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:5b3afbe992e2d1b8c1e4e7a0da2c77da23f29545e5ba695a4a9241702234f20e", size = 59301, upload-time = "2026-09-04T03:54:29.215Z" },+ { url = "https://files.pythonhosted.org/packages/61/fd/7baf38f591fd964558891a1798e9b49078558346a24020b7c27945389130/ujson-6.0.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:65e0e0c21ead4d0087c9c65a82eb2446c4bd51d36388d41035ce773517e7a3bf", size = 53364, upload-time = "2026-09-04T03:54:30.327Z" },+ { url = "https://files.pythonhosted.org/packages/63/c0/640ed28e4443c81e3ed9cbec2b216f4c3943388f4f45b703e8e0993c4f8f/ujson-6.0.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:0f3eff1f93d9d1f0bd5eee35883b9c71ad9befcfcd0ddc7cd5862c69fba21cf6", size = 54447, upload-time = "2026-09-04T03:54:31.527Z" },+ { url = "https://files.pythonhosted.org/packages/f8/f7/3688adc11a3e22e4b26563256404c6557682efe62510f988bf7dfc09d8b1/ujson-6.0.0-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4579b8c96824f65888d4a615463c2dc2b7db6c6f0c7f83ece2a58714fd1a8123", size = 58263, upload-time = "2026-09-04T03:54:32.587Z" },+ { url = "https://files.pythonhosted.org/packages/ec/c9/9ab8d5ab9ca362381d0fcc8c6e6a831e96385a908792b2378db6282a374e/ujson-6.0.0-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8af54166141d5c8ebeebc044c3569ef10edfcdf6fd8ecb487a2bf33c776ebc8f", size = 57154, upload-time = "2026-09-04T03:54:33.698Z" },+ { url = "https://files.pythonhosted.org/packages/23/01/82ed9b5594d770f6490334ce78af22c754b91b8de12efd3ddfaa1d23da9a/ujson-6.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:ad8bdad17cfc64aefb049e53687ff8730a72e2c3d99edcb36001683122597846", size = 1038449, upload-time = "2026-09-04T03:54:34.784Z" },+ { url = "https://files.pythonhosted.org/packages/5f/dc/3cea633a17cb79d8b642e06b6c07f21ac31072a4b3043cc41df74db54fa5/ujson-6.0.0-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:0dd8981828f6b515ba5e9f2473f433aa59bebe4784182b48695b71af52033b4f", size = 1197332, upload-time = "2026-09-04T03:54:36.441Z" },+ { url = "https://files.pythonhosted.org/packages/f9/1d/3fcc1ae871d8cd6ee40ec7e92556d9641fdf248875656780c4feea33c793/ujson-6.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:97caee7e4c3e20dff9e6adca0b7443c3cf9d7546ed5d0750954c5bb5456bad86", size = 1089519, upload-time = "2026-09-04T03:54:38.866Z" },+ { url = "https://files.pythonhosted.org/packages/85/86/af921b0c127f2c2d953836abfd277178bcbdfdf72318f26b4793d04a0c9d/ujson-6.0.0-cp314-cp314t-win32.whl", hash = "sha256:3bd770b553bebc408b49d6fdb46efb1dc568368d949ac7813a07fcccaea044ae", size = 236539, upload-time = "2026-09-04T03:54:40.163Z" },+ { url = "https://files.pythonhosted.org/packages/79/12/bb371cd75bb779d3282e5c1efaeb5e20bada1faecba6d83cabdd36756031/ujson-6.0.0-cp314-cp314t-win_amd64.whl", hash = "sha256:683501475e3dfa935574bfd2b3d26f7393b4a880a745aeab63cc3d013027bba0", size = 236201, upload-time = "2026-09-04T03:54:41.568Z" },+ { url = "https://files.pythonhosted.org/packages/68/82/f301c155669dd0bec9e569ecd5013b61e88528b7587bec2457b96b7fce23/ujson-6.0.0-cp314-cp314t-win_arm64.whl", hash = "sha256:e1fa46cb8ddbfba2adf8277b8225e2ebf5bae435e2251c730c17bc0020f63c5e", size = 415482, upload-time = "2026-09-04T03:54:42.809Z" },+ { url = "https://files.pythonhosted.org/packages/c2/2b/020feca4cc502b274029cd1514d428908e334a17386761d157da32447fa6/ujson-6.0.0-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:b2ab962524adb39dbad565fd259e15a1c26b8944fa978c24ed6dea5ab1eeefd0", size = 55210, upload-time = "2026-09-04T03:54:44.1Z" },+ { url = "https://files.pythonhosted.org/packages/4e/0e/1cd913419d17260f6d4c9869ab1208132b1281f4db00d3f07b664712ffdf/ujson-6.0.0-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:dae3765f731779faa947715485f6794bc5984802be4584478a3e9e5143dd62e1", size = 54370, upload-time = "2026-09-04T03:54:45.249Z" },+ { url = "https://files.pythonhosted.org/packages/0a/0e/876719d6f04bb48560806bb508a038550f6a8184558f0a7274bc3015e1fa/ujson-6.0.0-cp315-cp315-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:34c0403b485d8ddd86bd29d879cc9f72223579b57188b0a2bc07a8b06f8cfbdf", size = 55682, upload-time = "2026-09-04T03:54:46.34Z" },+ { url = "https://files.pythonhosted.org/packages/99/92/b59b4827a9c6ba0d12939b0d6e790b8629946873b7a655ff5a06735bd173/ujson-6.0.0-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:8d56340493496d50ccc41b460610c1ce6a197aac710733b5f36910e8c9f3ba6d", size = 52648, upload-time = "2026-09-04T03:54:47.641Z" },+ { url = "https://files.pythonhosted.org/packages/6c/49/3d702afd9beb434f5140b12ffdf88198c144c1de5bd17a2a3a6fd7872b22/ujson-6.0.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:a38a21efd05384fb82d35bed81fac0ff6056ea39c3dee3c293885ce910879dd0", size = 54007, upload-time = "2026-09-04T03:54:48.714Z" },+ { url = "https://files.pythonhosted.org/packages/52/fb/4dd3f307f62f0b22f33b9d760efbfa7c7890a76591e6867c72bd27070966/ujson-6.0.0-cp315-cp315-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ee87d8c4a4ebbef1c7cb2cf251a1d77726ef06a1597ed04d3dce92709b8fe0f1", size = 57412, upload-time = "2026-09-04T03:54:49.753Z" },+ { url = "https://files.pythonhosted.org/packages/f2/12/03ef04cde2e056f9ec699046f78bf2e8c1339ebfe0f29486098bf965e9ca/ujson-6.0.0-cp315-cp315-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:928d83b72808dc73a5df530b7fc27101052be1baf013a5dd75a1535de6cf107e", size = 56439, upload-time = "2026-09-04T03:54:50.795Z" },+ { url = "https://files.pythonhosted.org/packages/26/d6/5cd07dc0732de702101e2360b07f2841ba50a77d2d758b0042623caae049/ujson-6.0.0-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:cd835565b660ca125f5895105981d691c708c15367b88a69fa4d92ddbe24504a", size = 1037774, upload-time = "2026-09-04T03:54:52.087Z" },+ { url = "https://files.pythonhosted.org/packages/bc/a3/59bcf91336ceebeb6a54716987c7069f9ddf99579488e513252300beb6ba/ujson-6.0.0-cp315-cp315-musllinux_1_2_i686.whl", hash = "sha256:e6926204905e1a2f278bacf92ff2fe31343bcc7fb9ff08fdd42be66b3a217ef0", size = 1193839, upload-time = "2026-09-04T03:54:53.548Z" },+ { url = "https://files.pythonhosted.org/packages/0d/1c/fb168acf568b8d1312cfb3b079ae4a91ff95130219551ce2a3fd5edf71a4/ujson-6.0.0-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:7a1472649bc9ef3b9ce3ab279e9e812368bfac25210b7ec96bd544767c019577", size = 1088955, upload-time = "2026-09-04T03:54:55.287Z" },+ { url = "https://files.pythonhosted.org/packages/49/c2/6fe4524ff1edc26234f67b1dc9077e05c70dd59cdc736297dea18b171bd5/ujson-6.0.0-cp315-cp315-win32.whl", hash = "sha256:aea27aa0927b0423a0cfb167bd505c2dc59d1df65c66372204e43ba94fc964a8", size = 235843, upload-time = "2026-09-04T03:54:56.797Z" },+ { url = "https://files.pythonhosted.org/packages/26/bc/1a118013f92236150444d6ff931e78e698bf45f2bb9e9688d625970f3557/ujson-6.0.0-cp315-cp315-win_amd64.whl", hash = "sha256:102ddbb1677540f0cae80cc36f5db9663a626c7b3bf872ed10f10fe72343a3c9", size = 235351, upload-time = "2026-09-04T03:54:58.02Z" },+ { url = "https://files.pythonhosted.org/packages/b1/db/001d7bd04cde9cd35fb0635239026ad0ae8b57cf12e770db3427dfc85217/ujson-6.0.0-cp315-cp315-win_arm64.whl", hash = "sha256:9ef1920b423effe2837351d19a2278d7a516404a07200cca30b881077a2d7877", size = 415004, upload-time = "2026-09-04T03:54:59.741Z" },+ { url = "https://files.pythonhosted.org/packages/e9/60/5c91a9e9e7f0b433dd782c57c388f7e764f162a1de433545f30fe93f48c6/ujson-6.0.0-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:7168df25a051fd2a60f8d123b2123b60ead7c1f22cdd467ab7c2bba0fad0aec1", size = 55668, upload-time = "2026-09-04T03:55:01.139Z" },+ { url = "https://files.pythonhosted.org/packages/09/dd/1dddba1b0f74092f433e6a26ce4cb0f419a7a93575b54fcbb0c6d64e616d/ujson-6.0.0-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:987e191700873419cc23d94d4212e57a85df24eebbe9a33785907b0c99a5a57a", size = 54828, upload-time = "2026-09-04T03:55:02.353Z" },+ { url = "https://files.pythonhosted.org/packages/70/2d/6e65a3a336717d65cd8035ff870ad507b5a6375b8bc992718e744d620891/ujson-6.0.0-cp315-cp315t-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:0eeef12ef46e129278b50ca4c66c6b35c318f2fd09346bacddf218ed378cc0bb", size = 56651, upload-time = "2026-09-04T03:55:03.39Z" },+ { url = "https://files.pythonhosted.org/packages/d6/a4/89d2bfc97fd073a3fe44c90beea19eb402c48101f83d46626d4b4d32c9d4/ujson-6.0.0-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:68d623416ad997666bd8ea899b15554462b6250e803f4ce084c7dfd06a775314", size = 53687, upload-time = "2026-09-04T03:55:04.587Z" },+ { url = "https://files.pythonhosted.org/packages/02/5b/ff1227377dbd1b1bb5834d59e3410ff27ef9c1eac1125fbb610e220f0e47/ujson-6.0.0-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:7253ae5cac107d2940226a113165738630a98c19cdeaec1e6d6d6c3a7c307b95", size = 54873, upload-time = "2026-09-04T03:55:05.828Z" },+ { url = "https://files.pythonhosted.org/packages/55/49/f80678f440126a3bd20253b91cf5bb200f1233bc5822f90024c7c94cfcd0/ujson-6.0.0-cp315-cp315t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3b6494d29f7103a97d930cbd25f23fdc4d77e145a931e743660d697a200fd831", size = 58581, upload-time = "2026-09-04T03:55:07.009Z" },+ { url = "https://files.pythonhosted.org/packages/4c/2d/742897add5ea6b4ac9262208fba4bcb463e3f1b60606b6d79f05c7f27f17/ujson-6.0.0-cp315-cp315t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3d56d408ccfb9b0e5c2b4ea687396df30ca42ebe2aedac88362069620ce65402", size = 57408, upload-time = "2026-09-04T03:55:08.105Z" },+ { url = "https://files.pythonhosted.org/packages/e1/b1/8747b3acf29d6219b042e8983f840fd4866dd9c65e5da9457311d4fb4fa1/ujson-6.0.0-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:add6b3827cbd6ce068ad70b1b890d44271801386a726e2bafe5bced784466642", size = 1038904, upload-time = "2026-09-04T03:55:09.313Z" },+ { url = "https://files.pythonhosted.org/packages/3f/21/deab9b41b6a8737210cd2460054e915f10b878bfda824e2dccc3e5f0db5f/ujson-6.0.0-cp315-cp315t-musllinux_1_2_i686.whl", hash = "sha256:1cda9f81e58120675dbaba7b254849ee59698e5dee83c4383a3c1a96ca92a679", size = 1194845, upload-time = "2026-09-04T03:55:10.988Z" },+ { url = "https://files.pythonhosted.org/packages/31/40/b25a5f2b7bb6a5940692dc9d10bd89dad0c1e7d5af64c473d7391ec94513/ujson-6.0.0-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:d7945560fc6ce687ea83aa0bc375aa8a1101d9eee1fcbd085c5e0a5b6c6ac8ad", size = 1089861, upload-time = "2026-09-04T03:55:12.564Z" },+ { url = "https://files.pythonhosted.org/packages/c2/ce/baf673bd0ebe6135abb5bee5a4dcf162d2a79608bdd18fbd0e47bb7371ce/ujson-6.0.0-cp315-cp315t-win32.whl", hash = "sha256:54ab6b66fa6f67dfa8234e109df132074e155af3b299ad83aab13ba4b6db9b3f", size = 236549, upload-time = "2026-09-04T03:55:14.153Z" },+ { url = "https://files.pythonhosted.org/packages/15/e8/39a55080f06270c7fb9a9e6384a2cc8a9d24094ffe90c6447fea6724f346/ujson-6.0.0-cp315-cp315t-win_amd64.whl", hash = "sha256:801ff407fda799f4ff98d960342128b065a14113eaccfc116b50092342636861", size = 236190, upload-time = "2026-09-04T03:55:16.018Z" },+ { url = "https://files.pythonhosted.org/packages/40/76/ccb45390fb2bab53b69c7a49c0cec655a93727eeae0b3912132fa7150649/ujson-6.0.0-cp315-cp315t-win_arm64.whl", hash = "sha256:a2e699d5f290f81829f42638f8bc6582e3e73452d8607edf749ad3e1843946fa", size = 415495, upload-time = "2026-09-04T03:55:17.279Z" },+ { url = "https://files.pythonhosted.org/packages/a1/04/46d0146a9b4185aaee6b8b5d4fb58df59ec62e9557d6f59b0fdcd7c84b9a/ujson-6.0.0-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:28ac884b58c62eacdb6ac67284475b3f19b8160dbacb723956e67a0c11e45014", size = 58103, upload-time = "2026-09-04T03:55:18.697Z" },+ { url = "https://files.pythonhosted.org/packages/7f/ea/2175d546216366acddc5f677d8a2eb27fb1a24b53871c8e31f5109237ec8/ujson-6.0.0-graalpy312-graalpy250_312_native-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:e0652b2110fc374c766cdfca4fad61f9d13a0ad60c5b335ef3fed509374557bc", size = 53902, upload-time = "2026-09-04T03:55:19.806Z" },+ { url = "https://files.pythonhosted.org/packages/df/ca/caa8d28fc2507443fd4c32fb7e415f6d8fc70aa332160de36e253d8b083c/ujson-6.0.0-graalpy312-graalpy250_312_native-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:8604968307105c3229ce0170e70bf3f172cf96f73c978b1afbc3d0ec8bdfcf86", size = 55419, upload-time = "2026-09-04T03:55:21.046Z" },+ { url = "https://files.pythonhosted.org/packages/eb/a9/7fcaed6aa33a50a9dfb2c2e3259a2fe9075b66bba44bef77bc597c05a263/ujson-6.0.0-graalpy312-graalpy250_312_native-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:15aa57f6d0dafccd20f282f46f6a8d721d46c73fd9474f5ba996e9adc48d3177", size = 54396, upload-time = "2026-09-04T03:55:22.274Z" },+ { url = "https://files.pythonhosted.org/packages/e5/59/7b0b75c19cc394436fe8143a3f88a39a9c2015469e540e236c6046773e42/ujson-6.0.0-graalpy312-graalpy250_312_native-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:868856ea75794d952c773c506bb638e2a692bc5a8095cefebdcd98f43c79e772", size = 55497, upload-time = "2026-09-04T03:55:24.238Z" },+ { url = "https://files.pythonhosted.org/packages/c7/07/1ddd75170364566389db80faf7845950f79bf71989bf9194e7a331d585ed/ujson-6.0.0-graalpy312-graalpy250_312_native-win_amd64.whl", hash = "sha256:0d6e29b91a0934ed9d22ee48aa91518523cd2ce1c6caee2810b439fb371b8439", size = 228249, upload-time = "2026-09-04T03:55:25.436Z" },+ { url = "https://files.pythonhosted.org/packages/59/84/cdb0286e5fb188b0fec4448fbc48be6be6c029fdfda7bff949f789997386/ujson-6.0.0-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:fbae9b1a4d70e2283d71a0b66db2a91eb1a2cefaf370e47eff3a79f8ece7148d", size = 50935, upload-time = "2026-09-04T03:55:26.755Z" },+ { url = "https://files.pythonhosted.org/packages/38/e4/95346e93cea1e0af9d987ee1e8dc9a22867baa59f2cd60bbe1f3d77d78ef/ujson-6.0.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:970f9ff27d12e089fa342379f52ea3f4aff6fbe8690aca9a1645c14aee5d08fb", size = 49254, upload-time = "2026-09-04T03:55:28.039Z" },+ { url = "https://files.pythonhosted.org/packages/ef/ab/a0f4f171b4244a9d61be0c7be767791cd51d01cf805db534a2a2bde59eba/ujson-6.0.0-pp311-pypy311_pp73-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:65bbea52c251b568268b61f9377bee867addc81c9b4c24da277b051ce16f6151", size = 54327, upload-time = "2026-09-04T03:55:29.305Z" },+ { url = "https://files.pythonhosted.org/packages/e6/0d/a93e8d790a36262b662187dad04ab84b0204a9ad58c4ab5d87004b18b2f3/ujson-6.0.0-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:7de7692f330c1ceaf6335ad8039d2fe9344d30ecb415e86ee719e9d5585b2077", size = 47526, upload-time = "2026-09-04T03:55:30.521Z" },+ { url = "https://files.pythonhosted.org/packages/cf/8f/a4c91917c51f64ecc846bd2bc7f0a4397d4339cd1e91d2965cb85a484cee/ujson-6.0.0-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:6759d1a9f8aa45dbe2fb3e49ef181e8e6dacca89c595c5ec007ab2b839235117", size = 48631, upload-time = "2026-09-04T03:55:31.733Z" },+ { url = "https://files.pythonhosted.org/packages/21/a7/8c2e2121ef48616dfa2357d1f982d54e2d44586a557f9720ee84bb4f0021/ujson-6.0.0-pp311-pypy311_pp73-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:89b1962c30dc29ba99e522c4f2e39173961b6098328cfbcdad3f9f1c308dae89", size = 49878, upload-time = "2026-09-04T03:55:32.887Z" },+ { url = "https://files.pythonhosted.org/packages/ba/da/cae247036886535a5e43945f3ffd414b9fab92f54706ad40d7304c7630c1/ujson-6.0.0-pp311-pypy311_pp73-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c5d13a4ccf3fc9a00fb4e8cae818ad7ecf33f210d8098fecbfc087ff43573544", size = 50739, upload-time = "2026-09-04T03:55:34.213Z" },+ { url = "https://files.pythonhosted.org/packages/23/d7/c2c025b9e5e41fbfc7ad8382175adaccb6047500de16c16dee44e738d1db/ujson-6.0.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:e9f1625d047d011804a3dde0b8c5099ca2230224ca6b17f13a97b5531799c3aa", size = 243745, upload-time = "2026-09-04T03:55:35.693Z" },+]++[[package]]+name = "urllib3"+version = "2.8.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/e3/05/b17359e1cefb4f909b5e40b1b90a496d987258916dbbf88e842c729f510e/urllib3-2.8.0.tar.gz", hash = "sha256:63bf2ead4c879426ebf22ef2a781eeb4aa3b4ae798a0435506f8687fd5bb9b63", size = 458972, upload-time = "2026-09-15T19:29:36.253Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/92/9d/c4e665119135114480843e7ab388fa94d8480650450e6f8e26b70d323a4c/urllib3-2.8.0-py3-none-any.whl", hash = "sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3", size = 135717, upload-time = "2026-09-15T19:29:34.577Z" },+]++[[package]]+name = "wcwidth"+version = "0.9.2"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/f0/b4/7830542634bb2d3e62aa3b586a72d5b3b6c91c3168929e7000ef3fed041d/wcwidth-0.9.2.tar.gz", hash = "sha256:ae0ef90b90f6af38b54f1fe6d58662ec33b3cb4b8391958a62416d654231727b", size = 955039, upload-time = "2026-10-05T00:24:05.521Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/59/1e/4532a81fb9dfbf4114a816775e0a36c3a64ee1d1f4bba2094e2da50be5dc/wcwidth-0.9.2-cp310-abi3-macosx_10_9_x86_64.whl", hash = "sha256:7ef5a940bd5e30bac6e721f1a48fce0cd7bb3ece19e9c5d139e72c76c35cfd07", size = 605343, upload-time = "2026-10-05T00:23:22.649Z" },+ { url = "https://files.pythonhosted.org/packages/a0/07/cb6940e81134b7ed25fa312ee9ab536a63db0793b149f88a90e603ceace9/wcwidth-0.9.2-cp310-abi3-macosx_11_0_arm64.whl", hash = "sha256:ae0800c5339423cc53d33a266ad264b42ba8aaa16d4464f6e6b1bee607f50b17", size = 609960, upload-time = "2026-10-05T00:23:27.049Z" },+ { url = "https://files.pythonhosted.org/packages/a4/80/15ad05d40bfa99155639fb9e13b3d77083aa0fab893c816db2543d29005c/wcwidth-0.9.2-cp310-abi3-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:9e542f1f8475b78452a295495d7a5bc3ead565112e9446a64dc93462a41c2a79", size = 762566, upload-time = "2026-10-05T00:23:38.322Z" },+ { url = "https://files.pythonhosted.org/packages/bc/f0/b8ef7758003d66b60f093695831a86dcc726aac01ee6446ffcbda27b61e3/wcwidth-0.9.2-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:674b518af28d38ee645ff97b74f5760abee5fad4bac74413bfc4b881ef2ce724", size = 771632, upload-time = "2026-10-05T00:23:32.448Z" },+ { url = "https://files.pythonhosted.org/packages/db/6c/f940133c71427c208575910e981942bd78c98b1f7cd0d1425ca4b7457c04/wcwidth-0.9.2-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:751bef0ab404b6a1dc028b56b4b85d46486be1c55833f80da533e42dc691f389", size = 769763, upload-time = "2026-10-05T00:23:40.175Z" },+ { url = "https://files.pythonhosted.org/packages/92/8f/285f862826f721964ec7c42f81dc53d23afbd723a0f4cd989651f8218e25/wcwidth-0.9.2-cp310-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:c3d80f39ba4653a595edae9aa46a509d14883790a8fc23c5db221ceb207f64b7", size = 782134, upload-time = "2026-10-05T00:23:33.926Z" },+ { url = "https://files.pythonhosted.org/packages/c2/2d/64aa54882a5d556d3654c1f926d9118b797461033e23a158409941a37c8f/wcwidth-0.9.2-cp310-abi3-musllinux_1_2_i686.whl", hash = "sha256:0a47e03d8293590ecce66c45dc20ff7b4b885e3c78093722239585eca0d77ab2", size = 782851, upload-time = "2026-10-05T00:23:41.974Z" },+ { url = "https://files.pythonhosted.org/packages/59/39/52389f6de7fe2e9c14ceb8253dd99034bd86e1c87847ea3c100a97dded9a/wcwidth-0.9.2-cp310-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:67d901a4ad99249eb775b4ee4769ca97fa405d35a75f46e83166910a47003f04", size = 784621, upload-time = "2026-10-05T00:23:43.449Z" },+ { url = "https://files.pythonhosted.org/packages/b3/8b/20225500a076ace27bbcc8a6fd7c55125133c57a618816c7b7b8b73070b1/wcwidth-0.9.2-cp310-abi3-win32.whl", hash = "sha256:ee1fd0db9d9fd711a70f3e7765e0e04c05d26982fa05361456163062549d7da4", size = 593123, upload-time = "2026-10-05T00:23:55.953Z" },+ { url = "https://files.pythonhosted.org/packages/5a/d6/b0690f55ea0483530a18bac917fbadbf54f35122510446fc370f5f1c2453/wcwidth-0.9.2-cp310-abi3-win_amd64.whl", hash = "sha256:2a9746de704242bd4fdaabb31dd46b82f694a56a8d21081ad89b679a89da9fec", size = 597827, upload-time = "2026-10-05T00:23:57.489Z" },+ { url = "https://files.pythonhosted.org/packages/e5/11/6ecf4e9e268ab1a4ec617ffcccc2ee4a71301625f5490912dbaba462fa9c/wcwidth-0.9.2-cp310-abi3-win_arm64.whl", hash = "sha256:b9c6ab615e03723b7f8760ea2f27758d656e7e13b51515c9dca5c3e8b04612fa", size = 598415, upload-time = "2026-10-05T00:23:51.517Z" },+ { url = "https://files.pythonhosted.org/packages/4e/41/549eef1ab767032bdbdc1f0ab655d404b082b1e9a1dab1361dbba90f64ed/wcwidth-0.9.2-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:eda88ffdc97c0fbf193d407114f2c7a54b379f67f6e52a7531ee3b9fe749eca7", size = 606555, upload-time = "2026-10-05T00:23:24.188Z" },+ { url = "https://files.pythonhosted.org/packages/9b/64/a875ed7ea71cacadc0ae11b5fd3fac3486efd58bb25e67a7344248dceadd/wcwidth-0.9.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:1bf361c8705576760623b4724ae564666d73b016f9a778bcfd1c7345378ef4ec", size = 610829, upload-time = "2026-10-05T00:23:28.563Z" },+ { url = "https://files.pythonhosted.org/packages/c6/98/513095e484fe79b6f2613d6a72f855f5d56b65e15c215c2a6746fbc638f5/wcwidth-0.9.2-cp314-cp314t-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:97b878d1e158da5ed9ac5aac53fa3a55e282103af6a09ec353865613d1a31a76", size = 775819, upload-time = "2026-10-05T00:23:45.116Z" },+ { url = "https://files.pythonhosted.org/packages/22/fc/c02f3eec57224731e78f84b68e272250f784b6205acc7e0dcef6a7c23a0e/wcwidth-0.9.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:59dab4049cbd982b478bca098528df2c79a9160636a3a163ffebffcbd7d1b892", size = 786915, upload-time = "2026-10-05T00:23:35.323Z" },+ { url = "https://files.pythonhosted.org/packages/3d/6f/b0529a79bac3fe8d94f32b4237a13dbc3f955508753f6a6f06c73d679dc2/wcwidth-0.9.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:bb08ceb501d6aaf94066c3ee122dd825b152df40ff0bd0df4dc27126233b948e", size = 784186, upload-time = "2026-10-05T00:23:46.366Z" },+ { url = "https://files.pythonhosted.org/packages/d5/bd/6357c84ca9a734bfc735b7c48dbe21336b3777fab8a4101d14976dfe49a7/wcwidth-0.9.2-cp314-cp314t-win32.whl", hash = "sha256:8b4e381590b9b7390e07e22b2c0c1bb96ce50e1d2243c866d9387600362d51ed", size = 600791, upload-time = "2026-10-05T00:23:59.398Z" },+ { url = "https://files.pythonhosted.org/packages/98/de/037591ca18d897cc2179559dde72e6efc6ce0c90e9cd1e6bca4e87c38b4b/wcwidth-0.9.2-cp314-cp314t-win_amd64.whl", hash = "sha256:f2f7b3bba5a5d5f31fc350fd36ce5b84b693c83b7eb95ee630b720da5a5ce06f", size = 605463, upload-time = "2026-10-05T00:24:01.049Z" },+ { url = "https://files.pythonhosted.org/packages/d0/07/c9d96e106d938d26f7ab639bc80b8199359a1645ba6e3498413313ab6f38/wcwidth-0.9.2-cp314-cp314t-win_arm64.whl", hash = "sha256:734aa9405b321d1042301aa19c943c4731ee9e3460e4f8feea3299c064c97a14", size = 605936, upload-time = "2026-10-05T00:23:52.765Z" },+ { url = "https://files.pythonhosted.org/packages/82/8a/a28d61d910005ac93dfe48be3a0ebaa49352d88cebd25323e69e6ff2f4a8/wcwidth-0.9.2-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:42dbcb76ce8af39e2c9db410ac3f9bdf4e47eb41d6f44525952f172d3d98f724", size = 606575, upload-time = "2026-10-05T00:23:25.663Z" },+ { url = "https://files.pythonhosted.org/packages/01/c2/a3c66bd32766c8f4d6dc47d572532ba014fe5be30489f2576aff7cada363/wcwidth-0.9.2-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:138e1f8898e431b2f2d7881f8ca8d75591c1d3c21aa53f54e989bd6b39811da2", size = 611045, upload-time = "2026-10-05T00:23:30.421Z" },+ { url = "https://files.pythonhosted.org/packages/ec/8a/d39964f8f8c019d7d439b9b501d3e7bb42fee69f00354040ba0b27b5824c/wcwidth-0.9.2-cp315-cp315t-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:5175609bf8cc7398a5f48aa35207bd64ebf9f45e4c70df65f7fdc7a988041a3c", size = 778143, upload-time = "2026-10-05T00:23:47.7Z" },+ { url = "https://files.pythonhosted.org/packages/2f/53/525da13e8f9ff7b5b4e74ec6f8d68bdee63905796972e086c6b1b96670d2/wcwidth-0.9.2-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:e5f669ae8c3d969c72032f9cdee019674b666e522d45e1e2099a2e9dda4a341d", size = 786630, upload-time = "2026-10-05T00:23:36.967Z" },+ { url = "https://files.pythonhosted.org/packages/ef/9f/d6a0c6df354b9d93466548a65cbf4ffcb48c719bbd307504cf3e76740837/wcwidth-0.9.2-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:196b47cf32f9df27ccda6dc513237f3c2429c4c659db428d60a5bc443d10f270", size = 784839, upload-time = "2026-10-05T00:23:49.88Z" },+ { url = "https://files.pythonhosted.org/packages/bf/d7/3021feed1ed7926021ec134943ad3b24a2f7ea742cc9976461171482ed77/wcwidth-0.9.2-cp315-cp315t-win32.whl", hash = "sha256:0cd4f7f2e53905dcb110d213a4c8529b6733fa3d232d8c717f946cc69a10349b", size = 600845, upload-time = "2026-10-05T00:24:02.497Z" },+ { url = "https://files.pythonhosted.org/packages/63/80/6a03356d8ee38261e3a78cf89ee03d8e7f12c572d969237be00869e2dc73/wcwidth-0.9.2-cp315-cp315t-win_amd64.whl", hash = "sha256:33df042f96c61ed3cd5fb3742fba427553a635bc578799857a48aa79f774a0b9", size = 605441, upload-time = "2026-10-05T00:24:04.052Z" },+ { url = "https://files.pythonhosted.org/packages/0c/48/1a308a86a833fd12ff7a08d0d2491ff4a72c8a92d12f5ead8317630f771e/wcwidth-0.9.2-cp315-cp315t-win_arm64.whl", hash = "sha256:48719a9bc76c2f84238693fe5013571fa5beffa3621cf228f1f3a9e30dae84b8", size = 605885, upload-time = "2026-10-05T00:23:54.274Z" },+ { url = "https://files.pythonhosted.org/packages/9c/b4/0bfa065af506540d9d558e3e5548cff00bc1f9b24e6e2a8512498e8628de/wcwidth-0.9.2-py3-none-any.whl", hash = "sha256:89ca642c5bf0101157a09366be69fad0379db1f700ae39a920e103234573670e", size = 301667, upload-time = "2026-10-05T00:23:21.097Z" },+]++[[package]]+name = "yarl"+version = "1.25.1"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "idna" },+ { name = "multidict" },+ { name = "propcache" },+]+sdist = { url = "https://files.pythonhosted.org/packages/75/16/e8be8e2fb175bbf41a0680381a319f1199fae256588241a2ac8677eafb49/yarl-1.25.1.tar.gz", hash = "sha256:03dd38de09bc213e9a8b29761eec33ee1d5318dac0e49d8af36e4d27830e23a7", size = 246245, upload-time = "2026-09-15T19:35:02.264Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/85/92/55fa9ee84cb8ec9930a910b5753936a926f918d8cc8965bdac571479c095/yarl-1.25.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:142c06c4d6a35ee3ec5da08499805e879cb3ca7c1fbfbecb0140fe72403818d6", size = 144695, upload-time = "2026-09-15T19:29:53.114Z" },+ { url = "https://files.pythonhosted.org/packages/16/b4/9edc8e605b16b2eb5bd0c2ccc73e2b15aab583862460767fb43f91f11839/yarl-1.25.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:24ce942011a61953e7d313438038f4d32ff21387b775f58a957f7a07dd55ef95", size = 104332, upload-time = "2026-09-15T19:29:55.443Z" },+ { url = "https://files.pythonhosted.org/packages/ae/de/4204e6646e278b1cd4a9cf73ebe8b7cfcf16693f1249b324eb273d67602a/yarl-1.25.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9e23c82b63cd7652fc24d33ed6cc17099d607aa3b4fc4ddc75e95062f3d82df4", size = 104449, upload-time = "2026-09-15T19:29:57.239Z" },+ { url = "https://files.pythonhosted.org/packages/1d/fc/21d74789198ad68a23a209ab0d73fe5a52d39ebbd9945041e72827acdd77/yarl-1.25.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8ee202350cf57abf0e9502a41601841019c25d3db7ff52d980aaf31446254059", size = 116828, upload-time = "2026-09-15T19:29:59.031Z" },+ { url = "https://files.pythonhosted.org/packages/8f/31/90891ddb61848c067ebd1fb505ab5902a6e7d4707c2f3823f67ff37883d3/yarl-1.25.1-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:5df89f769cc8ff94c3d7e7603386fba309d25ce5240132d26c15baa8d0e96c4c", size = 107150, upload-time = "2026-09-15T19:30:00.868Z" },+ { url = "https://files.pythonhosted.org/packages/a1/15/f3d18743d3688b5f01aa83034b6c00665692ab20e1d0c89a29000d4979ea/yarl-1.25.1-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:83e9f4a25085bd4b7214701a0794ff1f50fc633ffb8bdfebf07abdd81c2db126", size = 124704, upload-time = "2026-09-15T19:30:03.128Z" },+ { url = "https://files.pythonhosted.org/packages/99/37/718789d8004775d6a2db86b2afc72b1d156e0590b88a1b8634ddd4bdb8ee/yarl-1.25.1-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:e636b64d24fd9c38053c5e389a1174c66361fa49dcfd220f4dd35b4abde7cb89", size = 129246, upload-time = "2026-09-15T19:30:05.014Z" },+ { url = "https://files.pythonhosted.org/packages/28/b9/7818ac6dec7fbcd16be2d19495807c01e2c38834e57d41c63356a75e786b/yarl-1.25.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e5637ca8d0bd7fb72648a6c7934af4baaccb697657f7438c9d264fc2abb8b0b1", size = 118071, upload-time = "2026-09-15T19:30:06.977Z" },+ { url = "https://files.pythonhosted.org/packages/b2/e3/8d098cafb30a64df7283b5a5dd0d32d22a71b18a1b9ec071d0776ffe5c2a/yarl-1.25.1-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:683e362b8ba453080f7489c66f4ea794e751c35b72e7eab3575ef784c2fbc7fb", size = 116180, upload-time = "2026-09-15T19:30:08.836Z" },+ { url = "https://files.pythonhosted.org/packages/20/9c/fbe9432478d87e00eef80242e15179639df162cb3d5d8d978fc56dcb6c51/yarl-1.25.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:df23df54b5114a17c2d0ef192433e2e5a9f0c5178c32375e90b7cfc965f349d0", size = 116578, upload-time = "2026-09-15T19:30:10.782Z" },+ { url = "https://files.pythonhosted.org/packages/b1/8e/b3dfd03732236b86b0bcf06a72a37de412ff6f82e719a947c3c651d4dece/yarl-1.25.1-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:f53dcd26694f148f738edc052b5a69234833e739f10f4c3287bdfd8ec0f7b326", size = 108886, upload-time = "2026-09-15T19:30:12.951Z" },+ { url = "https://files.pythonhosted.org/packages/83/e1/94dacb650d4963d5f844bc3df7ba70288cb7b68ed5a4d070da71acb19b14/yarl-1.25.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:b8075fe90bc08e40b8b8a1874fab42ee4c7b56af05c5886e9cc841397f916908", size = 124098, upload-time = "2026-09-15T19:30:14.963Z" },+ { url = "https://files.pythonhosted.org/packages/d6/3f/c93f76a218258c7bfc60dd27fd56e9102bdbc625517f4a6ee673295fe4e4/yarl-1.25.1-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:a8c2b841478068440d8b733005d13a5ef535b9928cbc05f17182d410f32ba449", size = 115768, upload-time = "2026-09-15T19:30:16.736Z" },+ { url = "https://files.pythonhosted.org/packages/a8/79/4d93f13c3b05cda3c962805dec28cbc255c50239b3457808abc5633a00c2/yarl-1.25.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:ca32926d7d77bcc8838425c4c95e040a3ace1cb7dfdae599013458dcda2607ca", size = 122461, upload-time = "2026-09-15T19:30:18.901Z" },+ { url = "https://files.pythonhosted.org/packages/c5/8e/e2ba83b3a9bfc1d3b882ad35fa8abc04a7af4d9356f2e329a23d0c8d889d/yarl-1.25.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:192a866877a49993949ef1975864ad8728bea28ee810f6abe1a0729c2b500426", size = 118295, upload-time = "2026-09-15T19:30:21.07Z" },+ { url = "https://files.pythonhosted.org/packages/42/67/cb5ea1baa0c0ac60bda44ce59f601133154af2a2e67722d3517f8793855d/yarl-1.25.1-cp310-cp310-win_amd64.whl", hash = "sha256:3f4d48a6112712973e676bd792121fee470e432d749177162d9949d5c9460a1b", size = 102929, upload-time = "2026-09-15T19:30:23.122Z" },+ { url = "https://files.pythonhosted.org/packages/2f/85/9a1e98de10fc0e738d517efd2a9984c3e7db6cf35fa72b2b373988a9e9b7/yarl-1.25.1-cp310-cp310-win_arm64.whl", hash = "sha256:48796ea00a303961507dc6c8437c4b325a6fc3f95f7c36c71b91ea9a8150963c", size = 98854, upload-time = "2026-09-15T19:30:25.102Z" },+ { url = "https://files.pythonhosted.org/packages/83/b3/2cea721d495ca57f8f414aa4867ee263f486b274e07463158cf52f02ba7f/yarl-1.25.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9d693bf4bf534e9ba3ae2780cfd577f5135629f7b5ac653490859d0b77864865", size = 143794, upload-time = "2026-09-15T19:30:26.946Z" },+ { url = "https://files.pythonhosted.org/packages/55/e6/cd145cff8e5cf60b8b3c41fbecfa2a45028a8dec3fbc52bec03595ff3d3b/yarl-1.25.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ab2054c5531af2a9ba7b69b8ec91e4f884420e83a8c5e579b013084cb57e5e5d", size = 103993, upload-time = "2026-09-15T19:30:28.661Z" },+ { url = "https://files.pythonhosted.org/packages/ce/7c/fbb40fe2d53747c40aa36a9e2bd2178a202f942bda0b670f3306d4aefbce/yarl-1.25.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:564fdc7085d2245ab84f88882fdb1d6ac0723124bff6ded35bfb1c00f812630d", size = 104010, upload-time = "2026-09-15T19:30:31.069Z" },+ { url = "https://files.pythonhosted.org/packages/f0/0b/5a516f70641092283f57cf3670bdb75e7327bcc0dcb5038697e4dfbfd569/yarl-1.25.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:acae6b45d1ace09b6ba3876da43b88366ef368f73b988c7f57e14231753d4420", size = 116444, upload-time = "2026-09-15T19:30:32.894Z" },+ { url = "https://files.pythonhosted.org/packages/b6/8a/d1a627f827b0a404ae0f5647cab0534959081cde13b0756a783469fb3b5e/yarl-1.25.1-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:1fb2a01ba8cd9c5d2c5dc1ec35e0fc951d04b4f037541d4ac090c993ce58b3d7", size = 107565, upload-time = "2026-09-15T19:30:35.188Z" },+ { url = "https://files.pythonhosted.org/packages/aa/cf/c8e0aaec886840a6c4480fe44eaec7cd4319f79a563b79321473be79c56f/yarl-1.25.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e92b6bcc741b86d67606c40d3cb9c7cc8e6c737f81e31f4a94efc204456c92e3", size = 125006, upload-time = "2026-09-15T19:30:37.1Z" },+ { url = "https://files.pythonhosted.org/packages/50/26/0cce366d54a93cdc8342965dc7663385e4db161625cc1e8b18e786753d24/yarl-1.25.1-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:72c34ac7ad4314c19362d5ce27626dcc8429bd30bbf8c179f4234078851f9492", size = 128717, upload-time = "2026-09-15T19:30:38.904Z" },+ { url = "https://files.pythonhosted.org/packages/95/0c/a71501bbc1a674ff72c4d6c2b75f4d9a5af819f5244c3a7558080a8802c5/yarl-1.25.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d5add7b4ca7afeea91d52e4d4e4db3b1fe9885b71f07054560d8c4296b7441a2", size = 117728, upload-time = "2026-09-15T19:30:40.809Z" },+ { url = "https://files.pythonhosted.org/packages/e7/6f/c3267ca01defeed9ed9c4ff9b17bd54915432c405945233265b707475d1c/yarl-1.25.1-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:def538065f9e4d4cf1ae164bd59aba00dfa84f03923e0de4c3788f252d6bcd17", size = 116224, upload-time = "2026-09-15T19:30:42.818Z" },+ { url = "https://files.pythonhosted.org/packages/8f/69/fad57ee52d648431718ee0f1f68966a99c1352c3924688ffbdcc9d3fe51a/yarl-1.25.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0a191bfdb30a79b98e5d175d75285f9fcb78bf0e46ba5efda042e1c72071a0de", size = 116299, upload-time = "2026-09-15T19:30:44.966Z" },+ { url = "https://files.pythonhosted.org/packages/2a/d4/6a8c1e29f33338687ca278cba0a8fbf6525a322c2c02a9a500ccbe041152/yarl-1.25.1-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:71f42c5b9a948c113bbdebfa544598321431d064ff959d32e99b1feb61d68345", size = 108625, upload-time = "2026-09-15T19:30:46.874Z" },+ { url = "https://files.pythonhosted.org/packages/e8/d2/3a35ae791c9cb6522c106923ff25c3230d999091e5e65511bca23bbd9914/yarl-1.25.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:72849d892954be4d09e569b8b831ac39ce58417fedc767d4308a0fe542018a40", size = 124515, upload-time = "2026-09-15T19:30:49.082Z" },+ { url = "https://files.pythonhosted.org/packages/be/fd/2b022109a6b4af0f7dc371cf7500af380b0d4f034010243e1b0ce218dc93/yarl-1.25.1-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:efb01a106f971cb3752856bca2318bbdf7f01bd8823779c461586cbe5ffd5258", size = 115711, upload-time = "2026-09-15T19:30:51.208Z" },+ { url = "https://files.pythonhosted.org/packages/18/59/f7586271136c3ddb0126bbfe661844699369b76b555fe38c4efe86870b2e/yarl-1.25.1-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:a1daf47cd95a7c3a63456336bc5aaa8c86dd3a47d07ed3d0e76132ae4666a5a1", size = 122751, upload-time = "2026-09-15T19:30:53.535Z" },+ { url = "https://files.pythonhosted.org/packages/a0/0b/07f7a2d881f7e16c385b47fc1753382600847cad305dcc7fa0c25828acf8/yarl-1.25.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:9489e6abf47ba37f332075a91444c7cfedb03e6ce99fbb2f116bfe1ce810da3b", size = 117983, upload-time = "2026-09-15T19:30:55.277Z" },+ { url = "https://files.pythonhosted.org/packages/aa/9d/8cdceec66a9b940700cb45931741403f045b162afd79bcb93c41cadd0972/yarl-1.25.1-cp311-cp311-win_amd64.whl", hash = "sha256:d7306dee25b8a0e737363f347362b875094b4dc4e367311470656ae420fdbf8e", size = 102894, upload-time = "2026-09-15T19:30:57.606Z" },+ { url = "https://files.pythonhosted.org/packages/17/f1/7ec357db1d3ad2863542d71e8fe64a126bbec17b134cd7d30951196809a5/yarl-1.25.1-cp311-cp311-win_arm64.whl", hash = "sha256:abb1384477f5901d436b5d2e5465954de46ea6098f59163d243660b5c4461d35", size = 98609, upload-time = "2026-09-15T19:30:59.705Z" },+ { url = "https://files.pythonhosted.org/packages/75/b3/cd32ac66ae622b854c2df0ac52106dda220d361b65a64fde7d5b3684aa3f/yarl-1.25.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:94d7aa6debf92a1dd14cb5280b083a764169a13cfb23a452111160274ed989f4", size = 144798, upload-time = "2026-09-15T19:31:01.821Z" },+ { url = "https://files.pythonhosted.org/packages/61/fb/a2c52a8007c2051ba74662afb112ecf3d00346af4c25e33df9d80fd14fb8/yarl-1.25.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:83d4a37e4b95da4d8bda930d6d35b75b4cdadbacbb4980cae290ea3100b5d51d", size = 104583, upload-time = "2026-09-15T19:31:04.05Z" },+ { url = "https://files.pythonhosted.org/packages/be/dd/ee38aec8e09fdf957e50d4085453fbe202f56c6c3b4cf07b81cdb4f09ee9/yarl-1.25.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:e029648f9c951db30e98a7d7ec90835db88ec4b32820efe2a9bdc2287e032eb6", size = 104325, upload-time = "2026-09-15T19:31:06.338Z" },+ { url = "https://files.pythonhosted.org/packages/1e/b3/058dbfb1857b484c9cf9cc135659f50b85ce66e03c99e44dc2f7b6161f55/yarl-1.25.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4d781294bb815ecb5ea57ff6bbf8038e0a31a95fdf3e1788f66e0dc100d64b58", size = 115358, upload-time = "2026-09-15T19:31:08.593Z" },+ { url = "https://files.pythonhosted.org/packages/db/39/29693446cf0cf6b15a0e2f75a5d40f93c56819b05b0622196f45e95b5cc0/yarl-1.25.1-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e12c538e00e7c1b286a07061046b90e8124e6a9793efae2c70db6a4aad07faad", size = 107658, upload-time = "2026-09-15T19:31:10.802Z" },+ { url = "https://files.pythonhosted.org/packages/86/b3/3c4dd7e1af43b931fba95e0a722737f2ea94a6d199c802585282831d7abd/yarl-1.25.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:7e4de3ac4adbad3d0bc7c6f4360a7dbff5de2f15e3b723be3198074e17fd9c40", size = 122660, upload-time = "2026-09-15T19:31:12.84Z" },+ { url = "https://files.pythonhosted.org/packages/bd/b5/1b60dbc3cfc9c5712b15148c206748f2bc93953ffdbe25ea75b63dfc89c9/yarl-1.25.1-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:419f392a1da624877975709e3864dfe833af6cc7671b39318086d456e288380c", size = 126506, upload-time = "2026-09-15T19:31:15.088Z" },+ { url = "https://files.pythonhosted.org/packages/bc/7b/ca212cbe170ac8b96e45317ecbcf9c3c3ecf0cdec98d5b088a9c4088929b/yarl-1.25.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c6f117789d22dce188e5754e8bc65b7e6ebf8cb73963b9fa761f672a5883769d", size = 117050, upload-time = "2026-09-15T19:31:17.241Z" },+ { url = "https://files.pythonhosted.org/packages/cb/c3/72b4938cdbe619ad71ac156182faef4908846b84dc3ca4dbb4c4e6f84014/yarl-1.25.1-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:80e47012e730da131c9f059c80936783f9659aae22dc31c03c0595590d11ed54", size = 114174, upload-time = "2026-09-15T19:31:19.294Z" },+ { url = "https://files.pythonhosted.org/packages/e8/43/268717870f9ba0cc9701a95181587f6dc8c5f387aab4aeecc83158f38a79/yarl-1.25.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e80f557716fd765439577131e526b8942ffc2c07bdbc5e39fa62f660ba1e963f", size = 114944, upload-time = "2026-09-15T19:31:21.414Z" },+ { url = "https://files.pythonhosted.org/packages/da/84/baa5bf504d51fe062c4bcaf62936da97fffb43285978d0b39984824231fd/yarl-1.25.1-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:f61964f235a43738bfac50da46fc4254943a7eea3051aeb0b6fc7c992c29fadc", size = 108263, upload-time = "2026-09-15T19:31:23.388Z" },+ { url = "https://files.pythonhosted.org/packages/a4/28/779a2ed9e0152a601a27039bed9aead3f0b79797a67e2c44bfa444622dd8/yarl-1.25.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:e546fe1d4a93ebc2910f0d768baff19faa09843ab3f2036a67ed6e69fae4419d", size = 122184, upload-time = "2026-09-15T19:31:25.343Z" },+ { url = "https://files.pythonhosted.org/packages/f8/1f/118e9e5b8f07694d63fd3222e801d7782270003f1a222aa798df3f8d5933/yarl-1.25.1-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:cce0727fd5ac04d372fa9bbfde9febc2bcf209aadfcf0468e45dec72719895d1", size = 114001, upload-time = "2026-09-15T19:31:27.465Z" },+ { url = "https://files.pythonhosted.org/packages/0f/ae/a4cf1cf372313734b17996d4007f9f73596e7a178b9485802e5494ecf484/yarl-1.25.1-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:af4ea5b37403ef4e30f3927eaed540db942bde01d8d3ff083527c0704d1c9c68", size = 120565, upload-time = "2026-09-15T19:31:29.47Z" },+ { url = "https://files.pythonhosted.org/packages/05/79/ad94f93ca731bc9e44d321833ab96b82a4f9f5f63cf773f81a4aeea5ecc1/yarl-1.25.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:68782fdb4027b8d1eee25ec35e9a6db05e863b899eb0310b3a33b6c3fef55707", size = 117060, upload-time = "2026-09-15T19:31:31.367Z" },+ { url = "https://files.pythonhosted.org/packages/bb/cc/51a7b4abf4ac593b8e7eb3794b28e5a35ae26eed8bc04787628d215af82f/yarl-1.25.1-cp312-cp312-win_amd64.whl", hash = "sha256:7d575b54cb3863ef9bc290ea4b009999d55dc237326131e4853cf33e888fee03", size = 102593, upload-time = "2026-09-15T19:31:33.329Z" },+ { url = "https://files.pythonhosted.org/packages/9d/21/0941a6b93a58b59a1ec75e5333bf06929b671309c43c0cd201c172d9c39f/yarl-1.25.1-cp312-cp312-win_arm64.whl", hash = "sha256:bc3ac7bf569f6b64dad04dd7808c7872dae8a97df657856eac05e9b7e3614a85", size = 97697, upload-time = "2026-09-15T19:31:35.855Z" },+ { url = "https://files.pythonhosted.org/packages/7b/ed/2f3129bbcc9a5c8ba12cc2b29d8060a3bab9c8043c456cfd4b5ca3188890/yarl-1.25.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:25868beca8b6765f8f7d0e11fe6dd7c66dd4b0793b9500286d20cc92352126a5", size = 143623, upload-time = "2026-09-15T19:31:37.966Z" },+ { url = "https://files.pythonhosted.org/packages/17/e1/f1bc3390fdca352826676b531d0712736f156919090206700421d46b2c37/yarl-1.25.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:10b2fd95332f0d716d5eee3c9fb2ce8eada19082de7fee83d32e37992fd75c26", size = 104011, upload-time = "2026-09-15T19:31:40.25Z" },+ { url = "https://files.pythonhosted.org/packages/a8/aa/50acc5c3e5da04172ae3c281c75405af4d2ca911e16120ab0563f4dffb66/yarl-1.25.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0f12afda4eea8c8994a76d4df1875c765194f5fbe8a9d197929ea303caee29ec", size = 103677, upload-time = "2026-09-15T19:31:42.46Z" },+ { url = "https://files.pythonhosted.org/packages/30/d2/7d1e0ab9f8390e1fbcede5a6dbf70d23c96ad09b8c5567f3a514d1ddb0e2/yarl-1.25.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:14b79a30a93a3ce2e8832603fd0ab780ada281b0ba5110b519a634f2d7d7d1fc", size = 115392, upload-time = "2026-09-15T19:31:44.371Z" },+ { url = "https://files.pythonhosted.org/packages/71/e1/5ba1e3a2a22139213655e760919038e8ed7e2d4a99826d0bbddb3beb96e5/yarl-1.25.1-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:4bd6340d20ae2c7ca719b87b426e808e90743b676d05d4c26c4fb5ca71f41184", size = 107493, upload-time = "2026-09-15T19:31:46.273Z" },+ { url = "https://files.pythonhosted.org/packages/f5/53/780653d5e0f73831f467cf13548912e5eec97f21dc49fc8daf21da027df4/yarl-1.25.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:126a2533570c554719ca40a1288fdee1700b6bc82e7131aa69fa85252d92e651", size = 122537, upload-time = "2026-09-15T19:31:48.654Z" },+ { url = "https://files.pythonhosted.org/packages/03/92/d54fa70236c6036271c9c9c09fd978df5cbe3ef49ef6c46e9b833476d215/yarl-1.25.1-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a3faadac7d812ddac258feb57b9846b60c1b437c4f4b9ad42595c6f6fe4390df", size = 126170, upload-time = "2026-09-15T19:31:50.872Z" },+ { url = "https://files.pythonhosted.org/packages/0e/b7/a82a49bf88340b837ef6972b508a1604ae377b9e6904b46b10cf5f1cf925/yarl-1.25.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:be80550d9bfe83d9b62398a37081a90434e6df2d978ec345c3d2820de6beddab", size = 117012, upload-time = "2026-09-15T19:31:53.189Z" },+ { url = "https://files.pythonhosted.org/packages/ef/78/5d684b411e3f3602464ee9b538db48205038f8605872985f61efb809ced0/yarl-1.25.1-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e07595c7d6f4db270ceede356a1bd1c07a34f1c26f958d1ed0cd7b48e0d2bba3", size = 114950, upload-time = "2026-09-15T19:31:55.694Z" },+ { url = "https://files.pythonhosted.org/packages/2f/11/51d82b852c64f7fad0fc7a7ff3031517204887e874c722bbca839c0b23ac/yarl-1.25.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:eb96ed1ae6c7d072d60840c0434aef07a2df611812810807fbc54263a6053e9a", size = 115428, upload-time = "2026-09-15T19:31:57.966Z" },+ { url = "https://files.pythonhosted.org/packages/e4/49/9d1978049bf646b9ea918313926453c6901b71c92f097467777d47d36a88/yarl-1.25.1-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:3feb99222553a8cbedfa52c2f59dd84c3f50d5b582c728d522caf8d72769a54b", size = 108428, upload-time = "2026-09-15T19:32:00.048Z" },+ { url = "https://files.pythonhosted.org/packages/43/35/7b8f1ebb45d7ec3dda7d1909bf44f458de41ef91e2937f107733582a5166/yarl-1.25.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:a2ed0ba415ccdf08f14bf544cb78346d0f76086707ffee24921a2c84dbf1305a", size = 121961, upload-time = "2026-09-15T19:32:02.436Z" },+ { url = "https://files.pythonhosted.org/packages/63/d6/d8b689ab7ca26edeb85f6ff28812aac7a25376eefc1780e303a7bfbaceff/yarl-1.25.1-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:2b49375d22299b0a834c2bca72f39aaecc270d96fb24c30424899676f487b22a", size = 114961, upload-time = "2026-09-15T19:32:04.456Z" },+ { url = "https://files.pythonhosted.org/packages/cf/d5/1a1798ea4dc6b7ee3260010a27907ebc697c95dae99817d817ed446d24aa/yarl-1.25.1-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:ef74070ac553c59eb4f04258722066d6c6135b7baa03b2e9f2da65c096e96d98", size = 120036, upload-time = "2026-09-15T19:32:06.5Z" },+ { url = "https://files.pythonhosted.org/packages/91/8d/b1b35ed7903da6669b1d367cb2c09436acd4ff508029b4f39a0c0c2058fc/yarl-1.25.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:0a66db89ea473abeac4b70523cafd94db3772380e565f9d28af7a179b7af71fa", size = 117276, upload-time = "2026-09-15T19:32:09.401Z" },+ { url = "https://files.pythonhosted.org/packages/3a/8f/4db01cef62caff0d7a4593ed694fb8a41a27a11158cab80d290221f13e57/yarl-1.25.1-cp313-cp313-win_amd64.whl", hash = "sha256:1f51020b2eb8a003c84925638ec63c21a750a4bddd3a22ec8eac6a742dadf1b9", size = 101945, upload-time = "2026-09-15T19:32:11.545Z" },+ { url = "https://files.pythonhosted.org/packages/c0/5e/3ce00497c5c0babb74d4130c10c3828ccd215b4819d12020c42429f991ac/yarl-1.25.1-cp313-cp313-win_arm64.whl", hash = "sha256:b10dd0557ba422715b5206b3743192135a6022acca8baec51aa127d0a75db8fe", size = 97270, upload-time = "2026-09-15T19:32:14.127Z" },+ { url = "https://files.pythonhosted.org/packages/80/cf/54023edfab7aa773b860503db0c56e962ccab0922803ee97988c176ea090/yarl-1.25.1-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:a9ca696eb02e5c02a8afd872ada510eba9b7fe6e68b9572c2e9a9b1941e31e2e", size = 143975, upload-time = "2026-09-15T19:32:16.416Z" },+ { url = "https://files.pythonhosted.org/packages/d7/a8/e6c1be0e6761d0f2d10bbf33a3e1e02b99dc83874d92945d7b461a72481e/yarl-1.25.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:a5877f2255aab518ebe528289037699201d5dc5f045f2396cb30aa02db22f57f", size = 104018, upload-time = "2026-09-15T19:32:18.364Z" },+ { url = "https://files.pythonhosted.org/packages/6e/bb/dda344765ffd3430afe1a1c66c866a57fae67786537d4f14607df6505ac1/yarl-1.25.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:7a5c3115595995779ee21f2567035793911c3802a43c74f3fbb0314929ec67ac", size = 104156, upload-time = "2026-09-15T19:32:20.459Z" },+ { url = "https://files.pythonhosted.org/packages/e5/5f/ed1538bcd06009fe990d6d283dd7667f639e62a81e35c6d8c6ef6c08fb3c/yarl-1.25.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:77e5099b99b37f3cf79c246998ca9f7313a78054cd1809ec46bc1afad47e1c4c", size = 116025, upload-time = "2026-09-15T19:32:22.766Z" },+ { url = "https://files.pythonhosted.org/packages/a2/af/2185daf56b99830d3356ecfada46faaa49945de6626e842b7728088d4980/yarl-1.25.1-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:6efaf45df6a849cef613a03a94c845647456662f85438c886bb67a9c027c8c2c", size = 106985, upload-time = "2026-09-15T19:32:24.749Z" },+ { url = "https://files.pythonhosted.org/packages/c1/65/bc1ae564fb4b04a30b6a8f250e787772581c57e4c3d5cf07ac3359de3103/yarl-1.25.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:d5f90e44653c4e0f78501ed9bb7d3fce835a8d62b7c6ed0cb16557534087e743", size = 123030, upload-time = "2026-09-15T19:32:27.084Z" },+ { url = "https://files.pythonhosted.org/packages/6a/3e/e2afcde10d74e53b3fa889960991efb3019beda2b1682a01de720a302056/yarl-1.25.1-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:632da579b2d879f6bad20f2cfa35ded1efe2f4f77f8abb26a6234a5b236acd2f", size = 126765, upload-time = "2026-09-15T19:32:29.332Z" },+ { url = "https://files.pythonhosted.org/packages/a2/be/415b00c0fe5a0615b062a456b26623d7ec91c2bee20faea1a14045aa0469/yarl-1.25.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:30eec96e8a91bd588ce897c9543f6d5d8d34b28fbcba28a4dedf20ebeae9fe57", size = 117199, upload-time = "2026-09-15T19:32:31.49Z" },+ { url = "https://files.pythonhosted.org/packages/97/27/3d8c63ddd3e8bcfd033748ab93876678ce59bacd66e4cb1ed851c9c5b37e/yarl-1.25.1-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:12b6bc4906e11f5e1a1cdcb12296e7afbd366c783cc8073403cd2fb74334e453", size = 115187, upload-time = "2026-09-15T19:32:34.137Z" },+ { url = "https://files.pythonhosted.org/packages/39/b7/7a81d0be1a502a26a0d4326c6f2ecb736c824f570ea1c6529f2b0b227b50/yarl-1.25.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:9d6ed3d17bccce4c05343e1ca8da13bc5c02c812a4e7282ddd05e8769322d3fc", size = 116085, upload-time = "2026-09-15T19:32:36.438Z" },+ { url = "https://files.pythonhosted.org/packages/f0/69/39fff459916aa0fab42215dc47b759586fd80f94aa56dfc4a7c15ba6e0dc/yarl-1.25.1-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:f38a70074041d3b7e138e452799f5174198bae5bd5ab2000917badf403908c5f", size = 107996, upload-time = "2026-09-15T19:32:38.959Z" },+ { url = "https://files.pythonhosted.org/packages/c0/39/80b9a55a3335590451d9ecf3eb593a8c635351f4c905ef056d7e8a8fd9e7/yarl-1.25.1-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:4ca89e4e21854ed27ec753297dde84b16c9f8e53b14a4866fb44457d643c19f8", size = 122549, upload-time = "2026-09-15T19:32:41.151Z" },+ { url = "https://files.pythonhosted.org/packages/42/7d/a179c6757818bb59372a4adafd09f7f26a3b4a0f04c3ae404b544c0b0c82/yarl-1.25.1-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:1ab7618921a93767387a4b83776f751588f5b5ae9bb5bc96620e2e2e00bca868", size = 115107, upload-time = "2026-09-15T19:32:43.072Z" },+ { url = "https://files.pythonhosted.org/packages/32/2b/a773ac867e4ab53a98ed98e5cefe3bae31e6f550252ca9d1de266f1a40c5/yarl-1.25.1-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:0ae12ff2b805fa02c4dab838005caef735e39986322698c48588d3beacb65c62", size = 120666, upload-time = "2026-09-15T19:32:45.061Z" },+ { url = "https://files.pythonhosted.org/packages/bc/41/52be6505e85b0f76b4f85b01b5de7e06a0512201abc2c95e14e099549174/yarl-1.25.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:90c30ed53546da833c700115c0064c22120d1b1560f474699fd31f22dd668233", size = 117505, upload-time = "2026-09-15T19:32:47.177Z" },+ { url = "https://files.pythonhosted.org/packages/f5/01/349c0386caedbbe488d519f252df54efac8a1459282d466c474bdd84a620/yarl-1.25.1-cp314-cp314-win_amd64.whl", hash = "sha256:acfa7e22aa6c6e7a5996a41d275bfa01efa7ea56ab890590280e9063e2cf5c1b", size = 103446, upload-time = "2026-09-15T19:32:49.615Z" },+ { url = "https://files.pythonhosted.org/packages/5c/f0/8ec63180f77912f0dc4e5a42760cb8c08d20da1d5ace3578a01b84d1f3d8/yarl-1.25.1-cp314-cp314-win_arm64.whl", hash = "sha256:8e7d98cdbb6d71e726f7d525952867096053d1f290dd4e3c50d7d313a136f414", size = 99159, upload-time = "2026-09-15T19:32:51.686Z" },+ { url = "https://files.pythonhosted.org/packages/47/7d/92d2220d6886b70ab1ed8579533ac2af2dfac716d5d929001daff7986df9/yarl-1.25.1-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:d21f0fa80a02d05299207eeaafef345d812ace96d5306e4ef265e1d419a615fa", size = 150071, upload-time = "2026-09-15T19:32:53.911Z" },+ { url = "https://files.pythonhosted.org/packages/64/fc/b245e448124bcda9340df38e3553fa222b50260fca027a84095e9bd8642d/yarl-1.25.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:17c9877a89fb6e2bca6f9087eb24cd7fb434653946ef5075e470d23d49b52287", size = 106780, upload-time = "2026-09-15T19:32:56.443Z" },+ { url = "https://files.pythonhosted.org/packages/51/e2/9a6ce2e334ebf218a30335ae76fb1696459430d42f733b8cb0d7d65b84d3/yarl-1.25.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:29273edf1530e397bd07cb784db1fbe0d2590b77569f2e24679a9c0a2d763b94", size = 107361, upload-time = "2026-09-15T19:32:58.827Z" },+ { url = "https://files.pythonhosted.org/packages/ed/70/66e8c76b569b450d16e190f15071c916c3df70b0e33927e415ac497cf0c2/yarl-1.25.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b7abffdf37af1cec6a2ad69b827aa84320db5894791bc8ed932dc93fb274b7e9", size = 114396, upload-time = "2026-09-15T19:33:02.24Z" },+ { url = "https://files.pythonhosted.org/packages/73/23/0d82838a05c57fdc05bc8b66e8c92dcc0df15e27463a5f163142d521c682/yarl-1.25.1-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:2239a02249d9326655419e0168a28ca9008938eaab31dc29fc875c217927a6c0", size = 104882, upload-time = "2026-09-15T19:33:04.494Z" },+ { url = "https://files.pythonhosted.org/packages/86/d4/ea08615c4edaa6049a13a2f1128944d068d1893abda7d708d4d7ea01599a/yarl-1.25.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:664ec6a520b74a1df2810666eb67695fcb77fa663e6ea0a25aaf2e529cb24dfa", size = 119485, upload-time = "2026-09-15T19:33:06.583Z" },+ { url = "https://files.pythonhosted.org/packages/1a/82/0898bdce9b1ae403b308b9c733d0d24af4a3464270c2c081f457b16c3e0d/yarl-1.25.1-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4f1c91f5a5980a937ff8e238e98e6897e1ad74a4b1e2c0d68c73b5ffbb3f5c0b", size = 122490, upload-time = "2026-09-15T19:33:08.653Z" },+ { url = "https://files.pythonhosted.org/packages/d1/38/97d79b81c342b78246cfedb74809e68841f3198d21653e10d3232bd9c622/yarl-1.25.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7c88edaec8c349ad4c5ad4c486a3defcc4b80ceb2f074436ffa0a87caf5e76a6", size = 115336, upload-time = "2026-09-15T19:33:11.056Z" },+ { url = "https://files.pythonhosted.org/packages/8e/9d/2577896554cd310dc470adb6da0b7dd0b435cb63e2565204a7ac240e504c/yarl-1.25.1-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:35dcbea443fafb3eece757ad4e514560ddeb6c34cfae1582c620d7b293d7feee", size = 111825, upload-time = "2026-09-15T19:33:13.204Z" },+ { url = "https://files.pythonhosted.org/packages/29/6b/7ac49d8ba84a5c4bd73415a4c949d22c749cb3762579b3d50e48019a78aa/yarl-1.25.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:882569ff613758cac762a457a5d72d6e211b28d4bcfea89d1d71ea942b02eac0", size = 114655, upload-time = "2026-09-15T19:33:15.553Z" },+ { url = "https://files.pythonhosted.org/packages/e5/18/e5942a16723f5b72f9b1297fd5a85a54f6300cd15c0dcb5005b90cd89156/yarl-1.25.1-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:d0f1489233a254bb3643d2f05de7d59019254d81daeca6b9162fe9edef57e0c7", size = 106395, upload-time = "2026-09-15T19:33:17.599Z" },+ { url = "https://files.pythonhosted.org/packages/7b/2d/549fa46240781513ebc47ae7eb418df428a163a2a3d644cc9cbb3ecb7846/yarl-1.25.1-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:f41753a76f4f63927d03a0d8ba8f5ce0f2083bec29a8cfaccc55371b1564b96b", size = 119277, upload-time = "2026-09-15T19:33:19.973Z" },+ { url = "https://files.pythonhosted.org/packages/76/16/4763f78dcdc0b3b9fb3842b04afe72b9320857c6a69300c62a0eab03d119/yarl-1.25.1-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:8fb0eb4955adf0579001581f2f71a126e8781ba61bcd120f127b0401163c6c2d", size = 112504, upload-time = "2026-09-15T19:33:22.464Z" },+ { url = "https://files.pythonhosted.org/packages/ae/b4/974e3edfe0d188393ce1cb9de400111c63fe61f4eb3b772a500d84c970d1/yarl-1.25.1-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:a1e32763e641a1566507d90a8d3b19bfc3cc04a9d4e5ae3e32189874ed4b58a3", size = 116243, upload-time = "2026-09-15T19:33:24.788Z" },+ { url = "https://files.pythonhosted.org/packages/b0/aa/157b940428da80c104ca09666a740e51c94963df65d5b112e06b52e4d7a8/yarl-1.25.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:65b5b2066651b7432d389e9799d979c703bcc6ef44266bb8153ef54e91e4aab3", size = 115822, upload-time = "2026-09-15T19:33:26.886Z" },+ { url = "https://files.pythonhosted.org/packages/7e/af/19fbdce41412e1b96825544cc52cd7029d3724655d0988237972f078bd29/yarl-1.25.1-cp314-cp314t-win_amd64.whl", hash = "sha256:734f6e5400352ac4254456003d462866c684703570929cff7a7bde015d0cb371", size = 107386, upload-time = "2026-09-15T19:33:29.009Z" },+ { url = "https://files.pythonhosted.org/packages/2a/99/f6431c8968e89be608d74b28ae2d024521b2953f27dd44e0dece5e04f67a/yarl-1.25.1-cp314-cp314t-win_arm64.whl", hash = "sha256:287e99ff5aa4dc1c7630bfc683ded6f106d756c99dec432a2d7f197a784f51c6", size = 102094, upload-time = "2026-09-15T19:33:31.151Z" },+ { url = "https://files.pythonhosted.org/packages/c7/3b/4f51eab40c2eabea6c3d5b121dff4b8988dc35087732ffede12d2be8b8dd/yarl-1.25.1-cp315-cp315-macosx_10_15_universal2.whl", hash = "sha256:9b1bdaae98bc016825dd3c9d8ee1832f829b3341f9cc6ebd1a1b0a7fef7367cc", size = 143875, upload-time = "2026-09-15T19:33:33.52Z" },+ { url = "https://files.pythonhosted.org/packages/41/05/bbd58fc063f5f299a883f810760b265ca26c8167c91cb9a494d0fe2387e1/yarl-1.25.1-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:e7011b8fb8c4054bf0c12e5edc6cd83778b0028e99ce59b18586ed036f92cfdc", size = 104028, upload-time = "2026-09-15T19:33:36.22Z" },+ { url = "https://files.pythonhosted.org/packages/12/ee/2fba0aecb52e7020e189f684148783aa0b9cfa3b3bfb0b400646eef70ad4/yarl-1.25.1-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:f074e8d4aa0a5798920ddb6de3d08b228c614ff3724c3e8bd7577f4bafea867b", size = 104041, upload-time = "2026-09-15T19:33:38.86Z" },+ { url = "https://files.pythonhosted.org/packages/38/35/884beab53ed88c7247d1671972b5ef116f7351fe0c7e6de8c3558372cb16/yarl-1.25.1-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7d42e7e3ca399555578b4d617e3a6ecf13371b3743a115995fa010c7bf341459", size = 116018, upload-time = "2026-09-15T19:33:44.265Z" },+ { url = "https://files.pythonhosted.org/packages/e2/cc/1a91b685afb55cc18608443ace95280e96e263a97565811732b6788d3269/yarl-1.25.1-cp315-cp315-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:aa4ed3dd308548f9e707d9caaf005d2d7f8c1e7868f858dfeb47fe76e16b391d", size = 107033, upload-time = "2026-09-15T19:33:46.45Z" },+ { url = "https://files.pythonhosted.org/packages/c5/c1/58b379fcb1d68d907b7fcf75200c44321896509b2a6a74abbb4b19d864d2/yarl-1.25.1-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:42a66563d8cc056ee32e6191e05097a7b2b3bc302e0bc3133daf8710eb18bd26", size = 123257, upload-time = "2026-09-15T19:33:48.631Z" },+ { url = "https://files.pythonhosted.org/packages/d7/2d/1fe96cf5c2aeab10095e48f38585cf5a8451fb7253234822398e52aa5336/yarl-1.25.1-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:98d370568f393215d605304cdb77b3d5539bd192c75b623c7304c42c8d6d8273", size = 126745, upload-time = "2026-09-15T19:33:50.999Z" },+ { url = "https://files.pythonhosted.org/packages/ad/60/8674394ce43f4dadae573a1d6f451716438e9eab7d7fe8d643c673a32d85/yarl-1.25.1-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:23bf5b403c879a54964e0feac7285688e04bb220074878d737d331522da0a5bf", size = 117255, upload-time = "2026-09-15T19:33:53.456Z" },+ { url = "https://files.pythonhosted.org/packages/2f/72/0faa30e02605d56127d42bb987dcc97da3863b7bf70b9bfbf5f739c05e30/yarl-1.25.1-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:d45673badd08456d0340e9364eddafe1c53a9d2896424294de4d7dd71ad3ee57", size = 115166, upload-time = "2026-09-15T19:33:55.669Z" },+ { url = "https://files.pythonhosted.org/packages/8c/90/9a46eac564c437e128285c5c1d7bb385d268394e9209d84f6bf4a14471ef/yarl-1.25.1-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:0136d640dfa9b0523853e411430a99f8a91eca85774c6420285a33b755bc6de3", size = 116082, upload-time = "2026-09-15T19:33:57.78Z" },+ { url = "https://files.pythonhosted.org/packages/ad/38/4b1a686a3758878f93d2f1ea943f5a165f3555769cd16e761cfd0efdca17/yarl-1.25.1-cp315-cp315-musllinux_1_2_armv7l.whl", hash = "sha256:59ba3a6e1aa8cfe5adf4bd270fd965db21955401b7ca6f1696010c55ed4daec2", size = 108048, upload-time = "2026-09-15T19:34:00.25Z" },+ { url = "https://files.pythonhosted.org/packages/da/14/f348eb967f31a58348612a2b93bd8a2ab664548e2b5e879cac7f592f7201/yarl-1.25.1-cp315-cp315-musllinux_1_2_ppc64le.whl", hash = "sha256:87796fedc3ba97ec14fab55acb48584276e6c1e4c1e89c422bda62c838e754a9", size = 122775, upload-time = "2026-09-15T19:34:02.455Z" },+ { url = "https://files.pythonhosted.org/packages/ab/e9/4f7b79700f88cb9e8bb66f8b54f9bce1844c013a2c39fdc47112e9334c95/yarl-1.25.1-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:bd0912757081f89b107d6c00b2ff8a194401b0b87eadcf4481de2b865a8fd44f", size = 115096, upload-time = "2026-09-15T19:34:05.283Z" },+ { url = "https://files.pythonhosted.org/packages/cf/37/f9cb020331997d3eb887bd28d5410ecfd3d80bf163c23d7cec490d78dade/yarl-1.25.1-cp315-cp315-musllinux_1_2_s390x.whl", hash = "sha256:b51c159a9794633f5e0db7ecec7b2b6e3734eca1f5d17dc989ff3552a43ff78b", size = 120655, upload-time = "2026-09-15T19:34:07.382Z" },+ { url = "https://files.pythonhosted.org/packages/12/83/52fceb22891a41f168db7ec22fd1d81e06b6a0b8d9f70921bd3e785defd0/yarl-1.25.1-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:319e070a01db9920fb63761843f96a104c8e2b9427266731810dc1e22595b17c", size = 117488, upload-time = "2026-09-15T19:34:09.988Z" },+ { url = "https://files.pythonhosted.org/packages/f5/5c/ce6c4ff1247fcbe4b33d462c23a097106d909b173fde7042bc52290466e2/yarl-1.25.1-cp315-cp315-win_amd64.whl", hash = "sha256:a2059a2d891bd156bc5184e7ab7a56e78a84dfcfdeac8c501b552533ad1c36ee", size = 103434, upload-time = "2026-09-15T19:34:12.56Z" },+ { url = "https://files.pythonhosted.org/packages/3c/a1/766a906b0704fb26d52b19dc22bed48a8ba0544203b70dcf44da350e8194/yarl-1.25.1-cp315-cp315-win_arm64.whl", hash = "sha256:a78b50b4f7918a3de71105d5c0b93bbc57bb8339a4d03a9dfd449f9068e76f3d", size = 99155, upload-time = "2026-09-15T19:34:15.132Z" },+ { url = "https://files.pythonhosted.org/packages/bd/d3/a1d09b32cb6ab14f66b44939f5b4255b8b9e747aef3974af1d5d80ccc2fd/yarl-1.25.1-cp315-cp315t-macosx_10_15_universal2.whl", hash = "sha256:b5402a340723fa7da00b5cff987ddab61276be6d11251ea71ae02bcac54890d8", size = 149284, upload-time = "2026-09-15T19:34:17.452Z" },+ { url = "https://files.pythonhosted.org/packages/7f/3b/fe554d879692650bca70bfbc0df124e82e4d2bb7456f698c7756f1279a96/yarl-1.25.1-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:eda19ea5ee88742f47a2340816e6f2d40b53bed3ab5b69794769f36af9f35bb4", size = 106399, upload-time = "2026-09-15T19:34:21.474Z" },+ { url = "https://files.pythonhosted.org/packages/e1/4b/e7af56177ac8d40094c82d7728224c0b8472157d50d362e5fb3b014b2bc8/yarl-1.25.1-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:75baa6cf9b6d1c52f3e111a130e202fd8cf0a5b3a066c3f73d615e885092e4ec", size = 106968, upload-time = "2026-09-15T19:34:23.619Z" },+ { url = "https://files.pythonhosted.org/packages/da/4f/2df41fd738d46f23ef829ae8b4468d94bb6070038fc6dfab6165ed44fea8/yarl-1.25.1-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:dbcef5a9119ef653653132cccaf999b30a0af6f33bb0a4ba80bec30056868487", size = 114717, upload-time = "2026-09-15T19:34:25.879Z" },+ { url = "https://files.pythonhosted.org/packages/69/ea/002b66df53bbd1aed1c23358ff99c9bdc744fe3f4d2740e1b2fdd7192885/yarl-1.25.1-cp315-cp315t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:7efc9f082dfed77c316edffa9deb52888e1bc6789171887cc1f68e06d65465c8", size = 105198, upload-time = "2026-09-15T19:34:28.204Z" },+ { url = "https://files.pythonhosted.org/packages/b1/7c/95c8bc0c8f97d71e59c94525ad60d76f5c57d3f2820f08137ca8b9f0542a/yarl-1.25.1-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:fe01645169a2112aa1d4ebc3e4c5f029c5c8f97adfc32e5d37c993b39a994d75", size = 120271, upload-time = "2026-09-15T19:34:30.5Z" },+ { url = "https://files.pythonhosted.org/packages/5d/7a/6fe9da56ec77927baa669fd86c39c567ce6205bab53d581082c6744c8ae7/yarl-1.25.1-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d1c557dfd5e3db046053a0bdc72261ade790ebe8e2c7a41b36b0ca1f14cb95f3", size = 123572, upload-time = "2026-09-15T19:34:32.73Z" },+ { url = "https://files.pythonhosted.org/packages/8b/83/35f222d17fa70a14c7c74fdf112ccf5515e0c2a87082b1f9b99f7693bf57/yarl-1.25.1-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8ce4d6ccafb33d39bd78444612d14938ead674c25702ded2ee9c54a47735d225", size = 115228, upload-time = "2026-09-15T19:34:35.344Z" },+ { url = "https://files.pythonhosted.org/packages/da/6f/fbaaf619423578a7d898d0f226ae47bc1906c293865c416d83c17b828b0e/yarl-1.25.1-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:80a063f8297fc796296f00f100be520f209b23dc98f93ce8eba6ee7122598209", size = 111618, upload-time = "2026-09-15T19:34:37.656Z" },+ { url = "https://files.pythonhosted.org/packages/ba/78/7383278f1b3cf8e0496bd95b3281a7b09b89217b6b428db24c6b99b3deca/yarl-1.25.1-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:7cb414a73e21a7ab58254926073f2930cb22f5b4314ea4260a687e2b3fd4dce3", size = 114839, upload-time = "2026-09-15T19:34:40.099Z" },+ { url = "https://files.pythonhosted.org/packages/62/49/5506e5b6d29aab91bd845cc9016d88c3d3f81b81bc242b8100bdd5737825/yarl-1.25.1-cp315-cp315t-musllinux_1_2_armv7l.whl", hash = "sha256:85a18376073f8a39aa07be34f9fc77e2869aa72c55c441efdd2cf79a0407504d", size = 106212, upload-time = "2026-09-15T19:34:42.768Z" },+ { url = "https://files.pythonhosted.org/packages/46/8a/19877c193b7c5929f4b07118c18bbe390f3fadd0f59dd98c0cd12b31fa5c/yarl-1.25.1-cp315-cp315t-musllinux_1_2_ppc64le.whl", hash = "sha256:77716e245c90f058466a05e6a465bb8600f767a8f4b18b4d40f3aff958e5f73c", size = 119985, upload-time = "2026-09-15T19:34:44.976Z" },+ { url = "https://files.pythonhosted.org/packages/4e/6c/0a46fbbf9ecbcbd0cc20d2193394254b9e19817f22c814aab60f99847400/yarl-1.25.1-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:1e80dcf1446e1b080b1932b0d103c464a04112f5bc31f0f983ad418172063cde", size = 112081, upload-time = "2026-09-15T19:34:47.45Z" },+ { url = "https://files.pythonhosted.org/packages/ef/30/93f5d471230c74ccd06255d0842739f86551f937f9e63a5e947853c6244a/yarl-1.25.1-cp315-cp315t-musllinux_1_2_s390x.whl", hash = "sha256:bdc8d8b8c22e9e43ac68316b5e6cf083dec537f4ec213cb4aa967b583bc3fa64", size = 116995, upload-time = "2026-09-15T19:34:49.972Z" },+ { url = "https://files.pythonhosted.org/packages/2b/80/c386593035ee3f9c6c6af0847b5578f2830c674794a9d7701b744a3ebd42/yarl-1.25.1-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:dfbf531053a0935f2e871bcd4753f90313688772ff8c017f5ea402e315a78c1f", size = 115570, upload-time = "2026-09-15T19:34:52.628Z" },+ { url = "https://files.pythonhosted.org/packages/38/02/eef443559563ef8f2e10469387b8b1e97cb5efee95b288a56da60801f7ee/yarl-1.25.1-cp315-cp315t-win_amd64.whl", hash = "sha256:b13b88747769537f3d32e89e3a735da10c0a9e35d7322928c701b5f93d3afffd", size = 106811, upload-time = "2026-09-15T19:34:54.935Z" },+ { url = "https://files.pythonhosted.org/packages/88/91/41e284ca2cf5211e05dae031d126a3668aea88fa759df56e7e35c6ad25ba/yarl-1.25.1-cp315-cp315t-win_arm64.whl", hash = "sha256:783dd1467083f4d3f7722ad6a313f24c173e7571372738fcb7a6e6d1ba48df25", size = 101804, upload-time = "2026-09-15T19:34:57.231Z" },+ { url = "https://files.pythonhosted.org/packages/54/22/318c7980066769c6bcd9221ed2248294f5698811da099013098c670565ed/yarl-1.25.1-py3-none-any.whl", hash = "sha256:681c758b0490f9e96b78e5fa8e8dc6e648e9185bb6eaebe73183c33ea0c445f3", size = 63617, upload-time = "2026-09-15T19:34:59.616Z" },+]diff --git a/sdk/webdemo/.gitignore b/sdk/webdemo/.gitignorenew file mode 100644index 0000000..8fce603--- /dev/null+++ b/sdk/webdemo/.gitignore@@ -0,0 +1 @@+data/diff --git a/sdk/webdemo/block_recompute.py b/sdk/webdemo/block_recompute.pynew file mode 100644index 0000000..6299f53--- /dev/null+++ b/sdk/webdemo/block_recompute.py@@ -0,0 +1,116 @@+from __future__ import annotations++import copy+import json+import time+from pathlib import Path+from typing import Dict, Optional++from minicpmvocr import assemble_markdown, load_prompt_map+from minicpmvocr._utils import append_jsonl, write_json+from minicpmvocr.pipeline._blocks import _execute_block+from minicpmvocr.pipeline._text import _normalize_and_dedupe_blocks+from minicpmvocr.pipeline.rm_client import RMClient+++def _prior_from_block(block: Dict) -> Optional[Dict]:++ tts = block.get("tts") or {}+ text = block.get("raw_content") or ""+ idx = tts.get("best_index")+ scores = tts.get("scores") or []+ verdicts = tts.get("verdicts") or []+ picked = isinstance(idx, int) and 0 <= idx < len(scores)+ score = tts.get("best_score")+ if score is None and picked:+ score = scores[idx]+++ verdict = verdicts[idx] if picked and idx < len(verdicts) else "scored"+ if not text or score is None or tts.get("rm_error") or verdict != "scored":+ return None+ return {"text": text, "score": float(score), "verdict": verdict}+++def _tts_cfg_for(tts_cfg: Dict, prefilled: bool) -> Dict:++ cfg = copy.deepcopy(tts_cfg)+ rounds = list((cfg.get("adaptive") or {}).get("rounds") or [])+ if rounds:+ first = dict(rounds[0])+ if prefilled:+ first["prefilled"] = True+ else:+ first.pop("prefilled", None)+ rounds[0] = first+ cfg["adaptive"]["rounds"] = rounds++ cfg["rm_batch"] = {"max_items": 1}+ return cfg+++def rerun_block(cfg: Dict, run_dir, image_id: str, order: int, *,+ engine, rm_client: Optional[RMClient] = None) -> Dict:+ 'Recompute one block of a finished run with adaptive resampling.'+ tts_cfg = cfg.get("tts") or {}+ if not (tts_cfg.get("enabled") and (tts_cfg.get("adaptive") or {}).get("enabled")):+ raise ValueError("rerun_block 需要 tts.enabled 与 tts.adaptive.enabled 都为真")++ run_dir = Path(run_dir)+ inter = run_dir / "runtime" / "intermediate"+ layout = json.loads((inter / "layouts" / f"{image_id}.json").read_text(encoding="utf-8"))+ result_path = run_dir / "results_json" / f"{image_id}.json"+ result = json.loads(result_path.read_text(encoding="utf-8"))++ layout_block = next((b for b in layout.get("blocks", []) if b.get("order") == order), None)+ if layout_block is None:+ raise KeyError(f"{image_id} 没有 order={order} 的版面块")+ crop_blocks = result.get("crop_blocks") or []+ old_idx = next((i for i, b in enumerate(crop_blocks) if b.get("order") == order), None)+ old_block = crop_blocks[old_idx] if old_idx is not None else {}++ prompt_map = load_prompt_map(cfg)+ prior = _prior_from_block(old_block)+ run_tts_cfg = _tts_cfg_for(tts_cfg, prefilled=prior is not None)+ own_client = rm_client is None+ client = RMClient(run_tts_cfg) if own_client else rm_client+ try:+ out = _execute_block(+ engine, prompt_map, image_id, inter / "crops" / image_id,+ layout_block, rm_client=client, tts_cfg=run_tts_cfg,+ prior_candidate=prior,+ )+ finally:+ if own_client:+ client.close()++ new_block = out["result_block"]+ if "upright" in old_block:+ new_block["upright"] = old_block["upright"]+ if old_idx is None:+ crop_blocks.append(new_block)+ else:+ crop_blocks[old_idx] = new_block+ final_blocks = _normalize_and_dedupe_blocks(crop_blocks)+ markdown = assemble_markdown(final_blocks, prompt_map)++ result["crop_blocks"] = final_blocks+ result["markdown"] = markdown+ write_json(result_path, result)+ (run_dir / "output" / f"{image_id}.md").write_text(markdown, encoding="utf-8")++ record = {+ "image_id": image_id,+ "order": order,+ "rerun_at": time.strftime("%Y-%m-%d %H:%M:%S"),+ "prior_used": prior is not None,+ "replaced": old_block,+ "result_block": new_block,+ }+ if out.get("tts_dump"):+ record["tts_dump"] = out["tts_dump"]+ append_jsonl(run_dir / "runtime" / "block_reruns.jsonl", record)+ return {"result_block": new_block, "prior_used": prior is not None, "replaced": old_block}+++__all__ = ["rerun_block"]diff --git a/sdk/webdemo/dispatcher.py b/sdk/webdemo/dispatcher.pynew file mode 100644index 0000000..3123e0c--- /dev/null+++ b/sdk/webdemo/dispatcher.py@@ -0,0 +1,22 @@+#!/usr/bin/env python3++from __future__ import annotations++import os+import time++import obs_jobs+from model_manager import Runner+++def main() -> None:+ if os.environ.get("OCR_DISPATCH_RECOVER") == "1":+ obs_jobs.recover_interrupted()+ runner = Runner()+ while True:+ obs_jobs.dispatch_queued(runner)+ time.sleep(0.2)+++if __name__ == "__main__":+ main()diff --git a/sdk/webdemo/docker/Dockerfile b/sdk/webdemo/docker/Dockerfilenew file mode 100644index 0000000..155c5e8--- /dev/null+++ b/sdk/webdemo/docker/Dockerfile@@ -0,0 +1,46 @@+ARG BASE_IMAGE+FROM ${BASE_IMAGE}++COPY models/ocr /opt/models/ocr+COPY models/layout /opt/models/layout+COPY models/rm /opt/models/rm+COPY models/paddle_upright /opt/models/paddle_upright+RUN test -f /opt/models/ocr/config.json && test -f /opt/models/layout/inference.pdiparams \+ && test -f /opt/models/rm/model.safetensors && test -d /opt/models/paddle_upright/PP-LCNet_x1_0_doc_ori++COPY rm/node /usr/local/bin/node+COPY rm/ocr_rm_serving /opt/ocr-rm-serving/ocr_rm_serving+COPY rm/vendor /opt/ocr-rm-serving/vendor++COPY app /opt/app+RUN uv pip install --python /opt/venv/bin/python --no-build-isolation --no-deps -e /opt/app \+ && /opt/venv/bin/python -c "import minicpmvocr, sys; assert minicpmvocr.__file__.startswith('/opt/app/'), minicpmvocr.__file__"++COPY entrypoint.sh /entrypoint.sh+RUN printf '#!/usr/bin/env bash\nexec /entrypoint.sh "$@"\n' > /usr/local/bin/vllm \+ && chmod +x /entrypoint.sh /usr/local/bin/node /usr/local/bin/vllm++ENV OCR_MODEL_PATH=/opt/models/ocr \+ RM_MODEL_PATH=/opt/models/rm \+ OCR_RM_MODEL_DIR=/opt/models/rm \+ OCR_SERVED_NAME=minicpm-ocr \+ OCR_SERVED_MODEL_NAME=minicpm-ocr \+ VLLM_URL=http://127.0.0.1:18499 \+ OCR_VLLM_URL=http://127.0.0.1:18499 \+ OCR_LAYOUT_MODEL_DIR=/opt/models/layout \+ OCR_LAYOUT_DEVICE=cuda:0 \+ OCR_UPRIGHT_DIR=/opt/models/paddle_upright \+ OCR_RM_URL=http://127.0.0.1:8012 \+ OCR_RM_INPUT_FORM=binary \+ OCRWEB_DATA_DIR=/tmp/webdemo-data \+ VLLM_GDN_PREFILL_BACKEND=triton \+ VLLM_USE_FLASHINFER_SAMPLER=0 \+ VLLM_PLUGINS=lora_filesystem_resolver,lora_hf_hub_resolver \+ PYTHONNOUSERSITE=1 \+ PORT=8000++EXPOSE 8000+HEALTHCHECK --interval=30s --timeout=5s --start-period=1200s --retries=3 \+ CMD curl -fs http://127.0.0.1:${PORT}/ready >/dev/null || exit 1+ENTRYPOINT ["/entrypoint.sh"]+CMD []diff --git a/sdk/webdemo/docker/build.sh b/sdk/webdemo/docker/build.shnew file mode 100755index 0000000..6be6d31--- /dev/null+++ b/sdk/webdemo/docker/build.sh@@ -0,0 +1,29 @@+#!/usr/bin/env bash+set -euo pipefail+HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"+source "$HERE/../../scripts/demo_env.sh" webdemo+: "${BASE_IMAGE:?Set BASE_IMAGE to a CUDA image with vLLM, PaddlePaddle, PaddleOCR and uv}"+: "${OCR_RM_MODEL_DIR:?Set OCR_RM_MODEL_DIR to the RM model directory}"+: "${OCR_RM_SERVING_ROOT:?Set OCR_RM_SERVING_ROOT to the RM service directory containing ocr_rm_serving and vendor}"+: "${RM_NODE_BIN:?Set RM_NODE_BIN to a Linux Node.js executable}"+IMAGE="${IMAGE:-minicpm-ocr-webdemo:latest}"+for directory in "$OCR_MODEL_PATH" "$OCR_LAYOUT_MODEL_DIR" "$OCR_RM_MODEL_DIR" "$OCR_UPRIGHT_DIR" \+ "$OCR_RM_SERVING_ROOT/ocr_rm_serving" "$OCR_RM_SERVING_ROOT/vendor"; do+ [[ -d "$directory" ]] || { echo "Missing directory: $directory" >&2; exit 1; }+done+[[ -f "$RM_NODE_BIN" ]] || { echo "Node.js executable not found: $RM_NODE_BIN" >&2; exit 1; }+context="$(mktemp -d)"+trap 'rm -rf "$context"' EXIT+mkdir -p "$context/models" "$context/rm" "$context/app"+cp "$HERE/Dockerfile" "$HERE/entrypoint.sh" "$context/"+cp -a "$OCR_MODEL_PATH" "$context/models/ocr"+cp -a "$OCR_LAYOUT_MODEL_DIR" "$context/models/layout"+cp -a "$OCR_RM_MODEL_DIR" "$context/models/rm"+cp -a "$OCR_UPRIGHT_DIR" "$context/models/paddle_upright"+cp "$RM_NODE_BIN" "$context/rm/node"+cp -a "$OCR_RM_SERVING_ROOT/ocr_rm_serving" "$OCR_RM_SERVING_ROOT/vendor" "$context/rm/"+tar -C "$SDK_ROOT" --exclude=.git --exclude='.venv*' --exclude=data --exclude=runs \+ --exclude=build --exclude=dist --exclude='*.egg-info' --exclude=__pycache__ --exclude=.env \+ --exclude=env.local.sh -cf - . | tar -C "$context/app" -xf -+docker build --build-arg "BASE_IMAGE=$BASE_IMAGE" -t "$IMAGE" "$context"+printf 'Built %s\n' "$IMAGE"diff --git a/sdk/webdemo/docker/entrypoint.sh b/sdk/webdemo/docker/entrypoint.shnew file mode 100755index 0000000..39b49dd--- /dev/null+++ b/sdk/webdemo/docker/entrypoint.sh@@ -0,0 +1,142 @@+#!/usr/bin/env bash+++set -Eeuo pipefail+unset https_proxy http_proxy all_proxy HTTPS_PROXY HTTP_PROXY ALL_PROXY++if (( $# > 0 )); then+ [[ "$1" == vllm ]] && shift+ [[ "${1:-}" == serve ]] && shift+ IGNORED=()+ while (( $# )); do+ case "$1" in+ --port) PORT=$2; shift 2 ;;+ --port=*) PORT=${1#*=}; shift ;;+ --served-model-name) LIS_SERVED_MODEL_NAME=$2; shift 2 ;;+ --served-model-name=*) LIS_SERVED_MODEL_NAME=${1#*=}; shift ;;+ *) IGNORED+=("$1"); shift ;;+ esac+ done+ echo "[entry] LIS 启动参数:端口=$PORT 服务名=${LIS_SERVED_MODEL_NAME:-};忽略 ${#IGNORED[@]} 项: ${IGNORED[*]}"+fi++: "${PORT:=8000}"+for f in "$OCR_MODEL_PATH/config.json" "$RM_MODEL_PATH/model.safetensors" "$OCR_LAYOUT_MODEL_DIR/inference.pdiparams"; do+ [[ -f "$f" ]] || { echo "[entry] ❌ 镜像自带权重缺失:$f(权重目录被挂载覆盖了?)" >&2; exit 1; }+done+OCR_PORT=18499+RM_VLLM_PORT=18520+RM_PORT=8012+STARTUP_TIMEOUT_SEC=${STARTUP_TIMEOUT_SEC:-1800}+OCR_GPU_UTIL=${OCR_GPU_UTIL:-0.40}+RM_GPU_UTIL=${RM_GPU_UTIL:-0.30}+GPU_MEM_MIB=$(nvidia-smi --query-gpu=memory.total --format=csv,noheader,nounits 2>/dev/null | head -1 | tr -d ' ')+if [[ -z "${RM_MAX_NUM_BATCHED_TOKENS:-}" ]]; then++ if (( ${GPU_MEM_MIB:-0} >= 45000 )); then RM_MAX_NUM_BATCHED_TOKENS=24576; else RM_MAX_NUM_BATCHED_TOKENS=8192; fi+fi+echo "[entry] gpu ${GPU_MEM_MIB:-?}MiB OCR=$OCR_GPU_UTIL RM=$RM_GPU_UTIL(batched=$RM_MAX_NUM_BATCHED_TOKENS) webdemo=:$PORT"++declare -A PIDS=()+shutdown() {+ trap - TERM INT+ for name in "${!PIDS[@]}"; do kill -TERM "${PIDS[$name]}" 2>/dev/null || true; done+ wait || true+}+trap 'shutdown; exit 143' TERM INT+++start() {+ local name=$1; shift+ ( "$@" ) > >(sed -u "s/^/[$name] /") 2>&1 &+ PIDS[$name]=$!+}++wait_http() {+ local name=$1 url=$2+ local deadline=$((SECONDS + STARTUP_TIMEOUT_SEC))+ until curl -fs -m 5 "$url" >/dev/null 2>&1; do+ kill -0 "${PIDS[$name]}" 2>/dev/null || { echo "[entry] ❌ $name 启动期间退出" >&2; shutdown; exit 1; }+ (( SECONDS < deadline )) || { echo "[entry] ❌ $name 就绪超时: $url" >&2; shutdown; exit 1; }+ sleep 3+ done+ echo "[entry] ✅ $name 就绪 (${SECONDS}s)"+}++run_ocr() {++ exec /opt/venv/bin/python -m vllm.entrypoints.openai.api_server \+ --model "$OCR_MODEL_PATH" --served-model-name "$OCR_SERVED_NAME" --trust-remote-code \+ --host 127.0.0.1 --port "$OCR_PORT" \+ --max-model-len 40960 --max-num-batched-tokens 8192 --max-num-seqs 256 \+ --limit-mm-per-prompt '{"image": 36}' \+ --mm-processor-kwargs '{"downsample_mode":"4x","max_slice_nums":9}' \+ --gpu-memory-utilization "$OCR_GPU_UTIL" \+ --attention-backend FLASH_ATTN --trust-request-mm-kwargs \+ --gdn-prefill-backend "$VLLM_GDN_PREFILL_BACKEND" \+ --uvicorn-log-level warning+}++run_rm_vllm() {+++ exec /opt/venv/bin/python -m vllm.entrypoints.openai.api_server \+ --model "$RM_MODEL_PATH" --served-model-name rm-minicpm-binary --trust-remote-code \+ --host 127.0.0.1 --port "$RM_VLLM_PORT" \+ --max-model-len 16384 --max-num-seqs 64 --max-num-batched-tokens "$RM_MAX_NUM_BATCHED_TOKENS" \+ --limit-mm-per-prompt '{"image":36}' --max-logprobs 20 \+ --gpu-memory-utilization "$RM_GPU_UTIL" \+ --chat-template-content-format string \+ --uvicorn-log-level warning+}++run_rm_service() {+ cd /opt/ocr-rm-serving+ export RM_VLLM_BASE=http://127.0.0.1:$RM_VLLM_PORT/v1 RM_HOST=127.0.0.1 RM_PORT+ export RM_PROFILE=tts RM_VLLM_CONCURRENCY=${RM_VLLM_CONCURRENCY:-32}+ export RM_BACKEND_MAX_NUM_SEQS=64 RM_BACKEND_MAX_NUM_BATCHED_TOKENS=$RM_MAX_NUM_BATCHED_TOKENS+ export RM_MAX_ITEMS=${RM_MAX_ITEMS:-64} RM_THRESHOLD=${RM_THRESHOLD:-0.5}++ export RM_RENDER_ENABLED=0 RM_NODE_BIN=/usr/local/bin/node+ export RM_WORK_ROOT=/tmp/rm_service_work RM_KEEP_WORK=${RM_KEEP_WORK:-0}+ mkdir -p "$RM_WORK_ROOT"+ exec /opt/venv/bin/python -m ocr_rm_serving+}++run_webdemo() {+ export LIS_SERVED_MODEL_NAME="${LIS_SERVED_MODEL_NAME:-}"+ mkdir -p "$OCRWEB_DATA_DIR"+ cd /opt/app/webdemo+ exec /opt/venv/bin/python -s -m uvicorn server:app --host 0.0.0.0 --port "$PORT" --workers 1+}++start ocr run_ocr+wait_http ocr "http://127.0.0.1:$OCR_PORT/v1/models"+start rm-vllm run_rm_vllm+wait_http rm-vllm "http://127.0.0.1:$RM_VLLM_PORT/v1/models"+start rm run_rm_service+wait_http rm "http://127.0.0.1:$RM_PORT/healthz"+start webdemo run_webdemo+wait_http webdemo "http://127.0.0.1:$PORT/ready"+++/opt/venv/bin/python - "$PORT" <<'PY' || echo "[entry] ⚠ 预热失败,首个请求会慢" >&2+import base64, io, json, sys, urllib.request+from PIL import Image+buf = io.BytesIO(); Image.new("RGB", (800, 600), "white").save(buf, "PNG")+body = json.dumps({"model": "minicpm-ocr", "page_index": 0,+ "image": "data:image/png;base64," + base64.b64encode(buf.getvalue()).decode()}).encode()+req = urllib.request.Request(f"http://127.0.0.1:{sys.argv[1]}/api/image-parse", data=body,+ headers={"Content-Type": "application/json"})+urllib.request.urlopen(req, timeout=600).read()+PY+echo "[entry] ✅ 全链就绪 ${SECONDS}s:webdemo :$PORT"++set +e+wait -n "${PIDS[@]}"+code=$?+for name in "${!PIDS[@]}"; do+ kill -0 "${PIDS[$name]}" 2>/dev/null || echo "[entry] ❌ 子进程 $name 已退出" >&2+done+shutdown+exit $(( code == 0 ? 1 : code ))diff --git a/sdk/webdemo/model_manager.py b/sdk/webdemo/model_manager.pynew file mode 100644index 0000000..3f62747--- /dev/null+++ b/sdk/webdemo/model_manager.py@@ -0,0 +1,212 @@+#!/usr/bin/env python3++from __future__ import annotations++import contextlib+import copy+import hashlib+import os+import queue+import sys+import threading+import time+from pathlib import Path+from typing import Dict, Iterator, Optional++BASE = Path(__file__).resolve().parent+REPO = BASE.parent+if str(REPO) not in sys.path:+ sys.path.insert(0, str(REPO))++import minicpmvocr # noqa: E402+from minicpmvocr import ( # noqa: E402+ create_backend,+ create_layout_detector,+ load_config,+)+from block_recompute import rerun_block # noqa: E402++CONFIG_PATH = Path(os.environ.get(+ "OCRWEB_CONFIG",+ Path(minicpmvocr.__file__).parent / "configs" / "minicpmvocr.yaml",+))+DATA_DIR = Path(os.environ.get("OCRWEB_DATA_DIR", BASE / "data"))+JOBS_DIR = DATA_DIR / "jobs"+++LAYOUT_WORKERS = int(os.environ.get("OCR_LAYOUT_WORKERS", "3"))++UPRIGHT_WORKERS = int(os.environ.get("OCR_UPRIGHT_WORKERS", "8"))+++WEBUI_OVERRIDES: Dict = {+ "pipeline": {+ "overlap_layout": True,+ "save_crops": False,+ "save_pages": False,+ },+ "logging": {"progress_log_every": 5},+}+++RM_URL = "${OCR_RM_URL:-http://127.0.0.1:8000}"+RM_INPUT_FORM = "${OCR_RM_INPUT_FORM:-}"++_TTS_SCORE = {+ "enabled": True,+ "n": 1,+ "force_score": True,+ "rm_anchor_min_side": None,+ "sampling": {"temperature": 1.0, "top_k": 0, "top_p": 1.0, "min_p": 0, "seed": 20260911},+ "rm_url": RM_URL,+ "rm_input_form": RM_INPUT_FORM,+ "timeout_sec": 300,+ "fallback_to_greedy": True,+ "dump_candidates": True,+ "rm_batch": {"max_items": 4, "max_wait_ms": 50},+}+_ADAPTIVE_ROUNDS = [{"greedy": True}] + [+ {"temperature": t, "top_k": 0, "top_p": 1.0, "min_p": 0, "n": 8}+ for t in (0.3, 0.5, 0.7, 1.0)+]+TTS_RECIPES: Dict[str, Dict] = {+ "ocr": {"enabled": False},+ "score": _TTS_SCORE,+ "adaptive": dict(_TTS_SCORE, adaptive={+ "enabled": True,+ "tau": 0.98,+ "n_max": None,+ "seed_base": 20260918,+ "rounds": _ADAPTIVE_ROUNDS,+ }),+}+DEFAULT_MODE = "ocr"+SUPPORTED_SUFFIXES = {".pdf", ".png", ".jpg", ".jpeg", ".bmp", ".webp", ".tif", ".tiff"}+++def new_job_id() -> str:+ '生成唯一 job id,同时也用作 request_id(32 位小写 hex)。'+ return hashlib.md5(os.urandom(16) + str(time.time()).encode()).hexdigest()+++def _webui_overrides(**sections) -> Dict:++ merged = {key: dict(value) for key, value in WEBUI_OVERRIDES.items()}+ for key, value in sections.items():+ merged.setdefault(key, {}).update(value)+ server_urls = [url.strip() for url in os.environ.get("VLLM_URLS", "").split(",") if url.strip()]+ if server_urls:+ merged.setdefault("engine", {}).update(server_url="", server_urls=server_urls)+ return merged+++class Runner:+ '模型只加载一次,跨请求复用。线程安全。'++ def __init__(self) -> None:+ JOBS_DIR.mkdir(parents=True, exist_ok=True)+ self._res_lock = threading.Lock()+ self._engine = None+ self._slots: "queue.Queue[Dict]" = queue.Queue()+ self._slot_count = 0+ self._upright_pool = None+ self._upright_loaded = False+++ def build_cfg(self, job_id: str, upright: bool,+ mode: str = DEFAULT_MODE, save_crops: bool = False) -> Dict:+ '构建一次请求的完整 SDK 配置。'+ job_dir = JOBS_DIR / job_id+ overrides = _webui_overrides(+ run={+ "run_tag": job_id,+ "run_root": str(JOBS_DIR),+ "mode": "full",+ },+ input={+ "files_dir": str(job_dir / "input"),+ "file_path": "",+ "image_dir": "",+ "manifest": "",+ "limit": 0,+ },+ upright={"enabled": bool(upright)},+ pipeline={"save_crops": bool(save_crops)},++ tts=copy.deepcopy(TTS_RECIPES[mode]),+ )+ return load_config(str(CONFIG_PATH), overrides)+++ def _ensure_started(self, cfg: Dict) -> None:++ with self._res_lock:+ if self._engine is not None:+ return+ for _ in range(max(1, LAYOUT_WORKERS)):+ self._slots.put(self._build_slot(cfg))+ self._slot_count += 1+ try:+ from minicpmvocr.pipeline.upright import build_upright_fleet, build_upright_pool+ local_pool = build_upright_pool(cfg, UPRIGHT_WORKERS)+ registry = os.environ.get(+ "OCR_UPRIGHT_REGISTRY",+ str(DATA_DIR / "upright-workers"),+ )+ if local_pool is None:+ self._upright_pool = None+ elif str(registry).strip():+ self._upright_pool = build_upright_fleet(local_pool, registry)+ else:+ self._upright_pool = local_pool+ self._upright_loaded = self._upright_pool is not None+ except Exception as exc:+ print(f"[model_manager] upright unavailable: {exc}", flush=True)+ engine = create_backend(cfg)+ engine.start()+ self._engine = engine++ def _build_slot(self, cfg: Dict) -> Dict:+ detector = create_layout_detector(cfg["layout"])+ detector.start()+ return {"detector": detector}++ def borrow(self, cfg: Dict) -> Dict:+ '借一套版面模型。用完调用 release,不必等到这一页的切片结束。'+ self._ensure_started(cfg)+ return self._slots.get()++ def release(self, slot: Dict) -> None:+ self._slots.put(slot)++ def resources_for(self, slot: Dict) -> Dict:+ return {"detectors": [slot["detector"]], "upright": self._upright_pool,+ "engine": self._engine}++ @contextlib.contextmanager+ def acquire(self, cfg: Dict) -> Iterator[Dict]:+ '借一套版面模型;摆正队列是所有请求共用的。'+ slot = self.borrow(cfg)+ try:+ yield self.resources_for(slot)+ finally:+ self.release(slot)++ def resources_status(self) -> Dict:+ return {+ "loaded": self._engine is not None,+ "layout_workers": self._slot_count,+ "layout_idle": self._slots.qsize(),+ "upright": self._upright_loaded,+ "engine": self._engine is not None,+ }+++ def recompute_block(self, job_id: str, image_id: str, order: int) -> Dict:+ '对一个已识别块做自适应重采。'+ cfg = self.build_cfg(job_id, upright=False, mode="adaptive")+ self._ensure_started(cfg)+ return rerun_block(+ cfg, JOBS_DIR / job_id, image_id, int(order),+ engine=self._engine,+ )diff --git a/sdk/webdemo/obs_jobs.py b/sdk/webdemo/obs_jobs.pynew file mode 100644index 0000000..54c5aea--- /dev/null+++ b/sdk/webdemo/obs_jobs.py@@ -0,0 +1,345 @@+from __future__ import annotations++import json+import os+import re+import subprocess+import threading+import time+from pathlib import Path+from typing import Dict, Optional, Tuple++from model_manager import DATA_DIR, JOBS_DIR, new_job_id++OBSUTIL = os.environ.get(+ "OBSUTIL",+ "obsutil",+)+OBS_ENDPOINT = os.environ.get(+ "OBS_ENDPOINT",+ "",+)+DEFAULT_BUCKET = os.environ.get("OBS_BUCKET", "")+OBS_ROOT = DATA_DIR / "obs_jobs"+MAX_PAGES = 500+ALLOWED_SUFFIXES = {".pdf", ".png", ".jpg", ".jpeg", ".bmp", ".webp", ".tif", ".tiff"}+_JOB_ID = re.compile(r"^[a-f\d]{32}$")+_THREADS: Dict[str, threading.Thread] = {}+_GUARD = threading.Lock()+++def parse_object_ref(body: Dict) -> Tuple[str, str]:+ '把请求里的桶内对象收成 (bucket, key)。'+ raw = str(body.get("id") or body.get("object") or "").strip()+ bucket = str(body.get("bucket") or "").strip()+ if raw.startswith("obs://"):+ rest = raw[len("obs://"):]+ parsed_bucket, _, key = rest.partition("/")+ bucket = parsed_bucket or bucket+ else:+ key = raw+ if not bucket:+ bucket = DEFAULT_BUCKET+ prefix = bucket + "/"+ if key.startswith(prefix):+ key = key[len(prefix):]+ if not bucket or not key or key.startswith("/") or any(part == ".." for part in key.split("/")):+ raise ValueError("id 需要是华为云对象名,或 obs://桶名/对象名")+ suffix = Path(key).suffix.lower()+ if suffix not in ALLOWED_SUFFIXES:+ raise ValueError("只接受 PDF 或图片(png/jpg/webp/bmp/tif)")+ return bucket, key+++def submit(body: Dict, runner) -> Dict:+ bucket, key = parse_object_ref(body)+ model = str(body.get("model") or "minicpm-ocr")+ if model not in ("minicpm-ocr", "minicpm-ocr-stp", "minicpm-ocr-tts"):+ raise ValueError("model 只能是 minicpm-ocr / minicpm-ocr-stp / minicpm-ocr-tts")+ import page_fleet+ if "upright" in body:+ upright = page_fleet.coerce_upright(body.get("upright"))+ else:+ upright = None+ job_id = new_job_id()+ record = {+ "id": job_id,+ "status": "Running",+ "phase": "download",+ "bucket": bucket,+ "object": key,+ "model": model,+ "pages_done": 0,+ "pages_total": None,+ "error": "",+ }+ if upright is not None:+ record["upright"] = upright+ if os.environ.get("OCR_PAGE_ROLE") == "gateway":+ record["phase"] = "queued"+ _write_state(job_id, record)+ return {"id": job_id, "status": "Running"}+ _write_state(job_id, record)+ thread = threading.Thread(+ target=_run,+ args=(job_id, bucket, key, model, runner),+ name=f"obs-parse-{job_id[:8]}",+ daemon=True,+ )+ with _GUARD:+ _THREADS[job_id] = thread+ thread.start()+ return {"id": job_id, "status": "Running"}+++def lookup(job_id: str) -> Optional[Dict]:+ if not _JOB_ID.match(job_id):+ return None+ state = _read_state(job_id)+ if state is None:+ return None+ if state.get("status") == "Success":+ result = _read_json(_result_path(job_id))+ if result:+ return result+ if state.get("status") == "Running" and state.get("phase") == "parse":+ state["pages_done"] = _pages_done(job_id)+ public = {+ "id": state.get("id", job_id),+ "status": state.get("status", "Running"),+ "pages_done": state.get("pages_done", 0),+ "pages_total": state.get("pages_total"),+ }+ if state.get("status") == "Failed":+ public["error"] = state.get("error") or "识别失败"+ return public+++def recover_interrupted() -> None:+ '进程重启后,原先还在跑的任务不会自己继续,标成 Failed。'+ if not OBS_ROOT.is_dir():+ return+ for path in OBS_ROOT.glob("*/state.json"):+ state = _read_json(path)+ if state.get("status") != "Running":+ continue+ state["status"] = "Failed"+ state["error"] = "服务重启,解析已中断"+ _write_json(path, state)+++def dispatch_queued(runner) -> None:+ '分发进程领走用户进程写下的排队任务。领走之后才下载、拆页。'+ if not OBS_ROOT.is_dir():+ return+ for path in list(OBS_ROOT.glob("*/state.json")):+ state = _read_json(path)+ if state.get("status") != "Running" or state.get("phase") != "queued":+ continue+ job_id = str(state.get("id") or path.parent.name)+ if not _claim(job_id):+ continue+ thread = threading.Thread(+ target=_run,+ args=(job_id, state.get("bucket") or "", state.get("object") or "", state.get("model") or "minicpm-ocr", runner),+ name=f"obs-parse-{job_id[:8]}",+ daemon=True,+ )+ with _GUARD:+ _THREADS[job_id] = thread+ thread.start()+++def _claim(job_id: str) -> bool:+ flag = OBS_ROOT / job_id / "dispatcher.claim"+ try:+ fd = os.open(flag, os.O_CREAT | os.O_EXCL | os.O_WRONLY, 0o644)+ except FileExistsError:+ return False+ os.close(fd)+ _update(job_id, phase="download")+ return True+++def _run(job_id: str, bucket: str, key: str, model: str, runner) -> None:+ try:+ local = _download(job_id, bucket, key)+ pages_total = _count_pages(local)+ if pages_total > MAX_PAGES:+ raise RuntimeError(f"文件有 {pages_total} 页,超过 {MAX_PAGES} 页")+ _update(job_id, phase="parse", pages_total=pages_total, pages_done=0)+ _parse(job_id, local, model, runner)+ result = _assemble(job_id, bucket, key, pages_total)+ _write_json(_result_path(job_id), result)+ _update(job_id, status="Success", phase="done", pages_done=pages_total, pages_total=pages_total)+ except Exception as exc:+ _update(job_id, status="Failed", phase="done", error=_public_error(exc))+++def _download(job_id: str, bucket: str, key: str) -> str:+ if not OBS_ENDPOINT:+ raise RuntimeError("Set OBS_ENDPOINT before downloading OBS objects")+ dest_dir = JOBS_DIR / job_id / "input"+ dest_dir.mkdir(parents=True, exist_ok=True)+ local = dest_dir / Path(key).name+ ak, sk = _credentials()+ env = os.environ.copy()+ for name in ("http_proxy", "https_proxy", "HTTP_PROXY", "HTTPS_PROXY", "all_proxy", "ALL_PROXY"):+ env.pop(name, None)+ env["no_proxy"] = "*"+ env["NO_PROXY"] = "*"+ proc = subprocess.run(+ [+ OBSUTIL, "cp", f"obs://{bucket}/{key}", str(local),+ f"-e={OBS_ENDPOINT}", f"-i={ak}", f"-k={sk}",+ ],+ capture_output=True,+ text=True,+ env=env,+ )+ if proc.returncode != 0 or not local.is_file():+ detail = (proc.stderr or proc.stdout or "").strip().splitlines()+ message = detail[-1] if detail else "下载失败"+ raise RuntimeError(f"从华为云拉取失败:{message}")+ return str(local)+++def _public_error(exc: BaseException) -> str:+ text = str(exc) or exc.__class__.__name__+ ak, sk = "", ""+ try:+ ak, sk = _credentials()+ except Exception:+ return text+ if ak:+ text = text.replace(ak, "")+ if sk:+ text = text.replace(sk, "")+ return text+++def _credentials() -> Tuple[str, str]:+ ak = os.environ.get("OBS_AK", "")+ sk = os.environ.get("OBS_SK", "")+ if ak and sk:+ return ak, sk+ raise RuntimeError("Set OBS_AK and OBS_SK before downloading OBS objects")+++def _count_pages(local: str) -> int:+ path = Path(local)+ if path.suffix.lower() != ".pdf":+ return 1+ import fitz+ doc = fitz.open(path)+ try:+ return int(doc.page_count)+ finally:+ doc.close()+++def _job_upright(job_id: str):++ state = _read_state(job_id) or {}+ return state.get("upright") if "upright" in state else None+++def _parse(job_id: str, local: str, model: str, runner) -> None:+ import page_fleet+ role = os.environ.get("OCR_PAGE_ROLE")+ if model == "minicpm-ocr" and (role == "dispatcher" or page_fleet.fleet_enabled()):+ if role == "dispatcher":+ deadline = time.time() + 90+ while not page_fleet.fleet_enabled():+ if time.time() >= deadline:+ raise RuntimeError("没有可用的解析机器")+ time.sleep(0.5)+ page_fleet.dispatch_file(job_id, local, runner, _job_upright(job_id))+ return+ mode = {"minicpm-ocr": "ocr", "minicpm-ocr-stp": "score", "minicpm-ocr-tts": "adaptive"}[model]+ upright_on = page_fleet.resolve_upright(_job_upright(job_id))+ cfg = runner.build_cfg(job_id, upright=upright_on, mode=mode, save_crops=mode != "ocr")+ cfg["input"]["file_path"] = local+ cfg["input"]["files_dir"] = ""+ cfg["input"]["image_dir"] = ""+ cfg["input"]["manifest"] = ""+ page_fleet.run_releasing_layout(runner, cfg)+++def _assemble(job_id: str, bucket: str, key: str, pages_total: int) -> Dict:+ result_dir = JOBS_DIR / job_id / "results_json"+ files = sorted(result_dir.glob("*.json"), key=_page_sort)+ pages = []+ for index, path in enumerate(files):+ row = _read_json(path)+ pages.append({+ "page_index": index,+ "image_id": row.get("image_id") or path.stem,+ "markdown": row.get("markdown") or "",+ "image_width": row.get("image_width") or 0,+ "image_height": row.get("image_height") or 0,+ "source_width": row.get("source_width") or 0,+ "source_height": row.get("source_height") or 0,+ "rotation": row.get("rotation"),+ "blocks": row.get("blocks") or [],+ })+ return {+ "id": job_id,+ "status": "Success",+ "bucket": bucket,+ "object": key,+ "pages_total": pages_total,+ "pages_done": len(pages),+ "markdown": "\n\n".join(page["markdown"] for page in pages if page["markdown"]),+ "pages": pages,+ }+++def _page_sort(path: Path) -> Tuple[int, str]:+ match = re.search(r"_page_(\d+)$", path.stem)+ if match:+ return int(match.group(1)), path.name+ return 10**9, path.name+++def _pages_done(job_id: str) -> int:+ result_dir = JOBS_DIR / job_id / "results_json"+ if not result_dir.is_dir():+ return 0+ return sum(1 for _ in result_dir.glob("*.json"))+++def _state_path(job_id: str) -> Path:+ return OBS_ROOT / job_id / "state.json"+++def _result_path(job_id: str) -> Path:+ return OBS_ROOT / job_id / "result.json"+++def _write_state(job_id: str, state: Dict) -> None:+ _write_json(_state_path(job_id), state)+++def _update(job_id: str, **fields) -> None:+ state = _read_state(job_id) or {"id": job_id}+ state.update(fields)+ _write_state(job_id, state)+++def _read_state(job_id: str) -> Optional[Dict]:+ return _read_json(_state_path(job_id)) or None+++def _read_json(path: Path) -> Dict:+ try:+ return json.loads(path.read_text(encoding="utf-8"))+ except Exception:+ return {}+++def _write_json(path: Path, payload: Dict) -> None:+ path.parent.mkdir(parents=True, exist_ok=True)+ tmp = path.with_suffix(path.suffix + ".tmp")+ tmp.write_text(json.dumps(payload, ensure_ascii=False), encoding="utf-8")+ tmp.replace(path)diff --git a/sdk/webdemo/orientation_service.py b/sdk/webdemo/orientation_service.pynew file mode 100644index 0000000..ab56b26--- /dev/null+++ b/sdk/webdemo/orientation_service.py@@ -0,0 +1,41 @@+#!/usr/bin/env python3++from __future__ import annotations++from pathlib import Path+from typing import Dict, Optional, Tuple++import numpy as np+++class UprightService:+ '整页旋转摆正;进程内直接调用,整页图不做 base64 序列化。'++ def __init__(self, cfg: Dict) -> None:+ self._corrector = None+ self._error = ""+ try:+ from minicpmvocr import UprightCorrector+++ upright_cfg = dict(cfg)+ upright_cfg["upright"] = dict(cfg.get("upright") or {}, enabled=True)+ self._corrector = UprightCorrector(upright_cfg)+ except Exception as exc:+ self._error = f"{type(exc).__name__}: {exc}"+ print(f"[orientation_service] unavailable: {exc}", flush=True)++ def enabled(self) -> bool:+ return self._corrector is not None++ def error(self) -> str:+ return self._error++ def correct(self, image_rgb: np.ndarray) -> Tuple[np.ndarray, Dict]:+ '摆正一张页面图。'+ if self._corrector is None:+ return image_rgb, {}+ return self._corrector.correct(image_rgb)++ def status(self) -> Dict:+ return {"loaded": self.enabled(), "error": self._error or None}diff --git a/sdk/webdemo/page_fleet.py b/sdk/webdemo/page_fleet.pynew file mode 100644index 0000000..8c6d939--- /dev/null+++ b/sdk/webdemo/page_fleet.py@@ -0,0 +1,580 @@+#!/usr/bin/env python3++from __future__ import annotations++import json+import os+import shutil+import socket+import threading+import time+import urllib.request+from concurrent.futures import FIRST_COMPLETED, ThreadPoolExecutor, wait+from pathlib import Path+from typing import Dict, List, Optional++from model_manager import DATA_DIR, JOBS_DIR, new_job_id++PAGE_REGISTRY = Path(os.environ.get(+ "OCR_PAGE_REGISTRY",+ DATA_DIR / "page-workers",+))+++def page_slots() -> int:+ '一台机器同时能收下多少页。版面模型检测完就还,这个数按 vLLM 积压来定。'+ return max(1, int(os.environ.get("OCR_PAGE_SLOTS", "64") or 64))+++def page_window() -> int:+ '一本书同时发出去的页数。上一页的版面还没回来,下一页也可以先送。'+ return max(1, int(os.environ.get("OCR_PAGE_WINDOW", "8") or 8))+++def fleet_enabled() -> bool:+ '远程机器登记之后,新的整本解析才按页分发。工人进程自己不再往外分。'+ if os.environ.get("OCR_PAGE_ROLE") == "worker":+ return False+ return bool(_read_remotes())+++def dispatch_file(job_id: str, local_path: str, runner, upright=None) -> None:+ '一本书同时送出多页。某一页的版面还没结束,后面的页也可以先发出去。'+ fleet = get_fleet()+ pages = _iter_pages(local_path)+ finishes = {}+ layout_futs: Dict = {}+ error: Optional[BaseException] = None+ exhausted = False+ window = page_window()+ try:+ with ThreadPoolExecutor(max_workers=page_slots() * 4 + window, thread_name_prefix="book-page") as pool:+ while finishes or layout_futs or not exhausted:+ while len(layout_futs) < window and not exhausted and error is None:+ try:+ layout_index, png = next(pages)+ except StopIteration:+ exhausted = True+ break+ layout_futs[pool.submit(fleet.start, runner, png, upright)] = layout_index+ pending = set(finishes) | set(layout_futs)+ if not pending:+ break+ done, _ = wait(pending, return_when=FIRST_COMPLETED)+ for fut in done:+ if fut not in layout_futs:+ continue+ index = layout_futs.pop(fut)+ try:+ inflight = fut.result()+ except BaseException as exc:+ error = error or exc+ else:+ finishes[pool.submit(inflight.markdown)] = index+ for fut in done:+ if fut not in finishes:+ continue+ index = finishes.pop(fut)+ try:+ markdown = fut.result()+ except BaseException as exc:+ error = error or exc+ continue+ if error is None:+ _write_page(job_id, index, markdown)+ finally:+ pages.close()+ if error is not None:+ raise error+++class PageHandle:+ '一页的两段:版面结束就可以收下一块模型,markdown 要等切片队列。'++ def __init__(self) -> None:+ self.layout_done = threading.Event()+ self.done = threading.Event()+ self.laid_out = False+ self.error: Optional[BaseException] = None+ self.markdown = ""+ self.blocks: List[Dict] = []+ self.image_width = 0+ self.image_height = 0+ self.source_width = 0+ self.source_height = 0+ self.rotation = None+++def run_releasing_layout(runner, cfg, on_layout_idle=None):+ '版面生产者结束后立刻归还检测器,切片继续在共享队列里跑。'+ from minicpmvocr import pipelined_run+ released = {"ok": False}+ slot = runner.borrow(cfg)++ def _idle() -> None:+ if not released["ok"]:+ released["ok"] = True+ runner.release(slot)+ if on_layout_idle is not None:+ on_layout_idle()++ try:+ return pipelined_run(cfg, resources=runner.resources_for(slot), on_layout_idle=_idle)+ finally:+ if not released["ok"]:+ runner.release(slot)+++def launch_local_page(runner, png_bytes: bytes, upright=None) -> PageHandle:+ '后台识别一页。版面结束时 handle.layout_done 置位,整页结束时 handle.done 置位。'+ handle = PageHandle()++ def work() -> None:+ job_id = new_job_id()+ job_dir = JOBS_DIR / job_id+ try:+ input_dir = job_dir / "input"+ input_dir.mkdir(parents=True, exist_ok=True)+ (input_dir / "page.png").write_bytes(png_bytes)+ cfg = runner.build_cfg(+ job_id, upright=resolve_upright(upright), mode="ocr", save_crops=False,+ )++ def _laid_out() -> None:+ handle.laid_out = True+ handle.layout_done.set()++ run_releasing_layout(runner, cfg, on_layout_idle=_laid_out)+ result_path = job_dir / "results_json" / "page.json"+ result = json.loads(result_path.read_text(encoding="utf-8"))+ layout_path = job_dir / "runtime" / "intermediate" / "layouts" / "page.json"+ layout = {}+ if layout_path.is_file():+ layout = json.loads(layout_path.read_text(encoding="utf-8"))+ handle.markdown = result.get("markdown") or ""+ slices = _public_slices(result, layout)+ handle.blocks = slices["blocks"]+ handle.image_width = slices["image_width"]+ handle.image_height = slices["image_height"]+ handle.rotation = slices["rotation"]+ handle.source_width, handle.source_height = _png_size(png_bytes)+ except BaseException as exc:+ handle.error = exc+ finally:+ shutil.rmtree(job_dir, ignore_errors=True)+ handle.layout_done.set()+ handle.done.set()++ threading.Thread(target=work, name="local-page", daemon=True).start()+ return handle+++def run_local_page(runner, png_bytes: bytes) -> str:+ '同步识别一页。远程接口改走票据,这里留给需要整页结果的调用。'+ handle = launch_local_page(runner, png_bytes)+ handle.done.wait()+ if handle.error is not None:+ raise handle.error+ return handle.markdown+++_TICKETS: Dict[str, tuple] = {}+_TICKET_LOCK = threading.Lock()+++def remember(handle: PageHandle) -> str:+ ticket = new_job_id()+ with _TICKET_LOCK:+ _TICKETS[ticket] = (handle, time.time())+ return ticket+++def take_markdown(ticket: str):+ '解码没完返回 None。完成则取出这一页的正文和切片,失败则抛出。'+ with _TICKET_LOCK:+ item = _TICKETS.get(ticket)+ if item is None:+ raise KeyError(ticket)+ handle, _created = item+ if not handle.done.is_set():+ return None+ with _TICKET_LOCK:+ _TICKETS.pop(ticket, None)+ if handle.error is not None:+ raise handle.error+ return _page_payload(handle)+++def coerce_upright(value):+ '请求里的摆正开关。缺省是 None,由解析端按现有配置决定。'+ if value is None:+ return None+ if isinstance(value, bool):+ return value+ raise ValueError("upright 需要是 true 或 false")+++def resolve_upright(choice) -> bool:+ '显式 false 时跳过摆正。其余情况仍要本机有摆正模型才开启。'+ if choice is False:+ return False+ upright_dir = os.environ.get("OCR_UPRIGHT_DIR", "")+ return bool(upright_dir and Path(upright_dir).is_dir())+++class _Slot:+ def __init__(self, name: str, capacity: int, upright_choice: bool = False):+ self.name = name+ self.capacity = max(0, int(capacity))+ self.upright_choice = bool(upright_choice)+ self.inflight = 0+ self.down_until = 0.0+++class PageFleet:+ def __init__(self) -> None:++ local_cap = 0 if os.environ.get("OCR_PAGE_ROLE") == "dispatcher" else page_slots()+ self._local = _Slot("local", local_cap)+ self._remotes: Dict[str, _Slot] = {}+ self._cv = threading.Condition()+ self._refreshed_at = 0.0+ self._turn = 0++ def start(self, runner, png_bytes: bytes, upright=None) -> "_Inflight":+ '占一个页名额,等到这一页的摆正和版面结束就返回。切片还在解码。'+ tried: List[str] = []+ last = "没有可以关闭摆正的解析机器" if upright is False else "没有可用的解析机器"+ while len(tried) < 6:+ slot = self._acquire(exclude=set(tried), upright=upright)+ if slot is None:+ break+ try:+ if slot.name == "local":+ handle = launch_local_page(runner, png_bytes, upright)+ if not handle.layout_done.wait(600):+ raise TimeoutError("版面超时")+ if handle.error is not None and not handle.laid_out:+ raise handle.error+ return _Inflight(self, slot, handle)+ kind, value = _remote_layout(slot.name, png_bytes, upright)+ if kind == "done":+ return _Inflight(self, slot, ("done", value))+ return _Inflight(self, slot, ("ticket", slot.name, value))+ except Exception as exc:+ last = str(exc) or exc.__class__.__name__+ with self._cv:+ slot.down_until = time.time() + 30+ slot.inflight = max(0, slot.inflight - 1)+ self._cv.notify_all()+ tried.append(slot.name)+ raise RuntimeError(last)++ def _acquire(self, exclude: set, upright=None) -> Optional[_Slot]:+ with self._cv:+ deadline = time.time() + 600+ while time.time() < deadline:+ self._refresh_locked()+ now = time.time()+ choices = [+ slot for slot in [self._local] + list(self._remotes.values())+ if slot.name not in exclude and slot.down_until <= now+ ]++ if upright is False:+ capable = [slot for slot in choices if slot.upright_choice]+ if not capable:+ return None+ choices = capable+ if not choices:+ return None+ free = [slot for slot in choices if slot.inflight < slot.capacity]+ if free:++ best = max(slot.capacity - slot.inflight for slot in free)+ tied = [slot for slot in free if slot.capacity - slot.inflight == best]+ tied.sort(key=lambda item: item.name)+ slot = tied[self._turn % len(tied)]+ self._turn += 1+ slot.inflight += 1+ return slot+ self._cv.wait(timeout=0.5)+ return None++ def _release(self, slot: _Slot) -> None:+ with self._cv:+ slot.inflight = max(0, slot.inflight - 1)+ self._cv.notify_all()++ def _refresh_locked(self) -> None:+ now = time.time()+ if now - self._refreshed_at < 5:+ return+ self._refreshed_at = now+ found = _read_remotes()+ for url in list(self._remotes):+ if url not in found and self._remotes[url].inflight == 0:+ del self._remotes[url]+ for url, spec in found.items():+ slots, choice = spec+ current = self._remotes.get(url)+ if current is None:+ self._remotes[url] = _Slot(url, slots, upright_choice=choice)+ else:+ current.capacity = slots+ current.upright_choice = choice+++_FLEET: Optional[PageFleet] = None+_FLEET_LOCK = threading.Lock()+++def get_fleet() -> PageFleet:+ global _FLEET+ with _FLEET_LOCK:+ if _FLEET is None:+ _FLEET = PageFleet()+ return _FLEET+++def _read_remotes() -> Dict[str, tuple]:+ found: Dict[str, tuple] = {}+ if not PAGE_REGISTRY.is_dir():+ return found+ now = time.time()+ for path in PAGE_REGISTRY.glob("*.json"):+ try:+ if now - path.stat().st_mtime > 90:+ continue+ row = json.loads(path.read_text(encoding="utf-8"))+ except Exception:+ continue+ url = str(row.get("url") or "").rstrip("/")++ if url and int(row.get("slices") or 0) >= 1:+ found[url] = (max(1, int(row.get("slots") or 8)), bool(row.get("upright_choice")))+ return found+++def _opener():+ return urllib.request.build_opener(urllib.request.ProxyHandler({}))+++def _remote_layout(url: str, png_bytes: bytes, upright=None) -> str:++ headers = {"Content-Type": "image/png"}+ if upright is False:+ headers["X-OCR-Upright"] = "0"+ request = urllib.request.Request(+ url + "/api/page-parse",+ data=png_bytes,+ headers=headers,+ method="POST",+ )+ with _opener().open(request, timeout=180) as response:+ body = json.loads(response.read().decode("utf-8"))+ if body.get("error"):+ raise RuntimeError(str(body["error"]))+ ticket = body.get("ticket")+ if ticket:+ return ("ticket", str(ticket))+ if "markdown" in body:+ return ("done", body.get("markdown") or "")+ raise RuntimeError("远程没有返回页票据")+++def _remote_markdown(url: str, ticket: str) -> str:+ deadline = time.time() + 360+ while time.time() < deadline:+ request = urllib.request.Request(url + "/api/page-markdown/" + ticket, method="GET")+ with _opener().open(request, timeout=30) as response:+ body = json.loads(response.read().decode("utf-8"))+ if body.get("error"):+ raise RuntimeError(str(body["error"]))+ if body.get("ready"):+ return _payload_from_body(body)+ time.sleep(0.3)+ raise TimeoutError("远程切片超时")+++class _Inflight:+++ def __init__(self, fleet: "PageFleet", slot: _Slot, payload) -> None:+ self._fleet = fleet+ self._slot = slot+ self._payload = payload+ self._released = False++ def markdown(self) -> Dict:+ try:+ if isinstance(self._payload, PageHandle):+ self._payload.done.wait()+ if self._payload.error is not None:+ raise self._payload.error+ return _page_payload(self._payload)+ kind = self._payload[0]+ if kind == "done":+ return _payload_from_body({"markdown": self._payload[1]})+ _kind, url, ticket = self._payload+ return _remote_markdown(url, ticket)+ finally:+ self._fleet._release(self._slot)+++def _iter_pages(local_path: str):+ path = Path(local_path)+ if path.suffix.lower() != ".pdf":+ yield 0, path.read_bytes()+ return+ import fitz+ from minicpmvocr.constants import PDF_RENDER_ZOOM+ doc = fitz.open(path)+ try:+ matrix = fitz.Matrix(PDF_RENDER_ZOOM, PDF_RENDER_ZOOM)+ for index in range(doc.page_count):+ pix = doc.load_page(index).get_pixmap(matrix=matrix, alpha=False)+ yield index, pix.tobytes("png")+ finally:+ doc.close()+++def _page_payload(handle: PageHandle) -> Dict:+ return {+ "markdown": handle.markdown or "",+ "image_width": handle.image_width or 0,+ "image_height": handle.image_height or 0,+ "source_width": handle.source_width or 0,+ "source_height": handle.source_height or 0,+ "rotation": handle.rotation,+ "blocks": handle.blocks or [],+ }+++def _payload_from_body(body: Dict) -> Dict:+ return {+ "markdown": body.get("markdown") or "",+ "image_width": body.get("image_width") or 0,+ "image_height": body.get("image_height") or 0,+ "source_width": body.get("source_width") or 0,+ "source_height": body.get("source_height") or 0,+ "rotation": body.get("rotation"),+ "blocks": body.get("blocks") or [],+ }+++def _public_slices(result: Dict, layout: Dict) -> Dict:++ layout = layout or {}+ by_crop = {+ block.get("crop_filename", ""): block+ for block in (result.get("crop_blocks") or [])+ }+ blocks = []+ for item in layout.get("blocks") or []:+ found = by_crop.get(item.get("crop_filename", ""), {})+ bbox = item.get("bbox") or found.get("bbox") or [0, 0, 0, 0]+ blocks.append({+ "order": item.get("order", 0),+ "label": item.get("label") or found.get("label") or "",+ "bbox": bbox,+ "regions": item.get("regions") or [bbox],+ "content": found.get("content") or "",+ "status": found.get("status") or "",+ })+ if not blocks:+ for found in result.get("crop_blocks") or []:+ bbox = found.get("bbox") or [0, 0, 0, 0]+ blocks.append({+ "order": found.get("order", 0),+ "label": found.get("label") or "",+ "bbox": bbox,+ "regions": found.get("regions") or [bbox],+ "content": found.get("content") or "",+ "status": found.get("status") or "",+ })+ return {+ "image_width": result.get("image_width") or layout.get("image_width") or 0,+ "image_height": result.get("image_height") or layout.get("image_height") or 0,+ "rotation": _public_rotation(layout),+ "blocks": blocks,+ }+++def _png_size(png_bytes: bytes):++ import io+ from PIL import Image+ with Image.open(io.BytesIO(png_bytes)) as image:+ return image.size+++def _public_rotation(layout: Dict):++ raw = (layout or {}).get("upright")+ if not raw:+ return None+ if raw.get("gated"):+ return {+ "applied": False,+ "total_angle": 0.0,+ "orientation_angle": 0,+ "deskew_angle": 0.0,+ "skipped_reason": "gated",+ }+ return {+ "applied": bool(raw.get("applied")),+ "total_angle": float(raw.get("correction") or 0.0),+ "orientation_angle": int(raw.get("label") or 0),+ "deskew_angle": float(raw.get("deskew") or 0.0),+ "skipped_reason": None,+ }+++def _write_page(job_id: str, index: int, page) -> None:+ path = JOBS_DIR / job_id / "results_json" / f"book_page_{index + 1:03d}.json"+ path.parent.mkdir(parents=True, exist_ok=True)+ if isinstance(page, str):+ page = _payload_from_body({"markdown": page})+ payload = {+ "page_index": index,+ "image_id": f"book_page_{index + 1:03d}",+ "markdown": page.get("markdown") or "",+ "image_width": page.get("image_width") or 0,+ "image_height": page.get("image_height") or 0,+ "source_width": page.get("source_width") or 0,+ "source_height": page.get("source_height") or 0,+ "rotation": page.get("rotation"),+ "blocks": page.get("blocks") or [],+ }+ tmp = path.with_suffix(".json.tmp")+ tmp.write_text(json.dumps(payload, ensure_ascii=False), encoding="utf-8")+ tmp.replace(path)+++def _own_ip() -> str:+ configured = os.environ.get("OCR_ADVERTISE_HOST", "").strip()+ if configured:+ return configured+ try:+ return socket.gethostbyname(socket.gethostname())+ except OSError:+ return "127.0.0.1"+++def advertise(port: int) -> None:+ '工人进程把地址写到共享目录,本机按这个目录发现它。'+ PAGE_REGISTRY.mkdir(parents=True, exist_ok=True)+ host = socket.gethostname()+ path = PAGE_REGISTRY / f"{host}.json"+ url = f"http://{_own_ip()}:{port}"+ slots = page_slots()+ body = json.dumps(+ {"url": url, "slots": slots, "host": host, "slices": 1, "upright_choice": 1},+ ensure_ascii=False,+ )+ while True:+ tmp = path.with_suffix(".json.tmp")+ tmp.write_text(body, encoding="utf-8")+ tmp.replace(path)+ time.sleep(15)diff --git a/sdk/webdemo/recognition_client.py b/sdk/webdemo/recognition_client.pynew file mode 100644index 0000000..3dc9d20--- /dev/null+++ b/sdk/webdemo/recognition_client.py@@ -0,0 +1,160 @@+#!/usr/bin/env python3++from __future__ import annotations++import base64+import io+import json+import os+import urllib.error+import urllib.request+from typing import Dict, List, Optional++from PIL import Image+++_OPENER = urllib.request.build_opener(urllib.request.ProxyHandler({}))+++VLLM_URL = (os.environ.get("OCR_VLLM_URL") or os.environ.get("VLLM_URL")+ or "http://127.0.0.1:18499").rstrip("/")+SERVED_MODEL = (os.environ.get("OCR_SERVED_MODEL_NAME") or os.environ.get("OCR_SERVED_NAME")+ or "minicpm-ocr")+++def _encode_image(image: Image.Image) -> str:++ buf = io.BytesIO()+ image.save(buf, format="PNG", compress_level=1)+ return "data:image/png;base64," + base64.b64encode(buf.getvalue()).decode()+++def _post(url: str, payload: Dict, timeout: int = 240) -> Dict:+ data = json.dumps(payload).encode("utf-8")+ req = urllib.request.Request(+ url, data=data,+ headers={"Content-Type": "application/json"},+ method="POST",+ )+ with _OPENER.open(req, timeout=timeout) as resp:+ return json.loads(resp.read())+++class OcrService:+ 'OpenAI Chat Completions 客户端,对接 vLLM 或 LIS。'++ def __init__(self, vllm_url: str = VLLM_URL,+ model_name: str = SERVED_MODEL) -> None:+ self._url = vllm_url.rstrip("/")+ self._model = model_name+ self._mm_kwargs = {+ "downsample_mode": "4x",+ "max_slice_nums": 9,+ }+ self._decode_defaults = {+ "temperature": 0.01,+ "top_p": 0.001,+ "top_k": 1,+ "repetition_penalty": 1.0,+ "no_repeat_ngram_size": 100,+ }+++ def recognize(+ self,+ image: Image.Image,+ prompt: str,+ max_new_tokens: int = 4096,+ slice_nums: Optional[int] = None,+ n: int = 1,+ decode_overrides: Optional[Dict] = None,+ ) -> Dict:+ '识别一张块图。'+ payload = self._build_payload(+ image=image,+ prompt=prompt,+ max_new_tokens=max_new_tokens,+ slice_nums=slice_nums,+ n=n,+ decode_overrides=decode_overrides,+ )+ raw = _post(self._url + "/v1/chat/completions", payload)+ return self._parse_response(raw, n)++ def health(self) -> Dict:+ '探活:检查 vLLM 是否可达,以及模型名是否匹配。'+ try:+ req = urllib.request.Request(self._url + "/v1/models")+ with _OPENER.open(req, timeout=5) as resp:+ body = json.loads(resp.read())+ served: List[str] = [m.get("id", "") for m in body.get("data", [])]+ match = self._model in served+ return {"reachable": True, "model_match": match, "served": served, "error": None}+ except Exception as exc:+ return {"reachable": False, "model_match": False, "served": [],+ "error": f"{type(exc).__name__}: {exc}"}+++ def _build_payload(+ self,+ image: Image.Image,+ prompt: str,+ max_new_tokens: int,+ slice_nums: Optional[int],+ n: int,+ decode_overrides: Optional[Dict],+ ) -> Dict:+ decode = dict(self._decode_defaults)+ if decode_overrides:+ decode.update(decode_overrides)++ payload: Dict = {+ "model": self._model,+ "messages": [+ {+ "role": "user",+ "content": [+ {"type": "image_url",+ "image_url": {"url": _encode_image(image)}},+ {"type": "text", "text": prompt},+ ],+ }+ ],+ "max_tokens": max_new_tokens,+ "mm_processor_kwargs": dict(self._mm_kwargs),+ "chat_template_kwargs": {"enable_thinking": False},+ "temperature": decode.get("temperature", 0.01),+ "top_p": decode.get("top_p", 0.001),+ "top_k": decode.get("top_k", 1),+ "repetition_penalty": decode.get("repetition_penalty", 1.0),+ "no_repeat_ngram_size": decode.get("no_repeat_ngram_size", 100),+ "stream": False,+ }+ if slice_nums is not None:+ payload["mm_processor_kwargs"]["max_slice_nums"] = int(slice_nums)++ if n > 1:+ payload["n"] = int(n)++ handled = {"temperature", "top_p", "top_k", "repetition_penalty",+ "no_repeat_ngram_size"}+ if decode_overrides:+ for key, value in decode_overrides.items():+ if key not in handled and key not in payload:+ payload[key] = value+ return payload++ def _parse_response(self, raw: Dict, n: int) -> Dict:+ choices = raw.get("choices") or []+ if not choices:+ raise ValueError("vLLM returned no choices: %s" % str(raw)[:300])+ usage = raw.get("usage") or {}+ token_count = int(usage.get("completion_tokens", 0))+ if n > 1:+ texts = [(c.get("message") or {}).get("content") or "" for c in choices]+ return {"texts": texts, "output_token_count": token_count}+ choice = choices[0]+ text = (choice.get("message") or {}).get("content") or ""+ finish = choice.get("finish_reason", "")+ return {"text": text, "output_token_count": token_count,+ "finish_reason": finish, "texts": [text]}diff --git a/sdk/webdemo/rm_bridge.py b/sdk/webdemo/rm_bridge.pynew file mode 100644index 0000000..b20306c--- /dev/null+++ b/sdk/webdemo/rm_bridge.py@@ -0,0 +1,150 @@+#!/usr/bin/env python3++from __future__ import annotations++import base64+import json+import os+import urllib.error+import urllib.request+from concurrent.futures import ThreadPoolExecutor+from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer+from pathlib import Path++ENV_FILE = Path(os.environ.get(+ "RM_BRIDGE_ENV",+ Path(os.environ.get("OCRWEB_DATA_DIR", Path(__file__).resolve().parent / "data")) / "rm_score.env",+))+PORT = int(os.environ.get("RM_BRIDGE_PORT", "18022"))+WORKERS = int(os.environ.get("RM_BRIDGE_WORKERS", "4"))+OPENER = urllib.request.build_opener(urllib.request.ProxyHandler({}))+++def _load_env(path: Path) -> dict:+ out = {}+ for line in path.read_text().splitlines():+ line = line.strip()+ if not line or line.startswith("#") or "=" not in line:+ continue+ key, value = line.split("=", 1)+ out[key.strip()] = value.strip().strip('"').strip("'")+ return out+++CFG = _load_env(ENV_FILE) if ENV_FILE.is_file() else {}+for _key in ("RM_SCORE_URL", "RM_SCORE_USER", "RM_SCORE_PASSWORD", "RM_SCORE_TIMEOUT"):+ if _key in os.environ:+ CFG[_key] = os.environ[_key]+_missing = [key for key in ("RM_SCORE_URL", "RM_SCORE_USER", "RM_SCORE_PASSWORD") if not CFG.get(key)]+if _missing:+ raise RuntimeError("Set " + ", ".join(_missing) + " through environment variables or RM_BRIDGE_ENV")+REMOTE = CFG["RM_SCORE_URL"]+USER = CFG["RM_SCORE_USER"]+PASSWORD = CFG["RM_SCORE_PASSWORD"]+TIMEOUT = float(CFG.get("RM_SCORE_TIMEOUT") or 60)+TOKEN = base64.b64encode(f"{USER}:{PASSWORD}".encode()).decode("ascii")+POOL = ThreadPoolExecutor(max_workers=max(1, WORKERS))+++def _data_uri(image: str) -> str:+ image = image or ""+ if image.startswith("data:"):+ return image+ return "data:image/png;base64," + image+++def _score_one(image: str, text: str, category: str) -> dict:+ body = json.dumps({+ "image": _data_uri(image),+ "ocr_text": text,+ "category": category or "text",+ }).encode()+ req = urllib.request.Request(+ REMOTE,+ data=body,+ method="POST",+ headers={+ "Content-Type": "application/json",+ "Authorization": f"Basic {TOKEN}",+ },+ )+ try:+ with OPENER.open(req, timeout=TIMEOUT) as resp:+ payload = json.loads(resp.read().decode())+ score = payload.get("prob_yes")+ if not isinstance(score, (int, float)):+ return {"score": None, "verdict": "error"}+ return {"score": float(score), "verdict": str(payload.get("verdict") or "scored")}+ except Exception:+ return {"score": None, "verdict": "error"}+++def _score_items(items: list) -> list:++ jobs = []+ for item_i, item in enumerate(items):+ image = str(item.get("image") or "")+ category = str(item.get("category") or "text")+ for cand_i, text in enumerate(item.get("candidates") or []):+ jobs.append((item_i, cand_i, image, str(text), category))+ scored = list(POOL.map(lambda job: _score_one(job[2], job[3], job[4]), jobs))+ grouped = []+ for item in items:+ n = len(item.get("candidates") or [])+ grouped.append([{"score": None, "verdict": "error"} for _ in range(n)])+ for (item_i, cand_i, *_rest), row in zip(jobs, scored):+ grouped[item_i][cand_i] = row+ results = []+ for rows in grouped:+ if not rows:+ results.append({"best_index": 0, "scores": [], "verdicts": []})+ continue+ scores = [row["score"] if row["score"] is not None else -1.0 for row in rows]+ verdicts = [row["verdict"] for row in rows]+ usable = [i for i, row in enumerate(rows) if row["score"] is not None]+ best = max(usable, key=lambda i: rows[i]["score"]) if usable else 0+ results.append({"best_index": best, "scores": scores, "verdicts": verdicts})+ return results+++class Handler(BaseHTTPRequestHandler):+ protocol_version = "HTTP/1.1"++ def log_message(self, fmt, *args):+ return++ def _send(self, code: int, payload: dict) -> None:+ raw = json.dumps(payload).encode()+ self.send_response(code)+ self.send_header("Content-Type", "application/json")+ self.send_header("Content-Length", str(len(raw)))+ self.end_headers()+ self.wfile.write(raw)++ def do_GET(self):+ if self.path.split("?", 1)[0] in ("/healthz", "/health"):+ self._send(200, {"status": "ok"})+ return+ self._send(404, {"error": "not found"})++ def do_POST(self):+ length = int(self.headers.get("Content-Length") or 0)+ try:+ body = json.loads(self.rfile.read(length).decode() or "{}")+ except Exception:+ self._send(400, {"error": "invalid json"})+ return+ path = self.path.split("?", 1)[0]+ if path == "/v1/rm/score_best":+ self._send(200, _score_items([body])[0])+ return+ if path == "/v1/rm/score_best_batch":+ results = _score_items(list(body.get("items") or []))+ self._send(200, {"results": results, "batch_size": len(results)})+ return+ self._send(404, {"error": "not found"})+++if __name__ == "__main__":+ print(f"rm bridge on 127.0.0.1:{PORT} -> remote binary RM", flush=True)+ ThreadingHTTPServer(("127.0.0.1", PORT), Handler).serve_forever()diff --git a/sdk/webdemo/scoring_service.py b/sdk/webdemo/scoring_service.pynew file mode 100644index 0000000..e0366ba--- /dev/null+++ b/sdk/webdemo/scoring_service.py@@ -0,0 +1,141 @@+#!/usr/bin/env python3++from __future__ import annotations++import os+import threading+from pathlib import Path+from typing import Dict, List, Optional++from PIL import Image++RM_MODEL_DIR = os.environ.get("OCR_RM_MODEL_DIR", "/models/rm")+RM_INPUT_FORM = os.environ.get("OCR_RM_INPUT_FORM", "")+++class RmService:+ '进程内 RM 推理服务。'++ def __init__(+ self,+ model_dir: str = RM_MODEL_DIR,+ input_form: str = RM_INPUT_FORM,+ ) -> None:+ self._model_dir = model_dir+ self._input_form = input_form+ self._model = None+ self._error = ""+ self._lock = threading.Lock()+++ def configured(self) -> bool:+ 'RM 是否已正确配置(input_form 存在且合法)。'+ return self._input_form in ("binary", "ternary")++ def loaded(self) -> bool:+ return self._model is not None++ def error(self) -> str:+ return self._error++ def score(+ self,+ image: Image.Image,+ candidates: List[str],+ label: str,+ case_id: str,+ ) -> Dict:+ '给一批候选文本打分,返回最优下标和各候选的分数。'+ if not self.configured():+ return self._error_result("RM 未配置:OCR_RM_INPUT_FORM 未设置")+ if not candidates:+ return self._error_result("候选列表为空")+ try:+ model = self._get_model()+ except Exception as exc:+ return self._error_result(f"RM 模型加载失败:{exc}")+ try:+ return model.score_best(+ image=image,+ candidates=candidates,+ label=label,+ case_id=case_id,+ )+ except Exception as exc:+ return self._error_result(f"{type(exc).__name__}: {exc}")++ def health(self) -> Dict:+ return {+ "configured": self.configured(),+ "loaded": self.loaded(),+ "input_form": self._input_form,+ "model_dir": self._model_dir,+ "error": self._error or None,+ }++ def close(self) -> None:+ with self._lock:+ if self._model is not None:+ try:+ self._model.close()+ except Exception:+ pass+ self._model = None+++ def _get_model(self):++ if self._model is not None:+ return self._model+ with self._lock:+ if self._model is not None:+ return self._model+ self._model = self._load_model()+ return self._model++ def _load_model(self):++ model_path = Path(self._model_dir)+ if not model_path.is_dir():+ raise FileNotFoundError(f"RM 模型目录不存在:{self._model_dir}")+++ try:+ from minicpmvocr.rm import build_rm_scorer # type: ignore[import]+ model = build_rm_scorer(+ model_dir=str(model_path),+ input_form=self._input_form,+ )+ print(f"[scoring_service] loaded RM model from {self._model_dir}", flush=True)+ return model+ except ImportError:+ pass+++ import importlib.util+ candidate = model_path / "rm_model.py"+ if candidate.is_file():+ spec = importlib.util.spec_from_file_location("rm_model", candidate)+ module = importlib.util.module_from_spec(spec) # type: ignore[arg-type]+ spec.loader.exec_module(module) # type: ignore[union-attr]+ model = module.build_rm_scorer(+ model_dir=str(model_path),+ input_form=self._input_form,+ )+ print(f"[scoring_service] loaded RM model (standalone) from {self._model_dir}", flush=True)+ return model++ raise ImportError(+ "找不到 RM 模型实现:需要 minicpmvocr.rm 子包或 "+ f"{self._model_dir}/rm_model.py"+ )++ @staticmethod+ def _error_result(msg: str) -> Dict:+ return {+ "best_index": 0,+ "scores": [],+ "verdicts": [],+ "rm_error": msg,+ "stage_sec": {"precheck": 0.0, "render": 0.0, "forward": 0.0},+ }diff --git a/sdk/webdemo/scripts/rm_entry.sh b/sdk/webdemo/scripts/rm_entry.shnew file mode 100755index 0000000..362f54d--- /dev/null+++ b/sdk/webdemo/scripts/rm_entry.sh@@ -0,0 +1,31 @@+#!/usr/bin/env bash+++set -Eeuo pipefail+unset https_proxy http_proxy all_proxy HTTPS_PROXY HTTP_PROXY ALL_PROXY+RM_MODEL_PATH=${RM_MODEL_PATH:-/models/rm/hf_l4_binary_vocab_5000}+RM_VLLM_PORT="${RM_VLLM_PORT:-18520}"+RM_PORT="${RM_PORT:-8012}"+RM_GPU_UTIL=${RM_GPU_UTIL:-0.30}+RM_MAX_NUM_BATCHED_TOKENS=8192++"${RM_PYTHON:-/opt/vllm-venv/bin/python}" -m vllm.entrypoints.openai.api_server \+ --model "$RM_MODEL_PATH" --served-model-name rm-minicpm-binary --trust-remote-code \+ --host 127.0.0.1 --port "$RM_VLLM_PORT" \+ --max-model-len 16384 --max-num-seqs 64 --max-num-batched-tokens "$RM_MAX_NUM_BATCHED_TOKENS" \+ --limit-mm-per-prompt '{"image":36}' --max-logprobs 20 \+ --gpu-memory-utilization "$RM_GPU_UTIL" \+ --chat-template-content-format string 2>&1 | sed -u 's/^/[rm-vllm] /' &++until curl -fs -m 5 http://127.0.0.1:$RM_VLLM_PORT/v1/models >/dev/null 2>&1; do sleep 3; done+echo "[entry] rm-vllm ready"++cd /opt/ocr-rm-serving+export RM_VLLM_BASE=http://127.0.0.1:$RM_VLLM_PORT/v1 RM_PORT+export RM_PROFILE=tts RM_VLLM_CONCURRENCY=32+export RM_BACKEND_MAX_NUM_SEQS=64 RM_BACKEND_MAX_NUM_BATCHED_TOKENS=$RM_MAX_NUM_BATCHED_TOKENS+export RM_MAX_ITEMS=64 RM_THRESHOLD=0.5+export RM_RENDER_ENABLED=0 RM_NODE_BIN=/usr/local/bin/node+export RM_WORK_ROOT=/tmp/rm_service_work RM_KEEP_WORK=0+mkdir -p "$RM_WORK_ROOT"+exec "${RM_PYTHON:-/opt/vllm-venv/bin/python}" -m ocr_rm_serving 2>&1 | sed -u 's/^/[rm] /'diff --git a/sdk/webdemo/scripts/setup_env.sh b/sdk/webdemo/scripts/setup_env.shnew file mode 100755index 0000000..2000fb1--- /dev/null+++ b/sdk/webdemo/scripts/setup_env.sh@@ -0,0 +1,25 @@+#!/usr/bin/env bash+set -euo pipefail+HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"+source "$HERE/../../scripts/demo_env.sh" webdemo+case "$SDK_PROFILE" in+ sdk-cpu|sdk-gpu) ;;+ *) echo "SDK_PROFILE must be sdk-cpu or sdk-gpu" >&2; exit 2 ;;+esac+command -v uv >/dev/null || { echo "Install uv first: python3 -m pip install uv" >&2; exit 1; }+if [[ ! -x "$OCRWEB_ENV/bin/python" ]]; then+ uv venv --python "${OCR_PYTHON:-3.12}" "$OCRWEB_ENV"+fi+uv pip install --python "$OCRWEB_ENV/bin/python" -r "$PROJECT_ROOT/pyproject.toml" \+ --extra "$SDK_PROFILE" fastapi uvicorn python-multipart httpx+if [[ "${OCR_DOWNLOAD_UPRIGHT:-0}" == 1 ]]; then+ endpoint="${HF_ENDPOINT:-https://huggingface.co}"+ for model in PP-LCNet_x1_0_doc_ori PP-OCRv5_mobile_det PP-LCNet_x1_0_textline_ori; do+ mkdir -p "$OCR_UPRIGHT_DIR/$model"+ for file in config.json inference.json inference.pdiparams inference.yml; do+ curl -fL --retry 3 "$endpoint/PaddlePaddle/$model/resolve/main/$file" -o "$OCR_UPRIGHT_DIR/$model/$file"+ done+ done+fi+printf 'Environment ready: %s\nLayout model directory: %s\n' "$OCRWEB_ENV" "$OCR_LAYOUT_MODEL_DIR"+printf 'Start the service with: bash %s/start_webdemo.sh\n' "$HERE"diff --git a/sdk/webdemo/scripts/start_single_gpu.sh b/sdk/webdemo/scripts/start_single_gpu.shnew file mode 100755index 0000000..8a667d7--- /dev/null+++ b/sdk/webdemo/scripts/start_single_gpu.sh@@ -0,0 +1,66 @@+#!/usr/bin/env bash+++set -euo pipefail+unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY++HERE="$(cd "$(dirname "$0")" && pwd)"+REPO="$(cd "$HERE/../.." && pwd)"+source "$REPO/scripts/demo_env.sh" webdemo+GPU="${GPU:-0}"++OCR_MODEL_DIR="$OCR_MODEL_PATH"+: "${OCR_IMAGE:?Set OCR_IMAGE to an OCR vLLM image}"+: "${RM_IMAGE:?Set RM_IMAGE to an OCR-RM image}"+LAYOUT_DIR="$OCR_LAYOUT_MODEL_DIR"+ocr_require_python+PY="$OCRWEB_PYTHON"+SERVED="${OCR_SERVED_NAME:-minicpm-ocr}"+VLLM_PORT="${VLLM_PORT:-18501}"+RM_PORT="${RM_PORT:-8012}"+PORT="${PORT:-8952}"+DATA_DIR="${OCRWEB_DATA_DIR:-$REPO/webdemo/data}"+LOG="$DATA_DIR/webdemo.log"++wait_http() {+ for _ in $(seq 1 $(( $3 / 5 ))); do+ curl -fs --noproxy '*' -m 3 "$2" >/dev/null 2>&1 && { echo " $1 就绪"; return; }+ sleep 5+ done+ echo " $1 启动超时:$2" >&2; exit 1+}++echo "[1/3] OCR vLLM → GPU $GPU :$VLLM_PORT"+docker rm -f "ocr-vllm-gpu$GPU" >/dev/null 2>&1 || true+docker run -d --name "ocr-vllm-gpu$GPU" --gpus "device=$GPU" --network host --shm-size 4g \+ -v "$OCR_MODEL_DIR":/model:ro --entrypoint "${OCR_CONTAINER_PYTHON:-/opt/venv/bin/python}" "$OCR_IMAGE" \+ -m vllm.entrypoints.openai.api_server --model /model --served-model-name "$SERVED" \+ --host 127.0.0.1 --port "$VLLM_PORT" --trust-remote-code \+ --gpu-memory-utilization 0.35 --max-model-len 40960 \+ --max-num-seqs 256 --max-num-batched-tokens 8192 \+ --limit-mm-per-prompt '{"image":36}' \+ --mm-processor-kwargs '{"downsample_mode":"4x","max_slice_nums":9}' \+ --trust-request-mm-kwargs --gdn-prefill-backend triton --uvicorn-log-level warning >/dev/null++wait_http "OCR vLLM" "http://127.0.0.1:$VLLM_PORT/v1/models" 900++echo "[2/3] RM → GPU $GPU :$RM_PORT"+docker rm -f "ocr-rm-gpu$GPU" >/dev/null 2>&1 || true+docker run -d --name "ocr-rm-gpu$GPU" --gpus "device=$GPU" --network host --shm-size 4g \+ -v "$HERE/rm_entry.sh":/rm_entry.sh:ro -e "RM_PORT=$RM_PORT" --entrypoint bash "$RM_IMAGE" /rm_entry.sh >/dev/null+wait_http "RM" "http://127.0.0.1:$RM_PORT/healthz" 900++echo "[3/3] webdemo → :$PORT"+mkdir -p "$DATA_DIR"+pkill -f "[u]vicorn server:app --host 0.0.0.0 --port $PORT" 2>/dev/null || true+sleep 1+cd "$REPO/webdemo"+PYTHONPATH="$REPO" PYTHONNOUSERSITE=1 PORT="$PORT" CUDA_VISIBLE_DEVICES="$GPU" \+VLLM_URL="http://127.0.0.1:$VLLM_PORT" OCR_SERVED_NAME="$SERVED" \+OCR_LAYOUT_MODEL_DIR="$LAYOUT_DIR" OCR_LAYOUT_DEVICE=cuda:0 \+OCR_RM_URL="http://127.0.0.1:$RM_PORT" OCR_RM_INPUT_FORM=binary \+OCRWEB_DATA_DIR="$DATA_DIR" \+nohup "$PY" -s -m uvicorn server:app --host 0.0.0.0 --port "$PORT" --workers 1 \+ >"$LOG" 2>&1 </dev/null &+wait_http "webdemo" "http://127.0.0.1:$PORT/ready" 120+echo "日志:$LOG"diff --git a/sdk/webdemo/scripts/start_vllm.sh b/sdk/webdemo/scripts/start_vllm.shnew file mode 100755index 0000000..2058c79--- /dev/null+++ b/sdk/webdemo/scripts/start_vllm.sh@@ -0,0 +1,54 @@+#!/usr/bin/env bash+++set -euo pipefail++source "$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)/scripts/demo_env.sh" webdemo+VLLM_PY="$VLLM_PYTHON"+MODEL="${OCR_MODEL_PATH}"+PORT="${VLLM_PORT:-18499}"+SERVED="${VLLM_SERVED_NAME:-minicpm-ocr}"+GPU_UTIL="${VLLM_GPU_UTIL:-0.35}"+MAX_LEN="${VLLM_MAX_MODEL_LEN:-16384}"+LOG="${VLLM_LOG:-$(dirname "$0")/../data/vllm.log}"++[[ -x "$VLLM_PY" ]] || { echo "vLLM python not found: $VLLM_PY" >&2; exit 1; }+[[ -d "$MODEL" ]] || { echo "model dir not found: $MODEL" >&2; exit 1; }+mkdir -p "$(dirname "$LOG")"++unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY+if [[ -n "${CUDA_COMPAT_DIR:-}" ]]; then+ export LD_LIBRARY_PATH="$CUDA_COMPAT_DIR${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"+fi+export VLLM_USE_FLASHINFER_SAMPLER=0+export CUDA_VISIBLE_DEVICES="${CUDA_VISIBLE_DEVICES:-0}"+export TORCH_EXTENSIONS_DIR="${TORCH_EXTENSIONS_DIR:-/tmp/torchext_$PORT}"+export TRITON_CACHE_DIR="${TRITON_CACHE_DIR:-/tmp/triton_$PORT}"++if curl -s --noproxy '*' -m 3 "http://127.0.0.1:$PORT/v1/models" >/dev/null 2>&1; then+ echo "vLLM already serving on :$PORT"+ exit 0+fi++echo "starting vLLM: model=$MODEL port=$PORT log=$LOG"+nohup "$VLLM_PY" -m vllm.entrypoints.openai.api_server \+ --model "$MODEL" \+ --served-model-name "$SERVED" \+ --host 0.0.0.0 --port "$PORT" \+ --gpu-memory-utilization "$GPU_UTIL" \+ --max-model-len "$MAX_LEN" \+ --limit-mm-per-prompt '{"image":1}' \+ --trust-request-mm-kwargs \+ >"$LOG" 2>&1 &++echo "pid=$! ; waiting for readiness (up to 600s)"+for _ in $(seq 1 200); do+ if curl -s --noproxy '*' -m 3 "http://127.0.0.1:$PORT/v1/models" >/dev/null 2>&1; then+ echo "READY http://127.0.0.1:$PORT (served-model-name=$SERVED)"+ exit 0+ fi+ sleep 3+done+echo "TIMEOUT waiting for vLLM; tail of $LOG:" >&2+tail -30 "$LOG" >&2+exit 1diff --git a/sdk/webdemo/scripts/start_webdemo.sh b/sdk/webdemo/scripts/start_webdemo.shnew file mode 100755index 0000000..f240a48--- /dev/null+++ b/sdk/webdemo/scripts/start_webdemo.sh@@ -0,0 +1,46 @@+#!/usr/bin/env bash+++set -euo pipefail++HERE="$(cd "$(dirname "$0")" && pwd)"+REPO="$(cd "$HERE/../.." && pwd)"+source "$REPO/scripts/demo_env.sh" webdemo+PY="$OCRWEB_PYTHON"+PORT="${PORT:-8950}"+LOG="${OCRWEB_LOG:-$OCRWEB_DATA_DIR/webdemo.log}"++[[ -x "$PY" ]] || { echo "python not found: $PY(先跑 scripts/setup_env.sh)" >&2; exit 1; }+mkdir -p "$(dirname "$LOG")"+++unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY+export PYTHONPATH="$REPO${PYTHONPATH:+:$PYTHONPATH}"+export PYTHONNOUSERSITE=1+export PORT+++export OCR_LAYOUT_MODEL_DIR="${OCR_LAYOUT_MODEL_DIR}"+export OCR_UPRIGHT_DIR="${OCR_UPRIGHT_DIR}"+export VLLM_URL="${VLLM_URL:-http://127.0.0.1:18499}"+export OCR_SERVED_NAME="${OCR_SERVED_NAME:-minicpm-ocr}"+++export OCR_RM_URL="${OCR_RM_URL:-http://127.0.0.1:8000}"+++pkill -f "[u]vicorn server:app --host 0.0.0.0 --port $PORT" 2>/dev/null || true+sleep 0.5++cd "$REPO/webdemo"+nohup "$PY" -s -m uvicorn server:app --host 0.0.0.0 --port "$PORT" --workers 1 >"$LOG" 2>&1 </dev/null &+PID=$!+sleep 3++if ! kill -0 "$PID" 2>/dev/null; then+ echo "启动失败,日志尾部:" >&2; tail -20 "$LOG" >&2; exit 1+fi+IP=$(hostname -I 2>/dev/null | awk '{print $1}')++curl -s --noproxy '*' -m 5 -o /dev/null -w "pid=$PID http://${IP:-127.0.0.1}:$PORT/ready status=%{http_code}\n" "http://127.0.0.1:$PORT/ready"+echo "日志: $LOG"diff --git a/sdk/webdemo/server.py b/sdk/webdemo/server.pynew file mode 100644index 0000000..1b79c92--- /dev/null+++ b/sdk/webdemo/server.py@@ -0,0 +1,873 @@+#!/usr/bin/env python3++from __future__ import annotations++import base64+import hashlib+import io+import json+import os+import re+import shutil+import threading+import time+from pathlib import Path+from typing import Dict, List, Optional++BASE = Path(__file__).resolve().parent+if str(BASE.parent) not in __import__("sys").path:+ __import__("sys").path.insert(0, str(BASE.parent))++import model_manager as model_manager_mod # noqa: E402+from model_manager import ( # noqa: E402+ DATA_DIR, DEFAULT_MODE, JOBS_DIR, TTS_RECIPES, Runner,+ new_job_id,+)+from recognition_client import OcrService, VLLM_URL, SERVED_MODEL # noqa: E402+from scoring_service import RmService, RM_MODEL_DIR, RM_INPUT_FORM # noqa: E402+import obs_jobs # noqa: E402++from fastapi import FastAPI, Request+from fastapi.responses import JSONResponse, PlainTextResponse, Response, StreamingResponse+from starlette.concurrency import run_in_threadpool+import urllib.error+import urllib.request++import uvicorn++PORT = int(os.environ.get("PORT", "8950"))++SOURCE_TOKEN = re.compile(r"^[a-f\d]{32}$")+++IMAGE_SUFFIX = {"PNG": ".png", "JPEG": ".jpg", "BMP": ".bmp", "WEBP": ".webp", "TIFF": ".tif"}+++RUNNER: Runner = None # type: ignore[assignment]+OCR_SVC: OcrService = None # type: ignore[assignment]+RM_SVC: RmService = None # type: ignore[assignment]++app = FastAPI(title="minicpmvocr-webdemo", version="1.0")+++def _proxy_to_worker(request: Request):++ base = os.environ.get("OCR_LOCAL_WORKER_URL", "http://127.0.0.1:8953").rstrip("/")+ url = base + request.url.path+ if request.url.query:+ url += "?" + request.url.query+ headers = {}+ for name in ("content-type", "x-ocr-upright"):+ value = request.headers.get(name)+ if value:+ headers["Content-Type" if name == "content-type" else "X-OCR-Upright"] = value++ def _do(body: bytes):+ method = request.method.upper()+ data = body if method not in ("GET", "HEAD") else None+ outgoing = urllib.request.Request(url, data=data, headers=headers, method=method)+ opener = urllib.request.build_opener(urllib.request.ProxyHandler({}))+ try:+ with opener.open(outgoing, timeout=600) as resp:+ return resp.status, resp.headers.get("content-type", "application/json"), resp.read()+ except urllib.error.HTTPError as exc:+ return exc.code, exc.headers.get("content-type", "application/json"), exc.read()+ except Exception as exc:+ payload = json.dumps({"error": f"本机工人不可用:{exc}"}, ensure_ascii=False).encode()+ return 502, "application/json", payload++ return _do++[email protected]("http")+async def _gateway_split(request: Request, call_next):+ if os.environ.get("OCR_PAGE_ROLE") != "gateway":+ return await call_next(request)+ path = request.url.path+ if path == "/health" or path.startswith("/api/obs-parse"):+ return await call_next(request)+ body = await request.body()+ status, content_type, payload = await run_in_threadpool(_proxy_to_worker(request), body)+ media = (content_type or "application/json").split(";")[0].strip()+ return Response(content=payload, status_code=status, media_type=media)+++def _make_request_id() -> str:+ return hashlib.md5(os.urandom(16) + str(time.time()).encode()).hexdigest()+++def _read_json(path: Path) -> Dict:+ try:+ return json.loads(path.read_text(encoding="utf-8"))+ except Exception:+ return {}+++def _mode_to_recipe(mode: str) -> str:+ return {"standard": "ocr", "scored": "score", "high-precision": "adaptive"}[mode]+++def _rotation_record(raw: Optional[Dict], enabled: bool) -> Dict:+ out: Dict = {+ "enabled": bool(enabled), "applied": False,+ "predicted_angle": None, "predicted_score": None,+ "confirmed": None, "orientation_angle": 0,+ "deskew_angle": 0.0, "total_angle": 0.0,+ "skipped_reason": None,+ }+ if not raw:+ return out+ if raw.get("gated"):+ out["skipped_reason"] = "gated"+ return out+ vetoed = raw.get("label_vetoed")+ label = int(raw.get("label") or 0)+ out.update({+ "applied": bool(raw.get("applied")),+ "predicted_angle": int(vetoed) if vetoed is not None else label,+ "predicted_score": raw.get("score"),+ "confirmed": False if vetoed is not None else (+ True if "vote" in raw else None),+ "orientation_angle": label,+ "deskew_angle": float(raw.get("deskew") or 0.0),+ "total_angle": float(raw.get("correction") or 0.0),+ })+ return out+++def _best_score(block: Dict) -> Optional[float]:+ tts = block.get("tts") or {}+ if tts.get("best_score") is not None:+ return float(tts["best_score"])+ scores, idx = tts.get("scores") or [], tts.get("best_index")+ if isinstance(idx, int) and 0 <= idx < len(scores) and scores[idx] is not None:+ return float(scores[idx])+ return None+++def _block_to_api(lb: Dict, rb: Dict) -> Dict:++ regions = lb.get("regions") or [lb.get("bbox", [0, 0, 0, 0])]+ tts = rb.get("tts") or {}+ score = _best_score(rb)+ block: Dict = {+ "order": lb.get("order", 0),+ "label": lb.get("label", ""),+ "bbox": lb.get("bbox", [0, 0, 0, 0]),+ "regions": regions,+ "content": rb.get("content", ""),+ "status": rb.get("status", ""),+ }+ if score is not None:+ block["score"] = score+ if tts.get("rounds_used") is not None:+ block["rounds_used"] = tts["rounds_used"]+ block["stop_reason"] = tts.get("stop_reason")+ block["exhausted"] = bool(tts.get("exhausted"))++ if rb.get("tts_invalid"):+ block["tts_invalid"] = True+ if rb.get("merged_into_previous_page"):+ block["merged_into_previous_page"] = True+ return block+++def _build_page_response(image_id, layout, result, request_id, mode,+ upright_enabled, created_at, source_token,+ page_index: int) -> Dict:+ by_crop = {b.get("crop_filename", ""): b+ for b in (result.get("crop_blocks") or [])}+ blocks = [_block_to_api(lb, by_crop.get(lb.get("crop_filename", ""), {}))+ for lb in layout.get("blocks", [])]++ upright_raw = layout.get("upright")+ rotation = _rotation_record(upright_raw, upright_enabled)++ mode_str = {"standard": "ocr_only", "scored": "stp",+ "high-precision": "tts"}.get(mode, mode)+++ resp: Dict = {+ "metadata": {"page_index": page_index},+ "choices": [{"message": {"content": result.get("markdown", "")}}],+ "minicpm_ocr": {+ "request_id": request_id,+ "mode": mode_str,+ "image_width": layout.get("image_width", 0),+ "image_height": layout.get("image_height", 0),+ "blocks": blocks,+ },+ }++ if upright_enabled:+ resp["minicpm_ocr"]["rotation"] = rotation++ if mode in ("scored", "high-precision"):+ total = len(blocks)+ scored = sum(1 for b in blocks if b.get("score") is not None)+ if total:+ resp["minicpm_ocr"]["passthrough"] = {+ "passed": scored, "total": total,+ "rate": round(scored / total, 4),+ }++ if mode in ("scored", "high-precision"):+ resp["map_ocr_source"] = {+ "request_id": request_id,+ "model": {"scored": "minicpm-ocr-stp",+ "high-precision": "minicpm-ocr-tts"}[mode],+ "page_index": page_index,+ "created_at": created_at,+ "expires_at": created_at + 86400,+ "token": source_token,+ }+ return resp+++JOB_META = "webdemo_meta.json"+++_JOB_LOCKS: Dict[str, threading.Lock] = {}+_JOB_LOCKS_GUARD = threading.Lock()+++def _job_lock(job_id: str) -> threading.Lock:+ with _JOB_LOCKS_GUARD:+ return _JOB_LOCKS.setdefault(job_id, threading.Lock())+++def _decode_upload(image_b64: str):++ from PIL import Image+ _, _, b64data = image_b64.partition(",")+ raw = base64.b64decode(b64data or image_b64)+ with Image.open(io.BytesIO(raw)) as img:+ fmt = img.format+ if fmt not in IMAGE_SUFFIX:+ raise ValueError(f"不支持的图片格式:{fmt}")+ return raw, IMAGE_SUFFIX[fmt]+++def _err(code: int, msg: str) -> JSONResponse:+ return JSONResponse(status_code=code, content={"error": msg})++[email protected]("/health")+async def health():+ return {"status": "ok"}++[email protected]("/ready")+def ready():+ vllm = OCR_SVC.health()+ rm = RM_SVC.health()+ res = RUNNER.resources_status()+ is_ready = vllm["reachable"] and vllm["model_match"]+ body = {+ "status": "ready" if is_ready else "not_ready",+ "vllm": vllm,+ "rm": rm,+ "upright": {"loaded": bool(res.get("upright"))},+ "layout": {"workers": res["layout_workers"], "idle": res["layout_idle"]},+ }+ return JSONResponse(status_code=200 if is_ready else 503, content=body)++[email protected]("/api/image-parse/capabilities")+def capabilities():+ modes = ["standard"]+ if RM_SVC.configured():+ modes += ["scored", "high-precision"]+ res = RUNNER.resources_status()+ return {+ "enabled": True,+ "modes": modes,+ "upright": bool(res.get("upright")),+ "seal": True,+ "kie": True,+ }++[email protected]("/metrics")+def metrics():+ '转发 OCR vLLM 的 Prometheus 指标:LIS 每 15s 抓一次(没有它就是 404)。'+ import urllib.request+ try:+ with urllib.request.urlopen(VLLM_URL + "/metrics", timeout=5) as r:+ return Response(content=r.read(), media_type=r.headers.get("content-type", "text/plain"))+ except Exception as exc:+ return PlainTextResponse(f"# upstream OCR metrics unavailable: {exc}\n", status_code=503)+++LIS_SERVED_MODEL_NAME = os.environ.get("LIS_SERVED_MODEL_NAME", "").strip()+PAGE_MODELS = ("minicpm-ocr", "minicpm-ocr-stp", "minicpm-ocr-tts")+BLOCK_MODEL = "minicpm-ocr-tts-block"+LIS_MODES = {+ "ocr_only": "minicpm-ocr", "standard": "minicpm-ocr",+ "stp": "minicpm-ocr-stp", "scored": "minicpm-ocr-stp",+ "tts": "minicpm-ocr-tts", "high-precision": "minicpm-ocr-tts",+ "tts_block": BLOCK_MODEL, "block": BLOCK_MODEL,+ "merge": "merge",+}+LIS_USAGE_TEXT = (+ "本服务是页图解析(版面 + 摆正 + OCR + 质量打分),输入是一张页图。用法:messages 里放一个 "+ '{"type":"image_url","image_url":{"url":"data:image/png;base64,..."}};'+ "档位用 minicpm_ocr.mode 选:ocr_only(默认,只识别)/ stp(每块一个质量分)/ tts(自适应选优);"+ "单块重算 mode=tts_block + source_token + order + page_index;跨页表格合并 mode=merge + pages。"+)+++def _image_from_messages(messages) -> str:+ for message in messages or []:+ content = message.get("content") if isinstance(message, dict) else None+ if isinstance(content, list):+ for part in content:+ if isinstance(part, dict) and part.get("type") == "image_url":+ url = part.get("image_url")+ url = url.get("url", "") if isinstance(url, dict) else url+ if url:+ return url+ return ""+++def _chat_envelope(content: Dict, model: str) -> Dict:++ choices = content.get("choices") or [{"message": {"content": ""}}]+ for i, choice in enumerate(choices):+ choice.setdefault("index", i)+ choice.setdefault("finish_reason", "stop")+ choice.setdefault("message", {}).setdefault("role", "assistant")+ return {"id": f"chatcmpl-{_make_request_id()}", "object": "chat.completion",+ "created": int(time.time()), "model": model, **content, "choices": choices,+ "usage": {"prompt_tokens": 0, "completion_tokens": 0, "total_tokens": 0}}+++def _chat_response(resp: JSONResponse, model: str, stream: bool):+ if resp.status_code != 200:+ return resp+ body = _chat_envelope(json.loads(resp.body), model)+ if not stream:+ return JSONResponse(content=body)++ chunk = dict(body, object="chat.completion.chunk",+ choices=[{"index": 0, "finish_reason": "stop",+ "delta": {"role": "assistant",+ "content": body["choices"][0]["message"].get("content", "")}}])+ chunk.pop("usage", None)+ payload = f"data: {json.dumps(chunk, ensure_ascii=False)}\n\ndata: [DONE]\n\n"+ return StreamingResponse(iter([payload]), media_type="text/event-stream")++[email protected]("/v1/models")+def list_models():+ names = ([LIS_SERVED_MODEL_NAME] if LIS_SERVED_MODEL_NAME else []) + [+ m for m in (*PAGE_MODELS, BLOCK_MODEL) if m != LIS_SERVED_MODEL_NAME]+ created = int(time.time())+ return {"object": "list", "data": [+ {"id": n, "object": "model", "created": created, "owned_by": "minicpmv-ocr"} for n in names]}++[email protected]("/v1/chat/completions")+async def chat_completions(request: Request):+ body = await request.json()+ params = dict(body.get("minicpm_ocr") or {})+ model = str(body.get("model", ""))+ stream = bool(body.get("stream"))++ if model in PAGE_MODELS or model == BLOCK_MODEL:+ target = model+ else:+ mode = str(params.get("mode") or body.get("mode") or "ocr_only").strip()+ target = LIS_MODES.get(mode)+ if target is None:+ return _err(400, f"未知 minicpm_ocr.mode: {mode!r},可选 {' / '.join(LIS_MODES)}")+++ merged = {k: body[k] for k in ("image", "page_index", "order", "source_token", "pages") if k in body}+ merged.update({k: v for k, v in params.items() if k != "mode"})+ if "source_token" not in merged and merged.get("request_id"):+ merged["source_token"] = merged["request_id"]++ if target == "merge":+ return _chat_response(await run_in_threadpool(_handle_merge, merged), model, stream)+ if target == BLOCK_MODEL:+ return _chat_response(await run_in_threadpool(_handle_rerun_block, merged), model, stream)++ merged["image"] = merged.get("image") or _image_from_messages(body.get("messages"))+ if not merged["image"]:++ return _chat_response(JSONResponse(content={"choices": [{"message": {"content": LIS_USAGE_TEXT}}]}),+ model, stream)+ return _chat_response(await run_in_threadpool(_handle_full_page, merged, target), model, stream)++[email protected]("/api/image-parse/merge")+async def image_parse_merge(request: Request):+ body = await request.json()+ return await run_in_threadpool(_handle_merge, body)++[email protected]("/api/page-parse")+async def page_parse(request: Request):+ '摆正和版面做完就返回票据。切片在这台机器的队列里继续解码。'+ raw = await request.body()+ if not raw:+ return _err(400, "缺少页面图片")+ header = request.headers.get("x-ocr-upright")+ if header is None:+ upright = None+ elif header == "0":+ upright = False+ elif header == "1":+ upright = True+ else:+ return _err(400, "X-OCR-Upright 只能是 0 或 1")+ try:+ import page_fleet+ handle = await run_in_threadpool(page_fleet.launch_local_page, RUNNER, raw, upright)+ ready = await run_in_threadpool(handle.layout_done.wait, 180)+ except Exception as exc:+ return _err(500, f"识别失败:{exc}")+ if not ready:+ return _err(504, "版面超时")+ if handle.error is not None and not handle.laid_out:+ return _err(500, f"识别失败:{handle.error}")+ return {"ticket": page_fleet.remember(handle)}++[email protected]("/api/page-markdown/{ticket}")+def page_markdown(ticket: str):+ '票据对应的页还在解码时 ready 为 false。'+ import page_fleet+ try:+ page = page_fleet.take_markdown(ticket)+ except KeyError:+ return _err(404, "没有这一页")+ except Exception as exc:+ return _err(500, f"识别失败:{exc}")+ if page is None:+ return {"ready": False}+ return {"ready": True, **page}++[email protected]("/api/obs-parse")+async def obs_parse_start(request: Request):+ '提交华为云对象。立刻返回 Running,解析在后台进行。'+ body = await request.json()+ try:+ return obs_jobs.submit(body, RUNNER)+ except ValueError as exc:+ return _err(400, str(exc))++[email protected]("/api/obs-parse/{job_id}")+def obs_parse_status(job_id: str):+ 'Running、Failed,或成功时直接返回各页识别结果。'+ found = obs_jobs.lookup(job_id)+ if found is None:+ return _err(404, "没有这个解析任务")+ return found++[email protected]("/api/image-parse")+async def image_parse(request: Request):+ body = await request.json()+ model = body.get("model", "")++ if model == "minicpm-ocr-tts-block":+ return await run_in_threadpool(_handle_rerun_block, body)+ elif model == "minicpm-ocr-seal":+ return await run_in_threadpool(_handle_seal, body)+ elif model == "minicpm-ocr-kie":+ return await run_in_threadpool(_handle_kie, body)+ elif model in ("minicpm-ocr", "minicpm-ocr-stp", "minicpm-ocr-tts"):+ return await run_in_threadpool(_handle_full_page, body, model)+ else:+ return _err(400, f"未知 model: {model!r},"+ "可选 minicpm-ocr / minicpm-ocr-stp / "+ "minicpm-ocr-tts / minicpm-ocr-tts-block / minicpm-ocr-seal / "+ "minicpm-ocr-kie")+++def _handle_full_page(body: Dict, model: str) -> JSONResponse:+ mode_map = {+ "minicpm-ocr": "standard",+ "minicpm-ocr-stp": "scored",+ "minicpm-ocr-tts": "high-precision",+ }+ mode = mode_map[model]++ if mode in ("scored", "high-precision") and not RM_SVC.configured():+ return _err(400, "RM 未配置:请设置 OCR_RM_INPUT_FORM=binary|ternary")++ image_b64 = body.get("image", "")+ if not image_b64:+ return _err(400, "缺少 image 字段")+ page_index = int(body.get("page_index", 0) or 0)+ try:+ import page_fleet+ upright_choice = page_fleet.coerce_upright(body.get("upright")) if "upright" in body else None+ except ValueError as exc:+ return _err(400, str(exc))++ job_id = new_job_id()+ job_dir = JOBS_DIR / job_id+ input_dir = job_dir / "input"+ input_dir.mkdir(parents=True, exist_ok=True)++ try:+ raw_bytes, suffix = _decode_upload(image_b64)+ img_stem = f"page_{page_index:04d}"+ img_path = input_dir / f"{img_stem}{suffix}"+ img_path.write_bytes(raw_bytes)+ except Exception as exc:+ shutil.rmtree(job_dir, ignore_errors=True)+ return _err(400, f"图片解码失败:{exc}")++ try:+ upright_on = page_fleet.resolve_upright(upright_choice)++ cfg = RUNNER.build_cfg(job_id, upright=upright_on,+ mode=_mode_to_recipe(mode),+ save_crops=mode != "standard")+ from minicpmvocr import pipelined_run+ with RUNNER.acquire(cfg) as resources:+ pipelined_run(cfg, resources=resources)+ except Exception as exc:+ shutil.rmtree(job_dir, ignore_errors=True)+ return _err(500, f"识别失败:{exc}")++ inter = job_dir / "runtime" / "intermediate"+ layout = _read_json(inter / "layouts" / f"{img_stem}.json")+ result = _read_json(job_dir / "results_json" / f"{img_stem}.json")+++ request_id = job_id+ created_at = int(time.time())+ source_token = request_id++ upright_enabled = bool(cfg.get("upright", {}).get("enabled", True))++ (job_dir / JOB_META).write_text(json.dumps({+ "mode": mode, "page_index": page_index, "created_at": created_at,+ "upright_enabled": upright_enabled, "image_id": img_stem,+ }), encoding="utf-8")+ resp = _build_page_response(+ image_id=img_stem, layout=layout, result=result,+ request_id=request_id, mode=mode,+ upright_enabled=upright_enabled,+ created_at=created_at, source_token=source_token,+ page_index=page_index,+ )+ return JSONResponse(content=resp)+++def _handle_seal(body: Dict) -> JSONResponse:++ image_b64 = body.get("image", "")+ if not image_b64:+ return _err(400, "缺少 image 字段")+ try:+ raw_bytes, _suffix = _decode_upload(image_b64)+ from PIL import Image+ with Image.open(io.BytesIO(raw_bytes)) as opened:+ image = opened.convert("RGB").copy()+ width, height = image.size+ if width <= 0 or height <= 0:+ raise ValueError("空图")+ except Exception as exc:+ return _err(400, f"图片解码失败:{exc}")++ try:+ from minicpmvocr.postprocess.markdown import postprocess_content+ from minicpmvocr.prompts import DEFAULT_PROMPT_MAP, get_element_cfg+ elem = get_element_cfg(DEFAULT_PROMPT_MAP, "seal")+ if not elem:+ raise RuntimeError("印章 prompt 未配置")+ recognized = OCR_SVC.recognize(+ image,+ prompt=elem["prompt"],+ max_new_tokens=int(elem["max_new_tokens"]),+ slice_nums=elem.get("slice_nums"),+ )+ text = postprocess_content(recognized.get("text") or "", elem["output_format"], label="seal")+ except Exception as exc:+ return _err(500, f"识别失败:{exc}")++ return JSONResponse(content={+ "choices": [{"message": {"content": text}}],+ "minicpm_ocr": {+ "mode": "seal",+ "image_width": width,+ "image_height": height,+ "blocks": [{+ "order": 0,+ "label": "seal",+ "bbox": [0, 0, width, height],+ "regions": [[0, 0, width, height]],+ "content": text,+ "status": "ok",+ }],+ },+ })+++KIE_MAX_FIELDS = 20+KIE_MAX_NEW_TOKENS = 1024+_KIE_FENCE = re.compile(r"^```(?:json)?\s*([\s\S]*?)\s*```$", re.IGNORECASE)+++def kie_prompt(fields: List[str]) -> str:+ '按训练里的英文抽字段句式拼提示。字段名原样放进引号。'+ quoted = ", ".join(f'"{name}"' for name in fields)+ return (+ f'Extract the {quoted}. Format the output as a JSON object with keys: {quoted}. '+ 'If an item is not in the image, use "###".'+ )+++def normalize_kie_fields(value) -> List[str]:+ '校验字段名。空串、引号、换行、重名和超长列表都拒绝。'+ if not isinstance(value, list) or not value:+ raise ValueError("缺少 fields")+ if len(value) > KIE_MAX_FIELDS:+ raise ValueError(f"fields 最多 {KIE_MAX_FIELDS} 个")+ names: List[str] = []+ seen = set()+ for item in value:+ if not isinstance(item, str):+ raise ValueError("fields 必须是字符串")+ name = item.strip()+ if not name or any(mark in name for mark in ('"', "'", "\n", "\r")):+ raise ValueError(f"字段名非法:{item!r}")+ if name in seen:+ raise ValueError(f"字段名重复:{name}")+ seen.add(name)+ names.append(name)+ return names+++def strip_kie_fence(text: str) -> str:+ '去掉首尾空白和包住整段的 json 围栏,不改字段内容。'+ stripped = (text or "").strip()+ fenced = _KIE_FENCE.match(stripped)+ return fenced.group(1).strip() if fenced else stripped+++def _handle_kie(body: Dict) -> JSONResponse:++ image_b64 = body.get("image", "")+ if not image_b64:+ return _err(400, "缺少 image 字段")+ try:+ fields = normalize_kie_fields(body.get("fields"))+ except ValueError as exc:+ return _err(400, str(exc))+ try:+ raw_bytes, _suffix = _decode_upload(image_b64)+ from PIL import Image+ with Image.open(io.BytesIO(raw_bytes)) as opened:+ image = opened.convert("RGB").copy()+ width, height = image.size+ if width <= 0 or height <= 0:+ raise ValueError("空图")+ except Exception as exc:+ return _err(400, f"图片解码失败:{exc}")++ prompt = kie_prompt(fields)+ try:+ recognized = OCR_SVC.recognize(+ image,+ prompt=prompt,+ max_new_tokens=KIE_MAX_NEW_TOKENS,+ slice_nums=9,+ )+ text = strip_kie_fence(recognized.get("text") or "")+ except Exception as exc:+ return _err(500, f"识别失败:{exc}")++ return JSONResponse(content={+ "choices": [{"message": {"content": text}}],+ "minicpm_ocr": {+ "mode": "kie",+ "prompt": prompt,+ "fields": fields,+ "image_width": width,+ "image_height": height,+ "blocks": [{+ "order": 0,+ "label": "kie",+ "bbox": [0, 0, width, height],+ "regions": [[0, 0, width, height]],+ "content": text,+ "status": "ok",+ }],+ },+ })+++def _handle_merge(body: Dict) -> JSONResponse:++ from minicpmvocr import load_prompt_map+ from minicpmvocr.postprocess.crosspage import apply_cross_page_merge++ items = body.get("pages")+ if not isinstance(items, list) or not items:+ return _err(400, "pages 不能为空")++ pages: List[Dict] = []+ ctx: Dict[str, Dict] = {}+ for item in items:+ rid = str((item or {}).get("request_id", ""))+ if not SOURCE_TOKEN.match(rid):+ return _err(400, f"request_id 非法:{rid!r}")+ job_dir = JOBS_DIR / rid+ meta = _read_json(job_dir / JOB_META)+ if not meta:+ return _err(404, f"识别结果已过期:{rid}")+ image_id = meta["image_id"]+ result = _read_json(job_dir / "results_json" / f"{image_id}.json")+ layout = _read_json(job_dir / "runtime" / "intermediate" / "layouts" / f"{image_id}.json")+ if not result or not layout:+ return _err(404, f"识别结果已过期:{rid}")++ pages.append({"image_id": rid, "page_index": int(meta["page_index"]),+ "markdown": result.get("markdown", ""),+ "blocks": result.get("crop_blocks") or []})+ ctx[rid] = {"meta": meta, "result": result, "layout": layout}+++ pages.sort(key=lambda p: p["page_index"])+ run = 0+ for i, page in enumerate(pages):+ if i and page["page_index"] != pages[i - 1]["page_index"] + 1:+ run += 1+ page["document"] = run++ cfg = RUNNER.build_cfg(pages[0]["image_id"], upright=False)+ changes = apply_cross_page_merge(pages, load_prompt_map(cfg))++ out = []+ for page in pages:+ rid = page["image_id"]+ change = changes.get(rid)+ if not change:+ continue+ old = {b.get("crop_filename"): b.get("content") for b in page["blocks"]}+ blocks, absorbed, extended = [], False, False+ for b in change["blocks"]:+ b = dict(b)+ if b.get("merged_into_previous_page"):+ absorbed = True+ b["tts_invalid"] = True+ elif b.get("label") == "table" and b.get("content") != old.get(b.get("crop_filename")):+ extended = True+ b["tts_invalid"] = True+ blocks.append(b)+ c = ctx[rid]+ merged_result = dict(c["result"], crop_blocks=blocks, markdown=change["markdown"])+ meta = c["meta"]+ resp = _build_page_response(+ image_id=meta["image_id"], layout=c["layout"], result=merged_result,+ request_id=rid, mode=meta["mode"],+ upright_enabled=bool(meta.get("upright_enabled")),+ created_at=int(meta["created_at"]), source_token=rid,+ page_index=page["page_index"],+ )++ resp["minicpm_ocr"]["cross_page"] = {"absorbed": absorbed, "extended": extended}+ out.append(resp)+ return JSONResponse(content={"merged_pages": len(out), "pages": out})+++def _handle_rerun_block(body: Dict) -> JSONResponse:+ if not RM_SVC.configured():+ return _err(400, "RM 未配置:请设置 OCR_RM_INPUT_FORM=binary|ternary")++ source_token = str(body.get("source_token", ""))+ order = body.get("order")+ page_index = int(body.get("page_index", 0) or 0)++ if not source_token or order is None:+ return _err(400, "缺少 source_token 或 order")++ if not SOURCE_TOKEN.match(source_token):+ return _err(400, "source_token 非法")+ img_stem = f"page_{page_index:04d}"+ job_dir = JOBS_DIR / source_token+ if not (job_dir / "results_json" / f"{img_stem}.json").is_file():+ return _err(404, "原识别结果已过期,请重新识别")+ if not (job_dir / "runtime" / "intermediate" / "crops" / img_stem).is_dir():+ return _err(400, "该结果不支持单块重算(标准模式不保留块图)")+++ try:+ with _job_lock(source_token):+ out = RUNNER.recompute_block(source_token, img_stem, int(order))+ except KeyError as exc:+ return _err(404, str(exc))+ except Exception as exc:+ return _err(500, f"重算失败:{exc}")++ new_block = out["result_block"]+ prior_score = _best_score(out.get("replaced") or {})+ score = _best_score(new_block)+ tts = new_block.get("tts") or {}+ regions = new_block.get("regions") or [new_block.get("bbox", [0, 0, 0, 0])]++ resp = {+ "metadata": {"page_index": page_index},+ "choices": [{"message": {"content": new_block.get("content", "")}}],+ "minicpm_ocr": {+ "request_id": _make_request_id(),+ "source_request_id": source_token,+ "mode": "tts_block",+ "order": int(order),+ "prior_score": prior_score,+ "block_count": 1,+ "blocks": [{+ "order": int(order),+ "label": new_block.get("label", ""),+ "bbox": new_block.get("bbox", [0, 0, 0, 0]),+ "regions": regions,+ "content": new_block.get("content", ""),+ "status": new_block.get("status", "ok"),+ "score": score,+ "rounds_used": tts.get("rounds_used"),+ "stop_reason": tts.get("stop_reason"),+ "exhausted": bool(tts.get("exhausted")),+ }],+ },+ }+ return JSONResponse(content=resp)++[email protected]_event("startup")+async def _startup():+ global RUNNER, OCR_SVC, RM_SVC+ DATA_DIR.mkdir(parents=True, exist_ok=True)++ if os.environ.get("OCR_PAGE_ROLE") not in ("gateway", "worker"):+ obs_jobs.recover_interrupted()+ RUNNER = Runner()+ if os.environ.get("OCR_PAGE_ROLE") == "worker":+ import page_fleet+ threading.Thread(target=page_fleet.advertise, args=(PORT,), name="page-advertise", daemon=True).start()+ OCR_SVC = OcrService(vllm_url=VLLM_URL, model_name=SERVED_MODEL)+ RM_SVC = RmService(model_dir=RM_MODEL_DIR, input_form=RM_INPUT_FORM)+ print(+ f"[webdemo] serving on http://0.0.0.0:{PORT}"+ f" vllm={VLLM_URL} model={SERVED_MODEL}"+ f" rm_form={RM_INPUT_FORM or '(unset)'}",+ flush=True,+ )+++if __name__ == "__main__":+ uvicorn.run(+ "server:app",+ host="0.0.0.0",+ port=PORT,+ workers=1,+ log_level="info",+ )diff --git a/sdk/webdemo/start_dispatcher.sh b/sdk/webdemo/start_dispatcher.shnew file mode 100755index 0000000..dab5fb3--- /dev/null+++ b/sdk/webdemo/start_dispatcher.sh@@ -0,0 +1,40 @@+#!/usr/bin/env bash+set -euo pipefail+source "$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/scripts/demo_env.sh" webdemo+cd "$OCR_DEMO_DIR"+ocr_require_python+unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY all_proxy ALL_PROXY++export CUDA_VISIBLE_DEVICES=""+export OCR_PAGE_ROLE=dispatcher+export OCR_PAGE_WINDOW="${OCR_PAGE_WINDOW:-8}"+export OCR_PAGE_SLOTS="${OCR_PAGE_SLOTS:-64}"+PY="$OCRWEB_PYTHON"+COUNT="${OCR_DISPATCH_COUNT:-16}"++OCR_DISPATCH_RECOVER=1 "$PY" -s -c 'import obs_jobs; obs_jobs.recover_interrupted()'+unset OCR_DISPATCH_RECOVER++pids=()+start_one() {+ "$PY" -s dispatcher.py &+ pids+=("$!")+}+for _ in $(seq 1 "$COUNT"); do+ start_one+done++cleanup() {+ kill "${pids[@]}" 2>/dev/null || true+}+trap cleanup EXIT INT TERM++while true; do+ for i in "${!pids[@]}"; do+ if ! kill -0 "${pids[$i]}" 2>/dev/null; then+ "$PY" -s dispatcher.py &+ pids[$i]="$!"+ fi+ done+ sleep 2+donediff --git a/sdk/webdemo/start_gateway.sh b/sdk/webdemo/start_gateway.shnew file mode 100755index 0000000..3c13b3f--- /dev/null+++ b/sdk/webdemo/start_gateway.sh@@ -0,0 +1,12 @@+#!/usr/bin/env bash+set -euo pipefail+source "$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/scripts/demo_env.sh" webdemo+cd "$OCR_DEMO_DIR"+ocr_require_python+unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY all_proxy ALL_PROXY++export CUDA_VISIBLE_DEVICES=""+export OCR_PAGE_ROLE=gateway+export OCR_LOCAL_WORKER_URL="${OCR_LOCAL_WORKER_URL:-http://127.0.0.1:8953}"+export PORT="${PORT:-8952}"+exec "$OCRWEB_PYTHON" -s -m uvicorn server:app --host "${HOST:-0.0.0.0}" --port "$PORT" --workers 1diff --git a/sdk/webdemo/start_local_worker.sh b/sdk/webdemo/start_local_worker.shnew file mode 100755index 0000000..78538e4--- /dev/null+++ b/sdk/webdemo/start_local_worker.sh@@ -0,0 +1,21 @@+#!/usr/bin/env bash+set -euo pipefail+source "$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/scripts/demo_env.sh" webdemo+cd "$OCR_DEMO_DIR"+ocr_require_python+unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY all_proxy ALL_PROXY++export CUDA_VISIBLE_DEVICES="${CUDA_VISIBLE_DEVICES:-0}"+export OCR_LAYOUT_WORKERS="${OCR_LAYOUT_WORKERS:-32}"+export OCR_PAGE_SLOTS="${OCR_PAGE_SLOTS:-64}"+export OCR_UPRIGHT_WORKERS="${OCR_UPRIGHT_WORKERS:-20}"+export OCR_SHARED_CROP_POOL="${OCR_SHARED_CROP_POOL:-1}"+export OCR_CROP_WORKERS="${OCR_CROP_WORKERS:-112}"+export OCR_LAYOUT_DEVICE="${OCR_LAYOUT_DEVICE:-cuda:0}"+export OCR_SERVED_NAME="${OCR_SERVED_NAME:-minicpm-ocr}"+export VLLM_URL="${VLLM_URL:-http://127.0.0.1:18499}"+export OCR_RM_URL="${OCR_RM_URL:-http://127.0.0.1:18022}"+export OCR_RM_INPUT_FORM="${OCR_RM_INPUT_FORM:-binary}"+export OCR_PAGE_ROLE=worker+export PORT="${PORT:-8953}"+exec "$OCRWEB_PYTHON" -s -m uvicorn server:app --host "${HOST:-0.0.0.0}" --port "$PORT" --workers 1diff --git a/sdk/webdemo/start_replica.sh b/sdk/webdemo/start_replica.shnew file mode 100755index 0000000..8732e6f--- /dev/null+++ b/sdk/webdemo/start_replica.sh@@ -0,0 +1,32 @@+#!/usr/bin/env bash+set -euo pipefail+source "$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/scripts/demo_env.sh" webdemo+cd "$OCR_DEMO_DIR"+ocr_require_python+unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY all_proxy ALL_PROXY++: "${OCR_REPLICA_GPUS:?Set OCR_REPLICA_GPUS to space-separated GPU IDs}"+export VLLM_SERVED_NAME="${VLLM_SERVED_NAME:-minicpm-ocr}"+export VLLM_GPU_UTIL="${VLLM_GPU_UTIL:-0.90}"+export VLLM_MAX_MODEL_LEN="${VLLM_MAX_MODEL_LEN:-16384}"+export VLLM_USE_FLASHINFER_SAMPLER="${VLLM_USE_FLASHINFER_SAMPLER:-0}"+base_port="${VLLM_BASE_PORT:-18500}"+read -r -a gpus <<< "$OCR_REPLICA_GPUS"+pids=()+replica_urls=""+for index in "${!gpus[@]}"; do+ port=$((base_port + index))+ replica_urls="${replica_urls:+$replica_urls,}http://127.0.0.1:$port"+ CUDA_VISIBLE_DEVICES="${gpus[$index]}" VLLM_PORT="$port" VLLM_LOG="$OCRWEB_DATA_DIR/vllm_${port}.log" \+ bash "$OCR_DEMO_DIR/scripts/start_vllm.sh" &+ pids+=("$!")+done+fail=0+for pid in "${pids[@]}"; do+ wait "$pid" || fail=1+done+[[ "$fail" -eq 0 ]] || { echo "vLLM failed to become ready" >&2; exit 1; }+export VLLM_URL="${VLLM_URL:-http://127.0.0.1:$base_port}"+export VLLM_URLS="${VLLM_URLS:-$replica_urls}"+export PORT="${PORT:-8952}"+exec bash "$OCR_DEMO_DIR/start_local_worker.sh"diff --git a/sdk/webdemo/start_upright_service.sh b/sdk/webdemo/start_upright_service.shnew file mode 100755index 0000000..5d088b3--- /dev/null+++ b/sdk/webdemo/start_upright_service.sh@@ -0,0 +1,12 @@+#!/usr/bin/env bash+set -euo pipefail+source "$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/scripts/demo_env.sh" webdemo+cd "$OCR_DEMO_DIR"+ocr_require_python+unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY all_proxy ALL_PROXY++export OCR_UPRIGHT_WORKERS="${OCR_UPRIGHT_WORKERS:-20}"+export OCR_UPRIGHT_DEVICE="${OCR_UPRIGHT_DEVICE:-cpu}"+export OCR_UPRIGHT_CPU_THREADS="${OCR_UPRIGHT_CPU_THREADS:-1}"+export OCR_CV2_THREADS="${OCR_CV2_THREADS:-1}"+exec "$OCRWEB_PYTHON" -s upright_server.py --host "${HOST:-0.0.0.0}" --port "${OCR_UPRIGHT_PORT:-18080}"diff --git a/sdk/webdemo/upright_server.py b/sdk/webdemo/upright_server.pynew file mode 100644index 0000000..611f42b--- /dev/null+++ b/sdk/webdemo/upright_server.py@@ -0,0 +1,124 @@+#!/usr/bin/env python3++from __future__ import annotations++import argparse+import base64+import io+import json+import os+import socket+import threading+import time+from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer+from pathlib import Path++import numpy as np+from PIL import Image++from minicpmvocr.pipeline.upright import build_upright_pool+++def _cfg() -> dict:+ assets = Path(os.environ.get("OCR_ASSETS_DIR", Path(__file__).resolve().parents[2] / "models"))+ root = os.environ.get("OCR_UPRIGHT_DIR", str(assets / "paddle_upright")).rstrip("/")+ return {+ "upright": {+ "enabled": True,+ "model_dir": f"{root}/PP-LCNet_x1_0_doc_ori",+ "det_model_dir": f"{root}/PP-OCRv5_mobile_det",+ "textline_model_dir": f"{root}/PP-LCNet_x1_0_textline_ori",+ "device": os.environ.get("OCR_UPRIGHT_DEVICE", "cpu"),+ }+ }+++def _own_ip() -> str:+ configured = os.environ.get("OCR_ADVERTISE_HOST", "").strip()+ if configured:+ return configured+ try:+ return socket.gethostbyname(socket.gethostname())+ except OSError:+ return "127.0.0.1"+++POOL = None+ADVERTISE = ""+++class Handler(BaseHTTPRequestHandler):+ protocol_version = "HTTP/1.1"++ def log_message(self, fmt, *args):+ return++ def _json(self, code: int, payload: dict) -> None:+ body = json.dumps(payload, ensure_ascii=False).encode("utf-8")+ self.send_response(code)+ self.send_header("Content-Type", "application/json")+ self.send_header("Content-Length", str(len(body)))+ self.end_headers()+ self.wfile.write(body)++ def do_GET(self):+ if self.path.split("?", 1)[0] != "/health":+ self._json(404, {"error": "not found"})+ return+ self._json(200, {"ok": True, "workers": POOL.workers, "url": ADVERTISE})++ def do_POST(self):+ if self.path.split("?", 1)[0] != "/v1/upright":+ self._json(404, {"error": "not found"})+ return+ length = int(self.headers.get("Content-Length") or 0)+ raw = self.rfile.read(length) if length else b""+ try:+ image = np.asarray(Image.open(io.BytesIO(raw)).convert("RGB"))+ corrected, record = POOL.correct(image)+ except Exception as exc:+ self._json(500, {"error": str(exc) or exc.__class__.__name__})+ return+ payload = {"applied": bool(record.get("applied")), "record": record}+ if payload["applied"]:+ buf = io.BytesIO()+ Image.fromarray(corrected).save(buf, format="PNG")+ payload["image_png_b64"] = base64.b64encode(buf.getvalue()).decode("ascii")+ self._json(200, payload)+++def _advertise(registry: str, url: str, workers: int) -> None:+ os.makedirs(registry, exist_ok=True)+ host = socket.gethostname()+ path = os.path.join(registry, f"{host}.json")+ body = json.dumps({"url": url, "workers": workers, "host": host}, ensure_ascii=False)+ while True:+ tmp = path + ".tmp"+ with open(tmp, "w", encoding="utf-8") as handle:+ handle.write(body)+ os.replace(tmp, path)+ time.sleep(15)+++def main() -> None:+ global POOL, ADVERTISE+ parser = argparse.ArgumentParser()+ parser.add_argument("--host", default="0.0.0.0")+ parser.add_argument("--port", type=int, default=18080)+ args = parser.parse_args()+ workers = int(os.environ.get("OCR_UPRIGHT_WORKERS", "20"))+ print(f"[upright_server] loading {workers} workers", flush=True)+ POOL = build_upright_pool(_cfg(), workers)+ ip = _own_ip()+ ADVERTISE = f"http://{ip}:{args.port}"+ registry = os.environ.get(+ "OCR_UPRIGHT_REGISTRY",+ str(Path(os.environ.get("OCRWEB_DATA_DIR", Path(__file__).resolve().parent / "data")) / "upright-workers"),+ )+ threading.Thread(target=_advertise, args=(registry, ADVERTISE, POOL.workers), daemon=True).start()+ print(f"[upright_server] listening {ADVERTISE}", flush=True)+ ThreadingHTTPServer((args.host, args.port), Handler).serve_forever()+++if __name__ == "__main__":+ main()diff --git a/sdk/webui/runner.py b/sdk/webui/runner.pynew file mode 100644index 0000000..ab4569b--- /dev/null+++ b/sdk/webui/runner.py@@ -0,0 +1,255 @@+#!/usr/bin/env python3++from __future__ import annotations++import json+import os+import shutil+import sys+import threading+import time+import traceback+import uuid+from pathlib import Path+from queue import Queue+from typing import Dict, List, Optional++BASE = Path(__file__).resolve().parent+REPO = BASE.parent+if str(REPO) not in sys.path:+ sys.path.insert(0, str(REPO))++import minicpmvocr # noqa: E402+from minicpmvocr import ( # noqa: E402+ create_backend,+ create_layout_detector,+ load_config,+ pipelined_run,+)+++CONFIG_PATH = Path(os.environ.get(+ "OCRWEB_CONFIG", Path(minicpmvocr.__file__).parent / "configs" / "minicpmvocr.yaml"+))+DATA_DIR = Path(os.environ.get("OCRWEB_DATA_DIR", BASE / "data"))+JOBS_DIR = DATA_DIR / "jobs"++WEBUI_OVERRIDES: Dict = {+ "pipeline": {+ "overlap_layout": True,+ "save_crops": True,+ "save_pages": True,+ },+ "logging": {"progress_log_every": 5},+}+SUPPORTED_SUFFIXES = {".pdf", ".png", ".jpg", ".jpeg", ".bmp", ".webp", ".tif", ".tiff"}+++def _webui_overrides(**sections) -> Dict:++ merged = {key: dict(value) for key, value in WEBUI_OVERRIDES.items()}+ for key, value in sections.items():+ merged.setdefault(key, {}).update(value)+ server_urls = [url.strip() for url in os.environ.get("VLLM_URLS", "").split(",") if url.strip()]+ if server_urls:+ merged.setdefault("engine", {}).update(server_url="", server_urls=server_urls)+ return merged+++def new_job_id() -> str:+ return time.strftime("%Y%m%d_%H%M%S") + "_" + uuid.uuid4().hex[:6]+++def _atomic_write_json(path: Path, obj: Dict) -> None:++ tmp = path.with_suffix(".json.tmp")+ tmp.write_text(json.dumps(obj, ensure_ascii=False, indent=2), encoding="utf-8")+ tmp.replace(path)+++def read_job(job_id: str) -> Optional[Dict]:+ path = JOBS_DIR / job_id / "job.json"+ if not path.is_file():+ return None+ try:+ return json.loads(path.read_text(encoding="utf-8"))+ except Exception:+ return None+++def list_jobs() -> List[Dict]:+ if not JOBS_DIR.is_dir():+ return []+ jobs = []+ for entry in JOBS_DIR.iterdir():+ if not entry.is_dir():+ continue+ meta = read_job(entry.name)+ if meta:+ jobs.append(meta)+ jobs.sort(key=lambda j: j.get("created_at", ""), reverse=True)+ return jobs+++class Runner:+ 'Serial job worker. Models load lazily on the first job, then stay.'++ def __init__(self) -> None:+ JOBS_DIR.mkdir(parents=True, exist_ok=True)+ self._queue: Queue = Queue()+ self._lock = threading.Lock()+ self._resources: Dict | None = None+ self._base_cfg: Dict | None = None+ self._base_cfg_error = ""+ self.current_job_id: str | None = None++ for meta in list_jobs():+ if meta.get("status") in ("running", "queued"):+ meta["status"] = "failed"+ meta["error"] = meta.get("error") or "进程重启,任务中断"+ _atomic_write_json(JOBS_DIR / meta["id"] / "job.json", meta)+ self._thread = threading.Thread(target=self._loop, name="ocr-job-worker", daemon=True)+ self._thread.start()+++ def base_cfg(self) -> Dict:+ 'Deployment config with no job bound to it.'+ if self._base_cfg is None:+ DATA_DIR.mkdir(parents=True, exist_ok=True)+ self._base_cfg = load_config(str(CONFIG_PATH), _webui_overrides(+ run={"run_root": str(JOBS_DIR)},+ input={"files_dir": str(DATA_DIR)},+ ))+ return self._base_cfg++ def build_cfg(self, job_id: str, upright: bool) -> Dict:+ job_dir = JOBS_DIR / job_id+ overrides = _webui_overrides(+ run={"run_tag": job_id, "run_root": str(JOBS_DIR), "mode": "full"},+ input={+ "files_dir": str(job_dir / "input"),+ "file_path": "",+ "image_dir": "",+ "manifest": "",+ "limit": 0,+ },+ upright={"enabled": bool(upright)},+ )+ return load_config(str(CONFIG_PATH), overrides)++ def _ensure_resources(self, cfg: Dict) -> Dict:++ if self._resources is not None:+ return self._resources+ detector = create_layout_detector(cfg["layout"])+ detector.start()+ upright = None+ try:+ from minicpmvocr import UprightCorrector++ upright_cfg = dict(cfg)+ upright_cfg["upright"] = dict(cfg["upright"], enabled=True)+ upright = UprightCorrector(upright_cfg)+ except Exception as exc:+ print(f"[runner] upright unavailable: {exc}", flush=True)+ engine = create_backend(cfg)+ engine.start()+ self._resources = {"detectors": [detector], "upright": upright, "engine": engine}+ return self._resources++ def resources_status(self) -> Dict:+ res = self._resources or {}+ return {+ "loaded": self._resources is not None,+ "layout": bool(res.get("detectors")),+ "upright": res.get("upright") is not None,+ "engine": res.get("engine") is not None,+ }+++ def submit(self, job_id: str, name: str, files: List[str], upright: bool) -> Dict:+ meta = {+ "id": job_id,+ "name": name or (files[0] if files else job_id),+ "files": files,+ "created_at": time.strftime("%Y-%m-%d %H:%M:%S"),+ "upright": bool(upright),+ "status": "queued",+ "pages_total": 0,+ "pages_done": 0,+ "elapsed_sec": 0.0,+ "error": "",+ }+ _atomic_write_json(JOBS_DIR / job_id / "job.json", meta)+ self._queue.put(job_id)+ return meta++ def delete(self, job_id: str) -> bool:+ with self._lock:+ if job_id == self.current_job_id:+ return False+ job_dir = JOBS_DIR / job_id+ if not job_dir.is_dir():+ return False+ shutil.rmtree(job_dir, ignore_errors=True)+ return True++ def _update(self, job_id: str, **fields) -> None:+ meta = read_job(job_id) or {"id": job_id}+ meta.update(fields)+ _atomic_write_json(JOBS_DIR / job_id / "job.json", meta)++ def _loop(self) -> None:+ while True:+ job_id = self._queue.get()+ with self._lock:+ self.current_job_id = job_id+ started = time.time()+ watcher_stop = threading.Event()+ try:+ meta = read_job(job_id) or {}+ cfg = self.build_cfg(job_id, bool(meta.get("upright", True)))+ self._update(job_id, status="loading_models")+ resources = self._ensure_resources(cfg)+ self._update(job_id, status="running")+ threading.Thread(+ target=self._watch_progress,+ args=(job_id, started, watcher_stop),+ daemon=True,+ ).start()+ summary = pipelined_run(cfg, resources=resources)+ counts = summary.get("counts") or {}+ done = int(counts.get("ok_pages", 0) or 0) or len(+ list((JOBS_DIR / job_id / "output").glob("*.md"))+ )+ self._update(+ job_id,+ status="done",+ pages_total=done,+ pages_done=done,+ elapsed_sec=round(time.time() - started, 2),+ error="",+ )+ except Exception as exc:+ traceback.print_exc()+ self._update(+ job_id,+ status="failed",+ elapsed_sec=round(time.time() - started, 2),+ error=f"{type(exc).__name__}: {exc}",+ )+ finally:+ watcher_stop.set()+ with self._lock:+ self.current_job_id = None+ self._queue.task_done()++ def _watch_progress(self, job_id: str, started: float, stop: threading.Event) -> None:++ out_dir = JOBS_DIR / job_id / "output"+ while not stop.wait(1.0):+ try:+ done = len(list(out_dir.glob("*.md"))) if out_dir.is_dir() else 0+ self._update(job_id, pages_done=done, elapsed_sec=round(time.time() - started, 2))+ except Exception:+ passdiff --git a/sdk/webui/scripts/setup_env.sh b/sdk/webui/scripts/setup_env.shnew file mode 100755index 0000000..a491dee--- /dev/null+++ b/sdk/webui/scripts/setup_env.sh@@ -0,0 +1,25 @@+#!/usr/bin/env bash+set -euo pipefail+HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"+source "$HERE/../../scripts/demo_env.sh" webui+case "$SDK_PROFILE" in+ sdk-cpu|sdk-gpu) ;;+ *) echo "SDK_PROFILE must be sdk-cpu or sdk-gpu" >&2; exit 2 ;;+esac+command -v uv >/dev/null || { echo "Install uv first: python3 -m pip install uv" >&2; exit 1; }+if [[ ! -x "$OCRWEB_ENV/bin/python" ]]; then+ uv venv --python "${OCR_PYTHON:-3.12}" "$OCRWEB_ENV"+fi+uv pip install --python "$OCRWEB_ENV/bin/python" -r "$PROJECT_ROOT/pyproject.toml" \+ --extra "$SDK_PROFILE" fastapi uvicorn python-multipart httpx+if [[ "${OCR_DOWNLOAD_UPRIGHT:-0}" == 1 ]]; then+ endpoint="${HF_ENDPOINT:-https://huggingface.co}"+ for model in PP-LCNet_x1_0_doc_ori PP-OCRv5_mobile_det PP-LCNet_x1_0_textline_ori; do+ mkdir -p "$OCR_UPRIGHT_DIR/$model"+ for file in config.json inference.json inference.pdiparams inference.yml; do+ curl -fL --retry 3 "$endpoint/PaddlePaddle/$model/resolve/main/$file" -o "$OCR_UPRIGHT_DIR/$model/$file"+ done+ done+fi+printf 'Environment ready: %s\nLayout model directory: %s\n' "$OCRWEB_ENV" "$OCR_LAYOUT_MODEL_DIR"+printf 'Start the service with: bash %s/start_webui.sh\n' "$HERE"diff --git a/sdk/webui/scripts/start_vllm.sh b/sdk/webui/scripts/start_vllm.shnew file mode 100755index 0000000..baa3395--- /dev/null+++ b/sdk/webui/scripts/start_vllm.sh@@ -0,0 +1,54 @@+#!/usr/bin/env bash+++set -euo pipefail++source "$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)/scripts/demo_env.sh" webui+VLLM_PY="$VLLM_PYTHON"+MODEL="${OCR_MODEL_PATH}"+PORT="${VLLM_PORT:-18499}"+SERVED="${VLLM_SERVED_NAME:-minicpm-ocr}"+GPU_UTIL="${VLLM_GPU_UTIL:-0.60}"+MAX_LEN="${VLLM_MAX_MODEL_LEN:-16384}"+LOG="${VLLM_LOG:-$(dirname "$0")/../data/vllm.log}"++[[ -x "$VLLM_PY" ]] || { echo "vLLM python not found: $VLLM_PY" >&2; exit 1; }+[[ -d "$MODEL" ]] || { echo "model dir not found: $MODEL" >&2; exit 1; }+mkdir -p "$(dirname "$LOG")"++unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY+if [[ -n "${CUDA_COMPAT_DIR:-}" ]]; then+ export LD_LIBRARY_PATH="$CUDA_COMPAT_DIR${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"+fi+export VLLM_USE_FLASHINFER_SAMPLER=0+export CUDA_VISIBLE_DEVICES="${CUDA_VISIBLE_DEVICES:-0}"+export TORCH_EXTENSIONS_DIR="${TORCH_EXTENSIONS_DIR:-/tmp/torchext_$PORT}"+export TRITON_CACHE_DIR="${TRITON_CACHE_DIR:-/tmp/triton_$PORT}"++if curl -s --noproxy '*' -m 3 "http://127.0.0.1:$PORT/v1/models" >/dev/null 2>&1; then+ echo "vLLM already serving on :$PORT"+ exit 0+fi++echo "starting vLLM: model=$MODEL port=$PORT log=$LOG"+nohup "$VLLM_PY" -m vllm.entrypoints.openai.api_server \+ --model "$MODEL" \+ --served-model-name "$SERVED" \+ --host 0.0.0.0 --port "$PORT" \+ --gpu-memory-utilization "$GPU_UTIL" \+ --max-model-len "$MAX_LEN" \+ --limit-mm-per-prompt '{"image":1}' \+ --trust-request-mm-kwargs \+ >"$LOG" 2>&1 &++echo "pid=$! ; waiting for readiness (up to 600s)"+for _ in $(seq 1 200); do+ if curl -s --noproxy '*' -m 3 "http://127.0.0.1:$PORT/v1/models" >/dev/null 2>&1; then+ echo "READY http://127.0.0.1:$PORT (served-model-name=$SERVED)"+ exit 0+ fi+ sleep 3+done+echo "TIMEOUT waiting for vLLM; tail of $LOG:" >&2+tail -30 "$LOG" >&2+exit 1diff --git a/sdk/webui/scripts/start_webui.sh b/sdk/webui/scripts/start_webui.shnew file mode 100755index 0000000..ba02b06--- /dev/null+++ b/sdk/webui/scripts/start_webui.sh@@ -0,0 +1,39 @@+#!/usr/bin/env bash++set -euo pipefail++HERE="$(cd "$(dirname "$0")" && pwd)"+REPO="$(cd "$HERE/../.." && pwd)"+source "$REPO/scripts/demo_env.sh" webui+PY="$OCRWEB_PYTHON"+PORT="${PORT:-8950}"+LOG="${OCRWEB_LOG:-$OCRWEB_DATA_DIR/webui.log}"++[[ -x "$PY" ]] || { echo "python not found: $PY(先跑 scripts/setup_env.sh)" >&2; exit 1; }+mkdir -p "$(dirname "$LOG")"+++unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY+export PYTHONPATH="$REPO${PYTHONPATH:+:$PYTHONPATH}"+export PYTHONNOUSERSITE=1+++export OCR_LAYOUT_MODEL_DIR="${OCR_LAYOUT_MODEL_DIR}"+export OCR_UPRIGHT_DIR="${OCR_UPRIGHT_DIR}"+export OCR_SERVED_NAME="${OCR_SERVED_NAME:-minicpm-ocr}"+export VLLM_URL="${VLLM_URL:-http://127.0.0.1:18499}"++pkill -f "ocrweb-server $PORT" 2>/dev/null || true+sleep 0.5++cd "$REPO/webui"+PORT="$PORT" nohup "$PY" -s server.py "ocrweb-server $PORT" >"$LOG" 2>&1 &+PID=$!+sleep 1.5++if ! kill -0 "$PID" 2>/dev/null; then+ echo "启动失败,日志尾部:" >&2; tail -20 "$LOG" >&2; exit 1+fi+IP=$(hostname -I 2>/dev/null | awk '{print $1}')+curl -s --noproxy '*' -m 5 -o /dev/null -w "pid=$PID http://${IP:-127.0.0.1}:$PORT status=%{http_code}\n" "http://127.0.0.1:$PORT/"+echo "日志: $LOG"diff --git a/sdk/webui/server.py b/sdk/webui/server.pynew file mode 100644index 0000000..45cb5de--- /dev/null+++ b/sdk/webui/server.py@@ -0,0 +1,444 @@+#!/usr/bin/env python3++from __future__ import annotations++import json+import os+import re+import shutil+import sys+import urllib.request+from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer+from pathlib import Path+from typing import Dict, List, Optional+from urllib.parse import parse_qs, unquote++BASE = Path(__file__).resolve().parent+if str(BASE.parent) not in sys.path:+ sys.path.insert(0, str(BASE.parent))++import runner as runner_mod # noqa: E402+from runner import JOBS_DIR, SUPPORTED_SUFFIXES, Runner, list_jobs, new_job_id, read_job # noqa: E402++PORT = int(os.environ.get("PORT", "8950"))+STATIC = BASE / "static"++SAFE_ID = re.compile(r"^[A-Za-z0-9_.\-]{1,128}$")+MAX_UPLOAD_BYTES = int(os.environ.get("OCRWEB_MAX_UPLOAD_MB", "512")) * 1024 * 1024++PAGE_DELIMITER = "\n\n<!-- page-break -->\n\n"+++OPENER = urllib.request.build_opener(urllib.request.ProxyHandler({}))++CTYPES = {+ "html": "text/html; charset=utf-8",+ "js": "application/javascript; charset=utf-8",+ "css": "text/css; charset=utf-8",+ "json": "application/json; charset=utf-8",+ "md": "text/markdown; charset=utf-8",+ "png": "image/png",+ "jpg": "image/jpeg",+ "jpeg": "image/jpeg",+ "svg": "image/svg+xml",+ "woff": "font/woff",+ "woff2": "font/woff2",+ "ttf": "font/ttf",+ "ico": "image/x-icon",+}+++RUNNER: Runner = None # type: ignore[assignment]+++def ctype_for(path: Path) -> str:+ return CTYPES.get(path.suffix.lower().lstrip("."), "application/octet-stream")+++def safe_under(root: Path, *parts: str) -> Optional[Path]:+ 'Resolve `parts` under `root`, rejecting anything that escapes it.'+ for part in parts:+ if not part or not SAFE_ID.match(part) or part in (".", ".."):+ return None+ candidate = root.joinpath(*parts)+ try:+ resolved = candidate.resolve()+ resolved.relative_to(root.resolve())+ except (ValueError, OSError):+ return None+ return resolved+++def _read_json(path: Path) -> Dict:+ try:+ return json.loads(path.read_text(encoding="utf-8"))+ except Exception:+ return {}+++def _merge_flag(query: Dict, *, cfg_default: bool = False) -> bool:++ raw = (query.get("merge_tables") or [""])[0].strip().lower()+ if raw:+ return raw not in ("0", "false", "no", "off")+ if not cfg_default:+ return False+ cfg = RUNNER.base_cfg()+ return bool((cfg.get("pipeline") or {}).get("merge_cross_page_tables", False))+++def build_result(job_id: str, merge_tables: bool = False) -> Dict:+ 'Merge the four artifact trees the pipeline writes into what the viewer needs per page: base image + boxes + markdown + upright record.'+ job_dir = JOBS_DIR / job_id+ inter = job_dir / "runtime" / "intermediate"+ layouts_dir = inter / "layouts"+ results_dir = job_dir / "results_json"+ upright_dir = inter / "upright"++ tasks_path = job_dir / "runtime" / "page_tasks.jsonl"+ ordered: List[str] = []+ if tasks_path.is_file():+ for line in tasks_path.read_text(encoding="utf-8").splitlines():+ try:+ image_id = json.loads(line).get("image_id")+ except Exception:+ continue+ if image_id and image_id not in ordered:+ ordered.append(image_id)+ if not ordered and layouts_dir.is_dir():+ ordered = sorted(p.stem for p in layouts_dir.glob("*.json"))++ pages = []+ for image_id in ordered:+ layout = _read_json(layouts_dir / f"{image_id}.json")+ result = _read_json(results_dir / f"{image_id}.json")+ if not layout and not result:+ continue++ by_crop = {+ b.get("crop_filename", ""): b for b in (result.get("crop_blocks") or [])+ }+ blocks = []+ for lb in layout.get("blocks", []):+ crop = lb.get("crop_filename", "")+ rb = by_crop.get(crop, {})+ blocks.append({+ "order": lb.get("order", 0),+ "label": lb.get("label", ""),+ "bbox": lb.get("bbox", [0, 0, 0, 0]),+++ "regions": lb.get("regions") or [lb.get("bbox", [0, 0, 0, 0])],+ "score": lb.get("score", 0.0),+ "skip_vlm": bool(lb.get("skip_vlm", False)),+ "status": rb.get("status", ""),+ "content": rb.get("content", ""),+ "crop_url": (+ f"/api/jobs/{job_id}/crop/{image_id}/{crop}" if crop else ""+ ),+ })+ upright = layout.get("upright") or _read_json(upright_dir / f"{image_id}.json")+ page_image = layout.get("page_image", "")+ source = layout.get("source") or {}+ page_index = source.get("page_index")+ is_pdf = str(source.get("type") or "") == "pdf" or page_index is not None+ pages.append({+ "image_id": image_id,+ "width": layout.get("image_width", 0),+ "height": layout.get("image_height", 0),+ "page_url": f"/api/jobs/{job_id}/page/{image_id}.png" if page_image else "",+ "markdown": result.get("markdown", ""),+ "upright": upright or None,+ "source": source,+ "blocks": blocks,++ "document": str(source.get("path") or "") if is_pdf else "",+ "page_index": int(page_index) if page_index is not None else -1,+ })++ merges = 0+ if merge_tables and pages:+ from minicpmvocr import apply_cross_page_merge, load_prompt_map++ changes = apply_cross_page_merge(pages, load_prompt_map(RUNNER.base_cfg()))+ merges = sum(1 for c in changes.values() if c["absorbed"])+ for page in pages:+ change = changes.get(page["image_id"])+ if not change:+ continue+ page["markdown"] = change["markdown"]+ page["merge"] = {"extended": change["extended"], "absorbed": change["absorbed"]}+++ moved = {+ b.get("order")+ for b in change["blocks"]+ if b.get("merged_into_previous_page")+ }+ for block in page["blocks"]:+ if block["order"] in moved:+ block["merged_into_previous_page"] = True++ meta = read_job(job_id) or {}+ return {"job": meta, "pages": pages, "merges": merges}+++def merged_markdown(job_id: str, merge_tables: bool) -> str:+ 'Whole-job markdown. `merge_tables` defaults to the deployment config.'+ from minicpmvocr import assemble_document_markdown, load_prompt_map++ cfg = RUNNER.base_cfg()+ markdown, _, _ = assemble_document_markdown(+ JOBS_DIR / job_id,+ load_prompt_map(cfg),+ merge_tables=bool(merge_tables),+ delimiter=PAGE_DELIMITER,+ )+ return markdown+++def parse_multipart(body: bytes, boundary: bytes) -> Dict[str, List]:+ 'Return {"fields": {name: text}, "files": [(filename, bytes)]}.'+ fields: Dict[str, str] = {}+ files: List = []+ sep = b"--" + boundary+ for part in body.split(sep):+ if not part or part in (b"--\r\n", b"--", b"\r\n"):+ continue+ head, _, data = part.partition(b"\r\n\r\n")+ if not _:+ continue+ data = data[:-2] if data.endswith(b"\r\n") else data+ disposition = ""+ for line in head.split(b"\r\n"):+ if line.lower().startswith(b"content-disposition:"):+ disposition = line.decode("utf-8", "replace")+ break+ if not disposition:+ continue+ name_m = re.search(r'name="([^"]*)"', disposition)+ file_m = re.search(r'filename="([^"]*)"', disposition)+ if file_m:+ filename = file_m.group(1)+ if filename:+ files.append((filename, data))+ elif name_m:+ fields[name_m.group(1)] = data.decode("utf-8", "replace")+ return {"fields": fields, "files": files}+++def sanitize_filename(name: str) -> str:+ "Keep the stem recognizable (it becomes the page's image_id) but strip any path component and anything that would break a URL segment."+ name = os.path.basename(name.replace("\\", "/")).strip()+ stem, dot, suffix = name.rpartition(".")+ if not dot:+ stem, suffix = name, ""+ stem = re.sub(r"[^A-Za-z0-9_.\-]+", "_", stem).strip("._-") or "file"+ suffix = re.sub(r"[^A-Za-z0-9]+", "", suffix).lower()+ return f"{stem[:80]}.{suffix}" if suffix else stem[:80]+++class Handler(BaseHTTPRequestHandler):+ protocol_version = "HTTP/1.1"+ server_version = "minicpmvocr-webui"++ def log_message(self, fmt, *args):+ sys.stderr.write("[%s] %s\n" % (self.log_date_time_string(), fmt % args))+++ def _send_bytes(self, code: int, data: bytes, ctype: str, extra: Dict | None = None) -> None:+ self.send_response(code)+ self.send_header("Content-Type", ctype)+ self.send_header("Content-Length", str(len(data)))+ self.send_header("Cache-Control", "no-cache")+ for key, value in (extra or {}).items():+ self.send_header(key, value)+ self.end_headers()+ if self.command != "HEAD":+ self.wfile.write(data)++ def _send_json(self, code: int, obj) -> None:+ self._send_bytes(code, json.dumps(obj, ensure_ascii=False).encode("utf-8"),+ CTYPES["json"])++ def _send_file(self, path: Path, extra: Dict | None = None) -> None:+ if not path.is_file():+ self._send_json(404, {"error": "not found"})+ return+ self._send_bytes(200, path.read_bytes(), ctype_for(path), extra)+++ def do_GET(self): # noqa: N802+ raw_path, _, query = self.path.partition("?")+ path = unquote(raw_path)+ try:+ self._route_get(path, parse_qs(query))+ except Exception as exc:+ self.log_message("GET %s failed: %r", path, exc)+ self._send_json(500, {"error": str(exc)})++ do_HEAD = do_GET++ def _route_get(self, path: str, query: Dict[str, List[str]] | None = None) -> None:+ query = query or {}+ if path in ("/", "/index.html"):+ self._send_file(STATIC / "index.html")+ return+ if path.startswith("/vendor/"):+ target = (STATIC / path.lstrip("/")).resolve()+ try:+ target.relative_to((STATIC / "vendor").resolve())+ except ValueError:+ self._send_json(403, {"error": "forbidden"})+ return+ self._send_file(target)+ return+ if path == "/api/health":+ self._send_json(200, self._health())+ return+ if path == "/api/jobs":+ self._send_json(200, {"jobs": list_jobs(), "current": RUNNER.current_job_id})+ return++ parts = [p for p in path.split("/") if p]++ if len(parts) >= 3 and parts[0] == "api" and parts[1] == "jobs":+ job_id = parts[2]+ if not SAFE_ID.match(job_id) or not (JOBS_DIR / job_id).is_dir():+ self._send_json(404, {"error": "no such job"})+ return+ rest = parts[3:]+ if not rest:+ self._send_json(200, read_job(job_id) or {})+ return+ if rest == ["result"]:+ self._send_json(200, build_result(job_id, _merge_flag(query, cfg_default=True)))+ return+ if rest == ["markdown.md"]:+ name = (read_job(job_id) or {}).get("name", job_id)++ data = merged_markdown(job_id, _merge_flag(query)).encode("utf-8")+ self._send_bytes(200, data, CTYPES["md"], {+ "Content-Disposition": 'attachment; filename="%s.md"' % re.sub(+ r'[^A-Za-z0-9_.\-]+', "_", str(name))[:80],+ })+ return+ if len(rest) == 2 and rest[0] == "page":+ target = safe_under(JOBS_DIR / job_id / "runtime" / "intermediate" / "pages", rest[1])+ self._send_file(target) if target else self._send_json(400, {"error": "bad path"})+ return+ if len(rest) == 3 and rest[0] == "crop":+ target = safe_under(+ JOBS_DIR / job_id / "runtime" / "intermediate" / "crops", rest[1], rest[2])+ self._send_file(target) if target else self._send_json(400, {"error": "bad path"})+ return+ self._send_json(404, {"error": "not found"})++ def _health(self) -> Dict:+ status = {"ok": True, "engine": {}, "models": RUNNER.resources_status()}+ try:+ cfg = RUNNER.base_cfg()+ urls = cfg["engine"].get("server_urls") or [cfg["engine"].get("server_url", "")]+ url = (urls[0] if urls else "").rstrip("/")+ status["engine"]["url"] = url+ status["engine"]["model_name"] = cfg["engine"].get("model_name", "")+ with OPENER.open(url + "/v1/models", timeout=5) as resp:+ body = json.loads(resp.read().decode("utf-8"))+ served = [m.get("id") for m in body.get("data", []) if m.get("id")]+ status["engine"]["served"] = served+ status["engine"]["reachable"] = True+ status["engine"]["model_match"] = cfg["engine"].get("model_name", "") in served+ except Exception as exc:+ status["ok"] = False+ status["engine"]["reachable"] = False+ status["engine"]["error"] = f"{type(exc).__name__}: {exc}"+ return status+++ def do_POST(self): # noqa: N802+ path = unquote(self.path.partition("?")[0])+ if path != "/api/jobs":+ self._send_json(404, {"error": "not found"})+ return+ try:+ self._create_job()+ except Exception as exc:+ self.log_message("POST %s failed: %r", path, exc)+ self._send_json(500, {"error": str(exc)})++ def _create_job(self) -> None:+ ctype = self.headers.get("Content-Type", "")+ if "multipart/form-data" not in ctype or "boundary=" not in ctype:+ self._send_json(400, {"error": "expected multipart/form-data"})+ return+ length = int(self.headers.get("Content-Length", "0") or 0)+ if length <= 0:+ self._send_json(400, {"error": "empty body"})+ return+ if length > MAX_UPLOAD_BYTES:+ self._send_json(413, {"error": "上传超过 %d MB 上限" % (MAX_UPLOAD_BYTES // 1048576)})+ return+ boundary = ctype.split("boundary=", 1)[1].strip().strip('"').encode()+ parsed = parse_multipart(self.rfile.read(length), boundary)++ job_id = new_job_id()+ input_dir = JOBS_DIR / job_id / "input"+ input_dir.mkdir(parents=True, exist_ok=True)+ saved: List[str] = []+ for filename, data in parsed["files"]:+ safe = sanitize_filename(filename)+ if Path(safe).suffix.lower() not in SUPPORTED_SUFFIXES or not data:+ continue++ target = input_dir / safe+ seq = 2+ while target.exists():+ target = input_dir / f"{Path(safe).stem}_{seq}{Path(safe).suffix}"+ seq += 1+ target.write_bytes(data)+ saved.append(target.name)+ if not saved:+ shutil.rmtree(JOBS_DIR / job_id, ignore_errors=True)+ self._send_json(400, {"error": "没有可解析的文件(支持 pdf/png/jpg/jpeg/bmp/webp/tif)"})+ return++ fields = parsed["fields"]+ upright = str(fields.get("upright", "true")).lower() not in ("false", "0", "off", "")+ name = (fields.get("name") or "").strip() or (+ saved[0] if len(saved) == 1 else f"{saved[0]} 等 {len(saved)} 个文件")+ meta = RUNNER.submit(job_id, name, saved, upright)+ self._send_json(200, meta)++ def do_DELETE(self): # noqa: N802+ path = unquote(self.path.partition("?")[0])+ parts = [p for p in path.split("/") if p]+ if len(parts) == 3 and parts[0] == "api" and parts[1] == "jobs":+ job_id = parts[2]+ if not SAFE_ID.match(job_id):+ self._send_json(400, {"error": "bad id"})+ return+ if RUNNER.delete(job_id):+ self._send_json(200, {"deleted": job_id})+ else:+ self._send_json(409, {"error": "任务不存在或正在运行"})+ return+ self._send_json(404, {"error": "not found"})+++def main() -> None:+ global RUNNER+ JOBS_DIR.mkdir(parents=True, exist_ok=True)+ RUNNER = Runner()+ server = ThreadingHTTPServer(("0.0.0.0", PORT), Handler)+ server.daemon_threads = True+ print(f"[webui] serving on http://0.0.0.0:{PORT} (config={runner_mod.CONFIG_PATH})", flush=True)+ try:+ server.serve_forever()+ except KeyboardInterrupt:+ pass+ finally:+ server.server_close()+++if __name__ == "__main__":+ main()diff --git a/sdk/webui/static/index.html b/sdk/webui/static/index.htmlnew file mode 100644index 0000000..bf2fadb--- /dev/null+++ b/sdk/webui/static/index.html@@ -0,0 +1,514 @@+<!DOCTYPE html>+<html lang="zh-CN">+<head>+<meta charset="utf-8">+<meta name="viewport" content="width=device-width, initial-scale=1">+<title>MiniCPM-V OCR 文档解析</title>+<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><text y='13' font-size='13'>📄</text></svg>">+<link rel="stylesheet" href="/vendor/katex/katex.min.css">+<style>+:root{+ --bg:#0f1115; --panel:#161922; --panel-2:#1d2130; --line:#2a3040;+ --fg:#e6e9f0; --muted:#8b93a7; --accent:#5b8cff; --accent-dim:#2d4a8a;+ --ok:#3fb950; --warn:#d29922; --err:#f85149;+}+*{box-sizing:border-box}+html,body{height:100%;margin:0}+body{+ background:var(--bg); color:var(--fg); font:14px/1.6 -apple-system,BlinkMacSystemFont,+ "Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;+ display:flex; flex-direction:column; overflow:hidden;+}+header{+ display:flex; align-items:center; gap:14px; padding:10px 16px;+ background:var(--panel); border-bottom:1px solid var(--line); flex:none;+}+header h1{font-size:15px;margin:0;font-weight:600;letter-spacing:.3px}+.spacer{flex:1}+.pill{font-size:12px;padding:3px 9px;border-radius:999px;background:var(--panel-2);+ border:1px solid var(--line);color:var(--muted);white-space:nowrap}+.pill.ok{color:var(--ok);border-color:#1d4429}+.pill.err{color:var(--err);border-color:#5c2326}+main{flex:1;display:flex;min-height:0}+++#side{width:290px;flex:none;background:var(--panel);border-right:1px solid var(--line);+ display:flex;flex-direction:column;min-height:0}+.sec{padding:12px;border-bottom:1px solid var(--line)}+.sec h2{font-size:12px;color:var(--muted);margin:0 0 9px;font-weight:600;letter-spacing:.6px}+#drop{border:1.5px dashed var(--line);border-radius:10px;padding:18px 10px;text-align:center;+ color:var(--muted);cursor:pointer;transition:.15s;font-size:13px}+#drop:hover,#drop.over{border-color:var(--accent);color:var(--fg);background:var(--panel-2)}+#picked{margin-top:8px;font-size:12px;color:var(--muted);max-height:88px;overflow:auto}+#picked div{padding:1px 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}+label.row{display:flex;align-items:center;gap:8px;margin-top:10px;font-size:13px;cursor:pointer}+button{font:inherit;border-radius:8px;border:1px solid var(--line);background:var(--panel-2);+ color:var(--fg);padding:7px 12px;cursor:pointer;transition:.15s}+button:hover:not(:disabled){border-color:var(--accent)}+button:disabled{opacity:.45;cursor:not-allowed}+button.primary{background:var(--accent);border-color:var(--accent);color:#fff;width:100%;margin-top:10px;font-weight:600}+button.primary:hover:not(:disabled){background:#4a7bef}+#jobs{flex:1;overflow:auto;padding:8px}+.job{padding:9px 10px;border-radius:8px;border:1px solid transparent;cursor:pointer;margin-bottom:5px;position:relative}+.job:hover{background:var(--panel-2)}+.job.active{background:var(--panel-2);border-color:var(--accent-dim)}+.job .nm{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:20px}+.job .meta{font-size:11px;color:var(--muted);margin-top:3px;display:flex;gap:7px;flex-wrap:wrap}+.job .del{position:absolute;top:7px;right:7px;opacity:0;border:none;background:none;color:var(--muted);+ padding:0 4px;font-size:15px;line-height:1}+.job:hover .del{opacity:1}+.job .del:hover{color:var(--err)}+.dot{width:7px;height:7px;border-radius:50%;display:inline-block;vertical-align:middle}+.dot.done{background:var(--ok)}.dot.failed{background:var(--err)}+.dot.running,.dot.queued,.dot.loading_models{background:var(--warn)}+++#center{flex:1;min-width:0;display:flex;flex-direction:column;background:var(--bg)}+.bar{display:flex;align-items:center;gap:10px;padding:7px 12px;background:var(--panel);+ border-bottom:1px solid var(--line);flex:none;font-size:12px;flex-wrap:wrap}+.bar label{display:flex;align-items:center;gap:5px;color:var(--muted);cursor:pointer;user-select:none}+#stage{flex:1;overflow:auto;padding:16px;display:flex;justify-content:center;align-items:flex-start}+#canvas{position:relative;line-height:0;box-shadow:0 4px 24px rgba(0,0,0,.5)}+#canvas img{display:block;max-width:none}+#canvas svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}+#canvas rect{fill:transparent;stroke-width:2;vector-effect:non-scaling-stroke;cursor:pointer;transition:.1s}+#canvas rect:hover{fill:rgba(91,140,255,.16)}+#canvas rect.sel{fill:rgba(91,140,255,.25);stroke-width:3.5}+#canvas text{font-size:11px;fill:#fff;paint-order:stroke;stroke:#000;stroke-width:3;+ stroke-linejoin:round;pointer-events:none;font-weight:700}+#thumbs{display:flex;gap:7px;padding:8px 12px;overflow-x:auto;background:var(--panel);+ border-top:1px solid var(--line);flex:none}+#thumbs .t{flex:none;width:52px;height:70px;border:2px solid var(--line);border-radius:4px;+ cursor:pointer;background:#fff center/cover no-repeat;position:relative}+#thumbs .t.active{border-color:var(--accent)}+#thumbs .t span{position:absolute;bottom:0;right:0;background:rgba(0,0,0,.72);color:#fff;+ font-size:10px;padding:0 3px;border-radius:3px 0 0 0;line-height:1.5}+++#right{width:46%;max-width:860px;flex:none;border-left:1px solid var(--line);+ display:flex;flex-direction:column;background:var(--panel);min-width:0}+.tabs{display:flex;gap:2px;padding:7px 10px 0;border-bottom:1px solid var(--line);flex:none;align-items:center}+.tab{padding:6px 14px;border-radius:7px 7px 0 0;cursor:pointer;color:var(--muted);font-size:13px;border:1px solid transparent;border-bottom:none}+.tab.active{background:var(--bg);color:var(--fg);border-color:var(--line)}+#panes{flex:1;overflow:auto;min-height:0;background:var(--bg)}+.pane{display:none;padding:18px 20px}+.pane.active{display:block}+#md{font-size:14.5px;word-wrap:break-word}+#md img{max-width:100%;border-radius:4px;background:#fff}+#md table{border-collapse:collapse;margin:12px 0;font-size:13px;background:var(--panel);display:block;overflow-x:auto;max-width:100%}+#md th,#md td{border:1px solid var(--line);padding:5px 9px;text-align:left;vertical-align:top}+#md th{background:var(--panel-2);font-weight:600}+#md h1,#md h2,#md h3{margin:1.2em 0 .5em;line-height:1.35}+#md h1{font-size:1.5em}#md h2{font-size:1.28em}#md h3{font-size:1.1em}+#md a{color:#79b8ff}+#md a:hover{color:#a9d1ff}+#md code{background:var(--panel-2);padding:1px 5px;border-radius:4px;font-size:.9em}+#md pre{background:var(--panel-2);padding:11px;border-radius:7px;overflow:auto}+#md blockquote{border-left:3px solid var(--line);margin:1em 0;padding-left:12px;color:var(--muted)}+#md .katex{font-size:1.04em}+#md .katex-display{overflow-x:auto;overflow-y:hidden;padding:2px 0}+#src{white-space:pre-wrap;word-break:break-word;font:12.5px/1.65 ui-monospace,SFMono-Regular,Menlo,monospace;color:#c8cfdd}+.blk{border:1px solid var(--line);border-radius:8px;padding:9px 11px;margin-bottom:8px;cursor:pointer;background:var(--panel)}+.blk:hover{border-color:var(--accent-dim)}+.blk.sel{border-color:var(--accent);background:var(--panel-2)}+.blk .h{display:flex;gap:8px;align-items:center;font-size:12px;color:var(--muted);flex-wrap:wrap}+.blk .tag{padding:1px 7px;border-radius:999px;background:var(--panel-2);border:1px solid var(--line);color:var(--fg);font-size:11px}+.blk .c{margin-top:6px;font-size:12.5px;color:#c8cfdd;max-height:88px;overflow:hidden;white-space:pre-wrap;word-break:break-word}+.blk img{max-width:100%;margin-top:6px;border-radius:4px;background:#fff}+.note{display:flex;gap:8px;align-items:flex-start;font-size:12.5px;color:#9ccfff;+ background:#10243b;border:1px solid #1d4a7a;border-left-width:3px;+ padding:8px 11px;border-radius:6px;margin-bottom:14px}+.note b{color:#cfe6ff;font-weight:600}+.empty{color:var(--muted);text-align:center;padding:48px 20px;font-size:13px}+.err{color:var(--err);background:#2b1416;border:1px solid #5c2326;padding:10px 12px;border-radius:8px;margin:10px 0;font-size:13px}+.badge{font-size:11px;padding:2px 7px;border-radius:999px;background:var(--panel-2);border:1px solid var(--line);color:var(--muted)}+::-webkit-scrollbar{width:9px;height:9px}+::-webkit-scrollbar-thumb{background:#333a4d;border-radius:5px}+::-webkit-scrollbar-track{background:transparent}+</style>+</head>+<body>+<header>+ <h1>MiniCPM-V OCR 文档解析</h1>+ <span class="pill" id="hEngine">引擎检查中…</span>+ <span class="pill" id="hModels">模型未加载</span>+ <div class="spacer"></div>+ <span class="pill" id="hJob"></span>+</header>++<main>+ <aside id="side">+ <div class="sec">+ <h2>新建解析</h2>+ <div id="drop">拖拽文件到这里,或点击选择<br><span style="font-size:11px">PDF(多页)/ PNG / JPG / BMP / WEBP / TIF</span></div>+ <input type="file" id="file" multiple accept=".pdf,.png,.jpg,.jpeg,.bmp,.webp,.tif,.tiff" hidden>+ <div id="picked"></div>+ <label class="row"><input type="checkbox" id="upright" checked> 旋转摆正预处理</label>+ <button class="primary" id="go" disabled>开始解析</button>+ </div>+ <div class="sec" style="padding-bottom:6px"><h2 style="margin:0">解析历史</h2></div>+ <div id="jobs"></div>+ </aside>++ <section id="center">+ <div class="bar">+ <button id="prev">←</button>+ <span id="pgInfo" style="color:var(--muted)">—</span>+ <button id="next">→</button>+ <label><input type="checkbox" id="showBox" checked> 版面框</label>+ <label><input type="checkbox" id="showNum" checked> 序号</label>+ <label><input type="checkbox" id="onlyVlm"> 仅 VLM 块</label>+ <div class="spacer"></div>+ <span class="badge" id="uprightInfo" style="display:none"></span>+ <button id="zoomOut">−</button><span id="zoomVal" style="color:var(--muted);min-width:40px;text-align:center">适应</span><button id="zoomIn">+</button>+ <button id="zoomFit">适应</button>+ </div>+ <div id="stage"><div class="empty">上传 PDF 或图片开始解析,或从左侧历史中打开一次解析结果</div></div>+ <div id="thumbs" style="display:none"></div>+ </section>++ <section id="right">+ <div class="tabs">+ <div class="tab active" data-p="md">渲染</div>+ <div class="tab" data-p="src">源码</div>+ <div class="tab" data-p="blocks">逐块</div>+ <div class="spacer"></div>+ <label title="一张表被分页截成两半时,在渲染和下载里把它接回去(页面图与版面框不变)"><input type="checkbox" id="mergeTables"> 合并跨页表格<span id="mergeCount" style="color:#79b8ff"></span></label>+ <button id="copy" style="padding:4px 10px;font-size:12px">复制</button>+ <button id="dl" style="padding:4px 10px;font-size:12px;margin-left:5px">下载 .md</button>+ </div>+ <div id="panes">+ <div class="pane active" id="pane-md"><div id="md"><div class="empty">暂无内容</div></div></div>+ <div class="pane" id="pane-src"><div id="src"></div></div>+ <div class="pane" id="pane-blocks"><div id="blocks"><div class="empty">暂无内容</div></div></div>+ </div>+ </section>+</main>++<script src="/vendor/marked.min.js"></script>+<script src="/vendor/purify.min.js"></script>+<script src="/vendor/katex/katex.min.js"></script>+<script>+const $ = s => document.querySelector(s);+const state = {jobs:[], jobId:null, pages:[], page:0, sel:null, zoom:null, poll:null, files:[]};++const LABEL_COLORS = {+ text:'#5b8cff', content:'#5b8cff', abstract:'#5b8cff', paragraph_title:'#f0883e',+ doc_title:'#ff7b72', figure_title:'#d2a8ff', table:'#3fb950', display_formula:'#ffa657',+ inline_formula:'#ffd33d', formula_number:'#8b949e', image:'#a371f7', chart:'#39c5cf',+ header:'#6e7681', footer:'#6e7681', footnote:'#8b949e', seal:'#f85149',+ header_image:'#a371f7', footer_image:'#a371f7', reference:'#58a6ff',+ reference_content:'#58a6ff', vertical_text:'#56d364', number:'#8b949e',+ aside_text:'#8b949e', algorithm:'#d2a8ff', vision_footnote:'#8b949e', content_:'#5b8cff'+};+const colorOf = l => LABEL_COLORS[l] || '#8b949e';+const esc = s => String(s??'').replace(/[&<>"]/g, c => ({'&':'&','<':'<','>':'>','"':'"'}[c]));+++function renderMarkdown(src, imgs){+ const math = [];+ const stash = (tex, display) => {+ math.push({tex, display});+ return `@@M${math.length-1}@@`;+ };+ let text = src+ .replace(/\$\$([\s\S]+?)\$\$/g, (_,t)=>stash(t,true))+ .replace(/\\\[([\s\S]+?)\\\]/g, (_,t)=>stash(t,true))+ .replace(/\\\(([\s\S]+?)\\\)/g, (_,t)=>stash(t,false))+ .replace(/(?<!\\)\$(?!\$)((?:[^$\n\\]|\\.)+?)(?<!\\)\$(?!\$)/g, (_,t)=>stash(t,false));++ let html = marked.parse(text, {breaks:false, gfm:true});+ html = DOMPurify.sanitize(html, {+ ADD_TAGS:['table','thead','tbody','tfoot','tr','th','td','caption','colgroup','col','sub','sup'],+ ADD_ATTR:['colspan','rowspan','align','style']+ });++ html = html.replace(/@@M(\d+)@@/g, (_, i) => {+ const m = math[+i];+ try {+ return katex.renderToString(m.tex, {displayMode:m.display, throwOnError:false, strict:false});+ } catch(e){+ return `<code>${esc(m.tex)}</code>`;+ }+ });++ let k = 0;+ html = html.replace(/<img(?![^>]*\bsrc=["'][^"']+["'])[^>]*>/g,+ () => (k < imgs.length ? `<img src="${imgs[k++]}" alt="图块">` : ''));+ return html;+}+++async function health(){+ try{+ const h = await (await fetch('/api/health')).json();+ const e = h.engine||{};+ const el = $('#hEngine');+ el.className = 'pill ' + (e.reachable && e.model_match ? 'ok' : 'err');+ el.textContent = e.reachable+ ? (e.model_match ? `引擎就绪 ${e.model_name}` : `模型名不匹配:服务端 ${(e.served||[]).join(',')||'无'}`)+ : '引擎不可达';+ el.title = e.error || (e.url||'');+ const m = h.models||{};+ const mel = $('#hModels');+ mel.className = 'pill ' + (m.loaded ? 'ok' : '');+ mel.textContent = m.loaded ? `版面${m.layout?'✓':'✗'} 摆正${m.upright?'✓':'✗'}` : '模型首次解析时加载';+ }catch(e){ $('#hEngine').className='pill err'; $('#hEngine').textContent='前端异常'; }+}+++const STATUS_TEXT = {queued:'排队中', loading_models:'加载模型', running:'解析中', done:'完成', failed:'失败'};+async function loadJobs(){+ const d = await (await fetch('/api/jobs')).json();+ state.jobs = d.jobs||[];+ const box = $('#jobs');+ if(!state.jobs.length){ box.innerHTML = '<div class="empty" style="padding:24px 10px">暂无历史</div>'; return; }+ box.innerHTML = state.jobs.map(j=>{+ const run = j.status==='running'||j.status==='queued'||j.status==='loading_models';+ const prog = run && j.pages_done ? ` ${j.pages_done} 页` : (j.pages_total?` ${j.pages_total} 页`:'');+ return `<div class="job ${j.id===state.jobId?'active':''}" data-id="${j.id}">+ <button class="del" data-del="${j.id}" title="删除">×</button>+ <div class="nm">${esc(j.name)}</div>+ <div class="meta">+ <span><i class="dot ${j.status}"></i> ${STATUS_TEXT[j.status]||j.status}${prog}</span>+ ${j.upright?'<span>摆正</span>':''}+ <span>${esc((j.created_at||'').slice(5,16))}</span>+ ${j.elapsed_sec?`<span>${j.elapsed_sec}s</span>`:''}+ </div></div>`;+ }).join('');+ box.querySelectorAll('.job').forEach(el=>el.onclick = ev=>{+ if(ev.target.dataset.del) return;+ openJob(el.dataset.id);+ });+ box.querySelectorAll('.del').forEach(b=>b.onclick = async ev=>{+ ev.stopPropagation();+ if(!confirm('删除这条解析记录?')) return;+ const r = await fetch('/api/jobs/'+b.dataset.del, {method:'DELETE'});+ if(!r.ok){ alert((await r.json()).error||'删除失败'); return; }+ if(state.jobId===b.dataset.del){ state.jobId=null; state.pages=[]; renderAll(); }+ loadJobs();+ });++ const busy = state.jobs.some(j=>['queued','running','loading_models'].includes(j.status));+ clearTimeout(state.poll);+ if(busy) state.poll = setTimeout(()=>{ loadJobs(); if(state.jobId) refreshIfBusy(); }, 1000);+}++async function refreshIfBusy(){+ const j = state.jobs.find(x=>x.id===state.jobId);+ if(j && ['running','loading_models'].includes(j.status)) await openJob(state.jobId, true);+}++async function openJob(id, keepPage){+ state.jobId = id;+ const j = state.jobs.find(x=>x.id===id) || {};+ $('#hJob').textContent = j.name ? `${j.name}` : '';+ const mt = $('#mergeTables').checked ? 1 : 0;+ const d = await (await fetch(`/api/jobs/${id}/result?merge_tables=${mt}`)).json();+ const prev = state.page;+ state.pages = d.pages||[];+ state.merges = d.merges||0;+ state.page = keepPage ? Math.min(prev, Math.max(0,state.pages.length-1)) : 0;+ state.sel = null;+ if((d.job||{}).status === 'failed' && (d.job||{}).error){+ $('#stage').innerHTML = `<div class="err" style="max-width:560px">解析失败:${esc(d.job.error)}</div>`;+ $('#thumbs').style.display='none'; $('#md').innerHTML=''; $('#src').textContent=''; $('#blocks').innerHTML='';+ loadJobs(); return;+ }+ renderAll();+ loadJobs();+}+++function curPage(){ return state.pages[state.page]; }++function renderAll(){ renderStage(); renderThumbs(); renderRight(); updateMergeBadge(); }++function updateMergeBadge(){++ const el = $('#mergeCount');+ if(!$('#mergeTables').checked || !state.jobId){ el.textContent=''; return; }+ el.textContent = state.merges ? ` ·合并 ${state.merges} 处` : ' ·无可合并';+}++function renderStage(){+ const p = curPage(), stage = $('#stage');+ if(!p){ stage.innerHTML = '<div class="empty">暂无页面</div>'; $('#pgInfo').textContent='—'; return; }+ $('#pgInfo').textContent = `${state.page+1} / ${state.pages.length} ${p.image_id}`;++ const u = p.upright, ui = $('#uprightInfo');+ if(u && u.applied){+ ui.style.display=''; ui.textContent = `摆正 ${u.correction}°(deskew ${u.deskew} + 方向 ${u.label})`;+ } else if(u && u.gated){ ui.style.display=''; ui.textContent='摆正:非文档,已跳过';+ } else if(u){ ui.style.display=''; ui.textContent=`摆正:无需旋转(${u.correction??0}°)`;+ } else { ui.style.display='none'; }++ const scale = state.zoom || fitScale(p);+ $('#zoomVal').textContent = state.zoom ? Math.round(scale*100)+'%' : '适应';+ const w = Math.round(p.width*scale), h = Math.round(p.height*scale);+ const show = $('#showBox').checked, nums = $('#showNum').checked, onlyVlm = $('#onlyVlm').checked;+ const blocks = (p.blocks||[]).filter(b => !onlyVlm || !b.skip_vlm);++ stage.innerHTML = `<div id="canvas" style="width:${w}px;height:${h}px">+ ${p.page_url?`<img src="${p.page_url}" width="${w}" height="${h}" alt="${esc(p.image_id)}">`+ :'<div class="empty">该页没有保存底图(需要 pipeline.save_pages)</div>'}+ ${show?`<svg viewBox="0 0 ${p.width} ${p.height}" preserveAspectRatio="none">+ ${blocks.map(b=>{++++ const rs = b.regions && b.regions.length ? b.regions : [b.bbox];+ const c = colorOf(b.label), sel = state.sel===b.order?'sel':'';+ const merged = rs.length>1;+ return rs.map((r,i)=>{+ const [x1,y1,x2,y2]=r;+ const dash = merged ? ' stroke-dasharray="6 3"' : '';+ const part = merged ? ` · 第${i+1}/${rs.length}段(已并入同一 crop)` : '';+ return `<rect data-o="${b.order}" x="${x1}" y="${y1}" width="${Math.max(1,x2-x1)}" height="${Math.max(1,y2-y1)}"+ stroke="${c}"${dash} class="${sel}"><title>${esc(b.label)} · ${(b.score*100).toFixed(1)}% · ${x2-x1}×${y2-y1}${b.skip_vlm?' · 不送VLM':''}${part}</title></rect>`;+ }).join('');+ }).join('')}+ ${nums?blocks.map(b=>{+ const rs = b.regions && b.regions.length ? b.regions : [b.bbox];++ const score = (b.score*100).toFixed(1);+ return rs.map((r,i)=>`<text x="${r[0]+3}" y="${r[1]+13}" fill="${colorOf(b.label)}">${b.order}${rs.length>1?`.${i+1}`:''} ${score}%</text>`).join('');+ }).join(''):''}+ </svg>`:''}+ </div>`;+ stage.querySelectorAll('rect').forEach(r=>r.onclick = ()=>selectBlock(+r.dataset.o, 'canvas'));+}++function fitScale(p){+ const st = $('#stage');+ if(!p.width||!p.height) return 1;+ return Math.min((st.clientWidth-40)/p.width, (st.clientHeight-40)/p.height, 1.6);+}++function renderThumbs(){+ const box = $('#thumbs');+ if(state.pages.length < 2){ box.style.display='none'; return; }+ box.style.display='flex';+ box.innerHTML = state.pages.map((p,i)=>+ `<div class="t ${i===state.page?'active':''}" data-i="${i}"+ style="background-image:url('${p.page_url}')"><span>${i+1}</span></div>`).join('');+ box.querySelectorAll('.t').forEach(t=>t.onclick=()=>{ state.page=+t.dataset.i; state.sel=null; renderAll(); });+}++function renderRight(){+ const p = curPage();+ if(!p){ $('#md').innerHTML='<div class="empty">暂无内容</div>'; $('#src').textContent=''; $('#blocks').innerHTML=''; return; }+ const imgs = (p.blocks||[]).filter(b=>['image','chart','seal','header_image','footer_image'].includes(b.label) && b.crop_url)+ .map(b=>b.crop_url);+++ let note = '';+ if(p.merge && p.merge.absorbed)+ note = `<div class="note"><b>↑</b><div>本页开头的表格是<b>上一页表格的续表</b>,已合并到上一页显示。<br>+ 左侧页面图仍是本页原样 —— 取消勾选「合并跨页表格」可看回本页自己的内容。</div></div>`;+ else if(p.merge && p.merge.extended)+ note = `<div class="note"><b>↓</b><div>本页末尾的表格已<b>接上下一页的续表</b>,下面渲染的是合并后的完整表格。</div></div>`;+ $('#md').innerHTML = note + (p.markdown ? renderMarkdown(p.markdown, imgs)+ : (p.merge && p.merge.absorbed ? '' : '<div class="empty">该页无文本输出</div>'));+ $('#src').textContent = p.markdown || '';+ $('#blocks').innerHTML = (p.blocks||[]).map(b=>`+ <div class="blk ${state.sel===b.order?'sel':''}" data-o="${b.order}">+ <div class="h">+ <span class="tag" style="border-color:${colorOf(b.label)};color:${colorOf(b.label)}">${b.order} ${esc(b.label)}</span>+ <span>${(b.score*100).toFixed(1)}%</span>+ <span>${b.bbox[2]-b.bbox[0]}×${b.bbox[3]-b.bbox[1]}</span>+ ${b.regions && b.regions.length>1?`<span style="color:#79b8ff">跨 ${b.regions.length} 块合并识别</span>`:''}+ ${b.skip_vlm?'<span>不送 VLM</span>':`<span>${(b.content||'').length} 字</span>`}+ ${b.merged_into_previous_page?'<span style="color:#79b8ff">已并入上一页</span>':''}+ ${b.status && b.status!=='ok' && b.status!=='skipped_no_vlm'?`<span style="color:var(--err)">${esc(b.status)}</span>`:''}+ </div>+ ${b.skip_vlm && b.crop_url?`<img src="${b.crop_url}" alt="">`:''}+ ${b.content?`<div class="c">${esc(b.content.slice(0,400))}</div>`:''}+ </div>`).join('') || '<div class="empty">该页没有检出版面块</div>';+ $('#blocks').querySelectorAll('.blk').forEach(el=>el.onclick=()=>selectBlock(+el.dataset.o,'list'));+}++function selectBlock(order, from){+ state.sel = state.sel===order ? null : order;+ renderStage();++ $('#blocks').querySelectorAll('.blk').forEach(el=>{+ const on = +el.dataset.o === state.sel;+ el.classList.toggle('sel', on);+ if(on && from==='canvas'){+ switchTab('blocks');+ el.scrollIntoView({block:'center', behavior:'smooth'});+ }+ });+ if(from==='list' && state.sel!==null){+ const r = $('#stage').querySelector(`rect[data-o="${state.sel}"]`);+ if(r) r.scrollIntoView({block:'center', inline:'center', behavior:'smooth'});+ }+}++function switchTab(p){+ document.querySelectorAll('.tab').forEach(t=>t.classList.toggle('active', t.dataset.p===p));+ document.querySelectorAll('.pane').forEach(el=>el.classList.toggle('active', el.id==='pane-'+p));+}+++function setFiles(list){+ state.files = Array.from(list||[]);+ $('#picked').innerHTML = state.files.map(f=>`<div>• ${esc(f.name)} <span style="opacity:.6">${(f.size/1048576).toFixed(1)}M</span></div>`).join('');+ $('#go').disabled = !state.files.length;+}+$('#drop').onclick = ()=>$('#file').click();+$('#file').onchange = e=>setFiles(e.target.files);+['dragenter','dragover'].forEach(t=>$('#drop').addEventListener(t, e=>{e.preventDefault();$('#drop').classList.add('over');}));+['dragleave','drop'].forEach(t=>$('#drop').addEventListener(t, e=>{e.preventDefault();$('#drop').classList.remove('over');}));+$('#drop').addEventListener('drop', e=>setFiles(e.dataTransfer.files));++$('#go').onclick = async ()=>{+ if(!state.files.length) return;+ const fd = new FormData();+ state.files.forEach(f=>fd.append('files', f, f.name));+ fd.append('upright', $('#upright').checked ? 'true' : 'false');+ $('#go').disabled = true; $('#go').textContent = '上传中…';+ try{+ const r = await fetch('/api/jobs', {method:'POST', body:fd});+ const d = await r.json();+ if(!r.ok){ alert(d.error||'上传失败'); return; }+ setFiles([]); $('#file').value='';+ state.jobId = d.id;+ await loadJobs();+ openJob(d.id);+ }catch(e){ alert('上传失败:'+e); }+ finally{ $('#go').textContent='开始解析'; $('#go').disabled = !state.files.length; }+};+++$('#prev').onclick = ()=>{ if(state.page>0){state.page--;state.sel=null;renderAll();} };+$('#next').onclick = ()=>{ if(state.page<state.pages.length-1){state.page++;state.sel=null;renderAll();} };+document.addEventListener('keydown', e=>{+ if(['INPUT','TEXTAREA'].includes(document.activeElement.tagName)) return;+ if(e.key==='ArrowLeft') $('#prev').click();+ if(e.key==='ArrowRight') $('#next').click();+});+['showBox','showNum','onlyVlm'].forEach(id=>$('#'+id).onchange = renderStage);+$('#zoomIn').onclick = ()=>{ state.zoom = Math.min((state.zoom||fitScale(curPage()||{}))*1.25, 5); renderStage(); };+$('#zoomOut').onclick = ()=>{ state.zoom = Math.max((state.zoom||fitScale(curPage()||{}))/1.25, .1); renderStage(); };+$('#zoomFit').onclick = ()=>{ state.zoom = null; renderStage(); };+document.querySelectorAll('.tab').forEach(t=>t.onclick=()=>switchTab(t.dataset.p));++$('#mergeTables').onchange = ()=>{ if(state.jobId) openJob(state.jobId, true); };+$('#copy').onclick = async ()=>{+ const p = curPage(); if(!p) return;+ await navigator.clipboard.writeText(p.markdown||'');+ $('#copy').textContent='已复制'; setTimeout(()=>$('#copy').textContent='复制', 1200);+};+$('#dl').onclick = ()=>{+ if(!state.jobId) return;++ location.href = `/api/jobs/${state.jobId}/markdown.md?merge_tables=${$('#mergeTables').checked?1:0}`;+};+window.addEventListener('resize', ()=>{ if(!state.zoom) renderStage(); });++health(); setInterval(health, 15000); loadJobs();+</script>+</body>+</html>diff --git a/sdk/webui/static/vendor/katex/auto-render.min.js b/sdk/webui/static/vendor/katex/auto-render.min.jsnew file mode 100644index 0000000..46d62af--- /dev/null+++ b/sdk/webui/static/vendor/katex/auto-render.min.js@@ -0,0 +1 @@+!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):"object"==typeof exports?exports.renderMathInElement=t(require("katex")):e.renderMathInElement=t(e.katex)}("undefined"!=typeof self?self:this,(function(e){return function(){"use strict";var t={771:function(t){t.exports=e}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var o={};return function(){r.d(o,{default:function(){return d}});var e=r(771),t=r.n(e);const n=function(e,t,n){let r=n,o=0;const i=e.length;for(;r<t.length;){const n=t[r];if(o<=0&&t.slice(r,r+i)===e)return r;"\\"===n?r++:"{"===n?o++:"}"===n&&o--,r++}return-1},i=/^\\begin{/;var a=function(e,t){let r;const o=[],a=new RegExp("("+t.map((e=>e.left.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"))).join("|")+")");for(;r=e.search(a),-1!==r;){r>0&&(o.push({type:"text",data:e.slice(0,r)}),e=e.slice(r));const a=t.findIndex((t=>e.startsWith(t.left)));if(r=n(t[a].right,e,t[a].left.length),-1===r)break;const l=e.slice(0,r+t[a].right.length),s=i.test(l)?l:e.slice(t[a].left.length,r);o.push({type:"math",data:s,rawData:l,display:t[a].display}),e=e.slice(r+t[a].right.length)}return""!==e&&o.push({type:"text",data:e}),o};const l=function(e,n){const r=a(e,n.delimiters);if(1===r.length&&"text"===r[0].type)return null;const o=document.createDocumentFragment();for(let e=0;e<r.length;e++)if("text"===r[e].type)o.appendChild(document.createTextNode(r[e].data));else{const i=document.createElement("span");let a=r[e].data;n.displayMode=r[e].display;try{n.preProcess&&(a=n.preProcess(a)),t().render(a,i,n)}catch(i){if(!(i instanceof t().ParseError))throw i;n.errorCallback("KaTeX auto-render: Failed to parse `"+r[e].data+"` with ",i),o.appendChild(document.createTextNode(r[e].rawData));continue}o.appendChild(i)}return o},s=function(e,t){for(let n=0;n<e.childNodes.length;n++){const r=e.childNodes[n];if(3===r.nodeType){let o=r.textContent,i=r.nextSibling,a=0;for(;i&&i.nodeType===Node.TEXT_NODE;)o+=i.textContent,i=i.nextSibling,a++;const s=l(o,t);if(s){for(let e=0;e<a;e++)r.nextSibling.remove();n+=s.childNodes.length-1,e.replaceChild(s,r)}else n+=a}else if(1===r.nodeType){const e=" "+r.className+" ";-1===t.ignoredTags.indexOf(r.nodeName.toLowerCase())&&t.ignoredClasses.every((t=>-1===e.indexOf(" "+t+" ")))&&s(r,t)}}};var d=function(e,t){if(!e)throw new Error("No element provided to render");const n={};for(const e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);n.delimiters=n.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],n.ignoredTags=n.ignoredTags||["script","noscript","style","textarea","pre","code","option"],n.ignoredClasses=n.ignoredClasses||[],n.errorCallback=n.errorCallback||console.error,n.macros=n.macros||{},s(e,n)}}(),o=o.default}()}));\ No newline at end of filediff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_AMS-Regular.ttf b/sdk/webui/static/vendor/katex/fonts/KaTeX_AMS-Regular.ttfnew file mode 100644index 0000000..c6f9a5eBinary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_AMS-Regular.ttf differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_AMS-Regular.woff b/sdk/webui/static/vendor/katex/fonts/KaTeX_AMS-Regular.woffnew file mode 100644index 0000000..b804d7bBinary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_AMS-Regular.woff differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_AMS-Regular.woff2 b/sdk/webui/static/vendor/katex/fonts/KaTeX_AMS-Regular.woff2new file mode 100644index 0000000..0acaaffBinary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_AMS-Regular.woff2 differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Caligraphic-Bold.ttf b/sdk/webui/static/vendor/katex/fonts/KaTeX_Caligraphic-Bold.ttfnew file mode 100644index 0000000..9ff4a5eBinary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Caligraphic-Bold.ttf differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Caligraphic-Bold.woff b/sdk/webui/static/vendor/katex/fonts/KaTeX_Caligraphic-Bold.woffnew file mode 100644index 0000000..9759710Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Caligraphic-Bold.woff differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Caligraphic-Bold.woff2 b/sdk/webui/static/vendor/katex/fonts/KaTeX_Caligraphic-Bold.woff2new file mode 100644index 0000000..f390922Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Caligraphic-Bold.woff2 differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Caligraphic-Regular.ttf b/sdk/webui/static/vendor/katex/fonts/KaTeX_Caligraphic-Regular.ttfnew file mode 100644index 0000000..f522294Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Caligraphic-Regular.ttf differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Caligraphic-Regular.woff b/sdk/webui/static/vendor/katex/fonts/KaTeX_Caligraphic-Regular.woffnew file mode 100644index 0000000..9bdd534Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Caligraphic-Regular.woff differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Caligraphic-Regular.woff2 b/sdk/webui/static/vendor/katex/fonts/KaTeX_Caligraphic-Regular.woff2new file mode 100644index 0000000..75344a1Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Caligraphic-Regular.woff2 differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Fraktur-Bold.ttf b/sdk/webui/static/vendor/katex/fonts/KaTeX_Fraktur-Bold.ttfnew file mode 100644index 0000000..4e98259Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Fraktur-Bold.ttf differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Fraktur-Bold.woff b/sdk/webui/static/vendor/katex/fonts/KaTeX_Fraktur-Bold.woffnew file mode 100644index 0000000..e7730f6Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Fraktur-Bold.woff differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Fraktur-Bold.woff2 b/sdk/webui/static/vendor/katex/fonts/KaTeX_Fraktur-Bold.woff2new file mode 100644index 0000000..395f28bBinary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Fraktur-Bold.woff2 differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Fraktur-Regular.ttf b/sdk/webui/static/vendor/katex/fonts/KaTeX_Fraktur-Regular.ttfnew file mode 100644index 0000000..b8461b2Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Fraktur-Regular.ttf differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Fraktur-Regular.woff b/sdk/webui/static/vendor/katex/fonts/KaTeX_Fraktur-Regular.woffnew file mode 100644index 0000000..acab069Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Fraktur-Regular.woff differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Fraktur-Regular.woff2 b/sdk/webui/static/vendor/katex/fonts/KaTeX_Fraktur-Regular.woff2new file mode 100644index 0000000..735f694Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Fraktur-Regular.woff2 differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-Bold.ttf b/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-Bold.ttfnew file mode 100644index 0000000..4060e62Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-Bold.ttf differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-Bold.woff b/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-Bold.woffnew file mode 100644index 0000000..f38136aBinary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-Bold.woff differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-Bold.woff2 b/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-Bold.woff2new file mode 100644index 0000000..ab2ad21Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-Bold.woff2 differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-BoldItalic.ttf b/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-BoldItalic.ttfnew file mode 100644index 0000000..dc00797Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-BoldItalic.ttf differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-BoldItalic.woff b/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-BoldItalic.woffnew file mode 100644index 0000000..67807b0Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-BoldItalic.woff differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-BoldItalic.woff2 b/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-BoldItalic.woff2new file mode 100644index 0000000..5931794Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-BoldItalic.woff2 differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-Italic.ttf b/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-Italic.ttfnew file mode 100644index 0000000..0e9b0f3Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-Italic.ttf differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-Italic.woff b/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-Italic.woffnew file mode 100644index 0000000..6f43b59Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-Italic.woff differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-Italic.woff2 b/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-Italic.woff2new file mode 100644index 0000000..b50920eBinary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-Italic.woff2 differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-Regular.ttf b/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-Regular.ttfnew file mode 100644index 0000000..dd45e1eBinary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-Regular.ttf differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-Regular.woff b/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-Regular.woffnew file mode 100644index 0000000..21f5812Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-Regular.woff differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-Regular.woff2 b/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-Regular.woff2new file mode 100644index 0000000..eb24a7bBinary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Main-Regular.woff2 differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Math-BoldItalic.ttf b/sdk/webui/static/vendor/katex/fonts/KaTeX_Math-BoldItalic.ttfnew file mode 100644index 0000000..728ce7aBinary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Math-BoldItalic.ttf differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Math-BoldItalic.woff b/sdk/webui/static/vendor/katex/fonts/KaTeX_Math-BoldItalic.woffnew file mode 100644index 0000000..0ae390dBinary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Math-BoldItalic.woff differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Math-BoldItalic.woff2 b/sdk/webui/static/vendor/katex/fonts/KaTeX_Math-BoldItalic.woff2new file mode 100644index 0000000..2965702Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Math-BoldItalic.woff2 differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Math-Italic.ttf b/sdk/webui/static/vendor/katex/fonts/KaTeX_Math-Italic.ttfnew file mode 100644index 0000000..70d559bBinary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Math-Italic.ttf differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Math-Italic.woff b/sdk/webui/static/vendor/katex/fonts/KaTeX_Math-Italic.woffnew file mode 100644index 0000000..eb5159dBinary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Math-Italic.woff differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Math-Italic.woff2 b/sdk/webui/static/vendor/katex/fonts/KaTeX_Math-Italic.woff2new file mode 100644index 0000000..215c143Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Math-Italic.woff2 differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_SansSerif-Bold.ttf b/sdk/webui/static/vendor/katex/fonts/KaTeX_SansSerif-Bold.ttfnew file mode 100644index 0000000..2f65a8aBinary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_SansSerif-Bold.ttf differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_SansSerif-Bold.woff b/sdk/webui/static/vendor/katex/fonts/KaTeX_SansSerif-Bold.woffnew file mode 100644index 0000000..8d47c02Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_SansSerif-Bold.woff differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_SansSerif-Bold.woff2 b/sdk/webui/static/vendor/katex/fonts/KaTeX_SansSerif-Bold.woff2new file mode 100644index 0000000..cfaa3bdBinary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_SansSerif-Bold.woff2 differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_SansSerif-Italic.ttf b/sdk/webui/static/vendor/katex/fonts/KaTeX_SansSerif-Italic.ttfnew file mode 100644index 0000000..d5850dfBinary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_SansSerif-Italic.ttf differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_SansSerif-Italic.woff b/sdk/webui/static/vendor/katex/fonts/KaTeX_SansSerif-Italic.woffnew file mode 100644index 0000000..7e02df9Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_SansSerif-Italic.woff differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_SansSerif-Italic.woff2 b/sdk/webui/static/vendor/katex/fonts/KaTeX_SansSerif-Italic.woff2new file mode 100644index 0000000..349c06dBinary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_SansSerif-Italic.woff2 differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_SansSerif-Regular.ttf b/sdk/webui/static/vendor/katex/fonts/KaTeX_SansSerif-Regular.ttfnew file mode 100644index 0000000..537279fBinary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_SansSerif-Regular.ttf differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_SansSerif-Regular.woff b/sdk/webui/static/vendor/katex/fonts/KaTeX_SansSerif-Regular.woffnew file mode 100644index 0000000..31b8482Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_SansSerif-Regular.woff differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_SansSerif-Regular.woff2 b/sdk/webui/static/vendor/katex/fonts/KaTeX_SansSerif-Regular.woff2new file mode 100644index 0000000..a90eea8Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_SansSerif-Regular.woff2 differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Script-Regular.ttf b/sdk/webui/static/vendor/katex/fonts/KaTeX_Script-Regular.ttfnew file mode 100644index 0000000..fd679bfBinary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Script-Regular.ttf differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Script-Regular.woff b/sdk/webui/static/vendor/katex/fonts/KaTeX_Script-Regular.woffnew file mode 100644index 0000000..0e7da82Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Script-Regular.woff differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Script-Regular.woff2 b/sdk/webui/static/vendor/katex/fonts/KaTeX_Script-Regular.woff2new file mode 100644index 0000000..b3048fcBinary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Script-Regular.woff2 differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Size1-Regular.ttf b/sdk/webui/static/vendor/katex/fonts/KaTeX_Size1-Regular.ttfnew file mode 100644index 0000000..871fd7dBinary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Size1-Regular.ttf differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Size1-Regular.woff b/sdk/webui/static/vendor/katex/fonts/KaTeX_Size1-Regular.woffnew file mode 100644index 0000000..7f292d9Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Size1-Regular.woff differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Size1-Regular.woff2 b/sdk/webui/static/vendor/katex/fonts/KaTeX_Size1-Regular.woff2new file mode 100644index 0000000..c5a8462Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Size1-Regular.woff2 differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Size2-Regular.ttf b/sdk/webui/static/vendor/katex/fonts/KaTeX_Size2-Regular.ttfnew file mode 100644index 0000000..7a212caBinary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Size2-Regular.ttf differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Size2-Regular.woff b/sdk/webui/static/vendor/katex/fonts/KaTeX_Size2-Regular.woffnew file mode 100644index 0000000..d241d9bBinary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Size2-Regular.woff differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Size2-Regular.woff2 b/sdk/webui/static/vendor/katex/fonts/KaTeX_Size2-Regular.woff2new file mode 100644index 0000000..e1bccfeBinary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Size2-Regular.woff2 differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Size3-Regular.ttf b/sdk/webui/static/vendor/katex/fonts/KaTeX_Size3-Regular.ttfnew file mode 100644index 0000000..00bff34Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Size3-Regular.ttf differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Size3-Regular.woff b/sdk/webui/static/vendor/katex/fonts/KaTeX_Size3-Regular.woffnew file mode 100644index 0000000..e6e9b65Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Size3-Regular.woff differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Size3-Regular.woff2 b/sdk/webui/static/vendor/katex/fonts/KaTeX_Size3-Regular.woff2new file mode 100644index 0000000..249a286Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Size3-Regular.woff2 differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Size4-Regular.ttf b/sdk/webui/static/vendor/katex/fonts/KaTeX_Size4-Regular.ttfnew file mode 100644index 0000000..74f0892Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Size4-Regular.ttf differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Size4-Regular.woff b/sdk/webui/static/vendor/katex/fonts/KaTeX_Size4-Regular.woffnew file mode 100644index 0000000..e1ec545Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Size4-Regular.woff differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Size4-Regular.woff2 b/sdk/webui/static/vendor/katex/fonts/KaTeX_Size4-Regular.woff2new file mode 100644index 0000000..680c130Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Size4-Regular.woff2 differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Typewriter-Regular.ttf b/sdk/webui/static/vendor/katex/fonts/KaTeX_Typewriter-Regular.ttfnew file mode 100644index 0000000..c83252cBinary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Typewriter-Regular.ttf differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Typewriter-Regular.woff b/sdk/webui/static/vendor/katex/fonts/KaTeX_Typewriter-Regular.woffnew file mode 100644index 0000000..2432419Binary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Typewriter-Regular.woff differdiff --git a/sdk/webui/static/vendor/katex/fonts/KaTeX_Typewriter-Regular.woff2 b/sdk/webui/static/vendor/katex/fonts/KaTeX_Typewriter-Regular.woff2new file mode 100644index 0000000..771f1afBinary files /dev/null and b/sdk/webui/static/vendor/katex/fonts/KaTeX_Typewriter-Regular.woff2 differdiff --git a/sdk/webui/static/vendor/katex/katex.min.css b/sdk/webui/static/vendor/katex/katex.min.cssnew file mode 100644index 0000000..975b828--- /dev/null+++ b/sdk/webui/static/vendor/katex/katex.min.css@@ -0,0 +1 @@+@font-face{font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(fonts/KaTeX_AMS-Regular.woff2) format("woff2"),url(fonts/KaTeX_AMS-Regular.woff) format("woff"),url(fonts/KaTeX_AMS-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Caligraphic-Bold.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Bold.woff) format("woff"),url(fonts/KaTeX_Caligraphic-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Caligraphic-Regular.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Regular.woff) format("woff"),url(fonts/KaTeX_Caligraphic-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Fraktur-Bold.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Bold.woff) format("woff"),url(fonts/KaTeX_Fraktur-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Fraktur-Regular.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Regular.woff) format("woff"),url(fonts/KaTeX_Fraktur-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(fonts/KaTeX_Main-Bold.woff2) format("woff2"),url(fonts/KaTeX_Main-Bold.woff) format("woff"),url(fonts/KaTeX_Main-Bold.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Main-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Main-BoldItalic.woff) format("woff"),url(fonts/KaTeX_Main-BoldItalic.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Main-Italic.woff2) format("woff2"),url(fonts/KaTeX_Main-Italic.woff) format("woff"),url(fonts/KaTeX_Main-Italic.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Main-Regular.woff2) format("woff2"),url(fonts/KaTeX_Main-Regular.woff) format("woff"),url(fonts/KaTeX_Main-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(fonts/KaTeX_Math-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Math-BoldItalic.woff) format("woff"),url(fonts/KaTeX_Math-BoldItalic.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(fonts/KaTeX_Math-Italic.woff2) format("woff2"),url(fonts/KaTeX_Math-Italic.woff) format("woff"),url(fonts/KaTeX_Math-Italic.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:700;src:url(fonts/KaTeX_SansSerif-Bold.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Bold.woff) format("woff"),url(fonts/KaTeX_SansSerif-Bold.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:italic;font-weight:400;src:url(fonts/KaTeX_SansSerif-Italic.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Italic.woff) format("woff"),url(fonts/KaTeX_SansSerif-Italic.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:400;src:url(fonts/KaTeX_SansSerif-Regular.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Regular.woff) format("woff"),url(fonts/KaTeX_SansSerif-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Script-Regular.woff2) format("woff2"),url(fonts/KaTeX_Script-Regular.woff) format("woff"),url(fonts/KaTeX_Script-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size1-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size1-Regular.woff) format("woff"),url(fonts/KaTeX_Size1-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size2-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size2-Regular.woff) format("woff"),url(fonts/KaTeX_Size2-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size3-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size3-Regular.woff) format("woff"),url(fonts/KaTeX_Size3-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Size4-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size4-Regular.woff) format("woff"),url(fonts/KaTeX_Size4-Regular.ttf) format("truetype")}@font-face{font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(fonts/KaTeX_Typewriter-Regular.woff2) format("woff2"),url(fonts/KaTeX_Typewriter-Regular.woff) format("woff"),url(fonts/KaTeX_Typewriter-Regular.ttf) format("truetype")}.katex{font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.11"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}diff --git a/sdk/webui/static/vendor/katex/katex.min.js b/sdk/webui/static/vendor/katex/katex.min.jsnew file mode 100644index 0000000..b69360c--- /dev/null+++ b/sdk/webui/static/vendor/katex/katex.min.js@@ -0,0 +1 @@+!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.katex=t():e.katex=t()}("undefined"!=typeof self?self:this,(function(){return function(){"use strict";var e={d:function(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{default:function(){return Yn}});class r{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;let n,o,s="KaTeX parse error: "+e;const i=t&&t.loc;if(i&&i.start<=i.end){const e=i.lexer.input;n=i.start,o=i.end,n===e.length?s+=" at end of input: ":s+=" at position "+(n+1)+": ";const t=e.slice(n,o).replace(/[^]/g,"$&\u0332");let r,a;r=n>15?"\u2026"+e.slice(n-15,n):e.slice(0,n),a=o+15<e.length?e.slice(o,o+15)+"\u2026":e.slice(o),s+=r+t+a}const a=new Error(s);return a.name="ParseError",a.__proto__=r.prototype,a.position=n,null!=n&&null!=o&&(a.length=o-n),a.rawMessage=e,a}}r.prototype.__proto__=Error.prototype;var n=r;const o=/([A-Z])/g,s={"&":"&",">":">","<":"<",'"':""","'":"'"},i=/[&><"']/g;const a=function(e){return"ordgroup"===e.type||"color"===e.type?1===e.body.length?a(e.body[0]):e:"font"===e.type?a(e.body):e};var l={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(i,(e=>s[e]))},hyphenate:function(e){return e.replace(o,"-$1").toLowerCase()},getBaseElem:a,isCharacterBox:function(e){const t=a(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},protocolFromUrl:function(e){const t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?":"!==t[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"}};const h={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function c(e){if(e.default)return e.default;const t=e.type,r=Array.isArray(t)?t[0]:t;if("string"!=typeof r)return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class m{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(const t in h)if(h.hasOwnProperty(t)){const r=h[t];this[t]=void 0!==e[t]?r.processor?r.processor(e[t]):e[t]:c(r)}}reportNonstrict(e,t,r){let o=this.strict;if("function"==typeof o&&(o=o(e,t,r)),o&&"ignore"!==o){if(!0===o||"error"===o)throw new n("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",r);"warn"===o?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+o+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,r){let n=this.strict;if("function"==typeof n)try{n=n(e,t,r)}catch(e){n="error"}return!(!n||"ignore"===n)&&(!0===n||"error"===n||("warn"===n?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),!1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]"),!1)))}isTrusted(e){if(e.url&&!e.protocol){const t=l.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}const t="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(t)}}class p{constructor(e,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=r}sup(){return u[d[this.id]]}sub(){return u[g[this.id]]}fracNum(){return u[f[this.id]]}fracDen(){return u[b[this.id]]}cramp(){return u[y[this.id]]}text(){return u[x[this.id]]}isTight(){return this.size>=2}}const u=[new p(0,0,!1),new p(1,0,!0),new p(2,1,!1),new p(3,1,!0),new p(4,2,!1),new p(5,2,!0),new p(6,3,!1),new p(7,3,!0)],d=[4,5,4,5,6,7,6,7],g=[5,5,5,5,7,7,7,7],f=[2,3,4,5,6,7,6,7],b=[3,3,5,5,7,7,7,7],y=[1,1,3,3,5,5,7,7],x=[0,1,2,3,2,3,2,3];var w={DISPLAY:u[0],TEXT:u[2],SCRIPT:u[4],SCRIPTSCRIPT:u[6]};const v=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];const k=[];function S(e){for(let t=0;t<k.length;t+=2)if(e>=k[t]&&e<=k[t+1])return!0;return!1}v.forEach((e=>e.blocks.forEach((e=>k.push(...e)))));const M=80,z={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class A{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return l.contains(this.classes,e)}toNode(){const e=document.createDocumentFragment();for(let t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){let e="";for(let t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map((e=>e.toText())).join("")}}var T={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}};const B={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},C={"\xc5":"A","\xd0":"D","\xde":"o","\xe5":"a","\xf0":"d","\xfe":"o","\u0410":"A","\u0411":"B","\u0412":"B","\u0413":"F","\u0414":"A","\u0415":"E","\u0416":"K","\u0417":"3","\u0418":"N","\u0419":"N","\u041a":"K","\u041b":"N","\u041c":"M","\u041d":"H","\u041e":"O","\u041f":"N","\u0420":"P","\u0421":"C","\u0422":"T","\u0423":"y","\u0424":"O","\u0425":"X","\u0426":"U","\u0427":"h","\u0428":"W","\u0429":"W","\u042a":"B","\u042b":"X","\u042c":"B","\u042d":"3","\u042e":"X","\u042f":"R","\u0430":"a","\u0431":"b","\u0432":"a","\u0433":"r","\u0434":"y","\u0435":"e","\u0436":"m","\u0437":"e","\u0438":"n","\u0439":"n","\u043a":"n","\u043b":"n","\u043c":"m","\u043d":"n","\u043e":"o","\u043f":"n","\u0440":"p","\u0441":"c","\u0442":"o","\u0443":"y","\u0444":"b","\u0445":"x","\u0446":"n","\u0447":"n","\u0448":"w","\u0449":"w","\u044a":"a","\u044b":"m","\u044c":"a","\u044d":"e","\u044e":"m","\u044f":"r"};function N(e,t,r){if(!T[t])throw new Error("Font metrics not found for font: "+t+".");let n=e.charCodeAt(0),o=T[t][n];if(!o&&e[0]in C&&(n=C[e[0]].charCodeAt(0),o=T[t][n]),o||"text"!==r||S(n)&&(o=T[t][77]),o)return{depth:o[0],height:o[1],italic:o[2],skew:o[3],width:o[4]}}const q={};const I=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],R=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],H=function(e,t){return t.size<2?e:I[e-1][t.size-1]};class O{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||O.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=R[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){const t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(const r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return new O(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:H(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:R[e-1]})}havingBaseStyle(e){e=e||this.style.text();const t=H(O.BASESIZE,e);return this.size===t&&this.textSize===O.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){let e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==O.BASESIZE?["sizing","reset-size"+this.size,"size"+O.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){let t;if(t=e>=5?0:e>=3?1:2,!q[t]){const e=q[t]={cssEmPerMu:B.quad[t]/18};for(const r in B)B.hasOwnProperty(r)&&(e[r]=B[r][t])}return q[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}O.BASESIZE=6;var E=O;const L={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},D={ex:!0,em:!0,mu:!0},V=function(e){return"string"!=typeof e&&(e=e.unit),e in L||e in D||"ex"===e},P=function(e,t){let r;if(e.unit in L)r=L[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)r=t.fontMetrics().cssEmPerMu;else{let o;if(o=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)r=o.fontMetrics().xHeight;else{if("em"!==e.unit)throw new n("Invalid unit: '"+e.unit+"'");r=o.fontMetrics().quad}o!==t&&(r*=o.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)},F=function(e){return+e.toFixed(4)+"em"},G=function(e){return e.filter((e=>e)).join(" ")},U=function(e,t,r){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t){t.style.isTight()&&this.classes.push("mtight");const e=t.getColor();e&&(this.style.color=e)}},Y=function(e){const t=document.createElement(e);t.className=G(this.classes);for(const e in this.style)this.style.hasOwnProperty(e)&&(t.style[e]=this.style[e]);for(const e in this.attributes)this.attributes.hasOwnProperty(e)&&t.setAttribute(e,this.attributes[e]);for(let e=0;e<this.children.length;e++)t.appendChild(this.children[e].toNode());return t},X=function(e){let t="<"+e;this.classes.length&&(t+=' class="'+l.escape(G(this.classes))+'"');let r="";for(const e in this.style)this.style.hasOwnProperty(e)&&(r+=l.hyphenate(e)+":"+this.style[e]+";");r&&(t+=' style="'+l.escape(r)+'"');for(const e in this.attributes)this.attributes.hasOwnProperty(e)&&(t+=" "+e+'="'+l.escape(this.attributes[e])+'"');t+=">";for(let e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t+="</"+e+">",t};class W{constructor(e,t,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,U.call(this,e,r,n),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return l.contains(this.classes,e)}toNode(){return Y.call(this,"span")}toMarkup(){return X.call(this,"span")}}class _{constructor(e,t,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,U.call(this,t,n),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return l.contains(this.classes,e)}toNode(){return Y.call(this,"a")}toMarkup(){return X.call(this,"a")}}class j{constructor(e,t,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=r}hasClass(e){return l.contains(this.classes,e)}toNode(){const e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(const t in this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){let e='<img src="'+l.escape(this.src)+'" alt="'+l.escape(this.alt)+'"',t="";for(const e in this.style)this.style.hasOwnProperty(e)&&(t+=l.hyphenate(e)+":"+this.style[e]+";");return t&&(e+=' style="'+l.escape(t)+'"'),e+="'/>",e}}const $={"\xee":"\u0131\u0302","\xef":"\u0131\u0308","\xed":"\u0131\u0301","\xec":"\u0131\u0300"};class Z{constructor(e,t,r,n,o,s,i,a){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=r||0,this.italic=n||0,this.skew=o||0,this.width=s||0,this.classes=i||[],this.style=a||{},this.maxFontSize=0;const l=function(e){for(let t=0;t<v.length;t++){const r=v[t];for(let t=0;t<r.blocks.length;t++){const n=r.blocks[t];if(e>=n[0]&&e<=n[1])return r.name}}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[\xee\xef\xed\xec]/.test(this.text)&&(this.text=$[this.text])}hasClass(e){return l.contains(this.classes,e)}toNode(){const e=document.createTextNode(this.text);let t=null;this.italic>0&&(t=document.createElement("span"),t.style.marginRight=F(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=G(this.classes));for(const e in this.style)this.style.hasOwnProperty(e)&&(t=t||document.createElement("span"),t.style[e]=this.style[e]);return t?(t.appendChild(e),t):e}toMarkup(){let e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=l.escape(G(this.classes)),t+='"');let r="";this.italic>0&&(r+="margin-right:"+this.italic+"em;");for(const e in this.style)this.style.hasOwnProperty(e)&&(r+=l.hyphenate(e)+":"+this.style[e]+";");r&&(e=!0,t+=' style="'+l.escape(r)+'"');const n=l.escape(this.text);return e?(t+=">",t+=n,t+="</span>",t):n}}class K{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){const e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(let t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){let e='<svg xmlns="http://www.w3.org/2000/svg"';for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+l.escape(this.attributes[t])+'"');e+=">";for(let t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e+="</svg>",e}}class J{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){const e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",z[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+l.escape(this.alternate)+'"/>':'<path d="'+l.escape(z[this.pathName])+'"/>'}}class Q{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){const e=document.createElementNS("http://www.w3.org/2000/svg","line");for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){let e="<line";for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+l.escape(this.attributes[t])+'"');return e+="/>",e}}function ee(e){if(e instanceof Z)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}const te={bin:1,close:1,inner:1,open:1,punct:1,rel:1},re={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},ne={math:{},text:{}};var oe=ne;function se(e,t,r,n,o,s){ne[e][o]={font:t,group:r,replace:n},s&&n&&(ne[e][n]=ne[e][o])}const ie="math",ae="text",le="main",he="ams",ce="accent-token",me="bin",pe="close",ue="inner",de="mathord",ge="op-token",fe="open",be="punct",ye="rel",xe="spacing",we="textord";se(ie,le,ye,"\u2261","\\equiv",!0),se(ie,le,ye,"\u227a","\\prec",!0),se(ie,le,ye,"\u227b","\\succ",!0),se(ie,le,ye,"\u223c","\\sim",!0),se(ie,le,ye,"\u22a5","\\perp"),se(ie,le,ye,"\u2aaf","\\preceq",!0),se(ie,le,ye,"\u2ab0","\\succeq",!0),se(ie,le,ye,"\u2243","\\simeq",!0),se(ie,le,ye,"\u2223","\\mid",!0),se(ie,le,ye,"\u226a","\\ll",!0),se(ie,le,ye,"\u226b","\\gg",!0),se(ie,le,ye,"\u224d","\\asymp",!0),se(ie,le,ye,"\u2225","\\parallel"),se(ie,le,ye,"\u22c8","\\bowtie",!0),se(ie,le,ye,"\u2323","\\smile",!0),se(ie,le,ye,"\u2291","\\sqsubseteq",!0),se(ie,le,ye,"\u2292","\\sqsupseteq",!0),se(ie,le,ye,"\u2250","\\doteq",!0),se(ie,le,ye,"\u2322","\\frown",!0),se(ie,le,ye,"\u220b","\\ni",!0),se(ie,le,ye,"\u221d","\\propto",!0),se(ie,le,ye,"\u22a2","\\vdash",!0),se(ie,le,ye,"\u22a3","\\dashv",!0),se(ie,le,ye,"\u220b","\\owns"),se(ie,le,be,".","\\ldotp"),se(ie,le,be,"\u22c5","\\cdotp"),se(ie,le,we,"#","\\#"),se(ae,le,we,"#","\\#"),se(ie,le,we,"&","\\&"),se(ae,le,we,"&","\\&"),se(ie,le,we,"\u2135","\\aleph",!0),se(ie,le,we,"\u2200","\\forall",!0),se(ie,le,we,"\u210f","\\hbar",!0),se(ie,le,we,"\u2203","\\exists",!0),se(ie,le,we,"\u2207","\\nabla",!0),se(ie,le,we,"\u266d","\\flat",!0),se(ie,le,we,"\u2113","\\ell",!0),se(ie,le,we,"\u266e","\\natural",!0),se(ie,le,we,"\u2663","\\clubsuit",!0),se(ie,le,we,"\u2118","\\wp",!0),se(ie,le,we,"\u266f","\\sharp",!0),se(ie,le,we,"\u2662","\\diamondsuit",!0),se(ie,le,we,"\u211c","\\Re",!0),se(ie,le,we,"\u2661","\\heartsuit",!0),se(ie,le,we,"\u2111","\\Im",!0),se(ie,le,we,"\u2660","\\spadesuit",!0),se(ie,le,we,"\xa7","\\S",!0),se(ae,le,we,"\xa7","\\S"),se(ie,le,we,"\xb6","\\P",!0),se(ae,le,we,"\xb6","\\P"),se(ie,le,we,"\u2020","\\dag"),se(ae,le,we,"\u2020","\\dag"),se(ae,le,we,"\u2020","\\textdagger"),se(ie,le,we,"\u2021","\\ddag"),se(ae,le,we,"\u2021","\\ddag"),se(ae,le,we,"\u2021","\\textdaggerdbl"),se(ie,le,pe,"\u23b1","\\rmoustache",!0),se(ie,le,fe,"\u23b0","\\lmoustache",!0),se(ie,le,pe,"\u27ef","\\rgroup",!0),se(ie,le,fe,"\u27ee","\\lgroup",!0),se(ie,le,me,"\u2213","\\mp",!0),se(ie,le,me,"\u2296","\\ominus",!0),se(ie,le,me,"\u228e","\\uplus",!0),se(ie,le,me,"\u2293","\\sqcap",!0),se(ie,le,me,"\u2217","\\ast"),se(ie,le,me,"\u2294","\\sqcup",!0),se(ie,le,me,"\u25ef","\\bigcirc",!0),se(ie,le,me,"\u2219","\\bullet",!0),se(ie,le,me,"\u2021","\\ddagger"),se(ie,le,me,"\u2240","\\wr",!0),se(ie,le,me,"\u2a3f","\\amalg"),se(ie,le,me,"&","\\And"),se(ie,le,ye,"\u27f5","\\longleftarrow",!0),se(ie,le,ye,"\u21d0","\\Leftarrow",!0),se(ie,le,ye,"\u27f8","\\Longleftarrow",!0),se(ie,le,ye,"\u27f6","\\longrightarrow",!0),se(ie,le,ye,"\u21d2","\\Rightarrow",!0),se(ie,le,ye,"\u27f9","\\Longrightarrow",!0),se(ie,le,ye,"\u2194","\\leftrightarrow",!0),se(ie,le,ye,"\u27f7","\\longleftrightarrow",!0),se(ie,le,ye,"\u21d4","\\Leftrightarrow",!0),se(ie,le,ye,"\u27fa","\\Longleftrightarrow",!0),se(ie,le,ye,"\u21a6","\\mapsto",!0),se(ie,le,ye,"\u27fc","\\longmapsto",!0),se(ie,le,ye,"\u2197","\\nearrow",!0),se(ie,le,ye,"\u21a9","\\hookleftarrow",!0),se(ie,le,ye,"\u21aa","\\hookrightarrow",!0),se(ie,le,ye,"\u2198","\\searrow",!0),se(ie,le,ye,"\u21bc","\\leftharpoonup",!0),se(ie,le,ye,"\u21c0","\\rightharpoonup",!0),se(ie,le,ye,"\u2199","\\swarrow",!0),se(ie,le,ye,"\u21bd","\\leftharpoondown",!0),se(ie,le,ye,"\u21c1","\\rightharpoondown",!0),se(ie,le,ye,"\u2196","\\nwarrow",!0),se(ie,le,ye,"\u21cc","\\rightleftharpoons",!0),se(ie,he,ye,"\u226e","\\nless",!0),se(ie,he,ye,"\ue010","\\@nleqslant"),se(ie,he,ye,"\ue011","\\@nleqq"),se(ie,he,ye,"\u2a87","\\lneq",!0),se(ie,he,ye,"\u2268","\\lneqq",!0),se(ie,he,ye,"\ue00c","\\@lvertneqq"),se(ie,he,ye,"\u22e6","\\lnsim",!0),se(ie,he,ye,"\u2a89","\\lnapprox",!0),se(ie,he,ye,"\u2280","\\nprec",!0),se(ie,he,ye,"\u22e0","\\npreceq",!0),se(ie,he,ye,"\u22e8","\\precnsim",!0),se(ie,he,ye,"\u2ab9","\\precnapprox",!0),se(ie,he,ye,"\u2241","\\nsim",!0),se(ie,he,ye,"\ue006","\\@nshortmid"),se(ie,he,ye,"\u2224","\\nmid",!0),se(ie,he,ye,"\u22ac","\\nvdash",!0),se(ie,he,ye,"\u22ad","\\nvDash",!0),se(ie,he,ye,"\u22ea","\\ntriangleleft"),se(ie,he,ye,"\u22ec","\\ntrianglelefteq",!0),se(ie,he,ye,"\u228a","\\subsetneq",!0),se(ie,he,ye,"\ue01a","\\@varsubsetneq"),se(ie,he,ye,"\u2acb","\\subsetneqq",!0),se(ie,he,ye,"\ue017","\\@varsubsetneqq"),se(ie,he,ye,"\u226f","\\ngtr",!0),se(ie,he,ye,"\ue00f","\\@ngeqslant"),se(ie,he,ye,"\ue00e","\\@ngeqq"),se(ie,he,ye,"\u2a88","\\gneq",!0),se(ie,he,ye,"\u2269","\\gneqq",!0),se(ie,he,ye,"\ue00d","\\@gvertneqq"),se(ie,he,ye,"\u22e7","\\gnsim",!0),se(ie,he,ye,"\u2a8a","\\gnapprox",!0),se(ie,he,ye,"\u2281","\\nsucc",!0),se(ie,he,ye,"\u22e1","\\nsucceq",!0),se(ie,he,ye,"\u22e9","\\succnsim",!0),se(ie,he,ye,"\u2aba","\\succnapprox",!0),se(ie,he,ye,"\u2246","\\ncong",!0),se(ie,he,ye,"\ue007","\\@nshortparallel"),se(ie,he,ye,"\u2226","\\nparallel",!0),se(ie,he,ye,"\u22af","\\nVDash",!0),se(ie,he,ye,"\u22eb","\\ntriangleright"),se(ie,he,ye,"\u22ed","\\ntrianglerighteq",!0),se(ie,he,ye,"\ue018","\\@nsupseteqq"),se(ie,he,ye,"\u228b","\\supsetneq",!0),se(ie,he,ye,"\ue01b","\\@varsupsetneq"),se(ie,he,ye,"\u2acc","\\supsetneqq",!0),se(ie,he,ye,"\ue019","\\@varsupsetneqq"),se(ie,he,ye,"\u22ae","\\nVdash",!0),se(ie,he,ye,"\u2ab5","\\precneqq",!0),se(ie,he,ye,"\u2ab6","\\succneqq",!0),se(ie,he,ye,"\ue016","\\@nsubseteqq"),se(ie,he,me,"\u22b4","\\unlhd"),se(ie,he,me,"\u22b5","\\unrhd"),se(ie,he,ye,"\u219a","\\nleftarrow",!0),se(ie,he,ye,"\u219b","\\nrightarrow",!0),se(ie,he,ye,"\u21cd","\\nLeftarrow",!0),se(ie,he,ye,"\u21cf","\\nRightarrow",!0),se(ie,he,ye,"\u21ae","\\nleftrightarrow",!0),se(ie,he,ye,"\u21ce","\\nLeftrightarrow",!0),se(ie,he,ye,"\u25b3","\\vartriangle"),se(ie,he,we,"\u210f","\\hslash"),se(ie,he,we,"\u25bd","\\triangledown"),se(ie,he,we,"\u25ca","\\lozenge"),se(ie,he,we,"\u24c8","\\circledS"),se(ie,he,we,"\xae","\\circledR"),se(ae,he,we,"\xae","\\circledR"),se(ie,he,we,"\u2221","\\measuredangle",!0),se(ie,he,we,"\u2204","\\nexists"),se(ie,he,we,"\u2127","\\mho"),se(ie,he,we,"\u2132","\\Finv",!0),se(ie,he,we,"\u2141","\\Game",!0),se(ie,he,we,"\u2035","\\backprime"),se(ie,he,we,"\u25b2","\\blacktriangle"),se(ie,he,we,"\u25bc","\\blacktriangledown"),se(ie,he,we,"\u25a0","\\blacksquare"),se(ie,he,we,"\u29eb","\\blacklozenge"),se(ie,he,we,"\u2605","\\bigstar"),se(ie,he,we,"\u2222","\\sphericalangle",!0),se(ie,he,we,"\u2201","\\complement",!0),se(ie,he,we,"\xf0","\\eth",!0),se(ae,le,we,"\xf0","\xf0"),se(ie,he,we,"\u2571","\\diagup"),se(ie,he,we,"\u2572","\\diagdown"),se(ie,he,we,"\u25a1","\\square"),se(ie,he,we,"\u25a1","\\Box"),se(ie,he,we,"\u25ca","\\Diamond"),se(ie,he,we,"\xa5","\\yen",!0),se(ae,he,we,"\xa5","\\yen",!0),se(ie,he,we,"\u2713","\\checkmark",!0),se(ae,he,we,"\u2713","\\checkmark"),se(ie,he,we,"\u2136","\\beth",!0),se(ie,he,we,"\u2138","\\daleth",!0),se(ie,he,we,"\u2137","\\gimel",!0),se(ie,he,we,"\u03dd","\\digamma",!0),se(ie,he,we,"\u03f0","\\varkappa"),se(ie,he,fe,"\u250c","\\@ulcorner",!0),se(ie,he,pe,"\u2510","\\@urcorner",!0),se(ie,he,fe,"\u2514","\\@llcorner",!0),se(ie,he,pe,"\u2518","\\@lrcorner",!0),se(ie,he,ye,"\u2266","\\leqq",!0),se(ie,he,ye,"\u2a7d","\\leqslant",!0),se(ie,he,ye,"\u2a95","\\eqslantless",!0),se(ie,he,ye,"\u2272","\\lesssim",!0),se(ie,he,ye,"\u2a85","\\lessapprox",!0),se(ie,he,ye,"\u224a","\\approxeq",!0),se(ie,he,me,"\u22d6","\\lessdot"),se(ie,he,ye,"\u22d8","\\lll",!0),se(ie,he,ye,"\u2276","\\lessgtr",!0),se(ie,he,ye,"\u22da","\\lesseqgtr",!0),se(ie,he,ye,"\u2a8b","\\lesseqqgtr",!0),se(ie,he,ye,"\u2251","\\doteqdot"),se(ie,he,ye,"\u2253","\\risingdotseq",!0),se(ie,he,ye,"\u2252","\\fallingdotseq",!0),se(ie,he,ye,"\u223d","\\backsim",!0),se(ie,he,ye,"\u22cd","\\backsimeq",!0),se(ie,he,ye,"\u2ac5","\\subseteqq",!0),se(ie,he,ye,"\u22d0","\\Subset",!0),se(ie,he,ye,"\u228f","\\sqsubset",!0),se(ie,he,ye,"\u227c","\\preccurlyeq",!0),se(ie,he,ye,"\u22de","\\curlyeqprec",!0),se(ie,he,ye,"\u227e","\\precsim",!0),se(ie,he,ye,"\u2ab7","\\precapprox",!0),se(ie,he,ye,"\u22b2","\\vartriangleleft"),se(ie,he,ye,"\u22b4","\\trianglelefteq"),se(ie,he,ye,"\u22a8","\\vDash",!0),se(ie,he,ye,"\u22aa","\\Vvdash",!0),se(ie,he,ye,"\u2323","\\smallsmile"),se(ie,he,ye,"\u2322","\\smallfrown"),se(ie,he,ye,"\u224f","\\bumpeq",!0),se(ie,he,ye,"\u224e","\\Bumpeq",!0),se(ie,he,ye,"\u2267","\\geqq",!0),se(ie,he,ye,"\u2a7e","\\geqslant",!0),se(ie,he,ye,"\u2a96","\\eqslantgtr",!0),se(ie,he,ye,"\u2273","\\gtrsim",!0),se(ie,he,ye,"\u2a86","\\gtrapprox",!0),se(ie,he,me,"\u22d7","\\gtrdot"),se(ie,he,ye,"\u22d9","\\ggg",!0),se(ie,he,ye,"\u2277","\\gtrless",!0),se(ie,he,ye,"\u22db","\\gtreqless",!0),se(ie,he,ye,"\u2a8c","\\gtreqqless",!0),se(ie,he,ye,"\u2256","\\eqcirc",!0),se(ie,he,ye,"\u2257","\\circeq",!0),se(ie,he,ye,"\u225c","\\triangleq",!0),se(ie,he,ye,"\u223c","\\thicksim"),se(ie,he,ye,"\u2248","\\thickapprox"),se(ie,he,ye,"\u2ac6","\\supseteqq",!0),se(ie,he,ye,"\u22d1","\\Supset",!0),se(ie,he,ye,"\u2290","\\sqsupset",!0),se(ie,he,ye,"\u227d","\\succcurlyeq",!0),se(ie,he,ye,"\u22df","\\curlyeqsucc",!0),se(ie,he,ye,"\u227f","\\succsim",!0),se(ie,he,ye,"\u2ab8","\\succapprox",!0),se(ie,he,ye,"\u22b3","\\vartriangleright"),se(ie,he,ye,"\u22b5","\\trianglerighteq"),se(ie,he,ye,"\u22a9","\\Vdash",!0),se(ie,he,ye,"\u2223","\\shortmid"),se(ie,he,ye,"\u2225","\\shortparallel"),se(ie,he,ye,"\u226c","\\between",!0),se(ie,he,ye,"\u22d4","\\pitchfork",!0),se(ie,he,ye,"\u221d","\\varpropto"),se(ie,he,ye,"\u25c0","\\blacktriangleleft"),se(ie,he,ye,"\u2234","\\therefore",!0),se(ie,he,ye,"\u220d","\\backepsilon"),se(ie,he,ye,"\u25b6","\\blacktriangleright"),se(ie,he,ye,"\u2235","\\because",!0),se(ie,he,ye,"\u22d8","\\llless"),se(ie,he,ye,"\u22d9","\\gggtr"),se(ie,he,me,"\u22b2","\\lhd"),se(ie,he,me,"\u22b3","\\rhd"),se(ie,he,ye,"\u2242","\\eqsim",!0),se(ie,le,ye,"\u22c8","\\Join"),se(ie,he,ye,"\u2251","\\Doteq",!0),se(ie,he,me,"\u2214","\\dotplus",!0),se(ie,he,me,"\u2216","\\smallsetminus"),se(ie,he,me,"\u22d2","\\Cap",!0),se(ie,he,me,"\u22d3","\\Cup",!0),se(ie,he,me,"\u2a5e","\\doublebarwedge",!0),se(ie,he,me,"\u229f","\\boxminus",!0),se(ie,he,me,"\u229e","\\boxplus",!0),se(ie,he,me,"\u22c7","\\divideontimes",!0),se(ie,he,me,"\u22c9","\\ltimes",!0),se(ie,he,me,"\u22ca","\\rtimes",!0),se(ie,he,me,"\u22cb","\\leftthreetimes",!0),se(ie,he,me,"\u22cc","\\rightthreetimes",!0),se(ie,he,me,"\u22cf","\\curlywedge",!0),se(ie,he,me,"\u22ce","\\curlyvee",!0),se(ie,he,me,"\u229d","\\circleddash",!0),se(ie,he,me,"\u229b","\\circledast",!0),se(ie,he,me,"\u22c5","\\centerdot"),se(ie,he,me,"\u22ba","\\intercal",!0),se(ie,he,me,"\u22d2","\\doublecap"),se(ie,he,me,"\u22d3","\\doublecup"),se(ie,he,me,"\u22a0","\\boxtimes",!0),se(ie,he,ye,"\u21e2","\\dashrightarrow",!0),se(ie,he,ye,"\u21e0","\\dashleftarrow",!0),se(ie,he,ye,"\u21c7","\\leftleftarrows",!0),se(ie,he,ye,"\u21c6","\\leftrightarrows",!0),se(ie,he,ye,"\u21da","\\Lleftarrow",!0),se(ie,he,ye,"\u219e","\\twoheadleftarrow",!0),se(ie,he,ye,"\u21a2","\\leftarrowtail",!0),se(ie,he,ye,"\u21ab","\\looparrowleft",!0),se(ie,he,ye,"\u21cb","\\leftrightharpoons",!0),se(ie,he,ye,"\u21b6","\\curvearrowleft",!0),se(ie,he,ye,"\u21ba","\\circlearrowleft",!0),se(ie,he,ye,"\u21b0","\\Lsh",!0),se(ie,he,ye,"\u21c8","\\upuparrows",!0),se(ie,he,ye,"\u21bf","\\upharpoonleft",!0),se(ie,he,ye,"\u21c3","\\downharpoonleft",!0),se(ie,le,ye,"\u22b6","\\origof",!0),se(ie,le,ye,"\u22b7","\\imageof",!0),se(ie,he,ye,"\u22b8","\\multimap",!0),se(ie,he,ye,"\u21ad","\\leftrightsquigarrow",!0),se(ie,he,ye,"\u21c9","\\rightrightarrows",!0),se(ie,he,ye,"\u21c4","\\rightleftarrows",!0),se(ie,he,ye,"\u21a0","\\twoheadrightarrow",!0),se(ie,he,ye,"\u21a3","\\rightarrowtail",!0),se(ie,he,ye,"\u21ac","\\looparrowright",!0),se(ie,he,ye,"\u21b7","\\curvearrowright",!0),se(ie,he,ye,"\u21bb","\\circlearrowright",!0),se(ie,he,ye,"\u21b1","\\Rsh",!0),se(ie,he,ye,"\u21ca","\\downdownarrows",!0),se(ie,he,ye,"\u21be","\\upharpoonright",!0),se(ie,he,ye,"\u21c2","\\downharpoonright",!0),se(ie,he,ye,"\u21dd","\\rightsquigarrow",!0),se(ie,he,ye,"\u21dd","\\leadsto"),se(ie,he,ye,"\u21db","\\Rrightarrow",!0),se(ie,he,ye,"\u21be","\\restriction"),se(ie,le,we,"\u2018","`"),se(ie,le,we,"$","\\$"),se(ae,le,we,"$","\\$"),se(ae,le,we,"$","\\textdollar"),se(ie,le,we,"%","\\%"),se(ae,le,we,"%","\\%"),se(ie,le,we,"_","\\_"),se(ae,le,we,"_","\\_"),se(ae,le,we,"_","\\textunderscore"),se(ie,le,we,"\u2220","\\angle",!0),se(ie,le,we,"\u221e","\\infty",!0),se(ie,le,we,"\u2032","\\prime"),se(ie,le,we,"\u25b3","\\triangle"),se(ie,le,we,"\u0393","\\Gamma",!0),se(ie,le,we,"\u0394","\\Delta",!0),se(ie,le,we,"\u0398","\\Theta",!0),se(ie,le,we,"\u039b","\\Lambda",!0),se(ie,le,we,"\u039e","\\Xi",!0),se(ie,le,we,"\u03a0","\\Pi",!0),se(ie,le,we,"\u03a3","\\Sigma",!0),se(ie,le,we,"\u03a5","\\Upsilon",!0),se(ie,le,we,"\u03a6","\\Phi",!0),se(ie,le,we,"\u03a8","\\Psi",!0),se(ie,le,we,"\u03a9","\\Omega",!0),se(ie,le,we,"A","\u0391"),se(ie,le,we,"B","\u0392"),se(ie,le,we,"E","\u0395"),se(ie,le,we,"Z","\u0396"),se(ie,le,we,"H","\u0397"),se(ie,le,we,"I","\u0399"),se(ie,le,we,"K","\u039a"),se(ie,le,we,"M","\u039c"),se(ie,le,we,"N","\u039d"),se(ie,le,we,"O","\u039f"),se(ie,le,we,"P","\u03a1"),se(ie,le,we,"T","\u03a4"),se(ie,le,we,"X","\u03a7"),se(ie,le,we,"\xac","\\neg",!0),se(ie,le,we,"\xac","\\lnot"),se(ie,le,we,"\u22a4","\\top"),se(ie,le,we,"\u22a5","\\bot"),se(ie,le,we,"\u2205","\\emptyset"),se(ie,he,we,"\u2205","\\varnothing"),se(ie,le,de,"\u03b1","\\alpha",!0),se(ie,le,de,"\u03b2","\\beta",!0),se(ie,le,de,"\u03b3","\\gamma",!0),se(ie,le,de,"\u03b4","\\delta",!0),se(ie,le,de,"\u03f5","\\epsilon",!0),se(ie,le,de,"\u03b6","\\zeta",!0),se(ie,le,de,"\u03b7","\\eta",!0),se(ie,le,de,"\u03b8","\\theta",!0),se(ie,le,de,"\u03b9","\\iota",!0),se(ie,le,de,"\u03ba","\\kappa",!0),se(ie,le,de,"\u03bb","\\lambda",!0),se(ie,le,de,"\u03bc","\\mu",!0),se(ie,le,de,"\u03bd","\\nu",!0),se(ie,le,de,"\u03be","\\xi",!0),se(ie,le,de,"\u03bf","\\omicron",!0),se(ie,le,de,"\u03c0","\\pi",!0),se(ie,le,de,"\u03c1","\\rho",!0),se(ie,le,de,"\u03c3","\\sigma",!0),se(ie,le,de,"\u03c4","\\tau",!0),se(ie,le,de,"\u03c5","\\upsilon",!0),se(ie,le,de,"\u03d5","\\phi",!0),se(ie,le,de,"\u03c7","\\chi",!0),se(ie,le,de,"\u03c8","\\psi",!0),se(ie,le,de,"\u03c9","\\omega",!0),se(ie,le,de,"\u03b5","\\varepsilon",!0),se(ie,le,de,"\u03d1","\\vartheta",!0),se(ie,le,de,"\u03d6","\\varpi",!0),se(ie,le,de,"\u03f1","\\varrho",!0),se(ie,le,de,"\u03c2","\\varsigma",!0),se(ie,le,de,"\u03c6","\\varphi",!0),se(ie,le,me,"\u2217","*",!0),se(ie,le,me,"+","+"),se(ie,le,me,"\u2212","-",!0),se(ie,le,me,"\u22c5","\\cdot",!0),se(ie,le,me,"\u2218","\\circ",!0),se(ie,le,me,"\xf7","\\div",!0),se(ie,le,me,"\xb1","\\pm",!0),se(ie,le,me,"\xd7","\\times",!0),se(ie,le,me,"\u2229","\\cap",!0),se(ie,le,me,"\u222a","\\cup",!0),se(ie,le,me,"\u2216","\\setminus",!0),se(ie,le,me,"\u2227","\\land"),se(ie,le,me,"\u2228","\\lor"),se(ie,le,me,"\u2227","\\wedge",!0),se(ie,le,me,"\u2228","\\vee",!0),se(ie,le,we,"\u221a","\\surd"),se(ie,le,fe,"\u27e8","\\langle",!0),se(ie,le,fe,"\u2223","\\lvert"),se(ie,le,fe,"\u2225","\\lVert"),se(ie,le,pe,"?","?"),se(ie,le,pe,"!","!"),se(ie,le,pe,"\u27e9","\\rangle",!0),se(ie,le,pe,"\u2223","\\rvert"),se(ie,le,pe,"\u2225","\\rVert"),se(ie,le,ye,"=","="),se(ie,le,ye,":",":"),se(ie,le,ye,"\u2248","\\approx",!0),se(ie,le,ye,"\u2245","\\cong",!0),se(ie,le,ye,"\u2265","\\ge"),se(ie,le,ye,"\u2265","\\geq",!0),se(ie,le,ye,"\u2190","\\gets"),se(ie,le,ye,">","\\gt",!0),se(ie,le,ye,"\u2208","\\in",!0),se(ie,le,ye,"\ue020","\\@not"),se(ie,le,ye,"\u2282","\\subset",!0),se(ie,le,ye,"\u2283","\\supset",!0),se(ie,le,ye,"\u2286","\\subseteq",!0),se(ie,le,ye,"\u2287","\\supseteq",!0),se(ie,he,ye,"\u2288","\\nsubseteq",!0),se(ie,he,ye,"\u2289","\\nsupseteq",!0),se(ie,le,ye,"\u22a8","\\models"),se(ie,le,ye,"\u2190","\\leftarrow",!0),se(ie,le,ye,"\u2264","\\le"),se(ie,le,ye,"\u2264","\\leq",!0),se(ie,le,ye,"<","\\lt",!0),se(ie,le,ye,"\u2192","\\rightarrow",!0),se(ie,le,ye,"\u2192","\\to"),se(ie,he,ye,"\u2271","\\ngeq",!0),se(ie,he,ye,"\u2270","\\nleq",!0),se(ie,le,xe,"\xa0","\\ "),se(ie,le,xe,"\xa0","\\space"),se(ie,le,xe,"\xa0","\\nobreakspace"),se(ae,le,xe,"\xa0","\\ "),se(ae,le,xe,"\xa0"," "),se(ae,le,xe,"\xa0","\\space"),se(ae,le,xe,"\xa0","\\nobreakspace"),se(ie,le,xe,null,"\\nobreak"),se(ie,le,xe,null,"\\allowbreak"),se(ie,le,be,",",","),se(ie,le,be,";",";"),se(ie,he,me,"\u22bc","\\barwedge",!0),se(ie,he,me,"\u22bb","\\veebar",!0),se(ie,le,me,"\u2299","\\odot",!0),se(ie,le,me,"\u2295","\\oplus",!0),se(ie,le,me,"\u2297","\\otimes",!0),se(ie,le,we,"\u2202","\\partial",!0),se(ie,le,me,"\u2298","\\oslash",!0),se(ie,he,me,"\u229a","\\circledcirc",!0),se(ie,he,me,"\u22a1","\\boxdot",!0),se(ie,le,me,"\u25b3","\\bigtriangleup"),se(ie,le,me,"\u25bd","\\bigtriangledown"),se(ie,le,me,"\u2020","\\dagger"),se(ie,le,me,"\u22c4","\\diamond"),se(ie,le,me,"\u22c6","\\star"),se(ie,le,me,"\u25c3","\\triangleleft"),se(ie,le,me,"\u25b9","\\triangleright"),se(ie,le,fe,"{","\\{"),se(ae,le,we,"{","\\{"),se(ae,le,we,"{","\\textbraceleft"),se(ie,le,pe,"}","\\}"),se(ae,le,we,"}","\\}"),se(ae,le,we,"}","\\textbraceright"),se(ie,le,fe,"{","\\lbrace"),se(ie,le,pe,"}","\\rbrace"),se(ie,le,fe,"[","\\lbrack",!0),se(ae,le,we,"[","\\lbrack",!0),se(ie,le,pe,"]","\\rbrack",!0),se(ae,le,we,"]","\\rbrack",!0),se(ie,le,fe,"(","\\lparen",!0),se(ie,le,pe,")","\\rparen",!0),se(ae,le,we,"<","\\textless",!0),se(ae,le,we,">","\\textgreater",!0),se(ie,le,fe,"\u230a","\\lfloor",!0),se(ie,le,pe,"\u230b","\\rfloor",!0),se(ie,le,fe,"\u2308","\\lceil",!0),se(ie,le,pe,"\u2309","\\rceil",!0),se(ie,le,we,"\\","\\backslash"),se(ie,le,we,"\u2223","|"),se(ie,le,we,"\u2223","\\vert"),se(ae,le,we,"|","\\textbar",!0),se(ie,le,we,"\u2225","\\|"),se(ie,le,we,"\u2225","\\Vert"),se(ae,le,we,"\u2225","\\textbardbl"),se(ae,le,we,"~","\\textasciitilde"),se(ae,le,we,"\\","\\textbackslash"),se(ae,le,we,"^","\\textasciicircum"),se(ie,le,ye,"\u2191","\\uparrow",!0),se(ie,le,ye,"\u21d1","\\Uparrow",!0),se(ie,le,ye,"\u2193","\\downarrow",!0),se(ie,le,ye,"\u21d3","\\Downarrow",!0),se(ie,le,ye,"\u2195","\\updownarrow",!0),se(ie,le,ye,"\u21d5","\\Updownarrow",!0),se(ie,le,ge,"\u2210","\\coprod"),se(ie,le,ge,"\u22c1","\\bigvee"),se(ie,le,ge,"\u22c0","\\bigwedge"),se(ie,le,ge,"\u2a04","\\biguplus"),se(ie,le,ge,"\u22c2","\\bigcap"),se(ie,le,ge,"\u22c3","\\bigcup"),se(ie,le,ge,"\u222b","\\int"),se(ie,le,ge,"\u222b","\\intop"),se(ie,le,ge,"\u222c","\\iint"),se(ie,le,ge,"\u222d","\\iiint"),se(ie,le,ge,"\u220f","\\prod"),se(ie,le,ge,"\u2211","\\sum"),se(ie,le,ge,"\u2a02","\\bigotimes"),se(ie,le,ge,"\u2a01","\\bigoplus"),se(ie,le,ge,"\u2a00","\\bigodot"),se(ie,le,ge,"\u222e","\\oint"),se(ie,le,ge,"\u222f","\\oiint"),se(ie,le,ge,"\u2230","\\oiiint"),se(ie,le,ge,"\u2a06","\\bigsqcup"),se(ie,le,ge,"\u222b","\\smallint"),se(ae,le,ue,"\u2026","\\textellipsis"),se(ie,le,ue,"\u2026","\\mathellipsis"),se(ae,le,ue,"\u2026","\\ldots",!0),se(ie,le,ue,"\u2026","\\ldots",!0),se(ie,le,ue,"\u22ef","\\@cdots",!0),se(ie,le,ue,"\u22f1","\\ddots",!0),se(ie,le,we,"\u22ee","\\varvdots"),se(ie,le,ce,"\u02ca","\\acute"),se(ie,le,ce,"\u02cb","\\grave"),se(ie,le,ce,"\xa8","\\ddot"),se(ie,le,ce,"~","\\tilde"),se(ie,le,ce,"\u02c9","\\bar"),se(ie,le,ce,"\u02d8","\\breve"),se(ie,le,ce,"\u02c7","\\check"),se(ie,le,ce,"^","\\hat"),se(ie,le,ce,"\u20d7","\\vec"),se(ie,le,ce,"\u02d9","\\dot"),se(ie,le,ce,"\u02da","\\mathring"),se(ie,le,de,"\ue131","\\@imath"),se(ie,le,de,"\ue237","\\@jmath"),se(ie,le,we,"\u0131","\u0131"),se(ie,le,we,"\u0237","\u0237"),se(ae,le,we,"\u0131","\\i",!0),se(ae,le,we,"\u0237","\\j",!0),se(ae,le,we,"\xdf","\\ss",!0),se(ae,le,we,"\xe6","\\ae",!0),se(ae,le,we,"\u0153","\\oe",!0),se(ae,le,we,"\xf8","\\o",!0),se(ae,le,we,"\xc6","\\AE",!0),se(ae,le,we,"\u0152","\\OE",!0),se(ae,le,we,"\xd8","\\O",!0),se(ae,le,ce,"\u02ca","\\'"),se(ae,le,ce,"\u02cb","\\`"),se(ae,le,ce,"\u02c6","\\^"),se(ae,le,ce,"\u02dc","\\~"),se(ae,le,ce,"\u02c9","\\="),se(ae,le,ce,"\u02d8","\\u"),se(ae,le,ce,"\u02d9","\\."),se(ae,le,ce,"\xb8","\\c"),se(ae,le,ce,"\u02da","\\r"),se(ae,le,ce,"\u02c7","\\v"),se(ae,le,ce,"\xa8",'\\"'),se(ae,le,ce,"\u02dd","\\H"),se(ae,le,ce,"\u25ef","\\textcircled");const ve={"--":!0,"---":!0,"``":!0,"''":!0};se(ae,le,we,"\u2013","--",!0),se(ae,le,we,"\u2013","\\textendash"),se(ae,le,we,"\u2014","---",!0),se(ae,le,we,"\u2014","\\textemdash"),se(ae,le,we,"\u2018","`",!0),se(ae,le,we,"\u2018","\\textquoteleft"),se(ae,le,we,"\u2019","'",!0),se(ae,le,we,"\u2019","\\textquoteright"),se(ae,le,we,"\u201c","``",!0),se(ae,le,we,"\u201c","\\textquotedblleft"),se(ae,le,we,"\u201d","''",!0),se(ae,le,we,"\u201d","\\textquotedblright"),se(ie,le,we,"\xb0","\\degree",!0),se(ae,le,we,"\xb0","\\degree"),se(ae,le,we,"\xb0","\\textdegree",!0),se(ie,le,we,"\xa3","\\pounds"),se(ie,le,we,"\xa3","\\mathsterling",!0),se(ae,le,we,"\xa3","\\pounds"),se(ae,le,we,"\xa3","\\textsterling",!0),se(ie,he,we,"\u2720","\\maltese"),se(ae,he,we,"\u2720","\\maltese");const ke='0123456789/@."';for(let e=0;e<ke.length;e++){const t=ke.charAt(e);se(ie,le,we,t,t)}const Se='0123456789!@*()-=+";:?/.,';for(let e=0;e<Se.length;e++){const t=Se.charAt(e);se(ae,le,we,t,t)}const Me="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(let e=0;e<Me.length;e++){const t=Me.charAt(e);se(ie,le,de,t,t),se(ae,le,we,t,t)}se(ie,he,we,"C","\u2102"),se(ae,he,we,"C","\u2102"),se(ie,he,we,"H","\u210d"),se(ae,he,we,"H","\u210d"),se(ie,he,we,"N","\u2115"),se(ae,he,we,"N","\u2115"),se(ie,he,we,"P","\u2119"),se(ae,he,we,"P","\u2119"),se(ie,he,we,"Q","\u211a"),se(ae,he,we,"Q","\u211a"),se(ie,he,we,"R","\u211d"),se(ae,he,we,"R","\u211d"),se(ie,he,we,"Z","\u2124"),se(ae,he,we,"Z","\u2124"),se(ie,le,de,"h","\u210e"),se(ae,le,de,"h","\u210e");let ze="";for(let e=0;e<Me.length;e++){const t=Me.charAt(e);ze=String.fromCharCode(55349,56320+e),se(ie,le,de,t,ze),se(ae,le,we,t,ze),ze=String.fromCharCode(55349,56372+e),se(ie,le,de,t,ze),se(ae,le,we,t,ze),ze=String.fromCharCode(55349,56424+e),se(ie,le,de,t,ze),se(ae,le,we,t,ze),ze=String.fromCharCode(55349,56580+e),se(ie,le,de,t,ze),se(ae,le,we,t,ze),ze=String.fromCharCode(55349,56684+e),se(ie,le,de,t,ze),se(ae,le,we,t,ze),ze=String.fromCharCode(55349,56736+e),se(ie,le,de,t,ze),se(ae,le,we,t,ze),ze=String.fromCharCode(55349,56788+e),se(ie,le,de,t,ze),se(ae,le,we,t,ze),ze=String.fromCharCode(55349,56840+e),se(ie,le,de,t,ze),se(ae,le,we,t,ze),ze=String.fromCharCode(55349,56944+e),se(ie,le,de,t,ze),se(ae,le,we,t,ze),e<26&&(ze=String.fromCharCode(55349,56632+e),se(ie,le,de,t,ze),se(ae,le,we,t,ze),ze=String.fromCharCode(55349,56476+e),se(ie,le,de,t,ze),se(ae,le,we,t,ze))}ze=String.fromCharCode(55349,56668),se(ie,le,de,"k",ze),se(ae,le,we,"k",ze);for(let e=0;e<10;e++){const t=e.toString();ze=String.fromCharCode(55349,57294+e),se(ie,le,de,t,ze),se(ae,le,we,t,ze),ze=String.fromCharCode(55349,57314+e),se(ie,le,de,t,ze),se(ae,le,we,t,ze),ze=String.fromCharCode(55349,57324+e),se(ie,le,de,t,ze),se(ae,le,we,t,ze),ze=String.fromCharCode(55349,57334+e),se(ie,le,de,t,ze),se(ae,le,we,t,ze)}const Ae="\xd0\xde\xfe";for(let e=0;e<Ae.length;e++){const t=Ae.charAt(e);se(ie,le,de,t,t),se(ae,le,we,t,t)}const Te=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],Be=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Ce=function(e,t,r){return oe[r][e]&&oe[r][e].replace&&(e=oe[r][e].replace),{value:e,metrics:N(e,t,r)}},Ne=function(e,t,r,n,o){const s=Ce(e,t,r),i=s.metrics;let a;if(e=s.value,i){let t=i.italic;("text"===r||n&&"mathit"===n.font)&&(t=0),a=new Z(e,i.height,i.depth,t,i.skew,i.width,o)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+r+"'"),a=new Z(e,0,0,0,0,0,o);if(n){a.maxFontSize=n.sizeMultiplier,n.style.isTight()&&a.classes.push("mtight");const e=n.getColor();e&&(a.style.color=e)}return a},qe=(e,t)=>{if(G(e.classes)!==G(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){const t=e.classes[0];if("mbin"===t||"mord"===t)return!1}for(const r in e.style)if(e.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;for(const r in t.style)if(t.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;return!0},Ie=function(e){let t=0,r=0,n=0;for(let o=0;o<e.children.length;o++){const s=e.children[o];s.height>t&&(t=s.height),s.depth>r&&(r=s.depth),s.maxFontSize>n&&(n=s.maxFontSize)}e.height=t,e.depth=r,e.maxFontSize=n},Re=function(e,t,r,n){const o=new W(e,t,r,n);return Ie(o),o},He=(e,t,r,n)=>new W(e,t,r,n),Oe=function(e){const t=new A(e);return Ie(t),t},Ee=function(e,t,r){let n,o="";switch(e){case"amsrm":o="AMS";break;case"textrm":o="Main";break;case"textsf":o="SansSerif";break;case"texttt":o="Typewriter";break;default:o=e}return n="textbf"===t&&"textit"===r?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular",o+"-"+n},Le={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},De={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]};var Ve={fontMap:Le,makeSymbol:Ne,mathsym:function(e,t,r,n){return void 0===n&&(n=[]),"boldsymbol"===r.font&&Ce(e,"Main-Bold",t).metrics?Ne(e,"Main-Bold",t,r,n.concat(["mathbf"])):"\\"===e||"main"===oe[t][e].font?Ne(e,"Main-Regular",t,r,n):Ne(e,"AMS-Regular",t,r,n.concat(["amsrm"]))},makeSpan:Re,makeSvgSpan:He,makeLineSpan:function(e,t,r){const n=Re([e],[],t);return n.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),n.style.borderBottomWidth=F(n.height),n.maxFontSize=1,n},makeAnchor:function(e,t,r,n){const o=new _(e,t,r,n);return Ie(o),o},makeFragment:Oe,wrapFragment:function(e,t){return e instanceof A?Re([],[e],t):e},makeVList:function(e,t){const{children:r,depth:n}=function(e){if("individualShift"===e.positionType){const t=e.children,r=[t[0]],n=-t[0].shift-t[0].elem.depth;let o=n;for(let e=1;e<t.length;e++){const n=-t[e].shift-o-t[e].elem.depth,s=n-(t[e-1].elem.height+t[e-1].elem.depth);o+=n,r.push({type:"kern",size:s}),r.push(t[e])}return{children:r,depth:n}}let t;if("top"===e.positionType){let r=e.positionData;for(let t=0;t<e.children.length;t++){const n=e.children[t];r-="kern"===n.type?n.size:n.elem.height+n.elem.depth}t=r}else if("bottom"===e.positionType)t=-e.positionData;else{const r=e.children[0];if("elem"!==r.type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)t=-r.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");t=-r.elem.depth}}return{children:e.children,depth:t}}(e);let o=0;for(let e=0;e<r.length;e++){const t=r[e];if("elem"===t.type){const e=t.elem;o=Math.max(o,e.maxFontSize,e.height)}}o+=2;const s=Re(["pstrut"],[]);s.style.height=F(o);const i=[];let a=n,l=n,h=n;for(let e=0;e<r.length;e++){const t=r[e];if("kern"===t.type)h+=t.size;else{const e=t.elem,r=t.wrapperClasses||[],n=t.wrapperStyle||{},a=Re(r,[s,e],void 0,n);a.style.top=F(-o-h-e.depth),t.marginLeft&&(a.style.marginLeft=t.marginLeft),t.marginRight&&(a.style.marginRight=t.marginRight),i.push(a),h+=e.height+e.depth}a=Math.min(a,h),l=Math.max(l,h)}const c=Re(["vlist"],i);let m;if(c.style.height=F(l),a<0){const e=Re([],[]),t=Re(["vlist"],[e]);t.style.height=F(-a);const r=Re(["vlist-s"],[new Z("\u200b")]);m=[Re(["vlist-r"],[c,r]),Re(["vlist-r"],[t])]}else m=[Re(["vlist-r"],[c])];const p=Re(["vlist-t"],m);return 2===m.length&&p.classes.push("vlist-t2"),p.height=l,p.depth=-a,p},makeOrd:function(e,t,r){const o=e.mode,s=e.text,i=["mord"],a="math"===o||"text"===o&&t.font,l=a?t.font:t.fontFamily;let h="",c="";if(55349===s.charCodeAt(0)&&([h,c]=function(e,t){const r=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,o="math"===t?0:1;if(119808<=r&&r<120484){const e=Math.floor((r-119808)/26);return[Te[e][2],Te[e][o]]}if(120782<=r&&r<=120831){const e=Math.floor((r-120782)/10);return[Be[e][2],Be[e][o]]}if(120485===r||120486===r)return[Te[0][2],Te[0][o]];if(120486<r&&r<120782)return["",""];throw new n("Unsupported character: "+e)}(s,o)),h.length>0)return Ne(s,h,o,t,i.concat(c));if(l){let e,n;if("boldsymbol"===l){const t=function(e,t,r,n,o){return"textord"!==o&&Ce(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(s,o,0,0,r);e=t.fontName,n=[t.fontClass]}else a?(e=Le[l].fontName,n=[l]):(e=Ee(l,t.fontWeight,t.fontShape),n=[l,t.fontWeight,t.fontShape]);if(Ce(s,e,o).metrics)return Ne(s,e,o,t,i.concat(n));if(ve.hasOwnProperty(s)&&"Typewriter"===e.slice(0,10)){const r=[];for(let a=0;a<s.length;a++)r.push(Ne(s[a],e,o,t,i.concat(n)));return Oe(r)}}if("mathord"===r)return Ne(s,"Math-Italic",o,t,i.concat(["mathnormal"]));if("textord"===r){const e=oe[o][s]&&oe[o][s].font;if("ams"===e){const e=Ee("amsrm",t.fontWeight,t.fontShape);return Ne(s,e,o,t,i.concat("amsrm",t.fontWeight,t.fontShape))}if("main"!==e&&e){const r=Ee(e,t.fontWeight,t.fontShape);return Ne(s,r,o,t,i.concat(r,t.fontWeight,t.fontShape))}{const e=Ee("textrm",t.fontWeight,t.fontShape);return Ne(s,e,o,t,i.concat(t.fontWeight,t.fontShape))}}throw new Error("unexpected type: "+r+" in makeOrd")},makeGlue:(e,t)=>{const r=Re(["mspace"],[],t),n=P(e,t);return r.style.marginRight=F(n),r},staticSvg:function(e,t){const[r,n,o]=De[e],s=new J(r),i=new K([s],{width:F(n),height:F(o),style:"width:"+F(n),viewBox:"0 0 "+1e3*n+" "+1e3*o,preserveAspectRatio:"xMinYMin"}),a=He(["overlay"],[i],t);return a.height=o,a.style.height=F(o),a.style.width=F(n),a},svgData:De,tryCombineChars:e=>{for(let t=0;t<e.length-1;t++){const r=e[t],n=e[t+1];r instanceof Z&&n instanceof Z&&qe(r,n)&&(r.text+=n.text,r.height=Math.max(r.height,n.height),r.depth=Math.max(r.depth,n.depth),r.italic=n.italic,e.splice(t+1,1),t--)}return e}};const Pe={number:3,unit:"mu"},Fe={number:4,unit:"mu"},Ge={number:5,unit:"mu"},Ue={mord:{mop:Pe,mbin:Fe,mrel:Ge,minner:Pe},mop:{mord:Pe,mop:Pe,mrel:Ge,minner:Pe},mbin:{mord:Fe,mop:Fe,mopen:Fe,minner:Fe},mrel:{mord:Ge,mop:Ge,mopen:Ge,minner:Ge},mopen:{},mclose:{mop:Pe,mbin:Fe,mrel:Ge,minner:Pe},mpunct:{mord:Pe,mop:Pe,mrel:Ge,mopen:Pe,mclose:Pe,mpunct:Pe,minner:Pe},minner:{mord:Pe,mop:Pe,mbin:Fe,mrel:Ge,mopen:Pe,mpunct:Pe,minner:Pe}},Ye={mord:{mop:Pe},mop:{mord:Pe,mop:Pe},mbin:{},mrel:{},mopen:{},mclose:{mop:Pe},mpunct:{},minner:{mop:Pe}},Xe={},We={},_e={};function je(e){let{type:t,names:r,props:n,handler:o,htmlBuilder:s,mathmlBuilder:i}=e;const a={type:t,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:void 0===n.allowedInMath||n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:o};for(let e=0;e<r.length;++e)Xe[r[e]]=a;t&&(s&&(We[t]=s),i&&(_e[t]=i))}function $e(e){let{type:t,htmlBuilder:r,mathmlBuilder:n}=e;je({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:r,mathmlBuilder:n})}const Ze=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},Ke=function(e){return"ordgroup"===e.type?e.body:[e]},Je=Ve.makeSpan,Qe=["leftmost","mbin","mopen","mrel","mop","mpunct"],et=["rightmost","mrel","mclose","mpunct"],tt={display:w.DISPLAY,text:w.TEXT,script:w.SCRIPT,scriptscript:w.SCRIPTSCRIPT},rt={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},nt=function(e,t,r,n){void 0===n&&(n=[null,null]);const o=[];for(let r=0;r<e.length;r++){const n=ht(e[r],t);if(n instanceof A){const e=n.children;o.push(...e)}else o.push(n)}if(Ve.tryCombineChars(o),!r)return o;let s=t;if(1===e.length){const r=e[0];"sizing"===r.type?s=t.havingSize(r.size):"styling"===r.type&&(s=t.havingStyle(tt[r.style]))}const i=Je([n[0]||"leftmost"],[],t),a=Je([n[1]||"rightmost"],[],t),h="root"===r;return ot(o,((e,t)=>{const r=t.classes[0],n=e.classes[0];"mbin"===r&&l.contains(et,n)?t.classes[0]="mord":"mbin"===n&&l.contains(Qe,r)&&(e.classes[0]="mord")}),{node:i},a,h),ot(o,((e,t)=>{const r=at(t),n=at(e),o=r&&n?e.hasClass("mtight")?Ye[r][n]:Ue[r][n]:null;if(o)return Ve.makeGlue(o,s)}),{node:i},a,h),o},ot=function(e,t,r,n,o){n&&e.push(n);let s=0;for(;s<e.length;s++){const n=e[s],i=st(n);if(i){ot(i.children,t,r,null,o);continue}const a=!n.hasClass("mspace");if(a){const o=t(n,r.node);o&&(r.insertAfter?r.insertAfter(o):(e.unshift(o),s++))}a?r.node=n:o&&n.hasClass("newline")&&(r.node=Je(["leftmost"])),r.insertAfter=(t=>r=>{e.splice(t+1,0,r),s++})(s)}n&&e.pop()},st=function(e){return e instanceof A||e instanceof _||e instanceof W&&e.hasClass("enclosing")?e:null},it=function(e,t){const r=st(e);if(r){const e=r.children;if(e.length){if("right"===t)return it(e[e.length-1],"right");if("left"===t)return it(e[0],"left")}}return e},at=function(e,t){return e?(t&&(e=it(e,t)),rt[e.classes[0]]||null):null},lt=function(e,t){const r=["nulldelimiter"].concat(e.baseSizingClasses());return Je(t.concat(r))},ht=function(e,t,r){if(!e)return Je();if(We[e.type]){let n=We[e.type](e,t);if(r&&t.size!==r.size){n=Je(t.sizingClasses(r),[n],t);const e=t.sizeMultiplier/r.sizeMultiplier;n.height*=e,n.depth*=e}return n}throw new n("Got group of unknown type: '"+e.type+"'")};function ct(e,t){const r=Je(["base"],e,t),n=Je(["strut"]);return n.style.height=F(r.height+r.depth),r.depth&&(n.style.verticalAlign=F(-r.depth)),r.children.unshift(n),r}function mt(e,t){let r=null;1===e.length&&"tag"===e[0].type&&(r=e[0].tag,e=e[0].body);const n=nt(e,t,"root");let o;2===n.length&&n[1].hasClass("tag")&&(o=n.pop());const s=[];let i,a=[];for(let e=0;e<n.length;e++)if(a.push(n[e]),n[e].hasClass("mbin")||n[e].hasClass("mrel")||n[e].hasClass("allowbreak")){let r=!1;for(;e<n.length-1&&n[e+1].hasClass("mspace")&&!n[e+1].hasClass("newline");)e++,a.push(n[e]),n[e].hasClass("nobreak")&&(r=!0);r||(s.push(ct(a,t)),a=[])}else n[e].hasClass("newline")&&(a.pop(),a.length>0&&(s.push(ct(a,t)),a=[]),s.push(n[e]));a.length>0&&s.push(ct(a,t)),r?(i=ct(nt(r,t,!0)),i.classes=["tag"],s.push(i)):o&&s.push(o);const l=Je(["katex-html"],s);if(l.setAttribute("aria-hidden","true"),i){const e=i.children[0];e.style.height=F(l.height+l.depth),l.depth&&(e.style.verticalAlign=F(-l.depth))}return l}function pt(e){return new A(e)}class ut{constructor(e,t,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=r||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){const e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=G(this.classes));for(let t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){let e="<"+this.type;for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=l.escape(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+l.escape(G(this.classes))+'"'),e+=">";for(let t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e+="</"+this.type+">",e}toText(){return this.children.map((e=>e.toText())).join("")}}class dt{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return l.escape(this.toText())}toText(){return this.text}}var gt={MathNode:ut,TextNode:dt,SpaceNode:class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?"\u200a":e>=.1666&&e<=.1667?"\u2009":e>=.2222&&e<=.2223?"\u2005":e>=.2777&&e<=.2778?"\u2005\u200a":e>=-.05556&&e<=-.05555?"\u200a\u2063":e>=-.1667&&e<=-.1666?"\u2009\u2063":e>=-.2223&&e<=-.2222?"\u205f\u2063":e>=-.2778&&e<=-.2777?"\u2005\u2063":null}toNode(){if(this.character)return document.createTextNode(this.character);{const e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",F(this.width)),e}}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+F(this.width)+'"/>'}toText(){return this.character?this.character:" "}},newDocumentFragment:pt};const ft=function(e,t,r){return!oe[t][e]||!oe[t][e].replace||55349===e.charCodeAt(0)||ve.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(e=oe[t][e].replace),new gt.TextNode(e)},bt=function(e){return 1===e.length?e[0]:new gt.MathNode("mrow",e)},yt=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";const r=t.font;if(!r||"mathnormal"===r)return null;const n=e.mode;if("mathit"===r)return"italic";if("boldsymbol"===r)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===r)return"bold";if("mathbb"===r)return"double-struck";if("mathfrak"===r)return"fraktur";if("mathscr"===r||"mathcal"===r)return"script";if("mathsf"===r)return"sans-serif";if("mathtt"===r)return"monospace";let o=e.text;if(l.contains(["\\imath","\\jmath"],o))return null;oe[n][o]&&oe[n][o].replace&&(o=oe[n][o].replace);return N(o,Ve.fontMap[r].fontName,n)?Ve.fontMap[r].variant:null},xt=function(e,t,r){if(1===e.length){const n=vt(e[0],t);return r&&n instanceof ut&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}const n=[];let o;for(let r=0;r<e.length;r++){const s=vt(e[r],t);if(s instanceof ut&&o instanceof ut){if("mtext"===s.type&&"mtext"===o.type&&s.getAttribute("mathvariant")===o.getAttribute("mathvariant")){o.children.push(...s.children);continue}if("mn"===s.type&&"mn"===o.type){o.children.push(...s.children);continue}if("mi"===s.type&&1===s.children.length&&"mn"===o.type){const e=s.children[0];if(e instanceof dt&&"."===e.text){o.children.push(...s.children);continue}}else if("mi"===o.type&&1===o.children.length){const e=o.children[0];if(e instanceof dt&&"\u0338"===e.text&&("mo"===s.type||"mi"===s.type||"mn"===s.type)){const e=s.children[0];e instanceof dt&&e.text.length>0&&(e.text=e.text.slice(0,1)+"\u0338"+e.text.slice(1),n.pop())}}}n.push(s),o=s}return n},wt=function(e,t,r){return bt(xt(e,t,r))},vt=function(e,t){if(!e)return new gt.MathNode("mrow");if(_e[e.type]){return _e[e.type](e,t)}throw new n("Got group of unknown type: '"+e.type+"'")};function kt(e,t,r,n,o){const s=xt(e,r);let i;i=1===s.length&&s[0]instanceof ut&&l.contains(["mrow","mtable"],s[0].type)?s[0]:new gt.MathNode("mrow",s);const a=new gt.MathNode("annotation",[new gt.TextNode(t)]);a.setAttribute("encoding","application/x-tex");const h=new gt.MathNode("semantics",[i,a]),c=new gt.MathNode("math",[h]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&c.setAttribute("display","block");const m=o?"katex":"katex-mathml";return Ve.makeSpan([m],[c])}const St=function(e){return new E({style:e.displayMode?w.DISPLAY:w.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Mt=function(e,t){if(t.displayMode){const r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),e=Ve.makeSpan(r,[e])}return e},zt=function(e,t,r){const n=St(r);let o;if("mathml"===r.output)return kt(e,t,n,r.displayMode,!0);if("html"===r.output){const t=mt(e,n);o=Ve.makeSpan(["katex"],[t])}else{const s=kt(e,t,n,r.displayMode,!1),i=mt(e,n);o=Ve.makeSpan(["katex"],[s,i])}return Mt(o,r)};const At={widehat:"^",widecheck:"\u02c7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23df",overbrace:"\u23de",overgroup:"\u23e0",undergroup:"\u23e1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21d2",xRightarrow:"\u21d2",overleftharpoon:"\u21bc",xleftharpoonup:"\u21bc",overrightharpoon:"\u21c0",xrightharpoonup:"\u21c0",xLeftarrow:"\u21d0",xLeftrightarrow:"\u21d4",xhookleftarrow:"\u21a9",xhookrightarrow:"\u21aa",xmapsto:"\u21a6",xrightharpoondown:"\u21c1",xleftharpoondown:"\u21bd",xrightleftharpoons:"\u21cc",xleftrightharpoons:"\u21cb",xtwoheadleftarrow:"\u219e",xtwoheadrightarrow:"\u21a0",xlongequal:"=",xtofrom:"\u21c4",xrightleftarrows:"\u21c4",xrightequilibrium:"\u21cc",xleftequilibrium:"\u21cb","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},Tt={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]};var Bt=function(e,t,r,n,o){let s;const i=e.height+e.depth+r+n;if(/fbox|color|angl/.test(t)){if(s=Ve.makeSpan(["stretchy",t],[],o),"fbox"===t){const e=o.color&&o.getColor();e&&(s.style.borderColor=e)}}else{const e=[];/^[bx]cancel$/.test(t)&&e.push(new Q({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&e.push(new Q({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));const r=new K(e,{width:"100%",height:F(i)});s=Ve.makeSvgSpan([],[r],o)}return s.height=i,s.style.height=F(i),s},Ct=function(e){const t=new gt.MathNode("mo",[new gt.TextNode(At[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Nt=function(e,t){const{span:r,minWidth:n,height:o}=function(){let r=4e5;const n=e.label.slice(1);if(l.contains(["widehat","widecheck","widetilde","utilde"],n)){const s="ordgroup"===(o=e.base).type?o.body.length:1;let i,a,l;if(s>5)"widehat"===n||"widecheck"===n?(i=420,r=2364,l=.42,a=n+"4"):(i=312,r=2340,l=.34,a="tilde4");else{const e=[1,1,2,2,3,3][s];"widehat"===n||"widecheck"===n?(r=[0,1062,2364,2364,2364][e],i=[0,239,300,360,420][e],l=[0,.24,.3,.3,.36,.42][e],a=n+e):(r=[0,600,1033,2339,2340][e],i=[0,260,286,306,312][e],l=[0,.26,.286,.3,.306,.34][e],a="tilde"+e)}const h=new J(a),c=new K([h],{width:"100%",height:F(l),viewBox:"0 0 "+r+" "+i,preserveAspectRatio:"none"});return{span:Ve.makeSvgSpan([],[c],t),minWidth:0,height:l}}{const e=[],o=Tt[n],[s,i,a]=o,l=a/1e3,h=s.length;let c,m;if(1===h){c=["hide-tail"],m=[o[3]]}else if(2===h)c=["halfarrow-left","halfarrow-right"],m=["xMinYMin","xMaxYMin"];else{if(3!==h)throw new Error("Correct katexImagesData or update code here to support\n "+h+" children.");c=["brace-left","brace-center","brace-right"],m=["xMinYMin","xMidYMin","xMaxYMin"]}for(let n=0;n<h;n++){const o=new J(s[n]),p=new K([o],{width:"400em",height:F(l),viewBox:"0 0 "+r+" "+a,preserveAspectRatio:m[n]+" slice"}),u=Ve.makeSvgSpan([c[n]],[p],t);if(1===h)return{span:u,minWidth:i,height:l};u.style.height=F(l),e.push(u)}return{span:Ve.makeSpan(["stretchy"],e,t),minWidth:i,height:l}}var o}();return r.height=o,r.style.height=F(o),n>0&&(r.style.minWidth=F(n)),r};function qt(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function It(e){const t=Rt(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Rt(e){return e&&("atom"===e.type||re.hasOwnProperty(e.type))?e:null}const Ht=(e,t)=>{let r,n,o;e&&"supsub"===e.type?(n=qt(e.base,"accent"),r=n.base,e.base=r,o=function(e){if(e instanceof W)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(ht(e,t)),e.base=n):(n=qt(e,"accent"),r=n.base);const s=ht(r,t.havingCrampedStyle());let i=0;if(n.isShifty&&l.isCharacterBox(r)){const e=l.getBaseElem(r);i=ee(ht(e,t.havingCrampedStyle())).skew}const a="\\c"===n.label;let h,c=a?s.height+s.depth:Math.min(s.height,t.fontMetrics().xHeight);if(n.isStretchy)h=Nt(n,t),h=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:h,wrapperClasses:["svg-align"],wrapperStyle:i>0?{width:"calc(100% - "+F(2*i)+")",marginLeft:F(2*i)}:void 0}]},t);else{let e,r;"\\vec"===n.label?(e=Ve.staticSvg("vec",t),r=Ve.svgData.vec[1]):(e=Ve.makeOrd({mode:n.mode,text:n.label},t,"textord"),e=ee(e),e.italic=0,r=e.width,a&&(c+=e.depth)),h=Ve.makeSpan(["accent-body"],[e]);const o="\\textcircled"===n.label;o&&(h.classes.push("accent-full"),c=s.height);let l=i;o||(l-=r/2),h.style.left=F(l),"\\textcircled"===n.label&&(h.style.top=".2em"),h=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-c},{type:"elem",elem:h}]},t)}const m=Ve.makeSpan(["mord","accent"],[h],t);return o?(o.children[0]=m,o.height=Math.max(m.height,o.height),o.classes[0]="mord",o):m},Ot=(e,t)=>{const r=e.isStretchy?Ct(e.label):new gt.MathNode("mo",[ft(e.label,e.mode)]),n=new gt.MathNode("mover",[vt(e.base,t),r]);return n.setAttribute("accent","true"),n},Et=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((e=>"\\"+e)).join("|"));je({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{const r=Ze(t[0]),n=!Et.test(e.funcName),o=!n||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:o,base:r}},htmlBuilder:Ht,mathmlBuilder:Ot}),je({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{const r=t[0];let n=e.parser.mode;return"math"===n&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:Ht,mathmlBuilder:Ot}),je({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{let{parser:r,funcName:n}=e;const o=t[0];return{type:"accentUnder",mode:r.mode,label:n,base:o}},htmlBuilder:(e,t)=>{const r=ht(e.base,t),n=Nt(e,t),o="\\utilde"===e.label?.12:0,s=Ve.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:o},{type:"elem",elem:r}]},t);return Ve.makeSpan(["mord","accentunder"],[s],t)},mathmlBuilder:(e,t)=>{const r=Ct(e.label),n=new gt.MathNode("munder",[vt(e.base,t),r]);return n.setAttribute("accentunder","true"),n}});const Lt=e=>{const t=new gt.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};je({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){let{parser:n,funcName:o}=e;return{type:"xArrow",mode:n.mode,label:o,body:t[0],below:r[0]}},htmlBuilder(e,t){const r=t.style;let n=t.havingStyle(r.sup());const o=Ve.wrapFragment(ht(e.body,n,t),t),s="\\x"===e.label.slice(0,2)?"x":"cd";let i;o.classes.push(s+"-arrow-pad"),e.below&&(n=t.havingStyle(r.sub()),i=Ve.wrapFragment(ht(e.below,n,t),t),i.classes.push(s+"-arrow-pad"));const a=Nt(e,t),l=-t.fontMetrics().axisHeight+.5*a.height;let h,c=-t.fontMetrics().axisHeight-.5*a.height-.111;if((o.depth>.25||"\\xleftequilibrium"===e.label)&&(c-=o.depth),i){const e=-t.fontMetrics().axisHeight+i.height+.5*a.height+.111;h=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:c},{type:"elem",elem:a,shift:l},{type:"elem",elem:i,shift:e}]},t)}else h=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:c},{type:"elem",elem:a,shift:l}]},t);return h.children[0].children[0].children[1].classes.push("svg-align"),Ve.makeSpan(["mrel","x-arrow"],[h],t)},mathmlBuilder(e,t){const r=Ct(e.label);let n;if(r.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){const o=Lt(vt(e.body,t));if(e.below){const s=Lt(vt(e.below,t));n=new gt.MathNode("munderover",[r,s,o])}else n=new gt.MathNode("mover",[r,o])}else if(e.below){const o=Lt(vt(e.below,t));n=new gt.MathNode("munder",[r,o])}else n=Lt(),n=new gt.MathNode("mover",[r,n]);return n}});const Dt=Ve.makeSpan;function Vt(e,t){const r=nt(e.body,t,!0);return Dt([e.mclass],r,t)}function Pt(e,t){let r;const n=xt(e.body,t);return"minner"===e.mclass?r=new gt.MathNode("mpadded",n):"mord"===e.mclass?e.isCharacterBox?(r=n[0],r.type="mi"):r=new gt.MathNode("mi",n):(e.isCharacterBox?(r=n[0],r.type="mo"):r=new gt.MathNode("mo",n),"mbin"===e.mclass?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):"mpunct"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===e.mclass&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}je({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){let{parser:r,funcName:n}=e;const o=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:Ke(o),isCharacterBox:l.isCharacterBox(o)}},htmlBuilder:Vt,mathmlBuilder:Pt});const Ft=e=>{const t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};je({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){let{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:Ft(t[0]),body:Ke(t[1]),isCharacterBox:l.isCharacterBox(t[1])}}}),je({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){let{parser:r,funcName:n}=e;const o=t[1],s=t[0];let i;i="\\stackrel"!==n?Ft(o):"mrel";const a={type:"op",mode:o.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==n,body:Ke(o)},h={type:"supsub",mode:s.mode,base:a,sup:"\\underset"===n?null:s,sub:"\\underset"===n?s:null};return{type:"mclass",mode:r.mode,mclass:i,body:[h],isCharacterBox:l.isCharacterBox(h)}},htmlBuilder:Vt,mathmlBuilder:Pt}),je({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){let{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:Ft(t[0]),body:Ke(t[0])}},htmlBuilder(e,t){const r=nt(e.body,t,!0),n=Ve.makeSpan([e.mclass],r,t);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(e,t){const r=xt(e.body,t),n=new gt.MathNode("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});const Gt={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Ut=e=>"textord"===e.type&&"@"===e.text;function Yt(e,t,r){const n=Gt[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{const e={type:"atom",text:n,mode:"math",family:"rel"},o={type:"ordgroup",mode:"math",body:[r.callFunction("\\\\cdleft",[t[0]],[]),r.callFunction("\\Big",[e],[]),r.callFunction("\\\\cdright",[t[1]],[])]};return r.callFunction("\\\\cdparent",[o],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{const e={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[e],[])}default:return{type:"textord",text:" ",mode:"math"}}}je({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){let{parser:r,funcName:n}=e;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:t[0]}},htmlBuilder(e,t){const r=t.havingStyle(t.style.sup()),n=Ve.wrapFragment(ht(e.label,r,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=F(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(e,t){let r=new gt.MathNode("mrow",[vt(e.label,t)]);return r=new gt.MathNode("mpadded",[r]),r.setAttribute("width","0"),"left"===e.side&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new gt.MathNode("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),je({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){let{parser:r}=e;return{type:"cdlabelparent",mode:r.mode,fragment:t[0]}},htmlBuilder(e,t){const r=Ve.wrapFragment(ht(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(e,t){return new gt.MathNode("mrow",[vt(e.fragment,t)])}}),je({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){let{parser:r}=e;const o=qt(t[0],"ordgroup").body;let s="";for(let e=0;e<o.length;e++){s+=qt(o[e],"textord").text}let i,a=parseInt(s);if(isNaN(a))throw new n("\\@char has non-numeric argument "+s);if(a<0||a>=1114111)throw new n("\\@char with invalid code point "+s);return a<=65535?i=String.fromCharCode(a):(a-=65536,i=String.fromCharCode(55296+(a>>10),56320+(1023&a))),{type:"textord",mode:r.mode,text:i}}});const Xt=(e,t)=>{const r=nt(e.body,t.withColor(e.color),!1);return Ve.makeFragment(r)},Wt=(e,t)=>{const r=xt(e.body,t.withColor(e.color)),n=new gt.MathNode("mstyle",r);return n.setAttribute("mathcolor",e.color),n};je({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){let{parser:r}=e;const n=qt(t[0],"color-token").color,o=t[1];return{type:"color",mode:r.mode,color:n,body:Ke(o)}},htmlBuilder:Xt,mathmlBuilder:Wt}),je({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){let{parser:r,breakOnTokenText:n}=e;const o=qt(t[0],"color-token").color;r.gullet.macros.set("\\current@color",o);const s=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:o,body:s}},htmlBuilder:Xt,mathmlBuilder:Wt}),je({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){let{parser:n}=e;const o="["===n.gullet.future().text?n.parseSizeGroup(!0):null,s=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:s,size:o&&qt(o,"size").value}},htmlBuilder(e,t){const r=Ve.makeSpan(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=F(P(e.size,t)))),r},mathmlBuilder(e,t){const r=new gt.MathNode("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",F(P(e.size,t)))),r}});const _t={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},jt=e=>{const t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new n("Expected a control sequence",e);return t},$t=(e,t,r,n)=>{let o=e.gullet.macros.get(r.text);null==o&&(r.noexpand=!0,o={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,o,n)};je({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){let{parser:t,funcName:r}=e;t.consumeSpaces();const o=t.fetch();if(_t[o.text])return"\\global"!==r&&"\\\\globallong"!==r||(o.text=_t[o.text]),qt(t.parseFunction(),"internal");throw new n("Invalid token after macro prefix",o)}}),je({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){let{parser:t,funcName:r}=e,o=t.gullet.popToken();const s=o.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(s))throw new n("Expected a control sequence",o);let i,a=0;const l=[[]];for(;"{"!==t.gullet.future().text;)if(o=t.gullet.popToken(),"#"===o.text){if("{"===t.gullet.future().text){i=t.gullet.future(),l[a].push("{");break}if(o=t.gullet.popToken(),!/^[1-9]$/.test(o.text))throw new n('Invalid argument number "'+o.text+'"');if(parseInt(o.text)!==a+1)throw new n('Argument number "'+o.text+'" out of order');a++,l.push([])}else{if("EOF"===o.text)throw new n("Expected a macro definition");l[a].push(o.text)}let{tokens:h}=t.gullet.consumeArg();return i&&h.unshift(i),"\\edef"!==r&&"\\xdef"!==r||(h=t.gullet.expandTokens(h),h.reverse()),t.gullet.macros.set(s,{tokens:h,numArgs:a,delimiters:l},r===_t[r]),{type:"internal",mode:t.mode}}}),je({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){let{parser:t,funcName:r}=e;const n=jt(t.gullet.popToken());t.gullet.consumeSpaces();const o=(e=>{let t=e.gullet.popToken();return"="===t.text&&(t=e.gullet.popToken()," "===t.text&&(t=e.gullet.popToken())),t})(t);return $t(t,n,o,"\\\\globallet"===r),{type:"internal",mode:t.mode}}}),je({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){let{parser:t,funcName:r}=e;const n=jt(t.gullet.popToken()),o=t.gullet.popToken(),s=t.gullet.popToken();return $t(t,n,s,"\\\\globalfuture"===r),t.gullet.pushToken(s),t.gullet.pushToken(o),{type:"internal",mode:t.mode}}});const Zt=function(e,t,r){const n=N(oe.math[e]&&oe.math[e].replace||e,t,r);if(!n)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return n},Kt=function(e,t,r,n){const o=r.havingBaseStyle(t),s=Ve.makeSpan(n.concat(o.sizingClasses(r)),[e],r),i=o.sizeMultiplier/r.sizeMultiplier;return s.height*=i,s.depth*=i,s.maxFontSize=o.sizeMultiplier,s},Jt=function(e,t,r){const n=t.havingBaseStyle(r),o=(1-t.sizeMultiplier/n.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=F(o),e.height-=o,e.depth+=o},Qt=function(e,t,r,n,o,s){const i=function(e,t,r,n){return Ve.makeSymbol(e,"Size"+t+"-Regular",r,n)}(e,t,o,n),a=Kt(Ve.makeSpan(["delimsizing","size"+t],[i],n),w.TEXT,n,s);return r&&Jt(a,n,w.TEXT),a},er=function(e,t,r){let n;n="Size1-Regular"===t?"delim-size1":"delim-size4";return{type:"elem",elem:Ve.makeSpan(["delimsizinginner",n],[Ve.makeSpan([],[Ve.makeSymbol(e,t,r)])])}},tr=function(e,t,r){const n=T["Size4-Regular"][e.charCodeAt(0)]?T["Size4-Regular"][e.charCodeAt(0)][4]:T["Size1-Regular"][e.charCodeAt(0)][4],o=new J("inner",function(e,t){switch(e){case"\u239c":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"\u2223":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"\u2225":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"\u239f":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"\u23a2":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"\u23a5":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"\u23aa":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"\u23d0":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"\u2016":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),s=new K([o],{width:F(n),height:F(t),style:"width:"+F(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),i=Ve.makeSvgSpan([],[s],r);return i.height=t,i.style.height=F(t),i.style.width=F(n),{type:"elem",elem:i}},rr={type:"kern",size:-.008},nr=["|","\\lvert","\\rvert","\\vert"],or=["\\|","\\lVert","\\rVert","\\Vert"],sr=function(e,t,r,n,o,s){let i,a,h,c,m="",p=0;i=h=c=e,a=null;let u="Size1-Regular";"\\uparrow"===e?h=c="\u23d0":"\\Uparrow"===e?h=c="\u2016":"\\downarrow"===e?i=h="\u23d0":"\\Downarrow"===e?i=h="\u2016":"\\updownarrow"===e?(i="\\uparrow",h="\u23d0",c="\\downarrow"):"\\Updownarrow"===e?(i="\\Uparrow",h="\u2016",c="\\Downarrow"):l.contains(nr,e)?(h="\u2223",m="vert",p=333):l.contains(or,e)?(h="\u2225",m="doublevert",p=556):"["===e||"\\lbrack"===e?(i="\u23a1",h="\u23a2",c="\u23a3",u="Size4-Regular",m="lbrack",p=667):"]"===e||"\\rbrack"===e?(i="\u23a4",h="\u23a5",c="\u23a6",u="Size4-Regular",m="rbrack",p=667):"\\lfloor"===e||"\u230a"===e?(h=i="\u23a2",c="\u23a3",u="Size4-Regular",m="lfloor",p=667):"\\lceil"===e||"\u2308"===e?(i="\u23a1",h=c="\u23a2",u="Size4-Regular",m="lceil",p=667):"\\rfloor"===e||"\u230b"===e?(h=i="\u23a5",c="\u23a6",u="Size4-Regular",m="rfloor",p=667):"\\rceil"===e||"\u2309"===e?(i="\u23a4",h=c="\u23a5",u="Size4-Regular",m="rceil",p=667):"("===e||"\\lparen"===e?(i="\u239b",h="\u239c",c="\u239d",u="Size4-Regular",m="lparen",p=875):")"===e||"\\rparen"===e?(i="\u239e",h="\u239f",c="\u23a0",u="Size4-Regular",m="rparen",p=875):"\\{"===e||"\\lbrace"===e?(i="\u23a7",a="\u23a8",c="\u23a9",h="\u23aa",u="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(i="\u23ab",a="\u23ac",c="\u23ad",h="\u23aa",u="Size4-Regular"):"\\lgroup"===e||"\u27ee"===e?(i="\u23a7",c="\u23a9",h="\u23aa",u="Size4-Regular"):"\\rgroup"===e||"\u27ef"===e?(i="\u23ab",c="\u23ad",h="\u23aa",u="Size4-Regular"):"\\lmoustache"===e||"\u23b0"===e?(i="\u23a7",c="\u23ad",h="\u23aa",u="Size4-Regular"):"\\rmoustache"!==e&&"\u23b1"!==e||(i="\u23ab",c="\u23a9",h="\u23aa",u="Size4-Regular");const d=Zt(i,u,o),g=d.height+d.depth,f=Zt(h,u,o),b=f.height+f.depth,y=Zt(c,u,o),x=y.height+y.depth;let v=0,k=1;if(null!==a){const e=Zt(a,u,o);v=e.height+e.depth,k=2}const S=g+x+v,M=S+Math.max(0,Math.ceil((t-S)/(k*b)))*k*b;let z=n.fontMetrics().axisHeight;r&&(z*=n.sizeMultiplier);const A=M/2-z,T=[];if(m.length>0){const e=M-g-x,t=Math.round(1e3*M),r=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(m,Math.round(1e3*e)),o=new J(m,r),s=(p/1e3).toFixed(3)+"em",i=(t/1e3).toFixed(3)+"em",a=new K([o],{width:s,height:i,viewBox:"0 0 "+p+" "+t}),l=Ve.makeSvgSpan([],[a],n);l.height=t/1e3,l.style.width=s,l.style.height=i,T.push({type:"elem",elem:l})}else{if(T.push(er(c,u,o)),T.push(rr),null===a){const e=M-g-x+.016;T.push(tr(h,e,n))}else{const e=(M-g-x-v)/2+.016;T.push(tr(h,e,n)),T.push(rr),T.push(er(a,u,o)),T.push(rr),T.push(tr(h,e,n))}T.push(rr),T.push(er(i,u,o))}const B=n.havingBaseStyle(w.TEXT),C=Ve.makeVList({positionType:"bottom",positionData:A,children:T},B);return Kt(Ve.makeSpan(["delimsizing","mult"],[C],B),w.TEXT,n,s)},ir=.08,ar=function(e,t,r,n,o){const s=function(e,t,r){t*=1e3;let n="";switch(e){case"sqrtMain":n=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,M);break;case"sqrtSize1":n=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,M);break;case"sqrtSize2":n=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,M);break;case"sqrtSize3":n=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,M);break;case"sqrtSize4":n=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,M);break;case"sqrtTall":n=function(e,t,r){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(r-54-t-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t,M,r)}return n}(e,n,r),i=new J(e,s),a=new K([i],{width:"400em",height:F(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Ve.makeSvgSpan(["hide-tail"],[a],o)},lr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","\\surd"],hr=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1"],cr=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],mr=[0,1.2,1.8,2.4,3],pr=[{type:"small",style:w.SCRIPTSCRIPT},{type:"small",style:w.SCRIPT},{type:"small",style:w.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],ur=[{type:"small",style:w.SCRIPTSCRIPT},{type:"small",style:w.SCRIPT},{type:"small",style:w.TEXT},{type:"stack"}],dr=[{type:"small",style:w.SCRIPTSCRIPT},{type:"small",style:w.SCRIPT},{type:"small",style:w.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],gr=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},fr=function(e,t,r,n){for(let o=Math.min(2,3-n.style.size);o<r.length&&"stack"!==r[o].type;o++){const s=Zt(e,gr(r[o]),"math");let i=s.height+s.depth;if("small"===r[o].type){i*=n.havingBaseStyle(r[o].style).sizeMultiplier}if(i>t)return r[o]}return r[r.length-1]},br=function(e,t,r,n,o,s){let i;"<"===e||"\\lt"===e||"\u27e8"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"\u27e9"!==e||(e="\\rangle"),i=l.contains(cr,e)?pr:l.contains(lr,e)?dr:ur;const a=fr(e,t,i,n);return"small"===a.type?function(e,t,r,n,o,s){const i=Ve.makeSymbol(e,"Main-Regular",o,n),a=Kt(i,t,n,s);return r&&Jt(a,n,t),a}(e,a.style,r,n,o,s):"large"===a.type?Qt(e,a.size,r,n,o,s):sr(e,t,r,n,o,s)};var yr={sqrtImage:function(e,t){const r=t.havingBaseSizing(),n=fr("\\surd",e*r.sizeMultiplier,dr,r);let o=r.sizeMultiplier;const s=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness);let i,a,l=0,h=0,c=0;return"small"===n.type?(c=1e3+1e3*s+80,e<1?o=1:e<1.4&&(o=.7),l=(1+s+ir)/o,h=(1+s)/o,i=ar("sqrtMain",l,c,s,t),i.style.minWidth="0.853em",a=.833/o):"large"===n.type?(c=1080*mr[n.size],h=(mr[n.size]+s)/o,l=(mr[n.size]+s+ir)/o,i=ar("sqrtSize"+n.size,l,c,s,t),i.style.minWidth="1.02em",a=1/o):(l=e+s+ir,h=e+s,c=Math.floor(1e3*e+s)+80,i=ar("sqrtTall",l,c,s,t),i.style.minWidth="0.742em",a=1.056),i.height=h,i.style.height=F(l),{span:i,advanceWidth:a,ruleWidth:(t.fontMetrics().sqrtRuleThickness+s)*o}},sizedDelim:function(e,t,r,o,s){if("<"===e||"\\lt"===e||"\u27e8"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"\u27e9"!==e||(e="\\rangle"),l.contains(lr,e)||l.contains(cr,e))return Qt(e,t,!1,r,o,s);if(l.contains(hr,e))return sr(e,mr[t],!1,r,o,s);throw new n("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:mr,customSizedDelim:br,leftRightDelim:function(e,t,r,n,o,s){const i=n.fontMetrics().axisHeight*n.sizeMultiplier,a=5/n.fontMetrics().ptPerEm,l=Math.max(t-i,r+i),h=Math.max(l/500*901,2*l-a);return br(e,h,!0,n,o,s)}};const xr={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},wr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27e8","\\rangle","\u27e9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function vr(e,t){const r=Rt(e);if(r&&l.contains(wr,r.text))return r;throw new n(r?"Invalid delimiter '"+r.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function kr(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}je({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{const r=vr(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:xr[e.funcName].size,mclass:xr[e.funcName].mclass,delim:r.text}},htmlBuilder:(e,t)=>"."===e.delim?Ve.makeSpan([e.mclass]):yr.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{const t=[];"."!==e.delim&&t.push(ft(e.delim,e.mode));const r=new gt.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");const n=F(yr.sizeToMaxHeight[e.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}}),je({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{const r=e.parser.gullet.macros.get("\\current@color");if(r&&"string"!=typeof r)throw new n("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:vr(t[0],e).text,color:r}}}),je({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{const r=vr(t[0],e),n=e.parser;++n.leftrightDepth;const o=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);const s=qt(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:o,left:r.text,right:s.delim,rightColor:s.color}},htmlBuilder:(e,t)=>{kr(e);const r=nt(e.body,t,!0,["mopen","mclose"]);let n,o,s=0,i=0,a=!1;for(let e=0;e<r.length;e++)r[e].isMiddle?a=!0:(s=Math.max(r[e].height,s),i=Math.max(r[e].depth,i));if(s*=t.sizeMultiplier,i*=t.sizeMultiplier,n="."===e.left?lt(t,["mopen"]):yr.leftRightDelim(e.left,s,i,t,e.mode,["mopen"]),r.unshift(n),a)for(let t=1;t<r.length;t++){const n=r[t].isMiddle;n&&(r[t]=yr.leftRightDelim(n.delim,s,i,n.options,e.mode,[]))}if("."===e.right)o=lt(t,["mclose"]);else{const r=e.rightColor?t.withColor(e.rightColor):t;o=yr.leftRightDelim(e.right,s,i,r,e.mode,["mclose"])}return r.push(o),Ve.makeSpan(["minner"],r,t)},mathmlBuilder:(e,t)=>{kr(e);const r=xt(e.body,t);if("."!==e.left){const t=new gt.MathNode("mo",[ft(e.left,e.mode)]);t.setAttribute("fence","true"),r.unshift(t)}if("."!==e.right){const t=new gt.MathNode("mo",[ft(e.right,e.mode)]);t.setAttribute("fence","true"),e.rightColor&&t.setAttribute("mathcolor",e.rightColor),r.push(t)}return bt(r)}}),je({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{const r=vr(t[0],e);if(!e.parser.leftrightDepth)throw new n("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:(e,t)=>{let r;if("."===e.delim)r=lt(t,[]);else{r=yr.sizedDelim(e.delim,1,t,e.mode,[]);const n={delim:e.delim,options:t};r.isMiddle=n}return r},mathmlBuilder:(e,t)=>{const r="\\vert"===e.delim||"|"===e.delim?ft("|","text"):ft(e.delim,e.mode),n=new gt.MathNode("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});const Sr=(e,t)=>{const r=Ve.wrapFragment(ht(e.body,t),t),n=e.label.slice(1);let o,s=t.sizeMultiplier,i=0;const a=l.isCharacterBox(e.body);if("sout"===n)o=Ve.makeSpan(["stretchy","sout"]),o.height=t.fontMetrics().defaultRuleThickness/s,i=-.5*t.fontMetrics().xHeight;else if("phase"===n){const e=P({number:.6,unit:"pt"},t),n=P({number:.35,unit:"ex"},t);s/=t.havingBaseSizing().sizeMultiplier;const a=r.height+r.depth+e+n;r.style.paddingLeft=F(a/2+e);const l=Math.floor(1e3*a*s),c="M400000 "+(h=l)+" H0 L"+h/2+" 0 l65 45 L145 "+(h-80)+" H400000z",m=new K([new J("phase",c)],{width:"400em",height:F(l/1e3),viewBox:"0 0 400000 "+l,preserveAspectRatio:"xMinYMin slice"});o=Ve.makeSvgSpan(["hide-tail"],[m],t),o.style.height=F(a),i=r.depth+e+n}else{/cancel/.test(n)?a||r.classes.push("cancel-pad"):"angl"===n?r.classes.push("anglpad"):r.classes.push("boxpad");let s=0,l=0,h=0;/box/.test(n)?(h=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),s=t.fontMetrics().fboxsep+("colorbox"===n?0:h),l=s):"angl"===n?(h=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),s=4*h,l=Math.max(0,.25-r.depth)):(s=a?.2:0,l=s),o=Bt(r,n,s,l,t),/fbox|boxed|fcolorbox/.test(n)?(o.style.borderStyle="solid",o.style.borderWidth=F(h)):"angl"===n&&.049!==h&&(o.style.borderTopWidth=F(h),o.style.borderRightWidth=F(h)),i=r.depth+l,e.backgroundColor&&(o.style.backgroundColor=e.backgroundColor,e.borderColor&&(o.style.borderColor=e.borderColor))}var h;let c;if(e.backgroundColor)c=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:i},{type:"elem",elem:r,shift:0}]},t);else{const e=/cancel|phase/.test(n)?["svg-align"]:[];c=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:o,shift:i,wrapperClasses:e}]},t)}return/cancel/.test(n)&&(c.height=r.height,c.depth=r.depth),/cancel/.test(n)&&!a?Ve.makeSpan(["mord","cancel-lap"],[c],t):Ve.makeSpan(["mord"],[c],t)},Mr=(e,t)=>{let r=0;const n=new gt.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[vt(e.body,t)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),"\\fcolorbox"===e.label){const r=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);n.setAttribute("style","border: "+r+"em solid "+String(e.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};je({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){let{parser:n,funcName:o}=e;const s=qt(t[0],"color-token").color,i=t[1];return{type:"enclose",mode:n.mode,label:o,backgroundColor:s,body:i}},htmlBuilder:Sr,mathmlBuilder:Mr}),je({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){let{parser:n,funcName:o}=e;const s=qt(t[0],"color-token").color,i=qt(t[1],"color-token").color,a=t[2];return{type:"enclose",mode:n.mode,label:o,backgroundColor:i,borderColor:s,body:a}},htmlBuilder:Sr,mathmlBuilder:Mr}),je({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){let{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\fbox",body:t[0]}}}),je({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){let{parser:r,funcName:n}=e;const o=t[0];return{type:"enclose",mode:r.mode,label:n,body:o}},htmlBuilder:Sr,mathmlBuilder:Mr}),je({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){let{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\angl",body:t[0]}}});const zr={};function Ar(e){let{type:t,names:r,props:n,handler:o,htmlBuilder:s,mathmlBuilder:i}=e;const a={type:t,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:o};for(let e=0;e<r.length;++e)zr[r[e]]=a;s&&(We[t]=s),i&&(_e[t]=i)}const Tr={};function Br(e,t){Tr[e]=t}class Cr{constructor(e,t,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=r}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new Cr(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class Nr{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new Nr(t,Cr.range(this,e))}}function qr(e){const t=[];e.consumeSpaces();let r=e.fetch().text;for("\\relax"===r&&(e.consume(),e.consumeSpaces(),r=e.fetch().text);"\\hline"===r||"\\hdashline"===r;)e.consume(),t.push("\\hdashline"===r),e.consumeSpaces(),r=e.fetch().text;return t}const Ir=e=>{if(!e.parser.settings.displayMode)throw new n("{"+e.envName+"} can be used only in display mode.")};function Rr(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function Hr(e,t,r){let{hskipBeforeAndAfter:o,addJot:s,cols:i,arraystretch:a,colSeparationType:l,autoTag:h,singleRow:c,emptySingleRow:m,maxNumCols:p,leqno:u}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!a){const t=e.gullet.expandMacroAsText("\\arraystretch");if(null==t)a=1;else if(a=parseFloat(t),!a||a<0)throw new n("Invalid \\arraystretch: "+t)}e.gullet.beginGroup();let d=[];const g=[d],f=[],b=[],y=null!=h?[]:void 0;function x(){h&&e.gullet.macros.set("\\@eqnsw","1",!0)}function w(){y&&(e.gullet.macros.get("\\df@tag")?(y.push(e.subparse([new Nr("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):y.push(Boolean(h)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(x(),b.push(qr(e));;){let t=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),t={type:"ordgroup",mode:e.mode,body:t},r&&(t={type:"styling",mode:e.mode,style:r,body:[t]}),d.push(t);const o=e.fetch().text;if("&"===o){if(p&&d.length===p){if(c||l)throw new n("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===o){w(),1===d.length&&"styling"===t.type&&0===t.body[0].body.length&&(g.length>1||!m)&&g.pop(),b.length<g.length+1&&b.push([]);break}if("\\\\"!==o)throw new n("Expected & or \\\\ or \\cr or \\end",e.nextToken);{let t;e.consume()," "!==e.gullet.future().text&&(t=e.parseSizeGroup(!0)),f.push(t?t.value:null),w(),b.push(qr(e)),d=[],g.push(d),x()}}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:s,arraystretch:a,body:g,cols:i,rowGaps:f,hskipBeforeAndAfter:o,hLinesBeforeRow:b,colSeparationType:l,tags:y,leqno:u}}function Or(e){return"d"===e.slice(0,1)?"display":"text"}const Er=function(e,t){let r,o;const s=e.body.length,i=e.hLinesBeforeRow;let a=0,h=new Array(s);const c=[],m=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),p=1/t.fontMetrics().ptPerEm;let u=5*p;if(e.colSeparationType&&"small"===e.colSeparationType){u=t.havingStyle(w.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778}const d="CD"===e.colSeparationType?P({number:3,unit:"ex"},t):12*p,g=3*p,f=e.arraystretch*d,b=.7*f,y=.3*f;let x=0;function v(e){for(let t=0;t<e.length;++t)t>0&&(x+=.25),c.push({pos:x,isDashed:e[t]})}for(v(i[0]),r=0;r<e.body.length;++r){const n=e.body[r];let s=b,l=y;a<n.length&&(a=n.length);const c=new Array(n.length);for(o=0;o<n.length;++o){const e=ht(n[o],t);l<e.depth&&(l=e.depth),s<e.height&&(s=e.height),c[o]=e}const m=e.rowGaps[r];let p=0;m&&(p=P(m,t),p>0&&(p+=y,l<p&&(l=p),p=0)),e.addJot&&(l+=g),c.height=s,c.depth=l,x+=s,c.pos=x,x+=l+p,h[r]=c,v(i[r+1])}const k=x/2+t.fontMetrics().axisHeight,S=e.cols||[],M=[];let z,A;const T=[];if(e.tags&&e.tags.some((e=>e)))for(r=0;r<s;++r){const n=h[r],o=n.pos-k,s=e.tags[r];let i;i=!0===s?Ve.makeSpan(["eqn-num"],[],t):!1===s?Ve.makeSpan([],[],t):Ve.makeSpan([],nt(s,t,!0),t),i.depth=n.depth,i.height=n.height,T.push({type:"elem",elem:i,shift:o})}for(o=0,A=0;o<a||A<S.length;++o,++A){let i,c=S[A]||{},p=!0;for(;"separator"===c.type;){if(p||(z=Ve.makeSpan(["arraycolsep"],[]),z.style.width=F(t.fontMetrics().doubleRuleSep),M.push(z)),"|"!==c.separator&&":"!==c.separator)throw new n("Invalid separator type: "+c.separator);{const e="|"===c.separator?"solid":"dashed",r=Ve.makeSpan(["vertical-separator"],[],t);r.style.height=F(x),r.style.borderRightWidth=F(m),r.style.borderRightStyle=e,r.style.margin="0 "+F(-m/2);const n=x-k;n&&(r.style.verticalAlign=F(-n)),M.push(r)}A++,c=S[A]||{},p=!1}if(o>=a)continue;(o>0||e.hskipBeforeAndAfter)&&(i=l.deflt(c.pregap,u),0!==i&&(z=Ve.makeSpan(["arraycolsep"],[]),z.style.width=F(i),M.push(z)));let d=[];for(r=0;r<s;++r){const e=h[r],t=e[o];if(!t)continue;const n=e.pos-k;t.depth=e.depth,t.height=e.height,d.push({type:"elem",elem:t,shift:n})}d=Ve.makeVList({positionType:"individualShift",children:d},t),d=Ve.makeSpan(["col-align-"+(c.align||"c")],[d]),M.push(d),(o<a-1||e.hskipBeforeAndAfter)&&(i=l.deflt(c.postgap,u),0!==i&&(z=Ve.makeSpan(["arraycolsep"],[]),z.style.width=F(i),M.push(z)))}if(h=Ve.makeSpan(["mtable"],M),c.length>0){const e=Ve.makeLineSpan("hline",t,m),r=Ve.makeLineSpan("hdashline",t,m),n=[{type:"elem",elem:h,shift:0}];for(;c.length>0;){const t=c.pop(),o=t.pos-k;t.isDashed?n.push({type:"elem",elem:r,shift:o}):n.push({type:"elem",elem:e,shift:o})}h=Ve.makeVList({positionType:"individualShift",children:n},t)}if(0===T.length)return Ve.makeSpan(["mord"],[h],t);{let e=Ve.makeVList({positionType:"individualShift",children:T},t);return e=Ve.makeSpan(["tag"],[e],t),Ve.makeFragment([h,e])}},Lr={c:"center ",l:"left ",r:"right "},Dr=function(e,t){const r=[],n=new gt.MathNode("mtd",[],["mtr-glue"]),o=new gt.MathNode("mtd",[],["mml-eqn-num"]);for(let s=0;s<e.body.length;s++){const i=e.body[s],a=[];for(let e=0;e<i.length;e++)a.push(new gt.MathNode("mtd",[vt(i[e],t)]));e.tags&&e.tags[s]&&(a.unshift(n),a.push(n),e.leqno?a.unshift(o):a.push(o)),r.push(new gt.MathNode("mtr",a))}let s=new gt.MathNode("mtable",r);const i=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0);s.setAttribute("rowspacing",F(i));let a="",l="";if(e.cols&&e.cols.length>0){const t=e.cols;let r="",n=!1,o=0,i=t.length;"separator"===t[0].type&&(a+="top ",o=1),"separator"===t[t.length-1].type&&(a+="bottom ",i-=1);for(let e=o;e<i;e++)"align"===t[e].type?(l+=Lr[t[e].align],n&&(r+="none "),n=!0):"separator"===t[e].type&&n&&(r+="|"===t[e].separator?"solid ":"dashed ",n=!1);s.setAttribute("columnalign",l.trim()),/[sd]/.test(r)&&s.setAttribute("columnlines",r.trim())}if("align"===e.colSeparationType){const t=e.cols||[];let r="";for(let e=1;e<t.length;e++)r+=e%2?"0em ":"1em ";s.setAttribute("columnspacing",r.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?s.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?s.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?s.setAttribute("columnspacing","0.5em"):s.setAttribute("columnspacing","1em");let h="";const c=e.hLinesBeforeRow;a+=c[0].length>0?"left ":"",a+=c[c.length-1].length>0?"right ":"";for(let e=1;e<c.length-1;e++)h+=0===c[e].length?"none ":c[e][0]?"dashed ":"solid ";return/[sd]/.test(h)&&s.setAttribute("rowlines",h.trim()),""!==a&&(s=new gt.MathNode("menclose",[s]),s.setAttribute("notation",a.trim())),e.arraystretch&&e.arraystretch<1&&(s=new gt.MathNode("mstyle",[s]),s.setAttribute("scriptlevel","1")),s},Vr=function(e,t){-1===e.envName.indexOf("ed")&&Ir(e);const r=[],o=e.envName.indexOf("at")>-1?"alignat":"align",s="split"===e.envName,i=Hr(e.parser,{cols:r,addJot:!0,autoTag:s?void 0:Rr(e.envName),emptySingleRow:!0,colSeparationType:o,maxNumCols:s?2:void 0,leqno:e.parser.settings.leqno},"display");let a,l=0;const h={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){let e="";for(let r=0;r<t[0].body.length;r++){e+=qt(t[0].body[r],"textord").text}a=Number(e),l=2*a}const c=!l;i.body.forEach((function(e){for(let t=1;t<e.length;t+=2){const r=qt(e[t],"styling");qt(r.body[0],"ordgroup").body.unshift(h)}if(c)l<e.length&&(l=e.length);else{const t=e.length/2;if(a<t)throw new n("Too many math in a row: expected "+a+", but got "+t,e[0])}}));for(let e=0;e<l;++e){let t="r",n=0;e%2==1?t="l":e>0&&c&&(n=1),r[e]={type:"align",align:t,pregap:n,postgap:0}}return i.colSeparationType=c?"align":"alignat",i};Ar({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){const r=(Rt(t[0])?[t[0]]:qt(t[0],"ordgroup").body).map((function(e){const t=It(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new n("Unknown column alignment: "+t,e)})),o={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return Hr(e.parser,o,Or(e.envName))},htmlBuilder:Er,mathmlBuilder:Dr}),Ar({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){const t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")];let r="c";const o={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===e.envName.charAt(e.envName.length-1)){const t=e.parser;if(t.consumeSpaces(),"["===t.fetch().text){if(t.consume(),t.consumeSpaces(),r=t.fetch().text,-1==="lcr".indexOf(r))throw new n("Expected l or c or r",t.nextToken);t.consume(),t.consumeSpaces(),t.expect("]"),t.consume(),o.cols=[{type:"align",align:r}]}}const s=Hr(e.parser,o,Or(e.envName)),i=Math.max(0,...s.body.map((e=>e.length)));return s.cols=new Array(i).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[s],left:t[0],right:t[1],rightColor:void 0}:s},htmlBuilder:Er,mathmlBuilder:Dr}),Ar({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){const t=Hr(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:Er,mathmlBuilder:Dr}),Ar({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){const r=(Rt(t[0])?[t[0]]:qt(t[0],"ordgroup").body).map((function(e){const t=It(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new n("Unknown column alignment: "+t,e)}));if(r.length>1)throw new n("{subarray} can contain only one column");let o={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5};if(o=Hr(e.parser,o,"script"),o.body.length>0&&o.body[0].length>1)throw new n("{subarray} can contain only one column");return o},htmlBuilder:Er,mathmlBuilder:Dr}),Ar({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){const t=Hr(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},Or(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Er,mathmlBuilder:Dr}),Ar({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Vr,htmlBuilder:Er,mathmlBuilder:Dr}),Ar({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){l.contains(["gather","gather*"],e.envName)&&Ir(e);const t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Rr(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Hr(e.parser,t,"display")},htmlBuilder:Er,mathmlBuilder:Dr}),Ar({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Vr,htmlBuilder:Er,mathmlBuilder:Dr}),Ar({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Ir(e);const t={autoTag:Rr(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Hr(e.parser,t,"display")},htmlBuilder:Er,mathmlBuilder:Dr}),Ar({type:"array",names:["CD"],props:{numArgs:0},handler(e){return Ir(e),function(e){const t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();const r=e.fetch().text;if("&"!==r&&"\\\\"!==r){if("\\end"===r){0===t[t.length-1].length&&t.pop();break}throw new n("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}let r=[];const o=[r];for(let a=0;a<t.length;a++){const l=t[a];let h={type:"styling",body:[],mode:"math",style:"display"};for(let t=0;t<l.length;t++)if(Ut(l[t])){r.push(h),t+=1;const o=It(l[t]).text,a=new Array(2);if(a[0]={type:"ordgroup",mode:"math",body:[]},a[1]={type:"ordgroup",mode:"math",body:[]},"=|.".indexOf(o)>-1);else{if(!("<>AV".indexOf(o)>-1))throw new n('Expected one of "<>AV=|." after @',l[t]);for(let e=0;e<2;e++){let r=!0;for(let h=t+1;h<l.length;h++){if(i=o,("mathord"===(s=l[h]).type||"atom"===s.type)&&s.text===i){r=!1,t=h;break}if(Ut(l[h]))throw new n("Missing a "+o+" character to complete a CD arrow.",l[h]);a[e].body.push(l[h])}if(r)throw new n("Missing a "+o+" character to complete a CD arrow.",l[t])}}const c={type:"styling",body:[Yt(o,a,e)],mode:"math",style:"display"};r.push(c),h={type:"styling",body:[],mode:"math",style:"display"}}else h.body.push(l[t]);a%2==0?r.push(h):r.shift(),r=[],o.push(r)}var s,i;return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:o,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(o[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(o.length+1).fill([])}}(e.parser)},htmlBuilder:Er,mathmlBuilder:Dr}),Br("\\nonumber","\\gdef\\@eqnsw{0}"),Br("\\notag","\\nonumber"),je({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new n(e.funcName+" valid only within array environment")}});var Pr=zr;je({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){let{parser:r,funcName:o}=e;const s=t[0];if("ordgroup"!==s.type)throw new n("Invalid environment name",s);let i="";for(let e=0;e<s.body.length;++e)i+=qt(s.body[e],"textord").text;if("\\begin"===o){if(!Pr.hasOwnProperty(i))throw new n("No such environment: "+i,s);const e=Pr[i],{args:t,optArgs:o}=r.parseArguments("\\begin{"+i+"}",e),a={mode:r.mode,envName:i,parser:r},l=e.handler(a,t,o);r.expect("\\end",!1);const h=r.nextToken,c=qt(r.parseFunction(),"environment");if(c.name!==i)throw new n("Mismatch: \\begin{"+i+"} matched by \\end{"+c.name+"}",h);return l}return{type:"environment",mode:r.mode,name:i,nameGroup:s}}});const Fr=(e,t)=>{const r=e.font,n=t.withFont(r);return ht(e.body,n)},Gr=(e,t)=>{const r=e.font,n=t.withFont(r);return vt(e.body,n)},Ur={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};je({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{let{parser:r,funcName:n}=e;const o=Ze(t[0]);let s=n;return s in Ur&&(s=Ur[s]),{type:"font",mode:r.mode,font:s.slice(1),body:o}},htmlBuilder:Fr,mathmlBuilder:Gr}),je({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{let{parser:r}=e;const n=t[0],o=l.isCharacterBox(n);return{type:"mclass",mode:r.mode,mclass:Ft(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:o}}}),je({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{let{parser:r,funcName:n,breakOnTokenText:o}=e;const{mode:s}=r,i=r.parseExpression(!0,o);return{type:"font",mode:s,font:"math"+n.slice(1),body:{type:"ordgroup",mode:r.mode,body:i}}},htmlBuilder:Fr,mathmlBuilder:Gr});const Yr=(e,t)=>{let r=t;return"display"===e?r=r.id>=w.SCRIPT.id?r.text():w.DISPLAY:"text"===e&&r.size===w.DISPLAY.size?r=w.TEXT:"script"===e?r=w.SCRIPT:"scriptscript"===e&&(r=w.SCRIPTSCRIPT),r},Xr=(e,t)=>{const r=Yr(e.size,t.style),n=r.fracNum(),o=r.fracDen();let s;s=t.havingStyle(n);const i=ht(e.numer,s,t);if(e.continued){const e=8.5/t.fontMetrics().ptPerEm,r=3.5/t.fontMetrics().ptPerEm;i.height=i.height<e?e:i.height,i.depth=i.depth<r?r:i.depth}s=t.havingStyle(o);const a=ht(e.denom,s,t);let l,h,c,m,p,u,d,g,f,b;if(e.hasBarLine?(e.barSize?(h=P(e.barSize,t),l=Ve.makeLineSpan("frac-line",t,h)):l=Ve.makeLineSpan("frac-line",t),h=l.height,c=l.height):(l=null,h=0,c=t.fontMetrics().defaultRuleThickness),r.size===w.DISPLAY.size||"display"===e.size?(m=t.fontMetrics().num1,p=h>0?3*c:7*c,u=t.fontMetrics().denom1):(h>0?(m=t.fontMetrics().num2,p=c):(m=t.fontMetrics().num3,p=3*c),u=t.fontMetrics().denom2),l){const e=t.fontMetrics().axisHeight;m-i.depth-(e+.5*h)<p&&(m+=p-(m-i.depth-(e+.5*h))),e-.5*h-(a.height-u)<p&&(u+=p-(e-.5*h-(a.height-u)));const r=-(e-.5*h);d=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:u},{type:"elem",elem:l,shift:r},{type:"elem",elem:i,shift:-m}]},t)}else{const e=m-i.depth-(a.height-u);e<p&&(m+=.5*(p-e),u+=.5*(p-e)),d=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:u},{type:"elem",elem:i,shift:-m}]},t)}return s=t.havingStyle(r),d.height*=s.sizeMultiplier/t.sizeMultiplier,d.depth*=s.sizeMultiplier/t.sizeMultiplier,g=r.size===w.DISPLAY.size?t.fontMetrics().delim1:r.size===w.SCRIPTSCRIPT.size?t.havingStyle(w.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,f=null==e.leftDelim?lt(t,["mopen"]):yr.customSizedDelim(e.leftDelim,g,!0,t.havingStyle(r),e.mode,["mopen"]),b=e.continued?Ve.makeSpan([]):null==e.rightDelim?lt(t,["mclose"]):yr.customSizedDelim(e.rightDelim,g,!0,t.havingStyle(r),e.mode,["mclose"]),Ve.makeSpan(["mord"].concat(s.sizingClasses(t)),[f,Ve.makeSpan(["mfrac"],[d]),b],t)},Wr=(e,t)=>{let r=new gt.MathNode("mfrac",[vt(e.numer,t),vt(e.denom,t)]);if(e.hasBarLine){if(e.barSize){const n=P(e.barSize,t);r.setAttribute("linethickness",F(n))}}else r.setAttribute("linethickness","0px");const n=Yr(e.size,t.style);if(n.size!==t.style.size){r=new gt.MathNode("mstyle",[r]);const e=n.size===w.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",e),r.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){const t=[];if(null!=e.leftDelim){const r=new gt.MathNode("mo",[new gt.TextNode(e.leftDelim.replace("\\",""))]);r.setAttribute("fence","true"),t.push(r)}if(t.push(r),null!=e.rightDelim){const r=new gt.MathNode("mo",[new gt.TextNode(e.rightDelim.replace("\\",""))]);r.setAttribute("fence","true"),t.push(r)}return bt(t)}return r};je({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{let{parser:r,funcName:n}=e;const o=t[0],s=t[1];let i,a=null,l=null,h="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":i=!0;break;case"\\\\atopfrac":i=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":i=!1,a="(",l=")";break;case"\\\\bracefrac":i=!1,a="\\{",l="\\}";break;case"\\\\brackfrac":i=!1,a="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":h="display";break;case"\\tfrac":case"\\tbinom":h="text"}return{type:"genfrac",mode:r.mode,continued:!1,numer:o,denom:s,hasBarLine:i,leftDelim:a,rightDelim:l,size:h,barSize:null}},htmlBuilder:Xr,mathmlBuilder:Wr}),je({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{let{parser:r,funcName:n}=e;const o=t[0],s=t[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:o,denom:s,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),je({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){let t,{parser:r,funcName:n,token:o}=e;switch(n){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:r.mode,replaceWith:t,token:o}}});const _r=["display","text","script","scriptscript"],jr=function(e){let t=null;return e.length>0&&(t=e,t="."===t?null:t),t};je({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){let{parser:r}=e;const n=t[4],o=t[5],s=Ze(t[0]),i="atom"===s.type&&"open"===s.family?jr(s.text):null,a=Ze(t[1]),l="atom"===a.type&&"close"===a.family?jr(a.text):null,h=qt(t[2],"size");let c,m=null;h.isBlank?c=!0:(m=h.value,c=m.number>0);let p="auto",u=t[3];if("ordgroup"===u.type){if(u.body.length>0){const e=qt(u.body[0],"textord");p=_r[Number(e.text)]}}else u=qt(u,"textord"),p=_r[Number(u.text)];return{type:"genfrac",mode:r.mode,numer:n,denom:o,continued:!1,hasBarLine:c,barSize:m,leftDelim:i,rightDelim:l,size:p}},htmlBuilder:Xr,mathmlBuilder:Wr}),je({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){let{parser:r,funcName:n,token:o}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:qt(t[0],"size").value,token:o}}}),je({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{let{parser:r,funcName:n}=e;const o=t[0],s=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(qt(t[1],"infix").size),i=t[2],a=s.number>0;return{type:"genfrac",mode:r.mode,numer:o,denom:i,continued:!1,hasBarLine:a,barSize:s,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Xr,mathmlBuilder:Wr});const $r=(e,t)=>{const r=t.style;let n,o;"supsub"===e.type?(n=e.sup?ht(e.sup,t.havingStyle(r.sup()),t):ht(e.sub,t.havingStyle(r.sub()),t),o=qt(e.base,"horizBrace")):o=qt(e,"horizBrace");const s=ht(o.base,t.havingBaseStyle(w.DISPLAY)),i=Nt(o,t);let a;if(o.isOver?(a=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:i}]},t),a.children[0].children[0].children[1].classes.push("svg-align")):(a=Ve.makeVList({positionType:"bottom",positionData:s.depth+.1+i.height,children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:s}]},t),a.children[0].children[0].children[0].classes.push("svg-align")),n){const e=Ve.makeSpan(["mord",o.isOver?"mover":"munder"],[a],t);a=o.isOver?Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:.2},{type:"elem",elem:n}]},t):Ve.makeVList({positionType:"bottom",positionData:e.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:e}]},t)}return Ve.makeSpan(["mord",o.isOver?"mover":"munder"],[a],t)};je({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){let{parser:r,funcName:n}=e;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:t[0]}},htmlBuilder:$r,mathmlBuilder:(e,t)=>{const r=Ct(e.label);return new gt.MathNode(e.isOver?"mover":"munder",[vt(e.base,t),r])}}),je({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{let{parser:r}=e;const n=t[1],o=qt(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:o})?{type:"href",mode:r.mode,href:o,body:Ke(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{const r=nt(e.body,t,!1);return Ve.makeAnchor(e.href,[],r,t)},mathmlBuilder:(e,t)=>{let r=wt(e.body,t);return r instanceof ut||(r=new ut("mrow",[r])),r.setAttribute("href",e.href),r}}),je({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{let{parser:r}=e;const n=qt(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");const o=[];for(let e=0;e<n.length;e++){let t=n[e];"~"===t&&(t="\\textasciitilde"),o.push({type:"textord",mode:"text",text:t})}const s={type:"text",mode:r.mode,font:"\\texttt",body:o};return{type:"href",mode:r.mode,href:n,body:Ke(s)}}}),je({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){let{parser:r}=e;return{type:"hbox",mode:r.mode,body:Ke(t[0])}},htmlBuilder(e,t){const r=nt(e.body,t,!1);return Ve.makeFragment(r)},mathmlBuilder(e,t){return new gt.MathNode("mrow",xt(e.body,t))}}),je({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{let{parser:r,funcName:o,token:s}=e;const i=qt(t[0],"raw").string,a=t[1];let l;r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");const h={};switch(o){case"\\htmlClass":h.class=i,l={command:"\\htmlClass",class:i};break;case"\\htmlId":h.id=i,l={command:"\\htmlId",id:i};break;case"\\htmlStyle":h.style=i,l={command:"\\htmlStyle",style:i};break;case"\\htmlData":{const e=i.split(",");for(let t=0;t<e.length;t++){const r=e[t].split("=");if(2!==r.length)throw new n("Error parsing key-value for \\htmlData");h["data-"+r[0].trim()]=r[1].trim()}l={command:"\\htmlData",attributes:h};break}default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(l)?{type:"html",mode:r.mode,attributes:h,body:Ke(a)}:r.formatUnsupportedCmd(o)},htmlBuilder:(e,t)=>{const r=nt(e.body,t,!1),n=["enclosing"];e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/));const o=Ve.makeSpan(n,r,t);for(const t in e.attributes)"class"!==t&&e.attributes.hasOwnProperty(t)&&o.setAttribute(t,e.attributes[t]);return o},mathmlBuilder:(e,t)=>wt(e.body,t)}),je({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{let{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:Ke(t[0]),mathml:Ke(t[1])}},htmlBuilder:(e,t)=>{const r=nt(e.html,t,!1);return Ve.makeFragment(r)},mathmlBuilder:(e,t)=>wt(e.mathml,t)});const Zr=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};{const t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new n("Invalid size: '"+e+"' in \\includegraphics");const r={number:+(t[1]+t[2]),unit:t[3]};if(!V(r))throw new n("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r}};je({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{let{parser:o}=e,s={number:0,unit:"em"},i={number:.9,unit:"em"},a={number:0,unit:"em"},l="";if(r[0]){const e=qt(r[0],"raw").string.split(",");for(let t=0;t<e.length;t++){const r=e[t].split("=");if(2===r.length){const e=r[1].trim();switch(r[0].trim()){case"alt":l=e;break;case"width":s=Zr(e);break;case"height":i=Zr(e);break;case"totalheight":a=Zr(e);break;default:throw new n("Invalid key: '"+r[0]+"' in \\includegraphics.")}}}}const h=qt(t[0],"url").url;return""===l&&(l=h,l=l.replace(/^.*[\\/]/,""),l=l.substring(0,l.lastIndexOf("."))),o.settings.isTrusted({command:"\\includegraphics",url:h})?{type:"includegraphics",mode:o.mode,alt:l,width:s,height:i,totalheight:a,src:h}:o.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{const r=P(e.height,t);let n=0;e.totalheight.number>0&&(n=P(e.totalheight,t)-r);let o=0;e.width.number>0&&(o=P(e.width,t));const s={height:F(r+n)};o>0&&(s.width=F(o)),n>0&&(s.verticalAlign=F(-n));const i=new j(e.src,e.alt,s);return i.height=r,i.depth=n,i},mathmlBuilder:(e,t)=>{const r=new gt.MathNode("mglyph",[]);r.setAttribute("alt",e.alt);const n=P(e.height,t);let o=0;if(e.totalheight.number>0&&(o=P(e.totalheight,t)-n,r.setAttribute("valign",F(-o))),r.setAttribute("height",F(n+o)),e.width.number>0){const n=P(e.width,t);r.setAttribute("width",F(n))}return r.setAttribute("src",e.src),r}}),je({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){let{parser:r,funcName:n}=e;const o=qt(t[0],"size");if(r.settings.strict){const e="m"===n[1],t="mu"===o.value.unit;e?(t||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, not "+o.value.unit+" units"),"math"!==r.mode&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):t&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:o.value}},htmlBuilder(e,t){return Ve.makeGlue(e.dimension,t)},mathmlBuilder(e,t){const r=P(e.dimension,t);return new gt.SpaceNode(r)}}),je({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{let{parser:r,funcName:n}=e;const o=t[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:o}},htmlBuilder:(e,t)=>{let r;"clap"===e.alignment?(r=Ve.makeSpan([],[ht(e.body,t)]),r=Ve.makeSpan(["inner"],[r],t)):r=Ve.makeSpan(["inner"],[ht(e.body,t)]);const n=Ve.makeSpan(["fix"],[]);let o=Ve.makeSpan([e.alignment],[r,n],t);const s=Ve.makeSpan(["strut"]);return s.style.height=F(o.height+o.depth),o.depth&&(s.style.verticalAlign=F(-o.depth)),o.children.unshift(s),o=Ve.makeSpan(["thinbox"],[o],t),Ve.makeSpan(["mord","vbox"],[o],t)},mathmlBuilder:(e,t)=>{const r=new gt.MathNode("mpadded",[vt(e.body,t)]);if("rlap"!==e.alignment){const t="llap"===e.alignment?"-1":"-0.5";r.setAttribute("lspace",t+"width")}return r.setAttribute("width","0px"),r}}),je({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){let{funcName:r,parser:n}=e;const o=n.mode;n.switchMode("math");const s="\\("===r?"\\)":"$",i=n.parseExpression(!1,s);return n.expect(s),n.switchMode(o),{type:"styling",mode:n.mode,style:"text",body:i}}}),je({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new n("Mismatched "+e.funcName)}});const Kr=(e,t)=>{switch(t.style.size){case w.DISPLAY.size:return e.display;case w.TEXT.size:return e.text;case w.SCRIPT.size:return e.script;case w.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};je({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{let{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:Ke(t[0]),text:Ke(t[1]),script:Ke(t[2]),scriptscript:Ke(t[3])}},htmlBuilder:(e,t)=>{const r=Kr(e,t),n=nt(r,t,!1);return Ve.makeFragment(n)},mathmlBuilder:(e,t)=>{const r=Kr(e,t);return wt(r,t)}});const Jr=(e,t,r,n,o,s,i)=>{e=Ve.makeSpan([],[e]);const a=r&&l.isCharacterBox(r);let h,c,m;if(t){const e=ht(t,n.havingStyle(o.sup()),n);c={elem:e,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-e.depth)}}if(r){const e=ht(r,n.havingStyle(o.sub()),n);h={elem:e,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-e.height)}}if(c&&h){const t=n.fontMetrics().bigOpSpacing5+h.elem.height+h.elem.depth+h.kern+e.depth+i;m=Ve.makeVList({positionType:"bottom",positionData:t,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:h.elem,marginLeft:F(-s)},{type:"kern",size:h.kern},{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:F(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(h){const t=e.height-i;m=Ve.makeVList({positionType:"top",positionData:t,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:h.elem,marginLeft:F(-s)},{type:"kern",size:h.kern},{type:"elem",elem:e}]},n)}else{if(!c)return e;{const t=e.depth+i;m=Ve.makeVList({positionType:"bottom",positionData:t,children:[{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:F(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}}const p=[m];if(h&&0!==s&&!a){const e=Ve.makeSpan(["mspace"],[],n);e.style.marginRight=F(s),p.unshift(e)}return Ve.makeSpan(["mop","op-limits"],p,n)},Qr=["\\smallint"],en=(e,t)=>{let r,n,o,s=!1;"supsub"===e.type?(r=e.sup,n=e.sub,o=qt(e.base,"op"),s=!0):o=qt(e,"op");const i=t.style;let a,h=!1;if(i.size===w.DISPLAY.size&&o.symbol&&!l.contains(Qr,o.name)&&(h=!0),o.symbol){const e=h?"Size2-Regular":"Size1-Regular";let r="";if("\\oiint"!==o.name&&"\\oiiint"!==o.name||(r=o.name.slice(1),o.name="oiint"===r?"\\iint":"\\iiint"),a=Ve.makeSymbol(o.name,e,"math",t,["mop","op-symbol",h?"large-op":"small-op"]),r.length>0){const e=a.italic,n=Ve.staticSvg(r+"Size"+(h?"2":"1"),t);a=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:0},{type:"elem",elem:n,shift:h?.08:0}]},t),o.name="\\"+r,a.classes.unshift("mop"),a.italic=e}}else if(o.body){const e=nt(o.body,t,!0);1===e.length&&e[0]instanceof Z?(a=e[0],a.classes[0]="mop"):a=Ve.makeSpan(["mop"],e,t)}else{const e=[];for(let r=1;r<o.name.length;r++)e.push(Ve.mathsym(o.name[r],o.mode,t));a=Ve.makeSpan(["mop"],e,t)}let c=0,m=0;return(a instanceof Z||"\\oiint"===o.name||"\\oiiint"===o.name)&&!o.suppressBaseShift&&(c=(a.height-a.depth)/2-t.fontMetrics().axisHeight,m=a.italic),s?Jr(a,r,n,t,i,m,c):(c&&(a.style.position="relative",a.style.top=F(c)),a)},tn=(e,t)=>{let r;if(e.symbol)r=new ut("mo",[ft(e.name,e.mode)]),l.contains(Qr,e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new ut("mo",xt(e.body,t));else{r=new ut("mi",[new dt(e.name.slice(1))]);const t=new ut("mo",[ft("\u2061","text")]);r=e.parentIsSupSub?new ut("mrow",[r,t]):pt([r,t])}return r},rn={"\u220f":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22c0":"\\bigwedge","\u22c1":"\\bigvee","\u22c2":"\\bigcap","\u22c3":"\\bigcup","\u2a00":"\\bigodot","\u2a01":"\\bigoplus","\u2a02":"\\bigotimes","\u2a04":"\\biguplus","\u2a06":"\\bigsqcup"};je({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220f","\u2210","\u2211","\u22c0","\u22c1","\u22c2","\u22c3","\u2a00","\u2a01","\u2a02","\u2a04","\u2a06"],props:{numArgs:0},handler:(e,t)=>{let{parser:r,funcName:n}=e,o=n;return 1===o.length&&(o=rn[o]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:o}},htmlBuilder:en,mathmlBuilder:tn}),je({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{let{parser:r}=e;const n=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Ke(n)}},htmlBuilder:en,mathmlBuilder:tn});const nn={"\u222b":"\\int","\u222c":"\\iint","\u222d":"\\iiint","\u222e":"\\oint","\u222f":"\\oiint","\u2230":"\\oiiint"};je({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){let{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:en,mathmlBuilder:tn}),je({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){let{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:en,mathmlBuilder:tn}),je({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222b","\u222c","\u222d","\u222e","\u222f","\u2230"],props:{numArgs:0},handler(e){let{parser:t,funcName:r}=e,n=r;return 1===n.length&&(n=nn[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:en,mathmlBuilder:tn});const on=(e,t)=>{let r,n,o,s,i=!1;if("supsub"===e.type?(r=e.sup,n=e.sub,o=qt(e.base,"operatorname"),i=!0):o=qt(e,"operatorname"),o.body.length>0){const e=o.body.map((e=>{const t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e})),r=nt(e,t.withFont("mathrm"),!0);for(let e=0;e<r.length;e++){const t=r[e];t instanceof Z&&(t.text=t.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}s=Ve.makeSpan(["mop"],r,t)}else s=Ve.makeSpan(["mop"],[],t);return i?Jr(s,r,n,t,t.style,0,0):s};function sn(e,t,r){const n=nt(e,t,!1),o=t.sizeMultiplier/r.sizeMultiplier;for(let e=0;e<n.length;e++){const s=n[e].classes.indexOf("sizing");s<0?Array.prototype.push.apply(n[e].classes,t.sizingClasses(r)):n[e].classes[s+1]==="reset-size"+t.size&&(n[e].classes[s+1]="reset-size"+r.size),n[e].height*=o,n[e].depth*=o}return Ve.makeFragment(n)}je({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{let{parser:r,funcName:n}=e;const o=t[0];return{type:"operatorname",mode:r.mode,body:Ke(o),alwaysHandleSupSub:"\\operatornamewithlimits"===n,limits:!1,parentIsSupSub:!1}},htmlBuilder:on,mathmlBuilder:(e,t)=>{let r=xt(e.body,t.withFont("mathrm")),n=!0;for(let e=0;e<r.length;e++){const t=r[e];if(t instanceof gt.SpaceNode);else if(t instanceof gt.MathNode)switch(t.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{const e=t.children[0];1===t.children.length&&e instanceof gt.TextNode?e.text=e.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break}default:n=!1}else n=!1}if(n){const e=r.map((e=>e.toText())).join("");r=[new gt.TextNode(e)]}const o=new gt.MathNode("mi",r);o.setAttribute("mathvariant","normal");const s=new gt.MathNode("mo",[ft("\u2061","text")]);return e.parentIsSupSub?new gt.MathNode("mrow",[o,s]):gt.newDocumentFragment([o,s])}}),Br("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),$e({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?Ve.makeFragment(nt(e.body,t,!1)):Ve.makeSpan(["mord"],nt(e.body,t,!0),t)},mathmlBuilder(e,t){return wt(e.body,t,!0)}}),je({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){let{parser:r}=e;const n=t[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(e,t){const r=ht(e.body,t.havingCrampedStyle()),n=Ve.makeLineSpan("overline-line",t),o=t.fontMetrics().defaultRuleThickness,s=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*o},{type:"elem",elem:n},{type:"kern",size:o}]},t);return Ve.makeSpan(["mord","overline"],[s],t)},mathmlBuilder(e,t){const r=new gt.MathNode("mo",[new gt.TextNode("\u203e")]);r.setAttribute("stretchy","true");const n=new gt.MathNode("mover",[vt(e.body,t),r]);return n.setAttribute("accent","true"),n}}),je({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{let{parser:r}=e;const n=t[0];return{type:"phantom",mode:r.mode,body:Ke(n)}},htmlBuilder:(e,t)=>{const r=nt(e.body,t.withPhantom(),!1);return Ve.makeFragment(r)},mathmlBuilder:(e,t)=>{const r=xt(e.body,t);return new gt.MathNode("mphantom",r)}}),je({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{let{parser:r}=e;const n=t[0];return{type:"hphantom",mode:r.mode,body:n}},htmlBuilder:(e,t)=>{let r=Ve.makeSpan([],[ht(e.body,t.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(let e=0;e<r.children.length;e++)r.children[e].height=0,r.children[e].depth=0;return r=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t),Ve.makeSpan(["mord"],[r],t)},mathmlBuilder:(e,t)=>{const r=xt(Ke(e.body),t),n=new gt.MathNode("mphantom",r),o=new gt.MathNode("mpadded",[n]);return o.setAttribute("height","0px"),o.setAttribute("depth","0px"),o}}),je({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{let{parser:r}=e;const n=t[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(e,t)=>{const r=Ve.makeSpan(["inner"],[ht(e.body,t.withPhantom())]),n=Ve.makeSpan(["fix"],[]);return Ve.makeSpan(["mord","rlap"],[r,n],t)},mathmlBuilder:(e,t)=>{const r=xt(Ke(e.body),t),n=new gt.MathNode("mphantom",r),o=new gt.MathNode("mpadded",[n]);return o.setAttribute("width","0px"),o}}),je({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){let{parser:r}=e;const n=qt(t[0],"size").value,o=t[1];return{type:"raisebox",mode:r.mode,dy:n,body:o}},htmlBuilder(e,t){const r=ht(e.body,t),n=P(e.dy,t);return Ve.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){const r=new gt.MathNode("mpadded",[vt(e.body,t)]),n=e.dy.number+e.dy.unit;return r.setAttribute("voffset",n),r}}),je({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(e){let{parser:t}=e;return{type:"internal",mode:t.mode}}}),je({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(e,t,r){let{parser:n}=e;const o=r[0],s=qt(t[0],"size"),i=qt(t[1],"size");return{type:"rule",mode:n.mode,shift:o&&qt(o,"size").value,width:s.value,height:i.value}},htmlBuilder(e,t){const r=Ve.makeSpan(["mord","rule"],[],t),n=P(e.width,t),o=P(e.height,t),s=e.shift?P(e.shift,t):0;return r.style.borderRightWidth=F(n),r.style.borderTopWidth=F(o),r.style.bottom=F(s),r.width=n,r.height=o+s,r.depth=-s,r.maxFontSize=1.125*o*t.sizeMultiplier,r},mathmlBuilder(e,t){const r=P(e.width,t),n=P(e.height,t),o=e.shift?P(e.shift,t):0,s=t.color&&t.getColor()||"black",i=new gt.MathNode("mspace");i.setAttribute("mathbackground",s),i.setAttribute("width",F(r)),i.setAttribute("height",F(n));const a=new gt.MathNode("mpadded",[i]);return o>=0?a.setAttribute("height",F(o)):(a.setAttribute("height",F(o)),a.setAttribute("depth",F(-o))),a.setAttribute("voffset",F(o)),a}});const an=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];je({type:"sizing",names:an,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{let{breakOnTokenText:r,funcName:n,parser:o}=e;const s=o.parseExpression(!1,r);return{type:"sizing",mode:o.mode,size:an.indexOf(n)+1,body:s}},htmlBuilder:(e,t)=>{const r=t.havingSize(e.size);return sn(e.body,r,t)},mathmlBuilder:(e,t)=>{const r=t.havingSize(e.size),n=xt(e.body,r),o=new gt.MathNode("mstyle",n);return o.setAttribute("mathsize",F(r.sizeMultiplier)),o}}),je({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{let{parser:n}=e,o=!1,s=!1;const i=r[0]&&qt(r[0],"ordgroup");if(i){let e="";for(let t=0;t<i.body.length;++t){if(e=i.body[t].text,"t"===e)o=!0;else{if("b"!==e){o=!1,s=!1;break}s=!0}}}else o=!0,s=!0;const a=t[0];return{type:"smash",mode:n.mode,body:a,smashHeight:o,smashDepth:s}},htmlBuilder:(e,t)=>{const r=Ve.makeSpan([],[ht(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0,r.children))for(let e=0;e<r.children.length;e++)r.children[e].height=0;if(e.smashDepth&&(r.depth=0,r.children))for(let e=0;e<r.children.length;e++)r.children[e].depth=0;const n=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t);return Ve.makeSpan(["mord"],[n],t)},mathmlBuilder:(e,t)=>{const r=new gt.MathNode("mpadded",[vt(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}}),je({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){let{parser:n}=e;const o=r[0],s=t[0];return{type:"sqrt",mode:n.mode,body:s,index:o}},htmlBuilder(e,t){let r=ht(e.body,t.havingCrampedStyle());0===r.height&&(r.height=t.fontMetrics().xHeight),r=Ve.wrapFragment(r,t);const n=t.fontMetrics().defaultRuleThickness;let o=n;t.style.id<w.TEXT.id&&(o=t.fontMetrics().xHeight);let s=n+o/4;const i=r.height+r.depth+s+n,{span:a,ruleWidth:l,advanceWidth:h}=yr.sqrtImage(i,t),c=a.height-l;c>r.height+r.depth+s&&(s=(s+c-r.height-r.depth)/2);const m=a.height-r.height-s-l;r.style.paddingLeft=F(h);const p=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+m)},{type:"elem",elem:a},{type:"kern",size:l}]},t);if(e.index){const r=t.havingStyle(w.SCRIPTSCRIPT),n=ht(e.index,r,t),o=.6*(p.height-p.depth),s=Ve.makeVList({positionType:"shift",positionData:-o,children:[{type:"elem",elem:n}]},t),i=Ve.makeSpan(["root"],[s]);return Ve.makeSpan(["mord","sqrt"],[i,p],t)}return Ve.makeSpan(["mord","sqrt"],[p],t)},mathmlBuilder(e,t){const{body:r,index:n}=e;return n?new gt.MathNode("mroot",[vt(r,t),vt(n,t)]):new gt.MathNode("msqrt",[vt(r,t)])}});const ln={display:w.DISPLAY,text:w.TEXT,script:w.SCRIPT,scriptscript:w.SCRIPTSCRIPT};je({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){let{breakOnTokenText:r,funcName:n,parser:o}=e;const s=o.parseExpression(!0,r),i=n.slice(1,n.length-5);return{type:"styling",mode:o.mode,style:i,body:s}},htmlBuilder(e,t){const r=ln[e.style],n=t.havingStyle(r).withFont("");return sn(e.body,n,t)},mathmlBuilder(e,t){const r=ln[e.style],n=t.havingStyle(r),o=xt(e.body,n),s=new gt.MathNode("mstyle",o),i={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return s.setAttribute("scriptlevel",i[0]),s.setAttribute("displaystyle",i[1]),s}});$e({type:"supsub",htmlBuilder(e,t){const r=function(e,t){const r=e.base;if(r)return"op"===r.type?r.limits&&(t.style.size===w.DISPLAY.size||r.alwaysHandleSupSub)?en:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(t.style.size===w.DISPLAY.size||r.limits)?on:null:"accent"===r.type?l.isCharacterBox(r.base)?Ht:null:"horizBrace"===r.type&&!e.sub===r.isOver?$r:null;return null}(e,t);if(r)return r(e,t);const{base:n,sup:o,sub:s}=e,i=ht(n,t);let a,h;const c=t.fontMetrics();let m=0,p=0;const u=n&&l.isCharacterBox(n);if(o){const e=t.havingStyle(t.style.sup());a=ht(o,e,t),u||(m=i.height-e.fontMetrics().supDrop*e.sizeMultiplier/t.sizeMultiplier)}if(s){const e=t.havingStyle(t.style.sub());h=ht(s,e,t),u||(p=i.depth+e.fontMetrics().subDrop*e.sizeMultiplier/t.sizeMultiplier)}let d;d=t.style===w.DISPLAY?c.sup1:t.style.cramped?c.sup3:c.sup2;const g=t.sizeMultiplier,f=F(.5/c.ptPerEm/g);let b,y=null;if(h){const t=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(i instanceof Z||t)&&(y=F(-i.italic))}if(a&&h){m=Math.max(m,d,a.depth+.25*c.xHeight),p=Math.max(p,c.sub2);const e=4*c.defaultRuleThickness;if(m-a.depth-(h.height-p)<e){p=e-(m-a.depth)+h.height;const t=.8*c.xHeight-(m-a.depth);t>0&&(m+=t,p-=t)}const r=[{type:"elem",elem:h,shift:p,marginRight:f,marginLeft:y},{type:"elem",elem:a,shift:-m,marginRight:f}];b=Ve.makeVList({positionType:"individualShift",children:r},t)}else if(h){p=Math.max(p,c.sub1,h.height-.8*c.xHeight);const e=[{type:"elem",elem:h,marginLeft:y,marginRight:f}];b=Ve.makeVList({positionType:"shift",positionData:p,children:e},t)}else{if(!a)throw new Error("supsub must have either sup or sub.");m=Math.max(m,d,a.depth+.25*c.xHeight),b=Ve.makeVList({positionType:"shift",positionData:-m,children:[{type:"elem",elem:a,marginRight:f}]},t)}const x=at(i,"right")||"mord";return Ve.makeSpan([x],[i,Ve.makeSpan(["msupsub"],[b])],t)},mathmlBuilder(e,t){let r,n,o=!1;e.base&&"horizBrace"===e.base.type&&(n=!!e.sup,n===e.base.isOver&&(o=!0,r=e.base.isOver)),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);const s=[vt(e.base,t)];let i;if(e.sub&&s.push(vt(e.sub,t)),e.sup&&s.push(vt(e.sup,t)),o)i=r?"mover":"munder";else if(e.sub)if(e.sup){const r=e.base;i=r&&"op"===r.type&&r.limits&&t.style===w.DISPLAY||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(t.style===w.DISPLAY||r.limits)?"munderover":"msubsup"}else{const r=e.base;i=r&&"op"===r.type&&r.limits&&(t.style===w.DISPLAY||r.alwaysHandleSupSub)||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(r.limits||t.style===w.DISPLAY)?"munder":"msub"}else{const r=e.base;i=r&&"op"===r.type&&r.limits&&(t.style===w.DISPLAY||r.alwaysHandleSupSub)||r&&"operatorname"===r.type&&r.alwaysHandleSupSub&&(r.limits||t.style===w.DISPLAY)?"mover":"msup"}return new gt.MathNode(i,s)}}),$e({type:"atom",htmlBuilder(e,t){return Ve.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){const r=new gt.MathNode("mo",[ft(e.text,e.mode)]);if("bin"===e.family){const n=yt(e,t);"bold-italic"===n&&r.setAttribute("mathvariant",n)}else"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false");return r}});const hn={mi:"italic",mn:"normal",mtext:"normal"};$e({type:"mathord",htmlBuilder(e,t){return Ve.makeOrd(e,t,"mathord")},mathmlBuilder(e,t){const r=new gt.MathNode("mi",[ft(e.text,e.mode,t)]),n=yt(e,t)||"italic";return n!==hn[r.type]&&r.setAttribute("mathvariant",n),r}}),$e({type:"textord",htmlBuilder(e,t){return Ve.makeOrd(e,t,"textord")},mathmlBuilder(e,t){const r=ft(e.text,e.mode,t),n=yt(e,t)||"normal";let o;return o="text"===e.mode?new gt.MathNode("mtext",[r]):/[0-9]/.test(e.text)?new gt.MathNode("mn",[r]):"\\prime"===e.text?new gt.MathNode("mo",[r]):new gt.MathNode("mi",[r]),n!==hn[o.type]&&o.setAttribute("mathvariant",n),o}});const cn={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},mn={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};$e({type:"spacing",htmlBuilder(e,t){if(mn.hasOwnProperty(e.text)){const r=mn[e.text].className||"";if("text"===e.mode){const n=Ve.makeOrd(e,t,"textord");return n.classes.push(r),n}return Ve.makeSpan(["mspace",r],[Ve.mathsym(e.text,e.mode,t)],t)}if(cn.hasOwnProperty(e.text))return Ve.makeSpan(["mspace",cn[e.text]],[],t);throw new n('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){let r;if(!mn.hasOwnProperty(e.text)){if(cn.hasOwnProperty(e.text))return new gt.MathNode("mspace");throw new n('Unknown type of space "'+e.text+'"')}return r=new gt.MathNode("mtext",[new gt.TextNode("\xa0")]),r}});const pn=()=>{const e=new gt.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};$e({type:"tag",mathmlBuilder(e,t){const r=new gt.MathNode("mtable",[new gt.MathNode("mtr",[pn(),new gt.MathNode("mtd",[wt(e.body,t)]),pn(),new gt.MathNode("mtd",[wt(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});const un={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},dn={"\\textbf":"textbf","\\textmd":"textmd"},gn={"\\textit":"textit","\\textup":"textup"},fn=(e,t)=>{const r=e.font;return r?un[r]?t.withTextFontFamily(un[r]):dn[r]?t.withTextFontWeight(dn[r]):"\\emph"===r?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(gn[r]):t};je({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){let{parser:r,funcName:n}=e;const o=t[0];return{type:"text",mode:r.mode,body:Ke(o),font:n}},htmlBuilder(e,t){const r=fn(e,t),n=nt(e.body,r,!0);return Ve.makeSpan(["mord","text"],n,r)},mathmlBuilder(e,t){const r=fn(e,t);return wt(e.body,r)}}),je({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){let{parser:r}=e;return{type:"underline",mode:r.mode,body:t[0]}},htmlBuilder(e,t){const r=ht(e.body,t),n=Ve.makeLineSpan("underline-line",t),o=t.fontMetrics().defaultRuleThickness,s=Ve.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:o},{type:"elem",elem:n},{type:"kern",size:3*o},{type:"elem",elem:r}]},t);return Ve.makeSpan(["mord","underline"],[s],t)},mathmlBuilder(e,t){const r=new gt.MathNode("mo",[new gt.TextNode("\u203e")]);r.setAttribute("stretchy","true");const n=new gt.MathNode("munder",[vt(e.body,t),r]);return n.setAttribute("accentunder","true"),n}}),je({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){let{parser:r}=e;return{type:"vcenter",mode:r.mode,body:t[0]}},htmlBuilder(e,t){const r=ht(e.body,t),n=t.fontMetrics().axisHeight,o=.5*(r.height-n-(r.depth+n));return Ve.makeVList({positionType:"shift",positionData:o,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){return new gt.MathNode("mpadded",[vt(e.body,t)],["vcenter"])}}),je({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new n("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){const r=bn(e),n=[],o=t.havingStyle(t.style.text());for(let t=0;t<r.length;t++){let s=r[t];"~"===s&&(s="\\textasciitilde"),n.push(Ve.makeSymbol(s,"Typewriter-Regular",e.mode,o,["mord","texttt"]))}return Ve.makeSpan(["mord","text"].concat(o.sizingClasses(t)),Ve.tryCombineChars(n),o)},mathmlBuilder(e,t){const r=new gt.TextNode(bn(e)),n=new gt.MathNode("mtext",[r]);return n.setAttribute("mathvariant","monospace"),n}});const bn=e=>e.body.replace(/ /g,e.star?"\u2423":"\xa0");var yn=Xe;const xn="[ \r\n\t]",wn="(\\\\[a-zA-Z@]+)"+xn+"*",vn="[\u0300-\u036f]",kn=new RegExp(vn+"+$"),Sn="("+xn+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-\u2027\u202a-\ud7ff\uf900-\uffff]"+vn+"*|[\ud800-\udbff][\udc00-\udfff]"+vn+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+wn+"|\\\\[^\ud800-\udfff])";class Mn{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(Sn,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){const e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new Nr("EOF",new Cr(this,t,t));const r=this.tokenRegex.exec(e);if(null===r||r.index!==t)throw new n("Unexpected character: '"+e[t]+"'",new Nr(e[t],new Cr(this,t,t+1)));const o=r[6]||r[3]||(r[2]?"\\ ":" ");if(14===this.catcodes[o]){const t=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===t?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=t+1,this.lex()}return new Nr(o,new Cr(this,t,this.tokenRegex.lastIndex))}}class zn{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new n("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");const e=this.undefStack.pop();for(const t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,r){if(void 0===r&&(r=!1),r){for(let t=0;t<this.undefStack.length;t++)delete this.undefStack[t][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{const t=this.undefStack[this.undefStack.length-1];t&&!t.hasOwnProperty(e)&&(t[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}}var An=Tr;Br("\\noexpand",(function(e){const t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),Br("\\expandafter",(function(e){const t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),Br("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),Br("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),Br("\\@ifnextchar",(function(e){const t=e.consumeArgs(3);e.consumeSpaces();const r=e.future();return 1===t[0].length&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),Br("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Br("\\TextOrMath",(function(e){const t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));const Tn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Br("\\char",(function(e){let t,r=e.popToken(),o="";if("'"===r.text)t=8,r=e.popToken();else if('"'===r.text)t=16,r=e.popToken();else if("`"===r.text)if(r=e.popToken(),"\\"===r.text[0])o=r.text.charCodeAt(1);else{if("EOF"===r.text)throw new n("\\char` missing argument");o=r.text.charCodeAt(0)}else t=10;if(t){if(o=Tn[r.text],null==o||o>=t)throw new n("Invalid base-"+t+" digit "+r.text);let s;for(;null!=(s=Tn[e.future().text])&&s<t;)o*=t,o+=s,e.popToken()}return"\\@char{"+o+"}"}));const Bn=(e,t,r)=>{let o=e.consumeArg().tokens;if(1!==o.length)throw new n("\\newcommand's first argument must be a macro name");const s=o[0].text,i=e.isDefined(s);if(i&&!t)throw new n("\\newcommand{"+s+"} attempting to redefine "+s+"; use \\renewcommand");if(!i&&!r)throw new n("\\renewcommand{"+s+"} when command "+s+" does not yet exist; use \\newcommand");let a=0;if(o=e.consumeArg().tokens,1===o.length&&"["===o[0].text){let t="",r=e.expandNextToken();for(;"]"!==r.text&&"EOF"!==r.text;)t+=r.text,r=e.expandNextToken();if(!t.match(/^\s*[0-9]+\s*$/))throw new n("Invalid number of arguments: "+t);a=parseInt(t),o=e.consumeArg().tokens}return e.macros.set(s,{tokens:o,numArgs:a}),""};Br("\\newcommand",(e=>Bn(e,!1,!0))),Br("\\renewcommand",(e=>Bn(e,!0,!1))),Br("\\providecommand",(e=>Bn(e,!0,!0))),Br("\\message",(e=>{const t=e.consumeArgs(1)[0];return console.log(t.reverse().map((e=>e.text)).join("")),""})),Br("\\errmessage",(e=>{const t=e.consumeArgs(1)[0];return console.error(t.reverse().map((e=>e.text)).join("")),""})),Br("\\show",(e=>{const t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),yn[r],oe.math[r],oe.text[r]),""})),Br("\\bgroup","{"),Br("\\egroup","}"),Br("~","\\nobreakspace"),Br("\\lq","`"),Br("\\rq","'"),Br("\\aa","\\r a"),Br("\\AA","\\r A"),Br("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xa9}"),Br("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Br("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xae}"),Br("\u212c","\\mathscr{B}"),Br("\u2130","\\mathscr{E}"),Br("\u2131","\\mathscr{F}"),Br("\u210b","\\mathscr{H}"),Br("\u2110","\\mathscr{I}"),Br("\u2112","\\mathscr{L}"),Br("\u2133","\\mathscr{M}"),Br("\u211b","\\mathscr{R}"),Br("\u212d","\\mathfrak{C}"),Br("\u210c","\\mathfrak{H}"),Br("\u2128","\\mathfrak{Z}"),Br("\\Bbbk","\\Bbb{k}"),Br("\xb7","\\cdotp"),Br("\\llap","\\mathllap{\\textrm{#1}}"),Br("\\rlap","\\mathrlap{\\textrm{#1}}"),Br("\\clap","\\mathclap{\\textrm{#1}}"),Br("\\mathstrut","\\vphantom{(}"),Br("\\underbar","\\underline{\\text{#1}}"),Br("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),Br("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),Br("\\ne","\\neq"),Br("\u2260","\\neq"),Br("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),Br("\u2209","\\notin"),Br("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),Br("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),Br("\u225a","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225a}}"),Br("\u225b","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225b}}"),Br("\u225d","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225d}}"),Br("\u225e","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225e}}"),Br("\u225f","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225f}}"),Br("\u27c2","\\perp"),Br("\u203c","\\mathclose{!\\mkern-0.8mu!}"),Br("\u220c","\\notni"),Br("\u231c","\\ulcorner"),Br("\u231d","\\urcorner"),Br("\u231e","\\llcorner"),Br("\u231f","\\lrcorner"),Br("\xa9","\\copyright"),Br("\xae","\\textregistered"),Br("\ufe0f","\\textregistered"),Br("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),Br("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),Br("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),Br("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),Br("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),Br("\u22ee","\\vdots"),Br("\\varGamma","\\mathit{\\Gamma}"),Br("\\varDelta","\\mathit{\\Delta}"),Br("\\varTheta","\\mathit{\\Theta}"),Br("\\varLambda","\\mathit{\\Lambda}"),Br("\\varXi","\\mathit{\\Xi}"),Br("\\varPi","\\mathit{\\Pi}"),Br("\\varSigma","\\mathit{\\Sigma}"),Br("\\varUpsilon","\\mathit{\\Upsilon}"),Br("\\varPhi","\\mathit{\\Phi}"),Br("\\varPsi","\\mathit{\\Psi}"),Br("\\varOmega","\\mathit{\\Omega}"),Br("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Br("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),Br("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Br("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Br("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Br("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");const Cn={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};Br("\\dots",(function(e){let t="\\dotso";const r=e.expandAfterFuture().text;return r in Cn?t=Cn[r]:("\\not"===r.slice(0,4)||r in oe.math&&l.contains(["bin","rel"],oe.math[r].group))&&(t="\\dotsb"),t}));const Nn={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Br("\\dotso",(function(e){return e.future().text in Nn?"\\ldots\\,":"\\ldots"})),Br("\\dotsc",(function(e){const t=e.future().text;return t in Nn&&","!==t?"\\ldots\\,":"\\ldots"})),Br("\\cdots",(function(e){return e.future().text in Nn?"\\@cdots\\,":"\\@cdots"})),Br("\\dotsb","\\cdots"),Br("\\dotsm","\\cdots"),Br("\\dotsi","\\!\\cdots"),Br("\\dotsx","\\ldots\\,"),Br("\\DOTSI","\\relax"),Br("\\DOTSB","\\relax"),Br("\\DOTSX","\\relax"),Br("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Br("\\,","\\tmspace+{3mu}{.1667em}"),Br("\\thinspace","\\,"),Br("\\>","\\mskip{4mu}"),Br("\\:","\\tmspace+{4mu}{.2222em}"),Br("\\medspace","\\:"),Br("\\;","\\tmspace+{5mu}{.2777em}"),Br("\\thickspace","\\;"),Br("\\!","\\tmspace-{3mu}{.1667em}"),Br("\\negthinspace","\\!"),Br("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Br("\\negthickspace","\\tmspace-{5mu}{.277em}"),Br("\\enspace","\\kern.5em "),Br("\\enskip","\\hskip.5em\\relax"),Br("\\quad","\\hskip1em\\relax"),Br("\\qquad","\\hskip2em\\relax"),Br("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Br("\\tag@paren","\\tag@literal{({#1})}"),Br("\\tag@literal",(e=>{if(e.macros.get("\\df@tag"))throw new n("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),Br("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Br("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Br("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Br("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Br("\\newline","\\\\\\relax"),Br("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");const qn=F(T["Main-Regular"]["T".charCodeAt(0)][1]-.7*T["Main-Regular"]["A".charCodeAt(0)][1]);Br("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+qn+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Br("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+qn+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Br("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Br("\\@hspace","\\hskip #1\\relax"),Br("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Br("\\ordinarycolon",":"),Br("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Br("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Br("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Br("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Br("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Br("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Br("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Br("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Br("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Br("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Br("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Br("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Br("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Br("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Br("\u2237","\\dblcolon"),Br("\u2239","\\eqcolon"),Br("\u2254","\\coloneqq"),Br("\u2255","\\eqqcolon"),Br("\u2a74","\\Coloneqq"),Br("\\ratio","\\vcentcolon"),Br("\\coloncolon","\\dblcolon"),Br("\\colonequals","\\coloneqq"),Br("\\coloncolonequals","\\Coloneqq"),Br("\\equalscolon","\\eqqcolon"),Br("\\equalscoloncolon","\\Eqqcolon"),Br("\\colonminus","\\coloneq"),Br("\\coloncolonminus","\\Coloneq"),Br("\\minuscolon","\\eqcolon"),Br("\\minuscoloncolon","\\Eqcolon"),Br("\\coloncolonapprox","\\Colonapprox"),Br("\\coloncolonsim","\\Colonsim"),Br("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Br("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Br("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Br("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Br("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220c}}"),Br("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Br("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Br("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Br("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Br("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Br("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Br("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Br("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Br("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),Br("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),Br("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),Br("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),Br("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),Br("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),Br("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),Br("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),Br("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),Br("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),Br("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228a}"),Br("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2acb}"),Br("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228b}"),Br("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2acc}"),Br("\\imath","\\html@mathml{\\@imath}{\u0131}"),Br("\\jmath","\\html@mathml{\\@jmath}{\u0237}"),Br("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27e6}}"),Br("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27e7}}"),Br("\u27e6","\\llbracket"),Br("\u27e7","\\rrbracket"),Br("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),Br("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),Br("\u2983","\\lBrace"),Br("\u2984","\\rBrace"),Br("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29b5}}"),Br("\u29b5","\\minuso"),Br("\\darr","\\downarrow"),Br("\\dArr","\\Downarrow"),Br("\\Darr","\\Downarrow"),Br("\\lang","\\langle"),Br("\\rang","\\rangle"),Br("\\uarr","\\uparrow"),Br("\\uArr","\\Uparrow"),Br("\\Uarr","\\Uparrow"),Br("\\N","\\mathbb{N}"),Br("\\R","\\mathbb{R}"),Br("\\Z","\\mathbb{Z}"),Br("\\alef","\\aleph"),Br("\\alefsym","\\aleph"),Br("\\Alpha","\\mathrm{A}"),Br("\\Beta","\\mathrm{B}"),Br("\\bull","\\bullet"),Br("\\Chi","\\mathrm{X}"),Br("\\clubs","\\clubsuit"),Br("\\cnums","\\mathbb{C}"),Br("\\Complex","\\mathbb{C}"),Br("\\Dagger","\\ddagger"),Br("\\diamonds","\\diamondsuit"),Br("\\empty","\\emptyset"),Br("\\Epsilon","\\mathrm{E}"),Br("\\Eta","\\mathrm{H}"),Br("\\exist","\\exists"),Br("\\harr","\\leftrightarrow"),Br("\\hArr","\\Leftrightarrow"),Br("\\Harr","\\Leftrightarrow"),Br("\\hearts","\\heartsuit"),Br("\\image","\\Im"),Br("\\infin","\\infty"),Br("\\Iota","\\mathrm{I}"),Br("\\isin","\\in"),Br("\\Kappa","\\mathrm{K}"),Br("\\larr","\\leftarrow"),Br("\\lArr","\\Leftarrow"),Br("\\Larr","\\Leftarrow"),Br("\\lrarr","\\leftrightarrow"),Br("\\lrArr","\\Leftrightarrow"),Br("\\Lrarr","\\Leftrightarrow"),Br("\\Mu","\\mathrm{M}"),Br("\\natnums","\\mathbb{N}"),Br("\\Nu","\\mathrm{N}"),Br("\\Omicron","\\mathrm{O}"),Br("\\plusmn","\\pm"),Br("\\rarr","\\rightarrow"),Br("\\rArr","\\Rightarrow"),Br("\\Rarr","\\Rightarrow"),Br("\\real","\\Re"),Br("\\reals","\\mathbb{R}"),Br("\\Reals","\\mathbb{R}"),Br("\\Rho","\\mathrm{P}"),Br("\\sdot","\\cdot"),Br("\\sect","\\S"),Br("\\spades","\\spadesuit"),Br("\\sub","\\subset"),Br("\\sube","\\subseteq"),Br("\\supe","\\supseteq"),Br("\\Tau","\\mathrm{T}"),Br("\\thetasym","\\vartheta"),Br("\\weierp","\\wp"),Br("\\Zeta","\\mathrm{Z}"),Br("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Br("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Br("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Br("\\bra","\\mathinner{\\langle{#1}|}"),Br("\\ket","\\mathinner{|{#1}\\rangle}"),Br("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Br("\\Bra","\\left\\langle#1\\right|"),Br("\\Ket","\\left|#1\\right\\rangle");const In=e=>t=>{const r=t.consumeArg().tokens,n=t.consumeArg().tokens,o=t.consumeArg().tokens,s=t.consumeArg().tokens,i=t.macros.get("|"),a=t.macros.get("\\|");t.macros.beginGroup();const l=t=>r=>{e&&(r.macros.set("|",i),o.length&&r.macros.set("\\|",a));let s=t;if(!t&&o.length){"|"===r.future().text&&(r.popToken(),s=!0)}return{tokens:s?o:n,numArgs:0}};t.macros.set("|",l(!1)),o.length&&t.macros.set("\\|",l(!0));const h=t.consumeArg().tokens,c=t.expandTokens([...s,...h,...r]);return t.macros.endGroup(),{tokens:c.reverse(),numArgs:0}};Br("\\bra@ket",In(!1)),Br("\\bra@set",In(!0)),Br("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),Br("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),Br("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),Br("\\angln","{\\angl n}"),Br("\\blue","\\textcolor{##6495ed}{#1}"),Br("\\orange","\\textcolor{##ffa500}{#1}"),Br("\\pink","\\textcolor{##ff00af}{#1}"),Br("\\red","\\textcolor{##df0030}{#1}"),Br("\\green","\\textcolor{##28ae7b}{#1}"),Br("\\gray","\\textcolor{gray}{#1}"),Br("\\purple","\\textcolor{##9d38bd}{#1}"),Br("\\blueA","\\textcolor{##ccfaff}{#1}"),Br("\\blueB","\\textcolor{##80f6ff}{#1}"),Br("\\blueC","\\textcolor{##63d9ea}{#1}"),Br("\\blueD","\\textcolor{##11accd}{#1}"),Br("\\blueE","\\textcolor{##0c7f99}{#1}"),Br("\\tealA","\\textcolor{##94fff5}{#1}"),Br("\\tealB","\\textcolor{##26edd5}{#1}"),Br("\\tealC","\\textcolor{##01d1c1}{#1}"),Br("\\tealD","\\textcolor{##01a995}{#1}"),Br("\\tealE","\\textcolor{##208170}{#1}"),Br("\\greenA","\\textcolor{##b6ffb0}{#1}"),Br("\\greenB","\\textcolor{##8af281}{#1}"),Br("\\greenC","\\textcolor{##74cf70}{#1}"),Br("\\greenD","\\textcolor{##1fab54}{#1}"),Br("\\greenE","\\textcolor{##0d923f}{#1}"),Br("\\goldA","\\textcolor{##ffd0a9}{#1}"),Br("\\goldB","\\textcolor{##ffbb71}{#1}"),Br("\\goldC","\\textcolor{##ff9c39}{#1}"),Br("\\goldD","\\textcolor{##e07d10}{#1}"),Br("\\goldE","\\textcolor{##a75a05}{#1}"),Br("\\redA","\\textcolor{##fca9a9}{#1}"),Br("\\redB","\\textcolor{##ff8482}{#1}"),Br("\\redC","\\textcolor{##f9685d}{#1}"),Br("\\redD","\\textcolor{##e84d39}{#1}"),Br("\\redE","\\textcolor{##bc2612}{#1}"),Br("\\maroonA","\\textcolor{##ffbde0}{#1}"),Br("\\maroonB","\\textcolor{##ff92c6}{#1}"),Br("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Br("\\maroonD","\\textcolor{##ca337c}{#1}"),Br("\\maroonE","\\textcolor{##9e034e}{#1}"),Br("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Br("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Br("\\purpleC","\\textcolor{##aa87ff}{#1}"),Br("\\purpleD","\\textcolor{##7854ab}{#1}"),Br("\\purpleE","\\textcolor{##543b78}{#1}"),Br("\\mintA","\\textcolor{##f5f9e8}{#1}"),Br("\\mintB","\\textcolor{##edf2df}{#1}"),Br("\\mintC","\\textcolor{##e0e5cc}{#1}"),Br("\\grayA","\\textcolor{##f6f7f7}{#1}"),Br("\\grayB","\\textcolor{##f0f1f2}{#1}"),Br("\\grayC","\\textcolor{##e3e5e6}{#1}"),Br("\\grayD","\\textcolor{##d6d8da}{#1}"),Br("\\grayE","\\textcolor{##babec2}{#1}"),Br("\\grayF","\\textcolor{##888d93}{#1}"),Br("\\grayG","\\textcolor{##626569}{#1}"),Br("\\grayH","\\textcolor{##3b3e40}{#1}"),Br("\\grayI","\\textcolor{##21242c}{#1}"),Br("\\kaBlue","\\textcolor{##314453}{#1}"),Br("\\kaGreen","\\textcolor{##71B307}{#1}");const Rn={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Hn{constructor(e,t,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new zn(An,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new Mn(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){let t,r,n;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:n,end:r}=this.consumeArg(["]"]))}else({tokens:n,start:t,end:r}=this.consumeArg());return this.pushToken(new Nr("EOF",r.loc)),this.pushTokens(n),t.range(r,"")}consumeSpaces(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}}consumeArg(e){const t=[],r=e&&e.length>0;r||this.consumeSpaces();const o=this.future();let s,i=0,a=0;do{if(s=this.popToken(),t.push(s),"{"===s.text)++i;else if("}"===s.text){if(--i,-1===i)throw new n("Extra }",s)}else if("EOF"===s.text)throw new n("Unexpected end of input in a macro argument, expected '"+(e&&r?e[a]:"}")+"'",s);if(e&&r)if((0===i||1===i&&"{"===e[a])&&s.text===e[a]){if(++a,a===e.length){t.splice(-a,a);break}}else a=0}while(0!==i||r);return"{"===o.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:o,end:s}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new n("The length of delimiters doesn't match the number of args!");const r=t[0];for(let e=0;e<r.length;e++){const t=this.popToken();if(r[e]!==t.text)throw new n("Use of the macro doesn't match its definition",t)}}const r=[];for(let n=0;n<e;n++)r.push(this.consumeArg(t&&t[n+1]).tokens);return r}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new n("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){const t=this.popToken(),r=t.text,o=t.noexpand?null:this._getExpansion(r);if(null==o||e&&o.unexpandable){if(e&&null==o&&"\\"===r[0]&&!this.isDefined(r))throw new n("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);let s=o.tokens;const i=this.consumeArgs(o.numArgs,o.delimiters);if(o.numArgs){s=s.slice();for(let e=s.length-1;e>=0;--e){let t=s[e];if("#"===t.text){if(0===e)throw new n("Incomplete placeholder at end of macro body",t);if(t=s[--e],"#"===t.text)s.splice(e+1,1);else{if(!/^[1-9]$/.test(t.text))throw new n("Not a valid argument number",t);s.splice(e,2,...i[+t.text-1])}}}}return this.pushTokens(s),s.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){const e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Nr(e)]):void 0}expandTokens(e){const t=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;)if(!1===this.expandOnce(!0)){const e=this.stack.pop();e.treatAsRelax&&(e.noexpand=!1,e.treatAsRelax=!1),t.push(e)}return this.countExpansion(t.length),t}expandMacroAsText(e){const t=this.expandMacro(e);return t?t.map((e=>e.text)).join(""):t}_getExpansion(e){const t=this.macros.get(e);if(null==t)return t;if(1===e.length){const t=this.lexer.catcodes[e];if(null!=t&&13!==t)return}const r="function"==typeof t?t(this):t;if("string"==typeof r){let e=0;if(-1!==r.indexOf("#")){const t=r.replace(/##/g,"");for(;-1!==t.indexOf("#"+(e+1));)++e}const t=new Mn(r,this.settings),n=[];let o=t.lex();for(;"EOF"!==o.text;)n.push(o),o=t.lex();n.reverse();return{tokens:n,numArgs:e}}return r}isDefined(e){return this.macros.has(e)||yn.hasOwnProperty(e)||oe.math.hasOwnProperty(e)||oe.text.hasOwnProperty(e)||Rn.hasOwnProperty(e)}isExpandable(e){const t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:yn.hasOwnProperty(e)&&!yn[e].primitive}}const On=/^[\u208a\u208b\u208c\u208d\u208e\u2080\u2081\u2082\u2083\u2084\u2085\u2086\u2087\u2088\u2089\u2090\u2091\u2095\u1d62\u2c7c\u2096\u2097\u2098\u2099\u2092\u209a\u1d63\u209b\u209c\u1d64\u1d65\u2093\u1d66\u1d67\u1d68\u1d69\u1d6a]/,En=Object.freeze({"\u208a":"+","\u208b":"-","\u208c":"=","\u208d":"(","\u208e":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1d62":"i","\u2c7c":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209a":"p","\u1d63":"r","\u209b":"s","\u209c":"t","\u1d64":"u","\u1d65":"v","\u2093":"x","\u1d66":"\u03b2","\u1d67":"\u03b3","\u1d68":"\u03c1","\u1d69":"\u03d5","\u1d6a":"\u03c7","\u207a":"+","\u207b":"-","\u207c":"=","\u207d":"(","\u207e":")","\u2070":"0","\xb9":"1","\xb2":"2","\xb3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1d2c":"A","\u1d2e":"B","\u1d30":"D","\u1d31":"E","\u1d33":"G","\u1d34":"H","\u1d35":"I","\u1d36":"J","\u1d37":"K","\u1d38":"L","\u1d39":"M","\u1d3a":"N","\u1d3c":"O","\u1d3e":"P","\u1d3f":"R","\u1d40":"T","\u1d41":"U","\u2c7d":"V","\u1d42":"W","\u1d43":"a","\u1d47":"b","\u1d9c":"c","\u1d48":"d","\u1d49":"e","\u1da0":"f","\u1d4d":"g","\u02b0":"h","\u2071":"i","\u02b2":"j","\u1d4f":"k","\u02e1":"l","\u1d50":"m","\u207f":"n","\u1d52":"o","\u1d56":"p","\u02b3":"r","\u02e2":"s","\u1d57":"t","\u1d58":"u","\u1d5b":"v","\u02b7":"w","\u02e3":"x","\u02b8":"y","\u1dbb":"z","\u1d5d":"\u03b2","\u1d5e":"\u03b3","\u1d5f":"\u03b4","\u1d60":"\u03d5","\u1d61":"\u03c7","\u1dbf":"\u03b8"}),Ln={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030c":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030a":{text:"\\r",math:"\\mathring"},"\u030b":{text:"\\H"},"\u0327":{text:"\\c"}},Dn={"\xe1":"a\u0301","\xe0":"a\u0300","\xe4":"a\u0308","\u01df":"a\u0308\u0304","\xe3":"a\u0303","\u0101":"a\u0304","\u0103":"a\u0306","\u1eaf":"a\u0306\u0301","\u1eb1":"a\u0306\u0300","\u1eb5":"a\u0306\u0303","\u01ce":"a\u030c","\xe2":"a\u0302","\u1ea5":"a\u0302\u0301","\u1ea7":"a\u0302\u0300","\u1eab":"a\u0302\u0303","\u0227":"a\u0307","\u01e1":"a\u0307\u0304","\xe5":"a\u030a","\u01fb":"a\u030a\u0301","\u1e03":"b\u0307","\u0107":"c\u0301","\u1e09":"c\u0327\u0301","\u010d":"c\u030c","\u0109":"c\u0302","\u010b":"c\u0307","\xe7":"c\u0327","\u010f":"d\u030c","\u1e0b":"d\u0307","\u1e11":"d\u0327","\xe9":"e\u0301","\xe8":"e\u0300","\xeb":"e\u0308","\u1ebd":"e\u0303","\u0113":"e\u0304","\u1e17":"e\u0304\u0301","\u1e15":"e\u0304\u0300","\u0115":"e\u0306","\u1e1d":"e\u0327\u0306","\u011b":"e\u030c","\xea":"e\u0302","\u1ebf":"e\u0302\u0301","\u1ec1":"e\u0302\u0300","\u1ec5":"e\u0302\u0303","\u0117":"e\u0307","\u0229":"e\u0327","\u1e1f":"f\u0307","\u01f5":"g\u0301","\u1e21":"g\u0304","\u011f":"g\u0306","\u01e7":"g\u030c","\u011d":"g\u0302","\u0121":"g\u0307","\u0123":"g\u0327","\u1e27":"h\u0308","\u021f":"h\u030c","\u0125":"h\u0302","\u1e23":"h\u0307","\u1e29":"h\u0327","\xed":"i\u0301","\xec":"i\u0300","\xef":"i\u0308","\u1e2f":"i\u0308\u0301","\u0129":"i\u0303","\u012b":"i\u0304","\u012d":"i\u0306","\u01d0":"i\u030c","\xee":"i\u0302","\u01f0":"j\u030c","\u0135":"j\u0302","\u1e31":"k\u0301","\u01e9":"k\u030c","\u0137":"k\u0327","\u013a":"l\u0301","\u013e":"l\u030c","\u013c":"l\u0327","\u1e3f":"m\u0301","\u1e41":"m\u0307","\u0144":"n\u0301","\u01f9":"n\u0300","\xf1":"n\u0303","\u0148":"n\u030c","\u1e45":"n\u0307","\u0146":"n\u0327","\xf3":"o\u0301","\xf2":"o\u0300","\xf6":"o\u0308","\u022b":"o\u0308\u0304","\xf5":"o\u0303","\u1e4d":"o\u0303\u0301","\u1e4f":"o\u0303\u0308","\u022d":"o\u0303\u0304","\u014d":"o\u0304","\u1e53":"o\u0304\u0301","\u1e51":"o\u0304\u0300","\u014f":"o\u0306","\u01d2":"o\u030c","\xf4":"o\u0302","\u1ed1":"o\u0302\u0301","\u1ed3":"o\u0302\u0300","\u1ed7":"o\u0302\u0303","\u022f":"o\u0307","\u0231":"o\u0307\u0304","\u0151":"o\u030b","\u1e55":"p\u0301","\u1e57":"p\u0307","\u0155":"r\u0301","\u0159":"r\u030c","\u1e59":"r\u0307","\u0157":"r\u0327","\u015b":"s\u0301","\u1e65":"s\u0301\u0307","\u0161":"s\u030c","\u1e67":"s\u030c\u0307","\u015d":"s\u0302","\u1e61":"s\u0307","\u015f":"s\u0327","\u1e97":"t\u0308","\u0165":"t\u030c","\u1e6b":"t\u0307","\u0163":"t\u0327","\xfa":"u\u0301","\xf9":"u\u0300","\xfc":"u\u0308","\u01d8":"u\u0308\u0301","\u01dc":"u\u0308\u0300","\u01d6":"u\u0308\u0304","\u01da":"u\u0308\u030c","\u0169":"u\u0303","\u1e79":"u\u0303\u0301","\u016b":"u\u0304","\u1e7b":"u\u0304\u0308","\u016d":"u\u0306","\u01d4":"u\u030c","\xfb":"u\u0302","\u016f":"u\u030a","\u0171":"u\u030b","\u1e7d":"v\u0303","\u1e83":"w\u0301","\u1e81":"w\u0300","\u1e85":"w\u0308","\u0175":"w\u0302","\u1e87":"w\u0307","\u1e98":"w\u030a","\u1e8d":"x\u0308","\u1e8b":"x\u0307","\xfd":"y\u0301","\u1ef3":"y\u0300","\xff":"y\u0308","\u1ef9":"y\u0303","\u0233":"y\u0304","\u0177":"y\u0302","\u1e8f":"y\u0307","\u1e99":"y\u030a","\u017a":"z\u0301","\u017e":"z\u030c","\u1e91":"z\u0302","\u017c":"z\u0307","\xc1":"A\u0301","\xc0":"A\u0300","\xc4":"A\u0308","\u01de":"A\u0308\u0304","\xc3":"A\u0303","\u0100":"A\u0304","\u0102":"A\u0306","\u1eae":"A\u0306\u0301","\u1eb0":"A\u0306\u0300","\u1eb4":"A\u0306\u0303","\u01cd":"A\u030c","\xc2":"A\u0302","\u1ea4":"A\u0302\u0301","\u1ea6":"A\u0302\u0300","\u1eaa":"A\u0302\u0303","\u0226":"A\u0307","\u01e0":"A\u0307\u0304","\xc5":"A\u030a","\u01fa":"A\u030a\u0301","\u1e02":"B\u0307","\u0106":"C\u0301","\u1e08":"C\u0327\u0301","\u010c":"C\u030c","\u0108":"C\u0302","\u010a":"C\u0307","\xc7":"C\u0327","\u010e":"D\u030c","\u1e0a":"D\u0307","\u1e10":"D\u0327","\xc9":"E\u0301","\xc8":"E\u0300","\xcb":"E\u0308","\u1ebc":"E\u0303","\u0112":"E\u0304","\u1e16":"E\u0304\u0301","\u1e14":"E\u0304\u0300","\u0114":"E\u0306","\u1e1c":"E\u0327\u0306","\u011a":"E\u030c","\xca":"E\u0302","\u1ebe":"E\u0302\u0301","\u1ec0":"E\u0302\u0300","\u1ec4":"E\u0302\u0303","\u0116":"E\u0307","\u0228":"E\u0327","\u1e1e":"F\u0307","\u01f4":"G\u0301","\u1e20":"G\u0304","\u011e":"G\u0306","\u01e6":"G\u030c","\u011c":"G\u0302","\u0120":"G\u0307","\u0122":"G\u0327","\u1e26":"H\u0308","\u021e":"H\u030c","\u0124":"H\u0302","\u1e22":"H\u0307","\u1e28":"H\u0327","\xcd":"I\u0301","\xcc":"I\u0300","\xcf":"I\u0308","\u1e2e":"I\u0308\u0301","\u0128":"I\u0303","\u012a":"I\u0304","\u012c":"I\u0306","\u01cf":"I\u030c","\xce":"I\u0302","\u0130":"I\u0307","\u0134":"J\u0302","\u1e30":"K\u0301","\u01e8":"K\u030c","\u0136":"K\u0327","\u0139":"L\u0301","\u013d":"L\u030c","\u013b":"L\u0327","\u1e3e":"M\u0301","\u1e40":"M\u0307","\u0143":"N\u0301","\u01f8":"N\u0300","\xd1":"N\u0303","\u0147":"N\u030c","\u1e44":"N\u0307","\u0145":"N\u0327","\xd3":"O\u0301","\xd2":"O\u0300","\xd6":"O\u0308","\u022a":"O\u0308\u0304","\xd5":"O\u0303","\u1e4c":"O\u0303\u0301","\u1e4e":"O\u0303\u0308","\u022c":"O\u0303\u0304","\u014c":"O\u0304","\u1e52":"O\u0304\u0301","\u1e50":"O\u0304\u0300","\u014e":"O\u0306","\u01d1":"O\u030c","\xd4":"O\u0302","\u1ed0":"O\u0302\u0301","\u1ed2":"O\u0302\u0300","\u1ed6":"O\u0302\u0303","\u022e":"O\u0307","\u0230":"O\u0307\u0304","\u0150":"O\u030b","\u1e54":"P\u0301","\u1e56":"P\u0307","\u0154":"R\u0301","\u0158":"R\u030c","\u1e58":"R\u0307","\u0156":"R\u0327","\u015a":"S\u0301","\u1e64":"S\u0301\u0307","\u0160":"S\u030c","\u1e66":"S\u030c\u0307","\u015c":"S\u0302","\u1e60":"S\u0307","\u015e":"S\u0327","\u0164":"T\u030c","\u1e6a":"T\u0307","\u0162":"T\u0327","\xda":"U\u0301","\xd9":"U\u0300","\xdc":"U\u0308","\u01d7":"U\u0308\u0301","\u01db":"U\u0308\u0300","\u01d5":"U\u0308\u0304","\u01d9":"U\u0308\u030c","\u0168":"U\u0303","\u1e78":"U\u0303\u0301","\u016a":"U\u0304","\u1e7a":"U\u0304\u0308","\u016c":"U\u0306","\u01d3":"U\u030c","\xdb":"U\u0302","\u016e":"U\u030a","\u0170":"U\u030b","\u1e7c":"V\u0303","\u1e82":"W\u0301","\u1e80":"W\u0300","\u1e84":"W\u0308","\u0174":"W\u0302","\u1e86":"W\u0307","\u1e8c":"X\u0308","\u1e8a":"X\u0307","\xdd":"Y\u0301","\u1ef2":"Y\u0300","\u0178":"Y\u0308","\u1ef8":"Y\u0303","\u0232":"Y\u0304","\u0176":"Y\u0302","\u1e8e":"Y\u0307","\u0179":"Z\u0301","\u017d":"Z\u030c","\u1e90":"Z\u0302","\u017b":"Z\u0307","\u03ac":"\u03b1\u0301","\u1f70":"\u03b1\u0300","\u1fb1":"\u03b1\u0304","\u1fb0":"\u03b1\u0306","\u03ad":"\u03b5\u0301","\u1f72":"\u03b5\u0300","\u03ae":"\u03b7\u0301","\u1f74":"\u03b7\u0300","\u03af":"\u03b9\u0301","\u1f76":"\u03b9\u0300","\u03ca":"\u03b9\u0308","\u0390":"\u03b9\u0308\u0301","\u1fd2":"\u03b9\u0308\u0300","\u1fd1":"\u03b9\u0304","\u1fd0":"\u03b9\u0306","\u03cc":"\u03bf\u0301","\u1f78":"\u03bf\u0300","\u03cd":"\u03c5\u0301","\u1f7a":"\u03c5\u0300","\u03cb":"\u03c5\u0308","\u03b0":"\u03c5\u0308\u0301","\u1fe2":"\u03c5\u0308\u0300","\u1fe1":"\u03c5\u0304","\u1fe0":"\u03c5\u0306","\u03ce":"\u03c9\u0301","\u1f7c":"\u03c9\u0300","\u038e":"\u03a5\u0301","\u1fea":"\u03a5\u0300","\u03ab":"\u03a5\u0308","\u1fe9":"\u03a5\u0304","\u1fe8":"\u03a5\u0306","\u038f":"\u03a9\u0301","\u1ffa":"\u03a9\u0300"};class Vn{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Hn(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new n("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{const e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){const t=this.nextToken;this.consume(),this.gullet.pushToken(new Nr("}")),this.gullet.pushTokens(e);const r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r}parseExpression(e,t){const r=[];for(;;){"math"===this.mode&&this.consumeSpaces();const n=this.fetch();if(-1!==Vn.endOfExpression.indexOf(n.text))break;if(t&&n.text===t)break;if(e&&yn[n.text]&&yn[n.text].infix)break;const o=this.parseAtom(t);if(!o)break;"internal"!==o.type&&r.push(o)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){let t,r=-1;for(let o=0;o<e.length;o++)if("infix"===e[o].type){if(-1!==r)throw new n("only one infix operator per group",e[o].token);r=o,t=e[o].replaceWith}if(-1!==r&&t){let n,o;const s=e.slice(0,r),i=e.slice(r+1);let a;return n=1===s.length&&"ordgroup"===s[0].type?s[0]:{type:"ordgroup",mode:this.mode,body:s},o=1===i.length&&"ordgroup"===i[0].type?i[0]:{type:"ordgroup",mode:this.mode,body:i},a="\\\\abovefrac"===t?this.callFunction(t,[n,e[r],o],[]):this.callFunction(t,[n,o],[]),[a]}return e}handleSupSubscript(e){const t=this.fetch(),r=t.text;this.consume(),this.consumeSpaces();const o=this.parseGroup(e);if(!o)throw new n("Expected group after '"+r+"'",t);return o}formatUnsupportedCmd(e){const t=[];for(let r=0;r<e.length;r++)t.push({type:"textord",mode:"text",text:e[r]});const r={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[r]}}parseAtom(e){const t=this.parseGroup("atom",e);if("text"===this.mode)return t;let r,o;for(;;){this.consumeSpaces();const e=this.fetch();if("\\limits"===e.text||"\\nolimits"===e.text){if(t&&"op"===t.type){const r="\\limits"===e.text;t.limits=r,t.alwaysHandleSupSub=!0}else{if(!t||"operatorname"!==t.type)throw new n("Limit controls must follow a math operator",e);t.alwaysHandleSupSub&&(t.limits="\\limits"===e.text)}this.consume()}else if("^"===e.text){if(r)throw new n("Double superscript",e);r=this.handleSupSubscript("superscript")}else if("_"===e.text){if(o)throw new n("Double subscript",e);o=this.handleSupSubscript("subscript")}else if("'"===e.text){if(r)throw new n("Double superscript",e);const t={type:"textord",mode:this.mode,text:"\\prime"},o=[t];for(this.consume();"'"===this.fetch().text;)o.push(t),this.consume();"^"===this.fetch().text&&o.push(this.handleSupSubscript("superscript")),r={type:"ordgroup",mode:this.mode,body:o}}else{if(!En[e.text])break;{const t=On.test(e.text),n=[];for(n.push(new Nr(En[e.text])),this.consume();;){const e=this.fetch().text;if(!En[e])break;if(On.test(e)!==t)break;n.unshift(new Nr(En[e])),this.consume()}const s=this.subparse(n);t?o={type:"ordgroup",mode:"math",body:s}:r={type:"ordgroup",mode:"math",body:s}}}}return r||o?{type:"supsub",mode:this.mode,base:t,sup:r,sub:o}:t}parseFunction(e,t){const r=this.fetch(),o=r.text,s=yn[o];if(!s)return null;if(this.consume(),t&&"atom"!==t&&!s.allowedInArgument)throw new n("Got function '"+o+"' with no arguments"+(t?" as "+t:""),r);if("text"===this.mode&&!s.allowedInText)throw new n("Can't use function '"+o+"' in text mode",r);if("math"===this.mode&&!1===s.allowedInMath)throw new n("Can't use function '"+o+"' in math mode",r);const{args:i,optArgs:a}=this.parseArguments(o,s);return this.callFunction(o,i,a,r,e)}callFunction(e,t,r,o,s){const i={funcName:e,parser:this,token:o,breakOnTokenText:s},a=yn[e];if(a&&a.handler)return a.handler(i,t,r);throw new n("No function handler for "+e)}parseArguments(e,t){const r=t.numArgs+t.numOptionalArgs;if(0===r)return{args:[],optArgs:[]};const o=[],s=[];for(let i=0;i<r;i++){let r=t.argTypes&&t.argTypes[i];const a=i<t.numOptionalArgs;(t.primitive&&null==r||"sqrt"===t.type&&1===i&&null==s[0])&&(r="primitive");const l=this.parseGroupOfType("argument to '"+e+"'",r,a);if(a)s.push(l);else{if(null==l)throw new n("Null argument, please report this as a bug");o.push(l)}}return{args:o,optArgs:s}}parseGroupOfType(e,t,r){switch(t){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseArgumentGroup(r,t);case"hbox":{const e=this.parseArgumentGroup(r,"text");return null!=e?{type:"styling",mode:e.mode,body:[e],style:"text"}:null}case"raw":{const e=this.parseStringGroup("raw",r);return null!=e?{type:"raw",mode:"text",string:e.text}:null}case"primitive":{if(r)throw new n("A primitive argument cannot be optional");const t=this.parseGroup(e);if(null==t)throw new n("Expected group as "+e,this.fetch());return t}case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new n("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e,t){const r=this.gullet.scanArgument(t);if(null==r)return null;let n,o="";for(;"EOF"!==(n=this.fetch()).text;)o+=n.text,this.consume();return this.consume(),r.text=o,r}parseRegexGroup(e,t){const r=this.fetch();let o,s=r,i="";for(;"EOF"!==(o=this.fetch()).text&&e.test(i+o.text);)s=o,i+=s.text,this.consume();if(""===i)throw new n("Invalid "+t+": '"+r.text+"'",r);return r.range(s,i)}parseColorGroup(e){const t=this.parseStringGroup("color",e);if(null==t)return null;const r=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!r)throw new n("Invalid color: '"+t.text+"'",t);let o=r[0];return/^[0-9a-f]{6}$/i.test(o)&&(o="#"+o),{type:"color-token",mode:this.mode,color:o}}parseSizeGroup(e){let t,r=!1;if(this.gullet.consumeSpaces(),t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"),!t)return null;e||0!==t.text.length||(t.text="0pt",r=!0);const o=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!o)throw new n("Invalid size: '"+t.text+"'",t);const s={number:+(o[1]+o[2]),unit:o[3]};if(!V(s))throw new n("Invalid unit: '"+s.unit+"'",t);return{type:"size",mode:this.mode,value:s,isBlank:r}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);const t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==t)return null;const r=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:r}}parseArgumentGroup(e,t){const r=this.gullet.scanArgument(e);if(null==r)return null;const n=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();const o=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();const s={type:"ordgroup",mode:this.mode,loc:r.loc,body:o};return t&&this.switchMode(n),s}parseGroup(e,t){const r=this.fetch(),o=r.text;let s;if("{"===o||"\\begingroup"===o){this.consume();const e="{"===o?"}":"\\endgroup";this.gullet.beginGroup();const t=this.parseExpression(!1,e),n=this.fetch();this.expect(e),this.gullet.endGroup(),s={type:"ordgroup",mode:this.mode,loc:Cr.range(r,n),body:t,semisimple:"\\begingroup"===o||void 0}}else if(s=this.parseFunction(t,e)||this.parseSymbol(),null==s&&"\\"===o[0]&&!Rn.hasOwnProperty(o)){if(this.settings.throwOnError)throw new n("Undefined control sequence: "+o,r);s=this.formatUnsupportedCmd(o),this.consume()}return s}formLigatures(e){let t=e.length-1;for(let r=0;r<t;++r){const n=e[r],o=n.text;"-"===o&&"-"===e[r+1].text&&(r+1<t&&"-"===e[r+2].text?(e.splice(r,3,{type:"textord",mode:"text",loc:Cr.range(n,e[r+2]),text:"---"}),t-=2):(e.splice(r,2,{type:"textord",mode:"text",loc:Cr.range(n,e[r+1]),text:"--"}),t-=1)),"'"!==o&&"`"!==o||e[r+1].text!==o||(e.splice(r,2,{type:"textord",mode:"text",loc:Cr.range(n,e[r+1]),text:o+o}),t-=1)}}parseSymbol(){const e=this.fetch();let t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();let e=t.slice(5);const r="*"===e.charAt(0);if(r&&(e=e.slice(1)),e.length<2||e.charAt(0)!==e.slice(-1))throw new n("\\verb assertion failed --\n please report what input caused this bug");return e=e.slice(1,-1),{type:"verb",mode:"text",body:e,star:r}}Dn.hasOwnProperty(t[0])&&!oe[this.mode][t[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=Dn[t[0]]+t.slice(1));const r=kn.exec(t);let o;if(r&&(t=t.substring(0,r.index),"i"===t?t="\u0131":"j"===t&&(t="\u0237")),oe[this.mode][t]){this.settings.strict&&"math"===this.mode&&Ae.indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);const r=oe[this.mode][t].group,n=Cr.range(e);let s;if(te.hasOwnProperty(r)){const e=r;s={type:"atom",mode:this.mode,family:e,loc:n,text:t}}else s={type:r,mode:this.mode,loc:n,text:t};o=s}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(S(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),o={type:"textord",mode:"text",loc:Cr.range(e),text:t}}if(this.consume(),r)for(let t=0;t<r[0].length;t++){const s=r[0][t];if(!Ln[s])throw new n("Unknown accent ' "+s+"'",e);const i=Ln[s][this.mode]||Ln[s].text;if(!i)throw new n("Accent "+s+" unsupported in "+this.mode+" mode",e);o={type:"accent",mode:this.mode,loc:Cr.range(e),label:i,isStretchy:!1,isShifty:!0,base:o}}return o}}Vn.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var Pn=function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");const r=new Vn(e,t);delete r.gullet.macros.current["\\df@tag"];let o=r.parse();if(delete r.gullet.macros.current["\\current@color"],delete r.gullet.macros.current["\\color"],r.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new n("\\tag works only in display equations");o=[{type:"tag",mode:"text",body:o,tag:r.subparse([new Nr("\\df@tag")])}]}return o};let Fn=function(e,t,r){t.textContent="";const n=Un(e,r).toNode();t.appendChild(n)};"undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!=typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),Fn=function(){throw new n("KaTeX doesn't work in quirks mode.")});const Gn=function(e,t,r){if(r.throwOnError||!(e instanceof n))throw e;const o=Ve.makeSpan(["katex-error"],[new Z(t)]);return o.setAttribute("title",e.toString()),o.setAttribute("style","color:"+r.errorColor),o},Un=function(e,t){const r=new m(t);try{const t=Pn(e,r);return zt(t,e,r)}catch(t){return Gn(t,e,r)}};var Yn={version:"0.16.11",render:Fn,renderToString:function(e,t){return Un(e,t).toMarkup()},ParseError:n,SETTINGS_SCHEMA:h,__parse:function(e,t){const r=new m(t);return Pn(e,r)},__renderToDomTree:Un,__renderToHTMLTree:function(e,t){const r=new m(t);try{return function(e,t,r){const n=mt(e,St(r)),o=Ve.makeSpan(["katex"],[n]);return Mt(o,r)}(Pn(e,r),0,r)}catch(t){return Gn(t,e,r)}},__setFontMetrics:function(e,t){T[e]=t},__defineSymbol:se,__defineFunction:je,__defineMacro:Br,__domTree:{Span:W,Anchor:_,SymbolNode:Z,SvgNode:K,PathNode:J,LineNode:Q}};return t=t.default}()}));\ No newline at end of filediff --git a/sdk/webui/static/vendor/marked.min.js b/sdk/webui/static/vendor/marked.min.jsnew file mode 100644index 0000000..a91afe7--- /dev/null+++ b/sdk/webui/static/vendor/marked.min.js@@ -0,0 +1,6 @@+/**+ * marked v12.0.2 - a markdown parser+ * Copyright (c) 2011-2024, Christopher Jeffrey. (MIT Licensed)+ * https://github.com/markedjs/marked+ */+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).marked={})}(this,(function(e){"use strict";function t(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function n(t){e.defaults=t}e.defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};const s=/[&<>"']/,r=new RegExp(s.source,"g"),i=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,l=new RegExp(i.source,"g"),o={"&":"&","<":"<",">":">",'"':""","'":"'"},a=e=>o[e];function c(e,t){if(t){if(s.test(e))return e.replace(r,a)}else if(i.test(e))return e.replace(l,a);return e}const h=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function p(e){return e.replace(h,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const u=/(^|[^\[])\^/g;function k(e,t){let n="string"==typeof e?e:e.source;t=t||"";const s={replace:(e,t)=>{let r="string"==typeof t?t:t.source;return r=r.replace(u,"$1"),n=n.replace(e,r),s},getRegex:()=>new RegExp(n,t)};return s}function g(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return null}return e}const f={exec:()=>null};function d(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let s=!1,r=t;for(;--r>=0&&"\\"===n[r];)s=!s;return s?"|":" |"})).split(/ \|/);let s=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;s<n.length;s++)n[s]=n[s].trim().replace(/\\\|/g,"|");return n}function x(e,t,n){const s=e.length;if(0===s)return"";let r=0;for(;r<s;){const i=e.charAt(s-r-1);if(i!==t||n){if(i===t||!n)break;r++}else r++}return e.slice(0,s-r)}function b(e,t,n,s){const r=t.href,i=t.title?c(t.title):null,l=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){s.state.inLink=!0;const e={type:"link",raw:n,href:r,title:i,text:l,tokens:s.inlineTokens(l)};return s.state.inLink=!1,e}return{type:"image",raw:n,href:r,title:i,text:c(l)}}class w{options;rules;lexer;constructor(t){this.options=t||e.defaults}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:x(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const s=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=s.length?e.slice(s.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=x(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=t[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1");e=x(e.replace(/^ *>[ \t]?/gm,""),"\n");const n=this.lexer.state.top;this.lexer.state.top=!0;const s=this.lexer.blockTokens(e);return this.lexer.state.top=n,{type:"blockquote",raw:t[0],tokens:s,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const s=n.length>1,r={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");const i=new RegExp(`^( {0,3}${n})((?:[\t ][^\\n]*)?(?:\\n|$))`);let l="",o="",a=!1;for(;e;){let n=!1;if(!(t=i.exec(e)))break;if(this.rules.block.hr.test(e))break;l=t[0],e=e.substring(l.length);let s=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),c=e.split("\n",1)[0],h=0;this.options.pedantic?(h=2,o=s.trimStart()):(h=t[2].search(/[^ ]/),h=h>4?1:h,o=s.slice(h),h+=t[1].length);let p=!1;if(!s&&/^ *$/.test(c)&&(l+=c+"\n",e=e.substring(c.length+1),n=!0),!n){const t=new RegExp(`^ {0,${Math.min(3,h-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,h-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),r=new RegExp(`^ {0,${Math.min(3,h-1)}}(?:\`\`\`|~~~)`),i=new RegExp(`^ {0,${Math.min(3,h-1)}}#`);for(;e;){const a=e.split("\n",1)[0];if(c=a,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),r.test(c))break;if(i.test(c))break;if(t.test(c))break;if(n.test(e))break;if(c.search(/[^ ]/)>=h||!c.trim())o+="\n"+c.slice(h);else{if(p)break;if(s.search(/[^ ]/)>=4)break;if(r.test(s))break;if(i.test(s))break;if(n.test(s))break;o+="\n"+c}p||c.trim()||(p=!0),l+=a+"\n",e=e.substring(a.length+1),s=c.slice(h)}}r.loose||(a?r.loose=!0:/\n *\n *$/.test(l)&&(a=!0));let u,k=null;this.options.gfm&&(k=/^\[[ xX]\] /.exec(o),k&&(u="[ ] "!==k[0],o=o.replace(/^\[[ xX]\] +/,""))),r.items.push({type:"list_item",raw:l,task:!!k,checked:u,loose:!1,text:o,tokens:[]}),r.raw+=l}r.items[r.items.length-1].raw=l.trimEnd(),r.items[r.items.length-1].text=o.trimEnd(),r.raw=r.raw.trimEnd();for(let e=0;e<r.items.length;e++)if(this.lexer.state.top=!1,r.items[e].tokens=this.lexer.blockTokens(r.items[e].text,[]),!r.loose){const t=r.items[e].tokens.filter((e=>"space"===e.type)),n=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));r.loose=n}if(r.loose)for(let e=0;e<r.items.length;e++)r.items[e].loose=!0;return r}}html(e){const t=this.rules.block.html.exec(e);if(t){return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(/\s+/g," "),n=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:s}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const n=d(t[1]),s=t[2].replace(/^\||\| *$/g,"").split("|"),r=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===s.length){for(const e of s)/^ *-+: *$/.test(e)?i.align.push("right"):/^ *:-+: *$/.test(e)?i.align.push("center"):/^ *:-+ *$/.test(e)?i.align.push("left"):i.align.push(null);for(const e of n)i.header.push({text:e,tokens:this.lexer.inline(e)});for(const e of r)i.rows.push(d(e,i.header.length).map((e=>({text:e,tokens:this.lexer.inline(e)}))));return i}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:c(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const t=x(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let s=0;s<e.length;s++)if("\\"===e[s])s++;else if(e[s]===t[0])n++;else if(e[s]===t[1]&&(n--,n<0))return s;return-1}(t[2],"()");if(e>-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],s="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],s=e[3])}else s=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^</.test(n)&&(n=this.options.pedantic&&!/>$/.test(e)?n.slice(1):n.slice(1,-1)),b(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:s?s.replace(this.rules.inline.anyPunctuation,"$1"):s},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return b(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!s)return;if(s[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(s[1]||s[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...s[0]].length-1;let r,i,l=n,o=0;const a="*"===s[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(a.lastIndex=0,t=t.slice(-1*e.length+n);null!=(s=a.exec(t));){if(r=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!r)continue;if(i=[...r].length,s[3]||s[4]){l+=i;continue}if((s[5]||s[6])&&n%3&&!((n+i)%3)){o+=i;continue}if(l-=i,l>0)continue;i=Math.min(i,i+l+o);const t=[...s[0]][0].length,a=e.slice(0,n+s.index+t+i);if(Math.min(n,i)%2){const e=a.slice(1,-1);return{type:"em",raw:a,text:e,tokens:this.lexer.inlineTokens(e)}}const c=a.slice(2,-2);return{type:"strong",raw:a,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),s=/^ /.test(e)&&/ $/.test(e);return n&&s&&(e=e.substring(1,e.length-1)),e=c(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=c(t[1]),n="mailto:"+e):(e=c(t[1]),n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=c(t[0]),n="mailto:"+e;else{let s;do{s=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(s!==t[0]);e=c(t[0]),n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:c(t[0]),{type:"text",raw:t[0],text:e}}}}const m=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,y=/(?:[*+-]|\d{1,9}[.)])/,$=k(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,y).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),z=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,T=/(?!\s*\])(?:\\.|[^\[\]\\])+/,R=k(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",T).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_=k(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,y).getRegex(),A="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",S=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,I=k("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",S).replace("tag",A).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),E=k(z).replace("hr",m).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",A).getRegex(),q={blockquote:k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",E).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:R,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:m,html:I,lheading:$,list:_,newline:/^(?: *(?:\n|$))+/,paragraph:E,table:f,text:/^[^\n]+/},Z=k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",m).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",A).getRegex(),L={...q,table:Z,paragraph:k(z).replace("hr",m).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Z).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",A).getRegex()},P={...q,html:k("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",S).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:f,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:k(z).replace("hr",m).replace("heading"," *#{1,6} *[^\n]").replace("lheading",$).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Q=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,v=/^( {2,}|\\)\n(?!\s*$)/,B="\\p{P}\\p{S}",C=k(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,B).getRegex(),M=k(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,B).getRegex(),O=k("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,B).getRegex(),D=k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,B).getRegex(),j=k(/\\([punct])/,"gu").replace(/punct/g,B).getRegex(),H=k(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),U=k(S).replace("(?:--\x3e|$)","--\x3e").getRegex(),X=k("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",U).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),F=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,N=k(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",F).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),G=k(/^!?\[(label)\]\[(ref)\]/).replace("label",F).replace("ref",T).getRegex(),J=k(/^!?\[(ref)\](?:\[\])?/).replace("ref",T).getRegex(),K={_backpedal:f,anyPunctuation:j,autolink:H,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:v,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:f,emStrongLDelim:M,emStrongRDelimAst:O,emStrongRDelimUnd:D,escape:Q,link:N,nolink:J,punctuation:C,reflink:G,reflinkSearch:k("reflink|nolink(?!\\()","g").replace("reflink",G).replace("nolink",J).getRegex(),tag:X,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:f},V={...K,link:k(/^!?\[(label)\]\((.*?)\)/).replace("label",F).getRegex(),reflink:k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",F).getRegex()},W={...K,escape:k(Q).replace("])","~|])").getRegex(),url:k(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Y={...W,br:k(v).replace("{2,}","*").getRegex(),text:k(W.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ee={normal:q,gfm:L,pedantic:P},te={normal:K,gfm:W,breaks:Y,pedantic:V};class ne{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||e.defaults,this.options.tokenizer=this.options.tokenizer||new w,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={block:ee.normal,inline:te.normal};this.options.pedantic?(n.block=ee.pedantic,n.inline=te.pedantic):this.options.gfm&&(n.block=ee.gfm,this.options.breaks?n.inline=te.breaks:n.inline=te.gfm),this.tokenizer.rules=n}static get rules(){return{block:ee,inline:te}}static lex(e,t){return new ne(t).lex(e)}static lexInline(e,t){return new ne(t).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){const t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[]){let n,s,r,i;for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,((e,t,n)=>t+" ".repeat(n.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((s=>!!(n=s.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),s=t[t.length-1],!s||"paragraph"!==s.type&&"text"!==s.type?t.push(n):(s.raw+="\n"+n.raw,s.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=s.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),s=t[t.length-1],!s||"paragraph"!==s.type&&"text"!==s.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(s.raw+="\n"+n.raw,s.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=s.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(r=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let s;this.options.extensions.startBlock.forEach((e=>{s=e.call({lexer:this},n),"number"==typeof s&&s>=0&&(t=Math.min(t,s))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(r)))s=t[t.length-1],i&&"paragraph"===s.type?(s.raw+="\n"+n.raw,s.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n),i=r.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),s=t[t.length-1],s&&"text"===s.type?(s.raw+="\n"+n.raw,s.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,s,r,i,l,o,a=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(a));)e.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(a));)a=a.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.anyPunctuation.exec(a));)a=a.slice(0,i.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(l||(o=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((s=>!!(n=s.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),s=t[t.length-1],s&&"text"===n.type&&"text"===s.type?(s.raw+=n.raw,s.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),s=t[t.length-1],s&&"text"===n.type&&"text"===s.type?(s.raw+=n.raw,s.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,a,o))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e))){if(r=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let s;this.options.extensions.startInline.forEach((e=>{s=e.call({lexer:this},n),"number"==typeof s&&s>=0&&(t=Math.min(t,s))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(r))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(o=n.raw.slice(-1)),l=!0,s=t[t.length-1],s&&"text"===s.type?(s.raw+=n.raw,s.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}}class se{options;constructor(t){this.options=t||e.defaults}code(e,t,n){const s=(t||"").match(/^\S*/)?.[0];return e=e.replace(/\n$/,"")+"\n",s?'<pre><code class="language-'+c(s)+'">'+(n?e:c(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:c(e,!0))+"</code></pre>\n"}blockquote(e){return`<blockquote>\n${e}</blockquote>\n`}html(e,t){return e}heading(e,t,n){return`<h${t}>${e}</h${t}>\n`}hr(){return"<hr>\n"}list(e,t,n){const s=t?"ol":"ul";return"<"+s+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+s+">\n"}listitem(e,t,n){return`<li>${e}</li>\n`}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(e){return`<p>${e}</p>\n`}table(e,t){return t&&(t=`<tbody>${t}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return`<tr>\n${e}</tr>\n`}tablecell(e,t){const n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>\n`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return"<br>"}del(e){return`<del>${e}</del>`}link(e,t,n){const s=g(e);if(null===s)return n;let r='<a href="'+(e=s)+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>",r}image(e,t,n){const s=g(e);if(null===s)return n;let r=`<img src="${e=s}" alt="${n}"`;return t&&(r+=` title="${t}"`),r+=">",r}text(e){return e}}class re{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class ie{options;renderer;textRenderer;constructor(t){this.options=t||e.defaults,this.options.renderer=this.options.renderer||new se,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new re}static parse(e,t){return new ie(t).parse(e)}static parseInline(e,t){return new ie(t).parseInline(e)}parse(e,t=!0){let n="";for(let s=0;s<e.length;s++){const r=e[s];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]){const e=r,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){n+=t||"";continue}}switch(r.type){case"space":continue;case"hr":n+=this.renderer.hr();continue;case"heading":{const e=r;n+=this.renderer.heading(this.parseInline(e.tokens),e.depth,p(this.parseInline(e.tokens,this.textRenderer)));continue}case"code":{const e=r;n+=this.renderer.code(e.text,e.lang,!!e.escaped);continue}case"table":{const e=r;let t="",s="";for(let t=0;t<e.header.length;t++)s+=this.renderer.tablecell(this.parseInline(e.header[t].tokens),{header:!0,align:e.align[t]});t+=this.renderer.tablerow(s);let i="";for(let t=0;t<e.rows.length;t++){const n=e.rows[t];s="";for(let t=0;t<n.length;t++)s+=this.renderer.tablecell(this.parseInline(n[t].tokens),{header:!1,align:e.align[t]});i+=this.renderer.tablerow(s)}n+=this.renderer.table(t,i);continue}case"blockquote":{const e=r,t=this.parse(e.tokens);n+=this.renderer.blockquote(t);continue}case"list":{const e=r,t=e.ordered,s=e.start,i=e.loose;let l="";for(let t=0;t<e.items.length;t++){const n=e.items[t],s=n.checked,r=n.task;let o="";if(n.task){const e=this.renderer.checkbox(!!s);i?n.tokens.length>0&&"paragraph"===n.tokens[0].type?(n.tokens[0].text=e+" "+n.tokens[0].text,n.tokens[0].tokens&&n.tokens[0].tokens.length>0&&"text"===n.tokens[0].tokens[0].type&&(n.tokens[0].tokens[0].text=e+" "+n.tokens[0].tokens[0].text)):n.tokens.unshift({type:"text",text:e+" "}):o+=e+" "}o+=this.parse(n.tokens,i),l+=this.renderer.listitem(o,r,!!s)}n+=this.renderer.list(l,t,s);continue}case"html":{const e=r;n+=this.renderer.html(e.text,e.block);continue}case"paragraph":{const e=r;n+=this.renderer.paragraph(this.parseInline(e.tokens));continue}case"text":{let i=r,l=i.tokens?this.parseInline(i.tokens):i.text;for(;s+1<e.length&&"text"===e[s+1].type;)i=e[++s],l+="\n"+(i.tokens?this.parseInline(i.tokens):i.text);n+=t?this.renderer.paragraph(l):l;continue}default:{const e='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}parseInline(e,t){t=t||this.renderer;let n="";for(let s=0;s<e.length;s++){const r=e[s];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]){const e=this.options.extensions.renderers[r.type].call({parser:this},r);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)){n+=e||"";continue}}switch(r.type){case"escape":{const e=r;n+=t.text(e.text);break}case"html":{const e=r;n+=t.html(e.text);break}case"link":{const e=r;n+=t.link(e.href,e.title,this.parseInline(e.tokens,t));break}case"image":{const e=r;n+=t.image(e.href,e.title,e.text);break}case"strong":{const e=r;n+=t.strong(this.parseInline(e.tokens,t));break}case"em":{const e=r;n+=t.em(this.parseInline(e.tokens,t));break}case"codespan":{const e=r;n+=t.codespan(e.text);break}case"br":n+=t.br();break;case"del":{const e=r;n+=t.del(this.parseInline(e.tokens,t));break}case"text":{const e=r;n+=t.text(e.text);break}default:{const e='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}}class le{options;constructor(t){this.options=t||e.defaults}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}}class oe{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.#e(ne.lex,ie.parse);parseInline=this.#e(ne.lexInline,ie.parseInline);Parser=ie;Renderer=se;TextRenderer=re;Lexer=ne;Tokenizer=w;Hooks=le;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(const s of e)switch(n=n.concat(t.call(this,s)),s.type){case"table":{const e=s;for(const s of e.header)n=n.concat(this.walkTokens(s.tokens,t));for(const s of e.rows)for(const e of s)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=s;n=n.concat(this.walkTokens(e.items,t));break}default:{const e=s;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((s=>{const r=e[s].flat(1/0);n=n.concat(this.walkTokens(r,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{const n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let s=e.renderer.apply(this,t);return!1===s&&(s=n.apply(this,t)),s}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=this.defaults.renderer||new se(this.defaults);for(const n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if("options"===n)continue;const s=n,r=e.renderer[s],i=t[s];t[s]=(...e)=>{let n=r.apply(t,e);return!1===n&&(n=i.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new w(this.defaults);for(const n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const s=n,r=e.tokenizer[s],i=t[s];t[s]=(...e)=>{let n=r.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new le;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if("options"===n)continue;const s=n,r=e.hooks[s],i=t[s];le.passThroughHooks.has(n)?t[s]=e=>{if(this.defaults.async)return Promise.resolve(r.call(t,e)).then((e=>i.call(t,e)));const n=r.call(t,e);return i.call(t,n)}:t[s]=(...e)=>{let n=r.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,s=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(s.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ne.lex(e,t??this.defaults)}parser(e,t){return ie.parse(e,t??this.defaults)}#e(e,t){return(n,s)=>{const r={...s},i={...this.defaults,...r};!0===this.defaults.async&&!1===r.async&&(i.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),i.async=!0);const l=this.#t(!!i.silent,!!i.async);if(null==n)return l(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof n)return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(i.hooks&&(i.hooks.options=i),i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(n):n).then((t=>e(t,i))).then((e=>i.hooks?i.hooks.processAllTokens(e):e)).then((e=>i.walkTokens?Promise.all(this.walkTokens(e,i.walkTokens)).then((()=>e)):e)).then((e=>t(e,i))).then((e=>i.hooks?i.hooks.postprocess(e):e)).catch(l);try{i.hooks&&(n=i.hooks.preprocess(n));let s=e(n,i);i.hooks&&(s=i.hooks.processAllTokens(s)),i.walkTokens&&this.walkTokens(s,i.walkTokens);let r=t(s,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return l(e)}}}#t(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+c(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}}const ae=new oe;function ce(e,t){return ae.parse(e,t)}ce.options=ce.setOptions=function(e){return ae.setOptions(e),ce.defaults=ae.defaults,n(ce.defaults),ce},ce.getDefaults=t,ce.defaults=e.defaults,ce.use=function(...e){return ae.use(...e),ce.defaults=ae.defaults,n(ce.defaults),ce},ce.walkTokens=function(e,t){return ae.walkTokens(e,t)},ce.parseInline=ae.parseInline,ce.Parser=ie,ce.parser=ie.parse,ce.Renderer=se,ce.TextRenderer=re,ce.Lexer=ne,ce.lexer=ne.lex,ce.Tokenizer=w,ce.Hooks=le,ce.parse=ce;const he=ce.options,pe=ce.setOptions,ue=ce.use,ke=ce.walkTokens,ge=ce.parseInline,fe=ce,de=ie.parse,xe=ne.lex;e.Hooks=le,e.Lexer=ne,e.Marked=oe,e.Parser=ie,e.Renderer=se,e.TextRenderer=re,e.Tokenizer=w,e.getDefaults=t,e.lexer=xe,e.marked=ce,e.options=he,e.parse=fe,e.parseInline=ge,e.parser=de,e.setOptions=pe,e.use=ue,e.walkTokens=ke}));diff --git a/sdk/webui/static/vendor/purify.min.js b/sdk/webui/static/vendor/purify.min.jsnew file mode 100644index 0000000..a30c02b--- /dev/null+++ b/sdk/webui/static/vendor/purify.min.js@@ -0,0 +1,3 @@+/*! @license DOMPurify 3.1.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.6/LICENSE */+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=b(Array.prototype.forEach),m=b(Array.prototype.pop),p=b(Array.prototype.push),f=b(String.prototype.toLowerCase),d=b(String.prototype.toString),h=b(String.prototype.match),g=b(String.prototype.replace),T=b(String.prototype.indexOf),y=b(String.prototype.trim),E=b(Object.prototype.hasOwnProperty),_=b(RegExp.prototype.test),A=(N=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(N,t)});var N;function b(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function S(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function R(e){for(let t=0;t<e.length;t++){E(e,t)||(e[t]=null)}return e}function w(t){const n=l(null);for(const[o,r]of e(t)){E(t,o)&&(Array.isArray(r)?n[o]=R(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=w(r):n[o]=r)}return n}function C(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return b(n.get);if("function"==typeof n.value)return b(n.value)}e=o(e)}return function(){return null}}const L=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),D=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),v=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),O=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),x=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),k=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),M=i(["#text"]),I=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),U=i(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),P=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),F=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),H=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),z=a(/<%[\w\W]*|[\w\W]*%>/gm),B=a(/\${[\w\W]*}/gm),W=a(/^data-[\-\w.\u00B7-\uFFFF]/),G=a(/^aria-[\-\w]+$/),Y=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),j=a(/^(?:\w+script|data):/i),X=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),q=a(/^html$/i),$=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var K=Object.freeze({__proto__:null,MUSTACHE_EXPR:H,ERB_EXPR:z,TMPLIT_EXPR:B,DATA_ATTR:W,ARIA_ATTR:G,IS_ALLOWED_URI:Y,IS_SCRIPT_OR_DATA:j,ATTR_WHITESPACE:X,DOCTYPE_NAME:q,CUSTOM_ELEMENT:$});const V=1,Z=3,J=7,Q=8,ee=9,te=function(){return"undefined"==typeof window?null:window};var ne=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te();const o=e=>t(e);if(o.version="3.1.6",o.removed=[],!n||!n.document||n.document.nodeType!==ee)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:N,Node:b,Element:R,NodeFilter:H,NamedNodeMap:z=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:B,DOMParser:W,trustedTypes:G}=n,j=R.prototype,X=C(j,"cloneNode"),$=C(j,"remove"),ne=C(j,"nextSibling"),oe=C(j,"childNodes"),re=C(j,"parentNode");if("function"==typeof N){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let ie,ae="";const{implementation:le,createNodeIterator:ce,createDocumentFragment:se,getElementsByTagName:ue}=r,{importNode:me}=a;let pe={};o.isSupported="function"==typeof e&&"function"==typeof re&&le&&void 0!==le.createHTMLDocument;const{MUSTACHE_EXPR:fe,ERB_EXPR:de,TMPLIT_EXPR:he,DATA_ATTR:ge,ARIA_ATTR:Te,IS_SCRIPT_OR_DATA:ye,ATTR_WHITESPACE:Ee,CUSTOM_ELEMENT:_e}=K;let{IS_ALLOWED_URI:Ae}=K,Ne=null;const be=S({},[...L,...D,...v,...x,...M]);let Se=null;const Re=S({},[...I,...U,...P,...F]);let we=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ce=null,Le=null,De=!0,ve=!0,Oe=!1,xe=!0,ke=!1,Me=!0,Ie=!1,Ue=!1,Pe=!1,Fe=!1,He=!1,ze=!1,Be=!0,We=!1,Ge=!0,Ye=!1,je={},Xe=null;const qe=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let $e=null;const Ke=S({},["audio","video","img","source","image","track"]);let Ve=null;const Ze=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Je="http://www.w3.org/1998/Math/MathML",Qe="http://www.w3.org/2000/svg",et="http://www.w3.org/1999/xhtml";let tt=et,nt=!1,ot=null;const rt=S({},[Je,Qe,et],d);let it=null;const at=["application/xhtml+xml","text/html"];let lt=null,ct=null;const st=r.createElement("form"),ut=function(e){return e instanceof RegExp||e instanceof Function},mt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ct||ct!==e){if(e&&"object"==typeof e||(e={}),e=w(e),it=-1===at.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,lt="application/xhtml+xml"===it?d:f,Ne=E(e,"ALLOWED_TAGS")?S({},e.ALLOWED_TAGS,lt):be,Se=E(e,"ALLOWED_ATTR")?S({},e.ALLOWED_ATTR,lt):Re,ot=E(e,"ALLOWED_NAMESPACES")?S({},e.ALLOWED_NAMESPACES,d):rt,Ve=E(e,"ADD_URI_SAFE_ATTR")?S(w(Ze),e.ADD_URI_SAFE_ATTR,lt):Ze,$e=E(e,"ADD_DATA_URI_TAGS")?S(w(Ke),e.ADD_DATA_URI_TAGS,lt):Ke,Xe=E(e,"FORBID_CONTENTS")?S({},e.FORBID_CONTENTS,lt):qe,Ce=E(e,"FORBID_TAGS")?S({},e.FORBID_TAGS,lt):{},Le=E(e,"FORBID_ATTR")?S({},e.FORBID_ATTR,lt):{},je=!!E(e,"USE_PROFILES")&&e.USE_PROFILES,De=!1!==e.ALLOW_ARIA_ATTR,ve=!1!==e.ALLOW_DATA_ATTR,Oe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,xe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,ke=e.SAFE_FOR_TEMPLATES||!1,Me=!1!==e.SAFE_FOR_XML,Ie=e.WHOLE_DOCUMENT||!1,Fe=e.RETURN_DOM||!1,He=e.RETURN_DOM_FRAGMENT||!1,ze=e.RETURN_TRUSTED_TYPE||!1,Pe=e.FORCE_BODY||!1,Be=!1!==e.SANITIZE_DOM,We=e.SANITIZE_NAMED_PROPS||!1,Ge=!1!==e.KEEP_CONTENT,Ye=e.IN_PLACE||!1,Ae=e.ALLOWED_URI_REGEXP||Y,tt=e.NAMESPACE||et,we=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ut(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(we.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ut(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(we.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(we.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ke&&(ve=!1),He&&(Fe=!0),je&&(Ne=S({},M),Se=[],!0===je.html&&(S(Ne,L),S(Se,I)),!0===je.svg&&(S(Ne,D),S(Se,U),S(Se,F)),!0===je.svgFilters&&(S(Ne,v),S(Se,U),S(Se,F)),!0===je.mathMl&&(S(Ne,x),S(Se,P),S(Se,F))),e.ADD_TAGS&&(Ne===be&&(Ne=w(Ne)),S(Ne,e.ADD_TAGS,lt)),e.ADD_ATTR&&(Se===Re&&(Se=w(Se)),S(Se,e.ADD_ATTR,lt)),e.ADD_URI_SAFE_ATTR&&S(Ve,e.ADD_URI_SAFE_ATTR,lt),e.FORBID_CONTENTS&&(Xe===qe&&(Xe=w(Xe)),S(Xe,e.FORBID_CONTENTS,lt)),Ge&&(Ne["#text"]=!0),Ie&&S(Ne,["html","head","body"]),Ne.table&&(S(Ne,["tbody"]),delete Ce.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ie=e.TRUSTED_TYPES_POLICY,ae=ie.createHTML("")}else void 0===ie&&(ie=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(G,c)),null!==ie&&"string"==typeof ae&&(ae=ie.createHTML(""));i&&i(e),ct=e}},pt=S({},["mi","mo","mn","ms","mtext"]),ft=S({},["foreignobject","annotation-xml"]),dt=S({},["title","style","font","a","script"]),ht=S({},[...D,...v,...O]),gt=S({},[...x,...k]),Tt=function(e){p(o.removed,{element:e});try{re(e).removeChild(e)}catch(t){$(e)}},yt=function(e,t){try{p(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){p(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Se[e])if(Fe||He)try{Tt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Et=function(e){let t=null,n=null;if(Pe)e="<remove></remove>"+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===it&&tt===et&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=ie?ie.createHTML(e):e;if(tt===et)try{t=(new W).parseFromString(o,it)}catch(e){}if(!t||!t.documentElement){t=le.createDocument(tt,"template",null);try{t.documentElement.innerHTML=nt?ae:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),tt===et?ue.call(t,Ie?"html":"body")[0]:Ie?t.documentElement:i},_t=function(e){return ce.call(e.ownerDocument||e,e,H.SHOW_ELEMENT|H.SHOW_COMMENT|H.SHOW_TEXT|H.SHOW_PROCESSING_INSTRUCTION|H.SHOW_CDATA_SECTION,null)},At=function(e){return e instanceof B&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof z)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Nt=function(e){return"function"==typeof b&&e instanceof b},bt=function(e,t,n){pe[e]&&u(pe[e],(e=>{e.call(o,t,n,ct)}))},St=function(e){let t=null;if(bt("beforeSanitizeElements",e,null),At(e))return Tt(e),!0;const n=lt(e.nodeName);if(bt("uponSanitizeElement",e,{tagName:n,allowedTags:Ne}),e.hasChildNodes()&&!Nt(e.firstElementChild)&&_(/<[/\w]/g,e.innerHTML)&&_(/<[/\w]/g,e.textContent))return Tt(e),!0;if(e.nodeType===J)return Tt(e),!0;if(Me&&e.nodeType===Q&&_(/<[/\w]/g,e.data))return Tt(e),!0;if(!Ne[n]||Ce[n]){if(!Ce[n]&&wt(n)){if(we.tagNameCheck instanceof RegExp&&_(we.tagNameCheck,n))return!1;if(we.tagNameCheck instanceof Function&&we.tagNameCheck(n))return!1}if(Ge&&!Xe[n]){const t=re(e)||e.parentNode,n=oe(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=X(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,ne(e))}}}return Tt(e),!0}return e instanceof R&&!function(e){let t=re(e);t&&t.tagName||(t={namespaceURI:tt,tagName:"template"});const n=f(e.tagName),o=f(t.tagName);return!!ot[e.namespaceURI]&&(e.namespaceURI===Qe?t.namespaceURI===et?"svg"===n:t.namespaceURI===Je?"svg"===n&&("annotation-xml"===o||pt[o]):Boolean(ht[n]):e.namespaceURI===Je?t.namespaceURI===et?"math"===n:t.namespaceURI===Qe?"math"===n&&ft[o]:Boolean(gt[n]):e.namespaceURI===et?!(t.namespaceURI===Qe&&!ft[o])&&!(t.namespaceURI===Je&&!pt[o])&&!gt[n]&&(dt[n]||!ht[n]):!("application/xhtml+xml"!==it||!ot[e.namespaceURI]))}(e)?(Tt(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!_(/<\/no(script|embed|frames)/i,e.innerHTML)?(ke&&e.nodeType===Z&&(t=e.textContent,u([fe,de,he],(e=>{t=g(t,e," ")})),e.textContent!==t&&(p(o.removed,{element:e.cloneNode()}),e.textContent=t)),bt("afterSanitizeElements",e,null),!1):(Tt(e),!0)},Rt=function(e,t,n){if(Be&&("id"===t||"name"===t)&&(n in r||n in st))return!1;if(ve&&!Le[t]&&_(ge,t));else if(De&&_(Te,t));else if(!Se[t]||Le[t]){if(!(wt(e)&&(we.tagNameCheck instanceof RegExp&&_(we.tagNameCheck,e)||we.tagNameCheck instanceof Function&&we.tagNameCheck(e))&&(we.attributeNameCheck instanceof RegExp&&_(we.attributeNameCheck,t)||we.attributeNameCheck instanceof Function&&we.attributeNameCheck(t))||"is"===t&&we.allowCustomizedBuiltInElements&&(we.tagNameCheck instanceof RegExp&&_(we.tagNameCheck,n)||we.tagNameCheck instanceof Function&&we.tagNameCheck(n))))return!1}else if(Ve[t]);else if(_(Ae,g(n,Ee,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!$e[e]){if(Oe&&!_(ye,g(n,Ee,"")));else if(n)return!1}else;return!0},wt=function(e){return"annotation-xml"!==e&&h(e,_e)},Ct=function(e){bt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Se};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=lt(a);let p="value"===a?c:y(c);if(n.attrName=s,n.attrValue=p,n.keepAttr=!0,n.forceKeepAttr=void 0,bt("uponSanitizeAttribute",e,n),p=n.attrValue,Me&&_(/((--!?|])>)|<\/(style|title)/i,p)){yt(a,e);continue}if(n.forceKeepAttr)continue;if(yt(a,e),!n.keepAttr)continue;if(!xe&&_(/\/>/i,p)){yt(a,e);continue}ke&&u([fe,de,he],(e=>{p=g(p,e," ")}));const f=lt(e.nodeName);if(Rt(f,s,p)){if(!We||"id"!==s&&"name"!==s||(yt(a,e),p="user-content-"+p),ie&&"object"==typeof G&&"function"==typeof G.getAttributeType)if(l);else switch(G.getAttributeType(f,s)){case"TrustedHTML":p=ie.createHTML(p);break;case"TrustedScriptURL":p=ie.createScriptURL(p)}try{l?e.setAttributeNS(l,a,p):e.setAttribute(a,p),At(e)?Tt(e):m(o.removed)}catch(e){}}}bt("afterSanitizeAttributes",e,null)},Lt=function e(t){let n=null;const o=_t(t);for(bt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)bt("uponSanitizeShadowNode",n,null),St(n)||(n.content instanceof s&&e(n.content),Ct(n));bt("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(nt=!e,nt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Nt(e)){if("function"!=typeof e.toString)throw A("toString is not a function");if("string"!=typeof(e=e.toString()))throw A("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Ue||mt(t),o.removed=[],"string"==typeof e&&(Ye=!1),Ye){if(e.nodeName){const t=lt(e.nodeName);if(!Ne[t]||Ce[t])throw A("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof b)n=Et("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===V&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Fe&&!ke&&!Ie&&-1===e.indexOf("<"))return ie&&ze?ie.createHTML(e):e;if(n=Et(e),!n)return Fe?null:ze?ae:""}n&&Pe&&Tt(n.firstChild);const c=_t(Ye?e:n);for(;i=c.nextNode();)St(i)||(i.content instanceof s&&Lt(i.content),Ct(i));if(Ye)return e;if(Fe){if(He)for(l=se.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(Se.shadowroot||Se.shadowrootmode)&&(l=me.call(a,l,!0)),l}let m=Ie?n.outerHTML:n.innerHTML;return Ie&&Ne["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&_(q,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),ke&&u([fe,de,he],(e=>{m=g(m,e," ")})),ie&&ze?ie.createHTML(m):m},o.setConfig=function(){mt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ue=!0},o.clearConfig=function(){ct=null,Ue=!1},o.isValidAttribute=function(e,t,n){ct||mt({});const o=lt(e),r=lt(t);return Rt(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&(pe[e]=pe[e]||[],p(pe[e],t))},o.removeHook=function(e){if(pe[e])return m(pe[e])},o.removeHooks=function(e){pe[e]&&(pe[e]=[])},o.removeAllHooks=function(){pe={}},o}();return ne}));+//# sourceMappingURL=purify.min.js.map