+
    *:žgœ#  ã                  ó  a € 0 t $ R t^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	H
t
 ^ RIHtHtHt ^ RIHt ^ RIHt ^ RIHt / tR]R	&   ]P.                  ! 4       t]P2                  P5                  ]P2                  P7                  ]4      R
4      t]P<                  ! R]P>                  4      t R R lt!R R lt"R R lt#]! RR7      R R l4       t$R R lt%RR R llt&R R lt' ! R R4      t( ! R R]
P                  4      t)R# ) a+  
babel.localedata
~~~~~~~~~~~~~~~~

Low-level locale data access.

:note: The `Locale` class, which uses this module under the hood, provides a
       more convenient interface for accessing the locale data.

:copyright: (c) 2013-2025 by the Babel Team.
:license: BSD, see LICENSE for more details.
)ÚannotationsN)Úabc)ÚIteratorÚMappingÚMutableMapping)Ú	lru_cache)Úchain)ÚAnyúdict[str, Any]Ú_cachezlocale-dataz%^(con|prn|aux|nul|com[0-9]|lpt[0-9])$c               ó    € V ^8„  d   QhRRRR/# )é   ÚnameÚstrÚreturnz
str | None© )Úformats   "Ú2/usr/lib/python3/dist-packages/babel/localedata.pyÚ__annotate__r   !   s   € ÷ ñ ˜3ð  :ñ ó    c                ó  € V '       d   \        V \        4      '       g   R# V P                  4       P                  4       p \        P
                  ! \        \        4       .4       F  pWP                  4       8X  g   K  Vu # 	  R# )z“Normalize a locale ID by stripping spaces and apply proper casing.

Returns the normalized locale ID string or `None` if the ID is not
recognized.
N)Ú
isinstancer   ÚstripÚlowerr   Úfrom_iterabler   Úlocale_identifiers)r   Ú	locale_ids   & r   Únormalize_localer   !   s\   € ÷ ”z $¬×,Ò,ÙØ�:‰:‹<×ÑÓ€DÜ×(Ò(¬&Ô2DÓ2FÐ)GÖHˆ	Ø—?‘?Ó$Ö$ØÒó Ir   c               ó    € V ^8„  d   QhRRRR/# )r   r   úos.PathLike[str] | strr   r   r   )r   s   "r   r   r   /   s   € ÷ 1ñ 1Ð"8ð 1¸Sñ 1r   c                óT  € \         P                  P                  V 4      p \        P                  R8X  dO   \
        P                  \         P                  P                  V 4      ^ ,          4      '       d   \        RV  R24      h\         P                  P                  \        V  R24      # )z7
Resolve a locale identifier to a `.dat` path on disk.
Úwin32zName z is invalid on Windowsú.dat)ÚosÚpathÚbasenameÚsysÚplatformÚ_windows_reserved_name_reÚmatchÚsplitextÚ
ValueErrorÚjoinÚ_dirname)r   s   &r   Úresolve_locale_filenamer.   /   s   € ô �7‰7×Ñ˜DÓ!€Dô ‡|�|�wÔÔ#<×#BÑ#BÄ2Ç7Á7×CSÑCSÐTXÓCYÐZ[ÕC\×#]Ò#]Ü˜5  Ð&<Ð=Ó>Ð>ô �7‰7�<‰<œ T F¨$ -Ó0Ð0r   c               ó    € V ^8„  d   QhRRRR/# ©r   r   r   r   Úboolr   )r   s   "r   r   r   ?   s   € ÷ @ñ @�ð @˜ñ @r   c                óè   € V '       d   \        V \        4      '       g   R# V \        9   d   R# \        P                  P                  \        V 4      4      pV'       d   R# \        \        V 4      4      # )z™Check whether locale data is available for the given locale.

Returns `True` if it exists, `False` otherwise.

