
    8Cf                        U d Z ddlZddlmZ ddlmZ ddlmZ i dddd	d
dddddddddddddddddddddd d!d"d#d$d%d&d'i d(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIi dJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdu	Zee	e
f   edv<    eg dw      Z eg dx      Zdy Zdz Zd{ Zdd|Zd}efd~Z G d d      Z e       Zy)z Defines basics of HTTP standard.    N)import_module)ismodule)Dictd   s   Continuee   s   Switching Protocolsf   s
   Processingg   s   Early Hints   s   OK   s   Created   s   Accepted   s   Non-Authoritative Information   s
   No Content   s   Reset Content   s   Partial Content   s   Multi-Status   s   Already Reported   s   IM Usedi,  s   Multiple Choicesi-  s   Moved Permanentlyi.  s   Foundi/  s	   See Other0  s   Not Modifiedi1  s	   Use Proxyi3  s   Temporary Redirecti4  s   Permanent Redirecti  s   Bad Requesti  s   Unauthorizedi  s   Payment Requiredi  s	   Forbiddeni  s	   Not Foundi  s   Method Not Allowedi  s   Not Acceptablei  s   Proxy Authentication Requiredi  s   Request Timeouti  s   Conflicti  s   Gonei  s   Length Requiredi  s   Precondition Failedi  s   Request Entity Too Largei  s   Request-URI Too Longi  s   Unsupported Media Typei  s   Requested Range Not Satisfiablei  s   Expectation Failedi  s   I'm a teapoti  s   Unprocessable Entityi  s   Lockedi  s   Failed Dependencyi  s   Upgrade Requiredi  s   Precondition Requiredi  s   Too Many Requestsi  s   Request Header Fields Too Largei  s   Unavailable For Legal Reasonsi  s   Internal Server Errori  s   Not Implementeds   Bad Gateways   Service Unavailables   Gateway Timeouts   HTTP Version Not Supporteds   Variant Also Negotiatess   Insufficient Storages   Loop Detecteds   Not Extendeds   Network Authentication Required)	i  i  i  i  i  i  i  i  i  STATUS_CODES)allowzcontent-encodingzcontent-languagezcontent-lengthzcontent-locationzcontent-md5zcontent-rangezcontent-typeexpireszlast-modifiedzextension-header)
connectionz
keep-alivezproxy-authenticatezproxy-authorizationtetrailersztransfer-encodingupgradec                 0    | dvxr d| cxk  xr dk  nc  S )z
    According to the following RFC message body and length SHOULD NOT
    be included in responses status 1XX, 204 and 304.
    https://tools.ietf.org/html/rfc2616#section-4.4
    https://tools.ietf.org/html/rfc2616#section-4.3
    )r   r   r   r
    )statuss    M/var/www/highfloat_scraper/venv/lib/python3.12/site-packages/sanic/helpers.pyhas_message_bodyr    i   s!     #ASF-@S-@(AA    c                 .    | j                         t        v S )z.Checks if the given header is an Entity Header)lower_ENTITY_HEADERSheaders    r   is_entity_headerr'   s   s    <<>_,,r!   c                 .    | j                         t        v S )z1Checks if the given header is a Hop By Hop header)r#   _HOP_BY_HOP_HEADERSr%   s    r   is_hop_by_hop_headerr*   x   s    <<>000r!   c                     | j                  dd      \  }}t        ||      }t        ||      }t        |      r|S  |       S )z
    import a module or class by string path.

    :module_name: str with path of module or path to import and
    instantiate a class
    :returns: a module object or one instance from class if
    module_name is a valid path to class

    .   )package)rsplitr   getattrr   )module_namer.   moduleklassobjs        r   import_stringr5   }   sE      &&sA.MFE673F
&%
 C}
5Lr!   returnc                  t    t        t        j                  xr t        j                  j                               S N)boolsysstdoutisattyr   r!   r   is_attyr=      s#    

2szz00233r!   c                   "    e Zd ZdZd ZdefdZy)Defaultz
    It is used to replace `None` or `object()` as a sentinel
    that represents a default value. Sometimes we want to set
    a value to `None` so we cannot use `None` to represent the
    default value, and `object()` is hard to be typed.
    c                      y)Nz	<Default>r   selfs    r   __repr__zDefault.__repr__   s    r!   r6   c                 "    | j                         S r8   )rC   rA   s    r   __str__zDefault.__str__   s    }}r!   N)__name__
__module____qualname____doc__rC   strrE   r   r!   r   r?   r?      s     r!   r?   r8   )rI   r:   	importlibr   inspectr   typingr   r   intbytes__annotations__	frozensetr$   r)   r    r'   r*   r5   r9   r=   r?   _defaultr   r!   r   <module>rS      sM   & 
 #  ="="	=" =" 	="
 =" =" =" 	)=" =" 	=" 	=" =" 	=" =" 	="  	!="" #="$ %="& '="( )="* 	+=", 	-=". /="0 1="2 	3="4 5="6 7="8 	9=": 	;="< 	)=="> 	?="@ A="B C="D 	E="F 	G="H 	$I="J 	 K="L 	"M="N 	+O="P 	Q="R S="T 	 U="V W="X 	Y="Z 	[="\ 	!]="^ 	_="` 	+a="b 	)c="d 	!e="f 	g="h 
			&	#	 			+y="d3: =@ "  	 B-
1
$4 4  9r!   