
    2h"                        % S SK r S SKrS SKrS SKJr  S SKJrJrJrJ	r	J
r
Jr  \R                  S:  a  S SKJr  OS SKJr  \\\SS4   r  S SKrS	rSr " S S\	5      r " S S\	5      r " S S\	5      r " S S\
S
S9r " S S5      r\" \5      r\\S'   S\SS4S jr  S&S\\   S\ S\!4S jjr" " S S5      r# " S  S!\#5      r$ " S" S#\#5      r% " S$ S%5      r&g! \ a    S SKr Nf = f! \ a    S
r Nf = f)'    N)Executor)AnyFinalOptionalProtocol	TypedDictcast)      )Buffer)Unionzmemoryview[int]zmemoryview[bytes]TFi   c                   <    \ rS rSrS\S\4S jrS	S\S\4S jjrSr	g)
ZLibCompressObjProtocol   datareturnc                     g N selfr   s     Q/var/www/auris/envauris/lib/python3.13/site-packages/aiohttp/compression_utils.pycompress ZLibCompressObjProtocol.compress   s    s    modec                    g r   r   r   r   s     r   flushZLibCompressObjProtocol.flush   s    #r   r   N.)
__name__
__module____qualname____firstlineno__r   bytesr   intr   __static_attributes__r   r   r   r   r      s    2V225#5555r   r   c                   \    \ rS rSrSS\S\S\4S jjrSS\S\4S jjr\	S\
4S j5       rS	rg
)ZLibDecompressObjProtocol    r   
max_lengthr   c                     g r   r   r   r   r,   s      r   
decompress$ZLibDecompressObjProtocol.decompress!   s    r   lengthc                    g r   r   r   r1   s     r   r   ZLibDecompressObjProtocol.flush"   s    Cr   c                     g r   r   r   s    r   eofZLibDecompressObjProtocol.eof$   s    r   r   Nr!   )r"   r#   r$   r%   r   r'   r&   r/   r   propertyboolr7   r(   r   r   r   r*   r*       s4    KvK3KK7C7U7T r   r*   c                       \ rS rSr% \\S'   \\S'   \\S'   \\S'   \\S'         SS\S\S	\S
\S\S\\   S\4S jjr	 SS	\S\S\
4S jjr SS\S	\S\S\4S jjr SS	\S\S\S\4S jjrSrg)ZLibBackendProtocol(   	MAX_WBITSZ_FULL_FLUSHZ_SYNC_FLUSHZ_BEST_SPEEDZ_FINISHlevelmethodwbitsmemLevelstrategyzdictr   c                     g r   r   )r   rC   rD   rE   rF   rG   rH   s          r   compressobjZLibBackendProtocol.compressobj/   s     #&r   c                     g r   r   )r   rE   rH   s      r   decompressobj!ZLibBackendProtocol.decompressobj8   s    $'r   r   c                    g r   r   )r   r   rC   rE   s       r   r   ZLibBackendProtocol.compress<       r   bufsizec                    g r   r   )r   r   rE   rR   s       r   r/   ZLibBackendProtocol.decompress?   rQ   r   r   N)......)..)r"   r#   r$   r%   r'   __annotations__r   r   r   rJ   r*   rM   r&   r   r/   r(   r   r   r   r<   r<   (   s    NM "%&& & 	&
 & & & 
!& 14(('-(	"(
 ?B&)8;	 AD&):=	 r   r<   c                   4    \ rS rSr% \\S'   \\S'   \\S'   Srg)CompressObjArgsD   rE   rG   rC   r   N)r"   r#   r$   r%   r'   rU   r(   r   r   r   rW   rW   D   s    JMJr   rW   )totalc                   $   \ rS rSrS\4S jr\S\4S j5       r\S\	4S j5       r
