
    ,h6                    R   d dl mZ ddlmZmZ d dlmZ d dlZd dlZddl	m
Z
 ddl	mZ e G d d	             Ze G d
 d             Ze G d d             Ze G d d             Ze G d d             Zd(dZd(dZ	 	 	 	 d)dZd*dZ	 	 	 	 d+dZ	 	 	 	 d,dZ	 	 	 	 	 	 d-dZ	 	 	 	 	 	 d.dZ	 	 	 	 d/dZ	 	 	 	 	 	 	 	 d0dZ ed      e G d d                    Z ed      e G d  d!                    Z ed"      e G d# d$                    Z ed%      e G d& d'                    Zy)1    )annotations   )event_classT_JSON_DICT)	dataclassN)dom)runtimec                      e Zd ZU dZded<   ded<   ded<   ded<   ded	<   ded
<   ded<   ded<   dZded<   dZded<   dZded<   d Ze	d        Z
y)	Animationz
    Animation instance.
    strid_nameboolpaused_state
play_statefloatplayback_rate
start_timecurrent_timetype_Nz typing.Optional[AnimationEffect]sourcetyping.Optional[str]css_idz%typing.Optional[ViewOrScrollTimeline]view_or_scroll_timelinec                   t               }| j                  |d<   | j                  |d<   | j                  |d<   | j                  |d<   | j
                  |d<   | j                  |d<   | j                  |d<   | j                  |d<   | j                  | j                  j                         |d	<   | j                  | j                  |d
<   | j                  | j                  j                         |d<   |S )Nidr   pausedState	playStateplaybackRate	startTimecurrentTimetyper   cssIdviewOrScrollTimeline)dictr   r   r   r   r   r   r   r   r   to_jsonr   r   selfjsons     s/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/selenium/webdriver/common/devtools/v136/animation.pyr&   zAnimation.to_json:   s    vXXT
yyV"//] OO[#11^ OO["//]zzV;;"![[002DN;;" KKDM''3+/+G+G+O+O+QD'(    c                    | t        |d         t        |d         t        |d         t        |d         t        |d         t        |d         t        |d         t        |d         d	|v rt        j	                  |d	         nd d
|v rt        |d
         nd d|v rt
        j	                  |d               S d       S )Nr   r   r   r   r   r    r!   r"   r   r#   r$   )r   r   r   r   r   r   r   r   r   r   r   )r   r   r   AnimationEffect	from_jsonViewOrScrollTimelineclsr)   s     r*   r.   zAnimation.from_jsonL   s    DJT&\"d=124,-^ 45T+./tM23d6l#@HD@P?,,T(^<VZ)0D3tG}%ddz  C  eC$8$B$B4H^C_$`
 	
 IM
 	
r+   )__name__
__module____qualname____doc____annotations__r   r   r   r&   classmethodr.    r+   r*   r   r      s     
H I  O    J 04F,3 $(F ' FJBI$ 
 
r+   r   c                  j    e Zd ZU dZded<   dZded<   dZded<   dZded	<   dZded
<   d Z	e
d        Zy)r/   z
    Timeline instance
    zdom.ScrollOrientationaxisN"typing.Optional[dom.BackendNodeId]source_node_idztyping.Optional[float]start_offset
end_offsetsubject_node_idc                d   t               }| j                  j                         |d<   | j                  | j                  j                         |d<   | j                  | j                  |d<   | j
                  | j
                  |d<   | j                  | j                  j                         |d<   |S )Nr:   sourceNodeIdstartOffset	endOffsetsubjectNodeId)r%   r:   r&   r<   r=   r>   r?   r'   s     r*   r&   zViewOrScrollTimeline.to_jsonu   s    vyy((*V*#'#6#6#>#>#@D ("&"3"3D??& $D+$($8$8$@$@$BD!r+   c           
     F    | t         j                  j                  |d         d|v r"t         j                  j                  |d         nd d|v rt	        |d         nd d|v rt	        |d         nd d|v r't         j                  j                  |d               S d       S )Nr:   rA   rB   rC   rD   )r:   r<   r=   r>   r?   )r   ScrollOrientationr.   BackendNodeIdr   r0   s     r*   r.   zViewOrScrollTimeline.from_json   s    &&00f>P^bfPf3,,66tN7KLlp7D7LtM23RV3>$3FuT+./DRaeiRiC--77_8MN
 	

 pt
 	
r+   )r2   r3   r4   r5   r6   r<   r=   r>   r?   r&   r7   r.   r8   r+   r*   r/   r/   ]   s\       :>N6= ,0L(/ *.J&-
 ;?O7> 
 
r+   r/   c                      e Zd ZU dZded<   ded<   ded<   ded<   ded<   ded	<   ded
<   ded<   dZded<   dZded<   d Zed        Z	y)r-   z"
    AnimationEffect instance
    r   delay	end_delayiteration_start
