Ë
    úmxi
  ã                  óv   — d dl mZ d dlmZmZ d dlmZ d dlmZ erd dl	m
Z
  G d„ de«      Zdd„Zdd	„Zdd
„Zy)é    )Úannotations)ÚTYPE_CHECKINGÚ
NamedTuple)Úruntime)Úcontext_dg_stack)ÚDeltaGeneratorc                  ó   — e Zd ZU dZded<   y)ÚFormDataz%Form data stored on a DeltaGenerator.ÚstrÚform_idN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú__annotations__© ó    úX/home/htdocs/ttos/venv/lib/python3.12/site-packages/streamlit/elements/lib/form_utils.pyr
   r
      s   … Ù/ð „Lr   r
   c                óB  — t        j                  «       sy| j                  �| j                  S | | j                  k(  r=t	        t        j                  «       «      D ]  }|j                  €Œ|j                  c S  y| j                  }|�|j                  �|j                  S y)zåFind the FormData for the given DeltaGenerator.

    Forms are blocks, and can have other blocks nested inside them.
    To find the current form, we walk up the dg_stack until we find
    a DeltaGenerator that has FormData.
    N)r   ÚexistsÚ
_form_dataÚ_main_dgÚreversedr   ÚgetÚ_parent)Úthis_dgÚdgÚparents      r   Ú_current_formr   !   s›   € ô �>‰>ÔØà×ÑÐ%Ø×!Ñ!Ð!à�'×"Ñ"Ò"ô Ô+×/Ñ/Ó1Ó2ò 	%ˆBØ�}‰}Ñ(Ø—}‘}Ò$ð	%ð ð	 —‘ˆØÐ &×"3Ñ"3Ð"?Ø×$Ñ$Ð$àr   c                ó6   — t        | «      }|€y|j                  S )z÷Return the form_id for the current form, or the empty string if we're
    not inside an `st.form` block.

    (We return the empty string, instead of None, because this value is
    assigned to protobuf message fields, and None is not valid.)
    Ú )r   r   )r   Ú	form_datas     r   Úcurrent_form_idr#   >   s#   € ô ˜bÓ!€IØÐØØ×ÑÐr   c                ó   — t        | «      dk7  S )z6True if the DeltaGenerator is inside an st.form block.r!   )r#   )r   s    r   Ú
is_in_formr%   K   s   € ä˜2Ó "Ñ$Ð$r   N)r   r   ÚreturnzFormData | None)r   r   r&   r   )r   r   r&   Úbool)Ú
__future__r   Útypingr   r   Ú	streamlitr   Ú$streamlit.delta_generator_singletonsr   Ústreamlit.delta_generatorr   r
   r   r#   r%   r   r   r   ú<module>r-      s4   ðõ #ç ,å Ý AáÝ8ôˆzô óó:
ô%r   