§
    q�’j0s  ã                  óf  — U d Z ddlmZ ddlZddlZddlZddlZddlmZ ddl	m
Z
 ddlmZ ddlZddlZddlZddlZddlZddlmZ dZi ad	ed
<   i Zded<    eed¦  «        o eej        d¦  «        xZZi Zded<   ddlZd„ ZdZd„ Z d„ Z!ej"        d„ ¦   «         Z#d„ Z$d„ Z%d„ Z&d„ Z'd„ Z(d„ Z)d„ Z*d„ Z+dedfd„Z,dedfd„Z-dedfd„Z.d „ Z/de edfd!„Z0	 d.d"„Z1de fd#„Z2d$„ Z3d%„ Z4d.d&„Z5d'„ Z6 e¦   «          d(„ Z7e8d)k    r¯ddl9Z9	  e9j9        ej:        dd…         d*¦  «        \  Z;Z<n,# e9j=        $ rZ> e?e>¦  «          e7¦   «          Y dZ>[>ndZ>[>ww xY w e@ej:        ¦  «        dk    se<r e? e7¦   «         ¦  «         dZAe;D ]0\  ZBZCeBd+k    r
 e6¦   «          eBd,k    r e5eA¦  «         eBd-k    rdZAŒ/dS dS )/a\  Manages the cache of generated Python code.

Description
  This file manages the cache of generated Python code.  When run from the
  command line, it also provides a number of options for managing that cache.

Implementation
  Each typelib is generated into a filename of format "{guid}x{lcid}x{major}x{minor}.py"

  An external persistant dictionary maps from all known IIDs in all known type libraries
  to the type library itself.

  Thus, whenever Python code knows the IID of an object, it can find the IID, LCID and version of
  the type library which supports it.  Given this information, it can find the Python module
  with the support.

  If necessary, this support can be generated on the fly.

Hacks, to do, etc
  Currently just uses a pickled dictionary, but should used some sort of indexed file.
  Maybe an OLE2 compound file, or a bsddb file?
é    )ÚannotationsN)Úreload)Ú
ModuleType)ÚAnyé   ©ÚCLSIDToClassz$dict[str, tuple[str, int, int, int]]ÚclsidToTypelibz2dict[tuple[str, int, int, int], ModuleType | None]ÚversionRedirectMapÚ
__loader__Úarchivez$dict[tuple[str, int, int, int], Any]ÚdemandGeneratedTypeLibrariesc                 ób   — 	 t          ¦   «          d S # t          $ r t          ¦   «          Y d S w xY w)N)Ú
_LoadDictsÚOSErrorÚRebuild© ó    úFC:\Projects\DSCons\.venv\Lib\site-packages\win32com\client\gencache.pyÚ__init__r   D   s>   € ðÝ‰ŒˆˆˆøÝð ð ð Ý‰	Œ	ˆ	ˆ	ˆ	ˆ	ðøøøs   ‚ ’.­.c                 ó¬  — t           rt          dt          j        z  ¦  «        ‚t	          t
          j                             t          ¦   «         d¦  «        d¦  «        } 	 t          j
        | ¦  «        }|                     t          ¦  «         |                     t          ¦  «         |                      ¦   «          d S # |                      ¦   «          w xY w)Nz.Trying to write to a readonly gencache ('%s')!ú	dicts.datÚwb)Úis_readonlyÚRuntimeErrorÚwin32comÚ__gen_path__ÚopenÚosÚpathÚjoinÚGetGeneratePathÚpickleÚPicklerÚdumpÚpickleVersionr
   Úclose)ÚfÚps     r   Ú
_SaveDictsr*   O   s©   € Ýð 
ÝØ<½xÔ?TÑTñ
ô 
ð 	
õ 	�RŒW�\Š\�/Ñ+Ô+¨[Ñ9Ô9¸4Ñ@Ô@€AðÝŒN˜1ÑÔˆØ	�Š�}ÑÔÐØ	�Š�~ÑÔÐà	�Š‰	Œ	ˆ	ˆ	ˆ	øˆ�Š‰	Œ	ˆ	ˆ	øøøs   ÁAB= Â=Cc                 ó  — t           r½dd l} t          j        }|j        }t
          j                             t          j        d¦  «        }| 	                    |¦  «        r|t          |¦  «        dz   d …         }nd S 	 |                     |¦  «        }n# t          $ r Y d S t          $ r Y d S w xY w|                      |¦  «        }n8t          t
          j                             t          j        d¦  «        d¦  «        }	 t!          j        |¦  «        }|                     ¦   «         }|                     ¦   «         at(                               ¦   «          |                     ¦   «          d S # |                     ¦   «          w xY w)Nr   r   r   Úrb)Úis_zipÚior   r   r   r   r    r!   r   Ú
startswithÚlenÚget_dataÚAttributeErrorr   ÚBytesIOr   r#   Ú	UnpicklerÚloadr
   r   Úclearr'   )r.   ÚloaderÚarc_pathÚ
dicts_pathÚdatar(   r)   Úversions           r   r   r   ]   sg  € åð !IØˆ	ˆ	ˆ	åÔ$ˆØ”>ˆÝ”W—\’\¥(Ô"7¸ÑEÔEˆ
Ø× Ò  Ñ*Ô*ð 	à#¥C¨¡M¤M°AÑ$5Ð$7Ð$7Ô8ˆJˆJð ˆFð	Ø—?’? :Ñ.Ô.ˆDˆDøÝð 	ð 	ð 	àˆFˆFÝð 	ð 	ð 	ð ˆFˆFð	øøøð �JŠJ�tÑÔˆˆõ •”—’�hÔ3°[ÑAÔAÀ4ÑHÔHˆðÝÔ˜QÑÔˆØ—&’&‘(”(ˆàŸš™œˆÝ× Ò Ñ"Ô"Ð"à	�Š‰	Œ	ˆ	ˆ	ˆ	øˆ�Š‰	Œ	ˆ	ˆ	øøøs%   Á<B Â
B,Â	B,Â+B,Ã>AE) Å)E?c              #  ó6  K  — t          j        dd| ¦  «        }t          j        |¦  «        5  t          j        |t           j        ¦  «         	 dV — t          j        |¦  «         n# t          j        |¦  «         w xY w	 ddd¦  «         dS # 1 swxY w Y   dS )z¾Given the output of GetGeneratedFilename, acquire a named mutex for that module

    This is required so that writes (generation) don't interfere with each other and with reads (import)
    NF)Ú
