
    Ii"                         S r SSKJrJrJrJr  SSKJr  SSKJ	r	  SSK
Jr  SSKJr  SSKJr  \(       a  SSKJr   " S	 S
\	5      rg)zHThis module contains an object that represents a Telegram MessageEntity.    )TYPE_CHECKINGFinalListOptional)	constants)TelegramObject)User)enum)JSONDict)Botc                   P  ^  \ rS rSr% SrSr    S(SS.S\S\S\S	\\   S
\\	   S\\   S\\   S\\
   4U 4S jjjjr\S\\
   SSS\S    4U 4S jj5       r\R                  R                   r\\   \S'    \R                  R&                  r\\   \S'    \R                  R(                  r\\   \S'    \R                  R*                  r\\   \S'    \R                  R,                  r\\   \S'    \R                  R.                  r\\   \S'    \R                  R0                  r\\   \S'    \R                  R2                  r\\   \S'    \R                  R4                  r\\   \S'    \R                  R6                  r\\   \S'    \R                  R8                  r\\   \S'    \R                  R:                  r\\   \S'    \R                  R<                  r\\   \S '    \R                  R>                  r\\   \S!'    \R                  R@                  r \\   \S"'    \R                  RB                  r!\\   \S#'    \R                  RD                  r"\\   \S$'    \R                  RF                  r#\\   \S%'    \$" \R                  5      r%\\&\      \S&'   S'r'U =r($ ))MessageEntity!   a	  
This object represents one special entity in a text message. For example, hashtags,
usernames, URLs, etc.

Objects of this class are comparable in terms of equality. Two objects of this class are
considered equal, if their :attr:`type`, :attr:`offset` and :attr:`length` are equal.

Args:
    type (:obj:`str`): Type of the entity. Can be :attr:`MENTION` (@username),
        :attr:`HASHTAG` (#hashtag), :attr:`CASHTAG` ($USD), :attr:`BOT_COMMAND`
        (/start@jobs_bot), :attr:`URL` (https://telegram.org),
        :attr:`EMAIL` (do-not-reply@telegram.org), :attr:`PHONE_NUMBER` (+1-212-555-0123),
        :attr:`BOLD` (**bold text**), :attr:`ITALIC` (*italic text*), :attr:`UNDERLINE`
        (underlined text), :attr:`STRIKETHROUGH`, :attr:`SPOILER` (spoiler message),
        :attr:`BLOCKQUOTE` (block quotation), :attr:`CODE` (monowidth string), :attr:`PRE`
        (monowidth block), :attr:`TEXT_LINK` (for clickable text URLs), :attr:`TEXT_MENTION`
        (for users without usernames), :attr:`CUSTOM_EMOJI` (for inline custom emoji stickers).

        .. versionadded:: 20.0
            Added inline custom emoji

        .. versionadded:: 20.8
            Added block quotation
    offset (:obj:`int`): Offset in UTF-16 code units to the start of the entity.
    length (:obj:`int`): Length of the entity in UTF-16 code units.
    url (:obj:`str`, optional): For :attr:`TEXT_LINK` only, url that will be opened after
        user taps on the text.
    user (:class:`telegram.User`, optional): For :attr:`TEXT_MENTION` only, the mentioned
         user.
    language (:obj:`str`, optional): For :attr:`PRE` only, the programming language of
        the entity text.
    custom_emoji_id (:obj:`str`, optional): For :attr:`CUSTOM_EMOJI` only, unique identifier
        of the custom emoji. Use :meth:`telegram.Bot.get_custom_emoji_stickers` to get full
        information about the sticker.

        .. versionadded:: 20.0
Attributes:
    type (:obj:`str`): Type of the entity. Can be :attr:`MENTION` (@username),
        :attr:`HASHTAG` (#hashtag), :attr:`CASHTAG` ($USD), :attr:`BOT_COMMAND`
        (/start@jobs_bot), :attr:`URL` (https://telegram.org),
        :attr:`EMAIL` (do-not-reply@telegram.org), :attr:`PHONE_NUMBER` (+1-212-555-0123),
        :attr:`BOLD` (**bold text**), :attr:`ITALIC` (*italic text*), :attr:`UNDERLINE`
        (underlined text), :attr:`STRIKETHROUGH`, :attr:`SPOILER` (spoiler message),
        :attr:`BLOCKQUOTE` (block quotation), :attr:`CODE` (monowidth string), :attr:`PRE`
        (monowidth block), :attr:`TEXT_LINK` (for clickable text URLs), :attr:`TEXT_MENTION`
        (for users without usernames), :attr:`CUSTOM_EMOJI` (for inline custom emoji stickers).

        .. versionadded:: 20.0
            Added inline custom emoji

        .. versionadded:: 20.8
            Added block quotation
    offset (:obj:`int`): Offset in UTF-16 code units to the start of the entity.
    length (:obj:`int`): Length of the entity in UTF-16 code units.
    url (:obj:`str`): Optional. For :attr:`TEXT_LINK` only, url that will be opened after
        user taps on the text.
    user (:class:`telegram.User`): Optional. For :attr:`TEXT_MENTION` only, the mentioned
         user.
    language (:obj:`str`): Optional. For :attr:`PRE` only, the programming language of
        the entity text.
    custom_emoji_id (:obj:`str`): Optional. For :attr:`CUSTOM_EMOJI` only, unique identifier
        of the custom emoji. Use :meth:`telegram.Bot.get_custom_emoji_stickers` to get full
        information about the sticker.

        .. versionadded:: 20.0

)custom_emoji_idlanguagelengthoffsettypeurluserN
api_kwargsr   r   r   r   r   r   r   r   c                ,  > [         T	U ]  US9  [        R                  " [        R
                  X5      U l        X l        X0l        X@l	        XPl
        X`l        Xpl        U R                  U R                  U R                  4U l        U R                  5         g )Nr   )super__init__r
   
get_memberr   MessageEntityTyper   r   r   r   r   r   r   	_id_attrs_freeze)
selfr   r   r   r   r   r   r   r   	__class__s
            =/venv/lib/python3.13/site-packages/telegram/_messageentity.pyr   MessageEntity.__init__h   so     	J/)D)DdQ	!!"%$(	'/.=))T[[$++>    databotr   returnc                    > U R                  U5      nU(       d  g[        R                  " UR                  S5      U5      US'   [        TU ]	  XS9$ )z,See :meth:`telegram.TelegramObject.de_json`.Nr   )r%   r&   )_parse_datar	   de_jsongetr   )clsr%   r&   r!   s      r"   r*   MessageEntity.de_json   sG     t$||DHHV$4c:VwD22r$   MENTIONHASHTAGCASHTAGPHONE_NUMBERBOT_COMMANDURLEMAILBOLDITALICCODEPRE	TEXT_LINKTEXT_MENTION	UNDERLINESTRIKETHROUGHSPOILERCUSTOM_EMOJI
BLOCKQUOTE	ALL_TYPES)r   r   r   r   r   r   r   r   )NNNN))__name__
__module____qualname____firstlineno____doc__	__slots__strintr   r	   r   r   classmethodr*   r   r   r.   r   __annotations__r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   listr@   r   __static_attributes____classcell__)r!   s   @r"   r   r   !   s   BH [I "#"&)- *.  	
 c] tn 3- "# X& 6 	38H- 	3E 	3h>W 	3 	3 $55==GU3Z=?#55==GU3Z=?#55==GU3Z=?(::GGL%*GD'99EEKsEC1155Cs5;!3399E5:9= 2277D%*7<"44;;FE#J;> 2277D%*7<1155Cs5;%77AAIuSzAA(::GGL%*GD%77AAIuSzAA ) ; ; I IM5:IE#55==GU3Z=  )::GGL%*G '88CCJc
C #'y'B'B"CIuT#YCIr$   r   N)rE   typingr   r   r   r   telegramr   telegram._telegramobjectr   telegram._userr	   telegram._utilsr
   telegram._utils.typesr   r   r    r$   r"   <module>rU      s6   & O 7 7  3    *\JN \Jr$   