ó
    ÖÁ“i;2  ã                  ó¢  • S r SSKJr  SSKrSSKJr  / SQr " S S\5      r " S	 S
\5      r	 " S S\	5      r
 " S S\	5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S \5      r " S! S"\5      r " S# S$\5      r " S% S&\5      r " S' S(\5      r " S) S*\5      r " S+ S,\5      r " S- S.\5      r " S/ S0\5      r " S1 S2\5      r " S3 S4\5      r " S5 S6\5      r " S7 S8\\ 5      r! " S9 S:\\"5      r#SS;K$J%r%J&r&  \" \'" 5       S<S<S<S<S=.S>9  g)?aU  
:mod:`websockets.exceptions` defines the following hierarchy of exceptions.

* :exc:`WebSocketException`
    * :exc:`ConnectionClosed`
        * :exc:`ConnectionClosedOK`
        * :exc:`ConnectionClosedError`
    * :exc:`InvalidURI`
    * :exc:`InvalidProxy`
    * :exc:`InvalidHandshake`
        * :exc:`SecurityError`
        * :exc:`ProxyError`
            * :exc:`InvalidProxyMessage`
            * :exc:`InvalidProxyStatus`
        * :exc:`InvalidMessage`
        * :exc:`InvalidStatus`
        * :exc:`InvalidStatusCode` (legacy)
        * :exc:`InvalidHeader`
            * :exc:`InvalidHeaderFormat`
            * :exc:`InvalidHeaderValue`
            * :exc:`InvalidOrigin`
            * :exc:`InvalidUpgrade`
        * :exc:`NegotiationError`
            * :exc:`DuplicateParameter`
            * :exc:`InvalidParameterName`
            * :exc:`InvalidParameterValue`
        * :exc:`AbortHandshake` (legacy)
        * :exc:`RedirectHandshake` (legacy)
    * :exc:`ProtocolError` (Sans-I/O)
    * :exc:`PayloadTooBig` (Sans-I/O)
    * :exc:`InvalidState` (Sans-I/O)
    * :exc:`ConcurrencyError`

é    )ÚannotationsNé   )Úlazy_import)ÚWebSocketExceptionÚConnectionClosedÚConnectionClosedOKÚConnectionClosedErrorÚ
InvalidURIÚInvalidProxyÚInvalidHandshakeÚSecurityErrorÚ
ProxyErrorÚInvalidProxyMessageÚInvalidProxyStatusÚInvalidMessageÚInvalidStatusÚInvalidHeaderÚInvalidHeaderFormatÚInvalidHeaderValueÚInvalidOriginÚInvalidUpgradeÚNegotiationErrorÚDuplicateParameterÚInvalidParameterNameÚInvalidParameterValueÚProtocolErrorÚPayloadTooBigÚInvalidStateÚConcurrencyErrorc                  ó   • \ rS rSrSrSrg)r   éI   z7
Base class for all exceptions defined by websockets.

© N©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__static_attributes__r"   ó    ÚR/home/mande/repo/quber/.venv/lib/python3.13/site-packages/websockets/exceptions.pyr   r   I   ó   † ôr*   r   c                  óh   • \ rS rSrSr S	       S
S jjrSS jr\SS j5       r\SS j5       r	Sr
g)r   éP   aê  
Raised when trying to interact with a closed connection.

Attributes:
    rcvd: If a close frame was received, its code and reason are available
        in ``rcvd.code`` and ``rcvd.reason``.
    sent: If a close frame was sent, its code and reason are available
        in ``sent.code`` and ``sent.reason``.
    rcvd_then_sent: If close frames were received and sent, this attribute
        tells in which order this happened, from the perspective of this
        side of the connection.

