Ë
    ^ãjà  ã                  ó°  — U d Z ddlmZ ddlmZ ddlmZ dddddd	d
ddddddœZded<   i 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)“d*d+“d,d-“d.d/“d0d1“i d2d3“d4d5“d6d7“d8d9“d:d;“d<d=“d>d?“d@dA“dBdC“dDdE“dFdG“dHdI“ddJ“ddK“ddL“d
dM“ddN“¥dOdPdQdRdSdTdUdVdWœ¥Z	dedX<   dadY„Z
	 dbdZdZd[œ	 	 	 	 	 	 	 	 	 dcd\„ZeZ eh d]£«      Zd^ed_<   	 db	 	 	 	 	 ddd`„ZyZ)eaé  Public-API encoding-name remapping.

Two output transforms applied to detection results before they cross the
public API:

* :func:`apply_preferred_superset` -- when the ``prefer_superset`` API option
  is enabled, replaces detected ISO/subset encoding names with their
  Windows/CP supersets that modern software actually uses
  (e.g., ISO-8859-1 -> Windows-1252).

* :func:`apply_compat_names` -- when the default ``compat_names=True`` mode
  is enabled, maps internal Python codec names to the names chardet 5.x/6.x
  returned, preserving backward compatibility for callers that compare
  encoding strings directly.

Both transforms operate in-place on a :class:`~chardet.pipeline.DetectionDict`
and return the same dict for fluent chaining.
é    )Úannotations)Údecodes_without_error)ÚDetectionDictÚcp1252Úcp949Úcp1250Úcp1251Úcp1256Úcp1253Úcp1255Úcp1254Úcp874Úcp1257)ÚasciiÚeuc_krú	iso8859-1ú	iso8859-2ú	iso8859-5ú	iso8859-6ú	iso8859-7ú	iso8859-8ú	iso8859-9z
iso8859-11ú
iso8859-13útis-620údict[str, str]ÚPREFERRED_SUPERSETÚ	big5hkscsÚBig5Úcp855ÚIBM855Úcp866ÚIBM866ÚCP874Úcp932ÚCP932ÚCP949Úeuc_jis_2004zEUC-JPr   zEUC-KRÚgb18030ÚGB18030Úhzz
HZ-GB-2312Úiso2022_jp_2zISO-2022-JPÚ
iso2022_krzISO-2022-KRr   z
ISO-8859-1r   z
ISO-8859-2r   z
ISO-8859-5r   z
ISO-8859-6r   z
ISO-8859-7r   z
ISO-8859-8r   z
ISO-8859-9r   zISO-8859-13ÚjohabÚJohabzkoi8-rzKOI8-Rzmac-cyrillicÚMacCyrillicz	mac-romanÚMacRomanÚshift_jis_2004Ú	SHIFT_JISr   zTIS-620zutf-16zUTF-16zutf-32zUTF-32z	utf-8-sigz	UTF-8-SIGzWindows-1250zWindows-1251zWindows-1252zWindows-1253zWindows-1254zWindows-1255zWindows-1256zWindows-1257ÚKZ1048ÚMacGreekÚ
MacIcelandÚ	MacLatin2Ú
MacTurkish)r   r
   r   Úkz1048z	mac-greekzmac-icelandz
mac-latin2zmac-turkishÚ_COMPAT_NAMESc                ór   — | j                  d«      }t        |t        «      r|j                  ||«      | d<   | S )zGReplace the encoding name using *mapping*, modifying *result* in-place.Úencoding)ÚgetÚ
isinstanceÚstr)ÚresultÚmappingÚencs      úV/var/www/html/metafoliadorv2/venv/lib/python3.12/site-packages/chardet/output_names.pyÚ_remap_encodingrC   e   s4   € à
�*‰*�ZÓ
 €CÜ�#”sÔØ$Ÿ[™[¨¨cÓ2ˆˆzÑØ€Mó    N)Úinclude_encodingsÚexclude_encodingsc               óÄ   — | j                  d«      }t        |t        «      s| S t        j                  |«      }|€| S |�||vr| S |�||v r| S |�t	        ||«      r|| d<   | S )a.  Replace the encoding name with its preferred Windows/CP superset.

    Modifies the ``"encoding"`` value in *result* in-place and returns *result*
    for fluent chaining.

    The Windows code pages leave a few C1 positions undefined that their ISO
    subsets map (0x81, 0x8D, 0x8F, 0x90, 0x9D under cp1252), so the remap is
    decode-safe only for data that avoids them.  When *data* is given, the
    remap applies only if the superset decodes it; otherwise the detected
    name stands, being the one that does.

    :param result: A detection result dict containing an ``"encoding"`` key.
    :param data: The bytes *result* was detected from, when known.
    :param include_encodings: Canonical encoding names (as returned by
        :func:`~chardet.registry.normalize_encodings`) allowed in the result.
        The superset is skipped when it is not one of them.
    :param exclude_encodings: Canonical encoding names forbidden in the
        result.  The superset is skipped when it is one of them.
    :returns: The same *result* dict, modified in-place.
    r;   )r<   r=   r>   r   r   )r?   ÚdatarE   rF   rA   Úsupersets         rB   Úapply_preferred_supersetrJ   m   s€   € ð6 �*‰*�ZÓ
 €CÜ�cœ3ÔØˆÜ!×%Ñ% cÓ*€HØÐØˆØÐ$¨Ð9JÑ)JØˆØÐ$¨Ð5FÑ)FØˆØ€|Ô,¨T°8Ô<Ø%ˆˆzÑØ€MrD   >   r   r'   r+   r1   zfrozenset[str]ÚNARROWER_DISPLAY_NAMESc                ó¢   — | j                  d«      }|�-t        |t        «      r|t        v rt	        |t
        |   «      s| S t        | t
        «      S )aÿ  Convert internal codec names to chardet 5.x/6.x compatible names.

    Modifies the ``"encoding"`` value in *result* in-place and returns *result*
    for fluent chaining.

    The internal name is the codec the pipeline validated the data under.
    For the names in :data:`NARROWER_DISPLAY_NAMES` the display name is a
    smaller codec, so when *data* is given the rename applies only if the
    display codec decodes it; otherwise the internal name stands, which
    Python's codecs accept as is.  Without *data* the rename is
    unconditional, as before.

    :param result: A detection result dict containing an ``"encoding"`` key.
    :param data: The bytes *result* was detected from, when known.
    :returns: The same *result* dict, modified in-place.
    r;   )r<   r=   r>   rK   r   r9   rC   )r?   rH   rA   s      rB   Úapply_compat_namesrM   ¦   sL   € ð( �*‰*�ZÓ
 €CàÐÜ�sœCÔ ØÔ)Ñ)Ü% d¬M¸#Ñ,>Ô?àˆÜ˜6¤=Ó1Ð1rD   )r?   r   r@   r   Úreturnr   )N)
r?   r   rH   úbytes | NonerE   úfrozenset[str] | NonerF   rP   rN   r   )r?   r   rH   rO   rN   r   )Ú__doc__Ú
__future__r   Úchardet._utilsr   Úchardet.pipeliner   r   Ú__annotations__r9   rC   rJ   Úapply_legacy_renameÚ	frozensetrK   rM   © rD   rB   ú<module>rY      s¦  ðòõ& #å 0Ý *ð ØØØØØØØØØØØñ&Ð �Nó ð(-!à�ð-!ð ˆXð-!ð ˆXð	-!ð
 ˆWð-!ð ˆWð-!ð ˆWð-!ð �Hð-!ð ˆhð-!ð ˆyð-!ð 	ˆ,ð-!ð �Mð-!ð �-ð-!ð �ð-!ð �ð-!ð  �ð!-!ð" �ð#-!ð$ �ñ%-!ð& �ð'-!ð( �ð)-!ð* �-ð+-!ð, ˆWð--!ð. ˆhð/-!ð0 �Mð1-!ð2 �ð3-!ð4 �kð5-!ð6 ˆyð7-!ð8 ˆhð9-!ð: ˆhð;-!ð< �ð=-!ð> ˆnð?-!ð@ ˆnðA-!ðB ˆnðC-!ðD ˆnðE-!ðF ˆnñG-!ðH ØØàØØØØòY-!€ˆ~ó -ó`ð ð'ð 04Ø/3ñ'Øð'à
ð'ð -ð	'ð
 -ð'ð ó'ðV /Ð ñ *3ÚCó*Ð ˜ó ð ð2Øð2à
ð2ð ô2rD   