Ë
    úmxiàR  ã                  ó¸   — U d dl mZ d dlmZmZmZmZ d dlmZm	Z	m
Z
mZmZ d dlmZ d dlmZ d dlmZmZ d dlmZmZ er
d dlZd d	lmZ d
Zded<    G d„ d«      Zy)é    )Úannotations)ÚTYPE_CHECKINGÚFinalÚLiteralÚcast)ÚLayoutConfigÚTextAlignmentÚWidthÚWidthWithoutContentÚvalidate_width)ÚMarkdown)Úgather_metrics)Ú
clean_textÚvalidate_icon_or_emoji)ÚSupportsStrÚis_sympy_expressionN)ÚDeltaGeneratorz---r   Ú#MARKDOWN_HORIZONTAL_RULE_EXPRESSIONc                  ó:  — e Zd Z ed«      	 dddddœ	 	 	 	 	 	 	 	 	 	 	 dd„«       Z ed«      	 dddddœ	 	 	 	 	 	 	 	 	 	 	 dd„«       Z ed	«      ddd
œ	 	 	 	 	 	 	 dd„«       Z ed«      ddœdd„«       Z ed«      dddddœ	 	 	 	 	 	 	 	 	 	 	 dd„«       Ze	dd„«       Z
y)ÚMarkdownMixinÚmarkdownNÚstretchÚleft)ÚhelpÚwidthÚtext_alignmentc               ó  — t        «       }t        |«      |_        ||_        t         j                  j
                  |_        |r||_        t        |d¬«       t        ||¬«      }| j                  j                  d||¬«      S )u¢  Display string formatted as Markdown.

        Parameters
        ----------
        body : any
            The text to display as GitHub-flavored Markdown. Syntax
            information can be found at: https://github.github.com/gfm.
            If anything other than a string is passed, it will be converted
            into a string behind the scenes using ``str(body)``.

            This also supports:

            - Emoji shortcodes, such as ``:+1:``  and ``:sunglasses:``.
              For a list of all supported codes,
              see https://share.streamlit.io/streamlit/emoji-shortcodes.

            - Streamlit logo shortcode. Use ``:streamlit:`` to add a little
              Streamlit flair to your text.

            - A limited set of typographical symbols. ``"<- -> <-> -- >= <= ~="``
              becomes "â†� â†’ â†” â€” â‰¥ â‰¤ â‰ˆ" when parsed as Markdown.

            - Google Material Symbols (rounded style), using the syntax
              ``:material/icon_name:``, where "icon_name" is the name of the
              icon in snake case. For a complete list of icons, see Google's
              `Material Symbols <https://fonts.google.com/icons?icon.set=Material+Symbols&icon.style=Rounded>`_
              font library.

            - LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"
              must be on their own lines). Supported LaTeX functions are listed
              at https://katex.org/docs/supported.html.

            - Colored text and background colors for text, using the syntax
              ``:color[text to be colored]`` and ``:color-background[text to be colored]``,
              respectively. ``color`` must be replaced with any of the following
              supported colors: red, orange, yellow, green, blue, violet, gray/grey,
              rainbow, or primary. For example, you can use
              ``:orange[your text here]`` or ``:blue-background[your text here]``.
              If you use "primary" for color, Streamlit will use the default
              primary accent color unless you set the ``theme.primaryColor``
              configuration option.

            - Colored badges, using the syntax ``:color-badge[text in the badge]``.
              ``color`` must be replaced with any of the following supported
              colors: red, orange, yellow, green, blue, violet, gray/grey, or primary.
              For example, you can use ``:orange-badge[your text here]`` or
              ``:blue-badge[your text here]``.

            - Small text, using the syntax ``:small[text to show small]``.


        unsafe_allow_html : bool
            Whether to render HTML within ``body``. If this is ``False``
            (default), any HTML tags found in ``body`` will be escaped and
            therefore treated as raw text. If this is ``True``, any HTML
            expressions within ``body`` will be rendered.

            Adding custom HTML to your app impacts safety, styling, and
            maintainability.

            .. note::
                If you only want to insert HTML or CSS without Markdown text,
                we recommend using ``st.html`` instead.

        help : str or None
            A tooltip that gets displayed next to the Markdown. If this is
            ``None`` (default), no tooltip is displayed.

            The tooltip can optionally contain GitHub-flavored Markdown,
            including the Markdown directives described in the ``body``
            parameter of ``st.markdown``.

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

            - ``"stretch"`` (default): The width of the element matches the
              width of the parent container.
            - ``"content"``: The width of the element matches the width of its
              content, but doesn't exceed 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.

        text_alignment : "left", "center", "right", or "justify"
            The horizontal alignment of the text within the element. This can
            be one of the following:

            - ``"left"`` (default): Text is aligned to the left edge.
            - ``"center"``: Text is centered.
            - ``"right"``: Text is aligned to the right edge.
            - ``"justify"``: Text is justified (stretched to fill the available
              width with the last line left-aligned).

            .. note::
                For text alignment to have a visible effect, the element's
                width must be wider than its content. If you use
                ``width="content"`` with short text, the alignment may not be
                noticeable.

        Examples
        --------
        >>> import streamlit as st
        >>>
        >>> st.markdown("*Streamlit* is **really** ***cool***.")
        >>> st.markdown('''
        ...     :red[Streamlit] :orange[can] :green[write] :blue[text] :violet[in]
        ...     :gray[pretty] :rainbow[colors] and :blue-background[highlight] text.''')
        >>> st.markdown("Here's a bouquet &mdash;\
        ...             :tulip::cherry_blossom::rose::hibiscus::sunflower::blossom:")
        >>>
        >>> multi = '''If you end a line with two spaces,
        ... a soft return is used for the next line.
        ...
        ... Two (or more) newline characters in a row will result in a hard return.
        ... '''
        >>> st.markdown(multi)

        .. output::
           https://doc-markdown.streamlit.app/
           height: 350px

        T©Úallow_content©r   r   r   ©Úlayout_config)ÚMarkdownProtor   ÚbodyÚ
