Ë
    S"“j…  ã                   ó@   — d dl Z d dlZddlmZ ddlmZ  G d„ d«      Zy)é    Né   )Úutils)Útypesc                   óÜ   — e Zd ZdZd„ Zed„ «       Zed„ «       Zed„ «       Zed„ «       Z	ed„ «       Z
ed„ «       Zed	„ «       Zed
„ «       Zed„ «       Zed„ «       Zed„ «       Zed„ «       Zd„ Zy)ÚFilea3  
    Convenience class over media like photos or documents, which
    supports accessing the attributes in a more convenient way.

    If any of the attributes are not present in the current media,
    the properties will be `None`.

    The original media is available through the ``media`` attribute.
    c                 ó   — || _         y ©N)Úmedia)Úselfr
   s     úX/var/www/api.ozpay.ru/ozpay/venv/lib/python3.12/site-packages/telethon/tl/custom/file.pyÚ__init__zFile.__init__   s	   € Øˆ�
ó    c                 ó@   — t        j                  | j                  «      S )aÕ  
        The old bot-API style ``file_id`` representing this file.

        .. warning::

            This feature has not been maintained for a long time and
            may not work. It will be removed in future versions.

        .. note::

            This file ID may not work under user accounts,
            but should still be usable by bot accounts.

            You can, however, still use it to identify
            a file in for example a database.
        )r   Úpack_bot_file_idr
   ©r   s    r   ÚidzFile.id   s   € ô$ ×%Ñ% d§j¡jÓ1Ð1r   c                 óB   — | j                  t        j                  d«      S )z1
        The file name of this document.
        Ú	file_name)Ú
_from_attrr   ÚDocumentAttributeFilenamer   s    r   Únamez	File.name)   s   € ð
 �‰œu×>Ñ>ÀÓLÐLr   c                 ó¬   — t        j                  | j                  «      xs4 t        j                  j                  | j                  xs d«      d   xs dS )z¦
        The extension from the mime type of this file.

        If the mime type is unknown, the extension
        from the file name (if any) will be used.
        Ú éÿÿÿÿN)Ú	mimetypesÚguess_extensionÚ	mime_typeÚosÚpathÚsplitextr   r   s    r   ÚextzFile.ext0   sG   € ô ×%Ñ% d§n¡nÓ5ò Ü�w‰w×Ñ §	¡	¢¨RÓ0°Ñ4òàð	
r   c                 óÂ   — t        | j                  t        j                  «      ryt        | j                  t        j                  «      r| j                  j
                  S y)z-
        The mime-type of this file.
        z
image/jpegN)Ú
isinstancer
   r   ÚPhotoÚDocumentr   r   s    r   r   zFile.mime_type>   s@   € ô
 �d—j‘j¤%§+¡+Ô.ØÜ˜Ÿ
™
¤E§N¡NÔ3Ø—:‘:×'Ñ'Ð'ð 4r   c                 óö   — t        | j                  t        j                  «      r&t	        d„ | j                  j
                  D «       «      S | j                  t        j                  t        j                  fd«      S )zO
        The width in pixels of this media if it's a photo or a video.
        c              3   ó6   K  — | ]  }t        |d d«      –— Œ y­w)Úwr   N©Úgetattr©Ú.0Úss     r   ú	<genexpr>zFile.width.<locals>.<genexpr>N   ó   è ø€ ÒD¨a”w˜q # q×)ÑDùó   ‚r(   ©	r#   r
   r   r$   ÚmaxÚsizesr   ÚDocumentAttributeImageSizeÚDocumentAttributeVideor   s    r   Úwidthz
