§
    N=&bÀŽ  ã                   óh  — d Z dZddlmZmZ ddl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 G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ dej        ¦  «        ZdS )z&
Transforms for resolving references.
ÚreStructuredTexté    )ÚnodesÚutils)Ú	Transformc                   ó   — e Zd ZdZdZd„ ZdS )ÚPropagateTargetsa}  
    Propagate empty internal targets to the next element.

    Given the following nodes::

        <target ids="internal1" names="internal1">
        <target anonymous="1" ids="id1">
        <target ids="internal2" names="internal2">
        <paragraph>
            This is a test.

    PropagateTargets propagates the ids and names of the internal
    targets preceding the paragraph to the paragraph itself::

        <target refid="internal1">
        <target anonymous="1" refid="id1">
        <target refid="internal2">
        <paragraph ids="internal2 id1 internal1" names="internal2 internal1">
            This is a test.
    i  c                 óú  — | j                              t          j        ¦  «        D �]T}t	          |j        t          j        ¦  «        s?|                     d¦  «        s*|                     d¦  «        s|                     d¦  «        rŒbt          |¦  «        dk    s
J d¦   «         ‚| 	                    d¬¦  «        }t	          |t          j
        ¦  «        r1| 	                    dd¬	¦  «        }t	          |t          j
        ¦  «        °1|�@t	          |t          j        t          j        f¦  «        rt	          |t          j        ¦  «        s�Œ$|d
                              |d
         ¦  «         |d                              |d         ¦  «         t          |d¦  «        si |_        t          |d¦  «        si |_        |d
         D ]}|| j         j        |<   ||j        |<   Œ|d         D ]}||j        |<   Œ|j                             t%          |di ¦  «        ¦  «         |j                             t%          |di ¦  «        ¦  «         |d
         d         |d<   g |d
<   g |d<   | j                              |¦  «         �ŒVd S )NÚrefidÚrefuriÚrefnamer   z&error: block-level target has childrenT)ÚascendF)r   ÚdescendÚidsÚnamesÚexpect_referenced_by_nameÚexpect_referenced_by_id)ÚdocumentÚfindallr   ÚtargetÚ
isinstanceÚparentÚTextElementÚhasattrÚlenÚ	next_nodeÚsystem_messageÚ	InvisibleÚ
TargetableÚextendr   r   r   ÚupdateÚgetattrÚ
note_refid)Úselfr   r   ÚidÚnames        ú@/usr/lib/python3/dist-packages/docutils/transforms/references.pyÚapplyzPropagateTargets.apply(   s§  € Ø”m×+Ò+­E¬LÑ9Ô9ð -	-ñ -	-ˆFå˜6œ=­%Ô*;Ñ<Ô<ð Ø—N’N 7Ñ+Ô+ðØ/5¯~ª~¸hÑ/GÔ/Gðà—~’~ iÑ0Ô0ðð Ý�v‘;”; !Ò#Ð#Ð#Ð%MÑ#Ô#Ð#Ø×(Ò(°Ð(Ñ5Ô5ˆIå˜Y­Ô(<Ñ=Ô=ð LØ%×/Ò/°tÀUÐ/ÑKÔK�	õ ˜Y­Ô(<Ñ=Ô=ð Lð Ð!Ý˜i­%¬/½5Ô;KÐ)LÑMÔMð "å" 9­e¬lÑ;Ô;ð "ñ Ø�eÔ×#Ò# F¨5¤MÑ2Ô2Ð2Ø�gÔ×%Ò% f¨W¤oÑ6Ô6Ð6å˜9Ð&AÑBÔBð 9Ø68�	Ô3Ý˜9Ð&?Ñ@Ô@ð 7Ø46�	Ô1Ø˜U”mð ?ð ?�à(1�”Ô! "Ñ%ð 9?�	Ô1°"Ñ5Ð5Ø˜wœð Cð C�Ø<B�	Ô3°DÑ9Ð9ð Ô/×6Ò6Ý˜Ð ;¸RÑ@Ô@ñBô Bð BàÔ-×4Ò4Ý˜Ð 9¸2Ñ>Ô>ñ@ô @ð @ð % Uœm¨AÔ.ˆF�7‰Oð ˆF�5‰MØ ˆF�7‰OØŒM×$Ò$ VÑ,Ô,Ð,Ñ,ð[-	-ð -	-ó    N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__Údefault_priorityr'   © r(   r&   r   r      s5   € € € € € ðð ð* Ðð.-ð .-ð .-ð .-ð .-r(   r   c                   ó   — e Zd ZdZdZd„ ZdS )ÚAnonymousHyperlinksa¥  
    Link anonymous references to targets.  Given::

        <paragraph>
            <reference anonymous="1">
                internal
            <reference anonymous="1">
                external
        <target anonymous="1" ids="id1">
        <target anonymous="1" ids="id2" refuri="http://external">

    Corresponding references are linked via "refid" or resolved via "refuri"::

        <paragraph>
            <reference anonymous="1" refid="id1">
                text
            <reference anonymous="1" refuri="http://external">
                external
        <target anonymous="1" ids="id1">
        <target anonymous="1" ids="id2" refuri="http://external">
    i¸  c                 óD  — g }g }| j                              t          j        ¦  «        D ],}|                     d¦  «        r|                     |¦  «         Œ-| j                              t          j        ¦  «        D ],}|                     d¦  «        r|                     |¦  «         Œ-t          |¦  «        t          |¦  «        k    rÆ| j         j         	                    dt          |¦  «        ›dt          |¦  «        ›d�¦  «        }| j          
                    |¦  «        }|D ]g}t          j        |j        |j        |¬¦  «        }| j          
                    |¦  «        }|                     |¦  «         |                     |¦  «         Œhd S t          ||¦  «        D ]‚\  }}	d|	_        	 |	                     d¦  «        r|	d         |d<   d|_        nM|	d	         s| j         j        |	d
                  }	ŒJ|	d	         d         |d
<   | j                              |¦  «         	 Œƒd S )NÚ	anonymouszAnonymous hyperlink mismatch: z references but z+ targets.
See "backrefs" attribute for IDs.©r
   é   Tr   r   r
   r   )r   r   r   Ú	referenceÚgetÚappendr   r   ÚreporterÚerrorÚset_idÚproblematicÚ	rawsourceÚadd_backrefÚreplace_selfÚzipÚ
