<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
U
    .e(                  !   @   s  d dl mZmZmZ d dlmZmZ d dlmZm	Z	 d dl
Z
d dlZd dlmZ ddlmZmZmZmZ ddlmZ dd	lmZ d d
lmZ zd dlmZ W n ek
r   eZY nX edd eD Zedd eD Zedd eD ZeeddgB ZdZej r(e!edd e"d d Z#n
e!eZ#e$ddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5g Z%e!d6Z&i Z'G d7d8 d8e(Z)d9d: Z*G d;d< d<e(Z+G d=d> d>e+Z,G d?d@ d@e-Z.G dAdB dBe(Z/G dCdD dDe(Z0dEdF Z1dS )G    )absolute_importdivisionunicode_literals)	text_typebinary_type)http_clienturllibN)webencodings   )EOFspaceCharactersasciiLettersasciiUppercase)_ReparseException)_utils)StringIO)BytesIOc                 C   s   g | ]}| d qS asciiencode.0item r   E/usr/lib/python3.8/site-packages/pip/_vendor/html5lib/_inputstream.py
<listcomp>   s     r   c                 C   s   g | ]}| d qS r   r   r   r   r   r   r      s     c                 C   s   g | ]}| d qS r   r   r   r   r   r   r      s        >   <u   [---﷐-﷯￾￿🿾🿿𯿾𯿿𿿾𿿿񏿾񏿿񟿾񟿿񯿾񯿿񿿾񿿿򏿾򏿿򟿾򟿿򯿾򯿿򿿾򿿿󏿾󏿿󟿾󟿿󯿾󯿿󿿾󿿿􏿾􏿿]z"\uD800-\uDFFF"]i i i i i i i i i i i i i i i i i	 i	 i
 i
 i i i i i i i i i i i i z[	- -/:-@\[-`{-~]c                   @   sH   e Zd ZdZdd Zdd Zdd Zdd	 Zd
d Zdd Z	dd Z
dS )BufferedStreamzBuffering for streams that do not have buffering of their own

    The buffer is implemented as a list of chunks on the assumption that
    joining many strings will be slow since it is O(n**2)
    c                 C   s   || _ g | _ddg| _d S )Nr   r   )streambufferposition)selfr"   r   r   r   __init__@   s    zBufferedStream.__init__c                 C   s<   d}| j d | jd  D ]}|t|7 }q|| jd 7 }|S Nr   r
   )r#   r$   len)r%   poschunkr   r   r   tellE   s
    zBufferedStream.tellc                 C   sD   |}d}t | j| |k r6|t | j| 8 }|d7 }q||g| _d S r'   )r(   r#   r$   )r%   r)   offsetir   r   r   seekL   s    
zBufferedStream.seekc                 C   sT   | j s| |S | jd t| j krF| jd t| j d krF| |S | |S d S )Nr   r
   r   )r#   _readStreamr$   r(   _readFromBuffer)r%   bytesr   r   r   readU   s    

zBufferedStream.readc                 C   s   t dd | jD S )Nc                 S   s   g | ]}t |qS r   )r(   r   r   r   r   r   _   s     z1BufferedStream._bufferedBytes.<locals>.<listcomp>)sumr#   r%   r   r   r   _bufferedBytes^   s    zBufferedStream._bufferedBytesc                 C   s<   | j |}| j| | jd  d7  < t|| jd< |S r'   )r"   r2   r#   appendr$   r(   )r%   r1   datar   r   r   r/   a   s
    zBufferedStream._readStreamc                 C   s   |}g }| j d }| j d }|t| jk r|dkr| j| }|t|| kr`|}||| g| _ n"t|| }|t|g| _ |d7 }|||||   ||8 }d}q|r|| | d|S )Nr   r
       )r$   r(   r#   r6   r/   join)r%   r1   ZremainingBytesrvZbufferIndexZbufferOffsetZbufferedDataZbytesToReadr   r   r   r0   h   s$    


zBufferedStream._readFromBufferN)__name__
__module____qualname____doc__r&   r+   r.   r2   r5   r/   r0   r   r   r   r   r!   9   s   		r!   c                 K   s   t | tjs(t | tjjr.t | jtjr.d}n&t| drJt | dt	}n
t | t	}|rdd |D }|rvt
d| t| f|S t| f|S d S )NFr2   r   c                 S   s   g | ]}| d r|qS )Z	_encoding)endswith)r   xr   r   r   r      s     
 z#HTMLInputStream.<locals>.<listcomp>z3Cannot set an encoding with a unicode input, set %r)
