+
     ]i#%  c                  s   ^ RI H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Ht ^RIHtHt ^RIHt ^R	IHt ^R
IHt ]P0                  '       d	   ^RIHtHt ]P8                  ! ]4      t]	 ! R R4      4       t ! R R]4      t R# )i    )annotationsN)contextmanager)	dataclass)HTTPException)BytesIOIOBase)InvalidHeaderTimeoutError)BaseHTTPResponse)Retry)EmscriptenRequest)BaseHTTPConnectionBaseHTTPSConnectionc                  s@    ] tR t^t$ R]R&   R]R&   R]R&   R]R&   R	tR
# )EmscriptenResponseintstatus_codezdict[str, str]headerszIOBase | bytesbodyr
   request N)__name__
__module____qualname____firstlineno__Z__annotations____static_attributes__r       H/usr/lib/python3.14/site-packages/urllib3/contrib/emscripten/response.pyr   r      s    
r   r   c                  s`  a  ] tR t^tR"R V 3R lllt]R R l4       t]P                  R R l4       t]R R l4       t]R	 R
 l4       t	]	P                  R R l4       t	R#R R llt
R R ltR$R R lltR"R R lltR R ltR R lt]R R l4       tR R ltR R lt]R R  l4       tR!tV ;t# )%EmscriptenHttpResponseWrapperc               $    V ^8  d   QhRRRRRR/# )   internal_responser   url
str | None
connection/BaseHTTPConnection | BaseHTTPSConnection | Noner   Zformat   "r   __annotate__*EmscriptenHttpResponseWrapper.__annotate__   s)     ' '-' ' D	'r   c           
     	s   < R V n         R V n        Wn        W n        W0n        RV n        \        SV `  VP                  VP                  V^ RRRR7       V P                  V P                  P                  P                  4      V n        RV n        R # )NFzHTTP/?Z T)r   statusZrequest_urlZversionZversion_stringZreasondecode_content)_pool_body	_response_url_connection_closedZsuper__init__r   r   _init_lengthr   Zmethodlength_remaininglength_is_certain)selfr   r   r!   	__class__s   &&&&r   r/   Z&EmscriptenHttpResponseWrapper.__init__   s     

*	%%--$00# 	 	
 !% 1 1$..2H2H2O2O P!&r   c                   V ^8  d   QhRR/# )r   returnr    r   r#   r$   r   r%   r&   8   s      Z r   c                	    V P                   # Nr,   r3      &r   r   !EmscriptenHttpResponseWrapper.url7   s    yyr   c                    V ^8  d   QhRRRR/# )r   r   r    r6   Noner   r#   r$   r   r%   r&   <   s      z d r   c                	    Wn         R # r8   r9   )r3   r      &&r   r   r<   ;   s    	r   c               r5   )r   r6   r"   r   r#   r$   r   r%   r&   @   s        K  r   c                	r7   r8   )r-   r:   r;   r   r!   Z(EmscriptenHttpResponseWrapper.connection?   s    r   c               r5   )r   r6   Retry | Noner   r#   r$   r   r%   r&   D   s       r   c                	r7   r8   _retriesr:   r;   r   retries%EmscriptenHttpResponseWrapper.retriesC   s    }}r   c               r=   )r   rD   rA   r6   r>   r   r#   r$   r   r%   r&   H   s        |    r   c                	r?   r8   rB   )r3   rD   r@   r   rD   rE   G   s	      r   c               r   r   amt
