Mini Kabibi Habibi

Current Path : C:/Users/ITO/AppData/Local/Programs/Python/Python314/Lib/email/__pycache__/
Upload File :
Current File : C:/Users/ITO/AppData/Local/Programs/Python/Python314/Lib/email/__pycache__/utils.cpython-314.pyc

+
��h�A���Rt.R$Ot^RIt^RIt^RIt^RIt^RIt^RIH	t	^RIH
t^RIHt^RIH
t
HtHtRtRtRtRtR	t]P*!R
4t]P*!R4tRtR
tR%RltRtRtRtRR/RltRtRt Rt!Rt"R&Rlt#R'Rlt$R(Rlt%Rt&RR/Rlt'Rt(Rt)R(Rlt*]P*!R ]PV4t,R!t-R)R"lt.R*R#lt/R#)+zMiscellaneous utilities.N)�quote)�AddressList)�	mktime_tz)�	parsedate�parsedate_tz�
_parsedate_tzz, �z
�'z[][\\()<>@,:;".]z[\\"]c�L�VP4R# \dR#i;i)z;Return True if s may contain surrogate-escaped binary data.FT)�encode�UnicodeEncodeError)�ss&�GC:\Users\ITO\AppData\Local\Programs\Python\Python314\Lib\email\utils.py�_has_surrogatesr/s%��
�	���
�������s��#�#c�J�VPRR4pVPRR4#)�utf-8�surrogateescape�replace)r�decode)�string�original_bytess& r�	_sanitizer<s(��
�]�]�7�,=�>�N�� � ��)�4�4�c��Vwr#VPR4V'dXVPR4Rp\PV4'dRp\P	RV4pV:V:V:RV:R2#V# \
dC\
T\4'd^RIH	pT!T4pTPT4pT:RT:R2u#i;i)a�The inverse of parseaddr(), this takes a 2-tuple of the form
(realname, email_address) and returns the string value suitable
for an RFC 2822 From, To or Cc header.

If the first element of pair is false, then the second element is
returned unmodified.

The optional charset is the character set that is used to encode
realname in case realname is not ASCII safe.  Can be an instance of str or
a Charset-like object which has a header_encode method.  Default is
'utf-8'.
�asciir�"z\\\g<0>z <�>)�Charset)r�
specialsre�search�	escapesre�subr�
isinstance�str�
email.charsetr�
header_encode)�pair�charset�name�address�quotesr�encoded_names&&     r�
formataddrr,Hs����M�D��N�N�7���	C��K�K�� ��F�� � ��&�&����=�=��T�2�D�$*�D�&�'�B�B��N��"�	7��'�3�'�'�1�!�'�*��"�0�0��6�L� ,�g�6�6�
	7�s�A7�7A
C�Cc#�"�^pRp\V4F.wrV'dVRV,3x�RpKVR8XdRpK)W3x�K0	V'd	VR3x�R#R#5i)�F�\TN)�	enumerate)�addr�pos�escape�chs&   r�_iter_escaped_charsr5ks]���
�C�
�F��T�?������r�	�"�"��F�
�4�Z��F��)�O�#���D�k���s�A	A�
Ac��RV9dV#^pRp.p\V4F:wrEVR8XgKVfTpKW8wdVPWV4V^,pRpK<	V\V48dVPWR4RPV4#)z Strip real names between quotes.rNr)r5�append�len�join)r1�start�open_pos�resultr2r4s&     r�_strip_quoted_realnamesr=zs���
�$����
�E��H�
�F�&�t�,���
��9������$��M�M�$�X�"6�7��a�����-�
�s�4�y���
�
�d�6�l�#�
�7�7�6�?�rT�strictc���V'g4\PRV44p\V4pVP#VUu.uFp\	V4NK	pp\V4p\PV4p\V4p\
VP4p^pVF-p\V4pV^VPR4,,
pK/	\V4V8wdR.#V#uupi)z�Return a list of (REALNAME, EMAIL) or ('','') for each fieldvalue.

When parsing fails for a fieldvalue, a 2-tuple of ('', '') is returned in
its place.

If strict is true, use a strict parser which rejects malformed inputs.
c3�8"�TFp\V4x�K	R#5i�N�r#)�.0�vs& r�	<genexpr>�getaddresses.<locals>.<genexpr>�s���:�k��c�!�f�f�k����,�rr)
�
COMMASPACEr9�_AddressList�addresslistr#�_pre_parse_validation�_post_parse_validationr=�countr8)�fieldvaluesr>�all�arDr1r<�ns&$      r�getaddressesrT�s���$��o�o�:�k�:�:�������}�}��#.�/�;�a�3�q�6�;�K�/�'��4�K��?�?�;�'�D��T��A�
#�A�M�M�
2�F�	
�A�
��
$�A�&��	�Q������
�����6�{�a���z���M��%0s�C c��\V4p^p\V4F3wr#VR8XdV^,
pKVR8XgK V^,pV^8gK2R#	V^8H#)r.�(�)F)r=r5)r1�opensr2r4s&   r�_check_parenthesisrY�sX��"�4�(�D�
�E�&�t�,���
��9��Q�J�E�
�3�Y��Q�J�E��q�y��
-�
�Q�J�rc�d�.pVF'p\V4'gRpVPV4K)	V#)z('', ''))rYr7)�email_header_fields�accepted_valuesrDs&  rrMrM�s7���O�
 ��!�!�$�$��A����q�!�!�
