
    Yh                     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                   f  ^  \ 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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                    > [         TU ]  XX45        U R                  R                  5         SU l        S U l        SU l        S U l        g NF)super__init___channelmark_as_internal_type_include_sources
_stacks_id_is_tracing_traces_dir)selfr   r   r   r   	__class__s        K/var/www/html/env/lib/python3.13/site-packages/playwright/_impl/_tracing.pyr   Tracing.__init__   sC     	t9++-&+)-!&*.    nametitle	snapshotsscreenshotssourcesc                 $  #    [        [        5       5      n[        U5      U l        U R                  R                  SU5      I S h  vN   U R                  R                  SX!S.5      I S h  vN nU R                  U5      I S h  vN   g  ND N  N	7f)NtracingStarttracingStartChunk)r$   r#   )r   localsboolr   r   send_start_collecting_stacks)r   r#   r$   r%   r&   r'   params
trace_names           r    startTracing.start#   s      "&(+ $Wmm  888==--5!?
 

 ++J777	 	9
 	8s6   ABB
%B+B,BBBBBc                    #    [        [        5       5      nU R                  R                  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#   r/   r0   s        r    start_chunkTracing.start_chunk4   sH     !&(+==--.A6JJ
++J777 K7s!   3AAAAAAr0   c                    #    U R                   (       d"  SU l         U R                  R                  S5        U R                  R                  R	                  U R
                  U5      I S h  vN U l        g  N
7f)NT)r   _connectionset_is_tracinglocal_utilstracing_startedr   r   )r   r0   s     r    r.    Tracing._start_collecting_stacks9   s]     #D++D1 $ 0 0 < < L Lj!
 
 
s   A'A6)A4*A6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_chunkA   s     !!$'''s   c                    #    U R                  U5      I S h  vN   U R                  R                  S5      I S h  vN   g  N( N7f)NtracingStop)r?   r   r-   r@   s     r    stopTracing.stopD   s9     !!$'''mm  /// 	(/s   AA "AAAA	file_pathc                   #    U R                  5         U(       do  U R                  R                  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(       az  U R                  R                  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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N6 GN N N~ Nh N7f)
NtracingStopChunkmodediscardentrieswrite)zipFilerL   stacksIdrJ   includeSourcesarchiveartifactappend)_reset_stack_counterr   r-   r   r7   r9   trace_discarded	is_remotesend_return_as_dictzipstrr   r   r   r   r
   getsave_asdelete)r   rG   is_localresultrR   s        r    r?   Tracing._do_stop_chunkH   s    !!#--$$%7&)9LMMM&&22BB4??SSS''111==<<"VY$7 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
 	
 	
Y NS
 T 	*	
s   9I#IAI#IAI#IAI#I &I#IA=I#II#II#6I7A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   r7   r8   r   s    r    rT   Tracing._reset_stack_counter   s,    $D++E2 r"   locationc                 z   #    U R                   R                  S[        [        5       5      5      I S h  vN   g  N7f)NtracingGroup)r   r-   r   r+   )r   r#   rc   s      r    groupTracing.group   s'     mm  1A&(1KLLLs   1;9;c                 V   #    U R                   R                  S5      I S h  vN   g  N7f)NtracingGroupEnd)r   r-   ra   s    r    	group_endTracing.group_end   s     mm  !2333s   )'))r   r   r   r   )NNNNN)NNr>   )r   N)__name__
__module____qualname____firstlineno__r	   rY   r   r   r,   r1   r4   r.   r   pathlibPathrA   rE   r?   rT   r   rf   rj   __static_attributes____classcell__)r   s   @r    r   r      s@   /"/*-/58/GK/	/  88 8 	8
 8 8 
8"8s 8 8 8

 
 
(U7<<+<%= ( (0uW\\3%67 04 09
eGLL#4E.F 9
RV 9
v3
M M/C Mt M4 4r"   r   )rp   typingr   r   r   r    playwright._impl._api_structuresr   playwright._impl._artifactr   playwright._impl._connectionr	   r
   playwright._impl._helperr   r    r"   r    <module>rz      s*     . . A / L 5t4l t4r"   