+
    ~j[                        ^ RI Ht ^ RIHt ^ RIHt ^ RIHtHt ^RI	H
t
 ]! R4      t]! R4      t ! R R	]]]3,          4      tR
# )    )annotations)OrderedDict)Callable)AnyTypeVar)loggerKVc                  l   a  ] tR t^tRR V 3R llltR V 3R lltR R ltR R ltRR	 R
 lltRt	V ;t
# )BoundedDictc                   V ^8  d   QhRR/# )   maxsizez
int | None )formats   "v/Users/mitch_tango/dev/rabbit-r1-livekit/agent/.venv/lib/python3.14/site-packages/livekit/agents/utils/bounded_dict.py__annotate__BoundedDict.__annotate__   s     ? ?
 ?    c                	   < \         SV `  4        Wn        V P                  e   V P                  ^ 8:  d   \        R4      hR # R # )Nzmaxsize must be greater than 0)super__init__r   
ValueError)selfr   	__class__s   &&r   r   BoundedDict.__init__   s<    <<#(9=>> ):#r   c               $    V ^8  d   QhRRRRRR/# )r   keyr	   valuer
   returnNoner   )r   s   "r   r   r      s!     % %q % %t %r   c                	   < \         SV `  W4       V P                  e1   \        V 4      V P                  8  d   V P	                  RR7       K<  R # R # )NFlast)r   __setitem__r   lenpopitem)r   r   r   r   s   &&&r   r%   BoundedDict.__setitem__   s@    C'll&3t9t||+CLLeL$ ,D&r   c               $    V ^8  d   QhRRRRRR/# )r   r   r	   kwargsr   r    zV | Noner   )r   s   "r   r   r      s!       S X r   c                   V P                  VR4      pVf   V# VP                  4        FU  w  rEVf   K  \        W44      '       d   \        W4V4       K*  \        P
                  ! RV\        V4      P                  4       KW  	  V# )a  Update the value of a key with the given keyword arguments.
Only update the value if the field value is not None and the field exists on the value.

Args:
    key: The key to update.
    kwargs: The keyword arguments to update the value.

Returns:
    The value of the key.
Nz1field %s is not set on value of type %s, skipping)getitemshasattrsetattrr   warningtype__name__)r   r   r*   r   
field_namefield_values   &&,   r   update_valueBoundedDict.update_value   su     d#=L'-||~#J"u));7GK(( (6 r   c               (    V ^8  d   QhRRRRRRRR/# )	r   r   r	   factoryzCallable[[], V]r*   r   r    r
   r   )r   s   "r   r   r   5   s)       _  PQ r   c                r    V P                  VR4      f
   V! 4       W&   V P                  ! V3/ VB pVf   Q hV# )a  Set a value for a key if it doesn't exist, or update it if it does.

Args:
    key: The key to set or update.
    factory: The factory function to create a new value if the key doesn't exist.
    kwargs: The keyword arguments to update the value.

Returns:
    The value of the key.
N)r,   r5   )r   r   r8   r*   results   &&&, r   set_or_updateBoundedDict.set_or_update5   sD     88C&	DI""31&1!!!r   c                    V ^8  d   QhRRRR/# )r   	predicatezCallable[[V], bool] | Noner    ztuple[K | None, V | None]r   )r   s   "r   r   r   F   s      - 
#r   c                    Vf%   \        V 4      ^ 8  d   V P                  RR7      # R# \        \        V P	                  4       4      4       F'  w  r#V! V4      '       g   K  W P                  V4      3u # 	  R# )zPop an item from the dictionary if it satisfies the predicate.

Args:
    predicate: The predicate to check if the value satisfies.

Returns:
    A tuple of the key and value of the popped item.
Fr#   )NN)r&   r'   reversedlistr-   pop)r   r>   r   r   s   &&  r   pop_ifBoundedDict.pop_ifF   sl     4y1}|||//"4

#56JCHHSM)) 7 r   )r   )N)r2   
__module____qualname____firstlineno__r   r%   r5   r;   rC   __static_attributes____classcell__)r   s   @r   r   r      s+    ? ?% %6" r   r   N)
__future__r   collectionsr   collections.abcr   typingr   r   logr   r	   r
   r   r   r   r   <module>rO      s=    " # $  CLCLM+ad# Mr   