
    chr                    2   % S SK Jr  S SKrS SKrS SKJr  S SKJr  S SKJ	r	J
r
JrJr  S SKJr  S SKJrJrJr  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   S SK!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K-Jr.  S SK/J0r0  \\1\\2\Rf                  \Rh                  \Rj                  SS4   r6S\7S'   \\1\\2\Rf                  \8\1\\1\\2\Rf                  4   4   S4   r9S\7S'   \\:\;\\14   r<S\7S'   Sr=S\7S'    " S S5      r>S r?S\7S!'   S*S" jr@          S+S# jrA         S,                         S-S$ jjrB      S.S% jrCS/S& jrDS0S' jrES1S( jrF        S2                       S3S) jjrGg)4    )annotationsN)	timedelta)Path)TYPE_CHECKINGFinalUnioncast)	TypeAlias)runtime	type_utilurl_util)current_form_id)WidthWithoutContentvalidate_width)process_subtitle_data)compute_and_register_element_id)StreamlitAPIException)Audio)Video)WidthConfig)caching)gather_metrics)time_to_seconds)Any)typing)DeltaGeneratornpt.NDArray[Any]r
   	MediaDataSubtitleData	MediaTimea   Failed to convert '{param_name}' to a timedelta. Please use a string in a format supported by [Pandas Timedelta constructor](https://pandas.pydata.org/docs/reference/api/pandas.Timedelta.html), e.g. `"10s"`, `"15 seconds"`, or `"1h23s"`. Got: {param_value}r   TIMEDELTA_PARSE_ERROR_MESSAGEc            	          \ rS rSr\" S5        SSSSSSS.                 SS jjj5       r\" S5        SSSSSSSS	.                   SS
 jjj5       r\SS j5       rSr	g)
