Ë
    Ã?Æi   ã                  óZ   — d Z ddlmZ ddl­ ddlmZmZ dZdd„Zdd„Z	dd„Z
dd	„Zdd
„Zy)a¼  SEDOL number (Stock Exchange Daily Official List number).

The SEDOL number is a security identifier used in the United Kingdom and
Ireland assigned by the London Stock Exchange. A SEDOL is seven characters
in length consisting of six alphanumeric digits, followed by a check digit.

>>> validate('B15KXQ8')
'B15KXQ8'
>>> validate('B15KXQ7')
Traceback (most recent call last):
    ...
InvalidChecksum: ...
>>> to_isin('B15KXQ8')
'GB00B15KXQ89'
é    )Úannotations)Ú*)ÚcleanÚisdigitsz$0123456789 BCD FGH JKLMN PQRST VWXYZc                ó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.ú )r   ÚstripÚupper©Únumbers    úV/var/www/html/myprovider/mon_projet_qr/lib/python3.12/site-packages/stdnum/gb/sedol.pyÚcompactr   .   s#   € ô �˜Ó×#Ñ#Ó%×+Ñ+Ó-Ð-ó    c                ó`   — d}t        d„ t        || «      D «       «      }t        d|z
  dz  «      S )z*Calculate the check digits for the number.)é   é   r   é   r   é	   c              3  óR   K  — | ]  \  }}|t         j                  |«      z  –— Œ! y ­w©N)Ú	_alphabetÚindex)Ú.0ÚwÚns      r   ú	<genexpr>z#calc_check_digit.<locals>.<genexpr>7   s"   è ø€ ÒD¡t q¨!ˆA”	—‘ Ó"Õ"ÑDùs   ‚%'é
   )ÚsumÚzipÚstr)r   ÚweightsÚss      r   Úcalc_check_digitr#   4   s1   € à €GÜÑD¬s°7¸FÓ/CÔDÓD€AÜ��Q‘˜"‰}ÓÐr   c                ó  — t        | «      } t        d„ | D «       «      s
t        «       ‚t        | «      dk7  r
t	        «       ‚t        | d   «      rt        | «      s
t        «       ‚t        | dd «      | d   k7  r
t        «       ‚| S )zICheck if the number is valid. This checks the length and check
    digit.c              3  ó,   K  — | ]  }|t         v –— Œ y ­wr   )r   )r   Úxs     r   r   zvalidate.<locals>.<genexpr>?   s   è ø€ Ò. !ˆq”IŒ~Ñ.ùs   ‚r   r   Néÿÿÿÿ)r   ÚallÚInvalidFormatÚlenÚInvalidLengthr   r#   ÚInvalidChecksumr   s    r   Úvalidater-   ;   sy   € ô �V‹_€FÜÑ. vÔ.Ô.Ü‹oÐÜ
ˆ6ƒ{�aÒÜ‹oÐÜ��q‘	Ô¤8¨FÔ#3ô ‹oÐÜ˜˜s ˜Ó$¨¨r©
Ò2ÜÓÐØ€Mr   c                óJ   — 	 t        t        | «      «      S # t        $ r Y yw xY w)zCheck if the number is valid.F)Úboolr-   ÚValidationErrorr   s    r   Úis_validr1   L   s)   € ðÜ”H˜VÓ$Ó%Ð%øÜò Ùðús   ‚ –	"¡"c                ó2   — ddl m} |j                  d| «      S )zConvert the number to an ISIN.r   )ÚisinÚGB)Ústdnumr3   Ú
from_natid)r   r3   s     r   Úto_isinr7   T   s   € åØ�?‰?˜4 Ó(Ð(r   N)r   r    Úreturnr    )r   r    r8   r/   )Ú__doc__Ú
__future__r   Ústdnum.exceptionsÚstdnum.utilr   r   r   r   r#   r-   r1   r7   © r   r   ú<module>r>      s5   ðñ(õ  #ä ß 'ð 3€	ó.óóó"ô)r   