Ë
    {D™jA  ã                  ó
  — U d Z ddlmZ ddlZddlZddlmZ ddlmZ ddl	m
Z
mZ ddlmZ e
rdd	lmZ d
Zded<    G d„ de«      Zd$d„Zd%d„Zd$d„ZddddddddddddœZded<   ed&d „«       Zd$d!„Zd&d"„Z e«       Zd$d#„ZdgZy)'zWindows.é    )ÚannotationsN)Úcache)ÚPath)ÚTYPE_CHECKINGÚFinalé   )ÚPlatformDirsABC)ÚCallablei @  z
Final[int]Ú_KF_FLAG_DONT_VERIFYc                  ó  — e Zd ZdZed d„«       Zddœd!d„Zed d„«       Zed d„«       Zed d„«       Z	ed d	„«       Z
ed d
„«       Zed d„«       Zed d„«       Zed d„«       Zed d„«       Zed d„«       Zed d„«       Zed d„«       Zed d„«       Zed d„«       Zed d„«       Zed d„«       Zed d„«       Zed d„«       Zed d„«       Zed d„«       Zed d„«       Zed d„«       Zed d„«       Zed d„«       Zed d„«       Zed d„«       Z y)"ÚWindowsaë  `MSDN on where to store app data files <https://learn.microsoft.com/en-us/windows/win32/shell/knownfolderid>`_.

    Makes use of the `appname <platformdirs.api.PlatformDirsABC.appname>`, `appauthor
    <platformdirs.api.PlatformDirsABC.appauthor>`, `version <platformdirs.api.PlatformDirsABC.version>`, `roaming
    <platformdirs.api.PlatformDirsABC.roaming>`, `opinion <platformdirs.api.PlatformDirsABC.opinion>`, `ensure_exists
    <platformdirs.api.PlatformDirsABC.ensure_exists>`.

    c                ó”   — | j                   rdnd}t        j                  j                  t	        |«      «      }| j                  |«      S )z«Data directory tied to the user, e.g. ``%USERPROFILE%\AppData\Local\$appauthor\$appname`` (not roaming) or ``%USERPROFILE%\AppData\Roaming\$appauthor\$appname`` (roaming).ÚCSIDL_APPDATAÚCSIDL_LOCAL_APPDATA)ÚroamingÚosÚpathÚnormpathÚget_win_folderÚ_append_parts)ÚselfÚconstr   s      ú`/var/www/html/Astrologybackend/backend/venv/lib/python3.12/site-packages/platformdirs/windows.pyÚuser_data_dirzWindows.user_data_dir   s<   € ð $(§<¢<‘Ð5JˆÜ�w‰w×Ñ¤¨uÓ 5Ó6ˆØ×!Ñ! $Ó'Ð'ó    N©Úopinion_valuec               ó¸  — g }| j                   rš| j                  dur+| j                  xs | j                   }|j                  |«       |j                  | j                   «       |�| j                  r|j                  |«       | j                  r|j                  | j                  «       t        j                  j                  |g|¢­Ž }| j                  |«       |S )NF)	ÚappnameÚ	appauthorÚappendÚopinionÚversionr   r   ÚjoinÚ_optionally_create_directory)r   r   r   ÚparamsÚauthors        r   r   zWindows._append_parts%   s¡   € ØˆØ�<Š<Ø�~‰~ UÑ*ØŸ™Ò7¨4¯<©<�Ø—‘˜fÔ%Ø�M‰M˜$Ÿ,™,Ô'ØÐ(¨T¯\ª\Ø—‘˜mÔ,Ø�|Š|Ø—‘˜dŸl™lÔ+Ü�w‰w�|‰|˜DÐ* 6Ò*ˆØ×)Ñ)¨$Ô/Øˆr   c                ót   — t         j                  j                  t        d«      «      }| j	                  |«      S )zLData directory shared by users, e.g. ``C:\ProgramData\$appauthor\$appname``.ÚCSIDL_COMMON_APPDATA©r   r   r   r   r   ©r   r   s     r   Úsite_data_dirzWindows.site_data_dir4   s/   € ô �w‰w×Ñ¤Ð/EÓ FÓGˆØ×!Ñ! $Ó'Ð'r   c                ó   — | j                   S )z;Config directory tied to the user, same as `user_data_dir`.©r   ©r   s    r   Úuser_config_dirzWindows.user_config_dir:   ó   € ð ×!Ñ!Ð!r   c                ó   — | j                   S )z:Config directory shared by users, same as `site_data_dir`.©r,   r/   s    r   Úsite_config_dirzWindows.site_config_dir?   r1   r   c                óx   — t         j                  j                  t        d«      «      }| j	                  |d¬«      S )z¤Cache directory tied to the user (if opinionated with ``Cache`` folder within ``$appname``) e.g. ``%USERPROFILE%\AppData\Local\$appauthor\$appname\Cache\$version``.r   ÚCacher   r*   r+   s     r   Úuser_cache_dirzWindows.user_cache_dirD   s4   € ô �w‰w×Ñ¤Ð/DÓ EÓFˆØ×!Ñ! $°gÐ!Ó>Ð>r   c                óx   — t         j                  j                  t        d«      «      }| j	                  |d¬«      S )z\Cache directory shared by users, e.g. ``C:\ProgramData\$appauthor\$appname\Cache\$version``.r)   r6   r   r*   r+   s     r   Úsite_cache_dirzWindows.site_cache_dirJ   s4   € ô �w‰w×Ñ¤Ð/EÓ FÓGˆØ×!Ñ! $°gÐ!Ó>Ð>r   c                ó   — | j                   S )z:State directory tied to the user, same as `user_data_dir`.r.   r/   s    r   Úuser_state_dirzWindows.user_state_dirP   r1   r   c                ó   — | j                   S )z9State directory shared by users, same as `site_data_dir`.r3   r/   s    r   Úsite_state_dirzWindows.site_state_dirU   r1   r   c                ó˜   — | j                   }| j                  r1t        j                  j	                  |d«      }| j                  |«       |S )z_Log directory tied to the user, same as `user_data_dir` if not opinionated else ``Logs`` in it.ÚLogs)r   r"   r   r   r$   r%   r+   s     r   Úuser_log_dirzWindows.user_log_dirZ   ó=   € ð ×!Ñ!ˆØ�<Š<Ü—7‘7—<‘<  fÓ-ˆDØ×-Ñ-¨dÔ3Øˆr   c                ó˜   — | j                   }| j                  r1t        j                  j	                  |d«      }| j                  |«       |S )z^Log directory shared by users, same as `site_data_dir` if not opinionated else ``Logs`` in it.r?   )r,   r"   r   r   r$   r%   r+   s     r   Úsite_log_dirzWindows.site_log_dirc   rA   r   c                óR   — t         j                  j                  t        d«      «      S )zFDocuments directory tied to the user e.g. ``%USERPROFILE%\Documents``.ÚCSIDL_PERSONAL©r   r   r   r   r/   s    r   Úuser_documents_dirzWindows.user_documents_dirl   ó   € ô �w‰w×Ñ¤Ð/?Ó @ÓAÐAr   c                óR   — t         j                  j                  t        d«      «      S )zFDownloads directory tied to the user e.g. ``%USERPROFILE%\Downloads``.ÚCSIDL_DOWNLOADSrF   r/   s    r   Úuser_downloads_dirzWindows.user_downloads_dirq   s   € ô �w‰w×Ñ¤Ð/@Ó AÓBÐBr   c                óR   — t         j                  j                  t        d«      «      S )zDPictures directory tied to the user e.g. ``%USERPROFILE%\Pictures``.ÚCSIDL_MYPICTURESrF   r/   s    r   Úuser_pictures_dirzWindows.user_pictures_dirv   s   € ô �w‰w×Ñ¤Ð/AÓ BÓCÐCr   c                óR   — t         j                  j                  t        d«      «      S )z@Videos directory tied to the user e.g. ``%USERPROFILE%\Videos``.ÚCSIDL_MYVIDEOrF   r/   s    r   Úuser_videos_dirzWindows.user_videos_dir{   ó   € ô �w‰w×Ñ¤¨Ó ?Ó@Ð@r   c                óR   — t         j                  j                  t        d«      «      S )z>Music directory tied to the user e.g. ``%USERPROFILE%\Music``.ÚCSIDL_MYMUSICrF   r/   s    r   Úuser_music_dirzWindows.user_music_dir€   rR   r   c                óR   — t         j                  j                  t        d«      «      S )zCDesktop directory tied to the user, e.g. ``%USERPROFILE%\Desktop``.ÚCSIDL_DESKTOPDIRECTORYrF   r/   s    r   Úuser_desktop_dirzWindows.user_desktop_dir…   s   € ô �w‰w×Ñ¤Ð/GÓ HÓIÐIr   c                óz   — t         j                  j                  t         j                  j                  d«      «      S )zEProjects directory tied to the user, e.g. ``%USERPROFILE%\Projects``.z
~/Projects)r   r   r   Ú
expanduserr/   s    r   Úuser_projects_dirzWindows.user_projects_dirŠ   s(   € ô �w‰w×Ñ¤§¡× 2Ñ 2°<Ó @ÓAÐAr   c           
     óÖ   — t         j                  j                  t         j                  j	                  dt        t        d«      j                  «       j                  dz  «      «      «      S )z0Public share directory e.g. ``C:\Users\Public``.ÚPUBLICú~ÚPublic)	r   r   r   ÚenvironÚgetÚstrr   rZ   Úparentr/   s    r   Úuser_publicshare_dirzWindows.user_publicshare_dir�   sF   € ô �w‰w×Ñ¤§
¡
§¡¨x¼¼TÀ#»Y×=QÑ=QÓ=S×=ZÑ=ZÐ]eÑ=eÓ9fÓ gÓhÐhr   c           	     óˆ   — t         j                  j                  t        t	        t        d«      «      dz  dz  dz  «      «      S )zTTemplates directory tied to the user e.g. ``%APPDATA%\Microsoft\Windows\Templates``.r   Ú	Microsoftr   Ú	Templates©r   r   r   rb   r   r   r/   s    r   Úuser_templates_dirzWindows.user_templates_dir”   s9   € ô �w‰w×Ñ¤¤D¬¸Ó)HÓ$IÈKÑ$WÐZcÑ$cÐfqÑ$qÓ rÓsÐsr   c           	     óˆ   — t         j                  j                  t        t	        t        d«      «      dz  dz  dz  «      «      S )zQFonts directory tied to the user e.g. ``%LOCALAPPDATA%\Microsoft\Windows\Fonts``.r   rf   r   ÚFontsrh   r/   s    r   Úuser_fonts_dirzWindows.user_fonts_dir™   s;   € ô �w‰w×Ñ¤¤D¬Ð8MÓ)NÓ$OÐR]Ñ$]Ð`iÑ$iÐlsÑ$sÓ tÓuÐur   c                ó   — | j                   S )zCPreference directory tied to the user, same as ``user_config_dir``.)r0   r/   s    r   Úuser_preference_dirzWindows.user_preference_dirž   s   € ð ×#Ñ#Ð#r   c                óŽ   — t         j                  j                  t         j                  j                  t	        d«      d«      «      S )zABin directory tied to the user, e.g. ``%LOCALAPPDATA%\Programs``.r   ÚPrograms©r   r   r   r$   r   r/   s    r   Úuser_bin_dirzWindows.user_bin_dir£   s/   € ô �w‰w×Ñ¤§¡§¡¬^Ð<QÓ-RÐT^Ó _Ó`Ð`r   c                óŽ   — t         j                  j                  t         j                  j                  t	        d«      d«      «      S )z;Bin directory shared by users, e.g. ``C:\ProgramData\bin``.r)   Úbinrq   r/   s    r   Úsite_bin_dirzWindows.site_bin_dir¨   s/   € ô �w‰w×Ñ¤§¡§¡¬^Ð<RÓ-SÐUZÓ [Ó\Ð\r   c                óR   — t         j                  j                  t        d«      «      S )zFApplications directory tied to the user, e.g. ``Start Menu\Programs``.ÚCSIDL_PROGRAMSrF   r/   s    r   Úuser_applications_dirzWindows.user_applications_dir­   rH   r   c                óR   — t         j                  j                  t        d«      «      S )zfApplications directory shared by users, e.g. ``C:\ProgramData\Microsoft\Windows\Start Menu\Programs``.ÚCSIDL_COMMON_PROGRAMSrF   r/   s    r   Úsite_applications_dirzWindows.site_applications_dir²   s   € ô �w‰w×Ñ¤Ð/FÓ GÓHÐHr   c                ó°   — t         j                  j                  t         j                  j                  t	        d«      d«      «      }| j                  |«      S )zbRuntime directory tied to the user, e.g. ``%USERPROFILE%\AppData\Local\Temp\$appauthor\$appname``.r   ÚTemp)r   r   r   r$   r   r   r+   s     r   Úuser_runtime_dirzWindows.user_runtime_dir·   s?   € ô �w‰w×Ñ¤§¡§¡¬^Ð<QÓ-RÐTZÓ [Ó\ˆØ×!Ñ! $Ó'Ð'r   c                ó   — | j                   S )z>Runtime directory shared by users, same as `user_runtime_dir`.)r~   r/   s    r   Úsite_runtime_dirzWindows.site_runtime_dir½   s   € ð ×$Ñ$Ð$r   )Úreturnrb   )r   rb   r   ú
str | Noner�   rb   )!Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úpropertyr   r   r,   r0   r4   r7   r9   r;   r=   r@   rC   rG   rK   rN   rQ   rU   rX   r[   rd   ri   rl   rn   rr   ru   rx   r{   r~   r€   © r   r   r   r      sK  „ ñð ò(ó ð(ð GKõ ð ò(ó ð(ð
 ò"ó ð"ð ò"ó ð"ð ò?ó ð?ð
 ò?ó ð?ð
 ò"ó ð"ð ò"ó ð"ð òó ðð òó ðð òBó ðBð òCó ðCð òDó ðDð òAó ðAð òAó ðAð òJó ðJð òBó ðBð òió ðið òtó ðtð òvó ðvð ò$ó ð$ð òaó ðað ò]ó ð]ð òBó ðBð òIó ðIð ò(ó ð(ð
 ò%ó ñ%r   r   c                óÔ   — t        | «      }|�|S ddddœj                  | «      }|€d| › �}t        |«      ‚t        j                  j                  |«      }|€d|› �}t        |«      ‚|S )z&Get folder from environment variables.ÚAPPDATAÚALLUSERSPROFILEÚLOCALAPPDATA)r   r)   r   úUnknown CSIDL name: zUnset environment variable: )Ú(get_win_folder_if_csidl_name_not_env_varra   Ú
ValueErrorr   r`   )Ú
csidl_nameÚresultÚenv_var_nameÚmsgs       r   Úget_win_folder_from_env_varsr”   Ã   s‡   € ä5°jÓA€FØÐØˆð #Ø 1Ø-ñ÷ 
�cˆ*ƒoð	 ð
 ÐØ$ Z LÐ1ˆÜ˜‹oÐÜ�Z‰Z�^‰^˜LÓ)€FØ€~Ø,¨\¨NÐ;ˆÜ˜‹oÐØ€Mr   c                ó–  — | dk(  rNt         j                  j                  t         j                  j                  t         j                  d   «      d«      S | dk(  rNt         j                  j                  t         j                  j                  t         j                  d   «      d«      S | dk(  rNt         j                  j                  t         j                  j                  t         j                  d   «      d«      S | dk(  rNt         j                  j                  t         j                  j                  t         j                  d   «      d	«      S | d
k(  rNt         j                  j                  t         j                  j                  t         j                  d   «      d«      S | dk(  rNt         j                  j                  t         j                  j                  t         j                  d   «      d«      S | dk(  rQt         j                  j                  t         j                  j                  t         j                  d   «      dddd«      S | dk(  r|t         j                  j                  t         j                  j                  t         j                  j                  dt         j                  j                  dd«      «      «      dddd«      S y)zMGet a folder for a CSIDL name that does not exist as an environment variable.rE   ÚUSERPROFILEÚ	DocumentsrJ   Ú	DownloadsrM   ÚPicturesrP   ÚVideosrT   ÚMusicrW   ÚDesktoprw   rŠ   rf   r   z
Start Menurp   rz   ÚPROGRAMDATAr‹   zC:\ProgramDataN)r   r   r$   r   r`   ra   ©r�   s    r   rŽ   rŽ   Ø   sì  € àÐ%Ò%Ü�w‰w�|‰|œBŸG™G×,Ñ,¬R¯Z©Z¸Ñ-FÓGÈÓUÐUàÐ&Ò&Ü�w‰w�|‰|œBŸG™G×,Ñ,¬R¯Z©Z¸Ñ-FÓGÈÓUÐUàÐ'Ò'Ü�w‰w�|‰|œBŸG™G×,Ñ,¬R¯Z©Z¸Ñ-FÓGÈÓTÐTà�_Ò$Ü�w‰w�|‰|œBŸG™G×,Ñ,¬R¯Z©Z¸Ñ-FÓGÈÓRÐRà�_Ò$Ü�w‰w�|‰|œBŸG™G×,Ñ,¬R¯Z©Z¸Ñ-FÓGÈÓQÐQàÐ-Ò-Ü�w‰w�|‰|œBŸG™G×,Ñ,¬R¯Z©Z¸Ñ-FÓGÈÓSÐSàÐ%Ò%Ü�w‰w�|‰|Ü�G‰G×ÑœRŸZ™Z¨	Ñ2Ó3ØØØØó
ð 	
ð Ð,Ò,Ü�w‰w�|‰|Ü�G‰G×ÑœRŸZ™ZŸ^™^¨M¼2¿:¹:¿>¹>ÐJ[Ð]nÓ;oÓpÓqØØØØó
ð 	
ð r   c                ó|  — ddh}ddddddd	d
ddddœj                  | «      }|€d| › �}t        |«      ‚t        j                  dk7  rt        ‚ddl}| |v r|j                  n|j                  }|j                  |d«      5 }|j                  ||«      \  }}ddd«       t        |«      S # 1 sw Y   t        «      S xY w)z·Get folder from the registry.

    This is a fallback technique at best. I'm not sure if using the registry for these guarantees us the correct answer
    for all CSIDL_* names.

    r)   rz   ÚAppDatazCommon AppDatazLocal AppDataÚPersonalú&{374DE290-123F-4565-9164-39C4925E467B}zMy PictureszMy VideozMy Musicrœ   rp   zCommon Programs)r   r)   r   rE   rJ   rM   rP   rT   rW   rw   rz   Nr�   Úwin32r   z@Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders)ra   r�   ÚsysÚplatformÚNotImplementedErrorÚwinregÚHKEY_LOCAL_MACHINEÚHKEY_CURRENT_USERÚOpenKeyÚQueryValueExrb   )	r�   Úmachine_namesÚshell_folder_namer“   r§   ÚhkeyÚkeyÚ	directoryÚ_s	            r   Úget_win_folder_from_registryr²      sè   € ð 	Øð€Mð
 #Ø 0Ø.Ø$ØCØ)Ø#Ø#Ø"+Ø$Ø!2ñ÷ 
