
    H jG                     n    S SK r S SKJrJrJrJr  S SKJr  S SKJ	r	  S SK
JrJr  S SKJr   " S S\5      rg)	    N)DictOptionalUnioncast)TracingGroupLocation)Artifact)ChannelOwnerfrom_nullable_channel)locals_to_paramsc                   l  ^  \ rS rSrS\S\S\S\SS4
U 4S jjr      SS	\S
\S\S\S\S\SS4S jjr	SS
\S	\SS4S jjr
S\SS4S jrSS\\R                  \4   SS4S jjrSS\\R                  \4   SS4S jjrSS\\R                  \4   SS4S jjrS S jrSS	\S\SS4S jjrS S jrSrU =r$ )!Tracing   parenttypeguidinitializerreturnNc                 l   > [         TU ]  XX45        SU l        SU l        S U l        SU l        S U l        g NF)super__init___include_sources_is_live
_stacks_id_is_tracing_traces_dir)selfr   r   r   r   	__class__s        j/root/GenerationalWealth/GenerationalWealth/venv/lib/python3.13/site-packages/playwright/_impl/_tracing.pyr   Tracing.__init__   s:     	t9&+#)-!&*.    nametitle	snapshotsscreenshotssourceslivec           	      R  #    [        [        5       5      n[        U5      U l        [        U5      U l        U R
                  R                  SS UUUUS.5      I S h  vN   U R
                  R                  SS X!S.5      I S h  vN nU R                  U5      I S h  vN   g  NE N  N	7f)NtracingStart)r"   r$   r%   r'   tracingStartChunk)r#   r"   )r   localsboolr   r   _channelsend_start_collecting_stacks)	r   r"   r#   r$   r%   r&   r'   params
trace_names	            r   startTracing.start#   s      "&(+ $WT
mm  &*		
 		
 		
  ==--'E
 

 ++J777		

 	8s6   AB'B!&B'B#B'B%B'#B'%B'c                    #    [        [        5       5      nU R                  R                  SS U5      I S h  vN nU R	                  U5      I S h  vN   g  N N7f)Nr*   )r   r+   r-   r.   r/   )r   r#   r"   r0   r1   s        r   start_chunkTracing.start_chunk?   sJ     !&(+==--.A4PP
++J777 Q7s!   4AAAAAAr1   c                   #    U R                   (       d"  SU l         U R                  R                  S5        U R                  R                  R	                  U R
                  XR                  5      I S h  vN U l        g  N
7f)NT)r   _connectionset_is_tracinglocal_utilstracing_startedr   r   r   )r   r1   s     r   r/    Tracing._start_collecting_stacksD   sa     #D++D1 $ 0 0 < < L Lj--!
 
 
s   A1B 3A>4B pathc                 B   #    U R                  U5      I S h  vN   g  N7fN)_do_stop_chunkr   r=   s     r   
stop_chunkTracing.stop_chunkL   s     !!$'''s   c                    #    U R                  U5      I S h  vN   U R                  R                  SS 5      I S h  vN   g  N) N7f)NtracingStop)r@   r-   r.   rA   s     r   stopTracing.stopO   sE     !!$'''mm  
 	
 	
 	(	
s   AA#AAAA	file_pathc                   #    U R                  5         U(       dp  U R                  R                  SS SS05      I S h  vN   U R                  (       a7  U R                  R
                  R                  U R                  5      I S h  vN   g U R                  R                  (       + nU(       a{  U R                  R                  SS SS05      I S h  vN nU R                  R
                  R                  [        U5      US   U R                  SU R                  S.5      I S h  vN   g U R                  R                  SS SS05      I S h  vN n[        [        [           [        UR!                  S5      5      5      nU(       dI  U R                  (       a7  U R                  R
                  R                  U R                  5      I S h  vN   g UR#                  U5      I S h  vN   UR%                  5       I S h  vN   U R                  R
                  R                  [        U5      / U R                  S	U R                  S.5      I S h  vN   g  GN GN GN GN7 GN N N~ Nh N7f)
NtracingStopChunkmodediscardentrieswrite)zipFilerM   stacksIdrK   includeSourcesarchiveartifactappend)_reset_stack_counterr-   r.   r   r8   r:   trace_discarded	is_remotesend_return_as_dictzipstrr   r   r   r   r
   getsave_asdelete)r   rH   is_localresultrS   s        r   r@   Tracing._do_stop_chunkV   s    !!#--$$%7	?RSSS&&22BB4??SSS''111==<<"D69*= F ""..22"9~%i0 $#&*&;&;   }}88	
 
 X!&**Z"89
 &&22BB4??SSS y)))oo**..y> OO "&"7"7
 	
 	
[ TS
  T 	*	
s   :I&IAI&IA	I&IAI&!I"'I&	I
A=I&II&!I "I&9I":AI&	I$
I&I&I&I&I&I& I&"I&$I&c                 l    U R                   (       a#  SU l         U R                  R                  S5        g g r   )r   r8   r9   r   s    r   rU   Tracing._reset_stack_counter   s,    $D++E2 r!   locationc                 |   #    U R                   R                  SS [        [        5       5      5      I S h  vN   g  N7f)NtracingGroup)r-   r.   r   r+   )r   r"   rd   s      r   groupTracing.group   s)     mm  7G7QRRRs   2<:<c                 X   #    U R                   R                  SS 5      I S h  vN   g  N7f)NtracingGroupEnd)r-   r.   rb   s    r   	group_endTracing.group_end   s'     mm  
 	
 	
s    *(*)r   r   r   r   r   )NNNNNN)NNr?   )r   N)__name__
__module____qualname____firstlineno__r	   rZ   r   r   r,   r2   r5   r/   r   pathlibPathrB   rF   r@   rU   r   rg   rk   __static_attributes____classcell__)r   s   @r   r   r      sM   /"/*-/58/GK/	/  88 8 	8
 8 8 8 
888s 8 8 8

 
 
(U7<<+<%= ( (
uW\\3%67 
4 
:
eGLL#4E.F :
RV :
x3
S S/C St S
 
r!   r   )rq   typingr   r   r   r    playwright._impl._api_structuresr   playwright._impl._artifactr   playwright._impl._connectionr	   r
   playwright._impl._helperr   r    r!   r   <module>r{      s*     . . A / L 5F
l F
r!   