
    > /is                         d Z ddlmZmZmZmZmZmZ ddlm	Z	 ddl
mZ ddlmZ ddlmZ ddlmZ ddlmZ dd	lmZmZmZ erdd
lmZmZmZmZmZmZ  G d de      Zy)zGThis module contains an object that represents a Telegram CallbackQuery    )TYPE_CHECKINGFinalOptionalSequenceTupleUnion)	constants)Location)Message)TelegramObject)User)DEFAULT_NONE)JSONDictODVInputReplyMarkup)BotGameHighScoreInlineKeyboardMarkup
InputMediaMessageEntity	MessageIdc            "           e Zd ZU dZdZ	 	 	 	 dFdddedededee   d	ee   d
ee   dee   dee	   f fdZ
ed	ee	   ddded    f fd       Z	 	 	 	 dFeeeedddee   dee   dee   dee   dee   dee   dee   dee   dee	   defdZeeddfeeeedddedee   dee   ded   d eed!      dee   dee   dee   dee   dee	   deeef   fd"Zddedfeeeeddd#ee   ded   dee   d$eed!      dee   dee   dee   dee   dee	   deeef   fd%Z	 dGeeeeddded   dee   dee   dee   dee   dee	   deeef   fd&Z	 dGeeeeddd'd(ded   dee   dee   dee   dee   dee	   deeef   fd)Z	 	 	 	 	 	 dHdeeeedd*d+ee   d,ee   ded   d-ee   d.ee   d/ee   d0ee   dee   dee   dee   dee   dee	   deeef   fd1Z	 dGeeeeddded   dee   dee   dee   dee   dee	   deeef   fd2Z	 	 dIeeeeddd3ed4ed5ee   d6ee   dee   dee   dee   dee   dee	   deeef   fd7Zeeeeddd3edee   dee   dee   dee   dee	   ded8   fd9Zeeeedddee   dee   dee   dee   dee	   defd:Zefeeeeddd;ee   dee   dee   dee   dee   dee	   defd<Z eeeedddee   dee   dee   dee   dee	   defd=Z!dededededf	eeeeddd>eeef   d#ee   dee   d$eed!      d;ee   d?ee   d@ee   dee"   dAee   dBee   dee   dee   dee   dee   dee	   ddCf dDZ#e$jJ                  jL                  Z'e(e   e)dE<    xZ*S )JCallbackQuerya  
    This object represents an incoming callback query from a callback button in an inline keyboard.

    If the button that originated the query was attached to a message sent by the bot, the field
    :attr:`message` will be present. If the button was attached to a message sent via the bot (in
    inline mode), the field :attr:`inline_message_id` will be present.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their :attr:`id` is equal.

    Note:
        * In Python :keyword:`from` is a reserved word. Use :paramref:`from_user` instead.
        * Exactly one of the fields :attr:`data` or :attr:`game_short_name` will be present.
        * After the user presses an inline button, Telegram clients will display a progress bar
          until you call :attr:`answer`. It is, therefore, necessary to react
          by calling :attr:`telegram.Bot.answer_callback_query` even if no notification to the user
          is needed (e.g., without specifying any of the optional parameters).
        * If you're using :attr:`telegram.ext.ExtBot.callback_data_cache`, :attr:`data` may be
          an instance
          of :class:`telegram.ext.InvalidCallbackData`. This will be the case, if the data
          associated with the button triggering the :class:`telegram.CallbackQuery` was already
          deleted or if :attr:`data` was manipulated by a malicious client.

          .. versionadded:: 13.6

    Args:
        id (:obj:`str`): Unique identifier for this query.
        from_user (:class:`telegram.User`): Sender.
        chat_instance (:obj:`str`): Global identifier, uniquely corresponding to the chat to which
            the message with the callback button was sent. Useful for high scores in games.
        message (:class:`telegram.Message`, optional): Message with the callback button that
            originated the query. Note that message content and message date will not be available
            if the message is too old.
        data (:obj:`str`, optional): Data associated with the callback button. Be aware that the
            message, which originated the query, can contain no callback buttons with this data.
        inline_message_id (:obj:`str`, optional): Identifier of the message sent via the bot in
            inline mode, that originated the query.
        game_short_name (:obj:`str`, optional): Short name of a Game to be returned, serves as
            the unique identifier for the game.

    Attributes:
        id (:obj:`str`): Unique identifier for this query.
        from_user (:class:`telegram.User`): Sender.
        chat_instance (:obj:`str`): Global identifier, uniquely corresponding to the chat to which
            the message with the callback button was sent. Useful for high scores in games.
        message (:class:`telegram.Message`): Optional. Message with the callback button that
            originated the query. Note that message content and message date will not be available
            if the message is too old.
        data (:obj:`str` | :obj:`object`): Optional. Data associated with the callback button.
            Be aware that the message, which originated the query, can contain no callback buttons
            with this data.

            Tip:
                The value here is the same as the value passed in
                :paramref:`telegram.InlineKeyboardButton.callback_data`.
        inline_message_id (:obj:`str`): Optional. Identifier of the message sent via the bot in
            inline mode, that originated the query.
        game_short_name (:obj:`str`): Optional. Short name of a Game to be returned, serves as
            the unique identifier for the game.


    )game_short_namemessagechat_instanceid	from_userinline_message_iddataN