�cˆ*ƒoð ð Ð Ø$ Z LÐ1ˆÜ˜‹oÐÜ
‡|�|�wÒÜ!Ð!Ûð )3°mÑ(Cˆ6×$Ò$È×IaÑIa€Dà	�‰˜ÐaÓ	bð CÐfiØ×*Ñ*¨3Ð0AÓB‰ˆ	�1÷Cäˆy‹>Ð÷Cäˆy‹>Ðús   Á?B(Â(B;z&{3EB685DB-65F9-4CF6-A03A-E3EF65729F3D}z&{62AB5D82-FDC1-4DC3-A9DD-070D1D495D97}z&{F1B32785-6FBA-4FCF-9D55-7B8E7F157091}z&{FDD39AD0-238F-46AF-ADB4-6C85480369C7}z&{33E28130-4E1E-4676-835A-98395C3BC3BB}z&{18989B1D-99B5-455B-841C-AB7C74E4DDFC}z&{4BD8D571-6D19-48D3-BE97-422220080E43}r¢   z&{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}z&{A77F5D77-2E2B-44C3-A6A2-ABA601054A51}z&{0139D44E-6AFE-49F2-8690-3DAFCAE6FFB8})r   r)   r   rE   rM   rP   rT   rJ   rW   rw   rz   zdict[str, str]Ú_KNOWN_FOLDER_GUIDSc                 óÈ  ‡‡‡‡‡	‡
‡— t         j                  dk7  rt        ‚ddlm} m}m}m}mŠm	Šm
Š  G ˆfd„d|«      Š |d«      Š	| ‰	j                  _        ‰j                   |‰«      g‰	j                  _        d‰	j                  _        ‰j                   g‰	j                  _         |d«      Š
| ‰
j"                  _         |‰«      ‰j$                  ‰j&                   |‰j(                  «      g‰
j"                  _         |d	«      Š‰j$                  ‰j*                  _        ‰j(                  ‰j(                  ‰j$                  g‰j*                  _        dˆˆˆˆˆ	ˆ
ˆfd
„}|S )z’Build the resolver once; a fresh ``_GUID`` per call leaks ctypes pointer types.

    See https://github.com/tox-dev/platformdirs/issues/501.

    r£   r   )ÚHRESULTÚPOINTERÚ	StructureÚWinDLLÚbyrefÚcreate_unicode_bufferÚwintypesc                  óˆ   •— e Zd ZdW ° j                  fdW ° j                  fdW ° j                  fdW ° j
                  dz  fgZy)ú/_build_get_win_folder_via_ctypes.<locals>._GUIDÚData1ÚData2ÚData3ÚData4é   N)rƒ   r„   r…   ÚDWORDÚWORDÚBYTEÚ_fields_)r»   s   €r   Ú_GUIDr½   I  s?   ø„ à‘h—n‘nÐ%Ø‘h—m‘mÐ$Ø‘h—m‘mÐ$Ø‘h—m‘m aÑ'Ð(ð	
