
    -i)                     V    d dl mZ d dlmZ d dlmZ e G d de                      ZdS )    )	dataclass)Clip)Effectc                   @    e Zd ZU dZdZeed<   dZeed<   de	de	fdZ
dS )Loopaf  
    Returns a clip that plays the current clip in an infinite loop.
    Ideal for clips coming from GIFs.

    Parameters
    ----------

    n
      Number of times the clip should be played. If `None` the
      the clip will loop indefinitely (i.e. with no set duration).

    duration
      Total duration of the clip. Can be specified instead of n.
    Nndurationclipreturnc                     |j         t          d          |j         |                    fdddg          }| j        r| j        z  | _         | j         r|                    | j                   }|S )zApply the effect to the clip.NzAttribute 'duration' not setc                     | z  S )N )tprevious_durations    S/var/www/html/speakWrite/venv/lib/python3.11/site-packages/moviepy/video/fx/Loop.py<lambda>zLoop.apply.<locals>.<lambda>"   s    a++     maskaudio)apply_to)r	   
ValueErrortime_transformr   with_duration)selfr
   r   s     @r   applyz
Loop.apply   s    = ;<<< M""++++vw6G # 
 
 6 	7 F%66DM= 	5%%dm44Dr   )__name__
__module____qualname____doc__r   int__annotations__r	   floatr   r   r   r   r   r   r      sa           AsMMMHe$ 4      r   r   N)dataclassesr   moviepy.Clipr   moviepy.Effectr   r   r   r   r   <module>r&      s{    ! ! ! ! ! !       ! ! ! ! ! ! # # # # #6 # # # # #r   