Vc\)|ddlZddlZddlZddlZddlmZGddZeZddZe dedZ d D]Z e e e [ d Z d D]Ze d eze [d Ze dedZdZdZdZ ddZeee ddZeejje ddZeeefD]Zeee[dS)N) quoprimimec2eZdZdZdZdZdZdZdZdS)ContentManagerc"i|_i|_dSN) get_handlers set_handlers)selfs -/usr/lib64/python3.11/email/contentmanager.py__init__zContentManager.__init__ sc||j|<dSr)r)r keyhandlers r add_get_handlerzContentManager.add_get_handler s!(#r c0|}||jvr|j||g|Ri|S|}||jvr|j||g|Ri|Sd|jvr|jd|g|Ri|St|)N)get_content_typerget_content_maintypeKeyError)r msgargskw content_typemaintypes r get_contentzContentManager.get_contents++-- 4, , E24$\23DDDDDD D++-- t( ( A.4$X.s@T@@@R@@ @ " " ;(4$R(:t:::r:: :|$$$r c||j|<dSr)r )r typekeyrs r add_set_handlerzContentManager.add_set_handlers%,'"""r c|dkrtd|||}||||g|Ri|dS)N multipartz"set_content not valid on multipart)r TypeError_find_set_handler clear_content)r robjrrrs r set_contentzContentManager.set_contents|  # # % % 4 B@AA A((c22 S&4&&&2&&&&&r cd}t|jD]}||jvr|j|cS|j}t |dd}|rd||fn|}||}||jvr|j|cS||jvr|j|cS|j}||jvr|j|cSd|jvr |jdSt|)N __module__r.)type__mro__r __qualname__getattrjoin__name__r) r rr%full_path_for_errortypqnamemodname full_pathnames r r#z ContentManager._find_set_handler's0"99$ / /Cd'' .(----$Ec<44G6=H'5!12225I" 0&/#D-- 4(3333)) 0(////ooTo**GmmIw//G >>'&> 1 11r textc.|dS)NTr9r>rs r get_non_text_contentrFGs ??$? ' ''r zaudio image video applicationc,|dSNrrDrEs r get_message_contentrINs ??1  r zrfc822 external-bodyzmessage/cFt|dSrH)bytesr>rEs r %get_and_fixup_unknown_message_contentrLUs ## $ $$r messagecd||f|d<|rt|dds|jfd|D} |D] }|jr |jd|||j<!dS#t jj$rA}td | |j|d}~wwxYwdS)N/z Content-Typerr5cLg|] }j|g!Sr6)header_factoryheader_source_parse).0headermps r z _prepare_set..fsC...!)r("*@*@&*J*JK...r zInvalid header: {})policy) r.hasattrrWdefectsr5emailr= HeaderDefect ValueErrorformatfold)rrsubtypeheadersrTexcrUs @r _prepare_setrbas'((Hg#677C Jwqz6** .B....%,...G J! * *>, .++#)FK   * *|( J J J188 & 3: > >@@AAFI J J J Js #A//C.embedded_bodysW\\%%8%87%BBr c2d|dzS)N r)rs r normal_bodyz!_encode_text..normal_bodys5::e#4#4u#<z_encode_text..s(&&1A&&&&&&r r)default7bit8bitsurrogateescape zlatin-1base64quoted-printablez$Unknown content transfer encoding {})encode splitlinesrmaxrwr:UnicodeDecodeErrorcte_typer body_encodertrurrr|r\r]) stringr;cterWrrrsniffsniff_qp sniff_base64rvrs @r _encode_textrs MM' " " - - / /En##G,,GBBBBB<<< % &&&&& 2 2 2f6L L U {{51188AAAA%    &( U{{51188BSTTTT eCRCj)))%,,y*A*A*0*@BB*511 x==3|,, , %CC$C5zzR %H}$ f} M{5!!((11 M{5!!((2CDD " "M%kk%&8&8&?&? &J&J&,&<>> MmmE22F4JKK?FFsKKLLL 9s3B B B plainutf-8c .t|d|| t||||j\}} || |dt jj||d||d<t|||||dS)NrBr;Tr7Content-Transfer-Encoding) rbrrW set_payloadrfrZr;ALIASESgetrl) rrr_r;rrhrerirjr`payloads r set_text_contentrsfgw///cjAALCOOGMM)-'++GW==   (+C#$#{Hc6:::::r rfc822c ||dkrtd|dkr-|dvr"td||dn|}n3|dkr)|dvr"td |d }n|d }t|d ||||g||d <t |||||dS) Npartialz4message/partial is not supported for Message objectsr)Nrrbinaryz*message/rfc822 parts do not support cte={}rz external-body)Nrz1message/external-body parts do not support cte={}rrMr)r\r]rbrrl) rrMr_rrhrerirjr`s r set_message_contentrs)QOPPP( 6 6 J<CCCHHJJ J,ff O #  n $ QCJJ3OOQQ Q i'222OOWI'*C#$#{Hc6:::::r rc t|||| |dkrt||jj}nj|dkr.t j|ddd}|d}n6|dkr|d}n|d vr|dd }||||d <t|||||dS) Nr)rwrFT)istextrT quotetabsrpr)rrrr) rbr|rWrwrtb2a_qpr:rrl) rrvrr_rrhrerirjr`s r set_bytes_contentrsh111 h 7dCJ4NOOO " " 7tE%4PPP{{7## 7{{7## " "7{{7$566OOD'*C#$#{Hc6:::::r r)rrNNNNNN)rNNNNNN)rNNNNN)rt email.charsetrZ email.message email.errorsrrraw_data_managerrArrFsplitrrIr_rLrbrlr|rrrstrrrMMessagerrK bytearray memoryviewr1r6r r rs3,3,3,3,3,3,3,3,l">##2222 )9:::(((/5577EEH$$X/CDDDD %++--NNG$$Z%79LMMMM %%% !FHHHJJJ"&&&*"""$$$NIM:>*. ; ; ; ; &6777=A<@,0;;;;< !68KLLL9A:>*.;;;;& 9j )==C$$S*;<<<<CCr