§
    ®eîi±  ã                   ó®   — d Z ddl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  ed
¦  «        Z G d„ deeeef         ¦  «        ZdS )z7This module contains the PreCheckoutQueryHandler class.é    N)ÚPattern)ÚTypeVar)ÚUpdate)ÚDEFAULT_TRUE)ÚDVType)ÚBaseHandler)ÚCCTÚHandlerCallbackÚRTc                   ó„   ‡ — e Zd ZdZdZedfdddeeee	f         de
e         deee         z  dz  fˆ fd	„Zd
edefd„Zˆ xZS )ÚPreCheckoutQueryHandleraÁ  Handler class to handle Telegram :attr:`telegram.Update.pre_checkout_query`.

    Warning:
        When setting :paramref:`block` to :obj:`False`, you cannot rely on adding custom
        attributes to :class:`telegram.ext.CallbackContext`. See its docs for more info.

    Examples:
        :any:`Payment Bot <examples.paymentbot>`

    Args:
        callback (:term:`coroutine function`): The callback function for this handler. Will be
            called when :meth:`check_update` has determined that an update should be processed by
            this handler. Callback signature::

                async def callback(update: Update, context: CallbackContext)

            The return value of the callback is usually ignored except for the special case of
            :class:`telegram.ext.ConversationHandler`.
        block (:obj:`bool`, optional): Determines whether the return value of the callback should
            be awaited before processing the next handler in
            :meth:`telegram.ext.Application.process_update`. Defaults to :obj:`True`.

            .. seealso:: :wiki:`Concurrency`
        pattern (:obj:`str` | :func:`re.Pattern <re.compile>`, optional): Optional. Regex pattern
            to test :attr:`telegram.PreCheckoutQuery.invoice_payload` against.

            .. versionadded:: 20.8

    Attributes:
        callback (:term:`coroutine function`): The callback function for this handler.
        block (:obj:`bool`): Determines whether the callback will run in a blocking way..
        pattern (:obj:`str` | :func:`re.Pattern <re.compile>`, optional): Optional. Regex pattern
            to test :attr:`telegram.PreCheckoutQuery.invoice_payload` against.

            .. versionadded:: 20.8

    )ÚpatternNÚselfz PreCheckoutQueryHandler[CCT, RT]ÚcallbackÚblockr   c                 óˆ   •— t          ¦   «                              ||¬¦  «         |�t          j        |¦  «        nd | _        d S )N)r   )ÚsuperÚ__init__ÚreÚcompiler   )r   r   r   r   Ú	__class__s       €úr/home/div/.hermes/hermes-agent/venv/lib/python3.11/site-packages/telegram/ext/_handlers/precheckoutqueryhandler.pyr   z PreCheckoutQueryHandler.__init__K   sB   ø€ õ 	‰Œ×Ò˜¨ÐÑ/Ô/Ð/àCJÐCV­B¬J°wÑ,?Ô,?Ð,?Ð\`ˆŒˆˆó    ÚupdateÚreturnc                 ó¢   — t          |t          ¦  «        r9|j        r2|j        j        }| j        r| j                             |¦  «        rdS ndS dS )zäDetermines whether an update should be passed to this handler's :attr:`callback`.

        Args:
            update (:class:`telegram.Update` | :obj:`object`): Incoming update.

        Returns:
            :obj:`bool`

        TF)Ú
isinstancer   Úpre_checkout_queryÚinvoice_payloadr   Úmatch)r   r   r   s      r   Úcheck_updatez$PreCheckoutQueryHandler.check_updateU   sc   € õ �f�fÑ%Ô%ð 	¨&Ô*Cð 	Ø$Ô7ÔGˆOØŒ|ð Ø”<×%Ò% oÑ6Ô6ð  Ø˜4ð ð �tØˆur   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__r   r
   r   r	   r   r   ÚboolÚstrr   r   Úobjectr!   Ú__classcell__)r   s   @r   r   r   "   sÊ   ø€ € € € € ð$ð $ðL €Ið
 +Ø-1ð	að aØ0ðaà! &¨#¨r /Ô2ðað �dŒ|ðað �w˜s”|Ñ# dÑ*ð	að að að að að að 6ð ¨dð ð ð ð ð ð ð ð r   r   )r%   r   r   Útypingr   Útelegramr   Útelegram._utils.defaultvaluer   Útelegram._utils.typesr   Ú"telegram.ext._handlers.basehandlerr   Útelegram.ext._utils.typesr	   r
   r   r   © r   r   ú<module>r2      sð   ðð& >Ð =à 	€	€	€	Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð à Ð Ð Ð Ð Ð Ø 5Ð 5Ð 5Ð 5Ð 5Ð 5Ø (Ð (Ð (Ð (Ð (Ð (Ø :Ð :Ð :Ð :Ð :Ð :Ø :Ð :Ð :Ð :Ð :Ð :Ð :Ð :à€WˆT�]„]€ðDð Dð Dð Dð D˜k¨&°#°r¨/Ô:ñ Dô Dð Dð Dð Dr   