win32eventÚCreateMutexÚ
contextlibÚclosingÚWaitForSingleObjectÚINFINITEÚReleaseMutex)Úmodule_nameÚmutexs     r   ÚModuleMutexrF   ‹   sã   è è € õ Ô" 4¨°Ñ<Ô<€EÝ	Ô	˜EÑ	"Ô	"ð +ð +åÔ& u­jÔ.AÑBÔBÐBð	+ØˆEˆEˆEåÔ# EÑ*Ô*Ð*Ð*ø�JÔ# EÑ*Ô*Ð*Ð*øøøÐ*ð+ð +ð +ñ +ô +ð +ð +ð +ð +ð +ð +ð +øøøð +ð +ð +ð +ð +ð +s)   ­ BÁA'ÁBÁ'A=Á=BÂBÂBc                ól   — t          | ¦  «                             ¦   «         dd…         d|› d|› d|› �z   S )z|Given the clsid, lcid, major and  minor for a type lib, return
    the file name (no extension) providing this support.
    r   éÿÿÿÿÚx)ÚstrÚupper)ÚclsidÚlcidÚmajorÚminors       r   ÚGetGeneratedFileNamerP   ›   sC   € õ ˆu‰:Œ:×ÒÑÔ˜a ˜dÔ#Ð&@¨$Ð&@Ð&@°Ð&@Ð&@¸Ð&@Ð&@Ñ@Ð@r   c                óH   — t          |                      dd¦  «        ¦  «        S )z!Reverse of GetGeneratedFileName()rI   é   )ÚtupleÚsplit)Úfnames    r   ÚSplitGeneratedFileNamerV   ¢   s   € å�—’˜S !Ñ$Ô$Ñ%Ô%Ð%r   c                 óÔ  — t           r
J d¦   «         ‚t          j        t          j        d¬¦  «         t          j                             t          j        d¦  «        } t          j                             | ¦  «        sct          | d¦  «        }| 	                    d¦  «         | 	                    d¦  «         | 	                    d¦  «         | 
                    ¦   «          t          j        S )	zQReturns the name of the path to generate to.
    Checks the directory is OK.
    z1Why do you want the genpath for a readonly store?T)Úexist_okz__init__.pyÚwzK# Generated file - this directory may be deleted to reset the COM cache...
zimport win32com
zRif __path__[:-1] != win32com.__gen_path__: __path__.append(win32com.__gen_path__)
)r   r   Úmakedirsr   r   r    r!   Úexistsr   Úwriter'   )rU   r(   s     r   r"   r"   §   sÌ   € õ ÐOÐOÐOÑOÔOˆ?Ý„K•Ô%°Ð5Ñ5Ô5Ð5ÝŒG�LŠL�Ô.°Ñ>Ô>€EÝŒ7�>Š>˜%Ñ Ô ð 	Ý�˜ÑÔˆØ	�ŠØZñ	
ô 	
ð 	
ð 	
�ŠÐ#Ñ$Ô$Ð$Ø	�ŠØañ	
ô 	
ð 	
ð 	
�Š‰	Œ	ˆ	åÔ Ð r   c                óH   — t          j        | ¦  «        }t          |¦  «        S )zþGet a Python class for a Program ID

    Given a Program ID, return a Python class which wraps the COM object

    Returns the Python class, or None if no module is available.

    Params
    progid -- A COM ProgramID or IID (eg, "Word.Application")
    )Ú
pywintypesÚIIDÚGetClassForCLSID)ÚprogidrL   s     r   ÚGetClassForProgIDrb   ¿   s!   € õ ŒN˜6Ñ"Ô"€EÝ˜EÑ"Ô"Ð"r   c                óâ   — t          | ¦  «        } t          j        | ¦  «        rt          j        | ¦  «        S t	          | ¦  «        }|€dS 	 t          j        | ¦  «        S # t
          $ r Y dS w xY w)zçGet a Python class for a CLSID

    Given a CLSID, return a Python class which wraps the COM object

    Returns the Python class, or None if no module is available.

    Params
    clsid -- A COM CLSID (or string repr of one)
    N)rJ   r	   ÚHasClassÚGetClassÚGetModuleForCLSIDÚKeyError)rL   Úmods     r   r`   r`   Í   s‚   € õ �‰JŒJ€EÝÔ˜UÑ#Ô#ð ,ÝÔ$ UÑ+Ô+Ð+Ý
