+
    TŎiE                         ^ RI t ^ RIHtHtHtHt ^RIHtHt ^RI	H
t
Ht ^RIHt ^RIHt ^RIHt Rt]'       d   ^RIHt ]! R	4      tR
 R ltR R ltRRRRRRR]/R R lltR R ltR# )    N)TYPE_CHECKINGTupleTypeTypeVar)Handler
Middleware)HTTPMoveHTTPPermanentRedirect)Request)StreamResponse)SystemRoute)Application_Funcc                ^    V ^8  d   QhR\         R\        R\        \        \         3,          /# )   requestpathreturn)r   strr   bool)formats   "f/Users/ahmad/.openclaw/workspace/scripts/.venv/lib/python3.14/site-packages/aiohttp/web_middlewares.py__annotate__r      s*     	 	7 	# 	%gBV 	    c                    "   V P                  VR 7      pV P                  P                  P                  V4      G Rj  xL
 pW2n        VP
                  f   RV3# RV 3#  L 5i))rel_urlNTF)cloneapprouterresolve_match_infohttp_exception)r   r   alt_request
match_infos   &&  r   _check_request_resolvesr%      s^     ----K{{))11+>>J(  ([  '> ?s   ;A A!A c                0    V ^8  d   QhR\         R\         /# )r   fr   )r   )r   s   "r   r   r   !   s      % E r   c                     ^V n         V # )   )__middleware_version__)r'   s   &r   
middlewarer+   !   s     AHr   append_slashTremove_slashFmerge_slashesredirect_classc          
      j    V ^8  d   QhR\         R\         R\         R\        \        ,          R\        /# )r   r,   r-   r.   r/   r   )r   r   r	   r   )r   s   "r   r   r   &   sG     E EE E 	E
 NE Er   c                x   a aaa S ;'       d    S'       * pV'       g   Q R4       h\         R V VVV3R ll4       pV# )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 slashc                <    V ^8  d   QhR\         R\        R\        /# r   r   handlerr   r   r   r   )r   s   "r   r   /normalize_path_middleware.<locals>.__annotate__M   s!     & &G &g &. &r   c                   <"   \        V P                  P                  \        4      '       Ed   . pR V P                  9   d)   V P                  P                  R ^4      w  r4R V,           pMRpV P                  pS'       d(   VP                  \        P                  ! RRV4      4       S'       d:   V P                  P                  R4      '       g   VP                  VR,           4       S
'       d6   V P                  P                  R4      '       d   VP                  VRR 4       S'       d7   S'       d/   VP                  \        P                  ! RRVR,           4      4       S'       d5   S
'       d-   \        P                  ! RRV4      pVP                  VRR 4       V FQ  p\        P                  ! RRV4      p\        W4      G Rj  xL
 w  r`V'       g   K:  S	! V P                  V,           4      h	  V! V 4      G Rj  xL
 #  L; L5i)? z//+/Nz^//+)
isinstancer$   router   raw_pathsplitappendresubr   endswithr%   )r   r4   paths_to_checkr   querymerged_slashesresolvesr,   r.   r/   r-   s   &&     r   impl'normalize_path_middleware.<locals>.implL   s    g((..<<Ng&&&%..44S!<e''%%bffUC&>?GLL$9$9#$>$>%%dSj1 5 5c : :%%d3Bi0%%bffUC&DE!#sD!9%%nSb&9:&vvfc40*A'*P$P!8()9)9E)ABB	 ' W%%%	 %Q &sa   A<H
 .H
/ H
H
0 H
H
-H
55H
+H
3AH

HH
&H
HH
H
r+   )r,   r-   r.   r/   correct_configurationrH   s   dddd  r   normalize_path_middlewarerL   &   sD    F ".!>!>,? G"GG & & &< Kr   c                (    V ^8  d   QhRRR\         /# )r   r   r   r   )r   )r   s   "r   r   r   n   s      - J r   c                 ,   a  \         R  V 3R ll4       pV# )c                <    V ^8  d   QhR\         R\        R\        /# r3   r5   )r   s   "r   r   ._fix_request_current_app.<locals>.__annotate__p   s!     * *G *g *. *r   c                    <"   V P                   pVP                  pSVn         V! V 4      G R j  xL
 W2n        #  L
  Y2n        i ; i5i)N)r$   current_app)r   r4   r$   prevr   s   &&  r   rH   &_fix_request_current_app.<locals>.implo   sF     ''
%%!$
	* ))%)" *%)"s%    A< :< A< AArJ   )r   rH   s   f r   _fix_request_current_apprU   n   s    * * Kr   )r+   rL   )rA   typingr   r   r   r   typedefsr   r   web_exceptionsr	   r
   web_requestr   web_responser   web_urldispatcherr   __all__web_appr   r   r%   r+   rL   rU    r   r   <module>r_      sv    	 6 6 ) ;   ( *
 $	
EE E 	E
 &;EPr   