"""simple docstring"""


import argparse


UpperCAmelCase__			=    """docs/source/_static/js/custom.js"""






def      __UpperCAmelCase       (      lowercase		):







  """simple docstring"""
  with open(lowercase ,encoding="""utf-8""" ,newline="""\n"""		) as f:
    _UpperCAmelCase    			=   f.readlines()
  _UpperCAmelCase    			=   0

  # First let's put the right version
  while not lines[index].startswith("""const stableVersion ="""		):
    index += 1
  _UpperCAmelCase    			=   f'''const stableVersion = "v{version}"\n'''

  # Then update the dictionary
  while not lines[index].startswith("""const versionMapping = {"""		):
    index += 1

  # We go until the end
  while not lines[index].startswith("""}"""		):
    index += 1
  # We add the new version at the end
  lines[index - 1] += f'''    "v{version}": "v{version}",\n'''

  with open(lowercase ,"""w""" ,encoding="""utf-8""" ,newline="""\n"""		) as f:
    f.writelines(lowercase		)


if __name__ == "__main__":
    UpperCAmelCase__			=    argparse.ArgumentParser()
    parser.add_argument("""--version""", help="""Release version.""")
    UpperCAmelCase__			=    parser.parse_args()
    update_custom_js(args.version)

"""simple docstring"""


from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_torch_available,
)


UpperCAmelCase__			=    {"""configuration_vit_mae""": ["""VIT_MAE_PRETRAINED_CONFIG_ARCHIVE_MAP""", """ViTMAEConfig"""]}

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    UpperCAmelCase__			=    [
        """VIT_MAE_PRETRAINED_MODEL_ARCHIVE_LIST""",
        """ViTMAEForPreTraining""",
        """ViTMAELayer""",
        """ViTMAEModel""",
        """ViTMAEPreTrainedModel""",
    ]

try:
    if not is_tf_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    UpperCAmelCase__			=    [
        """TFViTMAEForPreTraining""",
        """TFViTMAEModel""",
        """TFViTMAEPreTrainedModel""",
    ]

if TYPE_CHECKING:
    from .configuration_vit_mae import VIT_MAE_PRETRAINED_CONFIG_ARCHIVE_MAP, ViTMAEConfig

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_vit_mae import (
            VIT_MAE_PRETRAINED_MODEL_ARCHIVE_LIST,
            ViTMAEForPreTraining,
            ViTMAELayer,
            ViTMAEModel,
            ViTMAEPreTrainedModel,
        )

    try:
        if not is_tf_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_tf_vit_mae import TFViTMAEForPreTraining, TFViTMAEModel, TFViTMAEPreTrainedModel


else:
    import sys

    UpperCAmelCase__			=    _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)