˜EÑ
"Ô
"€CØ
€{ØˆtðÝÔ$ UÑ+Ô+Ð+øÝð ð ð Øˆtˆtðøøøs   ÁA  Á 
A.Á-A.c                óx   — 	 t          j        | ¦  «        }n# t           j        $ r Y dS w xY wt          |¦  «        S )a  Get a Python module for a Program ID

    Given a Program ID, return a Python module which contains the
    class which wraps the COM object.

    Returns the Python module, or None if no module is available.

    Params
    progid -- A COM ProgramID or IID (eg, "Word.Application")
    N)r^   r_   Ú	com_errorrf   )ra   Úiids     r   ÚGetModuleForProgIDrl   ä   sK   € ðÝŒn˜VÑ$Ô$ˆˆøÝÔð ð ð Øˆtˆtðøøøå˜SÑ!Ô!Ð!s   ‚ —*©*c                ó¨  — t          | ¦  «        }	 t          |         \  }}}}n# t          $ r Y dS w xY w	 t          ||||¦  «        }n# t          $ r d}Y nw xY w|�õ|j                             |¦  «        }|€|j                             |¦  «        }|�½|j        dz   |z   }	 t          |j         
                    d¦  «        d         ¦  «        5  t          |¦  «         ddd¦  «         n# 1 swxY w Y   nH# t          $ r; ||||f}	|	t          v rt          |	         }	ddlm}
 |
                     ||	¦  «         Y nw xY wt           j        |         }|S )a  Get a Python module for a CLSID

    Given a CLSID, return a Python module which contains the
    class which wraps the COM object.

    Returns the Python module, or None if no module is available.

    Params
    progid -- A COM CLSID (ie, not the description)
    Nú.rH   r   ©Úmakepy)rJ   r
   rg   ÚGetModuleForTypelibÚImportErrorÚCLSIDToPackageMapÚgetÚVTablesToPackageMapÚ__name__rF   rT   Ú
__import__r   Ú rp   ÚGenerateChildFromTypeLibSpecÚsysÚmodules)rL   Ú	clsid_strÚtypelibCLSIDrM   rN   rO   rh   Úsub_modÚsub_mod_nameÚinforp   s              r   rf   rf   ö   sé  € õ �E‘
”
€IðÝ+9¸)Ô+DÑ(ˆ�d˜E 5 5øÝð ð ð ØˆtˆtðøøøðÝ! ,°°e¸UÑCÔCˆˆøÝð ð ð Øˆˆˆðøøøà
€ØÔ'×+Ò+¨IÑ6Ô6ˆØˆ?ØÔ-×1Ò1°)Ñ<Ô<ˆGØÐØœ<¨#Ñ-°Ñ7ˆLðCÝ  ¤×!3Ò!3°CÑ!8Ô!8¸Ô!<Ñ=Ô=ð -ð -Ý˜|Ñ,Ô,Ð,ð-ð -ð -ñ -ô -ð -ð -ð -ð -ð -ð -øøøð -ð -ð -ð -øøåð Cð Cð CØ# T¨5°%Ð7�ð Õ7Ð7Ð7Ý7¸Ô=�DØ$Ð$Ð$Ð$Ð$Ð$à×3Ò3°G¸TÑBÔBÐBÐBÐBðCøøøõ ”+˜lÔ+ˆCØ€JsT   ‘$ ¤
2±2¶A	 Á	AÁAÂ#-C8 ÃC,Ã C8 Ã,C0Ã0C8 Ã3C0Ã4C8 Ã8AD=Ä<D=c                ó”   — t          | |||¦  «        }t          |¦  «        }d|j        vrt          | |||¦  «         d|j        v sJ ‚|S )a/  Get a Python module for a type library ID

    Given the CLSID of a typelibrary, return an imported Python module,
    else None

    Params
    typelibCLSID -- IID of the type library.
    major -- Integer major version.
    minor -- Integer minor version
    lcid -- Integer LCID for the library.
    Ú_in_gencache_)rP   Ú
_GetModuleÚ__dict__ÚAddModuleToCache)r}   rM   rN   rO   ÚmodNamerh   s         r   rq   rq   "  s_   € õ # <°°u¸eÑDÔD€GÝ
�WÑ
Ô
€Cð ˜cœlÐ*Ð*Ý˜ t¨U°EÑ:Ô:Ð:Ø #¤,Ð.Ð.Ð.Ð.Ø€Jr   c                ól   — ddl m} |                     | |||f|||¬¦  «         t          | |||¦  «        S )a  Generate support for a type library.

    Given the IID, LCID and version information for a type library, generate
    and import the necessary support files.

    Returns the Python module.  No exceptions are caught.

    Params
    typelibCLSID -- IID of the type library.
    major -- Integer major version.
    minor -- Integer minor version.
    lcid -- Integer LCID for the library.
    progressInstance -- Instance to use as progress indicator, or None to
                        use the GUI progress bar.
    r   ro   ©ÚprogressInstanceÚ
