+
    i=                       ^ RI Ht ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RI	H
t
 ^RIHt ^RIHt ^RIHt . R!OtR
P$                  ! ]P&                  !  t]P*                  P-                  RR] R] 24      t]P*                  P-                  RR] R] 24      t]! ]P*                  P-                  RR4      4      t]! ]P*                  P-                  RR4      4      t]! ]P*                  P-                  RR4      4      tR R lt]P<                  ! R4      t]P<                  ! R4      t ]PB                   ! R R4      4       t"]PB                   ! R R	4      4       t#R R lt$R R lt%R R  lt&R# )"    )annotationsN)	Generator)Callable)Headers)SecurityError)versionRequestResponsez{}.{}WEBSOCKETS_USER_AGENTzPython/z websockets/WEBSOCKETS_SERVERWEBSOCKETS_MAX_NUM_HEADERS128WEBSOCKETS_MAX_LINE_LENGTH8192WEBSOCKETS_MAX_BODY_SIZE	1_048_576c                    V ^8  d   QhRRRR/# )   valuebytes | bytearrayreturnstr )formats   "X/home/wkmabra/.openclaw/workspace/venv/lib/python3.14/site-packages/websockets/http11.py__annotate__r   2   s     3 3 33 3    c                &    V P                  RR7      # )z?
Decode a bytestring for interpolating into an error message.

backslashreplaceerrors)decode)r   s   &r   dr#   2   s    
 <<1<22r   s   [-!#$%&\'*+.^_`|~0-9a-zA-Z]+s   [\x09\x20-\x7e\x80-\xff]*c                  v    ] tR t^Nt$ RtR]R&   R]R&   RtR]R&   ]R	 R
 l4       t]	R R l4       t
R R ltRtR# )r	   z{
WebSocket handshake request.

Attributes:
    path: Request path, including optional query.
    headers: Request headers.
r   pathr   headersNException | None
_exceptionc                   V ^8  d   QhRR/# r   r   r'   r   )r   s   "r   r   Request.__annotate___   s      + r   c                	P    \         P                  ! R \        4       V P                  # )zIRequest.exception is deprecated; use ServerProtocol.handshake_exc insteadwarningswarnDeprecationWarningr(   selfs   &r   	exceptionRequest.exception^   s     W	
 r   c                    V ^8  d   QhRRRR/# )r   	read_line9Callable[[int], Generator[None, None, bytes | bytearray]]r   zGenerator[None, None, Request]r   )r   s   "r   r   r+   g   s"     @" @"L@" 
(@"r   c              #  :  "    \        V4       Rj  xL
 p TP                  R^4      w  rEpTR8w  d   \        R\	        T4       24      hTR8w  d   \        R\	        T4       24      hTP                  R	R
4      p\        T4       Rj  xL
 pRT9   d   \        R4      hRT9   d#   \        TR,          4      ^ 8w  d   \        R4      hT ! Yx4      #  L  \         d   p\        R4      ThRp?ii ; i  \         d    \        R\	        T4       24      Rhi ; i L5i)a)  
Parse a WebSocket handshake request.

This is a generator-based coroutine.

The request path isn't URL-decoded or validated in any way.

The request path and headers are expected to contain only ASCII
characters. Other characters are represented with surrogate escapes.

:meth:`parse` doesn't attempt to read the request body because
WebSocket handshake requests don't have one. If the request contains a
body, it may be read from the data stream after :meth:`parse` returns.

Args:
    read_line: Generator-based coroutine that reads a LF-terminated
        line or raises an exception if there isn't enough data

Raises:
    EOFError: If the connection is closed without a full HTTP request.
    SecurityError: If the request exceeds a security limit.
    ValueError: If the request isn't well formatted.

Nz1connection closed while reading HTTP request line    zinvalid HTTP request line:    HTTP/1.1)unsupported protocol; expected HTTP/1.1: s   GETz+unsupported HTTP method; expected GET; got asciisurrogateescapeTransfer-Encodingz!transfer codings aren't supportedContent-Lengthzunsupported request body)	
parse_lineEOFErrorsplit
ValueErrorr#   r"   parse_headersNotImplementedErrorint)	clsr6   request_lineexcmethodraw_pathprotocolr%   r&   s	   &&       r   parseRequest.parsef   s=    F	Y&0&;;L	X)5););D!)D&Fh {";AlO;LM  VJ1V9+VWWw(9:*955 ')%&IJJw& 7+,-2 !;<<4!!; < 	YNOUXX	Y
  	X:1\?:KLMSWW	X 6sV   DC CC C2 AD	D
ADC C/C**C//D2$DDc                   V ^8  d   QhRR/# r   r   bytesr   )r   s   "r   r   r+      s     	 	5 	r   c                    RV P                    R2P                  4       pWP                  P                  4       ,          pV# )z+
Serialize a WebSocket handshake request.

