Ë
    †jÃ=  ã                   ó  — d 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	e«      Z G d
„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Zy)z8This module contains objects that represent story areas.é    )ÚFinal)Ú	constants)ÚReactionType)ÚTelegramObject)Úenum)ÚJSONDictc                   óT   ‡ — e Zd ZdZdZddœdedededed	ed
ededz  ddfˆ fd„Zˆ xZS )ÚStoryAreaPositiona|  Describes the position of a clickable area within a story.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if all of their attributes are equal.

    .. versionadded:: 22.1

    Args:
        x_percentage (:obj:`float`): The abscissa of the area's center, as a percentage of the
            media width.
        y_percentage (:obj:`float`): The ordinate of the area's center, as a percentage of the
            media height.
        width_percentage (:obj:`float`): The width of the area's rectangle, as a percentage of the
            media width.
        height_percentage (:obj:`float`): The height of the area's rectangle, as a percentage of
            the media height.
        rotation_angle (:obj:`float`): The clockwise rotation angle of the rectangle, in degrees;
            0-:tg-const:`~telegram.constants.StoryAreaPositionLimit.MAX_ROTATION_ANGLE`.
        corner_radius_percentage (:obj:`float`): The radius of the rectangle corner rounding, as a
            percentage of the media width.

    Attributes:
        x_percentage (:obj:`float`): The abscissa of the area's center, as a percentage of the
            media width.
        y_percentage (:obj:`float`): The ordinate of the area's center, as a percentage of the
            media height.
        width_percentage (:obj:`float`): The width of the area's rectangle, as a percentage of the
            media width.
        height_percentage (:obj:`float`): The height of the area's rectangle, as a percentage of
            the media height.
        rotation_angle (:obj:`float`): The clockwise rotation angle of the rectangle, in degrees;
            0-:tg-const:`~telegram.constants.StoryAreaPositionLimit.MAX_ROTATION_ANGLE`.
        corner_radius_percentage (:obj:`float`): The radius of the rectangle corner rounding, as a
            percentage of the media width.

    )Úcorner_radius_percentageÚheight_percentageÚrotation_angleÚwidth_percentageÚx_percentageÚy_percentageN©Ú
api_kwargsr   r   r   r   r   r   r   Úreturnc                ó,  •— t         ‰| �  |¬«       || _        || _        || _        || _        || _        || _        | j                  | j                  | j                  | j
                  | j                  | j                  f| _        | j                  «        y ©Nr   )
ÚsuperÚ__init__r   r   r   r   r   r   Ú	_id_attrsÚ_freeze)	Úselfr   r   r   r   r   r   r   Ú	__class__s	           €úR/var/www/html/datingFans/myenv/lib/python3.12/site-packages/telegram/_storyarea.pyr   zStoryAreaPosition.__init__M   s‘   ø€ ô 	‰Ñ JÐÔ/Ø#/ˆÔØ#/ˆÔØ'7ˆÔØ(9ˆÔØ%3ˆÔØ/GˆÔ%ð ×ÑØ×ÑØ×!Ñ!Ø×"Ñ"Ø×ÑØ×)Ñ)ð
ˆŒð 	�‰�ó    )	Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__Úfloatr   r   Ú__classcell__©r   s   @r   r
   r
      sq   ø„ ñ#ðJ€Ið$ '+òàðð ðð  ð	ð
 !ðð ðð #(ðð ˜t‘Oðð 
÷ñ r   r
   c                   óf   ‡ — e Zd ZdZdZ	 	 	 dddœdededz  dedz  dedz  d	edz  d
