from ...processing_utils import ProcessorMixin
from ...tokenization_utils_base import BatchEncoding






class 		lowercase						(			a__):






	"""simple docstring"""


	a__				: int		       =							["image_processor", "tokenizer"]
	a__				: List[Any]		       =							"AutoImageProcessor"
	a__				: Optional[Any]		       =							"AutoTokenizer"




	def __init__(     self     :						Any						,  __UpperCAmelCase     :						Optional[Any]						,  __UpperCAmelCase     :						Any					)      ->			Union[str, Any]:
							super().__init__(SCREAMING_SNAKE_CASE_						,  SCREAMING_SNAKE_CASE_					)
							UpperCAmelCase_=       self.image_processor




	def __call__(     self     :						Tuple						,  __UpperCAmelCase     :						Dict=None						,  __UpperCAmelCase     :						Union[str, Any]=None						,  __UpperCAmelCase     :						Optional[Any]=None						,  **__UpperCAmelCase     :						Tuple					)      ->			Optional[int]:

							if text is None and images is None:
													raise ValueError("""You have to specify either text or images. Both cannot be none."""					)

							if text is not None:
													UpperCAmelCase_=       self.tokenizer(SCREAMING_SNAKE_CASE_						,  return_tensors=SCREAMING_SNAKE_CASE_						,  **SCREAMING_SNAKE_CASE_					)

							if images is not None:
													UpperCAmelCase_=       self.image_processor(SCREAMING_SNAKE_CASE_						,  return_tensors=SCREAMING_SNAKE_CASE_						,  **SCREAMING_SNAKE_CASE_					)

							if text is not None and images is not None:
													UpperCAmelCase_=       image_features.pixel_values
													return encoding
							elif text is not None:
													return encoding
							else:
													return BatchEncoding(data=dict(**SCREAMING_SNAKE_CASE_					)						,  tensor_type=SCREAMING_SNAKE_CASE_					)




	def   _SCREAMING_SNAKE_CASE		(     self     :						Any						,  *__UpperCAmelCase     :						Optional[Any]						,  **__UpperCAmelCase     :						List[str]					)      ->			Dict:
							return self.tokenizer.batch_decode(*SCREAMING_SNAKE_CASE_						,  **SCREAMING_SNAKE_CASE_					)




	def   _SCREAMING_SNAKE_CASE		(     self     :						List[Any]						,  *__UpperCAmelCase     :						Tuple						,  **__UpperCAmelCase     :						int					)      ->			int:
							return self.tokenizer.decode(*SCREAMING_SNAKE_CASE_						,  **SCREAMING_SNAKE_CASE_					)




	@property
	def   _SCREAMING_SNAKE_CASE		(     self     :						Optional[Any]					)      ->			Optional[Any]:
							return ["input_ids", "attention_mask", "pixel_values"]









__A       =						6_5521



def 	__a					(   lowerCAmelCase_       : str    )				->			int:






						'''simple docstring'''



						UpperCAmelCase_=       1
						UpperCAmelCase_=       0
						for plain_chr in plain_text:
												UpperCAmelCase_=       (a + ord(lowerCAmelCase_    )) % MOD_ADLER
												UpperCAmelCase_=       (b + a) % MOD_ADLER
						return (b << 16) | a