referencedr   Úresolvedr   r"   )
r#   Úanonymous_refsÚanonymous_targetsÚnodeÚmsgÚmsgidÚrefÚprbÚprbidr   s
             r&   r'   zAnonymousHyperlinks.applys   sC  € ØˆØÐØ”M×)Ò)­%¬/Ñ:Ô:ð 	,ð 	,ˆDØ�xŠx˜Ñ$Ô$ð ,Ø×%Ò% dÑ+Ô+Ð+øØ”M×)Ò)­%¬,Ñ7Ô7ð 	/ð 	/ˆDØ�xŠx˜Ñ$Ô$ð /Ø!×(Ò(¨Ñ.Ô.Ð.øÝˆ~ÑÔ¥#Ð&7Ñ"8Ô"8Ò8Ð8Ø”-Ô(×.Ò.Ð.õ ˜Ñ(Ô(Ð(Ð(­#Ð.?Ñ*@Ô*@Ð*@Ð*@ðBñCô CˆCð ”M×(Ò(¨Ñ-Ô-ˆEØ%ð &ð &�ÝÔ'Ø”m S¤]¸%ðAñ Aô A�àœ×,Ò,¨SÑ1Ô1�Ø—’ Ñ&Ô&Ð&Ø× Ò  Ñ%Ô%Ð%Ð%ØˆFÝ˜~Ð/@ÑAÔAð 	ð 	‰KˆC�Ø !ˆFÔðØ—>’> (Ñ+Ô+ð Ø$*¨8Ô$4�C˜‘MØ#$�C”LØà! %œ=ð !à!%¤Ô!2°6¸'´?Ô!C˜Ø Ø#)¨%¤=°Ô#3�C˜‘LØ”M×,Ò,¨SÑ1Ô1Ð1Øøð	ð 	r(   Nr)   r/   r(   r&   r1   r1   Y   s5   € € € € € ðð ð, Ðð$ð $ð $ð $ð $r(   r1   c                   ó:   — e Zd ZdZdZd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	S )
ÚIndirectHyperlinksaN  
    a) Indirect external references::

           <paragraph>
               <reference refname="indirect external">
                   indirect external
           <target id="id1" name="direct external"
               refuri="http://indirect">
           <target id="id2" name="indirect external"
               refname="direct external">

       The "refuri" attribute is migrated back to all indirect targets
       from the final direct target (i.e. a target not referring to
       another indirect target)::

           <paragraph>
               <reference refname="indirect external">
                   indirect external
           <target id="id1" name="direct external"
               refuri="http://indirect">
           <target id="id2" name="indirect external"
               refuri="http://indirect">

       Once the attribute is migrated, the preexisting "refname" attribute
       is dropped.

    b) Indirect internal references::

           <target id="id1" name="final target">
           <paragraph>
               <reference refname="indirect internal">
                   indirect internal
           <target id="id2" name="indirect internal 2"
               refname="final target">
           <target id="id3" name="indirect internal"
               refname="indirect internal 2">

       Targets which indirectly refer to an internal target become one-hop
       indirect (their "refid" attributes are directly set to the internal
       target's "id"). References which indirectly refer to an internal
       target become direct internal references::

           <target id="id1" name="final target">
           <paragraph>
               <reference refid="id1">
                   indirect internal
           <target id="id2" name="indirect internal 2" refid="id1">
           <target id="id3" name="indirect internal" refid="id1">
    iÌ  c                 ó†   — | j         j        D ]3}|j        s|                      |¦  «         |                      |¦  «         Œ4d S ©N)r   Úindirect_targetsrB   Úresolve_indirect_targetÚresolve_indirect_references©r#   r   s     r&   r'   zIndirectHyperlinks.applyÐ   sU   € Ø”mÔ4ð 	5ð 	5ˆFØ”?ð 5Ø×,Ò,¨VÑ4Ô4Ð4Ø×,Ò,¨VÑ4Ô4Ð4Ð4ð	5ð 	5r(   c                 óš  — |                      d¦  «        }|€	|d         }nY| j        j                              |¦  «        }|s8| j        j        j        D ]} ||¦  «        r nŒ|                      |¦  «         d S | j        j        |         }|                     |¬¦  «         t          |t          j
        ¦  «        ra|j        sZ|                     d¦  «        rEt          |d¦  «        r|                      |¦  «         d S d|_        |                      |¦  «         |`|                     d¦  «        r|d         |d<   d|v r|d= nz|                     d¦  «        r&|d         |d<   | j                             |¦  «         n?|d         r ||d<   | j                             |¦  «         n|                      |¦  «         d S |�|d= d|_        d S )Nr   r
   ©r$   Úmultiply_indirectr5   r   r   )r7   r   ÚnameidsÚtransformerÚunknown_reference_resolversÚnonexistent_indirect_targetr   Únote_referenced_byr   r   r   rB   r   Úcircular_indirect_referencerU   rP   r"   )r#   r   r   Úreftarget_idÚresolver_functionÚ	reftargets         r&   rP   z*IndirectHyperlinks.resolve_indirect_targetÖ   s  € Ø—*’*˜YÑ'Ô'ˆØˆ?Ø! 'œ?ˆLˆLàœ=Ô0×4Ò4°WÑ=Ô=ˆLØð ð œÔ1ÔMð=ð =Ð%à(Ð(¨Ñ0Ô0ð Ø˜ðð ×4Ò4°VÑ<Ô<Ð<Ø�Ø”MÔ% lÔ3ˆ	Ø×$Ò$¨Ð$Ñ5Ô5Ð5Ý�y¥%¤,Ñ/Ô/ð 	)ØÔ&ð	)à×!Ò! )Ñ,Ô,ð	)õ �vÐ2Ñ3Ô3ð Ø×0Ò0°Ñ8Ô8Ð8Ø�Ø'(ˆFÔ$Ø×(Ò(¨Ñ3Ô3Ð3ØÐ(Ø×Ò˜XÑ&Ô&ð 	Ø(¨Ô2ˆF�8ÑØ˜&Ð Ð Ø˜7�OøØ×Ò˜wÑ'Ô'ð 		Ø'¨Ô0ˆF�7‰OØŒM×$Ò$ VÑ,Ô,Ð,Ð,à˜Ôð Ø".��w‘Ø”×(Ò(¨Ñ0Ô0Ð0Ð0à×0Ò0°Ñ8Ô8Ð8Ø�ØÐØ�yÐ!ØˆŒˆˆr(   c                 óŠ   — |d         | j         j        v r|                      |d¦  «         d S |                      |d¦  «         d S )Nr   z>which is a duplicate, and cannot be used as a unique referencezwhich does not exist)r   rV   Úindirect_target_errorrR   s     r&   rY   z.IndirectHyperlinks.nonexistent_indirect_target  se   € Ø�)Ô ¤Ô 5Ð5Ð5Ø×&Ò& vð 0Nñ Oô Oð Oð Oð Oð ×&Ò& vÐ/EÑFÔFÐFÐFÐFr(   c                 ó2   — |                       |d¦  «         d S )Nzforming a circular reference)r`   rR   s     r&   r[   z.IndirectHyperlinks.circular_indirect_reference	  s   € Ø×"Ò" 6Ð+IÑJÔJÐJÐJÐJr(   c           	      ó  — d}g }|d         rd|d         d         z  }|d         D ]5}|                      | j        j                             |g ¦  «        ¦  «         Œ6|d         D ]5}|                      | j        j                             |g ¦  «        ¦  «         Œ6|d         r|d|d         d         z  z  }| j        j                             d|›d|d	         ›d
