+
    åûjæ
  ã                   óŽ   € R t ^ RIHt ^ RIHt ^ RIt^RIHtHtH	t	 ]	P                  ! ]4      tRR R lltRR R lltR	 R
 ltR# )z;Contains utilities to handle pagination on Huggingface Hub.)ÚIterable)ÚAnyN)Úhf_raise_for_statusÚhttp_backoffÚloggingc                óè   € V ^8„  d   QhR\         R\        \        \        \         \        3,          ,          ,          R\        R\
        R,          R\        \        \        \        3,          ,          /# ©é   ÚpathÚparamsÚheadersÚtimeoutNÚreturn)ÚstrÚdictÚlistÚtupler   Úfloatr   Úbool)Úformats   "Ú]C:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\huggingface_hub\utils\_pagination.pyÚ__annotate__r      sY   € ÷ *ñ *Ü
ð*Üœd¤5¬¬c¨¥?Õ3Õ3ð*Ü>Bð*ÜMRÐUYÍ\ð*äŒe”Dœ$�JÕÕ ñ*ó    c              #  ó2  "  € \        RWW#R7      p\        V4       \        V4      pVP                  4       VRJ 3x € VeU   \        P                  RV 24       \        RWRVR7      p\        V4       \        V4      pVP                  4       VRJ 3x € KX  R# 5i)a)  Fetch a list of models/datasets/spaces and paginate through results, page by page.

Same as [`paginate`] but results are yielded one page at a time as a tuple (page, finished).
It allows a caller to stop early (the remaining pages are then never requested) or to make
a decision in between two pages based on what has been fetched so far.

This is using the same "Link" header format as GitHub.
See:
- https://requests.readthedocs.io/en/latest/api/#requests.Response.links
- https://docs.github.com/en/rest/guides/traversing-with-pagination#link-header
ÚGET)r   r   r   Nz+Pagination detected. Requesting next page: )r   r   )r   r   Ú_get_next_pageÚjsonÚloggerÚdebug)r
   r   r   r   ÚrÚ	next_pages   &&&&  r   Ú_paginate_pagesr!      s”   é € ô 	�U˜D¸ÔR€AÜ˜Ôô ˜qÓ!€IØ
�&‰&‹(�I Ð%Ð
%Ò%à
Ò
Ü�‰ÐBÀ9À+ÐNÔOÜ˜ 	ÀGÔLˆÜ˜AÔÜ" 1Ó%ˆ	Ø�f‰f‹h˜	 TÐ)Ð)Ô)ñ  ùs   ‚BBc          
      ó°   € V ^8„  d   QhR\         R\        \        \        \         \        3,          ,          ,          R\        R\
        R,          R\        /# r   )r   r   r   r   r   r   r   )r   s   "r   r   r   8   sI   € ÷ 	ñ 	”3ð 	¤¤t¬E´#´s°(­OÕ'<Õ <ð 	Ätð 	ÔV[Ð^bÕVbð 	Ônvñ 	r   c              #  óR   "  € \        WW#R7       F  w  rET Rj  x€L
  K  	  R#  L
5i)a  Fetch a list of models/datasets/spaces and paginate through results.

This is using the same "Link" header format as GitHub.
See:
- https://requests.readthedocs.io/en/latest/api/#requests.Response.links
- https://docs.github.com/en/rest/guides/traversing-with-pagination#link-header
)r   N)r!   )r
   r   r   r   ÚpageÚ_s   &&&&  r   Úpaginater&   8   s%   é € ô # 4°×J‰ˆØ�Šó KÙùs   ‚'š%›'c                óR   € V ^8„  d   QhR\         P                  R\        R,          /# )r	   Úresponser   N)Úhttpx2ÚResponser   )r   s   "r   r   r   D   s"   € ÷ 5ñ 5œVŸ_™_ð 5´°tµñ 5r   c                 óX   € V P                   P                  R / 4      P                  R4      # )ÚnextÚurl)ÚlinksÚget)r(   s   &r   r   r   D   s$   € Ø�>‰>×Ñ˜f bÓ)×-Ñ-¨eÓ4Ð4r   )N)Ú__doc__Úcollections.abcr   Útypingr   r)   Ú r   r   r   Ú
get_loggerÚ__name__r   r!   r&   r   © r   r   Ú<module>r7      s;   ðñ Bå $Ý ã ç 8Ñ 8ð 
×	Ò	˜HÓ	%€÷*÷:	÷5r   