o
    tBh                     @   s   d dl mZmZmZ zd dl mZ W n ey!   d dlmZ Y nw er*ddlmZ g dZ	G dd deZ
G dd	 d	eZd
ddedefddZdS )    )Any
NamedTupleTYPE_CHECKING)	TypedDict   )Source)get_locationSourceLocationFormattedSourceLocationc                   @   s"   e Zd ZU dZeed< eed< dS )r
   zFormatted source locationlinecolumnN)__name__
__module____qualname____doc__int__annotations__ r   r   p/var/www/html/riverr-enterprise-integrations-main/venv/lib/python3.10/site-packages/graphql/language/location.pyr
      s   
 r
   c                   @   sX   e Zd ZU dZeed< eed< edefddZde	de
fdd	Zde	de
fd
dZdS )r	   z"Represents a location in a Source.r   r   returnc                 C   s   t | j| jdS )N)r   r   )dictr   r   )selfr   r   r   	formatted   s   zSourceLocation.formattedotherc                 C   s    t |tr
| j|kS t| |kS N)
isinstancer   r   tupler   r   r   r   r   __eq__   s   

zSourceLocation.__eq__c                 C   s
   | |k S r   r   r   r   r   r   __ne__$   s   
zSourceLocation.__ne__N)r   r   r   r   r   r   propertyr
   r   r   boolr   r   r   r   r   r   r	      s   
 r	   sourcer   positionr   c                 C   s
   |  |S )zGet the line and column for a character position in the source.

    Takes a Source and a UTF-8 character offset, and returns the corresponding line and
    column as a SourceLocation.
    )r   )r"   r#   r   r   r   r   (   s   
r   N)typingr   r   r   r   ImportErrortyping_extensionsr"   r   __all__r
   r	   r   r   r   r   r   r   <module>   s    