From 13e09f03d8d3c8ba59dbbc163121d647232e911c Mon Sep 17 00:00:00 2001 From: LeoSvalov Date: Fri, 4 Aug 2023 12:19:13 +0000 Subject: [PATCH] New model zoo structure --- .gitignore | 15 + docker_run.sh | 1 + docs/_sources/index.rst.txt | 172 ++-- docs/_static/basic.css | 54 +- docs/_static/doctools.js | 480 ++++++----- docs/_static/documentation_options.js | 4 +- docs/_static/jquery.js | 4 +- docs/_static/language_data.js | 100 ++- docs/_static/pygments.css | 41 +- docs/_static/searchtools.js | 784 +++++++++--------- docs/docs/board_setup/board_setup.html | 236 ++++++ docs/docs/board_setup/board_setup_alveo.html | 224 +++++ docs/docs/board_setup/board_setup_mpsoc.html | 237 +++++- docs/docs/board_setup/board_setup_vck190.html | 97 ++- .../docs/board_setup/board_setup_vck5000.html | 96 ++- .../board_setup/vai_install_to_target.html | 226 +++++ docs/docs/install/Alveo_X11.html | 87 +- docs/docs/install/China_Ubuntu_servers.html | 87 +- .../Vitis AI 1.3.2 April 2021 Patch.html | 91 +- .../install/Vitis AI 2.0 Feb 2022 Patch.html | 93 ++- .../install/Vitis AI 2.5 Aug 2022 Patch.html | 93 ++- .../install/branching_tagging_strategy.html | 96 ++- docs/docs/install/install.html | 158 ++-- docs/docs/install/install_docker.html | 91 +- docs/docs/install/install_on_aws.html | 291 +++++++ docs/docs/install/install_on_azure.html | 289 +++++++ docs/docs/install/patch_instructions.html | 95 ++- docs/docs/petalinux-recipes.html | 288 +++++++ docs/docs/reference/additional_resources.html | 94 ++- .../docs/reference/docker_image_versions.html | 97 ++- docs/docs/reference/dpu_nomenclature.html | 227 +++++ docs/docs/reference/faq.html | 145 ++-- .../docs/reference/release_documentation.html | 103 ++- docs/docs/reference/release_notes_3.0.html | 170 ++-- docs/docs/reference/system_requirements.html | 135 ++- docs/docs/reference/thirdpartysource.html | 91 +- .../docs/reference/version_compatibility.html | 111 +-- docs/docs/workflow-model-deployment.html | 156 ++-- docs/docs/workflow-model-development.html | 171 ++-- docs/docs/workflow-model-zoo.html | 158 ++-- docs/docs/workflow-system-integration.html | 589 +++---------- docs/docs/workflow-third-party.html | 109 ++- docs/docs/workflow.html | 176 ++-- docs/genindex.html | 81 +- docs/index.html | 182 ++-- docs/objects.inv | Bin 6804 -> 13009 bytes docs/search.html | 81 +- docs/searchindex.js | 2 +- docsrc/Makefile | 3 + .../docs/board_setup/board_setup.doctree | Bin 0 -> 8005 bytes .../board_setup/board_setup_alveo.doctree | Bin 0 -> 7462 bytes .../board_setup/board_setup_mpsoc.doctree | Bin 12604 -> 47522 bytes .../board_setup/board_setup_vck190.doctree | Bin 26915 -> 28122 bytes .../board_setup/board_setup_vck5000.doctree | Bin 22827 -> 24748 bytes .../board_setup/vai_install_to_target.doctree | Bin 0 -> 4892 bytes .../doctrees/docs/install/Alveo_X11.doctree | Bin 6583 -> 7215 bytes .../docs/install/China_Ubuntu_servers.doctree | Bin 11189 -> 11650 bytes .../Vitis AI 1.3.2 April 2021 Patch.doctree | Bin 11696 -> 11819 bytes .../Vitis AI 2.0 Feb 2022 Patch.doctree | Bin 15347 -> 15560 bytes .../Vitis AI 2.5 Aug 2022 Patch.doctree | Bin 11216 -> 11376 bytes .../branching_tagging_strategy.doctree | Bin 6725 -> 6754 bytes .../doctrees/docs/install/install.doctree | Bin 70617 -> 73036 bytes .../docs/install/install_docker.doctree | Bin 12984 -> 14118 bytes .../docs/install/install_on_aws.doctree | Bin 0 -> 12410 bytes .../docs/install/install_on_azure.doctree | Bin 0 -> 12716 bytes .../docs/install/patch_instructions.doctree | Bin 6286 -> 5444 bytes .../doctrees/docs/petalinux-recipes.doctree | Bin 0 -> 18057 bytes .../reference/additional_resources.doctree | Bin 8151 -> 7501 bytes .../reference/docker_image_versions.doctree | Bin 12745 -> 13250 bytes .../docs/reference/dpu_nomenclature.doctree | Bin 0 -> 4418 bytes .../build/doctrees/docs/reference/faq.doctree | Bin 60987 -> 64930 bytes .../reference/release_documentation.doctree | Bin 12376 -> 12686 bytes .../docs/reference/release_notes_3.0.doctree | Bin 41540 -> 41218 bytes .../reference/system_requirements.doctree | Bin 8253 -> 13932 bytes .../docs/reference/thirdpartysource.doctree | Bin 54460 -> 59392 bytes .../reference/version_compatibility.doctree | Bin 18572 -> 17293 bytes .../docs/workflow-model-deployment.doctree | Bin 42424 -> 31300 bytes .../docs/workflow-model-development.doctree | Bin 64476 -> 69451 bytes .../doctrees/docs/workflow-model-zoo.doctree | Bin 43709 -> 45021 bytes .../docs/workflow-system-integration.doctree | Bin 110840 -> 34704 bytes .../docs/workflow-third-party.doctree | Bin 19290 -> 23418 bytes docsrc/build/doctrees/docs/workflow.doctree | Bin 18523 -> 35631 bytes docsrc/build/doctrees/environment.pickle | Bin 154546 -> 428176 bytes docsrc/build/doctrees/index.doctree | Bin 32357 -> 16176 bytes docsrc/build/html/_sources/index.rst.txt | 172 ++-- docsrc/build/html/_static/basic.css | 54 +- docsrc/build/html/_static/doctools.js | 480 ++++++----- .../html/_static/documentation_options.js | 4 +- docsrc/build/html/_static/jquery.js | 4 +- docsrc/build/html/_static/language_data.js | 100 ++- docsrc/build/html/_static/pygments.css | 41 +- docsrc/build/html/_static/searchtools.js | 784 +++++++++--------- .../html/docs/board_setup/board_setup.html | 236 ++++++ .../docs/board_setup/board_setup_alveo.html | 224 +++++ .../docs/board_setup/board_setup_mpsoc.html | 237 +++++- .../docs/board_setup/board_setup_vck190.html | 97 ++- .../docs/board_setup/board_setup_vck5000.html | 96 ++- .../board_setup/vai_install_to_target.html | 226 +++++ docsrc/build/html/docs/install/Alveo_X11.html | 87 +- .../docs/install/China_Ubuntu_servers.html | 87 +- .../Vitis AI 1.3.2 April 2021 Patch.html | 91 +- .../install/Vitis AI 2.0 Feb 2022 Patch.html | 93 ++- .../install/Vitis AI 2.5 Aug 2022 Patch.html | 93 ++- .../install/branching_tagging_strategy.html | 96 ++- docsrc/build/html/docs/install/install.html | 158 ++-- .../html/docs/install/install_docker.html | 91 +- .../html/docs/install/install_on_aws.html | 291 +++++++ .../html/docs/install/install_on_azure.html | 289 +++++++ .../html/docs/install/patch_instructions.html | 95 ++- docsrc/build/html/docs/petalinux-recipes.html | 288 +++++++ .../docs/reference/additional_resources.html | 94 ++- .../docs/reference/docker_image_versions.html | 97 ++- .../html/docs/reference/dpu_nomenclature.html | 227 +++++ docsrc/build/html/docs/reference/faq.html | 145 ++-- .../docs/reference/release_documentation.html | 103 ++- .../docs/reference/release_notes_3.0.html | 170 ++-- .../docs/reference/system_requirements.html | 135 ++- .../html/docs/reference/thirdpartysource.html | 91 +- .../docs/reference/version_compatibility.html | 111 +-- .../html/docs/workflow-model-deployment.html | 156 ++-- .../html/docs/workflow-model-development.html | 171 ++-- .../build/html/docs/workflow-model-zoo.html | 158 ++-- .../docs/workflow-system-integration.html | 589 +++---------- .../build/html/docs/workflow-third-party.html | 109 ++- docsrc/build/html/docs/workflow.html | 176 ++-- docsrc/build/html/genindex.html | 81 +- docsrc/build/html/index.html | 182 ++-- docsrc/build/html/objects.inv | Bin 6804 -> 13009 bytes docsrc/build/html/search.html | 81 +- docsrc/build/html/searchindex.js | 2 +- docsrc/build_model_cards.sh | 20 + docsrc/source/conf.py | 7 +- .../source/docs/getting-started-model-zoo.rst | 1 + docsrc/source/docs/models-overview.rst | 15 + .../docs/models/3DSegmentation/index.rst | 10 + .../docs/models/3DSegmentation/salsanext.rst | 6 + .../classification/efficientnet-edgetpu-s.rst | 6 + .../models/classification/inceptionv3.rst | 6 + .../docs/models/classification/index.rst | 13 + .../docs/models/classification/resnet50.rst | 6 + .../docs/models/classification/resnetv1.rst | 6 + .../models/classification/vehicle_make.rst | 6 + .../docs/models/object_detection/index.rst | 13 + .../models/object_detection/ssd_resnet34.rst | 6 + .../docs/models/object_detection/yolov4.rst | 6 + .../models/object_detection/yolox_nano.rst | 6 + .../source/docs/models/segmentation/ENet.rst | 6 + .../docs/models/segmentation/ERFNet.rst | 6 + .../docs/models/segmentation/SemanticFPN.rst | 6 + .../source/docs/models/segmentation/index.rst | 13 + .../docs/models/super_resolution/DRUNet.rst | 6 + .../docs/models/super_resolution/OFA_RCAN.rst | 6 + .../docs/models/super_resolution/SESR_S.rst | 6 + .../docs/models/super_resolution/index.rst | 12 + docsrc/source/index.rst | 37 +- model_zoo/README.md | 166 ++++ .../3DSegmentation/pt_salsanext/README.md | 167 ++++ .../3DSegmentation/pt_salsanext/config.env | 5 + .../pt_salsanext/requirements.txt | 2 + .../pt_salsanext/scripts/inference.sh | 66 ++ .../pt_salsanext/scripts/performance.sh | 68 ++ .../pt_salsanext/scripts/quality.sh | 32 + .../pt_salsanext/scripts/setup_venv.sh | 5 + .../pt_salsanext/scripts/vaitrace.sh | 76 ++ .../pt_salsanext/src/quality.py | 65 ++ .../classification/pt_inceptionv3/README.md | 144 ++++ .../classification/pt_inceptionv3/config.env | 6 + .../pt_inceptionv3/requirements.txt | 2 + .../pt_inceptionv3/scripts/inference.sh | 90 ++ .../pt_inceptionv3/scripts/performance.sh | 80 ++ .../pt_inceptionv3/scripts/quality.sh | 49 ++ .../pt_inceptionv3/scripts/setup_venv.sh | 5 + .../pt_inceptionv3/src/quality.py | 64 ++ .../classification/pt_resnet50/README.md | 145 ++++ .../classification/pt_resnet50/config.env | 6 + .../pt_resnet50/requirements.txt | 2 + .../pt_resnet50/scripts/inference.sh | 90 ++ .../pt_resnet50/scripts/performance.sh | 80 ++ .../pt_resnet50/scripts/quality.sh | 49 ++ .../pt_resnet50/scripts/setup_venv.sh | 5 + .../classification/pt_resnet50/src/quality.py | 110 +++ .../pt_vehicle-make-classification/README.md | 142 ++++ .../pt_vehicle-make-classification/config.env | 5 + .../requirements.txt | 2 + .../scripts/inference.sh | 89 ++ .../scripts/performance.sh | 80 ++ .../scripts/quality.sh | 49 ++ .../scripts/setup_venv.sh | 5 + .../src/quality.py | 63 ++ .../tf_efficientnet-edgetpu-S/README.md | 140 ++++ .../tf_efficientnet-edgetpu-S/config.env | 5 + .../requirements.txt | 2 + .../scripts/inference.sh | 90 ++ .../scripts/performance.sh | 80 ++ .../scripts/quality.sh | 49 ++ .../scripts/setup_venv.sh | 5 + .../tf_efficientnet-edgetpu-S/src/quality.py | 64 ++ .../classification/tf_resnetv1/README.md | 147 ++++ .../classification/tf_resnetv1/config.env | 6 + .../tf_resnetv1/requirements.txt | 2 + .../tf_resnetv1/scripts/inference.sh | 90 ++ .../tf_resnetv1/scripts/performance.sh | 80 ++ .../tf_resnetv1/scripts/quality.sh | 49 ++ .../tf_resnetv1/scripts/setup_venv.sh | 5 + .../classification/tf_resnetv1/src/quality.py | 105 +++ .../object_detection/pt_yolox-nano/README.md | 142 ++++ .../object_detection/pt_yolox-nano/config.env | 5 + .../pt_yolox-nano/requirements.txt | 1 + .../pt_yolox-nano/scripts/inference.sh | 84 ++ .../pt_yolox-nano/scripts/performance.sh | 80 ++ .../pt_yolox-nano/scripts/quality.sh | 49 ++ .../pt_yolox-nano/scripts/setup_venv.sh | 5 + .../pt_yolox-nano/src/quality.py | 107 +++ .../tf_mlperf_resnet34/README.md | 141 ++++ .../tf_mlperf_resnet34/config.env | 5 + .../tf_mlperf_resnet34/requirements.txt | 1 + .../tf_mlperf_resnet34/scripts/inference.sh | 84 ++ .../tf_mlperf_resnet34/scripts/performance.sh | 80 ++ .../tf_mlperf_resnet34/scripts/quality.sh | 49 ++ .../tf_mlperf_resnet34/scripts/setup_venv.sh | 5 + .../tf_mlperf_resnet34/src/quality.py | 107 +++ .../object_detection/tf_yolov4/README.md | 140 ++++ .../object_detection/tf_yolov4/config.env | 5 + .../tf_yolov4/requirements.txt | 1 + .../tf_yolov4/scripts/inference.sh | 84 ++ .../tf_yolov4/scripts/performance.sh | 80 ++ .../tf_yolov4/scripts/quality.sh | 49 ++ .../tf_yolov4/scripts/setup_venv.sh | 5 + .../object_detection/tf_yolov4/src/quality.py | 107 +++ .../models/segmentation/pt_ENet/README.md | 141 ++++ .../models/segmentation/pt_ENet/config.env | 5 + .../segmentation/pt_ENet/requirements.txt | 1 + .../segmentation/pt_ENet/scripts/inference.sh | 79 ++ .../pt_ENet/scripts/performance.sh | 80 ++ .../segmentation/pt_ENet/scripts/quality.sh | 49 ++ .../pt_ENet/scripts/setup_venv.sh | 5 + .../segmentation/pt_ENet/src/quality.py | 107 +++ .../segmentation/pt_SemanticFPN/README.md | 149 ++++ .../segmentation/pt_SemanticFPN/config.env | 5 + .../pt_SemanticFPN/requirements.txt | 1 + .../pt_SemanticFPN/scripts/inference.sh | 79 ++ .../pt_SemanticFPN/scripts/performance.sh | 80 ++ .../pt_SemanticFPN/scripts/quality.sh | 49 ++ .../pt_SemanticFPN/scripts/setup_venv.sh | 5 + .../pt_SemanticFPN/src/quality.py | 107 +++ .../models/segmentation/tf2_ERFNet/README.md | 140 ++++ .../models/segmentation/tf2_ERFNet/config.env | 5 + .../segmentation/tf2_ERFNet/requirements.txt | 1 + .../tf2_ERFNet/scripts/inference.sh | 79 ++ .../tf2_ERFNet/scripts/performance.sh | 80 ++ .../tf2_ERFNet/scripts/quality.sh | 49 ++ .../tf2_ERFNet/scripts/setup_venv.sh | 5 + .../segmentation/tf2_ERFNet/src/quality.py | 107 +++ .../super_resolution/pt_DRUNet/README.md | 204 +++++ .../super_resolution/pt_DRUNet/config.env | 5 + .../pt_DRUNet/requirements.txt | 3 + .../pt_DRUNet/scripts/inference.sh | 79 ++ .../pt_DRUNet/scripts/performance.sh | 80 ++ .../pt_DRUNet/scripts/quality.sh | 30 + .../pt_DRUNet/scripts/setup_venv.sh | 5 + .../super_resolution/pt_DRUNet/src/quality.py | 134 +++ .../super_resolution/pt_OFA-RCAN/README.md | 145 ++++ .../super_resolution/pt_OFA-RCAN/config.env | 5 + .../pt_OFA-RCAN/requirements.txt | 3 + .../pt_OFA-RCAN/scripts/inference.sh | 79 ++ .../pt_OFA-RCAN/scripts/performance.sh | 80 ++ .../pt_OFA-RCAN/scripts/quality.sh | 30 + .../pt_OFA-RCAN/scripts/setup_venv.sh | 5 + .../pt_OFA-RCAN/src/quality.py | 134 +++ .../super_resolution/pt_SESR-S/README.md | 152 ++++ .../super_resolution/pt_SESR-S/config.env | 5 + .../pt_SESR-S/requirements.txt | 3 + .../pt_SESR-S/scripts/inference.sh | 79 ++ .../pt_SESR-S/scripts/performance.sh | 80 ++ .../pt_SESR-S/scripts/quality.sh | 30 + .../pt_SESR-S/scripts/setup_venv.sh | 5 + .../super_resolution/pt_SESR-S/src/quality.py | 134 +++ model_zoo/scripts/build.sh | 14 + model_zoo/scripts/download_test_data.sh | 18 + model_zoo/scripts/make_artifacts_folders.sh | 7 + model_zoo/scripts/vaitrace.sh | 45 + 281 files changed, 17223 insertions(+), 5161 deletions(-) create mode 100755 .gitignore create mode 100644 docs/docs/board_setup/board_setup.html create mode 100644 docs/docs/board_setup/board_setup_alveo.html create mode 100644 docs/docs/board_setup/vai_install_to_target.html create mode 100644 docs/docs/install/install_on_aws.html create mode 100644 docs/docs/install/install_on_azure.html create mode 100644 docs/docs/petalinux-recipes.html create mode 100644 docs/docs/reference/dpu_nomenclature.html create mode 100644 docsrc/build/doctrees/docs/board_setup/board_setup.doctree create mode 100644 docsrc/build/doctrees/docs/board_setup/board_setup_alveo.doctree create mode 100644 docsrc/build/doctrees/docs/board_setup/vai_install_to_target.doctree create mode 100644 docsrc/build/doctrees/docs/install/install_on_aws.doctree create mode 100644 docsrc/build/doctrees/docs/install/install_on_azure.doctree create mode 100644 docsrc/build/doctrees/docs/petalinux-recipes.doctree create mode 100644 docsrc/build/doctrees/docs/reference/dpu_nomenclature.doctree create mode 100644 docsrc/build/html/docs/board_setup/board_setup.html create mode 100644 docsrc/build/html/docs/board_setup/board_setup_alveo.html create mode 100644 docsrc/build/html/docs/board_setup/vai_install_to_target.html create mode 100644 docsrc/build/html/docs/install/install_on_aws.html create mode 100644 docsrc/build/html/docs/install/install_on_azure.html create mode 100644 docsrc/build/html/docs/petalinux-recipes.html create mode 100644 docsrc/build/html/docs/reference/dpu_nomenclature.html create mode 100644 docsrc/build_model_cards.sh create mode 100644 docsrc/source/docs/getting-started-model-zoo.rst create mode 100644 docsrc/source/docs/models-overview.rst create mode 100644 docsrc/source/docs/models/3DSegmentation/index.rst create mode 100644 docsrc/source/docs/models/3DSegmentation/salsanext.rst create mode 100644 docsrc/source/docs/models/classification/efficientnet-edgetpu-s.rst create mode 100644 docsrc/source/docs/models/classification/inceptionv3.rst create mode 100644 docsrc/source/docs/models/classification/index.rst create mode 100644 docsrc/source/docs/models/classification/resnet50.rst create mode 100644 docsrc/source/docs/models/classification/resnetv1.rst create mode 100644 docsrc/source/docs/models/classification/vehicle_make.rst create mode 100644 docsrc/source/docs/models/object_detection/index.rst create mode 100644 docsrc/source/docs/models/object_detection/ssd_resnet34.rst create mode 100644 docsrc/source/docs/models/object_detection/yolov4.rst create mode 100644 docsrc/source/docs/models/object_detection/yolox_nano.rst create mode 100644 docsrc/source/docs/models/segmentation/ENet.rst create mode 100644 docsrc/source/docs/models/segmentation/ERFNet.rst create mode 100644 docsrc/source/docs/models/segmentation/SemanticFPN.rst create mode 100644 docsrc/source/docs/models/segmentation/index.rst create mode 100644 docsrc/source/docs/models/super_resolution/DRUNet.rst create mode 100644 docsrc/source/docs/models/super_resolution/OFA_RCAN.rst create mode 100644 docsrc/source/docs/models/super_resolution/SESR_S.rst create mode 100644 docsrc/source/docs/models/super_resolution/index.rst create mode 100644 model_zoo/models/3DSegmentation/pt_salsanext/README.md create mode 100644 model_zoo/models/3DSegmentation/pt_salsanext/config.env create mode 100644 model_zoo/models/3DSegmentation/pt_salsanext/requirements.txt create mode 100644 model_zoo/models/3DSegmentation/pt_salsanext/scripts/inference.sh create mode 100644 model_zoo/models/3DSegmentation/pt_salsanext/scripts/performance.sh create mode 100644 model_zoo/models/3DSegmentation/pt_salsanext/scripts/quality.sh create mode 100644 model_zoo/models/3DSegmentation/pt_salsanext/scripts/setup_venv.sh create mode 100644 model_zoo/models/3DSegmentation/pt_salsanext/scripts/vaitrace.sh create mode 100644 model_zoo/models/3DSegmentation/pt_salsanext/src/quality.py create mode 100644 model_zoo/models/classification/pt_inceptionv3/README.md create mode 100644 model_zoo/models/classification/pt_inceptionv3/config.env create mode 100644 model_zoo/models/classification/pt_inceptionv3/requirements.txt create mode 100644 model_zoo/models/classification/pt_inceptionv3/scripts/inference.sh create mode 100644 model_zoo/models/classification/pt_inceptionv3/scripts/performance.sh create mode 100644 model_zoo/models/classification/pt_inceptionv3/scripts/quality.sh create mode 100644 model_zoo/models/classification/pt_inceptionv3/scripts/setup_venv.sh create mode 100644 model_zoo/models/classification/pt_inceptionv3/src/quality.py create mode 100644 model_zoo/models/classification/pt_resnet50/README.md create mode 100644 model_zoo/models/classification/pt_resnet50/config.env create mode 100644 model_zoo/models/classification/pt_resnet50/requirements.txt create mode 100644 model_zoo/models/classification/pt_resnet50/scripts/inference.sh create mode 100644 model_zoo/models/classification/pt_resnet50/scripts/performance.sh create mode 100644 model_zoo/models/classification/pt_resnet50/scripts/quality.sh create mode 100644 model_zoo/models/classification/pt_resnet50/scripts/setup_venv.sh create mode 100644 model_zoo/models/classification/pt_resnet50/src/quality.py create mode 100644 model_zoo/models/classification/pt_vehicle-make-classification/README.md create mode 100644 model_zoo/models/classification/pt_vehicle-make-classification/config.env create mode 100644 model_zoo/models/classification/pt_vehicle-make-classification/requirements.txt create mode 100644 model_zoo/models/classification/pt_vehicle-make-classification/scripts/inference.sh create mode 100644 model_zoo/models/classification/pt_vehicle-make-classification/scripts/performance.sh create mode 100644 model_zoo/models/classification/pt_vehicle-make-classification/scripts/quality.sh create mode 100644 model_zoo/models/classification/pt_vehicle-make-classification/scripts/setup_venv.sh create mode 100644 model_zoo/models/classification/pt_vehicle-make-classification/src/quality.py create mode 100644 model_zoo/models/classification/tf_efficientnet-edgetpu-S/README.md create mode 100644 model_zoo/models/classification/tf_efficientnet-edgetpu-S/config.env create mode 100644 model_zoo/models/classification/tf_efficientnet-edgetpu-S/requirements.txt create mode 100644 model_zoo/models/classification/tf_efficientnet-edgetpu-S/scripts/inference.sh create mode 100644 model_zoo/models/classification/tf_efficientnet-edgetpu-S/scripts/performance.sh create mode 100644 model_zoo/models/classification/tf_efficientnet-edgetpu-S/scripts/quality.sh create mode 100644 model_zoo/models/classification/tf_efficientnet-edgetpu-S/scripts/setup_venv.sh create mode 100644 model_zoo/models/classification/tf_efficientnet-edgetpu-S/src/quality.py create mode 100644 model_zoo/models/classification/tf_resnetv1/README.md create mode 100644 model_zoo/models/classification/tf_resnetv1/config.env create mode 100644 model_zoo/models/classification/tf_resnetv1/requirements.txt create mode 100644 model_zoo/models/classification/tf_resnetv1/scripts/inference.sh create mode 100644 model_zoo/models/classification/tf_resnetv1/scripts/performance.sh create mode 100644 model_zoo/models/classification/tf_resnetv1/scripts/quality.sh create mode 100644 model_zoo/models/classification/tf_resnetv1/scripts/setup_venv.sh create mode 100644 model_zoo/models/classification/tf_resnetv1/src/quality.py create mode 100644 model_zoo/models/object_detection/pt_yolox-nano/README.md create mode 100644 model_zoo/models/object_detection/pt_yolox-nano/config.env create mode 100644 model_zoo/models/object_detection/pt_yolox-nano/requirements.txt create mode 100644 model_zoo/models/object_detection/pt_yolox-nano/scripts/inference.sh create mode 100644 model_zoo/models/object_detection/pt_yolox-nano/scripts/performance.sh create mode 100644 model_zoo/models/object_detection/pt_yolox-nano/scripts/quality.sh create mode 100644 model_zoo/models/object_detection/pt_yolox-nano/scripts/setup_venv.sh create mode 100644 model_zoo/models/object_detection/pt_yolox-nano/src/quality.py create mode 100644 model_zoo/models/object_detection/tf_mlperf_resnet34/README.md create mode 100644 model_zoo/models/object_detection/tf_mlperf_resnet34/config.env create mode 100644 model_zoo/models/object_detection/tf_mlperf_resnet34/requirements.txt create mode 100644 model_zoo/models/object_detection/tf_mlperf_resnet34/scripts/inference.sh create mode 100644 model_zoo/models/object_detection/tf_mlperf_resnet34/scripts/performance.sh create mode 100644 model_zoo/models/object_detection/tf_mlperf_resnet34/scripts/quality.sh create mode 100644 model_zoo/models/object_detection/tf_mlperf_resnet34/scripts/setup_venv.sh create mode 100644 model_zoo/models/object_detection/tf_mlperf_resnet34/src/quality.py create mode 100644 model_zoo/models/object_detection/tf_yolov4/README.md create mode 100644 model_zoo/models/object_detection/tf_yolov4/config.env create mode 100644 model_zoo/models/object_detection/tf_yolov4/requirements.txt create mode 100644 model_zoo/models/object_detection/tf_yolov4/scripts/inference.sh create mode 100644 model_zoo/models/object_detection/tf_yolov4/scripts/performance.sh create mode 100644 model_zoo/models/object_detection/tf_yolov4/scripts/quality.sh create mode 100644 model_zoo/models/object_detection/tf_yolov4/scripts/setup_venv.sh create mode 100644 model_zoo/models/object_detection/tf_yolov4/src/quality.py create mode 100644 model_zoo/models/segmentation/pt_ENet/README.md create mode 100644 model_zoo/models/segmentation/pt_ENet/config.env create mode 100644 model_zoo/models/segmentation/pt_ENet/requirements.txt create mode 100644 model_zoo/models/segmentation/pt_ENet/scripts/inference.sh create mode 100644 model_zoo/models/segmentation/pt_ENet/scripts/performance.sh create mode 100644 model_zoo/models/segmentation/pt_ENet/scripts/quality.sh create mode 100644 model_zoo/models/segmentation/pt_ENet/scripts/setup_venv.sh create mode 100644 model_zoo/models/segmentation/pt_ENet/src/quality.py create mode 100644 model_zoo/models/segmentation/pt_SemanticFPN/README.md create mode 100644 model_zoo/models/segmentation/pt_SemanticFPN/config.env create mode 100644 model_zoo/models/segmentation/pt_SemanticFPN/requirements.txt create mode 100644 model_zoo/models/segmentation/pt_SemanticFPN/scripts/inference.sh create mode 100644 model_zoo/models/segmentation/pt_SemanticFPN/scripts/performance.sh create mode 100644 model_zoo/models/segmentation/pt_SemanticFPN/scripts/quality.sh create mode 100644 model_zoo/models/segmentation/pt_SemanticFPN/scripts/setup_venv.sh create mode 100644 model_zoo/models/segmentation/pt_SemanticFPN/src/quality.py create mode 100644 model_zoo/models/segmentation/tf2_ERFNet/README.md create mode 100644 model_zoo/models/segmentation/tf2_ERFNet/config.env create mode 100644 model_zoo/models/segmentation/tf2_ERFNet/requirements.txt create mode 100644 model_zoo/models/segmentation/tf2_ERFNet/scripts/inference.sh create mode 100644 model_zoo/models/segmentation/tf2_ERFNet/scripts/performance.sh create mode 100644 model_zoo/models/segmentation/tf2_ERFNet/scripts/quality.sh create mode 100644 model_zoo/models/segmentation/tf2_ERFNet/scripts/setup_venv.sh create mode 100644 model_zoo/models/segmentation/tf2_ERFNet/src/quality.py create mode 100644 model_zoo/models/super_resolution/pt_DRUNet/README.md create mode 100644 model_zoo/models/super_resolution/pt_DRUNet/config.env create mode 100644 model_zoo/models/super_resolution/pt_DRUNet/requirements.txt create mode 100644 model_zoo/models/super_resolution/pt_DRUNet/scripts/inference.sh create mode 100644 model_zoo/models/super_resolution/pt_DRUNet/scripts/performance.sh create mode 100644 model_zoo/models/super_resolution/pt_DRUNet/scripts/quality.sh create mode 100644 model_zoo/models/super_resolution/pt_DRUNet/scripts/setup_venv.sh create mode 100644 model_zoo/models/super_resolution/pt_DRUNet/src/quality.py create mode 100644 model_zoo/models/super_resolution/pt_OFA-RCAN/README.md create mode 100644 model_zoo/models/super_resolution/pt_OFA-RCAN/config.env create mode 100644 model_zoo/models/super_resolution/pt_OFA-RCAN/requirements.txt create mode 100644 model_zoo/models/super_resolution/pt_OFA-RCAN/scripts/inference.sh create mode 100644 model_zoo/models/super_resolution/pt_OFA-RCAN/scripts/performance.sh create mode 100644 model_zoo/models/super_resolution/pt_OFA-RCAN/scripts/quality.sh create mode 100644 model_zoo/models/super_resolution/pt_OFA-RCAN/scripts/setup_venv.sh create mode 100644 model_zoo/models/super_resolution/pt_OFA-RCAN/src/quality.py create mode 100644 model_zoo/models/super_resolution/pt_SESR-S/README.md create mode 100644 model_zoo/models/super_resolution/pt_SESR-S/config.env create mode 100644 model_zoo/models/super_resolution/pt_SESR-S/requirements.txt create mode 100644 model_zoo/models/super_resolution/pt_SESR-S/scripts/inference.sh create mode 100644 model_zoo/models/super_resolution/pt_SESR-S/scripts/performance.sh create mode 100644 model_zoo/models/super_resolution/pt_SESR-S/scripts/quality.sh create mode 100644 model_zoo/models/super_resolution/pt_SESR-S/scripts/setup_venv.sh create mode 100644 model_zoo/models/super_resolution/pt_SESR-S/src/quality.py create mode 100644 model_zoo/scripts/build.sh create mode 100644 model_zoo/scripts/download_test_data.sh create mode 100644 model_zoo/scripts/make_artifacts_folders.sh create mode 100644 model_zoo/scripts/vaitrace.sh diff --git a/.gitignore b/.gitignore new file mode 100755 index 000000000..91b0961f7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +# MacOS temporary files +.DS_Store + +# Temporary file generated after docker_run +.confirm + +# IntelliJ IDEA files +.idea + +# Artifact folders in the Model Zoo +model_zoo/models/*/*/artifacts + + +/docs/ +/docsrc/build/ diff --git a/docker_run.sh b/docker_run.sh index 54108a97e..681c8adb4 100755 --- a/docker_run.sh +++ b/docker_run.sh @@ -77,6 +77,7 @@ docker_run_params=$(cat <<-END -v /opt/xilinx/dsa:/opt/xilinx/dsa \ -v /opt/xilinx/overlaybins:/opt/xilinx/overlaybins \ -e USER=$user -e UID=$uid -e GID=$gid \ + -v /sys/kernel/debug:/sys/kernel/debug --privileged=true \ -v $DOCKER_RUN_DIR:/vitis_ai_home \ -v $HERE:/workspace \ -w /workspace \ diff --git a/docs/_sources/index.rst.txt b/docs/_sources/index.rst.txt index 4c89d402c..36b802d41 100644 --- a/docs/_sources/index.rst.txt +++ b/docs/_sources/index.rst.txt @@ -1,5 +1,5 @@ .. - Copyright 2023 Advanced Micro Devices, Inc. + Copyright 2022 Xilinx Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -18,146 +18,114 @@ Vitis AI ############################################################ -AMD Vitis™ AI is an integrated development environment that can be leveraged to accelerate AI inference on AMD platforms. This toolchain provides optimized IP, tools, libraries, models, as well as resources, such as example designs and tutorials that aid the user throughout the development process. It is designed with high efficiency and ease-of-use in mind, unleashing the full potential of AI acceleration on AMD Adaptable SoCs and Alveo Data Center accelerator cards. +Xilinx® Vitis™ AI is an integrated development environment that can be leveraged to accelerate AI inference on Xilinx platforms. This toolchain provides optimized IP, tools, libraries, models, as well as resources, such as example designs and tutorials that aid the user throughout the development process. It is designed with high efficiency and ease-of-use in mind, unleashing the full potential of AI acceleration on Xilinx SoCs and Alveo™ Data Center accelerator cards. .. figure:: docs/reference/images/VAI_IDE.png :width: 1300 Vitis AI Integrated Development Environment Block Diagram -The Vitis |trade| AI solution consists of three primary components: - -- The Deep-Learning Processor unit (DPU), a hardware engine for optimized the inferencing of ML models -- Model development tools, to compile and optimize ML models for the DPU -- Model deployment libraries and APIs, to integrate and execute the ML models on the DPU engine from a SW application - -The Vitis AI solution is packaged and delivered as follows: - -- AMD open download: pre-built target images integrating the DPU -- Vitis AI docker containers: model development tools -- Vitis AI github repository: model deployment libraries, setup scripts, examples and reference designs - ############################################################ Vitis AI Key Components ############################################################ -**************************** -Deep-Learning Processor Unit -**************************** - -The :ref:`Deep-learning Processor Unit (DPU) ` is a programmable engine optimized for deep neural networks. The DPU implements an efficient tensor-level instruction set designed to support and accelerate various popular convolutional neural networks, such as VGG, ResNet, GoogLeNet, YOLO, SSD, and MobileNet, among others. - -The DPU supports on AMD Zynq |trade| UltraScale+ |trade| MPSoCs, the Kria |trade| KV260, Versal |trade| and Alveo cards. It scales to meet the requirements of many diverse applications in terms of throughput, latency, scalability, and power. - -AMD provides pre-built platforms integrating the DPU engine for both edge and data-center cards. These pre-built platforms allow data-scientists to start developping and testing their models without any need for HW development expertise. - -For embedded applications, the DPU needs to be integrated in a custom platform along with the other programmable logic functions going in the FPGA or adaptive SoC device. HW designers can :ref:`integrate the DPU in a custom platform ` using either the Vitis flow or the Vivado |trade| Design Suite. - - -***************** -Model Development -***************** - -Vitis AI Model Zoo -================== -The :ref:`Vitis AI Model Zoo ` includes optimized deep learning models to speed up the deployment of deep learning inference on adaptable AMD platforms. These models cover different applications, including ADAS/AD, video surveillance, robotics, and data center. You can get started with these pre-trained models to enjoy the benefits of deep learning acceleration. - -Vitis AI Model Inspector -======================== -The :ref:`Vitis AI Model Inspector ` is used to perform initial sanity checks to confirm that the operators and sequence of operators in the graph is compatible with Vitis AI. Novel neural network architectures, operators, and activation types are constantly being developed and optimized for prediction accuracy and performance. Vitis AI provides mechanisms to leverage operators that are not natively supported by your specific DPU target. +Vitis AI is composed of the following key components: -Vitis AI Optimizer -================== -The :ref:`Vitis AI Optimizer ` exploits the notion of sparsity to reduce the overall computational complexity for inference by 5x to 50x with minimal accuracy degradation. Many deep neural network topologies employ significant levels of redundancy. This is particularly true when the network backbone is optimized for prediction accuracy with training datasets supporting many classes. In many cases, this redundancy can be reduced by “pruning” some of the operations out of the graph. -Vitis AI Quantizer -================== -The :ref:`Vitis AI Quantizer `, integrated as a component of either TensorFlow or PyTorch, converts 32-bit floating-point weights and activations to fixed-point integers like INT8 to reduce the computing complexity without losing prediction accuracy. The fixed-point network model requires less memory bandwidth and provides faster speed and higher power efficiency than the floating-point model. +* **DPUs** - Configurable computation engines optimized for convolution neural networks. Efficient and scalable IP cores that can be customized to meet the needs of many different applications and devices. +* **Model Zoo** - A comprehensive set of pre-trained and pre-optimized models that are ready to deploy on Xilinx devices. +* **Model Inspector** - A tool and methodology through which developers can verify model architecture support. +* **Optimizer** - An optional, commercially licensed tool that enables users to prune a model by up to 90%. +* **Quantizer** - A powerful quantizer that supports model quantization, calibration, and fine tuning. +* **Compiler** - Compiles the quantized model for execution on the target DPU accelerator. +* **Runtime (VART)** - An inference runtime for Embedded applications. +* **Profiler** - Performs an in-depth analysis of the efficiency and utilization of AI inference implementations on the DPU. +* **Library** - Offers high-level C++ APIs for AI applications for embedded and data center use-cases. -Vitis AI Compiler -================= -The :ref:`Vitis AI Compiler ` maps the AI quantized model to a highly-efficient instruction set and dataflow model. The compiler performs multiple optimizations; for example, batch normalization operations are fused with convolution when the convolution operator precedes the normalization operator. As the DPU supports multiple dimensions of parallelism, efficient instruction scheduling is key to exploiting the inherent parallelism and potential for data reuse in the graph. The Vitis AI Compiler addresses such optimizations. +.. toctree:: + :maxdepth: 3 + :caption: Vitis AI Introduction + :hidden: -**************** -Model Deployment -**************** + Overview -Vitis AI Runtime -================ -The :ref:`Vitis AI Runtime ` (VART) is a set of low-level API functions that support the integration of the DPU into software applications. VART is built on top of the Xilinx Runtime (XRT) amd provides a unified high-level runtime for both Data Center and Embedded targets. Key features of the Vitis AI Runtime API include: +.. toctree:: + :maxdepth: 3 + :caption: Release Notes + :hidden: -- Asynchronous submission of jobs to the DPU. -- Asynchronous collection of jobs from the DPU. -- C++ and Python API implementations. -- Support for multi-threading and multi-process execution. + Current Release +.. toctree:: + :maxdepth: 3 + :caption: Installation + :hidden: -Vitis AI Library -================ -The :ref:`Vitis AI Library ` is a set of high-level libraries and APIs built on top of the Vitis AI Runtime (VART). The higher-level APIs included in the Vitis AI Library give developers a head-start on model deployment. While it is possible for developers to directly leverage the Vitis AI Runtime APIs to deploy a model on AMD platforms, it is often more beneficial to start with a ready-made example that incorporates the various elements of a typical application, including: + System Requirements + Host Install Instructions + Target Setup Instructions -- Simplified CPU-based pre and post-processing implementations. -- Vitis AI Runtime integration at an application level. +.. toctree:: + :maxdepth: 3 + :caption: Model Zoo + :hidden: + Pre-trained, Optimized Models + Getting started + Models overview -Vitis AI Profiler -================= -The :ref:`Vitis AI Profiler ` profiles and visualizes AI applications to find bottlenecks and allocates computing resources among different devices. It is easy to use and requires no code changes. It can trace function calls and run time, and also collect hardware information, including CPU, DPU, and memory utilization. +.. toctree:: + :maxdepth: 3 + :caption: Model Development + :hidden: + Developing a NN Model for Vitis AI +.. toctree:: + :maxdepth: 3 + :caption: Model Deployment + :hidden: + Deploying a NN Model with Vitis AI .. toctree:: :maxdepth: 3 - :caption: Setup and Install + :caption: System Integration :hidden: - - Release Notes - System Requirements - Host Install Instructions + + Integrating the DPU .. toctree:: :maxdepth: 3 - :caption: Quick Start Guides + :caption: Third-Party Tools :hidden: - Zynq™ Ultrascale+™ - Versal™ VCK5000 Development Card - Versal™ AI Core VCK190 - - + TVM, TensorFlow Lite, ONNX Runtime .. toctree:: :maxdepth: 3 - :caption: Workflow and Components + :caption: Release Documentation :hidden: - Overview - DPU IP Details and System Integration - Vitis™ AI Model Zoo - Developing a Model for Vitis AI - Deploying a Model with Vitis AI - + Formal Vitis AI Documents + .. toctree:: :maxdepth: 3 - :caption: Reference Designs + :caption: Vitis AI Tutorials :hidden: -.. Zynq MPSoC / Kria K26 -.. Versal / VCK190 + Vitis AI Developer Tutorials .. toctree:: :maxdepth: 3 - :caption: Additional Information + :caption: Related Solutions :hidden: - Vitis™ AI User Guides & IP Product Guides - Vitis™ AI Developer Tutorials - Third-party Inference Stack Integration - IP and Tools Compatibility - Frequently Asked Questions - Branching and Tagging Strategy + AMD Inference Server + Vitis Video Analytics SDK + FINN & Brevitas + DPU-PYNQ .. toctree:: :maxdepth: 3 @@ -165,22 +133,10 @@ The :ref:`Vitis AI Profiler ` profiles and visualizes AI appl :hidden: Resources and Support - + .. toctree:: :maxdepth: 3 - :caption: Related AMD Solutions + :caption: FAQ :hidden: - DPU-PYNQ - FINN & Brevitas - Inference Server - Unified Inference Frontend - Ryzen™ AI Developer Guide ~July 29 - Vitis™ AI ONNX Runtime Execution Provider - Vitis™ Video Analytics SDK - - -.. |trade| unicode:: U+02122 .. TRADEMARK SIGN - :ltrim: -.. |reg| unicode:: U+02122 .. TRADEMARK SIGN - :ltrim: \ No newline at end of file + Frequently Asked Questions diff --git a/docs/_static/basic.css b/docs/_static/basic.css index 088967717..bf18350b6 100644 --- a/docs/_static/basic.css +++ b/docs/_static/basic.css @@ -222,7 +222,7 @@ table.modindextable td { /* -- general body styles --------------------------------------------------- */ div.body { - min-width: 360px; + min-width: 450px; max-width: 800px; } @@ -237,6 +237,16 @@ a.headerlink { visibility: hidden; } +a.brackets:before, +span.brackets > a:before{ + content: "["; +} + +a.brackets:after, +span.brackets > a:after { + content: "]"; +} + h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, @@ -324,16 +334,12 @@ aside.sidebar { p.sidebar-title { font-weight: bold; } -nav.contents, -aside.topic, div.admonition, div.topic, blockquote { clear: left; } /* -- topics ---------------------------------------------------------------- */ -nav.contents, -aside.topic, div.topic { border: 1px solid #ccc; @@ -373,9 +379,6 @@ div.body p.centered { div.sidebar > :last-child, aside.sidebar > :last-child, -nav.contents > :last-child, -aside.topic > :last-child, - div.topic > :last-child, div.admonition > :last-child { margin-bottom: 0; @@ -383,9 +386,6 @@ div.admonition > :last-child { div.sidebar::after, aside.sidebar::after, -nav.contents::after, -aside.topic::after, - div.topic::after, div.admonition::after, blockquote::after { @@ -428,6 +428,10 @@ table.docutils td, table.docutils th { border-bottom: 1px solid #aaa; } +table.footnote td, table.footnote th { + border: 0 !important; +} + th { text-align: left; padding-right: 5px; @@ -611,7 +615,6 @@ ul.simple p { margin-bottom: 0; } -/* Docutils 0.17 and older (footnotes & citations) */ dl.footnote > dt, dl.citation > dt { float: left; @@ -629,33 +632,6 @@ dl.citation > dd:after { clear: both; } -/* Docutils 0.18+ (footnotes & citations) */ -aside.footnote > span, -div.citation > span { - float: left; -} -aside.footnote > span:last-of-type, -div.citation > span:last-of-type { - padding-right: 0.5em; -} -aside.footnote > p { - margin-left: 2em; -} -div.citation > p { - margin-left: 4em; -} -aside.footnote > p:last-of-type, -div.citation > p:last-of-type { - margin-bottom: 0em; -} -aside.footnote > p:last-of-type:after, -div.citation > p:last-of-type:after { - content: ""; - clear: both; -} - -/* Footnotes & citations ends */ - dl.field-list { display: grid; grid-template-columns: fit-content(30%) auto; diff --git a/docs/_static/doctools.js b/docs/_static/doctools.js index c3db08d1c..e1bfd708b 100644 --- a/docs/_static/doctools.js +++ b/docs/_static/doctools.js @@ -2,263 +2,357 @@ * doctools.js * ~~~~~~~~~~~ * - * Base JavaScript utilities for all Sphinx HTML documentation. + * Sphinx JavaScript utilities for all documentation. * * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ -"use strict"; -const _ready = (callback) => { - if (document.readyState !== "loading") { - callback(); - } else { - document.addEventListener("DOMContentLoaded", callback); +/** + * select a different prefix for underscore + */ +$u = _.noConflict(); + +/** + * make the code below compatible with browsers without + * an installed firebug like debugger +if (!window.console || !console.firebug) { + var names = ["log", "debug", "info", "warn", "error", "assert", "dir", + "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", + "profile", "profileEnd"]; + window.console = {}; + for (var i = 0; i < names.length; ++i) + window.console[names[i]] = function() {}; +} + */ + +/** + * small helper function to urldecode strings + * + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL + */ +jQuery.urldecode = function(x) { + if (!x) { + return x } + return decodeURIComponent(x.replace(/\+/g, ' ')); }; /** - * highlight a given string on a node by wrapping it in - * span elements with the given class name. + * small helper function to urlencode strings */ -const _highlight = (node, addItems, text, className) => { - if (node.nodeType === Node.TEXT_NODE) { - const val = node.nodeValue; - const parent = node.parentNode; - const pos = val.toLowerCase().indexOf(text); - if ( - pos >= 0 && - !parent.classList.contains(className) && - !parent.classList.contains("nohighlight") - ) { - let span; +jQuery.urlencode = encodeURIComponent; - const closestNode = parent.closest("body, svg, foreignObject"); - const isInSVG = closestNode && closestNode.matches("svg"); - if (isInSVG) { - span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); - } else { - span = document.createElement("span"); - span.classList.add(className); - } +/** + * This function returns the parsed url parameters of the + * current request. Multiple values per key are supported, + * it will always return arrays of strings for the value parts. + */ +jQuery.getQueryParameters = function(s) { + if (typeof s === 'undefined') + s = document.location.search; + var parts = s.substr(s.indexOf('?') + 1).split('&'); + var result = {}; + for (var i = 0; i < parts.length; i++) { + var tmp = parts[i].split('=', 2); + var key = jQuery.urldecode(tmp[0]); + var value = jQuery.urldecode(tmp[1]); + if (key in result) + result[key].push(value); + else + result[key] = [value]; + } + return result; +}; - span.appendChild(document.createTextNode(val.substr(pos, text.length))); - parent.insertBefore( - span, - parent.insertBefore( +/** + * highlight a given string on a jquery object by wrapping it in + * span elements with the given class name. + */ +jQuery.fn.highlightText = function(text, className) { + function highlight(node, addItems) { + if (node.nodeType === 3) { + var val = node.nodeValue; + var pos = val.toLowerCase().indexOf(text); + if (pos >= 0 && + !jQuery(node.parentNode).hasClass(className) && + !jQuery(node.parentNode).hasClass("nohighlight")) { + var span; + var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.className = className; + } + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + node.parentNode.insertBefore(span, node.parentNode.insertBefore( document.createTextNode(val.substr(pos + text.length)), - node.nextSibling - ) - ); - node.nodeValue = val.substr(0, pos); - - if (isInSVG) { - const rect = document.createElementNS( - "http://www.w3.org/2000/svg", - "rect" - ); - const bbox = parent.getBBox(); - rect.x.baseVal.value = bbox.x; - rect.y.baseVal.value = bbox.y; - rect.width.baseVal.value = bbox.width; - rect.height.baseVal.value = bbox.height; - rect.setAttribute("class", className); - addItems.push({ parent: parent, target: rect }); + node.nextSibling)); + node.nodeValue = val.substr(0, pos); + if (isInSVG) { + var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); + var bbox = node.parentElement.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute('class', className); + addItems.push({ + "parent": node.parentNode, + "target": rect}); + } } } - } else if (node.matches && !node.matches("button, select, textarea")) { - node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); + else if (!jQuery(node).is("button, select, textarea")) { + jQuery.each(node.childNodes, function() { + highlight(this, addItems); + }); + } } -}; -const _highlightText = (thisNode, text, className) => { - let addItems = []; - _highlight(thisNode, addItems, text, className); - addItems.forEach((obj) => - obj.parent.insertAdjacentElement("beforebegin", obj.target) - ); + var addItems = []; + var result = this.each(function() { + highlight(this, addItems); + }); + for (var i = 0; i < addItems.length; ++i) { + jQuery(addItems[i].parent).before(addItems[i].target); + } + return result; }; +/* + * backward compatibility for jQuery.browser + * This will be supported until firefox bug is fixed. + */ +if (!jQuery.browser) { + jQuery.uaMatch = function(ua) { + ua = ua.toLowerCase(); + + var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || + /(webkit)[ \/]([\w.]+)/.exec(ua) || + /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || + /(msie) ([\w.]+)/.exec(ua) || + ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || + []; + + return { + browser: match[ 1 ] || "", + version: match[ 2 ] || "0" + }; + }; + jQuery.browser = {}; + jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; +} + /** * Small JavaScript module for the documentation. */ -const Documentation = { - init: () => { - Documentation.highlightSearchWords(); - Documentation.initDomainIndexTable(); - Documentation.initOnKeyListeners(); +var Documentation = { + + init : function() { + this.fixFirefoxAnchorBug(); + this.highlightSearchWords(); + this.initIndexTable(); + this.initOnKeyListeners(); }, /** * i18n support */ - TRANSLATIONS: {}, - PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), - LOCALE: "unknown", + TRANSLATIONS : {}, + PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; }, + LOCALE : 'unknown', // gettext and ngettext don't access this so that the functions // can safely bound to a different name (_ = Documentation.gettext) - gettext: (string) => { - const translated = Documentation.TRANSLATIONS[string]; - switch (typeof translated) { - case "undefined": - return string; // no translation - case "string": - return translated; // translation exists - default: - return translated[0]; // (singular, plural) translation tuple exists - } + gettext : function(string) { + var translated = Documentation.TRANSLATIONS[string]; + if (typeof translated === 'undefined') + return string; + return (typeof translated === 'string') ? translated : translated[0]; }, - ngettext: (singular, plural, n) => { - const translated = Documentation.TRANSLATIONS[singular]; - if (typeof translated !== "undefined") - return translated[Documentation.PLURAL_EXPR(n)]; - return n === 1 ? singular : plural; + ngettext : function(singular, plural, n) { + var translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated === 'undefined') + return (n == 1) ? singular : plural; + return translated[Documentation.PLURALEXPR(n)]; }, - addTranslations: (catalog) => { - Object.assign(Documentation.TRANSLATIONS, catalog.messages); - Documentation.PLURAL_EXPR = new Function( - "n", - `return (${catalog.plural_expr})` - ); - Documentation.LOCALE = catalog.locale; + addTranslations : function(catalog) { + for (var key in catalog.messages) + this.TRANSLATIONS[key] = catalog.messages[key]; + this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); + this.LOCALE = catalog.locale; }, /** - * highlight the search words provided in the url in the text + * add context elements like header anchor links */ - highlightSearchWords: () => { - const highlight = - new URLSearchParams(window.location.search).get("highlight") || ""; - const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); - if (terms.length === 0) return; // nothing to do + addContextElements : function() { + $('div[id] > :header:first').each(function() { + $('\u00B6'). + attr('href', '#' + this.id). + attr('title', _('Permalink to this headline')). + appendTo(this); + }); + $('dt[id]').each(function() { + $('\u00B6'). + attr('href', '#' + this.id). + attr('title', _('Permalink to this definition')). + appendTo(this); + }); + }, - // There should never be more than one element matching "div.body" - const divBody = document.querySelectorAll("div.body"); - const body = divBody.length ? divBody[0] : document.querySelector("body"); - window.setTimeout(() => { - terms.forEach((term) => _highlightText(body, term, "highlighted")); - }, 10); + /** + * workaround a firefox stupidity + * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 + */ + fixFirefoxAnchorBug : function() { + if (document.location.hash && $.browser.mozilla) + window.setTimeout(function() { + document.location.href += ''; + }, 10); + }, - const searchBox = document.getElementById("searchbox"); - if (searchBox === null) return; - searchBox.appendChild( - document - .createRange() - .createContextualFragment( - '" - ) - ); + /** + * highlight the search words provided in the url in the text + */ + highlightSearchWords : function() { + var params = $.getQueryParameters(); + var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; + if (terms.length) { + var body = $('div.body'); + if (!body.length) { + body = $('body'); + } + window.setTimeout(function() { + $.each(terms, function() { + body.highlightText(this.toLowerCase(), 'highlighted'); + }); + }, 10); + $('') + .appendTo($('#searchbox')); + } }, /** - * helper function to hide the search marks again + * init the domain index toggle buttons */ - hideSearchWords: () => { - document - .querySelectorAll("#searchbox .highlight-link") - .forEach((el) => el.remove()); - document - .querySelectorAll("span.highlighted") - .forEach((el) => el.classList.remove("highlighted")); - const url = new URL(window.location); - url.searchParams.delete("highlight"); - window.history.replaceState({}, "", url); + initIndexTable : function() { + var togglers = $('img.toggler').click(function() { + var src = $(this).attr('src'); + var idnum = $(this).attr('id').substr(7); + $('tr.cg-' + idnum).toggle(); + if (src.substr(-9) === 'minus.png') + $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); + else + $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); + }).css('display', ''); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { + togglers.click(); + } }, /** + * helper function to hide the search marks again + */ + hideSearchWords : function() { + $('#searchbox .highlight-link').fadeOut(300); + $('span.highlighted').removeClass('highlighted'); + var url = new URL(window.location); + url.searchParams.delete('highlight'); + window.history.replaceState({}, '', url); + }, + + /** * helper function to focus on search bar */ - focusSearchBar: () => { - document.querySelectorAll("input[name=q]")[0]?.focus(); + focusSearchBar : function() { + $('input[name=q]').first().focus(); }, /** - * Initialise the domain index toggle buttons + * make the url absolute */ - initDomainIndexTable: () => { - const toggler = (el) => { - const idNumber = el.id.substr(7); - const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); - if (el.src.substr(-9) === "minus.png") { - el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; - toggledRows.forEach((el) => (el.style.display = "none")); - } else { - el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; - toggledRows.forEach((el) => (el.style.display = "")); - } - }; + makeURL : function(relativeURL) { + return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; + }, - const togglerElements = document.querySelectorAll("img.toggler"); - togglerElements.forEach((el) => - el.addEventListener("click", (event) => toggler(event.currentTarget)) - ); - togglerElements.forEach((el) => (el.style.display = "")); - if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); + /** + * get the current relative url + */ + getCurrentURL : function() { + var path = document.location.pathname; + var parts = path.split(/\//); + $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { + if (this === '..') + parts.pop(); + }); + var url = parts.join('/'); + return path.substring(url.lastIndexOf('/') + 1, path.length - 1); }, - initOnKeyListeners: () => { + initOnKeyListeners: function() { // only install a listener if it is really needed - if ( - !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && - !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS - ) - return; + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && + !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) + return; - const blacklistedElements = new Set([ - "TEXTAREA", - "INPUT", - "SELECT", - "BUTTON", - ]); - document.addEventListener("keydown", (event) => { - if (blacklistedElements.has(document.activeElement.tagName)) return; // bail for input elements - if (event.altKey || event.ctrlKey || event.metaKey) return; // bail with special keys + $(document).keydown(function(event) { + var activeElementType = document.activeElement.tagName; + // don't navigate when in search box, textarea, dropdown or button + if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT' + && activeElementType !== 'BUTTON') { + if (event.altKey || event.ctrlKey || event.metaKey) + return; - if (!event.shiftKey) { - switch (event.key) { - case "ArrowLeft": - if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; - - const prevLink = document.querySelector('link[rel="prev"]'); - if (prevLink && prevLink.href) { - window.location.href = prevLink.href; - event.preventDefault(); - } - break; - case "ArrowRight": - if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; - - const nextLink = document.querySelector('link[rel="next"]'); - if (nextLink && nextLink.href) { - window.location.href = nextLink.href; - event.preventDefault(); - } - break; - case "Escape": - if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; - Documentation.hideSearchWords(); - event.preventDefault(); + if (!event.shiftKey) { + switch (event.key) { + case 'ArrowLeft': + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) + break; + var prevHref = $('link[rel="prev"]').prop('href'); + if (prevHref) { + window.location.href = prevHref; + return false; + } + break; + case 'ArrowRight': + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) + break; + var nextHref = $('link[rel="next"]').prop('href'); + if (nextHref) { + window.location.href = nextHref; + return false; + } + break; + case 'Escape': + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) + break; + Documentation.hideSearchWords(); + return false; + } } - } - // some keyboard layouts may need Shift to get / - switch (event.key) { - case "/": - if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; - Documentation.focusSearchBar(); - event.preventDefault(); + // some keyboard layouts may need Shift to get / + switch (event.key) { + case '/': + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) + break; + Documentation.focusSearchBar(); + return false; + } } }); - }, + } }; // quick alias for translations -const _ = Documentation.gettext; +_ = Documentation.gettext; -_ready(Documentation.init); +$(document).ready(function() { + Documentation.init(); +}); diff --git a/docs/_static/documentation_options.js b/docs/_static/documentation_options.js index 9200e3a99..27728f486 100644 --- a/docs/_static/documentation_options.js +++ b/docs/_static/documentation_options.js @@ -1,7 +1,7 @@ var DOCUMENTATION_OPTIONS = { URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), VERSION: '3.0', - LANGUAGE: 'en', + LANGUAGE: 'None', COLLAPSE_INDEX: false, BUILDER: 'html', FILE_SUFFIX: '.html', @@ -10,5 +10,5 @@ var DOCUMENTATION_OPTIONS = { SOURCELINK_SUFFIX: '.txt', NAVIGATION_WITH_KEYS: false, SHOW_SEARCH_SUMMARY: true, - ENABLE_SEARCH_SHORTCUTS: false, + ENABLE_SEARCH_SHORTCUTS: true, }; \ No newline at end of file diff --git a/docs/_static/jquery.js b/docs/_static/jquery.js index c4c6022f2..b0614034a 100644 --- a/docs/_static/jquery.js +++ b/docs/_static/jquery.js @@ -1,2 +1,2 @@ -/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0 { - const [docname, title, anchor, descr, score, filename] = result - return score + score: function(result) { + return result[4]; }, */ @@ -30,11 +28,9 @@ if (typeof Scorer === "undefined") { // or matches in the last dotted part of the object name objPartialMatch: 6, // Additive scores depending on the priority of the object - objPrio: { - 0: 15, // used to be importantResults - 1: 5, // used to be objectResults - 2: -5, // used to be unimportantResults - }, + objPrio: {0: 15, // used to be importantResults + 1: 5, // used to be objectResults + 2: -5}, // used to be unimportantResults // Used when the priority is not in the mapping. objPrioDefault: 0, @@ -43,455 +39,452 @@ if (typeof Scorer === "undefined") { partialTitle: 7, // query found in terms term: 5, - partialTerm: 2, + partialTerm: 2 }; } -const _removeChildren = (element) => { - while (element && element.lastChild) element.removeChild(element.lastChild); -}; - -/** - * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping - */ -const _escapeRegExp = (string) => - string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string - -const _displayItem = (item, highlightTerms, searchTerms) => { - const docBuilder = DOCUMENTATION_OPTIONS.BUILDER; - const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT; - const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX; - const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX; - const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; - - const [docName, title, anchor, descr] = item; - - let listItem = document.createElement("li"); - let requestUrl; - let linkUrl; - if (docBuilder === "dirhtml") { - // dirhtml builder - let dirname = docName + "/"; - if (dirname.match(/\/index\/$/)) - dirname = dirname.substring(0, dirname.length - 6); - else if (dirname === "index/") dirname = ""; - requestUrl = docUrlRoot + dirname; - linkUrl = requestUrl; - } else { - // normal html builders - requestUrl = docUrlRoot + docName + docFileSuffix; - linkUrl = docName + docLinkSuffix; - } - const params = new URLSearchParams(); - params.set("highlight", [...highlightTerms].join(" ")); - let linkEl = listItem.appendChild(document.createElement("a")); - linkEl.href = linkUrl + "?" + params.toString() + anchor; - linkEl.innerHTML = title; - if (descr) - listItem.appendChild(document.createElement("span")).innerText = - " (" + descr + ")"; - else if (showSearchSummary) - fetch(requestUrl) - .then((responseData) => responseData.text()) - .then((data) => { - if (data) - listItem.appendChild( - Search.makeSearchSummary(data, searchTerms, highlightTerms) - ); - }); - Search.output.appendChild(listItem); -}; -const _finishSearch = (resultCount) => { - Search.stopPulse(); - Search.title.innerText = _("Search Results"); - if (!resultCount) - Search.status.innerText = Documentation.gettext( - "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories." - ); - else - Search.status.innerText = _( - `Search finished, found ${resultCount} page(s) matching the search query.` - ); -}; -const _displayNextItem = ( - results, - resultCount, - highlightTerms, - searchTerms -) => { - // results left, load the summary and display it - // this is intended to be dynamic (don't sub resultsCount) - if (results.length) { - _displayItem(results.pop(), highlightTerms, searchTerms); - setTimeout( - () => _displayNextItem(results, resultCount, highlightTerms, searchTerms), - 5 - ); +if (!splitQuery) { + function splitQuery(query) { + return query.split(/\s+/); } - // search finished, update title and status message - else _finishSearch(resultCount); -}; - -/** - * Default splitQuery function. Can be overridden in ``sphinx.search`` with a - * custom function per language. - * - * The regular expression works by splitting the string on consecutive characters - * that are not Unicode letters, numbers, underscores, or emoji characters. - * This is the same as ``\W+`` in Python, preserving the surrogate pair area. - */ -if (typeof splitQuery === "undefined") { - var splitQuery = (query) => query - .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu) - .filter(term => term) // remove remaining empty strings } /** * Search Module */ -const Search = { - _index: null, - _queued_query: null, - _pulse_status: -1, - - htmlToText: (htmlString) => { - const htmlElement = document - .createRange() - .createContextualFragment(htmlString); - _removeChildren(htmlElement.querySelectorAll(".headerlink")); - const docContent = htmlElement.querySelector('[role="main"]'); - if (docContent !== undefined) return docContent.textContent; - console.warn( - "Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template." - ); - return ""; +var Search = { + + _index : null, + _queued_query : null, + _pulse_status : -1, + + htmlToText : function(htmlString) { + var virtualDocument = document.implementation.createHTMLDocument('virtual'); + var htmlElement = $(htmlString, virtualDocument); + htmlElement.find('.headerlink').remove(); + docContent = htmlElement.find('[role=main]')[0]; + if(docContent === undefined) { + console.warn("Content block not found. Sphinx search tries to obtain it " + + "via '[role=main]'. Could you check your theme or template."); + return ""; + } + return docContent.textContent || docContent.innerText; }, - init: () => { - const query = new URLSearchParams(window.location.search).get("q"); - document - .querySelectorAll('input[name="q"]') - .forEach((el) => (el.value = query)); - if (query) Search.performSearch(query); + init : function() { + var params = $.getQueryParameters(); + if (params.q) { + var query = params.q[0]; + $('input[name="q"]')[0].value = query; + this.performSearch(query); + } }, - loadIndex: (url) => - (document.body.appendChild(document.createElement("script")).src = url), + loadIndex : function(url) { + $.ajax({type: "GET", url: url, data: null, + dataType: "script", cache: true, + complete: function(jqxhr, textstatus) { + if (textstatus != "success") { + document.getElementById("searchindexloader").src = url; + } + }}); + }, - setIndex: (index) => { - Search._index = index; - if (Search._queued_query !== null) { - const query = Search._queued_query; - Search._queued_query = null; - Search.query(query); + setIndex : function(index) { + var q; + this._index = index; + if ((q = this._queued_query) !== null) { + this._queued_query = null; + Search.query(q); } }, - hasIndex: () => Search._index !== null, - - deferQuery: (query) => (Search._queued_query = query), + hasIndex : function() { + return this._index !== null; + }, - stopPulse: () => (Search._pulse_status = -1), + deferQuery : function(query) { + this._queued_query = query; + }, - startPulse: () => { - if (Search._pulse_status >= 0) return; + stopPulse : function() { + this._pulse_status = 0; + }, - const pulse = () => { + startPulse : function() { + if (this._pulse_status >= 0) + return; + function pulse() { + var i; Search._pulse_status = (Search._pulse_status + 1) % 4; - Search.dots.innerText = ".".repeat(Search._pulse_status); - if (Search._pulse_status >= 0) window.setTimeout(pulse, 500); - }; + var dotString = ''; + for (i = 0; i < Search._pulse_status; i++) + dotString += '.'; + Search.dots.text(dotString); + if (Search._pulse_status > -1) + window.setTimeout(pulse, 500); + } pulse(); }, /** * perform a search for something (or wait until index is loaded) */ - performSearch: (query) => { + performSearch : function(query) { // create the required interface elements - const searchText = document.createElement("h2"); - searchText.textContent = _("Searching"); - const searchSummary = document.createElement("p"); - searchSummary.classList.add("search-summary"); - searchSummary.innerText = ""; - const searchList = document.createElement("ul"); - searchList.classList.add("search"); - - const out = document.getElementById("search-results"); - Search.title = out.appendChild(searchText); - Search.dots = Search.title.appendChild(document.createElement("span")); - Search.status = out.appendChild(searchSummary); - Search.output = out.appendChild(searchList); - - const searchProgress = document.getElementById("search-progress"); - // Some themes don't use the search progress node - if (searchProgress) { - searchProgress.innerText = _("Preparing search..."); - } - Search.startPulse(); + this.out = $('#search-results'); + this.title = $('

' + _('Searching') + '

').appendTo(this.out); + this.dots = $('').appendTo(this.title); + this.status = $('

 

').appendTo(this.out); + this.output = $('