Ë
    5†¼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 dd
lmZmZ  G d„ de
«      Z G d„ de«      Z G d„ de«      Zy)zCThis module contains objects that represent paid media in Telegram.é    N)ÚFinal)Ú	constants)Ú	InputFile)ÚTelegramObject)Úenum)Úto_timedelta©Úparse_file_input)Ú	FileInputÚJSONDictc                   óÞ   ‡ — e Zd ZU dZdZej                  j                  Zee	   e
d<   	 ej                  j                  Zee	   e
d<   	 ddœde	dedz  d	dfˆ fd
„Zeded	e	ez  fd„«       Zˆ xZS )ÚInputStoryContentaN  This object describes the content of a story to post. Currently, it can be one of:

    * :class:`telegram.InputStoryContentPhoto`
    * :class:`telegram.InputStoryContentVideo`

    .. versionadded:: 22.1

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

    Attributes:
        type (:obj:`str`): Type of the content.
    )ÚtypeÚPHOTOÚVIDEON©Ú
api_kwargsr   r   Úreturnc                óš   •— t         ‰|   |¬«       t        j                  t        j
                  ||«      | _        | j                  «        y )Nr   )ÚsuperÚ__init__r   Ú
get_memberr   ÚInputStoryContentTyper   Ú_freeze)Úselfr   r   Ú	__class__s      €ú`/var/www/app/trading-bot/venv/lib/python3.12/site-packages/telegram/_files/_inputstorycontent.pyr   zInputStoryContent.__init__7   s9   ø€ ô 	‰Ñ JÐÔ/ÜŸ™¬×)HÑ)HÈ$ÐPTÓUˆŒ	à‰ó    Ú
file_inputc                 ó   — t        | dd¬«      S )NT)ÚattachÚ
local_moder	   )r   s    r   Ú_parse_file_inputz#InputStoryContent._parse_file_inputB   s   € ô   
°4ÀDÔIÐIr   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__r   r   r   r   ÚstrÚ__annotations__r   r   r   Ústaticmethodr   r   r#   Ú__classcell__©r   s   @r   r   r   !   s   ø… ñð €Ià!×7Ñ7×=Ñ=€Eˆ5‰:Ó=ØAØ!×7Ñ7×=Ñ=€Eˆ5‰:Ó=ØAð '+ò		àð	ð ˜t‘Oð		ð
 
õ	ð ðJ ið J°C¸)±Oò Jó ôJr   r   c                   ó@   ‡ — e Zd ZdZdZddœdededz  ddfˆ fd„Zˆ xZS )	ÚInputStoryContentPhotoa  Describes a photo to post as a story.

    .. versionadded:: 22.1

    Args:
        photo (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`,             optional): The photo to post as a story. The photo must be of the
            size :tg-const:`telegram.constants.InputStoryContentLimit.PHOTO_WIDTH`
            x :tg-const:`telegram.constants.InputStoryContentLimit.PHOTO_HEIGHT` and must not
            exceed :tg-const:`telegram.constants.InputStoryContentLimit.PHOTOSIZE_UPLOAD` MB.
            |uploadinputnopath|.

    Attributes:
        type (:obj:`str`): Type of the content, must be :attr:`~telegram.InputStoryContent.PHOTO`.
        photo (:class:`telegram.InputFile`): The photo to post as a story. The photo must be of the
            size :tg-const:`telegram.constants.InputStoryContentLimit.PHOTO_WIDTH`
            x :tg-const:`telegram.constants.InputStoryContentLimit.PHOTO_HEIGHT` and must not
            exceed :tg-const:`telegram.constants.InputStoryContentLimit.PHOTOSIZE_UPLOAD` MB.

    )ÚphotoNr   r0   r   r   c                óº   •— t         ‰|   t        j                  |¬«       | j	                  «       5  | j                  |«      | _        d d d «       y # 1 sw Y   y xY w©N)r   r   )r   r   r   r   Ú	_unfrozenr#   r0   )r   r0   r   r   s      €r   r   zInputStoryContentPhoto.__init__a   sS   ø€ ô 	‰ÑÔ/×5Ñ5À*ÐÔMà^‰^Óñ 	HØ*.×*@Ñ*@ÀÓ*GˆDŒJ÷	H÷ 	Hñ 	Hús   ±AÁA)	r$   r%   r&   r'   r(   r   r   r   r,   r-   s   @r   r/   r/   I   sC   ø„ ñð* €Ið '+ò		Hàð	Hð ˜t‘Oð		Hð
 
