+
    yjk                    V   R t ^ RIHt ^ RIt^ RIt^ RI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IHt ^ R	IHt ^R
IHt ^RIHt ^RIHt ^RIHt  ^ RItRt ]PB                  R8X  d
    ]"! R4       ]#! ]R4      t$]$'       d   ]PJ                  t%M
 ! R R4      t% ]PL                  t'^t)]PT                  ]PV                  R]PX                  ]-]PT                  ]-,          3,          ]P\                  R,          3,          ,          t/]P`                  '       d   ^ RI1H2t2 ^ RI1H3t3 ^ RI4H5t5 ^ RI6H7t7  ! R R]Pp                  4      t9 ! R R ]4      t:R! R" lt;R?R# R$ ll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tAR/ R0 ltBR1 R2 ltC ! R3 R4]4      tD ! R5 R6]P                  ]D4      tF ! R7 R8]%]D4      tGRAR9 R: lltHR; R< ltIRBR= R> lltJR#   ] d     ! R R4      t]! 4       t ELi ; i  ] d    Rt  ELi ; i  ]( d    Rt' ELfi ; i)Ca  A WSGI and HTTP server for use **during development only**. This
server is convenient to use, but is not designed to be particularly
stable, secure, or efficient. Use a dedicate WSGI server and HTTP
server when deploying to production.

It provides features like interactive debugging and code reloading. Use
``run_simple`` to start the server. Put this in a ``run.py`` script:

.. code-block:: python

    from myapp import create_app
    from werkzeug import run_simple
)annotationsN)datetime)	timedelta)timezone)BaseHTTPRequestHandler)
HTTPServer)unquote)urlsplit_log)_wsgi_encoding_dance)InternalServerError)
uri_to_iric                  "    ] tR t^*tR R ltRtR# )	_SslDummyc                    V ^8  d   QhRRRR/#    namestrreturnt.Any )formats   "D/var/www/html/2rare/lib/python3.14/site-packages/werkzeug/serving.py__annotate___SslDummy.__annotate__+   s     	 	C 	E 	    c                	    \        R 4      h)zUSSL is unavailable because this Python runtime was not compiled with SSL/TLS support.)RuntimeError)selfr   s   &&r   __getattr___SslDummy.__getattr__+   s    2 r   r   N)__name__
__module____qualname____firstlineno__r!   __static_attributes__r   r   r   r   r   *   s    	 	r   r   TntcoloramaFforkc                      ] tR t^AtRtR# )ForkingMixInr   N)r#   r$   r%   r&   r'   r   r   r   r,   r,   A   s    r   r,   ssl.SSLContextadhoc)WSGIApplication)WSGIEnvironment)RSAPrivateKeyWithSerialization)Certificatec                  J    ] tR t^YtRtR R ltR R ltR R ltR R	 ltR
t	R# )DechunkedInputz8An input stream that handles Transfer-Encoding 'chunked'c                    V ^8  d   QhRRRR/# )r   rfilezt.IO[bytes]r   Noner   )r   s   "r   r   DechunkedInput.__annotate__\   s      k d r   c                	.    Wn         R V n        ^ V n        R# )FN)_rfile_done_len)r    r6   s   &&r   __init__DechunkedInput.__init__\   s    
	r   c                   V ^8  d   QhRR/# r   r   boolr   )r   s   "r   r   r8   a   s      $ r   c                	    R # )Tr   r    s   &r   readableDechunkedInput.readablea   s    r   c                   V ^8  d   QhRR/# r   r   intr   )r   s   "r   r   r8   d   s       r   c                	     V P                   P                  4       P                  R 4      p\        VP	                  4       ^4      pT^ 8  d   \        R4      hT#   \
         d   p\        R4      ThRp?ii ; i)latin1zInvalid chunk headerNz!Negative chunk length not allowed)r:   readlinedecoderH   strip
ValueErrorOSError)r    liner<   es   &   r   read_chunk_lenDechunkedInput.read_chunk_lend   sp    	9;;'')00:Dtzz|R(D !8=>>	  	901q8	9s   AA A5$A00A5c                    V ^8  d   QhRRRR/# )r   buf	bytearrayr   rH   r   )r   s   "r   r   r8   n   s     & &I &# &r   c                	,   ^ pV P                   '       Eg   V\        V4      8  Edn   V P                  ^ 8X  d   V P                  4       V n        V P                  ^ 8X  d   RV n         V P                  ^ 8  d   \	        \        V4      V P                  4      pW#,           \        V4      8  dc   V P
                  P                  \        V4      V,
          4      WR% V ;P                  \        V4      V,
          ,          un        \        V4      pMDV P
                  P                  V4      WW#,           % V ;P                  V,          un        W#,          pV P                  ^ 8X  g   EKb  V P
                  P                  4       pVR9  g   EK  \        R4      hV# )    TNz!Missing chunk terminating newline)   
   
   )	r;   lenr<   rR   minr:   readrK   rO   )r    rU   r^   n
terminators   &&   r   readintoDechunkedInput.readinton   s#   ***CyyA~ !//1	yyA~ "
yy1} C$)),
 8c#h&!%!1!1#c(T/!BCJIISD0Is8D+/;;+;+;A+>Ctx(IINIIDyyA~ "[[113
%<<!"EFFr   )r;   r<   r:   N)
r#   r$   r%   r&   __doc__r=   rD   rR   ra   r'   r   r   r   r4   r4   Y   s    B
& &r   r4   c            	      f  a ] tR t^t$ RtR]R&   ]R R l4       tR R ltR R	 lt	R
 V3R llt