api_kwargsr   r   r   r   r    r   r   r"   c                    t         	|   |       || _        || _        || _        || _        || _        || _        || _        | j                  f| _	        | j                          y )Nr!   )super__init__r   r   r   r   r    r   r   	_id_attrs_freeze)
selfr   r   r   r   r    r   r   r"   	__class__s
            M/srv/sistema/bot/venv/lib/python3.12/site-packages/telegram/_callbackquery.pyr%   zCallbackQuery.__init__t   s_     	J/("/*1#'	0A.=''    botr   returnc                     | j                  |      }|syt        j                  |j                  dd      |      |d<   t	        j                  |j                  d      |      |d<   t        | 	  ||      S )z,See :meth:`telegram.TelegramObject.de_json`.Nfromr   r   )r    r,   )_parse_datar   de_jsonpopr   getr$   )clsr    r,   r)   s      r*   r1   zCallbackQuery.de_json   si     t$ LL&$)?E[!//$((9*=sCYwDc22r+   read_timeoutwrite_timeoutconnect_timeoutpool_timeoutr"   text
show_alerturl
cache_timer6   r7   r8   r9   c                   K   | j                         j                  | j                  |||||||||	
       d{   S 7 w)a1  Shortcut for::

             await bot.answer_callback_query(update.callback_query.id, *args, **kwargs)

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.answer_callback_query`.

        Returns:
            :obj:`bool`: On success, :obj:`True` is returned.

        )
callback_query_idr:   r;   r<   r=   r6   r7   r8   r9   r"   N)get_botanswer_callback_queryr   )
r(   r:   r;   r<   r=   r6   r7   r8   r9   r"   s
             r*   answerzCallbackQuery.answer   sR     0 \\^99"gg!!%'+%! : 
 
 	
 
s   7A >A 
parse_modedisable_web_page_previewreply_markupr   entitiesr   c                   K   | j                   r>| j                         j                  | j                   ||||||||	|
|dd       d{   S | j                  j	                  ||||||||	|
|
       d{   S 7 17 w)aZ  Shortcut for either::

            await update.callback_query.message.edit_text(*args, **kwargs)

        or::

            await bot.edit_message_text(
                inline_message_id=update.callback_query.inline_message_id, *args, **kwargs,
            )

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.edit_message_text` and :meth:`telegram.Message.edit_text`.

        Returns:
            :class:`telegram.Message`: On success, if edited message is sent by the bot, the
            edited Message is returned, otherwise :obj:`True` is returned.

        N)r   r:   rC   rD   rE   r6   r7   r8   r9   r"   rF   chat_id
message_id)
r:   rC   rD   rE   r6   r7   r8   r9   r"   rF   )r   r@   edit_message_textr   	edit_text)r(   r:   rC   rD   rE   rF   r6   r7   r8   r9   r"   s              r*   rJ   zCallbackQuery.edit_message_text   s     @ !!99"&"8"8%)A))+ /)%! :    \\++!%=%%'+%! , 
 
 	

