
    Ngq                     
   U d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddlZddlZddlZddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ dd	lmZ dd
lmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/ ddl0m1Z1 ddl2m3Z3m4Z4 ddl5Z5ddl6m7Z7m8Z8m9Z9 ddl:m;Z< ddl=m>Z> ddl?m@Z@ ddlAmBZB ejC        dk    rddlZDnddlDZDdZE ejF                    dk    ZG ejF                    dk    ZHejC        dk    ZIejC        dk    ZJ e,d          ZK e,d          ZL ejM        dd          ZNeNjO        ZO ePe
jQ        R                    d                    ZS eTddg eUdd           R           ZVe@jW        ZXejY        jZ        p/ejY        j[         o" ePe
jQ        R                    d!                    Z\d"  eUdd#          D             Z]d$  eUdd%          D              e^d&          hz  Z_d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8 e^d9          hZ`e]e_z  e`z  Za G d: d;          Zb G d< d= ed=g d>                    Zcd?e>d@e*e>e(ec         f         fdAZdd@e(e	j	                 fdBZe e5jf        dCdCdCD           G dE dF                      ZgdGe(e	j	                 dHehd@ecfdIZid@e!ehegf         fdJZjd?e>d@e*e>e(ec         f         fdKZk e5jf        dCdCdCD           G dL dM                      Zl ejm        dNO          dPehd@elfdQ            ZnddRedSe(eh         d@e(eh         fdTZo ejp        dU          ZqdV  eUd%d&          D             dWhz  ZrdXehd@ehfdYZs	 dd[ehd\ePd]ehd^ehd@ehf
d_ZtdHe(eh         d@ePfd`Zudave(ew         exda<   dbayd@ehfdcZzddfZ{	 ddhe|diehdje}dkej~        dle}d@e(ej                 fdmZ	 ddneg ef         dje}dkej~        dle}d@e(ej                 f
doZdpe}dje}dqe}d@e}fdrZ G ds dt          Z G du dve dv                   Z G dw dxe          Z G dy dze          Z	 dd{e(e}         d|e}d@eDj        fd}Z G d~ d          ZdddeKd@dfdZ e            Z G d de)          Zefdddeded@dfdZej         G d de#eK                               Z G d de'e-ehee         f         ef                   ZdZ ejp        e          Zde dZ ejp        e          Z ejp        d'e d          ZdZ e5jf        dCdCdCD           G d d                      Zdehd@dfdZde(eh         d@e(ej                 fdZejm        dehdewd@ePfd            Zdehdewd@ePfdZdS )zVarious helper functions    N)
namedtuple)suppress)HeaderParser)	parsedateceil)Path)TracebackType)AnyCallableContextManagerDict	GeneratorGenericIterableIteratorListMappingOptionalProtocolTupleTypeTypeVarUnionget_argsoverload)quote)
getproxiesproxy_bypass)	MultiDictMultiDictProxyMultiMapping)under_cached_propertyURL   )hdrs)client_logger      )	BasicAuthChainMapProxyETagreifyDarwinWindows)r*   
   _T_S	_SENTINELsentinelAIOHTTP_NO_EXTENSIONS   i0  d      PYTHONASYNCIODEBUGc                 ,    h | ]}t          |          S  chr.0is     K/var/www/html/ai-engine/env/lib/python3.11/site-packages/aiohttp/helpers.py	<setcomp>rD   Y   s    &&&1A&&&       c                 ,    h | ]}t          |          S r=   r>   r@   s     rC   rD   rD   Z   s    $$$!s1vv$$$rE          ()<>@,;:\"/[]?={} 	   c                   &    e Zd Zded         fdZdS )noopreturn)NNNc              #      K   d V  d S Nr=   selfs    rC   	__await__znoop.__await__v   s      rE   N)__name__
__module____qualname__r   rd   r=   rE   rC   r^   r^   u   s5        9%56      rE   r^   c            	            e Zd ZdZ	 ddedededd f fdZedd	ededd fd
            Zedddedede	d          fd            Z
defdZ xZS )r,   z!Http basic authentication helper. latin1loginpasswordencodingr_   c                     |t          d          |t          d          d|v rt          d          t                                          | |||          S )Nz"None is not allowed as login valuez%None is not allowed as password valuerQ   z5A ":" is not allowed in login (RFC 1945#section-11.1))
ValueErrorsuper__new__)clsrk   rl   rm   	__class__s       rC   rq   zBasicAuth.__new__}   sb     =ABBBDEEE%<<TUUUwwsE8X>>>rE   auth_headerc                    	 |                     dd          \  }}n# t          $ r t          d          w xY w|                                dk    rt          d|z            	 t          j        |                    d          d                              |          }n"# t          j        $ r t          d	          w xY w	 |                     d
d          \  }}n# t          $ r t          d          w xY w | |||          S )z<Create a BasicAuth object from an Authorization HTTP header.r[   r&   z%Could not parse authorization header.basiczUnknown authorization method %sasciiT)validatezInvalid base64 encoding.rQ   zInvalid credentials.rm   )	splitro   lowerbase64	b64decodeencodedecodebinasciiError)rr   rt   rm   	auth_typeencoded_credentialsdecodedusernamerl   s           rC   r   zBasicAuth.decode   sR   	F-8->->sA-F-F*I** 	F 	F 	FDEEE	F ??''>JKKK	9&#**733d  fX G ~ 	9 	9 	97888	9	5
 ")sA!6!6Hhh 	5 	5 	53444	5 s8X9999s     6$<B! !C C C8ry   urlc                    t          |t                    st          d          |j        	|j        dS  | |j        pd|j        pd|          S )zCreate BasicAuth from url.zurl should be yarl.URL instanceNri   ry   )
isinstancer%   	TypeErrorraw_userraw_passworduserrl   )rr   r   rm   s      rC   from_urlzBasicAuth.from_url   s`     #s## 	?=>>> <C$4$<4s38>r3<#52IIIIrE   c                     | j          d| j                             | j                  }dt	          j        |                              | j                  z  S )zEncode credentials.rQ   zBasic %s)rk   rl   r~   rm   r|   	b64encoder   )rc   credss     rC   r~   zBasicAuth.encode   sO    J000088GGF,U33::4=IIIIrE   )ri   rj   )rj   )re   rf   rg   __doc__strrq   classmethodr   r%   r   r   r~   __classcell__)rs   s   @rC   r,   r,   z   s       ++ >F? ??#&?7:?	? ? ? ? ? ? : : : :; : : : [:8 3; J J J3 JS J@U J J J [JJ J J J J J J J JrE   r,   )rk   rl   rm   r   r_   c                     | j         | j        | dfS |                     d          t          | j        pd| j        pd          fS )zIRemove user and password from URL if present and return BasicAuth object.Nri   )r   r   	with_userr,   r   rl   )r   s    rC   strip_auth_from_urlr      sL     | 0 8Dy==	#(.b#,:L" M MMMrE   c                     t           j                            d          } | t          |           }nP	 t          j                    }n-# t
          $ r }t          j        d|           Y d}~dS d}~ww xY w|t          rdndz  }	 t          j	        t          |                    S # t          j        $ r}t          j        d|           Y d}~nzd}~wt          $ rj}d}t          j        t                    5  |                                }ddd           n# 1 swxY w Y   | s|rt          j        d|           Y d}~nd}~ww xY wdS )	zLoad netrc from file.

    Attempt to load it from the path specified by the env-var
    NETRC or in the default location in the user's home directory.

    Returns None if it couldn't be found or fails to parse.
    NETRCNzHCould not resolve home directory when trying to look for .netrc file: %s_netrcz.netrczCould not parse .netrc file: %sFzCould not read .netrc file: %s)osenvirongetr	   homeRuntimeErrorr(   debug
IS_WINDOWSnetrcr   NetrcParseErrorwarningOSError
contextlibr   is_file)	netrc_env
netrc_pathhome_direnetrc_existss        rC   netrc_from_envr      s    
w''I)__

		y{{HH 	 	 	5  
 44444	 Z!EXF
G{3z??+++  D D D?CCCCCCCC G G G )) 	0 	0%--//L	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0 	0  	G 	G !"BAFFFG 4s_   A 
A1A,,A1 B$ $E3CED?5D
D?D	D?D	D??ET)auto_attribsfrozenslotsc                   0    e Zd ZU eed<   ee         ed<   dS )	ProxyInfoproxy
proxy_authN)re   rf   rg   r%   __annotations__r   r,   r=   rE   rC   r   r      s,         JJJ######rE   r   	netrc_objhostc                     | t          d          |                     |          }|t          d|d          |\  }}}|s||n|}|d}t          ||          S )z
    Return :py:class:`~aiohttp.BasicAuth` credentials for ``host`` from ``netrc_obj``.

    :raises LookupError: if ``netrc_obj`` is :py:data:`None` or if no
            entry is found for the ``host``.
    NzNo .netrc file foundzNo entry for z found in the `.netrc` file.ri   )LookupErrorauthenticatorsr,   )r   r   auth_from_netrcrk   accountrl   r   s          rC   basicauth_from_netrcr      s     0111..t44ON$NNNOOO.E7H ?'/uuH Xx(((rE   c                     d t                                                      D             } t                      }d |                                 D             }i }|                                D ]\  }}|\  }}|j        dv r.t	          j        d|j                                        |           A|r2|0|j        )	 t          ||j                  }n# t          $ r d }Y nw xY wt          ||          ||<   |S )Nc                 <    i | ]\  }}|d v 	|t          |          S ))httphttpswswssr$   rA   kvs      rC   