allow_htmlÚTypeÚNATIVEÚelement_typer   r   r   ÚdgÚ_enqueue)Úselfr$   Úunsafe_allow_htmlr   r   r   Úmarkdown_protor"   s           úR/home/htdocs/ttos/venv/lib/python3.12/site-packages/streamlit/elements/markdown.pyr   zMarkdownMixin.markdown(   sr   € ôJ '›ˆä(¨Ó.ˆÔØ$5ˆÔ!Ü&3×&8Ñ&8×&?Ñ&?ˆÔ#ÙØ"&ˆNÔä�u¨DÕ1Ü$¨5ÀÔPˆà�w‰w×Ñ 
¨NÈ-ÐÓXÐXó    Úcaptionc               ó  — t        «       }t        |«      |_        ||_        d|_        t         j
                  j                  |_        |r||_        t        |d¬«       t        ||¬«      }| j                  j                  d||¬«      S )aŽ  Display text in small font.

        This should be used for captions, asides, footnotes, sidenotes, and
        other explanatory text.

        Parameters
        ----------
        body : str
            The text to display as 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

        unsafe_allow_html : bool
            Whether to render HTML within ``body``. If this is ``False``
            (default), any HTML tags found in ``body`` will be escaped and
            therefore treated as raw text. If this is ``True``, any HTML
            expressions within ``body`` will be rendered.

            Adding custom HTML to your app impacts safety, styling, and
            maintainability.

            .. note::
                If you only want to insert HTML or CSS without Markdown text,
                we recommend using ``st.html`` instead.

        help : str or None
            A tooltip that gets displayed next to the caption. If this is
            ``None`` (default), no tooltip is displayed.

            The tooltip can optionally contain GitHub-flavored Markdown,
            including the Markdown directives described in the ``body``
            parameter of ``st.markdown``.

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

            - ``"stretch"`` (default): The width of the element matches the
              width of the parent container.
            - ``"content"``: The width of the element matches the width of its
              content, but doesn't exceed 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.

        text_alignment : "left", "center", "right", or "justify"
            The horizontal alignment of the text within the element. This can
            be one of the following:

            - ``"left"`` (default): Text is aligned to the left edge.
            - ``"center"``: Text is centered.
            - ``"right"``: Text is aligned to the right edge.
            - ``"justify"``: Text is justified (stretched to fill the available
              width with the last line left-aligned).

            .. note::
                For text alignment to have a visible effect, the element's
                width must be wider than its content. If you use
                ``width="content"`` with short text, the alignment may not be
                noticeable.

        Examples
        --------
        >>> import streamlit as st
        >>>
        >>> st.caption("This is a string that explains something above.")
        >>> st.caption("A caption with _italics_ :blue[colors] and emojis :sunglasses:")

        Tr   r    r   r!   )r#   r   r$   r%   Ú