bForDemandÚbBuildHidden)rx   rp   ÚGenerateFromTypeLibSpecrq   )r}   rM   rN   rO   r‰   rŠ   r‹   rp   s           r   ÚMakeModuleForTypelibr�   8  s^   € ð0 ÐÐÐÐÐà
×"Ò"Ø	�t˜U EÐ*Ø)ØØ!ð	 #ñ ô ð õ ˜|¨T°5¸%Ñ@Ô@Ð@r   c                ó  — ddl m} 	 |                     | |t          |¬¦  «         n# t          j        $ r Y dS w xY w|                      ¦   «         }|d         }|d         }|d         }|d         }	t          ||||	¦  «        S )a  Generate support for a type library.

    Given a PyITypeLib interface generate and import the necessary support files.  This is useful
    for getting makepy support for a typelibrary that is not registered - the caller can locate
    and load the type library itself, rather than relying on COM to find it.

    Returns the Python module.

    Params
    typelib_ob -- The type library itself
    progressInstance -- Instance to use as progress indicator, or None to
                        use the GUI progress bar.
    r   ro   rˆ   Nr   é   rR   )rx   rp   rŒ   ÚbForDemandDefaultr^   rj   Ú
GetLibAttrrq   )
Ú
typelib_obr‰   rŠ   r‹   rp   ÚtlaÚguidrM   rN   rO   s
             r   ÚMakeModuleForTypelibInterfacer•   [  s¹   € ð  ÐÐÐÐÐðØ×&Ò&ØØ-Ý(Ø%ð	 	'ñ 	
ô 	
ð 	
ð 	
øõ Ôð ð ð Øˆtˆtðøøøà
×
Ò
Ñ
!Ô
!€CØˆqŒ6€DØˆqŒ6€DØ�ŒF€EØ�ŒF€EÝ˜t T¨5°%Ñ8Ô8Ð8s   ˆ' §:¹:c                ó  — |                       ¦   «         }|d         }|d         }|d         }|d         }|r| t          t          |¦  «        |||f<   	 t          ||||¦  «        S # t          $ r Y nw xY wt          | |||¦  «        S )a3  Check we have support for a type library, generating if not.

    Given a PyITypeLib interface generate and import the necessary
    support files if necessary. This is useful for getting makepy support
    for a typelibrary that is not registered - the caller can locate and
    load the type library itself, rather than relying on COM to find it.

    Returns the Python module.

    Params
    typelib_ob -- The type library itself
    progressInstance -- Instance to use as progress indicator, or None to
                        use the GUI progress bar.
    r   r   r�   rR   )r‘   r   rJ   rq   rr   r•   )	r’   r‰   rŠ   r‹   r“   r”   rM   rN   rO   s	            r   ÚEnsureModuleForTypelibInterfacer—   ~  sµ   € ð" ×