dfˆ fd„Zˆ xZS )ÚLocationAddressaÚ  Describes the physical address of a location.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their :attr:`country_code`, :attr:`state`, :attr:`city` and :attr:`street`
    are equal.

    .. versionadded:: 22.1

    Args:
        country_code (:obj:`str`): The two-letter ``ISO 3166-1 alpha-2`` country code of the
            country where the location is located.
        state (:obj:`str`, optional): State of the location.
        city (:obj:`str`, optional): City of the location.
        street (:obj:`str`, optional): Street address of the location.

    Attributes:
        country_code (:obj:`str`): The two-letter ``ISO 3166-1 alpha-2`` country code of the
            country where the location is located.
        state (:obj:`str`): Optional. State of the location.
        city (:obj:`str`): Optional. City of the location.
        street (:obj:`str`): Optional. Street address of the location.

    )ÚcityÚcountry_codeÚstateÚstreetNr   r)   r*   r(   r+   r   r   c                óä   •— t         ‰| �  |¬«       || _        || _        || _        || _        | j                  | j                  | j                  | j
                  f| _        | j                  «        y r   )r   r   r)   r*   r(   r+   r   r   )r   r)   r*   r(   r+   r   r   s         €r   r   zLocationAddress.__init__†   s]   ø€ ô 	‰Ñ JÐÔ/Ø!-ˆÔØ!&ˆŒ
Ø $ˆŒ	Ø"(ˆŒà×+Ñ+¨T¯Z©Z¸¿¹ÀDÇKÁKÐPˆŒØ�‰�r   )NNN©	r   r   r    r!   r"   Ústrr   r   r$   r%   s   @r   r'   r'   k   sx   ø„ ñð0 <€Ið
 !ØØ!ðð '+òàðð �T‰zðð �D‰jð	ð
 �d‘
ðð ˜t‘Oðð 
÷ñ r   r'   c                   óx  ‡ — 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<   	 ej                  j                  Zee	   e
d<   	 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ˆ xZS )ÚStoryAreaTypeah  Describes the type of a clickable area on a story. Currently, it can be one of:

    * :class:`telegram.StoryAreaTypeLocation`
    * :class:`telegram.StoryAreaTypeSuggestedReaction`
    * :class:`telegram.StoryAreaTypeLink`
    * :class:`telegram.StoryAreaTypeWeather`
    * :class:`telegram.StoryAreaTypeUniqueGift`

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their :attr:`type` is equal.

    .. versionadded:: 22.1

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

    Attributes:
        type (:obj:`str`): Type of the area.

    )ÚtypeÚLOCATIONÚSUGGESTED_REACTIONÚLINKÚWEATHERÚUNIQUE_GIFTNr   r1   r   r   c                ó¾   •— t         ‰| �  |¬«       t        j                  t        j
                  ||«      | _        | j                  f| _        | j                  «        y r   )	r   r   r   Ú
get_memberr   ÚStoryAreaTypeTyper1   r   r   )r   r1   r   r   s      €r   r   zStoryAreaType.__init__¼   sE   ø€ ô 	‰Ñ JÐÔ/ÜŸ™¬×)DÑ)DÀdÈDÓQˆŒ	àŸ)™)˜ˆŒØ�‰�r   )r   r   r    r!   r"   r   r9   r2   r   r.   Ú__annotations__r3   r4   r5   r6   r   r   r$   r%   s   @r   r0   r0   ™   sÐ   ø… ñð* €Ià$×6Ñ6×?Ñ?€Hˆe�C‰jÓ?Ø@Ø%.×%@Ñ%@×%SÑ%SÐ˜˜c™
ÓSØJØ ×2Ñ2×7Ñ7€Dˆ%�‰*Ó7Ø<Ø#×5Ñ5×=Ñ=€GˆU�3‰ZÓ=Ø?Ø'×9Ñ9×EÑE€K��s‘ÓEØCð '+ò	
àð
ð ˜t‘Oð	
ð
 