‰r   rÇ   Úole32NÚshell32Úkernel32c                óÌ  •— t         j                  | «      }|€d| › �}t        |«      ‚ ‰«       }‰j                  | ‰|«      «       ‰j	                  «       }‰j                   ‰|«      t        d  ‰|«      «       |j                  }‰j                  |«       |€d| › �}t        |«      ‚t        d„ |D «       «      r' ‰	d«      }‰
j                  ||d«      r|j                  }|S )Nr�   z'SHGetKnownFolderPath returned NULL for c              3  ó8   K  — | ]  }t        |«      d kD  –— Œ y­w)éÿ   N)Úord)Ú.0Úcs     r   ú	<genexpr>zD_build_get_win_folder_via_ctypes.<locals>.resolve.<locals>.<genexpr>q  s   è ø€ Ò, Œs�1‹v˜�|Ñ,ùs   ‚i   )r³   ra   r�   ÚCLSIDFromStringÚLPWSTRÚSHGetKnownFolderPathr   ÚvalueÚCoTaskMemFreeÚanyÚGetShortPathNameW)r�   Úfolder_guidr“   ÚguidÚpath_ptrr‘   ÚbufrÇ   r¹   rº   rÊ   rÈ   rÉ   r»   s          €€€€€€€r   Úresolvez1_build_get_win_folder_via_ctypes.<locals>.resolve_  sÞ   ø€ Ü)×-Ñ-¨jÓ9ˆØÐØ(¨¨Ð5ˆCÜ˜S“/Ð!á‹wˆØ×Ñ˜k©5°«;Ô7à—?‘?Ó$ˆØ×$Ñ$¡U¨4£[Ô2FÈÉeÐT\ËoÔ^Ø—‘ˆØ×Ñ˜HÔ%àˆ>Ø;¸J¸<ÐHˆCÜ˜S“/Ð!äÑ, VÔ,Ô,Ù'¨Ó-ˆCØ×)Ñ)¨&°#°tÔ<ØŸ™�àˆr   ©r�   rb   r�   rb   )r¤   r¥   r¦   Úctypesrµ   r¶   r·   r¸   r¹   rº   r»   rÒ   ÚrestypeÚ	LPCOLESTRÚargtypesrÖ   ÚLPVOIDrÔ   rÃ   ÚHANDLErÓ   rØ   )rµ   r¶   r·   r¸   rÝ   rÇ   r¹   rº   rÊ   rÈ   rÉ   r»   s        @@@@@@@r   Ú _build_get_win_folder_via_ctypesrå   6  s!  þ€ ô ‡|�|�wÒÜ!Ð!÷÷ ñ ö
�	ô 
ñ �7‹O€EØ$+€E×ÑÔ!Ø&.×&8Ñ&8¹'À%».Ð%I€E×ÑÔ"Ø"&€E×ÑÔØ$,§O¡OÐ#4€E×ÑÔ á�YÓ€GØ+2€G× Ñ Ô(Ù-4°U«^¸X¿^¹^ÈXÏ_É_Ñ^eÐfn×fuÑfuÓ^vÐ,w€G× Ñ Ô)á�jÓ!€HØ)1¯©€H×ÑÔ&Ø+3¯?©?¸H¿O¹OÈXÏ^É^Ð*\€H×ÑÔ'÷ó ð2 €Nr   c                ó"   —  t        «       | «      S )z Get folder via :func:`SHGetKnownFolderPath`.

    See https://learn.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetknownfolderpath.

    )rå   rž   s    r   Úget_win_folder_via_ctypesrç   {  s   € ð .Ô+Ó-¨jÓ9Ð9r   c                 óv   — 	 ddl } t        S # t        $ r Y nw xY w	 ddl}t        S # t        $ r	 t
        cY S w xY w)zjSelect the best method to resolve Windows folder paths: ctypes, then registry, then environment variables.r   N)rß   rç   ÚImportErrorr§   r²   r”   )rß   r§   s     r   Ú_pick_get_win_folderrê   „  sM   € ð)Ûô )Ð(øô ò Ùðúð,Ûô ,Ð+øô ò ,Ü+Ò+ð,ús   ‚ Œ	—œ& ¦8·8c                ó¤   — d| j                  d«      › �}t        j                  j                  |d«      j	                  «       x}r|S t        | «      S )zÓGet a Windows folder path, checking for ``WIN_PD_OVERRIDE_*`` environment variable overrides first.

    For example, ``CSIDL_LOCAL_APPDATA`` can be overridden by setting ``WIN_PD_OVERRIDE_LOCAL_APPDATA``.

    ÚWIN_PD_OVERRIDE_ÚCSIDL_Ú )Úremoveprefixr   r`   ra   ÚstripÚ_resolve_win_folder)r�   Úenv_varÚoverrides      r   r   r   —  sO   € ð ! ×!8Ñ!8¸Ó!BÐ CÐD€GÜ—:‘:—>‘> '¨2Ó.×4Ñ4Ó6Ð6€xÐ6ØˆÜ˜zÓ*Ð*r   rÞ   )r�   rb   r�   r‚   )r�   zCallable[[str], str])r†   Ú
__future__r   r   r¤   Ú	functoolsr   Úpathlibr   Útypingr   r   Úapir	   Úcollections.abcr
   r   Ú__annotations__r   r”   rŽ   r²   r³   rå   rç   rê   rñ   r   Ú__all__rˆ   r   r   ú<module>rü      s¿   ðÚ å "ã 	Û 
Ý Ý ß 'å  áÝ(ð $.Ð �jÓ -ôl%ˆoô l%ó^ó*%óP$ðP >ØDØCØ>Ø@Ø=Ø=Ø?ØFØ>ØEñ'Ð �^ó ð òAó ðAóH:ó,ñ  +Ó,Ð ó	+ð ð�r   