





'''simple docstring'''

from ...processing_utils import ProcessorMixin







class __a			( lowercase_      ):
   __UpperCamelCase :			List[str]						   =						['image_processor', 'feature_extractor']
   __UpperCamelCase :			Union[str, Any]						   =						'TvltImageProcessor'
   __UpperCamelCase :			List[Any]						   =						'TvltFeatureExtractor'





   def __init__(       self					:      Any					,lowerCamelCase					:      int					,lowerCamelCase					:      Optional[Any]     ):

      '''simple docstring'''

      super().__init__(image_processor=UpperCamelCase_					,feature_extractor=UpperCamelCase_     )

      __SCREAMING_SNAKE_CASE   				=							image_processor
      __SCREAMING_SNAKE_CASE   				=							feature_extractor





   def __call__(       self					:      Dict					,lowerCamelCase					:      List[Any]=None					,lowerCamelCase					:      Tuple=None					,lowerCamelCase					:      Optional[int]=None					,lowerCamelCase					:      Dict=None					,lowerCamelCase					:      List[str]=False					,lowerCamelCase					:      List[str]=False					,*lowerCamelCase					:      List[str]					,**lowerCamelCase					:      Any					,):

      '''simple docstring'''

      if images is None and audio is None:
         raise ValueError("""You need to specify either an `images` or `audio` input to process."""     )

      __SCREAMING_SNAKE_CASE   				=							None
      if images is not None:
         __SCREAMING_SNAKE_CASE   				=							self.image_processor(UpperCamelCase_					,mask_pixel=UpperCamelCase_					,*UpperCamelCase_					,**UpperCamelCase_     )
      if images_mixed is not None:
         __SCREAMING_SNAKE_CASE   				=							self.image_processor(UpperCamelCase_					,is_mixed=UpperCamelCase_					,*UpperCamelCase_					,**UpperCamelCase_     )
      if audio is not None:
         __SCREAMING_SNAKE_CASE   				=							self.feature_extractor(
             UpperCamelCase_					,*UpperCamelCase_					,sampling_rate=UpperCamelCase_					,mask_audio=UpperCamelCase_					,**UpperCamelCase_     )

      __SCREAMING_SNAKE_CASE   				=							{}
      if audio is not None:
         output_dict.update(UpperCamelCase_     )
      if images is not None:
         output_dict.update(UpperCamelCase_     )
      if images_mixed_dict is not None:
         output_dict.update(UpperCamelCase_     )
      return output_dict





   @property
   def   UpperCAmelCase__  (       self					:      str     ):

      '''simple docstring'''

      __SCREAMING_SNAKE_CASE   				=							self.image_processor.model_input_names
      __SCREAMING_SNAKE_CASE   				=							self.feature_extractor.model_input_names
      return list(dict.fromkeys(image_processor_input_names + feature_extractor_input_names     )     )













from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


__a   :							Any						= {
    "configuration_time_series_transformer": [
        "TIME_SERIES_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "TimeSeriesTransformerConfig",
    ],
}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  __a   :							Dict						= [
      "TIME_SERIES_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST",
      "TimeSeriesTransformerForPrediction",
      "TimeSeriesTransformerModel",
      "TimeSeriesTransformerPreTrainedModel",
  ]


if TYPE_CHECKING:
  from .configuration_time_series_transformer import (
      TIME_SERIES_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
      TimeSeriesTransformerConfig,
  )

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_time_series_transformer import (
        TIME_SERIES_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
        TimeSeriesTransformerForPrediction,
        TimeSeriesTransformerModel,
        TimeSeriesTransformerPreTrainedModel,
    )

else:
  import sys

  __a   :							str						= _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)




