+
    üÐjÅ(  ã                   ó&  € R t ^ RIt^ RIHt ^ RIHt RtRtRt/ RRR	R
R/bRRRR
R/bRRRR
R/bRRRR
R/bRRRR
R/bRRRR
R/bRRRR
R/bRRR	R
R/bRRRR
R/bRRRR
R/bR RR!R
R/bR"RR#R
R/bR$RRR
R/bR%RRR
R/bR&RR'R
R/bR(RRR
R/bR)RR*R
R/bR+RRR
R/R,RR-R
R/R.RR'R
R/R/RRR
R/R0RR	R
R//Ct	/ RR=bR	R>bR!R?bR#R@bRRAbRRBbRRCbRRDbR'REbR1RFbRRGbRRHbRRIbR2RJbR-RKbR*RFbR3RKbt
 ! R4 R5]4      t ! R6 R7]4      t ! R8 R9]4      tR: tR; tR< tR# )Lz
XMPP Error support.
N)ÚOptional)Údomishz$http://www.w3.org/XML/1998/namespacez#urn:ietf:params:xml:ns:xmpp-streamsz#urn:ietf:params:xml:ns:xmpp-stanzasúbad-requestÚcodeÚ400ÚtypeÚmodifyÚconflictÚ409Úcancelúfeature-not-implementedÚ501Ú	forbiddenÚ403ÚauthÚgoneÚ302úinternal-server-errorÚ500Úwaitúitem-not-foundÚ404zjid-malformedúnot-acceptableÚ406únot-allowedÚ405únot-authorizedÚ401úpayment-requiredÚ402zrecipient-unavailableÚredirectúregistration-requiredÚ407zremote-server-not-foundúremote-server-timeoutÚ504zresource-constraintúservice-unavailableÚ503zsubscription-requiredzundefined-conditionzunexpected-requestÚ408Ú502Ú510c                   óV   a € ] tR t^Bt o RtRtR	R ltV 3R lR ltR tV 3R lt	Rt
V tR# )
Ú	BaseErrora  
Base class for XMPP error exceptions.

@cvar namespace: The namespace of the C{error} element generated by
                 C{getElement}.
@type namespace: C{str}
@ivar condition: The error condition. The valid values are defined by
                 subclasses of L{BaseError}.
@type contition: C{str}
@ivar text: Optional text message to supplement the condition or application
            specific condition.
@type text: C{unicode}
@ivar textLang: Identifier of the language used for the message in C{text}.
                Values are as described in RFC 3066.
@type textLang: C{str}
@ivar appCondition: Application specific condition element, supplementing
                    the error condition in C{condition}.
@type appCondition: object providing L{domish.IElement}.
Nc                ó`   € \         P                  V 4       Wn        W n        W0n        W@n        R # )N)Ú	ExceptionÚ__init__Ú	conditionÚtextÚtextLangÚappCondition)Úselfr/   r0   r1   r2   s   &&&&&ÚF/usr/lib/python3/dist-packages/twisted/words/protocols/jabber/error.pyr.   ÚBaseError.__init__Y   s%   € Ü×Ñ˜4Ô Ø"ŒØŒ	Ø ŒØ(Öó    c                ó    <€ V ^8„  d   QhRS[ /# )é   Úreturn)Ústr)ÚformatÚ__classdict__s   "€r4   Ú__annotate__ÚBaseError.__annotate__`   s   ø€ ÷ ñ ™ñ r6   c                ó¾   € R P                  V P                  P                  V P                  4      pV P                  '       d   VRV P                  ,           ,          pV# )z{} with condition {!r}z: )r;   Ú	__class__Ú__name__r/   r0   )r3   Úmessages   & r4   Ú__str__ÚBaseError.__str__`   sH   € Ø*×1Ñ1Ø�N‰N×#Ñ# T§^¡^ó
ˆð �9�9ˆ9Ø�t˜dŸi™iÕ'Õ'ˆGàˆr6   c                óž  € \         P                  ! R4      pVP                  V P                  V P                  34       V P
                  '       dQ   VP                  V P                  R3V P
                  R7      pV P                  '       d   V P                  V\        R3&   V P                  '       d   VP                  V P                  4       V# )z�
Get XML representation from self.

The method creates an L{domish} representation of the
error data contained in this exception.

@rtype: L{domish.Element}
r0   )ÚcontentÚlang)NÚerror)
r   ÚElementÚ
addElementÚ	namespacer/   r0   r1   ÚNS_XMLr2   ÚaddChild)r3   rH   r0   s   &  r4   Ú
getElementÚBaseError.getElementj   s—   € ô —’˜Ó/ˆØ×Ñ˜$Ÿ.™.¨$¯.©.Ð9Ô:Ø�9�9ˆ9Ø×#Ñ# T§^¡^°VÐ$<ÀdÇiÁiÐ#ÓPˆDØ�}�}ˆ}Ø)-¯©�”f˜fÐ%Ñ&Ø××ÐØ�N‰N˜4×,Ñ,Ô-Øˆr6   c                ó6   <€ V ^8„  d   Qh/ S[ S[,          ;R&   # )r8   rK   )r   r:   )r;   r<   s   "€r4   r=   r>   B   s   ø‡ ‚ ñ* ™�}Ñ#ò+ r6   )r2   r/   r0   r1   )NNN)rA   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rK   r.   rC   rN   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__©r<   s   @r4   r+   r+   B   s-   ø‡ € ñð(  $€Iô)÷ð ò÷Q ƒ r6   r+   c                   ó.   a € ] tR t^~t o Rt]tR tRtV t	R# )ÚStreamErrorze
Stream Error exception.

