Ë
    Q5ýjía  ã                   óL  — d dl Z d dlmZmZ d dlmZ d dlZd dlZd dl	Zd dl
Zd dlZd dlZd dlZd dlZd dlZd dlZ G d„ d«      Z G d„ dej$                  j&                  «      Z G d„ d	ej$                  j&                  «      Z G d
„ dej$                  j&                  «      Zdej.                  j0                  dz  fd„Zdej4                  j6                  dz  fd„Zedej:                  j<                  ej.                  j>                  gdf   Z edej:                  j<                  ejB                  jD                  ejB                  jD                  gdf   Z#edej:                  j<                  gdf   Z$ G d„ d«      Z% G d„ dej$                  j&                  «      Z& G d„ d«      Z'y)é    N)ÚCallableÚIterator)ÚAnyc                   ó  — e Zd Zd
d„Zddeddfd„Zdeej                  j                  dz  eej                  j                  dz  f   fd„Z
dej                  j                  fd„Zdej                  j                  dz  fd	„Zy)ÚTransactionManagerÚreturnÚTransactionc                 ó   — t         ‚)zBegin a read-only transaction.©ÚNotImplementedError©Úselfs    úI/root/telegram-saas/.venv/lib/python3.12/site-packages/dns/transaction.pyÚreaderzTransactionManager.reader   ó   € ä!Ð!ó    Úreplacementc                 ó   — t         ‚)a  Begin a writable transaction.

        :param bool replacement: If ``True``, the content of the transaction
            completely replaces any prior content.  If ``False`` (the default),
            the content of the transaction updates the existing content.
        r   )r   r   s     r   ÚwriterzTransactionManager.writer   ó
   € ô "Ð!r   Nc                 ó   — t         ‚)a:  Return origin information for the transaction manager.

        This information is used by code working with transactions to
        allow it to coordinate relativization.  The transaction code
        itself takes what it gets (i.e. does not change name
        relativity).

        :returns: A tuple ``(absolute_origin, relativize, effective_origin)``
            giving the absolute name of the default origin for any relative
            domain names, whether names should be relativized, and the
            "effective origin".  The effective origin is the absolute origin if
            *relativize* is ``False``, and the empty name if *relativize* is
            ``True``.  (The effective origin is provided even though it can be
            computed from the absolute origin and relativize setting because it
            avoids a lot of code duplication.)  If the returned names are
            ``None``, then no origin information is available.
        :rtype: tuple[:py:class:`dns.name.Name` or ``None``, bool,
            :py:class:`dns.name.Name` or ``None``]
        r   r   s    r   Úorigin_informationz%TransactionManager.origin_information!   s
   € ô, "Ð!r   c                 ó   — t         ‚)z%The class of the transaction manager.r   r   s    r   Ú	get_classzTransactionManager.get_class9   r   r   c                 ó4   — | j                  «       \  }}}|r|S y)z#Origin to use in from_wire() calls.N)r   )r   Úabsolute_originÚ
