
    q"h?                     T    S SK r S SKrS SKrS SKrSSKJr  S\S\4S jrS\S\4S jr	g)	    N   )WINDOWSpathreturnc                     [         R                  R                  [         R                  R                  U 5      5      n [        R
                  R                  S[        R                  R                  U 5      5      nU$ )z\
Convert a path to a file: URL.  The path will be made absolute and have
quoted path parts.
file:)	osr   normpathabspathurllibparseurljoinrequestpathname2url)r   urls     J/var/www/html/env/lib/python3.13/site-packages/pip/_internal/utils/urls.pypath_to_urlr   	   sO    
 77BGGOOD12D
,,

w(C(CD(I
JCJ    r   c                    U R                  S5      (       d   SU < S35       e[        R                  R                  U 5      u  pn  nU(       a  US:X  a  SnO [        (       a  SU-   nO[        SU < 35      e[        R                  R                  X#-   5      n[        (       aD  U(       d=  [        U5      S:  a.  US	   S
:X  a%  US   [        R                  ;   a  USS S;   a  USS nU$ )z 
Convert a file: URL to a path.
r   z1You can only turn file: urls into filenames (not )	localhost z\\z8non-local file URIs are not supported on this platform:    r   /r         ):z:/N)
startswithr   r   urlsplitr   
ValueErrorr   url2pathnamelenstringascii_letters)r   _netlocr   s       r   url_to_pathr'      s     >>  D	:3'CD  #LL11#6AtQV{*	&FsgN
 	
 >>&&v}5D 	INGsNGv+++1I$ABxKr   )
r	   r#   urllib.parser   urllib.requestcompatr   strr   r'    r   r   <module>r-      s:    	    c c $S $S $r   