Ò
Ñ
!Ô
!€CØˆqŒ6€DØˆqŒ6€DØ�ŒF€EØ�ŒF€Eð ð SØHRÕ$¥c¨$¡i¤i°°u¸eÐ%DÑEðÝ" 4¨¨u°eÑ<Ô<Ð<øÝð ð ð Øˆðøøøõ )ØÐ$ j°,ñô ð s   ÁA% Á%
A2Á1A2c                óf  — |                       ¦   «         }|d         }|d         }|d         }|d         }t          |¦  «        |||f}	 t          |= n2# t          $ r% t	          d                     |¦  «        ¦  «         Y nw xY wt                               ¦   «         D ]\  }}||k    rt          |= ŒdS )zdDrop any references to a typelib previously added with EnsureModuleForTypelibInterface and forDemandr   r   r�   rR   zZForgetAboutTypelibInterface:: Warning - type library with info {} is not being remembered!N)r‘   rJ   r   rg   ÚprintÚformatr   Úitems)	r’   r“   r”   rM   rN   rO   r€   ÚkeyÚvals	            r   ÚForgetAboutTypelibInterfacerž   £  så   € à
×
Ò
Ñ
!Ô
!€CØˆqŒ6€DØˆqŒ6€DØ�ŒF€EØ�ŒF€EÝˆt‰9Œ9�d˜E 5Ð(€Dð
Ý(¨Ð.Ð.øÝð 
ð 
ð 
åØh×oÒoØñô ñ	
ô 	
ð 	
ð 	
ð 	
ð
øøøõ '×,Ò,Ñ.Ô.ð (ð (‰ˆˆSØ�$Š;ˆ;Ý" 3Ð'øð(ð (s   Á	A Á,BÂ Bc           	     ó€	  — d}	 	 t          | |||¦  «        }	n¨# t          $ r› d}		 t          j        | |||¦  «                             ¦   «         }
|
d         |k    s|
d         |k    r>	 t          | |
d         |
d         |
d         ¦  «        }	n# t          $ r |
d         }Y nw xY wn# t          j        $ r Y nw xY wY nw xY w|	�å|rãt          r
J d¦   «         ‚	 t          j        | |||¦  «        }|                     d¦  «        }t          t          j        dd¦  «        }|sG	 |                     t          j        ¦   «         ¦  «        }n# t          $ r t!          |¦  «        }Y nw xY wt          j        | |||¦  «                             ¦   «         }n# t          j        $ r d}Y nw xY w|	��ã|�ràt          r
J d¦   «         ‚d	                     t%          ¦   «         t'          | |||¦  «        ¦  «        }|d
z   }|d
z   }	 |dz  }ddlm} |	j        |d         k    s|j        |	j        k    r‘	 t          j        |¦  «         n# t2          $ r Y nw xY w	 t          j        |¦  «         n# t2          $ r Y nw xY wt          j                             |¦  «        rddl}|                     |¦  «         |d         }d}	d}nÕ|	j        }d	                     t%          ¦   «         t'          | |||¦  «        ¦  «        }|d
z   }|dz   }d}	 t          j        |¦  «        d         }d}nL# t2          $ r?}	 t          j        |¦  «        d         }d}n# t2          $ r
}Y d}~nd}~ww xY wY d}~nd}~ww xY wt          j        |¦  «        d         }|r
||k    rd}d}	n# t          t2          f$ r d}	Y nw xY w|	�€t          rÔt!          | ¦  «        |||f}	 t<          |         S # t>          $ r Y nw xY wg }tA          ¦   «         D ]M}|d         |d         k    r9|d         |d         k    r'|d         |d         k    r| !                    |¦  «         ŒN|r5| "                    ¦   «          |d         d         }t          | |||¦  «        }nd}|t<          |<   |S tG          | ||||||¬¦  «        }	|r!tI          |	¦  «        }	tK          | |||¦  «         |	S )a  Ensure Python support is loaded for a type library, generating if necessary.

    Given the IID, LCID and version information for a type library, check and if
    necessary (re)generate, then import the necessary support files. If we regenerate the file, there
    is no way to totally snuff out all instances of the old module in Python, and thus we will regenerate the file more than necessary,
    unless makepy/genpy is modified accordingly.


    Returns the Python module.  No exceptions are caught during the generate process.

    Params
    typelibCLSID -- IID of the type library.
    major -- Integer major version.
    minor -- Integer minor version
    lcid -- Integer LCID for the library.
    progressInstance -- Instance to use as progress indicator, or None to
                        use the GUI progress bar.
    bValidateFile -- Whether or not to perform cache validation or not
    bForDemand -- Should a complete generation happen now, or on demand?
    bBuildHidden -- Should hidden members/attributes etc be generated?
    r   Nr   rR   r�   z&Can't validate in a read-only gencacheú Úsupports_unicode_filenamesz{}\{}ú.pyTÚcÚo)Úgenpyz.pycé   é   rH   )rŠ   r‹   )&rq   rr   Ú	pythoncomÚLoadRegTypeLibr‘   rj   r   ÚQueryPathOfRegTypeLibÚremovesuffixÚgetattrr   r    Úencoderz   Úgetfilesystemencodingr2   rJ   rš   r"   rP   rx   r¥   ÚMinorVersionÚmakepy_versionÚunlinkr   ÚisdirÚshutilÚrmtreeÚstatr   rg   ÚGetGeneratedInfosÚappendÚsortr�   r   r…   )r}   rM   rN   rO   r‰   ÚbValidateFilerŠ   r‹   ÚbReloadNeededÚmoduleÚtlbAttrÚ