int | Noner(   bool | Noner6   ztyping.Generator[bytes]r   r#   r$   r   r%   r&   L   s$      7B	 r   c              #  sP   "    V P                  WR7      pV'       d   Vx  K!  R# 5i)a  
A generator wrapper for the read() method. A call will block until
``amt`` bytes have been read from the connection or until the
connection is closed.

:param amt:
    How much of the content to read. The generator will return up to
    much data per iteration, but may return less. This is particularly
    likely when using compressed data. However, the empty string will
    never be returned.

:param decode_content:
    If True, will attempt to decode the body based on the
    'content-encoding' header.
)rG   r(   Nread)r3   rG   r(   data   &&& r   streamZ$EmscriptenHttpResponseWrapper.streamL   s%     $ 999DD
s   $&c               r=   )r   request_methodr    r6   rH   r   r#   r$   r   r%   r&   f   s     # #: #* #r   c                	s   V P                   P                  R 4      pVeg    VP                  R4       Uu0 uF  p\        V4      kK  	  pp\	        V4      ^8  d   \        RV,          4      hVP                  4       pV^ 8  d   RpMRpV P                  R9   g#   ^dV P                  u;8:  d   ^8  g
   M VR8X  d   ^ pV# u upi   \         d    Rp LKi ; i)zcontent-lengthNZ,z8Content-Length contained multiple unmatching values (%s)ZHEAD)i   i0  )	r   ZgetZsplitr   lenr   ZpopZ
ValueErrorr'   )r3   rO   Zcontent_lengthZvalZlengthsZlengths   &&    r   r0   Z*EmscriptenHttpResponseWrapper._init_lengthf   s    %)\\%5%56F%G%" 0>/C/CC/HI/H3s8/HIw<!#'13AB  ! A:!F F KK:%dkk'C''F1 J  s"   C B?4C ?C CCc               s(    V ^8  d   QhRRRRRRRR/# )	r   rG   rH   r(   rI   cache_contentZboolr6   bytesr   r#   r$   r   r%   r&      s2     #, #,#, $#, 	#,
 
#,r   c                	sz   V P                   '       g_   V P                  eQ   \        V P                  P                  \        4      '       d)   V P                  P                  P
                  '       d   R# V P                  4       ;_uu_ 4        \        V P                  P                  \        4      '       gZ   \        V P                  P                  4      V n        RV n	        \        V P                  P                  4      V P                  n        Ve0   V^ 8  d)   RpV P                  P                  P                  V4      pM2V P                  P                  P                  4       pV'       d   W@n        V P                  e,   \        V P                  \        V4      ,
          ^ 4      V n        \        V4      ^ 8X  g$   V P                  '       d6   V P                  ^ 8X  d%   V P                  P                  P                  4        \        P                   ! \"        V4      uuR R R 4       #   + '       g   i     R # ; i)Nr   TF)r.   r+   
