+
    ^eòj4  ã                  ó”  a € 0 t $ ^ RIHt ^ RIt^ RIHtHtHtHtH	t	H
t
 ^ RIHt ^RIHt ]'       d	   ^RIHtHt . ROt]].R3,          tR]R&    ]].]
R,          3,          tR]R	&     ! R R4      t]]].R3,          tR]R
&   ]]].]
R,          3,          tR]R&   ]]]]3,          tR]R&   R R ltR R ltR R ltR R ltR# )é    )ÚannotationsN)ÚTYPE_CHECKINGÚAnyÚUnionÚCallableÚIterableÚ	Awaitable)Ú	TypeAlias)Ú
APIRequest)ÚAPIResponseÚAsyncAPIResponseÚ
MiddlewareÚCallNextÚAsyncCallNextÚMiddlewareCallableÚAsyncMiddlewareCallableÚMiddlewareInputúAPIResponse[Any]r
   úAsyncAPIResponse[Any]c                  ó2   € ] tR t^.tRtR R ltR R ltRtR# )r   zÜBase class for client-level middleware.

Subclass and override `handle` (used by the sync client) and/or `handle_async`
(used by the async client). The default implementations delegate straight to
the rest of the chain.
c               ó$   € V ^8„  d   QhRRRRRR/# )é   Úrequestr   Ú	call_nextr   Úreturnr   © )Úformats   "ÚŒ/opt/data/installs/351f81cc06284494/environments/aa258815729c481f8402f54f4c368f83/venv/lib/python3.14/site-packages/anthropic/_middleware.pyÚ__annotate__ÚMiddleware.__annotate__6   s"   € ÷ "ñ "˜jð "°Xð "ÐBRñ "ó    c                	ó   € V! V4      # ©Nr   ©Úselfr   r   s   &&&r   ÚhandleÚMiddleware.handle6   s   € Ù˜Ó!Ð!r!   c               ó$   € V ^8„  d   QhRRRRRR/# )r   r   r   r   r   r   r   r   )r   s   "r   r   r    9   s"   € ÷ (ñ (¨*ð (Àð (ÐShñ (r!   c              ƒ  	ó.   "  € V! V4      G R j  x€L
 #  L5ir#   r   r$   s   &&&r   Úhandle_asyncÚMiddleware.handle_async9   s   é € Ù˜wÓ'×'Ð'Ñ'ùs   ‚Ž�r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r&   r*   Ú__static_attributes__r   r!   r   r   r   .   s   † ñõ"÷(ñ (r!   c               ó    € V ^8„  d   QhRRRR/# )r   Ú
middlewareÚobjectr   Ústrr   )r   s   "r   r   r   B   s   € ÷ ?ñ ? ð ?¨Cñ ?r!   c                ó¸   € \        V \        4      '       d   \        V 4      P                  # \	        V R R4      p\        V\
        4      '       d   V# \        V 4      # )r,   N)Ú