R!R R lltR V3R lltR R ltR R lt]P!                  . ]! ^ 4      O]! ^^4      O U u/ uF	  q RV R 2bK  	  up 4      tR]]! R4      &   R"R R lltR R ltR R ltR R ltR tV;t# u up i )#WSGIRequestHandlerz3A request handler that implements WSGI dispatching.BaseWSGIServerserverc                   V ^8  d   QhRR/# r   r   r   r   )r   s   "r   r   WSGIRequestHandler.__annotate__   s     + + +r   c                	.    V P                   P                  # N)rg   _server_versionrC   s   &r   server_version!WSGIRequestHandler.server_version   s    {{***r   c                   V ^8  d   QhRR/# )r   r   r0   r   )r   s   "r   r   rj      s     O Oo Or   c                	    \        V P                  4      pV P                  P                  f   RMRpV P                  '       g	   R(V n        M3\        V P                  \        4      '       d   V P                  ^ 3V n        VP                  '       g/   VP                  '       d   RVP                   VP                   2pMVP                  p\        V4      p/ RR)bRVbRV P                  bR\        P                  bRV P                  P                  bR	V P                  P                  bR
RbRV P                  bRV P                   bRV P"                  bRRbR\%        V4      bR\%        VP&                  4      bR\%        V P                  4      bR\%        V P                  4      bRV P)                  4       bRV P+                  4       bRV P                  P,                  ^ ,          R\        V P                  P,                  ^,          4      RV P.                  /CpV P0                  P3                  4        Fc  w  rVRV9   d   K  VP5                  4       P7                  RR4      pVP7                  RR4      pVR*9  d   RV 2pWT9   d   WE,           RV 2pWdV&   Ke  	  VP9                  RR4      P;                  4       P=                  4       R 8X  d   R!VR"&   \?        VR,          4      VR&   VP                  '       d"   VP                  '       d   VP                  VR#&    V P                  PA                  R!R$7      pVe   \B        PD                  ! V4      VR%&   V#   \F         d!    T P                  PI                  R&R'4        T# \J         d     T# i ; i)+Nhttphttps/zwsgi.versionzwsgi.url_schemez
wsgi.inputzwsgi.errorszwsgi.multithreadzwsgi.multiprocesszwsgi.run_onceFzwerkzeug.socketSERVER_SOFTWAREREQUEST_METHODSCRIPT_NAME 	PATH_INFOQUERY_STRINGREQUEST_URIRAW_URIREMOTE_ADDRREMOTE_PORTSERVER_NAMESERVER_PORTSERVER_PROTOCOL_-z
HTTP_,HTTP_TRANSFER_ENCODINGchunkedTzwsgi.input_terminated	HTTP_HOST)binary_formSSL_CLIENT_CERTerrorz&Cannot fetch SSL peer certificate info)<local>rX   )   rX   )CONTENT_TYPECONTENT_LENGTH)&r	   pathrg   ssl_contextclient_address
isinstancer   schemenetlocr   r6   sysstderrmultithreadmultiprocess
connectionrn   commandr   queryaddress_stringport_integerserver_addressrequest_versionheadersitemsupperreplacegetrM   lowerr4   getpeercertsslDER_cert_to_PEM_certrN   logAttributeError)r    request_url
url_scheme	path_infoenvironkeyvalue	peer_certs   &       r   make_environWSGIRequestHandler.make_environ   s   tyy)#{{66>VG
""""0D++S11#'#6#6":D
 !!!k&8&8&8K../0@0@/ABI#((II&	$
F$
z$
 $**$
 3::	$

  7 7$
  !9!9$
 U$
 t$
 t22$
 dll$
 2$
 -i8$
 01B1BC$
 /		:$
" +DII6#$
$ 4..0%$
& 4,,.'$
( 4;;55a83t{{99!<=t33-$
2 ,,,,.JCcz))+%%c3/CMM&"-E<<cUm>&|nAeW5E CL / ;;/4::<BBD	Q/3G+,$27<3H$IGL! +"4"4"4#.#5#5GK 	 333EI$-0-E-Ei-P)*   	OKKOOG%MN
 	  			s   9M 'N?NNNc                   V ^8  d   QhRR/# r   r   r7   r   )r   s   "r   r   rj      s     QB QB$ QBr   c                	^  a aaaaa	a
aa S P                   P                  R R4      P                  4       P                  4       R8X  d   S P                  P                  R4       S P                  4       ;S n        oRoRoRo
RoRoR VVVVV V
V3R lloRVVVV3R llo	R	 VVVV V	V3R
 llp V! S P                  P                  4       R#   \        \        P                  3 d   pS P                  TS4        Rp?R# Rp?i\         d   pS P                  P                  '       d   h S
e   S'       d   RS n         S
f   RoRoT! \#        4       4       M  \         d     Mi ; i^RIHp T! T4      P)                  4       pS P                  P+                  RRT 24        Rp?R# Rp?ii ; i)Expectrx   z100-continues   HTTP/1.1 100 Continue

NFc                    V ^8  d   QhRRRR/# )r   databytesr   r7   r   )r   s   "r   r   1WSGIRequestHandler.run_wsgi.<locals>.__annotate__   s     7	 7	 7	$ 7	r   c                  < Sf   Q R4       hS
f   Q R4       hSf   SoS
o	 SP                  R ^4      w  r\        V4      pSP                  W24       \	        4       pS	 F5  w  rVSP                  WV4       VP                  VP                  4       4       K7  	  RV9   gL   SR,          R8X  g>   ^dTu;8:  d   ^8  g/   M VR9   g&   SP                  R8  d   RoSP                  RR	4       SP                  R
R4       SP                  4        \        V \        4      '       g   Q R4       hV '       d   S'       d^   SP                  P                  \        \        V 4      4      R,          P!                  4       4       SP                  P                  R4       SP                  P                  V 4       S'       d   SP                  P                  R4       SP                  P#                  4        R #   \         d    SRr! ELi ; i)Nzwrite() before start_responserx   zcontent-lengthrv   HEADHTTP/1.1TzTransfer-Encodingr   
Connectionclosezapplications must write bytes:r   NNrZ   >   0     )splitrN   rH   send_responsesetsend_headeraddr   protocol_versionend_headersr   r   wfilewritehexr\   encodeflush)r   code_strmsgcodeheader_keysr   r   chunk_responser   headers_sentheaders_setr    status_sent
status_sets   &      r   r   *WSGIRequestHandler.run_wsgi.<locals>.write   s   )J+JJ)*K,KK*"(*4$/$5$5dA$>MH 8}""4-!e".JC$$S0OOCIIK0 #/ )K7"#34>4-#-:---;%)N$$%8)D   w7  "dE**K,KK*!JJ$$ST^B%7%>%>%@AJJ$$W-

  &!JJ$$W-JJ] " 4$/c4s   G. .H ?H c                   < V'       d-    S'       d    V^,          P                  V^,          4      h RpMS'       d   \        R4      hV oVoS#   Rpi ; i)r   NzHeaders already set)with_tracebackAssertionError)statusr   exc_infor   r   r   r   s   &&&r   start_response3WSGIRequestHandler.run_wsgi.<locals>.start_response5  sZ    $#&qk88!EE $  $H$%:;;J!KL  $Hs   A A Ac                    V ^8  d   QhRRRR/# )r   appr/   r   r7   r   )r   s   "r   r   r   C  s     %	- %	- %	-T %	-r   c                $  < V ! SS
4      p V F  pS! V4       K  	  S'       g	   S! R 4       S'       d   S	P                   P                  R4       \        P                  ! 4       pVP	                  S	P
                  \        P                  4       ^ p^ pVP                  RR7      '       dP   S	P                  P                  R4      pV\        V4      ,          pV^,          pV'       d   VR8  g
   VR8  g   Kf   VP                  4        \        VR4      '       d   VP                  4        R# R#   \        P                  ! 4       pTP	                  S	P
                  \        P                  4       ^ p^ pTP                  RR7      '       dP   S	P                  P                  R4      pT\        T4      ,          pT^,          pT'       d   TR8  g
   TR8  g   Kf   TP                  4        \        TR4      '       d   TP                  4        i i ; i)	r   s   0

g{Gz?)timeouti l    d(	 i  r   N)r   r   	selectorsDefaultSelectorregisterr   
EVENT_READselectr6   r^   r\   r   hasattr)r   application_iterr   selector
total_sizetotal_readsr   r   r   r    r   r   s   &     r   execute,WSGIRequestHandler.run_wsgi.<locals>.executeC  s   "7N;#-,D$K -##J!JJ$$\2 %446!!$//93G3GH
 oodo33::??:6D#d)+J1$K  :#?;QUCU +W55$**, 6) %446!!$//93G3GH
 oodo33::??:6D#d)+J1$K  :#?;QUCU +W55$**, 6s#   D0 D0 D0 0AHA	H5HT)DebugTracebackr   zError on request:
rl   )r   r   r   rM   r   r   r   r   rg   r   ConnectionErrorsocketr   connection_dropped	Exceptionpassthrough_errorsclose_connectionr   debug.tbtoolsr   render_traceback_textr   )r    r   rQ   r   r   r   r   r   r   r   r   r   r   s   f    @@@@@@@@r   run_wsgiWSGIRequestHandler.run_wsgi   sj   <<Hb)//1779^KJJ=>!%!2!2!44w!%
48"&59$7	 7	r	 	%	- %	-N	BDKKOO$0 	0##Aw// 	B{{---&>(,% &!%J"&K+-.  6 #99;CKKOOG':3%%@AA)	BsT   ,C
 
F,%C==F,
F,(F'4F'<EF'E# F'"E##>F''F,c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   rj     s     
 
 
r   c                :  <  \         SV `  4        R#   \        \        P                  3 d   pT P                  T4        Rp?R# Rp?i\         dH   pT P                  P                  e*   \        T4      '       d   T P                  RT4        Rp?R# h Rp?ii ; i)z/Handles a request ignoring dropped connections.NzSSL error occurred: %s)superhandler   r   r   r   r   rg   r   is_ssl_error	log_error)r    rQ   	__class__s   & r   r   WSGIRequestHandler.handle  sr    	GN0 	'##A&& 	{{&&2|A7;;		s,    BABB;BBBc               $    V ^8  d   QhRRRRRR/# )r   r   BaseExceptionr   zWSGIEnvironment | Noner   r7   r   )r   s   "r   r   rj     s$      "-C	r   c                    R# )zPCalled if the connection was closed by the client.  By default
nothing happens.
Nr   )r    r   r   s   &&&r   r   %WSGIRequestHandler.connection_dropped  s    r   c                    V ^8  d   QhRRRR/# r   r   )r   s   "r   r   rj     s     & & & &r   c                	r   < VP                  R 4      '       d   V P                  # \        \        4       V4      # )do_)
startswithr   getattrr   )r    r   r  s   &&r   r!   WSGIRequestHandler.__getattr__  s-    ??5!!==  uw%%r   c                   V ^8  d   QhRR/# ri   r   )r   s   "r   r   rj     s     & & &r   c                	    \        V R R4      '       d   V P                  R,          # V P                  '       g   R# V P                  ^ ,          # )r   Nr}   r   )r  r   r   rC   s   &r   r   !WSGIRequestHandler.address_string  s@    4D))<<.."""""1%%r   c                   V ^8  d   QhRR/# rG   r   )r   s   "r   r   rj     s     & &c &r   c                	(    V P                   ^,          # )r   )r   rC   s   &r   r   WSGIRequestHandler.port_integer  s    ""1%%r   z\x02xz\\\c               $    V ^8  d   QhRRRRRR/# )r   r   z	int | strsizer   r7   r   )r   s   "r   r   rj     s!     8 8	 8y 84 8r   c                	:    \        V P                  4      pV P                   R V R V P                   2pVP                  V P                  4      p\        V4      pV^ ,          R8X  d   \        VR4      pMtVR8X  d   MlVR8X  d   \        VR4      pMXV^ ,          R8X  d   \        VR4      pM=VR8X  d   \        VR	4      pM)V^ ,          R
8X  d   \        VRR4      pM\        VRR4      pV P                  RRWAV4       R#   \         d    T P
                  p Li ; i) 1bold200304cyan3green404yellow4redmagentainfoz