isinstancer   r   closed_error_catcherrP   r1   r2   r   rK   r*   ZmaxclosetypingZcastrR   )r3   rG   r(   rQ   rL   s   &&&& r   rK   Z"EmscriptenHttpResponseWrapper.read   ss    LLL~~%4>>..77DNN<O<O<V<V<V  ""dnn116::(+DNN,?,?(@%)-&&-dnn.A.A&B#3!8 %~~**//4~~**//1 !%J$$0(+D,A,ACI,Mq(Q%4yA~&&&4+@+@A+E ##))+;;ud+- #"""s   C"H).A H)AH))H:	c               r   rF   r   r#   r$   r   r%   r&      s(     
 

 $
 
!	
r   c              #  	sN   "    V P                  W4      pV'       g   R# Vx  K"  5i)TNrJ   )r3   rG   r(   rR   rM   r   read_chunkedZ*EmscriptenHttpResponseWrapper.read_chunked   s#      IIc2EKs   #%c               r5   r   r6   r>   r   r#   r$   r   r%   r&      s        d  r   c                	s    V P                   '       d   V P                  '       g   R # V P                   P                  V P                  4       R V n        R # r8   )r)   r-   Z	_put_connr:   r;   r   release_connZ*EmscriptenHttpResponseWrapper.release_conn   s9    zzz!1!1!1

T--.r   c               r5   rY   r   r#   r$   r   r%   r&      s      D r   c                	s&    V P                  4        R # r8   )rV   r:   r;   r   
drain_connZ(EmscriptenHttpResponseWrapper.drain_conn   s    

r   c               r5   )r   r6   rR   r   r#   r$   r   r%   r&      s     1 1e 1r   c                	sb    V P                   '       d   V P                   # V P                  R R7      # )T)rQ   )r*   rK   r:   r;   r   rL   Z"EmscriptenHttpResponseWrapper.data   s&    :::::994900r   c               r5   )r   r6   z
typing.Anyr   r#   r$   r   r%   r&      s     ! !j !r   c                sd    V P                   P                  R4      p\        P                  ! V4      # )al  
Deserializes the body of the HTTP response as a Python object.

The body of the HTTP response must be encoded using UTF-8, as per
`RFC 8529 Section 8.1 <https://www.rfc-editor.org/rfc/rfc8259#section-8.1>`_.

To use a custom JSON decoder pass the result of :attr:`HTTPResponse.data` to
your custom decoder instead.

If the body of the HTTP response is not decodable to UTF-8, a
`UnicodeDecodeError` will be raised. If the body of the HTTP response is not a
valid JSON document, a `json.JSONDecodeError` will be raised.

Read more :ref:`here <json_content>`.

:returns: The body of the HTTP response as a Python object.
zutf-8)rL   Zdecode_jsonZloads)r3   rL   s   & r   jsonZ"EmscriptenHttpResponseWrapper.json   s'    $ yy({{4  r   c               r5   rY   r   r#   r$   r   r%   r&      s        t  r   c                	s>   V P                   '       g   \        V P                  P                  \        4      '       d%   V P                  P                  P                  4        V P                  '       d"   V P                  P                  4        R V n        RV n         R # R # )NT)r.   rS   r+   r   r   rV   r-   r:   r;   r   rV   Z#EmscriptenHttpResponseWrapper.close   sj    |||$..--v66##))+  &&(#' DL r   c               r5   )r   r6   ztyping.Generator[None]r   r#   r$   r   r%   r&      s     )( )( 6 )(r   c              #  s  "   ^RI HpHp Rp Rx  Rp T'       g   \        T P                  P                  \        4      '       dK   T P                  P                  P                  '       g%   T P                  P                  P                  4        T P                  4        R# \        T P                  P                  \        4      '       d;   T P                  P                  P                  '       d   T P                  4        R# R# R#   T d   p\        \	        T4      4      hRp?iT d   p\        \	        T4      4      hRp?ii ; i  T'       g   \        T P                  P                  \        4      '       dK   T P                  P                  P                  '       g%   T P                  P                  P                  4        T P                  4        i \        T P                  P                  \        4      '       d9   T P                  P                  P                  '       d   T P                  4        i i i ; i5i)z
Catch Emscripten specific exceptions thrown by fetch.py,
instead re-raising urllib3 variants, so that low-level exceptions
are not leaked in the high-level api.

On exit, release the connection back to the pool.
)_RequestError_TimeoutErrorFNT)Zfetchr^   r_   r   Zstrr   rS   r+   r   r   rT   rV   rZ   )r3   r^   r_   Z
clean_exitZes   &    r   rU   Z,EmscriptenHttpResponseWrapper._error_catcher   s     	8
	( J  t~~22F;; NN//666NN''--/!!#
 t~~22F;;++222%%' 3 <+  	's1v&& 	(A''	(
  t~~22F;; NN//666NN''--/!!#
 t~~22F;;++222%%' 3 <sf   H>D	 H>AH>-BH>3H>	ED$$E-E.EEE
 
AH;#BH;(H;;H>)	r*   r.   r-   r)   r+   rC   r,   r2   r1   )NN)i   N)NNF)r   r   r   r   r/   Zpropertyr   Zsetterr!   rD   rN   r0   rK   rX   rZ   r[   rL   r]   rV   r   rU   r   Z__classcell__)r4   s   @r   r   r      s    ' '0   	ZZ        ^^   4#J#,J
  1 1!*  )( )(r   r   )!Z
__future__r    r]   r\   ZloggingrW   Z
contextlibr   Zdataclassesr   Zhttp.clientr   Zior   r   Z
exceptionsr   r   Zresponser   Z
util.retryr	   r   r
   ZTYPE_CHECKINGZ_base_connectionr   r   Z	getLoggerr   Zlogr   r   r   r   r   <module>r`      sp    "    % ! 6  5 (  &	K!   w($4 w(r   