Ë
    ‚YPiO  ã                   ó¾   — d Z ddlZddl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  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ÚOptionalÚUnion)Ú	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e   d	dfˆ fd
„Zeded	ee	ef   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      €úX/root/twitch_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   r   Ústaticmethodr   r   r   r%   Ú__classcell__©r   s   @r   r   r   !   s£   ø… ñð €Ià!×7Ñ7×=Ñ=€Eˆ5‰:Ó=ØAØ!×7Ñ7×=Ñ=€Eˆ5‰:Ó=ØAð *.ò		àð	ð ˜XÑ&ð		ð
 
õ	ð ðJ ið J°E¸#¸y¸.Ñ4Iò Jó ôJr    r   c                   ó@   ‡ — e Zd ZdZdZddœdedee   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   r2   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%   r2   )r   r2   r   r   s      €r   r   zInputStoryContentPhoto.__init__a   sS   ø€ ô 	‰ÑÔ/×5Ñ5À*ÐÔMà^‰^Óñ 	NØ04×0FÑ0FÀuÓ0MˆDŒJ÷	N÷ 	Nñ 	Nús   ±AÁA)
r&   r'   r(   r)   r*   r   r   r   r   r.   r/   s   @r   r1   r1   I   sD   ø„ ñð* €Ið *.ò		Nàð	Nð ˜XÑ&ð		Nð
 
÷	Nñ 	Nr    r1   c                   ó¢   ‡ — e Zd ZdZdZ	 	 	 dddœdedeeee	j                  f      deeee	j                  f      dee   d	ee   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   r;   r9   r8   r:   r   r   c                ó  •— t         ‰|   t        j                  |¬«       | j	                  «       5  | j                  |«      | _        t        |«      | _        t        |«      | _	        || _
        d d d «       y # 1 sw Y   y xY wr4   )r   r   r   r   r5   r%   r;   r
   r9   r8   r:   )r   r;   r9   r8   r:   r   r   s         €r   r   zInputStoryContentVideo.__init__•   sv   ø€ ô 	‰ÑÔ/×5Ñ5À*ÐÔMà^‰^Óñ 	=Ø04×0FÑ0FÀuÓ0MˆDŒJÜ5AÀ(Ó5KˆDŒMÜBNØ%óCˆDÔ&ð 1=ˆDÔ÷	=÷ 	=ñ 	=ús   ±>A8Á8B)NNN)r&   r'   r(   r)   r*   r   r   r   ÚfloatÚdtmÚ	timedeltaÚboolr   r   r.   r/   s   @r   r7   r7   m   s™   ø„ ñ#ðJ O€Ið
 ;?ØGKØ'+ð=ð *.ò=àð=ð ˜5 ¨¯©Ð!5Ñ6Ñ7ð=ð  (¨¨e°S·]±]Ð.BÑ(CÑDð	=ð
 ˜t‘nð=ð ˜XÑ&ð=ð 
÷=ñ =r    r7   )r)   Údatetimer>   Útypingr   r   r   Útelegramr   Útelegram._files.inputfiler   Útelegram._telegramobjectr   Útelegram._utilsr	   Útelegram._utils.argumentparsingr
   Útelegram._utils.filesr   Útelegram._utils.typesr   r   r   r1   r7   © r    r   ú<module>rK      sU   ðñ& Jã ß )Ñ )å Ý /Ý 3Ý  Ý 8Ý 2ß 5ô%J˜ô %JôP!NÐ.ô !NôH9=Ð.õ 9=r    