"%s" %s %sN)r   r   r   r   r   requestline	translate_control_char_tabler   _ansi_styler   )r    r   r  r   r   s   &&&  r   log_requestWSGIRequestHandler.log_request  s   	#dii(D\\N!D64+?+?*@AC mmD4454y7c>c6*CU]U]c6*C!W^c7+CU]c8,C!W^c651Cc695Cs$7/  	#""C	#s   3D   DDc               $    V ^8  d   QhRRRRRR/# r   r   r   argsr   r   r7   r   )r   s   "r   r   rj     s!     ) ) )E )d )r   c                	0    V P                   ! R V.VO5!   R# )r   Nr   r    r   r/  s   &&*r   r  WSGIRequestHandler.log_error  s    &(4(r   c               $    V ^8  d   QhRRRRRR/# r.  r   )r   s   "r   r   rj     s!     ( (# (e ( (r   c                	0    V P                   ! R V.VO5!   R# )r&  Nr1  r2  s   &&*r   log_messageWSGIRequestHandler.log_message  s    '$'r   c               (    V ^8  d   QhRRRRRRRR/# r   typer   messager/  r   r   r7   r   )r   s   "r   r   rj     s(     
 
 
c 
% 
D 
r   c           	     	l    \        VV P                  4        R V P                  4        RV R2.VO5!   R# )z - - [z] 
N)r   r   log_date_time_stringr    r:  r;  r/  s   &&&*r   r   WSGIRequestHandler.log  sB    ""$%VD,E,E,G+H7)SUV	
 	
