
     h'                        U d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlmZ d dlmZm	Z	m
Z
mZmZ d dlmZmZmZ d dlmZ d dlmZ d dlmZ d dlmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z" d d	l#m$Z$ 	 d dl%Z& e'e&d
          Z(n# e)$ r dZ(Y nw xY wddl*m+Z+ ddl,m-Z- ddl.m/Z/ ddl0m1Z1 ddl2m3Z3 ddl4m5Z5 ddl6m7Z7m8Z8 ddl9m:Z: ddl;m<Z< erddl=m>Z>m?Z?m@Z@mAZAmBZBmCZC dedeDfdZEdeded         fdZFdeGdeDfdZH ejI        dg           ZJdeGdeDfdZK	 	 	 	 	 	 	 	 dpd ed!ed"         d#d$d%eDd&eDd'eeL         d(eeL         d)eeL         d*eDde"eMdf         fd+ZNdeGd,e"eOe!eOd-f         f         deDfd.ZP	 	 	 	 	 	 	 	 dpd!ed"         d#d$d%eDd&eDd'eeL         d(eeL         d)eeL         d*eDddfd/ZQ G d0 d1e7          ZRd2eeef         de!eMeMeMf         fd3ZSd2ee         de!eMeMeMf         fd4ZTd2d5de!eMeMeMf         fd6ZUejV        d7 eeUeeSed8 eeTeWd9 e	d: eXd; eYd< e
d= eZd> e[d? ed@ iZ\eeOeege!eMeMeMf         f         f         e]dA<    e[e\^                                          Z_eWejV        ee	fZ`dedeDfdBZae G dC dD                      Zbe G dE dF                      ZcdedeDfdGZd	 	 	 dqd2ed'eeL         d(eeL         d)eeL         debf
dHZedIdJdddddKd2edLeLdMeLd'eeL         d(eeL         d)eeL         d*eDdeMfdNZfddOdddddPd2ed!ed"         d&eDd'eeL         d(eeL         d)eeL         d*eDddfdQZgehdRk    r G dS dT          Zid dUlmjZj  G dV dWej          Zk eeL          ZldXeldY<   ddZd[d\d]h d^g eXh d_           eeYd`g dai           eg db          dc ekdddedfdgdhdig           ei            djZmemdY         n                    em           d dklompZp  ep eRemdOdlm                      G dn do          Zq ep eR eq                                 dS dS )r    N)array)CounterUserDictUserListdefaultdictdeque)	dataclassfieldsis_dataclass)isclass)islice)MappingProxyType)TYPE_CHECKINGAnyCallableDefaultDictDequeDictIterableListOptionalSequenceSetTupleUnion)RichReprResultibF   get_console)	loop_last)	pick_bool)RichRenderablecell_len)ReprHighlighter)JupyterMixinJupyterRenderable)Measurement)Text)ConsoleConsoleOptionsHighlighterTypeJustifyMethodOverflowMethodRenderResultobjreturnc                 R    t           o t          j        t          |                     S )z1Check if an object was created with attrs module.)
_has_attrs_attr_modulehastyper1   s    V/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/pip/_vendor/rich/pretty.py_is_attr_objectr:   <   s    5,*499555    z_attr_module.Attribute[Any]c                 V    t           r!t          j        t          |                     ng S )zGet fields for an attrs object.)r4   r5   r
   r7   r8   s    r9   _get_attr_fieldsr=   A   s#    -7?<tCyy)))R?r;   c                 x    	 | j         j        j        t          j        t
          j        fv S # t          $ r Y dS w xY w)zCheck if an instance of a dataclass contains the default repr.

    Args:
        obj (object): A dataclass instance.

    Returns:
        bool: True if the default repr is used, False if there is a custom repr.
    F)__repr____code__co_filenamedataclasses__file__reprlib	Exceptionr8   s    r9   _is_dataclass_reprrF   F   sQ    |$0 5
 
 	
    uus   (+ 
99_dummy_namedtuplec                     d}	 t          j        | j                  }n# t          t          f$ r Y nw xY wt          j        t
          j                  }||k    S )zCheck if an instance of namedtuple contains the default repr

    Args:
        obj (object): A namedtuple

    Returns:
        bool: True if the default repr is used, False if there's a custom repr.
    N)inspectgetfiler?   OSError	TypeErrorrG   )r1   obj_filedefault_repr_files      r9   _has_default_namedtuple_reprrO   ]   sj     H?3<00Y    	  (9(BCC(((s    22ignorevalueconsoler+   overflowr/   cropindent_guides
max_length
max_string	max_depth
expand_allc	                    ddl m}	 t          | t                    s| d S |pt	                      }|                                5 }
t          | |	          r|                                 |                    t          | t                    r| nt          | ||||||d          |dd           d d d            n# 1 swxY w Y   |

                                                    d          S )	Nr   )ConsoleRenderable   )rS   rU   rV   rW   rX   rY   marginT )rT   new_line_startend
)rR   r[   _safe_isinstancer(   r    capturelineprintr#   Prettygetrstrip)rQ   rR   rS   rT   rU   rV   rW   rX   rY   r[   rc   s              r9   _ipy_display_hookri   q   sJ    +***** 011 U]t&G			 
gE#455 	LLNNN $E>::%"/))')	 	 	 # 	 	
 	
 	
	
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2 ;;==%%%s   A*B::B>B>class_or_tuple.c                 F    	 t          | |          S # t          $ r Y dS w xY w)zFisinstance can fail in rare cases, for example types with no __class__F)
isinstancerE   )r1   rj   s     r9   rb   rb      s9    #~...   uus    
  c           	      2    ddl m  p	               J dt          ddf fd}	 t                      }	ddlm}
  G fdd	|
          } |            }||	j        j        d
