o a @sPdZdZddedDZddedDZdZddd d d d Zd4ddZd5ddZdZ dZ dZ e ididididididididididid id!id"id#id$id%id&ie idd'd(d)dd*d(d)dd+d(d)dd,d'idd*d(d)dd,d*idd,d+idd-d(idd-d(idid d,d*id!d,d.id"d'd(d)d#d,d+id$d/d(d)d%d.d(d)d&d-d(ie idd'd(d)dd*d(d)dd+d(d)dd,d'idd*d(d)dd,d*idd,d0idd-d(idd-d(idid d*d(d)d!d,d*id"d'd(d)d#d,d'id$d/d(d)d%d.d(d)d&d-d(iiZ e Z d1d2Zd3S)6z termcolors.py )blackredgreenyellowbluemagentacyanwhitecCi|] }t|d|qS)z3%s color_names.0xr9/usr/lib/python3/dist-packages/django/utils/termcolors.py rcCr )z4%sr r rrrrr014578)bold underscoreblinkreverseconcealrcKsg}|dkrt|dkr|ddkrdtS|D]\}}|dkr*|t|q|dkr5|t|q|D] }|tvrE|t|q8d|vrRd |pNdtf}d dd ||p\dfS) aB Return your text, enclosed in ANSI graphics codes. Depends on the keyword arguments 'fg' and 'bg', and the contents of the opts tuple/list. Return the RESET code if no parameters are given. Valid colors: 'black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white' Valid options: 'bold' 'underscore' 'blink' 'reverse' 'conceal' 'noreset' - string will not be auto-terminated with the RESET code Examples: colorize('hello', fg='red', bg='blue', opts=('blink',)) colorize() colorize('goodbye', opts=('underscore',)) print(colorize('first line', fg='red', opts=('noreset',))) print('this should be red too') print(colorize('and so should this')) print('this should not be red') rresetz[%smfgbgnoresetz%s[%smz%s%s;)lenRESETitemsappend foreground backgroundopt_dictjoin)textoptskwargs code_listkvorrrcolorize s  r6c sfddS)a  Return a function with default parameters for colorize() Example: bold_red = make_style(opts=('bold',), fg='red') print(bold_red('hello')) KEYWORD = make_style(fg='yellow') COMMENT = make_style(fg='blue', opts=('bold',)) cst|fiSN)r6)r/r1r0rrDszmake_style..r)r0r1rr8r make_style:s r:nocolordarklightERRORSUCCESSWARNINGNOTICE SQL_FIELD SQL_COLTYPE SQL_KEYWORD SQL_TABLE HTTP_INFO HTTP_SUCCESS HTTP_REDIRECTHTTP_NOT_MODIFIEDHTTP_BAD_REQUESTHTTP_NOT_FOUNDHTTP_SERVER_ERRORMIGRATE_HEADING MIGRATE_LABELr)r)r#r0rrr#r0rrrc Cs|sttS|d}tt}|D]h}|tvr#|t|qd|vr}i}|d\}}|}|d}|| d}|| } | t vrT| |d<|rb|dt vrb|d|d<t dd |D} | rq| |d <|ttvr}|r}|||<q|ttkrd S|S) aParse a DJANGO_COLORS environment variable to produce the system palette The general form of a palette definition is: "palette;role=fg;role=fg/bg;role=fg,option,option;role=fg/bg,option,option" where: palette is a named palette; one of 'light', 'dark', or 'nocolor'. role is a named style used by Django fg is a foreground color. bg is a background color. option is a display options. Specifying a named palette is the same as manually specifying the individual definitions for each role. Any individual definitions following the palette definition will augment the base palette definition. Valid roles: 'error', 'success', 'warning', 'notice', 'sql_field', 'sql_coltype', 'sql_keyword', 'sql_table', 'http_info', 'http_success', 'http_redirect', 'http_not_modified', 'http_bad_request', 'http_not_found', 'http_server_error', 'migrate_heading', 'migrate_label' Valid colors: 'black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white' Valid options: 'bold', 'underscore', 'blink', 'reverse', 'conceal', 'noreset' r&=,/r#r$css|] }|tvr|VqdSr7)r-)r srrr sz&parse_color_setting..r0N) PALETTESDEFAULT_PALETTElowersplitNOCOLOR_PALETTEcopyupdateupperrpopr tuple) config_stringpartspalettepart definitionrole instructionsstylescolorsr#r0rrrparse_color_settings:    rhN)rr)r)__doc__r ranger+r,r(r-r6r:rY DARK_PALETTE LIGHT_PALETTErUrVrhrrrrs  -                            ;