÷
ñ 
r   r0   c                   óR   ‡ — e Zd ZdZdZ	 dddœdedededz  dedz  d	df
ˆ fd
„Zˆ xZ	S )ÚStoryAreaTypeLocationa¥  Describes a story area pointing to a location. Currently, a story can have up to
    :tg-const:`~telegram.constants.StoryAreaTypeLimit.MAX_LOCATION_AREAS` location areas.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their :attr:`latitude` and :attr:`longitude` are equal.

    .. versionadded:: 22.1

    Args:
        latitude (:obj:`float`): Location latitude in degrees.
        longitude (:obj:`float`): Location longitude in degrees.
        address (:class:`telegram.LocationAddress`, optional): Address of the location.

    Attributes:
        type (:obj:`str`): Type of the area, always :attr:`~telegram.StoryAreaType.LOCATION`.
        latitude (:obj:`float`): Location latitude in degrees.
        longitude (:obj:`float`): Location longitude in degrees.
        address (:class:`telegram.LocationAddress`): Optional. Address of the location.

    )ÚaddressÚlatitudeÚ	longitudeNr   r>   r?   r=   r   r   c                ó  •— t         ‰| �  t        j                  |¬«       | j	                  «       5  || _        || _        || _        | j                  | j
                  | j                  f| _	        d d d «       y # 1 sw Y   y xY w©N)r1   r   )
r   r   r0   r2   Ú	_unfrozenr>   r?   r=   r1   r   )r   r>   r?   r=   r   r   s        €r   r   zStoryAreaTypeLocation.__init__á   so   ø€ ô 	‰Ñœm×4Ñ4ÀÐÔLà�^‰^Óñ 	HØ#+ˆDŒMØ$-ˆDŒNØ3:ˆDŒLà"Ÿi™i¨¯©¸¿¹ÐGˆDŒN÷	H÷ 	Hñ 	Hús   ±>A8Á8B)N)
r   r   r    r!   r"   r#   r'   r   r   r$   r%   s   @r   r<   r<   É   si   ø„ ñð* 5€Ið +/ð	Hð '+òHàðHð ðHð ! 4Ñ'ð	Hð ˜t‘OðHð 
÷Hñ Hr   r<   c                   óZ   ‡ — e Zd ZdZdZ	 	 dddœdededz  dedz  dedz  d	df
ˆ fd
„Zˆ xZ	S )ÚStoryAreaTypeSuggestedReactiona�  
    Describes a story area pointing to a suggested reaction. Currently, a story can have up to
    :tg-const:`~telegram.constants.StoryAreaTypeLimit.MAX_SUGGESTED_REACTION_AREAS`
    suggested reaction areas.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their :attr:`reaction_type`, :attr:`is_dark` and :attr:`is_flipped`
    are equal.

    .. versionadded:: 22.1

    Args:
        reaction_type (:class:`ReactionType`): Type of the reaction.
        is_dark (:obj:`bool`, optional): Pass :obj:`True` if the reaction area has a dark
            background.
        is_flipped (:obj:`bool`, optional): Pass :obj:`True` if reaction area corner is flipped.

    Attributes:
        type (:obj:`str`): Type of the area, always
            :tg-const:`~telegram.StoryAreaType.SUGGESTED_REACTION`.
        reaction_type (:class:`ReactionType`): Type of the reaction.
        is_dark (:obj:`bool`): Optional. Pass :obj:`True` if the reaction area has a dark
            background.
        is_flipped (:obj:`bool`): Optional. Pass :obj:`True` if reaction area corner is flipped.

    )Úis_darkÚ
is_flippedÚreaction_typeNr   rG   rE   rF   r   r   c                ó  •— t         ‰| �  t        j                  |¬«       | j	                  «       5  || _        || _        || _        | j                  | j
                  | j                  | j                  f| _	        d d d «       y # 1 sw Y   y xY wrA   )