s$   AA>A:	,A>5A<6A><A>captioncaption_entitiesc                   K   | j                   r=| j                         j                  || j                   |||||||	|dd       d{   S | j                  j	                  ||||||||	|	       d{   S 7 07 w)af  Shortcut for either::

            await update.callback_query.message.edit_caption(*args, **kwargs)

        or::

            await bot.edit_message_caption(
                inline_message_id=update.callback_query.inline_message_id, *args, **kwargs,
            )

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.edit_message_caption` and :meth:`telegram.Message.edit_caption`.

        Returns:
            :class:`telegram.Message`: On success, if edited message is sent by the bot, the
            edited Message is returned, otherwise :obj:`True` is returned.

        N)rL   r   rE   r6   r7   r8   r9   rC   r"   rM   rH   rI   )	rL   rE   r6   r7   r8   r9   rC   r"   rM   )r   r@   edit_message_captionr   edit_caption)
r(   rL   rE   rC   rM   r6   r7   r8   r9   r"   s
             r*   rO   z"CallbackQuery.edit_message_caption   s     > !!<<"&"8"8))+ /)%%!1 =    \\..%%'+%!!- / 

 

 
	


$   AA<A8+A<3A:4A<:A<c                   K   | j                   r:| j                         j                  || j                   |||||dd	       d{   S | j                  j	                  ||||||       d{   S 7 -7 w)a  Shortcut for either::

            await update.callback_query.message.edit_reply_markup(*args, **kwargs)

        or::

            await bot.edit_message_reply_markup(
                inline_message_id=update.callback_query.inline_message_id, *args, **kwargs
            )

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.edit_message_reply_markup` and
        :meth:`telegram.Message.edit_reply_markup`.

        Returns:
            :class:`telegram.Message`: On success, if edited message is sent by the bot, the
            edited Message is returned, otherwise :obj:`True` is returned.

        N)	rE   r   r6   r7   r8   r9   r"   rH   rI   rE   r6   r7   r8   r9   r"   )r   r@   edit_message_reply_markupr   edit_reply_markupr(   rE   r6   r7   r8   r9   r"   s          r*   rT   z'CallbackQuery.edit_message_reply_markup8  s     : !!AA)"&"8"8)+ /)% B 
 
 
 \\33%%'+%! 4 
 
 	


$   AA6A2(A6-A4.A64A6mediar   c                   K   | j                   r;| j                         j                  | j                   |||||||dd
       d{   S | j                  j	                  |||||||       d{   S 7 .7 w)ac  Shortcut for either::

            await update.callback_query.message.edit_media(*args, **kwargs)

        or::

            await bot.edit_message_media(
                inline_message_id=update.callback_query.inline_message_id, *args, **kwargs
            )

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.edit_message_media` and :meth:`telegram.Message.edit_media`.

        Returns:
            :class:`telegram.Message`: On success, if edited message is not an inline message, the
            edited Message is returned, otherwise :obj:`True` is returned.

        N)
r   rX   rE   r6   r7   r8   r9   r"   rH   rI   )rX   rE   r6   r7   r8   r9   r"   )r   r@   edit_message_mediar   
edit_media)r(   rX   rE   r6   r7   r8   r9   r"   s           r*   rZ   z CallbackQuery.edit_message_mediaj  s     : !!::"&"8"8))+ /)% ;    \\,,%%'+%! - 
 
 	

s$   AA8A4)A8/A60A86A8)locationr6   r7   r8   r9   r"   latitude	longitudehorizontal_accuracyheadingproximity_alert_radiusr\   c                  K   | j                   r@| j                         j                  | j                   ||||||	|
|||||dd       d{   S | j                  j	                  ||||||	|
|||||       d{   S 7 37 w)a  Shortcut for either::

            await update.callback_query.message.edit_live_location(*args, **kwargs)

        or::

            await bot.edit_message_live_location(
                inline_message_id=update.callback_query.inline_message_id, *args, **kwargs
            )

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.edit_message_live_location` and
        :meth:`telegram.Message.edit_live_location`.

        Returns:
            :class:`telegram.Message`: On success, if edited message is sent by the bot, the
            edited Message is returned, otherwise :obj:`True` is returned.

        N)r   r]   r^   r\   rE   r6   r7   r8   r9   r"   r_   r`   ra   rH   rI   )r]   r^   r\   rE   r6   r7   r8   r9   r"   r_   r`   ra   )r   r@   edit_message_live_locationr   edit_live_location)r(   r]   r^   rE   r_   r`   ra   r\   r6   r7   r8   r9   r"   s                r*   rc   z(CallbackQuery.edit_message_live_location  s     F !!BB"&"8"8!#!))+ /)%$7'= C   " \\44%%'+%! 3#9 5 
 
 	
