
    $gg                         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dS )    N)Callableurlreturnc                     t           j                            | ddt          j         i          }t           j                            |          5 }|                                cd d d            S # 1 swxY w Y   d S )Nz
User-Agentzmkdocs/)headers)urllibrequestRequestmkdocs__version__urlopenread)r   reqresps      R/var/www/html/netbox-4.1.3/venv/lib/python3.11/site-packages/mkdocs/utils/cache.pydownload_urlr   
   s    
.
 
 |=[vGY=[=[.\
 
]
]C				$	$ yy{{                 s   A11A58A5s   # )downloadcommentcache_durationr   r   c                H    t           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$      s                   c e     (4  	& ue|$	
       r   