<   dS # t          $ r |t          _
        Y dS w xY w)a  Install automatic pretty printing in the Python REPL.

    Args:
        console (Console, optional): Console instance or ``None`` to use global console. Defaults to None.
        overflow (Optional[OverflowMethod], optional): Overflow method. Defaults to "ignore".
        crop (Optional[bool], optional): Enable cropping of long lines. Defaults to False.
        indent_guides (bool, optional): Enable indentation guides. Defaults to False.
        max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
            Defaults to None.
        max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to None.
        max_depth (int, optional): Maximum depth of nested data structures, or None for no maximum. Defaults to None.
        expand_all (bool, optional): Expand all containers. Defaults to False.
        max_frames (int): Maximum number of frames to show in a traceback, 0 for no maximum. Defaults to 100.
    r   r   NrQ   r2   c                     | `J dt           _                            t          | t                    r| nt          |                      | t           _        dS dS )z?Replacement sys.displayhook which prettifies objects with Rich.N)rS   rU   rV   rW   rX   rY   )rT   )builtins_re   rb   r#   rf   )	rQ   rR   rT   rY   rU   rX   rV   rW   rS   s	    r9   display_hookzinstall.<locals>.display_hook   s    &&&HJMM (~>>
EE!)&3#-#-"+#-         HJJJ' r;   )BaseFormatterc                   @    e Zd ZU dZeed<   dedef fdZdS )install.<locals>.RichFormatterTpprintrQ   r2   c           
      n    | j         rt          |                       S t          |          S )N)rR   rS   rU   rV   rW   rX   rY   )ru   ri   repr)	selfrQ   rY   r    rU   rX   rV   rW   rS   s	     r9   __call__z'install.<locals>.RichFormatter.__call__   sP    ; ', +!)&3#-#-"+#-	 	 	 	  ;;&r;   N)__name__
__module____qualname__ru   bool__annotations__r   ry   )rY   r    rU   rX   rV   rW   rS   s   r9   RichFormatterrt      sq         FD'c 'c ' ' ' ' ' ' ' ' ' ' ' ' ' 'r;   r   z
text/plain)pip._vendor.richr    r   get_ipythonIPython.core.formattersrr   display_formatter
formatters	NameErrorsysdisplayhook)rR   rS   rT   rU   rV   rW   rX   rY   rq   iprr   r   rich_formatterr    s   ````````     @r9   installr      sL   0 -,,,,,&GC D             .G]] 	:99999	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	'M 	' 	' 	'& '8F'5553  ' ' '&'s   A< <BBc                       e Zd ZdZ	 d!dddddddddddddeded	         d
eded         ded         dee         dedee         dee         dee         dedededdfdZ	 	 	 	 	 	 d"dZ		 	 	 	 	 	 d#d Z
dS )$rf   ak  A rich renderable that pretty prints an object.

    Args:
        _object (Any): An object to pretty print.
        highlighter (HighlighterType, optional): Highlighter object to apply to result, or None for ReprHighlighter. Defaults to None.
        indent_size (int, optional): Number of spaces in indent. Defaults to 4.
        justify (JustifyMethod, optional): Justify method, or None for default. Defaults to None.
        overflow (OverflowMethod, optional): Overflow method, or None for default. Defaults to None.
        no_wrap (Optional[bool], optional): Disable word wrapping. Defaults to False.
        indent_guides (bool, optional): Enable indentation guides. Defaults to False.
        max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
            Defaults to None.
        max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to None.
        max_depth (int, optional): Maximum depth of nested data structures, or None for no maximum. Defaults to None.
        expand_all (bool, optional): Expand all containers. Defaults to False.
        margin (int, optional): Subtrace a margin from width to force containers to expand earlier. Defaults to 0.
        insert_line (bool, optional): Insert a new line if the output has multiple new lines. Defaults to False.
    N   Fr   )indent_sizejustifyrS   no_wraprU   rV   rW   rX   rY   r]   insert_line_objecthighlighterr-   r   r   r.   rS   r/   r   rU   rV   rW   rX   rY   r]   r   r2   c                    || _         |pt                      | _        || _        || _        || _        || _        || _        || _        |	| _	        |
| _
        || _        || _        || _        d S N)r   r&   r   r   r   rS   r   rU   rV   rW   rX   rY   r]   r   )rx   r   r   r   r   rS   r   rU   rV   rW   rX   rY   r]   r   s                 r9   __init__zPretty.__init__  st    " &;/*;*;&294<*$$"$&r;   rR   r+   optionsr,   r0   c           	   #     K   t          | j        |j        | j        z
  | j        | j        | j        | j        | j                  }t          j
        || j        p|j        | j        p|j        t          | j        |j                  d          }|r|                     |          n%t          t!          | j                   dd          }| j        r#|j        s|                    | j        d          }| j        rd|v rd	V  |V  d S )
N	max_widthr   rV   rW   rX   rY   pretty)r   rS   r   stylez.__repr__ returned empty stringz
dim italic)r   zrepr.indentra   r^   )pretty_reprr   r   r]   r   rV   rW   rX   rY   r*   	from_ansir   rS   r"   r   r   r7   rU   
ascii_onlywith_indent_guidesr   )rx   rR   r   
pretty_strpretty_texts        r9   __rich_console__zPretty.__rich_console__0  sH      !L'$+5(n
 
 

 nL3GO]6g&6dlGO<<
 
 
 D[)))%%FFF"   	  	g&8 	%88  9  K  	 3 3HHHr;   r)   c           	          t          | j        |j        | j        | j        | j        | j        | j                  }|r+t          d |	                                D                       nd}t          ||          S )Nr   c              3   4   K   | ]}t          |          V  d S r   r$   .0rd   s     r9   	<genexpr>z*Pretty.__rich_measure__.<locals>.<genexpr>`  s(      CC4CCCCCCr;   r   )r   r   r   r   rV   rW   rX   rY   max