<dictcomp>z$proxies_from_env.<locals>.<dictcomp>  s:       Aq... 	
3q66...rE   c                 4    i | ]\  }}|t          |          S r=   )r   r   s      rC   r   z$proxies_from_env.<locals>.<dictcomp>  s'    IIIda&q))IIIrE   )r   r   z)%s proxies %s are not supported, ignoring)r   itemsr   schemer(   r   upperr   r   r   r   )
proxy_urlsr   strippedretprotovalr   auths           rC   proxies_from_envr     s/    LL&&((  J
   IIIj6F6F6H6HIIIH
Cnn&& , ,
st<+++!;U\=O=O=Q=QSX    	 z% /	5:FFDD"      DDD ud++E

Js   :CCCc                     | j         ,t          | j                   rt          d| j         d          t                      }	 || j                 }|j        |j        fS # t          $ r t          d| d          w xY w)z5Get a permitted proxy for the given URL from the env.NzProxying is disallowed for ``zNo proxies found for `z` in the env)r   r   r   r   r   r   r   KeyError)r   proxies_in_env
proxy_infos      rC   get_env_proxy_for_urlr   *  s    
xSX 6 6FFFFGGG%''N7#CJ/
 !666  H H HF3FFFGGGHs   A A<c                   8    e Zd ZU eed<   eed<   eed<   ded<   dS )MimeTypetypesubtypesuffixzMultiDictProxy[str]
