Ë
    Ã?Æió	  ã                  óN   — d Z ddlmZ ddl­ ddlmZmZ d
d„Zd
d„Zd
d„Z	dd„Z
y	)u  VNR, SVNR, VSNR (Versicherungsnummer, Austrian social security number).

The Austian Versicherungsnummer is a personal identification number used for
social security. The number is 10 digits long and consists of a 3 digit
serial, a check digit and 6 digits that usually specify the person's birth
date.

More information:

* https://de.wikipedia.org/wiki/Sozialversicherungsnummer#Ã–sterreich

>>> validate('1237 010180')
'1237010180'
>>> validate('2237 010180')
Traceback (most recent call last):
    ...
InvalidChecksum: ...
é    )Úannotations)Ú*)ÚcleanÚisdigitsc                ó   — t        | d«      S )zˆConvert the number to the minimal representation. This strips the
    number of any valid separators and removes surrounding whitespace.ú )r   ©Únumbers    úT/var/www/html/myprovider/mon_projet_qr/lib/python3.12/site-packages/stdnum/at/vnr.pyÚcompactr   .   s   € ô �˜ÓÐó    c           	     óV   — d}t        t        d„ t        || «      D «       «      dz  «      S )zICalculate the check digit. The fourth digit in the number is
    ignored.)
é   é   é	   r   é   é   é   é   é   é   c              3  ó>   K  — | ]  \  }}|t        |«      z  –— Œ y ­w)N)Úint)Ú.0ÚwÚns      r   ú	<genexpr>z#calc_check_digit.<locals>.<genexpr>8   s   è ø€ Ò?¡$ ! Q�1”s˜1“v•:Ñ?ùs   ‚é   )ÚstrÚsumÚzip)r
   Úweightss     r   Úcalc_check_digitr#   4   s+   € ð -€GÜŒsÑ?¬#¨g°vÓ*>Ô?Ó?À"ÑDÓEÐEr   c                óÎ   — t        | «      } t        | «      r| j                  d«      r
t        «       ‚t	        | «      dk7  r
t        «       ‚t        | «      | d   k7  r
t        «       ‚| S )zbCheck if the number is a valid VAT number. This checks the length,
    formatting and check digit.Ú0é
   r   )r   r   Ú
startswithÚInvalidFormatÚlenÚInvalidLengthr#   ÚInvalidChecksumr	   s    r   Úvalidater,   ;   s]   € ô �V‹_€FÜ�FÔ˜v×0Ñ0°Ô5Ü‹oÐÜ
ˆ6ƒ{�bÒÜ‹oÐÜ˜Ó 6¨!¡9Ò,ÜÓÐØ€Mr   c                óJ   — 	 t        t        | «      «      S # t        $ r Y yw xY w)z*Check if the number is a valid VAT number.F)Úboolr,   ÚValidationErrorr	   s    r   Úis_validr0   H   s)   € ðÜ”H˜VÓ$Ó%Ð%øÜò Ùðús   ‚ –	"¡"N)r
   r   Úreturnr   )r
   r   r1   r.   )Ú__doc__Ú
__future__r   Ústdnum.exceptionsÚstdnum.utilr   r   r   r#   r,   r0   © r   r   ú<module>r7      s*   ðñ*õ& #ä ß 'óóFó
ôr   