typLibPathÚsufÚtlbAttributesÚfilePathPrefixÚfilePathÚfilePathPycr¥   r³   ÚfModTimeSetÚ	pyModTimeÚeÚtypLibModTimerœ   r›   ÚdescÚ	new_minorÚrets                               r   ÚEnsureModulerÊ   º  s&  € ð> €Mðuð	Ý(¨°t¸UÀEÑJÔJˆFˆFøÝð 	ð 	ð 	ð
 ˆFðÝ#Ô2Ø  %¨°ñô ç’*‘,”,ð ð
 ˜1”: Ò%Ð%¨°¬°uÒ)<Ð)<ð+Ý!4Ø(¨'°!¬*°g¸a´jÀ'È!Ä*ñ"ô "˜˜øõ 'ð +ð +ð +ð !(¨¤
˜˜˜ð+øøøøøõ
 Ô&ð ð ð à�ðøøøøøð/	øøøð4 Ð -ÐÝ"ÐLÐLÐ$LÑLÔL�?ð"Ý&Ô<Ø  %¨°ñô �
ð (×4Ò4°TÑ:Ô:�
Ý�bœgÐ'CÀQÑGÔG�Øð 5ð5Ø%/×%6Ò%6µsÔ7PÑ7RÔ7RÑ%SÔ%S˜
˜
øÝ)ð 5ð 5ð 5Ý%(¨¡_¤_˜
˜
˜
ð5øøøå )Ô 8Ø  %¨°ñ!ô !ç’*‘,”,ð �øõ Ô&ð "ð "ð "ð !"���ð	"øøøð
 Ñ -ÑÝ"ÐLÐLÐ$LÑLÔL�?Ø%Ÿ_š_ÝÑ!Ô!Ý$ \°4¸ÀÑFÔFñô ˆNð &¨Ñ-ˆHØ(¨5Ñ0ˆKð#Ø˜sÑ"�ð
  ÐÐÐÐÐð Ô# }°QÔ'7Ò7Ð7ØÔ'¨6Ô+@Ò@Ð@ðÝ”I˜hÑ'Ô'Ð'Ð'øÝð ð ð Ø�DðøøøðÝ”I˜kÑ*Ô*Ð*Ð*øÝð ð ð Ø�Dðøøøå”7—=’= Ñ0Ô0ð 2Ø!�M�M�Mà—M’M .Ñ1Ô1Ð1Ø% aÔ(�Ø�Ø !��àÔ+�Ø!)§¢Ý#Ñ%Ô%Ý(¨°t¸UÀEÑJÔJñ"ô "�ð *¨EÑ1�Ø,¨vÑ5�à�ð
Ý "¤¨Ñ 1Ô 1°!Ô 4�IØ"#�K�KøÝð ð ð ðÝ$&¤G¨KÑ$8Ô$8¸Ô$;˜	Ø&'˜˜øÝ"ð ð ð Ø˜˜˜˜øøøøðøøøøøøøøøøøøðøøøõ !#¤¨
Ñ 3Ô 3°AÔ 6�Øð " M°IÒ$=Ð$=Ø$%�MØ!�FøøÝ�Ð!ð ð ð Øˆˆˆðøøøà�~õ ð 	Ý�lÑ#Ô# T¨5°%Ð7ˆCðÝ)¨#Ô.Ð.øÝð ð ð Ø�ðøøøð ˆEÝ)Ñ+Ô+ð 'ð '�Ø�q”6˜T !œWÒ$Ð$¨¨Q¬°4¸´7Ò):Ð):¸sÀ1¼vÈÈaÌÒ?PÐ?PØ—L’L Ñ&Ô&Ð&øØð ð —
’
‘”�Ø! "œI aœL�	Ý)¨,¸¸eÀYÑOÔO��à�à&)Õ˜sÑ#ØˆJå%ØØØØØØ!Ø%ð
ñ 
ô 
ˆð ð 	?Ý˜F‘^”^ˆFÝ˜\¨4°¸Ñ>Ô>Ð>Ø€Msa  … —N ˜B=¥AB%Á'$BÂB%ÂB!ÂB%Â B!Â!B%Â$B=Â%B7Â4B=Â6B7Â7B=Â:N Â<B=Â=N ÃA	F Ä &E ÅF ÅE#Å F Å"E#Å#,F ÆN ÆF$Æ!N Æ#F$Æ$BN È(H= È<N È=
I
ÉN É	I
É
N ÉI# É"N É#
I0É-N É/I0É0BN Ë>L ÌN Ì
M$Ì&MÍMÍ
MÍMÍMÍMÍN ÍM$Í$)N ÎN$Î#N$ÏO Ï
OÏOc                óD  — t           j                             | ¦  «        }t          |d¦  «        sð	 |j                             ¦   «         }|                     ¦   «         d         }|                     ¦   «         \  }}|                     ¦   «         }t          |d         |d         |d         |d         |¬¦  «        }t          |¦  «         ddlm}	  |	j        t          |¦  «        ¦  «        }
 |