#"
s$   AB
A>.B9B :B Bc                   K   | j                   r:| j                         j                  | j                   ||||||dd	       d{   S | j                  j	                  ||||||       d{   S 7 -7 w)a  Shortcut for either::

            await update.callback_query.message.stop_live_location(*args, **kwargs)

        or::

            await bot.stop_message_live_location(
                inline_message_id=update.callback_query.inline_message_id, *args, **kwargs
            )

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.stop_message_live_location` and
        :meth:`telegram.Message.stop_live_location`.

        Returns:
            :class:`telegram.Message`: On success, if edited message is sent by the bot, the
            edited Message is returned, otherwise :obj:`True` is returned.

        N)	r   rE   r6   r7   r8   r9   r"   rH   rI   rS   )r   r@   stop_message_live_locationr   stop_live_locationrV   s          r*   rf   z(CallbackQuery.stop_message_live_location  s     : !!BB"&"8"8))+ /)% C 
 
 
 \\44%%'+%! 5 
 
 	


rW   user_idscoreforcedisable_edit_messagec                   K   | j                   r=| j                         j                  | j                   |||||||||	dd       d{   S | j                  j                  |||||||||		       d{   S 7 07 w)a\  Shortcut for either::

           await update.callback_query.message.set_game_score(*args, **kwargs)

        or::

            await bot.set_game_score(
                inline_message_id=update.callback_query.inline_message_id, *args, **kwargs
            )

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.set_game_score` and :meth:`telegram.Message.set_game_score`.

        Returns:
            :class:`telegram.Message`: On success, if edited message is sent by the bot, the
            edited Message is returned, otherwise :obj:`True` is returned.

        N)r   rh   ri   rj   rk   r6   r7   r8   r9   r"   rH   rI   )	rh   ri   rj   rk   r6   r7   r8   r9   r"   )r   r@   set_game_scorer   )
