
    ch`                        % S SK Jr  S SKrS SKJrJrJr  S SKJrJ	r	  S SK
Jr  \(       a  S SKJr  \rS\S'   \rS\S	'   \rS\S
'   \rS\S'    " S S\5      rSS jr\R,                  " S5      rSS jrSS jrg)    )annotationsN)TYPE_CHECKINGTextIO	TypedDict)NotRequired	TypeAlias)extract_leading_emoji)Pathr   PageHashPageName
ScriptPathIconc                  H    \ rS rSr% S\S'   S\S'   S\S'   S\S	'   S
\S'   Srg)PageInfo!   r   script_pathr   page_script_hashzNotRequired[Icon]iconzNotRequired[PageName]	page_namezNotRequired[str]url_pathname N)__name__
__module____qualname____firstlineno____annotations____static_attributes__r       hC:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\streamlit/source_util.pyr   r   !   s     
$$""r   r   c                b    SSK n[        US5      (       a  UR                  U 5      $ [        U SS9$ )a$  Open a read-only Python file taking proper care of its encoding.

In Python 3, we would like all files to be opened with utf-8 encoding.
However, some author like to specify PEP263 headers in their source files
with their own encodings. In that case, we should respect the author's
encoding.
r   Nopenzutf-8)encoding)tokenizehasattrr!   )filenamer#   s     r   open_python_filer&   )   s2     x   }}X&&7++r   z([0-9]*)[_ -]*(.*)\.pyc                    [         R                  " [        U R                  5      n[	        U5      S:X  a  [        U  S35      eUu  u  p#UR                  5       nUS:X  a  [        S5      U4$ [        U5      U4$ )Nr   z0 is not a Python file. This should never happen. inf)refindallPAGE_FILENAME_REGEXnamelen
ValueErrorlowerfloat)r   matchesnumberlabels       r   page_sort_keyr5   =   s{    jj,k.>.>?G 7|qmKL
 	
  _fKKME|ee$$&M5!!r   c                   [         R                  " [        U R                  5      nUc  g[         R                  " SSUR                  S5      5      R                  5       =(       d    UR                  S5      n[        U5      $ )az  Compute the icon and name of a page from its script path.

This is *almost* the page name displayed in the nav UI, but it has
underscores instead of spaces. The reason we do this is because having
spaces in URLs both looks bad and is hard to deal with due to the need to
URL-encode them. To solve this, we only swap the underscores for spaces
right before we render page names.
)r(   r(   z[_ ]+_      )r*   searchr,   r-   subgroupstripr	   )r   
extractionicon_and_names      r   page_icon_and_namer@   P   sn     (*yy1DkFVFV'WJFF#z''*eg%!!!$  !//r   )r%   strreturnr   )r   r
   rB   ztuple[float, str])r   r
   rB   ztuple[str, str])
__future__r   r*   typingr   r   r   typing_extensionsr   r   streamlit.string_utilr	   pathlibr
   rA   r   r   r   r   r   r   r&   compiler,   r5   r@   r   r   r   <module>rI      st    # 	 3 3 4 7) ) 
I i #y #," jj!:; "&0r   