is_captionr&   ÚCAPTIONr(   r   r   r   r)   r*   )r+   r$   r,   r   r   r   Úcaption_protor"   s           r.   r0   zMarkdownMixin.captionº   sz   € ôh &›ˆÜ'¨Ó-ˆÔØ#4ˆÔ Ø#'ˆÔ Ü%2×%7Ñ%7×%?Ñ%?ˆÔ"ÙØ!%ˆMÔä�u¨DÕ1Ü$¨5ÀÔPˆà�w‰w×Ñ 
¨MÈÐÓWÐWr/   Úlatex)r   r   c               ó>  — t        |«      rddl} |j                  |«      }t        «       }dt	        |«      › d�|_        t        j                  j                  |_        |r||_	        t        |d¬«       t        |¬«      }| j                  j                  d||¬	«      S )
a¹  Display mathematical expressions formatted as LaTeX.

        Supported LaTeX functions are listed at
        https://katex.org/docs/supported.html.

        Parameters
        ----------
        body : str or SymPy expression
            The string or SymPy expression to display as LaTeX. If str, it's
            a good idea to use raw Python strings since LaTeX uses backslashes
            a lot.

        help : str or None
            A tooltip that gets displayed next to the LaTeX expression. If
            this is ``None`` (default), no tooltip is displayed.

            The tooltip can optionally contain GitHub-flavored Markdown,
            including the Markdown directives described in the ``body``
            parameter of ``st.markdown``.

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

            - ``"stretch"`` (default): The width of the element matches the
              width of the parent container.
            - ``"content"``: The width of the element matches the width of its
              content, but doesn't exceed 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
        >>>
        >>> st.latex(r'''
        ...     a + ar + a r^2 + a r^3 + \cdots + a r^{n-1} =
        ...     \sum_{k=0}^{n-1} ar^k =
        ...     a \left(\frac{1-r^{n}}{1-r}\right)
        ...     ''')

        r   Nz$$
z
$$Tr   ©r   r   r!   )r   Úsympyr5   r#   r   r$   r&   ÚLATEXr(   r   r   r   r)   r*   )r+   r$   r   r   r8   Úlatex_protor"   s          r.   r5   zMarkdownMixin.latex  s�   € ôl ˜tÔ$Ûà�5—;‘;˜tÓ$ˆDä#“oˆØ!¤*¨TÓ"2Ð!3°4Ð8ˆÔÜ#0×#5Ñ#5×#;Ñ#;ˆÔ ÙØ#ˆKÔä�u¨DÕ1Ü$¨5Ô1ˆà�w‰w×Ñ 
¨KÀ}ÐÓUÐUr/   Údividerr7   c               óØ   — t        «       }t        |_        t         j                  j                  |_        t        |d¬«       t        |¬«      }| j                  j                  d||¬«      S )a>  Display a horizontal rule.

        .. note::
            You can achieve the same effect with st.write("---") or
            even just "---" in your script (via magic).

        Parameters
        ----------
        width : "stretch" or int
            The width of the divider element. This can be one of the following:

            - ``"stretch"`` (default): 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
        >>>
        >>> st.divider()

        Fr   r7   r   r!   )
r#   r   r$   r&   ÚDIVIDERr(   r   r   r)   r*   )r+   r   Údivider_protor"   s       r.   r;   zMarkdownMixin.dividera  sW   € ô8 &›ˆÜ@ˆÔÜ%2×%7Ñ%7×%?Ñ%?ˆÔ"ä�u¨EÕ2Ü$¨5Ô1ˆà�w‰w×Ñ 
¨MÈÐÓWÐWr/   ÚbadgeÚblueÚcontent)ÚiconÚcolorr   r   c               ó\  — |�t        |«      dz   nd}|j                  dd«      j                  dd«      }t        «       }d|› d|› |› d�|_        t        j                  j
                  |_        |�||_        t        |d	¬