isinstancer   ZHTTPResponser   ZresponseZaddbasefphasattrr2   r   	TypeErrorHTMLUnicodeInputStreamHTMLBinaryInputStream)sourcekwargsZ	isUnicodeZ	encodingsr   r   r   HTMLInputStream   s    

rI   c                   @   sp   e Zd ZdZdZdd Zdd Zdd Zd	d
 Zdd Z	dd Z
dddZdd Zdd ZdddZdd ZdS )rE   Provides a unicode stream of characters to the HTMLTokenizer.

    This class takes care of character encoding and removing or replacing
    incorrect byte-sequences and also provides column and line tracking.

    i (  c                 C   sZ   t jsd| _ntddkr$| j| _n| j| _dg| _tddf| _| 	|| _
|   dS )  Initialises the HTMLInputStream.

        HTMLInputStream(source, [encoding]) -> Normalized stream from source
        for use by html5lib.

        source can be either a file-object, local filename or a string.

        The optional encoding parameter must be a string that indicates
        the encoding.  If specified, that encoding will be used,
        regardless of any BOM or later declaration (such as in a meta
        element)

        Nu   􏿿r
   r   utf-8certain)r   supports_lone_surrogatesreportCharacterErrorsr(   characterErrorsUCS4characterErrorsUCS2ZnewLineslookupEncodingcharEncoding
openStream
dataStreamreset)r%   rG   r   r   r   r&      s    
zHTMLUnicodeInputStream.__init__c                 C   s.   d| _ d| _d| _g | _d| _d| _d | _d S )N r   )r*   	chunkSizechunkOffseterrorsprevNumLinesprevNumCols_bufferedCharacterr4   r   r   r   rV      s    zHTMLUnicodeInputStream.resetc                 C   s   t |dr|}nt|}|S zvProduces a file object from source.

        source can be either a file object, local filename or a string.

        r2   )rC   r   r%   rG   r"   r   r   r   rT      s    
z!HTMLUnicodeInputStream.openStreamc                 C   sT   | j }|dd|}| j| }|dd|}|dkr@| j| }n||d  }||fS )N
r   r   r
   )r*   countr[   rfindr\   )r%   r,   r*   ZnLinesZpositionLineZlastLinePosZpositionColumnr   r   r   	_position   s    
z HTMLUnicodeInputStream._positionc                 C   s   |  | j\}}|d |fS )z:Returns (line, col) of the current position in the stream.r
   )rc   rY   )r%   linecolr   r   r   r$      s    zHTMLUnicodeInputStream.positionc                 C   s6   | j | jkr|  stS | j }| j| }|d | _ |S )zo Read one character from the stream or queue if available. Return
            EOF when EOF is reached.
        r
   )rY   rX   	readChunkr   r*   )r%   rY   charr   r   r   rg      s    

zHTMLUnicodeInputStream.charNc                 C   s   |d kr| j }| | j\| _| _d| _d| _d| _| j|}| j	rX| j	| }d | _	n|s`dS t
|dkrt|d }|dksd|  krdkrn n|d | _	|d d }| jr| | |d	d
}|dd
}|| _t
|| _dS )NrW   r   Fr
   r         i  z
r`   T)_defaultChunkSizerc   rX   r[   r\   r*   rY   rU   r2   r]   r(   ordrO   replace)r%   rX   r7   Zlastvr   r   r   rf      s0    
 


z HTMLUnicodeInputStream.readChunkc                 C   s(   t tt|D ]}| jd qd S )Ninvalid-codepoint)ranger(   invalid_unicode_refindallrZ   r6   )r%   r7   _r   r   r   rP   %  s    z*HTMLUnicodeInputStream.characterErrorsUCS4c                 C   s   d}t |D ]}|rqt| }| }t|||d  rrt|||d  }|tkrl| j	
d d}q|dkr|dkr|t|d kr| j	
d qd}| j	
d qd S )NF   rn   Tri   i  r
   )rp   finditerrl   groupstartr   ZisSurrogatePairZsurrogatePairToCodepointnon_bmp_invalid_codepointsrZ   r6   r(   )r%   r7   skipmatchZ	codepointr)   Zchar_valr   r   r   rQ   )  s"    z*HTMLUnicodeInputStream.characterErrorsUCS2Fc           	      C   s   zt ||f }W nN tk