parametersN)re   rf   rg   r   r   r=   rE   rC   r   r   8  s9         
IIILLLKKK%%%%%%rE   r   8   )maxsizemimetypec           	         | s,t          dddt          t                                          S |                     d          }t                      }|dd         D ]k}|s|                    d          \  }}}|                    |                                                                |                    d                     l|d                                                                         }|d	k    rd
}|                    d          \  }}}	|	                    d          \  }	}}
t          ||	|
t          |                    S )a  Parses a MIME type into its components.

    mimetype is a MIME type string.

    Returns a MimeType object.

    Example:

    >>> parse_mimetype('text/html; charset=utf-8')
    MimeType(type='text', subtype='html', suffix='',
             parameters={'charset': 'utf-8'})

    ri   )r   r   r   r   rP   r&   NrX   z "r   *z*/*rT   +)r   r!   r    rz   	partitionaddr{   strip)r   partsparamsitemkey_valuefulltypemtypestyper   s              rC   parse_mimetyper   @  sJ     
R~ikk7R7R
 
 
 	
 NN3E&[[Fabb	 ; ; 	s++Q

399;;$$&&D(9(9::::Qx~~%%''H3((--OE1es++E1fE&^F=S=S   rE   objdefaultc                     t          | dd           }|rAt          |t                    r,|d         dk    r |d         dk    rt          |          j        S |S )Nnamer   rL   rM   )getattrr   r   r	   r   )r   r   r   s      rC   guess_filenamer   h  sW    3%%D 
4%% $q'S..T"X__DzzNrE   z[^\041\043-\133\135-\176]c                 ,    h | ]}t          |          S r=   r>   r@   s     rC   rD   rD   p  s    ...qCFF...rE   	contentc                     t           t          |           k    st          d|           t                              d |           S )a  Return 7-bit content as quoted-string.

    Format content into a quoted-string as defined in RFC5322 for
    Internet Message Format. Notice that this is not the 8-bit HTTP
    format, but the 7-bit email format. Content must be in usascii or
    a ValueError is raised.
    zbad content for quoted-string c                 2    d|                      d          z   S )NrR   r   )group)xs    rC   <lambda>zquoted_string.<locals>.<lambda>}  s    dQWWQZZ&7 rE   )QCONTENTsetro   not_qtext_resub)r   s    rC   quoted_stringr  s  sF     s7||##E'EEFFF77AAArE   utf-8disptypequote_fields_charsetr   c                 ~   | rt           t          |           k    st          d|           | }|rg }|                                D ]=\  }}|rt           t          |          k    st          d|d|          |r|                                dk    r-t          |d|          }|                    |d|z  f           |	 t          |          }|                    |d|z  f           # t          $ rE d                    |dt          |d|          f          }|                    |d	z   |f           Y w xY w|	                    d