|›d�|¬¦  «        }| j                             |¦  «        }t          j	        |¦  «        D ]g}	t          j        |	j        |	j        |¬¦  «        }
| j                             |
¦  «        }|                     |¦  «         |	                     |
¦  «         Œhd|_        d S )NÚ r   z"%s" r   r   z	(id="%s")zIndirect hyperlink target z refers to target "r   z", ú.©Ú	base_noder4   r5   )r   r   Úrefnamesr7   Úrefidsr9   r:   r;   r   Úuniqr   r<   r=   r>   r?   rB   )r#   r   ÚexplanationÚnamingÚreflistr%   r$   rF   rG   rH   rI   rJ   s               r&   r`   z(IndirectHyperlinks.indirect_target_error  s¬  € ØˆØˆØ�'Œ?ð 	2Ø˜v gœ¨qÔ1Ñ1ˆFØ˜7”Oð 	Að 	AˆDØ�NŠN˜4œ=Ô1×5Ò5°d¸BÑ?Ô?Ñ@Ô@Ð@Ð@Ø˜”-ð 	=ð 	=ˆBØ�NŠN˜4œ=Ô/×3Ò3°B¸Ñ;Ô;Ñ<Ô<Ð<Ð<Ø�%Œ=ð 	5Ø�k F¨5¤M°!Ô$4Ñ4Ñ4ˆFØŒmÔ$×*Ò*Ð*à��˜ 	Ô*Ð*Ð*¨K¨K¨Kð9ØDJð +ñ Lô Lˆð ”×$Ò$ SÑ)Ô)ˆÝ”:˜gÑ&Ô&ð 	"ð 	"ˆCÝÔ#Ø”- ¤°eð=ñ =ô =ˆCà”M×(Ò(¨Ñ-Ô-ˆEØ�OŠO˜EÑ"Ô"Ð"Ø×Ò˜SÑ!Ô!Ð!Ð!ØˆŒˆˆr(   c                 ó  — |                      d¦  «        rd}| j        j        }n|                      d¦  «        rd}d }nd S ||         }|d         D ]’}| j        j                             |g ¦  «        }|r|                     |¬¦  «         |D ]U}|j        rŒ
|d= |||<   |r ||¦  «         d|_        t          |t          j	        ¦  «        r|  
                    |¦  «         ŒVŒ“|d         D ]’}| j        j                             |g ¦  «        }|r|                     |¬¦  «         |D ]U}|j        rŒ
|d= |||<   |r ||¦  «         d|_        t          |t          j	        ¦  «        r|  
                    |¦  «         ŒVŒ“d S )	Nr
   r   r   ©r%   r   r5   r   rT   )r   r   r"   rg   r7   rZ   rB   r   r   r   rQ   rh   )	r#   r   ÚattnameÚcall_methodÚattvalr%   rl   rH   r$   s	            r&   rQ   z.IndirectHyperlinks.resolve_indirect_references#  së  € Ø�>Š>˜'Ñ"Ô"ð 	ØˆGØœ-Ô2ˆKˆKØ�^Š^˜HÑ%Ô%ð 	ØˆGØˆKˆKàˆFØ˜”ˆØ˜7”Oð 	:ð 	:ˆDØ”mÔ,×0Ò0°°rÑ:Ô:ˆGØð 5Ø×)Ò)¨tÐ)Ñ4Ô4Ð4Øð 	:ð 	:�Ø”<ð ØØ˜	�NØ%��G‘Øð %Ø�K Ñ$Ô$Ð$Ø �”Ý˜c¥5¤<Ñ0Ô0ð :Ø×4Ò4°SÑ9Ô9Ð9øð	:ð ˜”-ð 	:ð 	:ˆBØ”mÔ*×.Ò.¨r°2Ñ6Ô6ˆGØð 1Ø×)Ò)¨RÐ)Ñ0Ô0Ð0Øð 	:ð 	:�Ø”<ð ØØ˜�LØ%��G‘Øð %Ø�K Ñ$Ô$Ð$Ø �”Ý˜c¥5¤<Ñ0Ô0ð :Ø×4Ò4°SÑ9Ô9Ð9øð	:ð		:ð 	:r(   N)r*   r+   r,   r-   r.   r'   rP   rY   r[   r`   rQ   r/   r(   r&   rL   rL   š   sˆ   € € € € € ð0ð 0ðd Ðð5ð 5ð 5ð*ð *ð *ðXGð Gð GðKð Kð Kðð ð ð.%:ð %:ð %:ð %:ð %:r(   rL   c                   ó   — e Zd ZdZdZd„ ZdS )ÚExternalTargetsa¸  
    Given::

        <paragraph>
            <reference refname="direct external">
                direct external
        <target id="id1" name="direct external" refuri="http://direct">

    The "refname" attribute is replaced by the direct "refuri" attribute::

        <paragraph>
            <reference refuri="http://direct">
                direct external
        <target id="id1" name="direct external" refuri="http://direct">
    i€  c                 óL  — | j                              t          j        ¦  «        D ]~}|                     d¦  «        rg|d         }|d         D ]V}| j         j                             |g ¦  «        }|r|                     |¬¦  «         |D ]}|j        rŒ
|d= ||d<   d|_        ŒŒWŒd S )Nr   r   rn   r   r5   )	r   r   r   r   r   rg   r7   rZ   rB   )r#   r   r   r%   rl   rH   s         r&   r'   zExternalTargets.apply_  sÒ   € Ø”m×+Ò+­E¬LÑ9Ô9ð 	)ð 	)ˆFØ�~Š~˜hÑ'Ô'ð )Ø Ô)�Ø" 7œOð 	)ð 	)�DØ"œmÔ4×8Ò8¸¸rÑBÔB�GØð =Ø×1Ò1°tÐ1Ñ<Ô<Ð<Ø&ð )ð )˜Øœ<ð %Ø$Ø 	˜NØ(.˜˜H™Ø'(˜œ˜ð)øð	)ð 	)r(   Nr)   r/   r(   r&   rs   rs   K  s5   € € € € € ðð ð  Ðð)ð )ð )ð )ð )r(   rs   c                   ó   — e Zd ZdZd„ Zd„ ZdS )ÚInternalTargetsi”  c                 óÒ   — | j                              t          j        ¦  «        D ]A}|                     d¦  «        s*|                     d¦  «        s|                      |¦  «         ŒBd S )Nr   r
   )r   r   r   r   r   Úresolve_reference_idsrR   s     r&   r'   zInternalTargets.applys  si   € Ø”m×+Ò+­E¬LÑ9Ô9ð 	3ð 	3ˆFØ—>’> (Ñ+Ô+ð 3°F·N²NÀ7Ñ4KÔ4Kð 3Ø×*Ò*¨6Ñ2Ô2Ð2øð	3ð 	3r(   c                 ó  — |d         D ]w}| j         j                             |¦  «        }| j         j                             |g ¦  «        }|r|                     |¬¦  «         |D ]}|j        rŒ
