
    shV                        S SK r S SKJrJrJr  S SKJrJrJrJ	r	J
r
  S rS rS r\" \ R                  \R                  \R                  5      " \5        \" \ R                  \R                   \R                  5      " \5        \" \ R                  \R                  \R                   5      " \5        \" \R                   5      S 5       r\
" \R                   5      S 5       r\" \R                   \R                   5      S	 5       r\" \R(                  \R                   5      S
 5       r\" \R                   \R(                  5      \" \R                   \R,                  5      S 5       5       rg)    N)typestypingcgutils)
lower_castlower_builtinlower_getattr_genericimpl_ret_untrackedlower_setattr_genericc                 "    [         R                  $ N)r   true_bitcontextbuildersigargss       g/Users/tiagomarins/Projetos/claudeai/copy_bank/venv/lib/python3.13/site-packages/numba/core/optional.pyalways_return_true_implr   
   s        c                 "    [         R                  $ r   )r   	false_bitr   s       r   always_return_false_implr      s    r   c                    UR                   u  pEUu  pgU[        R                  :X  a  XTpTXvpvUnUn	U R                  XU	5      n
UR	                  [
        R                  " XR                  5      5      n[        XUR                  U5      $ )z'
Check if an Optional value is invalid
)
r   r   nonemake_helpernot_r   as_bool_bitvalidr	   return_type)r   r   r   r   ltyrtylvalrvalopt_typeopt_valoptress               r   optional_is_noner(      sz     JSLT ejjSdHG


g
9C
,,w**7II>
?CgEEr   c                 t    UR                   nU R                  XX%5      nU R                  XT5      nU" XXVU5      $ )z7
Optional.__getattr__ => redirect to the wrapped type.
)typecastget_getattr)r   r   typvalueattr
inner_typevalimps           r   optional_getattrr3   .   s<    
 J
,,ws
7C


j
/Cw$77r   c                     UR                   u  pVUu  pxUR                  n	U R                  XXY5      n[        R                  " UR
                  X5      n
U R                  XJ5      nU" XU45      $ )z7
Optional.__setattr__ => redirect to the wrapped type.
)r   r*   r+   r   	signaturer   get_setattr)r   r   r   r   r/   basetyvaltytargetr1   target_typenewsigr2   s               r   optional_setattrr<   9   sd    
 HHMFKF++K\\'6?Fcoo{BF


d
+Cw&&r   c                    U R                  XUS9n[        R                  " XR                  5      nU R                  X5      nUR	                  U5       u  pU   [        R
                  Ul        U R                  XR                  UR                  UR                  5      Ul        SSS5        U	   [        R                  Ul        [        R                  " UR                  R                  5      Ul        SSS5        SSS5        UR                  5       $ ! , (       d  f       Nu= f! , (       d  f       N7= f! , (       d  f       UR                  5       $ = f)a  
The handling of optional->optional cast must be special cased for
correct propagation of None value.  Given type T and U. casting of
T? to U? (? denotes optional) should always succeed.   If the from-value
is None, the None value the casted value (U?) should be None; otherwise,
the from-value is casted to U. This is different from casting T? to U,
which requires the from-value must not be None.
r.   N)r   r   r   r   if_elser   r+   datar*   r   get_null_value	_getvalue)
r   r   fromtytotyr1   optvalvalidbit	outoptvalis_validis_not_valids
             r   optional_to_optionalrJ   H   s        <F""7LL9H##G2I		"&>x%..IO$\\';;*0++tyyBIN  %//IO$33##%IN  
#    X \ 
#	"   s>   D5AD$
D5.AD$3D5
D!	D5$
D2	.D55
Ec                     U[         R                  :X  a  U R                  XR                  5      $ U R	                  XX#R                  5      nU R                  XR                  U5      $ r   )r   r   make_optional_noner*   r+   make_optional_value)r   r   rC   rD   r1   s        r   any_to_optionalrN   g   sN    ))'99==ll7;**7IIsCCr   c                    U R                  XUS9n[        R                  " XR                  5      nUR	                  UR                  U5      SS9   SUR                  < S3nU R                  R                  U[        U45        S S S 5        U R                  XR                  UR                  U5      $ ! , (       d  f       N5= f)Nr>   F)likelyz	expected z
, got None)r   r   r   r   if_thenr   r*   	call_convreturn_user_exc	TypeErrorr+   r@   )r   r   rC   rD   r1   rE   rF   msgs           r   optional_to_anyrV   p   s        <F""7LL9H	h/	>)/6))'9sfE 
? <<fkk4@@	 
?	>s   4B33
C)operator
numba.corer   r   r   numba.core.imputilsr   r   r   r	   r
   r   r   r(   is_r   Optionalr3   r<   rJ   AnyrN   BooleanrV    r   r   <module>r_      sD    - -8 8
F* hllEJJ

 34K L hllENNEJJ 78H I hllEJJ 78H I u~~&8 '8 u~~&' '' ENNENN+! ,!< EIIu~~&D 'D ENNEII&ENNEMM*A + 'Ar   