|j        ¦  «        }n"# t          j        $ r t#          d¦  «        ‚w xY w|S )	zYGiven a COM prog_id, return an object that is using makepy support, building if necessaryÚCLSIDr   r   r�   rR   )rŠ   r   z`This COM object can not automate the makepy process - please run makepy manually for this object)r   ÚclientÚDispatchÚhasattrÚ_oleobj_ÚGetTypeInfoÚGetTypeAttrÚGetContainingTypeLibr‘   rÊ   rf   rx   r	   re   rJ   r¨   rj   Ú	TypeError)Úprog_idrŠ   ÚdispÚtiÚ
disp_clsidÚtlbÚindexr“   rh   r	   Ú
disp_classs              r   ÚEnsureDispatchrÜ   |  s(  € õ Œ?×#Ò# GÑ,Ô,€DÝ�4˜Ñ!Ô!ð ð	Ø”×*Ò*Ñ,Ô,ˆBØŸšÑ)Ô)¨!Ô,ˆJØ×0Ò0Ñ2Ô2‰JˆC�Ø—.’.Ñ"Ô"ˆCÝ˜s 1œv s¨1¤v¨s°1¬v°s¸1´vÈ*ÐUÑUÔUˆCÝ˜jÑ)Ô)Ð)à&Ð&Ð&Ð&Ð&Ð&à.˜Ô.­s°:©¬Ñ?Ô?ˆJØ�:˜dœmÑ,Ô,ˆDˆDøÝÔ"ð 	ð 	ð 	ÝØrñô ð ð	øøøð €Ks   ±CC> Ã>Dc                ó^  ‡	‡
— t          | |||¦  «        }t          |¦  «        }d|_        t          | ¦  «        |||fŠ
dŠ	ˆ	ˆ
fd„} ||j        ¦  «          ||j        ¦  «          ||j        ¦  «          ||j        ¦  «         ‰
t          v rt          ‰
= |r‰	rt          ¦   «          dS dS dS )z3Add a newly generated file to the cache dictionary.r   Fc                óf   •— | D ],}t                                |¦  «        ‰k    r‰t           |<   dŠŒ-d S )NT)r
   rt   )ÚdictrL   Údict_modifiedr€   s     €€r   ÚSetTypelibForAllClsidsz0AddModuleToCache.<locals>.SetTypelibForAllClsids¡  sE   ø€ àð 	%ð 	%ˆEÝ×!Ò! %Ñ(Ô(¨DÒ0Ð0Ø(,•˜uÑ%Ø $�øð	%ð 	%r   N)
rP   rƒ   r‚   rJ   ÚCLSIDToClassMaprs   ÚVTablesToClassMapru   r   r*   )ÚtypelibclsidrM   rN   rO   ÚverboseÚ	bFlushNowrU   rh   rá   rà   r€   s            @@r   r…   r…   •  s  øø€ õ ! ¨t°U¸EÑBÔB€EÝ
�UÑ
Ô
€Cð €CÔÝˆ|ÑÔ˜d E¨5Ð0€DØ€Mð%ð %ð %ð %ð %ð %ð Ð˜3Ô.Ñ/Ô/Ð/ØÐ˜3Ô0Ñ1Ô1Ð1ØÐ˜3Ô0Ñ1Ô1Ð1ØÐ˜3Ô2Ñ3Ô3Ð3ð Õ!Ð!Ð!Ý˜tÐ$Øð �]ð Ý‰Œˆˆˆðð ð ð r   c                 ó  — t           j                             d¦  «        } | dk    �rˆdd l}t           j        d | dz   …         }t           j        | dz   d …                              dd¦  «        }|                     |¦  «        }t          ¦   «         }|                     ¦   «         D ]ç}|                     |¦  «        sŒ|t          |¦  «        dz   d …          
                    d¦  «        d         }	 | 
                    d¦  «        \  }}	}
}t          |	¦  «        }	t          |
¦  «        }
t          |¦  «        }t          j        d	|z   d
z   ¦  «        }n # t          $ r Y Œºt          j        $ r Y ŒÊw xY w|                     ||	|
|f¦  «         Œè|                     ¦   «          t%          |¦  «        S t'          j        t           j        dz   ¦  «        }g }|D �]2}t(          j                             |¦  «        s*t(          j                             |¦  «        d         dk    sŒLt(          j                             t(          j         
                    |¦  «        d         ¦  «        d         }	 | 
                    d¦  «        \  }}	}
}t          j        d	|z   d
z   ¦  «        }t          |	¦  «        }	t          |
¦  «        }
t          |¦  «        }n"# t          $ r Y �Œt          j        $ r Y �Œw xY w|                     ||	|
|f¦  «         �Œ4|S )Nz.zip\r   rR   é   ú\ú/r   rI   ú{ú}z\*r¢   )r   r   ÚfindÚzipfileÚreplaceÚZipFileÚsetÚnamelistr/   r0   rT   Úintr^   r_   Ú
ValueErrorrj   Úaddr'   ÚlistÚglobr   r    r²   Úsplitextr·   )Úzip_posrî   Úzip_fileÚzip_pathÚzfÚinfosÚnÚbaserk   rM   rN   rO   ÚfilesrÉ   ÚfileÚnames                   r   r¶   r¶   ´  sì  € ÝÔ#×(Ò(¨Ñ2Ô2€GØ�!‚|�|ØˆˆˆåÔ(¨¨7°Q©;¨Ô7ˆÝÔ(¨°1©¨¨Ô7×?Ò?ÀÀcÑJÔJˆØ�_Š_˜XÑ&Ô&ˆÝ‘”ˆØ—’‘”ð 	1ð 	1ˆAØ—<’< Ñ)Ô)ð ØØ•S˜‘]”] QÑ&Ð(Ð(Ô)×/Ò/°Ñ4Ô4°QÔ7ˆDð
Ø*.¯*ª*°S©/¬/Ñ'��T˜5 %Ý˜4‘y”y�Ý˜E™
œ
�Ý˜E™
œ
�Ý ”n S¨3¡Y°¡_Ñ5Ô5��øÝð ð ð Ø�ÝÔ'ð ð ð à�ðøøøð �IŠI�s˜D %¨Ð/Ñ0Ô0Ð0Ð0Ø
�Š‰
Œ
ˆ
Ý�E‰{Œ{Ðõ ”	�(Ô/°%Ñ7Ñ8Ô8ˆØˆØð 	2ñ 	2ˆDÝ”7—=’= Ñ&Ô&ð ­r¬w×/?Ò/?ÀÑ/EÔ/EÀaÔ/HÈEÒ/QÐ/QØÝ”7×#Ò#¥B¤G§M¢M°$Ñ$7Ô$7¸Ô$:Ñ;Ô;¸AÔ>ˆDð
Ø*.¯*ª*°S©/¬/Ñ'��T˜5 %Ý ”n S¨3¡Y°¡_Ñ5Ô5�Ý˜4‘y”y�Ý˜E™
œ
�Ý˜E™
œ
��øÝð ð ð Ø‘ÝÔ'ð ð ð à‘ðøøøð �JŠJ˜˜T 5¨%Ð0Ñ1Ô1Ð1Ñ1Øˆ
s2   Ã0A!EÅ
E/ÅE/Å.E/É)A!KË
K*ËK*Ë)K*c                óœ   — d| z  }t          | ¦  «        5  t          |¦  «         ddd¦  «         n# 1 swxY w Y   t          j        |         S )zIGiven the name of a module in the gen_py directory, import and return it.zwin32com.gen_py.%sN)rF   rw   rz   r{   )rU   Úmod_names     r   rƒ   rƒ   æ  sŠ   € à# eÑ+€HÝ	�UÑ	Ô	ð ð Ý�8ÑÔÐðð ð ñ ô ð ð ð ð ð ð øøøð ð ð ð åŒ;�xÔ Ð s   •1±5¸5c           
     ó  — t                                ¦   «          t          ¦   «         }| rt          |¦  «        rt	          d¦  «         |D ]�}|\  }}}}| rt	          dt          |Ž ¦  «         	 t          ||||| d¦  «         Œ8#  t	          d                     |t          j	        ¦   «         d         t          j	        ¦   «         d         ¦  «        ¦  «         Y ŒŽxY w| rt          |¦  «        rt	          d¦  «         t          ¦   «          dS )z/Rebuild the cache indexes from the file system.z6Rebuilding cache of generated files for COM support...ÚCheckingr   z Could not add module {} - {}: {}r   zDone.N)r
   r6   r¶   r0   r™   rP   r…   rš   rz   Úexc_infor*   )rå   rý   r€   rk   rM   rN   rO   s          r   r   r   î  s$  € å×ÒÑÔÐÝÑÔ€EØð H•3�u‘:”:ð HÝÐFÑGÔGÐGØð ð ˆØ"&ÑˆˆT�5˜%Øð 	;Ý�*Õ2°DÐ9Ñ:Ô:Ð:ð	Ý˜S $¨¨u°g¸qÑAÔAÐAÐAøð	ÝØ2×9Ò9Ø�#œ,™.œ.¨Ô+­S¬\©^¬^¸AÔ->ñô ñô ð ð ð øøøð
 ð •3�u‘:”:ð Ýˆg‰ŒˆÝ�L„L€L€L€Ls   Á-BÂACc                 óð   — t          dt          j        ¦  «         t          t                               ¦   «         ¦  «        } | D ]2\  }}}}t          ||||¦  «        }t          |j        › d|› �¦  «         Œ3d S )NzCache is in directoryz - )r™   r   r   rñ   r
   Úvaluesrq   Ú__doc__)Údr}   rM   rN   rO   rh   s         r   Ú_Dumpr    s…   € Ý	Ð
