§
    |Øj�'  ã                  ó  — U d Z ddlmZ ddlZddlZddlmZ dZded<   dZ	ded	<   d
Z
ded<   dZded<   dZded<   i Zded<   d�d‘d„Zd’d„Zd“d „Zd”d"„Zd”d#„Zd”d$„Zd•d&„Z	 d�d–d)„Zi d*d+“d,d-“d.d/“d0d1“d2d3“d4d5“d6d7“d8d9“d:d;“d<d=“d>d?“d@dA“dBdC“dDdE“dFdG“dHdI“dJdK“i dLdM“dNdO“dPdQ“dRdS“dTdU“dVdW“dXdY“dZd[“d\d]“d^d_“d`da“dbdc“ddde“dfdg“dhdi“djdk“dldm“¥i dndo“dpdq“drds“dtdu“dvdw“dxdy“dzd{“d|d}“d~d“d€d�“d‚dƒ“d„d…“d†d‡“dˆd‰“dŠd‹“dŒd�“¥ZdŽed�<   dS )—z&Internal shared utilities for chardet.é    )ÚannotationsN)ÚCallablei@ ÚintÚDEFAULT_MAX_BYTESi   ÚEVIDENCE_CAP_BYTESi   Ú_DECODE_CHUNK_SIZEgš™™™™™É?ÚfloatÚMINIMUM_THRESHOLDi   Ú_DEFAULT_CHUNK_SIZEz3dict[str, Callable[..., codecs.IncrementalDecoder]]Ú_INCREMENTAL_DECODERSé   Ú
chunk_sizeÚ
stacklevelÚreturnÚNonec                óX   — | t           k    rt          j        dt          |¬¦  «         dS dS )zDEmit a deprecation warning if *chunk_size* differs from the default.zEchunk_size is not used in this version of chardet and will be ignored©r   N)r   ÚwarningsÚwarnÚDeprecationWarning)r   r   s     úƒ/Users/tedpeters/Documents/Projects/Claude Projects/Misc Tools/notename-sheets/.venv/lib/python3.11/site-packages/chardet/_utils.pyÚ_warn_deprecated_chunk_sizer   .   sB   € àÕ(Ò(Ð(ÝŒØSÝØ!ð	
ñ 	
ô 	
ð 	
ð 	
ð 	
ð )Ð(ó    ÚencodingÚstrú codecs.IncrementalDecoder | Nonec                ó°   — t                                | ¦  «        }|€1	 t          j        | ¦  «        }n# t          $ r Y dS w xY w|t           | <    |¦   «         S )aa  Return a fresh incremental decoder for *encoding*, or ``None``.

    The class lookup is cached; ``None`` means the codec does not exist.
    Every decode below catches ``UnicodeError`` rather than
    ``UnicodeDecodeError`` because the utf-16/utf-32 incremental decoders
    raise a bare ``UnicodeError`` when the stream does not start with a BOM.
    N)r   ÚgetÚcodecsÚgetincrementaldecoderÚLookupError)r   Údecoder_classs     r   Ú_incremental_decoderr#   8   sm   € õ *×-Ò-¨hÑ7Ô7€MØÐð	Ý"Ô8¸ÑBÔBˆMˆMøÝð 	ð 	ð 	Ø�4�4ð	øøøà*7Õ˜hÑ'Øˆ=‰?Œ?Ðs   ž3 ³