|r|d= ||d<   d|_        ŒŒxdS )aº  
        Given::

            <paragraph>
                <reference refname="direct internal">
                    direct internal
            <target id="id1" name="direct internal">

        The "refname" attribute is replaced by "refid" linking to the target's
        "id"::

            <paragraph>
                <reference refid="id1">
                    direct internal
            <target id="id1" name="direct internal">
        r   rn   r   r
   r5   N)r   rV   r7   rg   rZ   rB   )r#   r   r%   r
   rl   rH   s         r&   rx   z%InternalTargets.resolve_reference_idsx  s´   € ð" ˜7”Oð 	!ð 	!ˆDØ”MÔ)×-Ò-¨dÑ3Ô3ˆEØ”mÔ,×0Ò0°°rÑ:Ô:ˆGØð 5Ø×)Ò)¨tÐ)Ñ4Ô4Ð4Øð !ð !�Ø”<ð ØØð )Ø˜I˜Ø#(�C˜‘LØ �”�ð!ð	!ð 	!r(   N)r*   r+   r,   r.   r'   rx   r/   r(   r&   rv   rv   o  s8   € € € € € àÐð3ð 3ð 3ð
!ð !ð !ð !ð !r(   rv   c                   óH   — e Zd ZdZdZdZ	 g d¢Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
„ ZdS )Ú	Footnotesaì  
    Assign numbers to autonumbered footnotes, and resolve links to footnotes,
    citations, and their references.

    Given the following ``document`` as input::

        <document>
            <paragraph>
                A labeled autonumbered footnote reference:
                <footnote_reference auto="1" id="id1" refname="footnote">
            <paragraph>
                An unlabeled autonumbered footnote reference:
                <footnote_reference auto="1" id="id2">
            <footnote auto="1" id="id3">
                <paragraph>
                    Unlabeled autonumbered footnote.
            <footnote auto="1" id="footnote" name="footnote">
                <paragraph>
                    Labeled autonumbered footnote.

    Auto-numbered footnotes have attribute ``auto="1"`` and no label.
    Auto-numbered footnote_references have no reference text (they're
    empty elements). When resolving the numbering, a ``label`` element
    is added to the beginning of the ``footnote``, and reference text
    to the ``footnote_reference``.

    The transformed result will be::

        <document>
            <paragraph>
                A labeled autonumbered footnote reference:
                <footnote_reference auto="1" id="id1" refid="footnote">
                    2
            <paragraph>
                An unlabeled autonumbered footnote reference:
                <footnote_reference auto="1" id="id2" refid="id3">
                    1
            <footnote auto="1" id="id3" backrefs="id2">
                <label>
                    1
                <paragraph>
                    Unlabeled autonumbered footnote.
            <footnote auto="1" id="footnote" name="footnote" backrefs="id1">
                <label>
                    2
                <paragraph>
                    Labeled autonumbered footnote.

    Note that the footnotes are not in the same order as the references.

    The labels and reference text are added to the auto-numbered ``footnote``
    and ``footnote_reference`` elements.  Footnote elements are backlinked to
    their references via "refids" attributes.  References are assigned "id"
    and "refid" attributes.

    After adding labels and reference text, the "auto" attributes can be
    ignored.
    il  N)
Ú*u   â€ u   â€¡õ   Â§õ   Â¶ú#u   â™ u   â™¥u   â™¦u   â™£c                 óä   — g | _         | j        j        }|                      |¦  «        | j        _        |                      |¦  «         |                      ¦   «          |                      ¦   «          d S rN   )Úautofootnote_labelsr   Úautofootnote_startÚnumber_footnotesÚnumber_footnote_referencesÚsymbolize_footnotesÚresolve_footnotes_and_citations)r#   Ústartnums     r&   r'   zFootnotes.applyê  sj   € Ø#%ˆÔ Ø”=Ô3ˆØ+/×+@Ò+@ÀÑ+JÔ+JˆŒÔ(Ø×'Ò'¨Ñ1Ô1Ð1Ø× Ò Ñ"Ô"Ð"Ø×,Ò,Ñ.Ô.Ð.Ð.Ð.r(   c                 óL  — | j         j        D �]•}	 t          |¦  «        }|dz  }|| j         j        vrnŒ$|                     dt          j        d|¦  «        ¦  «         |d         D ]Û}| j         j                             |g ¦  «        D ]¸}|t          j	        |¦  «        z  }| 
                    d¦  «         t          |d         ¦  «        t          |d         ¦  «        cxk    rdk    sn J ‚|d         d         |d<   |                     |d         d         ¦  «         | j                              |¦  «         d|_        Œ¹ŒÜ|d         sX|d	         sP|d                              |¦  «         | j                              ||¦  «         | j                             |¦  «         �Œ—|S )
z«
        Assign numbers to autonumbered footnotes.

        For labeled autonumbered footnotes, copy the number over to
        corresponding footnote references.
        Tr5   r   rc   r   r   r   r
   Údupnames)r   ÚautofootnotesÚstrrV   Úinsertr   ÚlabelÚfootnote_refsr7   ÚTextÚdelattrr   r>   r"   rB   r8   Únote_explicit_targetr�   )r#   r‡   Úfootnoter�   r%   rH   s         r&   rƒ   zFootnotes.number_footnotesò  s¿  € ð œÔ3ð 	7ñ 	7ˆHðÝ˜H™œ�Ø˜A‘�Ø ¤Ô 5Ð5Ð5Øð	ð
 �OŠO˜A�uœ{¨2¨uÑ5Ô5Ñ6Ô6Ð6Ø  Ô)ð %ð %�Øœ=Ô6×:Ò:¸4ÀÑDÔDð %ð %�CØ�5œ: eÑ,Ô,Ñ,�CØ—K’K 	Ñ*Ô*Ð*Ý˜x¨œÑ/Ô/µ3°s¸5´z±?´?ÐGÐGÒGÐGÀaÒGÐGÐGÐGÐGÐGØ#+¨E¤?°1Ô#5�C˜‘LØ×(Ò(¨¨U¬°A¬Ñ7Ô7Ð7Ø”M×,Ò,¨SÑ1Ô1Ð1Ø#$�C”L�Lð%ð ˜GÔ$ð 7¨X°jÔ-Að 7Ø˜Ô!×(Ò(¨Ñ/Ô/Ð/Ø”×2Ò2°8¸XÑFÔFÐFØÔ(×/Ò/°Ñ6Ô6Ð6ùØˆr(   c                 ó¾  — d}| j         j        D �]Ì}|j        s|                     d¦  «        rŒ 	 | j        |         }nû# t
          $ rî | j         j                             dt          | j        ¦  «        z  |¬¦  «        }| j          	                    |¦  «        }| j         j        |d…         D ]„}|j        s|                     d¦  «        rŒt          j        |j        |j        |¬¦  «        }| j          	                    |¦  «        }|                     |¦  «         |                     |¦  «         Œ…Y  dS w xY w|t          j        |¦  «        z  }| j         j        |         }	| j         j        |	         }