r   )r   r   r   rl   )r   r   )r#   r$   r%   r&   rc   __annotations__propertyrn   r   r   r   r   r!   r   r   r   	maketransranger)  ordr+  r  r6  r   r'   __classcell__)cr  s   0@r   re   re      s    =+ +ObQBf
 
& &&& --#EU4[#E5t3D#EF#Ear!CM	#EF &+D	"8:)(
 
O 	Gs   -B.re   c               $    V ^8  d   QhRRRRRR/# )r   r   r   stylesr   r   )r   s   "r   r   r     s!      s S S r   c                r    \         '       g   V # R ^R^R^ R^!R^#R^$/pV F  pRW#,           RV  2p K  	  V  R2# )	r  r$  r   r"  r%  r  z[mz[0m)_log_add_style)r   rI  codesstyles   &*  r   r*  r*    sb    > 	r"2E ~Qug.  WGr   c                    V ^8  d   QhRRRR/# )r   cn
str | Noner   z2tuple[Certificate, RSAPrivateKeyWithSerialization]r   )r   s   "r   r   r     s     . ..7.r   c           	     (    ^ RI Hp ^ RIHp ^ RIHp ^ RIHp ^ RIH	p T! 4       pTP                  RR	TR
7      pT f   Rp TP                  TP                  TP                  R4      TP                  TP                   T 4      .4      pT! 4       pTP#                  4       P%                  T4      P'                  T4      P)                  TP)                  4       4      P+                  TP-                  4       4      P/                  \0        P2                  ! \4        P6                  4      4      P9                  \0        P2                  ! \4        P6                  4      \;        RR7      ,           4      P=                  TP?                  TP@                  .4      RR7      P=                  TPC                  TPE                  T 4      TPE                  RT  24      .4      RR7      PG                  YsPI                  4       T4      p	Y3#   \         d    \        R4      Rhi ; i)rX   )x509)default_backend)hashes)rsa)NameOIDz<Using ad-hoc certificates requires the cryptography library.Ni  i   )public_exponentkey_sizebackend*zDummy Certificateim  )daysF)criticalz*.)%cryptographyrS  cryptography.hazmat.backendsrT  cryptography.hazmat.primitivesrU  )cryptography.hazmat.primitives.asymmetricrV  cryptography.x509.oidrW  ImportError	TypeErrorgenerate_private_keyNameNameAttributeORGANIZATION_NAMECOMMON_NAMECertificateBuildersubject_nameissuer_name
public_keyserial_numberrandom_serial_numbernot_valid_beforedtnowr   utcnot_valid_afterr   add_extensionExtendedKeyUsageOID_SERVER_AUTHSubjectAlternativeNameDNSNamesignSHA256)
rP  rS  rT  rU  rV  rW  rZ  pkeysubjectcerts
   &         r   generate_adhoc_ssl_pairr    s   	%@9A1 G##g $ D
 