r^   ddd |D }|s@d| }td|  }t ||f< Y nX g }|| j| j}|dkr| j| jkrqn0|	 }|| jkr|
| j| j|  || _q|
| j| jd  |  sdqqdd|}|S )z Returns a string of characters from the stream up to but not
        including any character in 'characters' or EOF. 'characters' must be
        a container that supports the 'in' method and iteration over its
        characters.
        rW   c                 S   s   g | ]}d t | qS )z\x%02x)rl   )r   cr   r   r   r   N  s     z5HTMLUnicodeInputStream.charsUntil.<locals>.<listcomp>z^%sz[%s]+N)charsUntilRegExKeyErrorr9   recompilery   r*   rY   rX   endr6   rf   )	r%   Z
charactersZoppositecharsZregexr:   mr   rr   r   r   
charsUntil@  s,     

z!HTMLUnicodeInputStream.charsUntilc                 C   s@   |d k	r<| j dkr.|| j | _|  jd7  _n|  j d8  _ d S r'   )rY   r*   rX   )r%   rg   r   r   r   ungeto  s    
zHTMLUnicodeInputStream.unget)N)F)r;   r<   r=   r>   rk   r&   rV   rT   rc   r$   rg   rf   rP   rQ   r   r   r   r   r   r   rE      s    
&
/rE   c                   @   sL   e Zd ZdZdddZdd Zd	d
 ZdddZdd Zdd Z	dd Z
dS )rF   rJ   Nwindows-1252Tc                 C   s\   |  || _t| | j d| _d| _|| _|| _|| _|| _	|| _
| || _|   dS )rK   i   d   N)rT   	rawStreamrE   r&   numBytesMetanumBytesChardetoverride_encodingtransport_encodingsame_origin_parent_encodinglikely_encodingdefault_encodingdetermineEncodingrS   rV   )r%   rG   r   r   r   r   r   Z
useChardetr   r   r   r&     s    zHTMLBinaryInputStream.__init__c                 C   s&   | j d j| jd| _t|  d S )Nr   rm   )rS   Z
codec_infostreamreaderr   rU   rE   rV   r4   r   r   r   rV     s    zHTMLBinaryInputStream.resetc                 C   sD   t |dr|}nt|}z||  W n   t|}Y nX |S r^   )rC   r   r.   r+   r!   r_   r   r   r   rT     s    
z HTMLBinaryInputStream.openStreamc                 C   s  |   df}|d d k	r|S t| jdf}|d d k	r:|S t| jdf}|d d k	rX|S |  df}|d d k	rt|S t| jdf}|d d k	r|d jds|S t| jdf}|d d k	r|S |r`zddl	m
} W n tk
r   Y nvX g }| }|js,| j| j}|sq,|| || q|  t|jd }| jd |d k	r`|dfS t| jdf}|d d k	r|S tddfS )NrM   r   Z	tentativezutf-16)UniversalDetectorencodingr   )	detectBOMrR   r   r   detectEncodingMetar   name
startswithr   Z%pip._vendor.chardet.universaldetectorr   ImportErrorZdoner   r2   r   r6   Zfeedcloseresultr.   r   )r%   ZchardetrS   r   ZbuffersZdetectorr#   r   r   r   r   r     sP    

z'HTMLBinaryInputStream.determineEncodingc                 C   s   t |}|d krd S |jdkr(t d}nT|| jd krH| jd df| _n4| jd |df| _|   td| jd |f d S )Nutf-16beutf-16lerL   r   rM   zEncoding changed from %s to %s)rR   r   rS   r   r.   rV   r   )r%   ZnewEncodingr   r   r   changeEncoding  s    

z$HTMLBinaryInputStream.changeEncodingc              
   C   s   t jdt jdt jdt jdt jdi}| jd}||dd }d}|sp||}d}|sp||dd	 }d	}|r| j	| t
|S | j	d
 dS dS )zAttempts to detect at BOM at the start of the stream. If
        an encoding can be determined from the BOM return the name of the
        encoding otherwise return NonerL   r   r   zutf-32lezutf-32be   N   rs   r   )codecsBOM_UTF8BOM_UTF16_LEBOM_UTF16_BEBOM_UTF32_LEBOM_UTF32_BEr   r2   getr.   rR   )r%   ZbomDictstringr   r.   r   r   r   r     s2           