|	|d<   | j                              |¦  «         t          |d         ¦  «        d	k    sJ ‚|
                     |d         d         ¦  «         d	|_        |d	z  }�ŒÎdS )
z3Assign numbers to autonumbered footnote references.r   r
   zUToo many autonumbered footnote references: only %s corresponding footnotes available.re   Nr   r4   r   r5   )r   Úautofootnote_refsrB   r   r�   Ú
IndexErrorr9   r:   r   r;   r   r<   r=   r>   r?   r�   rV   r   r"   )r#   r‡   ÚirH   r�   rF   rG   rI   rJ   r$   r’   s              r&   r„   z$Footnotes.number_footnote_references  s  € àˆØ”=Ô2ð 	ñ 	ˆCØŒ|ð ˜sŸ{š{¨7Ñ3Ô3ð ØðØÔ0°Ô3��øÝð ð ð Ø”mÔ,×2Ò2ð;å˜DÔ4Ñ5Ô5ñ6àADð 3ñ Fô F�ð œ×,Ò,¨SÑ1Ô1�Øœ=Ô:¸1¸2¸2Ô>ð *ð *�CØ”|ð ! s§{¢{°9Ñ'=Ô'=ð !Ø ÝÔ+Øœ-¨¬¸eðEñ Eô E�Cà œM×0Ò0°Ñ5Ô5�EØ—O’O EÑ*Ô*Ð*Ø×$Ò$ SÑ)Ô)Ð)Ð)Ø���ðøøøð •5”:˜eÑ$Ô$Ñ$ˆCØ”Ô& uÔ-ˆBØ”}Ô(¨Ô,ˆHØˆC�‰LØŒM×$Ò$ SÑ)Ô)Ð)Ý�s˜5”z‘?”? aÒ'Ð'Ð'Ð'Ø× Ò   U¤¨A¤Ñ/Ô/Ð/ØˆCŒLØ�‰FˆA‰Að9	ð 	s   °>¾C3D6Ä5D6c                 óÒ  — g }| j         j        D ]±}t          | j         j        t	          | j        ¦  «        ¦  «        \  }}| j        |         |dz   z  }|                     |¦  «         |                     dt          j	        d|¦  «        ¦  «         | j         xj        dz  c_        | j          
                    |¦  «         Œ²d}| j         j        D �]–}	 |t          j        ||         ¦  «        z  }nö# t          $ ré | j         j                             dt	          |¦  «        z  |¬¦  «        }| j          
                    |¦  «        }	| j         j        |d…         D ]„}|j        s|                     d¦  «        rŒt          j        |j        |j        |	¬¦  «        }
| j          
                    |
¦  «        }|                     |¦  «         |                     |
¦  «         Œ…Y  dS w xY w| j         j        |         }t	          |d	         ¦  «        dk    sJ ‚|d	         d         |d<   | j                              |¦  «         |                     |d	         d         ¦  «         |dz  }�Œ˜dS )
z<Add symbols indexes to "[*]"-style footnotes and references.r5   r   rc   zOToo many symbol footnote references: only %s corresponding footnotes available.re   Nr
   r4   r   )r   Úsymbol_footnotesÚdivmodÚsymbol_footnote_startr   Úsymbolsr8   rŒ   r   r�   r;   Úsymbol_footnote_refsr�   r•   r9   r:   rB   r   r<   r=   r>   r?   r"   )r#   Úlabelsr’   ÚrepsÚindexÚ	labeltextr–   rH   rF   rG   rI   rJ   s               r&   r…   zFootnotes.symbolize_footnotes0  sˆ  € àˆØœÔ6ð 	+ð 	+ˆHÝ  ¤Ô!DÝ!$ T¤\Ñ!2Ô!2ñ4ô 4‰KˆD�%àœ UÔ+¨t°a©xÑ8ˆIØ�MŠM˜)Ñ$Ô$Ð$Ø�OŠO˜A�uœ{¨2¨yÑ9Ô9Ñ:Ô:Ð:ØŒMÐ/Ô/°1Ñ4Ð/Ô/ØŒM× Ò  Ñ*Ô*Ð*Ð*ØˆØ”=Ô5ð 	ñ 	ˆCðØ•u”z &¨¤)Ñ,Ô,Ñ,��øÝð ð ð Ø”mÔ,×2Ò2ð;Ý=@À¹[¼[ñIà #ð 3ñ %ô %�ð œ×,Ò,¨SÑ1Ô1�Øœ=Ô=¸a¸b¸bÔAð *ð *�CØ”|ð ! s§{¢{°7Ñ';Ô';ð !Ø ÝÔ+Øœ-¨¬¸eðEñ Eô E�Cà œM×0Ò0°Ñ5Ô5�EØ—O’O EÑ*Ô*Ð*Ø×$Ò$ SÑ)Ô)Ð)Ð)Ø���ðøøøð ”}Ô5°aÔ8ˆHÝ�x ”Ñ'Ô'¨1Ò,Ð,Ð,Ð,Ø# Eœ?¨1Ô-ˆC�‰LØŒM×$Ò$ SÑ)Ô)Ð)Ø× Ò   U¤¨A¤Ñ/Ô/Ð/Ø�‰FˆA‰Að/	ð 	s   ÃC1Ã1C.G$Ç#G$c                 óF  — | j         j        D ]C}|d         D ]8}|| j         j        v r(| j         j        |         }|                      ||¦  «         Œ9ŒD| j         j        D ]C}|d         D ]8}|| j         j        v r(| j         j        |         }|                      ||¦  «         Œ9ŒDdS )za
        Link manually-labeled footnotes and citations to/from their
        references.
        r   N)r   Ú	footnotesrŽ   Úresolve_referencesÚ	citationsÚcitation_refs)r#   r’   r�   rl   Úcitations        r&   r†   z)Footnotes.resolve_footnotes_and_citationsU  sÖ   € ð
 œÔ/ð 	?ð 	?ˆHØ! 'Ô*ð ?ð ?�Ø˜DœMÔ7Ð7Ð7Ø"œmÔ9¸%Ô@�GØ×+Ò+¨H°gÑ>Ô>Ð>øð?ð œÔ/ð 	?ð 	?ˆHØ! 'Ô*ð ?ð ?�Ø˜DœMÔ7Ð7Ð7Ø"œmÔ9¸%Ô@�GØ×+Ò+¨H°gÑ>Ô>Ð>øð?ð	?ð 	?r(   c                 ó:  — t          |d         ¦  «        dk    sJ ‚|d         d         }|D ]g}|j        rŒ
