Ë
    žDj`$  ã                   ó”   — d dl Z d dlmZ d dlmZmZmZm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  G d
„ d«      Zy)é    N)Údatetime)ÚUnionÚBinaryIOÚOptionalÚCallable)ÚStopTransmission)Úraw)Útypes)Úutils)ÚFilePartMissing)ÚFileTypec                   óŒ   — e Zd Z	 	 	 	 	 	 	 	 	 	 ddddeeef   deeef   dededeeef   d	ed
edededed   de	de
ded   fd„Zy)ÚSendVideoNoteNÚselfzpyrogram.ClientÚchat_idÚ
video_noteÚdurationÚlengthÚthumbÚdisable_notificationÚreply_to_message_idÚschedule_dateÚprotect_contentÚreply_markup)ztypes.InlineKeyboardMarkupztypes.ReplyKeyboardMarkupztypes.ReplyKeyboardRemoveztypes.ForceReplyÚprogressÚprogress_argsÚreturnztypes.Messagec              ƒ   óJ  K  — d}	 t        |t        «      rÒt        j                  j	                  |«      rŽ| j                  |«      ƒ d{  –—† }| j                  |||¬«      ƒ d{  –—† }t        j                  j                  | j                  |«      xs d||t        j                  j                  d|||¬«      g¬«      }n¼t        j                  |t        j                  «      }n—| j                  |«      ƒ d{  –—† }| j                  |||¬«      ƒ d{  –—† }t        j                  j                  | j                  |j                  «      xs d||t        j                  j                  d|||¬«      g¬«      }	 	 | j!                  t        j"                  j$                  j'                  | j)                  |«      ƒ d{  –—† ||xs d|| j+                  «       t        j,                  |«      |	|
r|
j/                  | «      ƒ d{  –—† ndd¬«	      «      ƒ d{  –—† }|j0                  D ]ù  }t        |t        j                  j2                  t        j                  j4                  t        j                  j6                  f«      sŒ[t        j8                  j;                  | |j<                  |j>                  D �ci c]  }|j@                  |“Œ c}|jB                  D �ci c]  }|j@                  |“Œ c}t        t        j                  j6                  «      ¬	«      ƒ d{  –—† c S  	 �Œ¬7 �Œã7 �ŒÊ7 �Œ67 �Œ7 �Œu7 �Œ37 �Œ"c c}w c c}w 7 Œ)# tD        $ r;}| j                  ||j@                  |jF                  ¬
«      ƒ d{  –—†7   Y d}~Œbd}~ww xY w# tH        $ r Y yw xY w­w)a$  Send video messages.

        .. include:: /_includes/usable-by/users-bots.rst

        Parameters:
            chat_id (``int`` | ``str``):
                Unique identifier (int) or username (str) of the target chat.
                For your personal cloud (Saved Messages) you can simply use "me" or "self".
                For a contact that exists in your Telegram address book you can use his phone number (str).

            video_note (``str`` | ``BinaryIO``):
                Video note to send.
                Pass a file_id as string to send a video note that exists on the Telegram servers,
                pass a file path as string to upload a new video note that exists on your local machine, or
                pass a binary file-like object with its attribute ".name" set for in-memory uploads.
                Sending video notes by a URL is currently unsupported.

            duration (``int``, *optional*):
                Duration of sent video in seconds.

            length (``int``, *optional*):
                Video width and height.

            thumb (``str`` | ``BinaryIO``, *optional*):
                Thumbnail of the video sent.
                The thumbnail should be in JPEG format and less than 200 KB in size.
                A thumbnail's width and height should not exceed 320 pixels.
                Thumbnails can't be reused and can be only uploaded as a new file.

            disable_notification (``bool``, *optional*):
                Sends the message silently.
                Users will receive a notification with no sound.

            reply_to_message_id (``int``, *optional*):
                If the message is a reply, ID of the original message

            schedule_date (:py:obj:`~datetime.datetime`, *optional*):
                Date when the message will be automatically sent.

            protect_content (``bool``, *optional*):
                Protects the contents of the sent message from forwarding and saving.

            reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
                Additional interface options. An object for an inline keyboard, custom reply keyboard,
                instructions to remove reply keyboard or to force a reply from the user.

            progress (``Callable``, *optional*):
                Pass a callback function to view the file transmission progress.
                The function must take *(current, total)* as positional arguments (look at Other Parameters below for a
                detailed description) and will be called back each time a new file chunk has been successfully
                transmitted.

            progress_args (``tuple``, *optional*):
                Extra custom arguments for the progress callback function.
                You can pass anything you need to be available in the progress callback scope; for example, a Message
                object or a Client instance in order to edit the message with the updated progress status.

        Other Parameters:
            current (``int``):
                The amount of bytes transmitted so far.

            total (``int``):
                The total size of the file.

            *args (``tuple``, *optional*):
                Extra custom arguments as defined in the ``progress_args`` parameter.
                You can either keep ``*args`` or add every single extra argument in your function signature.

        Returns:
            :obj:`~pyrogram.types.Message` | ``None``: On success, the sent video note message is returned, otherwise,
            in case the upload is deliberately stopped with :meth:`~pyrogram.Client.stop_transmission`, None is
            returned.

        Example:
            .. code-block:: python

                # Send video note by uploading from local file
                await app.send_video_note("me", "video_note.mp4")

                # Set video note length
                await app.send_video_note("me", "video_note.mp4", length=25)
        N)r   r   z	video/mp4T)Úround_messager   ÚwÚh)Ú	mime_typeÚfiler   Ú
attributesÚ )	ÚpeerÚmediaÚsilentÚreply_to_msg_idÚ	random_idr   Ú
noforwardsr   Úmessage)Úis_scheduled)Úfile_idÚ	file_part)%Ú
isinstanceÚstrÚosÚpathÚisfileÚ	save_filer	   r
   ÚInputMediaUploadedDocumentÚguess_mime_typeÚDocumentAttributeVideor   Úget_input_media_from_file_idr   Ú
VIDEO_NOTEÚnameÚinvokeÚ	functionsÚmessagesÚ	SendMediaÚresolve_peerÚrnd_idÚdatetime_to_timestampÚwriteÚupdatesÚUpdateNewMessageÚUpdateNewChannelMessageÚUpdateNewScheduledMessageÚMessageÚ_parser,   ÚusersÚidÚchatsr   Úvaluer   )r   r   r   r   r   r   r   r   r   r   r   r   r   r#   r'   ÚrÚiÚes                     úY/root/auto/venv/lib/python3.12/site-packages/pyrogram/methods/messages/send_video_note.pyÚsend_video_notezSendVideoNote.send_video_note!   s%  è ø€ ðL ˆðB	Ü˜*¤cÔ*Ü—7‘7—>‘> *Ô-Ø"&§.¡.°Ó"7×7�EØ!%§¡°
ÀXÐ]j Ó!k×k�DÜŸI™I×@Ñ@Ø"&×"6Ñ"6°zÓ"BÒ"QÀkØ!Ø#äŸI™I×<Ñ<Ø.2Ø)1Ø"(Ø"(ð	 =ó ð$ð	 Aó ‘Eô "×>Ñ>¸zÌ8×K^ÑK^Ó_‘Eà"Ÿn™n¨UÓ3×3�Ø!Ÿ^™^¨JÀÐYf˜^Óg×g�ÜŸ	™	×<Ñ<Ø"×2Ñ2°:·?±?ÓCÒRÀ{ØØäŸ	™	×8Ñ8Ø*.Ø%-Ø$Ø$ð	 9ó ð ð	 =ó �ð ðØ"Ÿk™kÜŸ™×.Ñ.×8Ñ8Ø'+×'8Ñ'8¸Ó'A×!AØ"'Ø#7Ò#?¸4Ø,?Ø&*§k¡k£mÜ*/×*EÑ*EÀmÓ*TØ'6ÙKW¨|×/AÑ/AÀ$Ó/G×)GÐ)GÐ]aØ$&ð 9ó 
ó÷ �Að  ŸY™Yò 	˜Ü% a¬#¯)©)×*DÑ*DÜ*-¯)©)×*KÑ*KÜ*-¯)©)×*MÑ*Mð*Oõ Pô */¯©×)=Ñ)=Ø $ a§i¡iØ23·'±'Ö :¨Q §¡ q¡Ò :Ø23·'±'Ö :¨Q §¡ q¡Ò :Ü-7¸¼3¿9¹9×;^Ñ;^Ó-_ð	 *>ó *÷ $ò ñ		ñ% ðE 8ùØkùð" 4ùØgùð& "Bùð *Hùðûò, !;ùÚ :ð$ùô 'ò YØŸ.™.¨¸T¿W¹WÐPQ×PWÑPW˜.ÓX×XÖXûðYûô  ò 	Ùð	üs  ‚N#†AN Á	L,Á
N Á%L/Á&BN Ã<L2Ã=N ÄL5ÄA'N ÆAM ÇL8ÇAM ÈL;È	M ÈL>ÈM È!A&N Ê3N Ê;MËN ËMË3.N Ì!MÌ"N Ì'N#Ì(N Ì/N Ì2N Ì5N Ì8M Ì;M Ì>M ÍN Í	NÍ+NÎNÎNÎN ÎNÎN Î	N ÎN#ÎN Î N#)
r   é   NNNNNNN© )Ú__name__Ú
__module__Ú__qualname__r   Úintr1   r   Úboolr   r   Útupler   rR   rT   ó    rQ   r   r       sé   „ ð
 ØØ&*Ø%)Ø#'Ø"&Ø $ð Ø!Ø!ñ%jØðjà�s˜C�x‘ðjð ˜#˜x˜-Ñ(ðjð ð	jð
 ðjð �S˜(�]Ñ#ðjð #ðjð !ðjð  ðjð ðjð ðñ
ðjð" ð#jð$ ð%jð& 
�/Ñ	"ô'jr[   r   )r2   r   Útypingr   r   r   r   Úpyrogramr   r	   r
   r   Úpyrogram.errorsr   Úpyrogram.file_idr   r   rT   r[   rQ   ú<module>r`      s4   ðó& 
Ý ß 6Ó 6ã Ý %Ý Ý Ý Ý +Ý %÷kò kr[   