� K�g���,�ddlZddlmZejr ddlZddlmZe��Z ej ddd ���Z ej dde dej d fd ���Z dde dej d fd �Z dd�Zdd�Zddej e dej e fd�ZdS)�N)�local�)�ContextF�silent�te.Literal[False]�returnrc��dS�N��rs �]/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/click/globals.py�get_current_contextr s��KN�3�.c��dSr r r s r rrs��FI�crc�� tjdtjd��S#tt f$r}|st d��|�Yd}~nd}~wwxYwdS)a�Returns the current click context. This can be used as a way to access the current context object from anywhere. This is a more implicit alternative to the :func:`pass_context` decorator. This function is primarily useful for helpers such as :func:`echo` which might be interested in changing its behavior based on the current context. To push the current context, :meth:`Context.scope` can be used. .. versionadded:: 5.0 :param silent: if set to `True` the return value is `None` if no context is available. The default behavior is to raise a :exc:`RuntimeError`. r�����z!There is no active click context.N)�t�cast�_local�stack�AttributeError� IndexError� RuntimeError)r�es r rrs���K��v�i���b�!1�2�2�2�� �J� '�K�K�K�� K��B�C�C�� J� K� K� K� K� K�����K���� �4s�$'�A�A�A�ctxc�l�tj�dg���|��dS)z*Pushes a new context to the current stack.rN)r�__dict__� setdefault�append)rs r � push_contextr ,s.�� �O���w��+�+�2�2�3�7�7�7�7�7rc�B�tj���dS)z%Removes the top level from the stack.N)rr�popr rr � pop_contextr#1s�� �L�������r�colorc�@�|�|Std���}|�|jSdS)z�Internal helper to get the default value of the color flag. If a value is passed it's returned unchanged, otherwise it's looked up from the current context. NTr )rr$)r$rs r �resolve_color_defaultr&6s1��  ��� � �T� *� *� *�C� ���y�� �4r)F)rrrr).)rrrN)rNr )�typingr� threadingr� TYPE_CHECKING�typing_extensions�te�corerr�overloadr�bool�Optionalr r#r&r rr �<module>r0s6�������������?��"�"�"�"������� �������N�N�N�N� ��N���I�I��I�q�z�)�/D�I�I�I� ��I�������I�1F�����08�8�8�8� ���� � ���D�!1� �Q�Z��=M� � � � � � r
Memory