






import os
import sys
from contextlib import contextmanager


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


							class   __SCREAMING_SNAKE_CASE(	ctypes.Structure	):
														# _fields is a specific attr expected by ctypes
														_UpperCAmelCase     =       [("size", ctypes.c_int), ("visible", ctypes.c_byte)]
def      a_ (      )			->			Tuple:







				"""simple docstring"""
				if os.name == "nt":
								snake_case__									=     CursorInfo()
								snake_case__									=     ctypes.windll.kernelaa.GetStdHandle(-11  )
								ctypes.windll.kernelaa.GetConsoleCursorInfo(_A      ,   ctypes.byref(_A  )  )
								snake_case__									=     False
								ctypes.windll.kernelaa.SetConsoleCursorInfo(_A      ,   ctypes.byref(_A  )  )
				elif os.name == "posix":
								sys.stdout.write('\033[?25l'  )
								sys.stdout.flush()
def      a_ (      )			->			Any:







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


@contextmanager
def      a_ (      )			->			Tuple:







				"""simple docstring"""
				try:
								hide_cursor()
								yield
				finally:
								show_cursor()












from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_tokenizers_available,
    is_torch_available,
    is_vision_available,
)


__UpperCamelCase					:		str	  =						{"""processing_layoutxlm""": ["""LayoutXLMProcessor"""]}

try:
							if not is_sentencepiece_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							__UpperCamelCase					:		Dict	  =						["""LayoutXLMTokenizer"""]

try:
							if not is_tokenizers_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							__UpperCamelCase					:		str	  =						["""LayoutXLMTokenizerFast"""]

if TYPE_CHECKING:
							from .processing_layoutxlm import LayoutXLMProcessor

							try:
														if not is_sentencepiece_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .tokenization_layoutxlm import LayoutXLMTokenizer

							try:
														if not is_tokenizers_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .tokenization_layoutxlm_fast import LayoutXLMTokenizerFast

else:
							import sys

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