relativizeÚ_s       r   Úfrom_wire_originz#TransactionManager.from_wire_origin=   s#   € à)-×)@Ñ)@Ó)BÑ&ˆ˜ QÙØ"Ð"àr   )r   r	   )F)Ú__name__Ú
__module__Ú__qualname__r   Úboolr   ÚtupleÚdnsÚnameÚNamer   Ú
rdataclassÚ
RdataClassr   r   © r   r   r   r      s|   „ ó"ñ" $ð "°=ó "ð"à	ˆs�x‰x�}‰}˜tÑ# T¨3¯8©8¯=©=¸4Ñ+?Ð?Ñ	@ó"ð0"˜3Ÿ>™>×4Ñ4ó "ð #§(¡(§-¡-°$Ñ"6ô r   r   c                   ó   — e Zd ZdZy)ÚDeleteNotExactz>Existing data did not match data specified by an exact delete.N©r    r!   r"   Ú__doc__r*   r   r   r,   r,   F   s   „ ÚHr   r,   c                   ó   — e Zd ZdZy)ÚReadOnlyz*Tried to write to a read-only transaction.Nr-   r*   r   r   r0   r0   J   ó   „ Ú4r   r0   c                   ó   — e Zd ZdZy)ÚAlreadyEndedz*Tried to use an already-ended transaction.Nr-   r*   r   r   r3   r3   N   r1   r   r3   r   c                 ó�   — | �$t        | t        j                  j                  «      r| S t        j                  j                  | «      S ©N)Ú
isinstancer%   ÚrdatasetÚImmutableRdataset)r7   s    r   Ú_ensure_immutable_rdatasetr9   R   s5   € ØÐœ: h´·±×0NÑ0NÔOØˆÜ�<‰<×)Ñ)¨(Ó3Ð3r   c                 óh   — | �| j                  «       r| S t        j                  j                  | «      S r5   )Úis_immutabler%   ÚnodeÚImmutableNode)r<   s    r   Ú_ensure_immutable_noder>   X   s,   € Ø€|�t×(Ñ(Ô*ØˆÜ�8‰8×!Ñ! $Ó'Ð'r   r	   c            
       ó  — e Zd Z	 	 d;dededefd„Zej                  j                  fdej                  j                  ez  dz  dej                  j                  ez  dej                  j                  ez  d	ej                  j                  dz  fd
„Zdej                  j                  d	ej                   j"                  dz  fd„Zd<d„Zded	dfd„Zded	dfd„Zded	dfd„Zded	dfd„Zdej                  j                  ez  d	efd„Zddej                  j4                  fdededej                  j                  d	dfd„Zdefd„Zd„ Zd	efd„Zd<d„Z d<d„Z!de"d	dfd„Z#de$d	dfd „Z%de&d	dfd!„Z'd	e(e)ej                  j                  ej                  j                  f      fd"„Z*d	e(ej                  j                     fd#„Z+d$„ Z,d%„ Z-d&„ Z.d'„ Z/d(„ Z0d)„ Z1d*„ Z2d+„ Z3d,„ Z4d-„ Z5d.„ Z6d/„ Z7d0„ Z8d1„ Z9d2„ Z:d3„ Z;d4„ Z<d5„ Z=d6„ Z>d7„ Z?d8„ Z@d9„ ZAd:„ ZBy)=r	   Úmanagerr   Ú	read_onlyc                 ó„   — || _         || _        || _        t        «       | _        d| _        g | _        g | _        g | _        y ©NF)	r@   r   rA   ÚsetÚunicodeÚ_endedÚ_check_put_rdatasetÚ_check_delete_rdatasetÚ_check_delete_name)r   r@   r   rA   s       r   Ú__init__zTransaction.__init__i   sB   € ð ˆŒØ&ˆÔØ"ˆŒÜ!$£ˆŒØˆŒØ?AˆÔ ØEGˆÔ#Ø=?ˆÕr   r&   NÚrdtypeÚcoversr   c                 ób  — | j                  «        t        |t        «      r t        j                  j                  |d«      }t        j                  j                  j                  |«      }t        j                  j                  j                  |«      }| j                  |||«      }t        |«      S )z¥Return the rdataset associated with *name*, *rdtype*, and *covers*,
        or ``None`` if not found.

        Note that the returned rdataset is immutable.
        N)Ú_check_endedr6   Ústrr%   r&   Ú	from_textÚ	rdatatypeÚ	RdataTypeÚmakeÚ_get_rdatasetr9   )r   r&   rK   rL   r7   s        r   ÚgetzTransaction.get   sƒ   € ð 	×ÑÔÜ�dœCÔ Ü—8‘8×%Ñ% d¨DÓ1ˆDÜ—‘×(Ñ(×-Ñ-¨fÓ5ˆÜ—‘×(Ñ(×-Ñ-¨fÓ5ˆØ×%Ñ% d¨F°FÓ;ˆÜ)¨(Ó3Ð3r   c                 ó6   — t        | j                  |«      «      S )z¶Return the node at *name*, if any.

        :returns: An immutable node, or ``None`` if *name* does not exist.
        :rtype: :py:class:`dns.node.ImmutableNode` or ``None``
        )r>   Ú	_get_node©r   r&   s     r   Úget_nodezTransaction.get_node’   s   € ô & d§n¡n°TÓ&:Ó;Ð;r   c                 ó(   — | j                   rt        ‚y r5   )rA   r0   r   s    r   Ú_check_read_onlyzTransaction._check_read_onlyš   s   € Ø�>Š>ÜˆNð r   Úargsc                 óh   — | j                  «        | j                  «        | j                  d|«       y)z�Add records.

        The arguments may be:

            - rrset

            - name, rdataset...

            - name, ttl, rdata...
        FN©rN   r[   Ú_add©r   r\   s     r   ÚaddzTransaction.addž   s*   € ð 	×ÑÔØ×ÑÔØ�	‰	�%˜Õr   c                 óh   — | j                  «        | j                  «        | j                  d|«       y)a»  Replace the existing rdataset at the name with the specified
        rdataset, or add the specified rdataset if there was no existing
        rdataset.

        The arguments may be:

            - rrset

            - name, rdataset...

            - name, ttl, rdata...

        Note that if you want to replace the entire node, you should do
        a delete of the name followed by one or more calls to add() or
        replace().
        TNr^   r`   s     r   ÚreplacezTransaction.replace­   s*   € ð" 	×ÑÔØ×ÑÔØ�	‰	�$˜Õr   c                 óh   — | j                  «        | j                  «        | j                  d|«       y)a   Delete records.

        It is not an error if some of the records are not in the existing
        set.

        The arguments may be:

            - rrset

            - name

            - name, rdatatype, [covers]

            - name, rdataset...

            - name, rdata...
        FN©rN   r[   Ú_deleter`   s     r   ÚdeletezTransaction.deleteÂ   s*   € ð$ 	×ÑÔØ×ÑÔØ�‰�U˜DÕ!r   c                 óh   — | j                  «        | j                  «        | j                  d|«       y)aC  Delete records.

        The arguments may be:

            - rrset

            - name

            - name, rdatatype, [covers]

            - name, rdataset...

            - name, rdata...

        :raises: :py:exc:`dns.transaction.DeleteNotExact` if some of the
            records are not in the existing set.
        TNre   r`   s     r   Údelete_exactzTransaction.delete_exactØ   s*   € ð$ 	×ÑÔØ×ÑÔØ�‰�T˜4Õ r   c                 ó¤   — | j                  «        t        |t        «      r t        j                  j                  |d«      }| j                  |«      S )zDoes the specified name exist?N)rN   r6   rO   r%   r&   rP   Ú_name_existsrX   s     r   Úname_existszTransaction.name_existsî   s?   € à×ÑÔÜ�dœCÔ Ü—8‘8×%Ñ% d¨DÓ1ˆDØ× Ñ  Ó&Ð&r   é   TÚvalueÚrelativec                 óÀ  — | j                  «        |dk  rt        d«      ‚t        |t        «      r t        j
                  j                  |d«      }| j                  |t        j                  j                  t        j                  j                  «      }|�t        |«      dk(  rt        ‚|r0t        j                  j                  |d   j                  «      |z   }nt        j                  j                  |«      }|j                  }|dk(  rd}|d   j!                  |¬«      }t        j"                  j%                  |j&                  |«      }| j!                  ||«       y)aƒ  Update the serial number.

        :param int value: An increment if *relative* is ``True``, or the
            actual value to set if *relative* is ``False``.
        :param bool relative: Whether *value* is a relative increment or an
            absolute value.  The default is ``True``.
        :param name: The name of the SOA record to update.
        :type name: :py:class:`dns.name.Name`
        :raises KeyError: If there is no SOA rdataset at *name*.
        :raises ValueError: If *value* is negative or if the increment is
            so large that it would cause the new serial to be less than the
            prior value.
        r   znegative update_serial() valueNrm   )Úserial)rN   Ú
ValueErrorr6   rO   r%   r&   rP   rT   rQ   ÚSOAÚNONEÚlenÚKeyErrorrq   ÚSerialrn   rc   r7   Ú
from_rdataÚttl)r   rn   ro   r&   r7   rq   ÚrdataÚnew_rdatasets           r   Úupdate_serialzTransaction.update_serialõ   s  € ð& 	×ÑÔØ�1Š9ÜÐ=Ó>Ð>Ü�dœCÔ Ü—8‘8×%Ñ% d¨DÓ1ˆDØ×%Ñ% d¬C¯M©M×,=Ñ,=¼s¿}¹}×?QÑ?QÓRˆØÐœs 8›}°Ò1ÜˆNÙÜ—Z‘Z×&Ñ& x°¡{×'9Ñ'9Ó:¸UÑB‰Fä—Z‘Z×&Ñ& uÓ-ˆFØ—‘ˆØ�QŠ;ØˆFØ˜‘×#Ñ#¨6Ð#Ó2ˆÜ—|‘|×.Ñ.¨x¯|©|¸UÓCˆØ�‰�T˜<Õ(r   Ú	attributec                 óV   — | j                   j                  |j                  «       «       y r5   )rE   ra   Úupper)r   r}   s     r   Úadd_unicodezTransaction.add_unicode  s   € Ø�‰×Ñ˜Ÿ™Ó*Õ+r   c                 óB   — | j                  «        | j                  «       S r5   ©rN   Ú_iterate_rdatasetsr   s    r   Ú__iter__zTransaction.__iter__  s   € Ø×ÑÔØ×&Ñ&Ó(Ð(r   c                 óB   — | j                  «        | j                  «       S )a  Has this transaction changed anything?

        For read-only transactions, the result is always ``False``.

        For writable transactions, the result is ``True`` if at some time
        during the life of the transaction, the content was changed.
        )rN   Ú_changedr   s    r   ÚchangedzTransaction.changed"  s   € ð 	×ÑÔØ�}‰}‹Ðr   c                 ó&   — | j                  d«       y)a¨  Commit the transaction.

        Normally transactions are used as context managers and commit
        or rollback automatically, but it may be done explicitly if needed.

        :raises: :py:exc:`dns.transaction.AlreadyEnded` if the transaction
            has already been committed or rolled back.
        :raises: An exception if the commit fails, in which case the
            transaction is also rolled back.
        TN©Ú_endr   s    r   ÚcommitzTransaction.commit-  s   € ð 	�	‰	�$�r   c                 ó&   — | j                  d«       y)a`  Rollback the transaction.

        Normally transactions are used as context managers and commit
        or rollback automatically, but it may be done explicitly if needed.
        Rollback cannot otherwise fail.

        :raises: :py:exc:`dns.transaction.AlreadyEnded` if the transaction
            has already been committed or rolled back.
        FNr‰   r   s    r   ÚrollbackzTransaction.rollback:  s   € ð 	�	‰	�%Õr   Úcheckc                 ó:   — | j                   j                  |«       y)a¬  Call *check* before putting (storing) an rdataset.

        The function is called with the transaction, the name, and the rdataset.

        The check function may safely make non-mutating transaction method
        calls, but behavior is undefined if mutating transaction methods are
        called.  The check function should raise an exception if it objects to
        the put, and otherwise should return ``None``.
        N)rG   Úappend©r   rŽ   s     r   Úcheck_put_rdatasetzTransaction.check_put_rdatasetF  s   € ð 	× Ñ ×'Ñ'¨Õ.r   c                 ó:   — | j                   j                  |«       y)aÃ  Call *check* before deleting an rdataset.

        The function is called with the transaction, the name, the rdatatype,
        and the covered rdatatype.

        The check function may safely make non-mutating transaction method
        calls, but behavior is undefined if mutating transaction methods are
        called.  The check function should raise an exception if it objects to
        the put, and otherwise should return ``None``.
        N)rH   r�   r‘   s     r   Úcheck_delete_rdatasetz!Transaction.check_delete_rdatasetR  s   € ð 	×#Ñ#×*Ñ*¨5Õ1r   c                 ó:   — | j                   j                  |«       y)a�  Call *check* before putting (storing) an rdataset.

        The function is called with the transaction and the name.

        The check function may safely make non-mutating transaction method
        calls, but behavior is undefined if mutating transaction methods are
        called.  The check function should raise an exception if it objects to
        the put, and otherwise should return ``None``.
        N)rI   r�   r‘   s     r   Úcheck_delete_namezTransaction.check_delete_name_  s   € ð 	×Ñ×&Ñ& uÕ-r   c                 óB   — | j                  «        | j                  «       S )a\  Iterate all the rdatasets in the transaction, returning
        (:py:class:`dns.name.Name`, :py:class:`dns.rdataset.Rdataset`) tuples.

        Note that as is usual with Python iterators, adding or removing items
        while iterating will invalidate the iterator and may raise
        :py:exc:`RuntimeError` or fail to iterate over all entries.r‚   r   s    r   Úiterate_rdatasetszTransaction.iterate_rdatasetsk  s   € ð 	×ÑÔØ×&Ñ&Ó(Ð(r   c                 óB   — | j                  «        | j                  «       S )zÿIterate all the names in the transaction.

        Note that as is usual with Python iterators, adding or removing names
        while iterating will invalidate the iterator and may raise
        :py:exc:`RuntimeError` or fail to iterate over all entries.)rN   Ú_iterate_namesr   s    r   Úiterate_nameszTransaction.iterate_namesw  s   € ð 	×ÑÔØ×"Ñ"Ó$Ð$r   c                 ó<   — t        |«      dk7  rt        d|› �«      ‚y )Nr   zextra parameters to )ru   Ú	TypeError)r   Úmethodr\   s      r   Ú_raise_if_not_emptyzTransaction._raise_if_not_empty„  s%   € Üˆt‹9˜Š>ÜÐ2°6°(Ð;Ó<Ð<ð r   c                 ó†  — 	 |j                  «       }t        |t        j                  j                  «      r|j                  «       }|S t        |t        j                  j                  «      r|}|S |rd}n[t        |t        «      r-|}|t        j                  j                  kD  rt        |› d�«      ‚t        |› d�«      ‚|j                  «       }t        |t        j                  j                  «      r"t        j                  j                  ||«      }|S t        |› d�«      ‚# t         $ r |rY y t        |› d�«      ‚w xY w)Nr   z: TTL value too bigz: expected a TTLz: expected an Rdataz: expected more arguments)Úpopleftr6   r%   ÚrrsetÚRRsetÚto_rdatasetr7   ÚRdatasetÚintry   ÚMAX_TTLrr   r�   rz   ÚRdatarx   Ú
