
    ȯei                        U d dl mZ d dlZd dlZd dlmZmZ d dlZd dl	m
Z
mZmZ d dlmZ erd dlmZ dZded	<   ej&                  	 dd
d
dd	 	 	 	 	 	 	 	 	 dd       Zy)    )annotationsN)TYPE_CHECKINGFinal)LayoutConfigWidthvalidate_width)add_script_run_ctx)Iteratorg      ?r   
DELAY_SECSFcontent)	show_time_cachewidthc          
   #     	
K   ddl m ddlm t	        |d       t        |      	t        j                         
dt        j                         	 d	
 f	d}t        t        j                  t        |            j                          d rP5  d	ddd       d
t        
j                  j                         v r
j#                          y
j                          yy# 1 sw Y   MxY w# r]5  d	ddd       n# 1 sw Y   nxY wd
t        
j                  j                         v r
j#                          w 
j                          w w xY ww)a+  Display a loading spinner while executing a block of code.

    Parameters
    ----------
    text : str
        The text to display next to the spinner. This defaults to
        ``"In progress..."``.

        The text can optionally contain GitHub-flavored Markdown. Syntax
        information can be found at: https://github.github.com/gfm.

        See the ``body`` parameter of |st.markdown|_ for additional, supported
        Markdown directives.

        .. |st.markdown| replace:: ``st.markdown``
        .. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown

    show_time : bool
        Whether to show the elapsed time next to the spinner text. If this is
        ``False`` (default), no time is displayed. If this is ``True``,
        elapsed time is displayed with a precision of 0.1 seconds. The time
        format is not configurable.

    width : "content", "stretch", or int
        The width of the spinner element. This can be one of the following:

        - ``"content"`` (default): The width of the element matches the
          width of its content, but doesn't exceed the width of the parent
          container.
        - ``"stretch"``: The width of the element matches the width of the
          parent container.
        - An integer specifying the width in pixels: The element has a
          fixed width. If the specified width is greater than the width of
          the parent container, the width of the element matches the width
          of the parent container.

    Example
    -------
    >>> import streamlit as st
    >>> import time
    >>>
    >>> with st.spinner("Wait for it...", show_time=True):
    >>>     time.sleep(5)
    >>> st.success("Done!")
    >>> st.button("Rerun")

    .. output::
        https://doc-spinner.streamlit.app/
        height: 210px

    r   )Spinner)
clean_textT)allow_content)r   c                    	 5  r6        }  	      | _         | _        | _        j                  d|        d d d        y # 1 sw Y   y xY w)Nspinner)layout_config)textcacher   _enqueue)
spinner_protoSpinnerProtor   r   display_messagedisplay_message_lockr   messager   r   s
    \/var/www/html/glpi_dashboard/venv/lib/python3.12/site-packages/streamlit/elements/spinner.pyset_messagezspinner.<locals>.set_messagem   s\    % "$0NM)3D)9M&*0M'.7M+$$!= %   s   9AANFchat_message)returnNone)streamlit.proto.Spinner_pb2r   streamlit.string_utilr   r   r   stempty	threadingLockr	   Timerr   startset
_active_dg_ancestor_block_types	container)r   r   r   r   r    r   r   r   r   r   r   s   ```  @@@@@@r   r   r   %   s!    v D05- u-MhhjGO$>>+ 		 		 	9??:{CDJJL 	% ("'(W%7%7%M%M!NN !!#  ( (  % ("'( ( (W%7%7%M%M!NN !!#  sQ   AE"AC> E"#C2&AE"2C;7E">ED	EDAEE")zIn progress...)
r   strr   boolr   r1   r   r   r"   zIterator[None])
__future__r   
contextlibr(   typingr   r   	streamlitr&   #streamlit.elements.lib.layout_utilsr   r   r   streamlit.runtime.scriptrunnerr	   collections.abcr
   r   __annotations__contextmanagerr        r   <module>r=      s    #   '  
 >( 
E   d  d 
d  d  	d 
 d  d  d r<   