L izdZddlZddlmZmZmZddlmZddl m Z ddl m Z ddl mZddlmZmZGd d e Zy) zCThis module contains an object that represents a Telegram Location.N)FinalOptionalUnion) constants)TelegramObject) to_timedelta)get_timedelta_value)JSONDict TimePeriodcfeZdZUdZdZ ddddededeedeed eed eed ee ffd Z e d ee ee jffdZej"j$Zeeed< ej"j*Zeeed< ej"j,Zeeed<xZS)Locationa This object represents a point on the map. Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their :attr:`longitude` and :attr:`latitude` are equal. Args: longitude (:obj:`float`): Longitude as defined by the sender. latitude (:obj:`float`): Latitude as defined by the sender. horizontal_accuracy (:obj:`float`, optional): The radius of uncertainty for the location, measured in meters; 0-:tg-const:`telegram.Location.HORIZONTAL_ACCURACY`. live_period (:obj:`int` | :class:`datetime.timedelta`, optional): Time relative to the message sending date, during which the location can be updated, in seconds. For active live locations only. .. versionchanged:: v22.2 |time-period-input| heading (:obj:`int`, optional): The direction in which user is moving, in degrees; :tg-const:`telegram.Location.MIN_HEADING`-:tg-const:`telegram.Location.MAX_HEADING`. For active live locations only. proximity_alert_radius (:obj:`int`, optional): Maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only. Attributes: longitude (:obj:`float`): Longitude as defined by the sender. latitude (:obj:`float`): Latitude as defined by the sender. horizontal_accuracy (:obj:`float`): Optional. The radius of uncertainty for the location, measured in meters; 0-:tg-const:`telegram.Location.HORIZONTAL_ACCURACY`. live_period (:obj:`int` | :class:`datetime.timedelta`): Optional. Time relative to the message sending date, during which the location can be updated, in seconds. For active live locations only. .. deprecated:: v22.2 |time-period-int-deprecated| heading (:obj:`int`): Optional. The direction in which user is moving, in degrees; :tg-const:`telegram.Location.MIN_HEADING`-:tg-const:`telegram.Location.MAX_HEADING`. For active live locations only. proximity_alert_radius (:obj:`int`): Optional. Maximum distance for proximity alerts about approaching another chat member, in meters. For sent live locations only. ) _live_periodheadinghorizontal_accuracylatitude longitudeproximity_alert_radiusN api_kwargsrrr live_periodrrrct||||_||_||_t ||_||_|r t|nd|_ |j|jf|_ |jy)Nr) super__init__rrrrrrintr _id_attrs_freeze) selfrrrrrrr __class__s ^/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/telegram/_files/location.pyrzLocation.__init__Rsv J/ )' 5H 5A+5N&- +AC& 't #..$--8 returnc0t|jdS)Nr) attribute)r r)rs rrzLocation.live_periodns"4#4#4 NNr HORIZONTAL_ACCURACY MIN_HEADING MAX_HEADING)NNNN)__name__ __module__ __qualname____doc__ __slots__floatrr rr rpropertyrdtm timedeltarr LocationLimitr$r__annotations__r%r& __classcell__)rs@rr r s'RI04,0!%04*.&e_  j)  # !) X&8OXeC,>&?@OO'0&=&=&Q&QsQ(55AAKsA(55AAKsAr r )r*datetimer.typingrrrtelegramrtelegram._telegramobjectrtelegram._utils.argumentparsingrtelegram._utils.datetimer telegram._utils.typesr r r r rr;s1&J))3886a~ar