Ë
    [üàgE  ã                   óø   — d dl Z d dlmZmZmZmZ ddlmZmZ ddl	m
Z
mZ ddlmZ ddlmZ ddlmZ d	Zerdd
lmZ  ed«      Zdededeeef   fd„Zdedefd„Zdddedœdedededee
   def
d„Zdddefd„Zy)é    N)ÚTYPE_CHECKINGÚTupleÚTypeÚTypeVaré   )ÚHandlerÚ
Middleware)ÚHTTPMoveÚHTTPPermanentRedirect)ÚRequest)ÚStreamResponse)ÚSystemRoute)Ú
middlewareÚnormalize_path_middleware)ÚApplicationÚ_FuncÚrequestÚpathÚreturnc              ƒ   óÂ   K  — | j                  |¬«      }| j                  j                  j                  |«      ƒ d {  –—† }||_        |j
                  €d|fS d| fS 7 Œ­w)N)Úrel_urlTF)ÚcloneÚappÚrouterÚresolveÚ_match_infoÚhttp_exception)r   r   Úalt_requestÚ
match_infos       úU/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/aiohttp/web_middlewares.pyÚ_check_request_resolvesr!      sa   è ø€ Ø—-‘-¨�-Ó-€Kà—{‘{×)Ñ)×1Ñ1°+Ó>×>€JØ(€KÔà× Ñ Ð(Ø�[Ð Ð à�'ˆ>Ðð ?ús   ‚;A½A¾ AÚfc                 ó   — d| _         | S )Nr   )Ú__middleware_version__)r"   s    r    r   r   !   s   € Ø €AÔØ€Hó    TF)Úappend_slashÚremove_slashÚmerge_slashesÚredirect_classr&   r'   r(   r)   c                 óv   ‡ ‡‡‡— ‰ xr ‰ }|sJ d«       ‚t         dt        dt        dt        fˆ ˆˆˆfd„«       }|S )a€  Factory for producing a middleware that normalizes the path of a request.

    Normalizing means:
        - Add or remove a trailing slash to the path.
        - Double slashes are replaced by one.

    The middleware returns as soon as it finds a path that resolves
    correctly. The order if both merge and append/remove are enabled is
        1) merge slashes
        2) append/remove slash
        3) both merge slashes and append/remove slash.
    If the path resolves with at least one of those conditions, it will
    redirect to the new path.

    Only one of `append_slash` and `remove_slash` can be enabled. If both
    are `True` the factory will raise an assertion error

    If `append_slash` is `True` the middleware will append a slash when
    needed. If a resource is defined with trailing slash and the request
    comes without it, it will append it automatically.

    If `remove_slash` is `True`, `append_slash` must be `False`. When enabled
    the middleware will remove trailing slashes and redirect if the resource
    is defined

    If merge_slashes is True, merge multiple consecutive slashes in the
    path into one.
    z#Cannot both remove and append slashr   Úhandlerr   c              “   óh  •K  — t        | j                  j                  t        «      �rug }d| j                  v r%| j                  j                  dd«      \  }}d|z   }nd}| j                  }‰r&|j                  t        j                  dd|«      «       ‰r/| j                  j                  d«      s|j                  |dz   «       ‰
r/| j                  j                  d«      r|j                  |d d «       ‰r+‰r)|j                  t        j                  dd|dz   «      «       ‰r-‰
r+t        j                  dd|«      }|j                  |d d «       |D ]G  }t        j                  dd|«      }t        | |«      ƒ d {  –—† \  }} |sŒ4 ‰	| j                  |z   «      ‚  || «      ƒ d {  –—† S 7 Œ07 Œ­w)Nú?r   Ú z//+ú/éÿÿÿÿz^//+)Ú
isinstancer   Úrouter   Úraw_pathÚsplitÚappendÚreÚsubr   Úendswithr!   )r   r+   Úpaths_to_checkr   ÚqueryÚmerged_slashesÚresolvesr&   r(   r)   r'   s          €€€€r    Úimplz'normalize_path_middleware.<locals>.implL   s�  øè ø€ ä�g×(Ñ(×.Ñ.´Õ<ØˆNØ�g×&Ñ&Ñ&Ø%×.Ñ.×4Ñ4°S¸!Ó<‘��eØ˜e™‘à�Ø×'Ñ'�áØ×%Ñ%¤b§f¡f¨U°C¸Ó&>Ô?Ù G§L¡L×$9Ñ$9¸#Ô$>Ø×%Ñ% d¨S¡jÔ1Ù §¡× 5Ñ 5°cÔ :Ø×%Ñ% d¨3¨B iÔ0Ù¡Ø×%Ñ%¤b§f¡f¨U°C¸À¹Ó&DÔEÙ¡Ü!#§¡¨¨s°DÓ!9�Ø×%Ñ% n°S°bÐ&9Ô:à&ò C�Ü—v‘v˜f c¨4Ó0�Ü*AÀ'È4Ó*P×$PÑ!�˜'ÚÙ(¨×)9Ñ)9¸EÑ)AÓBÐBð	Cñ ˜WÓ%×%Ð%ð	 %Qøð &ús*   ƒE:F2Å=F.Å>	F2Æ!F2Æ)F0Æ*F2Æ0F2©r   r   r   r   )r&   r'   r(   r)   Úcorrect_configurationr=   s   ````  r    r   r   &   sQ   û€ ðF ".Ò!>°,Ð?ÐÙ ÐGÐ"GÓGÐ äð&œGð &¬gð &¼.÷ &ó ð&ð< €Kr%   r   r   c                 óJ   ‡ — t         dt        dt        dt        fˆ fd„«       }|S )Nr   r+   r   c              “   ó–   •K  — | j                   }|j                  }‰|_        	  || «      ƒ d {  –—† ||_        S 7 Œ# ||_        w xY w­w)N)r   Úcurrent_app)r   r+   r   Úprevr   s       €r    r=   z&_fix_request_current_app.<locals>.implo   sK   øè ø€ à×'Ñ'ˆ
Ø×%Ñ%ˆØ!$ˆ
Ôð	*Ù  Ó)×)à%)ˆJÕ"ð *ùà%)ˆJÕ"üs%   ƒ A	¤= ¯;°= ³A	»= ½	AÁA	r>   )r   r=   s   ` r    Ú_fix_request_current_apprD   n   s1   ø€ Üð*œGð *¬gð *¼.ô *ó ð*ð €Kr%   )r6   Útypingr   r   r   r   Útypedefsr   r	   Úweb_exceptionsr
   r   Úweb_requestr   Úweb_responser   Úweb_urldispatcherr   Ú__all__Úweb_appr   r   ÚstrÚboolr!   r   r   rD   © r%   r    ú<module>rP      sÍ   ðÛ 	ß 6Ó 6ç )ß ;Ý  Ý (Ý *ð€ñ
 Ý$á�Ó€ð	¨7ð 	¸#ð 	À%ÈÈgÈÑBVó 	ð�%ð ˜Eó ð ØØØ%:òEàðEð ðEð ð	Eð
 ˜‘NðEð óEðP -ð °Jô r%   