:param name: the locale identifier string
FT)	r   r   r   r#   r$   Úexistsr.   r1   r   )r   Ú
file_founds   & r   r3   r3   ?   sP   € ÷ ”z $¬×,Ò,ÙØŒv„~ÙÜ—‘—‘Ô 7¸Ó =Ó>€Jßˆ4Ð?¤4Ô(8¸Ó(>Ó#?Ð?r   )Úmaxsizec               ó   € V ^8„  d   QhRR/# )r   r   z	list[str]r   )r   s   "r   r   r   O   s   € ÷ ñ ˜Iñ r   c                 óœ   € R \         P                  ! \        4       4        U Uu. uF  w  rVR8X  g   K  V R8w  g   K  V NK  	  upp # u upp i )a  Return a list of all locale identifiers for which locale data is
available.

This data is cached after the first invocation.
You can clear the cache by calling `locale_identifiers.cache_clear()`.

.. versionadded:: 0.8.1

:return: a list of locale identifiers (strings)
c              3  ó`   "  € T F$  p\         P                  P                  V4      x € K&  	  R # 5i©N)r#   r$   r*   )Ú.0Úfilenames   & r   Ú	<genexpr>Ú%locale_identifiers.<locals>.<genexpr>]   s$   é € ÐIÑ4H¨Œ�‰×	Ñ	˜(×	#Ð	#Ó4Hùs   ‚,.r"   Úroot)r#   Úlistdirr-   )ÚstemÚ	extensions     r   r   r   N   sX   € ñ 	J´B·J²J¼xÔ4HÔIôñ 	Jñ ˆDà˜Ñô 	ð $(¨6¡>÷ 	ˆáIòð ùó s   ¥AµA¾Ac               ó    € V ^8„  d   QhRRRR/# r0   r   )r   s   "r   r   r   b   s   € ÷ ñ  ð ¨ñ r   c                óî   € ^ RI HpHp  V! V 4      vr4rVpT'       dG   T'       d?   T'       g7   T'       g/   T'       g'   T! R4      P	                  T4      pT! T4      v ršp	YZ8g  # R#   \         d     R# i ; i)zøReturn whether the locale is of the form ``lang_Script``,
and the script is not the likely script for the language.

This implements the behavior of the ``nonlikelyScript`` value of the
``localRules`` attribute for parent locales added in CLDR 45.
)Ú
get_globalÚparse_localeFÚlikely_subtags)Ú
babel.corerD   rE   r+   Úget)r   rD   rE   ÚlangÚ	territoryÚscriptÚvariantÚrestÚlikely_subtagÚ_Úlikely_scripts   &          r   Ú_is_non_likely_scriptrQ   b   sq   € ÷ 4ðÙ2>¸tÓ2DÐ/ˆ˜¨4÷ —Ÿy·ÇÙ"Ð#3Ó4×8Ñ8¸Ó>ˆÙ".¨}Ó"=Ðˆˆ1˜aØÑ&Ð&Ùøô ô Úðús   ŠA% Á%A4Á3A4c               ó$   € V ^8„  d   QhRRRRRR/# )r   r   r   Úmerge_inheritedr1   r   r
   r   )r   s   "r   r   r   w   s"   € ÷ 4ñ 4Ð%ð 4¸ð 4Èñ 4r   c                óN  € \         P                  P                  V 4      p \        P	                  4         \
        P                  V 4      pV'       Eg   V R8X  g	   V'       g   / pM‰^ RIHp V! R4      P                  V 4      pV'       gL   \        V 4      '       d   RpM7V P                  R4      p\        V4      ^8X  d   RMRP                  VRR 4      p\        V4      P                  4       p\        V 4      p\!        VR4      ;_uu_ 4       pV R8w  d*   V'       d"   \#        V\$        P                  ! V4      4       M\$        P                  ! V4      pRRR4       V\
        V &   V\        P'                  4        #   + '       g   i     L/; i  \        P'                  4        i ; i)a  Load the locale data for the given locale.

The locale data is a dictionary that contains much of the data defined by
the Common Locale Data Repository (CLDR). This data is stored as a
collection of pickle files inside the ``babel`` package.

>>> d = load('en_US')
>>> d['languages']['sv']
u'Swedish'

Note that the results are cached, and subsequent requests for the same
locale return the same dictionary:

>>> d1 = load('en_US')
>>> d2 = load('en_US')
>>> d1 is d2
True

:param name: the locale identifier string (or "root")
:param merge_inherited: whether the inherited data should be merged into
                        the data of the requested locale
:raise `IOError`: if no locale data file is found for the given locale
                  identifier, or one of the locales it inherits from
r>   )rD   Úparent_exceptionsrO   NÚrbéÿÿÿÿ)r#   r$   r%   Ú_cache_lockÚacquirer   rH   rG   rD   rQ   ÚsplitÚlenr,   ÚloadÚcopyr.   ÚopenÚmergeÚpickleÚrelease)r   rS   ÚdatarD   ÚparentÚpartsr;   Úfileobjs   &&      r   r\   r\   w   s0  € ô2 �7‰7×Ñ˜DÓ!€DÜ×ÑÔðÜ�z‰z˜$Óˆßˆtà�vŒ~§_Ø‘å1Ù#Ð$7Ó8×<Ñ<¸TÓB�ßÜ,¨T×2Ò2Ø!'™à $§
¡
¨3£˜Ü+.¨u«:¸¬?¡ÀÇÁÈÈsÐPRÈÓ@T˜Ü˜F“|×(Ñ(Ó*�Ü.¨tÓ4ˆHÜ�h ×%Ô%¨Ø˜6”>§oÜ˜$¤§¢¨GÓ 4Õ5ä!Ÿ;š; wÓ/�D÷	 &ð
  ŒF�4‰LØä×ÑÕ÷ &×%ûô 	×ÑÕús<   µF ÁF Á"'F Â
BF ÄE;Ä7E;ÅF Å;F	ÆF ÆF$c               ó$   € V ^8„  d   QhRRRRRR/# )r   Údict1zMutableMapping[Any, Any]Údict2zMapping[Any, Any]r   ÚNoner   )r   s   "r   r   r   ®   s#   € ÷ ñ Ð)ð Ð2Cð Èñ r   c                óˆ  € VP                  4        F­  w  r#Vf   K  V P                  V4      p\        V\        4      '       dv   Vf   / p\        V\        4      '       d   WC3pMW\        V\
        4      '       d$   Vw  rVVP                  4       p\        Wc4       WV3pMVP                  4       p\        WC4       MTpW@V&   K¯  	  R# )aN  Merge the data from `dict2` into the `dict1` dictionary, making copies
of nested dictionaries.

>>> d = {1: 'foo', 3: 'baz'}
>>> merge(d, {1: 'Foo', 2: 'Bar'})
>>> sorted(d.items())
[(1, 'Foo'), (2, 'Bar'), (3, 'baz')]

:param dict1: the dictionary to merge into
:param dict2: the dictionary containing the data that should be merged
N)ÚitemsrH   r   ÚdictÚAliasÚtupler]   r_   )rg   rh   ÚkeyÚval2Úval1ÚaliasÚotherss   &&     r   r_   r_   ®   s¡   € ð —[‘[–]‰	ˆØÔØ—9‘9˜S“>ˆDÜ˜$¤×%Ò%Ø’<Ø�DÜ˜d¤E×*Ò*Ø ˜<‘DÜ ¤e×,Ò,Ø$(‘M�EØ#Ÿ[™[›]�FÜ˜&Ô'Ø!˜?‘DàŸ9™9›;�DÜ˜$Õ%à�Ø�#‹Jó% #r   c                  ó>   € ] tR t^ÏtRtR R ltR R ltR R ltRtR	# )
rm   z“Representation of an alias in the locale data.

An alias is a value that refers to some other part of the locale data,
as specified by the `keys`.
c               ó    € V ^8„  d   QhRRRR/# )r   Úkeysztuple[str, ...]r   ri   r   )r   s   "r   r   ÚAlias.__annotate__Ö   s   € ÷  ñ  ˜_ð  °ñ  r   c                	ó&   € \        V4      V n        R # r9   )rn   rv   )Úselfrv   s   &&r   Ú__init__ÚAlias.__init__Ö   s   € Ü˜$“KˆŽ	r   c               ó   € V ^8„  d   QhRR/# )r   r   r   r   )r   s   "r   r   rw   Ù   s   € ÷ 8ñ 8˜#ñ 8r   c                	óP   € R \        V 4      P                   RV P                  : R2# )Ú<Ú Ú>)ÚtypeÚ__name__rv   ©ry   s   &r   Ú__repr__ÚAlias.__repr__Ù   s&   € Ø”4˜“:×&Ñ&Ð' q¨¯©©°QÐ7Ð7r   c               ó    € V ^8„  d   QhRRRR/# )r   rb   zMapping[str | int | None, Any]r   r   )r   s   "r   r   rw   Ü   s   € ÷ ñ Ð:ð Ð?]ñ r   c                óè   € TpV P                    F  pW,          pK  	  \        V\        4      '       d   VP                  V4      pV# \        V\        4      '       d   Vw  rEVP                  V4      pV# )zÌResolve the alias based on the given data.

This is done recursively, so if one alias resolves to a second alias,
that second alias will also be resolved.

:param data: the locale data
:type data: `dict`
)rv   r   rm   Úresolvern   )ry   rb   Úbasero   rr   rs   s   &&    r   rˆ   ÚAlias.resolveÜ   si   € ð ˆØ—9”9ˆCØ•9ŠDñ ä�dœE×"Ò"Ø—<‘< Ó%ˆDð ˆô ˜œe×$Ò$Ø ‰MˆEØ—=‘= Ó&ˆDØˆr   )rv   N)	r‚   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rz   r„   rˆ   Ú__static_attributes__r   r   r   rm   rm   Ï   s   † ñõ õ8÷ñ r   rm   c                  ór   € ] tR t^ðtRtRR R lltR R ltR R ltR	 R
 ltR R lt	R R lt
R R ltRtR# )ÚLocaleDataDictzMDictionary wrapper that automatically resolves aliases to the actual
values.
Nc               ó    € V ^8„  d   QhRRRR/# )r   rb   z%MutableMapping[str | int | None, Any]r‰   z%Mapping[str | int | None, Any] | Noner   )r   s   "r   r   ÚLocaleDataDict.__annotate__õ   s   € ÷ ñ ÐBð ÐJoñ r   c                	ó*   € Wn         Vf   TpW n        R # r9   ©Ú_datar‰   )ry   rb   r‰   s   &&&r   rz   ÚLocaleDataDict.__init__õ   s   € ØŒ
ØŠ<ØˆDØŽ	r   c               ó   € V ^8„  d   QhRR/# )r   r   Úintr   )r   s   "r   r   r“   û   s   € ÷ ñ ˜ñ r   c                	ó,   € \        V P                  4      # r9   )r[   r–   rƒ   s   &r   Ú__len__ÚLocaleDataDict.__len__û   s   € Ü�4—:‘:‹Ðr   c               ó   € V ^8„  d   QhRR/# )r   r   zIterator[str | int | None]r   )r   s   "r   r   r“   þ   s   € ÷  ñ  Ð4ñ  r   c                	ó,   € \        V P                  4      # r9   )Úiterr–   rƒ   s   &r   Ú__iter__ÚLocaleDataDict.__iter__þ   s   € Ü�D—J‘JÓÐr   c               ó    € V ^8„  d   QhRRRR/# )r   ro   ústr | int | Noner   r	   r   )r   s   "r   r   r“     s   € ÷ ñ Ð/ð °Cñ r   c                	óª  € V P                   V,          ;r#\        V\        4      '       d   VP                  V P                  4      p\        V\
        4      '       d9   Vw  rEVP                  V P                  4      P                  4       p\        W54       \        V\        4      '       d   \        W0P                  R 7      pW2Jd   W0P                   V&   V# ©)r‰   )
r–   r   rm   rˆ   r‰   rn   r]   r_   rl   r‘   )ry   ro   ÚorigÚvalrr   rs   s   &&    r   Ú__getitem__ÚLocaleDataDict.__getitem__  s˜   € Ø—Z‘Z •_Ð$ˆÜ�cœ5×!Ò!Ø—+‘+˜dŸi™iÓ(ˆCÜ�cœ5×!Ò!Ø‰MˆEØ—-‘- §	¡	Ó*×/Ñ/Ó1ˆCÜ�#ÔÜ�cœ4× Ò Ü  ¯9©9Ô5ˆCØ‹?Ø!�J‰J�s‰OØˆ
r   c               ó$   € V ^8„  d   QhRRRRRR/# )r   ro   r£   Úvaluer	   r   ri   r   )r   s   "r   r   r“     s"   € ÷  ñ  Ð/ð  ¸ð  Àñ  r   c                	ó"   € W P                   V&   R # r9   ©r–   )ry   ro   r«   s   &&&r   Ú__setitem__ÚLocaleDataDict.__setitem__  s   € Ø�
‰
�3‹r   c               ó    € V ^8„  d   QhRRRR/# )r   ro   r£   r   ri   r   )r   s   "r   r   r“     s   € ÷ ñ Ð/ð °Dñ r   c                	ó    € V P                   V R # r9   r­   )ry   ro   s   &&r   Ú__delitem__ÚLocaleDataDict.__delitem__  s   € Ø�J‰J�sŠOr   c               ó   € V ^8„  d   QhRR/# )r   r   r‘   r   )r   s   "r   r   r“     s   € ÷ Añ A�nñ Ar   c                	ó`   € \        V P                  P                  4       V P                  R 7      # r¥   )r‘   r–   r]   r‰   rƒ   s   &r   r]   ÚLocaleDataDict.copy  s   € Ü˜dŸj™jŸo™oÓ/°d·i±iÔ@Ð@r   r•   r9   )r‚   r‹   rŒ   r�   rŽ   rz   r›   r    r¨   r®   r²   r]   r�   r   r   r   r‘   r‘   ð   s1   † ñ÷õõ õõ õ÷Añ Ar   r‘   )T)*Ú__conditional_annotations__rŽ   Ú
__future__r   r#   r`   Úrer&   Ú	threadingÚcollectionsr   Úcollections.abcr   r   r   Ú	functoolsr   Ú	itertoolsr   Útypingr	   r   Ú__annotations__ÚRLockrX   r$   r,   ÚdirnameÚ__file__r-   ÚcompileÚIr(   r   r.   r3   r   rQ   r\   r_   rm   r‘   )r·   s   @r   Ú<module>rÆ      sÚ   øðôõ #ã 	Û Û 	Û 
Û Ý ß =Ñ =Ý Ý Ý à€ˆÓ Ø�oŠoÓ€Ø�7‰7�<‰<˜Ÿ™Ÿ™¨Ó1°=ÓA€ØŸJšJÐ'NÐPR×PTÑPTÓUÐ õõ1õ @ñ �4Ôôó ðõ&÷*4õn÷Bñ ôB&A�S×'Ñ'ö &Ar   