d          	                    dd          }|                    |d|z  f           ?d                    d |D                       }	d                    ||	f          }|S )ak  Sets ``Content-Disposition`` header for MIME.

    This is the MIME payload Content-Disposition header from RFC 2183
    and RFC 7579 section 4.2, not the HTTP Content-Disposition from
    RFC 6266.

    disptype is a disposition type: inline, attachment, form-data.
    Should be valid extension token (see RFC 2183)

    quote_fields performs value quoting to 7-bit MIME headers
    according to RFC 7578. Set to quote_fields to False if recipient
    can take 8-bit file names and field values.

    _charset specifies the charset to use when quote_fields is True.

    params is a dict with disposition params.
    zbad content disposition type z"bad content disposition parameter rX   filenameri   ry   z"%s"z''r   rR   z\\rS   z\"z; c              3   @   K   | ]}d                      |          V  dS )rX   N)join)rA   pairs     rC   	<genexpr>z-content_disposition_header.<locals>.<genexpr>  s,      ??tCHHTNN??????rE   )
TOKENr  ro   r   r{   r   appendr  r  replace)
r  r  r	  r   r   lparamsr   r   qvalsparamss
             rC   content_disposition_headerr    s   (  GECMM11EEEFFFE , 	5 	5HC Wus3xx// !Uc!U!Uc!U!UVVV 599;;*,, b8<<<DNNC$#78888=,S11  Vd]';<<<< & : : :!ww%tU3X-N-N-NO     c	4'899999	: {{40088eDDVd]34444))??w?????		5'*++Ls   C//AD>=D>c                 b    | sdS d| v p'|                      dd                                          S )zCheck if host looks like an IP Address.

    This check is only meant as a heuristic to ensure that
    a host is not a domain name.
    FrQ   .ri   )r  isdigit)r   s    rC   is_ip_addressr    s<      u $;9$,,sB//77999rE   _cached_current_datetimeri   c                      t          t          j                              } | t          k    r:d}d}t          j        |           ^}}}}}}}	}
d||	         |||         ||||fz  a| at          S )N)MonTueWedThuFriSatSun)ri   JanFebMarAprMayJunJulAugSepOctNovDecz#%s, %02d %3s %4d %02d:%02d:%02d GMT)inttimer  gmtime_cached_formatted_datetime)now_weekdayname
_monthnameyearmonthdayhhmmsswdtails              rC   rfc822_formatted_timer?    s     dikk

C
&&& I

  37+c2B2B/eS"b"b4%JuN
 &
