Ë
    Ã?Æi‚  ã                  óz   — d Z ddlmZ ddlmZ ddl­ ddlmZ  ej                  d«      Z	dd„Z
dd„Zdd	„Zdd
„Zy)a  CFI (ISO 10962 Classification of Financial Instruments).

The CFI is a 6-character code used to classify financial instruments. It is
issued alongside an ISIN and describes category such as equity or future and
category-specific properties such as underlying asset type or payment status.

More information:

* https://en.wikipedia.org/wiki/ISO_10962
* https://www.iso.org/standard/73564.html
* https://www.six-group.com/en/products-services/financial-information/data-standards.html

>>> validate('ELNUFR')
'ELNUFR'
>>> validate('ELNUFQ')
Traceback (most recent call last):
    ...
InvalidComponent: ...
>>> import json
>>> print(json.dumps(info('ELNUFR'), indent=2, sort_keys=True))
{
  "Form": "Registered",
  "Ownership/transfer/sales restrictions": "Free",
  "Payment status": "Fully paid",
  "Voting right": "Non-voting",
  "category": "Equities",
  "group": "Limited partnership units"
}
é    )Úannotations)Únumdb)Ú*)ÚcleanÚcfic                óR   — t        | d«      j                  «       j                  «       S )zˆConvert the number to the minimal representation. This strips the
    number of any valid separators and removes surrounding whitespace.z -)r   ÚstripÚupper©Únumbers    úQ/var/www/html/myprovider/mon_projet_qr/lib/python3.12/site-packages/stdnum/cfi.pyÚcompactr   =   s#   € ô �˜Ó×$Ñ$Ó&×,Ñ,Ó.Ð.ó    c                ó6  — t        | «      } t        j                  | «      }t        |«      dk7  r
t	        «       ‚i }|j                  |d   d   «       |j                  |d   d   «       |dd D ](  \  }}|dk7  rd|vr
t	        «       ‚d|v sŒ|d   ||d   <   Œ* |S )	z%Look up information about the number.é   r   é   é   NÚXÚvÚa)r   Ú_cfidbÚinfoÚlenÚInvalidComponentÚupdate)r   r   Ú
propertiesÚnrÚfounds        r   r   r   C   s¯   € ä�V‹_€FÜ�;‰;�vÓ€DÜ
ˆ4ƒy�A‚~ÜÓ Ð Ø€JØ×Ñ�d˜1‘g˜a‘jÔ!Ø×Ñ�d˜1‘g˜a‘jÔ!Ø˜!˜"�Xò 0‰	ˆˆEØ�Š9˜ EÑ)Ü"Ó$Ð$Ø�%Š<Ø%*¨3¡ZˆJ�u˜S‘zÒ"ð	0ð
 Ðr   c                óš   — t        | «      } t        d„ | D «       «      s
t        «       ‚t        | «      dk7  r
t	        «       ‚t        | «       | S )zMCheck if the number provided is valid. This checks the length and
    format.c              3  ó$   K  — | ]  }|d v –— Œ
 y­w)ÚABCDEFGHIJKLMNOPQRSTUVWXYZN© )Ú.0Úxs     r   ú	<genexpr>zvalidate.<locals>.<genexpr>X   s   è ø€ ÒA°QˆqÐ0Ô0ÑAùs   ‚r   )r   ÚallÚInvalidFormatr   ÚInvalidLengthr   r   s    r   Úvalidater)   T   sC   € ô �V‹_€FÜÑA¸&ÔAÔAÜ‹oÐÜ
ˆ6ƒ{�aÒÜ‹oÐÜˆ„LØ€Mr   c                óJ   — 	 t        t        | «      «      S # t        $ r Y yw xY w)zRCheck if the number provided is valid. This checks the length and
    check digit.F)Úboolr)   ÚValidationErrorr   s    r   Úis_validr-   `   s)   € ðÜ”H˜VÓ$Ó%Ð%øÜò Ùðús   ‚ –	"¡"N)r   ÚstrÚreturnr.   )r   r.   r/   zdict[str, str])r   r.   r/   r+   )Ú__doc__Ú
__future__r   Ústdnumr   Ústdnum.exceptionsÚstdnum.utilr   Úgetr   r   r   r)   r-   r"   r   r   ú<module>r6      s>   ðñ(õ< #å Ü Ý ð 
ˆ�‰�5Ó	€ó/óó"	ôr   