zHTMLBinaryInputStream.detectBOMc                 C   sH   | j | j}t|}| j d | }|dk	rD|jdkrDtd}|S )z9Report the encoding declared by the meta element
        r   Nr   rL   )r   r2   r   EncodingParserr.   getEncodingr   rR   )r%   r#   parserr   r   r   r   r   9  s    z(HTMLBinaryInputStream.detectEncodingMeta)NNNNr   T)T)r;   r<   r=   r>   r&   rV   rT   r   r   r   r   r   r   r   r   rF     s          
*
>"rF   c                   @   s   e Zd ZdZdd Zdd Zdd Zdd	 Zd
d Zdd Z	dd Z
dd Zeee
Zdd ZeeZefddZdd Zdd Zdd ZdS )EncodingByteszString-like object with an associated position and various extra methods
    If the position is ever greater than the string length then an exception is
    raisedc                 C   s   t | | S N)r1   __new__lowerr%   valuer   r   r   r   L  s    zEncodingBytes.__new__c                 C   s
   d| _ d S )Nr   )rc   r   r   r   r   r&   P  s    zEncodingBytes.__init__c                 C   s   | S r   r   r4   r   r   r   __iter__T  s    zEncodingBytes.__iter__c                 C   s>   | j d  }| _ |t| kr"tn|dk r.t| ||d  S )Nr
   r   rc   r(   StopIterationrD   r%   pr   r   r   __next__W  s    zEncodingBytes.__next__c                 C   s   |   S r   )r   r4   r   r   r   next_  s    zEncodingBytes.nextc                 C   sB   | j }|t| krtn|dk r$t|d  | _ }| ||d  S r'   r   r   r   r   r   previousc  s    zEncodingBytes.previousc                 C   s   | j t| krt|| _ d S r   rc   r(   r   )r%   r$   r   r   r   setPositionl  s    zEncodingBytes.setPositionc                 C   s*   | j t| krt| j dkr"| j S d S d S )Nr   r   r4   r   r   r   getPositionq  s
    
zEncodingBytes.getPositionc                 C   s   | | j | j d  S Nr
   )r$   r4   r   r   r   getCurrentByte{  s    zEncodingBytes.getCurrentBytec                 C   sH   | j }|t| k r>| ||d  }||kr4|| _|S |d7 }q|| _dS )zSkip past a list of charactersr
   Nr$   r(   rc   r%   r   r   rz   r   r   r   rx     s    
zEncodingBytes.skipc                 C   sH   | j }|t| k r>| ||d  }||kr4|| _|S |d7 }q|| _d S r   r   r   r   r   r   	skipUntil  s    
zEncodingBytes.skipUntilc                 C   s>   | j }| ||t|  }||}|r:|  j t|7  _ |S )zLook for a sequence of bytes at the start of a string. If the bytes
        are found return True and advance the position to the byte after the
        match. Otherwise return False and leave the position alone)r$   r(   r   )r%   r1   r   r7   r:   r   r   r   
matchBytes  s    
zEncodingBytes.matchBytesc                 C   sR   | | j d |}|dkrJ| jdkr,d| _|  j|t| d 7  _dS tdS )zLook for the next sequence of bytes matching a given sequence. If
        a match is found advance the position to the last byte of the matchNr   r   r
   T)r$   findrc   r(   r   )r%   r1   ZnewPositionr   r   r   jumpTo  s    
zEncodingBytes.jumpToN)r;   r<   r=   r>   r   r&   r   r   r   r   r   r   propertyr$   r   currentBytespaceCharactersBytesrx   r   r   r   r   r   r   r   r   H  s    	
r   c                   @   sX   e Zd ZdZdd Zdd Zdd Zdd	 Zd
d Zdd Z	dd Z
dd Zdd ZdS )r   z?Mini parser for detecting character encoding from meta elementsc                 C   s   t || _d| _dS )z3string - the data to work on for encoding detectionN)r   r7   r   r%   r7   r   r   r   r&     s    
zEncodingParser.__init__c              
   C   s   d| j fd| jfd| jfd| jfd| jfd| jff}| jD ]Z}d}|D ]D\}}| j|rFz| }W  qW qF tk