Refer to RFC 3920, section 4.7.3, for the allowed values for C{condition}.
c                óH   € ^ RI Hp \        P                  V 4      pWn        V# )z¬
Get XML representation from self.

Overrides the base L{BaseError.getElement} to make sure the returned
element is in the XML Stream namespace.

@rtype: L{domish.Element}
)Ú
NS_STREAMS)Ú(twisted.words.protocols.jabber.xmlstreamr\   r+   rN   Úuri)r3   r\   rH   s   &  r4   rN   ÚStreamError.getElement‡   s"   € õ 	Hä×$Ñ$ TÓ*ˆØŒ	Øˆr6   © N)
rA   rQ   rR   rS   rT   ÚNS_XMPP_STREAMSrK   rN   rV   rW   rX   s   @r4   rZ   rZ   ~   s   ø‡ € ñð  €I÷ð r6   rZ   c                   ó>   a € ] tR t^—t o Rt]tRR ltR tR t	Rt
V tR# )ÚStanzaErrora}  
Stanza Error exception.

Refer to RFC 3920, section 9.3, for the allowed values for C{condition} and
C{type}.

@ivar type: The stanza error type. Gives a suggestion to the recipient
            of the error on how to proceed.
@type type: C{str}
@ivar code: A numeric identifier for the error condition for backwards
            compatibility with pre-XMPP Jabber implementations.
Nc                ó  € \         P                  WW4V4       Vf    \        V,          R,          pW n         \        V,          R,          V n        . V n        R V n        R #   \         d     L=i ; i  \         d    R T n         L5i ; i)Nr   r   )r+   r.   ÚSTANZA_CONDITIONSÚKeyErrorr   r   ÚchildrenÚiq)r3   r/   r   r0   r1   r2   s   &&&&&&r4   r.   ÚStanzaError.__init__§   s‡   € ô 	×Ñ˜4¨D¸LÔIàŠ<ðÜ(¨Õ3°FÕ;�ð Œ	ð	Ü)¨)Õ4°VÕ<ˆDŒIð ˆŒØˆŽøô ô Ùðûô ô 	ØˆDŽIð	ús"   �A! ¸A2 Á!A/Á.A/Á2BÂBc                ó�   € \         P                  V 4      pV P                  VR&   V P                  '       d   V P                  VR&   V# )zÏ
Get XML representation from self.

Overrides the base L{BaseError.getElement} to make sure the returned
element has a C{type} attribute and optionally a legacy C{code}
attribute.

@rtype: L{domish.Element}
r   r   )r+   rN   r   r   )r3   rH   s   & r4   rN   ÚStanzaError.getElement»   s<   € ô ×$Ñ$ TÓ*ˆØŸ	™	ˆˆf‰Ø�9�9ˆ9Ø ŸI™IˆE�&‰MØˆr6   c                ó®   € ^ RI Hp V! VRR7      p\        P                  ! VP                  4      Vn        VP	                  V P                  4       4       V# )a­  
Construct error response stanza.

The C{stanza} is transformed into an error response stanza by
swapping the C{to} and C{from} addresses and inserting an error
element.

@note: This creates a shallow copy of the list of child elements of the
       stanza. The child elements themselves are not copied themselves,
       and references to their parent element will still point to the
       original stanza element.

       The serialization of an element does not use the reference to
       its parent, so the typical use case of immediately sending out
       the constructed error response is not affected.

@param stanza: the stanza to respond to
@type stanza: L{domish.Element}
)Ú
toResponserH   )Ú
stanzaType)r]   rm   Úcopyrg   rM   rN   )r3   Ústanzarm   Úresponses   &&  r4   rm   ÚStanzaError.toResponseË   sC   € õ( 	Há˜f°Ô9ˆÜ ŸIšI f§o¡oÓ6ˆÔØ×Ñ˜$Ÿ/™/Ó+Ô,Øˆr6   )rg   r   rh   r   )NNNN)rA   rQ   rR   rS   rT   ÚNS_XMPP_STANZASrK   r.   rN   rm   rV   rW   rX   s   @r4   rc   rc   —   s%   ø‡ € ñð  €Iôò(÷ ð r6   rc   c                ó   € RpRpRpRpV P                  4        FY  pVP                  V8X  dD   VP                  R8X  d%   \        V4      pVP	                  \
        R34      pKI  VP                  pKW  TpK[  	  RVRVRVRV/# )aÍ  
Parses an error element.

@param error: The error element to be parsed
@type error: L{domish.Element}
@param errorNamespace: The namespace of the elements that hold the error
                       condition and text.
@type errorNamespace: C{str}
@return: Dictionary with extracted error information. If present, keys
         C{condition}, C{text}, C{textLang} have a string value,
         and C{appCondition} has an L{domish.Element} value.
@rtype: C{dict}
Nr0   rG   r/   r1   r2   )Úelementsr^   Únamer:   ÚgetAttributerL   )rH   ÚerrorNamespacer/   r0   r1   r2   Úelements   &&     r4   Ú_parseErrorrz   ç   s�   € ð €IØ€DØ€HØ€Là—>‘>Ö#ˆØ�;‰;˜.Ô(Ø�|‰|˜vÔ%Ü˜7“|�Ø"×/Ñ/´¸Ð0@ÓA’à#ŸL™L’	à"ŠLñ $ð 	�YØ�Ø�HØ˜ð	ð r6   c                óz   € \        V \        4      p\        VR,          VR,          VR,          VR,          4      pV# )z²
Build an exception object from a stream error.

