+
    ÃìÜj  ã                   ór   € ^ RI HtHtHtHtHt ^ RIHtHtH	t	H
t
HtHtHt ^ RIHt ]tR.t ! R R]4      tR# )é    )ÚAbstractEventLoopÚensure_futureÚFutureÚiscoroutineÚwait)ÚAnyÚCallableÚcastÚDictÚOptionalÚSetÚTuple)ÚEventEmitterÚAsyncIOEventEmitterc                   ó°   a a€ ] tR t^t oRtRV3R lV 3R llltV3R lV 3R lltV3R lR ltV3R lR	 ltV3R
 lR lt	]
V3R lR l4       tRtVtV ;t# )r   aØ  An event emitter class which can run asyncio coroutines in addition to
synchronous blocking functions. For example:

```py
@ee.on('event')
async def async_handler(*args, **kwargs):
    await returns_a_future()
```

On emit, the event emitter  will automatically schedule the coroutine using
`asyncio.ensure_future` and the configured event loop (defaults to
`asyncio.get_event_loop()`).

Unlike the case with the EventEmitter, all exceptions raised by
event handlers are automatically emitted on the `error` event. This is
important for asyncio coroutines specifically but is also handled for
synchronous functions for consistency.

When `loop` is specified, the supplied event loop will be used when
scheduling work with `ensure_future`. Otherwise, the default asyncio
event loop is used.

