


'''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						       =				[('''size''', ctypes.c_int), ('''visible''', ctypes.c_byte)]




def 	_A  (       )  ->				List[Any]:
	if os.name == "nt":
		lowercase						:		List[Any]   					=		CursorInfo()
		lowercase						:		int   					=		ctypes.windll.kernelaa.GetStdHandle(-1_1							)
		ctypes.windll.kernelaa.GetConsoleCursorInfo(A							,ctypes.byref(A							)							)
		lowercase						:		List[Any]   					=		False
		ctypes.windll.kernelaa.SetConsoleCursorInfo(A							,ctypes.byref(A							)							)
	elif os.name == "posix":
		sys.stdout.write("\033[?25l"							)
		sys.stdout.flush()




def 	_A  (       )  ->				Tuple:
	if os.name == "nt":
		lowercase						:		Optional[int]   					=		CursorInfo()
		lowercase						:		Any   					=		ctypes.windll.kernelaa.GetStdHandle(-1_1							)
		ctypes.windll.kernelaa.GetConsoleCursorInfo(A							,ctypes.byref(A							)							)
		lowercase						:		List[str]   					=		True
		ctypes.windll.kernelaa.SetConsoleCursorInfo(A							,ctypes.byref(A							)							)
	elif os.name == "posix":
		sys.stdout.write("\033[?25h"							)
		sys.stdout.flush()






@contextmanager
def 	_A  (       )  ->				Dict:
	try:
		hide_cursor()
		yield
	finally:
		show_cursor()






'''simple docstring'''
from typing import TYPE_CHECKING

from ....utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


lowerCAmelCase   : Dict             =				{"""configuration_van""": ["""VAN_PRETRAINED_CONFIG_ARCHIVE_MAP""", """VanConfig"""]}


try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowerCAmelCase   : int             =				[
					    """VAN_PRETRAINED_MODEL_ARCHIVE_LIST""",
					    """VanForImageClassification""",
					    """VanModel""",
					    """VanPreTrainedModel""",
					]

if TYPE_CHECKING:
					from .configuration_van import VAN_PRETRAINED_CONFIG_ARCHIVE_MAP, VanConfig

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_van import (
										    VAN_PRETRAINED_MODEL_ARCHIVE_LIST,
										    VanForImageClassification,
										    VanModel,
										    VanPreTrainedModel,
										)

else:
					import sys

					lowerCAmelCase   : Tuple             =				_LazyModule(__name__, globals()["""__file__"""], _import_structure)


