
    dio                         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rdd
lmZ  G d de          Z G d de          Z G d de          ZdS )zSThis module contains an objects that represents a InputProfilePhoto and subclasses.    N)TYPE_CHECKING)	constants)TelegramObject)enum)to_timedelta)parse_file_input)	FileInputJSONDict)	InputFilec                   p     e Zd ZdZej        j        Z	 ej        j        Z	 dZddde	de
dz  f fdZ xZS )InputProfilePhotoaD  This object describes a profile photo to set. Currently, it can be one of

    * :class:`InputProfilePhotoStatic`
    * :class:`InputProfilePhotoAnimated`

    .. versionadded:: 22.1

    Args:
        type (:obj:`str`): Type of the profile photo.

    Attributes:
        type (:obj:`str`): Type of the profile photo.

    )typeN
api_kwargsr   r   c                    t                                          |           t          j        t          j        ||          | _        |                                  d S )Nr   )super__init__r   
get_memberr   InputProfilePhotoTyper   _freeze)selfr   r   	__class__s      ^/root/projects/qq-shell/venv/lib/python3.11/site-packages/telegram/_files/inputprofilephoto.pyr   zInputProfilePhoto.__init__:   sJ     	J///)H$PTUU	    )__name__
__module____qualname____doc__r   r   STATICANIMATED	__slots__strr
   r   __classcell__r   s   @r   r   r   #   s          ,3FR.7HTI '+		 	 		 tO		 	 	 	 	 	 	 	 	 	r   r   c                   <     e Zd ZdZdZdddededz  f fdZ xZS )InputProfilePhotoStatica  A static profile photo in the .JPG format.

    .. versionadded:: 22.1

    Args:
        photo (:term:`file object` | :class:`~telegram.InputFile` | :obj:`bytes` |             :class:`pathlib.Path`): The static profile photo. |uploadinputnopath|

    Attributes:
        type (:obj:`str`): :tg-const:`telegram.constants.InputProfilePhotoType.STATIC`.
        photo (:class:`telegram.InputFile` | :obj:`str`): The static profile photo.

    )photoNr   r'   r   c                    t                                          t          j        j        |           |                                 5  t          |dd          | _        d d d            d S # 1 swxY w Y   d S N)r   r   T)attach
local_mode)r   r   r   r   r   	_unfrozenr   r'   )r   r'   r   r   s      r   r   z InputProfilePhotoStatic.__init__W   s     	i=DQ[\\\^^ 	` 	` +;5Z^*_*_*_DJ	` 	` 	` 	` 	` 	` 	` 	` 	` 	` 	` 	` 	` 	` 	` 	` 	` 	`s   A--A14A1)	r   r   r   r   r!   r	   r
   r   r#   r$   s   @r   r&   r&   F   s          I '+	
` 
` 
`
` tO	
` 
` 
` 
` 
` 
` 
` 
` 
` 
`r   r&   c            	       Z     e Zd ZdZdZ	 d	dddedeej        z  dz  de	dz  f fdZ
 xZS )
InputProfilePhotoAnimatedab  An animated profile photo in the MPEG4 format.

    .. versionadded:: 22.1

    Args:
        animation (:term:`file object` | :class:`~telegram.InputFile` | :obj:`bytes` |             :class:`pathlib.Path`): The animated profile photo. |uploadinputnopath|
        main_frame_timestamp (:class:`datetime.timedelta` | :obj:`int` | :obj:`float`, optional):
            Timestamp in seconds of the frame that will be used as the static profile photo.
            Defaults to ``0.0``.

    Attributes:
        type (:obj:`str`): :tg-const:`telegram.constants.InputProfilePhotoType.ANIMATED`.
        animation (:class:`telegram.InputFile` | :obj:`str`): The animated profile photo.
        main_frame_timestamp (:class:`datetime.timedelta`): Optional. Timestamp in seconds of the
            frame that will be used as the static profile photo. Defaults to ``0.0``.
    )	animationmain_frame_timestampNr   r/   r0   r   c                   t                                          t          j        j        |           |                                 5  t          |dd          | _        t          |          | _	        d d d            d S # 1 swxY w Y   d S r)   )
r   r   r   r   r    r,   r   r/   r   r0   )r   r/   r0   r   r   s       r   r   z"InputProfilePhotoAnimated.__init__y   s     	i=FS]^^^^^ 	a 	a /?$4/ / /DN ?KK_>`>`D%	a 	a 	a 	a 	a 	a 	a 	a 	a 	a 	a 	a 	a 	a 	a 	a 	a 	as   ,BBB)N)r   r   r   r   r!   r	   floatdtm	timedeltar
   r   r#   r$   s   @r   r.   r.   d   s         $ 6I
 >Ba
 '+a a aa $cm3d:a
 tOa a a a a a a a a ar   r.   )r   datetimer3   typingr   telegramr   telegram._telegramobjectr   telegram._utilsr   telegram._utils.argumentparsingr   telegram._utils.filesr   telegram._utils.typesr	   r
   r   r   r&   r.    r   r   <module>r>      sU  & Z Y                       3 3 3 3 3 3             8 8 8 8 8 8 2 2 2 2 2 2 5 5 5 5 5 5 5 5 #""""""               F` ` ` ` `/ ` ` `<$a $a $a $a $a 1 $a $a $a $a $ar   