!¥8Ô#8Ñ9Ô9Ð9å�N×!Ò!Ñ#Ô#Ñ$Ô$€AØ,-ð 1ð 1Ñ(ˆ�d˜E 5Ý! ,°°e¸UÑCÔCˆÝ�”Ð/Ð/ Ð/Ð/Ñ0Ô0Ð0Ð0ð1ð 1r   c                 óP   — d} t          | ¦  «         t          j        d¦  «         d S )Nzî      Usage: gencache [-q] [-d] [-r]

             -q         - Quiet
             -d         - Dump the cache (typelibrary description and filename).
             -r         - Rebuild the cache dictionary from the existing .py files
    r   )r™   rz   Úexit)ÚusageStrings    r   Úusager    s*   € ð€Kõ 
ˆ+ÑÔÐÝ„HˆQ�K„K€K€K€Kr   Ú__main__Úqrdz-dz-rz-q)r   )Dr
  Ú
__future__r   r?   r÷   r   rz   Ú	importlibr   Útypesr   Útypingr   r¨   r^   r   Úwin32com.clientr=   rx   r	   r�   r
   Ú__annotations__r   rÏ   r   r   r-   r   r#   r   r&   r*   r   ÚcontextmanagerrF   rP   rV   r"   rb   r`   rl   rf   rq   r�   r•   r—   rž   rÊ   rÜ   r…   r¶   rƒ   r   r  r  rv   ÚgetoptÚargvÚoptsÚargsÚerrorÚmessager™   r0   rå   Úoptr�   r   r   r   ú<module>r!     si  ððð ð ð. #Ð "Ð "Ð "Ð "Ð "à Ð Ð Ð Ø €€€Ø 	€	€	€	Ø 
€
€
€
Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð à Ð Ð Ð Ø Ð Ð Ð Ø €€€Ø Ð Ð Ð Ø Ð Ð Ð à Ð Ð Ð Ð Ð àÐ ð 8:€Ð 9Ð 9Ð 9Ñ 9ð JLÐ Ð KÐ KÐ KÑ Kð �w˜x¨Ñ6Ô6ð ¸7¸7ØÔ˜ñ<ô <ð €ˆfð FHÐ Ð GÐ GÐ GÑ Gà €€€ðð ð ð €ðð ð ð+ð +ð +ð\ Ôð+ð +ñ Ôð+ðAð Að Að&ð &ð &ð
!ð !ð !ð0#ð #ð #ðð ð ð."ð "ð "ð$)ð )ð )ðXð ð ð6 Ø Øð Að  Að  Að  AðH "&Ð2CÐRSð 9ð  9ð  9ð  9ðH "&Ð2CÐRSð"ð "ð "ð "ðJ(ð (ð (ð8 Ø!�/Ø Øðð ð ð ðF ðð ð ð ð4 /0¸{¸?ðð ð ð ð>/ð /ð /ðd!ð !ð !ðð ð ð ð.1ð 1ð 1ð 	€�
„
€
ð	ð 	ð 	ð ˆzÒÐØ€M€M€MðØ"�V”] 3¤8¨A¨B¨B¤<°Ñ7Ô7‰
ˆˆdˆdøØŒ<ð ð ð Øˆˆg‰ŒˆØˆ‰Œˆˆˆˆˆˆøøøøðøøøð
 €sˆ3Œ8�}„}˜ÒÐ˜TÐØˆˆeˆe‰gŒg‰Œˆà€GØð ð ‰ˆˆSØ�$Š;ˆ;ØˆE‰GŒGˆGØ�$Š;ˆ;ØˆG�GÑÔÐØ�$Š;ˆ;ØˆGøð) Ððð s   Ä!D' Ä'
EÄ1EÅE