�rc�^�.pVF$pRV^,9dRpVPV4K&	V#)�[rI)r7)�parsed_email_header_tuplesr\rDs&  rrNrN�s9���O�(���!�A�$�;��A����q�!�(�
�rc	��R.ROV^,,V^,.ROV^,^,
,V^,V^,V^,V^,V3,#)z"%s, %02d %s %04d %02d:%02d:%02d %s)�Mon�Tue�Wed�Thu�Fri�Sat�Sun)�Jan�Feb�Mar�Apr�May�Jun�Jul�Aug�Sep�Oct�Nov�Dec�)�	timetuple�zones&&r�_format_timetuple_and_zonerw�sZ��/�9�)�A�,�G��!��	3�3<�Q�<�!�3C�	E��!��i��l�I�a�L�)�A�,��
3��rc�$�Vf\P!4p\PPV\PP4pV'dVP4pRpMV'gVP
RR7p\W24#)a[Returns a date string as specified by RFC 2822, e.g.:

Fri, 09 Nov 2001 01:08:47 -0000

Optional timeval if given is a floating-point time value as accepted by
gmtime() and localtime(), otherwise the current time is used.

Optional localtime is a flag that when True, interprets timeval, and
returns a date relative to the local timezone instead of UTC, properly
taking daylight savings time into account.

