
    h?              	          S SK r S SKrS SKrS SKrS SKrS SKrS SKrS SKJrJ	r	  S SK
Jr  S SKrSSKJr  SSKJrJrJr  SSKJrJr  SSKJr  SS	KJr  S
SKJrJrJr  S
SKJr  SSK J!r!  S SK"r#S SK$r%S SK&J'r'  S r( " S S\\5      r)\S'S j5       r*S'S jr+S'S jr,S r-\S 5       r.0 r/\." S5      r0S(S jr1S r2\+\Rf                  Ri                  \" 5       S5      SSSSSSS4	S jr5Sr6SSS\Rn                  S4S jr8S\5l9        \Rt                  " S 5      Rv                  r<S! r=\Rt                  " S"5      r>S# r?S$ r@ " S% S&5      rAg))    N)Distribution	Extension)	build_ext   )Context)default_optionsCompilationOptionsget_directive_defaults)CythonTransformEnvTransform)SkipDeclarations)parse_from_strings   )strip_string_literals	cythonizecached_function)get_cython_cache_dir)Pipeline)ExtensionFileLoaderc                     [         R                  R                  U [        X5      S9n[         R                  R	                  U5      nUR
                  R                  U5        U$ )N)loader)	importlibutilspec_from_file_locationr   module_from_specr   exec_module)namepathspecmodules       M/var/www/fran/franai/venv/lib/python3.13/site-packages/Cython/Build/Inline.pyload_dynamicr"      sM    >>11$?RSW?^1_D^^,,T2FKKF#M    c                   :   ^  \ rS rSrU 4S jrS rU 4S jrSrU =r$ )UnboundSymbols#   c                 F   > [         [        U ]  S S9  [        5       U l        g )N)context)superr   __init__setunbound)self	__class__s    r!   r*   UnboundSymbols.__init__$   s    lD*4*8ur#   c                     U R                  5       R                  UR                  5      (       d%  U R                  R	                  UR                  5        U$ N)current_envlookupr   r,   add)r-   nodes     r!   visit_NameNodeUnboundSymbols.visit_NameNode'   s;    !((33LLTYY'r#   c                 :   > [         TU ]  U5        U R                  $ r1   )r)   __call__r,   )r-   r5   r.   s     r!   r9   UnboundSymbols.__call__+   s    ||r#   )r,   )	__name__
__module____qualname____firstlineno__r*   r6   r9   __static_attributes____classcell__)r.   s   @r!   r%   r%   #   s     r#   r%   c                 J   Uc   [        / [        5       [        [        5      S9nSSKJn  [        SU 5      n[        R                  " US5       H"  nUc  M  U" U5      n[        XB5      (       d  M"    O   SS K
n[        [        5       " U5      [        [        U5      5      -
  5      $ )Noptionsr   )AnalyseDeclarationsTransformz(tree fragment)pyxr   )r   r
   r	   r   Compiler.ParseTreeTransformsrD   r   r   create_pipeline