" $' %%rE   infoTuple[weakref.ref[object], str]c                     | \  }} |            }|Gt          t                    5   t          ||                       d d d            d S # 1 swxY w Y   d S d S ra   )r   	Exceptionr   )r@  refr   obs       rC   _weakref_handlerF    s    IC	B	~i   	  	 GB	  	  	  	  	  	  	  	  	  	  	  	  	  	  	  	  	  	  ~s   AAA   rE  r   timeoutlooptimeout_ceil_thresholdc                     |b|dk    r\|                                 |z   }||k    rt          |          }|                    |t          t	          j        |           |f          S d S Nr   )r1  r   call_atrF  weakrefrD  )rE  r   rH  rI  rJ  whens         rC   weakref_handlerP    sc     w{{yy{{W$,,,::D||D/GKOOT3JKKK4rE   cbc                     ||dk    rd S |                                 }t          |||          }|                    ||           S rL  )r1  calculate_timeout_whenrM  )rQ  rH  rI  rJ  r4  rO  s         rC   
call_laterrT    sI     'Q,,t
))++C!#w0FGGD<<b!!!rE   	loop_timetimeout_ceiling_thresholdc                 :    | |z   }||k    rt          |          S |S )z$Calculate when to execute a timeout.r   )rU  rH  rV  rO  s       rC   rS  rS    s+     wD***DzzKrE   c            	           e Zd ZdZdZ	 ddej        dee         deddfd	Z	d
e
d         dededdfdZddZdeej                 fdZddZddZdS )TimeoutHandlezTimeout handle_timeout_loop_ceil_threshold
_callbacksrG  rI  rH  ceil_thresholdr_   Nc                 >    || _         || _        || _        g | _        d S ra   rZ  )rc   rI  rH  r_  s       rC   __init__zTimeoutHandle.__init__"  s*      
-  	rE   callback).Nargskwargsc                 @    | j                             |||f           d S ra   )r^  r  )rc   rb  rc  rd  s       rC   registerzTimeoutHandle.register/  s'     	$788888rE   c                 8    | j                                          d S ra   )r^  clearrb   s    rC   closezTimeoutHandle.close4  s    rE   c                     | j         }|\|dk    rV| j                                        |z   }|| j        k    rt	          |          }| j                            || j                  S d S rL  )r[  r\  r1  r]  r   rM  __call__)rc   rH  rO  s      rC   startzTimeoutHandle.start7  se    -7Q;;:??$$w.D$...Dzz:%%dDM:::4rE   BaseTimerContextc                     | j         ;| j         dk    r0t          | j                  }|                     |j                   |S t                      S rL  )r[  TimerContextr\  rf  rH  	TimerNoop)rc   timers     rC   rq  zTimeoutHandle.timerA  sH    =$):): ,,EMM%-(((L;;rE   c                     | j         D ]:\  }}}t          t                    5   ||i | d d d            n# 1 swxY w Y   ;| j                                          d S ra   )r^  r   rC  rh  )rc   rQ  rc  rd  s       rC   rk  zTimeoutHandle.__call__I  s     $ 	$ 	$Bf)$$ $ $D#F###$ $ $ $ $ $ $ $ $ $ $ $ $ $ $ 	s   	7;	;	rG  r_   N)r_   rm  )re   rf   rg   r   	__slots__asyncioAbstractEventLoopr   floatra  r   r   rf  ri  TimerHandlerl  rq  rk  r=   rE   rC   rY  rY    s       FI !"	 ' % 	
 
   9 +9479CF9	9 9 9 9
       x 34                  rE   rY  c                       e Zd ZdZddZdS )rm  r=   r_   Nc                     dS )z0Raise TimeoutError if timeout has been exceeded.Nr=   rb   s    rC   assert_timeoutzBaseTimerContext.assert_timeoutU  s      rE   rt  )re   rf   rg   ru  r|  r=   rE   rC   rm  rm  Q  s-        I? ? ? ? ? ?rE   rm  c                   f    e Zd ZdZdefdZdeee                  dee         dee	         ddfdZ