splitlinesr)   )rx   rR   r   r   
text_widths        r9   __rich_measure__zPretty.__rich_measure__S  s     !L'(n
 
 

 HRXCCC:+@+@+B+BCCCCCCWX 	 :z222r;   r   )rR   r+   r   r,   r2   r0   )rR   r+   r   r,   r2   r)   )rz   r{   r|   __doc__r   r   intr}   r   r   r    r;   r9   rf   rf      sm        , 48'
 -1/3"'#$($(#' !' ' '' /0'
 ' /*' +,' $' ' SM' SM' C=' ' ' '  
!' ' ' '>! !+;!	! ! ! !F3 3+;3	3 3 3 3 3 3r;   rf   r   c                 0    d| j         ddd| j         dfS )Nzdefaultdict(z, {})z, {}))default_factoryr   s    r9   _get_braces_for_defaultdictr   e  s1    6w.6669w.999 r;   c                 B    | j         dS dd| j          dd| j          dfS )N)deque([])zdeque()r   z
], maxlen=)zdeque(maxlen=)maxlenr   s    r9   _get_braces_for_dequer   m  s=    ~++&W^&&&)))) r;   z
array[Any]c                 0    d| j         ddd| j         dfS )Nzarray(z, [r   r   )typecoder   s    r9   _get_braces_for_arrayr   w  s,    ,W%,,,d4RW=M4R4R4RSSr;   c                     dS )N)z	environ({r   zenviron({})r   r   s    r9   <lambda>r   |  s    !C r;   c                     dS )N)z	Counter({r   z	Counter()r   r   s    r9   r   r     s    = r;   c                     dS N){}z{}r   r   s    r9   r   r         * r;   c                     dS r   r   r   s    r9   r   r         . r;   c                     dS )N)zfrozenset({r   zfrozenset()r   r   s    r9   r   r     s    C r;   c                     dS N)[]z[]r   r   s    r9   r   r     r   r;   c                     dS r   r   r   s    r9   r   r     r   r;   c                     dS )N)r   r   zset()r   r   s    r9   r   r     s    , r;   c                     dS )N)(r   ()r   r   s    r9   r   r     s    + r;   c                     dS )N)zmappingproxy({r   zmappingproxy({})r   r   s    r9   r   r     s    &R r;   _BRACESc                     t          | t                    p-t          |           pt          | d          pt	          |           ot          |            S )z3Check if an object may be expanded by pretty print.__rich_repr__)rb   _CONTAINERSr   hasattrr:   r   r8   s    r9   is_expandabler     s]     	k** 	 	 C))	  3	
 cll