÷	Hñ 	Hr   r/   c                   óš   ‡ — e Zd ZdZdZ	 	 	 dddœdedeej                  z  dz  deej                  z  dz  de	dz  d	e
dz  d
dfˆ fd„Zˆ xZS )ÚInputStoryContentVideoa	  
    Describes a video to post as a story.

    .. versionadded:: 22.1

    Args:
        video (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`,             optional): The video to post as a story. The video must be of
            the size :tg-const:`telegram.constants.InputStoryContentLimit.VIDEO_WIDTH`
            x :tg-const:`telegram.constants.InputStoryContentLimit.VIDEO_HEIGHT`,
            streamable, encoded with ``H.265`` codec, with key frames added
            each second in the ``MPEG4`` format, and must not exceed
            :tg-const:`telegram.constants.InputStoryContentLimit.VIDEOSIZE_UPLOAD` MB.
            |uploadinputnopath|.
        duration (:class:`datetime.timedelta` | :obj:`int` | :obj:`float`, optional): Precise
            duration of the video in seconds;
            0-:tg-const:`telegram.constants.InputStoryContentLimit.MAX_VIDEO_DURATION`
        cover_frame_timestamp (:class:`datetime.timedelta` | :obj:`int` | :obj:`float`, optional):
            Timestamp in seconds of the frame that will be used as the static cover for the story.
            Defaults to ``0.0``.
        is_animation (:obj:`bool`, optional): Pass :obj:`True` if the video has no sound

    Attributes:
        type (:obj:`str`): Type of the content, must be :attr:`~telegram.InputStoryContent.VIDEO`.
        video (:class:`telegram.InputFile`): The video to post as a story. The video must be of
            the size :tg-const:`telegram.constants.InputStoryContentLimit.VIDEO_WIDTH`
            x :tg-const:`telegram.constants.InputStoryContentLimit.VIDEO_HEIGHT`,
            streamable, encoded with ``H.265`` codec, with key frames added
            each second in the ``MPEG4`` format, and must not exceed
            :tg-const:`telegram.constants.InputStoryContentLimit.VIDEOSIZE_UPLOAD` MB.
        duration (:class:`datetime.timedelta`): Optional. Precise duration of the video in seconds;
            0-:tg-const:`telegram.constants.InputStoryContentLimit.MAX_VIDEO_DURATION`
        cover_frame_timestamp (:class:`datetime.timedelta`): Optional. Timestamp in seconds of the
            frame that will be used as the static cover for the story. Defaults to ``0.0``.
        is_animation (:obj:`bool`): Optional. Pass :obj:`True` if the video has no sound
    )Úcover_frame_timestampÚdurationÚis_animationÚvideoNr   r9   r7   r6   r8   r   r   c                ó  •— t         ‰|   t        j                  |¬«       | j	                  «       5  | j                  |«      | _        t        |«      | _        t        |«      | _	        || _
        d d d «       y # 1 sw Y   y xY wr2   )r   r   r   r   r3   r#   r9   r   r7   r6   r8   )r   r9   r7   r6   r8   r   r   s         €r   r   zInputStoryContentVideo.__init__•   sq   ø€ ô 	‰ÑÔ/×5Ñ5À*ÐÔMà^‰^Óñ 	:Ø*.×*@Ñ*@ÀÓ*GˆDŒJÜ2>¸xÓ2HˆDŒMÜ?KÐLaÓ?bˆDÔ&Ø-9ˆDÔ÷		:÷ 	:ñ 	:ús   ±>A8Á8B)NNN)r$   r%   r&   r'   r(   r   ÚfloatÚdtmÚ	timedeltaÚboolr   r   r,   r-   s   @r   r5   r5   m   sŽ   ø„ ñ#ðJ O€Ið
 26Ø>BØ$(ð:ð '+ò:àð:ð ˜#Ÿ-™-Ñ'¨$Ñ.ð:ð  % s§}¡}Ñ4°tÑ;ð	:ð
 ˜T‘kð:ð ˜t‘Oð:ð 
÷:ñ :r   r5   )r'   Údatetimer<   Útypingr   Útelegramr   Útelegram._files.inputfiler   Útelegram._telegramobjectr   Útelegram._utilsr   Útelegram._utils.argumentparsingr   Útelegram._utils.filesr
   Útelegram._utils.typesr   r   r   r/   r5   © r   r   ú<module>rI      sR   ðñ& Jã Ý å Ý /Ý 3Ý  Ý 8Ý 2ß 5ô%J˜ô %JôP!HÐ.ô !HôH7:Ð.õ 7:r   