Ë
    Ã?Æi
  ã                  óV   — d Z ddlmZ ddl­ ddlmZmZ  ed«      Zd
d„Z	d
d„Z
dd„Zy	)a—  COE (Codice operatore economico, San Marino national tax number).

The COE is a tax identification number of up to 5-digits used in San Marino.
Leading zeroes are commonly dropped.

>>> validate('51')
'51'
>>> validate('024165')
'24165'
>>> validate('2416A')
Traceback (most recent call last):
    ...
InvalidFormat: ...
>>> validate('1124165')
Traceback (most recent call last):
    ...
InvalidLength: ...
é    )Úannotations)Ú*)ÚcleanÚisdigits)Aé   é   é   é   é   é	   é
   é   é   é   é   é   é   é   é   é   é   é    é!   é#   é$   é%   é&   é'   é(   é*   é-   é/   é1   é3   é4   é7   é8   é9   é:   é;   é=   é>   é@   éA   éB   éC   éD   éE   éF   éG   éH   éI   éJ   éK   éL   éO   éP   éQ   éT   éU   éW   éX   é[   é\   é^   é_   é`   éa   éc   c                óT   — t        | d«      j                  «       j                  d«      S )zmConvert the number to the minimal representation. This strips
    surrounding whitespace and separation dash.ú.Ú0)r   ÚstripÚlstrip©Únumbers    úT/var/www/html/myprovider/mon_projet_qr/lib/python3.12/site-packages/stdnum/sm/coe.pyÚcompactrP   8   s%   € ô �˜Ó×#Ñ#Ó%×,Ñ,¨SÓ1Ð1ó    c                óä   — t        | «      } t        | «      dkD  st        | «      dk(  r
t        «       ‚t        | «      s
t	        «       ‚t        | «      dk  rt        | «      t        vr
t        «       ‚| S )zNCheck if the number is a valid COE. This checks the length and
    formatting.é   r   é   )rP   ÚlenÚInvalidLengthr   ÚInvalidFormatÚintÚ_lownumbersÚInvalidComponentrM   s    rO   Úvalidater[   >   s_   € ô �V‹_€FÜ
ˆ6ƒ{�Q‚œ#˜f›+¨Ò*Ü‹oÐÜ�FÔÜ‹oÐÜ
ˆ6ƒ{�Q‚œ3˜v›;¬kÑ9ÜÓ Ð Ø€MrQ   c                óJ   — 	 t        t        | «      «      S # t        $ r Y yw xY w)z#Check if the number is a valid COE.F)Úboolr[   ÚValidationErrorrM   s    rO   Úis_validr_   K   s)   € ðÜ”H˜VÓ$Ó%Ð%øÜò Ùðús   ‚ –	"¡"N)rN   ÚstrÚreturnr`   )rN   r`   ra   r]   )Ú__doc__Ú
__future__r   Ústdnum.exceptionsÚstdnum.utilr   r   ÚsetrY   rP   r[   r_   © rQ   rO   ú<module>rh      s5   ðñ.õ& #ä ß 'ñ ð (ó )€ó2ó
ôrQ   