o
    Œõ±jÏ  ã                   @  sH   d Z ddlmZ ddlZddlmZ ddlmZ edd�ddd„ƒZdS )zƒ
Lazy-loading per-terminal grapheme override tables.

This minimizes memory for the 99.9% of use-cases of a single 'term_program'.
é    )ÚannotationsN)Ú	lru_cacheé   )Ú	_REGISTRYé    )ÚmaxsizeÚterm_canonicalÚstrÚreturnúdict[str, int]c                 C  sP   t  | ¡}|du ri S zt d|› �t¡}t|dƒ}|W S  ty'   i  Y S w )zî
    Return grapheme override dict for a terminal, or an empty dict.

    The per-terminal module is imported on first access and cached in ``sys.modules``; subsequent
    calls for the same terminal return immediately via lru_cache.
    Nz._known_Ú	GRAPHEMES)r   ÚgetÚ	importlibÚimport_moduleÚ__package__ÚgetattrÚImportError)r   Úhash_keyÚmodÚresult© r   úœ/root/aizidognhua/tmp/workspace/projects/ec89d86c-575f-41c9-af57-ac45cbdbf775/venv/lib/python3.10/site-packages/wcwidth/table_grapheme_overrides/__init__.pyr      s   

ûr   )r   r	   r
   r   )	Ú__doc__Ú
__future__r   r   Ú	functoolsr   Ú	_registryr   r   r   r   r   r   Ú<module>   s    