Nc                ó’   • Xl         X l        X0l        U R                  S L U R                   S L =(       d    U R                  S L :X  d   eg ©N©ÚrcvdÚsentÚrcvd_then_sent)Úselfr2   r3   r4   s       r+   Ú__init__ÚConnectionClosed.__init___   sE   € ð Œ	ØŒ	Ø,ÔØ×#Ñ# tÐ+°·±¸dÐ1B×1WÀdÇiÁiÐSWÐFWÓXÐXÑXr*   c                ó$  • U R                   c  U R                  c  gSU R                   S3$ U R                  c  SU R                    S3$ U R                  (       a  SU R                    SU R                   3$ SU R                   SU R                    3$ )Nzno close frame received or sentzsent z; no close frame receivedz	received z; no close frame sentz; then sent z; then received r1   ©r5   s    r+   Ú__str__ÚConnectionClosed.__str__j   s‹   € Ø�9‰9ÑØ�y‰yÑ Ø8à˜tŸy™y˜kÐ)BÐCÐCà�y‰yÑ Ø" 4§9¡9 +Ð-BÐCÐCà×&×&Ø& t§y¡y k°¸d¿i¹i¸[ÐIÐIà" 4§9¡9 +Ð-=¸d¿i¹i¸[ÐIÐIr*   c                ó²   • [         R                  " S[        5        U R                  c  [        R
                  R                  $ U R                  R                  $ )NzZConnectionClosed.code is deprecated; use Protocol.close_code or ConnectionClosed.rcvd.code)ÚwarningsÚwarnÚDeprecationWarningr2   ÚframesÚ	CloseCodeÚABNORMAL_CLOSUREÚcoder9   s    r+   rC   ÚConnectionClosed.code{   sC   € ä�ŠðDäô	
ð
 �9‰9ÑÜ×#Ñ#×4Ñ4Ð4Ø�y‰y�~‰~Ðr*   c                ó€   • [         R                  " S[        5        U R                  c  gU R                  R                  $ )Nz`ConnectionClosed.reason is deprecated; use Protocol.close_reason or ConnectionClosed.rcvd.reasonÚ )r=   r>   r?   r2   Úreasonr9   s    r+   rG   ÚConnectionClosed.reason†   s6   € ä�ŠðHäô	
ð
 �9‰9ÑØØ�y‰y×ÑÐr*   )r2   r4   r3   r0   )r2   úframes.Close | Noner3   rI   r4   zbool | NoneÚreturnÚNone©rJ   Ústr)rJ   Úint)r$   r%   r&   r'   r(   r6   r:   ÚpropertyrC   rG   r)   r"   r*   r+   r   r   P   sj   † ñð$ '+ð		Yà!ð	Yð "ð	Yð $ð		Yð
 
õ	YôJð" óó ðð ó ó ó r*   r   c                  ó   • \ rS rSrSrSrg)r   é’   z©
Like :exc:`ConnectionClosed`, when the connection terminated properly.

A close code with code 1000 (OK) or 1001 (going away) or without a code was
received and sent.

r"   Nr#   r"   r*   r+   r   r   ’   ó   † ôr*   r   c                  ó   • \ rS rSrSrSrg)r	   éœ   zÜ
Like :exc:`ConnectionClosed`, when the connection terminated with an error.

A close frame with a code other than 1000 (OK) or 1001 (going away) was
received or sent, or the closing handshake didn't complete properly.

r"   Nr#   r"   r*   r+   r	   r	   œ   rR   r*   r	   c                  ó,   • \ rS rSrSrSS jrSS jrSrg)	r
   é¦   zD
Raised when connecting to a URI that isn't a valid WebSocket URI.

c                ó   • Xl         X l        g r0   ©ÚuriÚmsg)r5   rY   rZ   s      r+   r6   ÚInvalidURI.__init__¬   s   € ØŒØ�r*   c                ó8   • U R                    SU R                   3$ )Nz isn't a valid URI: rX   r9   s    r+   r:   ÚInvalidURI.__str__°   s   € Ø—(‘(�Ð/°·±¨zÐ:Ð:r*   )rZ   rY   N)rY   rM   rZ   rM   rJ   rK   rL   ©r$   r%   r&   r'   r(   r6   r:   r)   r"   r*   r+   r
   r
   ¦   s   † ñô
÷;r*   r
   c                  ó,   • \ rS rSrSrSS jrSS jrSrg)	r   é´   z7
Raised when connecting via a proxy that isn't valid.

c                ó   • Xl         X l        g r0   ©ÚproxyrZ   )r5   rc   rZ   s      r+   r6   ÚInvalidProxy.__init__º   s   € ØŒ
Ø�r*   c                ó8   • U R                    SU R                   3$ )Nz isn't a valid proxy: rb   r9   s    r+   r:   ÚInvalidProxy.__str__¾   s   € Ø—*‘*�Ð3°D·H±H°:Ð>Ð>r*   )rZ   rc   N)rc   rM   rZ   rM   rJ   rK   rL   r^   r"   r*   r+   r   r   ´   s   † ñô
÷?r*   r   c                  ó   • \ rS rSrSrSrg)r   éÂ   zE
Base class for exceptions raised when the opening handshake fails.