zGET z HTTP/1.1
)r%   encoder&   	serialize)r2   requests   & r   rT   Request.serialize   s9     =188:<<))++r   r   )__name__
__module____qualname____firstlineno____doc____annotations__r(   propertyr3   classmethodrM   rT   __static_attributes__r   r   r   r	   r	   N   sT     I $(J '  @" @"D	 	r   c                      ] tR t^t$ RtR]R&   R]R&   R]R&   RtR	]R
&   RtR]R&   ]R R l4       t	]
RR R ll4       tR R ltRtR# )r
   z
WebSocket handshake response.

Attributes:
    status_code: Response code.
    reason_phrase: Response reason.
    headers: Response headers.
    body: Response body.

rF   status_coder   reason_phraser   r&   r   r   bodyNr'   r(   c                   V ^8  d   QhRR/# r*   r   )r   s   "r   r   Response.__annotate__   s      + r   c                	P    \         P                  ! R \        4       V P                  # )zJResponse.exception is deprecated; use ClientProtocol.handshake_exc insteadr-   r1   s   &r   r3   Response.exception   s"    7	

 r   c          
     ,    V ^8  d   QhRRRRRRRRRR/# )	r   r6   r7   
read_exactread_to_eofproxyboolr   zGenerator[None, None, Response]r   )r   s   "r   r   re      sE     L7 L7LL7 NL7 O	L7
 L7 
)L7r   c              #  8  "    \        V4       Rj  xL
 p TP                  R^4      w  rxp	T'       d    TR9  d   \        R\	        T4       24      hMTR8w  d   \        R\	        T4       24      h \        T4      p
^dT
u;8:  d   R	8  g   M \        R
\	        T4       24      h\        P                  T	4      '       g   \        R\	        T	4       24      hT	P                  RR4      p\        T4       Rj  xL
 pT'       d   RpM\        YYT4       Rj  xL
 pT ! YY4      #  EL  \         d   p\        R4      ThRp?ii ; i  \         d    \        R\	        T4       24      Rhi ; i  \         d    \        R\	        T4       24      Rhi ; i L L5i)a:  
Parse a WebSocket handshake response.

This is a generator-based coroutine.

The reason phrase and headers are expected to contain only ASCII
characters. Other characters are represented with surrogate escapes.

Args:
    read_line: Generator-based coroutine that reads a LF-terminated
        line or raises an exception if there isn't enough data.
    read_exact: Generator-based coroutine that reads the requested
        bytes or raises an exception if there isn't enough data.
    read_to_eof: Generator-based coroutine that reads until the end
        of the stream.

Raises:
    EOFError: If the connection is closed without a full HTTP response.
    SecurityError: If the response exceeds a security limit.
    LookupError: If the response isn't well formatted.
    ValueError: If the response isn't well formatted.

Nz0connection closed while reading HTTP status liner9   zinvalid HTTP status line: r:   z5unsupported protocol; expected HTTP/1.1 or HTTP/1.0: r;   z+invalid status code; expected integer; got iX  u-   invalid status code; expected 100–599; got zinvalid HTTP reason phrase: r<   r=   r   )r:   s   HTTP/1.0)r@   rA   rB   rC   r#   rF   	_value_re	fullmatchr"   rD   	read_body)rG   r6   ri   rj   rk   status_linerI   rL   raw_status_code
raw_reasonra   reasonr&   rc   s   &&&&&         r   rM   Response.parse   s    B	X%/	%::K	V4?4E4EdA4N1Hz 99 K~&(  : ;& ?+?OP 	o.K
 k'C'?/@R?ST  "":..;AjM?KLL""7,=>*955 D'i[ D ;66W ; 	XMNTWW	X
  	V9!K.9IJKQUU	V  	=a>P=QR	 6s   FD) D&D) E F=F3E/ >AF7F8F9FFFF&D) )E4E  EF$E,,F/$FFFc                   V ^8  d   QhRR/# rP   r   )r   s   "r   r   re   !  s     
 
5 
r   c                    RV P                    RV P                   R2P                  4       pWP                  P	                  4       ,          pWP
                  ,          pV# )z,
Serialize a WebSocket handshake response.

z	HTTP/1.1  z
)ra   rb   rS   r&   rT   rc   )r2   responses   & r   rT   Response.serialize!  sU     t//0$2D2D1ETJQQSLL**,,IIr   r   )F)rW   rX   rY   rZ   r[   r\   rc   r(   r]   r3   r^   rM   rT   r_   r   r   r   r
   r
      sd    	 !D
!#'J '  L7 L7\
 
r   c                    V ^8  d   QhRRRR/# )r   r6   r7   r   (Generator[None, None, bytes | bytearray]r   )r   s   "r   r   r   .  s      H-r   c              #     "    V ! \         4       Rj  xL
 pTP                  R4      '       g   \	        R4      hTRR #  L+  \         d    \        R4      hi ; i5i)aK  
Parse a single line.

CRLF is stripped from the return value.

Args:
    read_line: Generator-based coroutine that reads a LF-terminated line
        or raises an exception if there isn't enough data.

Raises:
    EOFError: If the connection is closed without a CRLF.
    SecurityError: If the response exceeds a security limit.

