+
    ÁFñj#  ã                   óî   € R t ^ RIt^ RIt^ RIHt ^ RIHt ^ RIH	t	 ^ RI
Ht ^ RIHtHt ^ RIHtHt ^ RIHt ^ R	IHt ^ R
IHt ^ RIHt ^ RIHt ^ RIHt ]	]! RRRRR7       ! R R4      4       4       tR# )z[This module contains a class that describes a single parameter of a request to the Bot API.N)ÚSequence)Ú	dataclass)Úfinal)Ú	InputFile)Ú
InputMediaÚInputPaidMedia)ÚInputProfilePhotoÚInputProfilePhotoStatic)ÚInputSticker)ÚInputStoryContent)ÚTelegramObject)Úto_timestamp)Ú
StringEnum©ÚUploadFileDictTF)ÚreprÚeqÚorderÚfrozenc                   ó¤   a € ] tR t^&t o RtRt]V 3R lR l4       t]V 3R lR l4       t]	V 3R lR l4       t
]V 3R lR	 l4       tV 3R
 ltRtV tR# )ÚRequestParametera|  Instances of this class represent a single parameter to be sent along with a request to
the Bot API.

.. versionadded:: 20.0

Warning:
    This class intended is to be used internally by the library and *not* by the user. Changes
    to this class are not considered breaking changes and may not be documented in the
    changelog.

Args:
    name (:obj:`str`): The name of the parameter.
    value (:obj:`object` | :obj:`None`): The value of the parameter. Must be JSON-dumpable.
    input_files (list[:class:`telegram.InputFile`], optional): A list of files that should be
        uploaded along with this parameter.

Attributes:
    name (:obj:`str`): The name of the parameter.
    value (:obj:`object` | :obj:`None`): The value of the parameter.
    input_files (list[:class:`telegram.InputFile` | :obj:`None`): A list of files that should
        be uploaded along with this parameter.
c                ó.   <€ V ^8„  d   QhRS[ R,          /# ©é   ÚreturnN)Ústr)ÚformatÚ__classdict__s   "€ÚX/opt/hermes-site/venv/lib/python3.14/site-packages/telegram/request/_requestparameter.pyÚ__annotate__ÚRequestParameter.__annotate__G   s   ø€ ÷ 	&ñ 	&™C $�Jñ 	&ó    c                óº   € \        V P                  \        4      '       d   V P                  # V P                  f   R# \        P                  ! V P                  4      # )zÒThe JSON dumped :attr:`value` or :obj:`None` if :attr:`value` is :obj:`None`.
The latter can currently only happen if :attr:`input_files` has exactly one element that
must not be uploaded via an attach:// URI.
N)Ú
isinstanceÚvaluer   ÚjsonÚdumps)Úselfs   &r   Ú
json_valueÚRequestParameter.json_valueF   s?   € ô �d—j‘j¤#×&Ò&Ø—:‘:ÐØ�:‰:ÒÙÜ�zŠz˜$Ÿ*™*Ó%Ð%r!   c                ó.   <€ V ^8„  d   QhRS[ R,          /# r   r   )r   r   s   "€r   r   r    S   s   ø€ ÷ 
ñ 
¡°Õ 5ñ 
r!   c                ó¾   € V P                   '       g   R# V P                    Uu/ uF.  pVP                  ;'       g    V P                  VP                  bK0  	  up# u upi )zmA dict with the file data to upload, if any.

.. versionchanged:: 21.5
    Content may now be a file handle.
