
    ?g	                    N    S SK Jr  S SKJr  S SKr\" S5      SS j5       rSS jrg)	    )annotations)	lru_cacheNd   c                $   [        U 5      nSUs=::  a  S:  a   g  US:X  d/  SUs=::  a  S::  d"  O  SUs=::  a  S::  d  O  S	Us=::  a  S
::  a   g  Og[        R                  " U 5      nUS:X  a  gUS;   a  g[        R                  " U 5      S;   a  gg)zDetermine how many columns are needed to display a character in a terminal.

Returns -1 if the character is not printable.
Returns 0, 1 or 2 for other characters.
          r   i   i   i(   i.   i`   ic   Cc)MeMn)FW   )ordunicodedatacategoryeast_asian_width)cor   s      5/usr/lib/python3/dist-packages/_pytest/_io/wcwidth.pywcwidthr      s     	AA q5 
 	
VQ & Q & Q &  !##A&H 4 < ##A&*4    c                t    Sn[         R                  " SU 5       H  n[        U5      nUS:  a    gX-  nM     U$ )zDetermine how many columns are needed to display a string in a terminal.

Returns -1 if the string contains non-printable characters.
r   NFCr   )r   	normalizer   )swidthr   wcs       r   wcswidthr    .   sA    
 E""5!,QZ6	 -
 Lr   )r   strreturnint)r   r!   r"   r#   )
__future__r   	functoolsr   r   r   r     r   r   <module>r'      s,    "   3# #Lr   