ziiw88:MNw22B7	
G G!	g		W		DOO%	&	t002	3		"&&.	/	-	s0CC	D	t,,d.B.B-CDu	U	''b)94<<"RD	;R(ST 
 

 
dMMOW	- 	 :K  J
	s   G9 9Hc               (    V ^8  d   QhRRRRRRRR/# )r   	base_pathr   hostrQ  rP  r   ztuple[str, str]r   )r   s   "r   r   r      s,     )  ) ) $) 1;) ) r   c           
     .   Ve   Tp\        VR7      w  r4^ RIHp V  R2pV  R2p\        VR4      ;_uu_ 4       pVP	                  VP                  VP                  P                  4      4       RRR4       \        VR4      ;_uu_ 4       pVP	                  VP                  VP                  P                  VP                  P                  VP                  4       R7      4       RRR4       Wg3#   + '       g   i     L; i  + '       g   i     Yg3# ; i)a  Creates an SSL key for development.  This should be used instead of
the ``'adhoc'`` key which generates a new cert on each server start.
It accepts a path for where it should store the key and cert and
either a host or CN.  If a host is given it will use the CN
``*.host/CN=host``.

For more information see :func:`run_simple`.

.. versionadded:: 0.9

:param base_path: the path to the certificate and key.  The extension
                  ``.crt`` is added for the certificate, ``.key`` is
                  added for the key.
:param host: the name of the host.  This can be used as an alternative
             for the `cn`.
:param cn: the `CN` to use.
N)rP  serializationz.crtz.keywbencodingr   encryption_algorithm)r  r`  r  openr   public_bytesEncodingPEMprivate_bytesPrivateFormatTraditionalOpenSSLNoEncryption)	r  r  rP  r~  r|  r  	cert_file	pkey_filefs	   &&&      r   make_ssl_devcertr     s    * (B/JD<+T"I+T"I	i		!	!!-"8"8"<"<=> 
	i		!	&//33$22EE%2%?%?%A  	
 
  
			 s   5C/
AD/C?	D	c                   V ^8  d   QhRR/# )r   r   r-   r   )r   s   "r   r   r   L  s      N r   c            	        ^ RI p ^ RIp\        4       w  r#^ RIHp VP                  4       w  rVVP                  4       w  rxV P                  \        P                  V4       V P                  \        P                  V4       \        P                  ! WRP                  VP                  P                  4      4       \        P                  ! VVP                  VP                  P                  VP                  P                  VP!                  4       R7      4       \        P"                  ! V4       \        P"                  ! V4       \%        Wh4      p	V	# )z:Generates an adhoc SSL context for the development server.Nr  r  )atexittempfiler  r`  r  mkstempr   osremover   r  r  r  r  r  r  r  r   load_ssl_context)
r  r  r~  r|  r  cert_handler  pkey_handler  ctxs
             r   generate_adhoc_ssl_contextr  L  s    (*JD<%--/K%--/K
OOBIIy)
OOBIIy)HH[++M,B,B,F,FGHHH"++// ..AA!.!;!;!= 	 	
 HH[HH[
9
0CJr   c               (    V ^8  d   QhRRRRRRRR/# )	r   r  r   r  rQ  protocol
int | Noner   r-   r   )r   s   "r   r   r   j  s,      )<Fr   c                |    Vf   \         P                  p\         P                  ! V4      pVP                  W4       V# )a  Loads SSL context from cert/private key files and optional protocol.
Many parameters are directly taken from the API of
:py:class:`ssl.SSLContext`.

:param cert_file: Path of the certificate to use.
:param pkey_file: Path of the private key to use. If not given, the key
                  will be obtained from the certificate file.
:param protocol: A ``PROTOCOL`` constant from the :mod:`ssl` module.
    Defaults to :data:`ssl.PROTOCOL_TLS_SERVER`.
)r   PROTOCOL_TLS_SERVER
SSLContextload_cert_chain)r  r  r  r  s   &&& r   r  r  j  s6     **
..
"C	-Jr   c                    V ^8  d   QhRRRR/# )r   r   zException | Noner   rA   r   )r   s   "r   r   r     s     + +( +D +r   c                    V f6   \         P                  ! \        \        P                  ! 4       ^,          4      p \        V \        P                  4      # )z?Checks if the given error (or the current one) is an SSL error.)tcastr   r   r   r   r   SSLError)r   s   &r   r   r     s3    }y#,,."34eS\\**r   c               $    V ^8  d   QhRRRRRR/# )r   r  r   portrH   r   socket.AddressFamilyr   )r   s   "r   r   r     s"       3 3G r   c                    V P                  R4      '       d   \        P                  # RV 9   d'   \        \        R4      '       d   \        P                  # \        P
                  # )zQReturn ``AF_INET4``, ``AF_INET6``, or ``AF_UNIX`` depending on
the host and port.zunix://:AF_INET6)r  r   AF_UNIXr   r  AF_INET)r  r  s   &&r   select_address_familyr    sD     y!!~~	44>>r   c               (    V ^8  d   QhRRRRRRRR/# )	r   r  r   r  rH   familyr  r   tuple[str, int] | strr   )r   s   "r   r   r     s,      
"6r   c                J   V\         8X  d6   \        P                  P                  V P	                  R4      ^,          4      #  \
        P                  ! WV\
        P                  \
        P                  4      pT^ ,          ^,          #   \
        P                   d    Y3u # i ; i)zRReturn a fully qualified socket address that can be passed to
:func:`socket.bind`.://)
af_unixr  r   abspath	partitionr   getaddrinfoSOCK_STREAMIPPROTO_TCPgaierror)r  r  r  ress   &&& r   get_sockaddrr    s    
 wwt~~e4Q788   2 2F4F4F

 q6!9 ?? zs   5B B"!B"c                    V ^8  d   QhRRRR/# )r   r  r  r   r   r   )r   s   "r   r   r     s     " "1 "c "r   c                   V \         P                  8X  d   RMRp\         P                   ! V \         P                  4      ;_uu_ 4       p VP                  VR34       TP                  4       ^ ,          uuRRR4       #   \         d'    T \         P                  8X  d   RMRu uuRRR4       # i ; i  + '       g   i     R# ; i)z|Get the IP address of an external interface. Used when binding to
0.0.0.0 or ::1 to show a more useful URL.

:meta private:
zfd31:f903:5ab5:1::1z10.253.155.219i2  z::1	127.0.0.1N)r   r  
SOCK_DGRAMconnectrO   getsockname)r  r  ss   &  r   get_interface_ipr    s     %+foo$= CSD	vv00	1	1Q	GIItUm$ }}q! 
2	1  	G"foo55;F	 
2	1	G 
2	1	1s0   B1	A=B1=$B.!B1-B..B11C	c                     a  ] tR tRtRtRtRt]tRt	RR V 3R lllt
R R ltRR	 V 3R
 llltR V 3R lltR R ltRtV ;t# )rf   i  zmA WSGI server that that handles one request at a time.