r;   c            	          e Zd ZU dZdZeed<   dZeed<   dZeed<   dZ	eed<   dZ
eed<   dZeed	<   dZeed
<   dZeed<   dZeed                   ed<   dZeed<   dZeed<   dee         fdZdededefdZdefdZ	 ddedededefdZdS )Nodez4A node in a repr tree. May be atomic or a container.r^   key_repr
value_repr
open_braceclose_braceemptyFlastis_tupleis_namedtupleNchildrenz: key_separatorz, 	separatorr2   c              #     K   | j         r| j         V  | j        V  | j        r| j        V  dS | j        | j        r| j        V  | j        rI| j        sBt          | j                  dk    r*| j        d                                         E d{V  dV  n4| j        D ],}|                                E d{V  |j	        s	| j
        V  -| j        V  dS | j        V  dS dS )zGenerate tokens for this node.Nr   r   ,)r   r   r   r   r   r   r   leniter_tokensr   r   r   r   )rx   childs     r9   r   zNode.iter_tokens  sI     = 	%-$$$$? 	!/!!!!!]&} !o%%%= 1); 1DM@R@RVW@W@W#}Q/;;=========IIII!% 1 1#(#4#4#6#66666666$z 1"&.000&&&&&&j      '&r;   start_lengthrV   c                 n    |}|                                  D ]}|t          |          z  }||k    r dS dS )a*  Check the length fits within a limit.

        Args:
            start_length (int): Starting length of the line (indent, prefix, suffix).
            max_length (int): Maximum length.

        Returns:
            bool: True if the node can be rendered within max length, otherwise False.
        FT)r   r%   )rx   r   rV   total_lengthtokens        r9   check_lengthzNode.check_length  sP     $%%'' 	 	EHUOO+Lj((uu )tr;   c                 T    d                     |                                           }|S Nr^   )joinr   )rx   	repr_texts     r9   __str__zNode.__str__  s%    GGD,,..//	r;   P   r   r   r   rY   c                 V   t          | d          g}d}|t          |          k     rb||         }|j        r;|j        s4|s|                    |          s|                    |          |||dz   <   |dz  }|t          |          k     bd                    d |D                       }|S )al  Render the node to a pretty repr.

        Args:
            max_width (int, optional): Maximum width of the repr. Defaults to 80.
            indent_size (int, optional): Size of indents. Defaults to 4.
            expand_all (bool, optional): Expand all levels. Defaults to False.

        Returns:
            str: A repr string of the original object.
        T)nodeis_rootr   r   ra   c              3   4   K   | ]}t          |          V  d S r   )strr   s     r9   r   zNode.render.<locals>.<genexpr>  s(      994SYY999999r;   )_Liner   
expandableexpandedr   expandr   )rx   r   r   rY   linesline_nord   repr_strs           r9   renderzNode.render  s     D$///0E