Optional argument usegmt means that the timezone is written out as
an ascii string, not numeric one (so "GMT" instead of "+0000"). This
is needed for HTTP, and is only used when localtime==False.
NF)�tzinfo)�time�datetime�
fromtimestamp�timezone�utc�
astimezoner�format_datetime)�timeval�	localtime�usegmt�dts&&& r�
formatdater��si��$���)�)�+��	�	�	�	(�	(��(�2C�2C�2G�2G�	H�B��
�]�]�_����
�
�Z�Z�t�Z�
$���2�&�&rc��VP4pV'dFVPe*VP\PP8wd\R4hRpM"VPfRpMVP
R4p\W#4#)aTurn a datetime into a date string as specified in RFC 2822.

If usegmt is True, dt must be an aware datetime with an offset of zero.  In
this case 'GMT' will be rendered instead of the normal +0000 required by
RFC2822.  This is to support HTTP headers involving date stamps.
z%usegmt option requires a UTC datetime�GMTz-0000z%z)ruryr{r}r~�
ValueError�strftimerw)r�r��nowrvs&&  rr�r�sl��
�,�,�.�C�
�
�9�9���	�	�X�->�->�-B�-B� B��D�E�E���	���	����{�{�4� ��%�c�0�0rc��^RIp^RIp\\P!4^d,4p\P
!4pVP
^@4pVfRpM	RV,pVfVP4pRWEW`V3,pV#)acReturns a string suitable for RFC 2822 compliant Message-ID, e.g:

<142480216486.20800.16526388040877946887@nightshade.la.mastaler.com>

Optional idstring if given is a string used to strengthen the
uniqueness of the message id.  Optional domain if given provides the
portion of the message id after the '@'.  It defaults to the locally
defined hostname.
Nr�.z<%d.%d.%d%s@%s>)�random�socket�intrz�os�getpid�getrandbits�getfqdn)�idstring�domainr�r�r��pid�randint�msgids&&      r�
make_msgidr�st�����$�)�)�+�c�/�"�G�
�)�)�+�C�� � ��$�G�������>��
�~����!����w�&� I�I�E��Lrc
�(�\V4pVf\R\V4,4hVEvr#Vf\P!VR,!#\P!VR,R\P!\P
!VR74/#)Nz!Invalid date value or format "%s":N�Nry)�seconds)rr�r#r{r}�	timedelta)�data�parsed_date_tz�dtuple�tzs&   r�parsedate_to_datetimer�;s���"�4�(�N����<�s�4�y�H�I�I� �K�V�	�z�� � �&��*�-�-����f�R�j�F��$�$�X�%7�%7��%C�D�F�Frc�x�V'g)\V4PpV'gR#V^,#\V\4'd
V^,p\V\4'gR#\V.4^,p\
\V4P4pV'd\V4^8�dR#V^,#)z�
Parse addr into its constituent realname and email address parts.

Return a tuple of realname and email address, unless the parse fails, in
which case return a 2-tuple of ('', '').

If strict is True, use a strict parser which rejects malformed inputs.
rI)rKrLr"�listr#rMrNr8)r1r>�addrss&$ r�	parseaddrr�Fs�����T�"�.�.����O��Q�x���$�����A�w���d�C� � ��� �$��(��+�D�"�<��#5�#A�#A�B�E��C��J��N�����8�Orc�2�\V4^8�d�VPR4'd=VPR4'd&V^RPRR4PRR4#VPR4'dVPR4'dV^R#V#)zRemove quotes from a string.rz\\r/z\"�<r���)r8�
startswith�endswithrrBs&r�unquoter�es~��
�3�x�!�|��>�>�#���3�<�<��#4�#4��q��9�$�$�V�T�2�:�:�5�#�F�F��>�>�#���3�<�<��#4�#4��q��9���Jrc�\�VP\^4p\V4^8:dRRV3#V#)z#Decode string according to RFC 2231N)�split�TICKr8)r
�partss& r�decode_rfc2231r�qs.��
�G�G�D�!��E�
�5�z�Q���T�1�}���Lrc��\PPTRT;'gRR7pVfVfV#VfRpV:RV:RV:2#)z�Encode string according to RFC 2231.

If neither charset nor language is given, then s is returned as-is.  If
charset is given but not language, the string is encoded using the empty
string for language.
rr)�safe�encodingr	)�urllib�parser)r
r'�languages&&&r�encode_rfc2231r�ysN��	�����1�2��0B�0B�7��C�A���8�+������� �(�A�.�.rz&^(?P<name>\w+)\*((?P<num>[0-9]+)\*?)?$c��V^,.p/pVR,F�wr4VPR4p\V4p\PV4pV'dIVP	RR4wr7Ve\V4pVP
V.4PWtV34K�VPVR\V4,34K�	V'EdtVP4EF^wr8.pRp	\;QJdRV4F'gKRM	RM
!RV44p
V
'dVUu.uFq�^,fKVNK	ppM2VUu.uF&q�^,;'g^V^,V^,3NK(	ppVPR	R
7VFBwr|pV'd$\PPVRR7pRp	VPV4KD	\\PV44pV	'd.\!V4wr�pVPW=VRV,334EKDVPVRV,34EKa	V#uupiuupi)
zwDecode parameters list according to RFC 2231.

params is a sequence of 2-tuples containing (param name, string value).
:�NN�*r(�numz"%s"Fc3�8"�TFq^,^8Hx�K	R#5i)r.Nrt)rC�xs& rrE� decode_params.<locals>.<genexpr>�s���<�m��Q�4�1�9�m�rGTc��V^,#)r.rt)r�s&r�<lambda>�decode_params.<locals>.<lambda>�s��Q�q�Tr)�keyzlatin-1)r�)r�r��rfc2231_continuation�match�groupr��
setdefaultr7r�items�any�sortr�r��EMPTYSTRINGr9r�)�params�
new_params�rfc2231_paramsr(�value�encoded�mor��
continuations�extended�has_zeror�r
r'r�s&              r�
decode_paramsr��s���
��)��J��N��b�z�z����-�-��$������
!�
'�
'��
-��
������/�I�D����#�h���%�%�d�B�/�6�6��G�7L�M����t�V�e�E�l�%:�;�<�"��~�#1�#7�#7�#9��D��E��H��s�<�m�<�s�s�s�<�m�<�<�H��,9� N�M�q�q�T���M�
� N�
�BO� P�-�Q�A�$�)�)�!�Q�q�T�1�Q�4�!8�-�
� P����>��2�$1��������,�,�Q��,�C�A�#�H����Q��$1��+�*�*�5�1�2�E��+9�%�+@�(��5��!�!�4�8�V�e�^�)L�"M�N��!�!�4��%��"8�9�;$:�<���/!O�� Ps�&I�7I�I�Ic���\V\4'd\V4^8wd\V4#Vwr4pVfTp\	VR4p\WcV4# \d\T4u#i;i)�zraw-unicode-escape)r"�tupler8r��bytesr#�LookupError)r��errors�fallback_charsetr'r��text�rawbytess&&&    r�collapse_rfc2231_valuer��ss���e�U�#�#�s�5�z�Q���u�~��$��G�t���#���T�/�0�H���8�f�-�-�����t�}���s�
A�A/�.A/c�f�Vf\PP4pVP4#)aEReturn local time as an aware datetime object.

If called without arguments, return current time.  Otherwise *dt*
argument should be a datetime instance, and it is converted to the
local time zone according to the system time zone database.  If *dt* is
naive (that is, dt.tzinfo is None), it is assumed to be in local time.

)r{r�r)r�s&rr�r��s)��
�z�
�
�
�
"�
"�
$��
�=�=�?�r)r�r�r�r�r,r�r�rTr�rr�rrr�r�)r)NFF)F)NN)rzus-asciirA)0�__doc__�__all__r��rerzr{�urllib.parser��email._parseaddrrrrKrrrrrJr��UEMPTYSTRING�CRLFr��compilerr rrr,r5r=�supports_strict_parsingrTrYrMrNrwr�r�r�r�r�r�r�r��ASCIIr�r�r�r�rtrr�<module>r�s��
���$
�	����"�8�&�C�C�
�
�����
��
��
�Z�Z�+�
,�
��J�J�x� �	�	�5� �F��2��)��)�X��	��'�:1�&�8F��d��>��/��z�z�"K��H�H���4�l�4r