Use :func:`make_server` to create a server instance.
FTc               8    V ^8  d   QhRRRRRRRRR	R
RRRRRR/# )r   r  r   r  rH   r   r/   handlertype[WSGIRequestHandler] | Noner   rA   r   _TSSLContextArg | Nonefdr  r   r7   r   )r   s   "r   r   BaseWSGIServer.__annotate__  sn     eT eTeT eT 	eT
 1eT !eT ,eT eT 
eTr   c                	D  < Vf   \         pR\        V4      9  d,   V P                  '       g   V P                  '       d   RVn        Wn        W n        W0n        WPn        \        W4      ;V n
        p\        V\        V4      V4      p	V\        8X  d[   VfW   \        P                  ! \         V	4      p	\"        P$                  P'                  V	4      '       d   \"        P(                  ! V	4       \*        SV `Y  V	VRR7       Vf#    V P/                  4        V P1                  4        MYV P5                  4        \H        PJ                  ! Wx\H        PL                  4      V n$        V PH                  PO                  4       V n(        V\        8w  d   V PP                  ^,          V n        Ve[   \S        V\T        4      '       d   \W        V!  pMVR8X  d   \Y        4       pVP[                  V PH                  RR7      V n$        W`n.        MR V n.        ^ R I/pRVP`                  Pc                  R4       2V n2        R #   \2         d   p
T P5                  4        \7        T
P8                  \:        P<                  R7       T
P>                  \>        P@                  8X  dW   \7        RT R2\:        P<                  R7       \:        PB                  R8X  d#   TR	8X  d   \7        R
\:        P<                  R7       \:        PD                  ! ^4        R p
?
ELR p
?
i\F         d    T P5                  4        h i ; i)Nr   r   F)bind_and_activate)filezPort zp is in use by another program. Either identify and stop that program, or start the server with a different port.darwini  zoOn macOS, try disabling the 'AirPlay Receiver' service from System Preferences -> General -> AirDrop & Handoff.r.   T)server_sidez	Werkzeug/werkzeug)3re   varsr   r   r   r  r  r   r   r  address_familyr  rH   r  r  r  r   r  r   existsunlinkr   r=   server_bindserver_activaterO   server_closeprintstrerrorr   r   errno
EADDRINUSEplatformexitr  r   fromfdr  r  r   r   tupler  r  wrap_socketr   importlib.metadatametadataversionrm   )r    r  r  r   r  r   r   r  r  r   rQ   	importlibr  s   &&&&&&&&    r   r=   BaseWSGIServer.__init__  sz    ?(G
 T']2 1 1 1'1G$		"4/DT/PPn%dCI~F W$VVC8Nww~~n--		.) 	# 	 	
 :  "$$&:  !--F<N<NODK"&++"9"9";DW$++A.DI"+u--.<'8:%11$++41PDK6A#D!!*9+=+=+E+Ej+Q*RSg   !!#ajjszz277e...v &! ! !ZZ	 ||x/DDLX!$   !!#s    H. .L9C K??LLc               (    V ^8  d   QhRRRRRRRR/# r9  r   )r   s   "r   r   r  %  s(     # # #c #% #D #r   c                	     \        W.VO5!   R # rl   r
   r?  s   &&&*r   r   BaseWSGIServer.log%  s    T"T"r   c                    V ^8  d   QhRRRR/# )r   poll_intervalfloatr   r7   r   )r   s   "r   r   r  (  s        5  4  r   c                	   <  \         SV `  VR 7       V P                  4        R#   \         d     Li ; i  T P                  4        i ; i))r  N)r   serve_foreverKeyboardInterruptr  )r    r  r  s   &&r   r  BaseWSGIServer.serve_forever(  sI    	 G!!>  ! 		 s   % 36 36 Ac               $    V ^8  d   QhRRRRRR/# )r   requestr   r   r  r   r7   r   )r   s   "r   r   r  0  s$     = ==.C=	=r   c                	H   < V P                   '       d   h \        SV `	  W4      # rl   )r   r   handle_error)r    r  r   r  s   &&&r   r  BaseWSGIServer.handle_error0  s$     """w#G<<r   c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r  8  s      *  *T  *r   c                   Rp\        VRR4      pV.pV P                  \        8X  d    VP                  RV P                   24       MV P
                  f   RMRpV P                  pV P                  R9   d   VP                  R	V P                   R
24       V P                  R8X  d   Rp\        \        P                  4      pMRp\        \        P                  4      pVP                  RV RV RV P                   24       RV9   d   RV R2pVP                  RV RV RV P                   24       \        RRP                  V4      4       R# )z<Show information about the address when starting the server.zvWARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.r  r$  z * Running on Nrr   rs   0.0.0.0z * Running on all addresses ()r  z[::1]r  r  []r&  r=  >   ::r   )r*  r  r  appendr  r   r  r   r  r  r  r   join)r    dev_warningmessagesr   display_hostname	localhosts   &     r   log_startupBaseWSGIServer.log_startup8  s5   A 	 "+vu==')OOnTYYK89#//7VWF#yyyy--"?		{! LM99	) +I'7'G$ 'I'7'H$.I;a		{ ST&&%&'7&8#: OOnVHC8H7I499+VWVTYYx()r   )	rm   r  r   r  r   r  r   r   r   )NFNN)g      ?)r#   r$   r%   r&   rc   r   r   LISTEN_QUEUErequest_queue_sizeallow_reuse_addressr=   r   r  r  r  r'   rF  r  s   @r   rf   rf     sR    
 KL%eT eTN#   = = *  *r   rf   c                  "    ] tR tRtRtRtRtRtR# )ThreadedWSGIServeri[  zzA WSGI server that handles concurrent requests in separate
threads.

Use :func:`make_server` to create a server instance.
Tr   N)r#   r$   r%   r&   rc   r   daemon_threadsr'   r   r   r   r  r  [  s     KNr   r  c                  :   a  ] tR tRtRtRtRR V 3R llltRtV ;t# )ForkingWSGIServerif  zA WSGI server that handles concurrent requests in separate forked
processes.

