VcEcs gdZddlZddlZdZdZdZgdZgdZdddddd d dd d d d d d dZdZ dZ dZ dZ dZ GddZGddeZdS)) mktime_tz parsedate parsedate_tzquoteN z, )ZjanZfebZmarZaprmayZjunZjulZaugZsepZoctZnovZdecZjanuaryZfebruaryZmarchZaprilrZjuneZjulyZaugustZ septemberZoctoberZnovemberZdecember)ZmonZtueZwedZthuZfriZsatZsunipii iiDi)ZUTZUTCZGMTZZZASTZADTZESTZEDTZCSTZCDTZMSTZMDTZPSTZPDTcsb t|}|sdS|dd|d<t|S)N r) _parsedate_tztuple)dataZres )/usr/lib64/python3.11/email/_parseaddr.pyrr-sD   C  1vA ::c s |sdS|}|sdS|dds!|dtvr|d=n7|dd}|dkr|d|dzd|d<t |dkr;|dd}t |dkr ||ddz}t |dkrm|d}|d}|dkr|d}|dkr|d|||dg|dd<n|d t |d krdS|dd }|\}}}}}|r|r|sdS|}|tvr!||}}|tvrdSt |dz}|d kr|d z}|ddkr |dd}|d }|dkr||}}|ddkr|dd}|sdS|d s||}}|ddkr |dd}|d }t |d kr|\} } d} nt |dkr|\} } } nqt |dkr\d|dvrR|dd}t |d kr|\} } d} nt |dkr|\} } } ndSdS t|}t|}t| } t| } t| } n#t$rYdSwxYw|dkr|dkr|dz }n|dz }d} | }|tvrt|} n> t|} n#t$rYnwxYw| dkr|drd} | r"| dkrd} | } nd} | | dzdz| dzdzzz} |||| | | ddd| g S)Nr,iz-iz+rii :iZ0.idiDiliii<)ZsplitZendswithZlower _daynamesZrfindlenZfindappend _monthnamesindexZisdigitZintZ ValueErrorZupper _timezonesZ startswith)r ZiZstuffZsZddZmmZyyZtmZtzZthhZtmmZtssZtzoffsetZtzsigns r r r 9s t ::< 2wwHH    D  Q; 2==-- HJ a< F yHHFx}d2hnb5HHI BS#q!R ::s%7A N NNO)) O65O6csd t|}t|tr |ddS|S)Nr)rZ isinstancer r Ztr r rrs60TA!U!u rcs |dtj|dddzStj|}||dz S)Nri)r)timeZmktimecalendarZtimegmrr r rrsKO Aw{48e+,,, OD ! !47{rcsX |ddddS)N\z\\"z\")replace)Zstr r rrs- ;;tV $ $ , ,S% 8 88rcsbeZdZ dZdZdZdZdZdZdZ dd Z d Z d Z d Z ddZdZd S) AddrlistClasscs d|_d|_d|_d|_|j|jz|_|j|jz|jz|_|jdd|_||_g|_ dS)Nz ()<>@,:;."[]rz z rr) specialsposLWSZCRFWSatomendsr phraseendsfield commentlistselfr(r r __init__zAddrlistClass.__init__s| ( 8dg% 047: -//R88 rcs g}|jt|jkr|j|j|jdzvrJ|j|jdvr%||j|j|xjdz c_nD|j|jdkr-|j|nn|jt|jkt|S)Nz r() r#rr(r$rr) getcomment EMPTYSTRINGjoin)r+Zwslistr r gotonextzAddrlistClass.gotonexts4hTZ( z$(#tx&'88 :dh'v58MM$*TX"6777A DH%,  ''(9(9::::hTZ( '''rcs g}|jt|jkrN|}|r||z }n|d|jt|jkN|S)N)rr)r#rr( getaddressr)r+ZresultZad r getaddrlistzAddrlistClass.getaddrlistsy hTZ( (""B ("  h''' hTZ( (  rcs g|_||j}|j}|}|g}|jt |jkr,|r(t |j|dfg}n|j|jdvrF||_||_|}t |j|fg}n|j|jdkrg}t |j}|xjdz c_|jt |jkrz||j|kr'|j|jdkr|xjdz c_n4|| z}|jt |jkzn|j|jdkrx| }|jr?t |dzd|jzd z|fg}nrt ||fg}nT|r)t |j|dfg}n)|j|j|j vr|xjdz c_||jt |jkr&|j|jd kr|xjdz c_|S) Nrz.@rrz;$zz%0047"xx(899 :#*E  HHMHHrcs |j|jdkrdSd}|xjdz c_|d}|jt|jkr|r|d}n|j|jdkr|xjdz c_n|j|jdkr|xjdz c_d}nL|j|jdkr|xjdz c_n%|}|xjdz c_n1||jt|jk|S) Nr5Frrz>@Tr)r(r#r1r getdomainr8)r+Z expectrouteZadlistr3r r9zAddrlistClass.getrouteaddrGsK  :dh 3 &  F  A  hTZ(     # DH%, A DH%, A " DH%, A ))++A  MMOOO!hTZ( $ rcs g}||jt|jkrzd}|j|jdkrX|r.|ds||d|xjdz c_d}n|j|jdkr8|dt|znq|j|j|j vr1|r.|ds|nr|| |}|r|r|||jt|jkz|jt|jks|j|jdkrt |S|d|xjdz c_|| }|stSt ||zS) NTrrrFrz"%s"r;)r1r#rr(ZstripZpoprrgetquoter&getatomr/r0r<)r+ZaslistZ preserve_wsZwsZdomains r r8zAddrlistClass.getaddrspecgs-* hTZ( "Kz$(#s* .!&*"2"2"4"4!JJLLL c"""A # DH%, . fuT]]__'='==>>>>DH%6 .!&*"2"2"4"4!JJLLL dllnn---B "r " b!!!%hTZ( "( 8s4: & ,$*TX*>#*E ,##F++ + c A  !!  ''&00rcs@ g}|jt|jkrd|j|j|jvr|xjdz c_n|j|jdkr-|j|n|j|jdkr(||n|j|jdkr&|xjdz c_|dn^|j|jdkrtS|j|j|j vrnE|| |jt|jkdt |S)Nrr-[rr;) r#rr(r$r)rr.getdomainliteralr/r&r>r0)r+Zsdlistr r r<zAddrlistClass.getdomainsw;hTZ( .z$(#tx/ .A DH%, . ''(9(9::::DH%, . d33556666DH%, .A  c""""DH%, .#"DH%6 . dllnn---#hTZ( .$'''rTcs |j|j|krdSdg}d}|xjdz c_|jt|jkr|r(||j|jd}n|j|j|vr|xjdz c_n|r>|j|jdkr(|||j|jdkrd}n%||j|j|xjdz c_|jt|jkt |S)NrFrr-rT)r(r#rrr.r/r0)r+Z begincharZendcharsZ allowcommentsZslistrs r getdelimitedzAddrlistClass.getdelimitedsZ  :dh 9 , 2 A hTZ(  3 TZ1222DH%1 3A  34:dh#73#> 3 T__..///DH%- 3 TZ1222 HHMHHhTZ(  &&&rc2 |dddS)Nrz" FrAr+r r r=zAddrlistClass.getquotes?  eU333rcrB)Nr-z) TrCrDr r r.zAddrlistClass.getcommentsE  eT222rcs8 d|dddzS)Nz[%s]r?z] FrCrDr r r@zAddrlistClass.getdomainliterals"/))#ue<<<zAddrlistClass.getatoms ! 4  %}HhTZ( z$(#x/ 6 48 4555 HHMHH hTZ( )))rcsh g}|jt|jkr|j|j|jvr|xjdz c_n|j|jdkr(||n|j|jdkr-|j|nG|j|j|jvrnK|| |j|jt|jk|S)Nrrr-) r#rr(r%rr=r)r.r'r>)r+r:r r r6zAddrlistClass.getphraselists hTZ( <z$(#tx/ <A DH%, < T]]__----DH%, < ''(9(9::::DH%8 < T\\$/::;;;hTZ( < r)TN)__name__ __module__ __qualname__r,r1r4r2r9r8r<rAr=r.r@r>r6rr r!r!s& ( ( (   999v@$1$1$1L(((.#'#'#'#'J444333===****(rr!cs:eZdZ dZdZdZdZdZdZdZ dS) AddressListcst|||r||_dSg|_dSrE)r!r,r4 addresslistr*r r r,zAddressList.__init__sHtU+++  "#//11D   !D   rcs*t|jSrE)rrKrDr r __len__zAddressList.__len__ s4#$$$rcstd}|jdd|_|jD]%}||jvr|j|&|SrErJrKrr+otherZnewaddrx r __add__zAddressList.__add__ sbd##".qqq1" . .A(( .#**1---rcs`|jD]%}||jvr|j|&|SrE)rKrr+rOrPr3r __iadd__zAddressList.__iadd__sA" + +A(( + ''*** rcs~td}|jD]%}||jvr|j|&|SrErMrNrQr __sub__zAddressList.__sub__sNd##! . .A)) .#**1---rcs`|jD]%}||jvr|j|&|SrE)rKZremoverSr3r __isub__zAddressList.__isub__$sA" + +AD$$ + ''*** rcs|j|SrE)rK)r+rr r __getitem__zAddressList.__getitem__+s&&rN) rFrGrHr,rLrRrTrUrVrWrIrr rJrJsJ"""%%%'''''rrJ)Z__all__rrr7r/Z COMMASPACErrrrr rrrr!rJrIrr rXsI       III > = = AQA$$$$$     z;z;z;z999kkkkkkkkZ -'-'-'-'-'--'-'-'-'-'r