HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/rich/__pycache__/__main__.cpython-310.pyc
o

;j-�@s�ddlZddlZddlmZddlmZddlmZddlm	Z	m
Z
mZmZm
Z
ddlmZddlmZddlmZdd	lmZdd
lmZddlmZddlmZdd
lmZGdd�d�Zdefdd�Ze dkr�ddl!m"Z"e	e�#�dd�Z$e�Z%e�Z&e$�'e%�e(e�e&dd�Z)e�#�e$_*e�Z&e$�'e%�e(e�e&dd�Z+e	dd�Z,e,�'e%�e	�Z$e$�'de)�d��e$�'de+�d��e$�'�e$�'e"dddd d!��dSdS)"�N)�process_time)�box)�Color)�Console�ConsoleOptions�Group�RenderableType�RenderResult)�Markdown)�Measurement)�Pretty)�Segment)�Style)�Syntax)�Table)�Textc@s8eZdZdededefdd�Zdddedefdd�Zd	S)
�ColorBox�console�options�returnccs��tdd�D]V}t|j�D]I}||j}d|dd}t�||d�\}}}	t�||dd�\}
}}t�|d|d|	d�}
t�|
d|d|d�}tdt||
d	��Vq
t��VqdS)
Nr�g�������?gffffff�?g�?g�Q���?�u▄)�color�bgcolor)	�range�	max_width�colorsysZ
hls_to_rgbrZfrom_rgbr
r�line)�selfrr�y�x�h�lZr1Zg1�b1Zr2Zg2�b2rr�r%�A/opt/saltstack/salt/lib/python3.10/site-packages/rich/__main__.py�__rich_console__s�
�zColorBox.__rich_console__rcCstd|j�S)N�)rr)rrrr%r%r&�__rich_measure__!szColorBox.__rich_measure__N)	�__name__�
__module__�__qualname__rrr	r'rr)r%r%r%r&rs��
����rrc

Cstjddd�}d|_|jddddd�|�d	�td
ddddd�}|�d
t��|�d|�|�dd�d}tjddd�}d|_|�t|ddd�t|ddd�t|ddd�t|ddd��|�dtt�	d�|��dt
dt
dtfd d!�}|�d"d#�d$}|�d%|�tdddd&d'gtjd(�}|jd)ddd*�|jd+dd,�|jd-d.ddd/�|jd0d1ddd/�|�d2d3d4d5�|�d6d7d4d8�|�d9d:d;d<�|�d=d>d?d@�|�dA|�dB}dCdDgdEdF�}|�dG|t
|dHdddI�t|ddJ���dK}	|�dL|dM|	t|	���|�dNdO�|S)Pz8Get a renderable that demonstrates a number of features.r(T)�padding�pad_edgez
Rich featuresZFeature�centerzbold red)�no_wrap�justify�styleZ
DemonstrationNF)r�expand�show_header�	show_edger.u�✓ [bold green]4-bit color[/]
✓ [bold blue]8-bit color[/]
✓ [bold magenta]Truecolor (16.7 million)[/]
✓ [bold yellow]Dumb terminals[/]
✓ [bold cyan]Automatic color conversionZColorsZStylesz�All ansi styles: [bold]bold[/], [dim]dim[/], [italic]italic[/italic], [underline]underline[/], [strike]strikethrough[/], [reverse]reverse[/], and even [blink]blink[/].z�Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque in metus sed sapien ultricies pretium a at justo. Maecenas luctus velit et auctor maximus.)r-Zcollapse_padding�left�green)r1r2Zyellow�rightZblue�fullZredrz[Word wrap text. Justify [green]left[/], [yellow]center[/], [blue]right[/] or [red]full[/].
�renderable1�renderable2rcSs<tddddd�}|jddd�|jddd�|�||�|S)NFT)r4r.rr3�1r()Zratio�2)r�
add_column�add_row)r:r;�tabler%r%r&�
comparisonZs
z"make_test_card.<locals>.comparisonzAsian
language
supportu!:flag_for_china:  该库支持中文,日文和韩文文本!
:flag_for_japan:  ライブラリは中国語、日本語、韓国語のテキストをサポートしています
:flag_for_south_korea:  이 라이브러리는 중국어, 일본어 및 한국어 텍스트를 지원합니다z�[bold magenta]Rich[/] supports a simple [i]bbcode[/i]-like [b]markup[/b] for [yellow]color[/], [underline]style[/], and emoji! :+1: :apple: :ant: :bear: :baguette_bread: :bus: ZMarkup�noneZdim)r5r4r3Z
row_stylesrz[green]Date)r2r0z[blue]Title)r2z[cyan]Production BudgetZcyan)r2r1r0z[magenta]Box OfficeZmagentazDec 20, 2019z Star Wars: The Rise of Skywalkerz$275,000,000z$375,126,118zMay 25, 2018z[b]Solo[/]: A Star Wars Storyz$393,151,347zDec 15, 2017z!Star Wars Ep. VIII: The Last Jediz$262,000,000zold]$1,332,539,889[/bold]zMay 19, 1999z-Star Wars Ep. [b]I[/b]: [i]The phantom Menacez$115,000,000z$1,027,044,677ZTablesa~def iter_last(values: Iterable[T]) -> Iterable[Tuple[bool, T]]:
    """Iterate and generate a tuple with a flag for last value."""
    iter_values = iter(values)
    try:
        previous_value = next(iter_values)
    except StopIteration:
        return
    for value in iter_values:
        yield False, previous_value
        previous_value = value
    yield True, previous_valueg��?$	@)z
Paul AtreideszVladimir HarkonnenzThufir Hawat)FTN)ZfooZatomicz%Syntax
highlighting
&
pretty
printingZpython3)Zline_numbers�
indent_guides)rCz�# Markdown

Supports much of the *markdown* __syntax__!

- Headers
- Basic formatting: **bold**, *italic*, `code`
- Block quotes
- Lists, and more...
    r
z[cyan]z+more!zBProgress bars, columns, styled logging handler, tracebacks, etc...)rZgrid�titler>r?rr.rrZfrom_markuprrZSIMPLErrr
)
r@Zcolor_tableZloremZlorem_tablerAZmarkup_exampleZ
example_table�codeZpretty_dataZmarkdown_exampler%r%r&�make_test_card's�
�������
�����������
��
��rF�__main__)�PanelT)�fileZforce_terminalg@�@r()�recordz[dim]rendered in [not dim]zms[/] (cold cache)zms[/] (warm cache)z�[b magenta]Hope you enjoy using Rich![/]

Consider sponsoring to ensure this project is maintained.

[cyan]https://github.com/sponsors/willmcgugan[/cyan]r7zHelp ensure Rich is maintained)r(�)Zborder_stylerDr-)-r�io�timerZrichrZ
rich.colorrZrich.consolerrrrr	Z
rich.markdownr
Zrich.measurerZrich.prettyrZrich.segmentr
Z
rich.stylerZrich.syntaxrZ
rich.tablerZ	rich.textrrrFr*Z
rich.panelrH�StringIOrZ	test_card�start�print�roundZpre_cache_takenrIZtaken�cr%r%r%r&�<module>s\+�




���