r"   Nr#   r"   r*   r+   r   r   Â   r,   r*   r   c                  ó   • \ rS rSrSrSrg)r   éÉ   z¥
Raised when a handshake request or response breaks a security rule.

Security limits can be configured with :doc:`environment variables
<../reference/variables>`.

r"   Nr#   r"   r*   r+   r   r   É   rR   r*   r   c                  ó   • \ rS rSrSrSrg)r   éÓ   z-
Raised when failing to connect to a proxy.

r"   Nr#   r"   r*   r+   r   r   Ó   r,   r*   r   c                  ó   • \ rS rSrSrSrg)r   éÚ   z3
Raised when an HTTP proxy response is malformed.

r"   Nr#   r"   r*   r+   r   r   Ú   r,   r*   r   c                  ó,   • \ rS rSrSrSS jrSS jrSrg)	r   éá   z4
Raised when an HTTP proxy rejects the connection.

c                ó   • Xl         g r0   ©Úresponse©r5   rs   s     r+   r6   ÚInvalidProxyStatus.__init__ç   ó   € Ø �r*   c                ó6   • SU R                   R                  S 3$ )Nz proxy rejected connection: HTTP Úd©rs   Ústatus_coder9   s    r+   r:   ÚInvalidProxyStatus.__str__ê   s   € Ø1°$·-±-×2KÑ2KÈAÐ1NÐOÐOr*   rr   N©rs   zhttp11.ResponserJ   rK   rL   r^   r"   r*   r+   r   r   á   s   † ñô
!÷Pr*   r   c                  ó   • \ rS rSrSrSrg)r   éî   z<
Raised when a handshake request or response is malformed.

r"   Nr#   r"   r*   r+   r   r   î   r,   r*   r   c                  ó,   • \ rS rSrSrSS jrSS jrSrg)	r   éõ   zB
Raised when a handshake response rejects the WebSocket upgrade.

c                ó   • Xl         g r0   rr   rt   s     r+   r6   ÚInvalidStatus.__init__û   rv   r*   c                ó6   • SU R                   R                  S 3$ )Nz+server rejected WebSocket connection: HTTP rx   ry   r9   s    r+   r:   ÚInvalidStatus.__str__þ   s   € à9¸$¿-¹-×:SÑ:SÐTUÐ9VÐWð	
r*   rr   Nr|   rL   r^   r"   r*   r+   r   r   õ   s   † ñô
!÷
r*   r   c                  ó0   • \ rS rSrSrSSS jjrS	S jrSrg)
r   i  zC
Raised when an HTTP header doesn't have a valid format or value.

Nc                ó   • Xl         X l        g r0   ©ÚnameÚvalue©r5   rˆ   r‰   s      r+   r6   ÚInvalidHeader.__init__
  ó   € ØŒ	Ø�
r*   c                ó´   • U R                   c  SU R                   S3$ U R                   S:X  a  SU R                   S3$ SU R                   SU R                    3$ )Nzmissing z headerrF   zempty zinvalid z	 header: ©r‰   rˆ   r9   s    r+   r:   ÚInvalidHeader.__str__  sY   € Ø�:‰:ÑØ˜dŸi™i˜[¨Ð0Ð0Ø�Z‰Z˜2ÓØ˜DŸI™I˜; gÐ.Ð.à˜dŸi™i˜[¨	°$·*±*°Ð>Ð>r*   r‡   r0   ©rˆ   rM   r‰   ú
str | NonerJ   rK   rL   r^   r"   r*   r+   r   r     s   † ñö
÷?r*   r   c                  ó0   ^ • \ rS rSrSrSU 4S jjrSrU =r$ )r   i  zt
Raised when an HTTP header cannot be parsed.

The format of the header doesn't match the grammar for that header.

c                ó4   >• [         TU ]  X SU SU 35        g )Nz at z in ©Úsuperr6   )r5   rˆ   ÚerrorÚheaderÚposÚ	__class__s        €r+   r6   ÚInvalidHeaderFormat.__init__  s!   ø€ Ü‰Ñ˜ ¨¨S¨E°°f°XÐ>Õ?r*   r"   )
rˆ   rM   r–   rM   r—   rM   r˜   rN   rJ   rK   ©r$   r%   r&   r'   r(   r6   r)   Ú__classcell__©r™   s   @r+   r   r     s   ø† ñ÷@õ @r*   r   c                  ó   • \ rS rSrSrSrg)r   i#  zu
Raised when an HTTP header has a wrong value.