dS )	rp  r=   r_   c                     | S ra   r=   rb   s    rC   	__enter__zTimerNoop.__enter__]  s    rE   exc_typeexc_valexc_tbNc                     d S ra   r=   )rc   r  r  r  s       rC   __exit__zTimerNoop.__exit__`  s	     	rE   )re   rf   rg   ru  rm  r  r   r   BaseExceptionr
   r  r=   rE   rC   rp  rp  Y  s        I+    4./ -( '	
 
     rE   rp  c            	           e Zd ZdZdZdej        ddfdZddZde	fdZ
d	eee                  d
ee         dee         dee         fdZddZdS )ro  z&Low resolution timeout context managerr\  _tasks
_cancelled_cancellingrI  r_   Nc                 >    || _         g | _        d| _        d| _        d S )NFr   r  )rc   rI  s     rC   ra  zTimerContext.__init__n  s%    
/1rE   c                 .    | j         rt          j        ddS )z7Raise TimeoutError if timer has already been cancelled.N)r  rv  TimeoutErrorrb   s    rC   r|  zTimerContext.assert_timeoutt  s!    ? 	1&D0	1 	1rE   c                 
   t          j        | j                  }|t          d          t          j        dk    r|                                | _        | j        rt           j	        d | j
                            |           | S )N)rI  z4Timeout context manager should be used inside a taskr)   )rv  current_taskr\  r   sysversion_info
cancellingr  r  r  r  r  rc   tasks     rC   r  zTimerContext.__enter__y  s}    #444<UVVVw&&  $00D? 	1&D04   rE   r  r  r  c                     d }| j         r| j                                         }|t          j        u rG| j        r@|J t
          j        dk    r|                                | j        k    rd S t          j	        |d S )Nr)   )
r  poprv  CancelledErrorr  r  r  uncancelr  r  )rc   r  r  r  
enter_tasks        rC   r  zTimerContext.__exit__  s     37
; 	+**Jw---$/-))) 7** &&((4+;;;4&G3trE   c                 |    | j         s4t          | j                  D ]}|                                 d| _         d S d S NT)r  r  r  cancelr  s     rC   rH  zTimerContext.timeout  sI     	#DK((  "DOOO		# 	#rE   rt  )re   rf   rg   r   ru  rv  rw  ra  r|  rm  r  r   r   r  r
   boolr  rH  r=   rE   rC   ro  ro  i  s        00@IW6 4    1 1 1 1
+    "4./ -( '	
 
$   0# # # # # #rE   ro  delayr_  c                     | | dk    rt          j        d           S t          j                    }|                                }|| z   }| |k    rt          |          }t          j        |          S rL  )async_timeoutrH  rv  get_running_loopr1  r   
timeout_at)r  r_  rI  r4  rO  s        rC   ceil_timeoutr    sm     }

$T***#%%D
))++C;D~Dzz#D)))rE   c                   0   e Zd ZU dZ eg d          Zee         ed<   dZ	e
e         ed<   dZe
eeef                  ed<   eZeedef         ed<   de
e         d	dfd
Zed	efd            Zed	e
e         fd            Zed	e
e         fd            ZdS )HeadersMixinzMixin for handling headers.)_content_type_content_dict_stored_content_type_headersNr  r  r  rawr_   c                    || _         |d| _        i | _        d S t                                          d|z             }|                                | _        |                    d          }t          |dd                    | _        d S )Nzapplication/octet-streamzContent-Type: r=   r&   )r  r  r  r   parsestrget_content_type
get_paramsdict)rc   r  msgr   s       rC   _parse_content_typez HeadersMixin._parse_content_type  s    $'!;!;D!#D..))*:S*@AAC!$!5!5!7!7D^^B''F!%fQRRj!1!1DrE   c                     | j                             t          j                  }| j        |k    r|                     |           | j        J | j        S )z7The value of content part for Content-Type HTTP header.)r  r   r'   CONTENT_TYPEr  r  r  rc   r  s     rC   content_typezHeadersMixin.content_type  sV     m 122$++$$S)))!---!!rE   c                     | j                             t          j                  }| j        |k    r|                     |           | j        J | j                            d          S )z7The value of charset part for Content-Type HTTP header.Ncharset)r  r   r'   r  r  r  r  r  s     rC   r  zHeadersMixin.charset  sd     m 122$++$$S)))!---!%%i000rE   c                 p    | j                             t          j                  }|dnt	          |          S )z(The value of Content-Length HTTP header.N)r  r   r'   CONTENT_LENGTHr0  )rc   content_lengths     rC   r  zHeadersMixin.content_length  s3     **4+>??%-tt3~3F3FFrE   )re   rf   rg   r   	frozensetATTRSr"   r   r   r  r   r  r   r6   r  r   r5   r  propertyr  r  r0  r  r=   rE   rC   r  r    s;        %%IPPPQQE3#'M8C='''.2M8DcN+2228@%T9 45@@@
2x} 
2 
2 
2 
2 
2 "c " " " X" 1# 1 1 1 X1 G G G G XG G GrE   r  futzasyncio.Future[_T]resultc                 \    |                                  s|                     |           d S d S ra   )done
set_result)r  r  s     rC   r  r    s4    88:: v rE   c                   &    e Zd Z	 ddededdfdZdS )ErrorableProtocol.exc	exc_causer_   Nc                     d S ra   r=   )rc   r  r  s      rC   set_exceptionzErrorableProtocol.set_exception  s	     srE   .)re   rf   rg   r  r  r=   rE   rC   r  r    sN         $'  ! 
	     rE   r  z&asyncio.Future[_T] | ErrorableProtocolr  r  c                     t          j        |           r|                                 rdS |t          u }||u }|s	|s||_        |                     |           dS )zSet future exception.

    If the future is marked as complete, this function is a no-op.

    :param exc_cause: An exception that is a direct cause of ``exc``.
                      Only set if provided.
    N)rv  isfuturer  _EXC_SENTINEL	__cause__r  )r  r  r  exc_is_sentinelexc_causes_itselfs        rC   r  r    sq       =0Oy( "#4 "!crE   c                   t    e Zd ZU dZdZee         ed<   ddede	ee
                  fdZded	efd
Zd	efdZdS )AppKeyz.Keys for static typing support in Application.)_name_t__orig_class__r  Nr   tc                     t          j                    }|r'|j        j        dk    r|j        d         }n	|j        }|'|dz   |z   | _        || _        d S )Nz<module>re   r  )inspectcurrentframef_codeco_name	f_globalsf_backr  r  )rc   r   r  framemodules        rC   ra  zAppKey.__init__  se    $&& 	!|#z11#oj9LE	  	! c\D(
rE   otherr_   c                 P    t          |t                    r| j        |j        k     S dS r  )r   r  r  )rc   r  s     rC   __lt__zAppKey.__lt__%  s(    eV$$ 	,:++trE   c                 X   | j         }|Ft          t                    5  t          | j                  d         }d d d            n# 1 swxY w Y   |d}nIt          |t                    r%|j        dk    r|j        }n!|j         d|j         }nt          |          }d| j
         d| dS )Nr   z<<Unknown>>builtinsr  z<AppKey(z, type=z)>)r  r   AttributeErrorr   r  r   r   rf   rg   reprr  )rc   r  t_reprs      rC   __repr__zAppKey.__repr__*  s    G9.)) 5 5T011!45 5 5 5 5 5 5 5 5 5 5 5 5 5 5 9"FF4   	|z))L;;1>;;!WWF7$*77V7777s   AA	A	ra   )re   rf   rg   r   ru  r   objectr   r   r   r3   ra  r  r  r  r=   rE   rC   r  r    s         881I
 L   
 
S 
Xd2h%7 
 
 
 
F t    
8# 8 8 8 8 8 8rE   r  c            	          e Zd ZdZdeeeeee	         f         e	f                  ddfdZ
ddZedee         defd            Zedede	fd	            Zdeeee         f         de	fd
Zedee         dedeeef         fd            Zeddee         dddee         fd            Zeddede	de	fd            Zddeeee         f         de	de	fdZdefdZdeeeee	         f                  fdZdedefdZdefdZdefdZdS )r-   )_mapsmapsr_   Nc                 .    t          |          | _        d S ra   )tupler  )rc   r  s     rC   ra  zChainMapProxy.__init__@  s    4[[


rE   c                 P    t          d                    | j                            )Nz4Inheritance class {} from ChainMapProxy is forbidden)r   formatre   )rr   s    rC   __init_subclass__zChainMapProxy.__init_subclass__C  s(    !6#,//
 
 	
rE   r   c                     d S ra   r=   rc   r   s     rC   __getitem__zChainMapProxy.__getitem__I  s    25#rE   c                     d S ra   r=   r  s     rC   r  zChainMapProxy.__getitem__L  s    ,/CrE   c                 h    | j         D ]}	 ||         c S # t          $ r Y w xY wt          |          ra   )r  r   )rc   r   mappings      rC   r  zChainMapProxy.__getitem__O  sT    z 	 	Gs|###   smms   
""r   c                     d S ra   r=   rc   r   r   s      rC   r   zChainMapProxy.getW  s    BE#rE   .c                     d S ra   r=   r  s      rC   r   zChainMapProxy.getZ  s    ILrE   c                     d S ra   r=   r  s      rC   r   zChainMapProxy.get]  s    8;rE   c                 8    	 | |         S # t           $ r |cY S w xY wra   )r   r  s      rC   r   zChainMapProxy.get`  s5    	9 	 	 	NNN	s   
 c                 R    t           t                      j        | j                   S ra   )lenr  unionr  rb   s    rC   __len__zChainMapProxy.__len__f  s    ;355;