|                     d¦  «         ||d<   t          |d         ¦  «        dk    sJ ‚|                     |d         d         ¦  «         d|_        Œhd|_        d S )Nr   r5   r   r   r
   )r   rB   r�   r>   )r#   Únoterl   r$   rH   s        r&   r£   zFootnotes.resolve_referencese  s®   € Ý�4˜”;ÑÔ 1Ò$Ð$Ð$Ð$Ø�%Œ[˜Œ^ˆØð 	ð 	ˆCØŒ|ð ØØ�KŠK˜	Ñ"Ô"Ð"ØˆC�‰LÝ�s˜5”z‘?”? aÒ'Ð'Ð'Ð'Ø×Ò˜S œZ¨œ]Ñ+Ô+Ð+ØˆCŒLˆLØˆŒˆˆr(   )r*   r+   r,   r-   r.   r�   r›   r'   rƒ   r„   r…   r†   r£   r/   r(   r&   r{   r{   —  s�   € € € € € ð9ð 9ðv ÐàÐØ9ðð ð €Gð"/ð /ð /ðð ð ð:ð ð ðB#ð #ð #ðJ?ð ?ð ?ð ð ð ð ð r(   r{   c                   ó   — e Zd ZdS )Ú#CircularSubstitutionDefinitionErrorN)r*   r+   r,   r/   r(   r&   rª   rª   s  s   € € € € € Ø€Dr(   rª   c                   ó   — e Zd ZdZdZ	 d„ ZdS )ÚSubstitutionsaD  
    Given the following ``document`` as input::

        <document>
            <paragraph>
                The
                <substitution_reference refname="biohazard">
                    biohazard
                 symbol is deservedly scary-looking.
            <substitution_definition name="biohazard">
                <image alt="biohazard" uri="biohazard.png">

    The ``substitution_reference`` will simply be replaced by the
    contents of the corresponding ``substitution_definition``.

    The transformed result will be::

        <document>
            <paragraph>
                The
                <image alt="biohazard" uri="biohazard.png">
                 symbol is deservedly scary-looking.
            <substitution_definition name="biohazard">
                <image alt="biohazard" uri="biohazard.png">
    éÜ   c           	      óô	  — | j         j        }| j         j        }i }t          | j         j        dd¦  «        }t          | j                              t          j        ¦  «        ¦  «        }|D �]�}d}|d         }||v r|}	n*| 	                    ¦   «         }
| 
                    |
d ¦  «        }	|	€%| j         j                             d|z  |¬¦  «        }nO||	         }t          |                     ¦   «         ¦  «        |k    r"| j         j                             d|	z  ¦  «        }|r�| j                              |¦  «        }t          j        |j        |j        |¬¦  «        }| j                              |¦  «        }|                     |¦  «         |                     |¦  «         �Œ7|j        }|                     |¦  «        }d	|j        v s	d
|j        v rL|dk    rFt/          ||dz
           t          j        ¦  «        r#||dz
                                ¦   «         ||dz
  <   d|j        v s	d
|j        v r\t          |¦  «        |dz   k    rFt/          ||dz            t          j        ¦  «        r#||dz                                 ¦   «         ||dz   <   |                     ¦   «         }	 |                     t          j        ¦  «        D ]v}||d          	                    ¦   «                  }||                     |g ¦  «        v rt:          ‚||                              |	¦  «         ||d<   |                     |¦  «         Œw�ne# t:          $ �rW |j        }t/          |t          j        ¦  «        r[| j         j                             dt          j         |j        |j        ¦  «        |j!        |¬¦  «        }|                     |¦  «         n×|}| "                    d¦  «        r|d         }| "                    d¦  «        °| j         j                             d|z  |¬¦  «        }| j                              |¦  «        }t          j        |j        |j        |¬¦  «        }| j                              |¦  «        }|                     |¦  «         |                     |¦  «         Y �Œ-w xY w|                     |j#        ¦  «         |j#        D ]:}t/          |t          j$        ¦  «        rd|v r| j          %                    |¦  «         Œ;�Œ�d S )NÚline_length_limiti'  rc   r   z(Undefined substitution referenced: "%s".re   z;Substitution definition "%s" exceeds the line-length-limit.r4   ÚltrimÚtrimr   r5   Úrtrimz
ref-originz*Circular substitution definition detected:)Úlinerf   z2Circular substitution definition referenced: "%s".)&r   Úsubstitution_defsÚsubstitution_namesr!   ÚsettingsÚlistr   r   Úsubstitution_referenceÚlowerr7   r9   r:   r   Úastextr;   r<   r=   r>   r?   r   rŸ   Ú
attributesr   r�   ÚrstripÚlstripÚdeepcopyÚ
setdefaultrª   r8   Úsubstitution_definitionÚliteral_blockr³   r   ÚchildrenÚReferentialÚnote_refname)r#   ÚdefsÚnormedÚnestedr¯   Ú
subreflistrH   rF   r   ÚkeyÚnormed_nameÚsubdefrG   rI   rJ   r   rŸ   Úsubdef_copyÚ
nested_refÚnested_nameÚ
ref_originrE   s                         r&   r'   zSubstitutions.apply—  sK  € ØŒ}Ô.ˆØ”Ô1ˆØˆÝ# D¤MÔ$:Ø$7¸ñ@ô @Ðõ ˜$œ-×/Ò/µÔ0LÑMÔMÑNÔNˆ
Øð R	9ñ R	9ˆCØˆCØ˜)”nˆGØ˜$ˆˆØ��à%Ÿmšm™oœo�Ø—j’j ¨dÑ3Ô3�Øˆ{Ø”mÔ,×2Ò2Ø@Øñ Ø+.ð 3ñ 0ô 0��ð ˜cœ�Ý�v—}’}‘”Ñ'Ô'Ð*;Ò;Ð;Øœ-Ô0×6Ò6ð2Ø47ñ8ñ9ô 9�Cð ð Øœ×,Ò,¨SÑ1Ô1�ÝÔ'Ø”m S¤]¸%ðAñ Aô A�àœ×,Ò,¨SÑ1Ô1�Ø—’ Ñ&Ô&Ð&Ø× Ò  Ñ%Ô%Ð%Ùà”ZˆFØ—L’L Ñ%Ô%ˆEØ˜6Ô,Ð,Ð,Ø˜VÔ.Ð.Ð.Ø˜1’9�9¥¨F°5¸1±9Ô,=Ý,1¬Jñ"8ô "8�9à(.¨u°q©yÔ(9×(@Ò(@Ñ(BÔ(B�F˜5 1™9Ñ%Ø˜6Ô,Ð,Ð,Ø˜VÔ.Ð.Ð.Ý˜‘K”K %¨!¡)Ò+Ð+Ý" 6¨%°!©)Ô#4µe´jÑAÔAð ,à(.¨u°q©yÔ(9×(@Ò(@Ñ(BÔ(B�F˜5 1™9Ñ%Ø Ÿ/š/Ñ+Ô+ˆKð!à"-×"5Ò"5ÝÔ4ñ#6ô #6ð 2ð 2�Jà"(¨°IÔ)>×)DÒ)DÑ)FÔ)FÔ"G�KØ" f×&7Ò&7¸ÀRÑ&HÔ&HÐHÐHÝAÐAØ˜;Ô'×.Ò.¨sÑ3Ô3Ð3Ø/2�J˜|Ñ,Ø×%Ò% jÑ1Ô1Ð1Ð1ñ2øõ 7ð ñ ð Øœ�Ý˜f¥eÔ&CÑDÔDð *Øœ-Ô0×6Ò6ØDÝÔ+¨FÔ,<Ø,2Ô,<ñ>ô >à#œ[°Fð	 7ñ <ô <�Cð
 ×'Ò'¨Ñ,Ô,Ð,Ð,ð "%�JØ$×,Ò,¨\Ñ:Ô:ð >Ø%/°Ô%=˜