IndexError)r   rž   Údeletingr\   Úargr7   ry   s          r   Ú_rdataset_from_argszTransaction._rdataset_from_argsˆ  s$  € ð	FØ—,‘,“.ˆCÜ˜#œsŸy™yŸ™Ô/ØŸ?™?Ó,�ð$ ˆOô# ˜C¤§¡×!6Ñ!6Ô7Ø�ð  ˆOñ Ø‘Cä! #¤sÔ+Ø!˜Ø¤§¡§¡Ò0Ü",°¨xÐ7JÐ-KÓ"LÐLä'¨6¨(Ð2BÐ(CÓDÐDØŸ,™,›.�CÜ˜c¤3§9¡9§?¡?Ô3Ü"Ÿ|™|×6Ñ6°s¸CÓ@�Hð ˆOô $ v hÐ.AÐ$BÓCÐCøäò 	FÙÙô   6 (Ð*CÐ DÓEÐEð	Fús%   ‚AD$ Á'D$ Á0B%D$ ÄD$ Ä$E Ä1E c                 óÄ  — |rd}nd}	 t        j                  |«      }|j                  «       }t        |t        «      r t
        j                  j                  |d «      }t        |t
        j                  j                  «      r|}| j                  |d|«      }nQt        |t
        j                  j                  «      r|}|j                  }|j                  «       }nt        |› d�«      ‚|€J ‚|j                  | j                  j!                  «       k7  rt#        |› d�«      ‚|j$                  t
        j&                  j(                  k(  r'| j+                  «       \  }}}	||	k7  rt#        |› d�«      ‚| j-                  ||«       |s°| j/                  ||j$                  |j0                  «      }
|
�‡t        |
t
        j2                  j4                  «      rRt
        j2                  j7                  |
j                  |
j$                  |
j0                  «      }|j9                  |
«       |}
|
j;                  |«      }| j=                  ||«       y # t>        $ r t        d|› �«      ‚w xY w)Nz	replace()zadd()Fú/ requires a name or RRset as the first argumentú  has objects of wrong RdataClassz has non-origin SOAúnot enough parameters to ) ÚcollectionsÚdequer¡   r6   rO   r%   r&   rP   r'   r¬   r¢   r£   r¤   r�   Úrdclassr@   r   rr   rK   rQ   rs   Ú_origin_informationrŸ   rT   rL   r7   r8   r¥   ÚupdateÚunionÚ_checked_put_rdatasetr©   )r   rc   r\   rž   r«   r&   r7   r¢   r   ÚoriginÚexistingÚtrdss               r   r_   zTransaction._add¦  s
  € ÙØ ‰FàˆFð&	BÜ×$Ñ$ TÓ*ˆDØ—,‘,“.ˆCÜ˜#œsÔ#Ü—h‘h×(Ñ(¨¨dÓ3�Ü˜#œsŸx™xŸ}™}Ô-Ø�Ø×3Ñ3°F¸EÀ4ÓH‘Ü˜C¤§¡§¡Ô1Ø�Ø—z‘z�ð !×,Ñ,Ó.‘äØ�hÐMÐNóð ð Ð'Ð'Ð'Ø×Ñ 4§<¡<×#9Ñ#9Ó#;Ò;Ü  F 8Ð+KÐ!LÓMÐMØ�‰¤#§-¡-×"3Ñ"3Ò3Ø#×7Ñ7Ó9‘��1�fØ˜6’>Ü$¨ xÐ/BÐ%CÓDÐDØ×$Ñ$ V¨TÔ2ÙØ×-Ñ-¨d°H·O±OÀXÇ_Á_ÓU�ØÐ'Ü! (¬C¯L©L×,JÑ,JÔKÜ"Ÿ|™|×4Ñ4Ø$×,Ñ,¨h¯o©o¸x¿¹ó ˜ð Ÿ™ HÔ-Ø#'˜Ø'Ÿ~™~¨hÓ7�HØ×&Ñ& t¨XÕ6øÜò 	BÜÐ7¸°xÐ@ÓAÐAð	Bús   ‰H=I ÉIc                 ó†  — |rd}nd}	 t        j                  |«      }|j                  «       }t        |t        «      r t
        j                  j                  |d «      }t        |t
        j                  j                  «      �r.|}t        |«      dkD  �r	t        |d   t        «      st        |d   t        «      rãt
        j                  j                  j                  |j                  «       «      }t        |«      dkD  r8t
        j                  j                  j                  |j                  «       «      }nt
        j                  j                  }| j                  ||«       | j!                  |||«      }|€|rt#        |› d�«      ‚y | j%                  |||«       y | j'                  |d|«      }	nAt        |t
        j(                  j*                  «      r|}	|	j                  }nt-        |› d�«      ‚| j                  ||«       |	rî|	j.                  | j0                  j3                  «       k7  rt5        |› d�«      ‚| j!                  ||	j6                  |	j8                  «      }|�€|r$|j;                  |	«      }