For asyncio coroutine event handlers, calling emit is non-blocking.
In other words, you do not have to await any results from emit, and the
coroutine is scheduled in a fire-and-forget fashion.
c                ó:   <€ V ^8„  d   QhRS[ RS[S[,          RR/# )é   ÚselfÚloopÚreturnN)ÚSelfr   r   )ÚformatÚ__classdict__s   "€ÚJ/opt/render/project/src/.venv/lib/python3.14/site-packages/pyee/asyncio.pyÚ__annotate__Ú AsyncIOEventEmitter.__annotate__)   s(   ø€ ÷ +ñ +‘tð +¡8Ñ,=Õ#>ð +È$ñ +ó    c                óV   <€ \         \        V `  4        Wn        \	        4       V n        R # ©N)Úsuperr   Ú__init__Ú_loopÚsetÚ_waiting)r   r   Ú	__class__s   &&€r   r!   ÚAsyncIOEventEmitter.__init__)   s   ø€ ÜÔ! 4Ñ1Ô3Ø26Œ
Ü%(£UˆŽr   c          
      ó8   <€ V ^8„  d   QhRS[ RS[RS[RS[RS[/# )r   r   ÚeventÚargsÚkwargsr   )r   Ústrr   Úbool)r   r   s   "€r   r   r   .   s;   ø€ ÷ 4ñ 4Ùð4áð4ñ ð4ñ ð	4ñ
 
ñ4r   c                ó,   <€ \         SV `  ! V.VO5/ VB # )a'  Emit `event`, passing `*args` and `**kwargs` to each attached
function or coroutine. Returns `True` if any functions are attached to
`event`; otherwise returns `False`.

Example:

```py
ee.emit('data', '00101001')
```

Assuming `data` is an attached function, this will call
`data('00101001')'`.

When executing coroutine handlers, their respective futures will be
stored in a "waiting" state. These futures may be waited on or
canceled with `wait_for_complete` and `cancel`, respectively; and
their status may be checked via the `complete` property.
)r    Úemit)r   r(   r)   r*   r%   s   &&*,€r   r.   ÚAsyncIOEventEmitter.emit.   s   ø€ ô0 ‰wŠ|˜EÐ3 DÒ3¨FÑ3Ð3r   c          
      ó`   <€ V ^8„  d   QhRS[ RS[RS[S[R3,          RS[S[S[3,          RR/# )r   r   Úfr)   .r*   r   N)r   r	   r   r   r   r+   )r   r   s   "€r   r   r   H   sK   ø€ ÷ $#ñ $#Ùð$#áð$#ñ ‘C˜�H�oð$#ñ ‘S™#�X•ð	$#ð
 
ñ$#r   c                óò  a €  V! V/ VB p\        V4      '       dS   S P                  '       d'   \        \        \        V4      S P                  R 7      pMC\        \        \        V4      4      pM)\        V\        4      '       d   \        \        V4      pMR# R V 3R llpVP                  V4       S P                  P                  V4       R#   \         d   pS P                  RT4        Rp?R# Rp?ii ; i))r   Nc                ó(   € V ^8„  d   QhR\         RR/# )r   r1   r   N)r   )r   s   "r   r   Ú3AsyncIOEventEmitter._emit_run.<locals>.__annotate__a   s   € ÷ ,ñ ,œFð , tñ ,r   c                 óÆ   <€ SP                   P                  V 4       V P                  4       '       d   R # V P                  4       pV'       d   SP	                  RV4       R # R # )NÚerror)r$   ÚdiscardÚ	cancelledÚ	exceptionr.   )r1   Úexcr   s   & €r   ÚcallbackÚ/AsyncIOEventEmitter._emit_run.<locals>.callbacka   sD   ø€ Ø—‘×%Ñ% aÔ(à—;‘;—=’=Ùà/0¯{©{«}�ßØ—I‘I˜g sÖ+ñ r   r6   )r   r"   r   r
   r   Ú
isinstancer   Úadd_done_callbackr$   ÚaddÚ	Exceptionr.   )r   r1   r)   r*   ÚcoroÚfutr;   r:   s   f&&&    r   Ú	_emit_runÚAsyncIOEventEmitter._emit_runH   s¿   ø€ ð	#Ù˜4Ð* 6Ñ*ˆDô ˜4× Ò Ø—:—:�:ô  -¬T´#°t«_À4Ç:Á:ÔN‘Cä'¬¬S°$«Ó8‘Cä˜D¤&×)Ò)Üœ3 “o‘á÷,ð ,ð ×!Ñ! (Ô+Ø�M‰M×Ñ˜cÖ"øô9 ô 	$Ø�I‰I�g˜s×#Ò#ûð	$ús   ƒC ÃC6ÃC1Ã1C6c                ó$   <€ V ^8„  d   QhRS[ RR/# ©r   r   r   N©r   )r   r   s   "€r   r   r   n   s   ø€ ÷ &ñ &¡dð &¨tñ &r   c              ƒ  ót   "  € V P                   '       d    \        V P                   4      G Rj  x€L
  R# R#  L5i)a¶  Waits for all pending tasks to complete. For example:

```py
@ee.on('event')
async def async_handler(*args, **kwargs):
    await returns_a_future()

# Triggers execution of async_handler
ee.emit('data', '00101001')

await ee.wait_for_complete()

# async_handler has completed execution
```

This is useful if you're attempting a graceful shutdown of your
application and want to ensure all coroutines have completed execution
beforehand.
N)r$   r   ©r   s   &r   Úwait_for_completeÚ%AsyncIOEventEmitter.wait_for_completen   s*   é € ð( �=�=ˆ=Ü�t—}‘}Ó%×%Ò%ñ Ù%ùs   ‚+8­6®	8c                ó$   <€ V ^8„  d   QhRS[ RR/# rF   rG   )r   r   s   "€r   r   r   …   s   ø€ ÷ ñ ‘Tð ˜dñ r   c                óà   € V P                    FC  pVP                  4       '       d   K  VP                  4       '       d   K3  VP                  4        KE  	  V P                   P	                  4        R# )a’  Cancel all pending tasks. For example:

```py
@ee.on('event')
async def async_handler(*args, **kwargs):
    await returns_a_future()

# Triggers execution of async_handler
ee.emit('data', '00101001')

ee.cancel()

# async_handler execution has been canceled
```

This is useful if you're attempting to shut down your application and
attempts at a graceful shutdown via `wait_for_complete` have failed.
N)r$   Údoner8   ÚcancelÚclear)r   rB   s   & r   rO   ÚAsyncIOEventEmitter.cancel…   sB   € ð& —=”=ˆCØ—8‘8—:”: c§m¡m§o¤oØ—
‘
–ñ !ð 	�‰×ÑÖr   c                ó&   <€ V ^8„  d   QhRS[ RS[/# )r   r   r   )r   r,   )r   r   s   "€r   r   r   ž   s   ø€ ÷ !ñ !‘tð !¡ñ !r   c                ó$   € V P                   '       * # )a®  When true, there are no pending tasks, and execution is complete.
For example:

```py
@ee.on('event')
async def async_handler(*args, **kwargs):
    await returns_a_future()

# Triggers execution of async_handler
ee.emit('data', '00101001')

# async_handler is still running, so this prints False
print(ee.complete)

await ee.wait_for_complete()

# async_handler has completed execution, so this prints True
print(ee.complete)
```
)r$   rI   s   &r   ÚcompleteÚAsyncIOEventEmitter.complete�   s   € ð, —=‘=Ô Ð r   )r"   r$   r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r!   r.   rC   rJ   rO   ÚpropertyrT   Ú__static_attributes__Ú__classdictcell__Ú__classcell__)r%   r   s   @@r   r   r      sV   ù‡ € ñ÷6+õ +÷
4ó 4÷4$#ð $#÷L&ð &÷.ð ð0 ÷!ó ÷!ð !r   N)Úasyncior   r   r   r   r   Útypingr   r	   r
   r   r   r   r   Ú	pyee.baser   r   Ú__all__r   © r   r   Ú<module>rd      s5   ð÷ PÕ Oß B× BÑ Bå "à
€à Ð
!€ôf!˜,ö f!r   