ð %×,Ò,¨\Ñ:Ô:ð >àœ-Ô0×6Ò6ð Ø")ñ*Ø5?ð 7ñ Aô A�Cð !œM×0Ò0°Ñ5Ô5�EÝÔ+Øœ s¤}¸EðCñ Cô C�Cà œM×0Ò0°Ñ5Ô5�EØ—O’O EÑ*Ô*Ð*Ø×$Ò$ SÑ)Ô)Ð)Ø‘ð/øøøð0 ×Ò˜[Ô1Ñ2Ô2Ð2ð $Ô,ð 9ð 9�Ý˜d¥EÔ$5Ñ6Ô6ð 9ð ! DÐ(Ð(Øœ×2Ò2°4Ñ8Ô8Ð8øñ9ð[R	9ð R	9s   ÊBL5Ì5ERÒRNr)   r/   r(   r&   r¬   r¬   w  s?   € € € € € ðð ð4 Ðð>ðZ9ð Z9ð Z9ð Z9ð Z9r(   r¬   c                   ó*   — e Zd ZdZdZ	 d„ Zd„ Zd„ ZdS )ÚTargetNotesz‚
    Creates a footnote for each external target in the text, and corresponding
    footnote references after each reference.
    i  c                 ót   — t          j        | ||¬¦  «         |j                             dg ¦  «        | _        d S )N)Ú	startnodeÚclass)r   Ú__init__Údetailsr7   Úclasses)r#   r   rÓ   s      r&   rÕ   zTargetNotes.__init__ÿ  s8   € ÝÔ˜4 °YÐ?Ñ?Ô?Ð?à Ô(×,Ò,¨W°bÑ9Ô9ˆŒˆˆr(   c                 ó  — i }g }| j                              t          j        ¦  «        D ]¤}|                     d¦  «        sŒ|d         }g }|D ]5}|                     | j         j                             |g ¦  «        ¦  «         Œ6|sŒ]|                      |d         ||¦  «        }|d         |vr |||d         <   | 	                    |¦  «         Œ¥| j                              t          j
        ¦  «        D ]u}|                     d¦  «        sŒ|                     d¦  «        rH|                      |d         |g|¦  «        }|d         |vr |||d         <   | 	                    |¦  «         Œv| j                             |¦  «         d S )Nr   r   r3   )r   r   r   r   r   r   rg   r7   Úmake_target_footnoter8   r6   rÓ   r?   )	r#   ÚnotesÚnodelistr   r   Úrefsr%   r’   rH   s	            r&   r'   zTargetNotes.apply  s¥  € ØˆØˆØ”m×+Ò+­E¬LÑ9Ô9ð 	*ð 	*ˆFà—>’> (Ñ+Ô+ð ØØ˜7”OˆEØˆDØð Bð B�Ø—’˜DœMÔ2×6Ò6°t¸RÑ@Ô@ÑAÔAÐAÐAØð ØØ×0Ò0°¸Ô1AÀ4Ø16ñ8ô 8ˆHà�hÔ uÐ,Ð,Ø*2��f˜XÔ&Ñ'Ø—’ Ñ)Ô)Ð)øà”=×(Ò(­¬Ñ9Ô9ð 	.ð 	.ˆCØ—7’7˜;Ñ'Ô'ð ØØ�{Š{˜8Ñ$Ô$ð .Ø×4Ò4°S¸´]ÀSÀEØ5:ñ<ô <�à�x”=¨Ð-Ð-Ø+3�E˜#˜hœ-Ñ(Ø—O’O HÑ-Ô-Ð-øØŒ×#Ò# HÑ-Ô-Ð-Ð-Ð-r(   c                 ó,  — ||v r2||         }t          |d         ¦  «        dk    sJ ‚|d         d         }n¤t          j        ¦   «         }| j                             |¦  «        }d|z   }d|d<   |g|d<   t          j        ¦   «         }|t          j        d||¬¦  «        z  }||z  }| j                             |¦  «         | j                             ||¦  «         |D �]5}t          |t          j
        ¦  «        rŒt          j        |d¬¦  «        }	|	d	xx         | j        z  cc<   | j                             |	¦  «         | j                             |	¦  «         |j                             |¦  «        dz   }
|	g}t#          j        | j        j        ¦  «        s_| j        r0|                     dt          j        d
| j        ¬¦  «        ¦  «         n(|                     dt          j        d
¦  «        ¦  «         |j                             |
|¦  «         �Œ7|S )Nr   r5   r   zTARGET_NOTE: Úautorc   )r   )r   rÞ   r×   ú )ÚtextÚClasses)r   r   r’   r   r;   Ú	paragraphr6   Únote_autofootnoter‘   r   r   Úfootnote_referencer×   Únote_autofootnote_refÚnote_footnote_refr   rŸ   r   Úget_trim_footnote_ref_spacer¶   rŒ   Úinliner�   )r#   r   rÜ   rÚ   r’   Úfootnote_nameÚfootnote_idÚfootnote_paragraphrH   ÚrefnoderŸ   rl   s               r&   rÙ   z TargetNotes.make_target_footnote"  s%  € Ø�Uˆ?ˆ?Ø˜V”}ˆHÝ�x Ô(Ñ)Ô)¨QÒ.Ð.Ð.Ð.Ø$ WÔ-¨aÔ0ˆMˆMå”~Ñ'Ô'ˆHØœ-×.Ò.¨xÑ8Ô8ˆKð ,¨kÑ9ˆMØ ˆH�VÑØ!. ˆH�WÑÝ!&¤Ñ!2Ô!2ÐØ¥%¤/°"°fÀVÐ"LÑ"LÔ"LÑLÐØÐ*Ñ*ˆHØŒM×+Ò+¨HÑ5Ô5Ð5ØŒM×.Ò.¨x¸ÑBÔBÐBØð 	.ñ 	.ˆCÝ˜#�uœ|Ñ,Ô,ð ØÝÔ.°}È1ÐMÑMÔMˆGØ�IÐÐÔ $¤,Ñ.ÐÐÑØŒM×/Ò/°Ñ8Ô8Ð8ØŒM×+Ò+¨GÑ4Ô4Ð4Ø”J×$Ò$ SÑ)Ô)¨AÑ-ˆEØ�iˆGÝÔ4°T´]Ô5KÑLÔLð 7Ø”<ð 7Ø—N’NØ�5œ<¨S¸$¼,ÐGÑGÔGñIô Ið Ið Ið —N’N 1¥e¤j°¡o¤oÑ6Ô6Ð6ØŒJ×Ò˜e WÑ-Ô-Ð-Ñ-Øˆr(   N)r*   r+   r,   r-   r.   rÕ   r'   rÙ   r/   r(   r&   rÑ   rÑ   ô  sX   € € € € € ðð ð
 Ððð:ð :ð :ð
