
    }f                         d dl mZ d dlZddlmZmZmZ  G d de          Z G d de          Z G d	 d
e          Z	 G d de          Z
 G d de          Z G d de          ZdS )    )ABCN   )	PDFStringbuild_obj_dictcreate_dictionary_stringc                   &    e Zd ZddZddZddZdS )ActionNc                     || _         dS )zz
        Args:
            next (PDFObject | str): optional reference to another Action to trigger after this one
        N)next)selfnext_actions     E/var/www/rtfcompare/venv/lib/python3.11/site-packages/fpdf/actions.py__init__zAction.__init__   s    
  			    c                     t           N)NotImplementedError)r   _security_handler_obj_ids      r   	serializezAction.serialize   s    !!r   c                 p    |i }| j         r
| j         |d<   t          |||          }t          |d          S )NNext )
field_join)r   r   r   )r   
key_valuesr   r   obj_dicts        r   
_serializezAction._serialize   sH    J9 	+!%Jv!*.?II'SAAAAr   r   NN)NNN)__name__
__module____qualname__r   r   r    r   r   r	   r	      sV               " " " "B B B B B Br   r	   c                   ,     e Zd Zd fd	Zd fd	Z xZS )	URIActionNc                 b    t                                          t                     || _        d S r   )superr   r   uri)r   r'   r   	__class__s      r   r   zURIAction.__init__   s&    r   c                 z    t                                          dt          | j        d          d||          S )Nz/URITencrypt)su_r_ir   r   )r&   r   r   r'   r   r   r   r(   s      r   r   zURIAction.serialize    sD    ww!!9TXt#D#D#DEE/ " 
 
 	
r   r   r   r   r    r!   r   r   __classcell__r(   s   @r   r$   r$      s[             
 
 
 
 
 
 
 
 
 
r   r$   c                   ,     e Zd Zd fd	Zd fd	Z xZS )NamedActionNc                     t                                          t                     |dvrt          j        d           || _        d S )N)NextPagePrevPage	FirstPageLastPagezNon-standard named action added)r&   r   r   warningswarnaction_name)r   r<   r   r(   s      r   r   zNamedAction.__init__)   sF    OOOM;<<<&r   c                 b    t                                          dd| j         d||          S )Nz/Named/)r,   nr.   )r&   r   r<   r/   s      r   r   zNamedAction.serialize/   sA    ww!!!7T%5!7!788/ " 
 
 	
r   r   r   r0   r2   s   @r   r4   r4   (   s[        ' ' ' ' ' '
 
 
 
 
 
 
 
 
 
r   r4   c                   0     e Zd ZdZd fd	Zd fd	Z xZS )
GoToActionTAs of 2022, this does not seem honored by neither Adobe Acrobat nor Sumatra readers.Nc                 X    t                                          |           || _        d S r   )r&   r   dest)r   rD   r   r(   s      r   r   zGoToAction.__init__:   &    %%%			r   c                 \    t                                          d| j        d||          S )Nz/GoTo)r,   dr.   )r&   r   rD   r/   s      r   r   zGoToAction.serialize>   s7    ww!!	**/ " 
 
 	
r   r   r   r   r    r!   __doc__r   r   r1   r2   s   @r   rA   rA   7   a        ZZ     
 
 
 
 
 
 
 
 
 
r   rA   c                   ,     e Zd Zd fd	Zd fd	Z xZS )GoToRemoteActionNc                 f    t                                          |           || _        || _        d S r   )r&   r   filerD   )r   rN   rD   r   r(   s       r   r   zGoToRemoteAction.__init__G   s-    %%%				r   c                     t                                          dt          | j        d          | j        d||          S )Nz/GoToRTr*   )r,   frG   r.   )r&   r   r   rN   rD   r/   s      r   r   zGoToRemoteAction.serializeL   sH    ww!!49d!C!C!C$)TT/ " 
 
 	
r   r   r   r0   r2   s   @r   rL   rL   F   s[             

 
 
 
 
 
 
 
 
 
r   rL   c                   0     e Zd ZdZd fd	Zd fd	Z xZS )LaunchActionrB   Nc                 X    t                                          |           || _        d S r   )r&   r   rN   )r   rN   r   r(   s      r   r   zLaunchAction.__init__W   rE   r   c                 z    t                                          dt          | j        d          d||          S )Nz/LaunchTr*   )r,   rP   r.   )r&   r   r   rN   r/   s      r   r   zLaunchAction.serialize[   sD    ww!!)DIt"D"D"DEE/ " 
 
 	
r   r   r   rH   r2   s   @r   rR   rR   T   rJ   r   rR   )abcr   r:   syntaxr   r   r   r	   r$   r4   rA   rL   rR   r"   r   r   <module>rW      sL          G G G G G G G G G GB B B B BS B B B(

 

 

 

 

 

 

 


 
 
 
 
& 
 
 

 
 
 
 
 
 
 

 
 
 
 
v 
 
 

 
 
 
 
6 
 
 
 
 
r   