The format of the header is correct but the value isn't acceptable.

r"   Nr#   r"   r*   r+   r   r   #  s   † ôr*   r   c                  ó0   ^ • \ rS rSrSrSU 4S jjrSrU =r$ )r   i,  z<
Raised when the Origin header in a request isn't allowed.

c                ó&   >• [         TU ]  SU5        g )NÚOriginr”   )r5   Úoriginr™   s     €r+   r6   ÚInvalidOrigin.__init__2  s   ø€ Ü‰Ñ˜ 6Õ*r*   r"   )r¢   r‘   rJ   rK   r›   r�   s   @r+   r   r   ,  s   ø† ñ÷
+õ +r*   r   c                  ó   • \ rS rSrSrSrg)r   i6  z>
Raised when the Upgrade or Connection header isn't correct.

r"   Nr#   r"   r*   r+   r   r   6  r,   r*   r   c                  ó   • \ rS rSrSrSrg)r   i=  z?
Raised when negotiating an extension or a subprotocol fails.

r"   Nr#   r"   r*   r+   r   r   =  r,   r*   r   c                  ó,   • \ rS rSrSrSS jrSS jrSrg)	r   iD  zC
Raised when a parameter name is repeated in an extension header.

c                ó   • Xl         g r0   ©rˆ   ©r5   rˆ   s     r+   r6   ÚDuplicateParameter.__init__J  ó   € Ø�	r*   c                ó    • SU R                    3$ )Nzduplicate parameter: r¨   r9   s    r+   r:   ÚDuplicateParameter.__str__M  s   € Ø& t§y¡y kÐ2Ð2r*   r¨   N©rˆ   rM   rJ   rK   rL   r^   r"   r*   r+   r   r   D  s   † ñô
÷3r*   r   c                  ó,   • \ rS rSrSrSS jrSS jrSrg)	r   iQ  zB
Raised when a parameter name in an extension header is invalid.

c                ó   • Xl         g r0   r¨   r©   s     r+   r6   ÚInvalidParameterName.__init__W  r«   r*   c                ó    • SU R                    3$ )Nzinvalid parameter name: r¨   r9   s    r+   r:   ÚInvalidParameterName.__str__Z  s   € Ø)¨$¯)©)¨Ð5Ð5r*   r¨   Nr®   rL   r^   r"   r*   r+   r   r   Q  s   † ñô
÷6r*   r   c                  ó,   • \ rS rSrSrSS jrSS jrSrg)	r   i^  zC
Raised when a parameter value in an extension header is invalid.

c                ó   • Xl         X l        g r0   r‡   rŠ   s      r+   r6   ÚInvalidParameterValue.__init__d  rŒ   r*   c                ó°   • U R                   c  SU R                   3$ U R                   S:X  a  SU R                   3$ SU R                   SU R                    3$ )Nzmissing value for parameter rF   zempty value for parameter zinvalid value for parameter z: rŽ   r9   s    r+   r:   ÚInvalidParameterValue.__str__h  sU   € Ø�:‰:ÑØ1°$·)±)°Ð=Ð=Ø�Z‰Z˜2ÓØ/°·	±	¨{Ð;Ð;à1°$·)±)°¸B¸t¿z¹z¸lÐKÐKr*   r‡   Nr�   rL   r^   r"   r*   r+   r   r   ^  s   † ñô
÷Lr*   r   c                  ó   • \ rS rSrSrSrg)r   iq  zð
Raised when receiving or sending a frame that breaks the protocol.

The Sans-I/O implementation raises this exception when:

* receiving or sending a frame that contains invalid data;
* receiving or sending an invalid sequence of frames.

r"   Nr#   r"   r*   r+   r   r   q  s   † ôr*   r   c                  óL   • \ rS rSrSr  S       S	S jjrS
S jrSS jrSrg)r   i}  a=  
Raised when parsing a frame with a payload that exceeds the maximum size.

The Sans-I/O layer uses this exception internally. It doesn't bubble up to
the I/O layer.

The :meth:`~websockets.extensions.Extension.decode` method of extensions
must raise :exc:`PayloadTooBig` if decoding a frame would exceed the limit.