+,,,rE   c                 |    i }t          | j                  D ]}|                    |           t          |          S ra   )reversedr  updateiter)rc   dr  s      rC   __iter__zChainMapProxy.__iter__j  s@    02
++ 	 	GHHWAwwrE   c                 D    t          fd| j        D                       S )Nc              3       K   | ]}|v V  	d S ra   r=   )rA   mr   s     rC   r  z-ChainMapProxy.__contains__.<locals>.<genexpr>r  s'      003!8000000rE   anyr  r  s    `rC   __contains__zChainMapProxy.__contains__q  s(    0000TZ000000rE   c                 *    t          | j                  S ra   r	  rb   s    rC   __bool__zChainMapProxy.__bool__t  s    4:rE   c                 h    d                     t          t          | j                            }d| dS )Nz, zChainMapProxy(rK   )r  mapr  r  )rc   r   s     rC   r  zChainMapProxy.__repr__w  s0    ))Cdj1122*****rE   rt  r  ra   )re   rf   rg   ru  r   r   r   r   r  r   ra  r  r   r3   r  r4   r   r   r0  r  r   r  r  r  r  r  r  r=   rE   rC   r-   r-   =  sI       I!XgeC4D.Es.J&KL !QU ! ! ! !
 
 
 
 5vbz5b555 X5/s/s/// X/uS&*_5 #     EvbzEBE5R=EEE XELLvbzLDL8B<LLL XL;;s;S;3;;; X; uS&*_-  s    - - - - -(5fSk)9#:;    1 14 1 1 1 1$    +# + + + + + +rE   r-   z[!\x23-\x7E\x80-\xff]+z(W/)?"(z)"z)(?:\s*,\s*|$)|(.)r   c                   (    e Zd ZU eed<   dZeed<   dS )r.   r   Fis_weakN)re   rf   rg   r   r   r  r  r=   rE   rC   r.   r.     s+         JJJGTrE   r.   r   c                 z    | t           k    r-t                              |           st          d| d          d S d S )NzValue z, is not a valid etag. Maybe it contains '"'?)ETAG_ANY	_ETAGC_RE	fullmatchro   )r   s    rC   validate_etag_valuer    sN    !4!4U!;!;KUKKK
 
 	
 rE   date_strc                     | et          |           }|Tt          t                    5  t          j        |dd         dt          j        j        icddd           S # 1 swxY w Y   dS )z/Process a date string, return a datetime objectN   tzinfo)r   r   ro   datetimetimezoneutc)r  	timetuples     rC   parse_http_dater    s    h''	 *%% W W()BQB-V@Q@UVVW W W W W W W W W W W W W W W W4s   (AA!$A!methodcodec                 b    |t           v p&| t          v pd|cxk    odk     nc o| t          j        v S )z-Check if a request must return an empty body.r:   ,  )EMPTY_BODY_STATUS_CODESEMPTY_BODY_METHODSr'   METH_CONNECT_ALLr   r!  s     rC   must_be_empty_bodyr(    sS     	'' 	C''	C4#A&D,A"ArE   c                 P    |t           v pd|cxk    odk     nc o| t          j        v S )zrCheck if a Content-Length header should be removed.

    This should always be a subset of must_be_empty_body
    r:   r#  )r$  r'   r&  r'  s     rC   should_remove_content_lengthr*    sC     ** tc=f(==rE   ra   )Tr  )r@  rA  r_   Nrs  )r   rv  r|   r   r   r  enum	functoolsr  r   r   platformrer  r1  rN  collectionsr   r   email.parserr   email.utilsr   mathr   pathlibr	   typesr
   typingr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   urllib.parser   urllib.requestr   r   attr	multidictr    r!   r"   propcache.apir#   r/   yarlr%   ri   r'   logr(   r  r  __all__systemIS_MACOSr   PY_310PY_311r3   r4   Enumr5   r6   r  r   r   NO_EXTENSIONSr  ranger$  METH_HEAD_ALLr%  flagsdev_modeignore_environmentDEBUGCHARr?   CTL