\S\	4S j5       r\S\	4S j5       r\S\	4S	 j5       r\S\	4S
 j5       rS\S\S\4S jrS\S\S\4S jrS\S\S\S\4S jrS\S\S\S\4S jrS\S\4S jrSrg)ZLibBackendWrapperJ   _zlib_backendc                     Xl         g r   r]   )r   r]   s     r   __init__ZLibBackendWrapper.__init__K   s    2?r   r   c                 0    [        U R                  SS5      $ )Nr"   	undefinedgetattrr]   r6   s    r   nameZLibBackendWrapper.nameN   s    t)):{CCr   c                 .    U R                   R                  $ r   )r]   r>   r6   s    r   r>   ZLibBackendWrapper.MAX_WBITSR   s    !!+++r   c                 .    U R                   R                  $ r   )r]   r?   r6   s    r   r?   ZLibBackendWrapper.Z_FULL_FLUSHV       !!...r   c                 .    U R                   R                  $ r   )r]   r@   r6   s    r   r@   ZLibBackendWrapper.Z_SYNC_FLUSHZ   rl   r   c                 .    U R                   R                  $ r   )r]   rA   r6   s    r   rA   ZLibBackendWrapper.Z_BEST_SPEED^   rl   r   c                 .    U R                   R                  $ r   )r]   rB   r6   s    r   rB   ZLibBackendWrapper.Z_FINISHb   s    !!***r   argskwargsc                 :    U R                   R                  " U0 UD6$ r   )r]   rJ   r   rs   rt   s      r   rJ   ZLibBackendWrapper.compressobjf   s    !!--t>v>>r   c                 :    U R                   R                  " U0 UD6$ r   )r]   rM   rv   s      r   rM    ZLibBackendWrapper.decompressobji   s    !!//@@@r   r   c                 B    U R                   R                  " U/UQ70 UD6$ r   )r]   r   r   r   rs   rt   s       r   r   ZLibBackendWrapper.compressl   s#    !!**4A$A&AAr   c                 B    U R                   R                  " U/UQ70 UD6$ r   )r]   r/   r{   s       r   r/   ZLibBackendWrapper.decompresso   s#    !!,,TCDCFCCr   attrnamec                 .    [        U R                  U5      $ r   rd   )r   r   s     r   __getattr__ZLibBackendWrapper.__getattr__s   s    t))844r   r_   N)r"   r#   r$   r%   r<   r`   r9   strrf   r'   r>   r?   r@   rA   rB   r   r   rJ   r*   rM   r   r&   r   r/   r   r(   r   r   r   r[   r[   J   sO   @&9 @ Dc D D ,3 , , /c / / /c / / /c / / +# + +? ? ?8O ?A3 A# A:S ABV BC B3 B5 BDv Dc DS DU D5C 5C 5r   r[   ZLibBackendnew_zlib_backendr   c                     U [         l        g r   )r   r]   )r   s    r   set_zlib_backendr   z   s
     0Kr   encodingsuppress_deflate_headerc                     U S:X  a  S[         R                  -   $ U(       a  [         R                  * $ [         R                  $ )Ngzip   )r   r>   )r   r   s     r   encoding_to_moder   ~   s9     6K))))%<K!!!W+BWBWWr   c                   >    \ rS rSrS\4S\S\\   S\\   4S jjrSr	g)ZlibBaseHandler   Nr   executormax_sync_chunk_sizec                 (    Xl         X l        X0l        g r   )_mode	_executor_max_sync_chunk_size)r   r   r   r   s       r   r`   ZlibBaseHandler.__init__   s     
!$7!r   )r   r   r   )
r"   r#   r$   r%   MAX_SYNC_CHUNK_SIZEr'   r   r   r`   r(   r   r   r   r   r      s9     (,-@	88 8$8 &c]	8 8r   r   c                      ^  \ rS rSrSSSSSS\4S\\   S\S\\   S\\   S\\   S	\\	   S
\\   4U 4S jjjr
S\S\4S jrS\S\4S jrSS\\   S\4S jjrSrU =r$ )ZLibCompressor   NFr   r   rC   rE   rG   r   r   c                 0  > [         T	U ]  Uc  [        X5      OUUUS9  [        [        R
                  5      U l        0 nU R                  US'   Ub  XXS'   Ub  X8S'   U R
                  R                  " S0 UD6U l        [        R                  " 5       U l        g )Nr   r   r   rE   rG   rC   r   )superr`   r   r[   r   r]   r   rJ   _compressorasyncioLock_compress_lock)
r   r   r   rC   rE   rG   r   r   rt   	__class__s
            r   r`   ZLibCompressor.__init__   s     	 = !C 3 	 	
 %7{7P7P$Q"$**w!):#7O--99CFC%llnr   r   r   c                 8    U R                   R                  U5      $ r   )r   r   r   s     r   compress_syncZLibCompressor.compress_sync   s    ((..r   c                   #    U R                    ISh  vN   U R                  bv  [        U5      U R                  :  a]  [        R                  " 5       R                  U R                  U R                  R                  U5      I Sh  vN sSSS5      ISh  vN   $ U R                  U5      sSSS5      ISh  vN   $  N N9 N+ N! , ISh  vN  (       d  f       g= f7f)a  Compress the data and returned the compressed bytes.

Note that flush() must be called after the last call to compress()

If the data size is large than the max_sync_chunk_size, the compression
will be done in the executor. Otherwise, the compression will be done
in the event loop.
N)
r   r   lenr   get_running_looprun_in_executorr   r   r   r   r   s     r   r   ZLibCompressor.compress   s      &&& ))5I 9 99$557GGNND$4$4$=$=t  '&& %%d+ '&& '&&&su   CB=CA.CB?C	CCCC+C7C8C?CCCCCCCr   c                 r    U R                   R                  Ub  U5      $ U R                  R                  5      $ r   )r   r   r]   rB   r   s     r   r   ZLibCompressor.flush   s<    %%$D
 	