r(   rh   ri   rj   rk   r6   r7   r8   r9   r"   s
             r*   rm   zCallbackQuery.set_game_score  s     > !!66"&"8"8%9)+ /)% 7    \\00!5%'+%! 1 

 

 
	


rQ   )r   .c                   K   | j                   r:| j                         j                  | j                   ||||||dd	       d{   S | j                  j                  ||||||       d{   S 7 -7 w)a  Shortcut for either::

            await update.callback_query.message.get_game_high_score(*args, **kwargs)

        or::

            await bot.get_game_high_scores(
                inline_message_id=update.callback_query.inline_message_id, *args, **kwargs
            )

        For the documentation of the arguments, please see
        :meth:`telegram.Bot.get_game_high_scores` and
        :meth:`telegram.Message.get_game_high_scores`.

        Returns:
            Tuple[:class:`telegram.GameHighScore`]

        N)	r   rh   r6   r7   r8   r9   r"   rH   rI   )rh   r6   r7   r8   r9   r"   )r   r@   get_game_high_scoresr   )r(   rh   r6   r7   r8   r9   r"   s          r*   ro   z"CallbackQuery.get_game_high_scoresN  s     8 !!<<"&"8"8)+ /)% = 
 
 
 \\66%'+%! 7 
 
 	


rW   c                ^   K   | j                   j                  |||||       d{   S 7 w)a  Shortcut for::

            await update.callback_query.message.delete(*args, **kwargs)

        For the documentation of the arguments, please see :meth:`telegram.Message.delete`.

        Returns:
            :obj:`bool`: On success, :obj:`True` is returned.

        r5   N)r   deleter(   r6   r7   r8   r9   r"   s         r*   delete_messagezCallbackQuery.delete_message  s=     & \\((%'+%! ) 
 
 	
 
   $-+-disable_notificationc                `   K   | j                   j                  ||||||       d{   S 7 w)a  Shortcut for::

            await update.callback_query.message.pin(*args, **kwargs)

        For the documentation of the arguments, please see :meth:`telegram.Message.pin`.

        Returns:
            :obj:`bool`: On success, :obj:`True` is returned.

        )ru   r6   r7   r8   r9   r"   N)r   pin)r(   ru   r6   r7   r8   r9   r"   s          r*   pin_messagezCallbackQuery.pin_message  s@     ( \\%%!5%'+%! & 
 
 	
 
s   %.,.c                ^   K   | j                   j                  |||||       d{   S 7 w)a  Shortcut for::

            await update.callback_query.message.unpin(*args, **kwargs)

        For the documentation of the arguments, please see :meth:`telegram.Message.unpin`.

        Returns:
            :obj:`bool`: On success, :obj:`True` is returned.

        r5   N)r   unpinrr   s         r*   unpin_messagezCallbackQuery.unpin_message  s=     & \\''%'+%! ( 
 
 	
 
rt   rH   reply_to_message_idallow_sending_without_replyprotect_contentmessage_thread_idr   c                r   K   | j                   j                  ||||||||||||||	|
       d{   S 7 w)a  Shortcut for::

            await update.callback_query.message.copy(
                from_chat_id=update.message.chat_id,
                message_id=update.message.message_id,
                *args,
                **kwargs
            )

        For the documentation of the arguments, please see :meth:`telegram.Message.copy`.

        Returns:
            :class:`telegram.MessageId`: On success, returns the MessageId of the sent message.

        )rH   rL   rC   rM   ru   r|   r}   rE   r6   r7   r8   r9   r"   r~   r   N)r   copy)r(   rH   rL   rC   rM   ru   r|   r}   rE   r~   r   r6   r7   r8   r9   r"   s                   r*   copy_messagezCallbackQuery.copy_message  s\     D \\&&!-!5 3(C%%'+%!+/ ' 
 
 	
 
s   .757MAX_ANSWER_TEXT_LENGTH)NNNN)N)NNNNNN)NN)+__name__
__module____qualname____doc__	__slots__strr   r   r   r   r%   classmethodr1   r   boolintr   floatrB   r   r   rJ   rO   rT   rZ   r
   rc   rf   rm   r   ro   rs   rx   r{   r   r   r	   CallbackQueryLimit!ANSWER_CALLBACK_QUERY_TEXT_LENGTHr   r   __annotations____classcell__)r)   s   @r*   r   r   *   s_	   =~I &*"+/)- *.  	
 '" sm $C= "# X&6 
38H- 
3E 
3h>W 
3 
3 #%)!$(#
 )5)5+7(4)-#
sm#
 TN#
 c]	#

 SM#
 uo#
  #
 "%#
 uo#
 X&#
 
#
P %13?9=8<;
 )5)5+7(4)-;
;
 SM;
 #+4.	;

 56;
 8O45;
 uo;
  ;
 "%;
 uo;
 X&;
 
w}	;
~ "&9=$0@D8
 )5)5+7(4)-8
#8
 568
 SM	8

 #8O#<=8
 uo8
  8
 "%8
 uo8
 X&8
 
w}	8
x :>0
 )5)5+7(4)-0
560
 uo	0

  0
 "%0
 uo0
 X&0
 
w}	0
j :>2

 )5)5+7(4)-2
2
 562

 uo2
  2
 "%2
 uo2
 X&2
 
w}	2
l %)%)9=/3!%04B
 (,(4)5+7(4)-B
5/B
 E?B
 56	B

 &e_B
 #B
 !)B
 8$B
 uoB
  B
 "%B
 uoB
 X&B
 
w}	B
L :>0
 )5)5+7(4)-0
560
 uo	0

  0
 "%0
 uo0
 X&0
 
w}	0
l !%/38
 )5)5+7(4)-8
8
 8
 ~	8

 'tn8
 uo8
  8
 "%8
 uo8
 X&8
 
w}	8
| )5)5+7(4)-/
/
 uo	/

  /
 "%/
 uo/
 X&/
 
#	$/
h )5)5+7(4)-
 uo
  	

 "%
 uo
 X&
 

: 0<
 )5)5+7(4)-
&tn
 uo	

  
 "%
 uo
 X&
 

@ )5)5+7(4)-
 uo
  	

 "%
 uo
 X&
 

< "&$0@D/;-16B.2*6+/2
 )5)5+7(4)-#2
sCx2
 #2
 SM	2

 #8O#<=2
 'tn2
 &c]2
 &.d^2
 {+2
 "$2
 $C=2
 uo2
  2
 "%2
  uo!2
" X&#2
$ 
%2
l 	$$FF E Gr+   r   N)r   typingr   r   r   r   r   r   telegramr	   telegram._files.locationr
   telegram._messager   telegram._telegramobjectr   telegram._userr   telegram._utils.defaultvaluer   telegram._utils.typesr   r   r   r   r   r   r   r   r   r    r+   r*   <module>r      sD   ( N I I  - % 3  5 A A cN cr+   