
    %e                          d dl Z d dlmZ d dlZd dlZd dlmZ deeef         deeef         defdZ	deeef         d	eeef         ddfd
Z
d Zd ZdS )    N)Dict)ConfigOptionold_optionsnew_optionsreturnc                     |                                  D ];}|                    d          s| |         j        }||         j        }||k    r dS <dS )zpReturn True if and only if an option in the server section differs
    between old_options and new_options.
    serverTF)keys
startswithvalue)r   r   opt_nameold_valnew_vals        5lib/python3.11/site-packages/streamlit/config_util.pyserver_option_changedr      sp      $$&&  ""8,, 	h'-h'-g44  5    section_descriptionsconfig_optionsc                    g                      t          d                     fd}fd}fd}fd}|                                 D ]\  }dk    rfd|                                D             }t          |          dk    rA                     d	            |d
z                                  d	           |                                D ]<\  }}	|	j                            d          d         }t          |	j                  }
t          |
          dz
  }t          |
          D ]\  }}|	                                                    d          }|r$|d         
                                s
|dd         }|dk    r|n|}|D ]} ||                                            ||k    r                     d	           t          j        d|	j        i          }|dd         
                                }t          |          dk    r0d         d	k    r                     d	            |d|z             n	 |	j        rT |t!          j        dd                     t          |	j                  D ]} ||            |d|	j        z             |	j        t*          j        k    }|r |d|	j        z             t          j        ||	j        i          }t          |          dk    rd| d}n|sd| } ||           >t!          j        d                                         dS )z8Print the given config sections/options to the terminal.zh
        # Below are all the sections and options you can have in
        ~/.streamlit/config.toml.
    c                 `                         dt          j        | d          z              d S )N# T)boldappendclickstyletextouts    r   append_descz show_config.<locals>.append_desc9   s/    

4%+d666677777r   c                 \                         dt          j        |           z              d S )Nr   r   r   s    r   append_commentz#show_config.<locals>.append_comment<   s*    

4%+d+++,,,,,r   c                 \                         t          j        | dd                     d S )NTgreen)r   fgr   r   s    r   append_sectionz#show_config.<locals>.append_section?   s,    

5;t$7;;;<<<<<r   c                 Z                         t          j        | d                     d S )Nr$   r%   r   r   s    r   append_settingz#show_config.<locals>.append_settingB   s*    

5;t00011111r   _testc                 p    i | ]2\  }}|j         k    |j        d k    |                                /||3S )visible)section
visibility
is_expired).0kvr-   s      r   
<dictcomp>zshow_config.<locals>.<dictcomp>L   sO     
 
 
1yG##	(A(A!,,..(A q(A(A(Ar   r    z[%s].   
Ndefault
   zDefault: %szDEPRECATED.yellowr(   z+This option will be removed on or after %s.zThe value below was set in %sr   z =
)r   _cleanitemslenkeysplit_clean_paragraphsdescription	enumeraterstripstriplstriptomldumpsdefault_val
deprecatedr   r   deprecation_textexpiration_datewhere_definedr   DEFAULT_DEFINITIONr   echojoin)r   r   r    r"   r&   r)   section_descriptionsection_optionsr?   optiondescription_paragraphslast_paragraph_idxi	paragraphlinesappend_funclinetoml_defaultoption_is_manually_settoml_settingr   r-   s                       @@r   show_configr^   *   s*   
 CJJ	
 	
  8 8 8 8 8- - - - -= = = = =2 2 2 2 2 )=(B(B(D(D T) T)$$ g
 
 
 
&,,..
 
 
 1$$

2v'(((

2*0022 ?	) ?	)KC*""3''*C%6v7I%J%J"!$%;!<!<q!@ )*@ A A # #9!((**00 
  &q!1!1 &!!""IE ./!VVkk " / /DK.... ***JJrNNN:y&2D&EFFL',2244L<  1$$r7b==JJrNNN}|;<<<<   u{=XFFFGGG-f.EFF ) )D"N4((((A,-   $(GG # & W>AUUVVV:sFL&9::L<  A%%-C~~~+ 32L22N<((((?	)B 
Jtyy~~r   c                 .    t          j        dd|           S )zReplace sequences of multiple spaces with a single space, excluding newlines.

    Preserves leading and trailing spaces, and does not modify spaces in between lines.
    z + )resub)txts    r   r<   r<      s    
 6$S!!!r   c                 r    |                      d          } |                     d          }d |D             }|S )zHSplit the text into paragraphs, preserve newlines within the paragraphs.r7   z

c                 r    g | ]4}d                      d |                    d           D                       5S )r7   c              3   4   K   | ]}t          |          V  d S )N)r<   )r0   rZ   s     r   	<genexpr>z/_clean_paragraphs.<locals>.<listcomp>.<genexpr>   s(      AA4&,,AAAAAAr   )rP   r@   )r0   rW   s     r   
<listcomp>z%_clean_paragraphs.<locals>.<listcomp>   sO        			AA9??4+@+@AAAAA  r   )rE   r@   )rc   
paragraphscleaned_paragraphss      r   rA   rA      sK     ))D//C6""J #   r   )ra   typingr   r   rG   streamlit.config_optionr   strboolr   r^   r<   rA    r   r   <module>rp      s    
			         0 0 0 0 0 0c<'(7;C<M7N	   $qsCx.ql*+q 
q q q qh" " "	 	 	 	 	r   