r   d}Y  qY qFX qF|s: qq:| jS )	Ns   <!--s   <metas   </s   <!s   <?r   TF)	handleComment
handleMetahandlePossibleEndTaghandleOtherhandlePossibleStartTagr7   r   r   r   )r%   ZmethodDispatchrr   ZkeepParsingkeymethodr   r   r   r     s(    

zEncodingParser.getEncodingc                 C   s   | j dS )zSkip over commentss   -->r7   r   r4   r   r   r   r     s    zEncodingParser.handleCommentc                 C   s   | j jtkrdS d}d }|  }|d kr,dS |d dkr\|d dk}|r|d k	r|| _dS q|d dkr|d }t|}|d k	r|| _dS q|d dkrtt|d }| }|d k	rt|}|d k	r|r|| _dS |}qd S )	NTFr   s
   http-equivr
   s   content-type   charsets   content)	r7   r   r   getAttributer   rR   ContentAttrParserr   parse)r%   Z	hasPragmaZpendingEncodingattrZtentativeEncodingcodecZcontentParserr   r   r   r     s8    zEncodingParser.handleMetac                 C   s
   |  dS )NF)handlePossibleTagr4   r   r   r   r     s    z%EncodingParser.handlePossibleStartTagc                 C   s   t | j | dS )NT)r   r7   r   r4   r   r   r   r     s    
z#EncodingParser.handlePossibleEndTagc                 C   sb   | j }|jtkr(|r$|  |   dS |t}|dkrD|  n|  }|d k	r^|  }qLdS )NTr   )r7   r   asciiLettersBytesr   r   r   spacesAngleBracketsr   )r%   ZendTagr7   rz   r   r   r   r   r     s    



z EncodingParser.handlePossibleTagc                 C   s   | j dS )Nr   r   r4   r   r   r   r     s    zEncodingParser.handleOtherc                 C   s  | j }|ttdgB }|dkr&dS g }g }|dkr>|r>qnX|tkrR| }qnD|dkrhd|dfS |tkr||  n|dkrdS || t|}q.|dkr|	  d|dfS t| | }|dkr2|}t|}||kr
t| d|d|fS |tkr$||  q|| qnJ|dkrJd|dfS |tkrd||  n|dkrrdS || t|}|t
krd|d|fS |tkr||  n|dkrdS || q|dS )	z_Return a name,value pair for the next attribute in the stream,
        if one is found, or None   /)r   NN   =)r   r   r8   )   '   "r   )r7   rx   r   	frozensetr9   asciiUppercaseBytesr6   r   r   r   r   )r%   r7   rz   ZattrNameZ	attrValueZ	quoteCharr   r   r   r     s`    











zEncodingParser.getAttributeN)r;   r<   r=   r>   r&   r   r   r   r   r   r   r   r   r   r   r   r   r     s   $r   c                   @   s   e Zd Zdd Zdd ZdS )r   c                 C   s
   || _ d S r   )r7   r   r   r   r   r&   f  s    zContentAttrParser.__init__c                 C   s   z| j d | j  jd7  _| j   | j jdks<W d S | j  jd7  _| j   | j jdkr| j j}| j  jd7  _| j j}| j |r| j || j j W S W d S nR| j j}z"| j t | j || j j W W S  tk
 r   | j |d   Y W S X W n tk
r   Y d S X d S )Nr   r
   r   )r   r   )r7   r   r$   rx   r   r   r   r   )r%   Z	quoteMarkZoldPositionr   r   r   r   j  s.    

zContentAttrParser.parseN)r;   r<   r=   r&   r   r   r   r   r   r   e  s   r   c                 C   sf   t | tr0z| d} W n tk
r.   Y dS X | dk	r^zt| W S  tk
rZ   Y dS X ndS dS )z{Return the python codec name corresponding to an encoding or None if the
    string doesn't correspond to a valid encoding.r   N)rA   r   decodeUnicodeDecodeErrorr	   lookupAttributeError)r   r   r   r   rR     s    

rR   )2Z
__future__r   r   r   Zpip._vendor.sixr   r   Zpip._vendor.six.movesr   r   r   r}   Zpip._vendorr	   Z	constantsr   r   r   r   r   rW   r   ior   r   r   r   r   r   r   r   Zinvalid_unicode_no_surrogaterN   r~   evalrp   setrw   Zascii_punctuation_rer{   objectr!   rI   rE   rF   r1   r   r   r   rR   r   r   r   r   <module>   s   

                     
J g Ih 6'