SEPARATORSr  r^   r,   r   r   sr   r   r   r   r   r   	lru_cacher   r   compiler  r  r  r  r  r  r0  r   r3  r?  rF  r  rx  rw  ry  rP  rT  rS  rY  rm  rp  ro  Timeoutr  r  r  r  r  r  r  total_orderingr  r-   _ETAGCr  _QUOTED_ETAGQUOTED_ETAG_RELIST_QUOTED_ETAG_REr  r.   r  r  r(  r*  r=   rE   rC   <module>rV     sg                     				  				 



   " " " " " "       % % % % % % ! ! ! ! ! !                                                         (       3 3 3 3 3 3 3 3  = = = = = = = = = = 8 8 8 8 8 8                  w#####
98?(X_)+
		W	$		W	$ WT]]WT]]DIk:..	RZ^^$;<<== $)S#$@c3$@$@AA  ' 	 		$$Sbjnn=Q.R.R)S)S 
 '&a&&&$$uuQ||$$$CHH(  CFF'
* 	s
Z       
<J <J <J <J <J

;(I(I(IJJ <J <J <J~NS NU30C+C%D N N N N(- ( ( ( (V T$d333$ $ $ $ $ $ $ 43$
)HU[$9 ) ) ) ) ) ):$sI~.    47s 7uS(92E-E'F 7 7 7 7 T$d333& & & & & & & 43& R   $S $X $ $ $ ! $N  hsm x}     rz677..EE$--...$7
B3 
B3 
B 
B 
B 
B ?F0 00!%08;0QT00 0 0 0f
: 
:$ 
: 
: 
: 
: +/ (3- . . . %&s %& %& %& %&P        %& 
  
#	
 " g!"   ( %&	
" 
"S
"
" 
#
" "	
"
 g!"
" 
" 
" 
"			  %	 		 	 	 	1  1  1  1  1  1  1  1 h? ? ? ? ?~&89 ? ? ?         ># ># ># ># >## ># ># >#D 56* *E?*,1** * * *,G ,G ,G ,G ,G ,G ,G ,G^( "     
          - 	1	  
	   . +8 +8 +8 +8 +8WR[ +8 +8 +8\<+ <+ <+ <+ <+GE#vc{"23S89 <+ <+ <+@ 
#BJv	$&$$$L)) bj!Fl!F!F!FGG  T$d333       43

s 
t 
 
 
 
hsm 9J0K     s # $    	 	C 	D 	 	 	 	 	 	rE   