iterationsdurationr   	directionfilleasingNr;   backend_node_idztyping.Optional[KeyframesRule]keyframes_rulec                   t               }| j                  |d<   | j                  |d<   | j                  |d<   | j                  |d<   | j
                  |d<   | j                  |d<   | j                  |d<   | j                  |d<   | j                  | j                  j                         |d	<   | j                  | j                  j                         |d
<   |S )NrI   endDelayiterationStartrL   rM   rN   rO   rP   backendNodeIdkeyframesRule)r%   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   r&   rR   r'   s     r*   r&   zAnimationEffect.to_json   s    v

W>>Z!%!5!5!__\==Z NN[yyVX+$($8$8$@$@$BD!*$($7$7$?$?$AD!r+   c                t    | t        |d         t        |d         t        |d         t        |d         t        |d         t        |d         t        |d         t        |d         d	|v r"t        j                  j	                  |d	         nd d
|v rt
        j	                  |d
         
      S d 
      S )NrI   rT   rU   rL   rM   rN   rO   rP   rV   rW   )
rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   )r   r   r   rG   r.   KeyframesRuler0   s     r*   r.   zAnimationEffect.from_json   s    W&D,-!$'7"89T,/04
+,${+,T&\"tH~&RaeiRiC--77_8MNosM\`dMd=2243HI
 	
 ko
 	
r+   )
r2   r3   r4   r5   r6   rQ   rR   r&   r7   r.   r8   r+   r*   r-   r-      su     L    O N I K ;?O7> 6:N29  
 
r+   r-   c                  @    e Zd ZU dZded<   dZded<   d Zed        Zy)	rY   z
    Keyframes Rule
    ztyping.List[KeyframeStyle]	keyframesNr   r   c                    t               }| j                  D cg c]  }|j                          c}|d<   | j                  | j                  |d<   |S c c}w )Nr[   r   )r%   r[   r&   r   )r(   r)   is      r*   r&   zKeyframesRule.to_json   sJ    v26..AQQYY[A[99 99DL Bs   Ac                     | |d   D cg c]  }t         j                  |       c}d|v rt        |d               S d       S c c}w )Nr[   r   )r[   r   )KeyframeStyler.   r   )r1   r)   r]   s      r*   r.   zKeyframesRule.from_json   sO    ;?;LMa}..q1M&,nT&\"
 	
:>
 	
Ms   A)	r2   r3   r4   r5   r6   r   r&   r7   r.   r8   r+   r*   rY   rY      s5     *) "&D
% 
 
r+   rY   c                  <    e Zd ZU dZded<   ded<   d Zed        Zy)r_   z
    Keyframe Style
    r   offsetrP   c                V    t               }| j                  |d<   | j                  |d<   |S )Nra   rP   )r%   ra   rP   r'   s     r*   r&   zKeyframeStyle.to_json   s(    vXXr+   c                F     | t        |d         t        |d               S )Nra   rP   )ra   rP   r   r0   s     r*   r.   zKeyframeStyle.from_json   s'    tH~&tH~&
 	
r+   N)r2   r3   r4   r5   r6   r&   r7   r.   r8   r+   r*   r_   r_      s.     K K 
 
r+   r_   c               #     K   ddi} | }yw)z2
    Disables animation domain notifications.
    methodzAnimation.disableNr8   cmd_dictr)   s     r*   disableri     s     
 	%H >D   
c               #     K   ddi} | }yw)z1
    Enables animation domain notifications.
    rf   zAnimation.enableNr8   rg   s     r*   enablerl     s     
 	$H >Drj   c              #  V   K   t               }| |d<   d|d}|}t        |d         S w)z
    Returns the current time of the an animation.

    :param id_: Id of animation.
    :returns: Current time of the page.
    r   zAnimation.getCurrentTimerf   paramsr!   )r%   r   )r   ro   rh   r)   s       r*   get_current_timerp     s>      &FF4L,H >Dm$%%s   ')c               #  6   K   ddi} | }t        |d         S w)zo
    Gets the playback rate of the document timeline.

    :returns: Playback rate for animations on page.
    rf   zAnimation.getPlaybackRater   )r   rg   s     r*   get_playback_raterr   -  s.      	-H >Dn%&&s   c              #  b   K   t               }| D cg c]  }| c}|d<   d|d}|}yc c}w w)zz
    Releases a set of animations to no longer be manipulated.

    :param animations: List of animation ids to seek.
    