isinstancer   Útyper,   Úgetattrr5   Úrepr)r3   Únames   & r   Ú_middleware_namer<   B   sJ   € Ü�*œj×)Ò)Ü�JÓ×(Ñ(Ð(Ü�:˜z¨4Ó0€DÜ˜d¤C×(Ò(ˆ4Ð>¬d°:Ó.>Ð>r!   c               ó    € V ^8„  d   QhRRRR/# )r   Úobjr4   r   Úboolr   )r   s   "r   r   r   I   s   € ÷ 	Bñ 	B˜Fð 	B tñ 	Br!   c                óœ   € \         P                  ! V 4      '       d   R# \        V RR4      pVRJ;'       d    \         P                  ! V4      # )z«Whether calling the given object returns a coroutine.

Unlike `inspect.iscoroutinefunction(obj)` this also handles class instances
that define an async `__call__` method.
TÚ__call__N)ÚinspectÚiscoroutinefunctionr9   )r>   Úcalls   & r   Ú_is_async_callablerE   I   sD   € ô ×"Ò" 3×'Ò'ÙÜ�3˜
 DÓ)€DØ�tÐ×AÐA¤× ;Ò ;¸DÓ AÐAr!   c               ó    € V ^8„  d   QhRRRR/# ©r   r3   zIterable[MiddlewareInput]r   ÚNoner   )r   s   "r   r   r   U   s   € ÷ ñ Ð)Bð Àtñ r!   c                óø  € V  Fó  p\        V\        4      '       d‰   \        V4      P                  \        P                  J d   \	        R \        V4       R24      h\        P                  ! \        V4      P                  4      '       d   \	        R \        V4       R24      hK¡  \        V4      '       g   \	        R \        V4       R24      h\        V4      '       g   KÝ  \	        R \        V4       R24      h	  R# )úmiddleware zW does not implement `handle()`; the synchronous client requires sync-capable middlewarezj defines `handle()` as an async function; the synchronous client requires `handle()` to be a sync functionú is not callablezP is an async function; the synchronous client requires sync middleware functionsN)
r7   r   r8   r&   Ú	TypeErrorr<   rB   rC   ÚcallablerE   ©r3   Úentrys   & r   Úvalidate_sync_middlewarerP   U   sú   € ÛˆÜ�eœZ×(Ò(Ü�E‹{×!Ñ!¤Z×%6Ñ%6Ó6ÜØ!Ô"2°5Ó"9Ð!:ð ;Nð Nóð ô ×*Ò*¬4°«;×+=Ñ+=×>Ò>ÜØ!Ô"2°5Ó"9Ð!:ð ;Wð Wóð ñ ?ô
 ˜%—’Ü˜kÔ*:¸5Ó*AÐ)BÐBRÐSÓTÐTÜ ×&Ô&ÜØÔ.¨uÓ5Ð6ð 7Lð Lóð ó r!   c               ó    € V ^8„  d   QhRRRR/# rG   r   )r   s   "r   r   r   k   s   € ÷ ñ Ð*Cð Èñ r!   c                óø  € V  Fó  p\        V\        4      '       d‰   \        V4      P                  \        P                  J d   \	        R \        V4       R24      h\        P                  ! \        V4      P                  4      '       g   \	        R \        V4       R24      hK¡  \        V4      '       g   \	        R \        V4       R24      h\        V4      '       d   KÝ  \	        R \        V4       R24      h	  R# )rJ   z_ does not implement `handle_async()`; the asynchronous client requires async-capable middlewarezw defines `handle_async()` as a sync function; the asynchronous client requires `handle_async()` to be an async functionrK   zV is not an async function; the asynchronous client requires async middleware functionsN)
r7   r   r8   r*   rL   r<   rB   rC   rM   rE   rN   s   & r   Úvalidate_async_middlewarerS   k   sû   € ÛˆÜ�eœZ×(Ò(Ü�E‹{×'Ñ'¬:×+BÑ+BÓBÜØ!Ô"2°5Ó"9Ð!:ð ;Pð Póð ô ×.Ò.¬t°E«{×/GÑ/G×HÒHÜØ!Ô"2°5Ó"9Ð!:ð ;`ð `óð ñ Iô
 ˜%—’Ü˜kÔ*:¸5Ó*AÐ)BÐBRÐSÓTÐTÜ# E×*Ô*ÜØÔ.¨uÓ5Ð6ð 7Nð Nóð ó r!   )r   r   r   r   r   r   )Ú__conditional_annotations__Ú
__future__r   rB   Útypingr   r   r   r   r   r	   Útyping_extensionsr
   Ú_requestr   Ú	_responser   r   Ú__all__r   Ú__annotations__r   r   r   r   r   r<   rE   rP   rS   )rT   s   @r   Ú<module>r\      sÝ   øðß "Ð "ã ß K× KÝ 'å  çß8ò€ð  
˜|Ð-?Ð?Õ@€ˆ)Ó @ð	ð $ Z L°)Ð<SÕ2TÐ$TÕU€ˆyÓ Uð	÷(ñ (ð !)¨*°hÐ)?ÐASÐ)SÕ TÐ �IÓ TØ%-¨z¸=Ð.IÈ9ÐUlÕKmÐ.mÕ%nÐ ˜Ó nØ" :Ð/AÐCZÐ#ZÕ[€�Ó [õ?õ	Bõ÷,r!   