Ë
    Ã?Æi'  ã                  óV   — d Z ddlmZ ddl­ ddlmZmZ h d£Zh d£Zdd„Z	dd„Z
dd	„Zy
)u  CAE (CÃ³digo de Actividad y Establecimiento, Spanish activity establishment code).

The CÃ³digo de Actividad y Establecimiento (CAE) is assigned by the Spanish
Tax Agency companies or establishments that carry out activities related to
products subject to excise duty. It identifies an activity and the
establishment in which it is carried out.

The number consists of 13 characters where the sixth and seventh characters
identify the managing office in which the territorial registration is carried
out and the eighth and ninth characters identify the activity that takes
place.


More information:

* https://www.boe.es/boe/dias/2006/12/28/pdfs/A46098-46100.pdf
* https://www2.agenciatributaria.gob.es/L/inwinvoc/es.aeat.dit.adu.adce.cae.cw.AccW?fAccion=consulta

>>> validate('ES00008V1488Q')
'ES00008V1488Q'
>>> validate('00008V1488')  # invalid check length
Traceback (most recent call last):
    ...
InvalidLength: ...
>>> is_valid('ES00008V1488Q')
True
>>> is_valid('00008V1488')
False
>>> compact('ES00008V1488Q')
'ES00008V1488Q'
é    )Úannotations)Ú*)ÚcleanÚisdigits>8   Ú01Ú02Ú03Ú04Ú05Ú06Ú07Ú08Ú09Ú10Ú11Ú12Ú13Ú14Ú15Ú16Ú17Ú18Ú19Ú20Ú21Ú22Ú23Ú24Ú25Ú26Ú27Ú28Ú29Ú30Ú31Ú32Ú33Ú34Ú35Ú36Ú37Ú38Ú39Ú40Ú41Ú42Ú43Ú44Ú45Ú46Ú47Ú48Ú49Ú50Ú51Ú52Ú53Ú54Ú55Ú56>Q   ÚA0ÚA1ÚA2ÚA6ÚA7ÚA9ÚACÚAFÚATÚAVÚAWÚAXÚB0ÚB1ÚB6ÚB7ÚB9ÚBAÚBTÚC1ÚC7ÚDAÚDBÚDFÚDMÚDPÚE7ÚECÚF1ÚH0ÚH1ÚH2ÚH4ÚH6ÚH7ÚH8ÚH9ÚHAÚHBÚHCÚHDÚHEÚHFÚHHÚHIÚHJÚHKÚHLÚHMÚHNÚHPÚHQÚHRÚHSÚHTÚHUÚHVÚHWÚHXÚHZÚL0ÚL1ÚL2ÚL3ÚL7ÚM7ÚOAÚOBÚOEÚOHÚORÚOTÚOVÚPFÚRFÚT1ÚT7ÚTTÚV1ÚV7ÚVDc                óP   — t        | «      j                  «       j                  «       S )zˆConvert the number to the minimal representation. This strips the
    number of any valid separators and removes surrounding whitespace.)r   ÚupperÚstrip©Únumbers    úT/var/www/html/myprovider/mon_projet_qr/lib/python3.12/site-packages/stdnum/es/cae.pyÚcompactr–   Ð   s    € ô �‹=×ÑÓ ×&Ñ&Ó(Ð(ó    c                óR  — t        | «      } t        | «      dk7  r
t        «       ‚| dd dk7  r
t        «       ‚| dd dk7  r
t        «       ‚| dd t        vr
t        «       ‚| dd t
        vr
t        «       ‚t        | dd	 «      s
t        «       ‚| d	   j                  «       s
t        «       ‚| S )
ú^Check if the number provided is a valid CAE number. This checks the
    length and formatting.é   Né   ÚESé   Ú000é   é	   é   )r–   ÚlenÚInvalidLengthÚInvalidFormatÚ_OFFICESÚ_ACTIVITY_KEYSr   Úisalphar“   s    r•   Úvalidater¨   Ö   s¬   € ô �V‹_€FÜ
ˆ6ƒ{�bÒÜ‹oÐØˆbˆq€z�TÒÜ‹oÐØˆa�€{�eÒÜ‹oÐØˆa�€{œ(Ñ"Ü‹oÐØˆa�€{œ.Ñ(Ü‹oÐÜ�F˜1˜R�LÔ!Ü‹oÐØ�"‰:×ÑÔÜ‹oÐØ€Mr—   c                óJ   — 	 t        t        | «      «      S # t        $ r Y yw xY w)r™   F)Úboolr¨   ÚValidationErrorr“   s    r•   Úis_validr¬   ë   s)   € ðÜ”H˜VÓ$Ó%Ð%øÜò Ùðús   ‚ –	"¡"N)r”   ÚstrÚreturnr­   )r”   r­   r®   rª   )Ú__doc__Ú
__future__r   Ústdnum.exceptionsÚstdnum.utilr   r   r¥   r¦   r–   r¨   r¬   © r—   r•   ú<module>r´      s6   ðñ*õ@ #ä ß 'ò9€òvW€ót)óô*r—   