Akash6776 commited on
Commit
a6d213f
·
verified ·
1 Parent(s): 0a4b148

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +1 -0
  2. 17.Clips4Sale.Superheroine Destruction.Harley Quinn - Mind Controlled & Violated.mp4 +3 -0
  3. venv/lib/python3.12/site-packages/huggingface_hub-0.33.2.dist-info/INSTALLER +1 -0
  4. venv/lib/python3.12/site-packages/huggingface_hub-0.33.2.dist-info/METADATA +332 -0
  5. venv/lib/python3.12/site-packages/huggingface_hub-0.33.2.dist-info/RECORD +293 -0
  6. venv/lib/python3.12/site-packages/idna/intranges.py +57 -0
  7. venv/lib/python3.12/site-packages/idna/package_data.py +1 -0
  8. venv/lib/python3.12/site-packages/idna/py.typed +0 -0
  9. venv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/autocompletion.cpython-312.pyc +0 -0
  10. venv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/base_command.cpython-312.pyc +0 -0
  11. venv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/cmdoptions.cpython-312.pyc +0 -0
  12. venv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/main.cpython-312.pyc +0 -0
  13. venv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/parser.cpython-312.pyc +0 -0
  14. venv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/req_command.cpython-312.pyc +0 -0
  15. venv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/status_codes.cpython-312.pyc +0 -0
  16. venv/lib/python3.12/site-packages/pip/_internal/distributions/__pycache__/sdist.cpython-312.pyc +0 -0
  17. venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/compat.cpython-312.pyc +0 -0
  18. venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/entrypoints.cpython-312.pyc +0 -0
  19. venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/logging.cpython-312.pyc +0 -0
  20. venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/unpacking.cpython-312.pyc +0 -0
  21. venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__init__.py +28 -0
  22. venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/_cmd.py +70 -0
  23. venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/adapter.py +161 -0
  24. venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/cache.py +74 -0
  25. venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/controller.py +494 -0
  26. venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/wrapper.py +43 -0
  27. venv/lib/python3.12/site-packages/pip/_vendor/chardet/big5prober.py +47 -0
  28. venv/lib/python3.12/site-packages/pip/_vendor/chardet/escsm.py +261 -0
  29. venv/lib/python3.12/site-packages/pip/_vendor/chardet/eucjpprober.py +102 -0
  30. venv/lib/python3.12/site-packages/pip/_vendor/chardet/euckrprober.py +47 -0
  31. venv/lib/python3.12/site-packages/pip/_vendor/chardet/johabfreq.py +2382 -0
  32. venv/lib/python3.12/site-packages/pip/_vendor/chardet/johabprober.py +47 -0
  33. venv/lib/python3.12/site-packages/pip/_vendor/chardet/langhebrewmodel.py +0 -0
  34. venv/lib/python3.12/site-packages/pip/_vendor/chardet/latin1prober.py +147 -0
  35. venv/lib/python3.12/site-packages/pip/_vendor/chardet/macromanprober.py +162 -0
  36. venv/lib/python3.12/site-packages/pip/_vendor/chardet/mbcharsetprober.py +95 -0
  37. venv/lib/python3.12/site-packages/pip/_vendor/chardet/sbcsgroupprober.py +88 -0
  38. venv/lib/python3.12/site-packages/pip/_vendor/chardet/universaldetector.py +362 -0
  39. venv/lib/python3.12/site-packages/pip/_vendor/chardet/utf8prober.py +82 -0
  40. venv/lib/python3.12/site-packages/pip/_vendor/chardet/version.py +9 -0
  41. venv/lib/python3.12/site-packages/pip/_vendor/distro/__init__.py +54 -0
  42. venv/lib/python3.12/site-packages/pip/_vendor/msgpack/__init__.py +57 -0
  43. venv/lib/python3.12/site-packages/pip/_vendor/msgpack/exceptions.py +48 -0
  44. venv/lib/python3.12/site-packages/pip/_vendor/msgpack/ext.py +193 -0
  45. venv/lib/python3.12/site-packages/pip/_vendor/msgpack/fallback.py +1010 -0
  46. venv/lib/python3.12/site-packages/pip/_vendor/platformdirs/__init__.py +566 -0
  47. venv/lib/python3.12/site-packages/pip/_vendor/platformdirs/__main__.py +53 -0
  48. venv/lib/python3.12/site-packages/pip/_vendor/platformdirs/android.py +210 -0
  49. venv/lib/python3.12/site-packages/pip/_vendor/platformdirs/api.py +223 -0
  50. venv/lib/python3.12/site-packages/pip/_vendor/platformdirs/macos.py +91 -0
.gitattributes CHANGED
@@ -139,3 +139,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
139
  17.Clips4Sale.Family[[:space:]]Therapy.Let[[:space:]]Daddy[[:space:]]Help.mp4 filter=lfs diff=lfs merge=lfs -text
140
  17.CherryPimps.Give[[:space:]]Me[[:space:]]That[[:space:]]Cock[[:space:]]LIVE.mp4 filter=lfs diff=lfs merge=lfs -text
141
  17.RealityKings.Teaching[[:space:]]Her[[:space:]]To[[:space:]]Suck[[:space:]]Cock.mp4 filter=lfs diff=lfs merge=lfs -text
 
 
139
  17.Clips4Sale.Family[[:space:]]Therapy.Let[[:space:]]Daddy[[:space:]]Help.mp4 filter=lfs diff=lfs merge=lfs -text
140
  17.CherryPimps.Give[[:space:]]Me[[:space:]]That[[:space:]]Cock[[:space:]]LIVE.mp4 filter=lfs diff=lfs merge=lfs -text
141
  17.RealityKings.Teaching[[:space:]]Her[[:space:]]To[[:space:]]Suck[[:space:]]Cock.mp4 filter=lfs diff=lfs merge=lfs -text
142
+ 17.Clips4Sale.Superheroine[[:space:]]Destruction.Harley[[:space:]]Quinn[[:space:]]-[[:space:]]Mind[[:space:]]Controlled[[:space:]]&[[:space:]]Violated.mp4 filter=lfs diff=lfs merge=lfs -text
17.Clips4Sale.Superheroine Destruction.Harley Quinn - Mind Controlled & Violated.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:44bec49319da4634f144caa0c86479c3f32267167f2684b077e1975e8fe56925
3
+ size 2510909978
venv/lib/python3.12/site-packages/huggingface_hub-0.33.2.dist-info/INSTALLER ADDED
@@ -0,0 +1 @@
 
 
1
+ pip
venv/lib/python3.12/site-packages/huggingface_hub-0.33.2.dist-info/METADATA ADDED
@@ -0,0 +1,332 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Metadata-Version: 2.1
2
+ Name: huggingface-hub
3
+ Version: 0.33.2
4
+ Summary: Client library to download and publish models, datasets and other repos on the huggingface.co hub
5
+ Home-page: https://github.com/huggingface/huggingface_hub
6
+ Author: Hugging Face, Inc.
7
+ Author-email: julien@huggingface.co
8
+ License: Apache
9
+ Keywords: model-hub machine-learning models natural-language-processing deep-learning pytorch pretrained-models
10
+ Platform: UNKNOWN
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Intended Audience :: Education
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: License :: OSI Approved :: Apache Software License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3 :: Only
18
+ Classifier: Programming Language :: Python :: 3.8
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
25
+ Requires-Python: >=3.8.0
26
+ Description-Content-Type: text/markdown
27
+ License-File: LICENSE
28
+ Requires-Dist: filelock
29
+ Requires-Dist: fsspec>=2023.5.0
30
+ Requires-Dist: packaging>=20.9
31
+ Requires-Dist: pyyaml>=5.1
32
+ Requires-Dist: requests
33
+ Requires-Dist: tqdm>=4.42.1
34
+ Requires-Dist: typing-extensions>=3.7.4.3
35
+ Requires-Dist: hf-xet<2.0.0,>=1.1.2; platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "arm64" or platform_machine == "aarch64"
36
+ Provides-Extra: all
37
+ Requires-Dist: InquirerPy==0.3.4; extra == "all"
38
+ Requires-Dist: aiohttp; extra == "all"
39
+ Requires-Dist: authlib>=1.3.2; extra == "all"
40
+ Requires-Dist: fastapi; extra == "all"
41
+ Requires-Dist: httpx; extra == "all"
42
+ Requires-Dist: itsdangerous; extra == "all"
43
+ Requires-Dist: jedi; extra == "all"
44
+ Requires-Dist: Jinja2; extra == "all"
45
+ Requires-Dist: pytest<8.2.2,>=8.1.1; extra == "all"
46
+ Requires-Dist: pytest-cov; extra == "all"
47
+ Requires-Dist: pytest-env; extra == "all"
48
+ Requires-Dist: pytest-xdist; extra == "all"
49
+ Requires-Dist: pytest-vcr; extra == "all"
50
+ Requires-Dist: pytest-asyncio; extra == "all"
51
+ Requires-Dist: pytest-rerunfailures; extra == "all"
52
+ Requires-Dist: pytest-mock; extra == "all"
53
+ Requires-Dist: urllib3<2.0; extra == "all"
54
+ Requires-Dist: soundfile; extra == "all"
55
+ Requires-Dist: Pillow; extra == "all"
56
+ Requires-Dist: gradio>=4.0.0; extra == "all"
57
+ Requires-Dist: numpy; extra == "all"
58
+ Requires-Dist: ruff>=0.9.0; extra == "all"
59
+ Requires-Dist: libcst==1.4.0; extra == "all"
60
+ Requires-Dist: typing-extensions>=4.8.0; extra == "all"
61
+ Requires-Dist: types-PyYAML; extra == "all"
62
+ Requires-Dist: types-requests; extra == "all"
63
+ Requires-Dist: types-simplejson; extra == "all"
64
+ Requires-Dist: types-toml; extra == "all"
65
+ Requires-Dist: types-tqdm; extra == "all"
66
+ Requires-Dist: types-urllib3; extra == "all"
67
+ Requires-Dist: mypy<1.15.0,>=1.14.1; python_version == "3.8" and extra == "all"
68
+ Requires-Dist: mypy==1.15.0; python_version >= "3.9" and extra == "all"
69
+ Provides-Extra: cli
70
+ Requires-Dist: InquirerPy==0.3.4; extra == "cli"
71
+ Provides-Extra: dev
72
+ Requires-Dist: InquirerPy==0.3.4; extra == "dev"
73
+ Requires-Dist: aiohttp; extra == "dev"
74
+ Requires-Dist: authlib>=1.3.2; extra == "dev"
75
+ Requires-Dist: fastapi; extra == "dev"
76
+ Requires-Dist: httpx; extra == "dev"
77
+ Requires-Dist: itsdangerous; extra == "dev"
78
+ Requires-Dist: jedi; extra == "dev"
79
+ Requires-Dist: Jinja2; extra == "dev"
80
+ Requires-Dist: pytest<8.2.2,>=8.1.1; extra == "dev"
81
+ Requires-Dist: pytest-cov; extra == "dev"
82
+ Requires-Dist: pytest-env; extra == "dev"
83
+ Requires-Dist: pytest-xdist; extra == "dev"
84
+ Requires-Dist: pytest-vcr; extra == "dev"
85
+ Requires-Dist: pytest-asyncio; extra == "dev"
86
+ Requires-Dist: pytest-rerunfailures; extra == "dev"
87
+ Requires-Dist: pytest-mock; extra == "dev"
88
+ Requires-Dist: urllib3<2.0; extra == "dev"
89
+ Requires-Dist: soundfile; extra == "dev"
90
+ Requires-Dist: Pillow; extra == "dev"
91
+ Requires-Dist: gradio>=4.0.0; extra == "dev"
92
+ Requires-Dist: numpy; extra == "dev"
93
+ Requires-Dist: ruff>=0.9.0; extra == "dev"
94
+ Requires-Dist: libcst==1.4.0; extra == "dev"
95
+ Requires-Dist: typing-extensions>=4.8.0; extra == "dev"
96
+ Requires-Dist: types-PyYAML; extra == "dev"
97
+ Requires-Dist: types-requests; extra == "dev"
98
+ Requires-Dist: types-simplejson; extra == "dev"
99
+ Requires-Dist: types-toml; extra == "dev"
100
+ Requires-Dist: types-tqdm; extra == "dev"
101
+ Requires-Dist: types-urllib3; extra == "dev"
102
+ Requires-Dist: mypy<1.15.0,>=1.14.1; python_version == "3.8" and extra == "dev"
103
+ Requires-Dist: mypy==1.15.0; python_version >= "3.9" and extra == "dev"
104
+ Provides-Extra: fastai
105
+ Requires-Dist: toml; extra == "fastai"
106
+ Requires-Dist: fastai>=2.4; extra == "fastai"
107
+ Requires-Dist: fastcore>=1.3.27; extra == "fastai"
108
+ Provides-Extra: hf_transfer
109
+ Requires-Dist: hf-transfer>=0.1.4; extra == "hf-transfer"
110
+ Provides-Extra: hf_xet
111
+ Requires-Dist: hf-xet<2.0.0,>=1.1.2; extra == "hf-xet"
112
+ Provides-Extra: inference
113
+ Requires-Dist: aiohttp; extra == "inference"
114
+ Provides-Extra: mcp
115
+ Requires-Dist: mcp>=1.8.0; extra == "mcp"
116
+ Requires-Dist: typer; extra == "mcp"
117
+ Requires-Dist: aiohttp; extra == "mcp"
118
+ Provides-Extra: oauth
119
+ Requires-Dist: authlib>=1.3.2; extra == "oauth"
120
+ Requires-Dist: fastapi; extra == "oauth"
121
+ Requires-Dist: httpx; extra == "oauth"
122
+ Requires-Dist: itsdangerous; extra == "oauth"
123
+ Provides-Extra: quality
124
+ Requires-Dist: ruff>=0.9.0; extra == "quality"
125
+ Requires-Dist: libcst==1.4.0; extra == "quality"
126
+ Requires-Dist: mypy<1.15.0,>=1.14.1; python_version == "3.8" and extra == "quality"
127
+ Requires-Dist: mypy==1.15.0; python_version >= "3.9" and extra == "quality"
128
+ Provides-Extra: tensorflow
129
+ Requires-Dist: tensorflow; extra == "tensorflow"
130
+ Requires-Dist: pydot; extra == "tensorflow"
131
+ Requires-Dist: graphviz; extra == "tensorflow"
132
+ Provides-Extra: tensorflow-testing
133
+ Requires-Dist: tensorflow; extra == "tensorflow-testing"
134
+ Requires-Dist: keras<3.0; extra == "tensorflow-testing"
135
+ Provides-Extra: testing
136
+ Requires-Dist: InquirerPy==0.3.4; extra == "testing"
137
+ Requires-Dist: aiohttp; extra == "testing"
138
+ Requires-Dist: authlib>=1.3.2; extra == "testing"
139
+ Requires-Dist: fastapi; extra == "testing"
140
+ Requires-Dist: httpx; extra == "testing"
141
+ Requires-Dist: itsdangerous; extra == "testing"
142
+ Requires-Dist: jedi; extra == "testing"
143
+ Requires-Dist: Jinja2; extra == "testing"
144
+ Requires-Dist: pytest<8.2.2,>=8.1.1; extra == "testing"
145
+ Requires-Dist: pytest-cov; extra == "testing"
146
+ Requires-Dist: pytest-env; extra == "testing"
147
+ Requires-Dist: pytest-xdist; extra == "testing"
148
+ Requires-Dist: pytest-vcr; extra == "testing"
149
+ Requires-Dist: pytest-asyncio; extra == "testing"
150
+ Requires-Dist: pytest-rerunfailures; extra == "testing"
151
+ Requires-Dist: pytest-mock; extra == "testing"
152
+ Requires-Dist: urllib3<2.0; extra == "testing"
153
+ Requires-Dist: soundfile; extra == "testing"
154
+ Requires-Dist: Pillow; extra == "testing"
155
+ Requires-Dist: gradio>=4.0.0; extra == "testing"
156
+ Requires-Dist: numpy; extra == "testing"
157
+ Provides-Extra: torch
158
+ Requires-Dist: torch; extra == "torch"
159
+ Requires-Dist: safetensors[torch]; extra == "torch"
160
+ Provides-Extra: typing
161
+ Requires-Dist: typing-extensions>=4.8.0; extra == "typing"
162
+ Requires-Dist: types-PyYAML; extra == "typing"
163
+ Requires-Dist: types-requests; extra == "typing"
164
+ Requires-Dist: types-simplejson; extra == "typing"
165
+ Requires-Dist: types-toml; extra == "typing"
166
+ Requires-Dist: types-tqdm; extra == "typing"
167
+ Requires-Dist: types-urllib3; extra == "typing"
168
+
169
+ <p align="center">
170
+ <picture>
171
+ <source media="(prefers-color-scheme: dark)" srcset="https://huggingface.co/datasets/huggingface/documentation-images/raw/main/huggingface_hub-dark.svg">
172
+ <source media="(prefers-color-scheme: light)" srcset="https://huggingface.co/datasets/huggingface/documentation-images/raw/main/huggingface_hub.svg">
173
+ <img alt="huggingface_hub library logo" src="https://huggingface.co/datasets/huggingface/documentation-images/raw/main/huggingface_hub.svg" width="352" height="59" style="max-width: 100%;">
174
+ </picture>
175
+ <br/>
176
+ <br/>
177
+ </p>
178
+
179
+ <p align="center">
180
+ <i>The official Python client for the Huggingface Hub.</i>
181
+ </p>
182
+
183
+ <p align="center">
184
+ <a href="https://huggingface.co/docs/huggingface_hub/en/index"><img alt="Documentation" src="https://img.shields.io/website/http/huggingface.co/docs/huggingface_hub/index.svg?down_color=red&down_message=offline&up_message=online&label=doc"></a>
185
+ <a href="https://github.com/huggingface/huggingface_hub/releases"><img alt="GitHub release" src="https://img.shields.io/github/release/huggingface/huggingface_hub.svg"></a>
186
+ <a href="https://github.com/huggingface/huggingface_hub"><img alt="PyPi version" src="https://img.shields.io/pypi/pyversions/huggingface_hub.svg"></a>
187
+ <a href="https://pypi.org/project/huggingface-hub"><img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dm/huggingface_hub"></a>
188
+ <a href="https://codecov.io/gh/huggingface/huggingface_hub"><img alt="Code coverage" src="https://codecov.io/gh/huggingface/huggingface_hub/branch/main/graph/badge.svg?token=RXP95LE2XL"></a>
189
+ </p>
190
+
191
+ <h4 align="center">
192
+ <p>
193
+ <b>English</b> |
194
+ <a href="https://github.com/huggingface/huggingface_hub/blob/main/i18n/README_de.md">Deutsch</a> |
195
+ <a href="https://github.com/huggingface/huggingface_hub/blob/main/i18n/README_hi.md">हिंदी</a> |
196
+ <a href="https://github.com/huggingface/huggingface_hub/blob/main/i18n/README_ko.md">한국어</a> |
197
+ <a href="https://github.com/huggingface/huggingface_hub/blob/main/i18n/README_cn.md">中文(简体)</a>
198
+ <p>
199
+ </h4>
200
+
201
+ ---
202
+
203
+ **Documentation**: <a href="https://hf.co/docs/huggingface_hub" target="_blank">https://hf.co/docs/huggingface_hub</a>
204
+
205
+ **Source Code**: <a href="https://github.com/huggingface/huggingface_hub" target="_blank">https://github.com/huggingface/huggingface_hub</a>
206
+
207
+ ---
208
+
209
+ ## Welcome to the huggingface_hub library
210
+
211
+ The `huggingface_hub` library allows you to interact with the [Hugging Face Hub](https://huggingface.co/), a platform democratizing open-source Machine Learning for creators and collaborators. Discover pre-trained models and datasets for your projects or play with the thousands of machine learning apps hosted on the Hub. You can also create and share your own models, datasets and demos with the community. The `huggingface_hub` library provides a simple way to do all these things with Python.
212
+
213
+ ## Key features
214
+
215
+ - [Download files](https://huggingface.co/docs/huggingface_hub/en/guides/download) from the Hub.
216
+ - [Upload files](https://huggingface.co/docs/huggingface_hub/en/guides/upload) to the Hub.
217
+ - [Manage your repositories](https://huggingface.co/docs/huggingface_hub/en/guides/repository).
218
+ - [Run Inference](https://huggingface.co/docs/huggingface_hub/en/guides/inference) on deployed models.
219
+ - [Search](https://huggingface.co/docs/huggingface_hub/en/guides/search) for models, datasets and Spaces.
220
+ - [Share Model Cards](https://huggingface.co/docs/huggingface_hub/en/guides/model-cards) to document your models.
221
+ - [Engage with the community](https://huggingface.co/docs/huggingface_hub/en/guides/community) through PRs and comments.
222
+
223
+ ## Installation
224
+
225
+ Install the `huggingface_hub` package with [pip](https://pypi.org/project/huggingface-hub/):
226
+
227
+ ```bash
228
+ pip install huggingface_hub
229
+ ```
230
+
231
+ If you prefer, you can also install it with [conda](https://huggingface.co/docs/huggingface_hub/en/installation#install-with-conda).
232
+
233
+ In order to keep the package minimal by default, `huggingface_hub` comes with optional dependencies useful for some use cases. For example, if you want have a complete experience for Inference, run:
234
+
235
+ ```bash
236
+ pip install huggingface_hub[inference]
237
+ ```
238
+
239
+ To learn more installation and optional dependencies, check out the [installation guide](https://huggingface.co/docs/huggingface_hub/en/installation).
240
+
241
+ ## Quick start
242
+
243
+ ### Download files
244
+
245
+ Download a single file
246
+
247
+ ```py
248
+ from huggingface_hub import hf_hub_download
249
+
250
+ hf_hub_download(repo_id="tiiuae/falcon-7b-instruct", filename="config.json")
251
+ ```
252
+
253
+ Or an entire repository
254
+
255
+ ```py
256
+ from huggingface_hub import snapshot_download
257
+
258
+ snapshot_download("stabilityai/stable-diffusion-2-1")
259
+ ```
260
+
261
+ Files will be downloaded in a local cache folder. More details in [this guide](https://huggingface.co/docs/huggingface_hub/en/guides/manage-cache).
262
+
263
+ ### Login
264
+
265
+ The Hugging Face Hub uses tokens to authenticate applications (see [docs](https://huggingface.co/docs/hub/security-tokens)). To log in your machine, run the following CLI:
266
+
267
+ ```bash
268
+ huggingface-cli login
269
+ # or using an environment variable
270
+ huggingface-cli login --token $HUGGINGFACE_TOKEN
271
+ ```
272
+
273
+ ### Create a repository
274
+
275
+ ```py
276
+ from huggingface_hub import create_repo
277
+
278
+ create_repo(repo_id="super-cool-model")
279
+ ```
280
+
281
+ ### Upload files
282
+
283
+ Upload a single file
284
+
285
+ ```py
286
+ from huggingface_hub import upload_file
287
+
288
+ upload_file(
289
+ path_or_fileobj="/home/lysandre/dummy-test/README.md",
290
+ path_in_repo="README.md",
291
+ repo_id="lysandre/test-model",
292
+ )
293
+ ```
294
+
295
+ Or an entire folder
296
+
297
+ ```py
298
+ from huggingface_hub import upload_folder
299
+
300
+ upload_folder(
301
+ folder_path="/path/to/local/space",
302
+ repo_id="username/my-cool-space",
303
+ repo_type="space",
304
+ )
305
+ ```
306
+
307
+ For details in the [upload guide](https://huggingface.co/docs/huggingface_hub/en/guides/upload).
308
+
309
+ ## Integrating to the Hub.
310
+
311
+ We're partnering with cool open source ML libraries to provide free model hosting and versioning. You can find the existing integrations [here](https://huggingface.co/docs/hub/libraries).
312
+
313
+ The advantages are:
314
+
315
+ - Free model or dataset hosting for libraries and their users.
316
+ - Built-in file versioning, even with very large files, thanks to a git-based approach.
317
+ - Serverless inference API for all models publicly available.
318
+ - In-browser widgets to play with the uploaded models.
319
+ - Anyone can upload a new model for your library, they just need to add the corresponding tag for the model to be discoverable.
320
+ - Fast downloads! We use Cloudfront (a CDN) to geo-replicate downloads so they're blazing fast from anywhere on the globe.
321
+ - Usage stats and more features to come.
322
+
323
+ If you would like to integrate your library, feel free to open an issue to begin the discussion. We wrote a [step-by-step guide](https://huggingface.co/docs/hub/adding-a-library) with ❤️ showing how to do this integration.
324
+
325
+ ## Contributions (feature requests, bugs, etc.) are super welcome 💙💚💛💜🧡❤️
326
+
327
+ Everyone is welcome to contribute, and we value everybody's contribution. Code is not the only way to help the community.
328
+ Answering questions, helping others, reaching out and improving the documentations are immensely valuable to the community.
329
+ We wrote a [contribution guide](https://github.com/huggingface/huggingface_hub/blob/main/CONTRIBUTING.md) to summarize
330
+ how to get started to contribute to this repository.
331
+
332
+
venv/lib/python3.12/site-packages/huggingface_hub-0.33.2.dist-info/RECORD ADDED
@@ -0,0 +1,293 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ../../../bin/huggingface-cli,sha256=I272Vtk2OLKEsaLCUrYnZr1vvyrQlywh8HpmgppjtHQ,266
2
+ ../../../bin/tiny-agents,sha256=-HTTSIiG-bGmQYJVE3A3QWikyts9BVv21StDZ9qZWXo,258
3
+ huggingface_hub-0.33.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
4
+ huggingface_hub-0.33.2.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
5
+ huggingface_hub-0.33.2.dist-info/METADATA,sha256=DR7YBfIe1JsS_-kD3AFBt5wZG_l57YWKgf3pSrKWDig,14777
6
+ huggingface_hub-0.33.2.dist-info/RECORD,,
7
+ huggingface_hub-0.33.2.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
+ huggingface_hub-0.33.2.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
9
+ huggingface_hub-0.33.2.dist-info/entry_points.txt,sha256=uelw0-fu0kd-CxIuOsR1bsjLIFnAaMQ6AIqluJYDhQw,184
10
+ huggingface_hub-0.33.2.dist-info/top_level.txt,sha256=8KzlQJAY4miUvjAssOAJodqKOw3harNzuiwGQ9qLSSk,16
11
+ huggingface_hub/__init__.py,sha256=ihQKLBJKmvBlTdhYpc5NOfv2qwOMd3grfx3ve27P6I8,50644
12
+ huggingface_hub/__pycache__/__init__.cpython-312.pyc,,
13
+ huggingface_hub/__pycache__/_commit_api.cpython-312.pyc,,
14
+ huggingface_hub/__pycache__/_commit_scheduler.cpython-312.pyc,,
15
+ huggingface_hub/__pycache__/_inference_endpoints.cpython-312.pyc,,
16
+ huggingface_hub/__pycache__/_local_folder.cpython-312.pyc,,
17
+ huggingface_hub/__pycache__/_login.cpython-312.pyc,,
18
+ huggingface_hub/__pycache__/_oauth.cpython-312.pyc,,
19
+ huggingface_hub/__pycache__/_snapshot_download.cpython-312.pyc,,
20
+ huggingface_hub/__pycache__/_space_api.cpython-312.pyc,,
21
+ huggingface_hub/__pycache__/_tensorboard_logger.cpython-312.pyc,,
22
+ huggingface_hub/__pycache__/_upload_large_folder.cpython-312.pyc,,
23
+ huggingface_hub/__pycache__/_webhooks_payload.cpython-312.pyc,,
24
+ huggingface_hub/__pycache__/_webhooks_server.cpython-312.pyc,,
25
+ huggingface_hub/__pycache__/community.cpython-312.pyc,,
26
+ huggingface_hub/__pycache__/constants.cpython-312.pyc,,
27
+ huggingface_hub/__pycache__/dataclasses.cpython-312.pyc,,
28
+ huggingface_hub/__pycache__/errors.cpython-312.pyc,,
29
+ huggingface_hub/__pycache__/fastai_utils.cpython-312.pyc,,
30
+ huggingface_hub/__pycache__/file_download.cpython-312.pyc,,
31
+ huggingface_hub/__pycache__/hf_api.cpython-312.pyc,,
32
+ huggingface_hub/__pycache__/hf_file_system.cpython-312.pyc,,
33
+ huggingface_hub/__pycache__/hub_mixin.cpython-312.pyc,,
34
+ huggingface_hub/__pycache__/inference_api.cpython-312.pyc,,
35
+ huggingface_hub/__pycache__/keras_mixin.cpython-312.pyc,,
36
+ huggingface_hub/__pycache__/lfs.cpython-312.pyc,,
37
+ huggingface_hub/__pycache__/repocard.cpython-312.pyc,,
38
+ huggingface_hub/__pycache__/repocard_data.cpython-312.pyc,,
39
+ huggingface_hub/__pycache__/repository.cpython-312.pyc,,
40
+ huggingface_hub/_commit_api.py,sha256=ZbmuIhFdF8B3F_cvGtxorka7MmIQOk8oBkCtYltnCvI,39456
41
+ huggingface_hub/_commit_scheduler.py,sha256=tfIoO1xWHjTJ6qy6VS6HIoymDycFPg0d6pBSZprrU2U,14679
42
+ huggingface_hub/_inference_endpoints.py,sha256=ahmbPcEXsJ_JcMb9TDgdkD8Z2z9uytkFG3_1o6dTm8g,17598
43
+ huggingface_hub/_local_folder.py,sha256=9NkNGsyEfTtopfhXbicS2TFIcm9lAzLFqItzYy2h0D4,16915
44
+ huggingface_hub/_login.py,sha256=ssf4viT5BhHI2ZidnSuAZcrwSxzaLOrf8xgRVKuvu_A,20298
45
+ huggingface_hub/_oauth.py,sha256=YNbSSZCNZLiCqwMoYboSAfI3XjEsbyAADJcwgRAdhBc,18802
46
+ huggingface_hub/_snapshot_download.py,sha256=6XR6z_BWVP484pUX6hzX8JgsqIrKMFGDBqT97qArPS4,16090
47
+ huggingface_hub/_space_api.py,sha256=jb6rF8qLtjaNU12D-8ygAPM26xDiHCu8CHXHowhGTmg,5470
48
+ huggingface_hub/_tensorboard_logger.py,sha256=ZkYcAUiRC8RGL214QUYtp58O8G5tn-HF6DCWha9imcA,8358
49
+ huggingface_hub/_upload_large_folder.py,sha256=elY5Rv2YVJECVpdZ9PM1zdO8kG-jmi8DifLOa7aC3EU,24178
50
+ huggingface_hub/_webhooks_payload.py,sha256=Xm3KaK7tCOGBlXkuZvbym6zjHXrT1XCrbUFWuXiBmNY,3617
51
+ huggingface_hub/_webhooks_server.py,sha256=5J63wk9MUGKBNJVsOD9i60mJ-VMp0YYmlf87vQsl-L8,15767
52
+ huggingface_hub/commands/__init__.py,sha256=AkbM2a-iGh0Vq_xAWhK3mu3uZ44km8-X5uWjKcvcrUQ,928
53
+ huggingface_hub/commands/__pycache__/__init__.cpython-312.pyc,,
54
+ huggingface_hub/commands/__pycache__/_cli_utils.cpython-312.pyc,,
55
+ huggingface_hub/commands/__pycache__/delete_cache.cpython-312.pyc,,
56
+ huggingface_hub/commands/__pycache__/download.cpython-312.pyc,,
57
+ huggingface_hub/commands/__pycache__/env.cpython-312.pyc,,
58
+ huggingface_hub/commands/__pycache__/huggingface_cli.cpython-312.pyc,,
59
+ huggingface_hub/commands/__pycache__/lfs.cpython-312.pyc,,
60
+ huggingface_hub/commands/__pycache__/repo.cpython-312.pyc,,
61
+ huggingface_hub/commands/__pycache__/repo_files.cpython-312.pyc,,
62
+ huggingface_hub/commands/__pycache__/scan_cache.cpython-312.pyc,,
63
+ huggingface_hub/commands/__pycache__/tag.cpython-312.pyc,,
64
+ huggingface_hub/commands/__pycache__/upload.cpython-312.pyc,,
65
+ huggingface_hub/commands/__pycache__/upload_large_folder.cpython-312.pyc,,
66
+ huggingface_hub/commands/__pycache__/user.cpython-312.pyc,,
67
+ huggingface_hub/commands/__pycache__/version.cpython-312.pyc,,
68
+ huggingface_hub/commands/_cli_utils.py,sha256=Nt6CjbkYqQQRuh70bUXVA6rZpbZt_Sa1WqBUxjQLu6g,2095
69
+ huggingface_hub/commands/delete_cache.py,sha256=6UahqCex_3qyxDltn4GcaiuwzxfInPlXCK10o33eZVU,17623
70
+ huggingface_hub/commands/download.py,sha256=1YXKttB8YBX7SJ0Jxg0t1n8yp2BUZXtY0ck6DhCg-XE,8183
71
+ huggingface_hub/commands/env.py,sha256=yYl4DSS14V8t244nAi0t77Izx5LIdgS_dy6xiV5VQME,1226
72
+ huggingface_hub/commands/huggingface_cli.py,sha256=ZAJqalBtjhMrLm_Yk9_cP_tjVkimrLbsx_-C8E1j0A8,2523
73
+ huggingface_hub/commands/lfs.py,sha256=xdbnNRO04UuQemEhUGT809jFgQn9Rj-SnyT_0Ph-VYg,7342
74
+ huggingface_hub/commands/repo.py,sha256=E0Nsh6bvSwllSOHWD-zUoWTNOFyYKuMTlocYswqmSAU,5923
75
+ huggingface_hub/commands/repo_files.py,sha256=Nfv8TjuaZVOrj7TZjrojtjdD8Wf54aZvYPDEOevh7tA,4923
76
+ huggingface_hub/commands/scan_cache.py,sha256=xdD_zRKd49hRuATyptG-zaY08h1f9CAjB5zZBKe0YEo,8563
77
+ huggingface_hub/commands/tag.py,sha256=0LNQZyK-WKi0VIL9i1xWzKxJ1ILw1jxMF_E6t2weJss,6288
78
+ huggingface_hub/commands/upload.py,sha256=3mcBBo2pNO99NHzNu6o-VcEHjDp7mtyQYeKE9eVao0w,14453
79
+ huggingface_hub/commands/upload_large_folder.py,sha256=P-EO44JWVl39Ax4b0E0Z873d0a6S38Qas8P6DaL1EwI,6129
80
+ huggingface_hub/commands/user.py,sha256=_4rjCrP84KqtqCMn-r3YWLuGLrnklOWTdJFVTNFMLuU,7096
81
+ huggingface_hub/commands/version.py,sha256=vfCJn7GO1m-DtDmbdsty8_RTVtnZ7lX6MJsx0Bf4e-s,1266
82
+ huggingface_hub/community.py,sha256=4MtcoxEI9_0lmmilBEnvUEi8_O1Ivfa8p6eKxYU5-ts,12198
83
+ huggingface_hub/constants.py,sha256=1RdXbeORR-21auyKLsLbOJDIC9Cd70tYEAVWzP64BJc,10239
84
+ huggingface_hub/dataclasses.py,sha256=sgPdEi2UDprhNPP2PPkiSlzsHdC1WcpwVTLwlHAEcr0,17224
85
+ huggingface_hub/errors.py,sha256=D7Lw0Jjrf8vfmD0B26LEvg-JWkU8Zq0KDPJOzFY4QLw,11201
86
+ huggingface_hub/fastai_utils.py,sha256=DpeH9d-6ut2k_nCAAwglM51XmRmgfbRe2SPifpVL5Yk,16745
87
+ huggingface_hub/file_download.py,sha256=qXPRmGRTv1qAA_QwU7CHYusFGCME32ox1yQ6X62_5O8,78542
88
+ huggingface_hub/hf_api.py,sha256=LSteoR6ndvbkS1GortgAlfIZh2HNTZBOhiKUJ4pwgdY,444347
89
+ huggingface_hub/hf_file_system.py,sha256=U6IY_QLNzZfvpsbvKEiakOBS2U6cduZw5t0x8wBPUn4,47531
90
+ huggingface_hub/hub_mixin.py,sha256=LpbggOPIlr7L2QVi3DOfWsGYsde9OMlwxT5LZfcSdSQ,38115
91
+ huggingface_hub/inference/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
92
+ huggingface_hub/inference/__pycache__/__init__.cpython-312.pyc,,
93
+ huggingface_hub/inference/__pycache__/_client.cpython-312.pyc,,
94
+ huggingface_hub/inference/__pycache__/_common.cpython-312.pyc,,
95
+ huggingface_hub/inference/_client.py,sha256=3d1P9RT2DA4g1gAIxnq6g2vjzeCyX300F5afREEpjhc,161775
96
+ huggingface_hub/inference/_common.py,sha256=Ve-JI_A9LuDIPmL7Stsr9kch6yhs9kuwO1b1LxVCLsE,14781
97
+ huggingface_hub/inference/_generated/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
98
+ huggingface_hub/inference/_generated/__pycache__/__init__.cpython-312.pyc,,
99
+ huggingface_hub/inference/_generated/__pycache__/_async_client.cpython-312.pyc,,
100
+ huggingface_hub/inference/_generated/_async_client.py,sha256=D3Kv_EId7tMoU6ED41_2SHLrw2jlJIW2q0vHx0SxTpk,167696
101
+ huggingface_hub/inference/_generated/types/__init__.py,sha256=qI8Eu9WcBcKhVkLli6YniGHpfiJ9MLqtzmwXX35E7bA,6443
102
+ huggingface_hub/inference/_generated/types/__pycache__/__init__.cpython-312.pyc,,
103
+ huggingface_hub/inference/_generated/types/__pycache__/audio_classification.cpython-312.pyc,,
104
+ huggingface_hub/inference/_generated/types/__pycache__/audio_to_audio.cpython-312.pyc,,
105
+ huggingface_hub/inference/_generated/types/__pycache__/automatic_speech_recognition.cpython-312.pyc,,
106
+ huggingface_hub/inference/_generated/types/__pycache__/base.cpython-312.pyc,,
107
+ huggingface_hub/inference/_generated/types/__pycache__/chat_completion.cpython-312.pyc,,
108
+ huggingface_hub/inference/_generated/types/__pycache__/depth_estimation.cpython-312.pyc,,
109
+ huggingface_hub/inference/_generated/types/__pycache__/document_question_answering.cpython-312.pyc,,
110
+ huggingface_hub/inference/_generated/types/__pycache__/feature_extraction.cpython-312.pyc,,
111
+ huggingface_hub/inference/_generated/types/__pycache__/fill_mask.cpython-312.pyc,,
112
+ huggingface_hub/inference/_generated/types/__pycache__/image_classification.cpython-312.pyc,,
113
+ huggingface_hub/inference/_generated/types/__pycache__/image_segmentation.cpython-312.pyc,,
114
+ huggingface_hub/inference/_generated/types/__pycache__/image_to_image.cpython-312.pyc,,
115
+ huggingface_hub/inference/_generated/types/__pycache__/image_to_text.cpython-312.pyc,,
116
+ huggingface_hub/inference/_generated/types/__pycache__/object_detection.cpython-312.pyc,,
117
+ huggingface_hub/inference/_generated/types/__pycache__/question_answering.cpython-312.pyc,,
118
+ huggingface_hub/inference/_generated/types/__pycache__/sentence_similarity.cpython-312.pyc,,
119
+ huggingface_hub/inference/_generated/types/__pycache__/summarization.cpython-312.pyc,,
120
+ huggingface_hub/inference/_generated/types/__pycache__/table_question_answering.cpython-312.pyc,,
121
+ huggingface_hub/inference/_generated/types/__pycache__/text2text_generation.cpython-312.pyc,,
122
+ huggingface_hub/inference/_generated/types/__pycache__/text_classification.cpython-312.pyc,,
123
+ huggingface_hub/inference/_generated/types/__pycache__/text_generation.cpython-312.pyc,,
124
+ huggingface_hub/inference/_generated/types/__pycache__/text_to_audio.cpython-312.pyc,,
125
+ huggingface_hub/inference/_generated/types/__pycache__/text_to_image.cpython-312.pyc,,
126
+ huggingface_hub/inference/_generated/types/__pycache__/text_to_speech.cpython-312.pyc,,
127
+ huggingface_hub/inference/_generated/types/__pycache__/text_to_video.cpython-312.pyc,,
128
+ huggingface_hub/inference/_generated/types/__pycache__/token_classification.cpython-312.pyc,,
129
+ huggingface_hub/inference/_generated/types/__pycache__/translation.cpython-312.pyc,,
130
+ huggingface_hub/inference/_generated/types/__pycache__/video_classification.cpython-312.pyc,,
131
+ huggingface_hub/inference/_generated/types/__pycache__/visual_question_answering.cpython-312.pyc,,
132
+ huggingface_hub/inference/_generated/types/__pycache__/zero_shot_classification.cpython-312.pyc,,
133
+ huggingface_hub/inference/_generated/types/__pycache__/zero_shot_image_classification.cpython-312.pyc,,
134
+ huggingface_hub/inference/_generated/types/__pycache__/zero_shot_object_detection.cpython-312.pyc,,
135
+ huggingface_hub/inference/_generated/types/audio_classification.py,sha256=Jg3mzfGhCSH6CfvVvgJSiFpkz6v4nNA0G4LJXacEgNc,1573
136
+ huggingface_hub/inference/_generated/types/audio_to_audio.py,sha256=2Ep4WkePL7oJwcp5nRJqApwviumGHbft9HhXE9XLHj4,891
137
+ huggingface_hub/inference/_generated/types/automatic_speech_recognition.py,sha256=8CEphr6rvRHgq1L5Md3tq14V0tEAmzJkemh1_7gSswo,5515
138
+ huggingface_hub/inference/_generated/types/base.py,sha256=4XG49q0-2SOftYQ8HXQnWLxiJktou-a7IoG3kdOv-kg,6751
139
+ huggingface_hub/inference/_generated/types/chat_completion.py,sha256=6EqWnpbeT0zsiLNZjoJDzrmZ34M2j01S99oMMayZg9Y,11182
140
+ huggingface_hub/inference/_generated/types/depth_estimation.py,sha256=rcpe9MhYMeLjflOwBs3KMZPr6WjOH3FYEThStG-FJ3M,929
141
+ huggingface_hub/inference/_generated/types/document_question_answering.py,sha256=6BEYGwJcqGlah4RBJDAvWFTEXkO0mosBiMy82432nAM,3202
142
+ huggingface_hub/inference/_generated/types/feature_extraction.py,sha256=NMWVL_TLSG5SS5bdt1-fflkZ75UMlMKeTMtmdnUTADc,1537
143
+ huggingface_hub/inference/_generated/types/fill_mask.py,sha256=OrTgQ7Ndn0_dWK5thQhZwTOHbQni8j0iJcx9llyhRds,1708
144
+ huggingface_hub/inference/_generated/types/image_classification.py,sha256=A-Y024o8723_n8mGVos4TwdAkVL62McGeL1iIo4VzNs,1585
145
+ huggingface_hub/inference/_generated/types/image_segmentation.py,sha256=vrkI4SuP1Iq_iLXc-2pQhYY3SHN4gzvFBoZqbUHxU7o,1950
146
+ huggingface_hub/inference/_generated/types/image_to_image.py,sha256=HPz1uKXk_9xvgNUi3GV6n4lw-J3G6cdGTcW3Ou_N0l8,2044
147
+ huggingface_hub/inference/_generated/types/image_to_text.py,sha256=OaFEBAfgT-fOVzJ7xVermGf7VODhrc9-Jg38WrM7-2o,4810
148
+ huggingface_hub/inference/_generated/types/object_detection.py,sha256=VuFlb1281qTXoSgJDmquGz-VNfEZLo2H0Rh_F6MF6ts,2000
149
+ huggingface_hub/inference/_generated/types/question_answering.py,sha256=zw38a9_9l2k1ifYZefjkioqZ4asfSRM9M4nU3gSCmAQ,2898
150
+ huggingface_hub/inference/_generated/types/sentence_similarity.py,sha256=w5Nj1g18eBzopZwxuDLI-fEsyaCK2KrHA5yf_XfSjgo,1052
151
+ huggingface_hub/inference/_generated/types/summarization.py,sha256=WGGr8uDLrZg8JQgF9ZMUP9euw6uZo6zwkVZ-IfvCFI0,1487
152
+ huggingface_hub/inference/_generated/types/table_question_answering.py,sha256=cJnIPA2fIbQP2Ejn7X_esY48qGWoXg30fnNOqCXiOVQ,2293
153
+ huggingface_hub/inference/_generated/types/text2text_generation.py,sha256=v-418w1JNNSZ2tuW9DUl6a36TQQCADa438A3ufvcbOw,1609
154
+ huggingface_hub/inference/_generated/types/text_classification.py,sha256=FarAjygLEfPofLfKeabzJ7PKEBItlHGoUNUOzyLRpL4,1445
155
+ huggingface_hub/inference/_generated/types/text_generation.py,sha256=28u-1zU7elk2teP3y4u1VAtDDHzY0JZ2KEEJe5d5uvg,5922
156
+ huggingface_hub/inference/_generated/types/text_to_audio.py,sha256=1HR9Q6s9MXqtKGTvHPLGVMum5-eg7O-Pgv6Nd0v8_HU,4741
157
+ huggingface_hub/inference/_generated/types/text_to_image.py,sha256=sGGi1Fa0n5Pmd6G3I-F2SBJcJ1M7Gmqnng6sfi0AVzs,1903
158
+ huggingface_hub/inference/_generated/types/text_to_speech.py,sha256=ROFuR32ijROCeqbv81Jos0lmaA8SRWyIUsWrdD4yWow,4760
159
+ huggingface_hub/inference/_generated/types/text_to_video.py,sha256=yHXVNs3t6aYO7visrBlB5cH7kjoysxF9510aofcf_18,1790
160
+ huggingface_hub/inference/_generated/types/token_classification.py,sha256=iblAcgfxXeaLYJ14NdiiCMIQuBlarUknLkXUklhvcLI,1915
161
+ huggingface_hub/inference/_generated/types/translation.py,sha256=xww4X5cfCYv_F0oINWLwqJRPCT6SV3VBAJuPjTs_j7o,1763
162
+ huggingface_hub/inference/_generated/types/video_classification.py,sha256=TyydjQw2NRLK9sDGzJUVnkDeo848ebmCx588Ur8I9q0,1680
163
+ huggingface_hub/inference/_generated/types/visual_question_answering.py,sha256=AWrQ6qo4gZa3PGedaNpzDFqx5yOYyjhnUB6iuZEj_uo,1673
164
+ huggingface_hub/inference/_generated/types/zero_shot_classification.py,sha256=BAiebPjsqoNa8EU35Dx0pfIv8W2c4GSl-TJckV1MaxQ,1738
165
+ huggingface_hub/inference/_generated/types/zero_shot_image_classification.py,sha256=8J9n6VqFARkWvPfAZNWEG70AlrMGldU95EGQQwn06zI,1487
166
+ huggingface_hub/inference/_generated/types/zero_shot_object_detection.py,sha256=GUd81LIV7oEbRWayDlAVgyLmY596r1M3AW0jXDp1yTA,1630
167
+ huggingface_hub/inference/_mcp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
168
+ huggingface_hub/inference/_mcp/__pycache__/__init__.cpython-312.pyc,,
169
+ huggingface_hub/inference/_mcp/__pycache__/_cli_hacks.cpython-312.pyc,,
170
+ huggingface_hub/inference/_mcp/__pycache__/agent.cpython-312.pyc,,
171
+ huggingface_hub/inference/_mcp/__pycache__/cli.cpython-312.pyc,,
172
+ huggingface_hub/inference/_mcp/__pycache__/constants.cpython-312.pyc,,
173
+ huggingface_hub/inference/_mcp/__pycache__/mcp_client.cpython-312.pyc,,
174
+ huggingface_hub/inference/_mcp/__pycache__/types.cpython-312.pyc,,
175
+ huggingface_hub/inference/_mcp/__pycache__/utils.cpython-312.pyc,,
176
+ huggingface_hub/inference/_mcp/_cli_hacks.py,sha256=cMZirVFe4N0EM9Nzzs9aEmzUBUEBYR4oYZpByTWlZCM,3182
177
+ huggingface_hub/inference/_mcp/agent.py,sha256=VahvSqldiC1R72CFH4T05l80uEXl5OjLwboWQFUJbsw,4281
178
+ huggingface_hub/inference/_mcp/cli.py,sha256=bvcS8NCr8sEqB4GGaqL85kytri8JyGjbwtI5A7DoDWA,9031
179
+ huggingface_hub/inference/_mcp/constants.py,sha256=tE_V6qcvsmvVoJa4eg04jhoTR2Cx1cNHieY2ENrm1_M,2511
180
+ huggingface_hub/inference/_mcp/mcp_client.py,sha256=ndaTcZZPbU1ZTNUeB9-WdaOx7bHD3lsrXnKxCeiwpUg,15788
181
+ huggingface_hub/inference/_mcp/types.py,sha256=e6bcvFt2nu2hMaX37hY7tsRm2FY2DoHRNyvz9_AbkH0,743
182
+ huggingface_hub/inference/_mcp/utils.py,sha256=VsRWl0fuSZDS0zNT9n7FOMSlzA0UBbP8p8xWKWDt2Pc,4093
183
+ huggingface_hub/inference/_providers/__init__.py,sha256=rOaUL8zXKazYMgnPMDxEN7Y3nZwaKsA0gkILLWN1HLg,8116
184
+ huggingface_hub/inference/_providers/__pycache__/__init__.cpython-312.pyc,,
185
+ huggingface_hub/inference/_providers/__pycache__/_common.cpython-312.pyc,,
186
+ huggingface_hub/inference/_providers/__pycache__/black_forest_labs.cpython-312.pyc,,
187
+ huggingface_hub/inference/_providers/__pycache__/cerebras.cpython-312.pyc,,
188
+ huggingface_hub/inference/_providers/__pycache__/cohere.cpython-312.pyc,,
189
+ huggingface_hub/inference/_providers/__pycache__/fal_ai.cpython-312.pyc,,
190
+ huggingface_hub/inference/_providers/__pycache__/featherless_ai.cpython-312.pyc,,
191
+ huggingface_hub/inference/_providers/__pycache__/fireworks_ai.cpython-312.pyc,,
192
+ huggingface_hub/inference/_providers/__pycache__/groq.cpython-312.pyc,,
193
+ huggingface_hub/inference/_providers/__pycache__/hf_inference.cpython-312.pyc,,
194
+ huggingface_hub/inference/_providers/__pycache__/hyperbolic.cpython-312.pyc,,
195
+ huggingface_hub/inference/_providers/__pycache__/nebius.cpython-312.pyc,,
196
+ huggingface_hub/inference/_providers/__pycache__/novita.cpython-312.pyc,,
197
+ huggingface_hub/inference/_providers/__pycache__/nscale.cpython-312.pyc,,
198
+ huggingface_hub/inference/_providers/__pycache__/openai.cpython-312.pyc,,
199
+ huggingface_hub/inference/_providers/__pycache__/replicate.cpython-312.pyc,,
200
+ huggingface_hub/inference/_providers/__pycache__/sambanova.cpython-312.pyc,,
201
+ huggingface_hub/inference/_providers/__pycache__/together.cpython-312.pyc,,
202
+ huggingface_hub/inference/_providers/_common.py,sha256=dlZMj20j_81klm-a1VdEbH5pPGjclIv1lLU2urh_Zzk,11448
203
+ huggingface_hub/inference/_providers/black_forest_labs.py,sha256=wO7qgRyNyrIKlZtvL3vJEbS4-D19kfoXZk6PDh1dTis,2842
204
+ huggingface_hub/inference/_providers/cerebras.py,sha256=QOJ-1U-os7uE7p6eUnn_P_APq-yQhx28be7c3Tq2EuA,210
205
+ huggingface_hub/inference/_providers/cohere.py,sha256=O3tC-qIUL91mx_mE8bOHCtDWcQuKOUauhUoXSUBUCZ8,1253
206
+ huggingface_hub/inference/_providers/fal_ai.py,sha256=gGWPsvQIsuk3kTIXHwpOqA0R1ZsPEo5MYc7OwUoFjxY,7162
207
+ huggingface_hub/inference/_providers/featherless_ai.py,sha256=QxBz-32O4PztxixrIjrfKuTOzvfqyUi-cVsw0Hf_zlY,1382
208
+ huggingface_hub/inference/_providers/fireworks_ai.py,sha256=Id226ITfPkOcFMFzly3MW9l-dZl9l4qizL4JEHWkBFk,1215
209
+ huggingface_hub/inference/_providers/groq.py,sha256=JTk2JV4ZOlaohho7zLAFQtk92kGVsPmLJ1hmzcwsqvQ,315
210
+ huggingface_hub/inference/_providers/hf_inference.py,sha256=PoHxjrQ9hs5KZ6iKp2SSum7uuoF_JoyurS4ymF_qhgI,9133
211
+ huggingface_hub/inference/_providers/hyperbolic.py,sha256=OQIBi2j3aNvuaSQ8BUK1K1PVeRXdrxc80G-6YmBa-ns,1985
212
+ huggingface_hub/inference/_providers/nebius.py,sha256=VJpTF2JZ58rznc9wxdk-57vwF8sV2vESw_WkXjXqCho,3580
213
+ huggingface_hub/inference/_providers/novita.py,sha256=HGVC8wPraRQUuI5uBoye1Y4Wqe4X116B71GhhbWy5yM,2514
214
+ huggingface_hub/inference/_providers/nscale.py,sha256=qWUsWinQmUbNUqehyKn34tVoWehu8gd-OZ2F4uj2SWM,1802
215
+ huggingface_hub/inference/_providers/openai.py,sha256=GCVYeNdjWIgpQQ7E_Xv8IebmdhTi0S6WfFosz3nLtps,1089
216
+ huggingface_hub/inference/_providers/replicate.py,sha256=zFQnnAaNmRruqTvZUG_8It8xkKePHLGKRomSkwjrUuk,3157
217
+ huggingface_hub/inference/_providers/sambanova.py,sha256=Unt3H3jr_kgI9vzRjmmW1DFyoEuPkKCcgIIloiOj3j8,2037
218
+ huggingface_hub/inference/_providers/together.py,sha256=KHF19CS3qXS7G1-CwcMiD8Z5wzPKEKi4F2DzqAthbBE,3439
219
+ huggingface_hub/inference_api.py,sha256=b4-NhPSn9b44nYKV8tDKXodmE4JVdEymMWL4CVGkzlE,8323
220
+ huggingface_hub/keras_mixin.py,sha256=3d2oW35SALXHq-WHoLD_tbq0UrcabGKj3HidtPRx51U,19574
221
+ huggingface_hub/lfs.py,sha256=n-TIjK7J7aXG3zi__0nkd6aNkE4djOf9CD6dYQOQ5P8,16649
222
+ huggingface_hub/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
223
+ huggingface_hub/repocard.py,sha256=ihFBKYqPNaWw9rWMUvcaRKxrooL32NA4fAlrwzXk9LY,34733
224
+ huggingface_hub/repocard_data.py,sha256=hr4ReFpEQMNdh_9Dx-L-IJoI1ElHyk-h-8ZRqwVYYOE,34082
225
+ huggingface_hub/repository.py,sha256=xVQR-MRKNDfJ_Z_99DwtXZB3xNO06eYG_GvRM4fLiTU,54557
226
+ huggingface_hub/serialization/__init__.py,sha256=kn-Fa-m4FzMnN8lNsF-SwFcfzug4CucexybGKyvZ8S0,1041
227
+ huggingface_hub/serialization/__pycache__/__init__.cpython-312.pyc,,
228
+ huggingface_hub/serialization/__pycache__/_base.cpython-312.pyc,,
229
+ huggingface_hub/serialization/__pycache__/_dduf.cpython-312.pyc,,
230
+ huggingface_hub/serialization/__pycache__/_tensorflow.cpython-312.pyc,,
231
+ huggingface_hub/serialization/__pycache__/_torch.cpython-312.pyc,,
232
+ huggingface_hub/serialization/_base.py,sha256=Df3GwGR9NzeK_SD75prXLucJAzPiNPgHbgXSw-_LTk8,8126
233
+ huggingface_hub/serialization/_dduf.py,sha256=s42239rLiHwaJE36QDEmS5GH7DSmQ__BffiHJO5RjIg,15424
234
+ huggingface_hub/serialization/_tensorflow.py,sha256=zHOvEMg-JHC55Fm4roDT3LUCDO5zB9qtXZffG065RAM,3625
235
+ huggingface_hub/serialization/_torch.py,sha256=jpBmuSZJymMpvLcDcMaNxDu_fE5VkY_pAVH8e8stYIo,45201
236
+ huggingface_hub/templates/datasetcard_template.md,sha256=W-EMqR6wndbrnZorkVv56URWPG49l7MATGeI015kTvs,5503
237
+ huggingface_hub/templates/modelcard_template.md,sha256=4AqArS3cqdtbit5Bo-DhjcnDFR-pza5hErLLTPM4Yuc,6870
238
+ huggingface_hub/utils/__init__.py,sha256=ORfVkn5D0wuLIq12jjhTzn5_c4F8fRPxB7TG-iednuQ,3722
239
+ huggingface_hub/utils/__pycache__/__init__.cpython-312.pyc,,
240
+ huggingface_hub/utils/__pycache__/_auth.cpython-312.pyc,,
241
+ huggingface_hub/utils/__pycache__/_cache_assets.cpython-312.pyc,,
242
+ huggingface_hub/utils/__pycache__/_cache_manager.cpython-312.pyc,,
243
+ huggingface_hub/utils/__pycache__/_chunk_utils.cpython-312.pyc,,
244
+ huggingface_hub/utils/__pycache__/_datetime.cpython-312.pyc,,
245
+ huggingface_hub/utils/__pycache__/_deprecation.cpython-312.pyc,,
246
+ huggingface_hub/utils/__pycache__/_experimental.cpython-312.pyc,,
247
+ huggingface_hub/utils/__pycache__/_fixes.cpython-312.pyc,,
248
+ huggingface_hub/utils/__pycache__/_git_credential.cpython-312.pyc,,
249
+ huggingface_hub/utils/__pycache__/_headers.cpython-312.pyc,,
250
+ huggingface_hub/utils/__pycache__/_hf_folder.cpython-312.pyc,,
251
+ huggingface_hub/utils/__pycache__/_http.cpython-312.pyc,,
252
+ huggingface_hub/utils/__pycache__/_lfs.cpython-312.pyc,,
253
+ huggingface_hub/utils/__pycache__/_pagination.cpython-312.pyc,,
254
+ huggingface_hub/utils/__pycache__/_paths.cpython-312.pyc,,
255
+ huggingface_hub/utils/__pycache__/_runtime.cpython-312.pyc,,
256
+ huggingface_hub/utils/__pycache__/_safetensors.cpython-312.pyc,,
257
+ huggingface_hub/utils/__pycache__/_subprocess.cpython-312.pyc,,
258
+ huggingface_hub/utils/__pycache__/_telemetry.cpython-312.pyc,,
259
+ huggingface_hub/utils/__pycache__/_typing.cpython-312.pyc,,
260
+ huggingface_hub/utils/__pycache__/_validators.cpython-312.pyc,,
261
+ huggingface_hub/utils/__pycache__/_xet.cpython-312.pyc,,
262
+ huggingface_hub/utils/__pycache__/endpoint_helpers.cpython-312.pyc,,
263
+ huggingface_hub/utils/__pycache__/insecure_hashlib.cpython-312.pyc,,
264
+ huggingface_hub/utils/__pycache__/logging.cpython-312.pyc,,
265
+ huggingface_hub/utils/__pycache__/sha.cpython-312.pyc,,
266
+ huggingface_hub/utils/__pycache__/tqdm.cpython-312.pyc,,
267
+ huggingface_hub/utils/_auth.py,sha256=-9p3SSOtWKMMCDKlsM_-ebsIGX0sSgKTSnC-_O4kTxg,8294
268
+ huggingface_hub/utils/_cache_assets.py,sha256=kai77HPQMfYpROouMBQCr_gdBCaeTm996Sqj0dExbNg,5728
269
+ huggingface_hub/utils/_cache_manager.py,sha256=GhiuVQsEkWU55uYkkgiGJV1_naeciyk8u4qb4WTIVyw,34531
270
+ huggingface_hub/utils/_chunk_utils.py,sha256=kRCaj5228_vKcyLWspd8Xq01f17Jz6ds5Sr9ed5d_RU,2130
271
+ huggingface_hub/utils/_datetime.py,sha256=kCS5jaKV25kOncX1xujbXsz5iDLcjLcLw85semGNzxQ,2770
272
+ huggingface_hub/utils/_deprecation.py,sha256=HZhRGGUX_QMKBBBwHHlffLtmCSK01TOpeXHefZbPfwI,4872
273
+ huggingface_hub/utils/_experimental.py,sha256=3-c8irbn9sJr2CwWbzhGkIrdXKg8_x7BifhHFy32ei8,2470
274
+ huggingface_hub/utils/_fixes.py,sha256=xQV1QkUn2WpLqLjtXNiyn9gh-454K6AF-Q3kwkYAQD8,4437
275
+ huggingface_hub/utils/_git_credential.py,sha256=SDdsiREr1TcAR2Ze2TB0E5cYzVJgvDZrs60od9lAsMc,4596
276
+ huggingface_hub/utils/_headers.py,sha256=3tKQN5ciAt1683nZXEpPyQOS7oWnfYI0t_N_aJU-bms,8876
277
+ huggingface_hub/utils/_hf_folder.py,sha256=WNjTnu0Q7tqcSS9EsP4ssCJrrJMcCvAt8P_-LEtmOU8,2487
278
+ huggingface_hub/utils/_http.py,sha256=her7UZ0KRo9WYDArpqVFyEXTusOGUECj5HNS8Eahqm8,25531
279
+ huggingface_hub/utils/_lfs.py,sha256=EC0Oz6Wiwl8foRNkUOzrETXzAWlbgpnpxo5a410ovFY,3957
280
+ huggingface_hub/utils/_pagination.py,sha256=EX5tRasSuQDaKbXuGYbInBK2odnSWNHgzw2tSgqeBRI,1906
281
+ huggingface_hub/utils/_paths.py,sha256=w1ZhFmmD5ykWjp_hAvhjtOoa2ZUcOXJrF4a6O3QpAWo,5042
282
+ huggingface_hub/utils/_runtime.py,sha256=uzBNsuyNd2QtWzMgEwSoJNUtW24iqNjA-ZNDG1fc9i4,11616
283
+ huggingface_hub/utils/_safetensors.py,sha256=GW3nyv7xQcuwObKYeYoT9VhURVzG1DZTbKBKho8Bbos,4458
284
+ huggingface_hub/utils/_subprocess.py,sha256=u9FFUDE7TrzQTiuEzlUnHx7S2P57GbYRV8u16GJwrFw,4625
285
+ huggingface_hub/utils/_telemetry.py,sha256=54LXeIJU5pEGghPAh06gqNAR-UoxOjVLvKqAQscwqZs,4890
286
+ huggingface_hub/utils/_typing.py,sha256=Dgp6TQUlpzStfVLoSvXHCBP4b3NzHZ8E0Gg9mYAoDS4,2903
287
+ huggingface_hub/utils/_validators.py,sha256=dDsVG31iooTYrIyi5Vwr1DukL0fEmJwu3ceVNduhsuE,9204
288
+ huggingface_hub/utils/_xet.py,sha256=JXgVCli8lD7O1MsvkgqnWY6S9giq1XMrHmtOPPeLmDQ,7020
289
+ huggingface_hub/utils/endpoint_helpers.py,sha256=9VtIAlxQ5H_4y30sjCAgbu7XCqAtNLC7aRYxaNn0hLI,2366
290
+ huggingface_hub/utils/insecure_hashlib.py,sha256=iAaepavFZ5Dhfa5n8KozRfQprKmvcjSnt3X58OUl9fQ,1142
291
+ huggingface_hub/utils/logging.py,sha256=0A8fF1yh3L9Ka_bCDX2ml4U5Ht0tY8Dr3JcbRvWFuwo,4909
292
+ huggingface_hub/utils/sha.py,sha256=OFnNGCba0sNcT2gUwaVCJnldxlltrHHe0DS_PCpV3C4,2134
293
+ huggingface_hub/utils/tqdm.py,sha256=xAKcyfnNHsZ7L09WuEM5Ew5-MDhiahLACbbN2zMmcLs,10671
venv/lib/python3.12/site-packages/idna/intranges.py ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Given a list of integers, made up of (hopefully) a small number of long runs
3
+ of consecutive integers, compute a representation of the form
4
+ ((start1, end1), (start2, end2) ...). Then answer the question "was x present
5
+ in the original list?" in time O(log(# runs)).
6
+ """
7
+
8
+ import bisect
9
+ from typing import List, Tuple
10
+
11
+
12
+ def intranges_from_list(list_: List[int]) -> Tuple[int, ...]:
13
+ """Represent a list of integers as a sequence of ranges:
14
+ ((start_0, end_0), (start_1, end_1), ...), such that the original
15
+ integers are exactly those x such that start_i <= x < end_i for some i.
16
+
17
+ Ranges are encoded as single integers (start << 32 | end), not as tuples.
18
+ """
19
+
20
+ sorted_list = sorted(list_)
21
+ ranges = []
22
+ last_write = -1
23
+ for i in range(len(sorted_list)):
24
+ if i + 1 < len(sorted_list):
25
+ if sorted_list[i] == sorted_list[i + 1] - 1:
26
+ continue
27
+ current_range = sorted_list[last_write + 1 : i + 1]
28
+ ranges.append(_encode_range(current_range[0], current_range[-1] + 1))
29
+ last_write = i
30
+
31
+ return tuple(ranges)
32
+
33
+
34
+ def _encode_range(start: int, end: int) -> int:
35
+ return (start << 32) | end
36
+
37
+
38
+ def _decode_range(r: int) -> Tuple[int, int]:
39
+ return (r >> 32), (r & ((1 << 32) - 1))
40
+
41
+
42
+ def intranges_contain(int_: int, ranges: Tuple[int, ...]) -> bool:
43
+ """Determine if `int_` falls into one of the ranges in `ranges`."""
44
+ tuple_ = _encode_range(int_, 0)
45
+ pos = bisect.bisect_left(ranges, tuple_)
46
+ # we could be immediately ahead of a tuple (start, end)
47
+ # with start < int_ <= end
48
+ if pos > 0:
49
+ left, right = _decode_range(ranges[pos - 1])
50
+ if left <= int_ < right:
51
+ return True
52
+ # or we could be immediately behind a tuple (int_, end)
53
+ if pos < len(ranges):
54
+ left, _ = _decode_range(ranges[pos])
55
+ if left == int_:
56
+ return True
57
+ return False
venv/lib/python3.12/site-packages/idna/package_data.py ADDED
@@ -0,0 +1 @@
 
 
1
+ __version__ = "3.10"
venv/lib/python3.12/site-packages/idna/py.typed ADDED
File without changes
venv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/autocompletion.cpython-312.pyc ADDED
Binary file (8.46 kB). View file
 
venv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/base_command.cpython-312.pyc ADDED
Binary file (10.5 kB). View file
 
venv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/cmdoptions.cpython-312.pyc ADDED
Binary file (30.4 kB). View file
 
venv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/main.cpython-312.pyc ADDED
Binary file (2.3 kB). View file
 
venv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/parser.cpython-312.pyc ADDED
Binary file (15 kB). View file
 
venv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/req_command.cpython-312.pyc ADDED
Binary file (18.8 kB). View file
 
venv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/status_codes.cpython-312.pyc ADDED
Binary file (372 Bytes). View file
 
venv/lib/python3.12/site-packages/pip/_internal/distributions/__pycache__/sdist.cpython-312.pyc ADDED
Binary file (8.49 kB). View file
 
venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/compat.cpython-312.pyc ADDED
Binary file (2.21 kB). View file
 
venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/entrypoints.cpython-312.pyc ADDED
Binary file (3.99 kB). View file
 
venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/logging.cpython-312.pyc ADDED
Binary file (13.6 kB). View file
 
venv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/unpacking.cpython-312.pyc ADDED
Binary file (11.1 kB). View file
 
venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__init__.py ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SPDX-FileCopyrightText: 2015 Eric Larson
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ """CacheControl import Interface.
6
+
7
+ Make it easy to import from cachecontrol without long namespaces.
8
+ """
9
+ __author__ = "Eric Larson"
10
+ __email__ = "eric@ionrock.org"
11
+ __version__ = "0.13.1"
12
+
13
+ from pip._vendor.cachecontrol.adapter import CacheControlAdapter
14
+ from pip._vendor.cachecontrol.controller import CacheController
15
+ from pip._vendor.cachecontrol.wrapper import CacheControl
16
+
17
+ __all__ = [
18
+ "__author__",
19
+ "__email__",
20
+ "__version__",
21
+ "CacheControlAdapter",
22
+ "CacheController",
23
+ "CacheControl",
24
+ ]
25
+
26
+ import logging
27
+
28
+ logging.getLogger(__name__).addHandler(logging.NullHandler())
venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/_cmd.py ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SPDX-FileCopyrightText: 2015 Eric Larson
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+ from __future__ import annotations
5
+
6
+ import logging
7
+ from argparse import ArgumentParser
8
+ from typing import TYPE_CHECKING
9
+
10
+ from pip._vendor import requests
11
+
12
+ from pip._vendor.cachecontrol.adapter import CacheControlAdapter
13
+ from pip._vendor.cachecontrol.cache import DictCache
14
+ from pip._vendor.cachecontrol.controller import logger
15
+
16
+ if TYPE_CHECKING:
17
+ from argparse import Namespace
18
+
19
+ from pip._vendor.cachecontrol.controller import CacheController
20
+
21
+
22
+ def setup_logging() -> None:
23
+ logger.setLevel(logging.DEBUG)
24
+ handler = logging.StreamHandler()
25
+ logger.addHandler(handler)
26
+
27
+
28
+ def get_session() -> requests.Session:
29
+ adapter = CacheControlAdapter(
30
+ DictCache(), cache_etags=True, serializer=None, heuristic=None
31
+ )
32
+ sess = requests.Session()
33
+ sess.mount("http://", adapter)
34
+ sess.mount("https://", adapter)
35
+
36
+ sess.cache_controller = adapter.controller # type: ignore[attr-defined]
37
+ return sess
38
+
39
+
40
+ def get_args() -> Namespace:
41
+ parser = ArgumentParser()
42
+ parser.add_argument("url", help="The URL to try and cache")
43
+ return parser.parse_args()
44
+
45
+
46
+ def main() -> None:
47
+ args = get_args()
48
+ sess = get_session()
49
+
50
+ # Make a request to get a response
51
+ resp = sess.get(args.url)
52
+
53
+ # Turn on logging
54
+ setup_logging()
55
+
56
+ # try setting the cache
57
+ cache_controller: CacheController = (
58
+ sess.cache_controller # type: ignore[attr-defined]
59
+ )
60
+ cache_controller.cache_response(resp.request, resp.raw)
61
+
62
+ # Now try to get it
63
+ if cache_controller.cached_request(resp.request):
64
+ print("Cached!")
65
+ else:
66
+ print("Not cached :(")
67
+
68
+
69
+ if __name__ == "__main__":
70
+ main()
venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/adapter.py ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SPDX-FileCopyrightText: 2015 Eric Larson
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+ from __future__ import annotations
5
+
6
+ import functools
7
+ import types
8
+ import zlib
9
+ from typing import TYPE_CHECKING, Any, Collection, Mapping
10
+
11
+ from pip._vendor.requests.adapters import HTTPAdapter
12
+
13
+ from pip._vendor.cachecontrol.cache import DictCache
14
+ from pip._vendor.cachecontrol.controller import PERMANENT_REDIRECT_STATUSES, CacheController
15
+ from pip._vendor.cachecontrol.filewrapper import CallbackFileWrapper
16
+
17
+ if TYPE_CHECKING:
18
+ from pip._vendor.requests import PreparedRequest, Response
19
+ from pip._vendor.urllib3 import HTTPResponse
20
+
21
+ from pip._vendor.cachecontrol.cache import BaseCache
22
+ from pip._vendor.cachecontrol.heuristics import BaseHeuristic
23
+ from pip._vendor.cachecontrol.serialize import Serializer
24
+
25
+
26
+ class CacheControlAdapter(HTTPAdapter):
27
+ invalidating_methods = {"PUT", "PATCH", "DELETE"}
28
+
29
+ def __init__(
30
+ self,
31
+ cache: BaseCache | None = None,
32
+ cache_etags: bool = True,
33
+ controller_class: type[CacheController] | None = None,
34
+ serializer: Serializer | None = None,
35
+ heuristic: BaseHeuristic | None = None,
36
+ cacheable_methods: Collection[str] | None = None,
37
+ *args: Any,
38
+ **kw: Any,
39
+ ) -> None:
40
+ super().__init__(*args, **kw)
41
+ self.cache = DictCache() if cache is None else cache
42
+ self.heuristic = heuristic
43
+ self.cacheable_methods = cacheable_methods or ("GET",)
44
+
45
+ controller_factory = controller_class or CacheController
46
+ self.controller = controller_factory(
47
+ self.cache, cache_etags=cache_etags, serializer=serializer
48
+ )
49
+
50
+ def send(
51
+ self,
52
+ request: PreparedRequest,
53
+ stream: bool = False,
54
+ timeout: None | float | tuple[float, float] | tuple[float, None] = None,
55
+ verify: bool | str = True,
56
+ cert: (None | bytes | str | tuple[bytes | str, bytes | str]) = None,
57
+ proxies: Mapping[str, str] | None = None,
58
+ cacheable_methods: Collection[str] | None = None,
59
+ ) -> Response:
60
+ """
61
+ Send a request. Use the request information to see if it
62
+ exists in the cache and cache the response if we need to and can.
63
+ """
64
+ cacheable = cacheable_methods or self.cacheable_methods
65
+ if request.method in cacheable:
66
+ try:
67
+ cached_response = self.controller.cached_request(request)
68
+ except zlib.error:
69
+ cached_response = None
70
+ if cached_response:
71
+ return self.build_response(request, cached_response, from_cache=True)
72
+
73
+ # check for etags and add headers if appropriate
74
+ request.headers.update(self.controller.conditional_headers(request))
75
+
76
+ resp = super().send(request, stream, timeout, verify, cert, proxies)
77
+
78
+ return resp
79
+
80
+ def build_response(
81
+ self,
82
+ request: PreparedRequest,
83
+ response: HTTPResponse,
84
+ from_cache: bool = False,
85
+ cacheable_methods: Collection[str] | None = None,
86
+ ) -> Response:
87
+ """
88
+ Build a response by making a request or using the cache.
89
+
90
+ This will end up calling send and returning a potentially
91
+ cached response
92
+ """
93
+ cacheable = cacheable_methods or self.cacheable_methods
94
+ if not from_cache and request.method in cacheable:
95
+ # Check for any heuristics that might update headers
96
+ # before trying to cache.
97
+ if self.heuristic:
98
+ response = self.heuristic.apply(response)
99
+
100
+ # apply any expiration heuristics
101
+ if response.status == 304:
102
+ # We must have sent an ETag request. This could mean
103
+ # that we've been expired already or that we simply
104
+ # have an etag. In either case, we want to try and
105
+ # update the cache if that is the case.
106
+ cached_response = self.controller.update_cached_response(
107
+ request, response
108
+ )
109
+
110
+ if cached_response is not response:
111
+ from_cache = True
112
+
113
+ # We are done with the server response, read a
114
+ # possible response body (compliant servers will
115
+ # not return one, but we cannot be 100% sure) and
116
+ # release the connection back to the pool.
117
+ response.read(decode_content=False)
118
+ response.release_conn()
119
+
120
+ response = cached_response
121
+
122
+ # We always cache the 301 responses
123
+ elif int(response.status) in PERMANENT_REDIRECT_STATUSES:
124
+ self.controller.cache_response(request, response)
125
+ else:
126
+ # Wrap the response file with a wrapper that will cache the
127
+ # response when the stream has been consumed.
128
+ response._fp = CallbackFileWrapper( # type: ignore[attr-defined]
129
+ response._fp, # type: ignore[attr-defined]
130
+ functools.partial(
131
+ self.controller.cache_response, request, response
132
+ ),
133
+ )
134
+ if response.chunked:
135
+ super_update_chunk_length = response._update_chunk_length # type: ignore[attr-defined]
136
+
137
+ def _update_chunk_length(self: HTTPResponse) -> None:
138
+ super_update_chunk_length()
139
+ if self.chunk_left == 0:
140
+ self._fp._close() # type: ignore[attr-defined]
141
+
142
+ response._update_chunk_length = types.MethodType( # type: ignore[attr-defined]
143
+ _update_chunk_length, response
144
+ )
145
+
146
+ resp: Response = super().build_response(request, response) # type: ignore[no-untyped-call]
147
+
148
+ # See if we should invalidate the cache.
149
+ if request.method in self.invalidating_methods and resp.ok:
150
+ assert request.url is not None
151
+ cache_url = self.controller.cache_url(request.url)
152
+ self.cache.delete(cache_url)
153
+
154
+ # Give the request a from_cache attr to let people use it
155
+ resp.from_cache = from_cache # type: ignore[attr-defined]
156
+
157
+ return resp
158
+
159
+ def close(self) -> None:
160
+ self.cache.close()
161
+ super().close() # type: ignore[no-untyped-call]
venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/cache.py ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SPDX-FileCopyrightText: 2015 Eric Larson
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ """
6
+ The cache object API for implementing caches. The default is a thread
7
+ safe in-memory dictionary.
8
+ """
9
+ from __future__ import annotations
10
+
11
+ from threading import Lock
12
+ from typing import IO, TYPE_CHECKING, MutableMapping
13
+
14
+ if TYPE_CHECKING:
15
+ from datetime import datetime
16
+
17
+
18
+ class BaseCache:
19
+ def get(self, key: str) -> bytes | None:
20
+ raise NotImplementedError()
21
+
22
+ def set(
23
+ self, key: str, value: bytes, expires: int | datetime | None = None
24
+ ) -> None:
25
+ raise NotImplementedError()
26
+
27
+ def delete(self, key: str) -> None:
28
+ raise NotImplementedError()
29
+
30
+ def close(self) -> None:
31
+ pass
32
+
33
+
34
+ class DictCache(BaseCache):
35
+ def __init__(self, init_dict: MutableMapping[str, bytes] | None = None) -> None:
36
+ self.lock = Lock()
37
+ self.data = init_dict or {}
38
+
39
+ def get(self, key: str) -> bytes | None:
40
+ return self.data.get(key, None)
41
+
42
+ def set(
43
+ self, key: str, value: bytes, expires: int | datetime | None = None
44
+ ) -> None:
45
+ with self.lock:
46
+ self.data.update({key: value})
47
+
48
+ def delete(self, key: str) -> None:
49
+ with self.lock:
50
+ if key in self.data:
51
+ self.data.pop(key)
52
+
53
+
54
+ class SeparateBodyBaseCache(BaseCache):
55
+ """
56
+ In this variant, the body is not stored mixed in with the metadata, but is
57
+ passed in (as a bytes-like object) in a separate call to ``set_body()``.
58
+
59
+ That is, the expected interaction pattern is::
60
+
61
+ cache.set(key, serialized_metadata)
62
+ cache.set_body(key)
63
+
64
+ Similarly, the body should be loaded separately via ``get_body()``.
65
+ """
66
+
67
+ def set_body(self, key: str, body: bytes) -> None:
68
+ raise NotImplementedError()
69
+
70
+ def get_body(self, key: str) -> IO[bytes] | None:
71
+ """
72
+ Return the body as file-like object.
73
+ """
74
+ raise NotImplementedError()
venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/controller.py ADDED
@@ -0,0 +1,494 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SPDX-FileCopyrightText: 2015 Eric Larson
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ """
6
+ The httplib2 algorithms ported for use with requests.
7
+ """
8
+ from __future__ import annotations
9
+
10
+ import calendar
11
+ import logging
12
+ import re
13
+ import time
14
+ from email.utils import parsedate_tz
15
+ from typing import TYPE_CHECKING, Collection, Mapping
16
+
17
+ from pip._vendor.requests.structures import CaseInsensitiveDict
18
+
19
+ from pip._vendor.cachecontrol.cache import DictCache, SeparateBodyBaseCache
20
+ from pip._vendor.cachecontrol.serialize import Serializer
21
+
22
+ if TYPE_CHECKING:
23
+ from typing import Literal
24
+
25
+ from pip._vendor.requests import PreparedRequest
26
+ from pip._vendor.urllib3 import HTTPResponse
27
+
28
+ from pip._vendor.cachecontrol.cache import BaseCache
29
+
30
+ logger = logging.getLogger(__name__)
31
+
32
+ URI = re.compile(r"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?")
33
+
34
+ PERMANENT_REDIRECT_STATUSES = (301, 308)
35
+
36
+
37
+ def parse_uri(uri: str) -> tuple[str, str, str, str, str]:
38
+ """Parses a URI using the regex given in Appendix B of RFC 3986.
39
+
40
+ (scheme, authority, path, query, fragment) = parse_uri(uri)
41
+ """
42
+ match = URI.match(uri)
43
+ assert match is not None
44
+ groups = match.groups()
45
+ return (groups[1], groups[3], groups[4], groups[6], groups[8])
46
+
47
+
48
+ class CacheController:
49
+ """An interface to see if request should cached or not."""
50
+
51
+ def __init__(
52
+ self,
53
+ cache: BaseCache | None = None,
54
+ cache_etags: bool = True,
55
+ serializer: Serializer | None = None,
56
+ status_codes: Collection[int] | None = None,
57
+ ):
58
+ self.cache = DictCache() if cache is None else cache
59
+ self.cache_etags = cache_etags
60
+ self.serializer = serializer or Serializer()
61
+ self.cacheable_status_codes = status_codes or (200, 203, 300, 301, 308)
62
+
63
+ @classmethod
64
+ def _urlnorm(cls, uri: str) -> str:
65
+ """Normalize the URL to create a safe key for the cache"""
66
+ (scheme, authority, path, query, fragment) = parse_uri(uri)
67
+ if not scheme or not authority:
68
+ raise Exception("Only absolute URIs are allowed. uri = %s" % uri)
69
+
70
+ scheme = scheme.lower()
71
+ authority = authority.lower()
72
+
73
+ if not path:
74
+ path = "/"
75
+
76
+ # Could do syntax based normalization of the URI before
77
+ # computing the digest. See Section 6.2.2 of Std 66.
78
+ request_uri = query and "?".join([path, query]) or path
79
+ defrag_uri = scheme + "://" + authority + request_uri
80
+
81
+ return defrag_uri
82
+
83
+ @classmethod
84
+ def cache_url(cls, uri: str) -> str:
85
+ return cls._urlnorm(uri)
86
+
87
+ def parse_cache_control(self, headers: Mapping[str, str]) -> dict[str, int | None]:
88
+ known_directives = {
89
+ # https://tools.ietf.org/html/rfc7234#section-5.2
90
+ "max-age": (int, True),
91
+ "max-stale": (int, False),
92
+ "min-fresh": (int, True),
93
+ "no-cache": (None, False),
94
+ "no-store": (None, False),
95
+ "no-transform": (None, False),
96
+ "only-if-cached": (None, False),
97
+ "must-revalidate": (None, False),
98
+ "public": (None, False),
99
+ "private": (None, False),
100
+ "proxy-revalidate": (None, False),
101
+ "s-maxage": (int, True),
102
+ }
103
+
104
+ cc_headers = headers.get("cache-control", headers.get("Cache-Control", ""))
105
+
106
+ retval: dict[str, int | None] = {}
107
+
108
+ for cc_directive in cc_headers.split(","):
109
+ if not cc_directive.strip():
110
+ continue
111
+
112
+ parts = cc_directive.split("=", 1)
113
+ directive = parts[0].strip()
114
+
115
+ try:
116
+ typ, required = known_directives[directive]
117
+ except KeyError:
118
+ logger.debug("Ignoring unknown cache-control directive: %s", directive)
119
+ continue
120
+
121
+ if not typ or not required:
122
+ retval[directive] = None
123
+ if typ:
124
+ try:
125
+ retval[directive] = typ(parts[1].strip())
126
+ except IndexError:
127
+ if required:
128
+ logger.debug(
129
+ "Missing value for cache-control " "directive: %s",
130
+ directive,
131
+ )
132
+ except ValueError:
133
+ logger.debug(
134
+ "Invalid value for cache-control directive " "%s, must be %s",
135
+ directive,
136
+ typ.__name__,
137
+ )
138
+
139
+ return retval
140
+
141
+ def _load_from_cache(self, request: PreparedRequest) -> HTTPResponse | None:
142
+ """
143
+ Load a cached response, or return None if it's not available.
144
+ """
145
+ cache_url = request.url
146
+ assert cache_url is not None
147
+ cache_data = self.cache.get(cache_url)
148
+ if cache_data is None:
149
+ logger.debug("No cache entry available")
150
+ return None
151
+
152
+ if isinstance(self.cache, SeparateBodyBaseCache):
153
+ body_file = self.cache.get_body(cache_url)
154
+ else:
155
+ body_file = None
156
+
157
+ result = self.serializer.loads(request, cache_data, body_file)
158
+ if result is None:
159
+ logger.warning("Cache entry deserialization failed, entry ignored")
160
+ return result
161
+
162
+ def cached_request(self, request: PreparedRequest) -> HTTPResponse | Literal[False]:
163
+ """
164
+ Return a cached response if it exists in the cache, otherwise
165
+ return False.
166
+ """
167
+ assert request.url is not None
168
+ cache_url = self.cache_url(request.url)
169
+ logger.debug('Looking up "%s" in the cache', cache_url)
170
+ cc = self.parse_cache_control(request.headers)
171
+
172
+ # Bail out if the request insists on fresh data
173
+ if "no-cache" in cc:
174
+ logger.debug('Request header has "no-cache", cache bypassed')
175
+ return False
176
+
177
+ if "max-age" in cc and cc["max-age"] == 0:
178
+ logger.debug('Request header has "max_age" as 0, cache bypassed')
179
+ return False
180
+
181
+ # Check whether we can load the response from the cache:
182
+ resp = self._load_from_cache(request)
183
+ if not resp:
184
+ return False
185
+
186
+ # If we have a cached permanent redirect, return it immediately. We
187
+ # don't need to test our response for other headers b/c it is
188
+ # intrinsically "cacheable" as it is Permanent.
189
+ #
190
+ # See:
191
+ # https://tools.ietf.org/html/rfc7231#section-6.4.2
192
+ #
193
+ # Client can try to refresh the value by repeating the request
194
+ # with cache busting headers as usual (ie no-cache).
195
+ if int(resp.status) in PERMANENT_REDIRECT_STATUSES:
196
+ msg = (
197
+ "Returning cached permanent redirect response "
198
+ "(ignoring date and etag information)"
199
+ )
200
+ logger.debug(msg)
201
+ return resp
202
+
203
+ headers: CaseInsensitiveDict[str] = CaseInsensitiveDict(resp.headers)
204
+ if not headers or "date" not in headers:
205
+ if "etag" not in headers:
206
+ # Without date or etag, the cached response can never be used
207
+ # and should be deleted.
208
+ logger.debug("Purging cached response: no date or etag")
209
+ self.cache.delete(cache_url)
210
+ logger.debug("Ignoring cached response: no date")
211
+ return False
212
+
213
+ now = time.time()
214
+ time_tuple = parsedate_tz(headers["date"])
215
+ assert time_tuple is not None
216
+ date = calendar.timegm(time_tuple[:6])
217
+ current_age = max(0, now - date)
218
+ logger.debug("Current age based on date: %i", current_age)
219
+
220
+ # TODO: There is an assumption that the result will be a
221
+ # urllib3 response object. This may not be best since we
222
+ # could probably avoid instantiating or constructing the
223
+ # response until we know we need it.
224
+ resp_cc = self.parse_cache_control(headers)
225
+
226
+ # determine freshness
227
+ freshness_lifetime = 0
228
+
229
+ # Check the max-age pragma in the cache control header
230
+ max_age = resp_cc.get("max-age")
231
+ if max_age is not None:
232
+ freshness_lifetime = max_age
233
+ logger.debug("Freshness lifetime from max-age: %i", freshness_lifetime)
234
+
235
+ # If there isn't a max-age, check for an expires header
236
+ elif "expires" in headers:
237
+ expires = parsedate_tz(headers["expires"])
238
+ if expires is not None:
239
+ expire_time = calendar.timegm(expires[:6]) - date
240
+ freshness_lifetime = max(0, expire_time)
241
+ logger.debug("Freshness lifetime from expires: %i", freshness_lifetime)
242
+
243
+ # Determine if we are setting freshness limit in the
244
+ # request. Note, this overrides what was in the response.
245
+ max_age = cc.get("max-age")
246
+ if max_age is not None:
247
+ freshness_lifetime = max_age
248
+ logger.debug(
249
+ "Freshness lifetime from request max-age: %i", freshness_lifetime
250
+ )
251
+
252
+ min_fresh = cc.get("min-fresh")
253
+ if min_fresh is not None:
254
+ # adjust our current age by our min fresh
255
+ current_age += min_fresh
256
+ logger.debug("Adjusted current age from min-fresh: %i", current_age)
257
+
258
+ # Return entry if it is fresh enough
259
+ if freshness_lifetime > current_age:
260
+ logger.debug('The response is "fresh", returning cached response')
261
+ logger.debug("%i > %i", freshness_lifetime, current_age)
262
+ return resp
263
+
264
+ # we're not fresh. If we don't have an Etag, clear it out
265
+ if "etag" not in headers:
266
+ logger.debug('The cached response is "stale" with no etag, purging')
267
+ self.cache.delete(cache_url)
268
+
269
+ # return the original handler
270
+ return False
271
+
272
+ def conditional_headers(self, request: PreparedRequest) -> dict[str, str]:
273
+ resp = self._load_from_cache(request)
274
+ new_headers = {}
275
+
276
+ if resp:
277
+ headers: CaseInsensitiveDict[str] = CaseInsensitiveDict(resp.headers)
278
+
279
+ if "etag" in headers:
280
+ new_headers["If-None-Match"] = headers["ETag"]
281
+
282
+ if "last-modified" in headers:
283
+ new_headers["If-Modified-Since"] = headers["Last-Modified"]
284
+
285
+ return new_headers
286
+
287
+ def _cache_set(
288
+ self,
289
+ cache_url: str,
290
+ request: PreparedRequest,
291
+ response: HTTPResponse,
292
+ body: bytes | None = None,
293
+ expires_time: int | None = None,
294
+ ) -> None:
295
+ """
296
+ Store the data in the cache.
297
+ """
298
+ if isinstance(self.cache, SeparateBodyBaseCache):
299
+ # We pass in the body separately; just put a placeholder empty
300
+ # string in the metadata.
301
+ self.cache.set(
302
+ cache_url,
303
+ self.serializer.dumps(request, response, b""),
304
+ expires=expires_time,
305
+ )
306
+ # body is None can happen when, for example, we're only updating
307
+ # headers, as is the case in update_cached_response().
308
+ if body is not None:
309
+ self.cache.set_body(cache_url, body)
310
+ else:
311
+ self.cache.set(
312
+ cache_url,
313
+ self.serializer.dumps(request, response, body),
314
+ expires=expires_time,
315
+ )
316
+
317
+ def cache_response(
318
+ self,
319
+ request: PreparedRequest,
320
+ response: HTTPResponse,
321
+ body: bytes | None = None,
322
+ status_codes: Collection[int] | None = None,
323
+ ) -> None:
324
+ """
325
+ Algorithm for caching requests.
326
+
327
+ This assumes a requests Response object.
328
+ """
329
+ # From httplib2: Don't cache 206's since we aren't going to
330
+ # handle byte range requests
331
+ cacheable_status_codes = status_codes or self.cacheable_status_codes
332
+ if response.status not in cacheable_status_codes:
333
+ logger.debug(
334
+ "Status code %s not in %s", response.status, cacheable_status_codes
335
+ )
336
+ return
337
+
338
+ response_headers: CaseInsensitiveDict[str] = CaseInsensitiveDict(
339
+ response.headers
340
+ )
341
+
342
+ if "date" in response_headers:
343
+ time_tuple = parsedate_tz(response_headers["date"])
344
+ assert time_tuple is not None
345
+ date = calendar.timegm(time_tuple[:6])
346
+ else:
347
+ date = 0
348
+
349
+ # If we've been given a body, our response has a Content-Length, that
350
+ # Content-Length is valid then we can check to see if the body we've
351
+ # been given matches the expected size, and if it doesn't we'll just
352
+ # skip trying to cache it.
353
+ if (
354
+ body is not None
355
+ and "content-length" in response_headers
356
+ and response_headers["content-length"].isdigit()
357
+ and int(response_headers["content-length"]) != len(body)
358
+ ):
359
+ return
360
+
361
+ cc_req = self.parse_cache_control(request.headers)
362
+ cc = self.parse_cache_control(response_headers)
363
+
364
+ assert request.url is not None
365
+ cache_url = self.cache_url(request.url)
366
+ logger.debug('Updating cache with response from "%s"', cache_url)
367
+
368
+ # Delete it from the cache if we happen to have it stored there
369
+ no_store = False
370
+ if "no-store" in cc:
371
+ no_store = True
372
+ logger.debug('Response header has "no-store"')
373
+ if "no-store" in cc_req:
374
+ no_store = True
375
+ logger.debug('Request header has "no-store"')
376
+ if no_store and self.cache.get(cache_url):
377
+ logger.debug('Purging existing cache entry to honor "no-store"')
378
+ self.cache.delete(cache_url)
379
+ if no_store:
380
+ return
381
+
382
+ # https://tools.ietf.org/html/rfc7234#section-4.1:
383
+ # A Vary header field-value of "*" always fails to match.
384
+ # Storing such a response leads to a deserialization warning
385
+ # during cache lookup and is not allowed to ever be served,
386
+ # so storing it can be avoided.
387
+ if "*" in response_headers.get("vary", ""):
388
+ logger.debug('Response header has "Vary: *"')
389
+ return
390
+
391
+ # If we've been given an etag, then keep the response
392
+ if self.cache_etags and "etag" in response_headers:
393
+ expires_time = 0
394
+ if response_headers.get("expires"):
395
+ expires = parsedate_tz(response_headers["expires"])
396
+ if expires is not None:
397
+ expires_time = calendar.timegm(expires[:6]) - date
398
+
399
+ expires_time = max(expires_time, 14 * 86400)
400
+
401
+ logger.debug(f"etag object cached for {expires_time} seconds")
402
+ logger.debug("Caching due to etag")
403
+ self._cache_set(cache_url, request, response, body, expires_time)
404
+
405
+ # Add to the cache any permanent redirects. We do this before looking
406
+ # that the Date headers.
407
+ elif int(response.status) in PERMANENT_REDIRECT_STATUSES:
408
+ logger.debug("Caching permanent redirect")
409
+ self._cache_set(cache_url, request, response, b"")
410
+
411
+ # Add to the cache if the response headers demand it. If there
412
+ # is no date header then we can't do anything about expiring
413
+ # the cache.
414
+ elif "date" in response_headers:
415
+ time_tuple = parsedate_tz(response_headers["date"])
416
+ assert time_tuple is not None
417
+ date = calendar.timegm(time_tuple[:6])
418
+ # cache when there is a max-age > 0
419
+ max_age = cc.get("max-age")
420
+ if max_age is not None and max_age > 0:
421
+ logger.debug("Caching b/c date exists and max-age > 0")
422
+ expires_time = max_age
423
+ self._cache_set(
424
+ cache_url,
425
+ request,
426
+ response,
427
+ body,
428
+ expires_time,
429
+ )
430
+
431
+ # If the request can expire, it means we should cache it
432
+ # in the meantime.
433
+ elif "expires" in response_headers:
434
+ if response_headers["expires"]:
435
+ expires = parsedate_tz(response_headers["expires"])
436
+ if expires is not None:
437
+ expires_time = calendar.timegm(expires[:6]) - date
438
+ else:
439
+ expires_time = None
440
+
441
+ logger.debug(
442
+ "Caching b/c of expires header. expires in {} seconds".format(
443
+ expires_time
444
+ )
445
+ )
446
+ self._cache_set(
447
+ cache_url,
448
+ request,
449
+ response,
450
+ body,
451
+ expires_time,
452
+ )
453
+
454
+ def update_cached_response(
455
+ self, request: PreparedRequest, response: HTTPResponse
456
+ ) -> HTTPResponse:
457
+ """On a 304 we will get a new set of headers that we want to
458
+ update our cached value with, assuming we have one.
459
+
460
+ This should only ever be called when we've sent an ETag and
461
+ gotten a 304 as the response.
462
+ """
463
+ assert request.url is not None
464
+ cache_url = self.cache_url(request.url)
465
+ cached_response = self._load_from_cache(request)
466
+
467
+ if not cached_response:
468
+ # we didn't have a cached response
469
+ return response
470
+
471
+ # Lets update our headers with the headers from the new request:
472
+ # http://tools.ietf.org/html/draft-ietf-httpbis-p4-conditional-26#section-4.1
473
+ #
474
+ # The server isn't supposed to send headers that would make
475
+ # the cached body invalid. But... just in case, we'll be sure
476
+ # to strip out ones we know that might be problmatic due to
477
+ # typical assumptions.
478
+ excluded_headers = ["content-length"]
479
+
480
+ cached_response.headers.update(
481
+ {
482
+ k: v
483
+ for k, v in response.headers.items() # type: ignore[no-untyped-call]
484
+ if k.lower() not in excluded_headers
485
+ }
486
+ )
487
+
488
+ # we want a 200 b/c we have content via the cache
489
+ cached_response.status = 200
490
+
491
+ # update our cache
492
+ self._cache_set(cache_url, request, cached_response)
493
+
494
+ return cached_response
venv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/wrapper.py ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SPDX-FileCopyrightText: 2015 Eric Larson
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+ from __future__ import annotations
5
+
6
+ from typing import TYPE_CHECKING, Collection
7
+
8
+ from pip._vendor.cachecontrol.adapter import CacheControlAdapter
9
+ from pip._vendor.cachecontrol.cache import DictCache
10
+
11
+ if TYPE_CHECKING:
12
+ from pip._vendor import requests
13
+
14
+ from pip._vendor.cachecontrol.cache import BaseCache
15
+ from pip._vendor.cachecontrol.controller import CacheController
16
+ from pip._vendor.cachecontrol.heuristics import BaseHeuristic
17
+ from pip._vendor.cachecontrol.serialize import Serializer
18
+
19
+
20
+ def CacheControl(
21
+ sess: requests.Session,
22
+ cache: BaseCache | None = None,
23
+ cache_etags: bool = True,
24
+ serializer: Serializer | None = None,
25
+ heuristic: BaseHeuristic | None = None,
26
+ controller_class: type[CacheController] | None = None,
27
+ adapter_class: type[CacheControlAdapter] | None = None,
28
+ cacheable_methods: Collection[str] | None = None,
29
+ ) -> requests.Session:
30
+ cache = DictCache() if cache is None else cache
31
+ adapter_class = adapter_class or CacheControlAdapter
32
+ adapter = adapter_class(
33
+ cache,
34
+ cache_etags=cache_etags,
35
+ serializer=serializer,
36
+ heuristic=heuristic,
37
+ controller_class=controller_class,
38
+ cacheable_methods=cacheable_methods,
39
+ )
40
+ sess.mount("http://", adapter)
41
+ sess.mount("https://", adapter)
42
+
43
+ return sess
venv/lib/python3.12/site-packages/pip/_vendor/chardet/big5prober.py ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ######################## BEGIN LICENSE BLOCK ########################
2
+ # The Original Code is Mozilla Communicator client code.
3
+ #
4
+ # The Initial Developer of the Original Code is
5
+ # Netscape Communications Corporation.
6
+ # Portions created by the Initial Developer are Copyright (C) 1998
7
+ # the Initial Developer. All Rights Reserved.
8
+ #
9
+ # Contributor(s):
10
+ # Mark Pilgrim - port to Python
11
+ #
12
+ # This library is free software; you can redistribute it and/or
13
+ # modify it under the terms of the GNU Lesser General Public
14
+ # License as published by the Free Software Foundation; either
15
+ # version 2.1 of the License, or (at your option) any later version.
16
+ #
17
+ # This library is distributed in the hope that it will be useful,
18
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
+ # Lesser General Public License for more details.
21
+ #
22
+ # You should have received a copy of the GNU Lesser General Public
23
+ # License along with this library; if not, write to the Free Software
24
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25
+ # 02110-1301 USA
26
+ ######################### END LICENSE BLOCK #########################
27
+
28
+ from .chardistribution import Big5DistributionAnalysis
29
+ from .codingstatemachine import CodingStateMachine
30
+ from .mbcharsetprober import MultiByteCharSetProber
31
+ from .mbcssm import BIG5_SM_MODEL
32
+
33
+
34
+ class Big5Prober(MultiByteCharSetProber):
35
+ def __init__(self) -> None:
36
+ super().__init__()
37
+ self.coding_sm = CodingStateMachine(BIG5_SM_MODEL)
38
+ self.distribution_analyzer = Big5DistributionAnalysis()
39
+ self.reset()
40
+
41
+ @property
42
+ def charset_name(self) -> str:
43
+ return "Big5"
44
+
45
+ @property
46
+ def language(self) -> str:
47
+ return "Chinese"
venv/lib/python3.12/site-packages/pip/_vendor/chardet/escsm.py ADDED
@@ -0,0 +1,261 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ######################## BEGIN LICENSE BLOCK ########################
2
+ # The Original Code is mozilla.org code.
3
+ #
4
+ # The Initial Developer of the Original Code is
5
+ # Netscape Communications Corporation.
6
+ # Portions created by the Initial Developer are Copyright (C) 1998
7
+ # the Initial Developer. All Rights Reserved.
8
+ #
9
+ # Contributor(s):
10
+ # Mark Pilgrim - port to Python
11
+ #
12
+ # This library is free software; you can redistribute it and/or
13
+ # modify it under the terms of the GNU Lesser General Public
14
+ # License as published by the Free Software Foundation; either
15
+ # version 2.1 of the License, or (at your option) any later version.
16
+ #
17
+ # This library is distributed in the hope that it will be useful,
18
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
+ # Lesser General Public License for more details.
21
+ #
22
+ # You should have received a copy of the GNU Lesser General Public
23
+ # License along with this library; if not, write to the Free Software
24
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25
+ # 02110-1301 USA
26
+ ######################### END LICENSE BLOCK #########################
27
+
28
+ from .codingstatemachinedict import CodingStateMachineDict
29
+ from .enums import MachineState
30
+
31
+ # fmt: off
32
+ HZ_CLS = (
33
+ 1, 0, 0, 0, 0, 0, 0, 0, # 00 - 07
34
+ 0, 0, 0, 0, 0, 0, 0, 0, # 08 - 0f
35
+ 0, 0, 0, 0, 0, 0, 0, 0, # 10 - 17
36
+ 0, 0, 0, 1, 0, 0, 0, 0, # 18 - 1f
37
+ 0, 0, 0, 0, 0, 0, 0, 0, # 20 - 27
38
+ 0, 0, 0, 0, 0, 0, 0, 0, # 28 - 2f
39
+ 0, 0, 0, 0, 0, 0, 0, 0, # 30 - 37
40
+ 0, 0, 0, 0, 0, 0, 0, 0, # 38 - 3f
41
+ 0, 0, 0, 0, 0, 0, 0, 0, # 40 - 47
42
+ 0, 0, 0, 0, 0, 0, 0, 0, # 48 - 4f
43
+ 0, 0, 0, 0, 0, 0, 0, 0, # 50 - 57
44
+ 0, 0, 0, 0, 0, 0, 0, 0, # 58 - 5f
45
+ 0, 0, 0, 0, 0, 0, 0, 0, # 60 - 67
46
+ 0, 0, 0, 0, 0, 0, 0, 0, # 68 - 6f
47
+ 0, 0, 0, 0, 0, 0, 0, 0, # 70 - 77
48
+ 0, 0, 0, 4, 0, 5, 2, 0, # 78 - 7f
49
+ 1, 1, 1, 1, 1, 1, 1, 1, # 80 - 87
50
+ 1, 1, 1, 1, 1, 1, 1, 1, # 88 - 8f
51
+ 1, 1, 1, 1, 1, 1, 1, 1, # 90 - 97
52
+ 1, 1, 1, 1, 1, 1, 1, 1, # 98 - 9f
53
+ 1, 1, 1, 1, 1, 1, 1, 1, # a0 - a7
54
+ 1, 1, 1, 1, 1, 1, 1, 1, # a8 - af
55
+ 1, 1, 1, 1, 1, 1, 1, 1, # b0 - b7
56
+ 1, 1, 1, 1, 1, 1, 1, 1, # b8 - bf
57
+ 1, 1, 1, 1, 1, 1, 1, 1, # c0 - c7
58
+ 1, 1, 1, 1, 1, 1, 1, 1, # c8 - cf
59
+ 1, 1, 1, 1, 1, 1, 1, 1, # d0 - d7
60
+ 1, 1, 1, 1, 1, 1, 1, 1, # d8 - df
61
+ 1, 1, 1, 1, 1, 1, 1, 1, # e0 - e7
62
+ 1, 1, 1, 1, 1, 1, 1, 1, # e8 - ef
63
+ 1, 1, 1, 1, 1, 1, 1, 1, # f0 - f7
64
+ 1, 1, 1, 1, 1, 1, 1, 1, # f8 - ff
65
+ )
66
+
67
+ HZ_ST = (
68
+ MachineState.START, MachineState.ERROR, 3, MachineState.START, MachineState.START, MachineState.START, MachineState.ERROR, MachineState.ERROR, # 00-07
69
+ MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ITS_ME, # 08-0f
70
+ MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ERROR, MachineState.ERROR, MachineState.START, MachineState.START, 4, MachineState.ERROR, # 10-17
71
+ 5, MachineState.ERROR, 6, MachineState.ERROR, 5, 5, 4, MachineState.ERROR, # 18-1f
72
+ 4, MachineState.ERROR, 4, 4, 4, MachineState.ERROR, 4, MachineState.ERROR, # 20-27
73
+ 4, MachineState.ITS_ME, MachineState.START, MachineState.START, MachineState.START, MachineState.START, MachineState.START, MachineState.START, # 28-2f
74
+ )
75
+ # fmt: on
76
+
77
+ HZ_CHAR_LEN_TABLE = (0, 0, 0, 0, 0, 0)
78
+
79
+ HZ_SM_MODEL: CodingStateMachineDict = {
80
+ "class_table": HZ_CLS,
81
+ "class_factor": 6,
82
+ "state_table": HZ_ST,
83
+ "char_len_table": HZ_CHAR_LEN_TABLE,
84
+ "name": "HZ-GB-2312",
85
+ "language": "Chinese",
86
+ }
87
+
88
+ # fmt: off
89
+ ISO2022CN_CLS = (
90
+ 2, 0, 0, 0, 0, 0, 0, 0, # 00 - 07
91
+ 0, 0, 0, 0, 0, 0, 0, 0, # 08 - 0f
92
+ 0, 0, 0, 0, 0, 0, 0, 0, # 10 - 17
93
+ 0, 0, 0, 1, 0, 0, 0, 0, # 18 - 1f
94
+ 0, 0, 0, 0, 0, 0, 0, 0, # 20 - 27
95
+ 0, 3, 0, 0, 0, 0, 0, 0, # 28 - 2f
96
+ 0, 0, 0, 0, 0, 0, 0, 0, # 30 - 37
97
+ 0, 0, 0, 0, 0, 0, 0, 0, # 38 - 3f
98
+ 0, 0, 0, 4, 0, 0, 0, 0, # 40 - 47
99
+ 0, 0, 0, 0, 0, 0, 0, 0, # 48 - 4f
100
+ 0, 0, 0, 0, 0, 0, 0, 0, # 50 - 57
101
+ 0, 0, 0, 0, 0, 0, 0, 0, # 58 - 5f
102
+ 0, 0, 0, 0, 0, 0, 0, 0, # 60 - 67
103
+ 0, 0, 0, 0, 0, 0, 0, 0, # 68 - 6f
104
+ 0, 0, 0, 0, 0, 0, 0, 0, # 70 - 77
105
+ 0, 0, 0, 0, 0, 0, 0, 0, # 78 - 7f
106
+ 2, 2, 2, 2, 2, 2, 2, 2, # 80 - 87
107
+ 2, 2, 2, 2, 2, 2, 2, 2, # 88 - 8f
108
+ 2, 2, 2, 2, 2, 2, 2, 2, # 90 - 97
109
+ 2, 2, 2, 2, 2, 2, 2, 2, # 98 - 9f
110
+ 2, 2, 2, 2, 2, 2, 2, 2, # a0 - a7
111
+ 2, 2, 2, 2, 2, 2, 2, 2, # a8 - af
112
+ 2, 2, 2, 2, 2, 2, 2, 2, # b0 - b7
113
+ 2, 2, 2, 2, 2, 2, 2, 2, # b8 - bf
114
+ 2, 2, 2, 2, 2, 2, 2, 2, # c0 - c7
115
+ 2, 2, 2, 2, 2, 2, 2, 2, # c8 - cf
116
+ 2, 2, 2, 2, 2, 2, 2, 2, # d0 - d7
117
+ 2, 2, 2, 2, 2, 2, 2, 2, # d8 - df
118
+ 2, 2, 2, 2, 2, 2, 2, 2, # e0 - e7
119
+ 2, 2, 2, 2, 2, 2, 2, 2, # e8 - ef
120
+ 2, 2, 2, 2, 2, 2, 2, 2, # f0 - f7
121
+ 2, 2, 2, 2, 2, 2, 2, 2, # f8 - ff
122
+ )
123
+
124
+ ISO2022CN_ST = (
125
+ MachineState.START, 3, MachineState.ERROR, MachineState.START, MachineState.START, MachineState.START, MachineState.START, MachineState.START, # 00-07
126
+ MachineState.START, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, # 08-0f
127
+ MachineState.ERROR, MachineState.ERROR, MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ITS_ME, # 10-17
128
+ MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, 4, MachineState.ERROR, # 18-1f
129
+ MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ITS_ME, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, # 20-27
130
+ 5, 6, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, # 28-2f
131
+ MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ITS_ME, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, # 30-37
132
+ MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ITS_ME, MachineState.ERROR, MachineState.START, # 38-3f
133
+ )
134
+ # fmt: on
135
+
136
+ ISO2022CN_CHAR_LEN_TABLE = (0, 0, 0, 0, 0, 0, 0, 0, 0)
137
+
138
+ ISO2022CN_SM_MODEL: CodingStateMachineDict = {
139
+ "class_table": ISO2022CN_CLS,
140
+ "class_factor": 9,
141
+ "state_table": ISO2022CN_ST,
142
+ "char_len_table": ISO2022CN_CHAR_LEN_TABLE,
143
+ "name": "ISO-2022-CN",
144
+ "language": "Chinese",
145
+ }
146
+
147
+ # fmt: off
148
+ ISO2022JP_CLS = (
149
+ 2, 0, 0, 0, 0, 0, 0, 0, # 00 - 07
150
+ 0, 0, 0, 0, 0, 0, 2, 2, # 08 - 0f
151
+ 0, 0, 0, 0, 0, 0, 0, 0, # 10 - 17
152
+ 0, 0, 0, 1, 0, 0, 0, 0, # 18 - 1f
153
+ 0, 0, 0, 0, 7, 0, 0, 0, # 20 - 27
154
+ 3, 0, 0, 0, 0, 0, 0, 0, # 28 - 2f
155
+ 0, 0, 0, 0, 0, 0, 0, 0, # 30 - 37
156
+ 0, 0, 0, 0, 0, 0, 0, 0, # 38 - 3f
157
+ 6, 0, 4, 0, 8, 0, 0, 0, # 40 - 47
158
+ 0, 9, 5, 0, 0, 0, 0, 0, # 48 - 4f
159
+ 0, 0, 0, 0, 0, 0, 0, 0, # 50 - 57
160
+ 0, 0, 0, 0, 0, 0, 0, 0, # 58 - 5f
161
+ 0, 0, 0, 0, 0, 0, 0, 0, # 60 - 67
162
+ 0, 0, 0, 0, 0, 0, 0, 0, # 68 - 6f
163
+ 0, 0, 0, 0, 0, 0, 0, 0, # 70 - 77
164
+ 0, 0, 0, 0, 0, 0, 0, 0, # 78 - 7f
165
+ 2, 2, 2, 2, 2, 2, 2, 2, # 80 - 87
166
+ 2, 2, 2, 2, 2, 2, 2, 2, # 88 - 8f
167
+ 2, 2, 2, 2, 2, 2, 2, 2, # 90 - 97
168
+ 2, 2, 2, 2, 2, 2, 2, 2, # 98 - 9f
169
+ 2, 2, 2, 2, 2, 2, 2, 2, # a0 - a7
170
+ 2, 2, 2, 2, 2, 2, 2, 2, # a8 - af
171
+ 2, 2, 2, 2, 2, 2, 2, 2, # b0 - b7
172
+ 2, 2, 2, 2, 2, 2, 2, 2, # b8 - bf
173
+ 2, 2, 2, 2, 2, 2, 2, 2, # c0 - c7
174
+ 2, 2, 2, 2, 2, 2, 2, 2, # c8 - cf
175
+ 2, 2, 2, 2, 2, 2, 2, 2, # d0 - d7
176
+ 2, 2, 2, 2, 2, 2, 2, 2, # d8 - df
177
+ 2, 2, 2, 2, 2, 2, 2, 2, # e0 - e7
178
+ 2, 2, 2, 2, 2, 2, 2, 2, # e8 - ef
179
+ 2, 2, 2, 2, 2, 2, 2, 2, # f0 - f7
180
+ 2, 2, 2, 2, 2, 2, 2, 2, # f8 - ff
181
+ )
182
+
183
+ ISO2022JP_ST = (
184
+ MachineState.START, 3, MachineState.ERROR, MachineState.START, MachineState.START, MachineState.START, MachineState.START, MachineState.START, # 00-07
185
+ MachineState.START, MachineState.START, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, # 08-0f
186
+ MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ITS_ME, # 10-17
187
+ MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ERROR, MachineState.ERROR, # 18-1f
188
+ MachineState.ERROR, 5, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, 4, MachineState.ERROR, MachineState.ERROR, # 20-27
189
+ MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, 6, MachineState.ITS_ME, MachineState.ERROR, MachineState.ITS_ME, MachineState.ERROR, # 28-2f
190
+ MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ITS_ME, MachineState.ITS_ME, # 30-37
191
+ MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ITS_ME, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, # 38-3f
192
+ MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ITS_ME, MachineState.ERROR, MachineState.START, MachineState.START, # 40-47
193
+ )
194
+ # fmt: on
195
+
196
+ ISO2022JP_CHAR_LEN_TABLE = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
197
+
198
+ ISO2022JP_SM_MODEL: CodingStateMachineDict = {
199
+ "class_table": ISO2022JP_CLS,
200
+ "class_factor": 10,
201
+ "state_table": ISO2022JP_ST,
202
+ "char_len_table": ISO2022JP_CHAR_LEN_TABLE,
203
+ "name": "ISO-2022-JP",
204
+ "language": "Japanese",
205
+ }
206
+
207
+ # fmt: off
208
+ ISO2022KR_CLS = (
209
+ 2, 0, 0, 0, 0, 0, 0, 0, # 00 - 07
210
+ 0, 0, 0, 0, 0, 0, 0, 0, # 08 - 0f
211
+ 0, 0, 0, 0, 0, 0, 0, 0, # 10 - 17
212
+ 0, 0, 0, 1, 0, 0, 0, 0, # 18 - 1f
213
+ 0, 0, 0, 0, 3, 0, 0, 0, # 20 - 27
214
+ 0, 4, 0, 0, 0, 0, 0, 0, # 28 - 2f
215
+ 0, 0, 0, 0, 0, 0, 0, 0, # 30 - 37
216
+ 0, 0, 0, 0, 0, 0, 0, 0, # 38 - 3f
217
+ 0, 0, 0, 5, 0, 0, 0, 0, # 40 - 47
218
+ 0, 0, 0, 0, 0, 0, 0, 0, # 48 - 4f
219
+ 0, 0, 0, 0, 0, 0, 0, 0, # 50 - 57
220
+ 0, 0, 0, 0, 0, 0, 0, 0, # 58 - 5f
221
+ 0, 0, 0, 0, 0, 0, 0, 0, # 60 - 67
222
+ 0, 0, 0, 0, 0, 0, 0, 0, # 68 - 6f
223
+ 0, 0, 0, 0, 0, 0, 0, 0, # 70 - 77
224
+ 0, 0, 0, 0, 0, 0, 0, 0, # 78 - 7f
225
+ 2, 2, 2, 2, 2, 2, 2, 2, # 80 - 87
226
+ 2, 2, 2, 2, 2, 2, 2, 2, # 88 - 8f
227
+ 2, 2, 2, 2, 2, 2, 2, 2, # 90 - 97
228
+ 2, 2, 2, 2, 2, 2, 2, 2, # 98 - 9f
229
+ 2, 2, 2, 2, 2, 2, 2, 2, # a0 - a7
230
+ 2, 2, 2, 2, 2, 2, 2, 2, # a8 - af
231
+ 2, 2, 2, 2, 2, 2, 2, 2, # b0 - b7
232
+ 2, 2, 2, 2, 2, 2, 2, 2, # b8 - bf
233
+ 2, 2, 2, 2, 2, 2, 2, 2, # c0 - c7
234
+ 2, 2, 2, 2, 2, 2, 2, 2, # c8 - cf
235
+ 2, 2, 2, 2, 2, 2, 2, 2, # d0 - d7
236
+ 2, 2, 2, 2, 2, 2, 2, 2, # d8 - df
237
+ 2, 2, 2, 2, 2, 2, 2, 2, # e0 - e7
238
+ 2, 2, 2, 2, 2, 2, 2, 2, # e8 - ef
239
+ 2, 2, 2, 2, 2, 2, 2, 2, # f0 - f7
240
+ 2, 2, 2, 2, 2, 2, 2, 2, # f8 - ff
241
+ )
242
+
243
+ ISO2022KR_ST = (
244
+ MachineState.START, 3, MachineState.ERROR, MachineState.START, MachineState.START, MachineState.START, MachineState.ERROR, MachineState.ERROR, # 00-07
245
+ MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ITS_ME, # 08-0f
246
+ MachineState.ITS_ME, MachineState.ITS_ME, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, 4, MachineState.ERROR, MachineState.ERROR, # 10-17
247
+ MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, 5, MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, # 18-1f
248
+ MachineState.ERROR, MachineState.ERROR, MachineState.ERROR, MachineState.ITS_ME, MachineState.START, MachineState.START, MachineState.START, MachineState.START, # 20-27
249
+ )
250
+ # fmt: on
251
+
252
+ ISO2022KR_CHAR_LEN_TABLE = (0, 0, 0, 0, 0, 0)
253
+
254
+ ISO2022KR_SM_MODEL: CodingStateMachineDict = {
255
+ "class_table": ISO2022KR_CLS,
256
+ "class_factor": 6,
257
+ "state_table": ISO2022KR_ST,
258
+ "char_len_table": ISO2022KR_CHAR_LEN_TABLE,
259
+ "name": "ISO-2022-KR",
260
+ "language": "Korean",
261
+ }
venv/lib/python3.12/site-packages/pip/_vendor/chardet/eucjpprober.py ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ######################## BEGIN LICENSE BLOCK ########################
2
+ # The Original Code is mozilla.org code.
3
+ #
4
+ # The Initial Developer of the Original Code is
5
+ # Netscape Communications Corporation.
6
+ # Portions created by the Initial Developer are Copyright (C) 1998
7
+ # the Initial Developer. All Rights Reserved.
8
+ #
9
+ # Contributor(s):
10
+ # Mark Pilgrim - port to Python
11
+ #
12
+ # This library is free software; you can redistribute it and/or
13
+ # modify it under the terms of the GNU Lesser General Public
14
+ # License as published by the Free Software Foundation; either
15
+ # version 2.1 of the License, or (at your option) any later version.
16
+ #
17
+ # This library is distributed in the hope that it will be useful,
18
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
+ # Lesser General Public License for more details.
21
+ #
22
+ # You should have received a copy of the GNU Lesser General Public
23
+ # License along with this library; if not, write to the Free Software
24
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25
+ # 02110-1301 USA
26
+ ######################### END LICENSE BLOCK #########################
27
+
28
+ from typing import Union
29
+
30
+ from .chardistribution import EUCJPDistributionAnalysis
31
+ from .codingstatemachine import CodingStateMachine
32
+ from .enums import MachineState, ProbingState
33
+ from .jpcntx import EUCJPContextAnalysis
34
+ from .mbcharsetprober import MultiByteCharSetProber
35
+ from .mbcssm import EUCJP_SM_MODEL
36
+
37
+
38
+ class EUCJPProber(MultiByteCharSetProber):
39
+ def __init__(self) -> None:
40
+ super().__init__()
41
+ self.coding_sm = CodingStateMachine(EUCJP_SM_MODEL)
42
+ self.distribution_analyzer = EUCJPDistributionAnalysis()
43
+ self.context_analyzer = EUCJPContextAnalysis()
44
+ self.reset()
45
+
46
+ def reset(self) -> None:
47
+ super().reset()
48
+ self.context_analyzer.reset()
49
+
50
+ @property
51
+ def charset_name(self) -> str:
52
+ return "EUC-JP"
53
+
54
+ @property
55
+ def language(self) -> str:
56
+ return "Japanese"
57
+
58
+ def feed(self, byte_str: Union[bytes, bytearray]) -> ProbingState:
59
+ assert self.coding_sm is not None
60
+ assert self.distribution_analyzer is not None
61
+
62
+ for i, byte in enumerate(byte_str):
63
+ # PY3K: byte_str is a byte array, so byte is an int, not a byte
64
+ coding_state = self.coding_sm.next_state(byte)
65
+ if coding_state == MachineState.ERROR:
66
+ self.logger.debug(
67
+ "%s %s prober hit error at byte %s",
68
+ self.charset_name,
69
+ self.language,
70
+ i,
71
+ )
72
+ self._state = ProbingState.NOT_ME
73
+ break
74
+ if coding_state == MachineState.ITS_ME:
75
+ self._state = ProbingState.FOUND_IT
76
+ break
77
+ if coding_state == MachineState.START:
78
+ char_len = self.coding_sm.get_current_charlen()
79
+ if i == 0:
80
+ self._last_char[1] = byte
81
+ self.context_analyzer.feed(self._last_char, char_len)
82
+ self.distribution_analyzer.feed(self._last_char, char_len)
83
+ else:
84
+ self.context_analyzer.feed(byte_str[i - 1 : i + 1], char_len)
85
+ self.distribution_analyzer.feed(byte_str[i - 1 : i + 1], char_len)
86
+
87
+ self._last_char[0] = byte_str[-1]
88
+
89
+ if self.state == ProbingState.DETECTING:
90
+ if self.context_analyzer.got_enough_data() and (
91
+ self.get_confidence() > self.SHORTCUT_THRESHOLD
92
+ ):
93
+ self._state = ProbingState.FOUND_IT
94
+
95
+ return self.state
96
+
97
+ def get_confidence(self) -> float:
98
+ assert self.distribution_analyzer is not None
99
+
100
+ context_conf = self.context_analyzer.get_confidence()
101
+ distrib_conf = self.distribution_analyzer.get_confidence()
102
+ return max(context_conf, distrib_conf)
venv/lib/python3.12/site-packages/pip/_vendor/chardet/euckrprober.py ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ######################## BEGIN LICENSE BLOCK ########################
2
+ # The Original Code is mozilla.org code.
3
+ #
4
+ # The Initial Developer of the Original Code is
5
+ # Netscape Communications Corporation.
6
+ # Portions created by the Initial Developer are Copyright (C) 1998
7
+ # the Initial Developer. All Rights Reserved.
8
+ #
9
+ # Contributor(s):
10
+ # Mark Pilgrim - port to Python
11
+ #
12
+ # This library is free software; you can redistribute it and/or
13
+ # modify it under the terms of the GNU Lesser General Public
14
+ # License as published by the Free Software Foundation; either
15
+ # version 2.1 of the License, or (at your option) any later version.
16
+ #
17
+ # This library is distributed in the hope that it will be useful,
18
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
+ # Lesser General Public License for more details.
21
+ #
22
+ # You should have received a copy of the GNU Lesser General Public
23
+ # License along with this library; if not, write to the Free Software
24
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25
+ # 02110-1301 USA
26
+ ######################### END LICENSE BLOCK #########################
27
+
28
+ from .chardistribution import EUCKRDistributionAnalysis
29
+ from .codingstatemachine import CodingStateMachine
30
+ from .mbcharsetprober import MultiByteCharSetProber
31
+ from .mbcssm import EUCKR_SM_MODEL
32
+
33
+
34
+ class EUCKRProber(MultiByteCharSetProber):
35
+ def __init__(self) -> None:
36
+ super().__init__()
37
+ self.coding_sm = CodingStateMachine(EUCKR_SM_MODEL)
38
+ self.distribution_analyzer = EUCKRDistributionAnalysis()
39
+ self.reset()
40
+
41
+ @property
42
+ def charset_name(self) -> str:
43
+ return "EUC-KR"
44
+
45
+ @property
46
+ def language(self) -> str:
47
+ return "Korean"
venv/lib/python3.12/site-packages/pip/_vendor/chardet/johabfreq.py ADDED
@@ -0,0 +1,2382 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ######################## BEGIN LICENSE BLOCK ########################
2
+ # The Original Code is Mozilla Communicator client code.
3
+ #
4
+ # The Initial Developer of the Original Code is
5
+ # Netscape Communications Corporation.
6
+ # Portions created by the Initial Developer are Copyright (C) 1998
7
+ # the Initial Developer. All Rights Reserved.
8
+ #
9
+ # Contributor(s):
10
+ # Mark Pilgrim - port to Python
11
+ #
12
+ # This library is free software; you can redistribute it and/or
13
+ # modify it under the terms of the GNU Lesser General Public
14
+ # License as published by the Free Software Foundation; either
15
+ # version 2.1 of the License, or (at your option) any later version.
16
+ #
17
+ # This library is distributed in the hope that it will be useful,
18
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
+ # Lesser General Public License for more details.
21
+ #
22
+ # You should have received a copy of the GNU Lesser General Public
23
+ # License along with this library; if not, write to the Free Software
24
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25
+ # 02110-1301 USA
26
+ ######################### END LICENSE BLOCK #########################
27
+
28
+ # The frequency data itself is the same as euc-kr.
29
+ # This is just a mapping table to euc-kr.
30
+
31
+ JOHAB_TO_EUCKR_ORDER_TABLE = {
32
+ 0x8861: 0,
33
+ 0x8862: 1,
34
+ 0x8865: 2,
35
+ 0x8868: 3,
36
+ 0x8869: 4,
37
+ 0x886A: 5,
38
+ 0x886B: 6,
39
+ 0x8871: 7,
40
+ 0x8873: 8,
41
+ 0x8874: 9,
42
+ 0x8875: 10,
43
+ 0x8876: 11,
44
+ 0x8877: 12,
45
+ 0x8878: 13,
46
+ 0x8879: 14,
47
+ 0x887B: 15,
48
+ 0x887C: 16,
49
+ 0x887D: 17,
50
+ 0x8881: 18,
51
+ 0x8882: 19,
52
+ 0x8885: 20,
53
+ 0x8889: 21,
54
+ 0x8891: 22,
55
+ 0x8893: 23,
56
+ 0x8895: 24,
57
+ 0x8896: 25,
58
+ 0x8897: 26,
59
+ 0x88A1: 27,
60
+ 0x88A2: 28,
61
+ 0x88A5: 29,
62
+ 0x88A9: 30,
63
+ 0x88B5: 31,
64
+ 0x88B7: 32,
65
+ 0x88C1: 33,
66
+ 0x88C5: 34,
67
+ 0x88C9: 35,
68
+ 0x88E1: 36,
69
+ 0x88E2: 37,
70
+ 0x88E5: 38,
71
+ 0x88E8: 39,
72
+ 0x88E9: 40,
73
+ 0x88EB: 41,
74
+ 0x88F1: 42,
75
+ 0x88F3: 43,
76
+ 0x88F5: 44,
77
+ 0x88F6: 45,
78
+ 0x88F7: 46,
79
+ 0x88F8: 47,
80
+ 0x88FB: 48,
81
+ 0x88FC: 49,
82
+ 0x88FD: 50,
83
+ 0x8941: 51,
84
+ 0x8945: 52,
85
+ 0x8949: 53,
86
+ 0x8951: 54,
87
+ 0x8953: 55,
88
+ 0x8955: 56,
89
+ 0x8956: 57,
90
+ 0x8957: 58,
91
+ 0x8961: 59,
92
+ 0x8962: 60,
93
+ 0x8963: 61,
94
+ 0x8965: 62,
95
+ 0x8968: 63,
96
+ 0x8969: 64,
97
+ 0x8971: 65,
98
+ 0x8973: 66,
99
+ 0x8975: 67,
100
+ 0x8976: 68,
101
+ 0x8977: 69,
102
+ 0x897B: 70,
103
+ 0x8981: 71,
104
+ 0x8985: 72,
105
+ 0x8989: 73,
106
+ 0x8993: 74,
107
+ 0x8995: 75,
108
+ 0x89A1: 76,
109
+ 0x89A2: 77,
110
+ 0x89A5: 78,
111
+ 0x89A8: 79,
112
+ 0x89A9: 80,
113
+ 0x89AB: 81,
114
+ 0x89AD: 82,
115
+ 0x89B0: 83,
116
+ 0x89B1: 84,
117
+ 0x89B3: 85,
118
+ 0x89B5: 86,
119
+ 0x89B7: 87,
120
+ 0x89B8: 88,
121
+ 0x89C1: 89,
122
+ 0x89C2: 90,
123
+ 0x89C5: 91,
124
+ 0x89C9: 92,
125
+ 0x89CB: 93,
126
+ 0x89D1: 94,
127
+ 0x89D3: 95,
128
+ 0x89D5: 96,
129
+ 0x89D7: 97,
130
+ 0x89E1: 98,
131
+ 0x89E5: 99,
132
+ 0x89E9: 100,
133
+ 0x89F3: 101,
134
+ 0x89F6: 102,
135
+ 0x89F7: 103,
136
+ 0x8A41: 104,
137
+ 0x8A42: 105,
138
+ 0x8A45: 106,
139
+ 0x8A49: 107,
140
+ 0x8A51: 108,
141
+ 0x8A53: 109,
142
+ 0x8A55: 110,
143
+ 0x8A57: 111,
144
+ 0x8A61: 112,
145
+ 0x8A65: 113,
146
+ 0x8A69: 114,
147
+ 0x8A73: 115,
148
+ 0x8A75: 116,
149
+ 0x8A81: 117,
150
+ 0x8A82: 118,
151
+ 0x8A85: 119,
152
+ 0x8A88: 120,
153
+ 0x8A89: 121,
154
+ 0x8A8A: 122,
155
+ 0x8A8B: 123,
156
+ 0x8A90: 124,
157
+ 0x8A91: 125,
158
+ 0x8A93: 126,
159
+ 0x8A95: 127,
160
+ 0x8A97: 128,
161
+ 0x8A98: 129,
162
+ 0x8AA1: 130,
163
+ 0x8AA2: 131,
164
+ 0x8AA5: 132,
165
+ 0x8AA9: 133,
166
+ 0x8AB6: 134,
167
+ 0x8AB7: 135,
168
+ 0x8AC1: 136,
169
+ 0x8AD5: 137,
170
+ 0x8AE1: 138,
171
+ 0x8AE2: 139,
172
+ 0x8AE5: 140,
173
+ 0x8AE9: 141,
174
+ 0x8AF1: 142,
175
+ 0x8AF3: 143,
176
+ 0x8AF5: 144,
177
+ 0x8B41: 145,
178
+ 0x8B45: 146,
179
+ 0x8B49: 147,
180
+ 0x8B61: 148,
181
+ 0x8B62: 149,
182
+ 0x8B65: 150,
183
+ 0x8B68: 151,
184
+ 0x8B69: 152,
185
+ 0x8B6A: 153,
186
+ 0x8B71: 154,
187
+ 0x8B73: 155,
188
+ 0x8B75: 156,
189
+ 0x8B77: 157,
190
+ 0x8B81: 158,
191
+ 0x8BA1: 159,
192
+ 0x8BA2: 160,
193
+ 0x8BA5: 161,
194
+ 0x8BA8: 162,
195
+ 0x8BA9: 163,
196
+ 0x8BAB: 164,
197
+ 0x8BB1: 165,
198
+ 0x8BB3: 166,
199
+ 0x8BB5: 167,
200
+ 0x8BB7: 168,
201
+ 0x8BB8: 169,
202
+ 0x8BBC: 170,
203
+ 0x8C61: 171,
204
+ 0x8C62: 172,
205
+ 0x8C63: 173,
206
+ 0x8C65: 174,
207
+ 0x8C69: 175,
208
+ 0x8C6B: 176,
209
+ 0x8C71: 177,
210
+ 0x8C73: 178,
211
+ 0x8C75: 179,
212
+ 0x8C76: 180,
213
+ 0x8C77: 181,
214
+ 0x8C7B: 182,
215
+ 0x8C81: 183,
216
+ 0x8C82: 184,
217
+ 0x8C85: 185,
218
+ 0x8C89: 186,
219
+ 0x8C91: 187,
220
+ 0x8C93: 188,
221
+ 0x8C95: 189,
222
+ 0x8C96: 190,
223
+ 0x8C97: 191,
224
+ 0x8CA1: 192,
225
+ 0x8CA2: 193,
226
+ 0x8CA9: 194,
227
+ 0x8CE1: 195,
228
+ 0x8CE2: 196,
229
+ 0x8CE3: 197,
230
+ 0x8CE5: 198,
231
+ 0x8CE9: 199,
232
+ 0x8CF1: 200,
233
+ 0x8CF3: 201,
234
+ 0x8CF5: 202,
235
+ 0x8CF6: 203,
236
+ 0x8CF7: 204,
237
+ 0x8D41: 205,
238
+ 0x8D42: 206,
239
+ 0x8D45: 207,
240
+ 0x8D51: 208,
241
+ 0x8D55: 209,
242
+ 0x8D57: 210,
243
+ 0x8D61: 211,
244
+ 0x8D65: 212,
245
+ 0x8D69: 213,
246
+ 0x8D75: 214,
247
+ 0x8D76: 215,
248
+ 0x8D7B: 216,
249
+ 0x8D81: 217,
250
+ 0x8DA1: 218,
251
+ 0x8DA2: 219,
252
+ 0x8DA5: 220,
253
+ 0x8DA7: 221,
254
+ 0x8DA9: 222,
255
+ 0x8DB1: 223,
256
+ 0x8DB3: 224,
257
+ 0x8DB5: 225,
258
+ 0x8DB7: 226,
259
+ 0x8DB8: 227,
260
+ 0x8DB9: 228,
261
+ 0x8DC1: 229,
262
+ 0x8DC2: 230,
263
+ 0x8DC9: 231,
264
+ 0x8DD6: 232,
265
+ 0x8DD7: 233,
266
+ 0x8DE1: 234,
267
+ 0x8DE2: 235,
268
+ 0x8DF7: 236,
269
+ 0x8E41: 237,
270
+ 0x8E45: 238,
271
+ 0x8E49: 239,
272
+ 0x8E51: 240,
273
+ 0x8E53: 241,
274
+ 0x8E57: 242,
275
+ 0x8E61: 243,
276
+ 0x8E81: 244,
277
+ 0x8E82: 245,
278
+ 0x8E85: 246,
279
+ 0x8E89: 247,
280
+ 0x8E90: 248,
281
+ 0x8E91: 249,
282
+ 0x8E93: 250,
283
+ 0x8E95: 251,
284
+ 0x8E97: 252,
285
+ 0x8E98: 253,
286
+ 0x8EA1: 254,
287
+ 0x8EA9: 255,
288
+ 0x8EB6: 256,
289
+ 0x8EB7: 257,
290
+ 0x8EC1: 258,
291
+ 0x8EC2: 259,
292
+ 0x8EC5: 260,
293
+ 0x8EC9: 261,
294
+ 0x8ED1: 262,
295
+ 0x8ED3: 263,
296
+ 0x8ED6: 264,
297
+ 0x8EE1: 265,
298
+ 0x8EE5: 266,
299
+ 0x8EE9: 267,
300
+ 0x8EF1: 268,
301
+ 0x8EF3: 269,
302
+ 0x8F41: 270,
303
+ 0x8F61: 271,
304
+ 0x8F62: 272,
305
+ 0x8F65: 273,
306
+ 0x8F67: 274,
307
+ 0x8F69: 275,
308
+ 0x8F6B: 276,
309
+ 0x8F70: 277,
310
+ 0x8F71: 278,
311
+ 0x8F73: 279,
312
+ 0x8F75: 280,
313
+ 0x8F77: 281,
314
+ 0x8F7B: 282,
315
+ 0x8FA1: 283,
316
+ 0x8FA2: 284,
317
+ 0x8FA5: 285,
318
+ 0x8FA9: 286,
319
+ 0x8FB1: 287,
320
+ 0x8FB3: 288,
321
+ 0x8FB5: 289,
322
+ 0x8FB7: 290,
323
+ 0x9061: 291,
324
+ 0x9062: 292,
325
+ 0x9063: 293,
326
+ 0x9065: 294,
327
+ 0x9068: 295,
328
+ 0x9069: 296,
329
+ 0x906A: 297,
330
+ 0x906B: 298,
331
+ 0x9071: 299,
332
+ 0x9073: 300,
333
+ 0x9075: 301,
334
+ 0x9076: 302,
335
+ 0x9077: 303,
336
+ 0x9078: 304,
337
+ 0x9079: 305,
338
+ 0x907B: 306,
339
+ 0x907D: 307,
340
+ 0x9081: 308,
341
+ 0x9082: 309,
342
+ 0x9085: 310,
343
+ 0x9089: 311,
344
+ 0x9091: 312,
345
+ 0x9093: 313,
346
+ 0x9095: 314,
347
+ 0x9096: 315,
348
+ 0x9097: 316,
349
+ 0x90A1: 317,
350
+ 0x90A2: 318,
351
+ 0x90A5: 319,
352
+ 0x90A9: 320,
353
+ 0x90B1: 321,
354
+ 0x90B7: 322,
355
+ 0x90E1: 323,
356
+ 0x90E2: 324,
357
+ 0x90E4: 325,
358
+ 0x90E5: 326,
359
+ 0x90E9: 327,
360
+ 0x90EB: 328,
361
+ 0x90EC: 329,
362
+ 0x90F1: 330,
363
+ 0x90F3: 331,
364
+ 0x90F5: 332,
365
+ 0x90F6: 333,
366
+ 0x90F7: 334,
367
+ 0x90FD: 335,
368
+ 0x9141: 336,
369
+ 0x9142: 337,
370
+ 0x9145: 338,
371
+ 0x9149: 339,
372
+ 0x9151: 340,
373
+ 0x9153: 341,
374
+ 0x9155: 342,
375
+ 0x9156: 343,
376
+ 0x9157: 344,
377
+ 0x9161: 345,
378
+ 0x9162: 346,
379
+ 0x9165: 347,
380
+ 0x9169: 348,
381
+ 0x9171: 349,
382
+ 0x9173: 350,
383
+ 0x9176: 351,
384
+ 0x9177: 352,
385
+ 0x917A: 353,
386
+ 0x9181: 354,
387
+ 0x9185: 355,
388
+ 0x91A1: 356,
389
+ 0x91A2: 357,
390
+ 0x91A5: 358,
391
+ 0x91A9: 359,
392
+ 0x91AB: 360,
393
+ 0x91B1: 361,
394
+ 0x91B3: 362,
395
+ 0x91B5: 363,
396
+ 0x91B7: 364,
397
+ 0x91BC: 365,
398
+ 0x91BD: 366,
399
+ 0x91C1: 367,
400
+ 0x91C5: 368,
401
+ 0x91C9: 369,
402
+ 0x91D6: 370,
403
+ 0x9241: 371,
404
+ 0x9245: 372,
405
+ 0x9249: 373,
406
+ 0x9251: 374,
407
+ 0x9253: 375,
408
+ 0x9255: 376,
409
+ 0x9261: 377,
410
+ 0x9262: 378,
411
+ 0x9265: 379,
412
+ 0x9269: 380,
413
+ 0x9273: 381,
414
+ 0x9275: 382,
415
+ 0x9277: 383,
416
+ 0x9281: 384,
417
+ 0x9282: 385,
418
+ 0x9285: 386,
419
+ 0x9288: 387,
420
+ 0x9289: 388,
421
+ 0x9291: 389,
422
+ 0x9293: 390,
423
+ 0x9295: 391,
424
+ 0x9297: 392,
425
+ 0x92A1: 393,
426
+ 0x92B6: 394,
427
+ 0x92C1: 395,
428
+ 0x92E1: 396,
429
+ 0x92E5: 397,
430
+ 0x92E9: 398,
431
+ 0x92F1: 399,
432
+ 0x92F3: 400,
433
+ 0x9341: 401,
434
+ 0x9342: 402,
435
+ 0x9349: 403,
436
+ 0x9351: 404,
437
+ 0x9353: 405,
438
+ 0x9357: 406,
439
+ 0x9361: 407,
440
+ 0x9362: 408,
441
+ 0x9365: 409,
442
+ 0x9369: 410,
443
+ 0x936A: 411,
444
+ 0x936B: 412,
445
+ 0x9371: 413,
446
+ 0x9373: 414,
447
+ 0x9375: 415,
448
+ 0x9377: 416,
449
+ 0x9378: 417,
450
+ 0x937C: 418,
451
+ 0x9381: 419,
452
+ 0x9385: 420,
453
+ 0x9389: 421,
454
+ 0x93A1: 422,
455
+ 0x93A2: 423,
456
+ 0x93A5: 424,
457
+ 0x93A9: 425,
458
+ 0x93AB: 426,
459
+ 0x93B1: 427,
460
+ 0x93B3: 428,
461
+ 0x93B5: 429,
462
+ 0x93B7: 430,
463
+ 0x93BC: 431,
464
+ 0x9461: 432,
465
+ 0x9462: 433,
466
+ 0x9463: 434,
467
+ 0x9465: 435,
468
+ 0x9468: 436,
469
+ 0x9469: 437,
470
+ 0x946A: 438,
471
+ 0x946B: 439,
472
+ 0x946C: 440,
473
+ 0x9470: 441,
474
+ 0x9471: 442,
475
+ 0x9473: 443,
476
+ 0x9475: 444,
477
+ 0x9476: 445,
478
+ 0x9477: 446,
479
+ 0x9478: 447,
480
+ 0x9479: 448,
481
+ 0x947D: 449,
482
+ 0x9481: 450,
483
+ 0x9482: 451,
484
+ 0x9485: 452,
485
+ 0x9489: 453,
486
+ 0x9491: 454,
487
+ 0x9493: 455,
488
+ 0x9495: 456,
489
+ 0x9496: 457,
490
+ 0x9497: 458,
491
+ 0x94A1: 459,
492
+ 0x94E1: 460,
493
+ 0x94E2: 461,
494
+ 0x94E3: 462,
495
+ 0x94E5: 463,
496
+ 0x94E8: 464,
497
+ 0x94E9: 465,
498
+ 0x94EB: 466,
499
+ 0x94EC: 467,
500
+ 0x94F1: 468,
501
+ 0x94F3: 469,
502
+ 0x94F5: 470,
503
+ 0x94F7: 471,
504
+ 0x94F9: 472,
505
+ 0x94FC: 473,
506
+ 0x9541: 474,
507
+ 0x9542: 475,
508
+ 0x9545: 476,
509
+ 0x9549: 477,
510
+ 0x9551: 478,
511
+ 0x9553: 479,
512
+ 0x9555: 480,
513
+ 0x9556: 481,
514
+ 0x9557: 482,
515
+ 0x9561: 483,
516
+ 0x9565: 484,
517
+ 0x9569: 485,
518
+ 0x9576: 486,
519
+ 0x9577: 487,
520
+ 0x9581: 488,
521
+ 0x9585: 489,
522
+ 0x95A1: 490,
523
+ 0x95A2: 491,
524
+ 0x95A5: 492,
525
+ 0x95A8: 493,
526
+ 0x95A9: 494,
527
+ 0x95AB: 495,
528
+ 0x95AD: 496,
529
+ 0x95B1: 497,
530
+ 0x95B3: 498,
531
+ 0x95B5: 499,
532
+ 0x95B7: 500,
533
+ 0x95B9: 501,
534
+ 0x95BB: 502,
535
+ 0x95C1: 503,
536
+ 0x95C5: 504,
537
+ 0x95C9: 505,
538
+ 0x95E1: 506,
539
+ 0x95F6: 507,
540
+ 0x9641: 508,
541
+ 0x9645: 509,
542
+ 0x9649: 510,
543
+ 0x9651: 511,
544
+ 0x9653: 512,
545
+ 0x9655: 513,
546
+ 0x9661: 514,
547
+ 0x9681: 515,
548
+ 0x9682: 516,
549
+ 0x9685: 517,
550
+ 0x9689: 518,
551
+ 0x9691: 519,
552
+ 0x9693: 520,
553
+ 0x9695: 521,
554
+ 0x9697: 522,
555
+ 0x96A1: 523,
556
+ 0x96B6: 524,
557
+ 0x96C1: 525,
558
+ 0x96D7: 526,
559
+ 0x96E1: 527,
560
+ 0x96E5: 528,
561
+ 0x96E9: 529,
562
+ 0x96F3: 530,
563
+ 0x96F5: 531,
564
+ 0x96F7: 532,
565
+ 0x9741: 533,
566
+ 0x9745: 534,
567
+ 0x9749: 535,
568
+ 0x9751: 536,
569
+ 0x9757: 537,
570
+ 0x9761: 538,
571
+ 0x9762: 539,
572
+ 0x9765: 540,
573
+ 0x9768: 541,
574
+ 0x9769: 542,
575
+ 0x976B: 543,
576
+ 0x9771: 544,
577
+ 0x9773: 545,
578
+ 0x9775: 546,
579
+ 0x9777: 547,
580
+ 0x9781: 548,
581
+ 0x97A1: 549,
582
+ 0x97A2: 550,
583
+ 0x97A5: 551,
584
+ 0x97A8: 552,
585
+ 0x97A9: 553,
586
+ 0x97B1: 554,
587
+ 0x97B3: 555,
588
+ 0x97B5: 556,
589
+ 0x97B6: 557,
590
+ 0x97B7: 558,
591
+ 0x97B8: 559,
592
+ 0x9861: 560,
593
+ 0x9862: 561,
594
+ 0x9865: 562,
595
+ 0x9869: 563,
596
+ 0x9871: 564,
597
+ 0x9873: 565,
598
+ 0x9875: 566,
599
+ 0x9876: 567,
600
+ 0x9877: 568,
601
+ 0x987D: 569,
602
+ 0x9881: 570,
603
+ 0x9882: 571,
604
+ 0x9885: 572,
605
+ 0x9889: 573,
606
+ 0x9891: 574,
607
+ 0x9893: 575,
608
+ 0x9895: 576,
609
+ 0x9896: 577,
610
+ 0x9897: 578,
611
+ 0x98E1: 579,
612
+ 0x98E2: 580,
613
+ 0x98E5: 581,
614
+ 0x98E9: 582,
615
+ 0x98EB: 583,
616
+ 0x98EC: 584,
617
+ 0x98F1: 585,
618
+ 0x98F3: 586,
619
+ 0x98F5: 587,
620
+ 0x98F6: 588,
621
+ 0x98F7: 589,
622
+ 0x98FD: 590,
623
+ 0x9941: 591,
624
+ 0x9942: 592,
625
+ 0x9945: 593,
626
+ 0x9949: 594,
627
+ 0x9951: 595,
628
+ 0x9953: 596,
629
+ 0x9955: 597,
630
+ 0x9956: 598,
631
+ 0x9957: 599,
632
+ 0x9961: 600,
633
+ 0x9976: 601,
634
+ 0x99A1: 602,
635
+ 0x99A2: 603,
636
+ 0x99A5: 604,
637
+ 0x99A9: 605,
638
+ 0x99B7: 606,
639
+ 0x99C1: 607,
640
+ 0x99C9: 608,
641
+ 0x99E1: 609,
642
+ 0x9A41: 610,
643
+ 0x9A45: 611,
644
+ 0x9A81: 612,
645
+ 0x9A82: 613,
646
+ 0x9A85: 614,
647
+ 0x9A89: 615,
648
+ 0x9A90: 616,
649
+ 0x9A91: 617,
650
+ 0x9A97: 618,
651
+ 0x9AC1: 619,
652
+ 0x9AE1: 620,
653
+ 0x9AE5: 621,
654
+ 0x9AE9: 622,
655
+ 0x9AF1: 623,
656
+ 0x9AF3: 624,
657
+ 0x9AF7: 625,
658
+ 0x9B61: 626,
659
+ 0x9B62: 627,
660
+ 0x9B65: 628,
661
+ 0x9B68: 629,
662
+ 0x9B69: 630,
663
+ 0x9B71: 631,
664
+ 0x9B73: 632,
665
+ 0x9B75: 633,
666
+ 0x9B81: 634,
667
+ 0x9B85: 635,
668
+ 0x9B89: 636,
669
+ 0x9B91: 637,
670
+ 0x9B93: 638,
671
+ 0x9BA1: 639,
672
+ 0x9BA5: 640,
673
+ 0x9BA9: 641,
674
+ 0x9BB1: 642,
675
+ 0x9BB3: 643,
676
+ 0x9BB5: 644,
677
+ 0x9BB7: 645,
678
+ 0x9C61: 646,
679
+ 0x9C62: 647,
680
+ 0x9C65: 648,
681
+ 0x9C69: 649,
682
+ 0x9C71: 650,
683
+ 0x9C73: 651,
684
+ 0x9C75: 652,
685
+ 0x9C76: 653,
686
+ 0x9C77: 654,
687
+ 0x9C78: 655,
688
+ 0x9C7C: 656,
689
+ 0x9C7D: 657,
690
+ 0x9C81: 658,
691
+ 0x9C82: 659,
692
+ 0x9C85: 660,
693
+ 0x9C89: 661,
694
+ 0x9C91: 662,
695
+ 0x9C93: 663,
696
+ 0x9C95: 664,
697
+ 0x9C96: 665,
698
+ 0x9C97: 666,
699
+ 0x9CA1: 667,
700
+ 0x9CA2: 668,
701
+ 0x9CA5: 669,
702
+ 0x9CB5: 670,
703
+ 0x9CB7: 671,
704
+ 0x9CE1: 672,
705
+ 0x9CE2: 673,
706
+ 0x9CE5: 674,
707
+ 0x9CE9: 675,
708
+ 0x9CF1: 676,
709
+ 0x9CF3: 677,
710
+ 0x9CF5: 678,
711
+ 0x9CF6: 679,
712
+ 0x9CF7: 680,
713
+ 0x9CFD: 681,
714
+ 0x9D41: 682,
715
+ 0x9D42: 683,
716
+ 0x9D45: 684,
717
+ 0x9D49: 685,
718
+ 0x9D51: 686,
719
+ 0x9D53: 687,
720
+ 0x9D55: 688,
721
+ 0x9D57: 689,
722
+ 0x9D61: 690,
723
+ 0x9D62: 691,
724
+ 0x9D65: 692,
725
+ 0x9D69: 693,
726
+ 0x9D71: 694,
727
+ 0x9D73: 695,
728
+ 0x9D75: 696,
729
+ 0x9D76: 697,
730
+ 0x9D77: 698,
731
+ 0x9D81: 699,
732
+ 0x9D85: 700,
733
+ 0x9D93: 701,
734
+ 0x9D95: 702,
735
+ 0x9DA1: 703,
736
+ 0x9DA2: 704,
737
+ 0x9DA5: 705,
738
+ 0x9DA9: 706,
739
+ 0x9DB1: 707,
740
+ 0x9DB3: 708,
741
+ 0x9DB5: 709,
742
+ 0x9DB7: 710,
743
+ 0x9DC1: 711,
744
+ 0x9DC5: 712,
745
+ 0x9DD7: 713,
746
+ 0x9DF6: 714,
747
+ 0x9E41: 715,
748
+ 0x9E45: 716,
749
+ 0x9E49: 717,
750
+ 0x9E51: 718,
751
+ 0x9E53: 719,
752
+ 0x9E55: 720,
753
+ 0x9E57: 721,
754
+ 0x9E61: 722,
755
+ 0x9E65: 723,
756
+ 0x9E69: 724,
757
+ 0x9E73: 725,
758
+ 0x9E75: 726,
759
+ 0x9E77: 727,
760
+ 0x9E81: 728,
761
+ 0x9E82: 729,
762
+ 0x9E85: 730,
763
+ 0x9E89: 731,
764
+ 0x9E91: 732,
765
+ 0x9E93: 733,
766
+ 0x9E95: 734,
767
+ 0x9E97: 735,
768
+ 0x9EA1: 736,
769
+ 0x9EB6: 737,
770
+ 0x9EC1: 738,
771
+ 0x9EE1: 739,
772
+ 0x9EE2: 740,
773
+ 0x9EE5: 741,
774
+ 0x9EE9: 742,
775
+ 0x9EF1: 743,
776
+ 0x9EF5: 744,
777
+ 0x9EF7: 745,
778
+ 0x9F41: 746,
779
+ 0x9F42: 747,
780
+ 0x9F45: 748,
781
+ 0x9F49: 749,
782
+ 0x9F51: 750,
783
+ 0x9F53: 751,
784
+ 0x9F55: 752,
785
+ 0x9F57: 753,
786
+ 0x9F61: 754,
787
+ 0x9F62: 755,
788
+ 0x9F65: 756,
789
+ 0x9F69: 757,
790
+ 0x9F71: 758,
791
+ 0x9F73: 759,
792
+ 0x9F75: 760,
793
+ 0x9F77: 761,
794
+ 0x9F78: 762,
795
+ 0x9F7B: 763,
796
+ 0x9F7C: 764,
797
+ 0x9FA1: 765,
798
+ 0x9FA2: 766,
799
+ 0x9FA5: 767,
800
+ 0x9FA9: 768,
801
+ 0x9FB1: 769,
802
+ 0x9FB3: 770,
803
+ 0x9FB5: 771,
804
+ 0x9FB7: 772,
805
+ 0xA061: 773,
806
+ 0xA062: 774,
807
+ 0xA065: 775,
808
+ 0xA067: 776,
809
+ 0xA068: 777,
810
+ 0xA069: 778,
811
+ 0xA06A: 779,
812
+ 0xA06B: 780,
813
+ 0xA071: 781,
814
+ 0xA073: 782,
815
+ 0xA075: 783,
816
+ 0xA077: 784,
817
+ 0xA078: 785,
818
+ 0xA07B: 786,
819
+ 0xA07D: 787,
820
+ 0xA081: 788,
821
+ 0xA082: 789,
822
+ 0xA085: 790,
823
+ 0xA089: 791,
824
+ 0xA091: 792,
825
+ 0xA093: 793,
826
+ 0xA095: 794,
827
+ 0xA096: 795,
828
+ 0xA097: 796,
829
+ 0xA098: 797,
830
+ 0xA0A1: 798,
831
+ 0xA0A2: 799,
832
+ 0xA0A9: 800,
833
+ 0xA0B7: 801,
834
+ 0xA0E1: 802,
835
+ 0xA0E2: 803,
836
+ 0xA0E5: 804,
837
+ 0xA0E9: 805,
838
+ 0xA0EB: 806,
839
+ 0xA0F1: 807,
840
+ 0xA0F3: 808,
841
+ 0xA0F5: 809,
842
+ 0xA0F7: 810,
843
+ 0xA0F8: 811,
844
+ 0xA0FD: 812,
845
+ 0xA141: 813,
846
+ 0xA142: 814,
847
+ 0xA145: 815,
848
+ 0xA149: 816,
849
+ 0xA151: 817,
850
+ 0xA153: 818,
851
+ 0xA155: 819,
852
+ 0xA156: 820,
853
+ 0xA157: 821,
854
+ 0xA161: 822,
855
+ 0xA162: 823,
856
+ 0xA165: 824,
857
+ 0xA169: 825,
858
+ 0xA175: 826,
859
+ 0xA176: 827,
860
+ 0xA177: 828,
861
+ 0xA179: 829,
862
+ 0xA181: 830,
863
+ 0xA1A1: 831,
864
+ 0xA1A2: 832,
865
+ 0xA1A4: 833,
866
+ 0xA1A5: 834,
867
+ 0xA1A9: 835,
868
+ 0xA1AB: 836,
869
+ 0xA1B1: 837,
870
+ 0xA1B3: 838,
871
+ 0xA1B5: 839,
872
+ 0xA1B7: 840,
873
+ 0xA1C1: 841,
874
+ 0xA1C5: 842,
875
+ 0xA1D6: 843,
876
+ 0xA1D7: 844,
877
+ 0xA241: 845,
878
+ 0xA245: 846,
879
+ 0xA249: 847,
880
+ 0xA253: 848,
881
+ 0xA255: 849,
882
+ 0xA257: 850,
883
+ 0xA261: 851,
884
+ 0xA265: 852,
885
+ 0xA269: 853,
886
+ 0xA273: 854,
887
+ 0xA275: 855,
888
+ 0xA281: 856,
889
+ 0xA282: 857,
890
+ 0xA283: 858,
891
+ 0xA285: 859,
892
+ 0xA288: 860,
893
+ 0xA289: 861,
894
+ 0xA28A: 862,
895
+ 0xA28B: 863,
896
+ 0xA291: 864,
897
+ 0xA293: 865,
898
+ 0xA295: 866,
899
+ 0xA297: 867,
900
+ 0xA29B: 868,
901
+ 0xA29D: 869,
902
+ 0xA2A1: 870,
903
+ 0xA2A5: 871,
904
+ 0xA2A9: 872,
905
+ 0xA2B3: 873,
906
+ 0xA2B5: 874,
907
+ 0xA2C1: 875,
908
+ 0xA2E1: 876,
909
+ 0xA2E5: 877,
910
+ 0xA2E9: 878,
911
+ 0xA341: 879,
912
+ 0xA345: 880,
913
+ 0xA349: 881,
914
+ 0xA351: 882,
915
+ 0xA355: 883,
916
+ 0xA361: 884,
917
+ 0xA365: 885,
918
+ 0xA369: 886,
919
+ 0xA371: 887,
920
+ 0xA375: 888,
921
+ 0xA3A1: 889,
922
+ 0xA3A2: 890,
923
+ 0xA3A5: 891,
924
+ 0xA3A8: 892,
925
+ 0xA3A9: 893,
926
+ 0xA3AB: 894,
927
+ 0xA3B1: 895,
928
+ 0xA3B3: 896,
929
+ 0xA3B5: 897,
930
+ 0xA3B6: 898,
931
+ 0xA3B7: 899,
932
+ 0xA3B9: 900,
933
+ 0xA3BB: 901,
934
+ 0xA461: 902,
935
+ 0xA462: 903,
936
+ 0xA463: 904,
937
+ 0xA464: 905,
938
+ 0xA465: 906,
939
+ 0xA468: 907,
940
+ 0xA469: 908,
941
+ 0xA46A: 909,
942
+ 0xA46B: 910,
943
+ 0xA46C: 911,
944
+ 0xA471: 912,
945
+ 0xA473: 913,
946
+ 0xA475: 914,
947
+ 0xA477: 915,
948
+ 0xA47B: 916,
949
+ 0xA481: 917,
950
+ 0xA482: 918,
951
+ 0xA485: 919,
952
+ 0xA489: 920,
953
+ 0xA491: 921,
954
+ 0xA493: 922,
955
+ 0xA495: 923,
956
+ 0xA496: 924,
957
+ 0xA497: 925,
958
+ 0xA49B: 926,
959
+ 0xA4A1: 927,
960
+ 0xA4A2: 928,
961
+ 0xA4A5: 929,
962
+ 0xA4B3: 930,
963
+ 0xA4E1: 931,
964
+ 0xA4E2: 932,
965
+ 0xA4E5: 933,
966
+ 0xA4E8: 934,
967
+ 0xA4E9: 935,
968
+ 0xA4EB: 936,
969
+ 0xA4F1: 937,
970
+ 0xA4F3: 938,
971
+ 0xA4F5: 939,
972
+ 0xA4F7: 940,
973
+ 0xA4F8: 941,
974
+ 0xA541: 942,
975
+ 0xA542: 943,
976
+ 0xA545: 944,
977
+ 0xA548: 945,
978
+ 0xA549: 946,
979
+ 0xA551: 947,
980
+ 0xA553: 948,
981
+ 0xA555: 949,
982
+ 0xA556: 950,
983
+ 0xA557: 951,
984
+ 0xA561: 952,
985
+ 0xA562: 953,
986
+ 0xA565: 954,
987
+ 0xA569: 955,
988
+ 0xA573: 956,
989
+ 0xA575: 957,
990
+ 0xA576: 958,
991
+ 0xA577: 959,
992
+ 0xA57B: 960,
993
+ 0xA581: 961,
994
+ 0xA585: 962,
995
+ 0xA5A1: 963,
996
+ 0xA5A2: 964,
997
+ 0xA5A3: 965,
998
+ 0xA5A5: 966,
999
+ 0xA5A9: 967,
1000
+ 0xA5B1: 968,
1001
+ 0xA5B3: 969,
1002
+ 0xA5B5: 970,
1003
+ 0xA5B7: 971,
1004
+ 0xA5C1: 972,
1005
+ 0xA5C5: 973,
1006
+ 0xA5D6: 974,
1007
+ 0xA5E1: 975,
1008
+ 0xA5F6: 976,
1009
+ 0xA641: 977,
1010
+ 0xA642: 978,
1011
+ 0xA645: 979,
1012
+ 0xA649: 980,
1013
+ 0xA651: 981,
1014
+ 0xA653: 982,
1015
+ 0xA661: 983,
1016
+ 0xA665: 984,
1017
+ 0xA681: 985,
1018
+ 0xA682: 986,
1019
+ 0xA685: 987,
1020
+ 0xA688: 988,
1021
+ 0xA689: 989,
1022
+ 0xA68A: 990,
1023
+ 0xA68B: 991,
1024
+ 0xA691: 992,
1025
+ 0xA693: 993,
1026
+ 0xA695: 994,
1027
+ 0xA697: 995,
1028
+ 0xA69B: 996,
1029
+ 0xA69C: 997,
1030
+ 0xA6A1: 998,
1031
+ 0xA6A9: 999,
1032
+ 0xA6B6: 1000,
1033
+ 0xA6C1: 1001,
1034
+ 0xA6E1: 1002,
1035
+ 0xA6E2: 1003,
1036
+ 0xA6E5: 1004,
1037
+ 0xA6E9: 1005,
1038
+ 0xA6F7: 1006,
1039
+ 0xA741: 1007,
1040
+ 0xA745: 1008,
1041
+ 0xA749: 1009,
1042
+ 0xA751: 1010,
1043
+ 0xA755: 1011,
1044
+ 0xA757: 1012,
1045
+ 0xA761: 1013,
1046
+ 0xA762: 1014,
1047
+ 0xA765: 1015,
1048
+ 0xA769: 1016,
1049
+ 0xA771: 1017,
1050
+ 0xA773: 1018,
1051
+ 0xA775: 1019,
1052
+ 0xA7A1: 1020,
1053
+ 0xA7A2: 1021,
1054
+ 0xA7A5: 1022,
1055
+ 0xA7A9: 1023,
1056
+ 0xA7AB: 1024,
1057
+ 0xA7B1: 1025,
1058
+ 0xA7B3: 1026,
1059
+ 0xA7B5: 1027,
1060
+ 0xA7B7: 1028,
1061
+ 0xA7B8: 1029,
1062
+ 0xA7B9: 1030,
1063
+ 0xA861: 1031,
1064
+ 0xA862: 1032,
1065
+ 0xA865: 1033,
1066
+ 0xA869: 1034,
1067
+ 0xA86B: 1035,
1068
+ 0xA871: 1036,
1069
+ 0xA873: 1037,
1070
+ 0xA875: 1038,
1071
+ 0xA876: 1039,
1072
+ 0xA877: 1040,
1073
+ 0xA87D: 1041,
1074
+ 0xA881: 1042,
1075
+ 0xA882: 1043,
1076
+ 0xA885: 1044,
1077
+ 0xA889: 1045,
1078
+ 0xA891: 1046,
1079
+ 0xA893: 1047,
1080
+ 0xA895: 1048,
1081
+ 0xA896: 1049,
1082
+ 0xA897: 1050,
1083
+ 0xA8A1: 1051,
1084
+ 0xA8A2: 1052,
1085
+ 0xA8B1: 1053,
1086
+ 0xA8E1: 1054,
1087
+ 0xA8E2: 1055,
1088
+ 0xA8E5: 1056,
1089
+ 0xA8E8: 1057,
1090
+ 0xA8E9: 1058,
1091
+ 0xA8F1: 1059,
1092
+ 0xA8F5: 1060,
1093
+ 0xA8F6: 1061,
1094
+ 0xA8F7: 1062,
1095
+ 0xA941: 1063,
1096
+ 0xA957: 1064,
1097
+ 0xA961: 1065,
1098
+ 0xA962: 1066,
1099
+ 0xA971: 1067,
1100
+ 0xA973: 1068,
1101
+ 0xA975: 1069,
1102
+ 0xA976: 1070,
1103
+ 0xA977: 1071,
1104
+ 0xA9A1: 1072,
1105
+ 0xA9A2: 1073,
1106
+ 0xA9A5: 1074,
1107
+ 0xA9A9: 1075,
1108
+ 0xA9B1: 1076,
1109
+ 0xA9B3: 1077,
1110
+ 0xA9B7: 1078,
1111
+ 0xAA41: 1079,
1112
+ 0xAA61: 1080,
1113
+ 0xAA77: 1081,
1114
+ 0xAA81: 1082,
1115
+ 0xAA82: 1083,
1116
+ 0xAA85: 1084,
1117
+ 0xAA89: 1085,
1118
+ 0xAA91: 1086,
1119
+ 0xAA95: 1087,
1120
+ 0xAA97: 1088,
1121
+ 0xAB41: 1089,
1122
+ 0xAB57: 1090,
1123
+ 0xAB61: 1091,
1124
+ 0xAB65: 1092,
1125
+ 0xAB69: 1093,
1126
+ 0xAB71: 1094,
1127
+ 0xAB73: 1095,
1128
+ 0xABA1: 1096,
1129
+ 0xABA2: 1097,
1130
+ 0xABA5: 1098,
1131
+ 0xABA9: 1099,
1132
+ 0xABB1: 1100,
1133
+ 0xABB3: 1101,
1134
+ 0xABB5: 1102,
1135
+ 0xABB7: 1103,
1136
+ 0xAC61: 1104,
1137
+ 0xAC62: 1105,
1138
+ 0xAC64: 1106,
1139
+ 0xAC65: 1107,
1140
+ 0xAC68: 1108,
1141
+ 0xAC69: 1109,
1142
+ 0xAC6A: 1110,
1143
+ 0xAC6B: 1111,
1144
+ 0xAC71: 1112,
1145
+ 0xAC73: 1113,
1146
+ 0xAC75: 1114,
1147
+ 0xAC76: 1115,
1148
+ 0xAC77: 1116,
1149
+ 0xAC7B: 1117,
1150
+ 0xAC81: 1118,
1151
+ 0xAC82: 1119,
1152
+ 0xAC85: 1120,
1153
+ 0xAC89: 1121,
1154
+ 0xAC91: 1122,
1155
+ 0xAC93: 1123,
1156
+ 0xAC95: 1124,
1157
+ 0xAC96: 1125,
1158
+ 0xAC97: 1126,
1159
+ 0xACA1: 1127,
1160
+ 0xACA2: 1128,
1161
+ 0xACA5: 1129,
1162
+ 0xACA9: 1130,
1163
+ 0xACB1: 1131,
1164
+ 0xACB3: 1132,
1165
+ 0xACB5: 1133,
1166
+ 0xACB7: 1134,
1167
+ 0xACC1: 1135,
1168
+ 0xACC5: 1136,
1169
+ 0xACC9: 1137,
1170
+ 0xACD1: 1138,
1171
+ 0xACD7: 1139,
1172
+ 0xACE1: 1140,
1173
+ 0xACE2: 1141,
1174
+ 0xACE3: 1142,
1175
+ 0xACE4: 1143,
1176
+ 0xACE5: 1144,
1177
+ 0xACE8: 1145,
1178
+ 0xACE9: 1146,
1179
+ 0xACEB: 1147,
1180
+ 0xACEC: 1148,
1181
+ 0xACF1: 1149,
1182
+ 0xACF3: 1150,
1183
+ 0xACF5: 1151,
1184
+ 0xACF6: 1152,
1185
+ 0xACF7: 1153,
1186
+ 0xACFC: 1154,
1187
+ 0xAD41: 1155,
1188
+ 0xAD42: 1156,
1189
+ 0xAD45: 1157,
1190
+ 0xAD49: 1158,
1191
+ 0xAD51: 1159,
1192
+ 0xAD53: 1160,
1193
+ 0xAD55: 1161,
1194
+ 0xAD56: 1162,
1195
+ 0xAD57: 1163,
1196
+ 0xAD61: 1164,
1197
+ 0xAD62: 1165,
1198
+ 0xAD65: 1166,
1199
+ 0xAD69: 1167,
1200
+ 0xAD71: 1168,
1201
+ 0xAD73: 1169,
1202
+ 0xAD75: 1170,
1203
+ 0xAD76: 1171,
1204
+ 0xAD77: 1172,
1205
+ 0xAD81: 1173,
1206
+ 0xAD85: 1174,
1207
+ 0xAD89: 1175,
1208
+ 0xAD97: 1176,
1209
+ 0xADA1: 1177,
1210
+ 0xADA2: 1178,
1211
+ 0xADA3: 1179,
1212
+ 0xADA5: 1180,
1213
+ 0xADA9: 1181,
1214
+ 0xADAB: 1182,
1215
+ 0xADB1: 1183,
1216
+ 0xADB3: 1184,
1217
+ 0xADB5: 1185,
1218
+ 0xADB7: 1186,
1219
+ 0xADBB: 1187,
1220
+ 0xADC1: 1188,
1221
+ 0xADC2: 1189,
1222
+ 0xADC5: 1190,
1223
+ 0xADC9: 1191,
1224
+ 0xADD7: 1192,
1225
+ 0xADE1: 1193,
1226
+ 0xADE5: 1194,
1227
+ 0xADE9: 1195,
1228
+ 0xADF1: 1196,
1229
+ 0xADF5: 1197,
1230
+ 0xADF6: 1198,
1231
+ 0xAE41: 1199,
1232
+ 0xAE45: 1200,
1233
+ 0xAE49: 1201,
1234
+ 0xAE51: 1202,
1235
+ 0xAE53: 1203,
1236
+ 0xAE55: 1204,
1237
+ 0xAE61: 1205,
1238
+ 0xAE62: 1206,
1239
+ 0xAE65: 1207,
1240
+ 0xAE69: 1208,
1241
+ 0xAE71: 1209,
1242
+ 0xAE73: 1210,
1243
+ 0xAE75: 1211,
1244
+ 0xAE77: 1212,
1245
+ 0xAE81: 1213,
1246
+ 0xAE82: 1214,
1247
+ 0xAE85: 1215,
1248
+ 0xAE88: 1216,
1249
+ 0xAE89: 1217,
1250
+ 0xAE91: 1218,
1251
+ 0xAE93: 1219,
1252
+ 0xAE95: 1220,
1253
+ 0xAE97: 1221,
1254
+ 0xAE99: 1222,
1255
+ 0xAE9B: 1223,
1256
+ 0xAE9C: 1224,
1257
+ 0xAEA1: 1225,
1258
+ 0xAEB6: 1226,
1259
+ 0xAEC1: 1227,
1260
+ 0xAEC2: 1228,
1261
+ 0xAEC5: 1229,
1262
+ 0xAEC9: 1230,
1263
+ 0xAED1: 1231,
1264
+ 0xAED7: 1232,
1265
+ 0xAEE1: 1233,
1266
+ 0xAEE2: 1234,
1267
+ 0xAEE5: 1235,
1268
+ 0xAEE9: 1236,
1269
+ 0xAEF1: 1237,
1270
+ 0xAEF3: 1238,
1271
+ 0xAEF5: 1239,
1272
+ 0xAEF7: 1240,
1273
+ 0xAF41: 1241,
1274
+ 0xAF42: 1242,
1275
+ 0xAF49: 1243,
1276
+ 0xAF51: 1244,
1277
+ 0xAF55: 1245,
1278
+ 0xAF57: 1246,
1279
+ 0xAF61: 1247,
1280
+ 0xAF62: 1248,
1281
+ 0xAF65: 1249,
1282
+ 0xAF69: 1250,
1283
+ 0xAF6A: 1251,
1284
+ 0xAF71: 1252,
1285
+ 0xAF73: 1253,
1286
+ 0xAF75: 1254,
1287
+ 0xAF77: 1255,
1288
+ 0xAFA1: 1256,
1289
+ 0xAFA2: 1257,
1290
+ 0xAFA5: 1258,
1291
+ 0xAFA8: 1259,
1292
+ 0xAFA9: 1260,
1293
+ 0xAFB0: 1261,
1294
+ 0xAFB1: 1262,
1295
+ 0xAFB3: 1263,
1296
+ 0xAFB5: 1264,
1297
+ 0xAFB7: 1265,
1298
+ 0xAFBC: 1266,
1299
+ 0xB061: 1267,
1300
+ 0xB062: 1268,
1301
+ 0xB064: 1269,
1302
+ 0xB065: 1270,
1303
+ 0xB069: 1271,
1304
+ 0xB071: 1272,
1305
+ 0xB073: 1273,
1306
+ 0xB076: 1274,
1307
+ 0xB077: 1275,
1308
+ 0xB07D: 1276,
1309
+ 0xB081: 1277,
1310
+ 0xB082: 1278,
1311
+ 0xB085: 1279,
1312
+ 0xB089: 1280,
1313
+ 0xB091: 1281,
1314
+ 0xB093: 1282,
1315
+ 0xB096: 1283,
1316
+ 0xB097: 1284,
1317
+ 0xB0B7: 1285,
1318
+ 0xB0E1: 1286,
1319
+ 0xB0E2: 1287,
1320
+ 0xB0E5: 1288,
1321
+ 0xB0E9: 1289,
1322
+ 0xB0EB: 1290,
1323
+ 0xB0F1: 1291,
1324
+ 0xB0F3: 1292,
1325
+ 0xB0F6: 1293,
1326
+ 0xB0F7: 1294,
1327
+ 0xB141: 1295,
1328
+ 0xB145: 1296,
1329
+ 0xB149: 1297,
1330
+ 0xB185: 1298,
1331
+ 0xB1A1: 1299,
1332
+ 0xB1A2: 1300,
1333
+ 0xB1A5: 1301,
1334
+ 0xB1A8: 1302,
1335
+ 0xB1A9: 1303,
1336
+ 0xB1AB: 1304,
1337
+ 0xB1B1: 1305,
1338
+ 0xB1B3: 1306,
1339
+ 0xB1B7: 1307,
1340
+ 0xB1C1: 1308,
1341
+ 0xB1C2: 1309,
1342
+ 0xB1C5: 1310,
1343
+ 0xB1D6: 1311,
1344
+ 0xB1E1: 1312,
1345
+ 0xB1F6: 1313,
1346
+ 0xB241: 1314,
1347
+ 0xB245: 1315,
1348
+ 0xB249: 1316,
1349
+ 0xB251: 1317,
1350
+ 0xB253: 1318,
1351
+ 0xB261: 1319,
1352
+ 0xB281: 1320,
1353
+ 0xB282: 1321,
1354
+ 0xB285: 1322,
1355
+ 0xB289: 1323,
1356
+ 0xB291: 1324,
1357
+ 0xB293: 1325,
1358
+ 0xB297: 1326,
1359
+ 0xB2A1: 1327,
1360
+ 0xB2B6: 1328,
1361
+ 0xB2C1: 1329,
1362
+ 0xB2E1: 1330,
1363
+ 0xB2E5: 1331,
1364
+ 0xB357: 1332,
1365
+ 0xB361: 1333,
1366
+ 0xB362: 1334,
1367
+ 0xB365: 1335,
1368
+ 0xB369: 1336,
1369
+ 0xB36B: 1337,
1370
+ 0xB370: 1338,
1371
+ 0xB371: 1339,
1372
+ 0xB373: 1340,
1373
+ 0xB381: 1341,
1374
+ 0xB385: 1342,
1375
+ 0xB389: 1343,
1376
+ 0xB391: 1344,
1377
+ 0xB3A1: 1345,
1378
+ 0xB3A2: 1346,
1379
+ 0xB3A5: 1347,
1380
+ 0xB3A9: 1348,
1381
+ 0xB3B1: 1349,
1382
+ 0xB3B3: 1350,
1383
+ 0xB3B5: 1351,
1384
+ 0xB3B7: 1352,
1385
+ 0xB461: 1353,
1386
+ 0xB462: 1354,
1387
+ 0xB465: 1355,
1388
+ 0xB466: 1356,
1389
+ 0xB467: 1357,
1390
+ 0xB469: 1358,
1391
+ 0xB46A: 1359,
1392
+ 0xB46B: 1360,
1393
+ 0xB470: 1361,
1394
+ 0xB471: 1362,
1395
+ 0xB473: 1363,
1396
+ 0xB475: 1364,
1397
+ 0xB476: 1365,
1398
+ 0xB477: 1366,
1399
+ 0xB47B: 1367,
1400
+ 0xB47C: 1368,
1401
+ 0xB481: 1369,
1402
+ 0xB482: 1370,
1403
+ 0xB485: 1371,
1404
+ 0xB489: 1372,
1405
+ 0xB491: 1373,
1406
+ 0xB493: 1374,
1407
+ 0xB495: 1375,
1408
+ 0xB496: 1376,
1409
+ 0xB497: 1377,
1410
+ 0xB4A1: 1378,
1411
+ 0xB4A2: 1379,
1412
+ 0xB4A5: 1380,
1413
+ 0xB4A9: 1381,
1414
+ 0xB4AC: 1382,
1415
+ 0xB4B1: 1383,
1416
+ 0xB4B3: 1384,
1417
+ 0xB4B5: 1385,
1418
+ 0xB4B7: 1386,
1419
+ 0xB4BB: 1387,
1420
+ 0xB4BD: 1388,
1421
+ 0xB4C1: 1389,
1422
+ 0xB4C5: 1390,
1423
+ 0xB4C9: 1391,
1424
+ 0xB4D3: 1392,
1425
+ 0xB4E1: 1393,
1426
+ 0xB4E2: 1394,
1427
+ 0xB4E5: 1395,
1428
+ 0xB4E6: 1396,
1429
+ 0xB4E8: 1397,
1430
+ 0xB4E9: 1398,
1431
+ 0xB4EA: 1399,
1432
+ 0xB4EB: 1400,
1433
+ 0xB4F1: 1401,
1434
+ 0xB4F3: 1402,
1435
+ 0xB4F4: 1403,
1436
+ 0xB4F5: 1404,
1437
+ 0xB4F6: 1405,
1438
+ 0xB4F7: 1406,
1439
+ 0xB4F8: 1407,
1440
+ 0xB4FA: 1408,
1441
+ 0xB4FC: 1409,
1442
+ 0xB541: 1410,
1443
+ 0xB542: 1411,
1444
+ 0xB545: 1412,
1445
+ 0xB549: 1413,
1446
+ 0xB551: 1414,
1447
+ 0xB553: 1415,
1448
+ 0xB555: 1416,
1449
+ 0xB557: 1417,
1450
+ 0xB561: 1418,
1451
+ 0xB562: 1419,
1452
+ 0xB563: 1420,
1453
+ 0xB565: 1421,
1454
+ 0xB569: 1422,
1455
+ 0xB56B: 1423,
1456
+ 0xB56C: 1424,
1457
+ 0xB571: 1425,
1458
+ 0xB573: 1426,
1459
+ 0xB574: 1427,
1460
+ 0xB575: 1428,
1461
+ 0xB576: 1429,
1462
+ 0xB577: 1430,
1463
+ 0xB57B: 1431,
1464
+ 0xB57C: 1432,
1465
+ 0xB57D: 1433,
1466
+ 0xB581: 1434,
1467
+ 0xB585: 1435,
1468
+ 0xB589: 1436,
1469
+ 0xB591: 1437,
1470
+ 0xB593: 1438,
1471
+ 0xB595: 1439,
1472
+ 0xB596: 1440,
1473
+ 0xB5A1: 1441,
1474
+ 0xB5A2: 1442,
1475
+ 0xB5A5: 1443,
1476
+ 0xB5A9: 1444,
1477
+ 0xB5AA: 1445,
1478
+ 0xB5AB: 1446,
1479
+ 0xB5AD: 1447,
1480
+ 0xB5B0: 1448,
1481
+ 0xB5B1: 1449,
1482
+ 0xB5B3: 1450,
1483
+ 0xB5B5: 1451,
1484
+ 0xB5B7: 1452,
1485
+ 0xB5B9: 1453,
1486
+ 0xB5C1: 1454,
1487
+ 0xB5C2: 1455,
1488
+ 0xB5C5: 1456,
1489
+ 0xB5C9: 1457,
1490
+ 0xB5D1: 1458,
1491
+ 0xB5D3: 1459,
1492
+ 0xB5D5: 1460,
1493
+ 0xB5D6: 1461,
1494
+ 0xB5D7: 1462,
1495
+ 0xB5E1: 1463,
1496
+ 0xB5E2: 1464,
1497
+ 0xB5E5: 1465,
1498
+ 0xB5F1: 1466,
1499
+ 0xB5F5: 1467,
1500
+ 0xB5F7: 1468,
1501
+ 0xB641: 1469,
1502
+ 0xB642: 1470,
1503
+ 0xB645: 1471,
1504
+ 0xB649: 1472,
1505
+ 0xB651: 1473,
1506
+ 0xB653: 1474,
1507
+ 0xB655: 1475,
1508
+ 0xB657: 1476,
1509
+ 0xB661: 1477,
1510
+ 0xB662: 1478,
1511
+ 0xB665: 1479,
1512
+ 0xB669: 1480,
1513
+ 0xB671: 1481,
1514
+ 0xB673: 1482,
1515
+ 0xB675: 1483,
1516
+ 0xB677: 1484,
1517
+ 0xB681: 1485,
1518
+ 0xB682: 1486,
1519
+ 0xB685: 1487,
1520
+ 0xB689: 1488,
1521
+ 0xB68A: 1489,
1522
+ 0xB68B: 1490,
1523
+ 0xB691: 1491,
1524
+ 0xB693: 1492,
1525
+ 0xB695: 1493,
1526
+ 0xB697: 1494,
1527
+ 0xB6A1: 1495,
1528
+ 0xB6A2: 1496,
1529
+ 0xB6A5: 1497,
1530
+ 0xB6A9: 1498,
1531
+ 0xB6B1: 1499,
1532
+ 0xB6B3: 1500,
1533
+ 0xB6B6: 1501,
1534
+ 0xB6B7: 1502,
1535
+ 0xB6C1: 1503,
1536
+ 0xB6C2: 1504,
1537
+ 0xB6C5: 1505,
1538
+ 0xB6C9: 1506,
1539
+ 0xB6D1: 1507,
1540
+ 0xB6D3: 1508,
1541
+ 0xB6D7: 1509,
1542
+ 0xB6E1: 1510,
1543
+ 0xB6E2: 1511,
1544
+ 0xB6E5: 1512,
1545
+ 0xB6E9: 1513,
1546
+ 0xB6F1: 1514,
1547
+ 0xB6F3: 1515,
1548
+ 0xB6F5: 1516,
1549
+ 0xB6F7: 1517,
1550
+ 0xB741: 1518,
1551
+ 0xB742: 1519,
1552
+ 0xB745: 1520,
1553
+ 0xB749: 1521,
1554
+ 0xB751: 1522,
1555
+ 0xB753: 1523,
1556
+ 0xB755: 1524,
1557
+ 0xB757: 1525,
1558
+ 0xB759: 1526,
1559
+ 0xB761: 1527,
1560
+ 0xB762: 1528,
1561
+ 0xB765: 1529,
1562
+ 0xB769: 1530,
1563
+ 0xB76F: 1531,
1564
+ 0xB771: 1532,
1565
+ 0xB773: 1533,
1566
+ 0xB775: 1534,
1567
+ 0xB777: 1535,
1568
+ 0xB778: 1536,
1569
+ 0xB779: 1537,
1570
+ 0xB77A: 1538,
1571
+ 0xB77B: 1539,
1572
+ 0xB77C: 1540,
1573
+ 0xB77D: 1541,
1574
+ 0xB781: 1542,
1575
+ 0xB785: 1543,
1576
+ 0xB789: 1544,
1577
+ 0xB791: 1545,
1578
+ 0xB795: 1546,
1579
+ 0xB7A1: 1547,
1580
+ 0xB7A2: 1548,
1581
+ 0xB7A5: 1549,
1582
+ 0xB7A9: 1550,
1583
+ 0xB7AA: 1551,
1584
+ 0xB7AB: 1552,
1585
+ 0xB7B0: 1553,
1586
+ 0xB7B1: 1554,
1587
+ 0xB7B3: 1555,
1588
+ 0xB7B5: 1556,
1589
+ 0xB7B6: 1557,
1590
+ 0xB7B7: 1558,
1591
+ 0xB7B8: 1559,
1592
+ 0xB7BC: 1560,
1593
+ 0xB861: 1561,
1594
+ 0xB862: 1562,
1595
+ 0xB865: 1563,
1596
+ 0xB867: 1564,
1597
+ 0xB868: 1565,
1598
+ 0xB869: 1566,
1599
+ 0xB86B: 1567,
1600
+ 0xB871: 1568,
1601
+ 0xB873: 1569,
1602
+ 0xB875: 1570,
1603
+ 0xB876: 1571,
1604
+ 0xB877: 1572,
1605
+ 0xB878: 1573,
1606
+ 0xB881: 1574,
1607
+ 0xB882: 1575,
1608
+ 0xB885: 1576,
1609
+ 0xB889: 1577,
1610
+ 0xB891: 1578,
1611
+ 0xB893: 1579,
1612
+ 0xB895: 1580,
1613
+ 0xB896: 1581,
1614
+ 0xB897: 1582,
1615
+ 0xB8A1: 1583,
1616
+ 0xB8A2: 1584,
1617
+ 0xB8A5: 1585,
1618
+ 0xB8A7: 1586,
1619
+ 0xB8A9: 1587,
1620
+ 0xB8B1: 1588,
1621
+ 0xB8B7: 1589,
1622
+ 0xB8C1: 1590,
1623
+ 0xB8C5: 1591,
1624
+ 0xB8C9: 1592,
1625
+ 0xB8E1: 1593,
1626
+ 0xB8E2: 1594,
1627
+ 0xB8E5: 1595,
1628
+ 0xB8E9: 1596,
1629
+ 0xB8EB: 1597,
1630
+ 0xB8F1: 1598,
1631
+ 0xB8F3: 1599,
1632
+ 0xB8F5: 1600,
1633
+ 0xB8F7: 1601,
1634
+ 0xB8F8: 1602,
1635
+ 0xB941: 1603,
1636
+ 0xB942: 1604,
1637
+ 0xB945: 1605,
1638
+ 0xB949: 1606,
1639
+ 0xB951: 1607,
1640
+ 0xB953: 1608,
1641
+ 0xB955: 1609,
1642
+ 0xB957: 1610,
1643
+ 0xB961: 1611,
1644
+ 0xB965: 1612,
1645
+ 0xB969: 1613,
1646
+ 0xB971: 1614,
1647
+ 0xB973: 1615,
1648
+ 0xB976: 1616,
1649
+ 0xB977: 1617,
1650
+ 0xB981: 1618,
1651
+ 0xB9A1: 1619,
1652
+ 0xB9A2: 1620,
1653
+ 0xB9A5: 1621,
1654
+ 0xB9A9: 1622,
1655
+ 0xB9AB: 1623,
1656
+ 0xB9B1: 1624,
1657
+ 0xB9B3: 1625,
1658
+ 0xB9B5: 1626,
1659
+ 0xB9B7: 1627,
1660
+ 0xB9B8: 1628,
1661
+ 0xB9B9: 1629,
1662
+ 0xB9BD: 1630,
1663
+ 0xB9C1: 1631,
1664
+ 0xB9C2: 1632,
1665
+ 0xB9C9: 1633,
1666
+ 0xB9D3: 1634,
1667
+ 0xB9D5: 1635,
1668
+ 0xB9D7: 1636,
1669
+ 0xB9E1: 1637,
1670
+ 0xB9F6: 1638,
1671
+ 0xB9F7: 1639,
1672
+ 0xBA41: 1640,
1673
+ 0xBA45: 1641,
1674
+ 0xBA49: 1642,
1675
+ 0xBA51: 1643,
1676
+ 0xBA53: 1644,
1677
+ 0xBA55: 1645,
1678
+ 0xBA57: 1646,
1679
+ 0xBA61: 1647,
1680
+ 0xBA62: 1648,
1681
+ 0xBA65: 1649,
1682
+ 0xBA77: 1650,
1683
+ 0xBA81: 1651,
1684
+ 0xBA82: 1652,
1685
+ 0xBA85: 1653,
1686
+ 0xBA89: 1654,
1687
+ 0xBA8A: 1655,
1688
+ 0xBA8B: 1656,
1689
+ 0xBA91: 1657,
1690
+ 0xBA93: 1658,
1691
+ 0xBA95: 1659,
1692
+ 0xBA97: 1660,
1693
+ 0xBAA1: 1661,
1694
+ 0xBAB6: 1662,
1695
+ 0xBAC1: 1663,
1696
+ 0xBAE1: 1664,
1697
+ 0xBAE2: 1665,
1698
+ 0xBAE5: 1666,
1699
+ 0xBAE9: 1667,
1700
+ 0xBAF1: 1668,
1701
+ 0xBAF3: 1669,
1702
+ 0xBAF5: 1670,
1703
+ 0xBB41: 1671,
1704
+ 0xBB45: 1672,
1705
+ 0xBB49: 1673,
1706
+ 0xBB51: 1674,
1707
+ 0xBB61: 1675,
1708
+ 0xBB62: 1676,
1709
+ 0xBB65: 1677,
1710
+ 0xBB69: 1678,
1711
+ 0xBB71: 1679,
1712
+ 0xBB73: 1680,
1713
+ 0xBB75: 1681,
1714
+ 0xBB77: 1682,
1715
+ 0xBBA1: 1683,
1716
+ 0xBBA2: 1684,
1717
+ 0xBBA5: 1685,
1718
+ 0xBBA8: 1686,
1719
+ 0xBBA9: 1687,
1720
+ 0xBBAB: 1688,
1721
+ 0xBBB1: 1689,
1722
+ 0xBBB3: 1690,
1723
+ 0xBBB5: 1691,
1724
+ 0xBBB7: 1692,
1725
+ 0xBBB8: 1693,
1726
+ 0xBBBB: 1694,
1727
+ 0xBBBC: 1695,
1728
+ 0xBC61: 1696,
1729
+ 0xBC62: 1697,
1730
+ 0xBC65: 1698,
1731
+ 0xBC67: 1699,
1732
+ 0xBC69: 1700,
1733
+ 0xBC6C: 1701,
1734
+ 0xBC71: 1702,
1735
+ 0xBC73: 1703,
1736
+ 0xBC75: 1704,
1737
+ 0xBC76: 1705,
1738
+ 0xBC77: 1706,
1739
+ 0xBC81: 1707,
1740
+ 0xBC82: 1708,
1741
+ 0xBC85: 1709,
1742
+ 0xBC89: 1710,
1743
+ 0xBC91: 1711,
1744
+ 0xBC93: 1712,
1745
+ 0xBC95: 1713,
1746
+ 0xBC96: 1714,
1747
+ 0xBC97: 1715,
1748
+ 0xBCA1: 1716,
1749
+ 0xBCA5: 1717,
1750
+ 0xBCB7: 1718,
1751
+ 0xBCE1: 1719,
1752
+ 0xBCE2: 1720,
1753
+ 0xBCE5: 1721,
1754
+ 0xBCE9: 1722,
1755
+ 0xBCF1: 1723,
1756
+ 0xBCF3: 1724,
1757
+ 0xBCF5: 1725,
1758
+ 0xBCF6: 1726,
1759
+ 0xBCF7: 1727,
1760
+ 0xBD41: 1728,
1761
+ 0xBD57: 1729,
1762
+ 0xBD61: 1730,
1763
+ 0xBD76: 1731,
1764
+ 0xBDA1: 1732,
1765
+ 0xBDA2: 1733,
1766
+ 0xBDA5: 1734,
1767
+ 0xBDA9: 1735,
1768
+ 0xBDB1: 1736,
1769
+ 0xBDB3: 1737,
1770
+ 0xBDB5: 1738,
1771
+ 0xBDB7: 1739,
1772
+ 0xBDB9: 1740,
1773
+ 0xBDC1: 1741,
1774
+ 0xBDC2: 1742,
1775
+ 0xBDC9: 1743,
1776
+ 0xBDD6: 1744,
1777
+ 0xBDE1: 1745,
1778
+ 0xBDF6: 1746,
1779
+ 0xBE41: 1747,
1780
+ 0xBE45: 1748,
1781
+ 0xBE49: 1749,
1782
+ 0xBE51: 1750,
1783
+ 0xBE53: 1751,
1784
+ 0xBE77: 1752,
1785
+ 0xBE81: 1753,
1786
+ 0xBE82: 1754,
1787
+ 0xBE85: 1755,
1788
+ 0xBE89: 1756,
1789
+ 0xBE91: 1757,
1790
+ 0xBE93: 1758,
1791
+ 0xBE97: 1759,
1792
+ 0xBEA1: 1760,
1793
+ 0xBEB6: 1761,
1794
+ 0xBEB7: 1762,
1795
+ 0xBEE1: 1763,
1796
+ 0xBF41: 1764,
1797
+ 0xBF61: 1765,
1798
+ 0xBF71: 1766,
1799
+ 0xBF75: 1767,
1800
+ 0xBF77: 1768,
1801
+ 0xBFA1: 1769,
1802
+ 0xBFA2: 1770,
1803
+ 0xBFA5: 1771,
1804
+ 0xBFA9: 1772,
1805
+ 0xBFB1: 1773,
1806
+ 0xBFB3: 1774,
1807
+ 0xBFB7: 1775,
1808
+ 0xBFB8: 1776,
1809
+ 0xBFBD: 1777,
1810
+ 0xC061: 1778,
1811
+ 0xC062: 1779,
1812
+ 0xC065: 1780,
1813
+ 0xC067: 1781,
1814
+ 0xC069: 1782,
1815
+ 0xC071: 1783,
1816
+ 0xC073: 1784,
1817
+ 0xC075: 1785,
1818
+ 0xC076: 1786,
1819
+ 0xC077: 1787,
1820
+ 0xC078: 1788,
1821
+ 0xC081: 1789,
1822
+ 0xC082: 1790,
1823
+ 0xC085: 1791,
1824
+ 0xC089: 1792,
1825
+ 0xC091: 1793,
1826
+ 0xC093: 1794,
1827
+ 0xC095: 1795,
1828
+ 0xC096: 1796,
1829
+ 0xC097: 1797,
1830
+ 0xC0A1: 1798,
1831
+ 0xC0A5: 1799,
1832
+ 0xC0A7: 1800,
1833
+ 0xC0A9: 1801,
1834
+ 0xC0B1: 1802,
1835
+ 0xC0B7: 1803,
1836
+ 0xC0E1: 1804,
1837
+ 0xC0E2: 1805,
1838
+ 0xC0E5: 1806,
1839
+ 0xC0E9: 1807,
1840
+ 0xC0F1: 1808,
1841
+ 0xC0F3: 1809,
1842
+ 0xC0F5: 1810,
1843
+ 0xC0F6: 1811,
1844
+ 0xC0F7: 1812,
1845
+ 0xC141: 1813,
1846
+ 0xC142: 1814,
1847
+ 0xC145: 1815,
1848
+ 0xC149: 1816,
1849
+ 0xC151: 1817,
1850
+ 0xC153: 1818,
1851
+ 0xC155: 1819,
1852
+ 0xC157: 1820,
1853
+ 0xC161: 1821,
1854
+ 0xC165: 1822,
1855
+ 0xC176: 1823,
1856
+ 0xC181: 1824,
1857
+ 0xC185: 1825,
1858
+ 0xC197: 1826,
1859
+ 0xC1A1: 1827,
1860
+ 0xC1A2: 1828,
1861
+ 0xC1A5: 1829,
1862
+ 0xC1A9: 1830,
1863
+ 0xC1B1: 1831,
1864
+ 0xC1B3: 1832,
1865
+ 0xC1B5: 1833,
1866
+ 0xC1B7: 1834,
1867
+ 0xC1C1: 1835,
1868
+ 0xC1C5: 1836,
1869
+ 0xC1C9: 1837,
1870
+ 0xC1D7: 1838,
1871
+ 0xC241: 1839,
1872
+ 0xC245: 1840,
1873
+ 0xC249: 1841,
1874
+ 0xC251: 1842,
1875
+ 0xC253: 1843,
1876
+ 0xC255: 1844,
1877
+ 0xC257: 1845,
1878
+ 0xC261: 1846,
1879
+ 0xC271: 1847,
1880
+ 0xC281: 1848,
1881
+ 0xC282: 1849,
1882
+ 0xC285: 1850,
1883
+ 0xC289: 1851,
1884
+ 0xC291: 1852,
1885
+ 0xC293: 1853,
1886
+ 0xC295: 1854,
1887
+ 0xC297: 1855,
1888
+ 0xC2A1: 1856,
1889
+ 0xC2B6: 1857,
1890
+ 0xC2C1: 1858,
1891
+ 0xC2C5: 1859,
1892
+ 0xC2E1: 1860,
1893
+ 0xC2E5: 1861,
1894
+ 0xC2E9: 1862,
1895
+ 0xC2F1: 1863,
1896
+ 0xC2F3: 1864,
1897
+ 0xC2F5: 1865,
1898
+ 0xC2F7: 1866,
1899
+ 0xC341: 1867,
1900
+ 0xC345: 1868,
1901
+ 0xC349: 1869,
1902
+ 0xC351: 1870,
1903
+ 0xC357: 1871,
1904
+ 0xC361: 1872,
1905
+ 0xC362: 1873,
1906
+ 0xC365: 1874,
1907
+ 0xC369: 1875,
1908
+ 0xC371: 1876,
1909
+ 0xC373: 1877,
1910
+ 0xC375: 1878,
1911
+ 0xC377: 1879,
1912
+ 0xC3A1: 1880,
1913
+ 0xC3A2: 1881,
1914
+ 0xC3A5: 1882,
1915
+ 0xC3A8: 1883,
1916
+ 0xC3A9: 1884,
1917
+ 0xC3AA: 1885,
1918
+ 0xC3B1: 1886,
1919
+ 0xC3B3: 1887,
1920
+ 0xC3B5: 1888,
1921
+ 0xC3B7: 1889,
1922
+ 0xC461: 1890,
1923
+ 0xC462: 1891,
1924
+ 0xC465: 1892,
1925
+ 0xC469: 1893,
1926
+ 0xC471: 1894,
1927
+ 0xC473: 1895,
1928
+ 0xC475: 1896,
1929
+ 0xC477: 1897,
1930
+ 0xC481: 1898,
1931
+ 0xC482: 1899,
1932
+ 0xC485: 1900,
1933
+ 0xC489: 1901,
1934
+ 0xC491: 1902,
1935
+ 0xC493: 1903,
1936
+ 0xC495: 1904,
1937
+ 0xC496: 1905,
1938
+ 0xC497: 1906,
1939
+ 0xC4A1: 1907,
1940
+ 0xC4A2: 1908,
1941
+ 0xC4B7: 1909,
1942
+ 0xC4E1: 1910,
1943
+ 0xC4E2: 1911,
1944
+ 0xC4E5: 1912,
1945
+ 0xC4E8: 1913,
1946
+ 0xC4E9: 1914,
1947
+ 0xC4F1: 1915,
1948
+ 0xC4F3: 1916,
1949
+ 0xC4F5: 1917,
1950
+ 0xC4F6: 1918,
1951
+ 0xC4F7: 1919,
1952
+ 0xC541: 1920,
1953
+ 0xC542: 1921,
1954
+ 0xC545: 1922,
1955
+ 0xC549: 1923,
1956
+ 0xC551: 1924,
1957
+ 0xC553: 1925,
1958
+ 0xC555: 1926,
1959
+ 0xC557: 1927,
1960
+ 0xC561: 1928,
1961
+ 0xC565: 1929,
1962
+ 0xC569: 1930,
1963
+ 0xC571: 1931,
1964
+ 0xC573: 1932,
1965
+ 0xC575: 1933,
1966
+ 0xC576: 1934,
1967
+ 0xC577: 1935,
1968
+ 0xC581: 1936,
1969
+ 0xC5A1: 1937,
1970
+ 0xC5A2: 1938,
1971
+ 0xC5A5: 1939,
1972
+ 0xC5A9: 1940,
1973
+ 0xC5B1: 1941,
1974
+ 0xC5B3: 1942,
1975
+ 0xC5B5: 1943,
1976
+ 0xC5B7: 1944,
1977
+ 0xC5C1: 1945,
1978
+ 0xC5C2: 1946,
1979
+ 0xC5C5: 1947,
1980
+ 0xC5C9: 1948,
1981
+ 0xC5D1: 1949,
1982
+ 0xC5D7: 1950,
1983
+ 0xC5E1: 1951,
1984
+ 0xC5F7: 1952,
1985
+ 0xC641: 1953,
1986
+ 0xC649: 1954,
1987
+ 0xC661: 1955,
1988
+ 0xC681: 1956,
1989
+ 0xC682: 1957,
1990
+ 0xC685: 1958,
1991
+ 0xC689: 1959,
1992
+ 0xC691: 1960,
1993
+ 0xC693: 1961,
1994
+ 0xC695: 1962,
1995
+ 0xC697: 1963,
1996
+ 0xC6A1: 1964,
1997
+ 0xC6A5: 1965,
1998
+ 0xC6A9: 1966,
1999
+ 0xC6B7: 1967,
2000
+ 0xC6C1: 1968,
2001
+ 0xC6D7: 1969,
2002
+ 0xC6E1: 1970,
2003
+ 0xC6E2: 1971,
2004
+ 0xC6E5: 1972,
2005
+ 0xC6E9: 1973,
2006
+ 0xC6F1: 1974,
2007
+ 0xC6F3: 1975,
2008
+ 0xC6F5: 1976,
2009
+ 0xC6F7: 1977,
2010
+ 0xC741: 1978,
2011
+ 0xC745: 1979,
2012
+ 0xC749: 1980,
2013
+ 0xC751: 1981,
2014
+ 0xC761: 1982,
2015
+ 0xC762: 1983,
2016
+ 0xC765: 1984,
2017
+ 0xC769: 1985,
2018
+ 0xC771: 1986,
2019
+ 0xC773: 1987,
2020
+ 0xC777: 1988,
2021
+ 0xC7A1: 1989,
2022
+ 0xC7A2: 1990,
2023
+ 0xC7A5: 1991,
2024
+ 0xC7A9: 1992,
2025
+ 0xC7B1: 1993,
2026
+ 0xC7B3: 1994,
2027
+ 0xC7B5: 1995,
2028
+ 0xC7B7: 1996,
2029
+ 0xC861: 1997,
2030
+ 0xC862: 1998,
2031
+ 0xC865: 1999,
2032
+ 0xC869: 2000,
2033
+ 0xC86A: 2001,
2034
+ 0xC871: 2002,
2035
+ 0xC873: 2003,
2036
+ 0xC875: 2004,
2037
+ 0xC876: 2005,
2038
+ 0xC877: 2006,
2039
+ 0xC881: 2007,
2040
+ 0xC882: 2008,
2041
+ 0xC885: 2009,
2042
+ 0xC889: 2010,
2043
+ 0xC891: 2011,
2044
+ 0xC893: 2012,
2045
+ 0xC895: 2013,
2046
+ 0xC896: 2014,
2047
+ 0xC897: 2015,
2048
+ 0xC8A1: 2016,
2049
+ 0xC8B7: 2017,
2050
+ 0xC8E1: 2018,
2051
+ 0xC8E2: 2019,
2052
+ 0xC8E5: 2020,
2053
+ 0xC8E9: 2021,
2054
+ 0xC8EB: 2022,
2055
+ 0xC8F1: 2023,
2056
+ 0xC8F3: 2024,
2057
+ 0xC8F5: 2025,
2058
+ 0xC8F6: 2026,
2059
+ 0xC8F7: 2027,
2060
+ 0xC941: 2028,
2061
+ 0xC942: 2029,
2062
+ 0xC945: 2030,
2063
+ 0xC949: 2031,
2064
+ 0xC951: 2032,
2065
+ 0xC953: 2033,
2066
+ 0xC955: 2034,
2067
+ 0xC957: 2035,
2068
+ 0xC961: 2036,
2069
+ 0xC965: 2037,
2070
+ 0xC976: 2038,
2071
+ 0xC981: 2039,
2072
+ 0xC985: 2040,
2073
+ 0xC9A1: 2041,
2074
+ 0xC9A2: 2042,
2075
+ 0xC9A5: 2043,
2076
+ 0xC9A9: 2044,
2077
+ 0xC9B1: 2045,
2078
+ 0xC9B3: 2046,
2079
+ 0xC9B5: 2047,
2080
+ 0xC9B7: 2048,
2081
+ 0xC9BC: 2049,
2082
+ 0xC9C1: 2050,
2083
+ 0xC9C5: 2051,
2084
+ 0xC9E1: 2052,
2085
+ 0xCA41: 2053,
2086
+ 0xCA45: 2054,
2087
+ 0xCA55: 2055,
2088
+ 0xCA57: 2056,
2089
+ 0xCA61: 2057,
2090
+ 0xCA81: 2058,
2091
+ 0xCA82: 2059,
2092
+ 0xCA85: 2060,
2093
+ 0xCA89: 2061,
2094
+ 0xCA91: 2062,
2095
+ 0xCA93: 2063,
2096
+ 0xCA95: 2064,
2097
+ 0xCA97: 2065,
2098
+ 0xCAA1: 2066,
2099
+ 0xCAB6: 2067,
2100
+ 0xCAC1: 2068,
2101
+ 0xCAE1: 2069,
2102
+ 0xCAE2: 2070,
2103
+ 0xCAE5: 2071,
2104
+ 0xCAE9: 2072,
2105
+ 0xCAF1: 2073,
2106
+ 0xCAF3: 2074,
2107
+ 0xCAF7: 2075,
2108
+ 0xCB41: 2076,
2109
+ 0xCB45: 2077,
2110
+ 0xCB49: 2078,
2111
+ 0xCB51: 2079,
2112
+ 0xCB57: 2080,
2113
+ 0xCB61: 2081,
2114
+ 0xCB62: 2082,
2115
+ 0xCB65: 2083,
2116
+ 0xCB68: 2084,
2117
+ 0xCB69: 2085,
2118
+ 0xCB6B: 2086,
2119
+ 0xCB71: 2087,
2120
+ 0xCB73: 2088,
2121
+ 0xCB75: 2089,
2122
+ 0xCB81: 2090,
2123
+ 0xCB85: 2091,
2124
+ 0xCB89: 2092,
2125
+ 0xCB91: 2093,
2126
+ 0xCB93: 2094,
2127
+ 0xCBA1: 2095,
2128
+ 0xCBA2: 2096,
2129
+ 0xCBA5: 2097,
2130
+ 0xCBA9: 2098,
2131
+ 0xCBB1: 2099,
2132
+ 0xCBB3: 2100,
2133
+ 0xCBB5: 2101,
2134
+ 0xCBB7: 2102,
2135
+ 0xCC61: 2103,
2136
+ 0xCC62: 2104,
2137
+ 0xCC63: 2105,
2138
+ 0xCC65: 2106,
2139
+ 0xCC69: 2107,
2140
+ 0xCC6B: 2108,
2141
+ 0xCC71: 2109,
2142
+ 0xCC73: 2110,
2143
+ 0xCC75: 2111,
2144
+ 0xCC76: 2112,
2145
+ 0xCC77: 2113,
2146
+ 0xCC7B: 2114,
2147
+ 0xCC81: 2115,
2148
+ 0xCC82: 2116,
2149
+ 0xCC85: 2117,
2150
+ 0xCC89: 2118,
2151
+ 0xCC91: 2119,
2152
+ 0xCC93: 2120,
2153
+ 0xCC95: 2121,
2154
+ 0xCC96: 2122,
2155
+ 0xCC97: 2123,
2156
+ 0xCCA1: 2124,
2157
+ 0xCCA2: 2125,
2158
+ 0xCCE1: 2126,
2159
+ 0xCCE2: 2127,
2160
+ 0xCCE5: 2128,
2161
+ 0xCCE9: 2129,
2162
+ 0xCCF1: 2130,
2163
+ 0xCCF3: 2131,
2164
+ 0xCCF5: 2132,
2165
+ 0xCCF6: 2133,
2166
+ 0xCCF7: 2134,
2167
+ 0xCD41: 2135,
2168
+ 0xCD42: 2136,
2169
+ 0xCD45: 2137,
2170
+ 0xCD49: 2138,
2171
+ 0xCD51: 2139,
2172
+ 0xCD53: 2140,
2173
+ 0xCD55: 2141,
2174
+ 0xCD57: 2142,
2175
+ 0xCD61: 2143,
2176
+ 0xCD65: 2144,
2177
+ 0xCD69: 2145,
2178
+ 0xCD71: 2146,
2179
+ 0xCD73: 2147,
2180
+ 0xCD76: 2148,
2181
+ 0xCD77: 2149,
2182
+ 0xCD81: 2150,
2183
+ 0xCD89: 2151,
2184
+ 0xCD93: 2152,
2185
+ 0xCD95: 2153,
2186
+ 0xCDA1: 2154,
2187
+ 0xCDA2: 2155,
2188
+ 0xCDA5: 2156,
2189
+ 0xCDA9: 2157,
2190
+ 0xCDB1: 2158,
2191
+ 0xCDB3: 2159,
2192
+ 0xCDB5: 2160,
2193
+ 0xCDB7: 2161,
2194
+ 0xCDC1: 2162,
2195
+ 0xCDD7: 2163,
2196
+ 0xCE41: 2164,
2197
+ 0xCE45: 2165,
2198
+ 0xCE61: 2166,
2199
+ 0xCE65: 2167,
2200
+ 0xCE69: 2168,
2201
+ 0xCE73: 2169,
2202
+ 0xCE75: 2170,
2203
+ 0xCE81: 2171,
2204
+ 0xCE82: 2172,
2205
+ 0xCE85: 2173,
2206
+ 0xCE88: 2174,
2207
+ 0xCE89: 2175,
2208
+ 0xCE8B: 2176,
2209
+ 0xCE91: 2177,
2210
+ 0xCE93: 2178,
2211
+ 0xCE95: 2179,
2212
+ 0xCE97: 2180,
2213
+ 0xCEA1: 2181,
2214
+ 0xCEB7: 2182,
2215
+ 0xCEE1: 2183,
2216
+ 0xCEE5: 2184,
2217
+ 0xCEE9: 2185,
2218
+ 0xCEF1: 2186,
2219
+ 0xCEF5: 2187,
2220
+ 0xCF41: 2188,
2221
+ 0xCF45: 2189,
2222
+ 0xCF49: 2190,
2223
+ 0xCF51: 2191,
2224
+ 0xCF55: 2192,
2225
+ 0xCF57: 2193,
2226
+ 0xCF61: 2194,
2227
+ 0xCF65: 2195,
2228
+ 0xCF69: 2196,
2229
+ 0xCF71: 2197,
2230
+ 0xCF73: 2198,
2231
+ 0xCF75: 2199,
2232
+ 0xCFA1: 2200,
2233
+ 0xCFA2: 2201,
2234
+ 0xCFA5: 2202,
2235
+ 0xCFA9: 2203,
2236
+ 0xCFB1: 2204,
2237
+ 0xCFB3: 2205,
2238
+ 0xCFB5: 2206,
2239
+ 0xCFB7: 2207,
2240
+ 0xD061: 2208,
2241
+ 0xD062: 2209,
2242
+ 0xD065: 2210,
2243
+ 0xD069: 2211,
2244
+ 0xD06E: 2212,
2245
+ 0xD071: 2213,
2246
+ 0xD073: 2214,
2247
+ 0xD075: 2215,
2248
+ 0xD077: 2216,
2249
+ 0xD081: 2217,
2250
+ 0xD082: 2218,
2251
+ 0xD085: 2219,
2252
+ 0xD089: 2220,
2253
+ 0xD091: 2221,
2254
+ 0xD093: 2222,
2255
+ 0xD095: 2223,
2256
+ 0xD096: 2224,
2257
+ 0xD097: 2225,
2258
+ 0xD0A1: 2226,
2259
+ 0xD0B7: 2227,
2260
+ 0xD0E1: 2228,
2261
+ 0xD0E2: 2229,
2262
+ 0xD0E5: 2230,
2263
+ 0xD0E9: 2231,
2264
+ 0xD0EB: 2232,
2265
+ 0xD0F1: 2233,
2266
+ 0xD0F3: 2234,
2267
+ 0xD0F5: 2235,
2268
+ 0xD0F7: 2236,
2269
+ 0xD141: 2237,
2270
+ 0xD142: 2238,
2271
+ 0xD145: 2239,
2272
+ 0xD149: 2240,
2273
+ 0xD151: 2241,
2274
+ 0xD153: 2242,
2275
+ 0xD155: 2243,
2276
+ 0xD157: 2244,
2277
+ 0xD161: 2245,
2278
+ 0xD162: 2246,
2279
+ 0xD165: 2247,
2280
+ 0xD169: 2248,
2281
+ 0xD171: 2249,
2282
+ 0xD173: 2250,
2283
+ 0xD175: 2251,
2284
+ 0xD176: 2252,
2285
+ 0xD177: 2253,
2286
+ 0xD181: 2254,
2287
+ 0xD185: 2255,
2288
+ 0xD189: 2256,
2289
+ 0xD193: 2257,
2290
+ 0xD1A1: 2258,
2291
+ 0xD1A2: 2259,
2292
+ 0xD1A5: 2260,
2293
+ 0xD1A9: 2261,
2294
+ 0xD1AE: 2262,
2295
+ 0xD1B1: 2263,
2296
+ 0xD1B3: 2264,
2297
+ 0xD1B5: 2265,
2298
+ 0xD1B7: 2266,
2299
+ 0xD1BB: 2267,
2300
+ 0xD1C1: 2268,
2301
+ 0xD1C2: 2269,
2302
+ 0xD1C5: 2270,
2303
+ 0xD1C9: 2271,
2304
+ 0xD1D5: 2272,
2305
+ 0xD1D7: 2273,
2306
+ 0xD1E1: 2274,
2307
+ 0xD1E2: 2275,
2308
+ 0xD1E5: 2276,
2309
+ 0xD1F5: 2277,
2310
+ 0xD1F7: 2278,
2311
+ 0xD241: 2279,
2312
+ 0xD242: 2280,
2313
+ 0xD245: 2281,
2314
+ 0xD249: 2282,
2315
+ 0xD253: 2283,
2316
+ 0xD255: 2284,
2317
+ 0xD257: 2285,
2318
+ 0xD261: 2286,
2319
+ 0xD265: 2287,
2320
+ 0xD269: 2288,
2321
+ 0xD273: 2289,
2322
+ 0xD275: 2290,
2323
+ 0xD281: 2291,
2324
+ 0xD282: 2292,
2325
+ 0xD285: 2293,
2326
+ 0xD289: 2294,
2327
+ 0xD28E: 2295,
2328
+ 0xD291: 2296,
2329
+ 0xD295: 2297,
2330
+ 0xD297: 2298,
2331
+ 0xD2A1: 2299,
2332
+ 0xD2A5: 2300,
2333
+ 0xD2A9: 2301,
2334
+ 0xD2B1: 2302,
2335
+ 0xD2B7: 2303,
2336
+ 0xD2C1: 2304,
2337
+ 0xD2C2: 2305,
2338
+ 0xD2C5: 2306,
2339
+ 0xD2C9: 2307,
2340
+ 0xD2D7: 2308,
2341
+ 0xD2E1: 2309,
2342
+ 0xD2E2: 2310,
2343
+ 0xD2E5: 2311,
2344
+ 0xD2E9: 2312,
2345
+ 0xD2F1: 2313,
2346
+ 0xD2F3: 2314,
2347
+ 0xD2F5: 2315,
2348
+ 0xD2F7: 2316,
2349
+ 0xD341: 2317,
2350
+ 0xD342: 2318,
2351
+ 0xD345: 2319,
2352
+ 0xD349: 2320,
2353
+ 0xD351: 2321,
2354
+ 0xD355: 2322,
2355
+ 0xD357: 2323,
2356
+ 0xD361: 2324,
2357
+ 0xD362: 2325,
2358
+ 0xD365: 2326,
2359
+ 0xD367: 2327,
2360
+ 0xD368: 2328,
2361
+ 0xD369: 2329,
2362
+ 0xD36A: 2330,
2363
+ 0xD371: 2331,
2364
+ 0xD373: 2332,
2365
+ 0xD375: 2333,
2366
+ 0xD377: 2334,
2367
+ 0xD37B: 2335,
2368
+ 0xD381: 2336,
2369
+ 0xD385: 2337,
2370
+ 0xD389: 2338,
2371
+ 0xD391: 2339,
2372
+ 0xD393: 2340,
2373
+ 0xD397: 2341,
2374
+ 0xD3A1: 2342,
2375
+ 0xD3A2: 2343,
2376
+ 0xD3A5: 2344,
2377
+ 0xD3A9: 2345,
2378
+ 0xD3B1: 2346,
2379
+ 0xD3B3: 2347,
2380
+ 0xD3B5: 2348,
2381
+ 0xD3B7: 2349,
2382
+ }
venv/lib/python3.12/site-packages/pip/_vendor/chardet/johabprober.py ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ######################## BEGIN LICENSE BLOCK ########################
2
+ # The Original Code is mozilla.org code.
3
+ #
4
+ # The Initial Developer of the Original Code is
5
+ # Netscape Communications Corporation.
6
+ # Portions created by the Initial Developer are Copyright (C) 1998
7
+ # the Initial Developer. All Rights Reserved.
8
+ #
9
+ # Contributor(s):
10
+ # Mark Pilgrim - port to Python
11
+ #
12
+ # This library is free software; you can redistribute it and/or
13
+ # modify it under the terms of the GNU Lesser General Public
14
+ # License as published by the Free Software Foundation; either
15
+ # version 2.1 of the License, or (at your option) any later version.
16
+ #
17
+ # This library is distributed in the hope that it will be useful,
18
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
+ # Lesser General Public License for more details.
21
+ #
22
+ # You should have received a copy of the GNU Lesser General Public
23
+ # License along with this library; if not, write to the Free Software
24
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25
+ # 02110-1301 USA
26
+ ######################### END LICENSE BLOCK #########################
27
+
28
+ from .chardistribution import JOHABDistributionAnalysis
29
+ from .codingstatemachine import CodingStateMachine
30
+ from .mbcharsetprober import MultiByteCharSetProber
31
+ from .mbcssm import JOHAB_SM_MODEL
32
+
33
+
34
+ class JOHABProber(MultiByteCharSetProber):
35
+ def __init__(self) -> None:
36
+ super().__init__()
37
+ self.coding_sm = CodingStateMachine(JOHAB_SM_MODEL)
38
+ self.distribution_analyzer = JOHABDistributionAnalysis()
39
+ self.reset()
40
+
41
+ @property
42
+ def charset_name(self) -> str:
43
+ return "Johab"
44
+
45
+ @property
46
+ def language(self) -> str:
47
+ return "Korean"
venv/lib/python3.12/site-packages/pip/_vendor/chardet/langhebrewmodel.py ADDED
The diff for this file is too large to render. See raw diff
 
venv/lib/python3.12/site-packages/pip/_vendor/chardet/latin1prober.py ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ######################## BEGIN LICENSE BLOCK ########################
2
+ # The Original Code is Mozilla Universal charset detector code.
3
+ #
4
+ # The Initial Developer of the Original Code is
5
+ # Netscape Communications Corporation.
6
+ # Portions created by the Initial Developer are Copyright (C) 2001
7
+ # the Initial Developer. All Rights Reserved.
8
+ #
9
+ # Contributor(s):
10
+ # Mark Pilgrim - port to Python
11
+ # Shy Shalom - original C code
12
+ #
13
+ # This library is free software; you can redistribute it and/or
14
+ # modify it under the terms of the GNU Lesser General Public
15
+ # License as published by the Free Software Foundation; either
16
+ # version 2.1 of the License, or (at your option) any later version.
17
+ #
18
+ # This library is distributed in the hope that it will be useful,
19
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
20
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21
+ # Lesser General Public License for more details.
22
+ #
23
+ # You should have received a copy of the GNU Lesser General Public
24
+ # License along with this library; if not, write to the Free Software
25
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
26
+ # 02110-1301 USA
27
+ ######################### END LICENSE BLOCK #########################
28
+
29
+ from typing import List, Union
30
+
31
+ from .charsetprober import CharSetProber
32
+ from .enums import ProbingState
33
+
34
+ FREQ_CAT_NUM = 4
35
+
36
+ UDF = 0 # undefined
37
+ OTH = 1 # other
38
+ ASC = 2 # ascii capital letter
39
+ ASS = 3 # ascii small letter
40
+ ACV = 4 # accent capital vowel
41
+ ACO = 5 # accent capital other
42
+ ASV = 6 # accent small vowel
43
+ ASO = 7 # accent small other
44
+ CLASS_NUM = 8 # total classes
45
+
46
+ # fmt: off
47
+ Latin1_CharToClass = (
48
+ OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 00 - 07
49
+ OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 08 - 0F
50
+ OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 10 - 17
51
+ OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 18 - 1F
52
+ OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 20 - 27
53
+ OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 28 - 2F
54
+ OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 30 - 37
55
+ OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 38 - 3F
56
+ OTH, ASC, ASC, ASC, ASC, ASC, ASC, ASC, # 40 - 47
57
+ ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC, # 48 - 4F
58
+ ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC, # 50 - 57
59
+ ASC, ASC, ASC, OTH, OTH, OTH, OTH, OTH, # 58 - 5F
60
+ OTH, ASS, ASS, ASS, ASS, ASS, ASS, ASS, # 60 - 67
61
+ ASS, ASS, ASS, ASS, ASS, ASS, ASS, ASS, # 68 - 6F
62
+ ASS, ASS, ASS, ASS, ASS, ASS, ASS, ASS, # 70 - 77
63
+ ASS, ASS, ASS, OTH, OTH, OTH, OTH, OTH, # 78 - 7F
64
+ OTH, UDF, OTH, ASO, OTH, OTH, OTH, OTH, # 80 - 87
65
+ OTH, OTH, ACO, OTH, ACO, UDF, ACO, UDF, # 88 - 8F
66
+ UDF, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 90 - 97
67
+ OTH, OTH, ASO, OTH, ASO, UDF, ASO, ACO, # 98 - 9F
68
+ OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # A0 - A7
69
+ OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # A8 - AF
70
+ OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # B0 - B7
71
+ OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # B8 - BF
72
+ ACV, ACV, ACV, ACV, ACV, ACV, ACO, ACO, # C0 - C7
73
+ ACV, ACV, ACV, ACV, ACV, ACV, ACV, ACV, # C8 - CF
74
+ ACO, ACO, ACV, ACV, ACV, ACV, ACV, OTH, # D0 - D7
75
+ ACV, ACV, ACV, ACV, ACV, ACO, ACO, ACO, # D8 - DF
76
+ ASV, ASV, ASV, ASV, ASV, ASV, ASO, ASO, # E0 - E7
77
+ ASV, ASV, ASV, ASV, ASV, ASV, ASV, ASV, # E8 - EF
78
+ ASO, ASO, ASV, ASV, ASV, ASV, ASV, OTH, # F0 - F7
79
+ ASV, ASV, ASV, ASV, ASV, ASO, ASO, ASO, # F8 - FF
80
+ )
81
+
82
+ # 0 : illegal
83
+ # 1 : very unlikely
84
+ # 2 : normal
85
+ # 3 : very likely
86
+ Latin1ClassModel = (
87
+ # UDF OTH ASC ASS ACV ACO ASV ASO
88
+ 0, 0, 0, 0, 0, 0, 0, 0, # UDF
89
+ 0, 3, 3, 3, 3, 3, 3, 3, # OTH
90
+ 0, 3, 3, 3, 3, 3, 3, 3, # ASC
91
+ 0, 3, 3, 3, 1, 1, 3, 3, # ASS
92
+ 0, 3, 3, 3, 1, 2, 1, 2, # ACV
93
+ 0, 3, 3, 3, 3, 3, 3, 3, # ACO
94
+ 0, 3, 1, 3, 1, 1, 1, 3, # ASV
95
+ 0, 3, 1, 3, 1, 1, 3, 3, # ASO
96
+ )
97
+ # fmt: on
98
+
99
+
100
+ class Latin1Prober(CharSetProber):
101
+ def __init__(self) -> None:
102
+ super().__init__()
103
+ self._last_char_class = OTH
104
+ self._freq_counter: List[int] = []
105
+ self.reset()
106
+
107
+ def reset(self) -> None:
108
+ self._last_char_class = OTH
109
+ self._freq_counter = [0] * FREQ_CAT_NUM
110
+ super().reset()
111
+
112
+ @property
113
+ def charset_name(self) -> str:
114
+ return "ISO-8859-1"
115
+
116
+ @property
117
+ def language(self) -> str:
118
+ return ""
119
+
120
+ def feed(self, byte_str: Union[bytes, bytearray]) -> ProbingState:
121
+ byte_str = self.remove_xml_tags(byte_str)
122
+ for c in byte_str:
123
+ char_class = Latin1_CharToClass[c]
124
+ freq = Latin1ClassModel[(self._last_char_class * CLASS_NUM) + char_class]
125
+ if freq == 0:
126
+ self._state = ProbingState.NOT_ME
127
+ break
128
+ self._freq_counter[freq] += 1
129
+ self._last_char_class = char_class
130
+
131
+ return self.state
132
+
133
+ def get_confidence(self) -> float:
134
+ if self.state == ProbingState.NOT_ME:
135
+ return 0.01
136
+
137
+ total = sum(self._freq_counter)
138
+ confidence = (
139
+ 0.0
140
+ if total < 0.01
141
+ else (self._freq_counter[3] - self._freq_counter[1] * 20.0) / total
142
+ )
143
+ confidence = max(confidence, 0.0)
144
+ # lower the confidence of latin1 so that other more accurate
145
+ # detector can take priority.
146
+ confidence *= 0.73
147
+ return confidence
venv/lib/python3.12/site-packages/pip/_vendor/chardet/macromanprober.py ADDED
@@ -0,0 +1,162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ######################## BEGIN LICENSE BLOCK ########################
2
+ # This code was modified from latin1prober.py by Rob Speer <rob@lumino.so>.
3
+ # The Original Code is Mozilla Universal charset detector code.
4
+ #
5
+ # The Initial Developer of the Original Code is
6
+ # Netscape Communications Corporation.
7
+ # Portions created by the Initial Developer are Copyright (C) 2001
8
+ # the Initial Developer. All Rights Reserved.
9
+ #
10
+ # Contributor(s):
11
+ # Rob Speer - adapt to MacRoman encoding
12
+ # Mark Pilgrim - port to Python
13
+ # Shy Shalom - original C code
14
+ #
15
+ # This library is free software; you can redistribute it and/or
16
+ # modify it under the terms of the GNU Lesser General Public
17
+ # License as published by the Free Software Foundation; either
18
+ # version 2.1 of the License, or (at your option) any later version.
19
+ #
20
+ # This library is distributed in the hope that it will be useful,
21
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
22
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23
+ # Lesser General Public License for more details.
24
+ #
25
+ # You should have received a copy of the GNU Lesser General Public
26
+ # License along with this library; if not, write to the Free Software
27
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
28
+ # 02110-1301 USA
29
+ ######################### END LICENSE BLOCK #########################
30
+
31
+ from typing import List, Union
32
+
33
+ from .charsetprober import CharSetProber
34
+ from .enums import ProbingState
35
+
36
+ FREQ_CAT_NUM = 4
37
+
38
+ UDF = 0 # undefined
39
+ OTH = 1 # other
40
+ ASC = 2 # ascii capital letter
41
+ ASS = 3 # ascii small letter
42
+ ACV = 4 # accent capital vowel
43
+ ACO = 5 # accent capital other
44
+ ASV = 6 # accent small vowel
45
+ ASO = 7 # accent small other
46
+ ODD = 8 # character that is unlikely to appear
47
+ CLASS_NUM = 9 # total classes
48
+
49
+ # The change from Latin1 is that we explicitly look for extended characters
50
+ # that are infrequently-occurring symbols, and consider them to always be
51
+ # improbable. This should let MacRoman get out of the way of more likely
52
+ # encodings in most situations.
53
+
54
+ # fmt: off
55
+ MacRoman_CharToClass = (
56
+ OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 00 - 07
57
+ OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 08 - 0F
58
+ OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 10 - 17
59
+ OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 18 - 1F
60
+ OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 20 - 27
61
+ OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 28 - 2F
62
+ OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 30 - 37
63
+ OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # 38 - 3F
64
+ OTH, ASC, ASC, ASC, ASC, ASC, ASC, ASC, # 40 - 47
65
+ ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC, # 48 - 4F
66
+ ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC, # 50 - 57
67
+ ASC, ASC, ASC, OTH, OTH, OTH, OTH, OTH, # 58 - 5F
68
+ OTH, ASS, ASS, ASS, ASS, ASS, ASS, ASS, # 60 - 67
69
+ ASS, ASS, ASS, ASS, ASS, ASS, ASS, ASS, # 68 - 6F
70
+ ASS, ASS, ASS, ASS, ASS, ASS, ASS, ASS, # 70 - 77
71
+ ASS, ASS, ASS, OTH, OTH, OTH, OTH, OTH, # 78 - 7F
72
+ ACV, ACV, ACO, ACV, ACO, ACV, ACV, ASV, # 80 - 87
73
+ ASV, ASV, ASV, ASV, ASV, ASO, ASV, ASV, # 88 - 8F
74
+ ASV, ASV, ASV, ASV, ASV, ASV, ASO, ASV, # 90 - 97
75
+ ASV, ASV, ASV, ASV, ASV, ASV, ASV, ASV, # 98 - 9F
76
+ OTH, OTH, OTH, OTH, OTH, OTH, OTH, ASO, # A0 - A7
77
+ OTH, OTH, ODD, ODD, OTH, OTH, ACV, ACV, # A8 - AF
78
+ OTH, OTH, OTH, OTH, OTH, OTH, OTH, OTH, # B0 - B7
79
+ OTH, OTH, OTH, OTH, OTH, OTH, ASV, ASV, # B8 - BF
80
+ OTH, OTH, ODD, OTH, ODD, OTH, OTH, OTH, # C0 - C7
81
+ OTH, OTH, OTH, ACV, ACV, ACV, ACV, ASV, # C8 - CF
82
+ OTH, OTH, OTH, OTH, OTH, OTH, OTH, ODD, # D0 - D7
83
+ ASV, ACV, ODD, OTH, OTH, OTH, OTH, OTH, # D8 - DF
84
+ OTH, OTH, OTH, OTH, OTH, ACV, ACV, ACV, # E0 - E7
85
+ ACV, ACV, ACV, ACV, ACV, ACV, ACV, ACV, # E8 - EF
86
+ ODD, ACV, ACV, ACV, ACV, ASV, ODD, ODD, # F0 - F7
87
+ ODD, ODD, ODD, ODD, ODD, ODD, ODD, ODD, # F8 - FF
88
+ )
89
+
90
+ # 0 : illegal
91
+ # 1 : very unlikely
92
+ # 2 : normal
93
+ # 3 : very likely
94
+ MacRomanClassModel = (
95
+ # UDF OTH ASC ASS ACV ACO ASV ASO ODD
96
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, # UDF
97
+ 0, 3, 3, 3, 3, 3, 3, 3, 1, # OTH
98
+ 0, 3, 3, 3, 3, 3, 3, 3, 1, # ASC
99
+ 0, 3, 3, 3, 1, 1, 3, 3, 1, # ASS
100
+ 0, 3, 3, 3, 1, 2, 1, 2, 1, # ACV
101
+ 0, 3, 3, 3, 3, 3, 3, 3, 1, # ACO
102
+ 0, 3, 1, 3, 1, 1, 1, 3, 1, # ASV
103
+ 0, 3, 1, 3, 1, 1, 3, 3, 1, # ASO
104
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, # ODD
105
+ )
106
+ # fmt: on
107
+
108
+
109
+ class MacRomanProber(CharSetProber):
110
+ def __init__(self) -> None:
111
+ super().__init__()
112
+ self._last_char_class = OTH
113
+ self._freq_counter: List[int] = []
114
+ self.reset()
115
+
116
+ def reset(self) -> None:
117
+ self._last_char_class = OTH
118
+ self._freq_counter = [0] * FREQ_CAT_NUM
119
+
120
+ # express the prior that MacRoman is a somewhat rare encoding;
121
+ # this can be done by starting out in a slightly improbable state
122
+ # that must be overcome
123
+ self._freq_counter[2] = 10
124
+
125
+ super().reset()
126
+
127
+ @property
128
+ def charset_name(self) -> str:
129
+ return "MacRoman"
130
+
131
+ @property
132
+ def language(self) -> str:
133
+ return ""
134
+
135
+ def feed(self, byte_str: Union[bytes, bytearray]) -> ProbingState:
136
+ byte_str = self.remove_xml_tags(byte_str)
137
+ for c in byte_str:
138
+ char_class = MacRoman_CharToClass[c]
139
+ freq = MacRomanClassModel[(self._last_char_class * CLASS_NUM) + char_class]
140
+ if freq == 0:
141
+ self._state = ProbingState.NOT_ME
142
+ break
143
+ self._freq_counter[freq] += 1
144
+ self._last_char_class = char_class
145
+
146
+ return self.state
147
+
148
+ def get_confidence(self) -> float:
149
+ if self.state == ProbingState.NOT_ME:
150
+ return 0.01
151
+
152
+ total = sum(self._freq_counter)
153
+ confidence = (
154
+ 0.0
155
+ if total < 0.01
156
+ else (self._freq_counter[3] - self._freq_counter[1] * 20.0) / total
157
+ )
158
+ confidence = max(confidence, 0.0)
159
+ # lower the confidence of MacRoman so that other more accurate
160
+ # detector can take priority.
161
+ confidence *= 0.73
162
+ return confidence
venv/lib/python3.12/site-packages/pip/_vendor/chardet/mbcharsetprober.py ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ######################## BEGIN LICENSE BLOCK ########################
2
+ # The Original Code is Mozilla Universal charset detector code.
3
+ #
4
+ # The Initial Developer of the Original Code is
5
+ # Netscape Communications Corporation.
6
+ # Portions created by the Initial Developer are Copyright (C) 2001
7
+ # the Initial Developer. All Rights Reserved.
8
+ #
9
+ # Contributor(s):
10
+ # Mark Pilgrim - port to Python
11
+ # Shy Shalom - original C code
12
+ # Proofpoint, Inc.
13
+ #
14
+ # This library is free software; you can redistribute it and/or
15
+ # modify it under the terms of the GNU Lesser General Public
16
+ # License as published by the Free Software Foundation; either
17
+ # version 2.1 of the License, or (at your option) any later version.
18
+ #
19
+ # This library is distributed in the hope that it will be useful,
20
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
21
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22
+ # Lesser General Public License for more details.
23
+ #
24
+ # You should have received a copy of the GNU Lesser General Public
25
+ # License along with this library; if not, write to the Free Software
26
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
27
+ # 02110-1301 USA
28
+ ######################### END LICENSE BLOCK #########################
29
+
30
+ from typing import Optional, Union
31
+
32
+ from .chardistribution import CharDistributionAnalysis
33
+ from .charsetprober import CharSetProber
34
+ from .codingstatemachine import CodingStateMachine
35
+ from .enums import LanguageFilter, MachineState, ProbingState
36
+
37
+
38
+ class MultiByteCharSetProber(CharSetProber):
39
+ """
40
+ MultiByteCharSetProber
41
+ """
42
+
43
+ def __init__(self, lang_filter: LanguageFilter = LanguageFilter.NONE) -> None:
44
+ super().__init__(lang_filter=lang_filter)
45
+ self.distribution_analyzer: Optional[CharDistributionAnalysis] = None
46
+ self.coding_sm: Optional[CodingStateMachine] = None
47
+ self._last_char = bytearray(b"\0\0")
48
+
49
+ def reset(self) -> None:
50
+ super().reset()
51
+ if self.coding_sm:
52
+ self.coding_sm.reset()
53
+ if self.distribution_analyzer:
54
+ self.distribution_analyzer.reset()
55
+ self._last_char = bytearray(b"\0\0")
56
+
57
+ def feed(self, byte_str: Union[bytes, bytearray]) -> ProbingState:
58
+ assert self.coding_sm is not None
59
+ assert self.distribution_analyzer is not None
60
+
61
+ for i, byte in enumerate(byte_str):
62
+ coding_state = self.coding_sm.next_state(byte)
63
+ if coding_state == MachineState.ERROR:
64
+ self.logger.debug(
65
+ "%s %s prober hit error at byte %s",
66
+ self.charset_name,
67
+ self.language,
68
+ i,
69
+ )
70
+ self._state = ProbingState.NOT_ME
71
+ break
72
+ if coding_state == MachineState.ITS_ME:
73
+ self._state = ProbingState.FOUND_IT
74
+ break
75
+ if coding_state == MachineState.START:
76
+ char_len = self.coding_sm.get_current_charlen()
77
+ if i == 0:
78
+ self._last_char[1] = byte
79
+ self.distribution_analyzer.feed(self._last_char, char_len)
80
+ else:
81
+ self.distribution_analyzer.feed(byte_str[i - 1 : i + 1], char_len)
82
+
83
+ self._last_char[0] = byte_str[-1]
84
+
85
+ if self.state == ProbingState.DETECTING:
86
+ if self.distribution_analyzer.got_enough_data() and (
87
+ self.get_confidence() > self.SHORTCUT_THRESHOLD
88
+ ):
89
+ self._state = ProbingState.FOUND_IT
90
+
91
+ return self.state
92
+
93
+ def get_confidence(self) -> float:
94
+ assert self.distribution_analyzer is not None
95
+ return self.distribution_analyzer.get_confidence()
venv/lib/python3.12/site-packages/pip/_vendor/chardet/sbcsgroupprober.py ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ######################## BEGIN LICENSE BLOCK ########################
2
+ # The Original Code is Mozilla Universal charset detector code.
3
+ #
4
+ # The Initial Developer of the Original Code is
5
+ # Netscape Communications Corporation.
6
+ # Portions created by the Initial Developer are Copyright (C) 2001
7
+ # the Initial Developer. All Rights Reserved.
8
+ #
9
+ # Contributor(s):
10
+ # Mark Pilgrim - port to Python
11
+ # Shy Shalom - original C code
12
+ #
13
+ # This library is free software; you can redistribute it and/or
14
+ # modify it under the terms of the GNU Lesser General Public
15
+ # License as published by the Free Software Foundation; either
16
+ # version 2.1 of the License, or (at your option) any later version.
17
+ #
18
+ # This library is distributed in the hope that it will be useful,
19
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
20
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21
+ # Lesser General Public License for more details.
22
+ #
23
+ # You should have received a copy of the GNU Lesser General Public
24
+ # License along with this library; if not, write to the Free Software
25
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
26
+ # 02110-1301 USA
27
+ ######################### END LICENSE BLOCK #########################
28
+
29
+ from .charsetgroupprober import CharSetGroupProber
30
+ from .hebrewprober import HebrewProber
31
+ from .langbulgarianmodel import ISO_8859_5_BULGARIAN_MODEL, WINDOWS_1251_BULGARIAN_MODEL
32
+ from .langgreekmodel import ISO_8859_7_GREEK_MODEL, WINDOWS_1253_GREEK_MODEL
33
+ from .langhebrewmodel import WINDOWS_1255_HEBREW_MODEL
34
+
35
+ # from .langhungarianmodel import (ISO_8859_2_HUNGARIAN_MODEL,
36
+ # WINDOWS_1250_HUNGARIAN_MODEL)
37
+ from .langrussianmodel import (
38
+ IBM855_RUSSIAN_MODEL,
39
+ IBM866_RUSSIAN_MODEL,
40
+ ISO_8859_5_RUSSIAN_MODEL,
41
+ KOI8_R_RUSSIAN_MODEL,
42
+ MACCYRILLIC_RUSSIAN_MODEL,
43
+ WINDOWS_1251_RUSSIAN_MODEL,
44
+ )
45
+ from .langthaimodel import TIS_620_THAI_MODEL
46
+ from .langturkishmodel import ISO_8859_9_TURKISH_MODEL
47
+ from .sbcharsetprober import SingleByteCharSetProber
48
+
49
+
50
+ class SBCSGroupProber(CharSetGroupProber):
51
+ def __init__(self) -> None:
52
+ super().__init__()
53
+ hebrew_prober = HebrewProber()
54
+ logical_hebrew_prober = SingleByteCharSetProber(
55
+ WINDOWS_1255_HEBREW_MODEL, is_reversed=False, name_prober=hebrew_prober
56
+ )
57
+ # TODO: See if using ISO-8859-8 Hebrew model works better here, since
58
+ # it's actually the visual one
59
+ visual_hebrew_prober = SingleByteCharSetProber(
60
+ WINDOWS_1255_HEBREW_MODEL, is_reversed=True, name_prober=hebrew_prober
61
+ )
62
+ hebrew_prober.set_model_probers(logical_hebrew_prober, visual_hebrew_prober)
63
+ # TODO: ORDER MATTERS HERE. I changed the order vs what was in master
64
+ # and several tests failed that did not before. Some thought
65
+ # should be put into the ordering, and we should consider making
66
+ # order not matter here, because that is very counter-intuitive.
67
+ self.probers = [
68
+ SingleByteCharSetProber(WINDOWS_1251_RUSSIAN_MODEL),
69
+ SingleByteCharSetProber(KOI8_R_RUSSIAN_MODEL),
70
+ SingleByteCharSetProber(ISO_8859_5_RUSSIAN_MODEL),
71
+ SingleByteCharSetProber(MACCYRILLIC_RUSSIAN_MODEL),
72
+ SingleByteCharSetProber(IBM866_RUSSIAN_MODEL),
73
+ SingleByteCharSetProber(IBM855_RUSSIAN_MODEL),
74
+ SingleByteCharSetProber(ISO_8859_7_GREEK_MODEL),
75
+ SingleByteCharSetProber(WINDOWS_1253_GREEK_MODEL),
76
+ SingleByteCharSetProber(ISO_8859_5_BULGARIAN_MODEL),
77
+ SingleByteCharSetProber(WINDOWS_1251_BULGARIAN_MODEL),
78
+ # TODO: Restore Hungarian encodings (iso-8859-2 and windows-1250)
79
+ # after we retrain model.
80
+ # SingleByteCharSetProber(ISO_8859_2_HUNGARIAN_MODEL),
81
+ # SingleByteCharSetProber(WINDOWS_1250_HUNGARIAN_MODEL),
82
+ SingleByteCharSetProber(TIS_620_THAI_MODEL),
83
+ SingleByteCharSetProber(ISO_8859_9_TURKISH_MODEL),
84
+ hebrew_prober,
85
+ logical_hebrew_prober,
86
+ visual_hebrew_prober,
87
+ ]
88
+ self.reset()
venv/lib/python3.12/site-packages/pip/_vendor/chardet/universaldetector.py ADDED
@@ -0,0 +1,362 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ######################## BEGIN LICENSE BLOCK ########################
2
+ # The Original Code is Mozilla Universal charset detector code.
3
+ #
4
+ # The Initial Developer of the Original Code is
5
+ # Netscape Communications Corporation.
6
+ # Portions created by the Initial Developer are Copyright (C) 2001
7
+ # the Initial Developer. All Rights Reserved.
8
+ #
9
+ # Contributor(s):
10
+ # Mark Pilgrim - port to Python
11
+ # Shy Shalom - original C code
12
+ #
13
+ # This library is free software; you can redistribute it and/or
14
+ # modify it under the terms of the GNU Lesser General Public
15
+ # License as published by the Free Software Foundation; either
16
+ # version 2.1 of the License, or (at your option) any later version.
17
+ #
18
+ # This library is distributed in the hope that it will be useful,
19
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
20
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21
+ # Lesser General Public License for more details.
22
+ #
23
+ # You should have received a copy of the GNU Lesser General Public
24
+ # License along with this library; if not, write to the Free Software
25
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
26
+ # 02110-1301 USA
27
+ ######################### END LICENSE BLOCK #########################
28
+ """
29
+ Module containing the UniversalDetector detector class, which is the primary
30
+ class a user of ``chardet`` should use.
31
+
32
+ :author: Mark Pilgrim (initial port to Python)
33
+ :author: Shy Shalom (original C code)
34
+ :author: Dan Blanchard (major refactoring for 3.0)
35
+ :author: Ian Cordasco
36
+ """
37
+
38
+
39
+ import codecs
40
+ import logging
41
+ import re
42
+ from typing import List, Optional, Union
43
+
44
+ from .charsetgroupprober import CharSetGroupProber
45
+ from .charsetprober import CharSetProber
46
+ from .enums import InputState, LanguageFilter, ProbingState
47
+ from .escprober import EscCharSetProber
48
+ from .latin1prober import Latin1Prober
49
+ from .macromanprober import MacRomanProber
50
+ from .mbcsgroupprober import MBCSGroupProber
51
+ from .resultdict import ResultDict
52
+ from .sbcsgroupprober import SBCSGroupProber
53
+ from .utf1632prober import UTF1632Prober
54
+
55
+
56
+ class UniversalDetector:
57
+ """
58
+ The ``UniversalDetector`` class underlies the ``chardet.detect`` function
59
+ and coordinates all of the different charset probers.
60
+
61
+ To get a ``dict`` containing an encoding and its confidence, you can simply
62
+ run:
63
+
64
+ .. code::
65
+
66
+ u = UniversalDetector()
67
+ u.feed(some_bytes)
68
+ u.close()
69
+ detected = u.result
70
+
71
+ """
72
+
73
+ MINIMUM_THRESHOLD = 0.20
74
+ HIGH_BYTE_DETECTOR = re.compile(b"[\x80-\xFF]")
75
+ ESC_DETECTOR = re.compile(b"(\033|~{)")
76
+ WIN_BYTE_DETECTOR = re.compile(b"[\x80-\x9F]")
77
+ ISO_WIN_MAP = {
78
+ "iso-8859-1": "Windows-1252",
79
+ "iso-8859-2": "Windows-1250",
80
+ "iso-8859-5": "Windows-1251",
81
+ "iso-8859-6": "Windows-1256",
82
+ "iso-8859-7": "Windows-1253",
83
+ "iso-8859-8": "Windows-1255",
84
+ "iso-8859-9": "Windows-1254",
85
+ "iso-8859-13": "Windows-1257",
86
+ }
87
+ # Based on https://encoding.spec.whatwg.org/#names-and-labels
88
+ # but altered to match Python names for encodings and remove mappings
89
+ # that break tests.
90
+ LEGACY_MAP = {
91
+ "ascii": "Windows-1252",
92
+ "iso-8859-1": "Windows-1252",
93
+ "tis-620": "ISO-8859-11",
94
+ "iso-8859-9": "Windows-1254",
95
+ "gb2312": "GB18030",
96
+ "euc-kr": "CP949",
97
+ "utf-16le": "UTF-16",
98
+ }
99
+
100
+ def __init__(
101
+ self,
102
+ lang_filter: LanguageFilter = LanguageFilter.ALL,
103
+ should_rename_legacy: bool = False,
104
+ ) -> None:
105
+ self._esc_charset_prober: Optional[EscCharSetProber] = None
106
+ self._utf1632_prober: Optional[UTF1632Prober] = None
107
+ self._charset_probers: List[CharSetProber] = []
108
+ self.result: ResultDict = {
109
+ "encoding": None,
110
+ "confidence": 0.0,
111
+ "language": None,
112
+ }
113
+ self.done = False
114
+ self._got_data = False
115
+ self._input_state = InputState.PURE_ASCII
116
+ self._last_char = b""
117
+ self.lang_filter = lang_filter
118
+ self.logger = logging.getLogger(__name__)
119
+ self._has_win_bytes = False
120
+ self.should_rename_legacy = should_rename_legacy
121
+ self.reset()
122
+
123
+ @property
124
+ def input_state(self) -> int:
125
+ return self._input_state
126
+
127
+ @property
128
+ def has_win_bytes(self) -> bool:
129
+ return self._has_win_bytes
130
+
131
+ @property
132
+ def charset_probers(self) -> List[CharSetProber]:
133
+ return self._charset_probers
134
+
135
+ def reset(self) -> None:
136
+ """
137
+ Reset the UniversalDetector and all of its probers back to their
138
+ initial states. This is called by ``__init__``, so you only need to
139
+ call this directly in between analyses of different documents.
140
+ """
141
+ self.result = {"encoding": None, "confidence": 0.0, "language": None}
142
+ self.done = False
143
+ self._got_data = False
144
+ self._has_win_bytes = False
145
+ self._input_state = InputState.PURE_ASCII
146
+ self._last_char = b""
147
+ if self._esc_charset_prober:
148
+ self._esc_charset_prober.reset()
149
+ if self._utf1632_prober:
150
+ self._utf1632_prober.reset()
151
+ for prober in self._charset_probers:
152
+ prober.reset()
153
+
154
+ def feed(self, byte_str: Union[bytes, bytearray]) -> None:
155
+ """
156
+ Takes a chunk of a document and feeds it through all of the relevant
157
+ charset probers.
158
+
159
+ After calling ``feed``, you can check the value of the ``done``
160
+ attribute to see if you need to continue feeding the
161
+ ``UniversalDetector`` more data, or if it has made a prediction
162
+ (in the ``result`` attribute).
163
+
164
+ .. note::
165
+ You should always call ``close`` when you're done feeding in your
166
+ document if ``done`` is not already ``True``.
167
+ """
168
+ if self.done:
169
+ return
170
+
171
+ if not byte_str:
172
+ return
173
+
174
+ if not isinstance(byte_str, bytearray):
175
+ byte_str = bytearray(byte_str)
176
+
177
+ # First check for known BOMs, since these are guaranteed to be correct
178
+ if not self._got_data:
179
+ # If the data starts with BOM, we know it is UTF
180
+ if byte_str.startswith(codecs.BOM_UTF8):
181
+ # EF BB BF UTF-8 with BOM
182
+ self.result = {
183
+ "encoding": "UTF-8-SIG",
184
+ "confidence": 1.0,
185
+ "language": "",
186
+ }
187
+ elif byte_str.startswith((codecs.BOM_UTF32_LE, codecs.BOM_UTF32_BE)):
188
+ # FF FE 00 00 UTF-32, little-endian BOM
189
+ # 00 00 FE FF UTF-32, big-endian BOM
190
+ self.result = {"encoding": "UTF-32", "confidence": 1.0, "language": ""}
191
+ elif byte_str.startswith(b"\xFE\xFF\x00\x00"):
192
+ # FE FF 00 00 UCS-4, unusual octet order BOM (3412)
193
+ self.result = {
194
+ # TODO: This encoding is not supported by Python. Should remove?
195
+ "encoding": "X-ISO-10646-UCS-4-3412",
196
+ "confidence": 1.0,
197
+ "language": "",
198
+ }
199
+ elif byte_str.startswith(b"\x00\x00\xFF\xFE"):
200
+ # 00 00 FF FE UCS-4, unusual octet order BOM (2143)
201
+ self.result = {
202
+ # TODO: This encoding is not supported by Python. Should remove?
203
+ "encoding": "X-ISO-10646-UCS-4-2143",
204
+ "confidence": 1.0,
205
+ "language": "",
206
+ }
207
+ elif byte_str.startswith((codecs.BOM_LE, codecs.BOM_BE)):
208
+ # FF FE UTF-16, little endian BOM
209
+ # FE FF UTF-16, big endian BOM
210
+ self.result = {"encoding": "UTF-16", "confidence": 1.0, "language": ""}
211
+
212
+ self._got_data = True
213
+ if self.result["encoding"] is not None:
214
+ self.done = True
215
+ return
216
+
217
+ # If none of those matched and we've only see ASCII so far, check
218
+ # for high bytes and escape sequences
219
+ if self._input_state == InputState.PURE_ASCII:
220
+ if self.HIGH_BYTE_DETECTOR.search(byte_str):
221
+ self._input_state = InputState.HIGH_BYTE
222
+ elif (
223
+ self._input_state == InputState.PURE_ASCII
224
+ and self.ESC_DETECTOR.search(self._last_char + byte_str)
225
+ ):
226
+ self._input_state = InputState.ESC_ASCII
227
+
228
+ self._last_char = byte_str[-1:]
229
+
230
+ # next we will look to see if it is appears to be either a UTF-16 or
231
+ # UTF-32 encoding
232
+ if not self._utf1632_prober:
233
+ self._utf1632_prober = UTF1632Prober()
234
+
235
+ if self._utf1632_prober.state == ProbingState.DETECTING:
236
+ if self._utf1632_prober.feed(byte_str) == ProbingState.FOUND_IT:
237
+ self.result = {
238
+ "encoding": self._utf1632_prober.charset_name,
239
+ "confidence": self._utf1632_prober.get_confidence(),
240
+ "language": "",
241
+ }
242
+ self.done = True
243
+ return
244
+
245
+ # If we've seen escape sequences, use the EscCharSetProber, which
246
+ # uses a simple state machine to check for known escape sequences in
247
+ # HZ and ISO-2022 encodings, since those are the only encodings that
248
+ # use such sequences.
249
+ if self._input_state == InputState.ESC_ASCII:
250
+ if not self._esc_charset_prober:
251
+ self._esc_charset_prober = EscCharSetProber(self.lang_filter)
252
+ if self._esc_charset_prober.feed(byte_str) == ProbingState.FOUND_IT:
253
+ self.result = {
254
+ "encoding": self._esc_charset_prober.charset_name,
255
+ "confidence": self._esc_charset_prober.get_confidence(),
256
+ "language": self._esc_charset_prober.language,
257
+ }
258
+ self.done = True
259
+ # If we've seen high bytes (i.e., those with values greater than 127),
260
+ # we need to do more complicated checks using all our multi-byte and
261
+ # single-byte probers that are left. The single-byte probers
262
+ # use character bigram distributions to determine the encoding, whereas
263
+ # the multi-byte probers use a combination of character unigram and
264
+ # bigram distributions.
265
+ elif self._input_state == InputState.HIGH_BYTE:
266
+ if not self._charset_probers:
267
+ self._charset_probers = [MBCSGroupProber(self.lang_filter)]
268
+ # If we're checking non-CJK encodings, use single-byte prober
269
+ if self.lang_filter & LanguageFilter.NON_CJK:
270
+ self._charset_probers.append(SBCSGroupProber())
271
+ self._charset_probers.append(Latin1Prober())
272
+ self._charset_probers.append(MacRomanProber())
273
+ for prober in self._charset_probers:
274
+ if prober.feed(byte_str) == ProbingState.FOUND_IT:
275
+ self.result = {
276
+ "encoding": prober.charset_name,
277
+ "confidence": prober.get_confidence(),
278
+ "language": prober.language,
279
+ }
280
+ self.done = True
281
+ break
282
+ if self.WIN_BYTE_DETECTOR.search(byte_str):
283
+ self._has_win_bytes = True
284
+
285
+ def close(self) -> ResultDict:
286
+ """
287
+ Stop analyzing the current document and come up with a final
288
+ prediction.
289
+
290
+ :returns: The ``result`` attribute, a ``dict`` with the keys
291
+ `encoding`, `confidence`, and `language`.
292
+ """
293
+ # Don't bother with checks if we're already done
294
+ if self.done:
295
+ return self.result
296
+ self.done = True
297
+
298
+ if not self._got_data:
299
+ self.logger.debug("no data received!")
300
+
301
+ # Default to ASCII if it is all we've seen so far
302
+ elif self._input_state == InputState.PURE_ASCII:
303
+ self.result = {"encoding": "ascii", "confidence": 1.0, "language": ""}
304
+
305
+ # If we have seen non-ASCII, return the best that met MINIMUM_THRESHOLD
306
+ elif self._input_state == InputState.HIGH_BYTE:
307
+ prober_confidence = None
308
+ max_prober_confidence = 0.0
309
+ max_prober = None
310
+ for prober in self._charset_probers:
311
+ if not prober:
312
+ continue
313
+ prober_confidence = prober.get_confidence()
314
+ if prober_confidence > max_prober_confidence:
315
+ max_prober_confidence = prober_confidence
316
+ max_prober = prober
317
+ if max_prober and (max_prober_confidence > self.MINIMUM_THRESHOLD):
318
+ charset_name = max_prober.charset_name
319
+ assert charset_name is not None
320
+ lower_charset_name = charset_name.lower()
321
+ confidence = max_prober.get_confidence()
322
+ # Use Windows encoding name instead of ISO-8859 if we saw any
323
+ # extra Windows-specific bytes
324
+ if lower_charset_name.startswith("iso-8859"):
325
+ if self._has_win_bytes:
326
+ charset_name = self.ISO_WIN_MAP.get(
327
+ lower_charset_name, charset_name
328
+ )
329
+ # Rename legacy encodings with superset encodings if asked
330
+ if self.should_rename_legacy:
331
+ charset_name = self.LEGACY_MAP.get(
332
+ (charset_name or "").lower(), charset_name
333
+ )
334
+ self.result = {
335
+ "encoding": charset_name,
336
+ "confidence": confidence,
337
+ "language": max_prober.language,
338
+ }
339
+
340
+ # Log all prober confidences if none met MINIMUM_THRESHOLD
341
+ if self.logger.getEffectiveLevel() <= logging.DEBUG:
342
+ if self.result["encoding"] is None:
343
+ self.logger.debug("no probers hit minimum threshold")
344
+ for group_prober in self._charset_probers:
345
+ if not group_prober:
346
+ continue
347
+ if isinstance(group_prober, CharSetGroupProber):
348
+ for prober in group_prober.probers:
349
+ self.logger.debug(
350
+ "%s %s confidence = %s",
351
+ prober.charset_name,
352
+ prober.language,
353
+ prober.get_confidence(),
354
+ )
355
+ else:
356
+ self.logger.debug(
357
+ "%s %s confidence = %s",
358
+ group_prober.charset_name,
359
+ group_prober.language,
360
+ group_prober.get_confidence(),
361
+ )
362
+ return self.result
venv/lib/python3.12/site-packages/pip/_vendor/chardet/utf8prober.py ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ######################## BEGIN LICENSE BLOCK ########################
2
+ # The Original Code is mozilla.org code.
3
+ #
4
+ # The Initial Developer of the Original Code is
5
+ # Netscape Communications Corporation.
6
+ # Portions created by the Initial Developer are Copyright (C) 1998
7
+ # the Initial Developer. All Rights Reserved.
8
+ #
9
+ # Contributor(s):
10
+ # Mark Pilgrim - port to Python
11
+ #
12
+ # This library is free software; you can redistribute it and/or
13
+ # modify it under the terms of the GNU Lesser General Public
14
+ # License as published by the Free Software Foundation; either
15
+ # version 2.1 of the License, or (at your option) any later version.
16
+ #
17
+ # This library is distributed in the hope that it will be useful,
18
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
+ # Lesser General Public License for more details.
21
+ #
22
+ # You should have received a copy of the GNU Lesser General Public
23
+ # License along with this library; if not, write to the Free Software
24
+ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25
+ # 02110-1301 USA
26
+ ######################### END LICENSE BLOCK #########################
27
+
28
+ from typing import Union
29
+
30
+ from .charsetprober import CharSetProber
31
+ from .codingstatemachine import CodingStateMachine
32
+ from .enums import MachineState, ProbingState
33
+ from .mbcssm import UTF8_SM_MODEL
34
+
35
+
36
+ class UTF8Prober(CharSetProber):
37
+ ONE_CHAR_PROB = 0.5
38
+
39
+ def __init__(self) -> None:
40
+ super().__init__()
41
+ self.coding_sm = CodingStateMachine(UTF8_SM_MODEL)
42
+ self._num_mb_chars = 0
43
+ self.reset()
44
+
45
+ def reset(self) -> None:
46
+ super().reset()
47
+ self.coding_sm.reset()
48
+ self._num_mb_chars = 0
49
+
50
+ @property
51
+ def charset_name(self) -> str:
52
+ return "utf-8"
53
+
54
+ @property
55
+ def language(self) -> str:
56
+ return ""
57
+
58
+ def feed(self, byte_str: Union[bytes, bytearray]) -> ProbingState:
59
+ for c in byte_str:
60
+ coding_state = self.coding_sm.next_state(c)
61
+ if coding_state == MachineState.ERROR:
62
+ self._state = ProbingState.NOT_ME
63
+ break
64
+ if coding_state == MachineState.ITS_ME:
65
+ self._state = ProbingState.FOUND_IT
66
+ break
67
+ if coding_state == MachineState.START:
68
+ if self.coding_sm.get_current_charlen() >= 2:
69
+ self._num_mb_chars += 1
70
+
71
+ if self.state == ProbingState.DETECTING:
72
+ if self.get_confidence() > self.SHORTCUT_THRESHOLD:
73
+ self._state = ProbingState.FOUND_IT
74
+
75
+ return self.state
76
+
77
+ def get_confidence(self) -> float:
78
+ unlike = 0.99
79
+ if self._num_mb_chars < 6:
80
+ unlike *= self.ONE_CHAR_PROB**self._num_mb_chars
81
+ return 1.0 - unlike
82
+ return unlike
venv/lib/python3.12/site-packages/pip/_vendor/chardet/version.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ This module exists only to simplify retrieving the version number of chardet
3
+ from within setuptools and from chardet subpackages.
4
+
5
+ :author: Dan Blanchard (dan.blanchard@gmail.com)
6
+ """
7
+
8
+ __version__ = "5.1.0"
9
+ VERSION = __version__.split(".")
venv/lib/python3.12/site-packages/pip/_vendor/distro/__init__.py ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from .distro import (
2
+ NORMALIZED_DISTRO_ID,
3
+ NORMALIZED_LSB_ID,
4
+ NORMALIZED_OS_ID,
5
+ LinuxDistribution,
6
+ __version__,
7
+ build_number,
8
+ codename,
9
+ distro_release_attr,
10
+ distro_release_info,
11
+ id,
12
+ info,
13
+ like,
14
+ linux_distribution,
15
+ lsb_release_attr,
16
+ lsb_release_info,
17
+ major_version,
18
+ minor_version,
19
+ name,
20
+ os_release_attr,
21
+ os_release_info,
22
+ uname_attr,
23
+ uname_info,
24
+ version,
25
+ version_parts,
26
+ )
27
+
28
+ __all__ = [
29
+ "NORMALIZED_DISTRO_ID",
30
+ "NORMALIZED_LSB_ID",
31
+ "NORMALIZED_OS_ID",
32
+ "LinuxDistribution",
33
+ "build_number",
34
+ "codename",
35
+ "distro_release_attr",
36
+ "distro_release_info",
37
+ "id",
38
+ "info",
39
+ "like",
40
+ "linux_distribution",
41
+ "lsb_release_attr",
42
+ "lsb_release_info",
43
+ "major_version",
44
+ "minor_version",
45
+ "name",
46
+ "os_release_attr",
47
+ "os_release_info",
48
+ "uname_attr",
49
+ "uname_info",
50
+ "version",
51
+ "version_parts",
52
+ ]
53
+
54
+ __version__ = __version__
venv/lib/python3.12/site-packages/pip/_vendor/msgpack/__init__.py ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding: utf-8
2
+ from .exceptions import *
3
+ from .ext import ExtType, Timestamp
4
+
5
+ import os
6
+ import sys
7
+
8
+
9
+ version = (1, 0, 5)
10
+ __version__ = "1.0.5"
11
+
12
+
13
+ if os.environ.get("MSGPACK_PUREPYTHON") or sys.version_info[0] == 2:
14
+ from .fallback import Packer, unpackb, Unpacker
15
+ else:
16
+ try:
17
+ from ._cmsgpack import Packer, unpackb, Unpacker
18
+ except ImportError:
19
+ from .fallback import Packer, unpackb, Unpacker
20
+
21
+
22
+ def pack(o, stream, **kwargs):
23
+ """
24
+ Pack object `o` and write it to `stream`
25
+
26
+ See :class:`Packer` for options.
27
+ """
28
+ packer = Packer(**kwargs)
29
+ stream.write(packer.pack(o))
30
+
31
+
32
+ def packb(o, **kwargs):
33
+ """
34
+ Pack object `o` and return packed bytes
35
+
36
+ See :class:`Packer` for options.
37
+ """
38
+ return Packer(**kwargs).pack(o)
39
+
40
+
41
+ def unpack(stream, **kwargs):
42
+ """
43
+ Unpack an object from `stream`.
44
+
45
+ Raises `ExtraData` when `stream` contains extra bytes.
46
+ See :class:`Unpacker` for options.
47
+ """
48
+ data = stream.read()
49
+ return unpackb(data, **kwargs)
50
+
51
+
52
+ # alias for compatibility to simplejson/marshal/pickle.
53
+ load = unpack
54
+ loads = unpackb
55
+
56
+ dump = pack
57
+ dumps = packb
venv/lib/python3.12/site-packages/pip/_vendor/msgpack/exceptions.py ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class UnpackException(Exception):
2
+ """Base class for some exceptions raised while unpacking.
3
+
4
+ NOTE: unpack may raise exception other than subclass of
5
+ UnpackException. If you want to catch all error, catch
6
+ Exception instead.
7
+ """
8
+
9
+
10
+ class BufferFull(UnpackException):
11
+ pass
12
+
13
+
14
+ class OutOfData(UnpackException):
15
+ pass
16
+
17
+
18
+ class FormatError(ValueError, UnpackException):
19
+ """Invalid msgpack format"""
20
+
21
+
22
+ class StackError(ValueError, UnpackException):
23
+ """Too nested"""
24
+
25
+
26
+ # Deprecated. Use ValueError instead
27
+ UnpackValueError = ValueError
28
+
29
+
30
+ class ExtraData(UnpackValueError):
31
+ """ExtraData is raised when there is trailing data.
32
+
33
+ This exception is raised while only one-shot (not streaming)
34
+ unpack.
35
+ """
36
+
37
+ def __init__(self, unpacked, extra):
38
+ self.unpacked = unpacked
39
+ self.extra = extra
40
+
41
+ def __str__(self):
42
+ return "unpack(b) received extra data."
43
+
44
+
45
+ # Deprecated. Use Exception instead to catch all exception during packing.
46
+ PackException = Exception
47
+ PackValueError = ValueError
48
+ PackOverflowError = OverflowError
venv/lib/python3.12/site-packages/pip/_vendor/msgpack/ext.py ADDED
@@ -0,0 +1,193 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding: utf-8
2
+ from collections import namedtuple
3
+ import datetime
4
+ import sys
5
+ import struct
6
+
7
+
8
+ PY2 = sys.version_info[0] == 2
9
+
10
+ if PY2:
11
+ int_types = (int, long)
12
+ _utc = None
13
+ else:
14
+ int_types = int
15
+ try:
16
+ _utc = datetime.timezone.utc
17
+ except AttributeError:
18
+ _utc = datetime.timezone(datetime.timedelta(0))
19
+
20
+
21
+ class ExtType(namedtuple("ExtType", "code data")):
22
+ """ExtType represents ext type in msgpack."""
23
+
24
+ def __new__(cls, code, data):
25
+ if not isinstance(code, int):
26
+ raise TypeError("code must be int")
27
+ if not isinstance(data, bytes):
28
+ raise TypeError("data must be bytes")
29
+ if not 0 <= code <= 127:
30
+ raise ValueError("code must be 0~127")
31
+ return super(ExtType, cls).__new__(cls, code, data)
32
+
33
+
34
+ class Timestamp(object):
35
+ """Timestamp represents the Timestamp extension type in msgpack.
36
+
37
+ When built with Cython, msgpack uses C methods to pack and unpack `Timestamp`. When using pure-Python
38
+ msgpack, :func:`to_bytes` and :func:`from_bytes` are used to pack and unpack `Timestamp`.
39
+
40
+ This class is immutable: Do not override seconds and nanoseconds.
41
+ """
42
+
43
+ __slots__ = ["seconds", "nanoseconds"]
44
+
45
+ def __init__(self, seconds, nanoseconds=0):
46
+ """Initialize a Timestamp object.
47
+
48
+ :param int seconds:
49
+ Number of seconds since the UNIX epoch (00:00:00 UTC Jan 1 1970, minus leap seconds).
50
+ May be negative.
51
+
52
+ :param int nanoseconds:
53
+ Number of nanoseconds to add to `seconds` to get fractional time.
54
+ Maximum is 999_999_999. Default is 0.
55
+
56
+ Note: Negative times (before the UNIX epoch) are represented as negative seconds + positive ns.
57
+ """
58
+ if not isinstance(seconds, int_types):
59
+ raise TypeError("seconds must be an integer")
60
+ if not isinstance(nanoseconds, int_types):
61
+ raise TypeError("nanoseconds must be an integer")
62
+ if not (0 <= nanoseconds < 10**9):
63
+ raise ValueError(
64
+ "nanoseconds must be a non-negative integer less than 999999999."
65
+ )
66
+ self.seconds = seconds
67
+ self.nanoseconds = nanoseconds
68
+
69
+ def __repr__(self):
70
+ """String representation of Timestamp."""
71
+ return "Timestamp(seconds={0}, nanoseconds={1})".format(
72
+ self.seconds, self.nanoseconds
73
+ )
74
+
75
+ def __eq__(self, other):
76
+ """Check for equality with another Timestamp object"""
77
+ if type(other) is self.__class__:
78
+ return (
79
+ self.seconds == other.seconds and self.nanoseconds == other.nanoseconds
80
+ )
81
+ return False
82
+
83
+ def __ne__(self, other):
84
+ """not-equals method (see :func:`__eq__()`)"""
85
+ return not self.__eq__(other)
86
+
87
+ def __hash__(self):
88
+ return hash((self.seconds, self.nanoseconds))
89
+
90
+ @staticmethod
91
+ def from_bytes(b):
92
+ """Unpack bytes into a `Timestamp` object.
93
+
94
+ Used for pure-Python msgpack unpacking.
95
+
96
+ :param b: Payload from msgpack ext message with code -1
97
+ :type b: bytes
98
+
99
+ :returns: Timestamp object unpacked from msgpack ext payload
100
+ :rtype: Timestamp
101
+ """
102
+ if len(b) == 4:
103
+ seconds = struct.unpack("!L", b)[0]
104
+ nanoseconds = 0
105
+ elif len(b) == 8:
106
+ data64 = struct.unpack("!Q", b)[0]
107
+ seconds = data64 & 0x00000003FFFFFFFF
108
+ nanoseconds = data64 >> 34
109
+ elif len(b) == 12:
110
+ nanoseconds, seconds = struct.unpack("!Iq", b)
111
+ else:
112
+ raise ValueError(
113
+ "Timestamp type can only be created from 32, 64, or 96-bit byte objects"
114
+ )
115
+ return Timestamp(seconds, nanoseconds)
116
+
117
+ def to_bytes(self):
118
+ """Pack this Timestamp object into bytes.
119
+
120
+ Used for pure-Python msgpack packing.
121
+
122
+ :returns data: Payload for EXT message with code -1 (timestamp type)
123
+ :rtype: bytes
124
+ """
125
+ if (self.seconds >> 34) == 0: # seconds is non-negative and fits in 34 bits
126
+ data64 = self.nanoseconds << 34 | self.seconds
127
+ if data64 & 0xFFFFFFFF00000000 == 0:
128
+ # nanoseconds is zero and seconds < 2**32, so timestamp 32
129
+ data = struct.pack("!L", data64)
130
+ else:
131
+ # timestamp 64
132
+ data = struct.pack("!Q", data64)
133
+ else:
134
+ # timestamp 96
135
+ data = struct.pack("!Iq", self.nanoseconds, self.seconds)
136
+ return data
137
+
138
+ @staticmethod
139
+ def from_unix(unix_sec):
140
+ """Create a Timestamp from posix timestamp in seconds.
141
+
142
+ :param unix_float: Posix timestamp in seconds.
143
+ :type unix_float: int or float.
144
+ """
145
+ seconds = int(unix_sec // 1)
146
+ nanoseconds = int((unix_sec % 1) * 10**9)
147
+ return Timestamp(seconds, nanoseconds)
148
+
149
+ def to_unix(self):
150
+ """Get the timestamp as a floating-point value.
151
+
152
+ :returns: posix timestamp
153
+ :rtype: float
154
+ """
155
+ return self.seconds + self.nanoseconds / 1e9
156
+
157
+ @staticmethod
158
+ def from_unix_nano(unix_ns):
159
+ """Create a Timestamp from posix timestamp in nanoseconds.
160
+
161
+ :param int unix_ns: Posix timestamp in nanoseconds.
162
+ :rtype: Timestamp
163
+ """
164
+ return Timestamp(*divmod(unix_ns, 10**9))
165
+
166
+ def to_unix_nano(self):
167
+ """Get the timestamp as a unixtime in nanoseconds.
168
+
169
+ :returns: posix timestamp in nanoseconds
170
+ :rtype: int
171
+ """
172
+ return self.seconds * 10**9 + self.nanoseconds
173
+
174
+ def to_datetime(self):
175
+ """Get the timestamp as a UTC datetime.
176
+
177
+ Python 2 is not supported.
178
+
179
+ :rtype: datetime.
180
+ """
181
+ return datetime.datetime.fromtimestamp(0, _utc) + datetime.timedelta(
182
+ seconds=self.to_unix()
183
+ )
184
+
185
+ @staticmethod
186
+ def from_datetime(dt):
187
+ """Create a Timestamp from datetime with tzinfo.
188
+
189
+ Python 2 is not supported.
190
+
191
+ :rtype: Timestamp
192
+ """
193
+ return Timestamp.from_unix(dt.timestamp())
venv/lib/python3.12/site-packages/pip/_vendor/msgpack/fallback.py ADDED
@@ -0,0 +1,1010 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Fallback pure Python implementation of msgpack"""
2
+ from datetime import datetime as _DateTime
3
+ import sys
4
+ import struct
5
+
6
+
7
+ PY2 = sys.version_info[0] == 2
8
+ if PY2:
9
+ int_types = (int, long)
10
+
11
+ def dict_iteritems(d):
12
+ return d.iteritems()
13
+
14
+ else:
15
+ int_types = int
16
+ unicode = str
17
+ xrange = range
18
+
19
+ def dict_iteritems(d):
20
+ return d.items()
21
+
22
+
23
+ if sys.version_info < (3, 5):
24
+ # Ugly hack...
25
+ RecursionError = RuntimeError
26
+
27
+ def _is_recursionerror(e):
28
+ return (
29
+ len(e.args) == 1
30
+ and isinstance(e.args[0], str)
31
+ and e.args[0].startswith("maximum recursion depth exceeded")
32
+ )
33
+
34
+ else:
35
+
36
+ def _is_recursionerror(e):
37
+ return True
38
+
39
+
40
+ if hasattr(sys, "pypy_version_info"):
41
+ # StringIO is slow on PyPy, StringIO is faster. However: PyPy's own
42
+ # StringBuilder is fastest.
43
+ from __pypy__ import newlist_hint
44
+
45
+ try:
46
+ from __pypy__.builders import BytesBuilder as StringBuilder
47
+ except ImportError:
48
+ from __pypy__.builders import StringBuilder
49
+ USING_STRINGBUILDER = True
50
+
51
+ class StringIO(object):
52
+ def __init__(self, s=b""):
53
+ if s:
54
+ self.builder = StringBuilder(len(s))
55
+ self.builder.append(s)
56
+ else:
57
+ self.builder = StringBuilder()
58
+
59
+ def write(self, s):
60
+ if isinstance(s, memoryview):
61
+ s = s.tobytes()
62
+ elif isinstance(s, bytearray):
63
+ s = bytes(s)
64
+ self.builder.append(s)
65
+
66
+ def getvalue(self):
67
+ return self.builder.build()
68
+
69
+ else:
70
+ USING_STRINGBUILDER = False
71
+ from io import BytesIO as StringIO
72
+
73
+ newlist_hint = lambda size: []
74
+
75
+
76
+ from .exceptions import BufferFull, OutOfData, ExtraData, FormatError, StackError
77
+
78
+ from .ext import ExtType, Timestamp
79
+
80
+
81
+ EX_SKIP = 0
82
+ EX_CONSTRUCT = 1
83
+ EX_READ_ARRAY_HEADER = 2
84
+ EX_READ_MAP_HEADER = 3
85
+
86
+ TYPE_IMMEDIATE = 0
87
+ TYPE_ARRAY = 1
88
+ TYPE_MAP = 2
89
+ TYPE_RAW = 3
90
+ TYPE_BIN = 4
91
+ TYPE_EXT = 5
92
+
93
+ DEFAULT_RECURSE_LIMIT = 511
94
+
95
+
96
+ def _check_type_strict(obj, t, type=type, tuple=tuple):
97
+ if type(t) is tuple:
98
+ return type(obj) in t
99
+ else:
100
+ return type(obj) is t
101
+
102
+
103
+ def _get_data_from_buffer(obj):
104
+ view = memoryview(obj)
105
+ if view.itemsize != 1:
106
+ raise ValueError("cannot unpack from multi-byte object")
107
+ return view
108
+
109
+
110
+ def unpackb(packed, **kwargs):
111
+ """
112
+ Unpack an object from `packed`.
113
+
114
+ Raises ``ExtraData`` when *packed* contains extra bytes.
115
+ Raises ``ValueError`` when *packed* is incomplete.
116
+ Raises ``FormatError`` when *packed* is not valid msgpack.
117
+ Raises ``StackError`` when *packed* contains too nested.
118
+ Other exceptions can be raised during unpacking.
119
+
120
+ See :class:`Unpacker` for options.
121
+ """
122
+ unpacker = Unpacker(None, max_buffer_size=len(packed), **kwargs)
123
+ unpacker.feed(packed)
124
+ try:
125
+ ret = unpacker._unpack()
126
+ except OutOfData:
127
+ raise ValueError("Unpack failed: incomplete input")
128
+ except RecursionError as e:
129
+ if _is_recursionerror(e):
130
+ raise StackError
131
+ raise
132
+ if unpacker._got_extradata():
133
+ raise ExtraData(ret, unpacker._get_extradata())
134
+ return ret
135
+
136
+
137
+ if sys.version_info < (2, 7, 6):
138
+
139
+ def _unpack_from(f, b, o=0):
140
+ """Explicit type cast for legacy struct.unpack_from"""
141
+ return struct.unpack_from(f, bytes(b), o)
142
+
143
+ else:
144
+ _unpack_from = struct.unpack_from
145
+
146
+ _NO_FORMAT_USED = ""
147
+ _MSGPACK_HEADERS = {
148
+ 0xC4: (1, _NO_FORMAT_USED, TYPE_BIN),
149
+ 0xC5: (2, ">H", TYPE_BIN),
150
+ 0xC6: (4, ">I", TYPE_BIN),
151
+ 0xC7: (2, "Bb", TYPE_EXT),
152
+ 0xC8: (3, ">Hb", TYPE_EXT),
153
+ 0xC9: (5, ">Ib", TYPE_EXT),
154
+ 0xCA: (4, ">f"),
155
+ 0xCB: (8, ">d"),
156
+ 0xCC: (1, _NO_FORMAT_USED),
157
+ 0xCD: (2, ">H"),
158
+ 0xCE: (4, ">I"),
159
+ 0xCF: (8, ">Q"),
160
+ 0xD0: (1, "b"),
161
+ 0xD1: (2, ">h"),
162
+ 0xD2: (4, ">i"),
163
+ 0xD3: (8, ">q"),
164
+ 0xD4: (1, "b1s", TYPE_EXT),
165
+ 0xD5: (2, "b2s", TYPE_EXT),
166
+ 0xD6: (4, "b4s", TYPE_EXT),
167
+ 0xD7: (8, "b8s", TYPE_EXT),
168
+ 0xD8: (16, "b16s", TYPE_EXT),
169
+ 0xD9: (1, _NO_FORMAT_USED, TYPE_RAW),
170
+ 0xDA: (2, ">H", TYPE_RAW),
171
+ 0xDB: (4, ">I", TYPE_RAW),
172
+ 0xDC: (2, ">H", TYPE_ARRAY),
173
+ 0xDD: (4, ">I", TYPE_ARRAY),
174
+ 0xDE: (2, ">H", TYPE_MAP),
175
+ 0xDF: (4, ">I", TYPE_MAP),
176
+ }
177
+
178
+
179
+ class Unpacker(object):
180
+ """Streaming unpacker.
181
+
182
+ Arguments:
183
+
184
+ :param file_like:
185
+ File-like object having `.read(n)` method.
186
+ If specified, unpacker reads serialized data from it and :meth:`feed()` is not usable.
187
+
188
+ :param int read_size:
189
+ Used as `file_like.read(read_size)`. (default: `min(16*1024, max_buffer_size)`)
190
+
191
+ :param bool use_list:
192
+ If true, unpack msgpack array to Python list.
193
+ Otherwise, unpack to Python tuple. (default: True)
194
+
195
+ :param bool raw:
196
+ If true, unpack msgpack raw to Python bytes.
197
+ Otherwise, unpack to Python str by decoding with UTF-8 encoding (default).
198
+
199
+ :param int timestamp:
200
+ Control how timestamp type is unpacked:
201
+
202
+ 0 - Timestamp
203
+ 1 - float (Seconds from the EPOCH)
204
+ 2 - int (Nanoseconds from the EPOCH)
205
+ 3 - datetime.datetime (UTC). Python 2 is not supported.
206
+
207
+ :param bool strict_map_key:
208
+ If true (default), only str or bytes are accepted for map (dict) keys.
209
+
210
+ :param callable object_hook:
211
+ When specified, it should be callable.
212
+ Unpacker calls it with a dict argument after unpacking msgpack map.
213
+ (See also simplejson)
214
+
215
+ :param callable object_pairs_hook:
216
+ When specified, it should be callable.
217
+ Unpacker calls it with a list of key-value pairs after unpacking msgpack map.
218
+ (See also simplejson)
219
+
220
+ :param str unicode_errors:
221
+ The error handler for decoding unicode. (default: 'strict')
222
+ This option should be used only when you have msgpack data which
223
+ contains invalid UTF-8 string.
224
+
225
+ :param int max_buffer_size:
226
+ Limits size of data waiting unpacked. 0 means 2**32-1.
227
+ The default value is 100*1024*1024 (100MiB).
228
+ Raises `BufferFull` exception when it is insufficient.
229
+ You should set this parameter when unpacking data from untrusted source.
230
+
231
+ :param int max_str_len:
232
+ Deprecated, use *max_buffer_size* instead.
233
+ Limits max length of str. (default: max_buffer_size)
234
+
235
+ :param int max_bin_len:
236
+ Deprecated, use *max_buffer_size* instead.
237
+ Limits max length of bin. (default: max_buffer_size)
238
+
239
+ :param int max_array_len:
240
+ Limits max length of array.
241
+ (default: max_buffer_size)
242
+
243
+ :param int max_map_len:
244
+ Limits max length of map.
245
+ (default: max_buffer_size//2)
246
+
247
+ :param int max_ext_len:
248
+ Deprecated, use *max_buffer_size* instead.
249
+ Limits max size of ext type. (default: max_buffer_size)
250
+
251
+ Example of streaming deserialize from file-like object::
252
+
253
+ unpacker = Unpacker(file_like)
254
+ for o in unpacker:
255
+ process(o)
256
+
257
+ Example of streaming deserialize from socket::
258
+
259
+ unpacker = Unpacker()
260
+ while True:
261
+ buf = sock.recv(1024**2)
262
+ if not buf:
263
+ break
264
+ unpacker.feed(buf)
265
+ for o in unpacker:
266
+ process(o)
267
+
268
+ Raises ``ExtraData`` when *packed* contains extra bytes.
269
+ Raises ``OutOfData`` when *packed* is incomplete.
270
+ Raises ``FormatError`` when *packed* is not valid msgpack.
271
+ Raises ``StackError`` when *packed* contains too nested.
272
+ Other exceptions can be raised during unpacking.
273
+ """
274
+
275
+ def __init__(
276
+ self,
277
+ file_like=None,
278
+ read_size=0,
279
+ use_list=True,
280
+ raw=False,
281
+ timestamp=0,
282
+ strict_map_key=True,
283
+ object_hook=None,
284
+ object_pairs_hook=None,
285
+ list_hook=None,
286
+ unicode_errors=None,
287
+ max_buffer_size=100 * 1024 * 1024,
288
+ ext_hook=ExtType,
289
+ max_str_len=-1,
290
+ max_bin_len=-1,
291
+ max_array_len=-1,
292
+ max_map_len=-1,
293
+ max_ext_len=-1,
294
+ ):
295
+ if unicode_errors is None:
296
+ unicode_errors = "strict"
297
+
298
+ if file_like is None:
299
+ self._feeding = True
300
+ else:
301
+ if not callable(file_like.read):
302
+ raise TypeError("`file_like.read` must be callable")
303
+ self.file_like = file_like
304
+ self._feeding = False
305
+
306
+ #: array of bytes fed.
307
+ self._buffer = bytearray()
308
+ #: Which position we currently reads
309
+ self._buff_i = 0
310
+
311
+ # When Unpacker is used as an iterable, between the calls to next(),
312
+ # the buffer is not "consumed" completely, for efficiency sake.
313
+ # Instead, it is done sloppily. To make sure we raise BufferFull at
314
+ # the correct moments, we have to keep track of how sloppy we were.
315
+ # Furthermore, when the buffer is incomplete (that is: in the case
316
+ # we raise an OutOfData) we need to rollback the buffer to the correct
317
+ # state, which _buf_checkpoint records.
318
+ self._buf_checkpoint = 0
319
+
320
+ if not max_buffer_size:
321
+ max_buffer_size = 2**31 - 1
322
+ if max_str_len == -1:
323
+ max_str_len = max_buffer_size
324
+ if max_bin_len == -1:
325
+ max_bin_len = max_buffer_size
326
+ if max_array_len == -1:
327
+ max_array_len = max_buffer_size
328
+ if max_map_len == -1:
329
+ max_map_len = max_buffer_size // 2
330
+ if max_ext_len == -1:
331
+ max_ext_len = max_buffer_size
332
+
333
+ self._max_buffer_size = max_buffer_size
334
+ if read_size > self._max_buffer_size:
335
+ raise ValueError("read_size must be smaller than max_buffer_size")
336
+ self._read_size = read_size or min(self._max_buffer_size, 16 * 1024)
337
+ self._raw = bool(raw)
338
+ self._strict_map_key = bool(strict_map_key)
339
+ self._unicode_errors = unicode_errors
340
+ self._use_list = use_list
341
+ if not (0 <= timestamp <= 3):
342
+ raise ValueError("timestamp must be 0..3")
343
+ self._timestamp = timestamp
344
+ self._list_hook = list_hook
345
+ self._object_hook = object_hook
346
+ self._object_pairs_hook = object_pairs_hook
347
+ self._ext_hook = ext_hook
348
+ self._max_str_len = max_str_len
349
+ self._max_bin_len = max_bin_len
350
+ self._max_array_len = max_array_len
351
+ self._max_map_len = max_map_len
352
+ self._max_ext_len = max_ext_len
353
+ self._stream_offset = 0
354
+
355
+ if list_hook is not None and not callable(list_hook):
356
+ raise TypeError("`list_hook` is not callable")
357
+ if object_hook is not None and not callable(object_hook):
358
+ raise TypeError("`object_hook` is not callable")
359
+ if object_pairs_hook is not None and not callable(object_pairs_hook):
360
+ raise TypeError("`object_pairs_hook` is not callable")
361
+ if object_hook is not None and object_pairs_hook is not None:
362
+ raise TypeError(
363
+ "object_pairs_hook and object_hook are mutually " "exclusive"
364
+ )
365
+ if not callable(ext_hook):
366
+ raise TypeError("`ext_hook` is not callable")
367
+
368
+ def feed(self, next_bytes):
369
+ assert self._feeding
370
+ view = _get_data_from_buffer(next_bytes)
371
+ if len(self._buffer) - self._buff_i + len(view) > self._max_buffer_size:
372
+ raise BufferFull
373
+
374
+ # Strip buffer before checkpoint before reading file.
375
+ if self._buf_checkpoint > 0:
376
+ del self._buffer[: self._buf_checkpoint]
377
+ self._buff_i -= self._buf_checkpoint
378
+ self._buf_checkpoint = 0
379
+
380
+ # Use extend here: INPLACE_ADD += doesn't reliably typecast memoryview in jython
381
+ self._buffer.extend(view)
382
+
383
+ def _consume(self):
384
+ """Gets rid of the used parts of the buffer."""
385
+ self._stream_offset += self._buff_i - self._buf_checkpoint
386
+ self._buf_checkpoint = self._buff_i
387
+
388
+ def _got_extradata(self):
389
+ return self._buff_i < len(self._buffer)
390
+
391
+ def _get_extradata(self):
392
+ return self._buffer[self._buff_i :]
393
+
394
+ def read_bytes(self, n):
395
+ ret = self._read(n, raise_outofdata=False)
396
+ self._consume()
397
+ return ret
398
+
399
+ def _read(self, n, raise_outofdata=True):
400
+ # (int) -> bytearray
401
+ self._reserve(n, raise_outofdata=raise_outofdata)
402
+ i = self._buff_i
403
+ ret = self._buffer[i : i + n]
404
+ self._buff_i = i + len(ret)
405
+ return ret
406
+
407
+ def _reserve(self, n, raise_outofdata=True):
408
+ remain_bytes = len(self._buffer) - self._buff_i - n
409
+
410
+ # Fast path: buffer has n bytes already
411
+ if remain_bytes >= 0:
412
+ return
413
+
414
+ if self._feeding:
415
+ self._buff_i = self._buf_checkpoint
416
+ raise OutOfData
417
+
418
+ # Strip buffer before checkpoint before reading file.
419
+ if self._buf_checkpoint > 0:
420
+ del self._buffer[: self._buf_checkpoint]
421
+ self._buff_i -= self._buf_checkpoint
422
+ self._buf_checkpoint = 0
423
+
424
+ # Read from file
425
+ remain_bytes = -remain_bytes
426
+ if remain_bytes + len(self._buffer) > self._max_buffer_size:
427
+ raise BufferFull
428
+ while remain_bytes > 0:
429
+ to_read_bytes = max(self._read_size, remain_bytes)
430
+ read_data = self.file_like.read(to_read_bytes)
431
+ if not read_data:
432
+ break
433
+ assert isinstance(read_data, bytes)
434
+ self._buffer += read_data
435
+ remain_bytes -= len(read_data)
436
+
437
+ if len(self._buffer) < n + self._buff_i and raise_outofdata:
438
+ self._buff_i = 0 # rollback
439
+ raise OutOfData
440
+
441
+ def _read_header(self):
442
+ typ = TYPE_IMMEDIATE
443
+ n = 0
444
+ obj = None
445
+ self._reserve(1)
446
+ b = self._buffer[self._buff_i]
447
+ self._buff_i += 1
448
+ if b & 0b10000000 == 0:
449
+ obj = b
450
+ elif b & 0b11100000 == 0b11100000:
451
+ obj = -1 - (b ^ 0xFF)
452
+ elif b & 0b11100000 == 0b10100000:
453
+ n = b & 0b00011111
454
+ typ = TYPE_RAW
455
+ if n > self._max_str_len:
456
+ raise ValueError("%s exceeds max_str_len(%s)" % (n, self._max_str_len))
457
+ obj = self._read(n)
458
+ elif b & 0b11110000 == 0b10010000:
459
+ n = b & 0b00001111
460
+ typ = TYPE_ARRAY
461
+ if n > self._max_array_len:
462
+ raise ValueError(
463
+ "%s exceeds max_array_len(%s)" % (n, self._max_array_len)
464
+ )
465
+ elif b & 0b11110000 == 0b10000000:
466
+ n = b & 0b00001111
467
+ typ = TYPE_MAP
468
+ if n > self._max_map_len:
469
+ raise ValueError("%s exceeds max_map_len(%s)" % (n, self._max_map_len))
470
+ elif b == 0xC0:
471
+ obj = None
472
+ elif b == 0xC2:
473
+ obj = False
474
+ elif b == 0xC3:
475
+ obj = True
476
+ elif 0xC4 <= b <= 0xC6:
477
+ size, fmt, typ = _MSGPACK_HEADERS[b]
478
+ self._reserve(size)
479
+ if len(fmt) > 0:
480
+ n = _unpack_from(fmt, self._buffer, self._buff_i)[0]
481
+ else:
482
+ n = self._buffer[self._buff_i]
483
+ self._buff_i += size
484
+ if n > self._max_bin_len:
485
+ raise ValueError("%s exceeds max_bin_len(%s)" % (n, self._max_bin_len))
486
+ obj = self._read(n)
487
+ elif 0xC7 <= b <= 0xC9:
488
+ size, fmt, typ = _MSGPACK_HEADERS[b]
489
+ self._reserve(size)
490
+ L, n = _unpack_from(fmt, self._buffer, self._buff_i)
491
+ self._buff_i += size
492
+ if L > self._max_ext_len:
493
+ raise ValueError("%s exceeds max_ext_len(%s)" % (L, self._max_ext_len))
494
+ obj = self._read(L)
495
+ elif 0xCA <= b <= 0xD3:
496
+ size, fmt = _MSGPACK_HEADERS[b]
497
+ self._reserve(size)
498
+ if len(fmt) > 0:
499
+ obj = _unpack_from(fmt, self._buffer, self._buff_i)[0]
500
+ else:
501
+ obj = self._buffer[self._buff_i]
502
+ self._buff_i += size
503
+ elif 0xD4 <= b <= 0xD8:
504
+ size, fmt, typ = _MSGPACK_HEADERS[b]
505
+ if self._max_ext_len < size:
506
+ raise ValueError(
507
+ "%s exceeds max_ext_len(%s)" % (size, self._max_ext_len)
508
+ )
509
+ self._reserve(size + 1)
510
+ n, obj = _unpack_from(fmt, self._buffer, self._buff_i)
511
+ self._buff_i += size + 1
512
+ elif 0xD9 <= b <= 0xDB:
513
+ size, fmt, typ = _MSGPACK_HEADERS[b]
514
+ self._reserve(size)
515
+ if len(fmt) > 0:
516
+ (n,) = _unpack_from(fmt, self._buffer, self._buff_i)
517
+ else:
518
+ n = self._buffer[self._buff_i]
519
+ self._buff_i += size
520
+ if n > self._max_str_len:
521
+ raise ValueError("%s exceeds max_str_len(%s)" % (n, self._max_str_len))
522
+ obj = self._read(n)
523
+ elif 0xDC <= b <= 0xDD:
524
+ size, fmt, typ = _MSGPACK_HEADERS[b]
525
+ self._reserve(size)
526
+ (n,) = _unpack_from(fmt, self._buffer, self._buff_i)
527
+ self._buff_i += size
528
+ if n > self._max_array_len:
529
+ raise ValueError(
530
+ "%s exceeds max_array_len(%s)" % (n, self._max_array_len)
531
+ )
532
+ elif 0xDE <= b <= 0xDF:
533
+ size, fmt, typ = _MSGPACK_HEADERS[b]
534
+ self._reserve(size)
535
+ (n,) = _unpack_from(fmt, self._buffer, self._buff_i)
536
+ self._buff_i += size
537
+ if n > self._max_map_len:
538
+ raise ValueError("%s exceeds max_map_len(%s)" % (n, self._max_map_len))
539
+ else:
540
+ raise FormatError("Unknown header: 0x%x" % b)
541
+ return typ, n, obj
542
+
543
+ def _unpack(self, execute=EX_CONSTRUCT):
544
+ typ, n, obj = self._read_header()
545
+
546
+ if execute == EX_READ_ARRAY_HEADER:
547
+ if typ != TYPE_ARRAY:
548
+ raise ValueError("Expected array")
549
+ return n
550
+ if execute == EX_READ_MAP_HEADER:
551
+ if typ != TYPE_MAP:
552
+ raise ValueError("Expected map")
553
+ return n
554
+ # TODO should we eliminate the recursion?
555
+ if typ == TYPE_ARRAY:
556
+ if execute == EX_SKIP:
557
+ for i in xrange(n):
558
+ # TODO check whether we need to call `list_hook`
559
+ self._unpack(EX_SKIP)
560
+ return
561
+ ret = newlist_hint(n)
562
+ for i in xrange(n):
563
+ ret.append(self._unpack(EX_CONSTRUCT))
564
+ if self._list_hook is not None:
565
+ ret = self._list_hook(ret)
566
+ # TODO is the interaction between `list_hook` and `use_list` ok?
567
+ return ret if self._use_list else tuple(ret)
568
+ if typ == TYPE_MAP:
569
+ if execute == EX_SKIP:
570
+ for i in xrange(n):
571
+ # TODO check whether we need to call hooks
572
+ self._unpack(EX_SKIP)
573
+ self._unpack(EX_SKIP)
574
+ return
575
+ if self._object_pairs_hook is not None:
576
+ ret = self._object_pairs_hook(
577
+ (self._unpack(EX_CONSTRUCT), self._unpack(EX_CONSTRUCT))
578
+ for _ in xrange(n)
579
+ )
580
+ else:
581
+ ret = {}
582
+ for _ in xrange(n):
583
+ key = self._unpack(EX_CONSTRUCT)
584
+ if self._strict_map_key and type(key) not in (unicode, bytes):
585
+ raise ValueError(
586
+ "%s is not allowed for map key" % str(type(key))
587
+ )
588
+ if not PY2 and type(key) is str:
589
+ key = sys.intern(key)
590
+ ret[key] = self._unpack(EX_CONSTRUCT)
591
+ if self._object_hook is not None:
592
+ ret = self._object_hook(ret)
593
+ return ret
594
+ if execute == EX_SKIP:
595
+ return
596
+ if typ == TYPE_RAW:
597
+ if self._raw:
598
+ obj = bytes(obj)
599
+ else:
600
+ obj = obj.decode("utf_8", self._unicode_errors)
601
+ return obj
602
+ if typ == TYPE_BIN:
603
+ return bytes(obj)
604
+ if typ == TYPE_EXT:
605
+ if n == -1: # timestamp
606
+ ts = Timestamp.from_bytes(bytes(obj))
607
+ if self._timestamp == 1:
608
+ return ts.to_unix()
609
+ elif self._timestamp == 2:
610
+ return ts.to_unix_nano()
611
+ elif self._timestamp == 3:
612
+ return ts.to_datetime()
613
+ else:
614
+ return ts
615
+ else:
616
+ return self._ext_hook(n, bytes(obj))
617
+ assert typ == TYPE_IMMEDIATE
618
+ return obj
619
+
620
+ def __iter__(self):
621
+ return self
622
+
623
+ def __next__(self):
624
+ try:
625
+ ret = self._unpack(EX_CONSTRUCT)
626
+ self._consume()
627
+ return ret
628
+ except OutOfData:
629
+ self._consume()
630
+ raise StopIteration
631
+ except RecursionError:
632
+ raise StackError
633
+
634
+ next = __next__
635
+
636
+ def skip(self):
637
+ self._unpack(EX_SKIP)
638
+ self._consume()
639
+
640
+ def unpack(self):
641
+ try:
642
+ ret = self._unpack(EX_CONSTRUCT)
643
+ except RecursionError:
644
+ raise StackError
645
+ self._consume()
646
+ return ret
647
+
648
+ def read_array_header(self):
649
+ ret = self._unpack(EX_READ_ARRAY_HEADER)
650
+ self._consume()
651
+ return ret
652
+
653
+ def read_map_header(self):
654
+ ret = self._unpack(EX_READ_MAP_HEADER)
655
+ self._consume()
656
+ return ret
657
+
658
+ def tell(self):
659
+ return self._stream_offset
660
+
661
+
662
+ class Packer(object):
663
+ """
664
+ MessagePack Packer
665
+
666
+ Usage::
667
+
668
+ packer = Packer()
669
+ astream.write(packer.pack(a))
670
+ astream.write(packer.pack(b))
671
+
672
+ Packer's constructor has some keyword arguments:
673
+
674
+ :param callable default:
675
+ Convert user type to builtin type that Packer supports.
676
+ See also simplejson's document.
677
+
678
+ :param bool use_single_float:
679
+ Use single precision float type for float. (default: False)
680
+
681
+ :param bool autoreset:
682
+ Reset buffer after each pack and return its content as `bytes`. (default: True).
683
+ If set this to false, use `bytes()` to get content and `.reset()` to clear buffer.
684
+
685
+ :param bool use_bin_type:
686
+ Use bin type introduced in msgpack spec 2.0 for bytes.
687
+ It also enables str8 type for unicode. (default: True)
688
+
689
+ :param bool strict_types:
690
+ If set to true, types will be checked to be exact. Derived classes
691
+ from serializable types will not be serialized and will be
692
+ treated as unsupported type and forwarded to default.
693
+ Additionally tuples will not be serialized as lists.
694
+ This is useful when trying to implement accurate serialization
695
+ for python types.
696
+
697
+ :param bool datetime:
698
+ If set to true, datetime with tzinfo is packed into Timestamp type.
699
+ Note that the tzinfo is stripped in the timestamp.
700
+ You can get UTC datetime with `timestamp=3` option of the Unpacker.
701
+ (Python 2 is not supported).
702
+
703
+ :param str unicode_errors:
704
+ The error handler for encoding unicode. (default: 'strict')
705
+ DO NOT USE THIS!! This option is kept for very specific usage.
706
+
707
+ Example of streaming deserialize from file-like object::
708
+
709
+ unpacker = Unpacker(file_like)
710
+ for o in unpacker:
711
+ process(o)
712
+
713
+ Example of streaming deserialize from socket::
714
+
715
+ unpacker = Unpacker()
716
+ while True:
717
+ buf = sock.recv(1024**2)
718
+ if not buf:
719
+ break
720
+ unpacker.feed(buf)
721
+ for o in unpacker:
722
+ process(o)
723
+
724
+ Raises ``ExtraData`` when *packed* contains extra bytes.
725
+ Raises ``OutOfData`` when *packed* is incomplete.
726
+ Raises ``FormatError`` when *packed* is not valid msgpack.
727
+ Raises ``StackError`` when *packed* contains too nested.
728
+ Other exceptions can be raised during unpacking.
729
+ """
730
+
731
+ def __init__(
732
+ self,
733
+ default=None,
734
+ use_single_float=False,
735
+ autoreset=True,
736
+ use_bin_type=True,
737
+ strict_types=False,
738
+ datetime=False,
739
+ unicode_errors=None,
740
+ ):
741
+ self._strict_types = strict_types
742
+ self._use_float = use_single_float
743
+ self._autoreset = autoreset
744
+ self._use_bin_type = use_bin_type
745
+ self._buffer = StringIO()
746
+ if PY2 and datetime:
747
+ raise ValueError("datetime is not supported in Python 2")
748
+ self._datetime = bool(datetime)
749
+ self._unicode_errors = unicode_errors or "strict"
750
+ if default is not None:
751
+ if not callable(default):
752
+ raise TypeError("default must be callable")
753
+ self._default = default
754
+
755
+ def _pack(
756
+ self,
757
+ obj,
758
+ nest_limit=DEFAULT_RECURSE_LIMIT,
759
+ check=isinstance,
760
+ check_type_strict=_check_type_strict,
761
+ ):
762
+ default_used = False
763
+ if self._strict_types:
764
+ check = check_type_strict
765
+ list_types = list
766
+ else:
767
+ list_types = (list, tuple)
768
+ while True:
769
+ if nest_limit < 0:
770
+ raise ValueError("recursion limit exceeded")
771
+ if obj is None:
772
+ return self._buffer.write(b"\xc0")
773
+ if check(obj, bool):
774
+ if obj:
775
+ return self._buffer.write(b"\xc3")
776
+ return self._buffer.write(b"\xc2")
777
+ if check(obj, int_types):
778
+ if 0 <= obj < 0x80:
779
+ return self._buffer.write(struct.pack("B", obj))
780
+ if -0x20 <= obj < 0:
781
+ return self._buffer.write(struct.pack("b", obj))
782
+ if 0x80 <= obj <= 0xFF:
783
+ return self._buffer.write(struct.pack("BB", 0xCC, obj))
784
+ if -0x80 <= obj < 0:
785
+ return self._buffer.write(struct.pack(">Bb", 0xD0, obj))
786
+ if 0xFF < obj <= 0xFFFF:
787
+ return self._buffer.write(struct.pack(">BH", 0xCD, obj))
788
+ if -0x8000 <= obj < -0x80:
789
+ return self._buffer.write(struct.pack(">Bh", 0xD1, obj))
790
+ if 0xFFFF < obj <= 0xFFFFFFFF:
791
+ return self._buffer.write(struct.pack(">BI", 0xCE, obj))
792
+ if -0x80000000 <= obj < -0x8000:
793
+ return self._buffer.write(struct.pack(">Bi", 0xD2, obj))
794
+ if 0xFFFFFFFF < obj <= 0xFFFFFFFFFFFFFFFF:
795
+ return self._buffer.write(struct.pack(">BQ", 0xCF, obj))
796
+ if -0x8000000000000000 <= obj < -0x80000000:
797
+ return self._buffer.write(struct.pack(">Bq", 0xD3, obj))
798
+ if not default_used and self._default is not None:
799
+ obj = self._default(obj)
800
+ default_used = True
801
+ continue
802
+ raise OverflowError("Integer value out of range")
803
+ if check(obj, (bytes, bytearray)):
804
+ n = len(obj)
805
+ if n >= 2**32:
806
+ raise ValueError("%s is too large" % type(obj).__name__)
807
+ self._pack_bin_header(n)
808
+ return self._buffer.write(obj)
809
+ if check(obj, unicode):
810
+ obj = obj.encode("utf-8", self._unicode_errors)
811
+ n = len(obj)
812
+ if n >= 2**32:
813
+ raise ValueError("String is too large")
814
+ self._pack_raw_header(n)
815
+ return self._buffer.write(obj)
816
+ if check(obj, memoryview):
817
+ n = obj.nbytes
818
+ if n >= 2**32:
819
+ raise ValueError("Memoryview is too large")
820
+ self._pack_bin_header(n)
821
+ return self._buffer.write(obj)
822
+ if check(obj, float):
823
+ if self._use_float:
824
+ return self._buffer.write(struct.pack(">Bf", 0xCA, obj))
825
+ return self._buffer.write(struct.pack(">Bd", 0xCB, obj))
826
+ if check(obj, (ExtType, Timestamp)):
827
+ if check(obj, Timestamp):
828
+ code = -1
829
+ data = obj.to_bytes()
830
+ else:
831
+ code = obj.code
832
+ data = obj.data
833
+ assert isinstance(code, int)
834
+ assert isinstance(data, bytes)
835
+ L = len(data)
836
+ if L == 1:
837
+ self._buffer.write(b"\xd4")
838
+ elif L == 2:
839
+ self._buffer.write(b"\xd5")
840
+ elif L == 4:
841
+ self._buffer.write(b"\xd6")
842
+ elif L == 8:
843
+ self._buffer.write(b"\xd7")
844
+ elif L == 16:
845
+ self._buffer.write(b"\xd8")
846
+ elif L <= 0xFF:
847
+ self._buffer.write(struct.pack(">BB", 0xC7, L))
848
+ elif L <= 0xFFFF:
849
+ self._buffer.write(struct.pack(">BH", 0xC8, L))
850
+ else:
851
+ self._buffer.write(struct.pack(">BI", 0xC9, L))
852
+ self._buffer.write(struct.pack("b", code))
853
+ self._buffer.write(data)
854
+ return
855
+ if check(obj, list_types):
856
+ n = len(obj)
857
+ self._pack_array_header(n)
858
+ for i in xrange(n):
859
+ self._pack(obj[i], nest_limit - 1)
860
+ return
861
+ if check(obj, dict):
862
+ return self._pack_map_pairs(
863
+ len(obj), dict_iteritems(obj), nest_limit - 1
864
+ )
865
+
866
+ if self._datetime and check(obj, _DateTime) and obj.tzinfo is not None:
867
+ obj = Timestamp.from_datetime(obj)
868
+ default_used = 1
869
+ continue
870
+
871
+ if not default_used and self._default is not None:
872
+ obj = self._default(obj)
873
+ default_used = 1
874
+ continue
875
+
876
+ if self._datetime and check(obj, _DateTime):
877
+ raise ValueError("Cannot serialize %r where tzinfo=None" % (obj,))
878
+
879
+ raise TypeError("Cannot serialize %r" % (obj,))
880
+
881
+ def pack(self, obj):
882
+ try:
883
+ self._pack(obj)
884
+ except:
885
+ self._buffer = StringIO() # force reset
886
+ raise
887
+ if self._autoreset:
888
+ ret = self._buffer.getvalue()
889
+ self._buffer = StringIO()
890
+ return ret
891
+
892
+ def pack_map_pairs(self, pairs):
893
+ self._pack_map_pairs(len(pairs), pairs)
894
+ if self._autoreset:
895
+ ret = self._buffer.getvalue()
896
+ self._buffer = StringIO()
897
+ return ret
898
+
899
+ def pack_array_header(self, n):
900
+ if n >= 2**32:
901
+ raise ValueError
902
+ self._pack_array_header(n)
903
+ if self._autoreset:
904
+ ret = self._buffer.getvalue()
905
+ self._buffer = StringIO()
906
+ return ret
907
+
908
+ def pack_map_header(self, n):
909
+ if n >= 2**32:
910
+ raise ValueError
911
+ self._pack_map_header(n)
912
+ if self._autoreset:
913
+ ret = self._buffer.getvalue()
914
+ self._buffer = StringIO()
915
+ return ret
916
+
917
+ def pack_ext_type(self, typecode, data):
918
+ if not isinstance(typecode, int):
919
+ raise TypeError("typecode must have int type.")
920
+ if not 0 <= typecode <= 127:
921
+ raise ValueError("typecode should be 0-127")
922
+ if not isinstance(data, bytes):
923
+ raise TypeError("data must have bytes type")
924
+ L = len(data)
925
+ if L > 0xFFFFFFFF:
926
+ raise ValueError("Too large data")
927
+ if L == 1:
928
+ self._buffer.write(b"\xd4")
929
+ elif L == 2:
930
+ self._buffer.write(b"\xd5")
931
+ elif L == 4:
932
+ self._buffer.write(b"\xd6")
933
+ elif L == 8:
934
+ self._buffer.write(b"\xd7")
935
+ elif L == 16:
936
+ self._buffer.write(b"\xd8")
937
+ elif L <= 0xFF:
938
+ self._buffer.write(b"\xc7" + struct.pack("B", L))
939
+ elif L <= 0xFFFF:
940
+ self._buffer.write(b"\xc8" + struct.pack(">H", L))
941
+ else:
942
+ self._buffer.write(b"\xc9" + struct.pack(">I", L))
943
+ self._buffer.write(struct.pack("B", typecode))
944
+ self._buffer.write(data)
945
+
946
+ def _pack_array_header(self, n):
947
+ if n <= 0x0F:
948
+ return self._buffer.write(struct.pack("B", 0x90 + n))
949
+ if n <= 0xFFFF:
950
+ return self._buffer.write(struct.pack(">BH", 0xDC, n))
951
+ if n <= 0xFFFFFFFF:
952
+ return self._buffer.write(struct.pack(">BI", 0xDD, n))
953
+ raise ValueError("Array is too large")
954
+
955
+ def _pack_map_header(self, n):
956
+ if n <= 0x0F:
957
+ return self._buffer.write(struct.pack("B", 0x80 + n))
958
+ if n <= 0xFFFF:
959
+ return self._buffer.write(struct.pack(">BH", 0xDE, n))
960
+ if n <= 0xFFFFFFFF:
961
+ return self._buffer.write(struct.pack(">BI", 0xDF, n))
962
+ raise ValueError("Dict is too large")
963
+
964
+ def _pack_map_pairs(self, n, pairs, nest_limit=DEFAULT_RECURSE_LIMIT):
965
+ self._pack_map_header(n)
966
+ for (k, v) in pairs:
967
+ self._pack(k, nest_limit - 1)
968
+ self._pack(v, nest_limit - 1)
969
+
970
+ def _pack_raw_header(self, n):
971
+ if n <= 0x1F:
972
+ self._buffer.write(struct.pack("B", 0xA0 + n))
973
+ elif self._use_bin_type and n <= 0xFF:
974
+ self._buffer.write(struct.pack(">BB", 0xD9, n))
975
+ elif n <= 0xFFFF:
976
+ self._buffer.write(struct.pack(">BH", 0xDA, n))
977
+ elif n <= 0xFFFFFFFF:
978
+ self._buffer.write(struct.pack(">BI", 0xDB, n))
979
+ else:
980
+ raise ValueError("Raw is too large")
981
+
982
+ def _pack_bin_header(self, n):
983
+ if not self._use_bin_type:
984
+ return self._pack_raw_header(n)
985
+ elif n <= 0xFF:
986
+ return self._buffer.write(struct.pack(">BB", 0xC4, n))
987
+ elif n <= 0xFFFF:
988
+ return self._buffer.write(struct.pack(">BH", 0xC5, n))
989
+ elif n <= 0xFFFFFFFF:
990
+ return self._buffer.write(struct.pack(">BI", 0xC6, n))
991
+ else:
992
+ raise ValueError("Bin is too large")
993
+
994
+ def bytes(self):
995
+ """Return internal buffer contents as bytes object"""
996
+ return self._buffer.getvalue()
997
+
998
+ def reset(self):
999
+ """Reset internal buffer.
1000
+
1001
+ This method is useful only when autoreset=False.
1002
+ """
1003
+ self._buffer = StringIO()
1004
+
1005
+ def getbuffer(self):
1006
+ """Return view of internal buffer."""
1007
+ if USING_STRINGBUILDER or PY2:
1008
+ return memoryview(self.bytes())
1009
+ else:
1010
+ return self._buffer.getbuffer()
venv/lib/python3.12/site-packages/pip/_vendor/platformdirs/__init__.py ADDED
@@ -0,0 +1,566 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Utilities for determining application-specific dirs. See <https://github.com/platformdirs/platformdirs> for details and
3
+ usage.
4
+ """
5
+ from __future__ import annotations
6
+
7
+ import os
8
+ import sys
9
+ from typing import TYPE_CHECKING
10
+
11
+ from .api import PlatformDirsABC
12
+ from .version import __version__
13
+ from .version import __version_tuple__ as __version_info__
14
+
15
+ if TYPE_CHECKING:
16
+ from pathlib import Path
17
+
18
+ if sys.version_info >= (3, 8): # pragma: no cover (py38+)
19
+ from typing import Literal
20
+ else: # pragma: no cover (py38+)
21
+ from pip._vendor.typing_extensions import Literal
22
+
23
+
24
+ def _set_platform_dir_class() -> type[PlatformDirsABC]:
25
+ if sys.platform == "win32":
26
+ from pip._vendor.platformdirs.windows import Windows as Result
27
+ elif sys.platform == "darwin":
28
+ from pip._vendor.platformdirs.macos import MacOS as Result
29
+ else:
30
+ from pip._vendor.platformdirs.unix import Unix as Result
31
+
32
+ if os.getenv("ANDROID_DATA") == "/data" and os.getenv("ANDROID_ROOT") == "/system":
33
+ if os.getenv("SHELL") or os.getenv("PREFIX"):
34
+ return Result
35
+
36
+ from pip._vendor.platformdirs.android import _android_folder
37
+
38
+ if _android_folder() is not None:
39
+ from pip._vendor.platformdirs.android import Android
40
+
41
+ return Android # return to avoid redefinition of result
42
+
43
+ return Result
44
+
45
+
46
+ PlatformDirs = _set_platform_dir_class() #: Currently active platform
47
+ AppDirs = PlatformDirs #: Backwards compatibility with appdirs
48
+
49
+
50
+ def user_data_dir(
51
+ appname: str | None = None,
52
+ appauthor: str | None | Literal[False] = None,
53
+ version: str | None = None,
54
+ roaming: bool = False, # noqa: FBT001, FBT002
55
+ ensure_exists: bool = False, # noqa: FBT001, FBT002
56
+ ) -> str:
57
+ """
58
+ :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
59
+ :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
60
+ :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
61
+ :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.roaming>`.
62
+ :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
63
+ :returns: data directory tied to the user
64
+ """
65
+ return PlatformDirs(
66
+ appname=appname,
67
+ appauthor=appauthor,
68
+ version=version,
69
+ roaming=roaming,
70
+ ensure_exists=ensure_exists,
71
+ ).user_data_dir
72
+
73
+
74
+ def site_data_dir(
75
+ appname: str | None = None,
76
+ appauthor: str | None | Literal[False] = None,
77
+ version: str | None = None,
78
+ multipath: bool = False, # noqa: FBT001, FBT002
79
+ ensure_exists: bool = False, # noqa: FBT001, FBT002
80
+ ) -> str:
81
+ """
82
+ :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
83
+ :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
84
+ :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
85
+ :param multipath: See `roaming <platformdirs.api.PlatformDirsABC.multipath>`.
86
+ :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
87
+ :returns: data directory shared by users
88
+ """
89
+ return PlatformDirs(
90
+ appname=appname,
91
+ appauthor=appauthor,
92
+ version=version,
93
+ multipath=multipath,
94
+ ensure_exists=ensure_exists,
95
+ ).site_data_dir
96
+
97
+
98
+ def user_config_dir(
99
+ appname: str | None = None,
100
+ appauthor: str | None | Literal[False] = None,
101
+ version: str | None = None,
102
+ roaming: bool = False, # noqa: FBT001, FBT002
103
+ ensure_exists: bool = False, # noqa: FBT001, FBT002
104
+ ) -> str:
105
+ """
106
+ :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
107
+ :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
108
+ :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
109
+ :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.roaming>`.
110
+ :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
111
+ :returns: config directory tied to the user
112
+ """
113
+ return PlatformDirs(
114
+ appname=appname,
115
+ appauthor=appauthor,
116
+ version=version,
117
+ roaming=roaming,
118
+ ensure_exists=ensure_exists,
119
+ ).user_config_dir
120
+
121
+
122
+ def site_config_dir(
123
+ appname: str | None = None,
124
+ appauthor: str | None | Literal[False] = None,
125
+ version: str | None = None,
126
+ multipath: bool = False, # noqa: FBT001, FBT002
127
+ ensure_exists: bool = False, # noqa: FBT001, FBT002
128
+ ) -> str:
129
+ """
130
+ :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
131
+ :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
132
+ :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
133
+ :param multipath: See `roaming <platformdirs.api.PlatformDirsABC.multipath>`.
134
+ :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
135
+ :returns: config directory shared by the users
136
+ """
137
+ return PlatformDirs(
138
+ appname=appname,
139
+ appauthor=appauthor,
140
+ version=version,
141
+ multipath=multipath,
142
+ ensure_exists=ensure_exists,
143
+ ).site_config_dir
144
+
145
+
146
+ def user_cache_dir(
147
+ appname: str | None = None,
148
+ appauthor: str | None | Literal[False] = None,
149
+ version: str | None = None,
150
+ opinion: bool = True, # noqa: FBT001, FBT002
151
+ ensure_exists: bool = False, # noqa: FBT001, FBT002
152
+ ) -> str:
153
+ """
154
+ :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
155
+ :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
156
+ :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
157
+ :param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
158
+ :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
159
+ :returns: cache directory tied to the user
160
+ """
161
+ return PlatformDirs(
162
+ appname=appname,
163
+ appauthor=appauthor,
164
+ version=version,
165
+ opinion=opinion,
166
+ ensure_exists=ensure_exists,
167
+ ).user_cache_dir
168
+
169
+
170
+ def site_cache_dir(
171
+ appname: str | None = None,
172
+ appauthor: str | None | Literal[False] = None,
173
+ version: str | None = None,
174
+ opinion: bool = True, # noqa: FBT001, FBT002
175
+ ensure_exists: bool = False, # noqa: FBT001, FBT002
176
+ ) -> str:
177
+ """
178
+ :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
179
+ :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
180
+ :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
181
+ :param opinion: See `opinion <platformdirs.api.PlatformDirsABC.opinion>`.
182
+ :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
183
+ :returns: cache directory tied to the user
184
+ """
185
+ return PlatformDirs(
186
+ appname=appname,
187
+ appauthor=appauthor,
188
+ version=version,
189
+ opinion=opinion,
190
+ ensure_exists=ensure_exists,
191
+ ).site_cache_dir
192
+
193
+
194
+ def user_state_dir(
195
+ appname: str | None = None,
196
+ appauthor: str | None | Literal[False] = None,
197
+ version: str | None = None,
198
+ roaming: bool = False, # noqa: FBT001, FBT002
199
+ ensure_exists: bool = False, # noqa: FBT001, FBT002
200
+ ) -> str:
201
+ """
202
+ :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
203
+ :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
204
+ :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
205
+ :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.roaming>`.
206
+ :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
207
+ :returns: state directory tied to the user
208
+ """
209
+ return PlatformDirs(
210
+ appname=appname,
211
+ appauthor=appauthor,
212
+ version=version,
213
+ roaming=roaming,
214
+ ensure_exists=ensure_exists,
215
+ ).user_state_dir
216
+
217
+
218
+ def user_log_dir(
219
+ appname: str | None = None,
220
+ appauthor: str | None | Literal[False] = None,
221
+ version: str | None = None,
222
+ opinion: bool = True, # noqa: FBT001, FBT002
223
+ ensure_exists: bool = False, # noqa: FBT001, FBT002
224
+ ) -> str:
225
+ """
226
+ :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
227
+ :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
228
+ :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
229
+ :param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
230
+ :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
231
+ :returns: log directory tied to the user
232
+ """
233
+ return PlatformDirs(
234
+ appname=appname,
235
+ appauthor=appauthor,
236
+ version=version,
237
+ opinion=opinion,
238
+ ensure_exists=ensure_exists,
239
+ ).user_log_dir
240
+
241
+
242
+ def user_documents_dir() -> str:
243
+ """:returns: documents directory tied to the user"""
244
+ return PlatformDirs().user_documents_dir
245
+
246
+
247
+ def user_downloads_dir() -> str:
248
+ """:returns: downloads directory tied to the user"""
249
+ return PlatformDirs().user_downloads_dir
250
+
251
+
252
+ def user_pictures_dir() -> str:
253
+ """:returns: pictures directory tied to the user"""
254
+ return PlatformDirs().user_pictures_dir
255
+
256
+
257
+ def user_videos_dir() -> str:
258
+ """:returns: videos directory tied to the user"""
259
+ return PlatformDirs().user_videos_dir
260
+
261
+
262
+ def user_music_dir() -> str:
263
+ """:returns: music directory tied to the user"""
264
+ return PlatformDirs().user_music_dir
265
+
266
+
267
+ def user_runtime_dir(
268
+ appname: str | None = None,
269
+ appauthor: str | None | Literal[False] = None,
270
+ version: str | None = None,
271
+ opinion: bool = True, # noqa: FBT001, FBT002
272
+ ensure_exists: bool = False, # noqa: FBT001, FBT002
273
+ ) -> str:
274
+ """
275
+ :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
276
+ :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
277
+ :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
278
+ :param opinion: See `opinion <platformdirs.api.PlatformDirsABC.opinion>`.
279
+ :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
280
+ :returns: runtime directory tied to the user
281
+ """
282
+ return PlatformDirs(
283
+ appname=appname,
284
+ appauthor=appauthor,
285
+ version=version,
286
+ opinion=opinion,
287
+ ensure_exists=ensure_exists,
288
+ ).user_runtime_dir
289
+
290
+
291
+ def user_data_path(
292
+ appname: str | None = None,
293
+ appauthor: str | None | Literal[False] = None,
294
+ version: str | None = None,
295
+ roaming: bool = False, # noqa: FBT001, FBT002
296
+ ensure_exists: bool = False, # noqa: FBT001, FBT002
297
+ ) -> Path:
298
+ """
299
+ :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
300
+ :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
301
+ :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
302
+ :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.roaming>`.
303
+ :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
304
+ :returns: data path tied to the user
305
+ """
306
+ return PlatformDirs(
307
+ appname=appname,
308
+ appauthor=appauthor,
309
+ version=version,
310
+ roaming=roaming,
311
+ ensure_exists=ensure_exists,
312
+ ).user_data_path
313
+
314
+
315
+ def site_data_path(
316
+ appname: str | None = None,
317
+ appauthor: str | None | Literal[False] = None,
318
+ version: str | None = None,
319
+ multipath: bool = False, # noqa: FBT001, FBT002
320
+ ensure_exists: bool = False, # noqa: FBT001, FBT002
321
+ ) -> Path:
322
+ """
323
+ :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
324
+ :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
325
+ :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
326
+ :param multipath: See `multipath <platformdirs.api.PlatformDirsABC.multipath>`.
327
+ :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
328
+ :returns: data path shared by users
329
+ """
330
+ return PlatformDirs(
331
+ appname=appname,
332
+ appauthor=appauthor,
333
+ version=version,
334
+ multipath=multipath,
335
+ ensure_exists=ensure_exists,
336
+ ).site_data_path
337
+
338
+
339
+ def user_config_path(
340
+ appname: str | None = None,
341
+ appauthor: str | None | Literal[False] = None,
342
+ version: str | None = None,
343
+ roaming: bool = False, # noqa: FBT001, FBT002
344
+ ensure_exists: bool = False, # noqa: FBT001, FBT002
345
+ ) -> Path:
346
+ """
347
+ :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
348
+ :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
349
+ :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
350
+ :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.roaming>`.
351
+ :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
352
+ :returns: config path tied to the user
353
+ """
354
+ return PlatformDirs(
355
+ appname=appname,
356
+ appauthor=appauthor,
357
+ version=version,
358
+ roaming=roaming,
359
+ ensure_exists=ensure_exists,
360
+ ).user_config_path
361
+
362
+
363
+ def site_config_path(
364
+ appname: str | None = None,
365
+ appauthor: str | None | Literal[False] = None,
366
+ version: str | None = None,
367
+ multipath: bool = False, # noqa: FBT001, FBT002
368
+ ensure_exists: bool = False, # noqa: FBT001, FBT002
369
+ ) -> Path:
370
+ """
371
+ :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
372
+ :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
373
+ :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
374
+ :param multipath: See `roaming <platformdirs.api.PlatformDirsABC.multipath>`.
375
+ :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
376
+ :returns: config path shared by the users
377
+ """
378
+ return PlatformDirs(
379
+ appname=appname,
380
+ appauthor=appauthor,
381
+ version=version,
382
+ multipath=multipath,
383
+ ensure_exists=ensure_exists,
384
+ ).site_config_path
385
+
386
+
387
+ def site_cache_path(
388
+ appname: str | None = None,
389
+ appauthor: str | None | Literal[False] = None,
390
+ version: str | None = None,
391
+ opinion: bool = True, # noqa: FBT001, FBT002
392
+ ensure_exists: bool = False, # noqa: FBT001, FBT002
393
+ ) -> Path:
394
+ """
395
+ :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
396
+ :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
397
+ :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
398
+ :param opinion: See `opinion <platformdirs.api.PlatformDirsABC.opinion>`.
399
+ :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
400
+ :returns: cache directory tied to the user
401
+ """
402
+ return PlatformDirs(
403
+ appname=appname,
404
+ appauthor=appauthor,
405
+ version=version,
406
+ opinion=opinion,
407
+ ensure_exists=ensure_exists,
408
+ ).site_cache_path
409
+
410
+
411
+ def user_cache_path(
412
+ appname: str | None = None,
413
+ appauthor: str | None | Literal[False] = None,
414
+ version: str | None = None,
415
+ opinion: bool = True, # noqa: FBT001, FBT002
416
+ ensure_exists: bool = False, # noqa: FBT001, FBT002
417
+ ) -> Path:
418
+ """
419
+ :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
420
+ :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
421
+ :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
422
+ :param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
423
+ :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
424
+ :returns: cache path tied to the user
425
+ """
426
+ return PlatformDirs(
427
+ appname=appname,
428
+ appauthor=appauthor,
429
+ version=version,
430
+ opinion=opinion,
431
+ ensure_exists=ensure_exists,
432
+ ).user_cache_path
433
+
434
+
435
+ def user_state_path(
436
+ appname: str | None = None,
437
+ appauthor: str | None | Literal[False] = None,
438
+ version: str | None = None,
439
+ roaming: bool = False, # noqa: FBT001, FBT002
440
+ ensure_exists: bool = False, # noqa: FBT001, FBT002
441
+ ) -> Path:
442
+ """
443
+ :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
444
+ :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
445
+ :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
446
+ :param roaming: See `roaming <platformdirs.api.PlatformDirsABC.roaming>`.
447
+ :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
448
+ :returns: state path tied to the user
449
+ """
450
+ return PlatformDirs(
451
+ appname=appname,
452
+ appauthor=appauthor,
453
+ version=version,
454
+ roaming=roaming,
455
+ ensure_exists=ensure_exists,
456
+ ).user_state_path
457
+
458
+
459
+ def user_log_path(
460
+ appname: str | None = None,
461
+ appauthor: str | None | Literal[False] = None,
462
+ version: str | None = None,
463
+ opinion: bool = True, # noqa: FBT001, FBT002
464
+ ensure_exists: bool = False, # noqa: FBT001, FBT002
465
+ ) -> Path:
466
+ """
467
+ :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
468
+ :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
469
+ :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
470
+ :param opinion: See `roaming <platformdirs.api.PlatformDirsABC.opinion>`.
471
+ :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
472
+ :returns: log path tied to the user
473
+ """
474
+ return PlatformDirs(
475
+ appname=appname,
476
+ appauthor=appauthor,
477
+ version=version,
478
+ opinion=opinion,
479
+ ensure_exists=ensure_exists,
480
+ ).user_log_path
481
+
482
+
483
+ def user_documents_path() -> Path:
484
+ """:returns: documents path tied to the user"""
485
+ return PlatformDirs().user_documents_path
486
+
487
+
488
+ def user_downloads_path() -> Path:
489
+ """:returns: downloads path tied to the user"""
490
+ return PlatformDirs().user_downloads_path
491
+
492
+
493
+ def user_pictures_path() -> Path:
494
+ """:returns: pictures path tied to the user"""
495
+ return PlatformDirs().user_pictures_path
496
+
497
+
498
+ def user_videos_path() -> Path:
499
+ """:returns: videos path tied to the user"""
500
+ return PlatformDirs().user_videos_path
501
+
502
+
503
+ def user_music_path() -> Path:
504
+ """:returns: music path tied to the user"""
505
+ return PlatformDirs().user_music_path
506
+
507
+
508
+ def user_runtime_path(
509
+ appname: str | None = None,
510
+ appauthor: str | None | Literal[False] = None,
511
+ version: str | None = None,
512
+ opinion: bool = True, # noqa: FBT001, FBT002
513
+ ensure_exists: bool = False, # noqa: FBT001, FBT002
514
+ ) -> Path:
515
+ """
516
+ :param appname: See `appname <platformdirs.api.PlatformDirsABC.appname>`.
517
+ :param appauthor: See `appauthor <platformdirs.api.PlatformDirsABC.appauthor>`.
518
+ :param version: See `version <platformdirs.api.PlatformDirsABC.version>`.
519
+ :param opinion: See `opinion <platformdirs.api.PlatformDirsABC.opinion>`.
520
+ :param ensure_exists: See `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
521
+ :returns: runtime path tied to the user
522
+ """
523
+ return PlatformDirs(
524
+ appname=appname,
525
+ appauthor=appauthor,
526
+ version=version,
527
+ opinion=opinion,
528
+ ensure_exists=ensure_exists,
529
+ ).user_runtime_path
530
+
531
+
532
+ __all__ = [
533
+ "__version__",
534
+ "__version_info__",
535
+ "PlatformDirs",
536
+ "AppDirs",
537
+ "PlatformDirsABC",
538
+ "user_data_dir",
539
+ "user_config_dir",
540
+ "user_cache_dir",
541
+ "user_state_dir",
542
+ "user_log_dir",
543
+ "user_documents_dir",
544
+ "user_downloads_dir",
545
+ "user_pictures_dir",
546
+ "user_videos_dir",
547
+ "user_music_dir",
548
+ "user_runtime_dir",
549
+ "site_data_dir",
550
+ "site_config_dir",
551
+ "site_cache_dir",
552
+ "user_data_path",
553
+ "user_config_path",
554
+ "user_cache_path",
555
+ "user_state_path",
556
+ "user_log_path",
557
+ "user_documents_path",
558
+ "user_downloads_path",
559
+ "user_pictures_path",
560
+ "user_videos_path",
561
+ "user_music_path",
562
+ "user_runtime_path",
563
+ "site_data_path",
564
+ "site_config_path",
565
+ "site_cache_path",
566
+ ]
venv/lib/python3.12/site-packages/pip/_vendor/platformdirs/__main__.py ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Main entry point."""
2
+ from __future__ import annotations
3
+
4
+ from pip._vendor.platformdirs import PlatformDirs, __version__
5
+
6
+ PROPS = (
7
+ "user_data_dir",
8
+ "user_config_dir",
9
+ "user_cache_dir",
10
+ "user_state_dir",
11
+ "user_log_dir",
12
+ "user_documents_dir",
13
+ "user_downloads_dir",
14
+ "user_pictures_dir",
15
+ "user_videos_dir",
16
+ "user_music_dir",
17
+ "user_runtime_dir",
18
+ "site_data_dir",
19
+ "site_config_dir",
20
+ "site_cache_dir",
21
+ )
22
+
23
+
24
+ def main() -> None:
25
+ """Run main entry point."""
26
+ app_name = "MyApp"
27
+ app_author = "MyCompany"
28
+
29
+ print(f"-- platformdirs {__version__} --") # noqa: T201
30
+
31
+ print("-- app dirs (with optional 'version')") # noqa: T201
32
+ dirs = PlatformDirs(app_name, app_author, version="1.0")
33
+ for prop in PROPS:
34
+ print(f"{prop}: {getattr(dirs, prop)}") # noqa: T201
35
+
36
+ print("\n-- app dirs (without optional 'version')") # noqa: T201
37
+ dirs = PlatformDirs(app_name, app_author)
38
+ for prop in PROPS:
39
+ print(f"{prop}: {getattr(dirs, prop)}") # noqa: T201
40
+
41
+ print("\n-- app dirs (without optional 'appauthor')") # noqa: T201
42
+ dirs = PlatformDirs(app_name)
43
+ for prop in PROPS:
44
+ print(f"{prop}: {getattr(dirs, prop)}") # noqa: T201
45
+
46
+ print("\n-- app dirs (with disabled 'appauthor')") # noqa: T201
47
+ dirs = PlatformDirs(app_name, appauthor=False)
48
+ for prop in PROPS:
49
+ print(f"{prop}: {getattr(dirs, prop)}") # noqa: T201
50
+
51
+
52
+ if __name__ == "__main__":
53
+ main()
venv/lib/python3.12/site-packages/pip/_vendor/platformdirs/android.py ADDED
@@ -0,0 +1,210 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Android."""
2
+ from __future__ import annotations
3
+
4
+ import os
5
+ import re
6
+ import sys
7
+ from functools import lru_cache
8
+ from typing import cast
9
+
10
+ from .api import PlatformDirsABC
11
+
12
+
13
+ class Android(PlatformDirsABC):
14
+ """
15
+ Follows the guidance `from here <https://android.stackexchange.com/a/216132>`_. Makes use of the
16
+ `appname <platformdirs.api.PlatformDirsABC.appname>`,
17
+ `version <platformdirs.api.PlatformDirsABC.version>`,
18
+ `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
19
+ """
20
+
21
+ @property
22
+ def user_data_dir(self) -> str:
23
+ """:return: data directory tied to the user, e.g. ``/data/user/<userid>/<packagename>/files/<AppName>``"""
24
+ return self._append_app_name_and_version(cast(str, _android_folder()), "files")
25
+
26
+ @property
27
+ def site_data_dir(self) -> str:
28
+ """:return: data directory shared by users, same as `user_data_dir`"""
29
+ return self.user_data_dir
30
+
31
+ @property
32
+ def user_config_dir(self) -> str:
33
+ """
34
+ :return: config directory tied to the user, e.g. \
35
+ ``/data/user/<userid>/<packagename>/shared_prefs/<AppName>``
36
+ """
37
+ return self._append_app_name_and_version(cast(str, _android_folder()), "shared_prefs")
38
+
39
+ @property
40
+ def site_config_dir(self) -> str:
41
+ """:return: config directory shared by the users, same as `user_config_dir`"""
42
+ return self.user_config_dir
43
+
44
+ @property
45
+ def user_cache_dir(self) -> str:
46
+ """:return: cache directory tied to the user, e.g. e.g. ``/data/user/<userid>/<packagename>/cache/<AppName>``"""
47
+ return self._append_app_name_and_version(cast(str, _android_folder()), "cache")
48
+
49
+ @property
50
+ def site_cache_dir(self) -> str:
51
+ """:return: cache directory shared by users, same as `user_cache_dir`"""
52
+ return self.user_cache_dir
53
+
54
+ @property
55
+ def user_state_dir(self) -> str:
56
+ """:return: state directory tied to the user, same as `user_data_dir`"""
57
+ return self.user_data_dir
58
+
59
+ @property
60
+ def user_log_dir(self) -> str:
61
+ """
62
+ :return: log directory tied to the user, same as `user_cache_dir` if not opinionated else ``log`` in it,
63
+ e.g. ``/data/user/<userid>/<packagename>/cache/<AppName>/log``
64
+ """
65
+ path = self.user_cache_dir
66
+ if self.opinion:
67
+ path = os.path.join(path, "log") # noqa: PTH118
68
+ return path
69
+
70
+ @property
71
+ def user_documents_dir(self) -> str:
72
+ """:return: documents directory tied to the user e.g. ``/storage/emulated/0/Documents``"""
73
+ return _android_documents_folder()
74
+
75
+ @property
76
+ def user_downloads_dir(self) -> str:
77
+ """:return: downloads directory tied to the user e.g. ``/storage/emulated/0/Downloads``"""
78
+ return _android_downloads_folder()
79
+
80
+ @property
81
+ def user_pictures_dir(self) -> str:
82
+ """:return: pictures directory tied to the user e.g. ``/storage/emulated/0/Pictures``"""
83
+ return _android_pictures_folder()
84
+
85
+ @property
86
+ def user_videos_dir(self) -> str:
87
+ """:return: videos directory tied to the user e.g. ``/storage/emulated/0/DCIM/Camera``"""
88
+ return _android_videos_folder()
89
+
90
+ @property
91
+ def user_music_dir(self) -> str:
92
+ """:return: music directory tied to the user e.g. ``/storage/emulated/0/Music``"""
93
+ return _android_music_folder()
94
+
95
+ @property
96
+ def user_runtime_dir(self) -> str:
97
+ """
98
+ :return: runtime directory tied to the user, same as `user_cache_dir` if not opinionated else ``tmp`` in it,
99
+ e.g. ``/data/user/<userid>/<packagename>/cache/<AppName>/tmp``
100
+ """
101
+ path = self.user_cache_dir
102
+ if self.opinion:
103
+ path = os.path.join(path, "tmp") # noqa: PTH118
104
+ return path
105
+
106
+
107
+ @lru_cache(maxsize=1)
108
+ def _android_folder() -> str | None:
109
+ """:return: base folder for the Android OS or None if it cannot be found"""
110
+ try:
111
+ # First try to get path to android app via pyjnius
112
+ from jnius import autoclass
113
+
114
+ context = autoclass("android.content.Context")
115
+ result: str | None = context.getFilesDir().getParentFile().getAbsolutePath()
116
+ except Exception: # noqa: BLE001
117
+ # if fails find an android folder looking path on the sys.path
118
+ pattern = re.compile(r"/data/(data|user/\d+)/(.+)/files")
119
+ for path in sys.path:
120
+ if pattern.match(path):
121
+ result = path.split("/files")[0]
122
+ break
123
+ else:
124
+ result = None
125
+ return result
126
+
127
+
128
+ @lru_cache(maxsize=1)
129
+ def _android_documents_folder() -> str:
130
+ """:return: documents folder for the Android OS"""
131
+ # Get directories with pyjnius
132
+ try:
133
+ from jnius import autoclass
134
+
135
+ context = autoclass("android.content.Context")
136
+ environment = autoclass("android.os.Environment")
137
+ documents_dir: str = context.getExternalFilesDir(environment.DIRECTORY_DOCUMENTS).getAbsolutePath()
138
+ except Exception: # noqa: BLE001
139
+ documents_dir = "/storage/emulated/0/Documents"
140
+
141
+ return documents_dir
142
+
143
+
144
+ @lru_cache(maxsize=1)
145
+ def _android_downloads_folder() -> str:
146
+ """:return: downloads folder for the Android OS"""
147
+ # Get directories with pyjnius
148
+ try:
149
+ from jnius import autoclass
150
+
151
+ context = autoclass("android.content.Context")
152
+ environment = autoclass("android.os.Environment")
153
+ downloads_dir: str = context.getExternalFilesDir(environment.DIRECTORY_DOWNLOADS).getAbsolutePath()
154
+ except Exception: # noqa: BLE001
155
+ downloads_dir = "/storage/emulated/0/Downloads"
156
+
157
+ return downloads_dir
158
+
159
+
160
+ @lru_cache(maxsize=1)
161
+ def _android_pictures_folder() -> str:
162
+ """:return: pictures folder for the Android OS"""
163
+ # Get directories with pyjnius
164
+ try:
165
+ from jnius import autoclass
166
+
167
+ context = autoclass("android.content.Context")
168
+ environment = autoclass("android.os.Environment")
169
+ pictures_dir: str = context.getExternalFilesDir(environment.DIRECTORY_PICTURES).getAbsolutePath()
170
+ except Exception: # noqa: BLE001
171
+ pictures_dir = "/storage/emulated/0/Pictures"
172
+
173
+ return pictures_dir
174
+
175
+
176
+ @lru_cache(maxsize=1)
177
+ def _android_videos_folder() -> str:
178
+ """:return: videos folder for the Android OS"""
179
+ # Get directories with pyjnius
180
+ try:
181
+ from jnius import autoclass
182
+
183
+ context = autoclass("android.content.Context")
184
+ environment = autoclass("android.os.Environment")
185
+ videos_dir: str = context.getExternalFilesDir(environment.DIRECTORY_DCIM).getAbsolutePath()
186
+ except Exception: # noqa: BLE001
187
+ videos_dir = "/storage/emulated/0/DCIM/Camera"
188
+
189
+ return videos_dir
190
+
191
+
192
+ @lru_cache(maxsize=1)
193
+ def _android_music_folder() -> str:
194
+ """:return: music folder for the Android OS"""
195
+ # Get directories with pyjnius
196
+ try:
197
+ from jnius import autoclass
198
+
199
+ context = autoclass("android.content.Context")
200
+ environment = autoclass("android.os.Environment")
201
+ music_dir: str = context.getExternalFilesDir(environment.DIRECTORY_MUSIC).getAbsolutePath()
202
+ except Exception: # noqa: BLE001
203
+ music_dir = "/storage/emulated/0/Music"
204
+
205
+ return music_dir
206
+
207
+
208
+ __all__ = [
209
+ "Android",
210
+ ]
venv/lib/python3.12/site-packages/pip/_vendor/platformdirs/api.py ADDED
@@ -0,0 +1,223 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Base API."""
2
+ from __future__ import annotations
3
+
4
+ import os
5
+ from abc import ABC, abstractmethod
6
+ from pathlib import Path
7
+ from typing import TYPE_CHECKING
8
+
9
+ if TYPE_CHECKING:
10
+ import sys
11
+
12
+ if sys.version_info >= (3, 8): # pragma: no cover (py38+)
13
+ from typing import Literal
14
+ else: # pragma: no cover (py38+)
15
+ from pip._vendor.typing_extensions import Literal
16
+
17
+
18
+ class PlatformDirsABC(ABC):
19
+ """Abstract base class for platform directories."""
20
+
21
+ def __init__( # noqa: PLR0913
22
+ self,
23
+ appname: str | None = None,
24
+ appauthor: str | None | Literal[False] = None,
25
+ version: str | None = None,
26
+ roaming: bool = False, # noqa: FBT001, FBT002
27
+ multipath: bool = False, # noqa: FBT001, FBT002
28
+ opinion: bool = True, # noqa: FBT001, FBT002
29
+ ensure_exists: bool = False, # noqa: FBT001, FBT002
30
+ ) -> None:
31
+ """
32
+ Create a new platform directory.
33
+
34
+ :param appname: See `appname`.
35
+ :param appauthor: See `appauthor`.
36
+ :param version: See `version`.
37
+ :param roaming: See `roaming`.
38
+ :param multipath: See `multipath`.
39
+ :param opinion: See `opinion`.
40
+ :param ensure_exists: See `ensure_exists`.
41
+ """
42
+ self.appname = appname #: The name of application.
43
+ self.appauthor = appauthor
44
+ """
45
+ The name of the app author or distributing body for this application. Typically, it is the owning company name.
46
+ Defaults to `appname`. You may pass ``False`` to disable it.
47
+ """
48
+ self.version = version
49
+ """
50
+ An optional version path element to append to the path. You might want to use this if you want multiple versions
51
+ of your app to be able to run independently. If used, this would typically be ``<major>.<minor>``.
52
+ """
53
+ self.roaming = roaming
54
+ """
55
+ Whether to use the roaming appdata directory on Windows. That means that for users on a Windows network setup
56
+ for roaming profiles, this user data will be synced on login (see
57
+ `here <http://technet.microsoft.com/en-us/library/cc766489(WS.10).aspx>`_).
58
+ """
59
+ self.multipath = multipath
60
+ """
61
+ An optional parameter only applicable to Unix/Linux which indicates that the entire list of data dirs should be
62
+ returned. By default, the first item would only be returned.
63
+ """
64
+ self.opinion = opinion #: A flag to indicating to use opinionated values.
65
+ self.ensure_exists = ensure_exists
66
+ """
67
+ Optionally create the directory (and any missing parents) upon access if it does not exist.
68
+ By default, no directories are created.
69
+ """
70
+
71
+ def _append_app_name_and_version(self, *base: str) -> str:
72
+ params = list(base[1:])
73
+ if self.appname:
74
+ params.append(self.appname)
75
+ if self.version:
76
+ params.append(self.version)
77
+ path = os.path.join(base[0], *params) # noqa: PTH118
78
+ self._optionally_create_directory(path)
79
+ return path
80
+
81
+ def _optionally_create_directory(self, path: str) -> None:
82
+ if self.ensure_exists:
83
+ Path(path).mkdir(parents=True, exist_ok=True)
84
+
85
+ @property
86
+ @abstractmethod
87
+ def user_data_dir(self) -> str:
88
+ """:return: data directory tied to the user"""
89
+
90
+ @property
91
+ @abstractmethod
92
+ def site_data_dir(self) -> str:
93
+ """:return: data directory shared by users"""
94
+
95
+ @property
96
+ @abstractmethod
97
+ def user_config_dir(self) -> str:
98
+ """:return: config directory tied to the user"""
99
+
100
+ @property
101
+ @abstractmethod
102
+ def site_config_dir(self) -> str:
103
+ """:return: config directory shared by the users"""
104
+
105
+ @property
106
+ @abstractmethod
107
+ def user_cache_dir(self) -> str:
108
+ """:return: cache directory tied to the user"""
109
+
110
+ @property
111
+ @abstractmethod
112
+ def site_cache_dir(self) -> str:
113
+ """:return: cache directory shared by users"""
114
+
115
+ @property
116
+ @abstractmethod
117
+ def user_state_dir(self) -> str:
118
+ """:return: state directory tied to the user"""
119
+
120
+ @property
121
+ @abstractmethod
122
+ def user_log_dir(self) -> str:
123
+ """:return: log directory tied to the user"""
124
+
125
+ @property
126
+ @abstractmethod
127
+ def user_documents_dir(self) -> str:
128
+ """:return: documents directory tied to the user"""
129
+
130
+ @property
131
+ @abstractmethod
132
+ def user_downloads_dir(self) -> str:
133
+ """:return: downloads directory tied to the user"""
134
+
135
+ @property
136
+ @abstractmethod
137
+ def user_pictures_dir(self) -> str:
138
+ """:return: pictures directory tied to the user"""
139
+
140
+ @property
141
+ @abstractmethod
142
+ def user_videos_dir(self) -> str:
143
+ """:return: videos directory tied to the user"""
144
+
145
+ @property
146
+ @abstractmethod
147
+ def user_music_dir(self) -> str:
148
+ """:return: music directory tied to the user"""
149
+
150
+ @property
151
+ @abstractmethod
152
+ def user_runtime_dir(self) -> str:
153
+ """:return: runtime directory tied to the user"""
154
+
155
+ @property
156
+ def user_data_path(self) -> Path:
157
+ """:return: data path tied to the user"""
158
+ return Path(self.user_data_dir)
159
+
160
+ @property
161
+ def site_data_path(self) -> Path:
162
+ """:return: data path shared by users"""
163
+ return Path(self.site_data_dir)
164
+
165
+ @property
166
+ def user_config_path(self) -> Path:
167
+ """:return: config path tied to the user"""
168
+ return Path(self.user_config_dir)
169
+
170
+ @property
171
+ def site_config_path(self) -> Path:
172
+ """:return: config path shared by the users"""
173
+ return Path(self.site_config_dir)
174
+
175
+ @property
176
+ def user_cache_path(self) -> Path:
177
+ """:return: cache path tied to the user"""
178
+ return Path(self.user_cache_dir)
179
+
180
+ @property
181
+ def site_cache_path(self) -> Path:
182
+ """:return: cache path shared by users"""
183
+ return Path(self.site_cache_dir)
184
+
185
+ @property
186
+ def user_state_path(self) -> Path:
187
+ """:return: state path tied to the user"""
188
+ return Path(self.user_state_dir)
189
+
190
+ @property
191
+ def user_log_path(self) -> Path:
192
+ """:return: log path tied to the user"""
193
+ return Path(self.user_log_dir)
194
+
195
+ @property
196
+ def user_documents_path(self) -> Path:
197
+ """:return: documents path tied to the user"""
198
+ return Path(self.user_documents_dir)
199
+
200
+ @property
201
+ def user_downloads_path(self) -> Path:
202
+ """:return: downloads path tied to the user"""
203
+ return Path(self.user_downloads_dir)
204
+
205
+ @property
206
+ def user_pictures_path(self) -> Path:
207
+ """:return: pictures path tied to the user"""
208
+ return Path(self.user_pictures_dir)
209
+
210
+ @property
211
+ def user_videos_path(self) -> Path:
212
+ """:return: videos path tied to the user"""
213
+ return Path(self.user_videos_dir)
214
+
215
+ @property
216
+ def user_music_path(self) -> Path:
217
+ """:return: music path tied to the user"""
218
+ return Path(self.user_music_dir)
219
+
220
+ @property
221
+ def user_runtime_path(self) -> Path:
222
+ """:return: runtime path tied to the user"""
223
+ return Path(self.user_runtime_dir)
venv/lib/python3.12/site-packages/pip/_vendor/platformdirs/macos.py ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """macOS."""
2
+ from __future__ import annotations
3
+
4
+ import os.path
5
+
6
+ from .api import PlatformDirsABC
7
+
8
+
9
+ class MacOS(PlatformDirsABC):
10
+ """
11
+ Platform directories for the macOS operating system. Follows the guidance from `Apple documentation
12
+ <https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/MacOSXDirectories/MacOSXDirectories.html>`_.
13
+ Makes use of the `appname <platformdirs.api.PlatformDirsABC.appname>`,
14
+ `version <platformdirs.api.PlatformDirsABC.version>`,
15
+ `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
16
+ """
17
+
18
+ @property
19
+ def user_data_dir(self) -> str:
20
+ """:return: data directory tied to the user, e.g. ``~/Library/Application Support/$appname/$version``"""
21
+ return self._append_app_name_and_version(os.path.expanduser("~/Library/Application Support")) # noqa: PTH111
22
+
23
+ @property
24
+ def site_data_dir(self) -> str:
25
+ """:return: data directory shared by users, e.g. ``/Library/Application Support/$appname/$version``"""
26
+ return self._append_app_name_and_version("/Library/Application Support")
27
+
28
+ @property
29
+ def user_config_dir(self) -> str:
30
+ """:return: config directory tied to the user, same as `user_data_dir`"""
31
+ return self.user_data_dir
32
+
33
+ @property
34
+ def site_config_dir(self) -> str:
35
+ """:return: config directory shared by the users, same as `site_data_dir`"""
36
+ return self.site_data_dir
37
+
38
+ @property
39
+ def user_cache_dir(self) -> str:
40
+ """:return: cache directory tied to the user, e.g. ``~/Library/Caches/$appname/$version``"""
41
+ return self._append_app_name_and_version(os.path.expanduser("~/Library/Caches")) # noqa: PTH111
42
+
43
+ @property
44
+ def site_cache_dir(self) -> str:
45
+ """:return: cache directory shared by users, e.g. ``/Library/Caches/$appname/$version``"""
46
+ return self._append_app_name_and_version("/Library/Caches")
47
+
48
+ @property
49
+ def user_state_dir(self) -> str:
50
+ """:return: state directory tied to the user, same as `user_data_dir`"""
51
+ return self.user_data_dir
52
+
53
+ @property
54
+ def user_log_dir(self) -> str:
55
+ """:return: log directory tied to the user, e.g. ``~/Library/Logs/$appname/$version``"""
56
+ return self._append_app_name_and_version(os.path.expanduser("~/Library/Logs")) # noqa: PTH111
57
+
58
+ @property
59
+ def user_documents_dir(self) -> str:
60
+ """:return: documents directory tied to the user, e.g. ``~/Documents``"""
61
+ return os.path.expanduser("~/Documents") # noqa: PTH111
62
+
63
+ @property
64
+ def user_downloads_dir(self) -> str:
65
+ """:return: downloads directory tied to the user, e.g. ``~/Downloads``"""
66
+ return os.path.expanduser("~/Downloads") # noqa: PTH111
67
+
68
+ @property
69
+ def user_pictures_dir(self) -> str:
70
+ """:return: pictures directory tied to the user, e.g. ``~/Pictures``"""
71
+ return os.path.expanduser("~/Pictures") # noqa: PTH111
72
+
73
+ @property
74
+ def user_videos_dir(self) -> str:
75
+ """:return: videos directory tied to the user, e.g. ``~/Movies``"""
76
+ return os.path.expanduser("~/Movies") # noqa: PTH111
77
+
78
+ @property
79
+ def user_music_dir(self) -> str:
80
+ """:return: music directory tied to the user, e.g. ``~/Music``"""
81
+ return os.path.expanduser("~/Music") # noqa: PTH111
82
+
83
+ @property
84
+ def user_runtime_dir(self) -> str:
85
+ """:return: runtime directory tied to the user, e.g. ``~/Library/Caches/TemporaryItems/$appname/$version``"""
86
+ return self._append_app_name_and_version(os.path.expanduser("~/Library/Caches/TemporaryItems")) # noqa: PTH111
87
+
88
+
89
+ __all__ = [
90
+ "MacOS",
91
+ ]