Use :func:`make_server` to create a server instance.
Tc               <    V ^8  d   QhRRRRRRRRRR	R
RRRRRRR/	# )r   r  r   r  rH   r   r/   	processesr  r  r   rA   r   r  r  r  r   r7   r   )r   s   "r   r   ForkingWSGIServer.__annotate__o  sd     & && & 	&
 & 1& !& ,& & 
&r   c	           	     	f   < \         '       g   \        R 4      h\        S	V `  WW5WgV4       W@n        R# )z'Your platform does not support forking.N)can_forkrN   r   r=   max_children)
r    r  r  r   r  r  r   r   r  r  s
   &&&&&&&&&r   r=   ForkingWSGIServer.__init__o  s1     xFGGS3ETVW%r   )r  )(   NFNN)	r#   r$   r%   r&   rc   r   r=   r'   rF  r  s   @r   r  r  f  s     L& & &r   r  c               @    V ^8  d   QhRRRRRRRRR	RR
RRRRRRRRR/
# )r   r  r   r  rH   r   r/   threadedrA   r  request_handlerr  r   r   r  r  r  r   rf   r   )r   s   "r   r   r     sl     * *
*
* 
* 	*
 * 5* * (* 	* *r   c	                    V'       d   V^8  d   \        R4      hV'       d   \        WW%WgVR7      # V^8  d   \        V VVVVVVVR7      # \        WW%WgVR7      # )a  Create an appropriate WSGI server instance based on the value of
``threaded`` and ``processes``.

This is called from :func:`run_simple`, but can be used separately
to have access to the server object, such as to run it in a separate
thread.

See :func:`run_simple` for parameter docs.
z4Cannot have a multi-thread and multi-process server.r  )rN   r  r  rf   )	r  r  r   r  r  r   r   r   r  s	   &&&&&&&&&r   make_serverr#    s{    ( IMOPP!.@RT
 	
 1} 	
 		
 C*<b r   c                   V ^8  d   QhRR/# r@   r   )r   s   "r   r   r     s     9 9$ 9r   c                 F    \         P                  P                  R4      R8H  # )zeCheck if the server is running as a subprocess within the
Werkzeug reloader.