r   r   r0   r3   rB   rG   rE   rF   r1   r   )r   rG   rE   rF   r   r   s        €r   r   z'StoryAreaTypeSuggestedReaction.__init__  sx   ø€ ô 	‰Ñœm×>Ñ>È:ÐÔVà�^‰^Óñ 	\Ø/<ˆDÔØ(/ˆDŒLØ+5ˆDŒOà"Ÿi™i¨×);Ñ);¸T¿\¹\È4Ï?É?Ð[ˆDŒN÷	\÷ 	\ñ 	\úó   ±A	BÂB)NN)
r   r   r    r!   r"   r   Úboolr   r   r$   r%   s   @r   rD   rD   ó   so   ø„ ñð6 ;€Ið
  $Ø"&ð	\ð '+ò\à#ð\ð ˜‘ð\ð ˜4‘Kð	\ð ˜t‘Oð\ð 
÷\ñ \r   rD   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 )	ÚStoryAreaTypeLinka–  Describes a story area pointing to an ``HTTP`` or ``tg://`` link. Currently, a story can
    have up to :tg-const:`~telegram.constants.StoryAreaTypeLimit.MAX_LINK_AREAS` link areas.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their :attr:`url` is equal.

    .. versionadded:: 22.1

    Args:
        url (:obj:`str`): ``HTTP`` or ``tg://`` URL to be opened when the area is clicked.

    Attributes:
        type (:obj:`str`): Type of the area, always :attr:`~telegram.StoryAreaType.LINK`.
        url (:obj:`str`): ``HTTP`` or ``tg://`` URL to be opened when the area is clicked.

    )ÚurlNr   rM   r   r   c                óÖ   •— t         ‰| �  t        j                  |¬«       | j	                  «       5  || _        | j                  | j
                  f| _        d d d «       y # 1 sw Y   y xY wrA   )r   r   r0   r4   rB   rM   r1   r   )r   rM   r   r   s      €r   r   zStoryAreaTypeLink.__init__7  sW   ø€ ô 	‰Ñœm×0Ñ0¸ZÐÔHà�^‰^Óñ 	3ØˆDŒHà"Ÿi™i¨¯©Ð2ˆDŒN÷	3÷ 	3ñ 	3úó   ±%AÁA(r-   r%   s   @r   rL   rL   #  s>   ø„ ñð" €Ið '+ò	3àð3ð ˜t‘Oð	3ð
 
÷3ñ 3r   rL   c                   óH   ‡ — e Zd ZdZdZddœdededededz  d	df
ˆ fd
„Z	ˆ xZ
S )ÚStoryAreaTypeWeatheraè  
    Describes a story area containing weather information. Currently, a story can have up to
    :tg-const:`~telegram.constants.StoryAreaTypeLimit.MAX_WEATHER_AREAS` weather areas.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their :attr:`temperature`, :attr:`emoji` and
    :attr:`background_color` are equal.

    .. versionadded:: 22.1

    Args:
        temperature (:obj:`float`): Temperature, in degree Celsius.
        emoji (:obj:`str`): Emoji representing the weather.
        background_color (:obj:`int`): A color of the area background in the ``ARGB`` format.

    Attributes:
        type (:obj:`str`): Type of the area, always
            :tg-const:`~telegram.StoryAreaType.WEATHER`.
        temperature (:obj:`float`): Temperature, in degree Celsius.
        emoji (:obj:`str`): Emoji representing the weather.
        background_color (:obj:`int`): A color of the area background in the ``ARGB`` format.

    )Úbackground_colorÚemojiÚtemperatureNr   rT   rS   rR   r   r   c                ó  •— t         ‰| �  t        j                  |¬«       | j	                  «       5  || _        || _        || _        | j                  | j
                  | j                  | j                  f| _	        d d d «       y # 1 sw Y   y xY wrA   )