N)Úinput_filesÚattach_nameÚnameÚfield_tuple)r'   Ú
input_files   & r   Úmultipart_dataÚRequestParameter.multipart_dataR   s]   € ð ××ÐÙð #×.Ò.ó
á.�
ð ×#Ñ#×0Ð0 t§y¡y°:×3IÑ3IÒIÙ.ñ
ð 	
ùò 
s
   £A»Ac                óL   <€ V ^8„  d   QhRS[ RS[S[ S[S[,          3,          /# )r   r$   r   )ÚobjectÚtupleÚlistr   )r   r   s   "€r   r   r    a   s/   ø€ ÷ \ñ \Ùð\á	‰v‘t™I•Ð&Õ	'ñ\r!   c                ó  € \        V \        P                  4      '       d   \        V 4      . 3# \        V \        P                  4      '       d8   V P                  4       pVP                  4       '       d   \        V4      . 3# V. 3# \        V \        4      '       d   V P                  . 3# \        V \        4      '       d'   V P                  '       d   V P                  V .3# RV .3# \        V \        \        ,          4      '       dò   \        V P                  \        4      '       dÒ   V P                  4       pV P                  P                  '       d   V P                  P                  VR&   MVP!                  RR4       VP#                  RR4      p\        V\        4      '       dD   VP                  '       d   VP                  VR&   MVP!                  RR4       W P                  V.3# W P                  .3# \        V \$        4      '       dp   \        V \&        4      '       d   RMRp\        \)        W4      ;p\        4      '       g   V P                  4       . 3# V P                  4       pVP                  W$&   W%.3# \        V \*        4      '       db   V P,                  p\        \)        W4      ;p\        4      '       g   V P                  4       . 3# V P                  4       pVP                  W$&   W%.3# \        V \.        4      '       dX   \        V P0                  \        4      '       d8   V P                  4       pV P0                  P                  VR&   W P0                  .3# \        V \2        4      '       d   V P                  4       . 3# V . 3# )aØ  Converts `value` into something that we can json-dump. Returns two values:
1. the JSON-dumpable value. May be `None` in case the value is an InputFile which must
   not be uploaded via an attach:// URI
2. A list of InputFiles that should be uploaded for this value

Note that we handle files differently depending on whether attaching them via an URI of the
form attach://<name> is documented to be allowed or not.
There was some confusion whether this worked for all files, so that we stick to the
documented ways for now.
See https://github.com/tdlib/telegram-bot-api/issues/167 and
https://github.com/tdlib/telegram-bot-api/issues/259

This method only does some special casing for our own helper class StringEnum, but not
for general enums. This is because:
* tg.constants currently only uses IntEnum as second enum type and json dumping that
  is no problem
* if a user passes a custom enum, it's unlikely that we can actually properly handle it
  even with some special casing.
NÚmediaÚ	thumbnailÚphotoÚ	animationÚsticker)r#   ÚdtmÚdatetimer   Ú	timedeltaÚtotal_secondsÚ
is_integerÚintr   r$   r   Ú
attach_urir   r   r8   Úto_dictÚpopÚgetr   r	   Úgetattrr   Útyper
   r<   r   )r$   ÚsecondsÚdatar9   Úattrr8   s   &     r   Ú!_value_and_input_files_from_inputÚ2RequestParameter._value_and_input_files_from_input`   sÏ  € ô. �eœSŸ\™\×*Ò*Ü Ó&¨Ð*Ð*Ü�eœSŸ]™]×+Ò+Ø×)Ñ)Ó+ˆGà×!Ñ!×#Ò#Ü˜7“| RÐ'Ð'ð ˜B�;ÐÜ�eœZ×(Ò(Ø—;‘; �?Ð"Ü�eœY×'Ò'Ø××ÐØ×'Ñ'¨%¨Ð0Ð0Ø˜%˜�=Ð ä�eœZ¬.Õ8×9Ò9¼jÈÏÉÔV_×>`Ò>`ð —=‘=“?ˆDØ�{‰{×%×%Ð%Ø %§¡× 6Ñ 6��W’à—‘˜ $Ô'àŸ™ ¨dÓ3ˆIÜ˜)¤Y×/Ò/Ø×'×'Ð'Ø(1×(<Ñ(<�D˜Ò%à—H‘H˜[¨$Ô/ØŸk™k¨9Ð5Ð5Ð5àŸ+™+˜Ð&Ð&ä�eÔ.×/Ò/Ü(¨Ô0G×HÒH‘7ÈkˆDÜ¤w¨uÓ';Ð;˜e¼Y×GÒGà—}‘}“¨Ð*Ð*ð —=‘=“?ˆDØ×)Ñ)ˆD‰JØ˜�=Ð ä�eÔ.×/Ò/Ø—:‘:ˆDÜ¤w¨uÓ';Ð;˜e¼Y×GÒGà—}‘}“¨Ð*Ð*ð —=‘=“?ˆDØ×)Ñ)ˆD‰JØ˜�=Ð ä�eœ\×*Ò*¬z¸%¿-¹-Ì×/SÒ/Sð —=‘=“?ˆDØ#Ÿm™m×6Ñ6ˆD�‰OØŸ-™-˜Ð(Ð(ä�eœ^×,Ò,à—=‘=“? BÐ&Ð&Ø�bˆyÐr!   c                ó*   <€ V ^8„  d   QhRS[ RS[RR/# )r   Úkeyr$   r   r   )r   r4   )r   r   s   "€r   r   r    À   s(   ø€ ÷ ^ñ ^™Sð ^©ð ^Ð4Fñ ^r!   c                ó~  € \        V\        \        ,          4      '       gt   \        V\        4      '       d^   . p. pV F<  pV P	                  V4      w  rgVe   VP                  V4       VP                  V4       K>  	  \        YT;'       g    RR7      # V P	                  V4      w  rd\        YT;'       g    RR7      # )z’Builds an instance of this class for a given key-value pair that represents the raw
input as passed along from a method of :class:`telegram.Bot`.
N)r.   r$   r,   )r#   r   Úbytesr   rL   ÚappendÚextendr   )ÚclsrO   r$   Úparam_valuesr,   ÚobjÚparam_valuer0   s   &&&     r   Ú
from_inputÚRequestParameter.from_input¿   s¬   € ô
 ˜%¤¤u¥×-Ò-´*¸UÄH×2MÒ2MØˆLØˆKÛ�Ø*-×*OÑ*OÐPSÓ*TÑ'�ØÒ*Ø ×'Ñ'¨Ô4Ø×"Ñ" :Ö.ñ	 ô
 $¨Èk×NaÐNaÐ]aÔbÐbà#&×#HÑ#HÈÓ#OÑ ˆÜ SÈ×I\ÐI\ÐX\Ô]Ð]r!   c                ó\   <€ V ^8„  d   Qh/ S[ ;R&   S[;R&   S[S[,          R,          ;R&   # )r   r.   r$   Nr,   )r   r4   r6   r   )r   r   s   "€r   r   r    &   s3   ø‡ ‚ ñ8 �Iñ9 ñ: �Mñ; ñ< ‘i• 4Õ'Ñ'ò= r!   © N)r,   r.   r$   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú	__slots__Úpropertyr(   r1   ÚstaticmethodrL   ÚclassmethodrX   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__)r   s   @r   r   r   &   sn   ø‡ € ñð. 1€Ið ÷	&ó ð	&ð ÷
ó ð
ð ÷\ó ð\ð| ÷^ó ð^÷u ƒ r!   r   )r`   r>   r=   r%   Úcollections.abcr   Údataclassesr   Útypingr   Útelegram._files.inputfiler   Útelegram._files.inputmediar   r   Ú!telegram._files.inputprofilephotor   r	   Útelegram._files.inputstickerr
   Ú!telegram._files.inputstorycontentr   Útelegram._telegramobjectr   Útelegram._utils.datetimer   Útelegram._utils.enumr   Útelegram._utils.typesr   r   r[   r!   r   Ú<module>rt      sg   ðñ& bã Û Ý $Ý !Ý å /ß Aß XÝ 5Ý ?Ý 3Ý 1Ý +Ý 0ð Ù
�˜ e°DÔ9÷g^ð g^ó :ó òg^r!   