"">D Lt} L LT%6%6y%A%A L37;;{3K3KE'GaK/0qLG E

"" 9999599999r;   )r   r   F)rz   r{   r|   r   r   r   r~   r   r   r   r   r   r}   r   r   r   r   r   r   r   r   r   r   r   r   r  r   r;   r9   r   r     su        >>HcJJKE3OOOD$HdM4'+HhtF|$+++M3Is!Xc] ! ! ! !, # $    "    
 MR 03EI	     r;   r   c                       e Zd ZU dZdZed          ed<   dZeed<   dZ	ee
         ed<   dZeed<   dZeed	<   dZeed
<   dZeed<   dZeed<   edefd            ZdedefdZdeded          fdZdefdZdS )r   zA line in repr output.NparentFr   r   r^   textsuffix
whitespacer   r   r2   c                 F    t          | j        duo| j        j                  S )z"Check if the line may be expanded.N)r}   r   r   rx   s    r9   r   z_Line.expandable  s#     DIT)@di.@AAAr;   rV   c                     t          | j                  t          | j                  z   t          | j                  z   }| j        J | j                            ||          S )z4Check this line fits within a given number of cells.)r   r  r%   r  r  r   r   )rx   rV   r   s      r9   r   z_Line.check_length  s\       8DI#6#66$+9N9NN 	 y$$$y%%lJ???r;   r   c              #     K   | j         }|J | j        }|j        sJ |j        r)t	          |j         |j         |j         |          V }nt	          |j        |          V }| j        d|z  z   }|j        ot          |j                  dk    }t          |j                  D ]+\  }}|rdn|j
        }	t	          ||||	|o|           }
|
V  ,t	          |j        || j        | j                  V  dS )z6Expand this line by adding children on their own line.N)r  r   r   r   )r  r   r  r  r   )r  r  r  r   )r   r  r   r   r   r   r   r   r   r!   r   r   r  r   )rx   r   r   r  new_linechild_whitespacetuple_of_oner   r   r   rd   s              r9   r   z_Line.expand  sb     y_
}= 	P"Lt'9L4?LL%    HH
 #JOOOOOH?S;->>}@T]););q)@$T]33 		 		KD%+?I+ .,.  D JJJJ!!;	
 
 
 	
 	
 	
 	
 	
r;   c                     | j         r| j         | j         | j        pd S | j         | j         | j        pd | j                                         S r   )r   r  r  r   r  rh   r  s    r9   r   z_Line.__str__(  sc    9 	oCtyC$)/rCCC ?VDIVtyBV@R@R@T@TVVr;   )rz   r{   r|   r   r  r   r~   r   r}   r   r   r  r   r  r  r   r   propertyr   r   r   r   r   r   r   r;   r9   r   r     s7           $FHW$$$GTD(4.D#NNNFCJHdD$BD B B B XB@s @t @ @ @ @
# 
(7*; 
 
 
 
B      r;   r   c                     	 t          | dd          }n# t          $ r Y dS w xY wt          | t                    ot          |t                    S )aX  Checks if an object is most likely a namedtuple. It is possible
    to craft an object that passes this check and isn't a namedtuple, but
    there is only a minuscule chance of this happening unintentionally.

    Args:
        obj (Any): The object to test

    Returns:
        bool: True if the object is a namedtuple. False otherwise.
    _fieldsNF)getattrrE   rl   tuple)r1   r
   s     r9   _is_namedtupler  1  s]    i..   uu c5!!?j&?&??s    