AÁ AÚdataÚbytesÚtablec           	     ó|  — t          | ¦  «        t          k    r3t          | ¦  «        t          |                      d|¦  «        ¦  «        z
  S d}t          dt          | ¦  «        t          ¦  «        D ]J}| ||t          z   …         }|t          |¦  «        t          |                     d|¦  «        ¦  «        z
  z  }ŒK|S )aA  Count how many bytes of *data* a deletion *table* would remove.

    ``bytes.translate`` with a deletion table allocates an output buffer
    proportional to the input, so counting a whole large window through one
    call spikes memory by roughly the input size.  Chunking keeps the
    transient bounded at one C call per chunk, and the count is identical:
    deletion is per-byte and carries no state across the split.

    :param data: The raw byte data to scan.
    :param table: Byte values to delete.
    :returns: The number of bytes of *data* present in *table*.
    Nr   )Úlenr   Ú	translateÚrange)r$   r&   ÚcountÚposÚchunks        r   Úcount_deletedr.   L   s­   € õ ˆ4�y„yÕ&Ò&Ð&Ý�4‰yŒy�3˜tŸ~š~¨d°EÑ:Ô:Ñ;Ô;Ñ;Ð;Ø€EÝ�Q�˜D™	œ	Õ#5Ñ6Ô6ð @ð @ˆØ�S˜3Õ!3Ñ3Ð3Ô4ˆØ•�U‘”�c %§/¢/°$¸Ñ">Ô">Ñ?Ô?Ñ?Ñ?ˆˆØ€Lr   Úboolc                óL  — t          |¦  «        }|€dS 	 t          | ¦  «        t          k    r|                     | d¬¦  «         nMt	          dt          | ¦  «        t          ¦  «        D ])}|                     | ||t          z   …         d¬¦  «         Œ*n# t
          $ r Y dS w xY wdS )a8  Return ``True`` if *data* decodes cleanly under *encoding*.

    Equivalent to ``data.decode(encoding, errors="strict")`` except that an
    incomplete multi-byte sequence at the *end* of *data* is accepted instead of
    raising.

    Detection input is nearly always a prefix of a larger whole.  Callers pass
    the first N bytes of a file, and chardet slices further on its own.
    For a two-byte encoding any of those cuts lands mid-character roughly half
    the time.

    A one-shot strict decode cannot tell a truncated tail from corrupt data: it
    raises either way, so the candidate is discarded and every CJK encoding can
    disappear from the candidate set over a single dangling lead byte. An
    incremental decoder with ``final=False`` defers the partial tail instead,
    while still raising on genuine corruption anywhere before it.

    Large inputs are fed in chunks and the decoded text is discarded, so a
    whole-window check never allocates a matching ``str``.  Chunking is
    transparent: the decoder carries its state across calls, so a sequence
    straddling a chunk edge decodes exactly as it would in one call.

    :param data: The raw byte data to test.
    :param encoding: Name of the codec to test *data* against.
    :returns: ``True`` if *data* decodes without error, ``False`` otherwise.
    NF©Úfinalr   T)r#   r(   r   Údecoder*   ÚUnicodeError)r$   r   Údecoderr,   s       r   Údecodes_without_errorr6   b   sÀ   € õ6 # 8Ñ,Ô,€GØ€ØˆuðÝˆt‰9Œ9Õ*Ò*Ð*Ø�NŠN˜4 uˆNÑ-Ô-Ð-Ð-å˜Q¥ D¡	¤	Õ+=Ñ>Ô>ð Rð R�Ø—’˜t C¨#Õ0BÑ*BÐ$BÔCÈ5�ÑQÔQÐQÐQøøÝð ð ð Øˆuˆuðøøøàˆ4s   •A=B Â
B!Â B!c                ó€   — t          |¦  «        }|€dS 	 |                     | d¬¦  «         n# t          $ r Y dS w xY wdS )aK  Return ``True`` if *data* decodes under *encoding* with nothing deferred.

    The strict sibling of :func:`decodes_without_error`: ``final=True`` makes
    an incomplete multi-byte sequence at the end of *data* an error rather
    than a deferred tail.  This is the question that matters when *data* is
    the caller's entire input --- ``data.decode(encoding)`` will make exactly
    this judgment.

    :param data: The raw byte data to test.
    :param encoding: Name of the codec to test *data* against.
    :returns: ``True`` if *data* decodes completely, ``False`` otherwise.
    NFTr1   )r#   r3   r4   )r$   r   r5   s      r   Údecodes_completelyr8   ‹   s`   € õ # 8Ñ,Ô,€GØ€ØˆuðØ�Š�t 4ˆÑ(Ô(Ð(Ð(øÝð ð ð Øˆuˆuðøøøàˆ4s   •- ­
;º;c                ó  — t          |¦  «        }|€dS 	 |                     | d¬¦  «        }n# t          $ r Y dS w xY w|r|                     ¦   «         sdS 	 |                     dd¬¦  «         n# t          $ r Y dS w xY wdS )aë  Return ``True`` if *data* is ASCII text plus an incomplete tail.

    One decode pass answers both halves of the decode-safety question:
    the tolerant (``final=False``) decode yields the text before any
    deferred tail, and flushing the decoder afterwards raises exactly when
    a deferred tail existed.  True means the candidate decoded real ASCII
    characters and then hit an incomplete multi-byte sequence at the end
    --- its only *non-ASCII* evidence is the undecodable tail itself.

    Deliberately False when the tolerant decode yields nothing at all
    (the entire input is one dangling sequence): that candidate has zero
    decoded evidence, not ASCII evidence, and a clipped multi-byte
    fragment is better served by the ranking's own judgment.

    :param data: The raw byte data to test.
    :param encoding: Name of the codec to decode *data* with.
    :returns: ``True`` if *data* decodes to non-empty pure ASCII with an
        incomplete sequence deferred at the end.
    NFr1   r   T)r#   r3   r4   Úisascii)r$   r   r5   Útexts       r   Údangling_tail_with_ascii_prefixr<   ¢   sº   € õ( # 8Ñ,Ô,€GØ€ØˆuðØ�~Š~˜d¨%ˆ~Ñ0Ô0ˆˆøÝð ð ð Øˆuˆuðøøøàð �t—|’|‘~”~ð ØˆuðØ�Š�s $ˆÑ'Ô'Ð'Ð'øÝð ð ð Øˆtˆtðøøøàˆ5s   •- ­