File.widthH   s^   € ô
 �d—j‘j¤%§+¡+Ô.ÜÑD°4·:±:×3CÑ3CÔDÓDÐDà�‰Ü×,Ñ,¬e×.JÑ.Jð LØMPóRð 	Rr   c                 óö   — t        | j                  t        j                  «      r&t	        d„ | j                  j
                  D «       «      S | j                  t        j                  t        j                  fd«      S )zP
        The height in pixels of this media if it's a photo or a video.
        c              3   ó6   K  — | ]  }t        |d d«      –— Œ y­w)Úhr   Nr)   r+   s     r   r.   zFile.height.<locals>.<genexpr>Y   r/   r0   r9   r1   r   s    r   ÚheightzFile.heightS   s^   € ô
 �d—j‘j¤%§+¡+Ô.ÜÑD°4·:±:×3CÑ3CÔDÓDÐDà�‰Ü×+Ñ+¬U×-IÑ-Ið KØLOóQð 	Qr   c                 ób   — | j                  t        j                  t        j                  fd«      S )z@
        The duration in seconds of the audio or video.
        Úduration)r   r   ÚDocumentAttributeAudior5   r   s    r   r<   zFile.duration^   s1   € ð
 �‰Ü×(Ñ(¬%×*FÑ*Fð HØISóUð 	Ur   c                 óB   — | j                  t        j                  d«      S )z(
        The title of the song.
        Útitle©r   r   r=   r   s    r   r?   z
File.titlef   s   € ð
 �‰œu×;Ñ;¸WÓEÐEr   c                 óB   — | j                  t        j                  d«      S )z,
        The performer of the song.
        Ú	performerr@   r   s    r   rB   zFile.performerm   s   € ð
 �‰œu×;Ñ;¸[ÓIÐIr   c                 óB   — | j                  t        j                  d«      S )zM
        A string with all emoji that represent the current sticker.
        Úalt©r   r   ÚDocumentAttributeStickerr   s    r   Úemojiz
File.emojit   s   € ð
 �‰œu×=Ñ=¸uÓEÐEr   c                 óB   — | j                  t        j                  d«      S )zN
        The :tl:`InputStickerSet` to which the sticker file belongs.
        Ú
stickersetrE   r   s    r   Ústicker_setzFile.sticker_set{   s   € ð
 �‰œu×=Ñ=¸|ÓLÐLr   c           	      óF  — t        | j                  t        j                  «      rCt	        t        dt        t        j                  | j                  j                  «      «      d¬«      S t        | j                  t        j                  «      r| j                  j                  S y)z–
        The size in bytes of this file.

        For photos, this is the heaviest thumbnail, as it often repressents the largest dimensions.
        N)Údefault)r#   r
   r   r$   r2   ÚfilterÚmapr   Ú_photo_size_byte_countr3   r%   Úsizer   s    r   rP   z	File.size‚   sg   € ô �d—j‘j¤%§+¡+Ô.Ü”v˜d¤C¬×(DÑ(DÀdÇjÁj×FVÑFVÓ$WÓXÐbfÔgÐgÜ˜Ÿ
™
¤E§N¡NÔ3Ø—:‘:—?‘?Ð"ð 4r   c                 óº   — t        | j                  t        j                  «      r7| j                  j                  D ]  }t        ||«      sŒt        ||d «      c S  y y r	   )r#   r
   r   r%   Ú
attributesr*   )r   ÚclsÚfieldÚattrs       r   r   zFile._from_attrŽ   sK   € Ü�d—j‘j¤%§.¡.Ô1ØŸ
™
×-Ñ-ò 6�Ü˜d CÕ(Ü" 4¨°Ó5Ò5ñ6ð 2r   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Úpropertyr   r   r!   r   r6   r:   r<   r?   rB   rG   rJ   rP   r   © r   r   r   r      s  „ ñòð ñ2ó ð2ð& ñMó ðMð ñ
ó ð
ð ñ(ó ð(ð ñRó ðRð ñQó ðQð ñUó ðUð ñFó ðFð ñJó ðJð ñFó ðFð ñMó ðMð ñ	#ó ð	#ó6r   r   )r   r   r   r   Útlr   r   r[   r   r   ú<module>r]      s   ðÛ Û 	å Ý ÷J6ò J6r   