@param element: the stream error
@type element: L{domish.Element}
@return: the generated exception object
@rtype: L{StreamError}
r/   r0   r1   r2   )rz   ra   rZ   )ry   rH   Ú	exceptions   &  r4   ÚexceptionFromStreamErrorr}     s>   € ô ˜¤Ó1€EäØˆkÕ˜E &�M¨5°Õ+<¸eÀNÕ>Só€Ið Ðr6   c                ó8  € . pR;p;p;p;p;rgV P                  4        FÐ  pVP                  R8X  d¬   VP                  V P                  8X  d‘   VP                  R4      pVP                  R4      p\	        V\
        4      p	V	R,          pV	R,          pV	R,          pV	R,          pV'       g1   V'       d'   \        V,          w  r&\        V P                  4      pK»  K½  K¿  VP                  V4       KÒ  	  Vf   \        R4      # \        W&W4V4      p
Wn        W
n        V
# )	z±
Build an exception object from an error stanza.

@param stanza: the error stanza
@type stanza: L{domish.Element}
@return: the generated exception object
@rtype: L{StanzaError}
NrH   r   r   r/   r0   r1   r2   )ru   rv   r^   rw   rz   rs   ÚCODES_TO_CONDITIONSr:   rH   Úappendrc   rg   rp   )rp   rg   r/   r0   r1   r2   r   r   ry   rH   r|   s   &          r4   ÚexceptionFromStanzar�     s  € ð €HØ?CÐC€IÐC�ÐC�xÐC ,ÐC°à—?‘?Ö$ˆØ�<‰<˜7Ô" w§{¡{°f·j±jÔ'@Ø×'Ñ'¨Ó/ˆDØ×'Ñ'¨Ó/ˆDÜ ¬Ó9ˆEØ˜kÕ*ˆIØ˜•=ˆDØ˜ZÕ(ˆHØ  Õ0ˆLç§Ü"5°dÕ";‘�	Ü˜6Ÿ<™<Ó(’ñ "&‘9ð �O‰O˜GÖ$ñ %ð  Òä˜4Ó Ð ä˜I¨T¸\ÓJ€Ià!ÔØÔàÐr6   )r   r   )r   r   )r   r   )r   r   )r   r   )r   r   )r   r   )r   r   )r!   r   )r#   r   )r	   r   )r   r   )r   r   )r%   r   )r%   r   )rT   ro   Útypingr   Útwisted.words.xishr   rL   ra   rs   re   r   r-   r+   rZ   rc   rz   r}   r�   r`   r6   r4   Ú<module>r„      só  ðñó
 Ý å %à	/€Ø7€Ø7€ðØ�F˜E 6¨8Ð4ðà�˜ ¨Ð1ðð  ¨¨v°xÐ@ðð �&˜% ¨Ð0ð	ð
 ˆV�U˜F HÐ-ðð ˜f e¨V°VÐ<ðð �v˜u f¨hÐ7ðð �f˜e V¨XÐ6ðð �v˜u f¨hÐ7ðð �F˜E 6¨8Ð4ðð �v˜u f¨fÐ5ðð ˜ ¨°Ð7ðð ˜f e¨V°VÐ<ðð �˜ ¨Ð1ðð ˜f e¨V°VÐ<ðð   ¨¨v°xÐ@ð!ð" ˜f e¨V°VÐ<ð#ð$ ˜F E¨6°6Ð:Ø˜F E¨6°8Ð<Ø˜f e¨V°VÐ<Ø˜F E¨6°4Ð8Ø˜6 5¨&°&Ð9ñ-Ð ð2Ø	Ððà	Ð$ðð 
Ð%ðð 
Ð'ð	ð
 
Ð ðð 
Ð'ðð 
Ð$ðð 
Ð'ðð 
Ð,ðð 
Ð,ðð 
Ð!ðð 
Ð,ðð 
Ð0ðð 
Ð*ðð 
Ð,ðð  
Ð,ð!ð" 
Ð,ð#Ð ô*9�	ô 9ôx�)ô ô2M�)ô Mò`"òJô$%r6   