*.*<*<*E*E
 	
r   )r   r   r]   r   )r"   r#   r$   r%   r   r   r   r:   r'   r   r`   r&   r   r   r   r(   __classcell__r   s   @r   r   r      s     #'(-##"&'+-@-3-- "&- }	-
 }- 3-- 8$- &c]- -</% /E /,5 ,U ,.
(3- 
5 
 
r   r   c            
          ^  \ rS rSrSSS\4S\\   S\S\\   S\\	   4U 4S jjjr
SS	\S
\	S\4S jjrSS	\S
\	S\4S jjrSS\	S\4S jjr\S\4S j5       rSrU =r$ )ZLibDecompressor   NFr   r   r   r   c                    > [         TU ]  [        X5      UUS9  [        [        R
                  5      U l        U R
                  R                  U R                  S9U l        g )Nr   )rE   )	r   r`   r   r[   r   r]   rM   r   _decompressor)r   r   r   r   r   r   s        r   r`   ZLibDecompressor.__init__   sZ     	!(D 3 	 	

 %7{7P7P$Q!//==DJJ=Or   r   r,   r   c                 8    U R                   R                  X5      $ r   )r   r/   r.   s      r   decompress_sync ZLibDecompressor.decompress_sync   s    !!,,T>>r   c                   #    U R                   be  [        U5      U R                   :  aL  [        R                  " 5       R	                  U R
                  U R                  R                  X5      I Sh  vN $ U R                  X5      $  N7f)zDecompress the data and return the decompressed bytes.

If the data size is large than the max_sync_chunk_size, the decompression
will be done in the executor. Otherwise, the decompression will be done
in the event loop.
N)	r   r   r   r   r   r   r   r/   r   r.   s      r   r/   ZLibDecompressor.decompress   su      %%1D	D555 113CC 2 2 = =t   ##D55s   A.B0B1Br1   c                 x    US:  a  U R                   R                  U5      $ U R                   R                  5       $ )Nr   )r   r   r3   s     r   r   ZLibDecompressor.flush   s?     z $$V,	
 ##))+	
r   c                 .    U R                   R                  $ r   )r   r7   r6   s    r   r7   ZLibDecompressor.eof   s    !!%%%r   )r   r]   )r   )r"   r#   r$   r%   r   r   r   r:   r   r'   r`   r&   r   r/   r   r9   r7   r(   r   r   s   @r   r   r      s     #'(-'+-@P3-P "&P 8$	P
 &c]P P?E ?s ?5 ?6U 6 6E 6 
C 
 
 &T & &r   r   c                   >    \ rS rSrS	S jrS\S\4S jrS\4S jrSrg)
BrotliDecompressori  r   Nc                 d    [         (       d  [        S5      e[        R                  " 5       U l        g )NzIThe brotli decompression is not available. Please install `Brotli` module)
HAS_BROTLIRuntimeErrorbrotliDecompressor_objr6   s    r   r`   BrotliDecompressor.__init__  s+    z1  '')	r   r   c                     [        U R                  S5      (       a)  [        [        U R                  R	                  U5      5      $ [        [        U R                  R                  U5      5      $ )Nr/   )hasattrr   r	   r&   r/   processr   s     r   r   "BrotliDecompressor.decompress_sync  sK    499l++tyy33D9::E499,,T233r   c                     [        U R                  S5      (       a(  [        [        U R                  R	                  5       5      $ g)Nr   r   )r   r   r	   r&   r   r6   s    r   r   BrotliDecompressor.flush  s.    499g&&tyy011r   )r   )r   N)	r"   r#   r$   r%   r`   r&   r   r   r(   r   r   r   r   r     s&    *4E 4e 4
u r   r   )NF)'r   syszlibconcurrent.futuresr   typingr   r   r   r   r   r	   version_infocollections.abcr   r   r&   	bytearray
brotlicffir   ImportErrorr   r   r   r*   r<   rW   r[   r   rU   r   r   r:   r'   r   r   r   r   r   r   r   r   <module>r      sF    
  ' B Bw&5)%68KKLF# J  6h 6
 ( 8iu *5 *5Z #5T": :1': 1t 1
 #$)XsmX!X 	X	8 	8<
_ <
~,& ,&^ c    Js0   C C, 
C)&C, (C))C, ,C76C7