isinstancebuiltinstupler%   r+   dir)coder(   rD   treephaserI   s         r!   unbound_symbolsrO   0   s    "46"4_"EGK/6D))'59=T{e:: : !$'#c(m*<<==r#   c                 B    [        U 5      nU[        L a  g[        X5      $ )Nlong)typeint	safe_type)argr(   py_types      r!   unsafe_typerW   A   s     3iG#~&&r#   c                    [        U 5      nU[        [        [        [        4;   a  UR
                  $ U[        L a  gU[        L a  gU[        L a  gS[        R                  ;   aU  [        U [        R                  S   R                  5      (       a)  SU R                  R                  < SU R                  < S3$ UR                    H  nUR"                  S;   a    g	UR%                  UR"                  S
S9nU(       d  M8  UR'                  UR
                  5      nUR(                  (       d  Mf  UR"                  < SUR
                  < 3s  $    g	)Nzdouble complexdoublebintnumpyznumpy.ndarray[numpy.z	_t, ndim=])__builtin__rI   objectF)need_pxd.)rR   listrJ   dictstrr;   complexfloatboolsysmodulesrH   ndarraydtyper   ndim__mro__r<   find_moduler3   is_type)rU   r(   rV   	base_typer    entrys         r!   rT   rT   I   s    3iG4c**	G		E		D	CKK	JsCKK4H4P4P$Q$Q7:yy~~sxxPP I##'BB(()=)=(NFvi&8&89===&/&:&:I<N<NOO ) r#   c                      [        5       n U R                  5       nU R                  U5        [        U 5      nUR	                  5         U$ r1   )r   find_config_filesparse_config_filesr   finalize_options)distconfig_filesbuild_extensions      r!   _get_build_extensionrx   a   sB    >D ))+LL)oO$$&r#   c                 T    [        [        U 5      [        5       [        [        5      S9$ )NrB   )r   ra   r
   r	   r   )cython_include_dirss    r!   _create_contextr{   l   s&     ! "?3 r#   )r`   c                 b   U H  nX@;  d  M
  Ub  UcQ  [         R                  " 5       R                  R                  R                  nUc  UR                  nUc  UR                  n[        U[        5      (       d  [        U5      nXB;   a  X$   X'   M  XC;   a  X4   X'   M  [        SU-  5        M     g )NzCouldn't find %r)inspectcurrentframef_backf_locals	f_globalsrH   rb   print)kwdsrO   localsglobalssymbolcalling_frames         r!   _populate_unboundr   y   s    !~ ' 4 4 6 = = D D K K>*33F?+55Gfd++ f%~"&(612% "r#   c                     X[         R                  [         R                  U[        R                  4n[
        R                  " [        U5      R                  S5      5      R                  5       $ )Nzutf-8)
rg   version_info
executableCython__version__hashlibsha256rc   encode	hexdigest)	orig_codearg_sigslanguage_levelkeys       r!   _inline_keyr      sH    
s//QWQcQc
cC>>#c(//'23==??r#   inlineFc
           
         Uc  S nU(       a  [        [        U5      5      O[        nU(       a  [        U5      O0 nU	c  SU;  a  Sn	U	b  XS'   S n[        R                  U 5      nUb  [        XXx5        [        U
R                  5       5      n[        U VVs/ s H  u  nnU" UU5      U4PM     snn5      n[        U UU	5      n[        R                  U UU45      nUb  U Vs/ s H  oS   PM	     nnU" U6 $ U n[        U 5      u  n n[        U 5      n Uc3  [        R                  " 5       R                  R                  R                  nUc3  [        R                  " 5       R                  R                  R                   n [#        U 5      =[        U'   n[        XXx5        / n[)        U
R                  5       5       H(  u  nnU[*        L d  M  UR-                  SU-  5        U
U	 M*     [        U
5      n[        U Vs/ s H  o" X   U5      U4PM     sn5      nUc  [        UUU	5      nSU-   nU[.        R0                  ;   a  [.        R0                  U   nGOtS n[2        R4                  c$  [7        5       nUR9                  S5      [2        l        [:        R<                  R?                  U5      n[:        R<                  RA                  UU[2        R4                  -   5      n[:        R<                  RC                  U5      (       d  [:        RD                  " U5        U(       d%  [:        R<                  RG                  U5      (       Gd
  / n/ n/ n[H        RJ                  " S	5      n U H  u  n!n"U RM                  U!5      n#U#(       d  M   UR-                  S
U#RO                  5       S   -  5        U#RO                  5       S   S:X  d  M^  SS K(n$UR-                  U$RS                  5       5        UR-                  S5        M     [U        U 5      u  n%n&SRA                  U V's/ s H  n'SU'-  PM
     sn'5      n(SSRA                  U5      U%U(U&S.-  n)UR                  5        H  u  n*nU)RW                  U*U5      n)M     [:        R<                  RA                  UUS-   5      n+[Y        U+S5      n, U,R[                  U)5        U,R]                  5         [_        UU+/U=(       d    S U=(       d    S U=(       d    S S9n-Uc
  [7        5       n[a        U-/U=(       d    S/UUS9Ul1        [:        R<                  Re                  U+5      Ul3        UUl4        URk                  5         [.        Rl                  S:X  a]  [.        Rn                  S:  aI  [:        Rp                  " [:        R<                  R?                  U5      5         [s        UU5      nS S S 5        O[s        UU5      nWRt                  [        UUU4'   U Vs/ s H  oU   PM	     nnURt                  " U6 $ s  snnf s  snf ! [$         a    U(       d  ['        S5         GNf = fs  snf s  sn'f ! U,R]                  5         f = f! , (       d  f       N= fs  snf )Nc                     g)Nr^    )xs    r!   <lambda>cython_inline.<locals>.<lambda>   s    Xr#   r   3r   z>Could not parse code as a string (to extract unbound symbols).z
cimport cython as %s_cython_inline_ z([.\w]+)[.]z
cimport %sr   r[   )NPY_NO_DEPRECATED_APINPY_1_7_API_VERSIONz, z%s %szf
%(module_body)s
%(cimports)s
def __invoke(%(params)s):
%(func_body)s
    return locals()
            
)cimportsmodule_bodyparams	func_bodyz.pyxw)r   sourcesinclude_dirsextra_compile_argsdefine_macrosr`   )include_pathcompiler_directivesquietwin32)      );r{   rJ   _cython_inline_default_contextrb   _cython_inline_cachegetr   sorteditemsr   r   strip_common_indentr}   r~   r   r   r   rO   AssertionErrorr   ra   cython_moduleappendrg   rh   cython_inlineso_extrx   get_ext_filenameosr   abspathjoinexistsmakedirsisfilerecompilematchgroupsr[   get_includeextract_func_codereplaceopenwritecloser   r   
extensionsdirname
build_temp	build_librunplatformr   add_dll_directoryr"   __invoke).rL   get_typelib_dirrz   cython_compiler_directivesforcer   r   r   r   r   ctxkey_hash_unbound_symbolsargsrU   valuer   invokearg_listr   literalsr   r   	arg_namesmodule_namer    rw   module_pathcflagsr   c_include_dirs	qualifiedrR   _mr[   r   r   ar   module_coder   pyx_filefh	extensions.                                                 r!   r   r      s   
 %9L/% 34
5RpCE_&@!Aeg"2:T"T!7E#34H ,//5#$&Bdjjl#M*#u8E3/5MNtX~>%))48*DE*./$3A$H/8$$I*40ND(t$D~%%'..55>>&&(//66@@T=LT=RRY'*:$&B H$**,'	c-OO4t;<T
 ( tIK#x	3/5KLHy(NC#h.Kckk![) '24O#2#C#CB#GM ''//'*ggll7K-:N:N,NOww~~g&&KK {33FMN

>2I#aOOD)1OONQXXZ]$BCxxz!}/$&--e.?.?.AB%,,-]^ $ &7t%<"KYYX>X!X>?F  $yy2"-# ),	,K 'nn.
U)11#u= /ww||G[6-ABHh$B%
! !
+3t#)>T+3tI &"6"8)209SE$>	*O&
 *,)BO&)0O%!<<7"s'7'76'A%%bggoog&>?%k;? @? "+{;F:@//Hh67%./YcS	YH/??H%%[ N 0  TRST LH  ?$ 
( @? 0sH   X
#X	  X ;X1X6X; (Y$Y!X.-X.;Y
Ya=  
def __PYX_repeat_benchmark(benchmark, timer, size_t number):
    cdef size_t i

    t0 = timer()
    for i in range(number):
        benchmark()
    t1 = timer()
    return t1 - t0

def __PYX_make_benchmark():
    {setup_code}

    def __PYX_run_benchmark():
        {benchmark_code}

    return __PYX_run_benchmark
	   c                   ^^^^^^ SSK nU(       a  [        U5      OSnU R                  5       (       a  [        U 5      OSn U(       a  [        U5      R                  OSn[
        R                  UR                  US5      R                  5       UR                  U S5      R                  5       S9n[        UUUS9n	U	S	   mU	S
   mUUU4S jm[        T" 5       [        5      mT(       a  SOSn
T(       a  U
S-  OU
S-  mUUUU4S jnU" 5         U" 5       n[        U5       Vs/ s H  nT" U5      PM     nnUS-  nU Vs/ s H  nT(       a  UU-   U-  OUU-  PM     nnX4$ s  snf s  snf )at  Benchmark a Cython code string similar to 'timeit'.

'setup_code': string of setup code that will be run before taking the timings.

'import_module': a module namespace to run the benchmark in
                 (usually a compiled Cython module).

'directives': Cython directives to use when compiling the benchmark code.

'timer': The timer function. Defaults to 'time.perf_counter', returning float seconds.
         Nanosecond timers are detected (and can only be used) if they return integers.

'repeat': The number of timings to take and return.

Returns a tuple: (list of single-loop timings, number of loops run for each)
r   Nr   pass    z        )
setup_codebenchmark_code)r   r   __PYX_make_benchmark__PYX_repeat_benchmarkc                    > T" 5       n[         R                  " 5       n[         R                  " 5          T" UTU 5      nU(       a  [         R                  " 5         U$ ! U(       a  [         R                  " 5         f f = fr1   )gc	isenableddisableenable)number	benchmarkgcoldtimingmake_benchmarkrepeat_benchmarktimers       r!   timeitcymeit.<locals>.timeit\  sX    "$	


	%i?F		 		 s   
A A;i ʚ;g      ?   c                     > Sn  S Hb  nX-  nT" U5      n[        UT(       a  [        O[        5      (       d   eUT:  a  Us  $ T(       d  MF  US:  d  MN  US:  d  MV  [        ST 35      e   U S-  n Mo  )Nr   )r   r   r  
   z&Timer seems to return non-ns timings: )rH   rS   re   RuntimeError)ijr   
time_takenmin_runtimer  r  timer_returns_nanosecondss       r!   	autorangecymeit.<locals>.autorangep  s    #F^
!*5NcTYZZZZ,!M..JORT&)OPUw'WXX  GA r#   r   )textwrapr   strip
__import____dict___CYMEIT_TEMPLATEformatindentr   rH   rS   range)rL   r   import_module
directivesr  repeatr  module_namespacecymeit_code	namespace
one_secondr  r   r   timingshalfr   r  r  r  r  r  s       `            @@@@@r!   cymeitr"  1  s   "  5?$Z0BJ(,

t$&D=Jz-099PT"))??:u5;;=tU399; * K #-I 56N !9:
 !+57C 8";J &?*/JQRNK  K[F
 vA 	v  
 Q;D F &?$6!FVOS  
 s   !E!>E&z\Sc                 P   S nU R                  5       nU H=  n[        U5      nU(       d  M  UR                  5       nX5   S:X  a  M1  Ub  X:  d  M;  UnM?     [        U5       H2  u  pc[        U5      nU(       a  U(       a  UWUS-    S:X  a  M,  X1S  X&'   M4     SR	                  U5      $ )N#r   r   )
splitlines_find_non_spacestart	enumerater   )rL   
min_indentlinesliner   r  ixs          r!   r   r     s    JOOE%<3!4J  e$%DDq$9S$@%		 %
 99Ur#   zI^((cdef +(extern|class))|cimport|(from .+ cimport)|(from .+ import +[*]))c                 <   / n/ nUnU R                  SS5      n U R                  S5      nU HI  nUR                  S5      (       d  [        R	                  U5      (       a  UnOUnUR                  U5        MK     SR                  U5      SSR                  U5      -   4$ )N	 r   r   z
    )r   split
startswithmodule_statementr   r   r   )rL   r    functioncurrentr*  r+  s         r!   r   r     s    FHG<<c"DJJtEs##%%d++ "t  99Vfx}}X'>>>>r#   c                 X    U R                  S5      nU S S S:X  a
  SXS-   S  -  $ XS-   S  $ )N:r  lambdaz	return %sr   )index)sourcer,  s     r!   get_bodyr:    s?    	c	BbqzXVqDE]**de}r#   c                        \ rS rSrS rS rSrg)RuntimeCompiledFunctioni  c                 X    Xl         [        [        R                  " U5      5      U l        g r1   )_fr:  r}   	getsource_body)r-   fs     r!   r*    RuntimeCompiledFunction.__init__  s    g//23
r#   c                     [         R                  " U R                  /UQ70 UD6n[        U R                  4U R                  R
                  U R                  R
                  S.UD6$ )N)r   r   )r}   getcallargsr>  r   r@  __globals__)r-   r   r   alls       r!   r9    RuntimeCompiledFunction.__call__  sP    !!$''9D9D9TZZh0C0CTWWM`M`hdghhr#   )r@  r>  N)r;   r<   r=   r>   r*   r9   r?   r   r#   r!   r<  r<    s    4ir#   r<  r1   )NN)Br   r   r}   r   r   rg   timedistutils.corer   r   distutils.command.build_extr   r   Compiler.Mainr   Compiler.Optionsr   r	   r
   Compiler.Visitorr   r   rF   r   Compiler.TreeFragmentr   Dependenciesr   r   r   Cacher   Compilerr   cythonr   importlib.utilr   importlib.machineryr   r"   r%   rO   rW   rT   rx   r{   r   r   r   r   r   r   r   r  perf_counterr"  r   r   searchr&  r   r2  r   r:  r<  r   r#   r!   <module>rW     sZ   	   	 	 
  2 1  #  = ; 6 K K '    3
\#3 
 > > '0    !0!8 3,@
 "-'',,';'=xH&*tU4VZC&R ( !TM^M^gh ]D  **U#**( ::jk ? i ir#   