
    i3                         U d Z ddlZddlZddlmZ ddlmZmZmZm	Z	 i Z
eeeeef   f   ed<    G d d      Zddeeeeeef   f      d	dfd
Zy)z
Lazy import handler for Pinecone.

This module provides a way to lazily load imports that were previously
available via star imports but are no longer imported at the top level.
    N)
ModuleType)DictOptionalTuplecastLAZY_IMPORTSc                   >    e Zd Zd Zed        Zed        Zd Zd Zy)
LazyModulec                 .    || _         || _        i | _        y N)_original_module_lazy_imports_loaded_attrs)selforiginal_modulelazy_importss      m/var/www/catia.catastroantioquia-mas.com/valormas/lib/python3.12/site-packages/pinecone/utils/lazy_imports.py__init__zLazyModule.__init__   s     /)    c                 .    | j                   j                  S r   )r   __doc__)r   s    r   r   zLazyModule.__doc__   s    $$,,,r   c                     | j                   j                  j                         }| j                  j	                         D ]
  \  }}|||<    |S r   )r   __dict__copyr   items)r   	base_dictnamevalues       r   r   zLazyModule.__dict__   sO     ))22779	--335 	$KD%#IdO	$r   c                     t        | j                        }t        | j                  j	                               }t        t        ||z               S r   )dirr   listr   keyssortedset)r   base_dirlazy_dirs      r   __dir__zLazyModule.__dir__(   sD    t,,- **//12 c(X-.//r   c                 p   	 t        | j                  |      S # t        $ r Y nw xY w|| j                  v r]|| j                  vr@| j                  |   \  }}t        j                  |      }t        ||      | j                  |<   | j                  |   S t        d| j                  j                   d| d      )Nzmodule 'z' has no attribute '')getattrr   AttributeErrorr   r   	importlibimport_module__name__)r   r   module_path	item_namemodules        r   __getattr__zLazyModule.__getattr__2   s    	400$77 		 4%%%4---)-););D)A&Y"00=+269+E""4(%%d++x(=(=(F(F'GG[\`[aabcdds    	$$N)	r.   
__module____qualname__r   propertyr   r   r'   r2    r   r   r
   r
      s:     
 - -  0er   r
   r   returnc                     | t         } dt        j                  vryt        j                  d   }t        ||       }t	        t
        |      t        j                  d<   y)z
    Set up the lazy import handler.

    Args:
        lazy_imports: Optional dictionary of imports to handle lazily.
                     If None, uses the default LAZY_IMPORTS dictionary.
    Npinecone)r   sysmodulesr
   r   r   )r   r   proxys      r   setup_lazy_importsr=   D   sS     # $ kk*-O5E #:u5CKK
r   r   )r   r,   r:   typesr   typingr   r   r   r   r   str__annotations__r
   r=   r6   r   r   <module>rB      ss     
  . .,d3c3h'( ,e ,e^6Xd3c3h3G.H%I 6UY 6r   