
    ch!                        S SK Jr  S SKJrJr  S SKJr  S SKJr  S SK	J
r  S SKJr  \(       a  S SKJr   " S S	5      r    S           SS jjrg
)    )annotations)TYPE_CHECKINGcast)LayoutConfig)StreamlitAPIException)IFrame)gather_metrics)DeltaGeneratorc                      \ rS rSr\" S5         S
SS.           SS jjj5       r\" S5         S
SS.           SS jjj5       r\SS j5       rS	r	g)IframeMixin   _iframeN)	tab_indexc                   [        5       n[        UUUUS9  [        Ub  UOSUb  UOSS9nU R                  R	                  SXgS9$ )a  Load a remote URL in an iframe.

To use this function, import it from the ``streamlit.components.v1``
module.

.. warning::
    Using ``st.components.v1.iframe`` directly (instead of importing
    its module) is deprecated and will be disallowed in a later version.

Parameters
----------
src : str
    The URL of the page to embed.

width : int
    The width of the iframe in CSS pixels. By default, this is the
    app's default element width.

height : int
    The height of the frame in CSS pixels. By default, this is ``150``.

scrolling : bool
    Whether to allow scrolling in the iframe. If this ``False``
    (default), Streamlit crops any content larger than the iframe and
    does not show a scrollbar. If this is ``True``, Streamlit shows a
    scrollbar when the content is larger than the iframe.

tab_index : int or None
    Specifies how and if the iframe is sequentially focusable.
    Users typically use the ``Tab`` key for sequential focus
    navigation.

    This can be one of the following values:

    - ``None`` (default): Uses the browser's default behavior.
    - ``-1``: Removes the iframe from sequential navigation, but still
      allows it to be focused programmatically.
    - ``0``: Includes the iframe in sequential navigation in the order
      it appears in the document but after all elements with a positive
      ``tab_index``.
    - Positive integer: Includes the iframe in sequential navigation.
      Elements are navigated in ascending order of their positive
      ``tab_index``.

    For more information, see the `tabindex
    <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex>`_
    documentation on MDN.

Example
-------

>>> import streamlit.components.v1 as components
>>>
>>> components.iframe("https://example.com", height=500)

)src	scrollingr   stretch   widthheightiframelayout_configIFrameProtomarshallr   dg_enqueue)selfr   r   r   r   r   iframe_protor   s           lC:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\streamlit/elements/iframe.pyr   IframeMixin._iframe   s\    D #}		
 % ,%)#/6S
 ww,TT    _htmlc                   [        5       n[        UUUUS9  [        Ub  UOSUb  UOSS9nU R                  R	                  SXgS9$ )a  Display an HTML string in an iframe.

To use this function, import it from the ``streamlit.components.v1``
module.

If you want to insert HTML text into your app without an iframe, try
``st.html`` instead.

.. warning::
    Using ``st.components.v1.html`` directly (instead of importing
    its module) is deprecated and will be disallowed in a later version.

Parameters
----------
html : str
    The HTML string to embed in the iframe.

width : int
    The width of the iframe in CSS pixels. By default, this is the
    app's default element width.

height : int
    The height of the frame in CSS pixels. By default, this is ``150``.

scrolling : bool
    Whether to allow scrolling in the iframe. If this ``False``
    (default), Streamlit crops any content larger than the iframe and
    does not show a scrollbar. If this is ``True``, Streamlit shows a
    scrollbar when the content is larger than the iframe.

tab_index : int or None
    Specifies how and if the iframe is sequentially focusable.
    Users typically use the ``Tab`` key for sequential focus
    navigation.

    This can be one of the following values:

    - ``None`` (default): Uses the browser's default behavior.
    - ``-1``: Removes the iframe from sequential navigation, but still
      allows it to be focused programmatically.
    - ``0``: Includes the iframe in sequential navigation in the order
      it appears in the document but after all elements with a positive
      ``tab_index``.
    - Positive integer: Includes the iframe in sequential navigation.
      Elements are navigated in ascending order of their positive
      ``tab_index``.

    For more information, see the `tabindex
    <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex>`_
    documentation on MDN.

Example
-------

>>> import streamlit.components.v1 as components
>>>
>>> components.html(
>>>     "<p><span style='text-decoration: line-through double red;'>Oops</span>!</p>"
>>> )

)srcdocr   r   r   r   r   r   r   r   )r    htmlr   r   r   r   r!   r   s           r"   r%   IframeMixin._htmlm   s\    N #}		
 % ,%)#/6S
 ww,TTr$   c                    [        SU 5      $ )zGet our DeltaGenerator.r
   )r   )r    s    r"   r   IframeMixin.dg   s     $d++r$    )NNF)r   strr   
int | Noner   r.   r   boolr   r.   returnr
   )r(   r-   r   r.   r   r.   r   r/   r   r.   r0   r
   )r0   r
   )
__name__
__module____qualname____firstlineno__r	   r   r%   propertyr   __static_attributes__r,   r$   r"   r   r      s
   I !!MU !%MUMU MU 	MU
 MU MU 
MU MU^ G !!RU !%RURU RU 	RU
 RU RU 
RU RUh , ,r$   r   Nc                    Ub  Xl         Ub  X l        X0l        UbB  [        U[        5      (       a  [        U[
        5      (       d  US:  d  [        S5      eX@l        gg)aS  Marshalls data into an IFrame proto.

These parameters correspond directly to <iframe> attributes, which are
described in more detail at
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe.

Parameters
----------
proto : IFrame protobuf
    The protobuf object to marshall data into.
src : str
    The URL of the page to embed.
srcdoc : str
    Inline HTML to embed. Overrides src.
scrolling : bool
    If true, show a scrollbar when the content is larger than the iframe.
    Otherwise, never show a scrollbar.
tab_index : int, optional
    Specifies the tab order of the iframe.

Nz6tab_index must be None, -1, or a non-negative integer.)r   r'   r   
isinstanceintr/   r   r   )protor   r'   r   r   s        r"   r   r      sc    8 	O y#&&y$//R'H  $ r$   )NNFN)r;   r   r   
str | Noner'   r<   r   r/   r   r.   r0   None)
__future__r   typingr   r   #streamlit.elements.lib.layout_utilsr   streamlit.errorsr   streamlit.proto.IFrame_pb2r   r   streamlit.runtime.metrics_utilr	   streamlit.delta_generatorr
   r   r   r,   r$   r"   <module>rE      sw    # & < 2 < 98i, i,\  /$/$	/$ /$ 	/$
 /$ 
/$r$   