






'''simple docstring'''





from typing import List

from .keymap import KEYMAP, get_character






def    lowerCamelCase_     (    lowercase__):

 def decorator(lowercase__):
  lowerCamelCase__  =     getattr(lowercase__				,     "handle_key"				,     [])
  handle += [key]
  setattr(lowercase__				,     "handle_key"				,     lowercase__)
  return func

 return decorator






def    lowerCamelCase_     (    *lowercase__):

 def decorator(lowercase__):
  lowerCamelCase__  =     getattr(lowercase__				,     "handle_key"				,     [])
  handle += keys
  setattr(lowercase__				,     "handle_key"				,     lowercase__)
  return func

 return decorator
class 				lowercase       (							_lowerCamelCase      ):


    '''simple docstring'''

    def __new__(					cls     :     Dict				,     __lowerCamelCase     :     Dict				,     __lowerCamelCase     :     Any				,     __lowerCamelCase     :     Dict     )							->							Optional[int]:

     '''simple docstring'''




     lowerCamelCase__  =     super().__new__(cls				,     __lowerCamelCase				,     __lowerCamelCase				,     __lowerCamelCase     )
     if not hasattr(__lowerCamelCase				,     "key_handler"     ):
      setattr(__lowerCamelCase				,     "key_handler"				,     {}     )
     setattr(__lowerCamelCase				,     "handle_input"				,     KeyHandler.handle_input     )

     for value in attrs.values():
      lowerCamelCase__  =     getattr(__lowerCamelCase				,     "handle_key"				,     []     )
      for key in handled_keys:
       lowerCamelCase__  =     value
     return new_cls




    @staticmethod
    def    a__				(					cls     :     Union[str, Any]     )							->							Any:

     '''simple docstring'''




     lowerCamelCase__  =     get_character()
     if char != KEYMAP["undefined"]:
      lowerCamelCase__  =     ord(__lowerCamelCase     )
     lowerCamelCase__  =     cls.key_handler.get(__lowerCamelCase     )
     if handler:
      lowerCamelCase__  =     char
      return handler(cls     )
     else:
      return None






def    lowerCamelCase_     (    cls):
 return KeyHandler(cls.__name__				,     cls.__bases__				,     cls.__dict__.copy())









'''simple docstring'''





from ..utils import DummyObject, requires_backends
class 				lowercase       (							metaclass=_lowerCamelCase      ):


    '''simple docstring'''

    lowerCAmelCase__      				=							["flax", "transformers"]

    def __init__(					self     :     List[str]				,     *__lowerCamelCase     :     int				,     **__lowerCamelCase     :     Any     )							->							Optional[int]:

     '''simple docstring'''




     requires_backends(self				,     ["flax", "transformers"]     )

    @classmethod
    def    a__				(					cls     :     Any				,     *__lowerCamelCase     :     Optional[int]				,     **__lowerCamelCase     :     Dict     )							->							str:

     '''simple docstring'''




     requires_backends(cls				,     ["flax", "transformers"]     )




    @classmethod
    def    a__				(					cls     :     str				,     *__lowerCamelCase     :     str				,     **__lowerCamelCase     :     Any     )							->							str:

     '''simple docstring'''




     requires_backends(cls				,     ["flax", "transformers"]     )
class 				lowercase       (							metaclass=_lowerCamelCase      ):


    '''simple docstring'''

    lowerCAmelCase__      				=							["flax", "transformers"]

    def __init__(					self     :     str				,     *__lowerCamelCase     :     List[Any]				,     **__lowerCamelCase     :     int     )							->							List[str]:

     '''simple docstring'''




     requires_backends(self				,     ["flax", "transformers"]     )

    @classmethod
    def    a__				(					cls     :     Dict				,     *__lowerCamelCase     :     Any				,     **__lowerCamelCase     :     str     )							->							Optional[int]:

     '''simple docstring'''




     requires_backends(cls				,     ["flax", "transformers"]     )




    @classmethod
    def    a__				(					cls     :     Any				,     *__lowerCamelCase     :     int				,     **__lowerCamelCase     :     Dict     )							->							int:

     '''simple docstring'''




     requires_backends(cls				,     ["flax", "transformers"]     )
class 				lowercase       (							metaclass=_lowerCamelCase      ):


    '''simple docstring'''

    lowerCAmelCase__      				=							["flax", "transformers"]

    def __init__(					self     :     Dict				,     *__lowerCamelCase     :     str				,     **__lowerCamelCase     :     List[Any]     )							->							str:

     '''simple docstring'''




     requires_backends(self				,     ["flax", "transformers"]     )

    @classmethod
    def    a__				(					cls     :     Optional[int]				,     *__lowerCamelCase     :     Optional[int]				,     **__lowerCamelCase     :     Optional[Any]     )							->							Dict:

     '''simple docstring'''




     requires_backends(cls				,     ["flax", "transformers"]     )




    @classmethod
    def    a__				(					cls     :     Optional[int]				,     *__lowerCamelCase     :     Dict				,     **__lowerCamelCase     :     List[str]     )							->							Dict:

     '''simple docstring'''




     requires_backends(cls				,     ["flax", "transformers"]     )
class 				lowercase       (							metaclass=_lowerCamelCase      ):


    '''simple docstring'''

    lowerCAmelCase__      				=							["flax", "transformers"]

    def __init__(					self     :     int				,     *__lowerCamelCase     :     List[str]				,     **__lowerCamelCase     :     int     )							->							Optional[int]:

     '''simple docstring'''




     requires_backends(self				,     ["flax", "transformers"]     )

    @classmethod
    def    a__				(					cls     :     Any				,     *__lowerCamelCase     :     Tuple				,     **__lowerCamelCase     :     str     )							->							List[str]:

     '''simple docstring'''




     requires_backends(cls				,     ["flax", "transformers"]     )




    @classmethod
    def    a__				(					cls     :     List[Any]				,     *__lowerCamelCase     :     List[str]				,     **__lowerCamelCase     :     List[Any]     )							->							int:

     '''simple docstring'''




     requires_backends(cls				,     ["flax", "transformers"]     )