.ð .ð .ð<"ð "ð "ð "ð "r(   rÑ   c                   ó   — e Zd ZdZdZd„ ZdS )ÚDanglingReferencesze
    Check for dangling references (incl. footnote & citation) and for
    unreferenced targets.
    iR  c                 ó¾  — t          | j        | j        j        j        ¦  «        }| j                             |¦  «         | j                             t          j        ¦  «        D ]y}|j        sp| 	                    d¦  «        rŒ|d         r|d         d         }n|d         r|d         d         }n|d         }| j        j
                             d|z  |¬¦  «         Œzd S )Nr3   r   r   r   r
   z(Hyperlink target "%s" is not referenced.re   )ÚDanglingReferencesVisitorr   rW   rX   Úwalkr   r   r   rA   r7   r9   Úinfo)r#   Úvisitorr   rk   s       r&   r'   zDanglingReferences.applyP  s   € Ý+ØŒMØŒMÔ%ÔAñCô Cˆð 	Œ×Ò˜7Ñ#Ô#Ð#ð ”m×+Ò+­E¬LÑ9Ô9ð 	0ð 	0ˆFØÔ$ð 0Ø—:’:˜kÑ*Ô*ð ð
 Ø˜'”?ð -Ø# Gœ_¨QÔ/�F�FØ˜E”]ð -Ø# Eœ]¨1Ô-�F�Fð $ Gœ_�FØ”Ô&×+Ò+Ø>ØñØ(.ð ,ñ 0ô 0ð 0øð!	0ð 	0r(   Nr)   r/   r(   r&   rî   rî   G  s5   € € € € € ðð ð
 Ðð0ð 0ð 0ð 0ð 0r(   rî   c                   ó(   — e Zd Zd„ Zd„ Zd„ ZexZZdS )rð   c                 ób   — t           j                             | |¦  «         || _        || _        d S rN   )r   ÚSparseNodeVisitorrÕ   r   rX   )r#   r   rX   s      r&   rÕ   z"DanglingReferencesVisitor.__init__n  s0   € ÝÔ×(Ò(¨¨xÑ8Ô8Ð8Ø ˆŒØ+FˆÔ(Ð(Ð(r(   c                 ó   — d S rN   r/   )r#   rE   s     r&   Úunknown_visitz'DanglingReferencesVisitor.unknown_visits  s   € Øˆr(   c                 ó8  — |j         s|                     d¦  «        sd S |d         }| j        j                             |¦  «        }|�€| j        D ]} ||¦  «        r d S Œ|| j        j        v r+| j        j                             d|d         z  |¬¦  «        }n*| j        j                             d|d         z  |¬¦  «        }| j                             |¦  «        }t          j
        |j        |j        |¬¦  «        }	 |d         d         }n*# t          $ r | j                             |¦  «        }Y nw xY w|                     |¦  «         |                     |¦  «         d S |d= ||d<   | j        j        |                              |¬	¦  «         d
|_         d S )Nr   zBDuplicate target name, cannot be used as a unique reference: "%s".re   zUnknown target name: "%s".r4   r   r   r
   rT   r5   )rB   r   r   rV   r7   rX   r9   r:   r;   r   r<   r=   r•   r>   r?   r   rZ   )	r#   rE   r   r$   r]   rF   rG   rI   rJ   s	            r&   Úvisit_referencez)DanglingReferencesVisitor.visit_referencev  sá  € ØŒ=ð 	 §¢¨YÑ 7Ô 7ð 	ØˆFØ�y”/ˆØŒ]Ô"×&Ò& wÑ/Ô/ˆØ‰:Ø%)Ô%Eð 'ð 'Ð!Ø$Ð$ TÑ*Ô*ð Ø�E�Eðð ˜dœmÔ3Ð3Ð3Øœ-Ô0×6Ò6ð+Ø.2°9¬oñ?ØJNð 7ñ Pô P�C�Cð œ-Ô0×6Ò6Ø4¸¸Y¼ÑHØ"&ð 7ñ (ô (�Cð œ×,Ò,¨SÑ1Ô1�ÝÔ'Ø”n d¤n¸EðCñ Cô C�ð6Ø  œK¨œN�E�EøÝ!ð 6ð 6ð 6Ø œM×0Ò0°Ñ5Ô5�E�E�Eð6øøøà—’ Ñ&Ô&Ð&Ø×!Ò! #Ñ&Ô&Ð&Ð&Ð&à�Y�ØˆD�‰MØŒMÔ˜bÔ!×4Ò4¸Ð4Ñ;Ô;Ð;ØˆDŒMˆMˆMs   Ä D Ä$D6Ä5D6N)r*   r+   r,   rÕ   rø   rú   Úvisit_footnote_referenceÚvisit_citation_referencer/   r(   r&   rð   rð   l  sP   € € € € € ðGð Gð Gð
ð ð ðð ð ðB ;JÐIÐÐ7Ð7Ð7r(   rð   N)r-   Ú__docformat__Údocutilsr   r   Údocutils.transformsr   r   r1   rL   rs   rv   r{   Ú	Exceptionrª   r¬   rÑ   rî   rö   rð   r/   r(   r&   ú<module>r     sV  ðð
ð ð #€à !Ð !Ð !Ð !Ð !Ð !Ð !Ð !Ø )Ð )Ð )Ð )Ð )Ð )ðG-ð G-ð G-ð G-ð G-�yñ G-ô G-ð G-ðT>ð >ð >ð >ð >˜)ñ >ô >ð >ðBn:ð n:ð n:ð n:ð n:˜ñ n:ô n:ð n:ðb!)ð !)ð !)ð !)ð !)�iñ !)ô !)ð !)ðH%!ð %!ð %!ð %!ð %!�iñ %!ô %!ð %!ðPYð Yð Yð Yð Y�	ñ Yô Yð Yðx	ð 	ð 	ð 	ð 	¨)ñ 	ô 	ð 	ðz9ð z9ð z9ð z9ð z9�Iñ z9ô z9ð z9ðzPð Pð Pð Pð P�)ñ Pô Pð Pðf"0ð "0ð "0ð "0ð "0˜ñ "0ô "0ð "0ðJ+Jð +Jð +Jð +Jð +J Ô 7ñ +Jô +Jð +Jð +Jð +Jr(   