r   r   r0   r5   rB   rT   rS   rR   r1   r   )r   rT   rS   rR   r   r   s        €r   r   zStoryAreaTypeWeather.__init__`  s{   ø€ ô 	‰Ñœm×3Ñ3À
ÐÔKà�^‰^Óñ 	^Ø&1ˆDÔØ#ˆDŒJØ)9ˆDÔ!à"Ÿi™i¨×)9Ñ)9¸4¿:¹:Àt×G\ÑG\Ð]ˆDŒN÷	^÷ 	^ñ 	^úrI   )r   r   r    r!   r"   r#   r.   Úintr   r   r$   r%   s   @r   rQ   rQ   E  sY   ø„ ñð0 =€Ið '+ò^àð^ð ð^ð ð	^ð ˜t‘Oð^ð 
÷^ñ ^r   rQ   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 )	ÚStoryAreaTypeUniqueGiftad  
    Describes a story area pointing to a unique gift. Currently, a story can have at most
    :tg-const:`~telegram.constants.StoryAreaTypeLimit.MAX_UNIQUE_GIFT_AREAS` unique gift area.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their :attr:`name` is equal.

    .. versionadded:: 22.1

    Args:
        name (:obj:`str`): Unique name of the gift.

    Attributes:
        type (:obj:`str`): Type of the area, always
            :tg-const:`~telegram.StoryAreaType.UNIQUE_GIFT`.
        name (:obj:`str`): Unique name of the gift.

    )ÚnameNr   rY   r   r   c                óÖ   •— t         ‰| �  t        j                  |¬«       | j	                  «       5  || _        | j                  | j
                  f| _        d d d «       y # 1 sw Y   y xY wrA   )r   r   r0   r6   rB   rY   r1   r   )r   rY   r   r   s      €r   r   z StoryAreaTypeUniqueGift.__init__ˆ  sW   ø€ ô 	‰Ñœm×7Ñ7ÀJÐÔOà�^‰^Óñ 	4Ø!ˆDŒIà"Ÿi™i¨¯©Ð3ˆDŒN÷	4÷ 	4ñ 	4úrO   r-   r%   s   @r   rX   rX   r  s>   ø„ ñð& €Ið '+ò	4àð4ð ˜t‘Oð	4ð
 
÷4ñ 4r   rX   c            	       óD   ‡ — e Zd ZdZdZddœdedededz  ddfˆ fd	„Zˆ xZ	S )
Ú	StoryAreaa4  Describes a clickable area on a story media.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their :attr:`position` and :attr:`type` are equal.

    .. versionadded:: 22.1

    Args:
        position (:class:`telegram.StoryAreaPosition`): Position of the area.
        type (:class:`telegram.StoryAreaType`): Type of the area.

    Attributes:
        position (:class:`telegram.StoryAreaPosition`): Position of the area.
        type (:class:`telegram.StoryAreaType`): Type of the area.

    )Úpositionr1   Nr   r]   r1   r   r   c                óœ   •— t         ‰| �  |¬«       || _        || _        | j                  | j                  f| _        | j                  «        y r   )r   r   r]   r1   r   r   )r   r]   r1   r   r   s       €r   r   zStoryArea.__init__ª  s@   ø€ ô 	‰Ñ JÐÔ/Ø+3ˆŒØ#'ˆŒ	ØŸ-™-¨¯©Ð3ˆŒà�‰�r   )
r   r   r    r!   r"   r
   r0   r   r   r$   r%   s   @r   r\   r\   –  sH   ø„ ñð" %€Ið '+òà#ðð ðð
 ˜t‘Oðð 
÷ñ r   r\   N)r!   Útypingr   Útelegramr   Útelegram._reactionr   Útelegram._telegramobjectr   Útelegram._utilsr   Útelegram._utils.typesr   r
   r'   r0   r<   rD   rL   rQ   rX   r\   © r   r   ú<module>rf      s˜   ðñ& ?å å Ý +Ý 3Ý  Ý *ôJ˜ô JôZ+�nô +ô\-�Nô -ô`'H˜Mô 'HôT-\ ]ô -\ô`3˜ô 3ôD*^˜=ô *^ôZ!4˜mô !4ôH �õ  r   