animationszAnimation.releaseAnimationsrn   Nr%   )rt   ro   r]   rh   r)   s        r*   release_animationsrv   :  s?      &F'12!A2F</H >D 3s   /	*/c              #  ~   K   t               }| |d<   d|d}|}t        j                  j                  |d         S w)z
    Gets the remote object of the Animation.

    :param animation_id: Animation id.
    :returns: Corresponding remote object.
    animationIdzAnimation.resolveAnimationrn   remoteObject)r%   r	   RemoteObjectr.   )animation_idro   rh   r)   s       r*   resolve_animationr|   K  sK      &F(F=.H >D))$~*>??s   ;=c              #  l   K   t               }| D cg c]  }| c}|d<   ||d<   d|d}|}yc c}w w)z
    Seek a set of animations to a particular time within each animation.

    :param animations: List of animation ids to seek.
    :param current_time: Set the current time of each animation.
    rt   r!   zAnimation.seekAnimationsrn   Nru   )rt   r   ro   r]   rh   r)   s         r*   seek_animationsr~   ^  sI      &F'12!A2F<(F=,H >D 3   4	/4c              #  l   K   t               }| D cg c]  }| c}|d<   ||d<   d|d}|}yc c}w w)z
    Sets the paused state of a set of animations.

    :param animations: Animations to set the pause state of.
    :param paused: Paused state to set to.
    rt   pausedzAnimation.setPausedrn   Nru   )rt   r   ro   r]   rh   r)   s         r*   
set_pausedr   r  sI      &F'12!A2F<F8'H >D 3r   c              #  <   K   t               }| |d<   d|d}|}yw)zz
    Sets the playback rate of the document timeline.

    :param playback_rate: Playback rate for animations on page
    r   zAnimation.setPlaybackRatern   Nru   )r   ro   rh   r)   s       r*   set_playback_rater     s/      &F*F>-H >Ds   c              #  P   K   t               }| |d<   ||d<   ||d<   d|d}|}yw)z
    Sets the timing of an animation node.

    :param animation_id: Animation id.
    :param duration: Duration of the animation.
    :param delay: Delay of the animation.
    rx   rM   rI   zAnimation.setTimingrn   Nru   )r{   rM   rI   ro   rh   r)   s         r*   
set_timingr     sB      &F(F=!F:F7O'H >Ds   $&zAnimation.animationCanceledc                  .    e Zd ZU dZded<   edd       Zy)AnimationCanceledz9
    Event for when an animation has been cancelled.
    r   r   c                ,     | t        |d               S Nr   )r   rd   r0   s     r*   r.   zAnimationCanceled.from_json      DJ
 	
r+   N)r)   r   returnr   r2   r3   r4   r5   r6   r7   r.   r8   r+   r*   r   r           
H
 
r+   r   zAnimation.animationCreatedc                  .    e Zd ZU dZded<   edd       Zy)AnimationCreatedz9
    Event for each animation that has been created.
    r   r   c                ,     | t        |d               S r   rd   r0   s     r*   r.   zAnimationCreated.from_json  r   r+   N)r)   r   r   r   r   r8   r+   r*   r   r     r   r+   r   zAnimation.animationStartedc                  .    e Zd ZU dZded<   edd       Zy)AnimationStartedz4
    Event for animation that has been started.
    r   	animationc                @     | t         j                  |d               S Nr   )r   r   r.   r0   s     r*   r.   zAnimationStarted.from_json  "    ))${*;<
 	
r+   N)r)   r   r   r   r   r8   r+   r*   r   r     !     
 
r+   r   zAnimation.animationUpdatedc                  .    e Zd ZU dZded<   edd       Zy)AnimationUpdatedz4
    Event for animation that has been updated.
    r   r   c                @     | t         j                  |d               S r   r   r0   s     r*   r.   zAnimationUpdated.from_json  r   r+   N)r)   r   r   r   r   r8   r+   r*   r   r     r   r+   r   )r   0typing.Generator[T_JSON_DICT, T_JSON_DICT, None])r   r   r   1typing.Generator[T_JSON_DICT, T_JSON_DICT, float])r   r   )rt   typing.List[str]r   r   )r{   r   r   z@typing.Generator[T_JSON_DICT, T_JSON_DICT, runtime.RemoteObject])rt   r   r   r   r   r   )rt   r   r   r   r   r   )r   r   r   r   )r{   r   rM   r   rI   r   r   r   )
__future__r   utilr   r   dataclassesr   enumtyping r   r	   r   r/   r-   rY   r_   ri   rl   rp   rr   rv   r|   r~   r   r   r   r   r   r   r   r8   r+   r*   <module>r      s   # * !     I
 I
 I
X ,
 ,
 ,
^ B
 B
 B
J 
 
 
2 
 
 
0&&	8&&
'$	7"@@	G@&$ 
8($ 
8(	7"  
8	. *+

 
  ,
 )*

 
  +
 )*

 
  +
 )*

 
  +
r+   