;º;ÁA/ Á/
A=Á<A=Ú	max_bytesc                óˆ   — t          | t          ¦  «        st          | t          ¦  «        r| dk     rd}t          |¦  «        ‚dS )z:Raise ValueError if *max_bytes* is not a positive integer.é   z$max_bytes must be a positive integerN)Ú
isinstancer/   r   Ú
ValueError)r=   Úmsgs     r   Ú_validate_max_bytesrC   Æ   sH   € å�)�TÑ"Ô"ð ­*°YÅÑ*DÔ*Dð È	ÐTUÊÈØ4ˆÝ˜‰oŒoÐð IVÈr   Úshould_rename_legacyÚprefer_supersetc                óF   — | rt          j        dt          |¬¦  «         dS |S )zEResolve the deprecated *should_rename_legacy* into *prefer_superset*.z?should_rename_legacy is deprecated, use prefer_superset insteadr   T)r   r   r   )rD   rE   r   s      r   Ú_resolve_prefer_supersetrG   Í   s;   € ð ð ÝŒØMÝØ!ð	
ñ 	
ô 	
ð 	
ð
 ˆtØÐr   ÚarÚarabicÚbeÚ
belarusianÚbgÚ	bulgarianÚbrÚbretonÚcsÚczechÚcyÚwelshÚdaÚdanishÚdeÚgermanÚelÚgreekÚenÚenglishÚeoÚ	esperantoÚesÚspanishÚetÚestonianÚfaÚfarsiÚfiÚfinnishÚfrÚfrenchÚgaÚirishÚgdÚgaelicÚheÚhebrewÚhrÚcroatianÚhuÚ	hungarianÚidÚ
indonesianÚisÚ	icelandicÚitÚitalianÚjaÚjapaneseÚkkÚkazakhÚkoÚkoreanÚltÚ
lithuanianÚlvÚlatvianÚmkÚ
macedonianÚmsÚmalayÚmtÚmalteseÚnlÚdutchÚnoÚ	norwegianÚplÚpolishÚptÚ
portugueseÚroÚromanianÚruÚrussianÚskÚslovakÚslÚsloveneÚsrÚserbianÚsvÚswedishÚtgÚtajikÚthÚthaiÚtrÚturkishÚukÚ	ukrainianÚundÚundeterminedÚurÚurduÚviÚ
vietnameseÚzhÚchinesezdict[str, str]ÚISO_TO_LANGUAGE)r   )r   r   r   r   r   r   )r   r   r   r   )r$   r%   r&   r%   r   r   )r$   r%   r   r   r   r/   )r=   r   r   r   )rD   r/   rE   r/   r   r   r   r/   )Ú__doc__Ú
__future__r   r   r   Úcollections.abcr   r   Ú__annotations__r   r   r
   r   r   r   r#   r.   r6   r8   r<   rC   rG   r¬   © r   r   ú<module>r²      s$  ðØ ,Ð ,Ð ,à "Ð "Ð "Ð "Ð "Ð "à €€€Ø €€€Ø $Ð $Ð $Ð $Ð $Ð $ð !Ð Ð  Ð  Ð  Ñ  ð %Ð Ð $Ð $Ð $Ñ $ð
 "Ð Ð !Ð !Ð !Ñ !ð  Ð Ð Ð Ð Ñ ð "Ð Ð !Ð !Ð !Ñ !ð NPÐ Ð OÐ OÐ OÑ Oð
ð 
ð 
ð 
ð 
ðð ð ð ð(ð ð ð ð,&ð &ð &ð &ðRð ð ð ð.!ð !ð !ð !ðHð ð ð ð JKðð ð ð ð ð 3#Øˆ(ð3#àˆ,ð3#ð 	ˆ+ð3#ð 	ˆ(ð	3#ð
 	ˆ'ð3#ð 	ˆ'ð3#ð 	ˆ(ð3#ð 	ˆ(ð3#ð 	ˆ'ð3#ð 	ˆ)ð3#ð 	ˆ+ð3#ð 	ˆ)ð3#ð 	ˆ*ð3#ð 	ˆ'ð3#ð 	ˆ)ð3#ð  	ˆ(ð!3#ð" 	ˆ'ð#3#ð 3#ð$ 	ˆ(ð%3#ð& 	ˆ(ð'3#ð( 	ˆ*ð)3#ð* 	ˆ+ð+3#ð, 	ˆ,ð-3#ð. 	ˆ+ð/3#ð0 	ˆ)ð13#ð2 	ˆ*ð33#ð4 	ˆ(ð53#ð6 	ˆ(ð73#ð8 	ˆ,ð93#ð: 	ˆ)ð;3#ð< 	ˆ,ð=3#ð> 	ˆ'ð?3#ð@ 	ˆ)ðA3#ðB 	ˆ'ðC3#ðD 	ˆ+ðE3#ð 3#ð 3#ðF 	ˆ(ðG3#ðH 	ˆ,ðI3#ðJ 	ˆ*ðK3#ðL 	ˆ)ðM3#ðN 	ˆ(ðO3#ðP 	ˆ)ðQ3#ðR 	ˆ)ðS3#ðT 	ˆ)ðU3#ðV 	ˆ'ðW3#ðX 	ˆ&ðY3#ðZ 	ˆ)ð[3#ð\ 	ˆ+ð]3#ð^ 
ˆ>ð_3#ð` 	ˆ&ða3#ðb 	ˆ,ðc3#ðd 	ˆ)ðe3#ð 3#€ð 3ð 3ð 3ñ 3ð 3ð 3r   