|
|	k7  rt#        |› d�«      ‚|j=                  |	«      }	t        |	«      dk(  r(| j%                  ||	j6                  |	j8                  «       y | j?                  ||	«       y |rAt#        |› d�«      ‚|r| jA                  |«      st#        |› d	�«      ‚| jC                  |«       y y # tD        $ r t-        d
|› �«      ‚w xY w)Nzdelete_exact()zdelete()r   z: missing rdatasetTr®   r¯   z: missing rdatasz: name not knownr°   )#r±   r²   r¡   r6   rO   r%   r&   rP   r'   ru   r¦   rQ   rR   rS   rt   rŸ   rT   r,   Ú_checked_delete_rdatasetr¬   r¢   r£   r�   r³   r@   r   rr   rK   rL   ÚintersectionÚ
differencer·   rk   Ú_checked_delete_namer©   )r   Úexactr\   rž   r«   r&   rK   rL   r¹   r7   r½   s              r   rf   zTransaction._deleteÓ  sá  € ÙØ%‰FàˆFð9	BÜ×$Ñ$ TÓ*ˆDØ—,‘,“.ˆCÜ˜#œsÔ#Ü—h‘h×(Ñ(¨¨dÓ3�Ü˜#œsŸx™xŸ}™}Õ-Ø�Ü�t“9˜q“=Ü˜t A™w¬Ô,´
¸4À¹7ÄCÔ0Hô !Ÿ]™]×4Ñ4×9Ñ9¸$¿,¹,».ÓI�FÜ˜4“y 1’}Ü!$§¡×!8Ñ!8×!=Ñ!=¸d¿l¹l»nÓ!M™ä!$§¡×!3Ñ!3˜Ø×,Ñ,¨V°TÔ:Ø#×1Ñ1°$¸ÀÓG�HØÐ'Ù Ü"0°F°8Ð;MÐ1NÓ"OÐOð ð ×5Ñ5°d¸FÀFÔKØà#×7Ñ7¸ÀÀdÓK‘HÜ˜C¤§¡§¡Ô1Ø�Ø—}‘}‘äØ�hÐMÐNóð ð ×$Ñ$ V¨TÔ2ÙØ×#Ñ# t§|¡|×'=Ñ'=Ó'?Ò?Ü$¨ xÐ/OÐ%PÓQÐQØ×-Ñ-¨d°H·O±OÀXÇ_Á_ÓU�ØÐ'ÙØ'/×'<Ñ'<¸XÓ'F˜Ø'¨8Ò3Ü"0°F°8Ð;KÐ1LÓ"MÐMØ'×2Ñ2°8Ó<�HÜ˜8“}¨Ò)Ø×5Ñ5Ø  (§/¡/°8·?±?õð ×2Ñ2°4¸ÕBÙÜ(¨F¨8Ð3EÐ)FÓGÐGá ×!2Ñ!2°4Ô!8Ü(¨F¨8Ð3CÐ)DÓEÐEØ×)Ñ)¨$Õ/ð øô ò 	BÜÐ7¸°xÐ@ÓAÐAð	Bús&   ‰E?L( Æ	L( ÆD3L( ËL( Ë$AL( Ì(M c                 ó(   — | j                   rt        ‚y r5   )rF   r3   r   s    r   rN   zTransaction._check_ended  s   € Ø�;Š;ÜÐð r   c                 ón   — | j                  «        	 | j                  |«       d| _        y # d| _        w xY w)NT)rN   Ú_end_transactionrF   ©r   r‹   s     r   rŠ   zTransaction._end  s0   € Ø×ÑÔð	Ø×!Ñ! &Ô)àˆD�Kø˜$ˆD�Kús   ’+ «	4c                 ó^   — | j                   D ]  } || ||«       Œ | j                  ||«       y r5   )rG   Ú_put_rdataset)r   r&   r7   rŽ   s       r   r·   z!Transaction._checked_put_rdataset  s3   € Ø×-Ñ-ò 	(ˆEÙ�$˜˜hÕ'ð	(à×Ñ˜4 Õ*r   c                 ób   — | j                   D ]  } || |||«       Œ | j                  |||«       y r5   )rH   Ú_delete_rdataset)r   r&   rK   rL   rŽ   s        r   r¼   z$Transaction._checked_delete_rdataset#  s7   € Ø×0Ñ0ò 	.ˆEÙ�$˜˜f fÕ-ð	.à×Ñ˜d F¨FÕ3r   c                 óZ   — | j                   D ]  } || |«       Œ | j                  |«       y r5   )rI   Ú_delete_name)r   r&   rŽ   s      r   r¿   z Transaction._checked_delete_name(  s/   € Ø×,Ñ,ò 	ˆEÙ�$˜Õð	à×Ñ˜$Õr   c                 ó   — | S r5   r*   r   s    r   Ú	__enter__zTransaction.__enter__1  s   € Øˆr   c                 ób   — | j                   s#|€| j                  «        y| j                  «        yrC   )rF   r‹   r�   )r   Úexc_typeÚexc_valÚexc_tbs       r   Ú__exit__zTransaction.__exit__4  s+   € Ø�{Š{ØÐØ—‘”ð ð —‘”Ør   c                 ó   — t         ‚)znReturn the rdataset associated with *name*, *rdtype*, and *covers*,
        or ``None`` if not found.
        r   ©r   r&   rK   rL   s       r   rT   zTransaction._get_rdatasetA  s
   € ô "Ð!r   c                 ó   — t         ‚)zStore the rdataset.r   )r   r&   r7   s      r   rÆ   zTransaction._put_rdatasetG  r   r   c                 ó   — t         ‚)zhDelete all data associated with *name*.

        It is not an error if the name does not exist.
        r   rX   s     r   rÊ   zTransaction._delete_nameK  ó
   € ô
 "Ð!r   c                 ó   — t         ‚)z„Delete all data associated with *name*, *rdtype*, and *covers*.

        It is not an error if the rdataset does not exist.
        r   rÓ   s       r   rÈ   zTransaction._delete_rdatasetR  rÖ   r   c                 ó   — t         ‚)z/Does name exist?

        :rtype: bool
        r   rX   s     r   rk   zTransaction._name_existsY  rÖ   r   c                 ó   — t         ‚)z&Has this transaction changed anything?r   r   s    r   r†   zTransaction._changed`  r   r   c                 ó   — t         ‚)zÛEnd the transaction.

        :param bool commit: If ``True``, commit the transaction; otherwise
            roll it back.  If committing and the commit fails, then roll back
            and raise an exception.
        r   rÄ   s     r   rÃ   zTransaction._end_transactiond  r   r   c                 ó   — t         ‚)z¹Set the origin.

        This method is called when reading a possibly relativized
        source, and an origin setting operation occurs (e.g. $ORIGIN
        in a zone file).
        r   )r   r¸   s     r   Ú_set_originzTransaction._set_originm  r   r   c                 ó   — t         ‚)z7Return an iterator that yields (name, rdataset) tuples.r   r   s    r   rƒ   zTransaction._iterate_rdatasetsv  r   r   c                 ó   — t         ‚)z&Return an iterator that yields a name.r   r   s    r   rš   zTransaction._iterate_namesz  r   r   c                 ó   — t         ‚)z¤Return the node at *name*, if any.

        :returns: The node, or ``None`` if *name* does not exist.
        :rtype: :py:class:`dns.node.Node` or ``None``
        r   rX   s     r   rW   zTransaction._get_node~  s
   € ô "Ð!r   c                 ó6   — | j                   j                  «       S r5   )r@   r   r   s    r   r´   zTransaction._origin_information‹  s   € à�|‰|×.Ñ.Ó0Ð0r   )FF)r   N)Cr    r!   r"   r   r#   rJ   r%   rQ   rt   r&   r'   rO   rR   r7   r¥   rU   r<   ÚNoderY   r[   r   ra   rc   rg   ri   rl   Úemptyr¦   r|   r€   r„   r‡   r‹   r�   ÚCheckPutRdatasetTyper’   ÚCheckDeleteRdatasetTyper”   ÚCheckDeleteNameTyper–   r   r$   r˜   r›   rŸ   r¬   r_   rf   rN   rŠ   r·   r¼   r¿   rÌ   rÑ   rT   rÆ   rÊ   rÈ   rk   r†   rÃ   rÜ   rƒ   rš   rW   r´   r*   r   r   r	   r	   h   sª  „ ð "Øñ	@à#ð@ð ð@ð ó	@ð4 14·±×0BÑ0Bñ	4à�h‰h�m‰m˜cÑ! DÑ(ð4ð —‘×'Ñ'¨#Ñ-ð4ð —‘×'Ñ'¨#Ñ-ð	4ð
 
�‰×	Ñ	 Ñ	%ó4ð&<˜SŸX™XŸ]™]ð <¨s¯x©x¯}©}¸tÑ/Có <óð˜ð  ó ð˜Sð  Tó ð*"˜Cð " Dó "ð,! #ð !¨$ó !ð,' §¡§¡°Ñ 3ð '¸ó 'ð ØØ!Ÿh™hŸn™nñ	$)àð$)ð ð$)ð �h‰h�m‰mð	$)ð
 
ó$)ðL, Só ,ò)ð	˜ó 	óó
ð
/Ð(<ð 
/Àó 
/ð2Ð+Bð 2Àtó 2ð
.Ð':ð 
.¸tó 
.ð
)à	�%˜Ÿ™Ÿ™ s§|¡|×'<Ñ'<Ð<Ñ=Ñ	>ó
)ð%˜x¨¯©¯©Ñ6ó %ò=òFò<+BòZ>Bò@òò+ò
4ò
 òòò"ò"ò"ò"ò"ò"ò"ò"ò"ò"ò"ó1r   c                   ó   — e Zd ZdZy)ÚTooManyChangeszToo many changesNr-   r*   r   r   rç   rç   �  s   „ Úr   rç   c            	       ól  ‡ — e Zd ZdZdefˆ fd„Zd„ Zdedej                  j                  dej                  j                  fd„Zdedej                  j                  d	ej                  j                  d
ej                  j                  dz  fd„Zdedej                  j                  fd„Zdefd„Zˆ xZS )ÚTransactionLimiteraÁ  Transaction setup that enforces a maximum number of changes in the transaction.

    Each rdataset put or deleted counts as a change.  Each whole name deletion counts
    as a change.

    The limiter is meant to ensure that reading a zonefile from an untrusted source
    cannot cause too many changes, e.g. via large $GENERATE statements.  It is not
    meant to limit the total number of records in a zone or the memory used by the
    zone.
    Úlimitc                 ó>   •— t         ‰| �  «        || _        d| _        y )Nr   )ÚsuperrJ   rê   Úchanges)r   rê   Ú	__class__s     €r   rJ   zTransactionLimiter.__init__   s   ø€ Ü‰ÑÔØˆŒ
Øˆ�r   c                 óh   — | j                   | j                  k\  rt        d| j                  › d�«      ‚y )Nz	limit is z changes)rí   rê   rç   r   s    r   Ú_check_limitzTransactionLimiter._check_limit¥  s/   € Ø�<‰<˜4Ÿ:™:Ò%Ü  9¨T¯Z©Z¨L¸Ð!AÓBÐBð &r   Útxnr&   r7   c                 óN   — | xj                   dz  c_         | j                  «        y ©Nrm   ©rí   rð   )r   rñ   r&   r7   s       r   rG   z&TransactionLimiter._check_put_rdataset©  s   € ð 	�Š˜Ñ�Ø×ÑÕr   ÚtyperL   Nc                 óN   — | xj                   dz  c_         | j                  «        y ró   rô   )r   rñ   r&   rõ   rL   s        r   rH   z)TransactionLimiter._check_delete_rdataset¯  s   € ð 	�Š˜Ñ�Ø×ÑÕr   c                 óN   — | xj                   dz  c_         | j                  «        y ró   rô   )r   rñ   r&   s      r   rI   z%TransactionLimiter._check_delete_name¹  s   € ð
 	�Š˜Ñ�Ø×ÑÕr   c                 ó¦   — |j                  | j                  «       |j                  | j                  «       |j	                  | j
                  «       y r5   )r’   rG   r”   rH   r–   rI   )r   rñ   s     r   Ú__call__zTransactionLimiter.__call__Á  s>   € Ø×Ñ˜t×7Ñ7Ô8Ø×!Ñ! $×"=Ñ"=Ô>Ø×Ñ˜d×5Ñ5Õ6r   )r    r!   r"   r.   r¦   rJ   rð   r	   r%   r&   r'   r7   r¥   rG   rQ   rR   rH   rI   rù   Ú__classcell__)rî   s   @r   ré   ré   ”  sÀ   ø„ ñ	ð˜cõ ò
CðØðØ&)§h¡h§m¡mðØ?B¿|¹|×?TÑ?Tóðàðð �h‰h�m‰mðð �m‰m×%Ñ%ð	ð
 —‘×'Ñ'¨$Ñ.óðàðð �h‰h�m‰móð7˜K÷ 7r   ré   )(r±   Úcollections.abcr   r   Útypingr   Údns.exceptionr%   Údns.nameÚdns.nodeÚ	dns.rdataÚdns.rdataclassÚdns.rdatasetÚdns.rdatatypeÚ	dns.rrsetÚ
dns.serialÚdns.ttlr   Ú	exceptionÚDNSExceptionr,   r0   r3   r7   r8   r9   r<   r=   r>   r&   r'   r¥   rã   rQ   rR   rä   rå   r	   rç   ré   r*   r   r   ú<module>r	     sj  ðó ß .Ý ã Û Û Û Û Û Û Û Û Û ÷0ñ 0ôfI�S—]‘]×/Ñ/ô Iô5ˆs�}‰}×)Ñ)ô 5ô5�3—=‘=×-Ñ-ô 5ð4¨C¯L©L×,JÑ,JÈTÑ,Qó 4ð( C§H¡H×$:Ñ$:¸TÑ$Aó (ð  Ø�C—H‘H—M‘M 3§<¡<×#8Ñ#8Ð9¸4Ð?ñÐ ð #Ø�C—H‘H—M‘M 3§=¡=×#:Ñ#:¸C¿M¹M×<SÑ<SÐTØð
ñÐ ð  ¨s¯x©x¯}©}Ð=¸tÐCÑDÐ ÷e1ñ e1ôP�S—]‘]×/Ñ/ô ÷07ò 07r   