<!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>
a
    Re                     @   sD   d dl mZ d dlmZ d dlmZmZ g dZdd Zdd Z	d	S )
   )UniversalDetector)
InputState)__version__VERSION)r   detect
detect_allr   r   c                 C   sH   t | ts0t | ts(tdt| nt| } t }||  | S )z
    Detect the encoding of the given byte string.

    :param byte_str:     The byte sequence to examine.
    :type byte_str:      ``bytes`` or ``bytearray``
    3Expected object of type bytes or bytearray, got: {})	
isinstance	bytearraybytes	TypeErrorformattyper   feedclose)byte_strdetector r   /builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_vendor/chardet/__init__.pyr      s    


r   c                 C   s   t | ts0t | ts(tdt| nt| } t }||  |  |j	t
jkrg }|jD ]X}| |jkr^|j}|j }|dr|jr|j||}||| |jd q^t|dkrt|dd dS |jgS )z
    Detect all the possible encodings of the given byte string.

    :param byte_str:     The byte sequence to examine.
    :type byte_str:      ``bytes`` or ``bytearray``
    r   ziso-8859)encoding
confidencelanguage    c                 S   s
   | d  S )Nr   r   )resultr   r   r   <lambda>Q       zdetect_all.<locals>.<lambda>)key)r	   r
   r   r   r   r   r   r   r   _input_stater   	HIGH_BYTE_charset_probersget_confidenceMINIMUM_THRESHOLDcharset_namelower
startswith_has_win_bytesISO_WIN_MAPgetappendr   lensortedr   )r   r   resultsproberr"   lower_charset_namer   r   r   r   -   s8    






r   N)
universaldetectorr   enumsr   versionr   r   __all__r   r   r   r   r   r   <module>   s
   