""c           	         	 dt           dt          ffdt                      		j        	j        ddt           dt
          dt          dt          f	fd | d	
          }|S )a`  Traverse object and generate a tree.

    Args:
        _object (Any): Object to be traversed.
        max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
            Defaults to None.
        max_string (int, optional): Maximum length of string before truncating, or None to disable truncating.
            Defaults to None.
        max_depth (int, optional): Maximum depth of data structures, or None for no maximum.
            Defaults to None.

    Returns:
        Node: The root of a tree structure which can be used to render a pretty repr.
    r1   r2   c                 $   Qt          | t          t          f          r5t          |           k    r"t          |           z
  }| d         d| }n;	 t	          |           }n*# t
          $ r}dt          |          d}Y d}~nd}~ww xY w|S )z0Get repr string for an object, but catch errors.N+z<repr-error >)rb   bytesr   r   rw   rE   )r1   	truncatedobj_reprerrorrW   s       r9   to_reprztraverse.<locals>.to_reprY  s     " ucl33 #C:%%C:-Ikzk*::y::HH:99 : : :9#e**999:s   A& &
B0BBFr   rootdepthc           	      B   " t                     }|)v rt          d          S t                     }$duo|$k    }dt          dt          t
          t          t          t          t          f         f                  fd}	 t           d          }n# t          $ r d}Y nw xY wd}|sE	 t           d	          r#t                     s                                 }n# t          $ r Y nw xY w|[ '|           t           j        d
d          }	t           ||                    }
 j        j        }|
rg }|j        }|r+|	rt          d| d          }nt          | d          }n|	rt          d| dd||d          }nt          | dd||          }t#          |
          D ]r\  }}t%          |t&                    r6|\  }} #||dz             }||_        ||_        d|_         ||           P #||dz             }||_         ||           snt          |	rd| dn| dg |          } &|           nt/                     r`|s] '|           g }|j        }t1                     ""r|rt           j        j         d          }n	t           j        j         dd||          }dt          t          t          t          t2          t4          t          gt          f                  f                  f" fd}t#           |                      D ]b\  }\  }}}|r't          t           ||                              }n #||dz             }||_        ||_        d|_         ||           cnt           j        j         dg |          } &|           n2t7                     rt%           t                    s|st9                     r '|           g }|j        }|rt           j        j         d          }nt           j        j         dd|| j        j         d          }t#           fdt;                     D                       D ]M\  }} #t           |j                  |dz             }|j        |_        ||_        d|_         ||           N &|           nt?                     rtA                     r '|            j        j        }|rt          | d          }ng }|j        }t          | dd|| d          }t#           !                                "                                          D ]8\  }\  }} #||dz             }||_        ||_        d|_         ||           9 &|           n1t%           tF                    rtF          D ]}t%           |          r|} n '|           tI          |                    \  }}}|rt          | d|           }n|j%        t                     j%        k    rt           (           |          }na rLg }t          ||||          }|j        }tM                     }|dz
  }t%           tN                    rtQ           "                                          }%tS          |%          }tU          |          D ]>\  } \  }} #||dz             } (|          |_        | |k    |_         ||           ?n\tQ                     }!%tS          |!%          }!tU          |!          D ]+\  } } #||dz             }| |k    |_         ||           ,%&|%k    r  |t          d|%z
   d                     nt          |g |           } &|           nt           (           |          }t                     t&          k    |_+        t?                     |_,        |S )!zWalk the object depth first.z...)r   N	rich_argsr2   c              3     K   | D ]}t          |t                    rdt          |          dk    r|\  }}}||k    r7||fV  >t          |          dk    r|\  }}||fV  ]t          |          dk    r
