


"""simple docstring"""







import os
import sys
from contextlib import contextmanager


# Windows only
if os.name == "nt":
		import ctypes
		import msvcrt  # noqa




		class 				UpperCamelCase_			(				ctypes.Structure):

			"""simple docstring"""





			snake_case__       :						int					      =    [("""size""", ctypes.c_int), ("""visible""", ctypes.c_byte)]




def      UpperCAmelCase__ ():




					'''simple docstring'''


					if os.name == "nt":
										__SCREAMING_SNAKE_CASE		     =       CursorInfo()
										__SCREAMING_SNAKE_CASE		     =       ctypes.windll.kernelaa.GetStdHandle(-11     )
										ctypes.windll.kernelaa.GetConsoleCursorInfo(_UpperCamelCase						,		ctypes.byref(_UpperCamelCase     )     )
										__SCREAMING_SNAKE_CASE		     =       False
										ctypes.windll.kernelaa.SetConsoleCursorInfo(_UpperCamelCase						,		ctypes.byref(_UpperCamelCase     )     )
					elif os.name == "posix":
										sys.stdout.write("\033[?25l"     )
										sys.stdout.flush()




def      UpperCAmelCase__ ():




					'''simple docstring'''


					if os.name == "nt":
										__SCREAMING_SNAKE_CASE		     =       CursorInfo()
										__SCREAMING_SNAKE_CASE		     =       ctypes.windll.kernelaa.GetStdHandle(-11     )
										ctypes.windll.kernelaa.GetConsoleCursorInfo(_UpperCamelCase						,		ctypes.byref(_UpperCamelCase     )     )
										__SCREAMING_SNAKE_CASE		     =       True
										ctypes.windll.kernelaa.SetConsoleCursorInfo(_UpperCamelCase						,		ctypes.byref(_UpperCamelCase     )     )
					elif os.name == "posix":
										sys.stdout.write("\033[?25h"     )
										sys.stdout.flush()




@contextmanager
def      UpperCAmelCase__ ():




					'''simple docstring'''


					try:
										hide_cursor()
										yield
					finally:
										show_cursor()










"""simple docstring"""







from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


a__       :							Optional[Any]        =  {
    '''configuration_jukebox''': [
        '''JUKEBOX_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''JukeboxConfig''',
        '''JukeboxPriorConfig''',
        '''JukeboxVQVAEConfig''',
    ],
    '''tokenization_jukebox''': ['''JukeboxTokenizer'''],
}

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		a__       :							int        =  [
		    '''JUKEBOX_PRETRAINED_MODEL_ARCHIVE_LIST''',
		    '''JukeboxModel''',
		    '''JukeboxPreTrainedModel''',
		    '''JukeboxVQVAE''',
		    '''JukeboxPrior''',
		]

if TYPE_CHECKING:
		from .configuration_jukebox import (
		    JUKEBOX_PRETRAINED_CONFIG_ARCHIVE_MAP,
		    JukeboxConfig,
		    JukeboxPriorConfig,
		    JukeboxVQVAEConfig,
		)
		from .tokenization_jukebox import JukeboxTokenizer

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_jukebox import (
				    JUKEBOX_PRETRAINED_MODEL_ARCHIVE_LIST,
				    JukeboxModel,
				    JukeboxPreTrainedModel,
				    JukeboxPrior,
				    JukeboxVQVAE,
				)

else:
		import sys

		a__       :							Union[str, Any]        =  _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)