MediaMixinH   audioNFstretch)sample_rateend_timeloopautoplaywidthc                  [        X55      u  p5[        U5        [        5       n	[        R                  " US5      n
U
(       a  Uc  [        S5      eU
(       d  Ub  U R                  R                  S5        U R                  R                  5       n[        UU	UUUUUUU[        U R                  5      US9  U R                  R                  SU	5      $ )aK  Display an audio player.

Parameters
----------
data : str, Path, bytes, BytesIO, numpy.ndarray, or file
    The audio to play. This can be one of the following:

    - A URL (string) for a hosted audio file.
    - A path to a local audio file. The path can be a ``str``
      or ``Path`` object. Paths can be absolute or relative to the
      working directory (where you execute ``streamlit run``).
    - Raw audio data. Raw data formats must include all necessary file
      headers to match the file format specified via ``format``.

    If ``data`` is a NumPy array, it must either be a 1D array of the
    waveform or a 2D array of shape (C, S) where C is the number of
    channels and S is the number of samples. See the default channel
    order at
    http://msdn.microsoft.com/en-us/library/windows/hardware/dn653308(v=vs.85).aspx

format : str
    The MIME type for the audio file. This defaults to ``"audio/wav"``.
    For more information about MIME types, see
    https://www.iana.org/assignments/media-types/media-types.xhtml.

start_time : int, float, timedelta, str, or None
    The time from which the element should start playing. This can be
    one of the following:

    - ``None`` (default): The element plays from the beginning.
    - An ``int`` or ``float`` specifying the time in seconds. ``float``
      values are rounded down to whole seconds.
    - A string specifying the time in a format supported by `Pandas'
      Timedelta constructor <https://pandas.pydata.org/docs/reference/api/pandas.Timedelta.html>`_,
      e.g. ``"2 minute"``, ``"20s"``, or ``"1m14s"``.
    - A ``timedelta`` object from `Python's built-in datetime library
      <https://docs.python.org/3/library/datetime.html#timedelta-objects>`_,
      e.g. ``timedelta(seconds=70)``.
sample_rate : int or None
    The sample rate of the audio data in samples per second. This is
    only required if ``data`` is a NumPy array.
end_time : int, float, timedelta, str, or None
    The time at which the element should stop playing. This can be
    one of the following:

    - ``None`` (default): The element plays through to the end.
    - An ``int`` or ``float`` specifying the time in seconds. ``float``
      values are rounded down to whole seconds.
    - A string specifying the time in a format supported by `Pandas'
      Timedelta constructor <https://pandas.pydata.org/docs/reference/api/pandas.Timedelta.html>`_,
      e.g. ``"2 minute"``, ``"20s"``, or ``"1m14s"``.
    - A ``timedelta`` object from `Python's built-in datetime library
      <https://docs.python.org/3/library/datetime.html#timedelta-objects>`_,
      e.g. ``timedelta(seconds=70)``.
loop : bool
    Whether the audio should loop playback.
autoplay : bool
    Whether the audio file should start playing automatically. This is
    ``False`` by default. Browsers will not autoplay audio files if the
    user has not interacted with the page by clicking somewhere.
width : "stretch" or int
    The width of the audio player 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.

Examples
--------
To display an audio player for a local file, specify the file's string
path and format.

>>> import streamlit as st
>>>
>>> st.audio("cat-purr.mp3", format="audio/mpeg", loop=True)

.. output::
   https://doc-audio-purr.streamlit.app/
   height: 250px

You can also pass ``bytes`` or ``numpy.ndarray`` objects to ``st.audio``.

>>> import streamlit as st
>>> import numpy as np
>>>
>>> audio_file = open("myaudio.ogg", "rb")
>>> audio_bytes = audio_file.read()
>>>
>>> st.audio(audio_bytes, format="audio/ogg")
>>>
>>> sample_rate = 44100  # 44100 samples per second
>>> seconds = 2  # Note duration of 2 seconds
>>> frequency_la = 440  # Our played note will be 440 Hz
>>> # Generate array with seconds*sample_rate steps, ranging between 0 and seconds
>>> t = np.linspace(0, seconds, seconds * sample_rate, False)
>>> # Generate a 440 Hz sine wave
>>> note_la = np.sin(frequency_la * t * 2 * np.pi)
>>>
>>> st.audio(note_la, sample_rate=sample_rate)

.. output::
   https://doc-audio.streamlit.app/
   height: 865px

numpy.ndarrayz=`sample_rate` must be specified when `data` is a numpy array.zGWarning: `sample_rate` will be ignored since data is not a numpy array.form_idr+   r%   )_parse_start_time_end_timer   
AudioProtor   is_typer   dgwarning_get_delta_path_strmarshall_audior   _enqueue)selfdataformat
start_timer'   r(   r)   r*   r+   audio_protois_data_numpy_arraycoordinatess               kC:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\streamlit/elements/media.pyr%   MediaMixin.audioI   s    t  :*O
u l'//oF;#6'O  #{'>GGOO gg113#DGG,	
 ww55    video)	subtitlesr(   r)   r*   mutedr+   c                   [        X55      u  p5[        U	5        [        5       n
U R                  R	                  5       n[        UU
UUUUUUUU[        U R                  5      U	S9  U R                  R                  SU
5      $ )a  Display a video player.

Parameters
----------
data : str, Path, bytes, io.BytesIO, numpy.ndarray, or file
    The video to play. This can be one of the following:

    - A URL (string) for a hosted video file, including YouTube URLs.
    - A path to a local video file. The path can be a ``str``
      or ``Path`` object. Paths can be absolute or relative to the
      working directory (where you execute ``streamlit run``).
    - Raw video data. Raw data formats must include all necessary file
      headers to match the file format specified via ``format``.

format : str
    The MIME type for the video file. This defaults to ``"video/mp4"``.
    For more information about MIME types, see
    https://www.iana.org/assignments/media-types/media-types.xhtml.

start_time : int, float, timedelta, str, or None
    The time from which the element should start playing. This can be
    one of the following:

    - ``None`` (default): The element plays from the beginning.
    - An ``int`` or ``float`` specifying the time in seconds. ``float``
      values are rounded down to whole seconds.
    - A string specifying the time in a format supported by `Pandas'
      Timedelta constructor <https://pandas.pydata.org/docs/reference/api/pandas.Timedelta.html>`_,
      e.g. ``"2 minute"``, ``"20s"``, or ``"1m14s"``.
    - A ``timedelta`` object from `Python's built-in datetime library
      <https://docs.python.org/3/library/datetime.html#timedelta-objects>`_,
      e.g. ``timedelta(seconds=70)``.
subtitles : str, bytes, Path, io.BytesIO, or dict
    Optional subtitle data for the video, supporting several input types:

    - ``None`` (default): No subtitles.

    - A string, bytes, or Path: File path to a subtitle file in
      ``.vtt`` or ``.srt`` formats, or the raw content of subtitles
      conforming to these formats. Paths can be absolute or relative to
      the working directory (where you execute ``streamlit run``).
      If providing raw content, the string must adhere to the WebVTT or
      SRT format specifications.

    - io.BytesIO: A BytesIO stream that contains valid ``.vtt`` or ``.srt``
      formatted subtitle data.

    - A dictionary: Pairs of labels and file paths or raw subtitle content in
      ``.vtt`` or ``.srt`` formats to enable multiple subtitle tracks.
      The label will be shown in the video player. Example:
      ``{"English": "path/to/english.vtt", "French": "path/to/french.srt"}``

    When provided, subtitles are displayed by default. For multiple
    tracks, the first one is displayed by default. If you don't want any
    subtitles displayed by default, use an empty string for the value
    in a dictrionary's first pair: ``{"None": "", "English": "path/to/english.vtt"}``

    Not supported for YouTube videos.
end_time : int, float, timedelta, str, or None
    The time at which the element should stop playing. This can be
    one of the following:

    - ``None`` (default): The element plays through to the end.
    - An ``int`` or ``float`` specifying the time in seconds. ``float``
      values are rounded down to whole seconds.
    - A string specifying the time in a format supported by `Pandas'
      Timedelta constructor <https://pandas.pydata.org/docs/reference/api/pandas.Timedelta.html>`_,
      e.g. ``"2 minute"``, ``"20s"``, or ``"1m14s"``.
    - A ``timedelta`` object from `Python's built-in datetime library
      <https://docs.python.org/3/library/datetime.html#timedelta-objects>`_,
      e.g. ``timedelta(seconds=70)``.
loop : bool
    Whether the video should loop playback.
autoplay : bool
    Whether the video should start playing automatically. This is
    ``False`` by default. Browsers will not autoplay unmuted videos
    if the user has not interacted with the page by clicking somewhere.
    To enable autoplay without user interaction, you must also set
    ``muted=True``.
muted : bool
    Whether the video should play with the audio silenced. This is
    ``False`` by default. Use this in conjunction with ``autoplay=True``
    to enable autoplay without user interaction.
width : "stretch" or int
    The width of the video player 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
>>>
>>> video_file = open("myvideo.mp4", "rb")
>>> video_bytes = video_file.read()
>>>
>>> st.video(video_bytes)

.. output::
   https://doc-video.streamlit.app/
   height: 700px

When you include subtitles, they will be turned on by default. A viewer
can turn off the subtitles (or captions) from the browser's default video
control menu, usually located in the lower-right corner of the video.

Here is a simple VTT file (``subtitles.vtt``):

>>> WEBVTT
>>>
>>> 0:00:01.000 --> 0:00:02.000
>>> Look!
>>>
>>> 0:00:03.000 --> 0:00:05.000
>>> Look at the pretty stars!

If the above VTT file lives in the same directory as your app, you can
add subtitles like so:

>>> import streamlit as st
>>>
>>> VIDEO_URL = "https://example.com/not-youtube.mp4"
>>> st.video(VIDEO_URL, subtitles="subtitles.vtt")

.. output::
   https://doc-video-subtitles.streamlit.app/
   height: 700px

See additional examples of supported subtitle input types in our
`video subtitles feature demo <https://doc-video-subtitle-inputs.streamlit.app/>`_.

.. note::
   Some videos may not display if they are encoded using MP4V (which is an export option in OpenCV),
   as this codec is not widely supported by browsers. Converting your video to H.264 will allow
   the video to be displayed in Streamlit.
   See this `StackOverflow post <https://stackoverflow.com/a/49535220/2394542>`_ or this
   `Streamlit forum post <https://discuss.streamlit.io/t/st-video-doesnt-show-opencv-generated-mp4/3193/2>`_
   for more information.

r.   rB   )r0   r   
VideoProtor3   r5   marshall_videor   r7   )r8   r9   r:   r;   rC   r(   r)   r*   rD   r+   video_protor>   s               r?   rB   MediaMixin.video   s    ~  :*O
u lgg113#DGG,	
 ww55rA   c                    [        SU 5      $ )zGet our DeltaGenerator.r   )r	   )r8   s    r?   r3   MediaMixin.dg  s     $d++rA    )	audio/wavr   )r9   r   r:   strr;   r    r'   
int | Noner(   MediaTime | Noner)   boolr*   rQ   r+   r   returnr   )	video/mp4r   )r9   r   r:   rN   r;   r    rC   r   r(   rP   r)   rQ   r*   rQ   rD   rQ   r+   r   rR   r   )rR   r   )
__name__
__module____qualname____firstlineno__r   r%   rB   propertyr3   __static_attributes__rL   rA   r?   r#   r#   H   sZ   G " !	W6 #'%)%.W6W6 W6 	W6  W6 #W6 W6 W6 #W6 
W6 W6r G " !	q6 #'%)%.q6q6 q6 	q6  q6 #q6 q6 q6 q6 #q6 
q6 q6f , ,rA   r#   a  ^((https?://(?:www\.)?(?:m\.)?youtube\.com))/((?:oembed\?url=https?%3A//(?:www\.)youtube.com/watch\?(?:v%3D)(?P<video_id_1>[\w\-]{10,20})&format=json)|(?:attribution_link\?a=.*watch(?:%3Fv%3D|%3Fv%3D)(?P<video_id_2>[\w\-]{10,20}))(?:%26feature.*))|(https?:)?(\/\/)?((www\.|m\.)?youtube(-nocookie)?\.com\/((watch)?\?(app=desktop&)?(feature=\w*&)?v=|embed\/|v\/|e\/)|youtu\.be\/)(?P<video_id_3>[\w\-]{10,20})
YOUTUBE_REc                    [         R                  " [        U 5      nU(       aF  UR                  S5      =(       d)    UR                  S5      =(       d    UR                  S5      nSU 3$ g)aZ  Return whether URL is any kind of YouTube embed or watch link.  If so,
reshape URL into an embed link suitable for use in an iframe.

If not a YouTube URL, return None.

Parameters
----------
    url : str

Example
-------
>>> print(_reshape_youtube_url("https://youtu.be/_T8LGqJtuGc"))

.. output::
    https://www.youtube.com/embed/_T8LGqJtuGc

video_id_1
video_id_2
video_id_3zhttps://www.youtube.com/embed/N)rematchrZ   group)urlr`   codes      r?   _reshape_youtube_urlrd     s\    " HHZ%EKK% ){{<(){{<( 	
 0v66rA   c                   Uc  g[        U[        [        45      (       a  UnO[        U[        5      (       a  [        U5      nO[        U[        R
                  5      (       a"  UR                  S5        UR                  5       nO[        U[        R                  [        R                  45      (       a(  UR                  S5        UR                  5       nUc  gUnOD[        R                  " US5      (       a  UR                  5       nO[        S[        U5       35      e[         R"                  " 5       (       aG  [         R$                  " 5       R&                  R)                  XCU 5      n[*        R,                  " XCU 5        OSnXal        g)a  Fill audio or video proto based on contents of data.

Given a string, check if it's a url; if so, send it out without modification.
Otherwise assume strings are filenames and let any OS errors raise.

Load data either from file or through bytes-processing methods into a
MediaFile object.  Pack proto with generated Tornado-based URL.

(When running in "raw" mode, we won't actually load data into the
MediaFileManager, and we'll return an empty URL.)
Nr   r-   zInvalid binary data format:  )
isinstancerN   bytesr   ioBytesIOseekgetvalue	RawIOBaseBufferedReaderreadr   r2   tobytesRuntimeErrortyper   existsget_instancemedia_file_mgraddr   save_media_datarb   )r>   protor9   mimetypedata_or_filename	read_datafile_urls          r?   _marshall_av_mediar}     s+   & | $e%%	D$		t9	D"**	%	%		!==?	D2<<):):;	<	<		!IIK	$			4	1	1<<>9$t*FGG~~'')88<<
 	 0KH IrA   c                   US:  d  Ub  Xd::  a  [        S5      eXAl        Xl        Ub  Xal        Xql        [        5       n[        U[        5      (       a  Xl        OSUl	        UR                  R                  U5        [        R                  R                  Ul        [        U[         5      (       a  [#        U5      n[        U["        5      (       ak  [$        R&                  " USS9(       aQ  [)        U5      =n(       a8  Xl        [        R                  R,                  Ul        U(       a  [        S5      eOX!l        O[/        XX#5        U(       a  / n[        U["        [0        [2        R4                  [         45      (       a  UR7                  SU45        OM[        U[8        5      (       a   UR;                  UR=                  5       5        O[        S	[        U5       S
35      eU HK  u  nnUR>                  RA                  5       nU=(       d    SUl!        U  SU S3n [E        UUU5      Ul        MM     U(       a)  Xl%        [M        SSU
UR*                  UUUUUU	US9Ul'        gg! [F        [H        4 a  n[        SU 35      UeSnAff = f)a>
  Marshalls a video proto, using url processors as needed.

Parameters
----------
coordinates : str
proto : the proto to fill. Must have a string field called "data".
data : str, Path, bytes, BytesIO, numpy.ndarray, or file opened with
       io.open().
    Raw video data or a string with a URL pointing to the video
    to load. Includes support for YouTube URLs.
    If passing the raw data, this must include headers and any other
    bytes required in the actual file.
mimetype : str
    The mime type for the video file. Defaults to 'video/mp4'.
    See https://tools.ietf.org/html/rfc4281 for more info.
start_time : int
    The time from which this element should start playing. (default: 0)
subtitles: str, dict, or io.BytesIO
    Optional subtitle data for the video, supporting several input types:
    - None (default): No subtitles.
    - A string: File path to a subtitle file in '.vtt' or '.srt' formats, or the raw content
        of subtitles conforming to these formats. If providing raw content, the string must
        adhere to the WebVTT or SRT format specifications.
    - A dictionary: Pairs of labels and file paths or raw subtitle content in '.vtt' or '.srt' formats.
        Enables multiple subtitle tracks. The label will be shown in the video player.
        Example: {'English': 'path/to/english.vtt', 'French': 'path/to/french.srt'}
    - io.BytesIO: A BytesIO stream that contains valid '.vtt' or '.srt' formatted subtitle data.
    When provided, subtitles are displayed by default. For multiple tracks, the first one is displayed by default.
    Not supported for YouTube videos.
end_time: int
        The time at which this element should stop playing
loop: bool
    Whether the video should loop playback.
autoplay: bool
    Whether the video should start playing automatically.
    Browsers will not autoplay video files if the user has not interacted with
    the page yet, for example by clicking on the page while it loads.
    To enable autoplay without user interaction, you can set muted=True.
    Defaults to False.
muted: bool
    Whether the video should play with the audio silenced. This can be used to
    enable autoplay without user interaction. Defaults to False.
form_id: str | None
    The ID of the form that this element is placed in. Provide None if
    the element is not placed in a form.
width: int or "stretch"
    The width of the video player. This can be one of the following:
    - An int: The width in pixels, e.g. 200 for a width of 200 pixels.
    - "stretch": The default value. The video player stretches to fill
      available space in its container.
r   Nz,Invalid start_time and end_time combination.Thttphttpsr9   allowed_schemasz/Subtitles are not supported for YouTube videos.defaultz%Unsupported data type for subtitles: z/. Only str (file paths) and dict are supported.rf   z	[subtitle]z)Failed to process the provided subtitle: rB   )
user_keyr/   rb   ry   r;   r(   r)   r*   rD   r+   )(r   r;   rD   r(   r)   r   rg   intpixel_widthuse_stretchwidth_configCopyFromrF   TypeNATIVErr   r   rN   r   is_urlrd   rb   YOUTUBE_IFRAMEr}   rh   ri   rj   appenddictextenditemsrC   rv   labelr   	TypeError
ValueErrorr*   r   id)r>   rx   r9   ry   r;   rC   r(   r)   r*   rD   r/   r+   r   youtube_urlsubtitle_itemsr   subtitle_datasubsubtitle_coordinatesoriginal_errs                       r?   rG   rG     sV   D A~(.83I#$RSS!K!J=L%#( #' 	- ''EJ$4y$7" /t44;4#I#77EJ+E  
 I;t>LN i#ubjj$!?@@!!9i"89	4((!!)//"34'7Y7H I@ A 
 %3 E=//%%'CCI '2])E7!#D $/(- %3& !2		!
  z* $+?wG#$$s   I##J3JJc                <    [        U SS9nUc  [        e[        U5      n  [        USS9nUb  [        U5      nX4$ ! [        [        4 a!    [        R                  SU S9n[        U5      Sef = f! [         a!    [        R                  SUS9n[        U5      Sef = f)z5Parse start_time and end_time and return them as int.F)coerce_none_to_infNr;   )
param_nameparam_valuer(   )r   r   r   r   r!   r:   )r;   r(   maybe_start_time	error_msgs       r?   r0   r0     s    
	9*:%P#)*
9"8F8}H ! ":. 9188# 9 
	 $I.D8	9 ! 9188!x 9 
	 $I.D8	9s   < A0 1A-0+Bc                $   SSK nUR                  U [        S9n[        UR                  5      S:X  a  SnON[        UR                  5      S:X  a*  UR                  S   nUR
                  R                  5       nO[        S5      eUR                  S:X  a+  UR                  UR                  5      R                  5       U4$ UR                  UR                  U5      5      nX$-  S-  nUR                  UR                  5      nUR                  5       U4$ )a  Validates and normalizes numpy array data.
We validate numpy array shape (should be 1d or 2d)
We normalize input data to int16 [-32768, 32767] range.

Parameters
----------
data : numpy array
    numpy array to be validated and normalized

Returns
-------
Tuple of (bytes, int)
    (bytes, nchan)
    where
     - bytes : bytes of normalized numpy array converted to int16
     - nchan : number of channels for audio signal. 1 for mono, or 2 for stereo.
r   N)dtype      z1Numpy array audio input must be a 1D or 2D array.i  )numpyarrayfloatlenshapeTravelr   sizeastypeint16rp   maxabs)r9   nptransformed_datanchanmax_abs_valuenp_arrayscaled_datas          r?   _validate_and_normalizer     s    ( )+$e)D
!!"a'	##	$	)
 !&&q)+--335#$WXX!&&rxx088:EAA&(ffRVV4D-E&FM
 !0E9H//"((+K %''rA   c                   SSK n[        U 5      u  p4[        R                  " 5        oRR	                  USS9 nUR                  U5        UR                  U5        UR                  S5        UR                  SS5        UR                  U5        UR                  5       sSSS5        sSSS5        $ ! , (       d  f       O= fSSS5        g! , (       d  f       g= f)z
Transform a numpy array to a PCM bytestring.

We use code from IPython display module to convert numpy array to wave bytes
https://github.com/ipython/ipython/blob/1015c392f3d50cf4ff3e9f29beede8c1abfdcb2a/IPython/lib/display.py#L146
r   Nwb)moder   NONE)waver   ri   rj   opensetnchannelssetframeratesetsampwidthsetcomptypewriteframesrl   )r9   r'   r   scaledr   fpwaveobjs          r?   	_make_wavr     s     +D1MF	YYrY5U#[)QFF+F#{{} 6555s#   C
A&B0	C
0
B>	:C


Cc                p    [         R                  " U S5      (       a  Ub  [        [        SU 5      U5      n U $ )z:Convert data to wav bytes if the data type is numpy array.r-   r   )r   r2   r   r	   )r9   r'   s     r?   _maybe_convert_to_wav_bytesr     s3    //K4K0$7EKrA   c                   XAl         Ub  Xal        Xql        [        5       n[	        U
[
        5      (       a  Xl        OSUl        UR                  R                  U5        [	        U[        5      (       a  [        U5      n[	        U[        5      (       a!  [        R                  " USS9(       a  X!l        O[        X%5      n[!        XX#5        U(       a)  Xl        [%        SSU	UR                  UUUUUUU
S9Ul        gg)a  Marshalls an audio proto, using data and url processors as needed.

Parameters
----------
coordinates : str
proto : The proto to fill. Must have a string field called "url".
data : str, Path, bytes, BytesIO, numpy.ndarray, or file opened with
        io.open()
    Raw audio data or a string with a URL pointing to the file to load.
    If passing the raw data, this must include headers and any other bytes
    required in the actual file.
mimetype : str
    The mime type for the audio file. Defaults to "audio/wav".
    See https://tools.ietf.org/html/rfc4281 for more info.
start_time : int
    The time from which this element should start playing. (default: 0)
sample_rate: int or None
    Optional param to provide sample_rate in case of numpy array
end_time: int
    The time at which this element should stop playing
loop: bool
    Whether the audio should loop playback.
autoplay : bool
    Whether the audio should start playing automatically.
    Browsers will not autoplay audio files if the user has not interacted with the page yet.
form_id: str | None
    The ID of the form that this element is placed in. Provide None if
    the element is not placed in a form.
width: int or "stretch"
    The width of the audio player. This can be one of the following:
    - An int: The width in pixels, e.g. 200 for a width of 200 pixels.
    - "stretch": The default value. The audio player stretches to fill
      available space in its container.
NTr   r   r%   )
r   r/   rb   ry   r;   r'   r(   r)   r*   r+   )r;   r(   r)   r   rg   r   r   r   r   r   r   rN   r   r   rb   r   r}   r*   r   r   )r>   rx   r9   ry   r;   r'   r(   r)   r*   r/   r+   r   s               r?   r6   r6     s    ` "!J=L%#( #' 	-$4y$7" 	*4=;t>!2		!#
 rA   )rb   rN   rR   
str | None)
r>   rN   rx   zAudioProto | VideoProtor9   r   ry   rN   rR   None)	rS   r   NNFFFNr&   )r>   rN   rx   rF   r9   r   ry   rN   r;   r   rC   r   r(   rO   r)   rQ   r*   rQ   rD   rQ   r/   r   r+   r   rR   r   )r;   r    r(   rP   rR   ztuple[int, int | None])r9   r   rR   ztuple[bytes, int])r9   r   r'   r   rR   rh   )r9   r   r'   rO   rR   r   )rM   r   NNFFNr&   )r>   rN   rx   r1   r9   r   ry   rN   r;   r   r'   rO   r(   rO   r)   rQ   r*   rQ   r/   r   r+   r   rR   r   )H
__future__r   ri   r_   datetimer   pathlibr   r   r   r   r   r	   typing_extensionsr
   	streamlitr   r   r   !streamlit.elements.lib.form_utilsr   #streamlit.elements.lib.layout_utilsr   r   %streamlit.elements.lib.subtitle_utilsr   streamlit.elements.lib.utilsr   streamlit.errorsr   streamlit.proto.Audio_pb2r   r1   streamlit.proto.Video_pb2r   rF   streamlit.proto.WidthConfig_pb2r   streamlit.runtimer   streamlit.runtime.metrics_utilr   streamlit.time_utilr   r   r   nptstreamlit.delta_generatorr   rN   rh   rj   rm   rn   r   __annotations__r   r   r   r   r    r!   r#   rZ   rd   r}   rG   r0   r   r   r   r6   rL   rA   r?   <module>r      s   # 	 	   4 4 ' 2 2 = S G H 2 9 9 7 % 9 /#8 	JJLL
		9 	  ubjj$sE#tUBJJ2N,O'O"PRVVi  S%C78	9 8E u R, R,p
 n
E  n844"4 4 	4
 
4v  "!*Y
Y
Y
 Y
 	Y

 Y
 Y
 Y
 Y
 Y
 Y
 Y
 Y
 
Y
x  %5  :.(b,  "!*U
U
U
 U
 	U

 U
 U
 U
 U
 U
 U
 U
 
U
rA   