.. versionadded:: 0.10
WERKZEUG_RUN_MAINtrue)r  r   r   r   r   r   is_running_from_reloaderr(    s     ::>>-.&88r   c          "     \    V ^8  d   Qh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RRRRRRR/# )r   hostnamer   r  rH   applicationr/   use_reloaderrA   use_debugger
use_evalexextra_fileszt.Iterable[str] | Noneexclude_patternsreloader_intervalreloader_typer  r  r   r  static_filesz'dict[str, str | tuple[str, str]] | Noner   r   r  r   r7   r   )r   s   "r   r   r     s     e ee
e !e 	e
 e e (e -e e e e e 5e :e e  (!e" 
#er   c                   \        V\        4      '       g   \        R4      hV'       d   ^RIHp V! W-4      pV'       d+   ^RIHp V! W%R7      pVP                  P                  V 4       \        4       '       g   RpM \        \        P                  R,          4      p\        V VVV
VVVVVR7	      pVP                  P                  R4       \        VP!                  4       4      \        P                  R&   \        4       '       g'   VP#                  4        \%        R	\'        R
R4      4       V'       d1   ^RIHp  V! VP,                  VVVV	R7       VP/                  4        R# VP-                  4        R#   TP/                  4        i ; i)a  Start a development server for a WSGI application. Various
optional features can be enabled.

.. warning::

    Do not use the development server when deploying to production.
    It is intended for use only during local development. It is not
    designed to be particularly efficient, stable, or secure.

:param hostname: The host to bind to, for example ``'localhost'``.
    Can be a domain, IPv4 or IPv6 address, or file path starting
    with ``unix://`` for a Unix socket.
:param port: The port to bind to, for example ``8080``. Using ``0``
    tells the OS to pick a random free port.
:param application: The WSGI application to run.
:param use_reloader: Use a reloader process to restart the server
    process when files are changed.
:param use_debugger: Use Werkzeug's debugger, which will show
    formatted tracebacks on unhandled exceptions.
:param use_evalex: Make the debugger interactive. A Python terminal
    can be opened for any frame in the traceback. Some protection is
    provided by requiring a PIN, but this should never be enabled
    on a publicly visible server.
:param extra_files: The reloader will watch these files for changes
    in addition to Python modules. For example, watch a
    configuration file.
:param exclude_patterns: The reloader will ignore changes to any
    files matching these :mod:`fnmatch` patterns. For example,
    ignore cache files.
:param reloader_interval: How often the reloader tries to check for
    changes.
:param reloader_type: The reloader to use. The ``'stat'`` reloader
    is built in, but may require significant CPU to watch files. The
    ``'watchdog'`` reloader is much more efficient but requires
    installing the ``watchdog`` package first.
:param threaded: Handle concurrent requests using threads. Cannot be
    used with ``processes``.
:param processes: Handle concurrent requests using up to this number
    of processes. Cannot be used with ``threaded``.
:param request_handler: Use a different
    :class:`~BaseHTTPServer.BaseHTTPRequestHandler` subclass to
    handle requests.
:param static_files: A dict mapping URL prefixes to directories to
    serve static files from using
    :class:`~werkzeug.middleware.SharedDataMiddleware`.
:param passthrough_errors: Don't catch unhandled exceptions at the
    server level, let the server crash instead. If ``use_debugger``
    is enabled, the debugger will still catch such errors.
:param ssl_context: Configure TLS to serve over HTTPS. Can be an
    :class:`ssl.SSLContext` object, a ``(cert_file, key_file)``
    tuple to create a typical context, or the string ``'adhoc'`` to
    generate a temporary self-signed certificate.

.. versionchanged:: 2.1
    Instructions are shown for dealing with an "address already in
    use" error.

.. versionchanged:: 2.1
    Running on ``0.0.0.0`` or ``::`` shows the loopback IP in
    addition to a real IP.

.. versionchanged:: 2.1
    The command-line interface was removed.

.. versionchanged:: 2.0
    Running on ``0.0.0.0`` or ``::`` shows a real IP address that
    was bound as well as a warning not to run the development server
    in production.

.. versionchanged:: 2.0
    The ``exclude_patterns`` parameter was added.

.. versionchanged:: 0.15
    Bind to a Unix socket by passing a ``hostname`` that starts with
    ``unix://``.

.. versionchanged:: 0.10
    Improved the reloader and added support for changing the backend
    through the ``reloader_type`` parameter.

.. versionchanged:: 0.9
    A command-line interface was added.

.. versionchanged:: 0.8
    ``ssl_context`` can be a tuple of paths to the certificate and
    private key files.

.. versionchanged:: 0.6
    The ``ssl_context`` parameter was added.

.. versionchanged:: 0.5
   The ``static_files`` and ``passthrough_errors`` parameters were
   added.
zport must be an integer)SharedDataMiddleware)DebuggedApplication)evalexNWERKZEUG_SERVER_FDr"  Tr&  zPress CTRL+C to quitr"  )run_with_reloader)r/  r0  intervalr2  )r   rH   rd  middleware.shared_datar5  debugr6  trusted_hostsr  r(  r  r   r#  r   set_inheritabler   filenor  r   r*  	_reloaderr9  r  r  )r*  r  r+  r,  r-  r.  r/  r0  r1  r2  r  r  r   r3  r   r   r5  r6  r  srvr9  s   &&&&&&&&&&&&&&&&     r   
run_simplerB    s@   ` dC  122@*;E.)+I 	!!((2#%%012

C JJt$'*3::<'8BJJ#$#%%V[!7BC0		!!'!1*+  s   ;E6 6Frl   )NN)Fr   NFNN)FFTNNr   autoFr   NNFN)Krc   
__future__r   r  ior  r   r   socketserverr   typingr  r   rq  r   r   http.serverr   r   urllib.parser   r	   	_internalr   r   
exceptionsr   urlsr   r   rc  r   rL  r   
__import__r   r  r,   r  r  r   r  OptionalUnionTupler   Literal_TSSLContextArgTYPE_CHECKING_typeshed.wsgir/   r0   -cryptography.hazmat.primitives.asymmetric.rsar1   cryptography.x509r2   	RawIOBaser4   re   r*  r  r  r  r  r   r  r  r  rf   ThreadingMixInr  r  r#  r(  rB  r   r   r   <module>rY     s   #  	 	    
  #   . "   !  + +  77d?: 2v,,L nnG **GGaggc1::c?&:;QYYw=OOP ???.. .;R\\ ;|B
/ B
J
&.b) X<*+""$e*Z e*P44n &n &6*Z9e e_  	  +C	     Gs6   ,G, H 5H ,HH	HH	H('H(