

import numpy as np

_UpperCAmelCase		:       Any						    =	[
    ["""a""", """b""", """c""", """d""", """e"""],
    ["""f""", """g""", """h""", """i""", """k"""],
    ["""l""", """m""", """n""", """o""", """p"""],
    ["""q""", """r""", """s""", """t""", """u"""],
    ["""v""", """w""", """x""", """y""", """z"""],
]







class 			lowercase    :




				def __init__( self	):
											snake_case_          =   np.array(snake_case	)




				def    a							( self				,       snake_case	):
											snake_case_    ,   snake_case_          =   np.where(letter == self.SQUARE	)
											snake_case_          =   np.concatenate([indexa + 1, indexa + 1]	)
											return indexes




				def    a							( self				,       snake_case				,       snake_case	):
											snake_case_          =   self.SQUARE[indexa - 1, indexa - 1]
											return letter




				def    a							( self				,       snake_case	):
											snake_case_          =   message.lower()
											snake_case_          =   message.replace(' '				,       ''	)
											snake_case_          =   message.replace('j'				,       'i'	)

											snake_case_          =   np.empty((2, len(snake_case	))	)
											for letter_index in range(len(snake_case	)	):
																		snake_case_          =   self.letter_to_numbers(message[letter_index]	)

																		snake_case_          =   numbers[0]
																		snake_case_          =   numbers[1]

											snake_case_          =   first_step.reshape(2 * len(snake_case	)	)
											snake_case_          =   ''
											for numbers_index in range(len(snake_case	)	):
																		snake_case_          =   int(second_step[numbers_index * 2]	)
																		snake_case_          =   int(second_step[(numbers_index * 2) + 1]	)
																		snake_case_          =   self.numbers_to_letter(snake_case				,       snake_case	)
																		snake_case_          =   encoded_message + letter

											return encoded_message




				def    a							( self				,       snake_case	):
											snake_case_          =   message.lower()
											message.replace(' '				,       ''	)
											snake_case_          =   np.empty(2 * len(snake_case	)	)
											for letter_index in range(len(snake_case	)	):
																		snake_case_          =   self.letter_to_numbers(message[letter_index]	)
																		snake_case_          =   numbers[0]
																		snake_case_          =   numbers[1]

											snake_case_          =   first_step.reshape((2, len(snake_case	))	)
											snake_case_          =   ''
											for numbers_index in range(len(snake_case	)	):
																		snake_case_          =   int(second_step[0, numbers_index]	)
																		snake_case_          =   int(second_step[1, numbers_index]	)
																		snake_case_          =   self.numbers_to_letter(snake_case				,       snake_case	)
																		snake_case_          =   decoded_message + letter

											return decoded_message







from ...utils import (
    OptionalDependencyNotAvailable,
    is_torch_available,
    is_transformers_available,
    is_transformers_version,
)


try:
					if not (is_transformers_available() and is_torch_available() and is_transformers_version(""">=""", """4.25.0""")):
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					from ...utils.dummy_torch_and_transformers_objects import UnCLIPImageVariationPipeline, UnCLIPPipeline
else:
					from .pipeline_unclip import UnCLIPPipeline
					from .pipeline_unclip_image_variation import UnCLIPImageVariationPipeline
					from .text_proj import UnCLIPTextProjModel