Nzline too long   
zline without CRLF)MAX_LINE_LENGTHRuntimeErrorr   endswithrA   )r6   lines   & r   r@   r@   .  s^     "-#O44 ==!!*++9 5 -O,,-s.   AA ?A AAA AAc                    V ^8  d   QhRRRR/# )r   r6   r7   r   zGenerator[None, None, Headers]r   )r   s   "r   r   r   I  s     0 0H0#0r   c              #    "   \        4       p\        \        ^,           4       F  p \        V 4       Rj  xL
 pTR8X  d    T#  TP                  R^4      w  rV\        P                  T4      '       g   \        R\        T4       24      hTP                  R4      p\        P                  T4      '       g   \        R\        T4       24      hTP                  R	4      pTP                  R	R
4      pYT&   K  	  \        R4      h L  \         d   p\	        R4      ThRp?ii ; i  \         d    \        R\        T4       24      Rhi ; i5i)a  
Parse HTTP headers.

Non-ASCII characters are represented with surrogate escapes.

Args:
    read_line: Generator-based coroutine that reads a LF-terminated line
        or raises an exception if there isn't enough data.

Raises:
    EOFError: If the connection is closed without complete headers.
    SecurityError: If the request exceeds a security limit.
    ValueError: If the request isn't well formatted.

Nz,connection closed while reading HTTP headersr      :zinvalid HTTP header line: zinvalid HTTP header name: s    	zinvalid HTTP header value: r<   r=   ztoo many HTTP headers)r   rangeMAX_NUM_HEADERSr@   rA   rB   rC   r#   	_token_rero   striprn   r"   r   )	r6   r&   _r   rI   raw_name	raw_valuenamer   s	   &        r   rD   rD   I  sG    , iG?Q&'	T(33D 3;& N#	O"&**T1"5H ""8,,9!H+GHHOOF+	""9--:1Y<.IJJw'  *;<) (. 344+ 4 	TIJPSS	T  	O9!D'CD$N	Os]   $EDDD
ED%E4AE7AEDD"DD""E%$E		Ec               0    V ^8  d   QhRRRRRRRRRRR	R
/# )r   ra   rF   r&   r   r6   r7   ri   rj   r   r|   r   )r   s   "r   r   r   |  sO     :O :O:O:O I:O J	:O
 K:O .:Or   c              #    "   ^dT u;8:  d   ^8  g   M V ^8X  g   V R8X  d   R# VP                  R4      ;pEe   VR8w  d   \        RV R24      hRp \        V4       Rj  xL
 pVP                  R^4      ^ ,          p\	        V4      ^8  d"   VP                  R	R
7      p	\        RV	 R24      h\        V^4      p
V
^ 8X  d   Mn\	        V4      V
,           \        8  d   \        RV
 R\	        V4       R24      hYc! V
4       Rj  xL
 ,          pV! ^4       Rj  xL
 R8w  g   K  \        R4      h\        V4       Rj  xL
  V# VP                  R4      ;peU   \	        V4      ^8  d   \        RV R24      h\        V4      pV\        8  d   \        RV R24      hV! V4       Rj  xL
 #  V! \        4       Rj  xL
 #  ELd L L L L" L  \         d    \        R\         R24      hi ; i5i)d   i0  r   r>   Nchunkedztransfer coding z isn't supported   ;r   r    zchunk too large: 0xz byteszchunk too large: z bytes after r~   zchunk without CRLFr?   zbody too large: zbody too large: over )getrE   r@   rB   lenr"   r   rF   MAX_BODY_SIZErC   rD   r   )ra   r&   r6   ri   rj   codingrc   chunk_size_lineraw_chunk_sizestr_chunk_size
chunk_sizeraw_content_lengthcontent_lengths   &&&&&        r   rp   rp   |  s     kC;##59K KK 34
4&	AY%(8@P&QRR)3I)>>O,224;A>N>"R'!/!6!6>P!6!Q#&9.9I$PQQ^R0JQ4y:%5#'
|=T6R  z*555D%a=(W4 !566 +++ ',< =
=
	J!"R'"23E2Ff MNN/0M)"2>2B& IJJ%n556	O*=99:? ? 6( 	, 6 : 	O"7f MNN	Os   AG4!G"B#G4GG4G
G4'G4 GA*G4+G,G41G  GG G4G4
G4G4G4G G11G4)SERVER
USER_AGENTr	   r
   )'
__future__r   dataclassesosresysr.   collections.abcr   typingr   datastructuresr   
exceptionsr   r   websockets_version__all__r   version_infoPYTHON_VERSIONenvironr   r   r   rF   r   r   r   r#   compiler   rn   	dataclassr	   r
   r@   rD   rp   r   r   r   <module>r      si   "  	 	 
  %  # % 2 !1!12 ZZ^^n\*<)=>
 
n\*<)=>
 bjjnn%A5IJ bjjnn%A6JK BJJNN#={KL3 JJ78	 JJ45	 c c cL u u up60f:Or   