
    h                     ,    d dl mZ d dlmZ dedefdZy)    )Any)
underscoredatareturnc                     t        | t              r6| j                         D ci c]  \  }}t        |      t	        |       c}}S t        | t
              r| D cg c]  }t	        |       c}S | S c c}}w c c}w )ak  Recursively converts all dictionary keys from camelCase to snake_case.

    This function handles nested data structures, converting all dictionary
    keys from camelCase to snake_case format while preserving the original
    values.

    Args:
        data (Any): The data to convert. Can be a dictionary, list, or
        any other type.
            - If dict: converts all keys and recursively processes values
            - If list: recursively processes all items
            - Other types: returned as-is

    Returns:
        Any: The processed data with all dictionary keys converted to
        snake_case
    )
isinstancedictitemsr   snakifylist)r   keyvalueitems       N/var/www/Befach/backend/env/lib/python3.12/site-packages/upyloadthing/utils.pyr   r      sc    $ $BF**,OJC
3/OO	D$	*./$//K P/s   A2A8N)typingr   
inflectionr   r        r   <module>r      s     !# # r   