+
    Qj                         ^ RI t ^ RIt^ RIHt ^ RIHt ]P                  ! R]P                  4      t]P                  ! R4      t	R t
R tR tRR	 ltR
 t]RR l4       t]RR l4       tR# )    N)deque)contextmanageraZ  
(
 (?:                     # Start of non-capturing group
  (?:\r\n|\r|\n)      |  # Match any single newline, or
  [^\r\n'"]+          |  # Match any character series without quotes or
                         # newlines, or
  "(?:[^"\\]|\\.)*"   |  # Match double-quoted strings, or
  '(?:[^'\\]|\\.)*'      # Match single quoted strings
 )
)
z(\r\n|\r|\n)c                    \        V 4      p\        P                  V4      pR.pV FP  pV'       g   K  \        P	                  V4      '       d   VP                  R4       K;  VR;;,          V,          uu&   KR  	  V# )zSplit a string on all unquoted newlines.

Unlike str.splitlines(), this will ignore CR/LF/CR+LF if the requisite
character is inside of a string. )strSPLIT_REGEXsplit
LINE_MATCHmatchappend)stmttextlinesoutputlineslines   &    C/var/www/idalgo/venv/lib/python3.14/site-packages/sqlparse/utils.pysplit_unquoted_newlinesr   $   si    
 t9Dd#E$Kd##r"Ot#O      c                b    V f   R# V ^ ,          R9   d   V ^ ,          V R,          8X  d   V ^R p V # )z4Helper that removes surrounding quotes from strings.N)"'`r    )vals   &r   remove_quotesr   6   s5    
{
1v SVs2w%6!BiJr   c                    a  V 3R lpV# )zeFunction decorator to help with recursion

:param cls: Classes to not recurse over
:return: function
c                    <a a VV V3R  loS# )c                 ~   < V P                  4        F  p\        VS4      '       d   K  S! V4       K!  	  S! V 4       R # N)get_sublists
isinstance)tlistsgroupclsf	wrapped_fs   & r   r'   (recurse.<locals>.wrap.<locals>.wrapped_fF   s4    ,,.!&#..f% / eHr   r   )r&   r'   r%   s   f@r   wraprecurse.<locals>.wrapE   s    	 r   r   )r%   r)   s   j r   recurser+   ?   s     Kr   c                *  a  S f   R# V'       d   \        S V4      '       d   R# V'       dr   \        V\        4      '       dD   \        ;QJ d    V 3R lV 4       F  '       g   K   RM	  RM! V 3R lV 4       4      '       d   R# MS P                  ! V!  '       d   R# V'       do   \        V\        4      '       dF   \        ;QJ d    V 3R lV 4       F  '       g   K   RM	  RM! V 3R lV 4       4      '       d   R#  R# S P                  V9   d   R# R# )a  Helper function to simplify comparisons Instance, Match and TokenType
:param token:
:param i: Class or Tuple/List of Classes
:param m: Tuple of TokenType & Value. Can be list of Tuple for multiple
:param t: TokenType or Tuple/List of TokenTypes
:return:  bool
FTc              3   D   <"   T F  pSP                   ! V!  x  K  	  R # 5ir    )r   ).0patterntokens   & r   	<genexpr>imt.<locals>.<genexpr>_   s     :W5;;(s    c              3   B   <"   T F  pSP                   V9   x  K  	  R # 5ir    )ttype)r.   r4   r0   s   & r   r1   r2   e   s     7QE5;;%'Qs   )r"   listanyr   r4   )r0   imts   f&&&r   imtr:   Q   s     }Zq!!as::sss:::: ;[[!__as7Q7sss7Q777 8  [[Ar   c                H    \        \        P                  ! W4      ^ R7       R# )zCAdvance the iterator n-steps ahead. If n is none, consume entirely.)maxlenN)r   	itertoolsislice)iteratorns   &&r   consumerA   l   s    	)

8
'2r   c              #   z   "   V ;P                   V,          un         R x  V ;P                   V,          un         R # 5ir    )offsetfilter_r@   s   &&r   rC   rC   q   $     NNaN	NNaN   9;c              #   z   "   V ;P                   V,          un         R x  V ;P                   V,          un         R # 5ir    )indentrD   s   &&r   rI   rI   x   rF   rG   )NNN)r   )   )r=   recollectionsr   
contextlibr   compileVERBOSEr	   r   r   r   r+   r:   rA   rC   rI   r   r   r   <module>rP      s     	  % jj 
 ZZ
 ZZ(
$$63
    r   