8f! ddlZddlZddlmZddlmZddlmZddlm Z m Z m Z m Z m Z ddlmZddlmZddlmZdd lmZdd lmZdd lmZdd lmZdd lmZGddZdefdZe dkre ej!dZ"eZ#eZ$e"%e#e&ee$z dzdZ'ej!e"_(eZ$e"%e#e&ee$z dzdZ)e dZ*e*%e#e%de'de%de)dddl+m,Z,e Z"ej-dZ.e./dde./d e.0d!d"e.0d#d$ej1d%Z2ej-d&Z3e3/e3/d e30e2e.e"%e,j4e3ej5d'd(d)*d+,dSdS)-N) process_time)box)Color)ConsoleConsoleOptionsGroupRenderableType RenderResult)Markdown) Measurement)Pretty)Segment)Style)Syntax)Table)Textc6eZdZdededefdZdddedefdZdS)ColorBoxconsoleoptionsreturnc #KtddD]}t|jD]}||jz }d|dz dzz}tj||d\}}} tj||dzd\} } } t j|dz|dz| dz} t j| dz| dz| dz}t dt|| Vt jVdS) Nrg?gffffff?g?gQ?u▄)colorbgcolor) range max_widthcolorsys hls_to_rgbrfrom_rgbrrline)selfrryxhlr1g1b1r2g2b2rrs y/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/pip/_vendor/rich/__main__.py__rich_console__zColorBox.__rich_console__sq! ! !A7,-- J J))AES=)%0As;; B%0AL#FF B.c28R#XFFrCxc28DDeU%H%H%HIIIIII,..  ! !rc,td|jS)N)r r)r#rrs r.__rich_measure__zColorBox.__rich_measure__!s1g/000r0N) __name__ __module__ __qualname__rrr r/r r3r0r.rrsl ! !)7 !  ! ! ! !1 1+91 111111r0rrc Xtjdd}d|_|dddd|d td d d d d }|d t |d||ddd}tjdd}d |_|t|ddt|ddt|ddt|dd|dttj d|dtdtdtfd }|d!d"d#}|d$|td dd d%d&gtj '}|d(dd)|d*d+|d,d-dd.|d/d0dd.|d1d2d3d4|d5d6d3d7|d8d9d:d;|dd?|d@|dA}dBdCgdDdE}|dF|t|dGddHt|dIdJ} |dK|dL| zt| |dMdN|S)Oz8Get a renderable that demonstrates a number of features.r2T)paddingpad_edgez Rich featuresFeaturecenterzbold red)no_wrapjustifystyle DemonstrationNF)rexpand 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 conversionColorsStyleszAll ansi styles: [bold]bold[/], [dim]dim[/], [italic]italic[/italic], [underline]underline[/], [strike]strikethrough[/], [reverse]reverse[/], and even [blink]blink[/].zLorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque in metus sed sapien ultricies pretium a at justo. Maecenas luctus velit et auctor maximus.)r9collapse_paddingleftgreen)r>r?yellowrightbluefullredrz[Word wrap text. Justify [green]left[/], [yellow]center[/], [blue]right[/] or [red]full[/]. renderable1 renderable2rctdddd}|dd|dd||||S)NFT)rBr:rrA1r2)ratio2)r add_columnadd_row)rNrOtables r. comparisonz"make_test_card..comparisonZsc%%T$OOO A&&& A&&& k;/// r0zAsian 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: Markupnonedim)rCrBrA row_stylesrz [green]Date)r?r=z [blue]Title)r?z[cyan]Production Budgetcyan)r?r>r=z[magenta]Box Officemagentaz 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,677Tablesa~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)fooatomicz%Syntax highlighting & pretty printingpython3) 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...)rgridtitlerTrUrr:rr from_markupr rSIMPLErr r ) rV color_tablelorem lorem_tablerWmarkup_example example_tablecode pretty_datamarkdown_examples r.make_test_cardrp's8 Jq4 0 0 0E!EK YhjQQQ _%%%  K 8      MM(K((( MM r jE*Q>>>K K UF'222 UHH555 UG6222 UF%000   MM  r      ^PU MM" n  < MM(N+++E? J M]'4HHH]&999!    *  '  +%  7  MM(M*** "D   &  K MM3 4T J J J ;d 3 3 3    MMJJx*::HEU)r= TextualizezH[u blue link=https://github.com/textualize]https://github.com/textualizeTwitterzL[u blue link=https://twitter.com/willmcgugan]https://twitter.com/willmcguganzWe hope you enjoy using Rich! Rich is maintained with [red]:heart:[/] by [link=https://www.textualize.io]Textualize.io[/] - Will McGugan)r2rxz"[b red]Thanks for trying out Rich! bright_blue)rr9re border_styler<)r>)6riotimerpip._vendor.richrpip._vendor.rich.colorrpip._vendor.rich.consolerrrr r pip._vendor.rich.markdownr pip._vendor.rich.measurer pip._vendor.rich.prettyr pip._vendor.rich.segmentrpip._vendor.rich.stylerpip._vendor.rich.syntaxrpip._vendor.rich.tablerpip._vendor.rich.textrrrpr4StringIOr test_cardstartprintroundpre_cache_takenrrtakencpip._vendor.rich.panelrurdsponsor_messagerTrUrf intro_messagemessagefitROUNDEDr7r0r.rs  ((((((aaaaaaaaaaaaaa......000000******,,,,,,((((((******((((((&&&&&&11111111*gggggT zg R[]]G  I LNNE MM)e\\^^e3v=qAAO2;==GL LNNE MM) E<<>>E)V3Q 7 7EtAGGI E 9 9 9 9::: E / / / /000,,,,,,giiG ej+++OWg>>>t,,,RV %D$ Mej###G  t$$$ OOM?333 MM  6&         or0