
    rp0jG              )       $   S SK r S SKrS SKr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  S SKJr  S SKJr  S SKJrJrJr  SSKJr  SS	KJrJrJr  SS
KJr  SSKJr  SSKJ r J!r!  SSK"J#r#J$r$J%r%J&r&J'r'J(r(J)r)J*r*J+r+J,r,J-r-J.r.J/r/J0r0J1r1J2r2J3r3J4r4J5r5J6r6J7r7J8r8J9r9J:r:J;r;J<r<J=r=J>r>J?r?J@r@JArAJBrBJCrCJDrDJErEJFrFJGrGJHrHJIrIJJrJJKrKJLrLJMrMJNrNJOrOJPrPJQrQJRrRJSrSJTrTJUrUJVrVJWrWJXrXJYrYJZrZJ[r[J\r\J]r]  SSK^J_r_  SSK`Jara  SSKbJcrcJdrd  SSKeJfrfJgrgJhrh  SSKiJjrjJkrkJlrl  SSKmJnrnJoroJprpJqrqJrrr  SSKsJtrtJuruJvrvJwrwJxrxJyryJzrzJ{r{J|r|J}r}J~r~JrJrJr  SSKJrJrJrJrJrJrJrJrJr  SSKJr  SSKJrJrJrJrJrJrJrJrJrJrJr  SSKJrJrJr  Sr\(       a  S SKJr  O S SKJr  \GRF                  " S\]SS9  \\   rSSSSS\SSSS.	S \ \	\    -  S!\\-  S-  S"\S-  S#\\\   -  S-  S$\R                  \\R                     -  S-  S%\S-  S&\
S'   S-  S(\S)\S-  S*\S-  S+\S,S4S- jjrS.\S/   S0\ GRV                  S,S4S1 jrSSSSS2S3S\S\a\aGRZ                  \SSSS4SS5.S \ \	\    -  S!\\-  S-  S"\S-  S#\\\   -  S-  S$\R                  \\R                     -  S-  S6\S7\S%\S-  S&\
S'   S-  S(\S8\\   S9\S:\GR`                  S-  S;\S)\S-  S*\S-  S<\S0\ GRV                  S-  S+\S,S4(S= jjrS>\\   S,S4S? jr\S@:X  a  \" \GRj                  SS 5        gg! \ a    \r GNf = f)A    N)ArgumentParser)	AwaitableCallableIterabler   )suppress)import_module)TYPE_CHECKINGAnycast   )AbstractAccessLogger)AppKey
RequestKeyResponseKey)access_logger)PathLike)ApplicationCleanupError);HTTPAcceptedHTTPBadGatewayHTTPBadRequestHTTPClientErrorHTTPConflictHTTPCreated	HTTPErrorHTTPExceptionHTTPExpectationFailedHTTPFailedDependencyHTTPForbidden	HTTPFoundHTTPGatewayTimeoutHTTPGoneHTTPInsufficientStorageHTTPInternalServerErrorHTTPLengthRequiredHTTPMethodNotAllowedHTTPMisdirectedRequestHTTPMoveHTTPMovedPermanentlyHTTPMultipleChoices!HTTPNetworkAuthenticationRequiredHTTPNoContentHTTPNonAuthoritativeInformationHTTPNotAcceptableHTTPNotExtendedHTTPNotFoundHTTPNotImplementedHTTPNotModifiedHTTPOkHTTPPartialContentHTTPPaymentRequiredHTTPPermanentRedirectHTTPPreconditionFailedHTTPPreconditionRequiredHTTPProxyAuthenticationRequiredHTTPRedirectionHTTPRequestEntityTooLargeHTTPRequestHeaderFieldsTooLargeHTTPRequestRangeNotSatisfiableHTTPRequestTimeoutHTTPRequestURITooLongHTTPResetContentHTTPSeeOtherHTTPServerErrorHTTPServiceUnavailableHTTPSuccessfulHTTPTemporaryRedirectHTTPTooManyRequestsHTTPUnauthorizedHTTPUnavailableForLegalReasonsHTTPUnprocessableEntityHTTPUnsupportedMediaTypeHTTPUpgradeRequiredHTTPUseProxyHTTPVariantAlsoNegotiatesHTTPVersionNotSupportedNotAppKeyWarning)FileResponse)AccessLogger)
middlewarenormalize_path_middleware)PayloadAccessErrorRequestHandlerRequestPayloadError)BaseRequest	FileFieldRequest)ContentCodingResponseStreamResponsejson_bytes_responsejson_response)AbstractRouteDefRouteDefRouteTableDef	StaticDefdeletegetheadoptionspatchpostputroutestaticview)		AppRunner
BaseRunnerBaseSiteGracefulExitNamedPipeSiteServerRunnerSockSiteTCPSiteUnixSite)Server)AbstractResourceAbstractRouteDynamicResourcePlainResourcePrefixedSubAppResourceResourceResourceRouteStaticResourceUrlDispatcherUrlMappingMatchInfoView)WebSocketReadyWebSocketResponse	WSMsgType)ur   r   r   rO   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rP   rR   rS   rT   rU   rV   rW   rX   rY   r   rZ   r[   r\   r]   r^   r   r_   r`   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rr   rs   rt   ru   rq   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   r   r   r   r   r   run_app)
SSLContextignoreT)categoryappend   )	hostportpathsockssl_contextprintbacklogreuse_address
reuse_portappr   r   r   r   r   r   ).Nr   r   r   kwargsreturnc       	           #    [         R                  " U 5      (       a
  U I S h  vN n [        [        U 5      n [	        U 40 U
D6nUR                  5       I S h  vN   / n Ub\  [        U[        5      (       a  UR                  [        UUUUUUU	S95        ONU H!  nUR                  [        UUUUUUU	S95        M#     O&Uc  Ub  Ub  UR                  [        UUUUUU	S95        Ube  [        U[        [        R                  45      (       a  UR                  [        UUUUS95        O$U H  nUR                  [        UUUUS95        M      UbU  [        U[        5      (       d  UR                  [        UUUUS95        O$U H  nUR                  [        UUUUS95        M      U H  nUR                  5       I S h  vN   M     U(       aB  [!        S UR"                   5       5      nU" SR%                  SR'                  U5      5      5         [         R(                  " S5      I S h  vN   M    GN GN Nx N! UR+                  5       I S h  vN    f = f7f)N)r   r   r   r   )r   r   r   r   r   )r   r   c              3   L   #    U  H  n[        UR                  5      v   M     g 7f)N)strname).0ss     E/home/wildlama/miniconda3/lib/python3.13/site-packages/aiohttp/web.py	<genexpr>_run_app.<locals>.<genexpr>  s     =13qvv;;s   "$z6======== Running on {} ========
(Press CTRL+C to quit)z, i  )asyncioiscoroutiner   r   rm   setup
isinstancer   r   rt   osr   ru   r   rs   startsortedsitesformatjoinsleepcleanup)r   r   r   r   r   r   r   r   r   r   r   runnerr   hpr   sitenamess                     r   _run_appr   )  s]     3i
{C
 Cs%f%F
,,.E^$$$$/ '&3#-
 ALL" (3$+*7'1
  \dld.>LL +#"/)	 $bkk 233$/ '	 ALL "(3$+	  dH--$/ '	 ALL "(3$+	  D**,  ===E))/		%0@)A --%%% K  j  &nnsk   !IH/3IH2IEH9 <H5=A+H9 (H7)H9 /I2I5H9 7H9 9IIII	to_cancelzasyncio.Task[Any]loopc                 <   U (       d  g U  H  nUR                  5         M     UR                  [        R                  " U SS065        U  HP  nUR	                  5       (       a  M  UR                  5       c  M-  UR                  SUR                  5       US.5        MR     g )Nreturn_exceptionsTz1unhandled exception during asyncio.run() shutdown)message	exceptiontask)cancelrun_until_completer   gather	cancelledr   call_exception_handler)r   r   r   s      r   _cancel_tasksr     s       	GNNINNO>>>>'''R!%!1 	     g      N@g     R@F)r   r   r   r   shutdown_timeoutkeepalive_timeoutr   r   r   access_log_classaccess_log_format
access_loghandle_signalsr   r   handler_cancellationr   r   r   r   r   r   r   r   c          	         Uc  [         R                  " 5       nUR                  5       (       a  U(       a  UR                  S:X  av  UR                  [
        R                  :X  a  UR                  [
        R                  5        UR                  5       (       d$  UR                  [
        R                  " 5       5        UR                  [        U 40 SU_SU_SU_SU_SU_SU_S	U_S
U_SU	_SU
_SU_SU_SU_SU_SU_SU_UD65      n [         R                  " U5        UR                  U5         UR%                  5       (       dC  UR'                  5         [)        [         R*                  5         UR                  U5        SSS5        [-        [         R.                  " U5      U5        UR                  UR1                  5       5        UR3                  5         g! [         ["        4 a     Nf = f! , (       d  f       Nt= f! [-        [         R.                  " U5      U5        UR                  UR1                  5       5        UR3                  5         f = f!  UR%                  5       (       dU  UR'                  5         [)        [         R*                  5         UR                  U5        SSS5        O! , (       d  f       O= f[-        [         R.                  " U5      U5        UR                  UR1                  5       5        UR3                  5         f ! [-        [         R.                  " U5      U5        UR                  UR1                  5       5        UR3                  5         f = f= f)zRun an app locallyNzaiohttp.accessr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )r   new_event_loop	get_debugr   levelloggingNOTSETsetLevelDEBUGhasHandlers
addHandlerStreamHandlercreate_taskr   set_event_loopr   rp   KeyboardInterruptdoner   r   CancelledErrorr   	all_tasksshutdown_asyncgensclose)r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   	main_tasks                       r   r   r     s   . |%%' ~~J:??>N+Nw~~-.%%''!!'"7"7"9:  	
	
 	
 		

 	
 .	
 0	
 $	
 	
 	
 .	
 0	
 "	
 *	
 (	
  "!	
" "6%	
I.t$	*	 >>##  "g445++I6 6 '++D148##D$;$;$=>JJL' +,  65 '++D148##D$;$;$=>JJL!	 >>##  "g445++I6 655 '++D148##D$;$;$=>JJL '++D148##D$;$;$=>JJLs{   'G />G> -G-?G> G*'I )G**I -
G;7G> >AIM">LJ-$	L-
J;7L>AM"AMM"argvc                    [        SSS9nUR                  SSSS9  UR                  SS	S
S S9  UR                  SSS[        SS9  UR                  SSSS9  UR                  U 5      u  p#UR                  R                  S5      u  pEnU(       a  U(       d  UR                  S5        UR                  S5      (       a  UR                  S5         [        U5      n [        WU5      n	UR                  b&  [        [        S5      (       d  UR                  S5        [        R                   " [        R"                  S9  UR                  (       a  UR$                  c  S =pO!UR$                  =(       d    S n
UR&                  nW	" U5      n[)        XXR                  S!9  UR+                  S"S#9  g ! [         a!  nUR                  SU SU 35         S nANS nAff = f! [         a    UR                  SU< SU< 35         GNf = f)$Nzaiohttp.web Application serverzaiohttp.web)descriptionprog
entry_funczvCallable returning the `aiohttp.web.Application` instance to run. Should be specified in the 'module:function' syntax.z
entry-func)helpmetavarz-Hz
--hostnamez0TCP/IP hostname to serve on (default: localhost))r   defaultz-Pz--portz.TCP/IP port to serve on (default: %(default)r)i  )r   typer   z-Uz--pathz_Unix file system path to serve on. Can be combined with hostname to serve on both Unix and TCP.)r   :z,'entry-func' not in 'module:function' syntax.z#relative module names not supportedzunable to import z: zmodule z has no attribute AF_UNIXz=file system paths not supported by your operating environment)r   	localhost)r   r   r   zStopped
)r   )r   add_argumentintparse_known_argsr   	partitionerror
startswithr   ImportErrorgetattrAttributeErrorr   hasattrsocketr   basicConfigr   hostnamer   r   exit)r   
arg_parserargs
extra_argvmod_str_func_strmoduleexfuncr   r   r   s                r   mainr     s   4=J H    ?	   =   )   "2248D  ??44S9G7GH#>?>w'Nvx(
 yyWVY%?%?K	
 gmm,yyT]]*t}}+yy
z
CCII6OOKO(/  >,WIRt<==>  N77+-?|LMNs*   F* G *
G4GG#G?>G?__main__)r   r   r   r   syswarningsargparser   collections.abcr   r   r   TypingIterable
contextlibr   	importlibr   typingr	   r
   r   abcr   helpersr   r   r   logr   typedefsr   web_appr   r   web_exceptionsr   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   web_fileresponserP   web_logrQ   web_middlewaresrR   rS   web_protocolrT   rU   rV   web_requestrW   rX   rY   web_responserZ   r[   r\   r]   r^   web_routedefr_   r`   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rl   
web_runnerrm   rn   ro   rp   rq   rr   rs   rt   ru   
web_serverrv   web_urldispatcherrw   rx   ry   rz   r{   r|   r}   r~   r   r   r   web_wsr   r   r   __all__sslr   r   objectfilterwarningsr   HostSequencer   r   boolr   setAbstractEventLoopr   
LOG_FORMATfloatr   Loggerr   listr   __name__r    r   r   <module>r(     s:     	  
  # U U  # + + % 4 4   M< < < < < < < < < < < < < < < <z ; ! 
 
     
 
 
 )    CL "
 	  +;D Ic" '+7;AE%)(-!%"x	y-	-x 
t
#x *	x
 ^H-
-
4x --.7
7$
>x d"x I%x x $;x tx x 
xv&'/6/H/H	6 '+7;AE"#%)(-3?)44(5!%"!&-1'N	y-	-N 
t
#N *	N
 ^H-
-
4N --.7
7$
>N N N d"N I%N N /0N N %N N  $;!N" t#N$ %N& 
#
#d
*'N( )N* 
+Nb@)tCy @)T @)F z!" a	  
s   L LL