|d         V  {|V  d S )N      r   r   )rb   r  r   )r"  argkeyr   defaults        r9   iter_rich_argsz3traverse.<locals>._traverse.<locals>.iter_rich_argsy  s         #C// 3xx1}}.1+UG"e++$!5j((((SQ%(
U!5j((((SQ!!fIIII r;   ,awehoi234_wdfjwljet234_234wdfoijsdfmmnxpi492Fr   angular<z...>z(...)r  r  )r   r   r   r   r   r   r   )r   r   r   r   r   )r   =r   )r   r   r   c               3      K   D ]j} | j         ra	 t          | j                  }| j        |t          | j                   r| j         ndfV  G# t          $ r}| j        |dfV  Y d}~bd}~ww xY wkdS )z$Iterate over attr fields and values.N)rw   r  namecallablerE   )attrrQ   r  attr_fieldsr1   s      r9   
iter_attrsz/traverse.<locals>._traverse.<locals>.iter_attrs  s       %0 & &D#y &
!&,3C,C,CE )-	(-5=di5H5H(R		d+& %& %& %& %&	 (1 !C !C !C+/9eT*B$B$B$B$B$B$B$B$B!C&& &s   A
A-A((A-)r   r   r   r   r   c              3   T   K   | ]"}|j         	t          |j                  |V  #d S r   )rw   r   r/  )r   fieldr1   s     r9   r   z.traverse.<locals>._traverse.<locals>.<genexpr>  sU       - -z- '.c5:&>&>-- - - - - -r;   )r   r   r   r   )r   r   z... +T)r   r   r   )-idr   r7   r   r   r   r   r   r   rE   r   r   r  list	__class__rz   appendr!   rb   r  r   r   r   r:   r=   r   r   r   rF   r
   r/  r  rO   _asdictitemsr   r   r?   r   _MAPPING_CONTAINERSiterr   	enumerater   r   )*r1   r  r   obj_idobj_typereached_max_depthr)  fake_attributesrich_repr_resultr+  args
class_namer   r9  r   r   r&  r'  r   
child_noder3  r/  rQ   repr_callabler5  container_typer   r   r   	num_itemslast_item_index
iter_itemsindexiter_valuesr2  	_traverserX   rV   pop_visitedpush_visitedr  visited_idss*   `                                 @r9   rN  ztraverse.<locals>._traversem  s
    C[  5))))99%T1Hey6H	c 	huS%S/=Q7R.S 	 	 	 	 	$%C OO  	$ 	$ 	$#OOO	$ 6: 	300 ; ;'*'8'8':':$    'L   c/EBBG'78899D/J *!$  / E#/C:/C/C/CDDD#*/C/C/CDDD #'8:'8'8'8(+%-!%&)       $*4'7'7'7(+%-!%	      &/t__ / /	c+C77 
/),JC)25	)J)J)JJ.2JO25J/7:J4"F:....)23eai)H)H)HJ.2JO"F:..../ 4;R0:0000JARARAR  
 KS!! [	</ [	<L   H_F*3//K )$ $+cm.D+K+K+KLLLDD&)m&<#?#?#?$'!)!	  D& sC(C5#::N1O'O!PQ& & & & & & &$ ?H

>U>U + +::tUM( K)-]]5=Q=Q9R9R)S)S)SJJ)25	)J)J)JJ*.
.2
+36
0z****+ "%-"8<<<rPT   Kj	<$S$//j	< $j	< #3''	j	< L   H_F  '#-*@'G'G'GHHH"%-"8;;; #% ]3777   $- - - - -!'- - - $ $ 	' 	'KD%
 "+73
+C+C5ST9!U!U!UJ*/*J'&*JO/2J,F:&&&&KC   J	<%A#%F%F J	<L   /J  '",333   !",/// #%'+++	   +4CKKMM4G4G4I4I*J*J ' '&D,3!*5	!B!B!BJ*-J'&*JO/2J,F:&&&&Kc;// 2	<"-  #C88 -HE L   -4X->s-C-C*JU  $A*'F'F'F'FGGG"d3ii&888wws||$???  A) +%	   "HH	"+a-#C)<== +!%ciikk!2!2J!-%+J
%C%C
/8/D/D + ++|U%.YuEAI%F%F%F
.5gcll
+*/?*B
z****	+ #'s))K!-&,[*&E&E(1+(>(> + +u%.YuEAI%F%F%F
*/?*B
z****)i*.D.DF4+K9z3I+K+KRVWWWXXX%"4@@@K773<<d;;;DS		U*+C00s$   B B"!B"*3C 
C+*C+T)r  )Fr   )r   r   setaddremover}   r   r   )
r   rV   rW   rX   r   rN  rO  rP  r  rQ  s
    ``` @@@@@r9   traverserU  D  s    *S S         EEK?L$K{ {s {$ {s {4 { { { { { { { { { { { {z 9W4(((DKr;   r   r   r   r   r   c                    t          | t                    r| }nt          | |||          }|                    |||          }|S )a  Prettify repr string by expanding on to new lines to fit within a given width.

    Args:
        _object (Any): Object to repr.
        max_width (int, optional): Desired maximum width of repr string. Defaults to 80.
        indent_size (int, optional): Number of spaces to indent. Defaults to 4.
        max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
            Defaults to None.
        max_string (int, optional): Maximum length of string before truncating, or None to disable truncating.
            Defaults to None.
        max_depth (int, optional): Maximum depth of nested data structure, or None for no depth.
            Defaults to None.
        expand_all (bool, optional): Expand all containers regardless of available width. Defaults to False.

    Returns:
        str: A possibly multi-line representation of the object.
    )rV   rW   rX   )r   r   rY   )rb   r   rU  r  )	r   r   r   rV   rW   rX   rY   r   r   s	            r9   r   r   n  sb    8 && 

zY
 
 
 KK    H Or;   T)rR   rU   rV   rW   rX   rY   c                    |t                      n|}|                    t          | |||||d          d           dS )a  A convenience function for pretty printing.

    Args:
        _object (Any): Object to pretty print.
        console (Console, optional): Console instance, or None to use default. Defaults to None.
        max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
            Defaults to None.
        max_string (int, optional): Maximum length of strings before truncating, or None to disable. Defaults to None.
        max_depth (int, optional): Maximum depth for nested data structures, or None for unlimited depth. Defaults to None.
        indent_guides (bool, optional): Enable indentation guides. Defaults to True.
        expand_all (bool, optional): Expand all containers. Defaults to False.
    NrP   )rV   rW   rX   rU   rY   rS   T)	soft_wrap)r    re   rf   )r   rR   rU   rV   rW   rX   rY   _consoles           r9   ru   ru     sf    , !({}}}WHNN!!'!	
 	
 	
       r;   __main__c                       e Zd ZdefdZdS )
BrokenReprr2   c                     ddz   dS )Nr   r   zthis will failr   r  s    r9   r?   zBrokenRepr.__repr__  s    EE##r;   Nrz   r{   r|   r   r?   r   r;   r9   r\  r\    s/        	$c 	$ 	$ 	$ 	$ 	$ 	$r;   r\  )
NamedTuplec                   N    e Zd ZU eed<   eed<   eed<   eed<   ee         ed<   dS )StockKeepingUnitr/  descriptionpricecategoryreviewsN)rz   r{   r|   r   r~   floatr   r   r;   r9   ra  ra    sI         			cr;   ra     foozHello World!gZd;Y@gʡE3t@g    cA>   r   r%  r$  r   rg           >   r   r%  r$  crumble)applerhubarbbuttersugarflour)rn  orangepearkumquatru  X  duriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurian)FTNzSparkling British Spring WaterzCarbonated spring waterg?waterzits amazing!zits terrible!)rh  barr   counteratomic
namedtupleBroken)re      )rU   rW   c                       e Zd ZdefdZdS )Thingr2   c                     dS )NzHello[38;5;239m World!r   r  s    r9   r?   zThing.__repr__  s    //r;   Nr^  r   r;   r9   r  r    s/        	0c 	0 	0 	0 	0 	0 	0r;   r  )NrP   FFNNNF)NNN)rro   collectionsrB   rI   osrD   r   r   r   r   r   r   r   r	   r
   r   r   	itertoolsr   typesr   typingr   r   r   r   r   r   r   r   r   r   r   r   r   pip._vendor.rich.reprr   r1  r5   r   r4   ImportErrorr^   r    _loopr!   _pickr"   abcr#   cellsr%   r   r&   jupyterr'   r(   measurer)   r  r*   rR   r+   r,   r-   r.   r/   r0   r}   r:   r=   objectrF   r{  rG   rO   r   r   ri   r7   rb   r   rf   r   r   r   _Environdict	frozensetr7  rR  r  r   r~   keysr   r<  r   r   r   r  rU  r   ru   rz   r\  r_  ra  ddatar9  r   re   r  r   r;   r9   <module>r     s
             				  



       G G G G G G G G G G G G G G 7 7 7 7 7 7 7 7 7 7             " " " " " "                               1 0 0 0 0 0t,,JJ   JJJ                               ( ( ( ( ( ( 4 4 4 4 4 4 4 4                                  6 6 6 6 6 6
@# @(+H"I @ @ @ @
F t    ( +K*+>CC )f ) ) ) ) ), $(!) $ $#-& -&-&i -& -& 	-&
 -& -& -& }-& -& 39-& -& -& -&`	!&tU49-='=!>	    $(!) $ $#OG OGi OGOG OG 	OG
 OG OG }OG OG 
OG OG OG OGde3 e3 e3 e3 e3\ e3 e3 e3PS#X)> 5cSVCW    5: %S#2F    T< TE#sC-4H T T T T
 KCC	 ,==	 
*
*..CC
*
*..	,	,	++RR>dHcUE#sC-$8899	:    eGLLNN##R[*:HE s t     Q Q Q Q Q Q Q Qh @ @ @ @ @ @ @ @F@ @ @ @ @ @* !% $#	g ggg g }	g
 
g g g gZ	  $ $#% % %% % 	%
 % % }% % 	% % % %V $( $ $#" " "" i " 	"
 " " }" " 
" " " "J z$ $ $ $ $ $ $ $
 "!!!!!    :    	CAAeH &&&
 y##"{9NNNO
 
 7  	
 	
 &&&,%_-
 
 *,,?   DB 	Kt&&&&&&	E&&Tb
9
9
9:::0 0 0 0 0 0 0 0 
E&&//{ s   3B BB