«       t        |¬«      }	| j                  j                  d||	¬«      S )uù  Display a colored badge with an icon and label.

        This is a thin wrapper around the color-badge Markdown directive.
        The following are equivalent:

        - ``st.markdown(":blue-badge[Home]")``
        - ``st.badge("Home", color="blue")``

        .. note::
            You can insert badges everywhere Streamlit supports Markdown by
            using the color-badge Markdown directive. See ``st.markdown`` for
            more information.

        Parameters
        ----------
        label : str
            The label to display in the badge. The label can optionally contain
            GitHub-flavored Markdown of the following types: Bold, Italics,
            Strikethroughs, Inline Code.

            See the ``body`` parameter of |st.markdown|_ for additional,
            supported Markdown directives. Because this command escapes square
            brackets (``[ ]``) in this parameter, any directive requiring
            square brackets is not supported.

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

        icon : str or None
            An optional emoji or icon to display next to the badge label. If
            ``icon`` is ``None`` (default), no icon is displayed. If ``icon``
            is a string, the following options are valid:

            - A single-character emoji. For example, you can set ``icon="ðŸš¨"``
              or ``icon="ðŸ”¥"``. Emoji short codes are not supported.

            - An icon from the Material Symbols library (rounded style) in the
              format ``":material/icon_name:"`` where "icon_name" is the name
              of the icon in snake case.

              For example, ``icon=":material/thumb_up:"`` will display the
              Thumb Up icon. Find additional icons in the `Material Symbols               <https://fonts.google.com/icons?icon.set=Material+Symbols&icon.style=Rounded>`_
              font library.

        color : str
            The color to use for the badge. This defaults to ``"blue"``.

            This can be one of the following supported colors: red, orange,
            yellow, blue, green, violet, gray/grey, or primary. If you use
            ``"primary"``, Streamlit will use the default primary accent color
            unless you set the ``theme.primaryColor`` configuration option.

        width : "content", "stretch", or int
            The width of the badge 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.

        help : str or None
            A tooltip to display when hovering over the badge. If this is
            ``None`` (default), no tooltip is displayed.

            The tooltip can optionally contain GitHub-flavored Markdown,
            including the Markdown directives described in the ``body``
            parameter of ``st.markdown``.

        Examples
        --------
        Create standalone badges with ``st.badge`` (with or without icons). If
        you want to have multiple, side-by-side badges, you can use the
        Markdown directive in ``st.markdown``.

        >>> import streamlit as st
        >>>
        >>> st.badge("New")
        >>> st.badge("Success", icon=":material/check:", color="green")
        >>>
        >>> st.markdown(
        >>>     ":violet-badge[:material/star: Favorite] :orange-badge[âš ï¸� Needs review] :gray-badge[Deprecated]"
        >>> )

        .. output::
            https://doc-badge.streamlit.app/
            height: 220px

        ú Ú ú[z\[ú]z\]ú:z-badge[Tr   r7   r   r!   )r   Úreplacer#   r$   r&   r'   r(   r   r   r   r)   r*   )
r+   ÚlabelrB   rC   r   r   Úicon_strÚescaped_labelÚbadge_protor"   s
             r.   r?   zMarkdownMixin.badge†  s¯   € ðd :>Ð9IÔ)¨$Ó/°#Ò5Èrˆð Ÿ™ c¨5Ó1×9Ñ9¸#¸uÓEˆä#“oˆØ˜u˜g W¨X¨J°}°oÀQÐGˆÔÜ#0×#5Ñ#5×#<Ñ#<ˆÔ àÐØ#ˆKÔä�u¨DÕ1Ü$¨5Ô1ˆà�w‰w×Ñ 
¨KÀ}ÐÓUÐUr/   c                ó   — t        d| «      S )zGet our DeltaGenerator.r   )r   )r+   s    r.   r)   zMarkdownMixin.dg	  s   € ô Ð$ dÓ+Ð+r/   )F)r$   r   r,   Úboolr   ú
str | Noner   r
   r   r	   Úreturnr   )r$   zSupportsStr | sympy.Exprr   rQ   r   r
   rR   r   )r   r   rR   r   )rK   ÚstrrB   rQ   rC   zXLiteral['red', 'orange', 'yellow', 'blue', 'green', 'violet', 'gray', 'grey', 'primary']r   r
   r   rQ   rR   r   )rR   r   )Ú__name__Ú
__module__Ú__qualname__r   r   r0   r5   r;   r?   Úpropertyr)   © r/   r.   r   r   '   sñ  „ Ù�JÓð #(ðOYð
  Ø Ø(.ñOYàðOYð  ðOYð
 ðOYð ðOYð &ðOYð 
òOYó  ðOYñb �IÓð #(ð^Xð
  Ø Ø(.ñ^Xàð^Xð  ð^Xð
 ð^Xð ð^Xð &ð^Xð 
ò^Xó ð^Xñ@ �GÓð
  Ø ñCVà&ðCVð ð	CVð
 ðCVð 
òCVó ðCVñJ �IÓØ6?ô "Xó ð"XñH �GÓð
  ð Ø Øñ#@Vàð@Vð ð	@Vð


ð@Vð  ð!@Vð" ð#@Vð$ 
ò%@Vó ð@VðD ò,ó ñ,r/   r   )Ú
__future__r   Útypingr   r   r   r   Ú#streamlit.elements.lib.layout_utilsr   r	   r
   r   r   Ústreamlit.proto.Markdown_pb2r   r#   Ústreamlit.runtime.metrics_utilr   Ústreamlit.string_utilr   r   Ústreamlit.type_utilr   r   r8   Ústreamlit.delta_generatorr   r   Ú__annotations__r   rX   r/   r.   ú<module>rb      sI   ðö #ç 6Ó 6÷õ õ CÝ 9ß Dß @áÛå8à-2Ð # UÓ 2÷e,ò e,r/   