Nc                óæ   • [        U[        5      (       a,  Ub   eUb   e[        R                  " S[        5        Xl        g S U l        Xl        Uc   eX l        S U l        U R                  U5        g )NzMPayloadTooBig(message) is deprecated; change to PayloadTooBig(size, max_size))
Ú
isinstancerM   r=   r>   r?   ÚmessageÚsizeÚmax_sizeÚcurrent_sizeÚset_current_size)r5   Úsize_or_messager¿   rÀ   s       r+   r6   ÚPayloadTooBig.__init__‰  sw   € ô �o¤s×+Ñ+ØÑ#Ð#Ð#ØÑ'Ð'Ð'Ü�MŠMð:ä"ôð
 (7�LàˆDŒLØ$3ŒIØÑ'Ð'Ð'Ø!)ŒMØ,0ˆDÔØ×!Ñ! ,Õ/r*   c                óâ   • U R                   b  U R                   $ SnU R                  b  USU R                   S3-  nU R                  b  USU R                   S3-  nUSU R                   S3-  nU$ )Nzframe zwith z bytes zafter reading zexceeds limit of z bytes)r½   r¾   rÀ   r¿   )r5   r½   s     r+   r:   ÚPayloadTooBig.__str__   s   € Ø�<‰<Ñ#Ø—<‘<ÐàˆGØ�y‰yÑ$Ø˜U 4§9¡9 +¨WÐ5Ñ5�Ø× Ñ Ñ,Ø˜^¨D×,=Ñ,=Ð+>¸gÐFÑF�ØÐ*¨4¯=©=¨/¸Ð@Ñ@ˆGØˆNr*   c                ó`   • U R                   b   eUb  U =R                  U-  sl        Xl         g g r0   )rÀ   r¿   )r5   rÀ   s     r+   rÁ   ÚPayloadTooBig.set_current_size¬  s3   € Ø× Ñ Ñ(Ð(Ð(ØÑ#Ø�MŠM˜\Ñ)�MØ ,Õð $r*   )rÀ   r¿   r½   r¾   )NN)rÂ   zint | None | strr¿   ú
int | NonerÀ   rÈ   rJ   rK   rL   )rÀ   rÈ   rJ   rK   )	r$   r%   r&   r'   r(   r6   r:   rÁ   r)   r"   r*   r+   r   r   }  sD   † ñ	ð  $Ø#'ð	0à)ð0ð ð0ð !ð	0ð
 
õ0ô.
÷-r*   r   c                  ó   • \ rS rSrSrSrg)r   i³  a~  
Raised when sending a frame is forbidden in the current state.

Specifically, the Sans-I/O layer raises this exception when:

* sending a data frame to a connection in a state other
  :attr:`~websockets.protocol.State.OPEN`;
* sending a control frame to a connection in a state other than
  :attr:`~websockets.protocol.State.OPEN` or
  :attr:`~websockets.protocol.State.CLOSING`.

r"   Nr#   r"   r*   r+   r   r   ³  s   † ôr*   r   c                  ó   • \ rS rSrSrSrg)r   iÂ  zÌ
Raised when receiving or sending messages concurrently.

WebSocket is a connection-oriented protocol. Reads must be serialized; so
must be writes. However, reading and writing concurrently is possible.

r"   Nr#   r"   r*   r+   r   r   Â  rR   r*   r   )r@   Úhttp11z.legacy.exceptions)ÚAbortHandshakeÚInvalidStatusCodeÚRedirectHandshakeÚWebSocketProtocolError)Údeprecated_aliases)(r(   Ú
__future__r   r=   Úimportsr   Ú__all__Ú	Exceptionr   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   ÚAssertionErrorr   ÚRuntimeErrorr   rF   r@   rË   Úglobalsr"   r*   r+   Ú<module>rØ      s›  ðñ!õF #ã å  ò€ô<˜ô ô? Ð)ô ? ôDÐ)ô ôÐ,ô ô;Ð#ô ;ô?Ð%ô ?ôÐ)ô ôÐ$ô ôÐ!ô ô˜*ô ô
P˜ô 
PôÐ%ô ô
Ð$ô 
ô?Ð$ô ?ô&	@˜-ô 	@ô˜ô ô+�Mô +ô�]ô ôÐ'ô ô
3Ð)ô 
3ô
6Ð+ô 
6ôLÐ,ô Lô&	Ð&ô 	ô3-Ð&ô 3-ôlÐ% ~ô ôÐ)¨<ô ÷ ñ ÙƒIð /Ø1Ø1Ø"6ñó	r*   