
    2yig                         d dl Z d dlZd dlmZ d dlZd dlZdede	fdZ
e
dddede j                  d	eege	f   d
e	de	f
dZy)    N)Callableurlreturnc                     t         j                  j                  | ddt        j                   i      }t         j                  j                  |      5 }|j                         cd d d        S # 1 sw Y   y xY w)Nz
User-Agentzmkdocs/)headers)urllibrequestRequestmkdocs__version__urlopenread)r   reqresps      T/var/www/html/content_weaver/venv/lib/python3.12/site-packages/mkdocs/utils/cache.pydownload_urlr   
   s`    
..
 
 |wvGYGYFZ=[.\
 
]C				$ yy{  s   A..A7s   # )downloadcommentcache_durationr   r   c                H    t         j                  j                  | |||      S )a  
    Downloads a file from the URL, stores it under ~/.cache/, and returns its content.

    For tracking the age of the content, a prefix is inserted into the stored file, rather than relying on mtime.

    Args:
        url: URL to use.
        download: Callback that will accept the URL and actually perform the download.
        cache_duration: How long to consider the URL content cached.
        comment: The appropriate comment prefix for this file format.
    r   r   r   r   )mkdocs_get_depscachedownload_and_cache_urlr   s       r   r   r      s+    $   777 8      )datetimeurllib.requestr   typingr   mkdocs_get_deps.cacher   r   strbytesr   	timedeltar    r   r   <module>r$      ss        c e  (4	&& ue|$	
  r   