
    $g                     t    d dl mZmZ ddlmZmZ ddlmZmZ ddl	m
Z
 ddlmZ dgZdeeef         d	efd
ZdS )    )Unioncast   )Lexer	TokenKind)Source	is_source)print_block_string)is_punctuator_token_kindstrip_ignored_characterssourcereturnc                 r   t          |           rt          t          |           n!t          t          t          |                     } | j        }t          |           }d}d}|                                j        t          j	        k    r|j
        }|j        }t          |j                   }|r|s|j        t          j        k    r|dz  }||j        |j                 }|t          j        k    r|t!          |j        pdd          z  }n||z  }|}|                                j        t          j	        k    |S )a  Strip characters that are ignored anyway.

    Strips characters that are not significant to the validity or execution
    of a GraphQL document:

        - UnicodeBOM
        - WhiteSpace
        - LineTerminator
        - Comment
        - Comma
        - BlockString indentation

    Note: It is required to have a delimiter character between neighboring
    non-punctuator tokes and this function always uses single space as delimiter.

    It is guaranteed that both input and output documents if parsed would result
    in the exact same AST except for nodes location.

    Warning: It is guaranteed that this function will always produce stable results.
    However, it's not guaranteed that it will stay the same between different
    releases due to bugfixes or changes in the GraphQL specification.
    

    Query example::

        query SomeQuery($foo: String!, $bar: String) {
          someField(foo: $foo, bar: $bar) {
            a
            b {
              c
              d
            }
          }
        }

    Becomes::

        query SomeQuery($foo:String!$bar:String){someField(foo:$foo bar:$bar){a b{c d}}}

    SDL example::

        """
        Type description
        """
        type Foo {
          """
          Field description
          """
          bar: String
        }

    Becomes::

        """Type description""" type Foo{"""Field description""" bar:String}
     F T)minimize)r	   r   r   strbodyr   advancekindr   EOFtokenr   SPREADstartendBLOCK_STRINGr
   value)	r   r   lexerstripped_body#was_last_added_token_non_punctuatorcurrent_token
token_kindis_non_punctuator
token_bodys	            j/var/www/html/netbox-4.1.3/venv/lib/python3.11/site-packages/graphql/utilities/strip_ignored_characters.pyr   r      s?   p &/v%6%6UT&&!!!F4VCTCT<U<UF;D&MMEM*/'
--//
)-
/
/"'

 !99K L LL. 	!	!!.!3y7G!G!GS M--0AAB
////#)rD   MM Z'M.?++ --//
)-
/
/.     N)typingr   r   languager   r   language.sourcer   r	   language.block_stringr
   language.lexerr   __all__r   r    r&   r%   <module>r.      s            ' ' ' ' ' ' ' ' / / / / / / / / 6 6 6 6 6 6 5 5 5 5 5 5%
&UU3;%7 UC U U U U U Ur&   