
    hL                     J    S r SSKrSrS\S\4S jrS\S\4S jrS\S\4S	 jrg)
zMAlias generators for converting between different capitalization conventions.    N)	to_pascalto_camelto_snakesnakereturnc                 T    U R                  5       n[        R                  " SS U5      $ )zyConvert a snake_case string to PascalCase.

Args:
    snake: The string to convert.

Returns:
    The PascalCase string.
z([0-9A-Za-z])_(?=[0-9A-Z])c                 $    U R                  S5      $ N   groupms    K/var/www/html/env/lib/python3.13/site-packages/pydantic/alias_generators.py<lambda>to_pascal.<locals>.<lambda>   s    !''!*    )titleresubr   camels     r   r   r      s$     KKME66.0DeLLr   c                     [         R                  " SU 5      (       a  [         R                  " SU 5      (       d  U $ [        U 5      n[         R                  " SS U5      $ )zConvert a snake_case string to camelCase.

Args:
    snake: The string to convert.

Returns:
    The converted camelCase string.
z^[a-z]+[A-Za-z0-9]*$z\d[a-z]z
(^_*[A-Z])c                 @    U R                  S5      R                  5       $ r
   )r   lowerr   s    r   r   to_camel.<locals>.<lambda>(   s    !''!**:*:*<r   )r   matchsearchr   r   r   s     r   r   r      sI     
xx&..ryyU7S7SeE66, <eDDr   r   c                    [         R                  " SS U 5      n[         R                  " SS U5      n[         R                  " SS U5      n[         R                  " SS U5      nUR                  S	S
5      nUR                  5       $ )zConvert a PascalCase, camelCase, or kebab-case string to snake_case.

Args:
    camel: The string to convert.

Returns:
    The converted string in snake_case.
z([A-Z]+)([A-Z][a-z])c                 L    U R                  S5       SU R                  S5       3$ Nr   _   r   r   s    r   r   to_snake.<locals>.<lambda>5   s    Aaggaj\6Rr   z([a-z])([A-Z])c                 L    U R                  S5       SU R                  S5       3$ r!   r   r   s    r   r   r$   7       1771:,a
|0Lr   z([0-9])([A-Z])c                 L    U R                  S5       SU R                  S5       3$ r!   r   r   s    r   r   r$   9   r&   r   z([a-z])([0-9])c                 L    U R                  S5       SU R                  S5       3$ r!   r   r   s    r   r   r$   ;   r&   r   -r"   )r   r   replacer   )r   r   s     r   r   r   +   sq     FF*,RTYZEFF$&LeTEFF$&LeTEFF$&LeTEMM#s#E;;=r   )__doc__r   __all__strr   r   r    r   r   <module>r/      sO    S 	
/
MS 
MS 
MEC EC E$C C r   